autotel-devtools 28.0.0 → 28.0.2

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.
@@ -1,46 +1,46 @@
1
- var AutotelDevtools=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=1<<24,C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,E=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=Symbol(`form reset`),ye=new class extends Error{constructor(...e){super(...e),x(this,`name`,`StaleReactionError`),x(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},be=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function xe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ve=!1;function He(e){Ve=e}var Ue;function We(e){if(e===null)throw Re(),Ne;return Ue=e}function Ge(){return We(Dr(Ue))}function D(e){if(Ve){if(Dr(Ue)!==null)throw Re(),Ne;Ue=e}}function Ke(e=1){if(Ve){for(var t=e,n=Ue;t--;)n=Dr(n);Ue=n}}function qe(e=!0){for(var t=0,n=Ue;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Dr(n);e&&n.remove(),n=i}}function Je(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ye(e){return e===this.v}function Xe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ze(e){return!Xe(e,this.v)}var Qe=null;function $e(e){Qe=e}function et(e){return st(`getContext`).get(e)}function tt(e,t){return st(`setContext`).set(e,t),t}function nt(e){return st(`hasContext`).has(e)}function rt(){return st(`getAllContexts`)}function it(e,t=!1,n){Qe={p:Qe,i:!1,c:null,e:null,s:e,x:null,r:fi,l:null}}function at(e){var t=Qe,n=t.e;if(n!==null){t.e=null;for(var r of n)Rr(r)}return e!==void 0&&(t.x=e),t.i=!0,Qe=t.p,e??{}}function ot(){return!0}function st(e){var t;return Qe===null&&xe(e),(t=Qe).c??(t.c=new Map(ct(Qe)||void 0))}function ct(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var lt=[];function ut(){var e=lt;lt=[],m(e)}function dt(e){if(lt.length===0&&!Tn){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=fi;if(t===null)return li.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ht=~(w|T|C);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,C):gt(e,T)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,C)}var bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}function St(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Ct=!1;function wt(){Ct||(Ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ve]?.()})},{capture:!0}))}function Tt(e){var t=li,n=fi;di(null),pi(null);try{return e()}finally{di(t),pi(n)}}function Et(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));let i=e[ve];e[ve]=i?()=>{i(),r(!0)}:()=>r(!0),wt()}function Dt(e){let t=0,n=dr(0),r;return()=>{Fr()&&(z(n),Wr(()=>(t===0&&(r=Pi(()=>e(()=>hr(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,hr(n))})})))}}function Ot(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function kt(e,t){Ot(e,t),t.add(e)}function O(e,t,n){Ot(e,t),t.set(e,n)}function k(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function A(e,t,n){return e.set(k(e,t),n),n}function j(e,t){return e.get(k(e,t))}var At=ie|ae;function jt(e,t,n,r){new Yt(e,t,n,r)}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakSet,Yt=class{constructor(e,t,n,r){kt(this,Jt),x(this,`parent`,void 0),x(this,`is_pending`,!1),x(this,`transform_error`,void 0),O(this,Mt,void 0),O(this,Nt,Ve?Ue:null),O(this,Pt,void 0),O(this,Ft,void 0),O(this,It,void 0),O(this,Lt,null),O(this,Rt,null),O(this,zt,null),O(this,Bt,null),O(this,Vt,0),O(this,Ht,0),O(this,Ut,!1),O(this,Wt,new Set),O(this,Gt,new Set),O(this,Kt,null),O(this,qt,Dt(()=>(A(Kt,this,dr(j(Vt,this))),()=>{A(Kt,this,null)}))),A(Mt,this,e),A(Pt,this,t),A(Ft,this,e=>{var t=fi;t.b=this,t.f|=128,n(e)}),this.parent=fi.b,this.transform_error=r??this.parent?.transform_error??(e=>e),A(It,this,Gr(()=>{if(Ve){let e=j(Nt,this);Ge();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));k(Jt,this,Zt).call(this,t)}else t?k(Jt,this,$t).call(this):k(Jt,this,Xt).call(this)}else k(Jt,this,en).call(this)},At)),Ve&&A(Mt,this,Ue)}defer_effect(e){yt(e,j(Wt,this),j(Gt,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!j(Pt,this).pending}update_pending_count(e,t){k(Jt,this,rn).call(this,e,t),A(Vt,this,j(Vt,this)+e),!(!j(Kt,this)||j(Ut,this))&&(A(Ut,this,!0),dt(()=>{A(Ut,this,!1),j(Kt,this)&&pr(j(Kt,this),j(Vt,this))}))}get_effect_pending(){return j(qt,this).call(this),z(j(Kt,this))}error(e){if(!j(Pt,this).onerror&&!j(Pt,this).failed)throw e;xn?.is_fork?(j(Lt,this)&&xn.skip_effect(j(Lt,this)),j(Rt,this)&&xn.skip_effect(j(Rt,this)),j(zt,this)&&xn.skip_effect(j(zt,this)),xn.oncommit(()=>{k(Jt,this,an).call(this,e)})):k(Jt,this,an).call(this,e)}};function Xt(){try{A(Lt,this,qr(()=>j(Ft,this).call(this,j(Mt,this))))}catch(e){this.error(e)}}function Zt(e){let t=j(Pt,this).failed,{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);dt(r),t&&A(zt,this,qr(()=>{t(j(Mt,this),()=>e,()=>n)}))}function Qt(e){var t=!1,n=!1;let r=()=>{if(t){Be();return}t=!0,n&&Me(),j(zt,this)!==null&&ei(j(zt,this),()=>{A(zt,this,null)}),k(Jt,this,nn).call(this,()=>{k(Jt,this,en).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,j(Pt,this).onerror?.(e,r),n=!1}catch(e){mt(e,j(It,this)&&j(It,this).parent)}}}}function $t(){let e=j(Pt,this).pending;e&&(this.is_pending=!0,A(Rt,this,qr(()=>e(j(Mt,this)))),dt(()=>{var e=A(Bt,this,document.createDocumentFragment()),t=Tr();e.append(t),A(Lt,this,k(Jt,this,nn).call(this,()=>qr(()=>j(Ft,this).call(this,t)))),j(Ht,this)===0&&(j(Mt,this).before(e),A(Bt,this,null),ei(j(Rt,this),()=>{A(Rt,this,null)}),k(Jt,this,tn).call(this,xn))}))}function en(){try{if(this.is_pending=this.has_pending_snippet(),A(Ht,this,0),A(Vt,this,0),A(Lt,this,qr(()=>{j(Ft,this).call(this,j(Mt,this))})),j(Ht,this)>0){var e=A(Bt,this,document.createDocumentFragment());ii(j(Lt,this),e);let t=j(Pt,this).pending;A(Rt,this,qr(()=>t(j(Mt,this))))}else k(Jt,this,tn).call(this,xn)}catch(e){this.error(e)}}function tn(e){this.is_pending=!1,e.transfer_effects(j(Wt,this),j(Gt,this))}function nn(e){var t=fi,n=li,r=Qe;pi(j(It,this)),di(j(It,this)),$e(j(It,this).ctx);try{return qn.ensure(),e()}catch(e){return pt(e),null}finally{pi(t),di(n),$e(r)}}function rn(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;k(Jt,n=this.parent,rn).call(n,e,t)}return}A(Ht,this,j(Ht,this)+e),j(Ht,this)===0&&(k(Jt,this,tn).call(this,t),j(Rt,this)&&ei(j(Rt,this),()=>{A(Rt,this,null)}),j(Bt,this)&&(j(Mt,this).before(j(Bt,this)),A(Bt,this,null)))}function an(e){j(Lt,this)&&(Zr(j(Lt,this)),A(Lt,this,null)),j(Rt,this)&&(Zr(j(Rt,this)),A(Rt,this,null)),j(zt,this)&&(Zr(j(zt,this)),A(zt,this,null)),Ve&&(We(j(Nt,this)),Ke(),We(qe()));let t=j(Pt,this).failed,n=e=>{let{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);r(),t&&A(zt,this,k(Jt,this,nn).call(this,()=>{try{return qr(()=>{var r=fi;r.b=this,r.f|=128,t(j(Mt,this),()=>e,()=>n)})}catch(e){return mt(e,j(It,this).parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,j(It,this)&&j(It,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>mt(e,j(It,this)&&j(It,this).parent)):n(t)})}function on(e,t,n,r){let i=ot()?un:pn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=fi,c=sn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){mt(e,s)}cn()}}var d=ln();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>fn(e))).then(u).catch(e=>mt(e,s)).finally(d)}l?l.then(()=>{c(),f(),cn()}):f()}function sn(){var e=fi,t=li,n=Qe,r=xn;return function(i=!0){pi(e),di(t),$e(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){pi(null),di(null),$e(null),e&&xn?.deactivate()}function ln(){var e=fi,t=e.b,n=xn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function un(e){var t=2|w;return fi!==null&&(fi.f|=ae),{ctx:Qe,deps:null,effects:null,equals:Ye,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:fi,ac:null}}var dn=Symbol(`obsolete`);function fn(e,t,n){let r=fi;r===null&&Se();var i=void 0,a=dr(Pe),o=!li,s=new Set;return Ur(()=>{var t=fi,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ye&&n.reject(e)}).finally(cn)}catch(e){n.reject(e),cn()}var c=xn;if(o){if(t.f&32768)var l=ln();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(dn);else for(let e of s.values())e.reject(dn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==dn&&(c.activate(),t?(a.f|=ue,pr(a,t)):(a.f&8388608&&(a.f^=ue),pr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ir(()=>{for(let e of s)e.reject(dn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=un(e);return hi(t),t}function pn(e){let t=un(e);return t.equals=Ze,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Zr(t[n])}}function hn(e){var t,n=fi,r=e.parent;if(!si&&r!==null&&e.v!==Pe&&r.f&24576)return Le(),e.v;pi(r);try{e.f&=~ce,mn(e),t=Di(e)}finally{pi(n)}return t}function gn(e){var t=hn(e);if(!e.equals(t)&&(e.wv=wi(),(!xn?.is_fork||e.deps===null)&&(xn===null?e.v=t:(xn.capture(e,t,!0),Sn?.capture(e,t,!0)),e.deps===null))){gt(e,C);return}si||(Cn===null?_t(e):(Fr()||xn?.is_fork)&&Cn.set(e,t))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Tt(()=>{t.ac.abort(ye),t.ac=null}),t.fn!==null&&(t.teardown=p),ki(t,0),Yr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var yn,bn=null,xn=null,Sn=null,Cn=null,wn=null,Tn=!1,En=!1,Dn=null,On=null,kn=0,An=1,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakSet,qn=class e{constructor(){kt(this,Kn),x(this,`id`,An++),O(this,jn,!1),x(this,`linked`,!0),O(this,Mn,null),O(this,Nn,null),x(this,`async_deriveds`,new Map),x(this,`current`,new Map),x(this,`previous`,new Map),O(this,Pn,new Set),O(this,Fn,new Set),O(this,In,0),O(this,Ln,new Map),O(this,Rn,null),O(this,zn,[]),O(this,Bn,[]),O(this,Vn,new Set),O(this,Hn,new Set),O(this,Un,new Map),O(this,Wn,new Set),x(this,`is_fork`,!1),O(this,Gn,!1),bn===null?bn=this:(A(Nn,bn,this),A(Mn,this,bn)),bn=this}skip_effect(e){j(Un,this).has(e)||j(Un,this).set(e,{d:[],m:[]}),j(Wn,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=j(Un,this).get(e);if(n){j(Un,this).delete(e);for(var r of n.d)gt(r,w),t(r);for(r of n.m)gt(r,T),t(r)}j(Wn,this).add(e)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Cn?.set(e,t)),this.is_fork||(e.v=t)}activate(){xn=this}deactivate(){xn=null,Cn=null}flush(){try{En=!0,xn=this,k(Kn,this,Yn).call(this)}finally{kn=0,wn=null,Dn=null,On=null,En=!1,xn=null,Cn=null,lr.clear()}}discard(){for(let e of j(Fn,this))e(this);j(Fn,this).clear();for(let e of this.async_deriveds.values())e.reject(dn);k(Kn,this,er).call(this),j(Rn,this)?.resolve()}register_created_effect(e){j(Bn,this).push(e)}increment(e,t){if(A(In,this,j(In,this)+1),e){let e=j(Ln,this).get(t)??0;j(Ln,this).set(t,e+1)}}decrement(e,t){if(A(In,this,j(In,this)-1),e){let e=j(Ln,this).get(t)??0;e===1?j(Ln,this).delete(t):j(Ln,this).set(t,e-1)}j(Gn,this)||(A(Gn,this,!0),dt(()=>{A(Gn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)j(Vn,this).add(t);for(let e of t)j(Hn,this).add(e);e.clear(),t.clear()}oncommit(e){j(Pn,this).add(e)}ondiscard(e){j(Fn,this).add(e)}settled(){return(j(Rn,this)??A(Rn,this,h())).promise}static ensure(){if(xn===null){let t=xn=new e;!En&&!Tn&&dt(()=>{j(jn,t)||t.flush()})}return xn}apply(){Cn=null}schedule(e){if(wn=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dn!==null&&t===fi&&(li===null||!(li.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=C}}j(zn,this).push(t)}};yn=qn;function Jn(){if(this.is_fork)return!0;for(let n of j(Ln,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(j(Un,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Yn(){A(jn,this,!0),kn++>1e3&&(k(Kn,this,er).call(this),nr());for(let e of j(Vn,this))j(Hn,this).delete(e),gt(e,w),this.schedule(e);for(let e of j(Hn,this))gt(e,T),this.schedule(e);let e=j(zn,this);A(zn,this,[]),this.apply();var t=Dn=[],n=[],r=On=[];for(let r of e)try{k(Kn,this,Xn).call(this,r,t,n)}catch(e){throw sr(r),k(Kn,this,Jn).call(this)||this.discard(),e}if(xn=null,r.length>0){var i=yn.ensure();for(let e of r)i.schedule(e)}if(Dn=null,On=null,k(Kn,this,Jn).call(this)){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t);for(let[e,t]of j(Un,this))or(e,t);r.length>0&&k(Kn,xn,Yn).call(xn);return}let a=k(Kn,this,Zn).call(this);if(a){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t),k(Kn,a,Qn).call(a,this);return}j(Vn,this).clear(),j(Hn,this).clear();for(let e of j(Pn,this))e(this);j(Pn,this).clear(),Sn=this,ir(n),ir(t),Sn=null,j(Rn,this)?.resolve();var o=xn;if(j(In,this)===0&&(j(zn,this).length===0||o!==null)&&k(Kn,this,er).call(this),j(zn,this).length>0){if(o!==null){let e=o;j(zn,e).push(...j(zn,this).filter(t=>!j(zn,e).includes(t)))}else o=this}o!==null&&k(Kn,o,Yn).call(o)}function Xn(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||j(Un,this).has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):Ti(r)&&(i&16&&j(Hn,this).add(r),Ai(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Zn(){for(var e=j(Mn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=j(Mn,e)}return null}function Qn(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(j(Vn,e),j(Hn,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(j(Hn,this).delete(i),gt(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),k(Kn,e,er).call(e),xn=this,k(Kn,this,Yn).call(this)}function $n(e){for(var t=0;t<e.length;t+=1)yt(e[t],j(Vn,this),j(Hn,this))}function er(){if(this.linked){var e=j(Mn,this),t=j(Nn,this);e===null||A(Nn,e,t),t===null?bn=e:A(Mn,t,e),this.linked=!1}}function tr(e){var t=Tn;Tn=!0;try{var n;for(e&&(xn!==null&&!xn.is_fork&&xn.flush(),n=e());;){if(ft(),xn===null)return n;xn.flush()}}finally{Tn=t}}function nr(){try{De()}catch(e){mt(e,wn)}}var rr=null;function ir(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ti(r)&&(rr=new Set,Ai(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$r(r),rr?.size>0)){lr.clear();for(let e of rr){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)rr.has(n)&&(rr.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ai(n)}}rr.clear()}}rr=null}}function ar(e){xn.schedule(e)}function or(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,C);for(var n=e.first;n!==null;)or(n,t),n=n.next}}function sr(e){gt(e,C);for(var t=e.first;t!==null;)sr(t),t=t.next}var cr=new Set,lr=new Map,ur=!1;function dr(e,t){return{f:0,v:e,reactions:null,equals:Ye,rv:0,wv:0}}function N(e,t){let n=dr(e,t);return hi(n),n}function fr(e,t=!1,n=!0){let r=dr(e);return t||(r.equals=Ze),r}function P(e,t,n=!1){return li!==null&&(!ui||li.f&131072)&&ot()&&li.f&4325394&&(mi===null||!mi.has(e))&&je(),pr(e,n?_r(t):t,On)}function pr(e,t,n=null){if(!e.equals(t)){lr.set(e,si?t:e.v);var r=qn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&hn(t),Cn===null&&_t(t)}e.wv=wi(),gr(e,w,n),ot()&&fi!==null&&fi.f&1024&&!(fi.f&96)&&(vi===null?yi([e]):vi.push(e)),!r.is_fork&&cr.size>0&&!ur&&mr()}return t}function mr(){ur=!1;for(let e of cr){e.f&1024&&gt(e,T);let t;try{t=Ti(e)}catch{t=!0}t&&Ai(e)}cr.clear()}function hr(e){P(e,e.v+1)}function gr(e,t,n){var r=e.reactions;if(r!==null)for(var i=ot(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===fi)){var l=(c&w)===0;if(l&&gt(s,t),c&131072)cr.add(s);else if(c&2){var u=s;Cn?.delete(u),c&65536||(c&512&&(fi===null||!(fi.f&2097152))&&(s.f|=ce),gr(u,T,n))}else if(l){var d=s;c&16&&rr!==null&&rr.add(d),n===null?ar(d):n.push(d)}}}}function _r(e){if(typeof e!=`object`||!e||de in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=N(0),s=null,d=Si,f=e=>{if(Si===d)return e();var t=li,n=Si;di(null),Ci(d);var r=e();return di(t),Ci(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(Pe,s));r.set(t,e),hr(a)}}else P(n,Pe),hr(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>N(_r(c?t[n]:Pe),s)),r.set(n,a)),a!==void 0){var l=z(a);return l===Pe?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==Pe||Reflect.has(e,t);return(n!==void 0||fi!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?_r(e[t]):Pe,s)),r.set(t,n)),z(n)===Pe)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(Pe,s)),r.set(d+``,p)):P(p,Pe)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>N(void 0,s)),P(l,_r(n)),r.set(t,l));else{u=l.v!==Pe;var m=f(()=>_r(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}hr(a)}return!0},ownKeys(e){z(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==Pe});for(var[n,i]of r)i.v!==Pe&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function vr(e){try{if(typeof e==`object`&&e&&de in e)return e[de]}catch{}return e}function yr(e,t){return Object.is(vr(e),vr(t))}var br,xr,Sr,Cr;function wr(){if(br===void 0){br=window,xr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Sr=o(t,`firstChild`).get,Cr=o(t,`nextSibling`).get,d(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),d(n)&&(n[_e]=void 0)}}function Tr(e=``){return document.createTextNode(e)}function Er(e){return Sr.call(e)}function Dr(e){return Cr.call(e)}function F(e,t){if(!Ve)return Er(e);var n=Er(Ue);if(n===null)n=Ue.appendChild(Tr());else if(t&&n.nodeType!==3){var r=Tr();return n?.before(r),We(r),r}return t&&jr(n),We(n),n}function I(e,t=!1){if(!Ve){var n=Er(e);return n instanceof Comment&&n.data===``?Dr(n):n}if(t){if(Ue?.nodeType!==3){var r=Tr();return Ue?.before(r),We(r),r}jr(Ue)}return Ue}function L(e,t=1,n=!1){let r=Ve?Ue:e;for(var i;t--;)i=r,r=Dr(r);if(!Ve)return r;if(n){if(r?.nodeType!==3){var a=Tr();return r===null?i?.after(a):r.before(a),We(a),a}jr(r)}return We(r),r}function Or(e){e.textContent=``}function kr(){return!1}function Ar(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function jr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Mr(e){fi===null&&(li===null&&Ee(e),Te()),si&&we(e)}function Nr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pr(e,t){var n=fi;n!==null&&n.f&8192&&(e|=ee);var r={ctx:Qe,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};xn?.register_created_effect(r);var i=r;if(e&4)Dn===null?qn.ensure().schedule(r):Dn.push(r);else if(t!==null){try{Ai(r)}catch(e){throw Zr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Nr(i,n),li!==null&&li.f&2&&!(e&64))){var a=li;(a.effects??(a.effects=[])).push(i)}return r}function Fr(){return li!==null&&!ui}function Ir(e){let t=Pr(8,null);return gt(t,C),t.teardown=e,t}function Lr(e){Mr(`$effect`);var t=fi.f;if(!li&&t&32&&Qe!==null&&!Qe.i){var n=Qe;(n.e??(n.e=[])).push(e)}else return Rr(e)}function Rr(e){return Pr(4|oe,e)}function zr(e){return Mr(`$effect.pre`),Pr(8|oe,e)}function Br(e){qn.ensure();let t=Pr(64|ae,e);return()=>{Zr(t)}}function Vr(e){qn.ensure();let t=Pr(64|ae,e);return(e={})=>new Promise(n=>{e.outro?ei(t,()=>{Zr(t),n(void 0)}):(Zr(t),n(void 0))})}function Hr(e){return Pr(4,e)}function Ur(e){return Pr(E|ae,e)}function Wr(e,t=0){return Pr(8|t,e)}function R(e,t=[],n=[],r=[]){on(r,t,n,t=>{Pr(8,()=>{e(...t.map(z))})})}function Gr(e,t=0){return Pr(16|t,e)}function Kr(e,t=0){return Pr(S|t,e)}function qr(e){return Pr(32|ae,e)}function Jr(e){var t=e.teardown;if(t!==null){let e=si,n=li;ci(!0),di(null);try{t.call(null)}finally{ci(e),di(n)}}}function Yr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Tt(()=>{e.abort(ye)});var r=n.next;n.f&64?n.parent=null:Zr(n,t),n=r}}function Xr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Zr(t),t=n}}function Zr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qr(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Yr(e,t&&!n),ki(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Jr(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qr(e,t){for(;e!==null;){var n=e===t?null:Dr(e);e.remove(),e=n}}function $r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ei(e,t,n=!0){var r=[];ti(e,r,!0);var i=()=>{n&&Zr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ti(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);ti(i,t,o?n:!1)}i=a}}}function ni(e){ri(e,!0)}function ri(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(gt(e,w),qn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);ri(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ii(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Dr(n);t.append(n),n=i}}var ai=null,oi=!1,si=!1;function ci(e){si=e}var li=null,ui=!1;function di(e){li=e}var fi=null;function pi(e){fi=e}var mi=null;function hi(e){li!==null&&(mi??(mi=new Set)).add(e)}var gi=null,_i=0,vi=null;function yi(e){vi=e}var bi=1,xi=0,Si=xi;function Ci(e){Si=e}function wi(){return++bi}function Ti(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ti(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Cn===null&&gt(e,C)}return!1}function Ei(e,t,n=!0){var r=e.reactions;if(r!==null&&!(mi!==null&&mi.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ei(a,t,!1):t===a&&(n?gt(a,w):a.f&1024&&gt(a,T),ar(a))}}function Di(e){var t=gi,n=_i,r=vi,i=li,a=mi,o=Qe,s=ui,c=Si,l=e.f;gi=null,_i=0,vi=null,li=l&96?null:e,mi=null,$e(e.ctx),ui=!1,Si=++xi,e.ac!==null&&(Tt(()=>{e.ac.abort(ye)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=xn?.is_fork;if(gi!==null){var m;if(p||ki(e,_i),f!==null&&_i>0)for(f.length=_i+gi.length,m=0;m<gi.length;m++)f[_i+m]=gi[m];else e.deps=f=gi;if(Fr()&&e.f&512)for(m=_i;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else!p&&f!==null&&_i<f.length&&(ki(e,_i),f.length=_i);if(ot()&&vi!==null&&!ui&&f!==null&&!(e.f&6146))for(m=0;m<vi.length;m++)Ei(vi[m],e);if(i!==null&&i!==e){if(xi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=xi;if(t!==null)for(let e of t)e.rv=xi;vi!==null&&(r===null?r=vi:r.push(...vi))}return e.f&8388608&&(e.f^=ue),d}catch(e){return pt(e)}finally{e.f^=le,gi=t,_i=n,vi=r,li=i,mi=a,$e(o),ui=s,Si=c}}function Oi(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(gi===null||!r.call(gi,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~ce),s.v!==Pe&&_t(s),s.ac!==null&&Tt(()=>{s.ac.abort(ye),s.ac=null,gt(s,w)}),_n(s),ki(s,0)}}function ki(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Oi(e,n[r])}function Ai(e){var t=e.f;if(!(t&16384)){gt(e,C);var n=fi,r=oi;fi=e,oi=!(t&96);try{t&16777232?Xr(e):Yr(e),Jr(e);var i=Di(e);e.teardown=typeof i==`function`?i:null,e.wv=bi}finally{oi=r,fi=n}}}async function ji(){await Promise.resolve(),tr()}function z(e){var t=!!(e.f&2);if(ai?.add(e),li!==null&&!ui&&!(fi!==null&&fi.f&16384)&&(mi===null||!mi.has(e))){var n=li.deps;if(li.f&2097152)e.rv<xi&&(e.rv=xi,gi===null&&n!==null&&n[_i]===e?_i++:gi===null?gi=[e]:gi.push(e));else{var i;(i=li).deps??(i.deps=[]),r.call(li.deps,e)||li.deps.push(e);var a=e.reactions;a===null?e.reactions=[li]:r.call(a,li)||a.push(li)}}if(si&&lr.has(e))return lr.get(e);if(t){var o=e;if(si){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Ni(o))&&(s=hn(o)),lr.set(o,s),s}var c=!(o.f&512)&&!ui&&li!==null&&(oi||!!(li.f&512)),l=(o.f&ne)===0;Ti(o)&&(c&&(o.f|=512),gn(o)),c&&!l&&(vn(o),Mi(o))}if(Cn?.has(e))return Cn.get(e);if(e.f&8388608)throw e.v;return e.v}function Mi(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(vn(t),Mi(t))}function Ni(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(lr.has(t)||t.f&2&&Ni(t))return!0;return!1}function Pi(e){var t=ui;try{return ui=!0,e()}finally{ui=t}}function Fi(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Ii(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Ii(n)}}}function Ii(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ii(e[n],t)}catch{}let n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=s(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Li(){return Symbol(Ie)}function Ri(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var zi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Bi(e){return zi.includes(e)}var Vi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Hi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Ui(e){return e=e.toLowerCase(),Hi[e]??e}[...Vi];var Wi=[`touchstart`,`touchmove`];function Gi(e){return Wi.includes(e)}var Ki=[`textarea`,`script`,`style`,`title`];function qi(e){return Ki.includes(e)}var Ji=Symbol(`events`),Yi=new Set,Xi=new Set;function Zi(e,t,n,r={}){function i(e){if(r.capture||na.call(t,e),!e.cancelBubble)return Tt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qi(e,t,n,r={}){var i=Zi(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function $i(e,t,n,r,i){var a={capture:r,passive:i},o=Zi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,o,a)})}function B(e,t,n){(t[Ji]??(t[Ji]={}))[e]=n}function ea(e){for(var t=0;t<e.length;t++)Yi.add(e[t]);for(var n of Xi)n(e)}var ta=null;function na(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ta=e;var s=0,c=ta===e&&e[Ji];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Ji]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=li,f=fi;di(null),pi(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Ji]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Ji]=t,delete e.currentTarget,di(d),pi(f)}}}var ra=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ia(e){return ra?.createHTML(e)??e}function aa(e){var t=Ar(`template`);return t.innerHTML=ia(e.replaceAll(`<!>`,`<!---->`)),t.content}function oa(e,t){var n=fi;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(Ve)return oa(Ue,null),Ue;i===void 0&&(i=aa(a?e:`<!>`+e),n||(i=Er(i)));var t=r||xr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Er(t),s=t.lastChild;oa(o,s)}else oa(t,t);return t}}function sa(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ve)return oa(Ue,null),Ue;if(!o){var e=Er(aa(a));if(i)for(o=document.createDocumentFragment();Er(e);)o.appendChild(Er(e));else o=Er(e)}var t=o.cloneNode(!0);if(i){var n=Er(t),r=t.lastChild;oa(n,r)}else oa(t,t);return t}}function ca(e,t){return sa(e,t,`svg`)}function la(){if(Ve)return oa(Ue,null),Ue;var e=document.createDocumentFragment(),t=document.createComment(``),n=Tr();return e.append(t,n),oa(t,n),e}function H(e,t){if(Ve){var n=fi;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ue),Ge();return}e!==null&&e.before(t)}function ua(){var e,t;if(Ve&&Ue&&Ue.nodeType===8&&Ue.textContent?.startsWith(`$`)){let e=Ue.textContent.substring(1);return Ge(),e}return(e=(t=window).__svelte??(t.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}var da=!0;function fa(e){da=e}function U(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??(e[_e]=e.nodeValue))&&(e[_e]=n,e.nodeValue=`${n}`)}function pa(e,t){return ha(e,t)}var ma=new Map;function ha(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){wr();var l=void 0,u=Vr(()=>{var u=n??t.appendChild(Tr());jt(u,{pending:()=>{}},t=>{it({});var n=Qe;if(o&&(n.c=o),a&&(r.$$events=a),Ve&&oa(t,null),da=s,l=e(t,r)||{},da=!0,Ve&&(fi.nodes.end=Ue,Ue===null||Ue.nodeType!==8||Ue.data!==`]`))throw Re(),Ne;at()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=Gi(r);for(let e of[t,document]){var a=ma.get(e);a===void 0&&(a=new Map,ma.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,na,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(Yi)),Xi.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=ma.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,na),r.delete(e),r.size===0&&ma.delete(n)):r.set(e,i)}Xi.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return ga.set(l,u),l}var ga=new WeakMap;function _a(e,t){let n=ga.get(e);return n?(ga.delete(e),n(t)):Promise.resolve()}var va=new WeakMap,ya=new WeakMap,ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=class{constructor(e,t=!0){x(this,`anchor`,void 0),O(this,va,new Map),O(this,ya,new Map),O(this,ba,new Map),O(this,xa,new Set),O(this,Sa,!0),O(this,Ca,e=>{if(j(va,this).has(e)){var t=j(va,this).get(e),n=j(ya,this).get(t);if(n)ni(n),j(xa,this).delete(t);else{var r=j(ba,this).get(t);r&&(ni(r.effect),j(ya,this).set(t,r.effect),j(ba,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of j(va,this)){if(j(va,this).delete(t),t===e)break;let r=j(ba,this).get(n);r&&(Zr(r.effect),j(ba,this).delete(n))}for(let[e,r]of j(ya,this)){if(e===t||j(xa,this).has(e))continue;let i=()=>{if(Array.from(j(va,this).values()).includes(e)){var t=document.createDocumentFragment();ii(r,t),t.append(Tr()),j(ba,this).set(e,{effect:r,fragment:t})}else Zr(r);j(xa,this).delete(e),j(ya,this).delete(e)};j(Sa,this)||!n?(j(xa,this).add(e),ei(r,i,!1)):i()}}}),O(this,wa,e=>{j(va,this).delete(e);let t=Array.from(j(va,this).values());for(let[e,n]of j(ba,this))t.includes(e)||(Zr(n.effect),j(ba,this).delete(e))}),this.anchor=e,A(Sa,this,t)}ensure(e,t){var n=xn,r=kr();if(t&&!j(ya,this).has(e)&&!j(ba,this).has(e)){if(r){var i=document.createDocumentFragment(),a=Tr();i.append(a),j(ba,this).set(e,{effect:qr(()=>t(a)),fragment:i})}else j(ya,this).set(e,qr(()=>t(this.anchor)))}if(j(va,this).set(n,e),r){for(let[t,r]of j(ya,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of j(ba,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(j(Ca,this)),n.ondiscard(j(wa,this))}else Ve&&(this.anchor=Ue),j(Ca,this).call(this,n)}};function W(e,t,n=!1){var r;Ve&&(r=Ue,Ge());var i=new Ta(e),a=n?ie:0;function o(e,t){if(Ve){var n=Je(r);if(e!==parseInt(n.substring(1))){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,t),He(!0);return}}i.ensure(e,t)}Gr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Ea=Symbol(`NaN`);function Da(e,t,n){Ve&&Ge();var r=new Ta(e),i=!ot();Gr(()=>{var e=t();e!==e&&(e=Ea),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Oa(e,t){return t}function ka(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];ei(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Aa(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Or(d),d.append(u),e.items.clear()}Aa(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function Aa(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,ii(a,document.createDocumentFragment())):Zr(t[i],n)}}var ja;function G(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=Ve?We(Er(u)):u.appendChild(Tr())}Ve&&Ge();var d=null,f=pn(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Na(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,Fa(d,null,c)):ni(d):ei(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Gr(()=>{p=z(f);var e=p.length;let t=!1;Ve&&Je(c)===`[!`!=(e===0)&&(c=qe(),We(c),He(!1),t=!0);for(var i=new Set,u=xn,v=kr(),y=0;y<e;y+=1){Ve&&Ue.nodeType===8&&Ue.data===`]`&&(c=Ue,t=!0,He(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&pr(S.v,b),S.i&&pr(S.i,y),v&&u.unskip_effect(S.e)):(S=Pa(l,h?c:ja??(ja=Tr()),b,x,y,o,n,r),h||(S.e.f|=se),l.set(x,S)),i.add(x)}if(e===0&&s&&!d&&(h?d=qr(()=>s(c)):(d=qr(()=>s(ja??(ja=Tr()))),d.f|=se)),e>i.size&&Ce(``,``,``),Ve&&e>0&&We(qe()),!h){if(m.set(u,i),v){for(let[e,t]of l)i.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u)}t&&He(!0),z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ve&&(c=Ue)}function Ma(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Na(e,t,n,r,a){var o=!!(r&8),s=t.length,c=e.items,l=Ma(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(ni(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432){if(_.f^=se,_===l)Fa(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ia(e,d,_),Ia(e,_,y),Fa(_,y,n),d=_,p=[],m=[],l=Ma(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Fa(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ia(e,S.prev,C.next),Ia(e,d,S),Ia(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Fa(_,l,n),Ia(e,_.prev,_.next),Ia(e,_,d===null?e.effect.first:d.next),Ia(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Ma(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Ma(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Aa(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Ma(l.next);var T=w.length;if(T>0){var ee=r&4&&s===0?n:null;if(o){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}ka(e,w,ee)}}o&&dt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Pa(e,t,n,r,i,a,o,s){var c=o&1?o&16?dr(n):fr(n,!1,!1):null,l=o&2?dr(i):null;return{v:c,i:l,e:qr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Fa(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Dr(r);if(a.before(r),r===i)return;r=o}}function Ia(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function La(e,t,...n){var r=new Ta(e);Gr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}function Ra(e,t,n){var r;Ve&&(r=Ue,Ge());var i=new Ta(e);Gr(()=>{var e=t()??null;if(Ve&&Je(r)===`[`!=(e!==null)){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,e&&(t=>n(t,e))),He(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ie)}var za=()=>performance.now(),Ba={tick:e=>requestAnimationFrame(e),now:()=>za(),tasks:new Set};function Va(){let e=Ba.now();Ba.tasks.forEach(t=>{t.c(e)||(Ba.tasks.delete(t),t.f())}),Ba.tasks.size!==0&&Ba.tick(Va)}function Ha(e){let t;return Ba.tasks.size===0&&Ba.tick(Va),{promise:new Promise(n=>{Ba.tasks.add(t={c:e,f:n})}),abort(){Ba.tasks.delete(t)}}}function Ua(e,t){Tt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Wa(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Ga(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Wa(n.trim());t[i]=r.trim()}return t}var Ka=e=>e;function qa(e,t,n,r){var i,a=!!(e&1),o=!!(e&2),s=a&&o,c=!!(e&4),l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return Tt(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){if(t.inert=d,!a){m?.abort(),m?.reset?.();return}o||p?.abort(),p=Ja(t,h(),m,1,()=>{Ua(t,`introstart`)},()=>{Ua(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,m=Ja(t,h(),p,0,()=>{Ua(t,`outrostart`)},()=>{Ua(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=fi;if(((i=_.nodes).t??(i.t=[])).push(g),a&&da){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||!!(y.f&32768)}v&&Hr(()=>{Pi(()=>g.in())})}}function Ja(e,t,n,r,i,a){var o=r===1;if(f(t)){var s,c=!1;return dt(()=>{c||(s=Ja(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{c=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=Ka}=t;var h=[];if(o&&n===void 0&&(d&&d(0,1),u)){var g=Ga(u(0,1));h.push(g,g)}var _=()=>1-r,v=e.animate(h,{duration:l,fill:`forwards`});return v.onfinish=()=>{v.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),h=0;h<=p;h+=1){var g=o+s*m(h/p),y=Ga(u(g,1-g));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),_=()=>{var e=v.currentTime;return o+s*m(e/c)},d&&Ha(()=>{if(v.playState!==`running`)return!1;var e=_();return d(e,1-e),!0})}v=e.animate(l,{duration:c,fill:`forwards`}),v.onfinish=()=>{_=()=>r,d?.(r,1-r),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>_()}}function Ya(e,t,n,r,i,a){let o=Ve;Ve&&Ge();var s=null;Ve&&Ue.nodeType===1&&(s=Ue,Ge());var c=Ve?Ue:e,l=new Ta(c,!1);Gr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null),fa(!0);return}return l.ensure(e,t=>{if(e){if(s=Ve?s:Ar(e,a),oa(s,s),r){var n=null;Ve&&qi(e)&&s.append(n=document.createComment(``));var i=Ve?Er(s):s.appendChild(Tr());Ve&&(i===null?He(!1):We(i)),r(s,i),n?.remove()}fi.nodes.end=s,t.before(s)}Ve&&We(t)}),fa(!0),()=>{e&&fa(!1)}},ie),Ir(()=>{fa(!0)}),o&&(He(!0),We(c))}function Xa(e,t,n){Hr(()=>{var r=Pi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Wr(()=>{var e=n();Fi(e),i&&Xe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Za(e,t){var n=void 0,r;Kr(()=>{n!==(n=t())&&(r&&(Zr(r),r=null),n&&(r=qr(()=>{Hr(()=>n(e))})))})}function Qa(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Qa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function $a(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Qa(e))&&(r&&(r+=` `),r+=t);return r}function K(e){return typeof e==`object`?$a(e):e??``}var eo=[...`
2
- \r\f\xA0\v`];function to(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||eo.includes(r[o-1]))&&(s===r.length||eo.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function no(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ro(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function io(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ro)),i&&c.push(...Object.keys(i).map(ro));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ro(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=no(r)),i&&(n+=no(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=to(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ao(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function oo(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=io(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(ao(e,n?.[0],r[0]),ao(e,n?.[1],r[1],`important`)):ao(e,n,r));return r}function so(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(uo(i));return}for(i of e.options)if(yr(uo(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function co(e){var t=new MutationObserver(()=>{`__value`in e&&so(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ir(()=>{t.disconnect()})}function lo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),uo);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&uo(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Hr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(so(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=uo(s),n(a))}e.__value=a,i=!1}),co(e)}function uo(e){return`__value`in e?e.__value:e.value}var fo=Symbol(`class`),po=Symbol(`style`),mo=Symbol(`is custom element`),ho=Symbol(`is html`),go=be?`link`:`LINK`,_o=be?`input`:`INPUT`,vo=be?`option`:`OPTION`,yo=be?`select`:`SELECT`,bo=be?`progress`:`PROGRESS`;function xo(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function So(e,t){var n=Do(e);n.value!==(n.value=t??void 0)&&(e.value!==t||t===0&&e.nodeName===bo)&&(e.value=t??``)}function Co(e,t){var n=Do(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function wo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=Do(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===go)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ko(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function To(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===_o){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||xo(o)}var s=Do(e),c=s[mo],l=!s[ho];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===vo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[fo])&&(n.class=null),n[po]&&(n.style??(n.style=null));var m=ko(e);if(e.nodeName===_o&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[fo],n[fo]),d[i]=o,d[fo]=n[fo];continue}if(i===`style`){oo(e,o,t?.[po],n[po]),d[i]=o,d[po]=n[po];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Bi(r);if(Ri(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),ea([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=Zi(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)wo(e,o);else{var b=i;l||(b=Ui(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x){if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}}return u&&He(!0),d}function Eo(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===yo,l=!1;if(Kr(()=>{var u=t(...n.map(z)),d=To(e,r,u,a,o,s);l&&c&&`value`in u&&so(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||Zr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&Zr(i[t]),i[t]=qr(()=>Za(e,()=>f))),d[t]=f}r=d}),c){var u=e;Hr(()=>{so(u,r.value,!0),co(u)})}l=!0})}function Do(e){return e[me]??(e[me]={[mo]:e.nodeName.includes(`-`),[ho]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var Oo=new Map;function ko(e){var t=e.getAttribute(`is`)||e.nodeName,n=Oo.get(t);if(n)return n;Oo.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function Ao(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=jo(e)?Mo(a):a,n(a),xn!==null&&r.add(xn),await ji(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Pi(t)==null&&e.value)&&(n(jo(e)?Mo(e.value):e.value),xn!==null&&r.add(xn)),Wr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}jo(e)&&n===Mo(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function jo(e){var t=e.type;return t===`number`||t===`range`}function Mo(e){return e===``?null:+e}var No,Po=new WeakMap,Fo=new WeakMap,Io=new WeakMap,Lo=new WeakSet,Ro=class{constructor(e){kt(this,Lo),O(this,Po,new WeakMap),O(this,Fo,void 0),O(this,Io,void 0),A(Io,this,e)}observe(e,t){var n=j(Po,this).get(e)||new Set;return n.add(t),j(Po,this).set(e,n),k(Lo,this,zo).call(this).observe(e,j(Io,this)),()=>{var n=j(Po,this).get(e);n.delete(t),n.size===0&&(j(Po,this).delete(e),j(Fo,this).unobserve(e))}}};No=Ro;function zo(){return j(Fo,this)??A(Fo,this,new ResizeObserver(e=>{for(var t of e){No.entries.set(t.target,t);for(var n of j(Po,this).get(t.target)||[])n(t)}}))}x(Ro,`entries`,new WeakMap);function Bo(e,t){return e===t||e?.[de]===t}function Vo(e={},t,n,r){var i=Qe.r,a=fi;return Hr(()=>{var o,s;return Wr(()=>{o=s,s=r?.()||[],Pi(()=>{Bo(n(...s),e)||(t(e,...s),o&&Bo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Bo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Ho={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Ho)}var Uo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Uo)}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Pi(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=fi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?_r(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return si&&v||b.f&16384?y.v:z(y)})}function Wo(e){Qe===null&&xe(`onMount`),Lr(()=>{let t=Pi(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var Go,Ko;((Go=(Ko=window).__svelte??(Ko.__svelte={})).v??(Go.v=new Set)).add(`5`)}function qo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Jo(e){let t=Array.isArray(e.spans)?e.spans.map(qo):[];return{...qo(e),rootSpan:e.rootSpan?qo(e.rootSpan):t[0],spans:t}}var Yo=e=>e.map(Jo),Xo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Yo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function Zo(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function Qo(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var $o=null;function es(e){$o=e===null?null:Qo(e)}var ts=(e,t)=>$o===null?Promise.resolve(null):$o(e,t),ns=new WeakMap,rs=class{constructor(e){O(this,ns,N(void 0)),P(j(ns,this),e,!0)}get value(){return z(j(ns,this))}set value(e){P(j(ns,this),e,!0)}},is=new WeakMap,as=new WeakMap,os=class{constructor(e){O(this,is,void 0),O(this,as,M(()=>j(is,this).call(this))),A(is,this,e)}get value(){return z(j(as,this))}};function ss(e){return new rs(e)}function cs(e){return new os(e)}function ls(e){return Br(()=>{Lr(e)})}function us(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function Q(e){return typeof e==`string`?e:void 0}function ds(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function fs(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function ps(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function ms(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`service.peer.name`],n[`peer.service`],n[`http.host`],n[`db.system.name`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=Q(e)?.trim();if(t)return t}return`unknown`}function hs(e,t){return Q(e[`db.system.name`])!==void 0||Q(e[`db.system`])!==void 0?`database`:Q(e[`cache.system`])===void 0?Q(e[`messaging.system`])===void 0?Q(e[`service.peer.name`])!==void 0||Q(e[`peer.service`])!==void 0||Q(e[`net.peer.name`])!==void 0||Q(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:Q(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`}function gs(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=Q(e)?.trim();if(t)return t}return`unknown`}function _s(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function vs(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=ms(r,t.service),a=n(i,hs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(gs(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:_s(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var ys=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:3e5},{id:`15m`,label:`Last 15m`,durationMs:9e5},{id:`30m`,label:`Last 30m`,durationMs:18e5},{id:`1h`,label:`Last 1h`,durationMs:36e5},{id:`3h`,label:`Last 3h`,durationMs:108e5},{id:`6h`,label:`Last 6h`,durationMs:216e5},{id:`24h`,label:`Last 24h`,durationMs:864e5},{id:`7d`,label:`Last 7d`,durationMs:6048e5}],bs={type:`preset`,preset:`all`},xs=new Map(ys.map(e=>[e.id,e]));function Ss(e,t){let n=xs.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function Cs(e,t){return e.type===`preset`?Ss(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function ws(e){return e.start===null||e.end===null}function Ts(e){return e.type===`preset`?xs.get(e.preset)?.label??`All time`:`${Es(e.start)} → ${Es(e.end)}`}function Es(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function Ds(e){return e.type===`preset`?e.preset===bs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function Os(e){if(!e)return bs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?bs:{type:`custom`,start:r,end:i}}return xs.has(e)?{type:`preset`,preset:e}:bs}function ks(e){if(!ws(e))return{start:e.start,end:e.end}}var As=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function js(e){let t=e.attributes??{};for(let e of As)if(t[e]!=null)return!0;return!1}function Ms(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Ns(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Ms(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Ps=Ns({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Fs(e){let t=Ps(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function Is(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Ls(e,t){let n=e[t];return typeof n==`string`?n:void 0}function Rs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function zs(e,t){return Is(e[t])}function Bs(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Vs(e,t){return Array.isArray(e[t])}function Hs(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Us(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function Ws(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=Q(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Gs(e){let t=Is(e);return t&&`value`in t?t.value:e}function Ks(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Us(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Gs(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function qs(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Us(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Gs(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Js(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Ys(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Js(t,n.map(Ks).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Js(t,n.map(qs).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:Ws(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Us(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function Xs(e,t){let n=Us(e[t]);if(Array.isArray(n))return n.map(Ys)}function Zs(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Us(e.message)??n,i=Q(e.finish_reason);if(r){let e=Ys(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=Q(a),s=o===void 0?a:Us(o)??o;t.push(Ys({role:i,content:s,tool_calls:Us(e.tool_calls),tool_call_id:Q(e.id)??Q(e.tool_call_id)}))}return t}function Qs(e){let t=Us(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>Q(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function $s(e){return{inputTokens:ds(e[`gen_ai.usage.input_tokens`])??ds(e[`gen_ai.usage.prompt_tokens`])??ds(e[`llm.usage.prompt_tokens`])??ds(e[`ai.usage.inputTokens`]),outputTokens:ds(e[`gen_ai.usage.output_tokens`])??ds(e[`gen_ai.usage.completion_tokens`])??ds(e[`llm.usage.completion_tokens`])??ds(e[`ai.usage.outputTokens`]),reasoningOutputTokens:ds(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:ds(e[`gen_ai.usage.cache_read.input_tokens`]),cacheCreationInputTokens:ds(e[`gen_ai.usage.cache_creation.input_tokens`])}}function ec(e){let t=ds(e[`gen_ai.response.time_to_first_chunk`]),n=ds(e[`gen_ai.response.time_to_finish`]),r=ds(e[`gen_ai.response.output_tokens_per_second`]),i=ds(e[`gen_ai.response.time_per_output_chunk`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0)return{timeToFirstChunkS:t,timeToFinishS:n,outputTokensPerSecond:r,timePerOutputChunkS:i}}function tc(e){let t=ds(e[`gen_ai.session.cost.usd`]),n=ds(e[`gen_ai.session.input_tokens`]),r=ds(e[`gen_ai.session.output_tokens`]),i=ds(e[`gen_ai.session.step.count`]),a=ds(e[`gen_ai.session.tool_call.count`]),o=ds(e[`gen_ai.session.error.count`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0||a!==void 0||o!==void 0)return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function nc(e,t){let n=Q(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:Q(e[`gen_ai.guard.action`])??t,message:Q(e[`gen_ai.guard.message`]),observed:ds(e[`gen_ai.guard.observed`]),limit:ds(e[`gen_ai.guard.limit`])}}function rc(e,t){let n=fs(e[`gen_ai.guard.stopped`]),r=[],i=nc(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(nc(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(nc(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Us(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function ic(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var ac=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function oc(e){let t=e.attributes??{},n=ic(Q(t[`gen_ai.provider.name`])??Q(t[`gen_ai.system`])??Q(t[`ai.model.provider`])??`unknown`),r=Q(t[`gen_ai.operation.name`])??`chat`,i=Q(t[`gen_ai.request.model`])??Q(t[`llm.request.model`])??Q(t.model_name)??Q(t[`ai.model.id`])??`unknown`,a=Q(t[`gen_ai.response.model`])??Q(t[`llm.response.model`])??Q(t[`ai.response.model`]),o=Xs(t,`gen_ai.input.messages`)??[],s=Xs(t,`gen_ai.output.messages`)??[],c=[],l=Us(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=Is(l[0]);c=e&&`role`in e?l.map(e=>Ys(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:Zs(e.events),d=Q(t[`gen_ai.input.messages.ref`]),f=Q(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Us(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Ys));else{let e=Us(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Ys)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Us(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>Q(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Us(e.input??e.args)??e.input??e.args??{}})):void 0,i=Q(t[`ai.response.text`]);if(i||r&&r.length>0){let e=ps(t[`gen_ai.response.finish_reasons`])?.[0]??Q(t[`ai.response.finishReason`]),n=Ys({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Us(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Ys))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=Q(t[`gen_ai.prompt.${n}.role`])??Q(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Ys({role:r,content:i}))}for(let n=0;n<32;n++){let r=Q(t[`gen_ai.completion.${n}.role`])??Q(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=Q(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Ys({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Us(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=$s(t),_=Fs({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=ds(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=ec(t),x=tc(t),{guard:S,warnings:C}=rc(t,e.events),w=ps(t[`gen_ai.response.finish_reasons`]),T=Q(t[`gen_ai.agent.name`]),ee=Q(t[`gen_ai.agent.id`]),te=Q(t[`gen_ai.agent.description`]),ne=Q(t[`gen_ai.tool.name`]),re=Q(t[`gen_ai.tool.call.id`]),ie=Q(t[`gen_ai.handoff.from_agent`]),ae=Q(t[`gen_ai.handoff.to_agent`]),oe=Q(t[`gen_ai.guardrail.name`]),se=fs(t[`gen_ai.guardrail.triggered`]),ce=Q(t[`gen_ai.evaluation.name`]),le=ds(t[`gen_ai.evaluation.score.value`]),E=Q(t[`gen_ai.evaluation.score.label`]),ue=Q(t[`gen_ai.evaluation.explanation`]),de=Q(t[`gen_ai.audio.input.format`]),fe=Q(t[`gen_ai.audio.output.format`]),pe=Q(t[`gen_ai.speech.voice`]),me=Q(t[`gen_ai.speech.input_text`]),he=Q(t[`gen_ai.transcription.text`]),ge=ds(t[`gen_ai.embeddings.dimension.count`]),_e=Q(t[`agent.consent.outcome`]),ve=Q(t[`policy.decision`]),ye=Q(t[`mcp.security.injection.verdict`]),be=Q(t[`agent.action.risk_class`]),xe=Q(t[`agent.input.provenance`]),Se=ds(t[`agent.plan.step_index`]),Ce=Q(t[`security.event`]),we=fs(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))ac.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:ds(t[`gen_ai.request.temperature`]),topP:ds(t[`gen_ai.request.top_p`]),topK:ds(t[`gen_ai.request.top_k`]),maxTokens:ds(t[`gen_ai.request.max_tokens`]),stopSequences:ps(t[`gen_ai.request.stop_sequences`]),seed:ds(t[`gen_ai.request.seed`]),frequencyPenalty:ds(t[`gen_ai.request.frequency_penalty`]),presencePenalty:ds(t[`gen_ai.request.presence_penalty`]),choiceCount:ds(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:Qs(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:Q(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:Q(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:Q(t[`gen_ai.openai.request.service_tier`])||Q(t[`gen_ai.openai.response.service_tier`])||Q(t[`openai.request.service_tier`])||Q(t[`openai.response.service_tier`])?{request:Q(t[`gen_ai.openai.request.service_tier`])??Q(t[`openai.request.service_tier`]),response:Q(t[`gen_ai.openai.response.service_tier`])??Q(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:Q(t[`gen_ai.openai.response.system_fingerprint`])??Q(t[`openai.response.system_fingerprint`]),openaiResponseFormat:Q(t[`gen_ai.openai.request.response_format`])??Q(t[`openai.request.response_format`]),raw:Ee}}}function sc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null){if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}}return t}function cc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function lc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function uc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function dc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var fc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function pc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=fc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function mc(...e){return Object.assign({},...e)}function hc(e){return{user:lc(e,`user.id`,`user.account_uuid`,`user.email`),organization:lc(e,`organization.id`),terminal:lc(e,`terminal.type`),appVersion:lc(e,`app.version`),model:lc(e,`model`)}}var gc=`mcp__`;function _c(e){if(!e.startsWith(gc))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function vc(e){return e.startsWith(gc)}var yc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],bc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function xc(e){return vc(e)?`mcp`:bc.get(e.toLowerCase())??`other`}function Sc(e){return lc(e,`subagent_type`,`agent_type`,`subagent.type`)}function Cc(e){return lc(e,`skill`,`skill_name`,`skill.name`)}var wc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`api_refusal`,`api_refusal`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Tc=[...wc.keys()];function Ec(e,t){let n=xc(e),r={..._c(e),category:n};if(n===`subagent`){let e=Sc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=Cc(t);e&&(r.skillName=e)}return r}var Dc=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function Oc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=lc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=mc(e.resource,e.attributes),r=s(e.eventName)||lc(n,`event.name`)||e.eventName,i=wc.get(r)??`other`,a=lc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:lc(n,`model`),promptId:lc(n,`prompt.id`),attributes:e.attributes};switch((i===`api_request`||i===`api_error`||i===`api_refusal`)&&(o.effort=lc(n,`effort`),o.speed=lc(n,`speed`),o.agentName=lc(n,`agent.name`),o.skillName=lc(n,`skill.name`)),i){case`api_request`:{o.inputTokens=uc(n,`input_tokens`),o.outputTokens=uc(n,`output_tokens`),o.cacheReadTokens=uc(n,`cache_read_tokens`),o.contextLineageId=lc(n,`query_source`),o.tokenSource=lc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=uc(n,`cache_creation_tokens`),o.durationMs=uc(n,`duration_ms`);let e=uc(n,`cost_usd`,`cost`);if(e===void 0){let e=pc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_refusal`:o.durationMs=uc(n,`duration_ms`);break;case`api_error`:o.errorMessage=lc(n,`error`,`error.message`,`message`),o.statusCode=uc(n,`status_code`,`http.response.status_code`,`http.status_code`),o.durationMs=uc(n,`duration_ms`);break;case`tool_result`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n)),o.success=dc(n,`success`),o.durationMs=uc(n,`duration_ms`);let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=lc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Ec(e,n));let t=lc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=uc(n,`prompt_length`,`prompt.length`);let e=lc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=lc(n,`server_name`,`name`),o.mcpTransport=lc(n,`transport_type`,`transport`),o.mcpStatus=lc(n,`status`),o.durationMs=uc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=lc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=lc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=lc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=uc(n,`num_success`),o.hookBlocked=uc(n,`num_blocking`),o.hookErrored=uc(n,`num_non_blocking_error`),o.hookCancelled=uc(n,`num_cancelled`)}return o},normalizeMetric(e){let n=Dc.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=mc(e.resource,r.attributes);return{agent:t,sessionId:lc(i,`session.id`),identity:hc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}Oc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var kc={handled:Tc,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`,`permission_mode_changed`,`auth`]};[...kc.handled,...kc.ignored],Oc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function Ac(){return Object.fromEntries(yc.map(e=>[e,0]))}function jc(){return Object.create(null)}function Mc(){return{requests:0,costUsd:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0}}function Nc(e,t){for(let[n,r]of Object.entries(t)){let t=e[n]??(e[n]=Mc());t.requests+=r.requests,t.costUsd+=r.costUsd,t.inputTokens+=r.inputTokens,t.outputTokens+=r.outputTokens,t.cacheReadTokens+=r.cacheReadTokens,t.cacheCreationTokens+=r.cacheCreationTokens}}function Pc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,byModel:jc(),byEffort:jc(),bySkill:jc(),byAgent:jc(),tools:jc(),toolCategories:Ac(),mcpServers:jc(),subAgents:jc(),skills:jc(),mcpConnections:jc(),plugins:jc(),hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected,Nc(t.byModel,e.byModel),Nc(t.byEffort,e.byEffort),Nc(t.bySkill,e.bySkill),Nc(t.byAgent,e.byAgent);for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of yc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Fc=ss(!1),Ic=ss({x:20,y:20}),Lc=ss(`bottom-right`),Rc=ss(`bottom`),zc=ss(!1),Bc=ss(`traces`),Vc=ss(null),Hc=ss(null),Uc=ss(null);function Wc(e,t){Uc.value={traceId:e,spanId:t}}var Gc=ss(`system`);function Kc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var qc=[`system`,`light`,`dark`];function Jc(){let e=qc[(qc.indexOf(Gc.value)+1)%qc.length];Gc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Yc=`autotel-devtools-editor`;function Xc(){try{let e=localStorage.getItem(Yc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Zc=ss(Xc());function Qc(e){Zc.value=e;try{localStorage.setItem(Yc,e)}catch{}}var $c=ss(null);function el(e){$c.value=e}function tl(){$c.value=null}function nl(e){$c.value=$c.value?null:e}var rl={vertical:440,horizontal:560},il=ss({...rl});function al(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function ol(e,t){let{min:n,max:r}=al(e),i=Math.min(r,Math.max(n,Math.round(t)));il.value={...il.value,[e]:i}}function sl(e){ol(e,rl[e])}var cl=ss([]),ll=ss({connectionStatus:`disconnected`}),ul=ss([]),dl=ss([]),fl=ss(`disconnected`),pl=ss(null),ml=ss(bs),hl=ss([]),gl=ss([]),_l=ss(`pending`),vl=cs(()=>{if(_l.value===`ready`)return hl.value;let e=Cs(ml.value,Date.now());if(ws(e))return cl.value;let{start:t,end:n}=e;return cl.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),yl=ss(0),bl=15e3,xl=[];function Sl(e,t,n){if(e+t+n===0)return;let r=Date.now();xl.push({t:r,traces:e,logs:t,metrics:n});let i=r-bl;(xl.length>1024||xl[0].t<i)&&(xl=xl.filter(e=>e.t>=i)),yl.value+=1}function Cl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of xl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var wl=ss(!1),Tl=ss([]),El=ss([]),Dl=cs(()=>Tl.value.length),Ol=cs(()=>El.value.length),kl=ss(!1),Al=cs(()=>cl.value.filter(e=>e.status===`ERROR`)),jl=cs(()=>{let e=Al.value;return Fc.value?0:e.length}),Ml=ss({key:`time`,dir:`desc`}),Nl=ss(``),Pl=ss(`all`),Fl=ss(0),Il=ss(new Set);function Ll(e){let t=new Set(Il.value);t.has(e)?t.delete(e):t.add(e),Il.value=t}function Rl(){Il.value.size>0&&(Il.value=new Set)}var zl=ss(``),Bl=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Vl(e){let t=Ml.value;Ml.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Bl.get(e)??`desc`}}var Hl=new Set([`service`,`name`]);function Ul(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Wl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Gl(e,t,n){return Hl.has(n)?Ul(e,n).localeCompare(Ul(t,n)):Wl(e,n)-Wl(t,n)}var Kl=cs(()=>{let{key:e,dir:t}=Ml.value,n=t===`asc`?1:-1;return[...cl.value].sort((t,r)=>{let i=Gl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),ql=cs(()=>[...dl.value].sort((e,t)=>t.timestamp-e.timestamp)),Jl=ss([]),Yl=ss(null),Xl=cs(()=>[...Jl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Zl=cs(()=>Pc(Jl.value)),Ql=cs(()=>{let e=Xl.value;if(e.length===0)return null;let t=Yl.value;return e.find(e=>e.id===t)??e[0]});function $l(e){Yl.value=e}var eu=cs(()=>vs({traces:vl.value,logs:dl.value,errors:ul.value})),tu=cs(()=>{let e=[];for(let t of vl.value){let n=sc(t.spans);for(let r of t.spans){if(!js(r))continue;let i=oc(r);cc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),nu=cs(()=>tu.value.length),ru=cs(()=>vl.value.filter(e=>e.spans.length>1).length),iu=cs(()=>{if(_l.value===`ready`)return gl.value;let e=Cs(ml.value,Date.now());if(ws(e))return ul.value;let{start:t,end:n}=e;return ul.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),au=cs(()=>[...iu.value].sort((e,t)=>t.lastSeen-e.lastSeen)),ou=cs(()=>[...iu.value].sort((e,t)=>t.count-e.count)),su=cs(()=>iu.value.reduce((e,t)=>e+t.count,0)),cu=cs(()=>{let e=Date.now()-36e5;return ul.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),lu=cs(()=>{let e=Vc.value;return e&&vl.value.find(t=>t.traceId===e)||null}),uu=ss(new Set);function du(e){let t=new Set(uu.value);t.has(e)?t.delete(e):t.add(e),uu.value=t}function fu(){uu.value=new Set(vl.value.map(e=>e.traceId))}function pu(){uu.value=new Set}function mu(){let e=uu.value;cl.value=cl.value.filter(t=>!e.has(t.traceId)),hl.value=hl.value.filter(t=>!e.has(t.traceId)),pu(),Vc.value&&e.has(Vc.value)&&(Vc.value=null)}var hu=cs(()=>uu.value.size);function gu(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId)??e.rootSpan??n[0],i=Math.min(...n.map(e=>e.startTime)),a=Math.max(...n.map(e=>e.endTime)),o=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,s=us(r?.attributes,`service.name`);return{...e,rootSpan:r,spans:n,startTime:i,endTime:a,duration:a-i,status:o,service:s??e.service}}function _u(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return gu(e,[...n.values()])}function vu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?_u(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?_u(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function yu(e,t,n){let r=vu(e,t);return r.length>n?r.slice(-n):r}function bu(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>zu?n.slice(0,zu):n}function xu(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var Su=xu(cl,Tl,vu,(e,t)=>yu(e,t,zu)),Cu=xu(dl,El,bu),wu=[Su,Cu];function Tu(e){if(kl.value){e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus);return}let t=wl.value;Su.ingest(e.traces??[],t),Cu.ingest(e.logs??[],t),Sl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ll.value=e.health,fl.value=e.health.connectionStatus),e.errors&&(ul.value=e.errors),e.agents&&(Jl.value=e.agents)}function Eu(e){if(wl.value!==e&&(wl.value=e,!e))for(let e of wu)e.flushToLive()}function Du(){Eu(!wl.value)}function Ou(){for(let e of wu)e.clearPending()}function ku(e){cl.value=e.traces??[],dl.value=(e.logs??[]).slice(0,zu),ul.value=e.errors??[],Tl.value=[],El.value=[],wl.value=!1,kl.value=!0}function Au(){kl.value=!1,cl.value=[],dl.value=[],ul.value=[]}function ju(){Fc.value=!Fc.value}function Mu(e){Bc.value=e}function Nu(e,t=null){Vc.value=e,Hc.value=e?t:null}function Pu(e,t){Nu(e,t??null),Mu(`traces`)}function Fu(e,t){Ic.value={x:e,y:t}}function Iu(e){Lc.value=e}function Lu(e){Rc.value=e}function Ru(){let e=[`bottom`,`right`,`left`],t=Rc.value??`bottom`;Rc.value=e[(e.indexOf(t)+1)%e.length]}var zu=100;function Bu(){cl.value=[],hl.value=[],ul.value=[],gl.value=[],dl.value=[],Jl.value=[],Yl.value=null,Tl.value=[],El.value=[],uu.value=new Set,Vc.value=null,Hc.value=null,_l.value=`pending`,kl.value=!1}function Vu(e){if(e.length===0)return;let t=new Set(cl.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),cl.value=[...cl.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var Hu=ss(`local`),Uu=`autotel-devtools-widget-state`;function Wu(){try{let e=localStorage.getItem(Uu);if(e){let t=JSON.parse(e);t.position&&(Ic.value=t.position),t.corner&&(Lc.value=t.corner),t.docked&&(Rc.value=t.docked),t.panelSize&&(il.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(Hu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Gu(){try{let e={position:Ic.value,corner:Lc.value,docked:Rc.value,panelSize:il.value,timeZone:Hu.value};localStorage.setItem(Uu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}ls(()=>{Ic.value,Lc.value,Rc.value,Hu.value,il.value,Gu()});var Ku=[`traces`,`resources`,`service-map`,`metrics`,`logs`,`errors`,`genai`,`flow`,`security`];function qu(e,t){return e.find(e=>e===t)}function Ju(e){return qu(Ku,e)!==void 0}var Yu=[`time`,`duration`,`spans`,`service`,`name`,`status`],Xu=[`error`,`ok`],Zu={key:`time`,dir:`desc`};function Qu(e){if(!e)return;let[t,n]=e.split(`:`),r=qu(Yu,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function $u(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Ju(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=qu(Xu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=Os(d));let f=Qu(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function ed(e){let t=new URLSearchParams;if(e.tab&&e.tab!==`traces`&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=Ds(e.window);n&&t.set(`window`,n)}e.sort&&(e.sort.key!==Zu.key||e.sort.dir!==Zu.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function td(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var nd=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),rd=ca(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function id(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,nd);var a=rd();Eo(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function ad(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function od(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function sd(e){return new Intl.NumberFormat().format(e)}function cd(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function ld(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function ud(e,t,n){return Math.min(Math.max(e,t),n)}function dd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var fd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pd=(e,t)=>({classGroupId:e,validator:t}),md=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hd=`-`,gd=[],_d=`arbitrary..`,vd=e=>{let t=xd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bd(e);let n=e.split(hd);return yd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fd(i,t):t:i||gd}return n[e]||gd}}},yd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hd):e.slice(t).join(hd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_d+r:void 0})(),xd=e=>{let{theme:t,classGroups:n}=e;return Sd(n,t)},Sd=(e,t)=>{let n=md();for(let r in e){let i=e[r];Cd(i,n,r,t)}return n},Cd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wd(i,t,n,r)}},wd=(e,t,n,r)=>{if(typeof e==`string`){Td(e,t,n);return}if(typeof e==`function`){Ed(e,t,n,r);return}Dd(e,t,n,r)},Td=(e,t,n)=>{let r=e===``?t:Od(t,e);r.classGroupId=n},Ed=(e,t,n,r)=>{if(kd(e)){Cd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pd(n,e))},Dd=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cd(o,Od(t,a),n,r)}},Od=(e,t)=>{let n=e,r=t.split(hd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=md(),n.nextPart.set(t,i)),n=i}return n},kd=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ad=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jd=`!`,Md=`:`,Nd=[],Pd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fd=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Md){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jd)?(c=s.slice(0,-1),l=!0):s.startsWith(jd)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pd(t,l,c,u)};if(t){let e=t+Md,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pd(Nd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Id=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ld=e=>({cache:Ad(e.cacheSize),parseClassName:Fd(e),sortModifiers:Id(e),postfixLookupClassGroupIds:Rd(e),...vd(e)}),Rd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zd=/\s+/,Bd=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zd),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jd:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hd(n))&&(i&&(i+=` `),i+=r);return i},Hd=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hd(e[r]))&&(n&&(n+=` `),n+=t);return n},Ud=(e,...t)=>{let n,r,i,a,o=o=>(n=Ld(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bd(e,n);return i(e,a),a};return a=o,(...e)=>a(Vd(...e))},Wd=[],Gd=e=>{let t=t=>t[e]||Wd;return t.isThemeGetter=!0,t},Kd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ef=e=>Jd.test(e),tf=e=>!!e&&!Number.isNaN(Number(e)),nf=e=>!!e&&Number.isInteger(Number(e)),rf=e=>e.endsWith(`%`)&&tf(e.slice(0,-1)),af=e=>Yd.test(e),of=()=>!0,sf=e=>Xd.test(e)&&!Zd.test(e),cf=()=>!1,lf=e=>Qd.test(e),uf=e=>$d.test(e),df=e=>!mf(e)&&!Sf(e),ff=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),pf=e=>Af(e,Pf,cf),mf=e=>Kd.test(e),hf=e=>Af(e,Ff,sf),gf=e=>Af(e,If,tf),_f=e=>Af(e,Rf,of),vf=e=>Af(e,Lf,cf),yf=e=>Af(e,Mf,cf),bf=e=>Af(e,Nf,uf),xf=e=>Af(e,zf,lf),Sf=e=>qd.test(e),Cf=e=>jf(e,Ff),wf=e=>jf(e,Lf),Tf=e=>jf(e,Mf),Ef=e=>jf(e,Pf),Df=e=>jf(e,Nf),Of=e=>jf(e,zf,!0),kf=e=>jf(e,Rf,!0),Af=(e,t,n)=>{let r=Kd.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},jf=(e,t,n=!1)=>{let r=qd.exec(e);return r?r[1]?t(r[1]):n:!1},Mf=e=>e===`position`||e===`percentage`,Nf=e=>e===`image`||e===`url`,Pf=e=>e===`length`||e===`size`||e===`bg-size`,Ff=e=>e===`length`,If=e=>e===`number`,Lf=e=>e===`family-name`,Rf=e=>e===`number`||e===`weight`,zf=e=>e===`shadow`,Bf=Ud(()=>{let e=Gd(`color`),t=Gd(`font`),n=Gd(`text`),r=Gd(`font-weight`),i=Gd(`tracking`),a=Gd(`leading`),o=Gd(`breakpoint`),s=Gd(`container`),c=Gd(`spacing`),l=Gd(`radius`),u=Gd(`shadow`),d=Gd(`inset-shadow`),f=Gd(`text-shadow`),p=Gd(`drop-shadow`),m=Gd(`blur`),h=Gd(`perspective`),g=Gd(`aspect`),_=Gd(`ease`),v=Gd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Sf,mf],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Sf,mf,c],T=()=>[ef,`full`,`auto`,...w()],ee=()=>[nf,`none`,`subgrid`,Sf,mf],te=()=>[`auto`,{span:[`full`,nf,Sf,mf]},nf,Sf,mf],ne=()=>[nf,`auto`,Sf,mf],re=()=>[`auto`,`min`,`max`,`fr`,Sf,mf],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[ef,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[ef,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[ef,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Sf,mf],ue=()=>[...b(),Tf,yf,{position:[Sf,mf]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Ef,pf,{size:[Sf,mf]}],pe=()=>[rf,Cf,hf],me=()=>[``,`none`,`full`,l,Sf,mf],he=()=>[``,tf,Cf,hf],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[tf,rf,Tf,yf],ye=()=>[``,`none`,m,Sf,mf],be=()=>[`none`,tf,Sf,mf],xe=()=>[`none`,tf,Sf,mf],Se=()=>[tf,Sf,mf],Ce=()=>[ef,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[af],breakpoint:[af],color:[of],container:[af],"drop-shadow":[af],ease:[`in`,`out`,`in-out`],font:[df],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[af],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[af],shadow:[af],spacing:[`px`,tf],text:[af],"text-shadow":[af],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ef,mf,Sf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Sf,mf]}],"container-named":[ff],columns:[{columns:[tf,mf,Sf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[nf,`auto`,Sf,mf]}],basis:[{basis:[ef,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[tf,ef,`auto`,`initial`,`none`,mf]}],grow:[{grow:[``,tf,Sf,mf]}],shrink:[{shrink:[``,tf,Sf,mf]}],order:[{order:[nf,`first`,`last`,`none`,Sf,mf]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,Cf,hf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,kf,_f]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,rf,mf]}],"font-family":[{font:[wf,vf,t]}],"font-features":[{"font-features":[mf]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Sf,mf]}],"line-clamp":[{"line-clamp":[tf,`none`,Sf,gf]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Sf,mf]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Sf,mf]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[tf,`from-font`,`auto`,Sf,hf]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[tf,`auto`,Sf,mf]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[nf,Sf,mf]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Sf,mf]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Sf,mf]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nf,Sf,mf],radial:[``,Sf,mf],conic:[nf,Sf,mf]},Df,bf]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[tf,Sf,mf]}],"outline-w":[{outline:[``,tf,Cf,hf]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Of,xf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Of,xf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[tf,hf]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Of,xf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[tf,Sf,mf]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[tf]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Sf,mf]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[tf]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Sf,mf]}],filter:[{filter:[``,`none`,Sf,mf]}],blur:[{blur:ye()}],brightness:[{brightness:[tf,Sf,mf]}],contrast:[{contrast:[tf,Sf,mf]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Of,xf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,tf,Sf,mf]}],"hue-rotate":[{"hue-rotate":[tf,Sf,mf]}],invert:[{invert:[``,tf,Sf,mf]}],saturate:[{saturate:[tf,Sf,mf]}],sepia:[{sepia:[``,tf,Sf,mf]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Sf,mf]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[tf,Sf,mf]}],"backdrop-contrast":[{"backdrop-contrast":[tf,Sf,mf]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,tf,Sf,mf]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[tf,Sf,mf]}],"backdrop-invert":[{"backdrop-invert":[``,tf,Sf,mf]}],"backdrop-opacity":[{"backdrop-opacity":[tf,Sf,mf]}],"backdrop-saturate":[{"backdrop-saturate":[tf,Sf,mf]}],"backdrop-sepia":[{"backdrop-sepia":[``,tf,Sf,mf]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Sf,mf]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[tf,`initial`,Sf,mf]}],ease:[{ease:[`linear`,`initial`,_,Sf,mf]}],delay:[{delay:[tf,Sf,mf]}],animate:[{animate:[`none`,v,Sf,mf]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Sf,mf]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Sf,mf,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[nf,Sf,mf]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Sf,mf]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Sf,mf]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[tf,Cf,hf,gf]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$=(...e)=>Bf($a(e)),Vf=V(`<button title="Autolemetry Observability"><!></button>`);function Hf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Ic.value),o=M(()=>jl.value),s=M(()=>Fc.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Fu(ud(e.clientX-i.x,0,window.innerWidth-48),ud(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=ld(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Fu(t.x,t.y),Iu(t.corner)}function p(){r||ju()}var m=la(),h=I(m),g=e=>{var t=Vf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);id(r,{get fill(){return z(e)},width:28,height:28})}D(t),Vo(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),oo(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K($(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}ea([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Uf={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Wf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Gf=Symbol(`lucide-context`),Kf=()=>et(Gf),qf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Jf=ca(`<svg><!><!></svg>`);function Yf(e,t){it(t,!0);let n=Kf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,qf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Jf();Eo(u,e=>({...Uf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Wf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,Oa,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=la();Ya(I(a),r,!0,(e,t)=>{Eo(e,()=>({...i()}))}),H(e,a)}),La(L(d),()=>t.children??p),D(u),H(e,u),at()}var Xf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zf(e,t){let n=Y(t,Xf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Yf(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var Qf=new Set([`$$slots`,`$$events`,`$$legacy`]);function $f(e,t){let n=Y(t,Qf),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];Yf(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function tp(e,t){let n=Y(t,ep),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Yf(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var np=new Set([`$$slots`,`$$events`,`$$legacy`]);function rp(e,t){let n=Y(t,np),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];Yf(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function ap(e,t){let n=Y(t,ip),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Yf(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var op=new Set([`$$slots`,`$$events`,`$$legacy`]);function sp(e,t){let n=Y(t,op),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function lp(e,t){let n=Y(t,cp),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];Yf(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var up=new Set([`$$slots`,`$$events`,`$$legacy`]);function dp(e,t){let n=Y(t,up),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];Yf(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function pp(e,t){let n=Y(t,fp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Yf(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function hp(e,t){let n=Y(t,mp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];Yf(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function _p(e,t){let n=Y(t,gp),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];Yf(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function yp(e,t){let n=Y(t,vp),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];Yf(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function xp(e,t){let n=Y(t,bp),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Yf(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var Sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cp(e,t){let n=Y(t,Sp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Yf(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tp(e,t){let n=Y(t,wp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];Yf(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Ep=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dp(e,t){let n=Y(t,Ep),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Yf(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var Op=new Set([`$$slots`,`$$events`,`$$legacy`]);function kp(e,t){let n=Y(t,Op),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];Yf(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var Ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function jp(e,t){let n=Y(t,Ap),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Mp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Np(e,t){let n=Y(t,Mp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];Yf(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var Pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fp(e,t){let n=Y(t,Pp),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Yf(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Ip=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lp(e,t){let n=Y(t,Ip),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];Yf(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var Rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function zp(e,t){let n=Y(t,Rp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Yf(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var Bp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vp(e,t){let n=Y(t,Bp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];Yf(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var Hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Up(e,t){let n=Y(t,Hp),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];Yf(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Wp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gp(e,t){let n=Y(t,Wp),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];Yf(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var Kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function qp(e,t){let n=Y(t,Kp),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Yf(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var Jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yp(e,t){let n=Y(t,Jp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Yf(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zp(e,t){let n=Y(t,Xp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];Yf(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var Qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function $p(e,t){let n=Y(t,Qp),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var em=new Set([`$$slots`,`$$events`,`$$legacy`]);function tm(e,t){let n=Y(t,em),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function rm(e,t){let n=Y(t,nm),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Yf(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var im=new Set([`$$slots`,`$$events`,`$$legacy`]);function am(e,t){let n=Y(t,im),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];Yf(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var om=new Set([`$$slots`,`$$events`,`$$legacy`]);function sm(e,t){let n=Y(t,om),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];Yf(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function lm(e,t){let n=Y(t,cm),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];Yf(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var um=new Set([`$$slots`,`$$events`,`$$legacy`]);function dm(e,t){let n=Y(t,um),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];Yf(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function pm(e,t){let n=Y(t,fm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];Yf(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function hm(e,t){let n=Y(t,mm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];Yf(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function _m(e,t){let n=Y(t,gm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function ym(e,t){let n=Y(t,vm),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];Yf(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function xm(e,t){let n=Y(t,bm),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];Yf(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var Sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Cm(e,t){let n=Y(t,Sm),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];Yf(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Tm(e,t){let n=Y(t,wm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];Yf(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Em=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dm(e,t){let n=Y(t,Em),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];Yf(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var Om=new Set([`$$slots`,`$$events`,`$$legacy`]);function km(e,t){let n=Y(t,Om),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];Yf(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var Am=new Set([`$$slots`,`$$events`,`$$legacy`]);function jm(e,t){let n=Y(t,Am),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];Yf(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var Mm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nm(e,t){let n=Y(t,Mm),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];Yf(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var Pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fm(e,t){let n=Y(t,Pm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];Yf(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Im=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lm(e,t){let n=Y(t,Im),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];Yf(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var Rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function zm(e,t){let n=Y(t,Rm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];Yf(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var Bm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vm(e,t){let n=Y(t,Bm),r=[[`path`,{d:`M5 12h14`}]];Yf(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var Hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Um(e,t){let n=Y(t,Hm),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];Yf(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Wm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gm(e,t){let n=Y(t,Wm),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Yf(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var Km=new Set([`$$slots`,`$$events`,`$$legacy`]);function qm(e,t){let n=Y(t,Km),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];Yf(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var Jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ym(e,t){let n=Y(t,Jm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];Yf(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var Xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zm(e,t){let n=Y(t,Xm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Yf(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function $m(e,t){let n=Y(t,Qm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Yf(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function th(e,t){let n=Y(t,eh),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Yf(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function rh(e,t){let n=Y(t,nh),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];Yf(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function ah(e,t){let n=Y(t,ih),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Yf(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function sh(e,t){let n=Y(t,oh),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];Yf(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function lh(e,t){let n=Y(t,ch),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Yf(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function dh(e,t){let n=Y(t,uh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];Yf(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ph(e,t){let n=Y(t,fh),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Yf(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function hh(e,t){let n=Y(t,mh),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];Yf(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function _h(e,t){let n=Y(t,gh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];Yf(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function yh(e,t){let n=Y(t,vh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];Yf(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function xh(e,t){let n=Y(t,bh),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];Yf(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var Sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ch(e,t){let n=Y(t,Sh),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Yf(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Th(e,t){let n=Y(t,wh),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];Yf(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Eh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Dh(e,t){let n=Y(t,Eh),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Yf(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var Oh=new Set([`$$slots`,`$$events`,`$$legacy`]);function kh(e,t){let n=Y(t,Oh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];Yf(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var Ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function jh(e,t){let n=Y(t,Ah),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];Yf(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var Mh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Nh(e,t){let n=Y(t,Mh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];Yf(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var Ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function Fh(e,t){let n=Y(t,Ph),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Yf(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Ih=new Set([`$$slots`,`$$events`,`$$legacy`]);function Lh(e,t){let n=Y(t,Ih),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];Yf(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var Rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function zh(e,t){let n=Y(t,Rh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Yf(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Bh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vh(e,t){let n=Y(t,Bh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Yf(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var Hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Uh(e,t){let n=Y(t,Hh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];Yf(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Wh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gh(e,t){let n=Y(t,Wh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Yf(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var Kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function qh(e,t){let n=Y(t,Kh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];Yf(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var Jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yh(e,t){let n=Y(t,Jh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];Yf(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var Xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zh(e,t){let n=Y(t,Xh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];Yf(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var Qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function $h(e,t){let n=Y(t,Qh),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];Yf(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var eg=new Set([`$$slots`,`$$events`,`$$legacy`]);function tg(e,t){let n=Y(t,eg),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Yf(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var ng=new Set([`$$slots`,`$$events`,`$$legacy`]);function rg(e,t){let n=Y(t,ng),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Yf(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var ig=new Set([`$$slots`,`$$events`,`$$legacy`]);function ag(e,t){let n=Y(t,ig),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Yf(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function og(e){let t=e-1;return t*t*t+1}function sg(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function cg(){return sg()!==null}var lg=null,ug=null;async function dg(e,t,{width:n=720,height:r=560}={}){let i=sg();if(!i||lg)return!1;let a=await i.requestWindow({width:n,height:r});lg=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),ug=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(ug),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>pg(t),{once:!0}),!0}function fg(e){if(!lg)return;let t=lg;pg(e);try{t.close()}catch{}}function pg(e){let t=lg;if(!t)return;lg=null;let n=t.document.body.firstElementChild;n&&(ug?.isConnected?ug.replaceWith(n):document.body.appendChild(n)),ug=null,e?.()}var mg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function hg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return mg[t%mg.length]}var gg=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],_g=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],vg=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function yg(){let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function bg(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var xg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),Sg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),Cg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),wg=V(`<p class="mb-1 last:mb-0"> </p>`),Tg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Eg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),Dg=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function Og(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=Dg(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);rg(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);qh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=Sg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=Cg(),n=F(t);Gh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=Tg();G(t,21,()=>z(a).warnings,Oa,(e,t)=>{var n=wg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Eg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Vo(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}ea([`click`,`change`]);function kg(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function Ag(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function jg(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function Mg(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Ng(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:Mg(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function Pg(e,t=`local`){return Ng(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Fg(e=`local`){return e===`utc`?`UTC`:Ng(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Ig=2;function Lg(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Ig));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var Rg=new Set([`error`,`fatal`,`critical`]);function zg(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&Rg.has(t.toLowerCase())?`exception`:`event`}var Bg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Vg=V(`<span class="relative shrink-0"><!></span>`),Hg=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Ug=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Wg(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Ug(),i=F(r);G(i,17,()=>t.ancestorLines,Oa,(e,t)=>{var r=Vg(),i=F(r),a=e=>{var t=Bg();R(()=>oo(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=Hg(),i=F(r),a=L(i,2);D(r),R(e=>{oo(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),oo(i,`left:${n()/2}px`),oo(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K($(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K($(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Gg(e){let t=e.children.length;for(let n of e.children)t+=Gg(n);return t}function Kg(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function qg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function Jg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Yg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),Xg=V(`<div class="w-4"></div>`),Zg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),Qg=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),$g=V(`<button type="button"></button>`),e_=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),t_=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),n_=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),r_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),i_=V(`<div><div class="w-[200px] shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function a_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>Kg(z(n),t.trace)),i=M(()=>z(n).status.code===`ERROR`),a=M(()=>z(n).events&&z(n).events.length>0),o=M(()=>Lg(z(n).events??[],t.trace.startTime,t.trace.duration)),s=N(null),c=e=>{P(s,z(s)===e?null:e,!0)};Lr(()=>{if(z(s)===null)return;let e=()=>{P(s,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var l=i_(),u=F(l),d=F(u),f=e=>{Wg(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(d,e=>{t.connectors&&e(f)});var p=L(d,2),m=e=>{var n=Yg(),r=F(n),i=e=>{Dp(e,{size:12,class:`text-fg-subtle`})},a=e=>{Cp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},h=e=>{H(e,Xg())};W(p,e=>{t.hasChildren?e(m):e(h,-1)});var g=L(p,2),v=e=>{kp(e,{size:12,class:`text-danger flex-shrink-0`})};W(g,e=>{z(i)&&e(v)});var y=L(g,2),b=e=>{Cm(e,{size:10,class:`text-accent flex-shrink-0`})};W(y,e=>{z(a)&&e(b)});var x=L(y,2),S=e=>{ag(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(x,e=>{t.isCritical&&e(S)});var C=L(x,2),w=F(C,!0);D(C);var T=L(C,2),ee=e=>{var n=Zg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Gg(t.node)]),H(e,n)};W(T,e=>{t.isCollapsed&&t.node.children.length>0&&e(ee)}),D(u);var te=L(u,2),ne=F(te),re=F(ne),ie=e=>{var t=Qg(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>ad(z(n).duration)]),H(e,t)};W(re,e=>{z(r).widthPercent>10&&e(ie)}),D(ne);var ae=L(ne,2);G(ae,17,()=>z(o),Oa,(e,r,i)=>{var a=la();G(I(a),17,()=>z(r),e=>e.index,(e,r)=>{let a=M(()=>z(n).events[z(r).index]),o=M(()=>28+i*8),l=M(()=>zg(z(a))===`exception`);var u=$g();R((e,t)=>{q(u,1,e),oo(u,`left: ${z(r).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(u,`title`,t),J(u,`aria-label`,`Event ${z(a).name}`)},[()=>K($(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(l)?`bg-danger`:`bg-warning`,z(s)===z(r).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${ad(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,u,e=>{e.stopPropagation(),c(z(r).index)}),H(e,u)}),H(e,a)});var oe=L(ae,2),se=e=>{let r=M(()=>z(n).events[z(s)]),i=M(()=>zg(z(r))===`exception`);var a=r_(),o=F(a),c=F(o),l=L(c,2),u=F(l,!0);D(l);var d=L(l,2),f=F(d);D(d);var p=L(d,2);rg(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=t_();G(t,21,()=>Object.entries(z(r).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=e_(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(r).attributes&&Object.keys(z(r).attributes).length>0),b=e=>{H(e,n_())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,n,i)=>{q(c,1,e),q(l,1,t),U(u,z(r).name),U(f,`+${n??``}`),U(h,i)},[()=>K($(`w-2 h-2 rounded-full flex-shrink-0`,z(i)?`bg-danger`:`bg-warning`)),()=>K($(`text-xs font-medium flex-1 truncate`,z(i)?`text-danger`:`text-fg`)),()=>ad(z(r).timestamp-t.trace.startTime),()=>Pg(z(r).timestamp,Hu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(s,null)}),H(e,a)};W(oe,e=>{z(s)!==null&&z(n).events?.[z(s)]&&e(se)}),D(te);var ce=L(te,2),le=F(ce),E=F(le,!0);D(le),D(ce),D(l),R((e,i,a,o,s,c,d)=>{J(l,`id`,`waterfall-row-${z(n).spanId}`),q(l,1,e),oo(u,t.connectors?`padding-left: 8px;`:`padding-left: ${8+t.node.depth*16}px;`),q(C,1,i),J(C,`title`,z(n).name),U(w,z(n).name||`unknown`),oo(te,a),q(ne,1,o),oo(ne,`left: ${z(r).offsetPercent}%; width: ${z(r).widthPercent}%; top: 6px; min-width: 4px;`),J(ne,`title`,s),q(le,1,c),U(E,d)},[()=>K($(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(i)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K($(`text-xs truncate`,z(i)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(o).length*8)}px;`,()=>K($(`absolute h-5 rounded-sm transition-colors group`,z(i)?`bg-danger`:qg(z(n).kind),t.isSelected&&(z(i)?`bg-danger`:Jg(z(n).kind)))),()=>`${z(n).name}: ${ad(z(n).duration)}`,()=>K($(`text-xs font-mono`,z(i)?`text-danger`:`text-fg-muted`)),()=>ad(z(n).duration)]),B(`click`,l,()=>t.onSelect?.()),H(e,l),at()}ea([`click`]);function o_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var s_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),c_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),l_=V(`<div></div>`),u_=V(`<div><!></div>`),d_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),f_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),p_=V(`<div class="flex flex-col h-full"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="w-[200px] shrink-0 px-3 py-2 font-medium text-fg-muted">Span Name</div> <div class="flex-1 relative py-2"></div> <div class="w-[80px] shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function m_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);Lr(()=>{t.onMatchCount?.(z(i).size)});let o=N(_r(new Set)),s=N(!0),c=N(void 0),l=N(0),u=N(void 0),d=N(0),f=N(0),p=M(()=>Ag(t.trace.spans));Lr(()=>{let e=z(c);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(l,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let m=M(()=>o_(t.trace.spans)),h=M(()=>jg(z(m),e=>z(o).has(e.span.spanId))),g=M(()=>z(h).map(e=>e.node)),_=M(()=>z(h).length<300||z(f)===0?{start:0,end:z(h).length}:{start:Math.max(0,Math.floor(z(d)/34)-12),end:Math.min(z(h).length,Math.ceil((z(d)+z(f))/34)+12)}),v=M(()=>z(h).slice(z(_).start,z(_).end));Lr(()=>{let e=z(u);if(!e||typeof ResizeObserver>`u`)return;P(f,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(f,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function y(e){return z(u)?.querySelector(`#waterfall-row-${e}`)}function b(e){if(!z(u)||z(h).length<300)return;let t=e*34,n=t+34;t<z(u).scrollTop?z(u).scrollTop=t:n>z(u).scrollTop+z(u).clientHeight&&(z(u).scrollTop=n-z(u).clientHeight),P(d,z(u).scrollTop,!0)}let x=e=>{if($c.value||yg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(g).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(g).length-1;else if(e.key===`ArrowDown`)i=r<z(g).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(g)[r].span);return}i=0}let a=z(g)[i];a&&(t.onSpanSelect?.(a.span),b(i),y(a.span.spanId)?.scrollIntoView({block:`nearest`}))};Lr(()=>(z(g),n(),window.addEventListener(`keydown`,x),()=>window.removeEventListener(`keydown`,x))),Lr(()=>{let e=n();e&&Pi(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(o)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(o,r,!0);let s=z(h).findIndex(t=>t.node.span.spanId===e);s>=0&&b(s),requestAnimationFrame(()=>y(e)?.scrollIntoView({block:`center`}))})});let S=e=>{let t=new Set(z(o));t.has(e)?t.delete(e):t.add(e),P(o,t,!0)},C=e=>t.trace.spans.some(t=>t.parentSpanId===e),w=M(()=>{let e=t.trace.duration||1,n=z(l)>0?Math.min(8,Math.max(2,Math.floor(z(l)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:ad(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),T=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var ee=p_(),te=F(ee),ne=L(F(te),2);G(ne,21,()=>z(w),Oa,(e,t)=>{var n=s_(),r=F(n,!0);D(n),R(()=>{oo(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(ne),Vo(ne,e=>P(c,e),()=>z(c)),Ke(2),D(te);var re=L(te,2),ie=F(re);oo(ie,`left: 200px; right: 80px;`),G(ie,21,()=>z(w),Oa,(e,t)=>{var n=c_();R(()=>oo(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(ie);var ae=L(ie,2),oe=F(ae),se=e=>{var t=l_();R(()=>oo(t,`height: ${z(_).start*34}px`)),H(e,t)};W(oe,e=>{z(_).start>0&&e(se)});var ce=L(oe,2);G(ce,17,()=>z(v),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let c=()=>z(r).node,l=()=>z(r).connectors,u=M(()=>z(i).has(c().span.spanId));var d=u_(),f=F(d);{let e=M(()=>n()===c().span.spanId),r=M(()=>z(o).has(c().span.spanId)),i=M(()=>C(c().span.spanId)),a=M(()=>z(s)&&z(p).has(c().span.spanId));a_(f,{get node(){return c()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return l()},onSelect:()=>t.onSpanSelect?.(c().span),onToggleCollapse:()=>S(c().span.spanId)})}D(d),R(e=>q(d,1,e),[()=>K($(`transition-opacity`,z(a)&&!z(u)&&`opacity-40`,z(a)&&z(u)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,d)});var le=L(ce,2),E=e=>{var t=l_();R(()=>oo(t,`height: ${(z(h).length-z(_).end)*34}px`)),H(e,t)};W(le,e=>{z(_).end<z(h).length&&e(E)});var ue=L(le,2),de=e=>{var t=d_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(ue,e=>{z(a)&&z(i).size===0&&e(de)}),D(ae),D(re),Vo(re,e=>P(u,e),()=>z(u));var fe=L(re,2),pe=L(F(fe),2);G(pe,16,()=>T,e=>e,(e,t)=>{var n=f_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,qg(t)))]),H(e,n)});var me=L(pe,2);ag(F(me),{size:11}),Ke(),D(me),D(fe),D(ee),R(e=>q(me,1,e),[()=>K($(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(s)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),$i(`scroll`,re,e=>P(d,e.currentTarget.scrollTop,!0)),B(`click`,me,()=>P(s,!z(s))),H(e,ee),at()}ea([`click`]);function h_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function g_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function __(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function v_(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function y_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function b_(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var x_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),S_=V(`<div role="button" tabindex="-1"><!></div>`),C_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),w_=V(`<span>Click a span to zoom in, double-click to select</span>`),T_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),E_=V(`<div class="absolute left-0 right-0"></div>`),D_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),O_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),k_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),A_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function j_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=la(),s=I(o),c=e=>{var n=S_(),i=M(()=>bg(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=x_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),oo(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K($(`absolute cursor-pointer transition-all`,y_(z(a).span),r()&&b_(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${ad(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),$i(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(_r({focusedSpanId:null})),i=N(null),a=N(_r({x:0,y:0})),o=N(void 0),s=M(()=>h_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?v_(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>g_(z(c))),u=M(()=>__(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=A_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=C_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,w_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=T_();hh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=E_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>oo(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=O_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=D_();kp(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{oo(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>ad(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Vo(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=k_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>oo(re,`height: ${z(v)??``}px; min-width: 100%;`)),$i(`mouseleave`,ne,g),H(e,y),at()}ea([`click`,`keydown`,`dblclick`,`mousemove`]);function M_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var N_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function P_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=N_(),a=F(i);La(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{xp(e,{size:14,class:`text-success`})},l=e=>{zp(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K($(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}ea([`click`]);var F_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),I_=V(`<div><!> <input/> <!></div>`);function L_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=I_(),l=F(c);Ch(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);xo(u),Vo(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=F_();rg(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),So(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K($(`relative`,i())),()=>K($(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}ea([`input`,`click`]);function R_(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var z_=V(`<span class="text-fg-subtle"> </span>`),B_=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),V_=V(`<span class="text-fg-subtle opacity-70"> </span>`),H_=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),U_=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function W_(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=la(),f=I(d),p=e=>{var i=B_(),a=F(i),o=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K($(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=U_(),r=F(n),i=F(r),o=e=>{Cp(e,{size:10})},d=e=>{Dp(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=z_(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=V_(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=H_(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);W_(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}ea([`click`]);var G_=V(`<div class="font-mono text-xs text-fg"><!></div>`);function K_(e,t){var n=G_();W_(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var q_=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),J_=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),Y_=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function X_(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=Y_(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=q_(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=J_(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{xp(e,{size:12,class:`text-success`})},p=e=>{zp(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}ea([`click`]);var Z_=V(`<button type="button"><!></button>`);function Q_(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=Z_(),l=F(c),u=e=>{xp(e,{get size(){return r()},class:`text-success`})},d=e=>{zp(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K($(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}ea([`click`]);function $_(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function ev(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function tv(e){let t=ev(e[`url.full`])??ev(e[`http.url`]);if(t)return t;let n=ev(e[`server.address`])??ev(e[`net.peer.name`]),r=ev(e[`url.path`])??ev(e[`http.target`]);if(!n||!r)return;let i=ev(e[`url.scheme`])??`https`,a=ev(e[`server.port`]),o=ev(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function nv(e){let t=e.attributes??{},n=ev(t[`http.request.method`])??ev(t[`http.method`]),r=tv(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,$_(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):ev(t);r&&i.push(`-H ${$_(`${n}: ${r}`)}`)}return i.join(` `)}var rv={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function iv(e){let t=e.attributes??{},n=t[rv.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[rv.codes];return{count:r,severity:t[rv.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var av=[`code.filepath`,`code.file.path`],ov=[`code.lineno`,`code.line.number`],sv=[`code.column`,`code.column.number`],cv=[`code.function`,`code.function.name`];function lv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function uv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function dv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function fv(e,t){let n=lv(e,av);if(!n)return null;let r=uv(e,ov),i=uv(e,sv),a=lv(e,cv),o=lv(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:dv(t,n,r,i)}}function pv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function mv(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function hv(e){let t=pv(e,[`db.system`,`db.system.name`]),n=pv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:pv(e,[`db.operation`,`db.operation.name`]),table:pv(e,[`db.sql.table`,`db.collection.name`]),dbName:pv(e,[`db.name`,`db.namespace`]),rowCount:mv(e,[`db.response.returned_rows`,`db.rows_affected`])}}var gv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),_v=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function vv(e){let t=[];for(let[n]of e.matchAll(_v))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&gv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var yv=(e,t=p,n=p,r=p)=>{let i=M(()=>Sv.test(t())),a=M(()=>Cv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:M_(n()));var s=la(),c=I(s),l=e=>{var n=Ov(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);K_(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K($(Tv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},u=e=>{let o=M(()=>wv(n())),s=M(()=>String(n()));var c=Av(),l=F(c),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var t=Dv();q(t,1,K(Ev)),H(e,t)};W(m,e=>{z(a)&&!z(i)&&e(h)});var g=L(m,2),_=e=>{var n=kv();Fm(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(g,e=>{!z(i)&&z(s).length>60&&e(_)}),D(l);var v=L(l,2),y=F(v,!0);D(v),D(c),R(e=>{J(u,`title`,t()),U(d,t()),q(f,1,e),U(p,z(i)?`sensitive`:z(o).label),U(y,z(i)?`[redacted]`:z(s))},[()=>K($(Tv,z(o).cls))]),H(e,c)};W(c,e=>{z(o)===null?e(u,-1):e(l)}),H(e,s)},bv=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=Mv(),s=F(o),c=F(s);La(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>$(`text-fg-subtle transition-transform`,r()&&`rotate-180`));Cp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=jv();La(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},xv=(e,t=p,n=p,r=p)=>{var i=Nv(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},Sv=/(password|secret|token|authorization|api[-_.]?key)/i,Cv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function wv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var Tv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Ev=`${Tv} bg-hover text-fg-subtle border-line`,Dv=V(`<span>resource</span>`),Ov=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),kv=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),Av=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"> </div></div>`),jv=V(`<div class="px-4 pb-3"><!></div>`),Mv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Nv=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),Pv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Fv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),Iv=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),Lv=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),Rv=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),zv=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),Bv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
3
- body is never recorded.</p></div>`),Vv=V(`<option> </option>`),Hv=V(`<div class="mt-1 text-[11px] text-fg-subtle font-mono"> </div>`),Uv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Code Location</span> <select class="text-[10px] bg-subtle border border-line rounded px-1 py-0.5 text-fg-muted" title="Editor to open source files in"></select></div> <a class="group flex items-center gap-2 text-xs font-mono text-accent hover:underline break-all"><!> <span class="break-all"> </span></a> <!> <div class="mt-1 text-[10px] text-fg-subtle break-all"> </div></div>`),Wv=V(`<span class="text-[10px] px-1.5 py-px rounded border font-mono bg-indigo-500/15 text-indigo-600 border-indigo-500/30"> </span>`),Gv=V(`<div class="grid grid-cols-2 gap-2 text-xs mb-2"><!> <!> <!> <!></div>`),Kv=V(`<span> </span>`),qv=V(`<pre class="bg-subtle rounded p-2.5 border border-line font-mono text-[11px] text-fg whitespace-pre-wrap break-all overflow-auto max-h-[240px]"></pre>`),Jv=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Database</span> <!></div> <!> <!></div>`),Yv=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle">Parent:</span> <span class="font-medium text-fg"> </span></div>`),Xv=V(`<div class="text-fg-muted truncate"> </div>`),Zv=V(`<div class="text-fg-subtle"> </div>`),Qv=V(`<div><span class="text-fg-subtle"> </span> <div class="mt-1 space-y-1 pl-2"><!> <!></div></div>`),$v=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Relationships</span></div> <div class="space-y-2 text-xs"><!> <!></div></div>`),ey=V(`<div class="text-fg-subtle py-2 text-center">No matches</div>`),ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs h-[300px] min-h-[120px] overflow-auto resize-y" title="Drag bottom edge to resize"><!></div>`),ny=V(`<!> <!>`,1),ry=V(`<div class="font-mono text-[11px] text-fg-muted mt-1"><pre class="whitespace-pre-wrap break-words"> </pre></div>`),iy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center justify-between mb-1"><span class="font-medium text-xs text-fg"> </span> <span class="text-[10px] text-fg-subtle"> </span></div> <!></div>`),ay=V(`<div class="space-y-2"></div>`),oy=V(`<span></span>`),sy=V(`<div class="mt-1.5 pt-1.5 border-t border-line"><div class="font-mono text-[10px] text-fg-subtle"> </div></div>`),cy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center gap-2 text-xs mb-1"><span class="text-fg-subtle">Trace:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <div class="flex items-center gap-2 text-xs"><span class="text-fg-subtle">Span:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <!></div>`),ly=V(`<div class="space-y-1.5"></div>`),uy=V(`<span class="text-[10px] text-accent font-medium">this span</span>`),dy=V(`<div><div class="flex items-center gap-2 mb-0.5"><span> </span> <!> <span class="text-fg-subtle text-[10px] ml-auto"> </span></div> <div class="text-fg-muted break-all line-clamp-2"> </div></div>`),fy=V(`<div class="border-b border-line-subtle"><div class="flex items-center gap-2 px-4 py-3"><!> <span class="text-xs font-medium text-fg-muted"> </span></div> <div class="px-4 pb-3"><div class="space-y-1.5 max-h-[200px] overflow-auto"></div></div></div>`),py=V(`<div class="fixed inset-0 z-[1200] flex items-center justify-center" role="dialog" aria-modal="true"><div class="absolute inset-0 bg-black/60 backdrop-blur-[2px] at-backdrop-in"></div> <div class="at-modal-in relative z-[1] w-[min(700px,92vw)] max-h-[85vh] flex flex-col bg-surface rounded-lg shadow-xl border border-line overflow-hidden"><div class="flex items-center justify-between px-4 py-2.5 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-mono font-semibold text-fg-muted truncate"> </span> <button class="p-1 hover:bg-hover rounded transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-auto p-4"><pre class="font-mono text-xs text-fg whitespace-pre-wrap break-all"> </pre></div></div></div>`),my=V(`<div class="flex flex-col h-full bg-surface border-l border-line"><div class="flex items-start justify-between gap-3 px-4 py-3 border-b border-line bg-subtle"><div class="flex-1 min-w-0"><h3 class="font-semibold text-sm text-fg truncate mb-1"> </h3> <div class="flex items-center gap-2 flex-wrap"><span> </span> <span class="px-2 py-0.5 rounded bg-hover text-fg-muted text-xs font-medium"> </span> <!></div></div> <button class="p-1.5 hover:bg-hover rounded-md transition-colors flex-shrink-0" title="Close"><!></button></div> <div class="flex-1 overflow-auto"><!> <!> <!> <!> <div class="px-4 py-3 border-b border-line-subtle"><div class="space-y-2 text-xs"><!> <!> <!></div></div> <div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Resource</span></div> <div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!></div></div> <!> <!> <!> <!> <!> <!> <!></div> <!></div>`);function hy(e,t){it(t,!0);let n=[{value:`vscode`,label:`VS Code`},{value:`cursor`,label:`Cursor`},{value:`webstorm`,label:`WebStorm`}],r=M(()=>nv(t.span)),i=M(()=>iv(t.span)),a=N(_r({timing:!0,attributes:!0,events:!1,links:!1})),o=N(null),s=e=>{P(a,{...z(a),[e]:!z(a)[e]},!0)},c=M(()=>t.span.status.code===`ERROR`),l=M(()=>Object.keys(t.span.attributes||{}).length>0),u=M(()=>t.span.events&&t.span.events.length>0),d=M(()=>t.span.links&&t.span.links.length>0),f=M(()=>ms(t.span,t.trace.service)),p=M(()=>hs(t.span.attributes,z(f))),m=M(()=>Object.entries(t.span.attributes||{}).filter(([e])=>e.startsWith(`service.`)||e.startsWith(`deployment.`)||e.startsWith(`host.`)||e.startsWith(`container.`)||e.startsWith(`process.`))),h=M(()=>Object.entries(t.span.attributes||{}).sort(([e],[t])=>e.localeCompare(t))),g=N(``),v=M(()=>{let e=z(g).trim().toLowerCase();return e?z(h).filter(([t,n])=>R_(e,[t,n])):z(h)}),y=M(()=>z(g).trim().length>0),b=M(()=>fv(t.span.attributes||{},Zc.value)),x=M(()=>hv(t.span.attributes||{})),S=M(()=>z(x)?.statement?vv(z(x).statement):[]),C=M(()=>kg(t.span,t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId))),w=M(()=>t.span.startTime-t.trace.startTime),T=M(()=>t.span.endTime-t.trace.startTime),ee=M(()=>t.trace.spans.find(e=>e.spanId===t.span.parentSpanId)),te=M(()=>t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId)),ne=M(()=>t.trace.spans.find(e=>!e.parentSpanId)),re=e=>Nu(t.trace.traceId,e),ie=M(()=>dl.value),ae=M(()=>z(ie).filter(e=>e.traceId===t.trace.traceId));var oe=my(),se=F(oe),ce=F(se),le=F(ce),E=F(le,!0);D(le);var ue=L(le,2),de=F(ue),fe=F(de,!0);D(de);var pe=L(de,2),me=F(pe,!0);D(pe);var he=L(pe,2),ge=e=>{var n=Pv(),r=F(n);D(n),R(()=>U(r,`${t.span.scope.name??``}
4
- ${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(he,e=>{t.span.scope?.name&&e(ge)}),D(ue),D(ce);var _e=L(ce,2);rg(F(_e),{size:16,class:`text-fg-subtle`}),D(_e),D(se);var ve=L(se,2);{let e=e=>{Np(e,{size:14})},c=e=>{var n=Fv(),r=F(n);{let e=M(()=>ad(t.span.duration));xv(r,()=>`Duration`,()=>z(e))}var i=L(r,2);{let e=M(()=>ad(z(C)));xv(i,()=>`Self time`,()=>z(e),()=>`Time in this span excluding its children`)}var a=L(i,2);{let e=M(()=>ad(z(w)));xv(a,()=>`Start (relative)`,()=>z(e))}var o=L(a,2);{let e=M(()=>ad(z(T)));xv(o,()=>`End (relative)`,()=>z(e))}var s=L(o,2);{let e=M(()=>Pg(t.span.startTime,Hu.value));xv(s,()=>`Start Time`,()=>z(e))}D(n),H(e,n)};var ye=F(ve),be=e=>{var n=Iv(),r=F(n),i=F(r);kp(i,{size:14,class:`text-danger flex-shrink-0 mt-0.5`});var a=L(i,2),o=L(F(a));D(a),D(r),D(n),R(()=>U(o,` ${t.span.status.message??``}`)),H(e,n)};W(ye,e=>{t.span.status.message&&e(be)});var xe=L(ye,2);bv(xe,()=>`Timing`,()=>e,()=>z(a).timing,()=>()=>s(`timing`),()=>c);var Se=L(xe,2),Ce=e=>{var t=zv(),n=F(t),r=F(n);{let e=M(()=>z(i).severity===`error`?`text-danger`:`text-warning`);Gh(r,{size:13,get class(){return z(e)}})}var a=L(r,2),o=F(a);D(a),D(n);var s=L(n,2);G(s,20,()=>z(i).codes,e=>e,(e,t)=>{var n=Lv(),r=F(n,!0);D(n),R(()=>U(r,t)),H(e,n)}),D(s);var c=L(s,2),l=e=>{var t=Rv(),n=F(t);D(t),R(()=>U(n,`${z(i).count-z(i).codes.length} more not listed on the span.`)),H(e,t)};W(c,e=>{z(i).count>z(i).codes.length&&e(l)}),D(t),R(()=>{q(t,1,K(z(i).severity===`error`?`border-b border-line-subtle bg-danger/5 px-4 py-3`:`border-b border-line-subtle bg-warning/5 px-4 py-3`)),U(o,`${z(i).count??``}
5
- ${z(i).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Se,e=>{z(i)&&e(Ce)});var we=L(Se,2),Te=e=>{var t=Bv(),n=F(t);Q_(L(F(n),2),{get value(){return z(r)},label:`Copy as curl`}),D(n);var i=L(n,2),a=F(i,!0);D(i),Ke(2),D(t),R(()=>U(a,z(r))),H(e,t)};W(we,e=>{z(r)&&e(Te)});var Ee=L(we,2),De=F(Ee),Oe=F(De);X_(Oe,{label:`Span ID`,get value(){return t.span.spanId}});var ke=L(Oe,2);{let e=M(()=>z(ne)&&z(ne).spanId!==t.span.spanId?()=>re(z(ne).spanId):void 0);X_(ke,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ae=L(ke,2),je=e=>{{let n=M(()=>z(ee)?()=>re(t.span.parentSpanId):void 0),r=M(()=>z(ee)?`Go to parent span`:`Parent span not captured in this trace`);X_(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ae,e=>{t.span.parentSpanId&&e(je)}),D(De),D(Ee);var Me=L(Ee,2),Ne=F(Me);Lh(F(Ne),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ne);var Pe=L(Ne,2),Fe=F(Pe);xv(Fe,()=>`Trace Service`,()=>t.trace.service);var Ie=L(Fe,2);xv(Ie,()=>`Derived Resource`,()=>z(f));var Le=L(Ie,2);xv(Le,()=>`Resource Type`,()=>z(p));var Re=L(Le,2);{let e=M(()=>String(z(m).length));xv(Re,()=>`Resource Attrs`,()=>z(e))}D(Pe),D(Me);var ze=L(Me,2),Be=e=>{var t=Uv(),r=F(t),i=F(r);Fp(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>n,e=>e.value,(e,t)=>{var n=Vv(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;co(a),D(r);var s=L(r,2),c=F(s);Yp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=Hv(),n=F(t);D(t),R(()=>U(n,`${z(b).namespace?`${z(b).namespace}.`:``}${z(b).functionName??``}()`)),H(e,t)};W(d,e=>{z(b).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Zc.value)&&(a.value=(a.__value=Zc.value)??``,so(a,Zc.value)),J(s,`href`,z(b).href),J(s,`title`,`Open ${z(b).filepath}${z(b).line?`:${z(b).line}`:``}`),U(u,z(b).display),U(m,z(b).filepath)}),B(`change`,a,e=>Qc(e.currentTarget.value)),H(e,t)};W(ze,e=>{z(b)&&e(Be)});var Ve=L(ze,2),He=e=>{var t=Jv(),n=F(t),r=F(n);Up(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=Wv(),n=F(t,!0);D(t),R(()=>U(n,z(x).system)),H(e,t)};W(i,e=>{z(x).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=Gv(),n=F(t),r=e=>{xv(e,()=>`Operation`,()=>z(x).operation)};W(n,e=>{z(x).operation&&e(r)});var i=L(n,2),a=e=>{xv(e,()=>`Table`,()=>z(x).table)};W(i,e=>{z(x).table&&e(a)});var o=L(i,2),s=e=>{xv(e,()=>`Database`,()=>z(x).dbName)};W(o,e=>{z(x).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(x).rowCount));xv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(x).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(x).operation||z(x).table||z(x).dbName||z(x).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{P_(e,{get content(){return z(x).statement},children:(e,t)=>{var n=qv();G(n,21,()=>z(S),Oa,(e,t)=>{var n=Kv(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(x).statement&&e(l)}),D(t),H(e,t)};W(Ve,e=>{z(x)&&e(He)});var Ue=L(Ve,2),We=e=>{var t=$v(),n=F(t);Tm(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=Yv(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(ee).name)),H(e,t)};W(i,e=>{z(ee)&&e(a)});var o=L(i,2),s=e=>{var t=Qv(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(te).slice(0,5),e=>e.spanId,(e,t)=>{var n=Xv(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=Zv(),n=F(t);D(t),R(()=>U(n,`+${z(te).length-5} more`)),H(e,t)};W(o,e=>{z(te).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(te).length??``}):`)),H(e,t)};W(o,e=>{z(te).length>0&&e(s)}),D(r),D(t),H(e,t)};W(Ue,e=>{(z(ee)||z(te).length>0)&&e(We)});var Ge=L(Ue,2),qe=e=>{let n=e=>{Lh(e,{size:14})},r=e=>{var n=ny(),r=I(n);L_(r,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(g)},set value(e){P(g,e,!0)}});var i=L(r,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));P_(i,{get content(){return z(e)},children:(e,t)=>{var n=ty(),r=F(n),i=e=>{H(e,ey())},a=e=>{var t=la();G(I(t),17,()=>z(v),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));yv(e,()=>z(n)[0],()=>z(n)[1],()=>e=>P(o,e,!0))}),H(e,t)};W(r,e=>{z(v).length===0?e(i):e(a,-1)}),D(n),H(e,n)},$$slots:{default:!0}})}H(e,n)};{let i=M(()=>z(y)?`Attributes (${z(v).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);bv(e,()=>z(i),()=>n,()=>z(a).attributes,()=>()=>s(`attributes`),()=>r)}};W(Ge,e=>{z(l)&&e(qe)});var Je=L(Ge,2),Ye=e=>{let n=e=>{Cm(e,{size:14})},r=e=>{var n=ay();G(n,21,()=>t.span.events,Oa,(e,n)=>{var r=iy(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));P_(e,{get content(){return z(t)},children:(e,t)=>{var r=ry(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>ad(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};bv(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(a).events,()=>()=>s(`events`),()=>r)};W(Je,e=>{z(u)&&e(Ye)});var Xe=L(Je,2),Ze=e=>{let n=e=>{km(e,{size:14})},r=e=>{var n=ly();G(n,21,()=>t.span.links,Oa,(e,t)=>{var n=cy(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),P_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),P_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,oy())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=sy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>Pu(z(t).traceId,z(t).spanId)),B(`click`,s,()=>Pu(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};bv(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(a).links,()=>()=>s(`links`),()=>r)};W(Xe,e=>{z(d)&&e(Ze)});var Qe=L(Xe,2),$e=e=>{var n=fy(),r=F(n),i=F(r);rm(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ae).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=dy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,uy())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K($(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K($(`font-mono font-medium`,z(a))),()=>Pg(z(n).timestamp,Hu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ae).length??``})`)),H(e,n)};W(Qe,e=>{z(ae).length>0&&e($e)}),D(ve)}var et=L(ve,2),tt=e=>{var t=py(),n=F(t),r=L(n,2),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a,2);rg(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(o).key}`),U(s,z(o).key),U(d,z(o).value)}),B(`click`,n,()=>P(o,null)),B(`click`,c,()=>P(o,null)),H(e,t)};W(et,e=>{z(o)&&e(tt)}),D(oe),R(e=>{U(E,t.span.name||`Unknown Span`),q(de,1,e),U(fe,t.span.status.code),U(me,t.span.kind)},[()=>K($(`px-2 py-0.5 rounded text-xs font-medium`,z(c)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,_e,function(...e){t.onClose?.apply(this,e)}),H(e,oe),at()}ea([`click`,`change`]);var gy=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function _y(e,t){it(t,!0);var n=gy(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K($(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K($(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}ea([`pointerdown`,`keydown`,`dblclick`]);function vy(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function yy(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function by(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function xy(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,yy(a,t)),l=N(_r(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;vy(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),by(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),by(a,n)},_=()=>{let e=p(t);m(e),by(a,e)};return{get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}var Sy=V(`<div><!></div>`),Cy=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function wy(e,t){it(t,!0);var n=Cy(),r=F(n),i=F(r);{let e=M(()=>$(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));Cp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=Sy();La(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}ea([`click`]);var Ty=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Ey=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),Dy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),Oy=V(`<div class="space-y-2"></div>`),ky=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),Ay=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),jy=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function My(e,t){it(t,!0);let n=N(!1),r=N(_r({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=jy(),d=M(()=>bg(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>$(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));Cp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=Ay(),i=F(n),o=e=>{wy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ty(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);wy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=Oy();G(r,21,()=>t.span.events,Oa,(e,t)=>{var n=Dy(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ey(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=ky(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),oo(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K($(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K($(`font-medium`,cd(t.span.status.code))),()=>ad(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}ea([`click`,`keydown`]);var Ny=`1.0.0`;function Py(e){return{version:Ny,exportedAt:new Date().toISOString(),trace:e}}function Fy(e){return{version:Ny,exportedAt:new Date().toISOString(),traces:e}}function Iy(e){return JSON.stringify(e,null,2)}function Ly(e,t){let n=Iy(Py(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Ry(e,t){let n=Iy(Fy(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function zy(e){let t=Iy(Py(e));await navigator.clipboard.writeText(t)}function By(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Hs(n,t,Ls,[`spanId`,`traceId`,`name`]),...Hs(n,t,Rs,[`startTime`,`endTime`,`duration`]),...Hs(n,t,zs,[`status`])]}function Vy(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Ls(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=zs(r,`rootSpan`),o=Vs(r,`spans`)?Bs(r,`spans`).flatMap((e,t)=>By(Is(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Hs(r,n,Ls,[`traceId`]),...a?By(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Hs(r,n,Rs,[`startTime`,`endTime`,`duration`])],warnings:i}}function Hy(e){return e}function Uy(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=Is(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Ls(a,`version`);o&&o!==Ny&&n.push(`Version mismatch: expected ${Ny}, got ${o}`);let s=zs(a,`trace`);if(s){let e=Vy(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(s)))}else if(Vs(a,`traces`))for(let[e,i]of Bs(a,`traces`).entries()){let a=Is(i),o=Vy(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(Wy(Hy(a)))}else if(a.traceId){let e=Vy(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(Wy(Hy(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function Wy(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(Gy),rootSpan:Gy(e.rootSpan)}}function Gy(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function Ky(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function qy(e){return{version:Ny,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function Jy(e,t){let n=JSON.stringify(qy(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Yy(e,t){return Bs(e,t)}function Xy(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=Is(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Ls(n,`version`);i&&i!==Ny&&r.push(`Version mismatch: expected ${Ny}, got ${i}`);let a=zs(n,`data`)??n,o=Yy(a,`traces`).map(Wy),s=Yy(a,`logs`),c=Yy(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function Zy(e){try{return Xy(await Ky(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var Qy=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
6
- span received; the duration covers only the spans present.</div>`),$y=V(`<span class="text-xs text-fg-muted tabular-nums flex-shrink-0"> </span>`),eb=V(`<div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div>`),tb=V(`<div class="overflow-auto h-full"><div class="divide-y divide-line-subtle"></div></div>`),nb=V(`<!> <div class="flex-shrink-0 overflow-hidden"><!></div>`,1),rb=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line"><div class="flex items-center justify-between mb-3"><button><!> Back to traces</button> <div class="flex items-center gap-2"><div class="flex items-center gap-1"><button class="p-1.5 hover:bg-hover rounded transition-colors" title="Copy trace JSON to clipboard"><!></button> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Download trace as JSON"><!></button></div> <div class="flex items-center gap-1 bg-hover rounded-md p-0.5"><button title="Waterfall view (w)"><!> Timeline</button> <button title="Flame graph view (f)"><!> Flame</button> <button title="List view (l)"><!> List</button></div> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><h3 class="font-semibold text-base mb-1.5 text-fg"> </h3> <div class="text-xs text-fg-subtle space-y-0.5"><!> <div> </div> <div class="font-mono flex items-center gap-1"><span class="truncate"> </span> <!></div></div></div> <div class="text-right flex-shrink-0"><div> </div> <div class="text-xs text-fg-muted"> </div> <div class="text-xs text-fg-subtle mt-1"> </div></div></div></div> <!> <div class="flex-1 overflow-hidden flex"><div class="flex-1 overflow-hidden min-w-0"><!></div> <!></div></div>`);function ib(e,t){it(t,!0);let n=N(`waterfall`),r=M(()=>t.trace.spans.find(e=>e.spanId===Hc.value)??null),i=e=>Hc.value=e?.spanId??null,a=N(``),o=N(0),s=N(null);Lr(()=>{let e=e=>{e.key===`/`&&z(n)===`waterfall`&&!yg()&&(e.preventDefault(),z(s)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let c=N(!1),l=N(void 0),u=xy({initial:320,min:260,minOther:360,containerRef:{get current(){return z(l)??null}},storageKey:`autotel-devtools:span-detail-width`,invert:!0}),d=M(()=>u.size),f=M(()=>u.dragging),p=M(()=>u.separatorProps);function m(e,t,n){let r=e.filter(e=>e.status.code===`ERROR`);return r.length===0?null:r[((t?r.findIndex(e=>e.spanId===t.spanId):-1)+n+r.length)%r.length]}Lr(()=>{let e=e=>{if(!$c.value){if(e.key===`Escape`){z(r)?i(null):Nu(null);return}if(!yg()){if(e.key===`w`)e.preventDefault(),P(n,`waterfall`);else if(e.key===`f`)e.preventDefault(),P(n,`flame`);else if(e.key===`l`)e.preventDefault(),P(n,`list`);else if(e.key===`e`&&!e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),1);n&&i(n)}else if(e.key===`E`&&e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),-1);n&&i(n)}}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});function h(e){return new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function g(){Ly(t.trace)}async function _(){await zy(t.trace),P(c,!0),setTimeout(()=>P(c,!1),2e3)}var v=rb(),y=F(v),b=F(y),x=F(b);Tp(F(x),{size:14}),Ke(),D(x);var S=L(x,2),C=F(S),w=F(C),T=F(w),ee=e=>{xp(e,{size:14,class:`text-success`})},te=e=>{zp(e,{size:14,class:`text-fg-subtle`})};W(T,e=>{z(c)?e(ee):e(te,-1)}),D(w);var ne=L(w,2);qp(F(ne),{size:14,class:`text-fg-subtle`}),D(ne),D(C);var re=L(C,2),ie=F(re);_p(F(ie),{size:12}),Ke(),D(ie);var ae=L(ie,2);sm(F(ae),{size:12}),Ke(),D(ae);var oe=L(ae,2);Dm(F(oe),{size:12}),Ke(),D(oe),D(re);var se=L(re,2);jp(F(se),{size:14,class:`text-fg-subtle`}),D(se),D(S),D(b);var ce=L(b,2),le=F(ce),E=F(le),ue=F(E,!0);D(E);var de=L(E,2),fe=F(de),pe=e=>{H(e,Qy())};W(fe,e=>{t.trace.partial&&e(pe)});var me=L(fe,2),he=F(me,!0);D(me);var ge=L(me,2),_e=F(ge),ve=F(_e);D(_e),Q_(L(_e,2),{get value(){return t.trace.traceId},label:`Copy trace ID`,stop:!1}),D(ge),D(de),D(le);var ye=L(le,2),be=F(ye),xe=F(be,!0);D(be);var Se=L(be,2),Ce=F(Se,!0);D(Se);var we=L(Se,2),Te=F(we);D(we),D(ye),D(ce),D(y);var Ee=L(y,2),De=e=>{var t=eb(),n=F(t);L_(n,{placeholder:`Search spans… (press /)`,ariaLabel:`Search spans by name or service`,clearTitle:`Clear search`,get value(){return z(a)},set value(e){P(a,e,!0)},get ref(){return z(s)},set ref(e){P(s,e,!0)}});var r=L(n,2),i=e=>{var t=$y(),n=F(t);D(t),R(()=>U(n,`${z(o)??``}
7
- ${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);m_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);j_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=tb(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);My(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=nb(),a=I(n);_y(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);hy(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>oo(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Vo(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K($(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K($(`font-medium text-sm mb-1`,cd(t.trace.status))),()=>ad(t.trace.duration)]),B(`click`,x,()=>Nu(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>el(vg)),H(e,v),at()}ea([`click`]);var ab=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),ob=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),sb=V(`<span class="text-accent normal-case"> </span>`),cb=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),lb=ca(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),ub=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),db=V(`<div class="flex flex-col gap-0.5"></div>`),fb=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),pb=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),mb=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),hb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function gb(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}Lr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=hb(),d=F(u),f=F(d);lm(f,{size:12});var p=L(f,4),m=e=>{var t=ab(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=mb(),r=F(n),a=e=>{var t=ob(),n=F(t),r=F(n);Ch(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);xo(a),D(n),D(t),Ao(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=fb(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=sb(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,cb())},f=e=>{var r=db();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=ub(),a=F(i),o=F(a),s=e=>{H(e,lb())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K($(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K($(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=pb();rg(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Vo(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}ea([`click`]);var _b={"=~":`REGEXP`,"!~":`NOT REGEXP`},vb=/[^\s()[\],=!<>^$"']/,yb=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function bb(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=yb.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&vb.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var xb=new Set([`and`,`or`]),Sb=new Set([`null`,`nil`]),Cb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function wb(e){let t=bb(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&xb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(Sb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),_b[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?Cb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=Cb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Tb(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:Tb(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function Tb(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Eb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Db=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),Ob=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),kb=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),Ab=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function jb(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>wb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=Ab(),h=F(m);Ch(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);xo(g),Vo(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Eb();rg(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=Ob();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=Db(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=kb(),n=F(t);kp(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),So(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K($(`relative`,t.class)),()=>K($(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),$i(`focus`,g,()=>P(l,!0)),$i(`blur`,g,()=>P(l,!1)),H(e,m),at()}ea([`input`,`keydown`,`click`,`mousedown`]);function Mb(e){return typeof e==`function`}function Nb(e){return typeof e==`object`&&!!e}var Pb=[`string`,`number`,`bigint`,`boolean`];function Fb(e){return e==null||Pb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Fb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var Ib=Symbol(`box`),Lb=Symbol(`is-writable`);function Rb(e,t){let n=M(e);return t?{[Ib]:!0,[Lb]:!0,get current(){return z(n)},set current(e){t(e)}}:{[Ib]:!0,get current(){return e()}}}function zb(e){return Nb(e)&&Ib in e}function Bb(e){return zb(e)?e:Mb(e)?Rb(e):Vb(e)}function Vb(e){let t=N(_r(e));return{[Ib]:!0,[Lb]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function Hb(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var Ub=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wb=/\n/g,Gb=/^\s*/,Kb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,qb=/^:\s*/,Jb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yb=/^[;\s]*/,Xb=/^\s+|\s+$/g,Zb=`
8
- `,Qb=`/`,$b=`*`,ex=``,tx=`comment`,nx=`declaration`;function rx(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(Wb);t&&(n+=t.length);var i=e.lastIndexOf(Zb);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(Gb)}function u(e){var t;for(e=e||[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Qb==e.charAt(0)&&$b==e.charAt(1)){for(var n=2;ex!=e.charAt(n)&&($b!=e.charAt(n)||Qb!=e.charAt(n+1));)++n;if(n+=2,ex===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:tx,comment:o})}}function f(){var e=a(),t=c(Kb);if(t){if(d(),!c(qb))return s(`property missing ':'`);var n=c(Jb),r=e({type:nx,property:ix(t[0].replace(Ub,ex)),value:n?ix(n[0].replace(Ub,ex)):ex});return c(Yb),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function ix(e){return e?e.replace(Xb,ex):ex}function ax(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=rx(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n=n||{},n[r]=a)}),n}var ox=/\d/,sx=[`-`,`_`,`/`,`.`];function cx(e=``){if(!ox.test(e))return e!==e.toLowerCase()}function lx(e){let t=[],n=``,r,i;for(let a of e){let e=sx.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=cx(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function ux(e){return e?lx(e).map(e=>fx(e)).join(``):``}function dx(e){return px(ux(e||``))}function fx(e){return e?e[0].toUpperCase()+e.slice(1):``}function px(e){return e?e[0].toLowerCase()+e.slice(1):``}function mx(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[ux(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[dx(e)]=n}return ax(e,n),t}function hx(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function gx(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var _x=gx(/[A-Z]/,e=>`-${e.toLowerCase()}`);function vx(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${_x(t)}: ${e[t]};`).join(`
9
- `)}function yx(e={}){return vx(e).replace(`
10
- `,` `)}var bx=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function xx(e){return bx.has(e)}function Sx(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&xx(e))t[e]=Hb(n,i);else if(a&&o)t[e]=hx(n,i);else if(e===`class`){let r=Fb(n),a=Fb(i);r&&a?t[e]=$a(n,i):r?t[e]=$a(n):a&&(t[e]=$a(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=mx(i);t[e]={...n,...r}}else if(o&&a)t[e]={...mx(n),...i};else if(o&&s){let r=mx(n),a=mx(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=yx(t.style).replaceAll(`
11
- `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Cx=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function wx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Tx,Ex=!1,Dx=new WeakMap,Ox=new WeakMap,kx=new WeakMap,Ax=new WeakSet;Tx=class extends Date{constructor(...e){super(...e),kt(this,Ax),O(this,Dx,N(super.getTime())),O(this,Ox,new Map),O(this,kx,li),Ex||k(Ax,this,jx).call(this)}};function jx(){Ex=!0;var e=Tx.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(Dx,this)),t[r].apply(this,e);var n=j(Ox,this).get(r);if(n===void 0){let i=li;di(j(kx,this)),n=M(()=>(z(j(Dx,this)),t[r].apply(this,e))),j(Ox,this).set(r,n),di(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(Dx,this),t.getTime.call(this)),n})}var Mx,Nx,Px=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Fx=[`difference`,`intersection`,`symmetricDifference`,`union`],Ix=!1,Lx=new WeakMap,Rx=new WeakMap,zx=new WeakMap,Bx=new WeakMap,Vx=new WeakSet;Nx=Symbol.iterator,Mx=class extends Set{constructor(e){if(super(),kt(this,Vx),O(this,Lx,new Map),O(this,Rx,N(0)),O(this,zx,N(0)),O(this,Bx,Si||-1),e){for(var t of e)super.add(t);j(zx,this).v=super.size}Ix||k(Vx,this,Ux).call(this)}has(e){var t=super.has(e),n=j(Lx,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Rx,this)),!1;r=k(Vx,this,Hx).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(zx,this),super.size),hr(j(Rx,this))),this}delete(e){var t=super.delete(e),n=j(Lx,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(zx,this),super.size),hr(j(Rx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Lx,this);for(var t of e.values())P(t,!1);e.clear(),P(j(zx,this),0),hr(j(Rx,this))}}keys(){return this.values()}values(){return z(j(Rx,this)),super.values()}entries(){return z(j(Rx,this)),super.entries()}[Nx](){return this.keys()}get size(){return z(j(zx,this))}};function Hx(e){return Si===j(Bx,this)?N(e):dr(e)}function Ux(){Ix=!0;var e=Mx.prototype,t=Set.prototype;for(let n of Px)e[n]=function(...e){return z(j(Rx,this)),t[n].apply(this,e)};for(let n of Fx)e[n]=function(...e){z(j(Rx,this));var r=t[n].apply(this,e);return new Mx(r)}}function Wx(e){return Wx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wx(e)}function Gx(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Wx(e))!==null;);return e}function Kx(){return Kx=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Gx(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Kx.apply(null,arguments)}function qx(e,t,n,r){var i=Kx(Wx(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var Jx,Yx,Xx=new WeakMap,Zx=new WeakMap,Qx=new WeakMap,$x=new WeakMap,eS=new WeakSet;Yx=Symbol.iterator;var tS=class extends Map{constructor(e){if(super(),kt(this,eS),O(this,Xx,new Map),O(this,Zx,N(0)),O(this,Qx,N(0)),O(this,$x,Si||-1),e){for(var[t,n]of e)super.set(t,n);j(Qx,this).v=super.size}}has(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else return z(j(Zx,this)),!1}return z(n),!0}forEach(e,t){k(eS,this,rS).call(this),super.forEach(e,t)}get(e){var t=j(Xx,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(eS,this,nS).call(this,0),t.set(e,n);else{z(j(Zx,this));return}}return z(n),super.get(e)}set(e,t){var n=j(Xx,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(Zx,this);if(r===void 0)r=k(eS,this,nS).call(this,0),n.set(e,r),P(j(Qx,this),super.size),hr(o);else if(i!==t){hr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&hr(o)}return a}delete(e){var t=j(Xx,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(Qx,this),super.size),hr(j(Zx,this))),r}clear(){if(super.size!==0){super.clear();var e=j(Xx,this);P(j(Qx,this),0);for(var t of e.values())P(t,-1);hr(j(Zx,this)),e.clear()}}keys(){return z(j(Zx,this)),super.keys()}values(){return k(eS,this,rS).call(this),super.values()}entries(){return k(eS,this,rS).call(this),super.entries()}[Yx](){return this.entries()}get size(){return z(j(Qx,this)),super.size}};Jx=tS;function nS(e){return Si===j($x,this)?N(e):dr(e)}function rS(){z(j(Zx,this));var e=j(Xx,this);if(j(Qx,this).v!==e.size){for(var t of qx(Jx.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k(eS,this,nS).call(this,0);e.set(t,n)}}for([,n]of j(Xx,this))z(n)}var iS=new WeakMap,aS=new WeakMap;new class{constructor(e={}){O(this,iS,void 0),O(this,aS,void 0);let{window:t=Cx,document:n=t?.document}=e;t!==void 0&&(A(iS,this,n),A(aS,this,Dt(e=>{let n=Qi(t,`focusin`,e),r=Qi(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(aS,this)?.call(this),j(iS,this)?wx(j(iS,this)):null}};function oS(e){return typeof e==`function`}var sS=new WeakMap,cS=new WeakMap,lS=class{constructor(e){O(this,sS,void 0),O(this,cS,void 0),A(sS,this,e),A(cS,this,Symbol(e))}get key(){return j(cS,this)}exists(){return nt(j(cS,this))}get(){let e=et(j(cS,this));if(e===void 0)throw Error(`Context "${j(sS,this)}" not found`);return e}getOr(e){let t=et(j(cS,this));return t===void 0?e:t}set(e){return tt(j(cS,this),e)}};function uS(e,t){switch(e){case`post`:Lr(t);break;case`pre`:zr(t)}}function dS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;uS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Pi(()=>n(t,o));return o=t,r})}function fS(e,t,n){dS(e,`post`,t,n)}function pS(e,t,n){dS(e,`pre`,t,n)}fS.pre=pS;function mS(e){return oS(e)?e():e}var hS=new WeakMap,gS=new WeakMap,_S=new WeakMap,vS=new WeakMap,yS=new WeakMap,bS=new WeakMap,xS=new WeakMap,SS=new WeakMap,CS=class{constructor(e,t={box:`border-box`}){O(this,hS,{width:0,height:0}),O(this,gS,!1),O(this,_S,void 0),O(this,vS,void 0),O(this,yS,void 0),O(this,bS,M(()=>(z(j(SS,this))?.(),this.getSize().width))),O(this,xS,M(()=>(z(j(SS,this))?.(),this.getSize().height))),O(this,SS,M(()=>{let e=mS(j(vS,this));if(e)return Dt(t=>{if(!j(yS,this))return;let n=new(j(yS,this)).ResizeObserver(e=>{A(gS,this,!0);for(let t of e){let e=j(_S,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(hS,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(hS,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(gS,this,!1),n.disconnect()}})})),A(yS,this,t.window??Cx),A(_S,this,t),A(vS,this,e),A(hS,this,{width:0,height:0})}calculateSize(){let e=mS(j(vS,this));if(!e||!j(yS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(_S,this).box===`border-box`)return{width:t,height:n};let r=j(yS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(gS,this)?j(hS,this):this.calculateSize()??j(hS,this)}get current(){return z(j(SS,this))?.(),this.getSize()}get width(){return z(j(bS,this))}get height(){return z(j(xS,this))}};function wS(e){Lr(()=>()=>{e()})}function TS(e,t){return setTimeout(t,e)}function ES(e){ji().then(e)}var DS=1,OS=9,kS=11;function AS(e){return Nb(e)&&e.nodeType===DS&&typeof e.nodeName==`string`}function jS(e){return Nb(e)&&e.nodeType===OS}function MS(e){return Nb(e)&&e.constructor?.name===`VisualViewport`}function NS(e){return Nb(e)&&e.nodeType!==void 0}function PS(e){return NS(e)&&e.nodeType===kS&&`host`in e}function FS(e,t){if(!e||!t||!AS(e)||!AS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&PS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function IS(e){return jS(e)?e:MS(e)?e.document:e?.ownerDocument??document}function LS(e){return PS(e)?LS(e.host):jS(e)?e.defaultView??window:AS(e)?e.ownerDocument?.defaultView??window:window}function RS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var zS=new WeakMap,BS=class{get root(){return z(j(zS,this))}set root(e){P(j(zS,this),e)}constructor(e){x(this,`element`,void 0),O(this,zS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>IS(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>RS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),this.element=typeof e==`function`?Rb(e):e}getElementById(e){return this.root.getElementById(e)}};function VS(e,t){return{[Li()]:n=>zb(e)?(e.current=n,Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function HS(e){return e?`true`:`false`}function US(e){return e?`open`:`closed`}function WS(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var GS=new WeakMap,KS=new WeakMap,qS=class{constructor(e){O(this,GS,void 0),O(this,KS,void 0),x(this,`attrs`,void 0),A(GS,this,e.getVariant?e.getVariant():null),A(KS,this,j(GS,this)?`data-${j(GS,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j(KS,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function JS(e){let t=new qS(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var YS=typeof document<`u`,XS=ZS();function ZS(){return YS&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function QS(e){return e instanceof HTMLElement}function $S(e){return e instanceof Element}function eC(e){return e instanceof Element||e instanceof SVGElement}function tC(e){return e.pointerType===`touch`}function nC(e){return e!==null}var rC=new WeakMap,iC=new WeakMap,aC=new WeakMap,oC=new WeakMap,sC=new WeakSet,cC=class{constructor(e){kt(this,sC),O(this,rC,void 0),O(this,iC,null),O(this,aC,null),O(this,oC,0),A(rC,this,e),wS(()=>k(sC,this,lC).call(this))}run(e){k(sC,this,lC).call(this);let t=j(rC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(sC,this,uC).call(this,e);return}let n=j(oC,this),r=()=>{n===j(oC,this)&&k(sC,this,uC).call(this,e)},i=()=>{if(n!==j(oC,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(oC,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null),i()}))};if(!j(rC,this).afterTick.current){a();return}A(iC,this,window.requestAnimationFrame(()=>{A(iC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(aC,this,new MutationObserver(()=>{n===j(oC,this)&&(t.hasAttribute(e)||(j(aC,this)?.disconnect(),A(aC,this,null),a()))})),j(aC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function lC(){var e;j(iC,this)!==null&&(window.cancelAnimationFrame(j(iC,this)),A(iC,this,null)),j(aC,this)?.disconnect(),A(aC,this,null),A(oC,this,(e=j(oC,this),e++,e))}function uC(e){let t=()=>{e()};j(rC,this).afterTick?ES(t):t()}var dC=new WeakMap,fC=new WeakMap,pC=new WeakMap,mC=new WeakMap,hC=new WeakMap,gC=new WeakMap,_C=new WeakMap,vC=new WeakSet,yC=class{constructor(e){kt(this,vC),O(this,dC,void 0),O(this,fC,void 0),O(this,pC,void 0),O(this,mC,N(!1)),O(this,hC,N(void 0)),O(this,gC,!1),O(this,_C,null),A(dC,this,e),P(j(mC,this),e.open.current,!0),A(fC,this,e.enabled??!0),A(pC,this,new cC({ref:j(dC,this).ref,afterTick:j(dC,this).open})),wS(()=>k(vC,this,bC).call(this)),fS(()=>j(dC,this).open.current,e=>{if(!j(gC,this)){A(gC,this,!0);return}if(k(vC,this,bC).call(this),!e&&j(dC,this).shouldSkipExitAnimation?.()){P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}if(e&&P(j(mC,this),!0),P(j(hC,this),e?`starting`:`ending`,!0),e&&A(_C,this,window.requestAnimationFrame(()=>{A(_C,this,null),j(dC,this).open.current&&P(j(hC,this),void 0)})),!j(fC,this)){e||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.();return}j(pC,this).run(()=>{e===j(dC,this).open.current&&(j(dC,this).open.current||P(j(mC,this),!1),P(j(hC,this),void 0),j(dC,this).onComplete?.())})})}get shouldRender(){return z(j(mC,this))}get transitionStatus(){return z(j(hC,this))}};function bC(){j(_C,this)!==null&&(window.cancelAnimationFrame(j(_C,this)),A(_C,this,null))}function xC(){}function SC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function CC(e,t){var n=la();Da(I(n),()=>t.children,e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var wC=new lS(`BitsConfig`);function TC(){let e=new DC(null,{});return wC.getOr(e).opts}function EC(e){return wC.set(new DC(wC.getOr(null),e))}var DC=class{constructor(e,t){x(this,`opts`,void 0);let n=OC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function OC(e,t){return n=>Rb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function kC(e,t){return n=>{let r=TC();return Rb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var AC=kC(e=>e.defaultPortalTo,`body`);function jC(e,t){it(t,!0);let n=AC(()=>t.to),r=rt(),i=M(a);function a(){if(!YS||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(_a(o),o=null)}fS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=pa(CC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=la(),l=I(c),u=e=>{var n=la();La(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var MC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Qi(e,this.eventName,e=>{t(e)},n)}};function NC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function PC(e,t){return e===t||e.contains(t)}function FC(e){return e?.ownerDocument??document}function IC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var LC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],RC=LC.join(`,`),zC=typeof Element>`u`,BC=zC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,VC=!zC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},HC=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):HC(e.parentNode))},UC=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},WC=function(e,t,n){if(HC(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(RC));return t&&BC.call(e,RC)&&r.unshift(e),r=r.filter(n),r},GC=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!HC(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=GC(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{BC.call(a,RC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!HC(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=GC(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},KC=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},qC=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||UC(e))&&!KC(e)?0:e.tabIndex},JC=function(e,t){var n=qC(e);return n<0&&t&&!KC(e)?0:n},YC=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},XC=function(e){return e.tagName===`INPUT`},ZC=function(e){return XC(e)&&e.type===`hidden`},QC=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},$C=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},ew=function(e){if(!e.name)return!0;var t=e.form||VC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=$C(r,e.form);return!i||i===e},tw=function(e){return XC(e)&&e.type===`radio`},nw=function(e){return tw(e)&&!ew(e)},rw=function(e){var t=e&&VC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=VC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},iw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},aw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=BC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(BC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=VC(e);if(s&&!s.shadowRoot&&r(s)===!0)return iw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(rw(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return iw(e);return!1},ow=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return BC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},sw=function(e,t){return!(t.disabled||ZC(t)||aw(t,e)||QC(t)||ow(t))},cw=function(e,t){return!(nw(t)||qC(t)<0||!sw(e,t))},lw=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},uw=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=JC(a,i),s=i?uw(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(YC).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},dw=function(e,t){return t=t||{},uw(t.getShadowRoot?GC([e],t.includeContainer,{filter:cw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:lw}):WC(e,t.includeContainer,cw.bind(null,t)))},fw=function(e,t){return t=t||{},t.getShadowRoot?GC([e],t.includeContainer,{filter:sw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):WC(e,t.includeContainer,sw.bind(null,t))},pw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,RC)!==!1&&cw(t,e)},mw=LC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),hw=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return BC.call(e,mw)!==!1&&sw(t,e)},gw=`data-context-menu-trigger`,_w=`data-context-menu-content`;new lS(`Menu.Root`),new lS(`Menu.Root | Menu.Sub`),new lS(`Menu.Content`),new lS(`Menu.Group | Menu.RadioGroup`),new lS(`Menu.RadioGroup`),new lS(`Menu.CheckboxGroup`),new MC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),JS({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var vw;(vw=globalThis).bitsDismissableLayers??(vw.bitsDismissableLayers=new Map);var yw=new WeakMap,bw=new WeakMap,xw=new WeakMap,Sw=new WeakMap,Cw=new WeakMap,ww=new WeakMap,Tw=new WeakMap,Ew=new WeakMap,Dw=new WeakMap,Ow=new WeakSet,kw=new WeakMap,Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=new WeakMap,Iw=new WeakMap,Lw=new WeakMap,Rw=class e{static create(t){return new e(t)}constructor(e){kt(this,Ow),x(this,`opts`,void 0),O(this,yw,void 0),O(this,bw,void 0),O(this,xw,{pointerdown:!1}),O(this,Sw,!1),O(this,Cw,!1),O(this,ww,void 0),O(this,Tw,void 0),O(this,Ew,xC),O(this,Dw,e=>{e.defaultPrevented||this.opts.ref.current&&ES(()=>{!this.opts.ref.current||j(Pw,this).call(this,e.target)||e.target&&!j(Cw,this)&&j(Tw,this).current?.(e)})}),O(this,kw,e=>{let t=e;t.defaultPrevented&&(t=Ww(e)),j(yw,this).current(e)}),O(this,Aw,NC(e=>{if(!this.opts.ref.current){j(Ew,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||Uw(e,this.opts.ref.current);if(!j(Sw,this)||k(Ow,this,Bw).call(this)||!t){j(Ew,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=Ww(n)),j(bw,this).current!==`close`&&j(bw,this).current!==`defer-otherwise-close`){j(Ew,this).call(this);return}e.pointerType===`touch`?(j(Ew,this).call(this),A(Ew,this,Qi(j(ww,this),`click`,j(kw,this),{once:!0}))):j(yw,this).current(n)},10)),O(this,jw,e=>{j(xw,this)[e.type]=!0}),O(this,Mw,e=>{j(xw,this)[e.type]=!1}),O(this,Nw,()=>{this.opts.ref.current&&A(Sw,this,Hw(this.opts.ref.current))}),O(this,Pw,e=>this.opts.ref.current?PC(this.opts.ref.current,e):!1),O(this,Fw,NC(()=>{for(let e in j(xw,this))j(xw,this)[e]=!1;A(Sw,this,!1)},20)),O(this,Iw,()=>{A(Cw,this,!0)}),O(this,Lw,()=>{A(Cw,this,!1)}),x(this,`props`,{onfocuscapture:j(Iw,this),onblurcapture:j(Lw,this)}),this.opts=e,A(bw,this,e.interactOutsideBehavior),A(yw,this,e.onInteractOutside),A(Tw,this,e.onFocusOutside),Lr(()=>{A(ww,this,FC(this.opts.ref.current))});let t=xC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Fw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),t()};fS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=TS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(bw,this)),t(),t=k(Ow,this,zw).call(this))}),a}),wS(()=>{r=!0,i(),j(Fw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Aw,this).destroy(),j(Ew,this).call(this),t()})}};function zw(){return hx(Qi(j(ww,this),`pointerdown`,hx(j(jw,this),j(Nw,this)),{capture:!0}),Qi(j(ww,this),`pointerdown`,hx(j(Mw,this),j(Aw,this))),Qi(j(ww,this),`focusin`,j(Dw,this)))}function Bw(){return Object.values(j(xw,this)).some(Boolean)}function Vw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Hw(e){let t=[...globalThis.bitsDismissableLayers],n=Vw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function Uw(e,t){let n=e.target;if(!eC(n))return!1;let r=!!n.closest(`[${gw}]`),i=!!t.closest(`[${_w}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:FC(n).documentElement.contains(n)&&!PC(t,n)&&IC(e,t)}function Ww(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Gw(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,xC),i=Z(t,`onFocusOutside`,3,xC),a=Z(t,`isValidEvent`,3,()=>!1),o=Rw.create({id:Rb(()=>t.id),interactOutsideBehavior:Rb(()=>n()),onInteractOutside:Rb(()=>r()),enabled:Rb(()=>t.enabled),onFocusOutside:Rb(()=>i()),isValidEvent:Rb(()=>a()),ref:t.ref});var s=la();La(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var Kw;(Kw=globalThis).bitsEscapeLayers??(Kw.bitsEscapeLayers=new Map);var qw=new WeakMap,Jw=new WeakMap,Yw=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,qw,()=>Qi(this.domContext.getDocument(),`keydown`,j(Jw,this),{passive:!1})),O(this,Jw,e=>{if(e.key!==`Escape`||!Xw(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new BS(this.opts.ref);let t=xC;fS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(qw,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function Xw(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Zw(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,xC);Yw.create({escapeKeydownBehavior:Rb(()=>n()),onEscapeKeydown:Rb(()=>r()),enabled:Rb(()=>t.enabled),ref:t.ref});var i=la();La(I(i),()=>t.children??p),H(e,i),at()}var Qw=new WeakMap,$w=new WeakMap,eT=new WeakMap,tT=class e{constructor(){O(this,Qw,Vb([])),O(this,$w,new WeakMap),O(this,eT,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(eT,this).set(e,n),j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e),j(Qw,this).current.unshift(e)}unregister(e){j(Qw,this).current=j(Qw,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(Qw,this).current[0]}setFocusMemory(e,t){j($w,this).set(e,t)}getFocusMemory(e){return j($w,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(eT,this).set(e,t)}getPreFocusMemory(e){return j(eT,this).get(e)}clearPreFocusMemory(e){j(eT,this).delete(e)}};x(tT,`instance`,void 0);var nT=new WeakMap,rT=new WeakMap,iT=new WeakMap,aT=new WeakMap,oT=new WeakMap,sT=new WeakSet,cT=class e{constructor(e){kt(this,sT),O(this,nT,!1),O(this,rT,null),O(this,iT,tT.getInstance()),O(this,aT,[]),O(this,oT,void 0),A(oT,this,e)}get paused(){return j(nT,this)}pause(){A(nT,this,!0)}resume(){A(nT,this,!1)}mount(e){j(rT,this)&&this.unmount(),A(rT,this,e),j(iT,this).register(this),k(sT,this,fT).call(this),k(sT,this,uT).call(this)}unmount(){j(rT,this)&&(k(sT,this,lT).call(this),k(sT,this,dT).call(this),j(iT,this).unregister(this),j(iT,this).clearPreFocusMemory(this),A(rT,this,null))}static use(t){let n=null;return fS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),wS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function lT(){for(let e of j(aT,this))e();A(aT,this,[])}function uT(){if(!j(rT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(oT,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(rT,this))return;let e=k(sT,this,mT).call(this);e?(e.focus(),j(iT,this).setFocusMemory(this,e)):j(rT,this).focus()})}function dT(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(oT,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(iT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function fT(){if(!j(rT,this)||!j(oT,this).trap.current)return;let e=j(rT,this),t=e.ownerDocument;j(aT,this).push(Qi(t,`focusin`,t=>{if(j(nT,this)||!j(iT,this).isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))j(iT,this).setFocusMemory(this,n);else{let n=j(iT,this).getFocusMemory(this);if(n&&e.contains(n)&&hw(n))t.preventDefault(),n.focus();else{let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0];(t||n||e).focus()}}}},{capture:!0}),Qi(e,`keydown`,e=>{if(!j(oT,this).loop||j(nT,this)||e.key!==`Tab`||!j(iT,this).isActiveScope(this))return;let n=k(sT,this,pT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(iT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(sT,this,mT).call(this),n=k(sT,this,hT).call(this)[0],r=t||n;r?(r.focus(),j(iT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(aT,this).push(()=>n.disconnect())}function pT(){return j(rT,this)?dw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function mT(){return k(sT,this,pT).call(this)[0]||null}function hT(){return j(rT,this)?fw(j(rT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function gT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,xC),o=Z(t,`onOpenAutoFocus`,3,xC),s=cT.use({enabled:Rb(()=>n()),trap:Rb(()=>r()),loop:i(),onCloseAutoFocus:Rb(()=>a()),onOpenAutoFocus:Rb(()=>o()),ref:t.ref});var c=la();La(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var _T,vT=()=>{};(_T=globalThis).bitsTextSelectionLayers??(_T.bitsTextSelectionLayers=new Map);var yT=new WeakMap,bT=new WeakMap,xT=new WeakMap,ST=new WeakMap,CT=new WeakSet,wT=new WeakMap,TT=new WeakMap,ET=new WeakMap,DT=class e{static create(t){return new e(t)}constructor(e){kt(this,CT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,yT,xC),O(this,bT,!1),O(this,xT,vT),O(this,ST,vT),O(this,wT,e=>{j(ST,this).call(this,e)}),O(this,TT,e=>{if(!j(bT,this))return;let t=this.opts.ref.current,n=e.target;!QS(t)||!QS(n)||!MT(this)||!FS(t,n)||(j(xT,this).call(this,e),!e.defaultPrevented&&A(yT,this,AT(t,this.domContext.getDocument().body)))}),O(this,ET,()=>{j(yT,this).call(this),A(yT,this,xC)}),this.opts=e,this.domContext=new BS(e.ref);let t=xC;fS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(bT,this,e),A(xT,this,n),A(ST,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(CT,this,OT).call(this)),()=>{A(bT,this,!1),t(),j(ET,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function OT(){return hx(Qi(this.domContext.getDocument(),`pointerdown`,j(TT,this)),Qi(this.domContext.getDocument(),`pointerup`,Hb(j(ET,this),j(wT,this))))}var kT=e=>e.style.userSelect||e.style.webkitUserSelect;function AT(e,t){let n=kT(t),r=kT(e);return jT(t,`none`),jT(e,`text`),()=>{jT(t,n),jT(e,r)}}function jT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function MT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function NT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,xC),i=Z(t,`onPointerUp`,3,xC);DT.create({id:Rb(()=>t.id),onPointerDown:Rb(()=>r()),onPointerUp:Rb(()=>i()),enabled:Rb(()=>t.enabled&&n()),ref:t.ref});var a=la();La(I(a),()=>t.children??p),H(e,a),at()}var PT;(PT=globalThis).bitsIdCounter??(PT.bitsIdCounter={current:0});function FT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var IT=new WeakMap,LT=new WeakMap,RT=new WeakMap,zT=new WeakMap,BT=new WeakSet,VT=class{constructor(e){kt(this,BT),O(this,IT,void 0),O(this,LT,0),O(this,RT,N()),O(this,zT,void 0),A(IT,this,e)}get(...e){return A(LT,this,j(LT,this)+1),z(j(RT,this))===void 0&&A(zT,this,Br(()=>{P(j(RT,this),j(IT,this).call(this,...e),!0)})),Lr(()=>()=>{k(BT,this,HT).call(this)}),z(j(RT,this))}};function HT(){A(LT,this,j(LT,this)-1),j(zT,this)&&j(LT,this)<=0&&(j(zT,this).call(this),P(j(RT,this),void 0),A(zT,this,void 0))}var UT=new tS,WT=N(null),GT=null,KT=null,qT=!1,JT=Rb(()=>{for(let e of UT.values())if(e)return!0;return!1}),YT=null,XT=new VT(()=>{function e(){document.body.setAttribute(`style`,z(WT)??``),document.body.style.removeProperty(`--scrollbar-width`),XS&&GT?.(),P(WT,null)}function t(){KT!==null&&(window.clearTimeout(KT),KT=null)}function n(e,n){t(),qT=!0,YT=Date.now();let r=YT,i=()=>{KT=null,YT===r&&(nE(UT)?qT=!1:(qT=!1,n()))},a=e===null?24:e;KT=window.setTimeout(i,a)}function r(){z(WT)===null&&UT.size===0&&!qT&&P(WT,document.body.getAttribute(`style`),!0)}return fS(()=>JT.current,()=>{if(!JT.current)return;r(),qT=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,XS&&(GT=Qi(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),ES(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),wS(()=>()=>{GT?.()}),{get lockMap(){return UT},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),ZT=new WeakMap,QT=new WeakMap,$T=new WeakMap,eE=new WeakMap,tE=class{constructor(e,t=()=>null){O(this,ZT,FT()),O(this,QT,void 0),O(this,$T,()=>null),O(this,eE,void 0),x(this,`locked`,void 0),A(QT,this,e),A($T,this,t),A(eE,this,XT.get()),j(eE,this)&&(j(eE,this).cancelPendingCleanup(),j(eE,this).ensureInitialStyleCaptured(),j(eE,this).lockMap.set(j(ZT,this),j(QT,this)??!1),this.locked=Rb(()=>j(eE,this).lockMap.get(j(ZT,this))??!1,e=>j(eE,this).lockMap.set(j(ZT,this),e)),wS(()=>{if(j(eE,this).lockMap.delete(j(ZT,this)),nE(j(eE,this).lockMap))return;let e=j($T,this).call(this);j(eE,this).scheduleCleanupIfNoNewLocks(e,()=>{j(eE,this).resetBodyStyle()})}))}};function nE(e){for(let[t,n]of e)if(n)return!0;return!1}function rE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new tE(n(),()=>r()),at()}function iE(e,t){it(t,!0),EC({defaultPortalTo:Rb(()=>t.defaultPortalTo),defaultLocale:Rb(()=>t.defaultLocale)});var n=la();La(I(n),()=>t.children??p),H(e,n),at()}var aE=[`top`,`right`,`bottom`,`left`],oE=Math.min,sE=Math.max,cE=Math.round,lE=Math.floor,uE=e=>({x:e,y:e}),dE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fE(e,t,n){return sE(e,oE(t,n))}function pE(e,t){return typeof e==`function`?e(t):e}function mE(e){return e.split(`-`)[0]}function hE(e){return e.split(`-`)[1]}function gE(e){return e===`x`?`y`:`x`}function _E(e){return e===`y`?`height`:`width`}function vE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yE(e){return gE(vE(e))}function bE(e,t,n){n===void 0&&(n=!1);let r=hE(e),i=yE(e),a=_E(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kE(o)),[o,kE(o)]}function xE(e){let t=kE(e);return[SE(e),t,SE(t)]}function SE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var CE=[`left`,`right`],wE=[`right`,`left`],TE=[`top`,`bottom`],EE=[`bottom`,`top`];function DE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wE:CE:t?CE:wE;case`left`:case`right`:return t?TE:EE;default:return[]}}function OE(e,t,n,r){let i=hE(e),a=DE(mE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(SE)))),a}function kE(e){let t=mE(e);return dE[t]+e.slice(t.length)}function AE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function jE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:AE(e)}function ME(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function NE(e,t,n){let{reference:r,floating:i}=e,a=vE(t),o=yE(t),s=_E(o),c=mE(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=hE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function PE(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pE(t,e),p=jE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ME(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ME(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var FE=50,IE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:PE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=NE(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<FE&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=NE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},LE=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pE(e,t)||{};if(l==null)return{};let d=jE(u),f={x:n,y:r},p=yE(i),m=_E(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=oE(d[_],T),te=oE(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=fE(ee,re,ne),ae=!c.arrow&&hE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),RE=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mE(r),_=vE(o),v=mE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[kE(o)]:xE(o)),x=p!==`none`;!d&&x&&b.push(...OE(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=bE(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===vE(t)||T.every(e=>vE(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vE(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function zE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BE(e){return aE.some(t=>e[t]>=0)}var VE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=pE(e,t);switch(i){case`referenceHidden`:{let e=zE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:BE(e)}}}case`escaped`:{let e=zE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:BE(e)}}}default:return{}}}}},HE=new Set([`left`,`top`]);async function UE(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mE(n),s=hE(n),c=vE(n)===`y`,l=HE.has(o)?-1:1,u=a&&c?-1:1,d=pE(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var WE=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await UE(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},GE=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vE(i),p=gE(f),m=u[p],h=u[f],g=(e,t)=>fE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},KE=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pE(e,t),u={x:n,y:r},d=vE(i),f=gE(d),p=u[f],m=u[d],h=pE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=HE.has(mE(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},qE=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=pE(e,t),c=await i.detectOverflow(t,s),l=mE(n),u=hE(n),d=vE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=oE(p-c[m],g),y=oE(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*sE(c.left,c.right):S=p-2*sE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function JE(){return typeof window<`u`}function YE(e){return QE(e)?(e.nodeName||``).toLowerCase():`#document`}function XE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZE(e){return((QE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function QE(e){return JE()?e instanceof Node||e instanceof XE(e).Node:!1}function $E(e){return JE()?e instanceof Element||e instanceof XE(e).Element:!1}function eD(e){return JE()?e instanceof HTMLElement||e instanceof XE(e).HTMLElement:!1}function tD(e){return!JE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof XE(e).ShadowRoot}function nD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=pD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rD(e){return/^(table|td|th)$/.test(YE(e))}function iD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var aD=/transform|translate|scale|rotate|perspective|filter/,oD=/paint|layout|strict|content/,sD=e=>!!e&&e!==`none`,cD;function lD(e){let t=$E(e)?pD(e):e;return sD(t.transform)||sD(t.translate)||sD(t.scale)||sD(t.rotate)||sD(t.perspective)||!dD()&&(sD(t.backdropFilter)||sD(t.filter))||aD.test(t.willChange||``)||oD.test(t.contain||``)}function uD(e){let t=hD(e);for(;eD(t)&&!fD(t);){if(lD(t))return t;if(iD(t))return null;t=hD(t)}return null}function dD(){return cD??(cD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),cD}function fD(e){return/^(html|body|#document)$/.test(YE(e))}function pD(e){return XE(e).getComputedStyle(e)}function mD(e){return $E(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hD(e){if(YE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||tD(e)&&e.host||ZE(e);return tD(t)?t.host:t}function gD(e){let t=hD(e);return fD(t)?(e.ownerDocument||e).body:eD(t)&&nD(t)?t:gD(t)}function _D(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gD(e),i=r===e.ownerDocument?.body,a=XE(r);if(i){let e=vD(a);return t.concat(a,a.visualViewport||[],nD(r)?r:[],e&&n?_D(e):[])}return t.concat(r,_D(r,[],n))}function vD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yD(e){let t=pD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=eD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cE(n)!==a||cE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bD(e){return $E(e)?e:e.contextElement}function xD(e){let t=bD(e);if(!eD(t))return uE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=yD(t),o=(a?cE(n.width):n.width)/r,s=(a?cE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var SD=uE(0);function CD(e){let t=XE(e);return!dD()||!t.visualViewport?SD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===XE(e)}function TD(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bD(e),o=uE(1);t&&(r?$E(r)&&(o=xD(r)):o=xD(e));let s=wD(a,n,r)?CD(a):uE(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=XE(a),t=$E(r)?XE(r):r,n=e,i=vD(n);for(;i&&t!==n;){let e=xD(i),t=i.getBoundingClientRect(),r=pD(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=XE(i),i=vD(n)}}return ME({width:u,height:d,x:c,y:l})}function ED(e,t){let n=mD(e).scrollLeft;return t?t.left+n:TD(ZE(e)).left+n}function DD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ED(e,n),y:n.top+t.scrollTop}}function OD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ZE(r),s=t?iD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uE(1),u=uE(0),d=eD(r);if((d||!a)&&((YE(r)!==`body`||nD(o))&&(c=mD(r)),d)){let e=TD(r);l=xD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?DD(o,c):uE(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function kD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function AD(e){let t=mD(e),n=e.ownerDocument.body,r=sE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=sE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+ED(e),o=-t.scrollTop;return pD(n).direction===`rtl`&&(a+=sE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var jD=25;function MD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=XE(e),a=ZE(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!dD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(ED(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=jD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ND(e,t){let n=TD(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function PD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=MD(e,n,t);else if(t===`document`)r=AD(ZE(e));else if($E(t))r=ND(t,n);else{let n=CD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ME(r)}function FD(e,t){let n=t.get(e);if(n)return n;let r=_D(e,[],!1).filter(e=>$E(e)&&YE(e)!==`body`),i=null,a=pD(e).position===`fixed`,o=a?hD(e):e;for(;$E(o)&&!fD(o);){let e=pD(o),t=lD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=hD(o)}return t.set(e,r),r}function ID(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iD(t)?[]:FD(t,this._c):[].concat(n),r],o=PD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=PD(t,a[e],i);s=sE(n.top,s),c=oE(n.right,c),l=oE(n.bottom,l),u=sE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function LD(e){let{width:t,height:n}=yD(e);return{width:t,height:n}}function RD(e,t,n){let r=eD(t),i=ZE(t),a=n===`fixed`,o=TD(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uE(0);if((r||!a)&&((YE(t)!==`body`||nD(i))&&(s=mD(t)),r)){let e=TD(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=ED(i));let l=i&&!r&&!a?DD(i,s):uE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function zD(e){return pD(e).position===`static`}function BD(e,t){if(!eD(e)||pD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ZE(e)===n&&(n=n.ownerDocument.body),n}function VD(e,t){let n=XE(e);if(iD(e))return n;if(!eD(e)){let t=hD(e);for(;t&&!fD(t);){if($E(t)&&!zD(t))return t;t=hD(t)}return n}let r=BD(e,t);for(;r&&rD(r)&&zD(r);)r=BD(r,t);return r&&fD(r)&&zD(r)&&!lD(r)?n:r||uD(e)||n}var HD=async function(e){let t=this.getOffsetParent||VD,n=this.getDimensions,r=await n(e.floating);return{reference:RD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UD(e){return pD(e).direction===`rtl`}var WD={convertOffsetParentRelativeRectToViewportRelativeRect:OD,getDocumentElement:ZE,getClippingRect:ID,getOffsetParent:VD,getElementRects:HD,getClientRects:kD,getDimensions:LD,getScale:xD,isElement:$E,isRTL:UD};function GD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KD(e,t,n){let r=null,i,a=ZE(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=lE(d),h=lE(a.clientWidth-(u+f)),g=lE(a.clientHeight-(d+p)),_=lE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sE(0,oE(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!GD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=XE(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function qD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bD(e),u=i||a?[...l?_D(l):[],...t?_D(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?KD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?TD(e):null;c&&g();function g(){let t=TD(e);h&&!GD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var JD=WE,YD=GE,XD=RE,ZD=qE,QD=VE,$D=LE,eO=KE,tO=(e,t,n)=>{let r=new Map,i=n??{},a={...WD,...i.platform,_c:r};return IE(e,t,{...i,platform:a})};function nO(e){return typeof e==`function`?e():e}function rO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iO(e,t){let n=rO(e);return Math.round(t*n)/n}function aO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function oO(e){let t=e.whileElementsMounted,n=M(()=>nO(e.open)??!0),r=M(()=>nO(e.middleware)),i=M(()=>nO(e.transform)??!0),a=M(()=>nO(e.placement)??`bottom`),o=M(()=>nO(e.strategy)??`absolute`),s=M(()=>nO(e.sideOffset)??0),c=M(()=>nO(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Vb(null),p=N(_r(z(o))),m=N(_r(z(a))),h=N(_r({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?iO(f.current,z(u)):z(u),t=f.current?iO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&rO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;tO(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(sO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return Lr(()=>{t===void 0&&z(n)&&x()}),Lr(C),Lr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),Lr(w),Lr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function sO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var cO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},lO=new lS(`Floating.Root`),uO=new lS(`Floating.Content`),dO=new lS(`Floating.Root`),fO=class e{static create(t=!1){return t?dO.set(new e):lO.set(new e)}constructor(){x(this,`anchorNode`,Vb(null)),x(this,`customAnchorNode`,Vb(null)),x(this,`triggerNode`,Vb(null)),Lr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},pO=new WeakMap,mO=new WeakMap,hO=new WeakMap,gO=new WeakMap,_O=new WeakMap,vO=new WeakMap,yO=new WeakMap,bO=new WeakMap,xO=new WeakMap,SO=new WeakMap,CO=new WeakMap,wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=new WeakMap,FO=new WeakMap,IO=new WeakMap,LO=class e{static create(t,n=!1){return n?uO.set(new e(t,dO.get())):uO.set(new e(t,lO.get()))}get hasExplicitBoundaries(){return z(j(bO,this))}set hasExplicitBoundaries(e){P(j(bO,this),e)}get detectOverflowOptions(){return z(j(xO,this))}set detectOverflowOptions(e){P(j(xO,this),e)}get middleware(){return z(j(EO,this))}set middleware(e){P(j(EO,this),e)}get placedSide(){return z(j(DO,this))}set placedSide(e){P(j(DO,this),e)}get placedAlign(){return z(j(OO,this))}set placedAlign(e){P(j(OO,this),e)}get arrowX(){return z(j(kO,this))}set arrowX(e){P(j(kO,this),e)}get arrowY(){return z(j(AO,this))}set arrowY(e){P(j(AO,this),e)}get cannotCenterArrow(){return z(j(jO,this))}set cannotCenterArrow(e){P(j(jO,this),e)}get contentZIndex(){return z(j(MO,this))}set contentZIndex(e){P(j(MO,this),e,!0)}get arrowBaseSide(){return z(j(NO,this))}set arrowBaseSide(e){P(j(NO,this),e)}get wrapperProps(){return z(j(PO,this))}set wrapperProps(e){P(j(PO,this),e)}get props(){return z(j(FO,this))}set props(e){P(j(FO,this),e)}get arrowStyle(){return z(j(IO,this))}set arrowStyle(e){P(j(IO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Vb(null)),x(this,`wrapperRef`,Vb(null)),x(this,`arrowRef`,Vb(null)),x(this,`contentAttachment`,VS(this.contentRef)),x(this,`wrapperAttachment`,VS(this.wrapperRef)),x(this,`arrowAttachment`,VS(this.arrowRef)),x(this,`arrowId`,Vb(FT())),O(this,pO,M(()=>{if(typeof this.opts.style==`string`)return mx(this.opts.style);if(!this.opts.style)return{}})),O(this,mO,void 0),O(this,hO,new CS(()=>this.arrowRef.current??void 0)),O(this,gO,M(()=>j(hO,this)?.width??0)),O(this,_O,M(()=>j(hO,this)?.height??0)),O(this,vO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,yO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,bO,M(()=>z(j(yO,this)).length>0)),O(this,xO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(yO,this)).filter(nC),altBoundary:this.hasExplicitBoundaries}))),O(this,SO,N(void 0)),O(this,CO,N(void 0)),O(this,wO,N(void 0)),O(this,TO,N(void 0)),O(this,EO,M(()=>[JD({mainAxis:this.opts.sideOffset.current+z(j(_O,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&YD({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?eO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&XD({...this.detectOverflowOptions}),ZD({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(SO,this),t,!0),P(j(CO,this),n,!0),P(j(wO,this),r,!0),P(j(TO,this),i,!0)}}),this.arrowRef.current&&$D({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),zO({arrowWidth:z(j(gO,this)),arrowHeight:z(j(_O,this))}),this.opts.hideWhenDetached.current&&QD({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,DO,M(()=>VO(this.floating.placement))),O(this,OO,M(()=>HO(this.floating.placement))),O(this,kO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,AO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,jO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,MO,N()),O(this,NO,M(()=>cO[this.placedSide])),O(this,PO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(SO,this))}px`,"--bits-floating-available-height":`${z(j(CO,this))}px`,"--bits-floating-anchor-width":`${z(j(wO,this))}px`,"--bits-floating-anchor-height":`${z(j(TO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(pO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,FO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:yx({...z(j(pO,this))}),...this.contentAttachment}))),O(this,IO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(mO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),fS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=oO({strategy:()=>this.opts.strategy.current,placement:()=>z(j(vO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>qD(...e,{animationFrame:j(mO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Lr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),fS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=LS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),Lr(()=>{this.floating.floating.current=this.wrapperRef.current})}},RO=class e{static create(t,n=!1){return n?new e(t,dO.get()):new e(t,lO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Bb(e.virtualEl.current):e.ref}};function zO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=BO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function BO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function VO(e){return BO(e)[0]}function HO(e){return BO(e)[1]}function UO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);fO.create(n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function WO(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);RO.create({id:Rb(()=>t.id),virtualEl:Rb(()=>t.virtualEl),ref:t.ref},n());var r=la();La(I(r),()=>t.children??p),H(e,r),at()}function GO(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,FT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=LO.create({side:Rb(()=>n()),sideOffset:Rb(()=>r()),align:Rb(()=>i()),alignOffset:Rb(()=>a()),id:Rb(()=>t.id),arrowPadding:Rb(()=>o()),avoidCollisions:Rb(()=>s()),collisionBoundary:Rb(()=>c()),collisionPadding:Rb(()=>l()),hideWhenDetached:Rb(()=>u()),onPlaced:Rb(()=>d()),sticky:Rb(()=>f()),updatePositionStrategy:Rb(()=>m()),strategy:Rb(()=>h()),dir:Rb(()=>g()),style:Rb(()=>_()),enabled:Rb(()=>t.enabled),wrapperId:Rb(()=>v()),customAnchor:Rb(()=>y())},b()),S=M(()=>Sx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=la();La(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function KO(e,t){it(t,!0),Wo(()=>{t.onPlaced?.()});var n=la();La(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var qO=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function JO(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,qO);var i=la(),a=I(i),o=e=>{KO(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{GO(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var YO=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),XO=V(`<!> <!>`,1);function ZO(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,YO),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));JO(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=XO(),f=I(d),m=e=>{rE(e,{get preventScroll(){return z(u)}})},h=e=>{rE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),gT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;Zw(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Gw(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;NT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=la(),u=I(i);{let e=M(()=>({props:Sx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));La(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var QO=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function $O(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,QO);var c=la(),l=I(c),u=e=>{ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var ek=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function tk(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,ek);ZO(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function nk(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function rk(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function ik(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var ak=new WeakMap,ok=new WeakMap,sk=new WeakMap,ck=new WeakMap,lk=new WeakMap,uk=new WeakMap,dk=new WeakMap,fk=new WeakMap,pk=new WeakMap,mk=new WeakSet,hk=class{constructor(e){kt(this,mk),O(this,ak,void 0),O(this,ok,void 0),O(this,sk,void 0),O(this,ck,null),O(this,lk,null),O(this,uk,[]),O(this,dk,null),O(this,fk,null),O(this,pk,null),A(ak,this,e),A(ok,this,e.buffer??1);let t=e.transitIntentTimeout;A(sk,this,typeof t==`number`&&t>0?t:null),fS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(dk,this,null),k(mk,this,xk).call(this);return}return j(dk,this)&&j(dk,this)!==e&&k(mk,this,xk).call(this),A(dk,this,e),[Qi(IS(e),`pointermove`,n=>{k(mk,this,bk).call(this,[n.clientX,n.clientY],e,t)}),Qi(e,`pointerleave`,e=>{let n=e.relatedTarget;if($S(n)&&t.contains(n))return;let r=j(ak,this).ignoredTargets?.()??[];$S(n)&&r.some(e=>e===n||e.contains(n))||(A(uk,this,$S(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(ck,this,[e.clientX,e.clientY]),A(lk,this,`content`),k(mk,this,_k).call(this))}),Qi(e,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerenter`,()=>{k(mk,this,xk).call(this)}),Qi(t,`pointerleave`,t=>{let n=t.relatedTarget;$S(n)&&e.contains(n)||(A(ck,this,[t.clientX,t.clientY]),A(lk,this,`trigger`),k(mk,this,_k).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function gk(){j(fk,this)!==null&&(cancelAnimationFrame(j(fk,this)),A(fk,this,null))}function _k(){k(mk,this,gk).call(this),A(fk,this,requestAnimationFrame(()=>{A(fk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}))}function vk(){j(pk,this)!==null&&(clearTimeout(j(pk,this)),A(pk,this,null))}function yk(){j(sk,this)!==null&&(k(mk,this,vk).call(this),A(pk,this,window.setTimeout(()=>{A(pk,this,null),!(!j(ck,this)||!j(lk,this))&&(k(mk,this,xk).call(this),j(ak,this).onPointerExit())},j(sk,this))))}function bk(e,t,n){if(!j(ck,this)||!j(lk,this))return;k(mk,this,gk).call(this),k(mk,this,yk).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(lk,this)===`content`&&rk(e,i)){k(mk,this,xk).call(this);return}if(j(lk,this)===`trigger`&&rk(e,r)){k(mk,this,xk).call(this);return}if(j(lk,this)===`content`&&j(uk,this).length>0)for(let t of j(uk,this)){let n=t.getBoundingClientRect();if(rk(e,n))return;let i=ik(r,n),a=k(mk,this,Sk).call(this,r,n,i);if(a&&nk(e,a))return}let a=ik(r,i),o=k(mk,this,Sk).call(this,r,i,a);if(o&&nk(e,o))return;let s=j(lk,this)===`content`?i:r;nk(e,k(mk,this,Ck).call(this,j(ck,this),s,a,j(lk,this)))||(k(mk,this,xk).call(this),j(ak,this).onPointerExit())}function xk(){A(ck,this,null),A(lk,this,null),A(uk,this,[]),k(mk,this,gk).call(this),k(mk,this,vk).call(this)}function Sk(e,t,n){let r=j(ok,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function Ck(e,t,n,r){let i=j(ok,this)*4,[a,o]=e;switch(r===`trigger`?k(mk,this,wk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function wk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Tk=JS({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Ek=new lS(`Popover.Root`),Dk=new WeakMap,Ok=new WeakMap,kk=new WeakMap,Ak=new WeakMap,jk=new WeakMap,Mk=new WeakMap,Nk=new WeakMap,Pk=new WeakMap,Fk=new WeakMap,Ik=new WeakSet,Lk=class e{static create(t){return Ek.set(new e(t))}get contentNode(){return z(j(Dk,this))}set contentNode(e){P(j(Dk,this),e,!0)}get triggerNode(){return z(j(Ok,this))}set triggerNode(e){P(j(Ok,this),e,!0)}get overlayNode(){return z(j(kk,this))}set overlayNode(e){P(j(kk,this),e,!0)}get openedViaHover(){return z(j(Ak,this))}set openedViaHover(e){P(j(Ak,this),e,!0)}get hasInteractedWithContent(){return z(j(jk,this))}set hasInteractedWithContent(e){P(j(jk,this),e,!0)}get hoverCooldown(){return z(j(Mk,this))}set hoverCooldown(e){P(j(Mk,this),e,!0)}get closeDelay(){return z(j(Nk,this))}set closeDelay(e){P(j(Nk,this),e,!0)}constructor(e){kt(this,Ik),x(this,`opts`,void 0),O(this,Dk,N(null)),x(this,`contentPresence`,void 0),O(this,Ok,N(null)),O(this,kk,N(null)),x(this,`overlayPresence`,void 0),O(this,Ak,N(!1)),O(this,jk,N(!1)),O(this,Mk,N(!1)),O(this,Nk,N(0)),O(this,Pk,null),O(this,Fk,null),this.opts=e,this.contentPresence=new yC({ref:Rb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new yC({ref:Rb(()=>this.overlayNode),open:this.opts.open}),fS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(Ik,this,Rk).call(this))})}setDomContext(e){A(Fk,this,e)}toggleOpen(){k(Ik,this,Rk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(Ik,this,Rk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(Ik,this,Rk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(Ik,this,Rk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Fk,this)&&A(Pk,this,j(Fk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(Pk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(Ik,this,Rk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(Ik,this,Rk).call(this)}};function Rk(){j(Pk,this)!==null&&j(Fk,this)&&(j(Fk,this).clearTimeout(j(Pk,this)),A(Pk,this,null))}var zk=new WeakMap,Bk=new WeakMap,Vk=new WeakMap,Hk=new WeakSet,Uk=new WeakMap,Wk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){kt(this,Hk),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,zk,null),O(this,Bk,null),O(this,Vk,N(!1)),O(this,Uk,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":HS(this.root.opts.open.current),"data-state":US(this.root.opts.open.current),"aria-controls":k(Hk,this,Jk).call(this),[Tk.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new BS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),fS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||tC(e)||(P(j(Vk,this),!0),k(Hk,this,Kk).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(zk,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(zk,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(tC(e)||(P(j(Vk,this),!1),k(Hk,this,Gk).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k(Hk,this,qk).call(this),z(j(Vk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Vk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k(Hk,this,qk).call(this),this.root.toggleOpen())}get props(){return z(j(Uk,this))}set props(e){P(j(Uk,this),e)}};function Gk(){j(zk,this)!==null&&(this.domContext.clearTimeout(j(zk,this)),A(zk,this,null))}function Kk(){j(Bk,this)!==null&&(this.domContext.clearTimeout(j(Bk,this)),A(Bk,this,null))}function qk(){k(Hk,this,Gk).call(this),k(Hk,this,Kk).call(this)}function Jk(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var Yk=new WeakMap,Xk=new WeakMap,Zk=class e{static create(t){return new e(t,Ek.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!$S(e.target))return;let t=e.target.closest(Tk.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if($S(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,Yk,M(()=>({open:this.root.opts.open.current}))),O(this,Xk,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":US(this.root.opts.open.current),...WS(this.root.contentPresence.transitionStatus),[Tk.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=VS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new hk({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;$S(t)&&pw(t)&&this.root.markInteraction()}onpointerenter(e){tC(e)||this.root.cancelDelayedClose()}onpointerleave(e){tC(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(Yk,this))}set snippetProps(e){P(j(Yk,this),e)}get props(){return z(j(Xk,this))}set props(e){P(j(Xk,this),e)}},Qk=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),$k=V(`<div><div><!></div></div>`);function eA(e,t){let n=ua();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>SC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,xC),s=Z(t,`onCloseAutoFocus`,3,xC),c=Z(t,`onEscapeKeydown`,3,xC),l=Z(t,`onInteractOutside`,3,xC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,Qk),h=Zk.create({id:Rb(()=>i()),ref:Rb(()=>r(),e=>r(e)),onInteractOutside:Rb(()=>l()),onEscapeKeydown:Rb(()=>c()),customAnchor:Rb(()=>f())}),g=M(()=>Sx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=la(),b=I(y),x=e=>{tk(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{$O(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Sx(r(),{style:aO(`popover`)},{style:t.style}));var o=la(),s=I(o),c=e=>{var n=la(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));La(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=$k();Eo(n,()=>({...i()}));var r=F(n);Eo(r,()=>({...z(a)})),La(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var tA=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),nA=V(`<button><!></button>`);function rA(e,t){let n=ua();it(t,!0);let r=Z(t,`id`,19,()=>SC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,tA),d=Wk.create({id:Rb(()=>r()),ref:Rb(()=>i(),e=>i(e)),disabled:Rb(()=>!!o()),openOnHover:Rb(()=>s()),openDelay:Rb(()=>c()),closeDelay:Rb(()=>l())}),f=M(()=>Sx(u,d.props,{type:a()}));WO(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=la(),i=I(r),a=e=>{var n=la();La(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=nA();Eo(n,()=>({...z(f)})),La(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function iA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,xC),i=Z(t,`onOpenChangeComplete`,3,xC);Lk.create({open:Rb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Rb(()=>i())}),UO(e,{children:(e,n)=>{var r=la();La(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var aA=V(`<!> `,1),oA=V(`<button type="button"> <!></button>`),sA=V(`<button type="button"> </button>`),cA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),lA=V(`<!> <!>`,1);function uA(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-9e5,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e!==null&&r!==null&&(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=la();Ra(I(f),()=>iA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=lA(),o=I(r);{let e=M(()=>$(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));Ra(o,()=>rA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=aA(),i=I(r);Np(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Ts(t.selection)]),H(e,r)},$$slots:{default:!0}})})}Ra(L(o,2),()=>jC,(e,n)=>{n(e,{children:(e,n)=>{var r=la();Ra(I(r),()=>eA,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=cA(),o=I(r);G(o,21,()=>ys,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=oA(),a=F(i),o=L(a),c=e=>{xp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K($(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));xo(f),D(d);var p=L(d,2),m=L(F(p));xo(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=sA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,Hu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K($(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Hu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>Hu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Fg(Hu.value),()=>K($(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),Ao(f,()=>z(i),e=>P(i,e)),Ao(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}ea([`click`]);var dA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function fA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=la(),a=I(i),o=e=>{var n=dA(),i=F(n);ap(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K($(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}ea([`click`]);async function pA(e,t){try{let n=await t.fetch(`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function mA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return gA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function hA(e,t){let n=await mA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function gA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function _A(e,t){let n=await mA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function vA(e,t){let n=await mA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function yA(e,t){let n=await mA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function bA(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function xA(e){return!Object.values(e.reasons).some(Boolean)}function SA(e){return xA(e)?0:e.pending}function CA(e,t){switch(t.type){case`query-changed`:return wA(e,`query`,t.query.trim().length>0);case`scrolled`:return wA(e,`scrolled`,!t.atTop);case`row-selected`:return wA(e,`selected`,!0);case`row-deselected`:return wA(e,`selected`,!1);case`window-changed`:return wA(e,`window`,t.bounded);case`arrived`:return xA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return bA()}}function wA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return xA(r)&&(r.pending=0),r}var TA={run:async(e,t)=>{let n=await hA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},EA={run:async(e,t)=>{let n=await _A(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},DA=200,OA=100;function kA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??DA,i=e.pageSize??OA,a=new rs(``),o=ml,s=new rs([]),c=new rs([]),l=new rs(null),u=new rs(!1),d=new rs(!1),f=new rs(null),p=new rs(bA()),m=0,h=null,g=null;function _(e){p.value=CA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=Cs(o.value,n()),v=await t.run({query:a.value,window:ks(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return xA(p.value)},get pending(){return SA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!ws(Cs(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),xA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function AA(e){return kA(e,TA)}function jA(e){return kA(e,EA)}function MA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function NA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function PA(e,t){return e>t-1?t-1:e}function FA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function IA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>PA(z(a),t())),s=e=>{t()!==0&&(P(a,FA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{NA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var LA=V(`<button><span class="truncate"> </span> <!></button>`),RA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),zA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),BA=V(`<span class="text-xs font-normal text-accent"> </span>`),VA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors" title="Export selected traces"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors" title="Delete selected traces"><!> Delete</button></div>`),HA=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),UA=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),WA=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),GA=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
12
- usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),KA=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),qA=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),JA=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),YA=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function XA(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=LA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=la(),n=I(t),r=e=>{ap(e,{size:11,class:`flex-shrink-0`})},i=e=>{$f(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K($(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Vl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>hg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=zA(),c=M(()=>bg(()=>Nu(t().traceId))),l=F(s),u=F(l);xo(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{kp(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,RA())};W(b,e=>{t().partial&&e(x)}),Q_(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),Dp(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),Co(u,n()),q(d,1,i),oo(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K($(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K($(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>ad(t().duration),()=>od(t().startTime),()=>K($(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Nu(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>du(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Ll(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:R_(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>Kl.value),o=M(()=>vl.value),s=M(()=>Ml.value),c=M(()=>lu.value),l=M(()=>wl.value),u=M(()=>Dl.value),d=M(()=>uu.value),f=M(()=>hu.value),m=M(()=>Nl.value),h=M(()=>Pl.value),g=M(()=>Fl.value),_=M(()=>Il.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Ll}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);Lr(()=>{if(z(c))return;let e=e=>{if(!($c.value||z(x))){if(e.key===`/`&&!yg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?pu():document.activeElement===z(b)&&(Nl.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!yg()&&(e.preventDefault(),fu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=AA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}Lr(()=>()=>C.dispose());let T=N(null),ee=N(_r([]));Lr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),pA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Nl.value?C.setText(Nl.value):C.refresh())});let te=N(0);Lr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),Lr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=IA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Nu(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Ry(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),mu()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=la(),de=I(ue),fe=e=>{ib(e,{get trace(){return z(c)}})},pe=e=>{var t=YA(),i=F(t),o=F(i),s=F(o);Up(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=BA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=VA(),n=F(t),r=F(n);qp(r,{size:12});var i=L(r);D(n);var a=L(n,2);Vh(F(a),{size:12}),Ke(),D(a),D(t),R(()=>U(i,` Export (${z(f)??``})`)),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(S)&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{ah(e,{size:12})},ue=e=>{th(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=HA();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);qh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=UA();qp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Ry(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);jp(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);jb(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Nl.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);uA(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);fA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Nl.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;co(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);gb(e,{get facets(){return z(t)},get onClearAll(){return Rl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);xo(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,WA())},Pe=e=>{H(e,GA())},Fe=e=>{H(e,KA())},Ie=e=>{var t=JA(),i=F(t),a=F(i),o=F(a);xo(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=qA(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),Co(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?pu():fu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Vo(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{Og(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=Uy(await Ky(e));return t.success&&t.traces.length>0?(Vu(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,so(Se,z(h))),So(Ae,z(g)||``)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Du?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>el(_g)),B(`change`,Se,e=>Pl.value=e.currentTarget.value),B(`input`,Ae,e=>Fl.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}ea([`click`,`keydown`,`change`,`input`]);var ZA=(e,t=p,n=p,r=p)=>{let i=M(t);var a=QA(),o=F(a);Ra(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},QA=V(`<span><!> </span>`),$A=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),ej=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
1
+ var AutotelDevtools=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Array.isArray,n=Array.prototype.indexOf,r=Array.prototype.includes,i=Array.from,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,c=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,d=Object.isExtensible;function f(e){return typeof e==`function`}var p=()=>{};function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}function v(e){"@babel/helpers - typeof";return v=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},v(e)}function y(e,t){if(v(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(v(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){var t=y(e,`string`);return v(t)==`symbol`?t:t+``}function x(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=1<<24,C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,E=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=Symbol(`form reset`),ye=new class extends Error{constructor(...e){super(...e),x(this,`name`,`StaleReactionError`),x(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},be=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function xe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Se(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ce(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function we(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Te(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ee(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function De(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},Pe=Symbol(`uninitialized`),Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Ve=!1;function He(e){Ve=e}var Ue;function We(e){if(e===null)throw Re(),Ne;return Ue=e}function Ge(){return We(Dr(Ue))}function D(e){if(Ve){if(Dr(Ue)!==null)throw Re(),Ne;Ue=e}}function Ke(e=1){if(Ve){for(var t=e,n=Ue;t--;)n=Dr(n);Ue=n}}function qe(e=!0){for(var t=0,n=Ue;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Dr(n);e&&n.remove(),n=i}}function Je(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ye(e){return e===this.v}function Xe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ze(e){return!Xe(e,this.v)}var Qe=null;function $e(e){Qe=e}function et(e){return st(`getContext`).get(e)}function tt(e,t){return st(`setContext`).set(e,t),t}function nt(e){return st(`hasContext`).has(e)}function rt(){return st(`getAllContexts`)}function it(e,t=!1,n){Qe={p:Qe,i:!1,c:null,e:null,s:e,x:null,r:fi,l:null}}function at(e){var t=Qe,n=t.e;if(n!==null){t.e=null;for(var r of n)Rr(r)}return e!==void 0&&(t.x=e),t.i=!0,Qe=t.p,e??{}}function ot(){return!0}function st(e){var t;return Qe===null&&xe(e),(t=Qe).c??(t.c=new Map(ct(Qe)||void 0))}function ct(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var lt=[];function ut(){var e=lt;lt=[],m(e)}function dt(e){if(lt.length===0&&!Tn){var t=lt;queueMicrotask(()=>{t===lt&&ut()})}lt.push(e)}function ft(){for(;lt.length>0;)ut()}function pt(e){var t=fi;if(t===null)return li.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ht=~(w|T|C);function gt(e,t){e.f=e.f&ht|t}function _t(e){e.f&512||e.deps===null?gt(e,C):gt(e,T)}function vt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,vt(t.deps))}function yt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),vt(e.deps),gt(e,C)}var bt=!1;function xt(e){var t=bt;try{return bt=!1,[e(),bt]}finally{bt=t}}function St(e,t){if(t){let t=document.body;e.autofocus=!0,dt(()=>{document.activeElement===t&&e.focus()})}}var Ct=!1;function wt(){Ct||(Ct=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[ve]?.()})},{capture:!0}))}function Tt(e){var t=li,n=fi;di(null),pi(null);try{return e()}finally{di(t),pi(n)}}function Et(e,t,n,r=n){e.addEventListener(t,()=>Tt(n));let i=e[ve];e[ve]=i?()=>{i(),r(!0)}:()=>r(!0),wt()}function Dt(e){let t=0,n=dr(0),r;return()=>{Fr()&&(z(n),Wr(()=>(t===0&&(r=Pi(()=>e(()=>hr(n)))),t+=1,()=>{dt(()=>{--t,t===0&&(r?.(),r=void 0,hr(n))})})))}}function Ot(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function kt(e,t){Ot(e,t),t.add(e)}function O(e,t,n){Ot(e,t),t.set(e,n)}function k(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function A(e,t,n){return e.set(k(e,t),n),n}function j(e,t){return e.get(k(e,t))}var At=ie|ae;function jt(e,t,n,r){new Yt(e,t,n,r)}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Ut=new WeakMap,Wt=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakSet,Yt=class{constructor(e,t,n,r){kt(this,Jt),x(this,`parent`,void 0),x(this,`is_pending`,!1),x(this,`transform_error`,void 0),O(this,Mt,void 0),O(this,Nt,Ve?Ue:null),O(this,Pt,void 0),O(this,Ft,void 0),O(this,It,void 0),O(this,Lt,null),O(this,Rt,null),O(this,zt,null),O(this,Bt,null),O(this,Vt,0),O(this,Ht,0),O(this,Ut,!1),O(this,Wt,new Set),O(this,Gt,new Set),O(this,Kt,null),O(this,qt,Dt(()=>(A(Kt,this,dr(j(Vt,this))),()=>{A(Kt,this,null)}))),A(Mt,this,e),A(Pt,this,t),A(Ft,this,e=>{var t=fi;t.b=this,t.f|=128,n(e)}),this.parent=fi.b,this.transform_error=r??this.parent?.transform_error??(e=>e),A(It,this,Gr(()=>{if(Ve){let e=j(Nt,this);Ge();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));k(Jt,this,Zt).call(this,t)}else t?k(Jt,this,$t).call(this):k(Jt,this,Xt).call(this)}else k(Jt,this,en).call(this)},At)),Ve&&A(Mt,this,Ue)}defer_effect(e){yt(e,j(Wt,this),j(Gt,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!j(Pt,this).pending}update_pending_count(e,t){k(Jt,this,rn).call(this,e,t),A(Vt,this,j(Vt,this)+e),!(!j(Kt,this)||j(Ut,this))&&(A(Ut,this,!0),dt(()=>{A(Ut,this,!1),j(Kt,this)&&pr(j(Kt,this),j(Vt,this))}))}get_effect_pending(){return j(qt,this).call(this),z(j(Kt,this))}error(e){if(!j(Pt,this).onerror&&!j(Pt,this).failed)throw e;xn?.is_fork?(j(Lt,this)&&xn.skip_effect(j(Lt,this)),j(Rt,this)&&xn.skip_effect(j(Rt,this)),j(zt,this)&&xn.skip_effect(j(zt,this)),xn.oncommit(()=>{k(Jt,this,an).call(this,e)})):k(Jt,this,an).call(this,e)}};function Xt(){try{A(Lt,this,qr(()=>j(Ft,this).call(this,j(Mt,this))))}catch(e){this.error(e)}}function Zt(e){let t=j(Pt,this).failed,{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);dt(r),t&&A(zt,this,qr(()=>{t(j(Mt,this),()=>e,()=>n)}))}function Qt(e){var t=!1,n=!1;let r=()=>{if(t){Be();return}t=!0,n&&Me(),j(zt,this)!==null&&ei(j(zt,this),()=>{A(zt,this,null)}),k(Jt,this,nn).call(this,()=>{k(Jt,this,en).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,j(Pt,this).onerror?.(e,r),n=!1}catch(e){mt(e,j(It,this)&&j(It,this).parent)}}}}function $t(){let e=j(Pt,this).pending;e&&(this.is_pending=!0,A(Rt,this,qr(()=>e(j(Mt,this)))),dt(()=>{var e=A(Bt,this,document.createDocumentFragment()),t=Tr();e.append(t),A(Lt,this,k(Jt,this,nn).call(this,()=>qr(()=>j(Ft,this).call(this,t)))),j(Ht,this)===0&&(j(Mt,this).before(e),A(Bt,this,null),ei(j(Rt,this),()=>{A(Rt,this,null)}),k(Jt,this,tn).call(this,xn))}))}function en(){try{if(this.is_pending=this.has_pending_snippet(),A(Ht,this,0),A(Vt,this,0),A(Lt,this,qr(()=>{j(Ft,this).call(this,j(Mt,this))})),j(Ht,this)>0){var e=A(Bt,this,document.createDocumentFragment());ii(j(Lt,this),e);let t=j(Pt,this).pending;A(Rt,this,qr(()=>t(j(Mt,this))))}else k(Jt,this,tn).call(this,xn)}catch(e){this.error(e)}}function tn(e){this.is_pending=!1,e.transfer_effects(j(Wt,this),j(Gt,this))}function nn(e){var t=fi,n=li,r=Qe;pi(j(It,this)),di(j(It,this)),$e(j(It,this).ctx);try{return qn.ensure(),e()}catch(e){return pt(e),null}finally{pi(t),di(n),$e(r)}}function rn(e,t){if(!this.has_pending_snippet()){if(this.parent){var n;k(Jt,n=this.parent,rn).call(n,e,t)}return}A(Ht,this,j(Ht,this)+e),j(Ht,this)===0&&(k(Jt,this,tn).call(this,t),j(Rt,this)&&ei(j(Rt,this),()=>{A(Rt,this,null)}),j(Bt,this)&&(j(Mt,this).before(j(Bt,this)),A(Bt,this,null)))}function an(e){j(Lt,this)&&(Zr(j(Lt,this)),A(Lt,this,null)),j(Rt,this)&&(Zr(j(Rt,this)),A(Rt,this,null)),j(zt,this)&&(Zr(j(zt,this)),A(zt,this,null)),Ve&&(We(j(Nt,this)),Ke(),We(qe()));let t=j(Pt,this).failed,n=e=>{let{reset:n,invoke_onerror:r}=k(Jt,this,Qt).call(this,e);r(),t&&A(zt,this,k(Jt,this,nn).call(this,()=>{try{return qr(()=>{var r=fi;r.b=this,r.f|=128,t(j(Mt,this),()=>e,()=>n)})}catch(e){return mt(e,j(It,this).parent),null}}))};dt(()=>{var t;try{t=this.transform_error(e)}catch(e){mt(e,j(It,this)&&j(It,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>mt(e,j(It,this)&&j(It,this).parent)):n(t)})}function on(e,t,n,r){let i=ot()?un:pn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=fi,c=sn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){mt(e,s)}cn()}}var d=ln();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>fn(e))).then(u).catch(e=>mt(e,s)).finally(d)}l?l.then(()=>{c(),f(),cn()}):f()}function sn(){var e=fi,t=li,n=Qe,r=xn;return function(i=!0){pi(e),di(t),$e(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function cn(e=!0){pi(null),di(null),$e(null),e&&xn?.deactivate()}function ln(){var e=fi,t=e.b,n=xn,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function un(e){var t=2|w;return fi!==null&&(fi.f|=ae),{ctx:Qe,deps:null,effects:null,equals:Ye,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:fi,ac:null}}var dn=Symbol(`obsolete`);function fn(e,t,n){let r=fi;r===null&&Se();var i=void 0,a=dr(Pe),o=!li,s=new Set;return Ur(()=>{var t=fi,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ye&&n.reject(e)}).finally(cn)}catch(e){n.reject(e),cn()}var c=xn;if(o){if(t.f&32768)var l=ln();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(dn);else for(let e of s.values())e.reject(dn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==dn&&(c.activate(),t?(a.f|=ue,pr(a,t)):(a.f&8388608&&(a.f^=ue),pr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ir(()=>{for(let e of s)e.reject(dn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=un(e);return hi(t),t}function pn(e){let t=un(e);return t.equals=Ze,t}function mn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Zr(t[n])}}function hn(e){var t,n=fi,r=e.parent;if(!si&&r!==null&&e.v!==Pe&&r.f&24576)return Le(),e.v;pi(r);try{e.f&=~ce,mn(e),t=Di(e)}finally{pi(n)}return t}function gn(e){var t=hn(e);if(!e.equals(t)&&(e.wv=wi(),(!xn?.is_fork||e.deps===null)&&(xn===null?e.v=t:(xn.capture(e,t,!0),Sn?.capture(e,t,!0)),e.deps===null))){gt(e,C);return}si||(Cn===null?_t(e):(Fr()||xn?.is_fork)&&Cn.set(e,t))}function _n(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Tt(()=>{t.ac.abort(ye),t.ac=null}),t.fn!==null&&(t.teardown=p),ki(t,0),Yr(t))}function vn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Ai(t)}var yn,bn=null,xn=null,Sn=null,Cn=null,wn=null,Tn=!1,En=!1,Dn=null,On=null,kn=0,An=1,jn=new WeakMap,Mn=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap,Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakSet,qn=class e{constructor(){kt(this,Kn),x(this,`id`,An++),O(this,jn,!1),x(this,`linked`,!0),O(this,Mn,null),O(this,Nn,null),x(this,`async_deriveds`,new Map),x(this,`current`,new Map),x(this,`previous`,new Map),O(this,Pn,new Set),O(this,Fn,new Set),O(this,In,0),O(this,Ln,new Map),O(this,Rn,null),O(this,zn,[]),O(this,Bn,[]),O(this,Vn,new Set),O(this,Hn,new Set),O(this,Un,new Map),O(this,Wn,new Set),x(this,`is_fork`,!1),O(this,Gn,!1),bn===null?bn=this:(A(Nn,bn,this),A(Mn,this,bn)),bn=this}skip_effect(e){j(Un,this).has(e)||j(Un,this).set(e,{d:[],m:[]}),j(Wn,this).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=j(Un,this).get(e);if(n){j(Un,this).delete(e);for(var r of n.d)gt(r,w),t(r);for(r of n.m)gt(r,T),t(r)}j(Wn,this).add(e)}capture(e,t,n=!1){e.v!==Pe&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Cn?.set(e,t)),this.is_fork||(e.v=t)}activate(){xn=this}deactivate(){xn=null,Cn=null}flush(){try{En=!0,xn=this,k(Kn,this,Yn).call(this)}finally{kn=0,wn=null,Dn=null,On=null,En=!1,xn=null,Cn=null,lr.clear()}}discard(){for(let e of j(Fn,this))e(this);j(Fn,this).clear();for(let e of this.async_deriveds.values())e.reject(dn);k(Kn,this,er).call(this),j(Rn,this)?.resolve()}register_created_effect(e){j(Bn,this).push(e)}increment(e,t){if(A(In,this,j(In,this)+1),e){let e=j(Ln,this).get(t)??0;j(Ln,this).set(t,e+1)}}decrement(e,t){if(A(In,this,j(In,this)-1),e){let e=j(Ln,this).get(t)??0;e===1?j(Ln,this).delete(t):j(Ln,this).set(t,e-1)}j(Gn,this)||(A(Gn,this,!0),dt(()=>{A(Gn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)j(Vn,this).add(t);for(let e of t)j(Hn,this).add(e);e.clear(),t.clear()}oncommit(e){j(Pn,this).add(e)}ondiscard(e){j(Fn,this).add(e)}settled(){return(j(Rn,this)??A(Rn,this,h())).promise}static ensure(){if(xn===null){let t=xn=new e;!En&&!Tn&&dt(()=>{j(jn,t)||t.flush()})}return xn}apply(){Cn=null}schedule(e){if(wn=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Dn!==null&&t===fi&&(li===null||!(li.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=C}}j(zn,this).push(t)}};yn=qn;function Jn(){if(this.is_fork)return!0;for(let n of j(Ln,this).keys()){for(var e=n,t=!1;e.parent!==null;){if(j(Un,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Yn(){A(jn,this,!0),kn++>1e3&&(k(Kn,this,er).call(this),nr());for(let e of j(Vn,this))j(Hn,this).delete(e),gt(e,w),this.schedule(e);for(let e of j(Hn,this))gt(e,T),this.schedule(e);let e=j(zn,this);A(zn,this,[]),this.apply();var t=Dn=[],n=[],r=On=[];for(let r of e)try{k(Kn,this,Xn).call(this,r,t,n)}catch(e){throw sr(r),k(Kn,this,Jn).call(this)||this.discard(),e}if(xn=null,r.length>0){var i=yn.ensure();for(let e of r)i.schedule(e)}if(Dn=null,On=null,k(Kn,this,Jn).call(this)){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t);for(let[e,t]of j(Un,this))or(e,t);r.length>0&&k(Kn,xn,Yn).call(xn);return}let a=k(Kn,this,Zn).call(this);if(a){k(Kn,this,$n).call(this,n),k(Kn,this,$n).call(this,t),k(Kn,a,Qn).call(a,this);return}j(Vn,this).clear(),j(Hn,this).clear();for(let e of j(Pn,this))e(this);j(Pn,this).clear(),Sn=this,ir(n),ir(t),Sn=null,j(Rn,this)?.resolve();var o=xn;if(j(In,this)===0&&(j(zn,this).length===0||o!==null)&&k(Kn,this,er).call(this),j(zn,this).length>0){if(o!==null){let e=o;j(zn,e).push(...j(zn,this).filter(t=>!j(zn,e).includes(t)))}else o=this}o!==null&&k(Kn,o,Yn).call(o)}function Xn(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||j(Un,this).has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):Ti(r)&&(i&16&&j(Hn,this).add(r),Ai(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}function Zn(){for(var e=j(Mn,this);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=j(Mn,e)}return null}function Qn(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(j(Vn,e),j(Hn,e));let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(j(Hn,this).delete(i),gt(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),k(Kn,e,er).call(e),xn=this,k(Kn,this,Yn).call(this)}function $n(e){for(var t=0;t<e.length;t+=1)yt(e[t],j(Vn,this),j(Hn,this))}function er(){if(this.linked){var e=j(Mn,this),t=j(Nn,this);e===null||A(Nn,e,t),t===null?bn=e:A(Mn,t,e),this.linked=!1}}function tr(e){var t=Tn;Tn=!0;try{var n;for(e&&(xn!==null&&!xn.is_fork&&xn.flush(),n=e());;){if(ft(),xn===null)return n;xn.flush()}}finally{Tn=t}}function nr(){try{De()}catch(e){mt(e,wn)}}var rr=null;function ir(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ti(r)&&(rr=new Set,Ai(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$r(r),rr?.size>0)){lr.clear();for(let e of rr){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)rr.has(n)&&(rr.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Ai(n)}}rr.clear()}}rr=null}}function ar(e){xn.schedule(e)}function or(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),gt(e,C);for(var n=e.first;n!==null;)or(n,t),n=n.next}}function sr(e){gt(e,C);for(var t=e.first;t!==null;)sr(t),t=t.next}var cr=new Set,lr=new Map,ur=!1;function dr(e,t){return{f:0,v:e,reactions:null,equals:Ye,rv:0,wv:0}}function N(e,t){let n=dr(e,t);return hi(n),n}function fr(e,t=!1,n=!0){let r=dr(e);return t||(r.equals=Ze),r}function P(e,t,n=!1){return li!==null&&(!ui||li.f&131072)&&ot()&&li.f&4325394&&(mi===null||!mi.has(e))&&je(),pr(e,n?_r(t):t,On)}function pr(e,t,n=null){if(!e.equals(t)){lr.set(e,si?t:e.v);var r=qn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&hn(t),Cn===null&&_t(t)}e.wv=wi(),gr(e,w,n),ot()&&fi!==null&&fi.f&1024&&!(fi.f&96)&&(vi===null?yi([e]):vi.push(e)),!r.is_fork&&cr.size>0&&!ur&&mr()}return t}function mr(){ur=!1;for(let e of cr){e.f&1024&&gt(e,T);let t;try{t=Ti(e)}catch{t=!0}t&&Ai(e)}cr.clear()}function hr(e){P(e,e.v+1)}function gr(e,t,n){var r=e.reactions;if(r!==null)for(var i=ot(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===fi)){var l=(c&w)===0;if(l&&gt(s,t),c&131072)cr.add(s);else if(c&2){var u=s;Cn?.delete(u),c&65536||(c&512&&(fi===null||!(fi.f&2097152))&&(s.f|=ce),gr(u,T,n))}else if(l){var d=s;c&16&&rr!==null&&rr.add(d),n===null?ar(d):n.push(d)}}}}function _r(e){if(typeof e!=`object`||!e||de in e)return e;let n=u(e);if(n!==c&&n!==l)return e;var r=new Map,i=t(e),a=N(0),s=null,d=Si,f=e=>{if(Si===d)return e();var t=li,n=Si;di(null),Ci(d);var r=e();return di(t),Ci(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(Pe,s));r.set(t,e),hr(a)}}else P(n,Pe),hr(a);return!0},get(t,n,i){if(n===de)return e;var a=r.get(n),c=n in t;if(a===void 0&&(!c||o(t,n)?.writable)&&(a=f(()=>N(_r(c?t[n]:Pe),s)),r.set(n,a)),a!==void 0){var l=z(a);return l===Pe?void 0:l}return Reflect.get(t,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=z(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==Pe)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===de)return!0;var n=r.get(t),i=n!==void 0&&n.v!==Pe||Reflect.has(e,t);return(n!==void 0||fi!==null&&(!i||o(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?_r(e[t]):Pe,s)),r.set(t,n)),z(n)===Pe)?!1:i},set(e,t,n,c){var l=r.get(t),u=t in e;if(i&&t===`length`)for(var d=n;d<l.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(Pe,s)),r.set(d+``,p)):P(p,Pe)}if(l===void 0)(!u||o(e,t)?.writable)&&(l=f(()=>N(void 0,s)),P(l,_r(n)),r.set(t,l));else{u=l.v!==Pe;var m=f(()=>_r(n));P(l,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(c,n),!u){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}hr(a)}return!0},ownKeys(e){z(a);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==Pe});for(var[n,i]of r)i.v!==Pe&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function vr(e){try{if(typeof e==`object`&&e&&de in e)return e[de]}catch{}return e}function yr(e,t){return Object.is(vr(e),vr(t))}var br,xr,Sr,Cr;function wr(){if(br===void 0){br=window,xr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Sr=o(t,`firstChild`).get,Cr=o(t,`nextSibling`).get,d(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),d(n)&&(n[_e]=void 0)}}function Tr(e=``){return document.createTextNode(e)}function Er(e){return Sr.call(e)}function Dr(e){return Cr.call(e)}function F(e,t){if(!Ve)return Er(e);var n=Er(Ue);if(n===null)n=Ue.appendChild(Tr());else if(t&&n.nodeType!==3){var r=Tr();return n?.before(r),We(r),r}return t&&jr(n),We(n),n}function I(e,t=!1){if(!Ve){var n=Er(e);return n instanceof Comment&&n.data===``?Dr(n):n}if(t){if(Ue?.nodeType!==3){var r=Tr();return Ue?.before(r),We(r),r}jr(Ue)}return Ue}function L(e,t=1,n=!1){let r=Ve?Ue:e;for(var i;t--;)i=r,r=Dr(r);if(!Ve)return r;if(n){if(r?.nodeType!==3){var a=Tr();return r===null?i?.after(a):r.before(a),We(a),a}jr(r)}return We(r),r}function Or(e){e.textContent=``}function kr(){return!1}function Ar(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function jr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Mr(e){fi===null&&(li===null&&Ee(e),Te()),si&&we(e)}function Nr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Pr(e,t){var n=fi;n!==null&&n.f&8192&&(e|=ee);var r={ctx:Qe,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};xn?.register_created_effect(r);var i=r;if(e&4)Dn===null?qn.ensure().schedule(r):Dn.push(r);else if(t!==null){try{Ai(r)}catch(e){throw Zr(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ie))}if(i!==null&&(i.parent=n,n!==null&&Nr(i,n),li!==null&&li.f&2&&!(e&64))){var a=li;(a.effects??(a.effects=[])).push(i)}return r}function Fr(){return li!==null&&!ui}function Ir(e){let t=Pr(8,null);return gt(t,C),t.teardown=e,t}function Lr(e){Mr(`$effect`);var t=fi.f;if(!li&&t&32&&Qe!==null&&!Qe.i){var n=Qe;(n.e??(n.e=[])).push(e)}else return Rr(e)}function Rr(e){return Pr(4|oe,e)}function zr(e){return Mr(`$effect.pre`),Pr(8|oe,e)}function Br(e){qn.ensure();let t=Pr(64|ae,e);return()=>{Zr(t)}}function Vr(e){qn.ensure();let t=Pr(64|ae,e);return(e={})=>new Promise(n=>{e.outro?ei(t,()=>{Zr(t),n(void 0)}):(Zr(t),n(void 0))})}function Hr(e){return Pr(4,e)}function Ur(e){return Pr(E|ae,e)}function Wr(e,t=0){return Pr(8|t,e)}function R(e,t=[],n=[],r=[]){on(r,t,n,t=>{Pr(8,()=>{e(...t.map(z))})})}function Gr(e,t=0){return Pr(16|t,e)}function Kr(e,t=0){return Pr(S|t,e)}function qr(e){return Pr(32|ae,e)}function Jr(e){var t=e.teardown;if(t!==null){let e=si,n=li;ci(!0),di(null);try{t.call(null)}finally{ci(e),di(n)}}}function Yr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Tt(()=>{e.abort(ye)});var r=n.next;n.f&64?n.parent=null:Zr(n,t),n=r}}function Xr(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Zr(t),t=n}}function Zr(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qr(e.nodes.start,e.nodes.end),n=!0),e.f|=re,Yr(e,t&&!n),ki(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Jr(e),e.f^=re,e.f|=te;var i=e.parent;i!==null&&i.first!==null&&$r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qr(e,t){for(;e!==null;){var n=e===t?null:Dr(e);e.remove(),e=n}}function $r(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ei(e,t,n=!0){var r=[];ti(e,r,!0);var i=()=>{n&&Zr(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ti(e,t,n){if(!(e.f&8192)){e.f^=ee;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);ti(i,t,o?n:!1)}i=a}}}function ni(e){ri(e,!0)}function ri(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(gt(e,w),qn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);ri(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ii(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Dr(n);t.append(n),n=i}}var ai=null,oi=!1,si=!1;function ci(e){si=e}var li=null,ui=!1;function di(e){li=e}var fi=null;function pi(e){fi=e}var mi=null;function hi(e){li!==null&&(mi??(mi=new Set)).add(e)}var gi=null,_i=0,vi=null;function yi(e){vi=e}var bi=1,xi=0,Si=xi;function Ci(e){Si=e}function wi(){return++bi}function Ti(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ti(a)&&gn(a),a.wv>e.wv)return!0}t&512&&Cn===null&&gt(e,C)}return!1}function Ei(e,t,n=!0){var r=e.reactions;if(r!==null&&!(mi!==null&&mi.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ei(a,t,!1):t===a&&(n?gt(a,w):a.f&1024&&gt(a,T),ar(a))}}function Di(e){var t=gi,n=_i,r=vi,i=li,a=mi,o=Qe,s=ui,c=Si,l=e.f;gi=null,_i=0,vi=null,li=l&96?null:e,mi=null,$e(e.ctx),ui=!1,Si=++xi,e.ac!==null&&(Tt(()=>{e.ac.abort(ye)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=xn?.is_fork;if(gi!==null){var m;if(p||ki(e,_i),f!==null&&_i>0)for(f.length=_i+gi.length,m=0;m<gi.length;m++)f[_i+m]=gi[m];else e.deps=f=gi;if(Fr()&&e.f&512)for(m=_i;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else!p&&f!==null&&_i<f.length&&(ki(e,_i),f.length=_i);if(ot()&&vi!==null&&!ui&&f!==null&&!(e.f&6146))for(m=0;m<vi.length;m++)Ei(vi[m],e);if(i!==null&&i!==e){if(xi++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=xi;if(t!==null)for(let e of t)e.rv=xi;vi!==null&&(r===null?r=vi:r.push(...vi))}return e.f&8388608&&(e.f^=ue),d}catch(e){return pt(e)}finally{e.f^=le,gi=t,_i=n,vi=r,li=i,mi=a,$e(o),ui=s,Si=c}}function Oi(e,t){let i=t.reactions;if(i!==null){var a=n.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&t.f&2&&(gi===null||!r.call(gi,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~ce),s.v!==Pe&&_t(s),s.ac!==null&&Tt(()=>{s.ac.abort(ye),s.ac=null,gt(s,w)}),_n(s),ki(s,0)}}function ki(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Oi(e,n[r])}function Ai(e){var t=e.f;if(!(t&16384)){gt(e,C);var n=fi,r=oi;fi=e,oi=!(t&96);try{t&16777232?Xr(e):Yr(e),Jr(e);var i=Di(e);e.teardown=typeof i==`function`?i:null,e.wv=bi}finally{oi=r,fi=n}}}async function ji(){await Promise.resolve(),tr()}function z(e){var t=!!(e.f&2);if(ai?.add(e),li!==null&&!ui&&!(fi!==null&&fi.f&16384)&&(mi===null||!mi.has(e))){var n=li.deps;if(li.f&2097152)e.rv<xi&&(e.rv=xi,gi===null&&n!==null&&n[_i]===e?_i++:gi===null?gi=[e]:gi.push(e));else{var i;(i=li).deps??(i.deps=[]),r.call(li.deps,e)||li.deps.push(e);var a=e.reactions;a===null?e.reactions=[li]:r.call(a,li)||a.push(li)}}if(si&&lr.has(e))return lr.get(e);if(t){var o=e;if(si){var s=o.v;return(!(o.f&1024)&&o.reactions!==null||Ni(o))&&(s=hn(o)),lr.set(o,s),s}var c=!(o.f&512)&&!ui&&li!==null&&(oi||!!(li.f&512)),l=(o.f&ne)===0;Ti(o)&&(c&&(o.f|=512),gn(o)),c&&!l&&(vn(o),Mi(o))}if(Cn?.has(e))return Cn.get(e);if(e.f&8388608)throw e.v;return e.v}function Mi(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(vn(t),Mi(t))}function Ni(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(lr.has(t)||t.f&2&&Ni(t))return!0;return!1}function Pi(e){var t=ui;try{return ui=!0,e()}finally{ui=t}}function Fi(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(de in e)Ii(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&de in n&&Ii(n)}}}function Ii(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ii(e[n],t)}catch{}let n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=s(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Li(){return Symbol(Ie)}function Ri(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var zi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Bi(e){return zi.includes(e)}var Vi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Hi={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Ui(e){return e=e.toLowerCase(),Hi[e]??e}[...Vi];var Wi=[`touchstart`,`touchmove`];function Gi(e){return Wi.includes(e)}var Ki=[`textarea`,`script`,`style`,`title`];function qi(e){return Ki.includes(e)}var Ji=Symbol(`events`),Yi=new Set,Xi=new Set;function Zi(e,t,n,r={}){function i(e){if(r.capture||na.call(t,e),!e.cancelBubble)return Tt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?dt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qi(e,t,n,r={}){var i=Zi(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function $i(e,t,n,r,i){var a={capture:r,passive:i},o=Zi(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,o,a)})}function B(e,t,n){(t[Ji]??(t[Ji]={}))[e]=n}function ea(e){for(var t=0;t<e.length;t++)Yi.add(e[t]);for(var n of Xi)n(e)}var ta=null;function na(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;ta=e;var s=0,c=ta===e&&e[Ji];if(c){var l=i.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Ji]=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=i[s]||e.target,o!==t){a(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=li,f=fi;di(null),pi(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Ji]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<i.length?i[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Ji]=t,delete e.currentTarget,di(d),pi(f)}}}var ra=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ia(e){return ra?.createHTML(e)??e}function aa(e){var t=Ar(`template`);return t.innerHTML=ia(e.replaceAll(`<!>`,`<!---->`)),t.content}function oa(e,t){var n=fi;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(Ve)return oa(Ue,null),Ue;i===void 0&&(i=aa(a?e:`<!>`+e),n||(i=Er(i)));var t=r||xr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Er(t),s=t.lastChild;oa(o,s)}else oa(t,t);return t}}function sa(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Ve)return oa(Ue,null),Ue;if(!o){var e=Er(aa(a));if(i)for(o=document.createDocumentFragment();Er(e);)o.appendChild(Er(e));else o=Er(e)}var t=o.cloneNode(!0);if(i){var n=Er(t),r=t.lastChild;oa(n,r)}else oa(t,t);return t}}function ca(e,t){return sa(e,t,`svg`)}function la(e=``){if(!Ve){var t=Tr(e+``);return oa(t,t),t}var n=Ue;return n.nodeType===3?jr(n):(n.before(n=Tr()),We(n)),oa(n,n),n}function ua(){if(Ve)return oa(Ue,null),Ue;var e=document.createDocumentFragment(),t=document.createComment(``),n=Tr();return e.append(t,n),oa(t,n),e}function H(e,t){if(Ve){var n=fi;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=Ue),Ge();return}e!==null&&e.before(t)}function da(){var e,t;if(Ve&&Ue&&Ue.nodeType===8&&Ue.textContent?.startsWith(`$`)){let e=Ue.textContent.substring(1);return Ge(),e}return(e=(t=window).__svelte??(t.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}var fa=!0;function pa(e){fa=e}function U(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??(e[_e]=e.nodeValue))&&(e[_e]=n,e.nodeValue=`${n}`)}function ma(e,t){return ga(e,t)}var ha=new Map;function ga(e,{target:t,anchor:n,props:r={},events:a,context:o,intro:s=!0,transformError:c}){wr();var l=void 0,u=Vr(()=>{var u=n??t.appendChild(Tr());jt(u,{pending:()=>{}},t=>{it({});var n=Qe;if(o&&(n.c=o),a&&(r.$$events=a),Ve&&oa(t,null),fa=s,l=e(t,r)||{},fa=!0,Ve&&(fi.nodes.end=Ue,Ue===null||Ue.nodeType!==8||Ue.data!==`]`))throw Re(),Ne;at()},c);var d=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!d.has(r)){d.add(r);var i=Gi(r);for(let e of[t,document]){var a=ha.get(e);a===void 0&&(a=new Map,ha.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,na,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(i(Yi)),Xi.add(f),()=>{for(var e of d)for(let n of[t,document]){var r=ha.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,na),r.delete(e),r.size===0&&ha.delete(n)):r.set(e,i)}Xi.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return _a.set(l,u),l}var _a=new WeakMap;function va(e,t){let n=_a.get(e);return n?(_a.delete(e),n(t)):Promise.resolve()}var ya=new WeakMap,ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea=class{constructor(e,t=!0){x(this,`anchor`,void 0),O(this,ya,new Map),O(this,ba,new Map),O(this,xa,new Map),O(this,Sa,new Set),O(this,Ca,!0),O(this,wa,e=>{if(j(ya,this).has(e)){var t=j(ya,this).get(e),n=j(ba,this).get(t);if(n)ni(n),j(Sa,this).delete(t);else{var r=j(xa,this).get(t);r&&(ni(r.effect),j(ba,this).set(t,r.effect),j(xa,this).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of j(ya,this)){if(j(ya,this).delete(t),t===e)break;let r=j(xa,this).get(n);r&&(Zr(r.effect),j(xa,this).delete(n))}for(let[e,r]of j(ba,this)){if(e===t||j(Sa,this).has(e))continue;let i=()=>{if(Array.from(j(ya,this).values()).includes(e)){var t=document.createDocumentFragment();ii(r,t),t.append(Tr()),j(xa,this).set(e,{effect:r,fragment:t})}else Zr(r);j(Sa,this).delete(e),j(ba,this).delete(e)};j(Ca,this)||!n?(j(Sa,this).add(e),ei(r,i,!1)):i()}}}),O(this,Ta,e=>{j(ya,this).delete(e);let t=Array.from(j(ya,this).values());for(let[e,n]of j(xa,this))t.includes(e)||(Zr(n.effect),j(xa,this).delete(e))}),this.anchor=e,A(Ca,this,t)}ensure(e,t){var n=xn,r=kr();if(t&&!j(ba,this).has(e)&&!j(xa,this).has(e)){if(r){var i=document.createDocumentFragment(),a=Tr();i.append(a),j(xa,this).set(e,{effect:qr(()=>t(a)),fragment:i})}else j(ba,this).set(e,qr(()=>t(this.anchor)))}if(j(ya,this).set(n,e),r){for(let[t,r]of j(ba,this))t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of j(xa,this))t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(j(wa,this)),n.ondiscard(j(Ta,this))}else Ve&&(this.anchor=Ue),j(wa,this).call(this,n)}};function W(e,t,n=!1){var r;Ve&&(r=Ue,Ge());var i=new Ea(e),a=n?ie:0;function o(e,t){if(Ve){var n=Je(r);if(e!==parseInt(n.substring(1))){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,t),He(!0);return}}i.ensure(e,t)}Gr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var Da=Symbol(`NaN`);function Oa(e,t,n){Ve&&Ge();var r=new Ea(e),i=!ot();Gr(()=>{var e=t();e!==e&&(e=Da),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function ka(e,t){return t}function Aa(e,t,n){for(var r=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];ei(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;ja(e,i(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;Or(d),d.append(u),e.items.clear()}ja(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function ja(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=se,ii(a,document.createDocumentFragment())):Zr(t[i],n)}}var Ma;function G(e,n,r,a,o,s=null){var c=e,l=new Map;if(n&4){var u=e;c=Ve?We(Er(u)):u.appendChild(Tr())}Ve&&Ge();var d=null,f=pn(()=>{var e=r();return t(e)?e:e==null?[]:i(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Pa(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=se,Ia(d,null,c)):ni(d):ei(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Gr(()=>{p=z(f);var e=p.length;let t=!1;Ve&&Je(c)===`[!`!=(e===0)&&(c=qe(),We(c),He(!1),t=!0);for(var i=new Set,u=xn,v=kr(),y=0;y<e;y+=1){Ve&&Ue.nodeType===8&&Ue.data===`]`&&(c=Ue,t=!0,He(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&pr(S.v,b),S.i&&pr(S.i,y),v&&u.unskip_effect(S.e)):(S=Fa(l,h?c:Ma??(Ma=Tr()),b,x,y,o,n,r),h||(S.e.f|=se),l.set(x,S)),i.add(x)}if(e===0&&s&&!d&&(h?d=qr(()=>s(c)):(d=qr(()=>s(Ma??(Ma=Tr()))),d.f|=se)),e>i.size&&Ce(``,``,``),Ve&&e>0&&We(qe()),!h){if(m.set(u,i),v){for(let[e,t]of l)i.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u)}t&&He(!0),z(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,Ve&&(c=Ue)}function Na(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Pa(e,t,n,r,a){var o=!!(r&8),s=t.length,c=e.items,l=Na(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??(f=new Set)).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(ni(_),o&&(_.nodes?.a?.unfix(),(f??(f=new Set)).delete(_))),_.f&33554432){if(_.f^=se,_===l)Ia(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),La(e,d,_),La(e,_,y),Ia(_,y,n),d=_,p=[],m=[],l=Na(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Ia(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);La(e,S.prev,C.next),La(e,d,S),La(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Ia(_,l,n),La(e,_.prev,_.next),La(e,_,d===null?e.effect.first:d.next),La(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??(u=new Set)).add(l),m.push(l),l=Na(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Na(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(ja(e,i(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Na(l.next);var T=w.length;if(T>0){var ee=r&4&&s===0?n:null;if(o){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}Aa(e,w,ee)}}o&&dt(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Fa(e,t,n,r,i,a,o,s){var c=o&1?o&16?dr(n):fr(n,!1,!1):null,l=o&2?dr(i):null;return{v:c,i:l,e:qr(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ia(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Dr(r);if(a.before(r),r===i)return;r=o}}function La(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ra(e,t,...n){var r=new Ea(e);Gr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ie)}function za(e,t,n){var r;Ve&&(r=Ue,Ge());var i=new Ea(e);Gr(()=>{var e=t()??null;if(Ve&&Je(r)===`[`!=(e!==null)){var a=qe();We(a),i.anchor=a,He(!1),i.ensure(e,e&&(t=>n(t,e))),He(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ie)}var Ba=()=>performance.now(),Va={tick:e=>requestAnimationFrame(e),now:()=>Ba(),tasks:new Set};function Ha(){let e=Va.now();Va.tasks.forEach(t=>{t.c(e)||(Va.tasks.delete(t),t.f())}),Va.tasks.size!==0&&Va.tick(Ha)}function Ua(e){let t;return Va.tasks.size===0&&Va.tick(Ha),{promise:new Promise(n=>{Va.tasks.add(t={c:e,f:n})}),abort(){Va.tasks.delete(t)}}}function Wa(e,t){Tt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Ga(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Ka(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Ga(n.trim());t[i]=r.trim()}return t}var qa=e=>e;function Ja(e,t,n,r){var i,a=!!(e&1),o=!!(e&2),s=a&&o,c=!!(e&4),l=s?`both`:a?`in`:`out`,u,d=t.inert,f=t.style.overflow,p,m;function h(){return Tt(()=>u??(u=n()(t,r?.()??{},{direction:l})))}var g={is_global:c,in(){if(t.inert=d,!a){m?.abort(),m?.reset?.();return}o||p?.abort(),p=Ya(t,h(),m,1,()=>{Wa(t,`introstart`)},()=>{Wa(t,`introend`),p?.abort(),p=u=void 0,t.style.overflow=f})},out(e){if(!o){e?.(),u=void 0;return}t.inert=!0,m=Ya(t,h(),p,0,()=>{Wa(t,`outrostart`)},()=>{Wa(t,`outroend`),e?.()})},stop:()=>{p?.abort(),m?.abort()}},_=fi;if(((i=_.nodes).t??(i.t=[])).push(g),a&&fa){var v=c;if(!v){for(var y=_.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||!!(y.f&32768)}v&&Hr(()=>{Pi(()=>g.in())})}}function Ya(e,t,n,r,i,a){var o=r===1;if(f(t)){var s,c=!1;return dt(()=>{c||(s=Ya(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{c=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:p,deactivate:p,reset:p,t:()=>r};let{delay:l=0,css:u,tick:d,easing:m=qa}=t;var h=[];if(o&&n===void 0&&(d&&d(0,1),u)){var g=Ka(u(0,1));h.push(g,g)}var _=()=>1-r,v=e.animate(h,{duration:l,fill:`forwards`});return v.onfinish=()=>{v.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var f=!1;if(u)for(var p=Math.ceil(c/(1e3/60)),h=0;h<=p;h+=1){var g=o+s*m(h/p),y=Ka(u(g,1-g));l.push(y),f||(f=y.overflow===`hidden`)}f&&(e.style.overflow=`hidden`),_=()=>{var e=v.currentTime;return o+s*m(e/c)},d&&Ua(()=>{if(v.playState!==`running`)return!1;var e=_();return d(e,1-e),!0})}v=e.animate(l,{duration:c,fill:`forwards`}),v.onfinish=()=>{_=()=>r,d?.(r,1-r),a()}},{abort:()=>{v&&(v.cancel(),v.effect=null,v.onfinish=p)},deactivate:()=>{a=p},reset:()=>{r===0&&d?.(1,0)},t:()=>_()}}function Xa(e,t,n,r,i,a){let o=Ve;Ve&&Ge();var s=null;Ve&&Ue.nodeType===1&&(s=Ue,Ge());var c=Ve?Ue:e,l=new Ea(c,!1);Gr(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null),pa(!0);return}return l.ensure(e,t=>{if(e){if(s=Ve?s:Ar(e,a),oa(s,s),r){var n=null;Ve&&qi(e)&&s.append(n=document.createComment(``));var i=Ve?Er(s):s.appendChild(Tr());Ve&&(i===null?He(!1):We(i)),r(s,i),n?.remove()}fi.nodes.end=s,t.before(s)}Ve&&We(t)}),pa(!0),()=>{e&&pa(!1)}},ie),Ir(()=>{pa(!0)}),o&&(He(!0),We(c))}function Za(e,t,n){Hr(()=>{var r=Pi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};Wr(()=>{var e=n();Fi(e),i&&Xe(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Qa(e,t){var n=void 0,r;Kr(()=>{n!==(n=t())&&(r&&(Zr(r),r=null),n&&(r=qr(()=>{Hr(()=>n(e))})))})}function $a(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$a(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function eo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$a(e))&&(r&&(r+=` `),r+=t);return r}function K(e){return typeof e==`object`?eo(e):e??``}var to=[...`
2
+ \r\f\xA0\v`];function no(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||to.includes(r[o-1]))&&(s===r.length||to.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function ro(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function io(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ao(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(io)),i&&c.push(...Object.keys(i).map(io));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=io(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=ro(r)),i&&(n+=ro(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function q(e,t,n,r,i,a){var o=e[he];if(Ve||o!==n||o===void 0){var s=no(n,r,a);(!Ve||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function oo(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function so(e,t,n,r){var i=e[ge];if(Ve||i!==t){var a=ao(t,r);(!Ve||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(oo(e,n?.[0],r[0]),oo(e,n?.[1],r[1],`important`)):oo(e,n,r));return r}function co(e,n,r=!1){if(e.multiple){if(n==null)return;if(!t(n))return ze();for(var i of e.options)i.selected=n.includes(fo(i));return}for(i of e.options)if(yr(fo(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(e.selectedIndex=-1)}function lo(e){var t=new MutationObserver(()=>{`__value`in e&&co(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ir(()=>{t.disconnect()})}function uo(e,t,n=t){var r=new WeakSet,i=!0;Et(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),fo);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&fo(o)}n(a),e.__value=a,xn!==null&&r.add(xn)}),Hr(()=>{var a=t();if(e===document.activeElement){var o=xn;if(r.has(o))return}if(co(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=fo(s),n(a))}e.__value=a,i=!1}),lo(e)}function fo(e){return`__value`in e?e.__value:e.value}var po=Symbol(`class`),mo=Symbol(`style`),ho=Symbol(`is custom element`),go=Symbol(`is html`),_o=be?`link`:`LINK`,vo=be?`input`:`INPUT`,yo=be?`option`:`OPTION`,bo=be?`select`:`SELECT`,xo=be?`progress`:`PROGRESS`;function So(e){if(Ve){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;J(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;J(e,`checked`,null),e.checked=r}}};e[ve]=n,dt(n),wt()}}function Co(e,t){var n=Oo(e);n.value!==(n.value=t??void 0)&&(e.value!==t||t===0&&e.nodeName===xo)&&(e.value=t??``)}function wo(e,t){var n=Oo(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function To(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function J(e,t,n,r){var i=Oo(e);Ve&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===_o)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Ao(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Eo(e,t,n,r,i=!1,a=!1){if(Ve&&i&&e.nodeName===vo){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||So(o)}var s=Oo(e),c=s[ho],l=!s[go];let u=Ve&&c;u&&He(!1);var d=t||{},f=e.nodeName===yo;for(var p in t)p in n||(n[p]=null);n.class?n.class=K(n.class):(r||n[po])&&(n.class=null),n[mo]&&(n.style??(n.style=null));var m=Ao(e);if(e.nodeName===vo&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,J(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){q(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[po],n[po]),d[i]=o,d[po]=n[po];continue}if(i===`style`){so(e,o,t?.[mo],n[mo]),d[i]=o,d[mo]=n[mo];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Bi(r);if(Ri(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)B(r,e,o),ea([r]);else if(o!=null){function y(e){d[i].call(this,e)}d[n]=Zi(r,e,y,t)}}else if(i===`style`)J(e,i,o);else if(i===`autofocus`)St(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)To(e,o);else{var b=i;l||(b=Ui(b));var x=b===`defaultValue`||b===`defaultChecked`;if(o==null&&!c&&!x){if(s[i]=null,b===`value`||b===`checked`){let n=e,r=t===void 0;if(b===`value`){let e=n.defaultValue;n.removeAttribute(b),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(b),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else x||m.includes(b)&&(c||typeof o!=`string`)?(e[b]=o,b in s&&(s[b]=Pe)):typeof o!=`function`&&J(e,b,o,a)}}}}return u&&He(!0),d}function Do(e,t,n=[],r=[],i=[],a,o=!1,s=!1){on(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===bo,l=!1;if(Kr(()=>{var u=t(...n.map(z)),d=Eo(e,r,u,a,o,s);l&&c&&`value`in u&&co(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||Zr(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&Zr(i[t]),i[t]=qr(()=>Qa(e,()=>f))),d[t]=f}r=d}),c){var u=e;Hr(()=>{co(u,r.value,!0),lo(u)})}l=!0})}function Oo(e){return e[me]??(e[me]={[ho]:e.nodeName.includes(`-`),[go]:e.namespaceURI===`http://www.w3.org/1999/xhtml`})}var ko=new Map;function Ao(e){var t=e.getAttribute(`is`)||e.nodeName,n=ko.get(t);if(n)return n;ko.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=s(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=u(i)}return n}function jo(e,t,n=t){var r=new WeakSet;Et(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Mo(e)?No(a):a,n(a),xn!==null&&r.add(xn),await ji(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Ve&&e.defaultValue!==e.value||Pi(t)==null&&e.value)&&(n(Mo(e)?No(e.value):e.value),xn!==null&&r.add(xn)),Wr(()=>{var n=t();if(e===document.activeElement){var i=xn;if(r.has(i))return}Mo(e)&&n===No(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function Mo(e){var t=e.type;return t===`number`||t===`range`}function No(e){return e===``?null:+e}var Po,Fo=new WeakMap,Io=new WeakMap,Lo=new WeakMap,Ro=new WeakSet,zo=class{constructor(e){kt(this,Ro),O(this,Fo,new WeakMap),O(this,Io,void 0),O(this,Lo,void 0),A(Lo,this,e)}observe(e,t){var n=j(Fo,this).get(e)||new Set;return n.add(t),j(Fo,this).set(e,n),k(Ro,this,Bo).call(this).observe(e,j(Lo,this)),()=>{var n=j(Fo,this).get(e);n.delete(t),n.size===0&&(j(Fo,this).delete(e),j(Io,this).unobserve(e))}}};Po=zo;function Bo(){return j(Io,this)??A(Io,this,new ResizeObserver(e=>{for(var t of e){Po.entries.set(t.target,t);for(var n of j(Fo,this).get(t.target)||[])n(t)}}))}x(zo,`entries`,new WeakMap);function Vo(e,t){return e===t||e?.[de]===t}function Ho(e={},t,n,r){var i=Qe.r,a=fi;return Hr(()=>{var o,s;return Wr(()=>{o=s,s=r?.()||[],Pi(()=>{Vo(n(...s),e)||(t(e,...s),o&&Vo(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Vo(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var Uo={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Uo)}var Wo={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];f(i)&&(i=i());let a=o(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(f(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=o(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===de||t===fe)return!1;for(let n of e.props)if(f(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(f(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function X(...e){return new Proxy({props:e},Wo)}function Z(e,t,n,r){var i=!0,a=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??(u=un(r)),z(u)):(l&&(l=!1,c=s?Pi(r):r),c);let f;if(a){var p=de in e||fe in e;f=o(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=xt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Oe(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?un:pn)(()=>(v=!1,g()));a&&z(y);var b=fi;return(function(e,t){if(arguments.length>0){let n=t?z(y):i&&a?_r(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return si&&v||b.f&16384?y.v:z(y)})}function Go(e){Qe===null&&xe(`onMount`),Lr(()=>{let t=Pi(e);if(typeof t==`function`)return t})}if(typeof window<`u`){var Ko,qo;((Ko=(qo=window).__svelte??(qo.__svelte={})).v??(Ko.v=new Set)).add(`5`)}function Jo(e){return{...e,endTime:e.endTime??(e.startTime??0)+(e.duration??0)}}function Yo(e){let t=Array.isArray(e.spans)?e.spans.map(Jo):[];return{...Jo(e),rootSpan:e.rootSpan?Jo(e.rootSpan):t[0],spans:t}}var Xo=e=>e.map(Yo),Zo=class{constructor(e){x(this,`url`,void 0),x(this,`ws`,null),x(this,`reconnectTimer`,null),x(this,`messageHandlers`,new Set),x(this,`statusHandlers`,new Set),x(this,`reconnectAttempts`,0),x(this,`closed`,!1),x(this,`reconnectDelay`,1e3),x(this,`maxReconnectDelay`,15e3),this.url=e}connect(){this.closed=!1;try{this.ws=new WebSocket(this.url),this.ws.addEventListener(`open`,()=>{this.reconnectAttempts=0,this.emitStatus(`connected`)}),this.ws.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data),n=Array.isArray(t?.traces)?{...t,traces:Xo(t.traces)}:t;for(let e of this.messageHandlers)e(n)}catch{}}),this.ws.addEventListener(`close`,()=>{this.emitStatus(`disconnected`),this.scheduleReconnect()})}catch{this.emitStatus(`disconnected`),this.scheduleReconnect()}}emitStatus(e){if(!this.closed)for(let t of this.statusHandlers)t(e)}scheduleReconnect(){if(this.closed||this.reconnectTimer)return;this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay);this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}onMessage(e){return this.messageHandlers.add(e),()=>this.messageHandlers.delete(e)}onStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}disconnect(){this.closed=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.messageHandlers.clear(),this.statusHandlers.clear()}isConnected(){return this.ws?.readyState===WebSocket.OPEN}};function Qo(e){try{let t=new URL(e);return t.protocol===`ws:`?`http://${t.host}`:t.protocol===`wss:`?`https://${t.host}`:null}catch{return null}}function $o(e,t=fetch){return async(n,r)=>{if(n.kind!==`app`)return null;let i=new URL(`/source`,e);i.searchParams.set(`file`,n.file),i.searchParams.set(`line`,String(n.line)),i.searchParams.set(`context`,String(r));try{let e=await t(i.toString());return e.ok?await e.json():null}catch{return null}}}var es=null;function ts(e){es=e===null?null:$o(e)}var ns=(e,t)=>es===null?Promise.resolve(null):es(e,t),rs=new WeakMap,is=class{constructor(e){O(this,rs,N(void 0)),P(j(rs,this),e,!0)}get value(){return z(j(rs,this))}set value(e){P(j(rs,this),e,!0)}},as=new WeakMap,os=new WeakMap,ss=class{constructor(e){O(this,as,void 0),O(this,os,M(()=>j(as,this).call(this))),A(as,this,e)}get value(){return z(j(os,this))}};function cs(e){return new is(e)}function ls(e){return new ss(e)}function us(e){return Br(()=>{Lr(e)})}function ds(e,...t){for(let n of t){let t=e?.[n];if(typeof t==`string`&&t.length>0)return t}}function Q(e){return typeof e==`string`?e:void 0}function fs(e){if(typeof e==`number`)return e;if(typeof e==`string`&&e!==``){let t=Number(e);return Number.isFinite(t)?t:void 0}}function ps(e){if(typeof e==`boolean`)return e;if(e===`true`)return!0;if(e===`false`)return!1}function ms(e){if(Array.isArray(e)){let t=e.filter(e=>typeof e==`string`);return t.length===e.length?t:void 0}return typeof e==`string`?[e]:void 0}function hs(e,t){let n=e.attributes||{},r=[n[`service.name`],n[`service.peer.name`],n[`peer.service`],n[`http.host`],n[`db.system.name`],n[`db.system`],n[`messaging.system`],n[`rpc.service`],t];for(let e of r){let t=Q(e)?.trim();if(t)return t}return`unknown`}function gs(e,t){return Q(e[`db.system.name`])!==void 0||Q(e[`db.system`])!==void 0?`database`:Q(e[`cache.system`])===void 0?Q(e[`messaging.system`])===void 0?Q(e[`service.peer.name`])!==void 0||Q(e[`peer.service`])!==void 0||Q(e[`net.peer.name`])!==void 0||Q(e[`http.host`])!==void 0?t===e[`service.name`]?`service`:`external`:Q(e[`service.name`])===void 0?`unknown`:`service`:`messaging`:`cache`}function _s(e){if(e.resourceName)return e.resourceName;let t=e.resource||{},n=[t[`service.name`],t[`service.namespace`],t[`host.name`],t[`container.name`]];for(let e of n){let t=Q(e)?.trim();if(t)return t}return`unknown`}function vs(e,t){if(e===0&&t===0)return`unknown`;let n=e===0?1:t/e;return n>=.2?`unhealthy`:n>=.05?`degraded`:`healthy`}function ys(e){let t=new Map,n=(e,n=`unknown`)=>{let r=t.get(e);if(r)return r.type===`unknown`&&n!==`unknown`&&(r.type=n),r;let i={name:e,type:n,health:`unknown`,requestCount:0,errorCount:0,traceCount:0,logCount:0};return t.set(e,i),i};for(let t of e.traces){let e=new Set;for(let r of t.spans){let i=hs(r,t.service),a=n(i,gs(r.attributes,i));a.requestCount+=1,a.lastSeen=Math.max(a.lastSeen??0,r.endTime),r.status.code===`ERROR`&&(a.errorCount+=1),e.has(i)||(a.traceCount+=1,e.add(i))}}for(let t of e.logs){let e=n(_s(t),`service`);e.logCount+=1,e.lastSeen=Math.max(e.lastSeen??0,t.timestamp)}for(let t of e.errors){if(!t.service)continue;let e=n(t.service,`service`);e.errorCount+=t.count,e.lastSeen=Math.max(e.lastSeen??0,t.lastSeen)}return[...t.values()].map(e=>({...e,health:vs(e.requestCount,e.errorCount)})).sort((e,t)=>{let n=(t.lastSeen??0)-(e.lastSeen??0);return n===0?e.name.localeCompare(t.name):n})}var bs=[{id:`all`,label:`All time`,durationMs:null},{id:`5m`,label:`Last 5m`,durationMs:3e5},{id:`15m`,label:`Last 15m`,durationMs:9e5},{id:`30m`,label:`Last 30m`,durationMs:18e5},{id:`1h`,label:`Last 1h`,durationMs:36e5},{id:`3h`,label:`Last 3h`,durationMs:108e5},{id:`6h`,label:`Last 6h`,durationMs:216e5},{id:`24h`,label:`Last 24h`,durationMs:864e5},{id:`7d`,label:`Last 7d`,durationMs:6048e5}],xs={type:`preset`,preset:`all`},Ss=new Map(bs.map(e=>[e.id,e]));function Cs(e,t){let n=Ss.get(e);return!n||n.durationMs===null?{start:null,end:null}:{start:t-n.durationMs,end:t}}function ws(e,t){return e.type===`preset`?Cs(e.preset,t):{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Ts(e){return e.start===null||e.end===null}function Es(e){return e.type===`preset`?Ss.get(e.preset)?.label??`All time`:`${Ds(e.start)} → ${Ds(e.end)}`}function Ds(e){let t=new Date(e),n=new Date,r=t.toDateString()===n.toDateString(),i=t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`});return r?i:`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${i}`}function Os(e){return e.type===`preset`?e.preset===xs.preset?null:e.preset:`custom:${e.start}:${e.end}`}function ks(e){if(!e)return xs;if(e.startsWith(`custom:`)){let[,t,n]=e.split(`:`),r=Number(t),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?xs:{type:`custom`,start:r,end:i}}return Ss.has(e)?{type:`preset`,preset:e}:xs}function As(e){if(!Ts(e))return{start:e.start,end:e.end}}var js=[`gen_ai.system`,`gen_ai.provider.name`,`gen_ai.operation.name`,`ai.model.provider`];function Ms(e){let t=e.attributes??{};for(let e of js)if(t[e]!=null)return!0;return!1}function Ns(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`vertex_ai`||t===`gcp.vertex_ai`||t===`gcp.gemini`?`google`:t}function Ps(e){let t=Object.keys(e).sort((e,t)=>{let n=e.split(`/`)[1]??``;return(t.split(`/`)[1]??``).length-n.length});return(n,r)=>{let i=Ns(n),a=r.toLowerCase();for(let n of t){let[t,r]=n.split(`/`);if(t===i&&a.startsWith(r))return e[n]}}}var Fs=Ps({"openai/gpt-4o":{inputPerMTok:2.5,outputPerMTok:10},"openai/gpt-4o-mini":{inputPerMTok:.15,outputPerMTok:.6},"openai/gpt-4-turbo":{inputPerMTok:10,outputPerMTok:30},"openai/gpt-3.5-turbo":{inputPerMTok:.5,outputPerMTok:1.5},"anthropic/claude-fable-5-1":{inputPerMTok:10,outputPerMTok:50,cacheReadPerMTok:.25},"anthropic/claude-fable-5":{inputPerMTok:10,outputPerMTok:50},"anthropic/claude-opus-5":{inputPerMTok:5,outputPerMTok:25},"anthropic/claude-opus-4-8":{inputPerMTok:5,outputPerMTok:25},"anthropic/claude-opus-4-7":{inputPerMTok:5,outputPerMTok:25},"anthropic/claude-opus-4-6":{inputPerMTok:5,outputPerMTok:25},"anthropic/claude-sonnet-5":{inputPerMTok:2,outputPerMTok:10},"anthropic/claude-sonnet-4-6":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-haiku-4-5":{inputPerMTok:1,outputPerMTok:5},"anthropic/claude-opus-4":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-sonnet-4":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-sonnet":{inputPerMTok:3,outputPerMTok:15},"anthropic/claude-3-5-haiku":{inputPerMTok:.8,outputPerMTok:4},"anthropic/claude-3-opus":{inputPerMTok:15,outputPerMTok:75},"anthropic/claude-3-haiku":{inputPerMTok:.25,outputPerMTok:1.25},"google/gemini-2.5-flash":{inputPerMTok:.3,outputPerMTok:2.5},"google/gemini-2.0-flash":{inputPerMTok:.1,outputPerMTok:.4},"google/gemini-1.5-pro":{inputPerMTok:1.25,outputPerMTok:5},"google/gemini-1.5-flash":{inputPerMTok:.075,outputPerMTok:.3},"mistral/mistral-large":{inputPerMTok:2,outputPerMTok:6},"mistral/mistral-small":{inputPerMTok:.2,outputPerMTok:.6},"groq/llama-3.1-70b":{inputPerMTok:.59,outputPerMTok:.79},"deepseek/deepseek-chat":{inputPerMTok:.27,outputPerMTok:1.1}});function Is(e){let t=Fs(e.provider,e.model);if(!t)return{currency:`USD`,input:0,output:0,cacheRead:0,cacheWrite:0,total:0,source:`unknown`};let n=t.cacheReadPerMTok??t.inputPerMTok*.1,r=t.cacheWritePerMTok??t.inputPerMTok*1.25,i=(e.cacheReadInputTokens??0)/1e6*n,a=(e.cacheCreationInputTokens??0)/1e6*r,o=Math.max(0,(e.inputTokens??0)-(e.cacheReadInputTokens??0)-(e.cacheCreationInputTokens??0))/1e6*t.inputPerMTok,s=(e.outputTokens??0)/1e6*t.outputPerMTok;return{currency:`USD`,input:o,output:s,cacheRead:i,cacheWrite:a,total:o+s+i+a,source:`table`}}function Ls(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function Rs(e,t){let n=e[t];return typeof n==`string`?n:void 0}function zs(e,t){let n=e[t];return typeof n==`number`?n:void 0}function Bs(e,t){return Ls(e[t])}function Vs(e,t){let n=e[t];return Array.isArray(n)?n:[]}function Hs(e,t){return Array.isArray(e[t])}function Us(e,t,n,r){return r.filter(t=>n(e,t)===void 0).map(e=>`${t}: Missing or invalid ${e}`)}function Ws(e){if(e!=null){if(typeof e==`object`)return e;if(typeof e==`string`)try{return JSON.parse(e)}catch{return}}}function Gs(e){if(Array.isArray(e.parts))return e.parts.map(e=>{let t=e.type??`text`;return t===`text`?{kind:`text`,text:String(e.content??``)}:t===`image`?{kind:`image`,mediaType:`image/*`,dataRef:String(e.content??``)}:t===`audio`?{kind:`audio`,mediaType:`audio/*`,dataRef:String(e.content??``)}:{kind:`json`,value:e.content}});if(Array.isArray(e.content))return e.content.map(e=>e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:e.type===`image`?{kind:`image`,mediaType:e.mimeType??`image/*`,dataRef:String(e.image??e.data??``)}:e.type===`audio`?{kind:`audio`,mediaType:e.mimeType??`audio/*`,dataRef:String(e.data??``)}:{kind:`json`,value:e});let t=Q(e.content);return t===void 0?e.content==null?[]:[{kind:`json`,value:e.content}]:[{kind:`text`,text:t}]}function Ks(e){let t=Ls(e);return t&&`value`in t?t.value:e}function qs(e){return e.type===`tool-call`?{kind:`call`,call:{id:e.toolCallId,name:e.toolName??``,arguments:Ws(e.input)??e.input??{}}}:e.type===`tool-result`?{kind:`result`,result:{id:e.toolCallId,value:Ks(e.output)}}:e.type===`text`||e.text!==void 0?{kind:`text`,text:String(e.text??``)}:null}function Js(e){return e.type===`tool_call`?{kind:`call`,call:{id:e.id,name:e.name??``,arguments:Ws(e.arguments)??e.arguments??{}}}:e.type===`tool_call_response`?{kind:`result`,result:{id:e.id,value:Ks(e.response)}}:e.type===`text`||e.type==null?{kind:`text`,text:String(e.content??``)}:null}function Ys(e,t,n){let r=[],i=[],a=[];for(let e of t)e.kind===`call`?r.push(e.call):e.kind===`result`?a.push(e.result):i.push({kind:`text`,text:e.text});if(a.length>1){let t={role:e,parts:[]};return t._toolResults=a,t}let o={role:e,parts:i};return r.length>0&&(o.toolCalls=r),a.length===1&&(o.toolCallId=a[0].id,o.parts=[{kind:`json`,value:a[0].value}]),n&&(o.finishReason=n),o}function Xs(e){let t=e.role??`user`;if(Array.isArray(e.content)){let n=e.content;if(n.some(e=>e.type===`tool-call`||e.type===`tool-result`))return Ys(t,n.map(qs).filter(e=>e!==null),e.finish_reason)}if(Array.isArray(e.parts)){let n=e.parts;if(n.some(e=>e.type===`tool_call`||e.type===`tool_call_response`))return Ys(t,n.map(Js).filter(e=>e!==null),e.finish_reason)}let n={role:t,parts:Gs(e)};return Array.isArray(e.tool_calls)&&e.tool_calls.length>0&&(n.toolCalls=e.tool_calls.map(e=>({id:e.id,name:e.function?.name??``,arguments:Ws(e.function?.arguments)??e.function?.arguments??{},type:e.type}))),e.tool_call_id&&(n.toolCallId=e.tool_call_id),e.finish_reason&&(n.finishReason=e.finish_reason),n}function Zs(e,t){let n=Ws(e[t]);if(Array.isArray(n))return n.map(Xs)}function Qs(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let e=n.attributes??{};if(n.name===`gen_ai.choice`){let n=e.message,r=Ws(e.message)??n,i=Q(e.finish_reason);if(r){let e=Xs(r);i&&(e.finishReason=i),t.push(e)}continue}let r=n.name.match(/^gen_ai\.(system|user|assistant|tool)\.message$/);if(!r)continue;let i=r[1],a=e.content,o=Q(a),s=o===void 0?a:Ws(o)??o;t.push(Xs({role:i,content:s,tool_calls:Ws(e.tool_calls),tool_call_id:Q(e.id)??Q(e.tool_call_id)}))}return t}function $s(e){let t=Ws(e[`gen_ai.tool.definitions`]??e[`gen_ai.orchestrator.agent.definitions`]);if(Array.isArray(t))return t.filter(e=>Q(e.name)!==void 0).map(e=>({name:e.name,description:e.description,type:e.type,schema:e.schema??e.parameters}))}function ec(e){let t=fs(e[`gen_ai.usage.input_tokens`])??fs(e[`gen_ai.usage.prompt_tokens`])??fs(e[`llm.usage.prompt_tokens`])??fs(e[`ai.usage.inputTokens`]),n=fs(e[`gen_ai.usage.output_tokens`])??fs(e[`gen_ai.usage.completion_tokens`])??fs(e[`llm.usage.completion_tokens`])??fs(e[`ai.usage.outputTokens`]),r=fs(e[`gen_ai.usage.cache_read.input_tokens`])??fs(e.cache_read_tokens),i=fs(e[`gen_ai.usage.cache_write.input_tokens`])??fs(e[`gen_ai.usage.cache_creation.input_tokens`])??fs(e.cache_creation_tokens),a=fs(e.input_tokens);return{inputTokens:t??(a===void 0?void 0:a+(r??0)+(i??0)),outputTokens:n??fs(e.output_tokens),reasoningOutputTokens:fs(e[`gen_ai.usage.reasoning.output_tokens`]),cacheReadInputTokens:r,cacheCreationInputTokens:i}}function tc(e){let t=fs(e.ttft_ms),n=fs(e[`gen_ai.response.time_to_first_chunk`])??(t===void 0?void 0:t/1e3),r=fs(e[`gen_ai.response.time_to_finish`]),i=fs(e[`gen_ai.response.output_tokens_per_second`]),a=fs(e[`gen_ai.response.time_per_output_chunk`]);if(n!==void 0||r!==void 0||i!==void 0||a!==void 0)return{timeToFirstChunkS:n,timeToFinishS:r,outputTokensPerSecond:i,timePerOutputChunkS:a}}function nc(e){let t=fs(e[`gen_ai.session.cost.usd`]),n=fs(e[`gen_ai.session.input_tokens`]),r=fs(e[`gen_ai.session.output_tokens`]),i=fs(e[`gen_ai.session.step.count`]),a=fs(e[`gen_ai.session.tool_call.count`]),o=fs(e[`gen_ai.session.error.count`]);if(t!==void 0||n!==void 0||r!==void 0||i!==void 0||a!==void 0||o!==void 0)return{costUsd:t,inputTokens:n,outputTokens:r,stepCount:i,toolCallCount:a,errorCount:o}}function rc(e,t){let n=Q(e[`gen_ai.guard.rule`]);if(n)return{rule:n,action:Q(e[`gen_ai.guard.action`])??t,message:Q(e[`gen_ai.guard.message`]),observed:fs(e[`gen_ai.guard.observed`]),limit:fs(e[`gen_ai.guard.limit`])}}function ic(e,t){let n=ps(e[`gen_ai.guard.stopped`]),r=[],i=rc(e),a=e=>{e&&(!i||e.action===`stop`)&&(i=e)};for(let e of t??[]){let t=e.attributes??{};if(e.name===`gen_ai.guard.stop`)a(rc(t,`stop`));else if(e.name===`gen_ai.guard.warning`)a(rc(t,`warn`));else if(e.name===`gen_ai.client.warnings`){let e=Ws(t[`gen_ai.warnings`]);Array.isArray(e)&&r.push(...e)}}return(n!==void 0||i)&&(i={...i,stopped:n??i?.action===`stop`}),{guard:i,warnings:r.length>0?r:void 0}}function ac(e){let t=e.toLowerCase();return t===`az.ai.openai`||t===`azure_openai`?`openai`:t===`gcp.vertex_ai`||t===`vertex_ai`||t===`gcp.gemini`||t===`google-gla`||t===`google_genai`||t===`gemini`?`google`:t}var oc=new Set(`gen_ai.system,gen_ai.provider.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.response.model,gen_ai.response.id,gen_ai.response.finish_reasons,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.top_k,gen_ai.request.max_tokens,gen_ai.request.stop_sequences,gen_ai.request.seed,gen_ai.request.frequency_penalty,gen_ai.request.presence_penalty,gen_ai.request.choice.count,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,gen_ai.usage.prompt_tokens,gen_ai.usage.completion_tokens,gen_ai.usage.reasoning.output_tokens,gen_ai.usage.cache_read.input_tokens,gen_ai.usage.cache_write.input_tokens,gen_ai.usage.cache_creation.input_tokens,gen_ai.usage.cost.usd,gen_ai.response.time_to_first_chunk,gen_ai.response.time_to_finish,gen_ai.response.output_tokens_per_second,gen_ai.response.time_per_output_chunk,gen_ai.guard.stopped,gen_ai.guard.rule,gen_ai.guard.action,gen_ai.guard.message,gen_ai.guard.observed,gen_ai.guard.limit,gen_ai.session.cost.usd,gen_ai.session.input_tokens,gen_ai.session.output_tokens,gen_ai.session.step.count,gen_ai.session.tool_call.count,gen_ai.session.error.count,gen_ai.input.messages,gen_ai.output.messages,gen_ai.input.messages.ref,gen_ai.output.messages.ref,gen_ai.system_instructions,gen_ai.tool.definitions,gen_ai.orchestrator.agent.definitions,gen_ai.agent.id,gen_ai.agent.name,gen_ai.agent.description,gen_ai.tool.name,gen_ai.tool.call.id,gen_ai.handoff.from_agent,gen_ai.handoff.to_agent,gen_ai.guardrail.name,gen_ai.guardrail.triggered,gen_ai.conversation.id,gen_ai.evaluation.name,gen_ai.evaluation.score.value,gen_ai.evaluation.score.label,gen_ai.evaluation.explanation,gen_ai.audio.input.format,gen_ai.audio.output.format,gen_ai.speech.voice,gen_ai.speech.input_text,gen_ai.transcription.text,gen_ai.embeddings.dimension.count,gen_ai.openai.request.service_tier,gen_ai.openai.response.service_tier,gen_ai.openai.response.system_fingerprint,gen_ai.openai.request.response_format,openai.request.service_tier,openai.response.service_tier,openai.response.system_fingerprint,openai.request.response_format`.split(`,`));function sc(e){let t=e.attributes??{},n=ac(Q(t[`gen_ai.provider.name`])??Q(t[`gen_ai.system`])??Q(t[`ai.model.provider`])??`unknown`),r=Q(t[`gen_ai.operation.name`])??`chat`,i=Q(t[`gen_ai.request.model`])??Q(t[`llm.request.model`])??Q(t.model_name)??Q(t[`ai.model.id`])??`unknown`,a=Q(t[`gen_ai.response.model`])??Q(t[`llm.response.model`])??Q(t[`ai.response.model`]),o=Zs(t,`gen_ai.input.messages`)??[],s=Zs(t,`gen_ai.output.messages`)??[],c=[],l=Ws(t[`gen_ai.system_instructions`]);if(Array.isArray(l)&&l.length>0){let e=Ls(l[0]);c=e&&`role`in e?l.map(e=>Xs(e)):[{role:`system`,parts:l.map(e=>e.type===`text`||e.content!==void 0?{kind:`text`,text:String(e.content??``)}:{kind:`json`,value:e})}]}let u=o.length||s.length||c.length?[...c,...o,...s]:Qs(e.events),d=Q(t[`gen_ai.input.messages.ref`]),f=Q(t[`gen_ai.output.messages.ref`]),p=u.some(e=>e.role===`system`||e.role===`user`),m=u.some(e=>e.role===`assistant`);if(d&&!p&&u.push({role:`user`,parts:[{kind:`ref`,ref:d,direction:`input`}]}),f&&!m&&u.push({role:`assistant`,parts:[{kind:`ref`,ref:f,direction:`output`}]}),u.length===0){let e=Ws(t[`ai.prompt.messages`]);if(Array.isArray(e))u.push(...e.map(Xs));else{let e=Ws(t[`ai.prompt`]);e&&(Array.isArray(e.messages)?u.push(...e.messages.map(Xs)):(e.system&&u.push({role:`system`,parts:[{kind:`text`,text:e.system}]}),e.prompt&&u.push({role:`user`,parts:[{kind:`text`,text:e.prompt}]})))}let n=Ws(t[`ai.response.toolCalls`]),r=Array.isArray(n)?n.filter(e=>Q(e.toolName)!==void 0).map(e=>({id:e.toolCallId,name:e.toolName,arguments:Ws(e.input??e.args)??e.input??e.args??{}})):void 0,i=Q(t[`ai.response.text`]);if(i||r&&r.length>0){let e=ms(t[`gen_ai.response.finish_reasons`])?.[0]??Q(t[`ai.response.finishReason`]),n=Xs({role:`assistant`,content:i??``});e&&(n.finishReason=e),r&&r.length>0&&(n.toolCalls=r),u.push(n)}}if(u.length===0){let e=Ws(t[`pydantic_ai.all_messages`]);Array.isArray(e)&&u.push(...e.map(Xs))}if(u.length===0){let e=[];for(let n=0;n<32;n++){let r=Q(t[`gen_ai.prompt.${n}.role`])??Q(t[`llm.prompts.${n}.role`]),i=t[`gen_ai.prompt.${n}.content`]??t[`llm.prompts.${n}.content`];if(!r)break;e.push(Xs({role:r,content:i}))}for(let n=0;n<32;n++){let r=Q(t[`gen_ai.completion.${n}.role`])??Q(t[`llm.completions.${n}.role`]),i=t[`gen_ai.completion.${n}.content`]??t[`llm.completions.${n}.content`],a=Q(t[`gen_ai.completion.${n}.finish_reason`]);if(!r)break;let o=Xs({role:r,content:i});a&&(o.finishReason=a),e.push(o)}e.length>0&&(u=e)}u=u.flatMap(e=>{let t=e._toolResults;return t?t.map(e=>({role:`tool`,parts:[{kind:`json`,value:e.value}],toolCallId:e.id})):[e]});let h=[];for(let e of u)e.toolCalls&&h.push(...e.toolCalls);if(h.length>0){let e=new Map;for(let t of h)t.id&&e.set(t.id,t);for(let t of u){if(t.role!==`tool`||!t.toolCallId)continue;let n=e.get(t.toolCallId);if(!n||n.result!==void 0)continue;let r=t.parts.find(e=>e.kind===`text`),i=t.parts.find(e=>e.kind===`json`);r&&r.kind===`text`?n.result=Ws(r.text)??r.text:i&&i.kind===`json`&&(n.result=i.value)}}let g=ec(t),_=Is({provider:n,model:a??i,inputTokens:g.inputTokens,outputTokens:g.outputTokens,cacheReadInputTokens:g.cacheReadInputTokens,cacheCreationInputTokens:g.cacheCreationInputTokens}),v=fs(t[`gen_ai.usage.cost.usd`]),y=v===void 0?_:{currency:`USD`,input:_?.input??0,output:_?.output??0,cacheRead:_?.cacheRead??0,cacheWrite:_?.cacheWrite??0,total:v,source:`reported`},b=tc(t),x=nc(t),{guard:S,warnings:C}=ic(t,e.events),w=ms(t[`gen_ai.response.finish_reasons`]),T=Q(t[`gen_ai.agent.name`]),ee=Q(t[`gen_ai.agent.id`]),te=Q(t[`gen_ai.agent.description`]),ne=Q(t[`gen_ai.tool.name`]),re=Q(t[`gen_ai.tool.call.id`]),ie=Q(t[`gen_ai.handoff.from_agent`]),ae=Q(t[`gen_ai.handoff.to_agent`]),oe=Q(t[`gen_ai.guardrail.name`]),se=ps(t[`gen_ai.guardrail.triggered`]),ce=Q(t[`gen_ai.evaluation.name`]),le=fs(t[`gen_ai.evaluation.score.value`]),E=Q(t[`gen_ai.evaluation.score.label`]),ue=Q(t[`gen_ai.evaluation.explanation`]),de=Q(t[`gen_ai.audio.input.format`]),fe=Q(t[`gen_ai.audio.output.format`]),pe=Q(t[`gen_ai.speech.voice`]),me=Q(t[`gen_ai.speech.input_text`]),he=Q(t[`gen_ai.transcription.text`]),ge=fs(t[`gen_ai.embeddings.dimension.count`]),_e=Q(t[`agent.consent.outcome`]),ve=Q(t[`policy.decision`]),ye=Q(t[`mcp.security.injection.verdict`]),be=Q(t[`agent.action.risk_class`]),xe=Q(t[`agent.input.provenance`]),Se=fs(t[`agent.plan.step_index`]),Ce=Q(t[`security.event`]),we=ps(t[`gen_ai.guard.stopped`]),Te=_e||ve||ye||be||xe||Se!==void 0||Ce||we!==void 0||S?.stopped?{..._e&&{consentOutcome:_e},...ve&&{policyDecision:ve},...ye&&{injectionVerdict:ye},...be&&{actionRiskClass:be},...xe&&{inputProvenance:xe},...Se!==void 0&&{planStepIndex:Se},...Ce&&{securityEvent:Ce},guardStopped:S?.stopped??we}:void 0,Ee={};for(let[e,n]of Object.entries(t))oc.has(e)||e.startsWith(`gen_ai.prompt.`)||e.startsWith(`gen_ai.completion.`)||e.startsWith(`llm.prompts.`)||e.startsWith(`llm.completions.`)||(Ee[e]=n);return{traceId:e.traceId,spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startMs:e.startTime,endMs:e.endTime,status:e.status?.code===`OK`?`ok`:e.status?.code===`ERROR`?`error`:`unset`,errorMessage:e.status?.message,provider:n,operation:r,requestModel:i,responseModel:a,params:{temperature:fs(t[`gen_ai.request.temperature`]),topP:fs(t[`gen_ai.request.top_p`]),topK:fs(t[`gen_ai.request.top_k`]),maxTokens:fs(t[`gen_ai.request.max_tokens`]),stopSequences:ms(t[`gen_ai.request.stop_sequences`]),seed:fs(t[`gen_ai.request.seed`]),frequencyPenalty:fs(t[`gen_ai.request.frequency_penalty`]),presencePenalty:fs(t[`gen_ai.request.presence_penalty`]),choiceCount:fs(t[`gen_ai.request.choice.count`])},messages:u,toolDefinitions:$s(t),toolCalls:h,usage:g,cost:y,streaming:b,guard:S,session:x,warnings:C,finishReasons:w,responseId:Q(t[`gen_ai.response.id`]),agent:ee||T||te?{id:ee,name:T,description:te}:void 0,tool:ne||re?{name:ne,callId:re}:void 0,handoff:ie||ae?{fromAgent:ie,toAgent:ae}:void 0,guardrail:oe||se!==void 0?{name:oe,triggered:se}:void 0,conversationId:Q(t[`gen_ai.conversation.id`]),agentSecurity:Te,evaluation:ce||le!==void 0||E||ue?{name:ce,scoreValue:le,scoreLabel:E,explanation:ue}:void 0,modality:de||fe||pe||me||he||ge?{audioInputFormat:de,audioOutputFormat:fe,speechVoice:pe,speechInputText:me,transcriptionText:he,embeddingDimensions:ge}:void 0,extras:{openaiServiceTier:Q(t[`gen_ai.openai.request.service_tier`])||Q(t[`gen_ai.openai.response.service_tier`])||Q(t[`openai.request.service_tier`])||Q(t[`openai.response.service_tier`])?{request:Q(t[`gen_ai.openai.request.service_tier`])??Q(t[`openai.request.service_tier`]),response:Q(t[`gen_ai.openai.response.service_tier`])??Q(t[`openai.response.service_tier`])}:void 0,openaiSystemFingerprint:Q(t[`gen_ai.openai.response.system_fingerprint`])??Q(t[`openai.response.system_fingerprint`]),openaiResponseFormat:Q(t[`gen_ai.openai.request.response_format`])??Q(t[`openai.request.response_format`]),raw:Ee}}}function cc(e){let t=new Map;for(let n of e){let e=n.attributes??{},r=e[`ai.toolCall.id`];if(typeof r!=`string`)continue;let i=e[`ai.toolCall.result`];if(i!=null){if(typeof i==`string`)try{t.set(r,JSON.parse(i))}catch{t.set(r,i)}else t.set(r,i)}}return t}function lc(e,t){if(t.size!==0){for(let n of e.toolCalls){if(n.result!==void 0||!n.id)continue;let e=t.get(n.id);e!==void 0&&(n.result=e)}for(let n of e.messages)if(n.toolCalls)for(let e of n.toolCalls){if(e.result!==void 0||!e.id)continue;let n=t.get(e.id);n!==void 0&&(e.result=n)}}}function uc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object)continue;let r=String(t);if(r.length>0)return r}}function dc(e,...t){for(let n of t){let t=e[n];if(t==null||t instanceof Object||t===!0||t===!1)continue;let r=Number(t);if(Number.isFinite(r)&&String(t).trim()!==``)return r}}function fc(e,...t){for(let n of t){let t=e[n];if(t===!0||t===`true`)return!0;if(t===!1||t===`false`)return!1}}var pc=[[`claude-opus-4`,15,75],[`claude-sonnet-4`,3,15],[`claude-haiku-4`,.8,4],[`claude-3-5-sonnet`,3,15],[`claude-3-5-haiku`,.8,4],[`claude-3-opus`,15,75],[`claude-3-haiku`,.25,1.25],[`opus`,15,75],[`sonnet`,3,15],[`haiku`,.8,4]];function mc(e,t,n){if(!e)return;let r=e.toLowerCase(),i=pc.find(([e])=>r.includes(e));if(!i)return;let[,a,o]=i;return(t??0)/1e6*a+(n??0)/1e6*o}function hc(...e){return Object.assign({},...e)}function gc(e){return{user:uc(e,`user.id`,`user.account_uuid`,`user.email`),organization:uc(e,`organization.id`),terminal:uc(e,`terminal.type`),appVersion:uc(e,`app.version`),model:uc(e,`model`)}}var _c=`mcp__`;function vc(e){if(!e.startsWith(_c))return{name:e,isMcp:!1};let t=e.slice(5),n=t.indexOf(`__`);if(n===-1)return{name:e,isMcp:!0,mcpServer:t||void 0};let r=t.slice(0,n),i=t.slice(n+2);return{name:e,isMcp:!0,mcpServer:r||void 0,mcpTool:i||void 0}}function yc(e){return e.startsWith(_c)}var bc=[`file`,`shell`,`search`,`web`,`todo`,`subagent`,`skill`,`mcp`,`other`],xc=new Map([[`read`,`file`],[`edit`,`file`],[`write`,`file`],[`multiedit`,`file`],[`notebookedit`,`file`],[`bash`,`shell`],[`bashoutput`,`shell`],[`killshell`,`shell`],[`killbash`,`shell`],[`grep`,`search`],[`glob`,`search`],[`ls`,`search`],[`webfetch`,`web`],[`websearch`,`web`],[`todowrite`,`todo`],[`task`,`subagent`],[`agent`,`subagent`],[`skill`,`skill`]]);function Sc(e){return yc(e)?`mcp`:xc.get(e.toLowerCase())??`other`}function Cc(e){return uc(e,`subagent_type`,`agent_type`,`subagent.type`)}function wc(e){return uc(e,`skill`,`skill_name`,`skill.name`)}var Tc=new Map([[`user_prompt`,`user_prompt`],[`api_request`,`api_request`],[`api_error`,`api_error`],[`api_refusal`,`api_refusal`],[`tool_result`,`tool_result`],[`tool_decision`,`tool_decision`],[`mcp_server_connection`,`mcp_connection`],[`plugin_loaded`,`plugin_loaded`],[`hook_execution_complete`,`hook_execution`]]),Ec=[...Tc.keys()];function Dc(e,t){let n=Sc(e),r={...vc(e),category:n};if(n===`subagent`){let e=Cc(t);e&&(r.subAgentType=e)}else if(n===`skill`){let e=wc(t);e&&(r.skillName=e)}return r}var Oc=new Map([[`lines_of_code.count`,`lines_of_code`],[`commit.count`,`commit`],[`pull_request.count`,`pull_request`],[`active_time.total`,`active_time`]]);function kc(e){let{kind:t,prefix:n,scopeHint:r,serviceHint:i}=e,a=e=>e!==void 0&&e.includes(r),o=e=>{let t=uc(e,`service.name`);return t!==void 0&&t.includes(i)},s=e=>e.startsWith(n)?e.slice(n.length):e;return{kind:t,matchesMetric(e){return e.name.startsWith(n)||a(e.scope?.name)||o(e.resource)},matchesEvent(e){return e.eventName.startsWith(n)||a(e.scope?.name)||o(e.resource)},normalizeEvent(e){let n=hc(e.resource,e.attributes),r=s(e.eventName)||uc(n,`event.name`)||e.eventName,i=Tc.get(r)??`other`,a=uc(n,`session.id`);if(!a)return null;let o={id:`${a}:0`,sessionId:a,agent:t,type:i,rawEventName:r,timestamp:e.timestamp,model:uc(n,`model`),promptId:uc(n,`prompt.id`),attributes:e.attributes};switch((i===`api_request`||i===`api_error`||i===`api_refusal`)&&(o.effort=uc(n,`effort`),o.speed=uc(n,`speed`),o.agentName=uc(n,`agent.name`),o.skillName=uc(n,`skill.name`)),i){case`api_request`:{o.inputTokens=dc(n,`input_tokens`),o.outputTokens=dc(n,`output_tokens`),o.cacheReadTokens=dc(n,`cache_read_tokens`),o.contextLineageId=uc(n,`query_source`),o.tokenSource=uc(n,`token_source`)===`estimated`?`estimated`:void 0,o.cacheCreationTokens=dc(n,`cache_creation_tokens`),o.durationMs=dc(n,`duration_ms`);let e=dc(n,`cost_usd`,`cost`);if(e===void 0){let e=mc(o.model,o.inputTokens,o.outputTokens);e!==void 0&&(o.costUsd=e,o.costSource=`estimated`)}else o.costUsd=e,o.costSource=`reported`;break}case`api_refusal`:o.durationMs=dc(n,`duration_ms`);break;case`api_error`:o.errorMessage=uc(n,`error`,`error.message`,`message`),o.statusCode=dc(n,`status_code`,`http.response.status_code`,`http.status_code`),o.durationMs=dc(n,`duration_ms`);break;case`tool_result`:{let e=uc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Dc(e,n)),o.success=fc(n,`success`),o.durationMs=dc(n,`duration_ms`),o.resultBytes=dc(n,`tool_result_size_bytes`);let t=uc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`tool_decision`:{let e=uc(n,`tool_name`,`name`,`tool`);e&&(o.tool=Dc(e,n));let t=uc(n,`decision`);(t===`accept`||t===`reject`)&&(o.decision=t);break}case`user_prompt`:{o.promptLength=dc(n,`prompt_length`,`prompt.length`);let e=uc(n,`prompt`);e&&(o.promptText=e);break}case`mcp_connection`:o.mcpServerName=uc(n,`server_name`,`name`),o.mcpTransport=uc(n,`transport_type`,`transport`),o.mcpStatus=uc(n,`status`),o.durationMs=dc(n,`duration_ms`);break;case`plugin_loaded`:o.pluginName=uc(n,`plugin.name`,`plugin_name`,`name`),o.pluginVersion=uc(n,`plugin.version`,`plugin_version`);break;case`hook_execution`:o.hookName=uc(n,`hook_event`,`hook_name`,`name`),o.hookSuccess=dc(n,`num_success`),o.hookBlocked=dc(n,`num_blocking`),o.hookErrored=dc(n,`num_non_blocking_error`),o.hookCancelled=dc(n,`num_cancelled`)}return o},normalizeMetric(e){let n=Oc.get(s(e.name))??`other`;return e.dataPoints.map(r=>{let i=hc(e.resource,r.attributes);return{agent:t,sessionId:uc(i,`session.id`),identity:gc(i),kind:n,value:r.value,temporality:e.temporality,timestamp:r.timestamp,attributes:r.attributes}})}}}kc({kind:`claude-code`,prefix:`claude_code.`,scopeHint:`claude_code`,serviceHint:`claude-code`});var Ac={handled:Ec,ignored:[`api_request_body`,`api_response_body`,`assistant_response`,`hook_registered`,`hook_execution_start`,`permission_mode_changed`,`auth`]};[...Ac.handled,...Ac.ignored],kc({kind:`opencode`,prefix:`opencode.`,scopeHint:`opencode`,serviceHint:`opencode`});function jc(){return Object.fromEntries(bc.map(e=>[e,0]))}function Mc(){return Object.create(null)}function Nc(){return{requests:0,costUsd:0,inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0}}function Pc(e,t){for(let[n,r]of Object.entries(t)){let t=e[n]??(e[n]=Nc());t.requests+=r.requests,t.costUsd+=r.costUsd,t.inputTokens+=r.inputTokens,t.outputTokens+=r.outputTokens,t.cacheReadTokens+=r.cacheReadTokens,t.cacheCreationTokens+=r.cacheCreationTokens}}function Fc(e){let t={sessions:0,costUsd:0,inputTokens:0,outputTokens:0,apiRequests:0,apiErrors:0,accepted:0,rejected:0,byModel:Mc(),byEffort:Mc(),bySkill:Mc(),byAgent:Mc(),tools:Mc(),toolCategories:jc(),mcpServers:Mc(),subAgents:Mc(),skills:Mc(),mcpConnections:Mc(),plugins:Mc(),hooks:{runs:0,blocked:0,errored:0,cancelled:0}};for(let n of e){t.sessions+=1;let{rollup:e}=n;t.costUsd+=e.costUsd,t.inputTokens+=e.inputTokens,t.outputTokens+=e.outputTokens,t.apiRequests+=e.apiRequests,t.apiErrors+=e.apiErrors,t.accepted+=e.accepted,t.rejected+=e.rejected,Pc(t.byModel,e.byModel),Pc(t.byEffort,e.byEffort),Pc(t.bySkill,e.bySkill),Pc(t.byAgent,e.byAgent);for(let n of Object.values(e.tools))t.tools[n.name]=(t.tools[n.name]??0)+n.count,n.isMcp&&n.mcpServer&&(t.mcpServers[n.mcpServer]=(t.mcpServers[n.mcpServer]??0)+n.count);for(let n of bc)t.toolCategories[n]+=e.toolCategories[n];for(let[n,r]of Object.entries(e.subAgents))t.subAgents[n]=(t.subAgents[n]??0)+r;for(let[n,r]of Object.entries(e.skills))t.skills[n]=(t.skills[n]??0)+r;for(let n of Object.values(e.mcpConnections)){let e=t.mcpConnections[n.name]??{name:n.name,transport:n.transport,connected:!1,connects:0,disconnects:0};e.connects+=n.connects,e.disconnects+=n.disconnects,e.connected=e.connected||n.connected,n.transport&&(e.transport=n.transport),t.mcpConnections[n.name]=e}for(let n of Object.values(e.plugins))t.plugins[n.name]=n;t.hooks.runs+=e.hooks.runs,t.hooks.blocked+=e.hooks.blocked,t.hooks.errored+=e.hooks.errored,t.hooks.cancelled+=e.hooks.cancelled}return t}var Ic=cs(!1),Lc=cs({x:20,y:20}),Rc=cs(`bottom-right`),zc=cs(`bottom`),Bc=cs(!1),Vc=cs(`traces`),Hc=cs(null),Uc=cs(null),Wc=cs(null);function Gc(e,t){Wc.value={traceId:e,spanId:t}}var Kc=cs(`system`);function qc(){try{let e=localStorage.getItem(`autotel-devtools-theme`);if(e===`light`||e===`dark`||e===`system`)return e}catch{}return`system`}var Jc=[`system`,`light`,`dark`];function Yc(){let e=Jc[(Jc.indexOf(Kc.value)+1)%Jc.length];Kc.value=e;try{localStorage.setItem(`autotel-devtools-theme`,e)}catch{}}var Xc=`autotel-devtools-editor`;function Zc(){try{let e=localStorage.getItem(Xc);if(e===`vscode`||e===`cursor`||e===`webstorm`)return e}catch{}return`vscode`}var Qc=cs(Zc());function $c(e){Qc.value=e;try{localStorage.setItem(Xc,e)}catch{}}var el=cs(null);function tl(e){el.value=e}function nl(){el.value=null}function rl(e){el.value=el.value?null:e}var il={vertical:440,horizontal:560},al=cs({...il});function ol(e){return globalThis.window===void 0?e===`vertical`?{min:200,max:900}:{min:360,max:1200}:e===`vertical`?{min:200,max:Math.round(window.innerHeight*.92)}:{min:360,max:Math.round(window.innerWidth*.92)}}function sl(e,t){let{min:n,max:r}=ol(e),i=Math.min(r,Math.max(n,Math.round(t)));al.value={...al.value,[e]:i}}function cl(e){sl(e,il[e])}var ll=cs([]),ul=cs({connectionStatus:`disconnected`}),dl=cs([]),fl=cs([]),pl=cs(`disconnected`),ml=cs(null),hl=cs(xs),gl=cs([]),_l=cs([]),vl=cs(`pending`),yl=ls(()=>{if(vl.value===`ready`)return gl.value;let e=ws(hl.value,Date.now());if(Ts(e))return ll.value;let{start:t,end:n}=e;return ll.value.filter(e=>e.startTime>=t&&e.startTime<=n)}),bl=cs(0),xl=15e3,Sl=[];function Cl(e,t,n){if(e+t+n===0)return;let r=Date.now();Sl.push({t:r,traces:e,logs:t,metrics:n});let i=r-xl;(Sl.length>1024||Sl[0].t<i)&&(Sl=Sl.filter(e=>e.t>=i)),bl.value+=1}function wl(e=5e3,t=Date.now()){let n=t-e,r=0,i=0,a=0;for(let e of Sl)e.t>=n&&(r+=e.traces,i+=e.logs,a+=e.metrics);let o=e/1e3;return{traces:r/o,logs:i/o,metrics:a/o,total:(r+i+a)/o}}var Tl=cs(!1),El=cs([]),Dl=cs([]),Ol=ls(()=>El.value.length),kl=ls(()=>Dl.value.length),Al=cs(!1),jl=ls(()=>ll.value.filter(e=>e.status===`ERROR`)),Ml=ls(()=>{let e=jl.value;return Ic.value?0:e.length}),Nl=cs({key:`time`,dir:`desc`}),Pl=cs(``),Fl=cs(`all`),Il=cs(0),Ll=cs(new Set);function Rl(e){let t=new Set(Ll.value);t.has(e)?t.delete(e):t.add(e),Ll.value=t}function zl(){Ll.value.size>0&&(Ll.value=new Set)}var Bl=cs(``),Vl=new Map([[`time`,`desc`],[`duration`,`desc`],[`spans`,`desc`],[`service`,`asc`],[`name`,`asc`],[`status`,`desc`]]);function Hl(e){let t=Nl.value;Nl.value=t.key===e?{key:e,dir:t.dir===`asc`?`desc`:`asc`}:{key:e,dir:Vl.get(e)??`desc`}}var Ul=new Set([`service`,`name`]);function Wl(e,t){return(t===`service`?e.service:e.rootSpan?.name)??``}function Gl(e,t){switch(t){case`duration`:return e.duration;case`spans`:return e.spans.length;case`status`:return+(e.status===`ERROR`);default:return e.startTime}}function Kl(e,t,n){return Ul.has(n)?Wl(e,n).localeCompare(Wl(t,n)):Gl(e,n)-Gl(t,n)}var ql=ls(()=>{let{key:e,dir:t}=Nl.value,n=t===`asc`?1:-1;return[...ll.value].sort((t,r)=>{let i=Kl(t,r,e);return i===0?r.startTime-t.startTime:i*n})}),Jl=ls(()=>[...fl.value].sort((e,t)=>t.timestamp-e.timestamp)),Yl=cs([]),Xl=cs(null),Zl=ls(()=>[...Yl.value].sort((e,t)=>t.lastSeen-e.lastSeen)),Ql=ls(()=>Fc(Yl.value)),$l=ls(()=>{let e=Zl.value;if(e.length===0)return null;let t=Xl.value;return e.find(e=>e.id===t)??e[0]});function eu(e){Xl.value=e}var tu=ls(()=>ys({traces:yl.value,logs:fl.value,errors:dl.value})),nu=ls(()=>{let e=[];for(let t of yl.value){let n=cc(t.spans);for(let r of t.spans){if(!Ms(r))continue;let i=sc(r);lc(i,n),e.push({raw:r,normalized:i,service:t.service,traceId:t.traceId})}}return e.sort((e,t)=>t.normalized.startMs-e.normalized.startMs),e}),ru=ls(()=>nu.value.length),iu=ls(()=>yl.value.filter(e=>e.spans.length>1).length),au=ls(()=>{if(vl.value===`ready`)return _l.value;let e=ws(hl.value,Date.now());if(Ts(e))return dl.value;let{start:t,end:n}=e;return dl.value.filter(e=>e.lastSeen>=t&&e.firstSeen<=n)}),ou=ls(()=>[...au.value].sort((e,t)=>t.lastSeen-e.lastSeen)),su=ls(()=>[...au.value].sort((e,t)=>t.count-e.count)),cu=ls(()=>au.value.reduce((e,t)=>e+t.count,0)),lu=ls(()=>{let e=Date.now()-36e5;return dl.value.filter(t=>t.lastSeen>e).reduce((e,t)=>e+t.count,0)}),uu=ls(()=>{let e=Hc.value;return e&&yl.value.find(t=>t.traceId===e)||null}),du=cs(new Set);function fu(e){let t=new Set(du.value);t.has(e)?t.delete(e):t.add(e),du.value=t}function pu(){du.value=new Set(yl.value.map(e=>e.traceId))}function mu(){du.value=new Set}function hu(){let e=du.value;ll.value=ll.value.filter(t=>!e.has(t.traceId)),gl.value=gl.value.filter(t=>!e.has(t.traceId)),mu(),Hc.value&&e.has(Hc.value)&&(Hc.value=null)}var gu=ls(()=>du.value.size);function _u(e,t){let n=[...t].sort((e,t)=>e.startTime-t.startTime),r=n.find(e=>!e.parentSpanId),i=r??e.rootSpan??n[0],a=Math.min(...n.map(e=>e.startTime)),o=Math.max(...n.map(e=>e.endTime)),s=n.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`,c=ds(i?.attributes,`service.name`);return{...e,rootSpan:i,spans:n,startTime:a,endTime:o,duration:o-a,status:s,service:c??e.service,partial:r===void 0}}function vu(e,t){let n=new Map;for(let t of e.spans)n.set(t.spanId,t);for(let e of t.spans)n.has(e.spanId)||n.set(e.spanId,e);return _u(e,[...n.values()])}function yu(e,t){if(t.length===0)return e;let n=new Map;for(let e of t){let t=n.get(e.traceId);n.set(e.traceId,t?vu(t,e):e)}let r=new Set(e.map(e=>e.traceId)),i=e.map(e=>{let t=n.get(e.traceId);return t?vu(e,t):e});for(let[e,t]of n)r.has(e)||i.push(t);return i}function bu(e,t,n){let r=yu(e,t);return r.length>n?r.slice(-n):r}function xu(e,t){if(t.length===0)return e;let n=[...t,...e];return n.length>Bu?n.slice(0,Bu):n}function Su(e,t,n,r=n){return{ingest(i,a){i.length!==0&&(a?t.value=r(t.value,i):e.value=n(e.value,i))},flushToLive(){t.value.length!==0&&(e.value=n(e.value,t.value),t.value=[])},clearPending(){t.value=[]}}}var Cu=Su(ll,El,yu,(e,t)=>bu(e,t,Bu)),wu=Su(fl,Dl,xu),Tu=[Cu,wu];function Eu(e){if(Al.value){e.health&&(ul.value=e.health,pl.value=e.health.connectionStatus);return}let t=Tl.value;Cu.ingest(e.traces??[],t),wu.ingest(e.logs??[],t),Cl(e.traces?.length??0,e.logs?.length??0,0),e.health&&(ul.value=e.health,pl.value=e.health.connectionStatus),e.errors&&(dl.value=e.errors),e.agents&&(Yl.value=e.agents)}function Du(e){if(Tl.value!==e&&(Tl.value=e,!e))for(let e of Tu)e.flushToLive()}function Ou(){Du(!Tl.value)}function ku(){for(let e of Tu)e.clearPending()}function Au(e){ll.value=e.traces??[],fl.value=(e.logs??[]).slice(0,Bu),dl.value=e.errors??[],El.value=[],Dl.value=[],Tl.value=!1,Al.value=!0}function ju(){Al.value=!1,ll.value=[],fl.value=[],dl.value=[]}function Mu(){Ic.value=!Ic.value}function Nu(e){Vc.value=e}function Pu(e,t=null){Hc.value=e,Uc.value=e?t:null}function Fu(e,t){Pu(e,t??null),Nu(`traces`)}function Iu(e,t){Lc.value={x:e,y:t}}function Lu(e){Rc.value=e}function Ru(e){zc.value=e}function zu(){let e=[`bottom`,`right`,`left`],t=zc.value??`bottom`;zc.value=e[(e.indexOf(t)+1)%e.length]}var Bu=100;function Vu(){ll.value=[],gl.value=[],dl.value=[],_l.value=[],fl.value=[],Yl.value=[],Xl.value=null,El.value=[],Dl.value=[],du.value=new Set,Hc.value=null,Uc.value=null,vl.value=`pending`,Al.value=!1}function Hu(e){if(e.length===0)return;let t=new Set(ll.value.map(e=>e.traceId)),n=e.filter(e=>!t.has(e.traceId));n.length>0?(console.log(`[Autotel Devtools] Importing ${n.length} trace(s)`),ll.value=[...ll.value,...n]):console.log(`[Autotel Devtools] No new traces to import (all duplicates)`)}var Uu=cs(`local`),Wu=`autotel-devtools-widget-state`;function Gu(){try{let e=localStorage.getItem(Wu);if(e){let t=JSON.parse(e);t.position&&(Lc.value=t.position),t.corner&&(Rc.value=t.corner),t.docked&&(zc.value=t.docked),t.panelSize&&(al.value={vertical:Number(t.panelSize.vertical)||440,horizontal:Number(t.panelSize.horizontal)||560}),typeof t.timeZone==`string`&&(Uu.value=t.timeZone)}}catch(e){console.error(`[Autotel Devtools] Failed to load persisted state:`,e)}}function Ku(){try{let e={position:Lc.value,corner:Rc.value,docked:zc.value,panelSize:al.value,timeZone:Uu.value};localStorage.setItem(Wu,JSON.stringify(e))}catch(e){console.error(`[Autotel Devtools] Failed to persist state:`,e)}}us(()=>{Lc.value,Rc.value,zc.value,Uu.value,al.value,Ku()});var qu=Object.keys({traces:!0,compare:!0,coverage:!0,agents:!0,resources:!0,"service-map":!0,metrics:!0,logs:!0,errors:!0,genai:!0,flow:!0,security:!0,webmcp:!0});function Ju(e,t){return e.find(e=>e===t)}function Yu(e){return Ju(qu,e)!==void 0}var Xu=[`time`,`duration`,`spans`,`service`,`name`,`status`],Zu=[`error`,`ok`],Qu={key:`time`,dir:`desc`};function $u(e){if(!e)return;let[t,n]=e.split(`:`),r=Ju(Xu,t);return r&&{key:r,dir:n===`asc`?`asc`:`desc`}}function ed(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{};let n=new URLSearchParams(t),r={},i=n.get(`tab`);Yu(i)&&(r.tab=i);let a=n.get(`trace`)||void 0;a&&(r.traceId=a);let o=n.get(`span`)||void 0;a&&o&&(r.spanId=o);let s=n.get(`q`)||void 0;s&&(r.q=s);let c=Ju(Zu,n.get(`status`));c&&(r.status=c);let l=n.get(`min`),u=l==null?NaN:Number(l);Number.isFinite(u)&&u>0&&(r.minDuration=u);let d=n.get(`window`);d&&(r.window=ks(d));let f=$u(n.get(`sort`));f&&(r.sort=f);let p=n.get(`gq`)||void 0;return p&&(r.genaiQuery=p),r}function td(e){let t=new URLSearchParams;if(e.tab&&t.set(`tab`,e.tab),e.traceId&&t.set(`trace`,e.traceId),e.traceId&&e.spanId&&t.set(`span`,e.spanId),e.q&&t.set(`q`,e.q),e.status&&e.status!==`all`&&t.set(`status`,e.status),e.minDuration&&e.minDuration>0&&t.set(`min`,String(e.minDuration)),e.window){let n=Os(e.window);n&&t.set(`window`,n)}e.sort&&(e.sort.key!==Qu.key||e.sort.dir!==Qu.dir)&&t.set(`sort`,`${e.sort.key}:${e.sort.dir}`),e.genaiQuery&&t.set(`gq`,e.genaiQuery);let n=t.toString();return n?`#${n}`:``}function nd(e,t){return e&&(e.tab!==t.tab||e.traceId!==t.traceId||e.spanId!==t.spanId)?`push`:`replace`}var rd=new Set([`$$slots`,`$$events`,`$$legacy`,`fill`,`width`,`height`]),id=ca(`<svg><circle cx="17" cy="20" r="3" fill="#9AAAB4"></circle><path fill="#DA2F47" d="M19.235 17.059a1.003 1.003 0 0 1-1.353.412L5.529 10.883a1.004 1.004 0 0 1-.412-1.353L7.94 4.235c.259-.485.868-.67 1.353-.412l12.353 6.588c.485.259.671.868.412 1.353z"></path><path fill="#DA2F47" d="M31.177 22.293a1.004 1.004 0 0 1-1.354.412l-9.705-5.176a1.004 1.004 0 0 1-.412-1.354l1.882-3.529c.259-.485.868-.67 1.354-.412l9.705 5.176c.485.259.671.868.412 1.354z"></path><path fill="#BB1A34" d="m19.235 17.058 2.824-5.293 1.765.941L20.999 18z"></path><path fill="#9D0522" d="m28.942 22.235 2.823-5.294 3.53 1.882-2.824 5.294z"></path><path fill="#292F33" d="m8.294 7.824 1.882-3.53-.881-.47v-.001L4.882 1.471a1.003 1.003 0 0 0-1.353.411L.706 7.177a1 1 0 0 0 .412 1.353l3.529 1.882 1.766.941.47-.882zM23 25a2 2 0 0 1-2 2h-8a2 2 0 0 1 0-4h8a2 2 0 0 1 2 2"></path><path fill="#9AAAB4" d="m9.467 36 3.344-7.152c.468-1 .036-2.191-.965-2.658a1.997 1.997 0 0 0-2.658.965L5.052 36zm15.065 0h4.416l-4.137-8.846a1.997 1.997 0 0 0-2.658-.965 2 2 0 0 0-.965 2.658zM19 36v-8a2 2 0 0 0-4 0v8z"></path></svg>`);function ad(e,t){let n=Z(t,`width`,3,40),r=Z(t,`height`,3,40),i=Y(t,rd);var a=id();Do(a,()=>({width:n(),height:r(),viewBox:`0 0 36 36`,xmlns:`http://www.w3.org/2000/svg`,...i})),H(e,a)}function od(e){let t=e<0,n=Math.abs(e),r;if(n===0)r=`0`;else if(n<.001)r=`${(n*1e6).toFixed(0)}ns`;else if(n<1)r=`${(n*1e3).toFixed(2).replace(/\.?0+$/,``)}µs`;else if(n<1e3)r=`${n.toFixed(2).replace(/\.?0+$/,``)}ms`;else if(n<6e4)r=`${(n/1e3).toFixed(2).replace(/\.?0+$/,``)}s`;else{let e=Math.floor(n/6e4),t=Math.floor(n%6e4/1e3);r=t>0?`${e}m ${t}s`:`${e}m`}return t?`⚠ ${r}`:r}function sd(e){let t=new Date(e),n=new Date().getTime()-t.getTime();if(n<6e4){let e=Math.floor(n/1e3);return e<=1?`just now`:`${e}s ago`}return n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleTimeString()}function cd(e){return new Intl.NumberFormat().format(e)}function ld(e){switch(e){case`OK`:return`text-green-600`;case`ERROR`:return`text-red-600`;default:return`text-gray-500`}}function ud(e,t,n,r){let i=n/2,a=r/2;return e<i&&t<a?{corner:`top-left`,x:20,y:20}:e>=i&&t<a?{corner:`top-right`,x:n-100,y:20}:e<i&&t>=a?{corner:`bottom-left`,x:20,y:r-100}:{corner:`bottom-right`,x:n-100,y:r-100}}function dd(e,t,n){return Math.min(Math.max(e,t),n)}function fd(e){return e.replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g,`«email»`).replace(/\b(sk|pk|ghp|xox[baprs])[-_][A-Za-z0-9]{8,}\b/g,`«secret»`).replace(/\b[A-Za-z0-9_-]{32,}\b/g,`«token»`)}var pd=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},md=(e,t)=>({classGroupId:e,validator:t}),hd=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gd=`-`,_d=[],vd=`arbitrary..`,yd=e=>{let t=Sd(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return xd(e);let n=e.split(gd);return bd(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?pd(i,t):t:i||_d}return n[e]||_d}}},bd=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=bd(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(gd):e.slice(t).join(gd),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},xd=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?vd+r:void 0})(),Sd=e=>{let{theme:t,classGroups:n}=e;return Cd(n,t)},Cd=(e,t)=>{let n=hd();for(let r in e){let i=e[r];wd(i,n,r,t)}return n},wd=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Td(i,t,n,r)}},Td=(e,t,n,r)=>{if(typeof e==`string`){Ed(e,t,n);return}if(typeof e==`function`){Dd(e,t,n,r);return}Od(e,t,n,r)},Ed=(e,t,n)=>{let r=e===``?t:kd(t,e);r.classGroupId=n},Dd=(e,t,n,r)=>{if(Ad(e)){wd(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(md(n,e))},Od=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];wd(o,kd(t,a),n,r)}},kd=(e,t)=>{let n=e,r=t.split(gd),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=hd(),n.nextPart.set(t,i)),n=i}return n},Ad=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,jd=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Md=`!`,Nd=`:`,Pd=[],Fd=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Id=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Nd){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Md)?(c=s.slice(0,-1),l=!0):s.startsWith(Md)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Fd(t,l,c,u)};if(t){let e=t+Nd,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Fd(Pd,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ld=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Rd=e=>({cache:jd(e.cacheSize),parseClassName:Id(e),sortModifiers:Ld(e),postfixLookupClassGroupIds:zd(e),...yd(e)}),zd=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Bd=/\s+/,Vd=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Bd),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Md:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Hd=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ud(n))&&(i&&(i+=` `),i+=r);return i},Ud=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ud(e[r]))&&(n&&(n+=` `),n+=t);return n},Wd=(e,...t)=>{let n,r,i,a,o=o=>(n=Rd(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Vd(e,n);return i(e,a),a};return a=o,(...e)=>a(Hd(...e))},Gd=[],Kd=e=>{let t=t=>t[e]||Gd;return t.isThemeGetter=!0,t},qd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Xd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$d=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ef=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tf=e=>Yd.test(e),nf=e=>!!e&&!Number.isNaN(Number(e)),rf=e=>!!e&&Number.isInteger(Number(e)),af=e=>e.endsWith(`%`)&&nf(e.slice(0,-1)),of=e=>Xd.test(e),sf=()=>!0,cf=e=>Zd.test(e)&&!Qd.test(e),lf=()=>!1,uf=e=>$d.test(e),df=e=>ef.test(e),ff=e=>!hf(e)&&!Cf(e),pf=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),mf=e=>jf(e,Ff,lf),hf=e=>qd.test(e),gf=e=>jf(e,If,cf),_f=e=>jf(e,Lf,nf),vf=e=>jf(e,zf,sf),yf=e=>jf(e,Rf,lf),bf=e=>jf(e,Nf,lf),xf=e=>jf(e,Pf,df),Sf=e=>jf(e,Bf,uf),Cf=e=>Jd.test(e),wf=e=>Mf(e,If),Tf=e=>Mf(e,Rf),Ef=e=>Mf(e,Nf),Df=e=>Mf(e,Ff),Of=e=>Mf(e,Pf),kf=e=>Mf(e,Bf,!0),Af=e=>Mf(e,zf,!0),jf=(e,t,n)=>{let r=qd.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mf=(e,t,n=!1)=>{let r=Jd.exec(e);return r?r[1]?t(r[1]):n:!1},Nf=e=>e===`position`||e===`percentage`,Pf=e=>e===`image`||e===`url`,Ff=e=>e===`length`||e===`size`||e===`bg-size`,If=e=>e===`length`,Lf=e=>e===`number`,Rf=e=>e===`family-name`,zf=e=>e===`number`||e===`weight`,Bf=e=>e===`shadow`,Vf=Wd(()=>{let e=Kd(`color`),t=Kd(`font`),n=Kd(`text`),r=Kd(`font-weight`),i=Kd(`tracking`),a=Kd(`leading`),o=Kd(`breakpoint`),s=Kd(`container`),c=Kd(`spacing`),l=Kd(`radius`),u=Kd(`shadow`),d=Kd(`inset-shadow`),f=Kd(`text-shadow`),p=Kd(`drop-shadow`),m=Kd(`blur`),h=Kd(`perspective`),g=Kd(`aspect`),_=Kd(`ease`),v=Kd(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Cf,hf],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Cf,hf,c],T=()=>[tf,`full`,`auto`,...w()],ee=()=>[rf,`none`,`subgrid`,Cf,hf],te=()=>[`auto`,{span:[`full`,rf,Cf,hf]},rf,Cf,hf],ne=()=>[rf,`auto`,Cf,hf],re=()=>[`auto`,`min`,`max`,`fr`,Cf,hf],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ae=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],oe=()=>[`auto`,...w()],se=()=>[tf,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ce=()=>[tf,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],le=()=>[tf,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],E=()=>[e,Cf,hf],ue=()=>[...b(),Ef,bf,{position:[Cf,hf]}],de=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],fe=()=>[`auto`,`cover`,`contain`,Df,mf,{size:[Cf,hf]}],pe=()=>[af,wf,gf],me=()=>[``,`none`,`full`,l,Cf,hf],he=()=>[``,nf,wf,gf],ge=()=>[`solid`,`dashed`,`dotted`,`double`],_e=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ve=()=>[nf,af,Ef,bf],ye=()=>[``,`none`,m,Cf,hf],be=()=>[`none`,nf,Cf,hf],xe=()=>[`none`,nf,Cf,hf],Se=()=>[nf,Cf,hf],Ce=()=>[tf,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[of],breakpoint:[of],color:[sf],container:[of],"drop-shadow":[of],ease:[`in`,`out`,`in-out`],font:[ff],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[of],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[of],shadow:[of],spacing:[`px`,nf],text:[of],"text-shadow":[of],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,tf,hf,Cf,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Cf,hf]}],"container-named":[pf],columns:[{columns:[nf,hf,Cf,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[rf,`auto`,Cf,hf]}],basis:[{basis:[tf,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[nf,tf,`auto`,`initial`,`none`,hf]}],grow:[{grow:[``,nf,Cf,hf]}],shrink:[{shrink:[``,nf,Cf,hf]}],order:[{order:[rf,`first`,`last`,`none`,Cf,hf]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...ae(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ae()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...ae(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ae(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...ae(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ae()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:oe()}],mx:[{mx:oe()}],my:[{my:oe()}],ms:[{ms:oe()}],me:[{me:oe()}],mbs:[{mbs:oe()}],mbe:[{mbe:oe()}],mt:[{mt:oe()}],mr:[{mr:oe()}],mb:[{mb:oe()}],ml:[{ml:oe()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:se()}],"inline-size":[{inline:[`auto`,...ce()]}],"min-inline-size":[{"min-inline":[`auto`,...ce()]}],"max-inline-size":[{"max-inline":[`none`,...ce()]}],"block-size":[{block:[`auto`,...le()]}],"min-block-size":[{"min-block":[`auto`,...le()]}],"max-block-size":[{"max-block":[`none`,...le()]}],w:[{w:[s,`screen`,...se()]}],"min-w":[{"min-w":[s,`screen`,`none`,...se()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...se()]}],h:[{h:[`screen`,`lh`,...se()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...se()]}],"max-h":[{"max-h":[`screen`,`lh`,...se()]}],"font-size":[{text:[`base`,n,wf,gf]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Af,vf]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,af,hf]}],"font-family":[{font:[Tf,yf,t]}],"font-features":[{"font-features":[hf]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Cf,hf]}],"line-clamp":[{"line-clamp":[nf,`none`,Cf,_f]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Cf,hf]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Cf,hf]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ge(),`wavy`]}],"text-decoration-thickness":[{decoration:[nf,`from-font`,`auto`,Cf,gf]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[nf,`auto`,Cf,hf]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[rf,Cf,hf]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Cf,hf]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Cf,hf]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},rf,Cf,hf],radial:[``,Cf,hf],conic:[rf,Cf,hf]},Of,xf]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":he()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ge(),`hidden`,`none`]}],"divide-style":[{divide:[...ge(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...ge(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[nf,Cf,hf]}],"outline-w":[{outline:[``,nf,wf,gf]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,kf,Sf]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,kf,Sf]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:he()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[nf,gf]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,kf,Sf]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[nf,Cf,hf]}],"mix-blend":[{"mix-blend":[..._e(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[nf]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[Cf,hf]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[nf]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Cf,hf]}],filter:[{filter:[``,`none`,Cf,hf]}],blur:[{blur:ye()}],brightness:[{brightness:[nf,Cf,hf]}],contrast:[{contrast:[nf,Cf,hf]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,kf,Sf]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,nf,Cf,hf]}],"hue-rotate":[{"hue-rotate":[nf,Cf,hf]}],invert:[{invert:[``,nf,Cf,hf]}],saturate:[{saturate:[nf,Cf,hf]}],sepia:[{sepia:[``,nf,Cf,hf]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Cf,hf]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[nf,Cf,hf]}],"backdrop-contrast":[{"backdrop-contrast":[nf,Cf,hf]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,nf,Cf,hf]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nf,Cf,hf]}],"backdrop-invert":[{"backdrop-invert":[``,nf,Cf,hf]}],"backdrop-opacity":[{"backdrop-opacity":[nf,Cf,hf]}],"backdrop-saturate":[{"backdrop-saturate":[nf,Cf,hf]}],"backdrop-sepia":[{"backdrop-sepia":[``,nf,Cf,hf]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Cf,hf]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[nf,`initial`,Cf,hf]}],ease:[{ease:[`linear`,`initial`,_,Cf,hf]}],delay:[{delay:[nf,Cf,hf]}],animate:[{animate:[`none`,v,Cf,hf]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Cf,hf]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Cf,hf,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[rf,Cf,hf]}],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Cf,hf]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":E()}],"scrollbar-track-color":[{"scrollbar-track":E()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Cf,hf]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[nf,wf,gf,_f]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),$=(...e)=>Vf(eo(e)),Hf=V(`<button title="Autolemetry Observability"><!></button>`);function Uf(e,t){it(t,!0);let n=N(void 0),r=!1,i={x:0,y:0},a=M(()=>Lc.value),o=M(()=>Ml.value),s=M(()=>Ic.value),c=M(()=>z(o)>0),l=M(()=>z(c)?`#DA2F47`:`#22c55e`);function u(e){e.button===0&&(r=!0,i={x:e.clientX-z(a).x,y:e.clientY-z(a).y},z(n)?.setPointerCapture(e.pointerId),e.preventDefault())}function d(e){r&&Iu(dd(e.clientX-i.x,0,window.innerWidth-48),dd(e.clientY-i.y,0,window.innerHeight-48))}function f(e){if(!r)return;r=!1,z(n)?.releasePointerCapture(e.pointerId);let t=ud(z(a).x,z(a).y,window.innerWidth,window.innerHeight);Iu(t.x,t.y),Lu(t.corner)}function p(){r||Mu()}var m=ua(),h=I(m),g=e=>{var t=Hf(),r=F(t);{let e=M(()=>z(c)?`#fff`:void 0);ad(r,{get fill(){return z(e)},width:28,height:28})}D(t),Ho(t,e=>P(n,e),()=>z(n)),R(e=>{q(t,1,e),so(t,`width: 48px; height: 48px; left: ${z(a).x??``}px; top: ${z(a).y??``}px; transform: translate3d(0, 0, 0); border-color: ${z(l)??``};`)},[()=>K($(`fixed z-[1000] rounded-full border-2 shadow-md`,`flex items-center justify-center cursor-pointer touch-none`,`transition-all duration-150 select-none`,`hover:shadow-lg`,`bg-surface hover:bg-subtle`))]),B(`click`,t,p),B(`pointerdown`,t,u),B(`pointermove`,t,d),B(`pointerup`,t,f),H(e,t)};W(h,e=>{z(s)||e(g)}),H(e,m),at()}ea([`click`,`pointerdown`,`pointermove`,`pointerup`]);var Wf={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Gf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Kf=Symbol(`lucide-context`),qf=()=>et(Kf),Jf=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Yf=ca(`<svg><!><!></svg>`);function Xf(e,t){it(t,!0);let n=qf()??{},r=Z(t,`color`,19,()=>n.color??`currentColor`),i=Z(t,`size`,19,()=>n.size??24),a=Z(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Z(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Z(t,`iconNode`,19,()=>[]),c=Y(t,Jf),l=M(()=>o()?Number(a())*24/Number(i()):a());var u=Yf();Do(u,e=>({...Wf,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":z(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!Gf(c)&&{"aria-hidden":`true`}]);var d=F(u);G(d,17,s,ka,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=ua();Xa(I(a),r,!0,(e,t)=>{Do(e,()=>({...i()}))}),H(e,a)}),Ra(L(d),()=>t.children??p),D(u),H(e,u),at()}var Zf=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qf(e,t){let n=Y(t,Zf),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Xf(e,X({name:`activity`},()=>n,{get iconNode(){return r}}))}var $f=new Set([`$$slots`,`$$events`,`$$legacy`]);function ep(e,t){let n=Y(t,$f),r=[[`path`,{d:`M12 5v14`}],[`path`,{d:`m19 12-7 7-7-7`}]];Xf(e,X({name:`arrow-down`},()=>n,{get iconNode(){return r}}))}var tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function np(e,t){let n=Y(t,tp),r=[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]];Xf(e,X({name:`arrow-left`},()=>n,{get iconNode(){return r}}))}var rp=new Set([`$$slots`,`$$events`,`$$legacy`]);function ip(e,t){let n=Y(t,rp),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];Xf(e,X({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var ap=new Set([`$$slots`,`$$events`,`$$legacy`]);function op(e,t){let n=Y(t,ap),r=[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]];Xf(e,X({name:`arrow-up`},()=>n,{get iconNode(){return r}}))}var sp=new Set([`$$slots`,`$$events`,`$$legacy`]);function cp(e,t){let n=Y(t,sp),r=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]];Xf(e,X({name:`blocks`},()=>n,{get iconNode(){return r}}))}var lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function up(e,t){let n=Y(t,lp),r=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]];Xf(e,X({name:`bot`},()=>n,{get iconNode(){return r}}))}var dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function fp(e,t){let n=Y(t,dp),r=[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}],[`path`,{d:`m7 16.5-4.74-2.85`}],[`path`,{d:`m7 16.5 5-3`}],[`path`,{d:`M7 16.5v5.17`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}],[`path`,{d:`m17 16.5-5-3`}],[`path`,{d:`m17 16.5 4.74-2.85`}],[`path`,{d:`M17 16.5v5.17`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}],[`path`,{d:`M12 8 7.26 5.15`}],[`path`,{d:`m12 8 4.74-2.85`}],[`path`,{d:`M12 13.5V8`}]];Xf(e,X({name:`boxes`},()=>n,{get iconNode(){return r}}))}var pp=new Set([`$$slots`,`$$events`,`$$legacy`]);function mp(e,t){let n=Y(t,pp),r=[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]];Xf(e,X({name:`brain`},()=>n,{get iconNode(){return r}}))}var hp=new Set([`$$slots`,`$$events`,`$$legacy`]);function gp(e,t){let n=Y(t,hp),r=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]];Xf(e,X({name:`camera`},()=>n,{get iconNode(){return r}}))}var _p=new Set([`$$slots`,`$$events`,`$$legacy`]);function vp(e,t){let n=Y(t,_p),r=[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]];Xf(e,X({name:`chart-column`},()=>n,{get iconNode(){return r}}))}var yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function bp(e,t){let n=Y(t,yp),r=[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V9`}],[`path`,{d:`M19 21V3`}]];Xf(e,X({name:`chart-no-axes-column-increasing`},()=>n,{get iconNode(){return r}}))}var xp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sp(e,t){let n=Y(t,xp),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];Xf(e,X({name:`check`},()=>n,{get iconNode(){return r}}))}var Cp=new Set([`$$slots`,`$$events`,`$$legacy`]);function wp(e,t){let n=Y(t,Cp),r=[[`path`,{d:`m6 9 6 6 6-6`}]];Xf(e,X({name:`chevron-down`},()=>n,{get iconNode(){return r}}))}var Tp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ep(e,t){let n=Y(t,Tp),r=[[`path`,{d:`m15 18-6-6 6-6`}]];Xf(e,X({name:`chevron-left`},()=>n,{get iconNode(){return r}}))}var Dp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Op(e,t){let n=Y(t,Dp),r=[[`path`,{d:`m9 18 6-6-6-6`}]];Xf(e,X({name:`chevron-right`},()=>n,{get iconNode(){return r}}))}var kp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ap(e,t){let n=Y(t,kp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]];Xf(e,X({name:`circle-alert`},()=>n,{get iconNode(){return r}}))}var jp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mp(e,t){let n=Y(t,jp),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Xf(e,X({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Np=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pp(e,t){let n=Y(t,Np),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 6v6l4 2`}]];Xf(e,X({name:`clock`},()=>n,{get iconNode(){return r}}))}var Fp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ip(e,t){let n=Y(t,Fp),r=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]];Xf(e,X({name:`code-xml`},()=>n,{get iconNode(){return r}}))}var Lp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rp(e,t){let n=Y(t,Lp),r=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`}],[`path`,{d:`M15 6h1v4`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`}],[`circle`,{cx:`16`,cy:`8`,r:`6`}]];Xf(e,X({name:`coins`},()=>n,{get iconNode(){return r}}))}var zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bp(e,t){let n=Y(t,zp),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];Xf(e,X({name:`copy`},()=>n,{get iconNode(){return r}}))}var Vp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hp(e,t){let n=Y(t,Vp),r=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]];Xf(e,X({name:`cpu`},()=>n,{get iconNode(){return r}}))}var Up=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wp(e,t){let n=Y(t,Up),r=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]];Xf(e,X({name:`database`},()=>n,{get iconNode(){return r}}))}var Gp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kp(e,t){let n=Y(t,Gp),r=[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`}]];Xf(e,X({name:`dollar-sign`},()=>n,{get iconNode(){return r}}))}var qp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jp(e,t){let n=Y(t,qp),r=[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]];Xf(e,X({name:`download`},()=>n,{get iconNode(){return r}}))}var Yp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xp(e,t){let n=Y(t,Yp),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]];Xf(e,X({name:`external-link`},()=>n,{get iconNode(){return r}}))}var Zp=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qp(e,t){let n=Y(t,Zp),r=[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}],[`path`,{d:`m2 2 20 20`}]];Xf(e,X({name:`eye-off`},()=>n,{get iconNode(){return r}}))}var $p=new Set([`$$slots`,`$$events`,`$$legacy`]);function em(e,t){let n=Y(t,$p),r=[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Xf(e,X({name:`eye`},()=>n,{get iconNode(){return r}}))}var tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function nm(e,t){let n=Y(t,tm),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Xf(e,X({name:`file-exclamation-point`},()=>n,{get iconNode(){return r}}))}var rm=new Set([`$$slots`,`$$events`,`$$legacy`]);function im(e,t){let n=Y(t,rm),r=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]];Xf(e,X({name:`file-text`},()=>n,{get iconNode(){return r}}))}var am=new Set([`$$slots`,`$$events`,`$$legacy`]);function om(e,t){let n=Y(t,am),r=[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`}]];Xf(e,X({name:`flag`},()=>n,{get iconNode(){return r}}))}var sm=new Set([`$$slots`,`$$events`,`$$legacy`]);function cm(e,t){let n=Y(t,sm),r=[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`}]];Xf(e,X({name:`flame`},()=>n,{get iconNode(){return r}}))}var lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function um(e,t){let n=Y(t,lm),r=[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`}]];Xf(e,X({name:`funnel`},()=>n,{get iconNode(){return r}}))}var dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function fm(e,t){let n=Y(t,dm),r=[[`path`,{d:`m12 14 4-4`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`}]];Xf(e,X({name:`gauge`},()=>n,{get iconNode(){return r}}))}var pm=new Set([`$$slots`,`$$events`,`$$legacy`]);function mm(e,t){let n=Y(t,pm),r=[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]];Xf(e,X({name:`git-branch`},()=>n,{get iconNode(){return r}}))}var hm=new Set([`$$slots`,`$$events`,`$$legacy`]);function gm(e,t){let n=Y(t,hm),r=[[`circle`,{cx:`18`,cy:`18`,r:`3`}],[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`}]];Xf(e,X({name:`git-compare`},()=>n,{get iconNode(){return r}}))}var _m=new Set([`$$slots`,`$$events`,`$$legacy`]);function vm(e,t){let n=Y(t,_m),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 9h18`}],[`path`,{d:`M3 15h18`}],[`path`,{d:`M9 3v18`}],[`path`,{d:`M15 3v18`}]];Xf(e,X({name:`grid-3x3`},()=>n,{get iconNode(){return r}}))}var ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function bm(e,t){let n=Y(t,ym),r=[[`circle`,{cx:`12`,cy:`9`,r:`1`}],[`circle`,{cx:`19`,cy:`9`,r:`1`}],[`circle`,{cx:`5`,cy:`9`,r:`1`}],[`circle`,{cx:`12`,cy:`15`,r:`1`}],[`circle`,{cx:`19`,cy:`15`,r:`1`}],[`circle`,{cx:`5`,cy:`15`,r:`1`}]];Xf(e,X({name:`grip-horizontal`},()=>n,{get iconNode(){return r}}))}var xm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sm(e,t){let n=Y(t,xm),r=[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`}]];Xf(e,X({name:`hash`},()=>n,{get iconNode(){return r}}))}var Cm=new Set([`$$slots`,`$$events`,`$$legacy`]);function wm(e,t){let n=Y(t,Cm),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 16v-4`}],[`path`,{d:`M12 8h.01`}]];Xf(e,X({name:`info`},()=>n,{get iconNode(){return r}}))}var Tm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Em(e,t){let n=Y(t,Tm),r=[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`}]];Xf(e,X({name:`layers`},()=>n,{get iconNode(){return r}}))}var Dm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Om(e,t){let n=Y(t,Dm),r=[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`}],[`path`,{d:`M14 4h7`}],[`path`,{d:`M14 9h7`}],[`path`,{d:`M14 15h7`}],[`path`,{d:`M14 20h7`}]];Xf(e,X({name:`layout-list`},()=>n,{get iconNode(){return r}}))}var km=new Set([`$$slots`,`$$events`,`$$legacy`]);function Am(e,t){let n=Y(t,km),r=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]];Xf(e,X({name:`link-2`},()=>n,{get iconNode(){return r}}))}var jm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mm(e,t){let n=Y(t,jm),r=[[`path`,{d:`M8 5h13`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`}]];Xf(e,X({name:`list-tree`},()=>n,{get iconNode(){return r}}))}var Nm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pm(e,t){let n=Y(t,Nm),r=[[`path`,{d:`M3 5h.01`}],[`path`,{d:`M3 12h.01`}],[`path`,{d:`M3 19h.01`}],[`path`,{d:`M8 5h13`}],[`path`,{d:`M8 12h13`}],[`path`,{d:`M8 19h13`}]];Xf(e,X({name:`list`},()=>n,{get iconNode(){return r}}))}var Fm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Im(e,t){let n=Y(t,Fm),r=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]];Xf(e,X({name:`maximize-2`},()=>n,{get iconNode(){return r}}))}var Lm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rm(e,t){let n=Y(t,Lm),r=[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}]];Xf(e,X({name:`message-square`},()=>n,{get iconNode(){return r}}))}var zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bm(e,t){let n=Y(t,zm),r=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]];Xf(e,X({name:`minimize-2`},()=>n,{get iconNode(){return r}}))}var Vm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hm(e,t){let n=Y(t,Vm),r=[[`path`,{d:`M5 12h14`}]];Xf(e,X({name:`minus`},()=>n,{get iconNode(){return r}}))}var Um=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wm(e,t){let n=Y(t,Um),r=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`}]];Xf(e,X({name:`monitor`},()=>n,{get iconNode(){return r}}))}var Gm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Km(e,t){let n=Y(t,Gm),r=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]];Xf(e,X({name:`moon`},()=>n,{get iconNode(){return r}}))}var qm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jm(e,t){let n=Y(t,qm),r=[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`}],[`path`,{d:`M12 12V8`}]];Xf(e,X({name:`network`},()=>n,{get iconNode(){return r}}))}var Ym=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xm(e,t){let n=Y(t,Ym),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M3 15h18`}]];Xf(e,X({name:`panel-bottom`},()=>n,{get iconNode(){return r}}))}var Zm=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qm(e,t){let n=Y(t,Zm),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Xf(e,X({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var $m=new Set([`$$slots`,`$$events`,`$$legacy`]);function eh(e,t){let n=Y(t,$m),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]];Xf(e,X({name:`panel-right`},()=>n,{get iconNode(){return r}}))}var th=new Set([`$$slots`,`$$events`,`$$legacy`]);function nh(e,t){let n=Y(t,th),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Xf(e,X({name:`pause`},()=>n,{get iconNode(){return r}}))}var rh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ih(e,t){let n=Y(t,rh),r=[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`}]];Xf(e,X({name:`picture-in-picture-2`},()=>n,{get iconNode(){return r}}))}var ah=new Set([`$$slots`,`$$events`,`$$legacy`]);function oh(e,t){let n=Y(t,ah),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Xf(e,X({name:`play`},()=>n,{get iconNode(){return r}}))}var sh=new Set([`$$slots`,`$$events`,`$$legacy`]);function ch(e,t){let n=Y(t,sh),r=[[`path`,{d:`M12 22v-5`}],[`path`,{d:`M15 8V2`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`}],[`path`,{d:`M9 8V2`}]];Xf(e,X({name:`plug`},()=>n,{get iconNode(){return r}}))}var lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function uh(e,t){let n=Y(t,lh),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Xf(e,X({name:`plus`},()=>n,{get iconNode(){return r}}))}var dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function fh(e,t){let n=Y(t,dh),r=[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`}],[`path`,{d:`M4 6h.01`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`}],[`path`,{d:`M12 18h.01`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`}],[`circle`,{cx:`12`,cy:`12`,r:`2`}],[`path`,{d:`m13.41 10.59 5.66-5.66`}]];Xf(e,X({name:`radar`},()=>n,{get iconNode(){return r}}))}var ph=new Set([`$$slots`,`$$events`,`$$legacy`]);function mh(e,t){let n=Y(t,ph),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Xf(e,X({name:`refresh-cw`},()=>n,{get iconNode(){return r}}))}var hh=new Set([`$$slots`,`$$events`,`$$legacy`]);function gh(e,t){let n=Y(t,hh),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];Xf(e,X({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var _h=new Set([`$$slots`,`$$events`,`$$legacy`]);function vh(e,t){let n=Y(t,_h),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`path`,{d:`m16 16-1.9-1.9`}]];Xf(e,X({name:`scan-search`},()=>n,{get iconNode(){return r}}))}var yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function bh(e,t){let n=Y(t,yh),r=[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}]];Xf(e,X({name:`scan`},()=>n,{get iconNode(){return r}}))}var xh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sh(e,t){let n=Y(t,xh),r=[[`circle`,{cx:`6`,cy:`6`,r:`3`}],[`path`,{d:`M8.12 8.12 12 12`}],[`path`,{d:`M20 4 8.12 15.88`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}],[`path`,{d:`M14.8 14.8 20 20`}]];Xf(e,X({name:`scissors`},()=>n,{get iconNode(){return r}}))}var Ch=new Set([`$$slots`,`$$events`,`$$legacy`]);function wh(e,t){let n=Y(t,Ch),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Xf(e,X({name:`search`},()=>n,{get iconNode(){return r}}))}var Th=new Set([`$$slots`,`$$events`,`$$legacy`]);function Eh(e,t){let n=Y(t,Th),r=[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`}]];Xf(e,X({name:`server`},()=>n,{get iconNode(){return r}}))}var Dh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Oh(e,t){let n=Y(t,Dh),r=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]];Xf(e,X({name:`settings`},()=>n,{get iconNode(){return r}}))}var kh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ah(e,t){let n=Y(t,kh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`M12 8v4`}],[`path`,{d:`M12 16h.01`}]];Xf(e,X({name:`shield-alert`},()=>n,{get iconNode(){return r}}))}var jh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mh(e,t){let n=Y(t,jh),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}]];Xf(e,X({name:`shield`},()=>n,{get iconNode(){return r}}))}var Nh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ph(e,t){let n=Y(t,Nh),r=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`}],[`path`,{d:`M20 2v4`}],[`path`,{d:`M22 4h-4`}],[`circle`,{cx:`4`,cy:`20`,r:`2`}]];Xf(e,X({name:`sparkles`},()=>n,{get iconNode(){return r}}))}var Fh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ih(e,t){let n=Y(t,Fh),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]];Xf(e,X({name:`sun`},()=>n,{get iconNode(){return r}}))}var Lh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rh(e,t){let n=Y(t,Lh),r=[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]];Xf(e,X({name:`tag`},()=>n,{get iconNode(){return r}}))}var zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bh(e,t){let n=Y(t,zh),r=[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]];Xf(e,X({name:`terminal`},()=>n,{get iconNode(){return r}}))}var Vh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hh(e,t){let n=Y(t,Vh),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Xf(e,X({name:`trash-2`},()=>n,{get iconNode(){return r}}))}var Uh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wh(e,t){let n=Y(t,Uh),r=[[`path`,{d:`M16 7h6v6`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`}]];Xf(e,X({name:`trending-up`},()=>n,{get iconNode(){return r}}))}var Gh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kh(e,t){let n=Y(t,Gh),r=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]];Xf(e,X({name:`triangle-alert`},()=>n,{get iconNode(){return r}}))}var qh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jh(e,t){let n=Y(t,qh),r=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]];Xf(e,X({name:`upload`},()=>n,{get iconNode(){return r}}))}var Yh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xh(e,t){let n=Y(t,Yh),r=[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`}],[`circle`,{cx:`12`,cy:`7`,r:`4`}]];Xf(e,X({name:`user`},()=>n,{get iconNode(){return r}}))}var Zh=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qh(e,t){let n=Y(t,Zh),r=[[`path`,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`}],[`path`,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`}],[`path`,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`}]];Xf(e,X({name:`webhook`},()=>n,{get iconNode(){return r}}))}var $h=new Set([`$$slots`,`$$events`,`$$legacy`]);function eg(e,t){let n=Y(t,$h),r=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`}]];Xf(e,X({name:`workflow`},()=>n,{get iconNode(){return r}}))}var tg=new Set([`$$slots`,`$$events`,`$$legacy`]);function ng(e,t){let n=Y(t,tg),r=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]];Xf(e,X({name:`wrench`},()=>n,{get iconNode(){return r}}))}var rg=new Set([`$$slots`,`$$events`,`$$legacy`]);function ig(e,t){let n=Y(t,rg),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Xf(e,X({name:`x`},()=>n,{get iconNode(){return r}}))}var ag=new Set([`$$slots`,`$$events`,`$$legacy`]);function og(e,t){let n=Y(t,ag),r=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]];Xf(e,X({name:`zap`},()=>n,{get iconNode(){return r}}))}function sg(e){let t=e-1;return t*t*t+1}function cg(){return globalThis.window===void 0?null:window.documentPictureInPicture??null}function lg(){return cg()!==null}var ug=null,dg=null;async function fg(e,t,{width:n=720,height:r=560}={}){let i=cg();if(!i||ug)return!1;let a=await i.requestWindow({width:n,height:r});ug=a,a.document.title=e.ownerDocument.title||`autotel devtools`;let o=a.document.createElement(`style`);return o.textContent=`html,body{margin:0;padding:0;height:100%;width:100%;overflow:hidden;background:transparent}`,a.document.head.appendChild(o),dg=e.ownerDocument.createComment(`autotel-pip-placeholder`),e.replaceWith(dg),a.document.body.appendChild(e),a.addEventListener(`pagehide`,()=>mg(t),{once:!0}),!0}function pg(e){if(!ug)return;let t=ug;mg(e);try{t.close()}catch{}}function mg(e){let t=ug;if(!t)return;ug=null;let n=t.document.body.firstElementChild;n&&(dg?.isConnected?dg.replaceWith(n):document.body.appendChild(n)),dg=null,e?.()}var hg=[{fill:`#ede9fe`,stroke:`#8b5cf6`},{fill:`#ccfbf1`,stroke:`#14b8a6`},{fill:`#dbeafe`,stroke:`#3b82f6`},{fill:`#fef9c3`,stroke:`#ca8a04`},{fill:`#fce7f3`,stroke:`#db2777`},{fill:`#dcfce7`,stroke:`#16a34a`},{fill:`#ffedd5`,stroke:`#ea580c`},{fill:`#e0e7ff`,stroke:`#6366f1`}];function gg(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return hg[t%hg.length]}var _g=[{keys:[`1-6`],description:`Switch between tabs (Traces through Errors)`},{keys:[`?`],description:`Show/hide this shortcuts help`},{keys:[`Esc`],description:`Close shortcuts help / go back from trace detail`},{keys:[`/`],description:`Focus search filter`}],vg=[{keys:[`/`],description:`Focus search filter`},{keys:[`Esc`],description:`Clear selection / clear search`},{keys:[`CmdOrCtrl`,`A`],description:`Select all traces`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}],yg=[{keys:[`Esc`],description:`Go back to trace list / close span detail`},{keys:[`w`],description:`Switch to waterfall view`},{keys:[`f`],description:`Switch to flame graph view`},{keys:[`l`],description:`Switch to list view`},{keys:[`↑`,`↓`,`Enter`],description:`Navigate spans / select in waterfall`},{keys:[`e`,`Shift+E`],description:`Next / previous error span`},{keys:[`/`],description:`Search spans in this trace`},{keys:[`?`],description:`Show/hide keyboard shortcuts`}];function bg(){let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||!!e.isContentEditable}function xg(e){return t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e())}}var Sg=globalThis.navigator!==void 0&&/Mac|iPhone|iPad|iPod/.test(navigator.platform),Cg=V(`<div class="border border-line rounded-lg p-3 bg-subtle"><div class="font-semibold text-fg"> </div> <div class="text-xs text-fg-subtle mt-0.5"> </div></div>`),wg=V(`<div class="p-3 bg-danger-bg border border-danger-border rounded-md text-sm text-danger flex items-start gap-2"><!> <span> </span></div>`),Tg=V(`<p class="mb-1 last:mb-0"> </p>`),Eg=V(`<div class="p-3 bg-accent/10 border border-accent/30 rounded-md text-sm text-accent"></div>`),Dg=V(`<div class="p-3 bg-success-bg border border-success-border rounded-md text-sm text-success"> </div>`),Og=V(`<div class="fixed inset-0 z-[1100] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Import traces"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] w-[min(560px,92vw)] max-h-[85vh] overflow-hidden flex flex-col bg-surface rounded-lg shadow-xl border border-line outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Import Traces</span> <button class="inline-flex items-center justify-center w-7 h-7 bg-transparent border border-line rounded text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto p-4 flex flex-col gap-3"><label class="flex flex-col gap-2 text-sm text-fg-muted"><span class="font-semibold text-fg">JSON file</span> <span class="inline-flex items-center px-3 py-1.5 border border-line rounded text-sm text-fg-muted bg-surface hover:bg-subtle cursor-pointer w-fit transition-colors"><!> Choose file</span> <input type="file" accept=".json,application/json" class="hidden"/></label> <!> <!> <!> <!></div> <div class="flex items-center justify-end gap-3 px-4 py-3 border-t border-line bg-subtle flex-shrink-0"><button class="px-3 py-1.5 text-sm border border-line rounded bg-surface text-fg-muted hover:bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors">Cancel</button> <button class="px-4 py-1.5 text-sm rounded bg-accent text-white hover:bg-accent/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors"> </button></div></div></div>`);function kg(e,t){it(t,!0);function n(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let r=N(null),i=N(!1),a=N(null),o=N(null),s=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onclose())};return window.addEventListener(`keydown`,e),z(s)?.focus(),()=>window.removeEventListener(`keydown`,e)});let c=e=>{let t=e.target.files?.[0];t&&(P(r,t,!0),P(o,null),P(a,null))},l=async()=>{if(z(r)){P(i,!0),P(o,null);try{let e=await t.onimport(z(r));P(a,e,!0),e.errors.length>0&&P(o,e.errors.join(`; `),!0),e.imported>0&&e.errors.length===0&&setTimeout(t.onclose,1500)}catch(e){P(o,String(e),!0)}finally{P(i,!1)}}};var u=Og(),d=F(u),f=L(d,2),p=F(f),m=L(F(p),2);ig(F(m),{size:14}),D(m),D(p);var h=L(p,2),g=F(h),_=L(F(g),2);Jh(F(_),{size:14,class:`mr-1.5`}),Ke(),D(_);var v=L(_,2);D(g);var y=L(g,2),b=e=>{var t=Cg(),i=F(t),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(t),R(e=>{U(a,z(r).name),U(s,e)},[()=>n(z(r).size)]),H(e,t)};W(y,e=>{z(r)&&e(b)});var x=L(y,2),S=e=>{var t=wg(),n=F(t);Kh(n,{size:14,class:`flex-shrink-0 mt-0.5`});var r=L(n,2),i=F(r,!0);D(r),D(t),R(()=>U(i,z(o))),H(e,t)};W(x,e=>{z(o)&&e(S)});var C=L(x,2),w=e=>{var t=Eg();G(t,21,()=>z(a).warnings,ka,(e,t)=>{var n=Tg(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(t),H(e,t)};W(C,e=>{z(a)&&z(a).warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Dg(),n=F(t);D(t),R(()=>U(n,`Successfully imported ${z(a).imported??``} trace${z(a).imported===1?``:`s`}.`)),H(e,t)};W(T,e=>{z(a)&&z(a).imported>0&&e(ee)}),D(h);var te=L(h,2),ne=F(te),re=L(ne,2),ie=F(re,!0);D(re),D(te),D(f),Ho(f,e=>P(s,e),()=>z(s)),D(u),R(()=>{ne.disabled=z(i),re.disabled=!z(r)||z(i),U(ie,z(i)?`Importing...`:`Confirm Import`)}),B(`click`,d,function(...e){t.onclose?.apply(this,e)}),B(`click`,m,function(...e){t.onclose?.apply(this,e)}),B(`change`,v,c),B(`click`,ne,function(...e){t.onclose?.apply(this,e)}),B(`click`,re,l),H(e,u),at()}ea([`click`,`change`]);function Ag(e,t){if(t.length===0)return e.duration;let n=t.map(t=>[Math.max(t.startTime,e.startTime),Math.min(t.endTime,e.endTime)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),r=0,i=-1/0,a=-1/0;for(let[e,t]of n)e>a?(a>i&&(r+=a-i),i=e,a=t):t>a&&(a=t);return a>i&&(r+=a-i),Math.max(0,e.duration-r)}function jg(e){let t=new Set;if(e.length===0)return t;let n=new Map;for(let t of e)n.set(t.spanId,t);let r=new Map;for(let t of e){let e=t.parentSpanId&&n.has(t.parentSpanId)?t.parentSpanId:``,i=r.get(e);i?i.push(t):r.set(e,[t])}let i=r.get(``)??[];if(i.length===0)return t;let a=e=>e.reduce((e,t)=>t.endTime>e.endTime?t:e),o=a(i);for(;o&&!t.has(o.spanId);){t.add(o.spanId);let e=r.get(o.spanId);o=e&&e.length?a(e):void 0}return t}function Mg(e,t=()=>!1){let n=[],r=(e,i,a)=>{e.forEach((o,s)=>{let c=s===e.length-1;n.push({node:o,connectors:{ancestorLines:[...i],isLast:c,depth:a}}),!(t(o)||o.children.length===0)&&r(o.children,[...i,!c],a+1)})};return r(e,[],0),n}function Ng(e){if(e!==`local`)return e===`utc`?`UTC`:e}function Pg(e,t){try{return new Intl.DateTimeFormat(void 0,{...t,timeZone:Ng(e)})}catch{return new Intl.DateTimeFormat(void 0,t)}}function Fg(e,t=`local`){return Pg(t,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}).format(new Date(e))}function Ig(e=`local`){return e===`utc`?`UTC`:Pg(e,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??`Local`}var Lg=2;function Rg(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=n>0?(e[i].timestamp-t)/n*100:0,o=Math.min(Math.max(a,0),100),s=r.find(e=>e.every(e=>Math.abs(o-e.posPercent)>Lg));s?s.push({index:i,posPercent:o}):r.push([{index:i,posPercent:o}])}return r}var zg=new Set([`error`,`fatal`,`critical`]);function Bg(e){if(e.name===`exception`)return`exception`;let t=e.attributes?.level??e.attributes?.severity;return typeof t==`string`&&zg.has(t.toLowerCase())?`exception`:`event`}var Vg=V(`<span class="absolute inset-y-0 border-l border-line"></span>`),Hg=V(`<span class="relative shrink-0"><!></span>`),Ug=V(`<span class="relative shrink-0"><span></span> <span class="absolute top-1/2 border-t border-line"></span></span>`),Wg=V(`<span aria-hidden="true" data-testid="tree-gutter"><!> <!></span>`);function Gg(e,t){it(t,!0);let n=Z(t,`indent`,3,16);var r=Wg(),i=F(r);G(i,17,()=>t.ancestorLines,ka,(e,t)=>{var r=Hg(),i=F(r),a=e=>{var t=Vg();R(()=>so(t,`left:${n()/2}px`)),H(e,t)};W(i,e=>{z(t)&&e(a)}),D(r),R(()=>{so(r,`width:${n()??``}px`),J(r,`data-testid`,z(t)?`gutter-line`:`gutter-blank`)}),H(e,r)});var a=L(i,2),o=e=>{var r=Ug(),i=F(r),a=L(i,2);D(r),R(e=>{so(r,`width:${n()??``}px`),J(r,`data-testid`,t.isLast?`gutter-elbow`:`gutter-tee`),q(i,1,e),so(i,`left:${n()/2}px`),so(a,`left:${n()/2}px; width:${n()/2}px`)},[()=>K($(`absolute top-0 border-l border-line`,t.isLast?`h-1/2`:`inset-y-0`))]),H(e,r)};W(a,e=>{(t.ancestorLines.length>0||!t.isLast)&&e(o)}),D(r),R(e=>q(r,1,e),[()=>K($(`flex shrink-0 self-stretch`,t.class))]),H(e,r),at()}function Kg(e){let t=e.children.length;for(let n of e.children)t+=Kg(n);return t}function qg(e,t){let n=t.startTime,r=t.duration||1,i=e.startTime-n,a=i/r*100,o=e.duration/r*100;return{offsetMs:i,offsetPercent:Math.max(0,Math.min(100,a)),widthPercent:Math.max(.5,Math.min(100-a,o))}}function Jg(e){switch(e){case`SERVER`:return`bg-blue-500`;case`CLIENT`:return`bg-green-500`;case`PRODUCER`:return`bg-purple-500`;case`CONSUMER`:return`bg-orange-500`;default:return`bg-gray-500`}}function Yg(e){switch(e){case`SERVER`:return`bg-blue-400`;case`CLIENT`:return`bg-green-400`;case`PRODUCER`:return`bg-purple-400`;case`CONSUMER`:return`bg-orange-400`;default:return`bg-gray-400`}}var Xg=V(`<button class="p-0.5 hover:bg-hover rounded flex-shrink-0"><!></button>`),Zg=V(`<div class="w-4"></div>`),Qg=V(`<span class="text-xs text-fg-subtle ml-1"> </span>`),$g=V(`<span class="absolute inset-0 flex items-center justify-center text-[10px] text-white font-medium"> </span>`),e_=V(`<button type="button"></button>`),t_=V(`<div class="flex gap-2 py-0.5"><span class="text-fg-subtle flex-shrink-0"> </span> <span class="text-fg break-all"> </span></div>`),n_=V(`<div class="font-mono text-[11px] text-fg-muted bg-subtle rounded p-2 border border-line-subtle max-h-[160px] overflow-auto"></div>`),r_=V(`<div class="text-[11px] text-fg-subtle italic">No attributes</div>`),i_=V(`<div class="absolute z-30 top-[calc(100%-2px)] left-2 right-2 max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left at-modal-in"><div class="flex items-center gap-2 mb-1.5"><span></span> <span> </span> <span class="text-[10px] text-fg-subtle font-mono"> </span> <button type="button" class="p-0.5 hover:bg-hover rounded flex-shrink-0" aria-label="Close event detail"><!></button></div> <div class="text-[10px] text-fg-subtle font-mono mb-1.5"> </div> <!></div>`),a_=V(`<div><div class="shrink-0 pr-2 py-2 flex items-center gap-1 min-w-0"><!> <!> <!> <!> <!> <span> </span> <!></div> <div class="flex-1 relative"><div><!></div> <!> <!></div> <div class="shrink-0 px-2 py-2 text-right"><span> </span></div></div>`);function o_(e,t){it(t,!0);let n=Z(t,`nameWidth`,3,200),r=Z(t,`durationWidth`,3,80),i=M(()=>t.node.span),a=M(()=>qg(z(i),t.trace)),o=M(()=>z(i).status.code===`ERROR`),s=M(()=>z(i).events&&z(i).events.length>0),c=M(()=>Rg(z(i).events??[],t.trace.startTime,t.trace.duration)),l=N(null),u=e=>{P(l,z(l)===e?null:e,!0)};Lr(()=>{if(z(l)===null)return;let e=()=>{P(l,null)},t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`click`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`keydown`,t)}});var d=a_(),f=F(d),p=F(f),m=e=>{Gg(e,{get ancestorLines(){return t.connectors.ancestorLines},get isLast(){return t.connectors.isLast}})};W(p,e=>{t.connectors&&e(m)});var h=L(p,2),g=e=>{var n=Xg(),r=F(n),i=e=>{Op(e,{size:12,class:`text-fg-subtle`})},a=e=>{wp(e,{size:12,class:`text-fg-subtle`})};W(r,e=>{t.isCollapsed?e(i):e(a,-1)}),D(n),B(`click`,n,e=>{e.stopPropagation(),t.onToggleCollapse?.()}),H(e,n)},v=e=>{H(e,Zg())};W(h,e=>{t.hasChildren?e(g):e(v,-1)});var y=L(h,2),b=e=>{Ap(e,{size:12,class:`text-danger flex-shrink-0`})};W(y,e=>{z(o)&&e(b)});var x=L(y,2),S=e=>{wm(e,{size:10,class:`text-accent flex-shrink-0`})};W(x,e=>{z(s)&&e(S)});var C=L(x,2),w=e=>{og(e,{size:10,class:`text-warning fill-warning flex-shrink-0`})};W(C,e=>{t.isCritical&&e(w)});var T=L(C,2),ee=F(T,!0);D(T);var te=L(T,2),ne=e=>{var n=Qg(),r=F(n);D(n),R(e=>U(r,`(+${e??``})`),[()=>Kg(t.node)]),H(e,n)};W(te,e=>{t.isCollapsed&&t.node.children.length>0&&e(ne)}),D(f);var re=L(f,2),ie=F(re),ae=F(ie),oe=e=>{var t=$g(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>od(z(i).duration)]),H(e,t)};W(ae,e=>{z(a).widthPercent>10&&e(oe)}),D(ie);var se=L(ie,2);G(se,17,()=>z(c),ka,(e,n,r)=>{var a=ua();G(I(a),17,()=>z(n),e=>e.index,(e,n)=>{let a=M(()=>z(i).events[z(n).index]),o=M(()=>28+r*8),s=M(()=>Bg(z(a))===`exception`);var c=e_();R((e,t)=>{q(c,1,e),so(c,`left: ${z(n).posPercent}%; top: ${z(o)}px; transform: translateX(-50%);`),J(c,`title`,t),J(c,`aria-label`,`Event ${z(a).name}`)},[()=>K($(`absolute w-2.5 h-2.5 rounded-full border border-white z-10 cursor-pointer hover:scale-125 transition-transform`,z(s)?`bg-danger`:`bg-warning`,z(l)===z(n).index&&`ring-2 ring-accent scale-125`)),()=>`${z(a).name} at ${od(z(a).timestamp-t.trace.startTime)} — click for detail`]),B(`click`,c,e=>{e.stopPropagation(),u(z(n).index)}),H(e,c)}),H(e,a)});var ce=L(se,2),le=e=>{let n=M(()=>z(i).events[z(l)]),r=M(()=>Bg(z(n))===`exception`);var a=i_(),o=F(a),s=F(o),c=L(s,2),u=F(c,!0);D(c);var d=L(c,2),f=F(d);D(d);var p=L(d,2);ig(F(p),{size:12,class:`text-fg-subtle`}),D(p),D(o);var m=L(o,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=n_();G(t,21,()=>Object.entries(z(n).attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=t_(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,r()),U(l,e)},[()=>typeof i()==`object`?JSON.stringify(i()):String(i())]),H(e,a)}),D(t),H(e,t)},y=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0),b=e=>{H(e,r_())};W(g,e=>{z(y)?e(v):e(b,-1)}),D(a),R((e,t,r,i)=>{q(s,1,e),q(c,1,t),U(u,z(n).name),U(f,`+${r??``}`),U(h,i)},[()=>K($(`w-2 h-2 rounded-full flex-shrink-0`,z(r)?`bg-danger`:`bg-warning`)),()=>K($(`text-xs font-medium flex-1 truncate`,z(r)?`text-danger`:`text-fg`)),()=>od(z(n).timestamp-t.trace.startTime),()=>Fg(z(n).timestamp,Uu.value)]),B(`click`,a,e=>e.stopPropagation()),B(`click`,p,e=>{e.stopPropagation(),P(l,null)}),H(e,a)};W(ce,e=>{z(l)!==null&&z(i).events?.[z(l)]&&e(le)}),D(re);var E=L(re,2),ue=F(E),de=F(ue,!0);D(ue),D(E),D(d),R((e,o,s,c,l,u,p)=>{J(d,`id`,`waterfall-row-${z(i).spanId}`),q(d,1,e),so(f,`width: ${n()}px; padding-left: ${t.connectors?8:8+t.node.depth*16}px;`),q(T,1,o),U(ee,z(i).name||`unknown`),so(re,s),q(ie,1,c),so(ie,`left: ${z(a).offsetPercent}%; width: ${z(a).widthPercent}%; top: 6px; min-width: 4px;`),J(ie,`title`,l),so(E,`width: ${r()}px;`),q(ue,1,u),U(de,p)},[()=>K($(`flex items-center border-b border-line-subtle hover:bg-accent/5 cursor-pointer transition-colors`,t.isSelected&&`bg-accent/10 hover:bg-accent/15`,z(o)&&`bg-danger-bg/40 hover:bg-danger-bg/60`,t.isCritical&&`border-l-2 border-l-warning`)),()=>K($(`text-xs truncate`,z(o)?`text-danger`:`text-fg`)),()=>`height: ${Math.max(32,30+z(c).length*8)}px;`,()=>K($(`absolute h-5 rounded-sm transition-colors group`,z(o)?`bg-danger`:Jg(z(i).kind),t.isSelected&&(z(o)?`bg-danger`:Yg(z(i).kind)))),()=>`${z(i).name}: ${od(z(i).duration)}`,()=>K($(`text-xs font-mono`,z(o)?`text-danger`:`text-fg-muted`)),()=>od(z(i).duration)]),B(`click`,d,()=>t.onSelect?.()),$i(`pointerenter`,f,e=>t.onHover?.(e.currentTarget)),$i(`pointerleave`,f,()=>t.onHover?.(null)),H(e,d),at()}ea([`click`]);var s_=`http.request.method,http.method,http.route,url.path,http.response.status_code,http.status_code,db.system.name,db.system,db.operation.name,db.query.text,db.statement,rpc.service,rpc.method,messaging.system,messaging.destination.name,gen_ai.operation.name,gen_ai.request.model,gen_ai.tool.name,gen_ai.usage.input_tokens,gen_ai.usage.output_tokens,model,tool_name,hook_event,hook_name,plugin.name,server_name,decision,status,success,input_tokens,output_tokens,duration_ms,cost_usd,prompt_length,error.type,exception.type,exception.message,peer.service,server.address`.split(`,`);function c_(e,t=1/0){let n=[];for(let r of s_){if(n.length>=t)break;let i=e[r];if(i==null)continue;let a=typeof i==`object`?JSON.stringify(i):String(i);n.push([r,a.length>120?`${a.slice(0,120)}…`:a])}return n}var l_=V(`<div class="text-fg-subtle mt-0.5"><!> <!> <!></div>`),u_=V(`<div class="flex items-start gap-1 mt-1.5 text-danger"><!> <span class="break-all"> </span></div>`),d_=V(`<span class="text-fg-subtle"> </span> <span class="text-fg break-all"> </span>`,1),f_=V(`<div class="mt-1.5 pt-1.5 border-t border-line-subtle font-mono text-[11px] grid grid-cols-[auto_1fr] gap-x-2 gap-y-0.5"></div>`),p_=V(`<div role="tooltip" class="w-max max-w-[420px] bg-surface border border-line rounded-md shadow-lg p-2.5 text-left text-xs at-modal-in"><div class="font-medium text-fg break-all mb-1.5"> </div> <div class="flex flex-wrap gap-x-3 gap-y-0.5 text-fg-muted font-mono tabular-nums"><span> </span> <span> </span> <span> </span> <span> </span></div> <!> <!> <!></div>`);function m_(e,t){it(t,!0);let n=M(()=>t.node.span),r=M(()=>t.trace.duration>0?z(n).duration/t.trace.duration*100:0),i=M(()=>Kg(t.node)),a=M(()=>c_(z(n).attributes??{}));var o=p_(),s=F(o),c=F(s,!0);D(s);var l=L(s,2),u=F(l),d=F(u,!0);D(u);var f=L(u,2),p=F(f);D(f);var m=L(f,2),h=F(m);D(m);var g=L(m,2),v=F(g,!0);D(g),D(l);var y=L(l,2),b=e=>{var t=l_(),r=F(t),a=e=>{var t=la();R(()=>U(t,`${z(i)??``} child${z(i)===1?``:`ren`}`)),H(e,t)};W(r,e=>{z(i)>0&&e(a)});var o=L(r,2),s=e=>{H(e,la(`·`))};W(o,e=>{z(i)>0&&(z(n).events?.length??0)>0&&e(s)});var c=L(o,2),l=e=>{var t=la();R(()=>U(t,`${z(n).events.length??``} event${z(n).events.length===1?``:`s`}`)),H(e,t)};W(c,e=>{(z(n).events?.length??0)>0&&e(l)}),D(t),H(e,t)};W(y,e=>{(z(i)>0||(z(n).events?.length??0)>0)&&e(b)});var x=L(y,2),S=e=>{var t=u_(),r=F(t);Ap(r,{size:12,class:`shrink-0 mt-px`});var i=L(r,2),a=F(i,!0);D(i),D(t),R(()=>U(a,z(n).status.message||`Error`)),H(e,t)};W(x,e=>{z(n).status.code===`ERROR`&&e(S)});var C=L(x,2),w=e=>{var t=f_();G(t,21,()=>z(a),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=d_(),o=I(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),R(()=>{U(s,r()),U(l,i())}),H(e,a)}),D(t),H(e,t)};W(C,e=>{z(a).length>0&&e(w)}),D(o),R((e,t,r)=>{U(c,z(n).name||`unknown`),U(d,e),U(p,`${t??``}% of trace`),U(h,`+${r??``}`),U(v,z(n).kind)},[()=>od(z(n).duration),()=>z(r).toFixed(+(z(r)<10)),()=>od(z(n).startTime-t.trace.startTime)]),H(e,o),at()}var h_=V(`<div><div class="absolute inset-y-0 -left-1.5 -right-1.5"></div> <div></div></div>`);function g_(e,t){it(t,!0);var n=h_(),r=L(F(n),2);D(n),R((e,i)=>{J(n,`role`,t.role),J(n,`aria-orientation`,t[`aria-orientation`]),J(n,`aria-valuenow`,t[`aria-valuenow`]),J(n,`aria-valuemin`,t[`aria-valuemin`]),J(n,`tabindex`,t.tabIndex),J(n,`title`,t.title??`Drag to resize · double-click to reset`),q(n,1,e),q(r,1,i)},[()=>K($(`group relative z-10 shrink-0 cursor-col-resize self-stretch outline-none`,`w-px bg-hover`)),()=>K($(`absolute inset-y-0 -left-px w-0.5 transition-colors`,`group-hover:bg-accent group-focus-visible:bg-accent`,t.dragging&&`bg-accent`))]),B(`pointerdown`,n,function(...e){t.onPointerDown?.apply(this,e)}),B(`keydown`,n,function(...e){t.onKeyDown?.apply(this,e)}),B(`dblclick`,n,function(...e){t.onDblClick?.apply(this,e)}),H(e,n),at()}ea([`pointerdown`,`keydown`,`dblclick`]);function __(e,t){e.preventDefault();let n=document.body.style.cursor,r=document.body.style.userSelect;document.body.style.cursor=t.cursor,document.body.style.userSelect=`none`,t.onStart?.();let i=e=>t.onMove(e),a=()=>{document.body.style.cursor=n,document.body.style.userSelect=r,window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),t.onEnd?.()};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)}function v_(e,t){if(!e)return t;try{let t=window.localStorage.getItem(e);if(t!=null){let e=Number(t);if(Number.isFinite(e))return e}}catch{}return t}function y_(e,t){if(e)try{window.localStorage.setItem(e,String(Math.round(t)))}catch{}}function b_(e){let{initial:t,min:n,minOther:r,containerRef:i,storageKey:a,invert:o=!1,step:s=24}=e,c=Math.max(n,v_(a,t)),l=N(_r(c)),u=N(!1),d={current:c},f=()=>{let e=i.current?.clientWidth;return e?Math.max(n,e-r):1/0},p=e=>Math.min(f(),Math.max(n,e)),m=e=>{P(l,e,!0),d.current=e},h=e=>{let t=e.clientX,n=d.current;__(e,{cursor:`col-resize`,onStart:()=>P(u,!0),onMove:e=>{let r=e.clientX-t,i=o?-r:r;m(p(n+i))},onEnd:()=>{P(u,!1),y_(a,d.current)}})},g=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;e.preventDefault();let t=e.key===`ArrowLeft`?-s:s,n=p(d.current+(o?-t:t));m(n),y_(a,n)},_=()=>{let e=p(t);m(e),y_(a,e)};return{fit:()=>{let e=p(d.current);e!==d.current&&m(e)},get size(){return z(l)},get dragging(){return z(u)},get separatorProps(){return{role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(z(l)),"aria-valuemin":n,tabIndex:0,onPointerDown:h,onKeyDown:g,onDblClick:_}}}}function x_(e){let t=new Map,n=[],r=new Map;for(let n of e)t.set(n.spanId,{span:n,children:[],depth:0});for(let i of e){let e=t.get(i.spanId);if(i.parentSpanId){let n=t.get(i.parentSpanId);if(n)n.children.push(e);else{let t=r.get(i.parentSpanId)||[];t.push(e),r.set(i.parentSpanId,t)}}else n.push(e)}let i=(e,t,n=new Set)=>{if(!n.has(e.span.spanId)){n.add(e.span.spanId),e.depth=t;for(let r of e.children)i(r,t+1,new Set(n))}};for(let[t,i]of r){i.sort((e,t)=>e.span.startTime-t.span.startTime);let r=Math.min(...i.map(e=>e.span.startTime)),a=Math.max(...i.map(e=>e.span.endTime)),o=e.find(e=>e.spanId===t),s={span:{spanId:t,traceId:i[0].span.traceId,parentSpanId:o?.parentSpanId||void 0,name:`(missing)`,kind:`INTERNAL`,startTime:r,endTime:a,duration:a-r,attributes:{},status:{code:`UNSET`},events:[]},children:i,depth:0};n.push(s)}for(let e of n)i(e,0);let a=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)a(t.children)};return a(n),n}var S_=V(`<div class="absolute text-[10px] whitespace-nowrap tabular-nums"> </div>`),C_=V(`<div class="absolute top-0 bottom-0 border-l border-line-subtle"></div>`),w_=V(`<div></div>`),T_=V(`<div><!></div>`),E_=V(`<div class="px-3 py-6 text-center text-xs text-fg-subtle"> </div>`),D_=V(`<div class="absolute z-40 pointer-events-none"><!></div>`),O_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),k_=V(`<div class="flex flex-col h-full relative"><div class="flex border-b border-line bg-subtle text-xs text-fg-subtle"><div class="shrink-0 px-3 py-2 font-medium text-fg-muted truncate">Span Name</div> <div class="relative w-0 flex self-stretch"><!></div> <div class="flex-1 relative py-2"></div> <div class="relative w-0 flex self-stretch"><!></div> <div class="shrink-0 px-2 py-2 text-right font-medium text-fg-muted">Duration</div></div> <div class="flex-1 overflow-auto relative"><div class="absolute inset-0 pointer-events-none"></div> <div class="relative"><!> <!> <!> <!></div></div> <!> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <button title="Highlight the spans that determine total trace latency"><!> Critical path</button></div></div>`);function A_(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=Z(t,`query`,3,``),i=M(()=>{let e=r().trim().toLowerCase();if(!e)return new Set;let n=new Set,i=(t.trace.service?.toLowerCase()??``).includes(e);for(let r of t.trace.spans)(i||r.name?.toLowerCase().includes(e))&&n.add(r.spanId);return n}),a=M(()=>r().trim().length>0);Lr(()=>{t.onMatchCount?.(z(i).size)});let o=N(void 0),s=e=>({get current(){return z(o)?{clientWidth:z(o).clientWidth-e()}:null}}),c=b_({initial:200,min:120,minOther:200,containerRef:s(()=>l.size),storageKey:`autotel-devtools:waterfall-name-width`}),l=b_({initial:80,min:56,minOther:200,containerRef:s(()=>c.size),storageKey:`autotel-devtools:waterfall-duration-width`,invert:!0});Lr(()=>{let e=z(o);if(!e||typeof ResizeObserver>`u`)return;let t=()=>{c.fit(),l.fit()};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()});let u=M(()=>c.size),d=M(()=>l.size),f=M(()=>`left: ${z(u)}px; right: ${z(d)}px;`),p=N(null),m;function h(e,t){if(clearTimeout(m),!t||!z(o)){P(p,null);return}let n=z(o).getBoundingClientRect(),r=t.getBoundingClientRect(),i=r.top-n.top>n.height/2,a={node:e,above:i,top:(i?r.top:r.bottom)-n.top,left:Math.min(r.left-n.left+8,Math.max(0,n.width-428))};m=setTimeout(()=>P(p,a,!0),z(p)?0:250)}let g=N(_r(new Set)),_=N(!0),v=N(void 0),y=N(0),b=N(void 0),x=N(0),S=N(0),C=M(()=>jg(t.trace.spans));Lr(()=>{let e=z(v);if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{P(y,e[0].contentRect.width,!0)});return t.observe(e),()=>t.disconnect()});let w=M(()=>x_(t.trace.spans)),T=M(()=>Mg(z(w),e=>z(g).has(e.span.spanId))),ee=M(()=>z(T).map(e=>e.node)),te=M(()=>z(T).length<300||z(S)===0?{start:0,end:z(T).length}:{start:Math.max(0,Math.floor(z(x)/34)-12),end:Math.min(z(T).length,Math.ceil((z(x)+z(S))/34)+12)}),ne=M(()=>z(T).slice(z(te).start,z(te).end));Lr(()=>{let e=z(b);if(!e||typeof ResizeObserver>`u`)return;P(S,e.clientHeight,!0);let t=new ResizeObserver(()=>{P(S,e.clientHeight,!0)});return t.observe(e),()=>t.disconnect()});function re(e){return z(b)?.querySelector(`#waterfall-row-${e}`)}function ie(e){if(!z(b)||z(T).length<300)return;let t=e*34,n=t+34;t<z(b).scrollTop?z(b).scrollTop=t:n>z(b).scrollTop+z(b).clientHeight&&(z(b).scrollTop=n-z(b).clientHeight),P(x,z(b).scrollTop,!0)}let ae=e=>{if(el.value||bg()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`&&e.key!==`Enter`)return;e.preventDefault();let r=z(ee).findIndex(e=>e.span.spanId===n()),i;if(e.key===`ArrowUp`)i=r>0?r-1:z(ee).length-1;else if(e.key===`ArrowDown`)i=r<z(ee).length-1?r+1:0;else{if(r>=0){t.onSpanSelect?.(z(ee)[r].span);return}i=0}let a=z(ee)[i];a&&(t.onSpanSelect?.(a.span),ie(i),re(a.span.spanId)?.scrollIntoView({block:`nearest`}))};Lr(()=>(z(ee),n(),window.addEventListener(`keydown`,ae),()=>window.removeEventListener(`keydown`,ae))),Lr(()=>{let e=n();e&&Pi(()=>{let n=new Map(t.trace.spans.map(e=>[e.spanId,e])),r=new Set(z(g)),i=!1,a=n.get(e)?.parentSpanId;for(;a;)r.delete(a)&&(i=!0),a=n.get(a)?.parentSpanId;i&&P(g,r,!0);let o=z(T).findIndex(t=>t.node.span.spanId===e);o>=0&&ie(o),requestAnimationFrame(()=>re(e)?.scrollIntoView({block:`center`}))})});let oe=e=>{let t=new Set(z(g));t.has(e)?t.delete(e):t.add(e),P(g,t,!0)},se=e=>t.trace.spans.some(t=>t.parentSpanId===e),ce=M(()=>{let e=t.trace.duration||1,n=z(y)>0?Math.min(8,Math.max(2,Math.floor(z(y)/90))):5,r=[];for(let t=0;t<=n;t++)r.push({percent:t/n*100,label:od(t/n*e),align:t===0?`start`:t===n?`end`:`mid`});return r}),le=[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`];var E=k_(),ue=F(E),de=F(ue),fe=L(de,2);g_(F(fe),X({get dragging(){return c.dragging},title:`Drag to resize the name column · double-click to reset`},()=>c.separatorProps)),D(fe);var pe=L(fe,2);G(pe,21,()=>z(ce),ka,(e,t)=>{var n=S_(),r=F(n,!0);D(n),R(()=>{so(n,`left: ${z(t).percent}%; transform: ${z(t).align===`start`?`translateX(0)`:z(t).align===`end`?`translateX(-100%)`:`translateX(-50%)`};`),U(r,z(t).label)}),H(e,n)}),D(pe),Ho(pe,e=>P(v,e),()=>z(v));var me=L(pe,2);g_(F(me),X({get dragging(){return l.dragging},title:`Drag to resize the duration column · double-click to reset`},()=>l.separatorProps)),D(me);var he=L(me,2);D(ue);var ge=L(ue,2),_e=F(ge);G(_e,21,()=>z(ce),ka,(e,t)=>{var n=C_();R(()=>so(n,`left: ${z(t).percent}%;`)),H(e,n)}),D(_e);var ve=L(_e,2),ye=F(ve),be=e=>{var t=w_();R(()=>so(t,`height: ${z(te).start*34}px`)),H(e,t)};W(ye,e=>{z(te).start>0&&e(be)});var xe=L(ye,2);G(xe,17,()=>z(ne),({node:e,connectors:t})=>e.span.spanId,(e,r)=>{let o=()=>z(r).node,s=()=>z(r).connectors,c=M(()=>z(i).has(o().span.spanId));var l=T_(),f=F(l);{let e=M(()=>n()===o().span.spanId),r=M(()=>z(g).has(o().span.spanId)),i=M(()=>se(o().span.spanId)),a=M(()=>z(_)&&z(C).has(o().span.spanId));o_(f,{get node(){return o()},get trace(){return t.trace},get isSelected(){return z(e)},get isCollapsed(){return z(r)},get hasChildren(){return z(i)},get isCritical(){return z(a)},get connectors(){return s()},get nameWidth(){return z(u)},get durationWidth(){return z(d)},onSelect:()=>t.onSpanSelect?.(o().span),onToggleCollapse:()=>oe(o().span.spanId),onHover:e=>h(o(),e)})}D(l),R(e=>q(l,1,e),[()=>K($(`transition-opacity`,z(a)&&!z(c)&&`opacity-40`,z(a)&&z(c)&&`ring-1 ring-inset ring-accent rounded-sm`))]),H(e,l)});var Se=L(xe,2),Ce=e=>{var t=w_();R(()=>so(t,`height: ${(z(T).length-z(te).end)*34}px`)),H(e,t)};W(Se,e=>{z(te).end<z(T).length&&e(Ce)});var we=L(Se,2),Te=e=>{var t=E_(),n=F(t);D(t),R(e=>U(n,`No spans match “${e??``}”.`),[()=>r().trim()]),H(e,t)};W(we,e=>{z(a)&&z(i).size===0&&e(Te)}),D(ve),D(ge),Ho(ge,e=>P(b,e),()=>z(b));var Ee=L(ge,2),De=e=>{var n=D_();m_(F(n),{get node(){return z(p).node},get trace(){return t.trace}}),D(n),R(()=>so(n,`top: ${z(p).top}px; left: ${z(p).left}px;${z(p).above?` transform: translateY(-100%);`:``}`)),H(e,n)};W(Ee,e=>{z(p)&&e(De)});var Oe=L(Ee,2),ke=L(F(Oe),2);G(ke,16,()=>le,e=>e,(e,t)=>{var n=O_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,Jg(t)))]),H(e,n)});var Ae=L(ke,2);og(F(Ae),{size:11}),Ke(),D(Ae),D(Oe),D(E),Ho(E,e=>P(o,e),()=>z(o)),R(e=>{so(de,`width: ${z(u)}px;`),so(he,`width: ${z(d)}px;`),so(_e,z(f)),q(Ae,1,e)},[()=>K($(`ml-auto flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors`,z(_)?`bg-warning-bg text-warning border-warning-border`:`text-fg-subtle border-line hover:bg-hover`))]),$i(`scroll`,ge,e=>{P(x,e.currentTarget.scrollTop,!0),P(p,null)}),B(`click`,Ae,()=>P(_,!z(_))),H(e,E),at()}ea([`click`]);function j_(e,t){let n=new Map,r=[],i=t.duration||1,a=t.startTime;for(let t of e){let e=(t.startTime-a)/i*100,r=t.duration/i*100;n.set(t.spanId,{span:t,children:[],depth:0,x:Math.max(0,e),width:Math.max(.5,Math.min(100-e,r))})}for(let t of e){let e=n.get(t.spanId);if(t.parentSpanId){let i=n.get(t.parentSpanId);i?(i.children.push(e),e.depth=i.depth+1):r.push(e)}else r.push(e)}let o=e=>{e.sort((e,t)=>e.span.startTime-t.span.startTime);for(let t of e)o(t.children)};return o(r),r}function M_(e){let t=[],n=e=>{t.push(e),e.children.forEach(n)};return e.forEach(n),t}function N_(e){let t=0,n=e=>{t=Math.max(t,e.depth),e.children.forEach(n)};return e.forEach(n),t}function P_(e,t,n){let r=n.find(e=>e.spanId===t);if(!r)return e;let i=r.startTime,a=r.duration||1,o=(e,t)=>{let r=n.find(t=>t.spanId===e);return r?r.parentSpanId===t?!0:r.parentSpanId?o(r.parentSpanId,t):!1:!1},s=e=>{if(!(e.span.spanId===t||o(e.span.spanId,t)))return{...e,x:-100,width:0,children:e.children.map(s)};let n=(e.span.startTime-i)/a*100,r=e.span.duration/a*100;return{...e,x:Math.max(0,n),width:Math.max(.5,Math.min(100-Math.max(0,n),r)),children:e.children.map(s)}};return e.map(s)}function F_(e){if(e.status.code===`ERROR`)return`bg-red-500 hover:bg-red-400`;switch(e.kind){case`SERVER`:return`bg-blue-500 hover:bg-blue-400`;case`CLIENT`:return`bg-green-500 hover:bg-green-400`;case`PRODUCER`:return`bg-purple-500 hover:bg-purple-400`;case`CONSUMER`:return`bg-orange-500 hover:bg-orange-400`;default:return`bg-gray-500 hover:bg-gray-400`}}function I_(e){return e.status.code===`ERROR`?`ring-2 ring-danger`:`ring-2 ring-accent`}var L_=V(`<div class="absolute inset-0 flex items-center px-1.5 overflow-hidden"><span class="text-[10px] text-white font-medium truncate"> </span></div>`),R_=V(`<div role="button" tabindex="-1"><!></div>`),z_=V(`<span class="flex items-center gap-2"><span class="font-medium">Zoomed:</span> <span class="truncate max-w-[200px]"> </span></span>`),B_=V(`<span>Click a span to zoom in, double-click to select</span>`),V_=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors flex items-center gap-1 text-xs text-fg-muted" title="Reset zoom"><!> Reset</button>`),H_=V(`<div class="absolute left-0 right-0"></div>`),U_=V(`<div class="flex items-center gap-1 mt-1 text-danger"><!> <span>Error</span></div>`),W_=V(`<div class="absolute z-50 pointer-events-none"><div class="bg-surface text-fg text-xs rounded-md shadow-lg p-2 max-w-[200px]"><div class="font-medium truncate mb-1"> </div> <div class="flex items-center gap-2 text-fg-muted"><span> </span> <span>|</span> <span> </span></div> <!></div></div>`),G_=V(`<div class="flex items-center gap-1"><div></div> <span class="text-fg-muted"> </span></div>`),K_=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-3 py-2 border-b border-line bg-subtle"><div class="text-xs text-fg-muted"><!></div> <div class="flex items-center gap-1"><!></div></div> <div class="flex-1 overflow-auto p-4 relative" role="presentation"><div class="relative w-full"></div> <!></div> <div class="flex items-center gap-4 px-3 py-2 border-t border-line bg-subtle text-xs"><span class="text-fg-subtle font-medium">Kind:</span> <!> <div class="flex items-center gap-1 ml-2"><div class="w-3 h-3 rounded-sm bg-red-500"></div> <span class="text-fg-muted">ERROR</span></div></div></div>`);function q_(e,t){it(t,!0);let n=(e,n=p,r=p,i=p)=>{let a=M(()=>{let{span:e,x:t,width:r}=n();return{span:e,x:t,width:r}});var o=ua(),s=I(o),c=e=>{var n=R_(),i=M(()=>xg(()=>f(z(a).span.spanId))),o=F(n),s=e=>{var t=L_(),n=F(t),r=F(n,!0);D(n),D(t),R(()=>U(r,z(a).span.name)),H(e,t)};W(o,e=>{z(a).width>5&&e(s)}),D(n),R((e,t)=>{q(n,1,e),so(n,`left: ${z(a).x??``}%; width: ${z(a).width??``}%; height: 24px; min-width: 4px;`),J(n,`title`,t)},[()=>K($(`absolute cursor-pointer transition-all`,F_(z(a).span),r()&&I_(z(a).span),`rounded-sm`)),()=>`${z(a).span.name}: ${od(z(a).span.duration)}`]),B(`click`,n,()=>f(z(a).span.spanId)),B(`keydown`,n,function(...e){z(i)?.apply(this,e)}),B(`dblclick`,n,()=>t.onSpanSelect?.(z(a).span)),B(`mousemove`,n,e=>h(e,z(a).span)),$i(`mouseleave`,n,g),H(e,n)};W(s,e=>{z(a).width<=0||z(a).x<0||e(c)}),H(e,o)},r=N(_r({focusedSpanId:null})),i=N(null),a=N(_r({x:0,y:0})),o=N(void 0),s=M(()=>j_(t.trace.spans,t.trace)),c=M(()=>z(r).focusedSpanId?P_(z(s),z(r).focusedSpanId,t.trace.spans):z(s)),l=M(()=>M_(z(c))),u=M(()=>N_(z(c))),d=M(()=>{let e=new Map;for(let t of z(l))if(t.width>0){let n=e.get(t.depth)||[];n.push(t),e.set(t.depth,n)}return e}),f=e=>{P(r,{focusedSpanId:e},!0)},m=()=>{P(r,{focusedSpanId:null},!0)},h=(e,t)=>{if(z(o)){let t=z(o).getBoundingClientRect();P(a,{x:e.clientX-t.left,y:e.clientY-t.top},!0)}P(i,t,!0)},g=()=>{P(i,null)},v=M(()=>(z(u)+1)*26+20);var y=K_(),b=F(y),x=F(b),S=F(x),C=e=>{var n=z_(),i=L(F(n),2),a=F(i,!0);D(i),D(n),R(e=>U(a,e),[()=>t.trace.spans.find(e=>e.spanId===z(r).focusedSpanId)?.name]),H(e,n)},w=e=>{H(e,B_())};W(S,e=>{z(r).focusedSpanId?e(C):e(w,-1)}),D(x);var T=L(x,2),ee=F(T),te=e=>{var t=V_();gh(F(t),{size:14}),Ke(),D(t),B(`click`,t,m),H(e,t)};W(ee,e=>{z(r).focusedSpanId&&e(te)}),D(T),D(b);var ne=L(b,2),re=F(ne);G(re,21,()=>[...z(d).entries()],([e,t])=>e,(e,r)=>{var a=M(()=>_(z(r),2));let o=()=>z(a)[0],s=()=>z(a)[1];var c=H_();G(c,21,s,e=>e.span.spanId,(e,r)=>{n(e,()=>z(r),()=>t.selectedSpanId===z(r).span.spanId,()=>z(i)?.spanId===z(r).span.spanId)}),D(c),R(()=>so(c,`top: ${o()*26}px;`)),H(e,c)}),D(re);var ie=L(re,2),ae=e=>{var t=W_(),n=F(t),r=F(n),s=F(r,!0);D(r);var c=L(r,2),l=F(c),u=F(l,!0);D(l);var d=L(l,4),f=F(d,!0);D(d),D(c);var p=L(c,2),m=e=>{var t=U_();Ap(F(t),{size:10}),Ke(2),D(t),H(e,t)};W(p,e=>{z(i).status.code===`ERROR`&&e(m)}),D(n),D(t),R((e,n)=>{so(t,`left: ${e??``}px; top: ${z(a).y+10}px;`),U(s,z(i).name),U(u,n),U(f,z(i).kind)},[()=>Math.min(z(a).x+10,(z(o)?.clientWidth||300)-220),()=>od(z(i).duration)]),H(e,t)};W(ie,e=>{z(i)&&e(ae)}),D(ne),Ho(ne,e=>P(o,e),()=>z(o));var oe=L(ne,2);G(L(F(oe),2),16,()=>[`SERVER`,`CLIENT`,`INTERNAL`,`PRODUCER`,`CONSUMER`],e=>e,(e,t)=>{var n=G_(),r=F(n),i=L(r,2),a=F(i,!0);D(i),D(n),R(e=>{q(r,1,e),U(a,t)},[()=>K($(`w-3 h-3 rounded-sm`,t===`SERVER`&&`bg-blue-500`,t===`CLIENT`&&`bg-green-500`,t===`PRODUCER`&&`bg-purple-500`,t===`CONSUMER`&&`bg-orange-500`,t===`INTERNAL`&&`bg-gray-500`))]),H(e,n)}),Ke(2),D(oe),D(y),R(()=>so(re,`height: ${z(v)??``}px; min-width: 100%;`)),$i(`mouseleave`,ne,g),H(e,y),at()}ea([`click`,`keydown`,`dblclick`,`mousemove`]);function J_(e){if(typeof e==`object`&&e)return e;if(typeof e!=`string`)return null;let t=e.trim();if(t.length<2)return null;let n=t[0];if(n!==`{`&&n!==`[`)return null;try{let e=JSON.parse(t);return typeof e==`object`&&e?e:null}catch{return null}}var Y_=V(`<div class="relative group"><!> <button title="Copy"><!></button></div>`);function X_(e,t){it(t,!0);let n=N(!1);async function r(){try{await navigator.clipboard.writeText(t.content),P(n,!0),setTimeout(()=>P(n,!1),2e3)}catch(e){console.error(`Failed to copy:`,e)}}var i=Y_(),a=F(i);Ra(a,()=>t.children);var o=L(a,2),s=F(o),c=e=>{Sp(e,{size:14,class:`text-success`})},l=e=>{Bp(e,{size:14,class:`text-fg-muted`})};W(s,e=>{z(n)?e(c):e(l,-1)}),D(o),D(i),R(e=>q(o,1,e),[()=>K($(`absolute top-2 right-2 p-1.5 rounded-md`,`bg-surface border border-line shadow-sm`,`opacity-0 group-hover:opacity-100 transition-opacity`,`hover:bg-subtle`))]),B(`click`,o,r),H(e,i),at()}ea([`click`]);var Z_=V(`<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Q_=V(`<div><!> <input/> <!></div>`);function $_(e,t){it(t,!0);let n=Z(t,`value`,15),r=Z(t,`clearTitle`,3,`Clear filter`),i=Z(t,`class`,3,`flex-1`),a=Z(t,`inputClass`,3,`border-line focus:border-line`),o=Z(t,`ref`,15,null);function s(e){n(e),t.onValue?.(e)}var c=Q_(),l=F(c);wh(l,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var u=L(l,2);So(u),Ho(u,e=>o(e),()=>o());var d=L(u,2),f=e=>{var t=Z_();ig(F(t),{size:12}),D(t),R(()=>J(t,`title`,r())),B(`click`,t,()=>s(``)),H(e,t)};W(d,e=>{n()&&e(f)}),D(c),R((e,r)=>{q(c,1,e),Co(u,n()),J(u,`placeholder`,t.placeholder),J(u,`aria-label`,t.ariaLabel),q(u,1,r)},[()=>K($(`relative`,i())),()=>K($(`w-full pl-7 pr-7 py-1 text-xs rounded border focus:outline-none`,a()))]),B(`input`,u,e=>s(e.currentTarget.value)),H(e,c),at()}ea([`input`,`click`]);function ev(e,t){return!e||t.some(t=>t!=null&&String(t).toLowerCase().includes(e))}var tv=V(`<span class="text-fg-subtle"> </span>`),nv=V(`<div class="flex gap-1 leading-5"><!> <span> </span></div>`),rv=V(`<span class="text-fg-subtle opacity-70"> </span>`),iv=V(`<div class="pl-3 ml-1 border-l border-line-subtle"><!> <div class="text-fg-subtle"> </div></div>`),av=V(`<div class="leading-5"><button class="inline-flex items-center gap-1 hover:bg-hover rounded px-0.5"><!> <!> <span class="text-fg-subtle"> </span> <!></button> <!></div>`);function ov(e,t){it(t,!0);function n(e){if(e===null)return`text-fg-subtle`;switch(typeof e){case`string`:return`text-green-600`;case`number`:return`text-blue-600`;case`boolean`:return`text-purple-600`;default:return`text-fg`}}function r(e){return e===null?`null`:typeof e==`string`?`"${e}"`:String(e)}let i=M(()=>t.value!==null&&typeof t.value==`object`),a=N(t.depth<2),o=M(()=>Array.isArray(t.value)),s=M(()=>z(o)?t.value.map((e,t)=>[String(t),e]):Object.entries(t.value)),c=M(()=>z(o)?`[`:`{`),l=M(()=>z(o)?`]`:`}`),u=M(()=>`${z(s).length} ${z(o)?`items`:`keys`}`);var d=ua(),f=I(d),p=e=>{var i=nv(),a=F(i),o=e=>{var n=tv(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(a,e=>{t.label!==void 0&&e(o)});var s=L(a,2),c=F(s,!0);D(s),D(i),R((e,t)=>{q(s,1,e),U(c,t)},[()=>K($(`break-all`,n(t.value))),()=>r(t.value)]),H(e,i)},m=e=>{var n=av(),r=F(n),i=F(r),o=e=>{wp(e,{size:10})},d=e=>{Op(e,{size:10})};W(i,e=>{z(a)?e(o):e(d,-1)});var f=L(i,2),p=e=>{var n=tv(),r=F(n);D(n),R(()=>U(r,`${t.label??``}:`)),H(e,n)};W(f,e=>{t.label!==void 0&&e(p)});var m=L(f,2),h=F(m,!0);D(m);var g=L(m,2),v=e=>{var t=rv(),n=F(t,!0);D(t),R(()=>U(n,z(u))),H(e,t)};W(g,e=>{z(a)||e(v)}),D(r);var y=L(r,2),b=e=>{var n=iv(),r=F(n);G(r,17,()=>z(s),([e,t])=>e,(e,n)=>{var r=M(()=>_(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];{let n=M(()=>t.depth+1);ov(e,{get label(){return i()},get value(){return a()},get depth(){return z(n)}})}});var i=L(r,2),a=F(i,!0);D(i),D(n),R(()=>U(a,z(l))),H(e,n)};W(y,e=>{z(a)&&e(b)}),D(n),R(()=>U(h,z(a)?z(c):`${z(c)}…${z(l)}`)),B(`click`,r,()=>P(a,!z(a))),H(e,n)};W(f,e=>{z(i)?e(m,-1):e(p)}),H(e,d),at()}ea([`click`]);var sv=V(`<div class="font-mono text-xs text-fg"><!></div>`);function cv(e,t){var n=sv();ov(F(n),{get value(){return t.data},depth:0}),D(n),H(e,n)}var lv=V(`<button type="button" class="font-mono text-accent hover:underline truncate flex-1 text-left cursor-pointer"> </button>`),uv=V(`<code class="font-mono text-fg-muted truncate flex-1"> </code>`),dv=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle w-24 flex-shrink-0"> </span> <!> <button class="p-1 hover:bg-hover rounded transition-colors flex-shrink-0" title="Copy to clipboard"><!></button></div>`);function fv(e,t){let n=N(!1),r=async()=>{await navigator.clipboard.writeText(t.value),P(n,!0),setTimeout(()=>P(n,!1),2e3)};var i=dv(),a=F(i),o=F(a);D(a);var s=L(a,2),c=e=>{var n=lv(),r=F(n,!0);D(n),R(()=>{J(n,`title`,t.activateTitle??`Open`),U(r,t.value)}),B(`click`,n,function(...e){t.onActivate?.apply(this,e)}),H(e,n)},l=e=>{var n=uv(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)};W(s,e=>{t.onActivate?e(c):e(l,-1)});var u=L(s,2),d=F(u),f=e=>{Sp(e,{size:12,class:`text-success`})},p=e=>{Bp(e,{size:12,class:`text-fg-subtle`})};W(d,e=>{z(n)?e(f):e(p,-1)}),D(u),D(i),R(()=>U(o,`${t.label??``}:`)),B(`click`,u,r),H(e,i)}ea([`click`]);var pv=V(`<button type="button"><!></button>`);function mv(e,t){it(t,!0);let n=Z(t,`label`,3,`Copy`),r=Z(t,`size`,3,12),i=Z(t,`class`,3,``),a=Z(t,`stop`,3,!0),o=N(!1);async function s(e){a()&&(e.stopPropagation(),e.preventDefault());try{await navigator.clipboard.writeText(t.value),P(o,!0),setTimeout(()=>P(o,!1),1500)}catch(e){console.error(`[autotel-devtools] copy failed:`,e)}}var c=pv(),l=F(c),u=e=>{Sp(e,{get size(){return r()},class:`text-success`})},d=e=>{Bp(e,{get size(){return r()}})};W(l,e=>{z(o)?e(u):e(d,-1)}),D(c),R(e=>{J(c,`title`,z(o)?`Copied!`:n()),J(c,`aria-label`,n()),q(c,1,e)},[()=>K($(`inline-flex items-center justify-center p-1 rounded flex-shrink-0`,`text-fg-subtle hover:text-fg hover:bg-hover transition-colors`,i()))]),B(`click`,c,s),H(e,c),at()}ea([`click`]);function hv(e){return`'${e.replaceAll(`'`,`'\\''`)}'`}function gv(e){if(typeof e==`string`&&e.length>0)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e)}function _v(e){let t=gv(e[`url.full`])??gv(e[`http.url`]);if(t)return t;let n=gv(e[`server.address`])??gv(e[`net.peer.name`]),r=gv(e[`url.path`])??gv(e[`http.target`]);if(!n||!r)return;let i=gv(e[`url.scheme`])??`https`,a=gv(e[`server.port`]),o=gv(e[`url.query`]);return`${i}://${a&&a!==`80`&&a!==`443`?`${n}:${a}`:n}${r}${o?`?${o}`:``}`}function vv(e){let t=e.attributes??{},n=gv(t[`http.request.method`])??gv(t[`http.method`]),r=_v(t);if(!n||!r)return null;let i=[`curl -X ${n.toUpperCase()}`,hv(r)],a=Object.entries(t).filter(([e])=>e.startsWith(`http.request.header.`)).sort(([e],[t])=>e.localeCompare(t));for(let[e,t]of a){let n=e.slice(20),r=Array.isArray(t)?t.map(String).join(`, `):gv(t);r&&i.push(`-H ${hv(`${n}: ${r}`)}`)}return i.join(` `)}var yv={count:`autotel.schema.violations`,severity:`autotel.schema.violation.severity`,codes:`autotel.schema.violation.codes`};function bv(e){let t=e.attributes??{},n=t[yv.count],r=typeof n==`number`?n:Number(n);if(!Number.isFinite(r)||r<=0)return null;let i=t[yv.codes];return{count:r,severity:t[yv.severity]===`error`?`error`:`warning`,codes:Array.isArray(i)?i.map(String):[]}}var xv=[`code.filepath`,`code.file.path`],Sv=[`code.lineno`,`code.line.number`],Cv=[`code.column`,`code.column.number`],wv=[`code.function`,`code.function.name`];function Tv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function Ev(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function Dv(e,t,n,r){if(e===`webstorm`){let e=`jetbrains://web-storm/navigate/reference?path=${encodeURIComponent(t)}`;return n!==void 0&&(e+=`&line=${n}`),e}let i=`${e}://file/${t.replace(/^\//,``)}`;return n!==void 0&&(i+=`:${n}`,r!==void 0&&(i+=`:${r}`)),i}function Ov(e,t){let n=Tv(e,xv);if(!n)return null;let r=Ev(e,Sv),i=Ev(e,Cv),a=Tv(e,wv),o=Tv(e,[`code.namespace`]),s=n.split(/[/\\]/).pop()||n;return{filepath:n,line:r,column:i,functionName:a,namespace:o,display:r===void 0?s:`${s}:${r}`,href:Dv(t,n,r,i)}}function kv(e,t){for(let n of t){let t=e[n];if(typeof t==`string`&&t.length>0)return t}}function Av(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t;if(typeof t==`string`&&t.trim()!==``&&Number.isFinite(Number(t)))return Number(t)}}function jv(e){let t=kv(e,[`db.system`,`db.system.name`]),n=kv(e,[`db.statement`,`db.query.text`]);return!t&&!n?null:{system:t,statement:n,operation:kv(e,[`db.operation`,`db.operation.name`]),table:kv(e,[`db.sql.table`,`db.collection.name`]),dbName:kv(e,[`db.name`,`db.namespace`]),rowCount:Av(e,[`db.response.returned_rows`,`db.rows_affected`])}}var Mv=new Set(`select.from.where.insert.into.values.update.set.delete.join.left.right.inner.outer.full.cross.on.and.or.not.in.is.null.as.order.by.group.having.limit.offset.distinct.union.all.returning.with.using.between.like.asc.desc.count.case.when.then.else.end.exists.create.table.alter.drop.index`.split(`.`)),Nv=/('(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*|[^A-Za-z_']+)/g;function Pv(e){let t=[];for(let[n]of e.matchAll(Nv))n.startsWith(`'`)?t.push({text:n,kind:`string`}):/^[A-Za-z_]/.test(n)&&Mv.has(n.toLowerCase())?t.push({text:n,kind:`keyword`}):t.push({text:n,kind:`text`});return t}var Fv=(e,t=p,n=p,r=p,i=p,a=p)=>{var o=Yv(),s=F(o),c=F(s);Ra(F(c),n),D(c);var l=L(c,2),u=F(l,!0);D(l);var d=L(l,2);{let e=M(()=>$(`text-fg-subtle transition-transform`,r()&&`rotate-180`));wp(d,{size:14,get class(){return z(e)}})}D(s);var f=L(s,2),m=e=>{var t=Jv();Ra(F(t),a),D(t),H(e,t)};W(f,e=>{r()&&e(m)}),D(o),R(()=>U(u,t())),B(`click`,s,function(...e){i()?.apply(this,e)}),H(e,o)},Iv=(e,t=p,n=p,r=p)=>{var i=Xv(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(()=>{J(i,`title`,r()),U(o,t()),U(c,n())}),H(e,i)},Lv=/(password|secret|token|authorization|api[-_.]?key)/i;function Rv(e,t){return typeof t!=`number`&&typeof t!=`boolean`&&Lv.test(e)}var zv=[`service.`,`deployment.`,`host.`,`container.`,`process.`];function Bv(e){return e==null?{label:`null`,cls:`bg-hover text-fg-subtle border-line`}:Array.isArray(e)?{label:`array`,cls:`bg-amber-500/15 text-amber-600 border-amber-500/30`}:typeof e==`string`?{label:`string`,cls:`bg-green-500/15 text-green-600 border-green-500/30`}:typeof e==`number`?{label:`number`,cls:`bg-blue-500/15 text-blue-600 border-blue-500/30`}:typeof e==`boolean`?{label:`boolean`,cls:`bg-purple-500/15 text-purple-600 border-purple-500/30`}:{label:`object`,cls:`bg-stone-500/15 text-stone-600 border-stone-500/30`}}var Vv=`text-[9px] px-1.5 py-px rounded border font-mono flex-shrink-0`,Hv=`${Vv} bg-hover text-fg-subtle border-line`,Uv=V(`<span>resource</span>`),Wv=V(`<div class="py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2"><span class="text-fg-subtle font-medium"> </span> <span>json</span> <!></div> <div class="mt-1"><!></div></div>`),Gv=V(`<button class="ml-auto p-0.5 hover:bg-hover rounded flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity" title="View full value"><!></button>`),Kv=V(`<button type="button" class="text-fg-subtle hover:text-fg underline decoration-dotted" title="Click to reveal">[redacted]</button>`),qv=V(`<div class="group py-1 border-b border-line-subtle last:border-b-0"><div class="flex items-center gap-2 min-w-0"><span class="text-fg-subtle font-medium truncate"> </span> <span> </span> <!> <!></div> <div class="mt-0.5 text-fg leading-snug at-wrap-anywhere"><!></div></div>`),Jv=V(`<div class="px-4 pb-3"><!></div>`),Yv=V(`<div class="border-b border-line-subtle"><button class="w-full flex items-center gap-2 px-4 py-3 hover:bg-subtle transition-colors"><span class="text-fg-subtle"><!></span> <span class="text-xs font-medium text-fg-muted flex-1 text-left"> </span> <!></button> <!></div>`),Xv=V(`<div><div class="text-fg-subtle mb-0.5"> </div> <div class="font-mono font-medium text-fg"> </div></div>`),Zv=V(`<span class="px-2 py-0.5 rounded bg-hover text-fg-subtle text-xs font-mono" title="Instrumentation scope"> </span>`),Qv=V(`<div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!> <!></div>`),$v=V(`<div class="mx-4 mt-4 p-3 bg-danger-bg border border-danger-border rounded-md"><div class="flex items-start gap-2"><!> <div class="text-xs text-danger"><span class="font-medium">Error:</span> </div></div></div>`),ey=V(`<li class="font-mono text-[11px] text-fg-muted"> </li>`),ty=V(`<p class="mt-1 text-[11px] text-fg-subtle"> </p>`),ny=V(`<div><div class="mb-1 flex items-center gap-1.5"><!> <span class="text-xs font-medium text-fg"> </span></div> <ul class="space-y-0.5"></ul> <!></div>`),ry=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="mb-1 flex items-center justify-between gap-2"><span class="text-[11px] uppercase tracking-wide text-fg-muted">Reproduce</span> <!></div> <code class="block overflow-x-auto whitespace-pre rounded bg-subtle px-2 py-1 text-[11px] text-fg-muted"> </code> <p class="mt-1 text-[11px] text-fg-subtle">Rebuilt from span attributes. Headers appear only if captured; the
3
+ body is never recorded.</p></div>`),iy=V(`<option> </option>`),ay=V(`<div class="mt-1 text-[11px] text-fg-subtle font-mono"> </div>`),oy=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Code Location</span> <select class="text-[10px] bg-subtle border border-line rounded px-1 py-0.5 text-fg-muted" title="Editor to open source files in"></select></div> <a class="group flex items-center gap-2 text-xs font-mono text-accent hover:underline break-all"><!> <span class="break-all"> </span></a> <!> <div class="mt-1 text-[10px] text-fg-subtle break-all"> </div></div>`),sy=V(`<span class="text-[10px] px-1.5 py-px rounded border font-mono bg-indigo-500/15 text-indigo-600 border-indigo-500/30"> </span>`),cy=V(`<div class="grid grid-cols-2 gap-2 text-xs mb-2"><!> <!> <!> <!></div>`),ly=V(`<span> </span>`),uy=V(`<pre class="bg-subtle rounded p-2.5 border border-line font-mono text-[11px] text-fg whitespace-pre-wrap break-all overflow-auto max-h-[240px]"></pre>`),dy=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted flex-1">Database</span> <!></div> <!> <!></div>`),fy=V(`<div class="flex items-center gap-2"><span class="text-fg-subtle">Parent:</span> <span class="font-medium text-fg"> </span></div>`),py=V(`<div class="text-fg-muted truncate"> </div>`),my=V(`<div class="text-fg-subtle"> </div>`),hy=V(`<div><span class="text-fg-subtle"> </span> <div class="mt-1 space-y-1 pl-2"><!> <!></div></div>`),gy=V(`<div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Relationships</span></div> <div class="space-y-2 text-xs"><!> <!></div></div>`),_y=V(`<div class="text-fg-subtle py-2 text-center">No matches</div>`),vy=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs h-[300px] min-h-[120px] overflow-auto resize-y" title="Drag bottom edge to resize"><!></div>`),yy=V(`<!> <!>`,1),by=V(`<div class="font-mono text-[11px] text-fg-muted mt-1"><pre class="whitespace-pre-wrap break-words"> </pre></div>`),xy=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center justify-between mb-1"><span class="font-medium text-xs text-fg"> </span> <span class="text-[10px] text-fg-subtle"> </span></div> <!></div>`),Sy=V(`<div class="space-y-2"></div>`),Cy=V(`<span></span>`),wy=V(`<div class="mt-1.5 pt-1.5 border-t border-line"><div class="font-mono text-[10px] text-fg-subtle"> </div></div>`),Ty=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="flex items-center gap-2 text-xs mb-1"><span class="text-fg-subtle">Trace:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <div class="flex items-center gap-2 text-xs"><span class="text-fg-subtle">Span:</span> <button type="button" title="Open linked span in the Traces waterfall" class="font-mono text-accent hover:underline text-[11px] truncate text-left cursor-pointer"> </button> <!></div> <!></div>`),Ey=V(`<div class="space-y-1.5"></div>`),Dy=V(`<span class="text-[10px] text-accent font-medium">this span</span>`),Oy=V(`<div><div class="flex items-center gap-2 mb-0.5"><span> </span> <!> <span class="text-fg-subtle text-[10px] ml-auto"> </span></div> <div class="text-fg-muted break-all line-clamp-2"> </div></div>`),ky=V(`<div class="border-b border-line-subtle"><div class="flex items-center gap-2 px-4 py-3"><!> <span class="text-xs font-medium text-fg-muted"> </span></div> <div class="px-4 pb-3"><div class="space-y-1.5 max-h-[200px] overflow-auto"></div></div></div>`),Ay=V(`<div class="fixed inset-0 z-[1200] flex items-center justify-center" role="dialog" aria-modal="true"><div class="absolute inset-0 bg-black/60 backdrop-blur-[2px] at-backdrop-in"></div> <div class="at-modal-in relative z-[1] w-[min(700px,92vw)] max-h-[85vh] flex flex-col bg-surface rounded-lg shadow-xl border border-line overflow-hidden"><div class="flex items-center justify-between px-4 py-2.5 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-mono font-semibold text-fg-muted truncate"> </span> <button class="p-1 hover:bg-hover rounded transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-auto p-4"><pre class="font-mono text-xs text-fg whitespace-pre-wrap break-all"> </pre></div></div></div>`),jy=V(`<div class="flex flex-col h-full bg-surface border-l border-line"><div class="flex items-start justify-between gap-3 px-4 py-3 border-b border-line bg-subtle"><div class="flex-1 min-w-0"><h3 class="font-semibold text-sm text-fg truncate mb-1"> </h3> <div class="flex items-center gap-2 flex-wrap"><span> </span> <span class="px-2 py-0.5 rounded bg-hover text-fg-muted text-xs font-medium"> </span> <!></div></div> <button class="p-1.5 hover:bg-hover rounded-md transition-colors flex-shrink-0" title="Close"><!></button></div> <div class="flex-1 overflow-auto"><!> <!> <!> <!> <div class="px-4 py-3 border-b border-line-subtle"><div class="space-y-2 text-xs"><!> <!> <!></div></div> <div class="px-4 py-3 border-b border-line-subtle"><div class="flex items-center gap-2 mb-2"><!> <span class="text-xs font-medium text-fg-muted">Resource</span></div> <div class="grid grid-cols-2 gap-3 text-xs"><!> <!> <!> <!></div></div> <!> <!> <!> <!> <!> <!> <!></div> <!></div>`);function My(e,t){it(t,!0);let n=(e,t=p,n=p,r=p)=>{let i=M(()=>Rv(t(),n())&&!z(c).has(t())),a=M(()=>zv.some(e=>t().startsWith(e))),o=M(()=>z(i)?null:J_(n()));var s=ua(),l=I(s),u=e=>{var n=Wv(),r=F(n),i=F(r),s=F(i,!0);D(i);var c=L(i,2),l=L(c,2),u=e=>{var t=Uv();q(t,1,K(Hv)),H(e,t)};W(l,e=>{z(a)&&e(u)}),D(r);var d=L(r,2);cv(F(d),{get data(){return z(o)}}),D(d),D(n),R(e=>{U(s,t()),q(c,1,e)},[()=>K($(Vv,`bg-amber-500/15 text-amber-600 border-amber-500/30`))]),H(e,n)},d=e=>{let o=M(()=>Bv(n())),s=M(()=>String(n()));var l=qv(),u=F(l),d=F(u),f=F(d,!0);D(d);var p=L(d,2),m=F(p,!0);D(p);var h=L(p,2),g=e=>{var t=Uv();q(t,1,K(Hv)),H(e,t)};W(h,e=>{z(a)&&!z(i)&&e(g)});var _=L(h,2),v=e=>{var n=Gv();Im(F(n),{size:10,class:`text-fg-subtle`}),D(n),B(`click`,n,()=>r()({key:t(),value:z(s)})),H(e,n)};W(_,e=>{!z(i)&&z(s).length>60&&e(v)}),D(u);var y=L(u,2),b=F(y),x=e=>{var n=Kv();B(`click`,n,()=>P(c,new Set(z(c)).add(t()),!0)),H(e,n)},S=e=>{var t=la();R(()=>U(t,z(s))),H(e,t)};W(b,e=>{z(i)?e(x):e(S,-1)}),D(y),D(l),R(e=>{J(d,`title`,t()),U(f,t()),q(p,1,e),U(m,z(i)?`sensitive`:z(o).label)},[()=>K($(Vv,z(o).cls))]),H(e,l)};W(l,e=>{z(o)===null?e(d,-1):e(u)}),H(e,s)},r=[{value:`vscode`,label:`VS Code`},{value:`cursor`,label:`Cursor`},{value:`webstorm`,label:`WebStorm`}],i=M(()=>vv(t.span)),a=M(()=>bv(t.span)),o=N(_r({timing:!0,attributes:!0,events:!1,links:!1})),s=N(null),c=N(_r(new Set));Lr(()=>{t.span.spanId,P(c,new Set,!0)});let l=e=>{P(o,{...z(o),[e]:!z(o)[e]},!0)},u=M(()=>t.span.status.code===`ERROR`),d=M(()=>Object.keys(t.span.attributes||{}).length>0),f=M(()=>t.span.events&&t.span.events.length>0),m=M(()=>t.span.links&&t.span.links.length>0),h=M(()=>hs(t.span,t.trace.service)),g=M(()=>gs(t.span.attributes,z(h))),v=M(()=>Object.entries(t.span.attributes||{}).filter(([e])=>e.startsWith(`service.`)||e.startsWith(`deployment.`)||e.startsWith(`host.`)||e.startsWith(`container.`)||e.startsWith(`process.`))),y=M(()=>Object.entries(t.span.attributes||{}).sort(([e],[t])=>e.localeCompare(t))),b=N(``),x=M(()=>{let e=z(b).trim().toLowerCase();return e?z(y).filter(([t,n])=>ev(e,[t,n])):z(y)}),S=M(()=>z(b).trim().length>0),C=M(()=>Ov(t.span.attributes||{},Qc.value)),w=M(()=>jv(t.span.attributes||{})),T=M(()=>z(w)?.statement?Pv(z(w).statement):[]),ee=M(()=>Ag(t.span,t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId))),te=M(()=>t.span.startTime-t.trace.startTime),ne=M(()=>t.span.endTime-t.trace.startTime),re=M(()=>t.trace.spans.find(e=>e.spanId===t.span.parentSpanId)),ie=M(()=>t.trace.spans.filter(e=>e.parentSpanId===t.span.spanId)),ae=M(()=>t.trace.spans.find(e=>!e.parentSpanId)),oe=e=>Pu(t.trace.traceId,e),se=M(()=>fl.value),ce=M(()=>z(se).filter(e=>e.traceId===t.trace.traceId));var le=jy(),E=F(le),ue=F(E),de=F(ue),fe=F(de,!0);D(de);var pe=L(de,2),me=F(pe),he=F(me,!0);D(me);var ge=L(me,2),_e=F(ge,!0);D(ge);var ve=L(ge,2),ye=e=>{var n=Zv(),r=F(n);D(n),R(()=>U(r,`${t.span.scope.name??``}
4
+ ${t.span.scope.version?`@${t.span.scope.version}`:``}`)),H(e,n)};W(ve,e=>{t.span.scope?.name&&e(ye)}),D(pe),D(ue);var be=L(ue,2);ig(F(be),{size:16,class:`text-fg-subtle`}),D(be),D(E);var xe=L(E,2);{let e=e=>{Pp(e,{size:14})},c=e=>{var n=Qv(),r=F(n);{let e=M(()=>od(t.span.duration));Iv(r,()=>`Duration`,()=>z(e))}var i=L(r,2);{let e=M(()=>od(z(ee)));Iv(i,()=>`Self time`,()=>z(e),()=>`Time in this span excluding its children`)}var a=L(i,2);{let e=M(()=>od(z(te)));Iv(a,()=>`Start (relative)`,()=>z(e))}var o=L(a,2);{let e=M(()=>od(z(ne)));Iv(o,()=>`End (relative)`,()=>z(e))}var s=L(o,2);{let e=M(()=>Fg(t.span.startTime,Uu.value));Iv(s,()=>`Start Time`,()=>z(e))}D(n),H(e,n)};var Se=F(xe),Ce=e=>{var n=$v(),r=F(n),i=F(r);Ap(i,{size:14,class:`text-danger flex-shrink-0 mt-0.5`});var a=L(i,2),o=L(F(a));D(a),D(r),D(n),R(()=>U(o,` ${t.span.status.message??``}`)),H(e,n)};W(Se,e=>{t.span.status.message&&e(Ce)});var we=L(Se,2);Fv(we,()=>`Timing`,()=>e,()=>z(o).timing,()=>()=>l(`timing`),()=>c);var Te=L(we,2),Ee=e=>{var t=ny(),n=F(t),r=F(n);{let e=M(()=>z(a).severity===`error`?`text-danger`:`text-warning`);Kh(r,{size:13,get class(){return z(e)}})}var i=L(r,2),o=F(i);D(i),D(n);var s=L(n,2);G(s,20,()=>z(a).codes,e=>e,(e,t)=>{var n=ey(),r=F(n,!0);D(n),R(()=>U(r,t)),H(e,n)}),D(s);var c=L(s,2),l=e=>{var t=ty(),n=F(t);D(t),R(()=>U(n,`${z(a).count-z(a).codes.length} more not listed on the span.`)),H(e,t)};W(c,e=>{z(a).count>z(a).codes.length&&e(l)}),D(t),R(()=>{q(t,1,K(z(a).severity===`error`?`border-b border-line-subtle bg-danger/5 px-4 py-3`:`border-b border-line-subtle bg-warning/5 px-4 py-3`)),U(o,`${z(a).count??``}
5
+ ${z(a).count===1?`contract violation`:`contract violations`}`)}),H(e,t)};W(Te,e=>{z(a)&&e(Ee)});var De=L(Te,2),Oe=e=>{var t=ry(),n=F(t);mv(L(F(n),2),{get value(){return z(i)},label:`Copy as curl`}),D(n);var r=L(n,2),a=F(r,!0);D(r),Ke(2),D(t),R(()=>U(a,z(i))),H(e,t)};W(De,e=>{z(i)&&e(Oe)});var ke=L(De,2),Ae=F(ke),je=F(Ae);fv(je,{label:`Span ID`,get value(){return t.span.spanId}});var Me=L(je,2);{let e=M(()=>z(ae)&&z(ae).spanId!==t.span.spanId?()=>oe(z(ae).spanId):void 0);fv(Me,{label:`Trace ID`,get value(){return t.span.traceId},get onActivate(){return z(e)},activateTitle:`Go to root span`})}var Ne=L(Me,2),Pe=e=>{{let n=M(()=>z(re)?()=>oe(t.span.parentSpanId):void 0),r=M(()=>z(re)?`Go to parent span`:`Parent span not captured in this trace`);fv(e,{label:`Parent Span ID`,get value(){return t.span.parentSpanId},get onActivate(){return z(n)},get activateTitle(){return z(r)}})}};W(Ne,e=>{t.span.parentSpanId&&e(Pe)}),D(Ae),D(ke);var Fe=L(ke,2),Ie=F(Fe);Rh(F(Ie),{size:14,class:`text-fg-subtle`}),Ke(2),D(Ie);var Le=L(Ie,2),Re=F(Le);Iv(Re,()=>`Trace Service`,()=>t.trace.service);var ze=L(Re,2);Iv(ze,()=>`Derived Resource`,()=>z(h));var Be=L(ze,2);Iv(Be,()=>`Resource Type`,()=>z(g));var Ve=L(Be,2);{let e=M(()=>String(z(v).length));Iv(Ve,()=>`Resource Attrs`,()=>z(e))}D(Le),D(Fe);var He=L(Fe,2),Ue=e=>{var t=oy(),n=F(t),i=F(n);Ip(i,{size:14,class:`text-fg-subtle`});var a=L(i,4);G(a,21,()=>r,e=>e.value,(e,t)=>{var n=iy(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).value)&&(n.value=(n.__value=z(t).value)??``)}),H(e,n)}),D(a);var o;lo(a),D(n);var s=L(n,2),c=F(s);Xp(c,{size:12,class:`flex-shrink-0`});var l=L(c,2),u=F(l,!0);D(l),D(s);var d=L(s,2),f=e=>{var t=ay(),n=F(t);D(t),R(()=>U(n,`${z(C).namespace?`${z(C).namespace}.`:``}${z(C).functionName??``}()`)),H(e,t)};W(d,e=>{z(C).functionName&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(t),R(()=>{o!==(o=Qc.value)&&(a.value=(a.__value=Qc.value)??``,co(a,Qc.value)),J(s,`href`,z(C).href),J(s,`title`,`Open ${z(C).filepath}${z(C).line?`:${z(C).line}`:``}`),U(u,z(C).display),U(m,z(C).filepath)}),B(`change`,a,e=>$c(e.currentTarget.value)),H(e,t)};W(He,e=>{z(C)&&e(Ue)});var We=L(He,2),Ge=e=>{var t=dy(),n=F(t),r=F(n);Wp(r,{size:14,class:`text-fg-subtle`});var i=L(r,4),a=e=>{var t=sy(),n=F(t,!0);D(t),R(()=>U(n,z(w).system)),H(e,t)};W(i,e=>{z(w).system&&e(a)}),D(n);var o=L(n,2),s=e=>{var t=cy(),n=F(t),r=e=>{Iv(e,()=>`Operation`,()=>z(w).operation)};W(n,e=>{z(w).operation&&e(r)});var i=L(n,2),a=e=>{Iv(e,()=>`Table`,()=>z(w).table)};W(i,e=>{z(w).table&&e(a)});var o=L(i,2),s=e=>{Iv(e,()=>`Database`,()=>z(w).dbName)};W(o,e=>{z(w).dbName&&e(s)});var c=L(o,2),l=e=>{{let t=M(()=>String(z(w).rowCount));Iv(e,()=>`Rows`,()=>z(t))}};W(c,e=>{z(w).rowCount!==void 0&&e(l)}),D(t),H(e,t)};W(o,e=>{(z(w).operation||z(w).table||z(w).dbName||z(w).rowCount!==void 0)&&e(s)});var c=L(o,2),l=e=>{X_(e,{get content(){return z(w).statement},children:(e,t)=>{var n=uy();G(n,21,()=>z(T),ka,(e,t)=>{var n=ly(),r=F(n,!0);D(n),R(()=>{q(n,1,K(z(t).kind===`keyword`?`text-indigo-500 font-semibold`:z(t).kind===`string`?`text-green-500`:``)),U(r,z(t).text)}),H(e,n)}),D(n),H(e,n)},$$slots:{default:!0}})};W(c,e=>{z(w).statement&&e(l)}),D(t),H(e,t)};W(We,e=>{z(w)&&e(Ge)});var qe=L(We,2),Je=e=>{var t=gy(),n=F(t);Em(F(n),{size:14,class:`text-fg-subtle`}),Ke(2),D(n);var r=L(n,2),i=F(r),a=e=>{var t=fy(),n=L(F(t),2),r=F(n,!0);D(n),D(t),R(()=>U(r,z(re).name)),H(e,t)};W(i,e=>{z(re)&&e(a)});var o=L(i,2),s=e=>{var t=hy(),n=F(t),r=F(n);D(n);var i=L(n,2),a=F(i);G(a,17,()=>z(ie).slice(0,5),e=>e.spanId,(e,t)=>{var n=py(),r=F(n,!0);D(n),R(()=>U(r,z(t).name)),H(e,n)});var o=L(a,2),s=e=>{var t=my(),n=F(t);D(t),R(()=>U(n,`+${z(ie).length-5} more`)),H(e,t)};W(o,e=>{z(ie).length>5&&e(s)}),D(i),D(t),R(()=>U(r,`Children (${z(ie).length??``}):`)),H(e,t)};W(o,e=>{z(ie).length>0&&e(s)}),D(r),D(t),H(e,t)};W(qe,e=>{(z(re)||z(ie).length>0)&&e(Je)});var Ye=L(qe,2),Xe=e=>{let r=e=>{Rh(e,{size:14})},i=e=>{var r=yy(),i=I(r);$_(i,{class:`mb-2`,inputClass:`border-line bg-subtle text-fg focus:border-line focus-visible:ring-1 focus-visible:ring-accent`,placeholder:`Filter attributes by key or value…`,ariaLabel:`Filter attributes by key or value`,get value(){return z(b)},set value(e){P(b,e,!0)}});var a=L(i,2);{let e=M(()=>JSON.stringify(t.span.attributes,null,2));X_(a,{get content(){return z(e)},children:(e,t)=>{var r=vy(),i=F(r),a=e=>{H(e,_y())},o=e=>{var t=ua();G(I(t),17,()=>z(x),([e,t])=>e,(e,t)=>{var r=M(()=>_(z(t),2));n(e,()=>z(r)[0],()=>z(r)[1],()=>e=>P(s,e,!0))}),H(e,t)};W(i,e=>{z(x).length===0?e(a):e(o,-1)}),D(r),H(e,r)},$$slots:{default:!0}})}H(e,r)};{let n=M(()=>z(S)?`Attributes (${z(x).length} of ${Object.keys(t.span.attributes).length})`:`Attributes (${Object.keys(t.span.attributes).length})`);Fv(e,()=>z(n),()=>r,()=>z(o).attributes,()=>()=>l(`attributes`),()=>i)}};W(Ye,e=>{z(d)&&e(Xe)});var Ze=L(Ye,2),Qe=e=>{let n=e=>{wm(e,{size:14})},r=e=>{var n=Sy();G(n,21,()=>t.span.events,ka,(e,n)=>{var r=xy(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s);D(s),D(i);var l=L(i,2),u=e=>{{let t=M(()=>JSON.stringify(z(n).attributes,null,2));X_(e,{get content(){return z(t)},children:(e,t)=>{var r=by(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(z(n).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},d=M(()=>z(n).attributes&&Object.keys(z(n).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(r),R(e=>{U(o,z(n).name),U(c,`+${e??``}`)},[()=>od(z(n).timestamp-t.span.startTime)]),H(e,r)}),D(n),H(e,n)};Fv(e,()=>`Events (${t.span.events.length})`,()=>n,()=>z(o).events,()=>()=>l(`events`),()=>r)};W(Ze,e=>{z(f)&&e(Qe)});var $e=L(Ze,2),et=e=>{let n=e=>{Am(e,{size:14})},r=e=>{var n=Ey();G(n,21,()=>t.span.links,ka,(e,t)=>{var n=Ty(),r=F(n),i=L(F(r),2),a=F(i,!0);D(i),X_(L(i,2),{get content(){return z(t).traceId},children:(e,t)=>{H(e,Cy())},$$slots:{default:!0}}),D(r);var o=L(r,2),s=L(F(o),2),c=F(s,!0);D(s),X_(L(s,2),{get content(){return z(t).spanId},children:(e,t)=>{H(e,Cy())},$$slots:{default:!0}}),D(o);var l=L(o,2),u=e=>{var n=wy(),r=F(n),i=F(r,!0);D(r),D(n),R(e=>U(i,e),[()=>Object.entries(z(t).attributes).map(([e,t])=>`${e}: ${typeof t==`object`?JSON.stringify(t):t}`).join(`, `)]),H(e,n)},d=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(l,e=>{z(d)&&e(u)}),D(n),R(()=>{U(a,z(t).traceId),U(c,z(t).spanId)}),B(`click`,i,()=>Fu(z(t).traceId,z(t).spanId)),B(`click`,s,()=>Fu(z(t).traceId,z(t).spanId)),H(e,n)}),D(n),H(e,n)};Fv(e,()=>`Links (${t.span.links.length})`,()=>n,()=>z(o).links,()=>()=>l(`links`),()=>r)};W($e,e=>{z(m)&&e(et)});var tt=L($e,2),nt=e=>{var n=ky(),r=F(n),i=F(r);im(i,{size:14,class:`text-fg-subtle`});var a=L(i,2),o=F(a);D(a),D(r);var s=L(r,2),c=F(s);G(c,23,()=>z(ce).slice(0,50),(e,t)=>e.id||t,(e,n)=>{let r=M(()=>z(n).spanId===t.span.spanId),i=M(()=>z(n).severityText||`INFO`),a=M(()=>z(i)===`ERROR`?`text-danger`:z(i)===`WARN`?`text-warning`:`text-fg-subtle`),o=M(()=>typeof z(n).body==`string`?z(n).body:JSON.stringify(z(n).body));var s=Oy(),c=F(s),l=F(c),u=F(l,!0);D(l);var d=L(l,2),f=e=>{H(e,Dy())};W(d,e=>{z(r)&&e(f)});var p=L(d,2),m=F(p,!0);D(p),D(c);var h=L(c,2),g=F(h,!0);D(h),D(s),R((e,t,n)=>{q(s,1,e),q(l,1,t),U(u,z(i)),U(m,n),U(g,z(o))},[()=>K($(`text-xs p-2 rounded border`,z(r)?`border-accent/30 bg-accent/10`:`border-line-subtle bg-subtle`)),()=>K($(`font-mono font-medium`,z(a))),()=>Fg(z(n).timestamp,Uu.value)]),H(e,s)}),D(c),D(s),D(n),R(()=>U(o,`Correlated Logs (${z(ce).length??``})`)),H(e,n)};W(tt,e=>{z(ce).length>0&&e(nt)}),D(xe)}var rt=L(xe,2),ot=e=>{var t=Ay(),n=F(t),r=L(n,2),i=F(r),a=F(i),o=F(a,!0);D(a);var c=L(a,2);ig(F(c),{size:16,class:`text-fg-subtle`}),D(c),D(i);var l=L(i,2),u=F(l),d=F(u,!0);D(u),D(l),D(r),D(t),R(()=>{J(t,`aria-label`,`Full value for ${z(s).key}`),U(o,z(s).key),U(d,z(s).value)}),B(`click`,n,()=>P(s,null)),B(`click`,c,()=>P(s,null)),H(e,t)};W(rt,e=>{z(s)&&e(ot)}),D(le),R(e=>{U(fe,t.span.name||`Unknown Span`),q(me,1,e),U(he,t.span.status.code),U(_e,t.span.kind)},[()=>K($(`px-2 py-0.5 rounded text-xs font-medium`,z(u)?`bg-danger-bg text-danger`:t.span.status.code===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,be,function(...e){t.onClose?.apply(this,e)}),H(e,le),at()}ea([`click`,`change`]);var Ny=V(`<div><!></div>`),Py=V(`<div class="flex flex-col gap-2"><button class="flex items-center gap-2 cursor-pointer text-fg-muted hover:text-fg transition-colors w-fit"><!> <span class="text-xs font-medium"> </span></button> <!></div>`);function Fy(e,t){it(t,!0);var n=Py(),r=F(n),i=F(r);{let e=M(()=>$(`text-fg-subtle transition-transform`,t.expanded&&`rotate-180`));wp(i,{size:12,get class(){return z(e)}})}var a=L(i,2),o=F(a,!0);D(a),D(r);var s=L(r,2),c=e=>{var n=Ny();Ra(F(n),()=>t.children),D(n),H(e,n)};W(s,e=>{t.expanded&&e(c)}),D(n),R(()=>U(o,t.label)),B(`click`,r,function(...e){t.onToggle?.apply(this,e)}),H(e,n),at()}ea([`click`]);var Iy=V(`<div class="bg-subtle rounded p-3 border border-line font-mono text-xs"><pre class="whitespace-pre-wrap break-words text-fg"> </pre></div>`),Ly=V(`<div class="font-mono text-xs text-fg-muted mt-1"> </div>`),Ry=V(`<div class="bg-subtle rounded p-2.5 border border-line"><div class="font-medium text-xs text-fg mb-1.5"> </div> <!></div>`),zy=V(`<div class="space-y-2"></div>`),By=V(`<div class="text-xs text-fg-muted"><span class="font-medium">Status message:</span> </div>`),Vy=V(`<div role="presentation" class="mt-3 pt-3 border-t border-line space-y-3"><!> <!> <!></div>`),Hy=V(`<div role="button" tabindex="0" data-focus-inset=""><div class="flex items-center justify-between gap-4"><div class="flex-1 min-w-0"><div class="font-medium text-sm mb-1 text-fg"> </div> <div class="flex items-center gap-3 text-xs text-fg-muted"><span> </span> <span> </span> <span class="text-fg-subtle"> </span></div></div> <button class="p-1 hover:bg-hover rounded"><!></button></div> <!></div>`);function Uy(e,t){it(t,!0);let n=N(!1),r=N(_r({attributes:!1,events:!1})),i=M(()=>t.span.status.code===`ERROR`);function a(e){P(r,{...z(r),[e]:!z(r)[e]},!0)}function o(){let e=0,n=t.span;for(;n.parentSpanId;){e++;let r=t.trace.spans.find(e=>e.spanId===n.parentSpanId);if(!r)break;n=r}return e}let s=M(o),c=M(()=>Object.keys(t.span.attributes||{}).length>0),l=M(()=>t.span.events&&t.span.events.length>0);var u=Hy(),d=M(()=>xg(t.onSelect)),f=F(u),p=F(f),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g),v=F(_,!0);D(_);var y=L(_,2),b=F(y,!0);D(y);var x=L(y,2),S=F(x,!0);D(x),D(g),D(p);var C=L(p,2),w=F(C);{let e=M(()=>$(`text-fg-subtle transition-transform flex-shrink-0`,z(n)&&`rotate-180`));wp(w,{size:14,get class(){return z(e)}})}D(C),D(f);var T=L(f,2),ee=e=>{var n=Vy(),i=F(n),o=e=>{Fy(e,{label:`All attributes`,get expanded(){return z(r).attributes},onToggle:()=>a(`attributes`),children:(e,n)=>{{let n=M(()=>JSON.stringify(t.span.attributes,null,2));X_(e,{get content(){return z(n)},children:(e,n)=>{var r=Iy(),i=F(r),a=F(i,!0);D(i),D(r),R(e=>U(a,e),[()=>JSON.stringify(t.span.attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},$$slots:{default:!0}})};W(i,e=>{z(c)&&e(o)});var s=L(i,2),u=e=>{{let n=M(()=>`Events (${t.span.events.length})`);Fy(e,{get label(){return z(n)},get expanded(){return z(r).events},onToggle:()=>a(`events`),children:(e,n)=>{var r=zy();G(r,21,()=>t.span.events,ka,(e,t)=>{var n=Ry(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=e=>{{let n=M(()=>JSON.stringify(z(t).attributes,null,2));X_(e,{get content(){return z(n)},children:(e,n)=>{var r=Ly(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>JSON.stringify(z(t).attributes,null,2)]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>z(t).attributes&&Object.keys(z(t).attributes).length>0);W(a,e=>{z(s)&&e(o)}),D(n),R(()=>U(i,z(t).name)),H(e,n)}),D(r),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{z(l)&&e(u)});var d=L(s,2),f=e=>{var n=By(),r=L(F(n));D(n),R(()=>U(r,` ${t.span.status.message??``}`)),H(e,n)};W(d,e=>{t.span.status.message&&e(f)}),D(n),B(`click`,n,e=>e.stopPropagation()),H(e,n)};W(T,e=>{z(n)&&e(ee)}),D(u),R((e,n,r)=>{q(u,1,e),so(u,`padding-left: ${16+z(s)*20}px;`),U(h,t.span.name||`unknown`),q(_,1,n),U(v,t.span.status.code),U(b,r),U(S,t.span.kind)},[()=>K($(`px-4 py-3`,`hover:bg-subtle transition-colors cursor-pointer`,z(i)&&`bg-danger-bg`,t.isSelected&&`bg-hover hover:bg-hover`)),()=>K($(`font-medium`,ld(t.span.status.code))),()=>od(t.span.duration)]),B(`click`,u,function(...e){t.onSelect?.apply(this,e)}),B(`keydown`,u,function(...e){z(d)?.apply(this,e)}),B(`click`,C,e=>{e.stopPropagation(),P(n,!z(n))}),H(e,u),at()}ea([`click`,`keydown`]);var Wy=`1.0.0`;function Gy(e){return{version:Wy,exportedAt:new Date().toISOString(),trace:e}}function Ky(e){return{version:Wy,exportedAt:new Date().toISOString(),traces:e}}function qy(e){return JSON.stringify(e,null,2)}function Jy(e,t){let n=qy(Gy(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`trace-${e.traceId.slice(0,8)}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function Yy(e,t){let n=qy(Ky(e)),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`traces-${e.length}-${new Date().toISOString().split(`T`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}async function Xy(e){let t=qy(Gy(e));await navigator.clipboard.writeText(t)}function Zy(e,t){if(!e)return[`${t}: Invalid span data`];let n=e;return[...Us(n,t,Rs,[`spanId`,`traceId`,`name`]),...Us(n,t,zs,[`startTime`,`endTime`,`duration`]),...Us(n,t,Bs,[`status`])]}function Qy(e,t){let n=`trace[${t}]`;if(!e)return{errors:[`${n}: Invalid trace data`],warnings:[]};let r=e,i=Rs(r,`correlationId`)?[]:[`${n}: Missing correlationId, will use traceId`],a=Bs(r,`rootSpan`),o=Hs(r,`spans`)?Vs(r,`spans`).flatMap((e,t)=>Zy(Ls(e),`${n}.spans[${t}]`)):[`${n}: Missing or invalid spans array`];return{errors:[...Us(r,n,Rs,[`traceId`]),...a?Zy(a,`${n}.rootSpan`):[`${n}: Missing or invalid rootSpan`],...o,...Us(r,n,zs,[`startTime`,`endTime`,`duration`])],warnings:i}}function $y(e){return e}function eb(e){let t=[],n=[],r=[],i;try{i=JSON.parse(e)}catch(e){return{success:!1,traces:[],errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let a=Ls(i);if(!a)return{success:!1,traces:[],errors:[`Parsed data is not an object`],warnings:[]};let o=Rs(a,`version`);o&&o!==Wy&&n.push(`Version mismatch: expected ${Wy}, got ${o}`);let s=Bs(a,`trace`);if(s){let e=Qy(s,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(tb($y(s)))}else if(Hs(a,`traces`))for(let[e,i]of Vs(a,`traces`).entries()){let a=Ls(i),o=Qy(a,e);t.push(...o.errors),n.push(...o.warnings),a&&o.errors.length===0&&r.push(tb($y(a)))}else if(a.traceId){let e=Qy(a,0);t.push(...e.errors),n.push(...e.warnings),e.errors.length===0&&r.push(tb($y(a)))}else t.push(`Unrecognized format: expected { trace: ... } or { traces: [...] } or direct trace object`);return{success:t.length===0&&r.length>0,traces:r,errors:t,warnings:n}}function tb(e){return{...e,correlationId:e.correlationId||e.traceId.slice(0,8),service:e.service||`imported`,status:e.status||(e.spans.some(e=>e.status.code===`ERROR`)?`ERROR`:`OK`),spans:e.spans.map(nb),rootSpan:nb(e.rootSpan)}}function nb(e){return{...e,kind:e.kind||`INTERNAL`,attributes:e.attributes||{},status:{code:e.status?.code||`UNSET`,message:e.status?.message},events:e.events||[]}}function rb(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(Error(`Failed to read file`)),r.readAsText(e)})}function ib(e){return{version:Wy,kind:`autotel-devtools-snapshot`,capturedAt:new Date().toISOString(),data:e}}function ab(e,t){let n=JSON.stringify(ib(e),null,2),r=new Blob([n],{type:`application/json`}),i=URL.createObjectURL(r),a=`autotel-snapshot-${new Date().toISOString().replaceAll(`:`,`-`).split(`.`)[0]}.json`,o=document.createElement(`a`);o.href=i,o.download=t||a,document.body.append(o),o.click(),o.remove(),URL.revokeObjectURL(i)}function ob(e,t){return Vs(e,t)}function sb(e){let t;try{t=JSON.parse(e)}catch(e){return{success:!1,errors:[`Invalid JSON: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}let n=Ls(t);if(!n)return{success:!1,errors:[`Snapshot is not an object`],warnings:[]};let r=[];n.kind&&n.kind!==`autotel-devtools-snapshot`&&r.push(`Unexpected snapshot kind: ${String(n.kind)}`);let i=Rs(n,`version`);i&&i!==Wy&&r.push(`Version mismatch: expected ${Wy}, got ${i}`);let a=Bs(n,`data`)??n,o=ob(a,`traces`).map(tb),s=ob(a,`logs`),c=ob(a,`errors`);return o.length===0&&s.length===0&&c.length===0?{success:!1,errors:[`Snapshot contains no traces, logs, or errors`],warnings:r}:{success:!0,snapshot:{traces:o,logs:s,errors:c},errors:[],warnings:r}}async function cb(e){try{return sb(await rb(e))}catch(e){return{success:!1,errors:[`Failed to read file: ${e instanceof Error?e.message:String(e)}`],warnings:[]}}}var lb=V(`<div class="text-warning">Partial trace — the root span has not arrived. This is the highest
6
+ span received; the duration covers only the spans present.</div>`),ub=V(`<span class="text-xs text-fg-muted tabular-nums flex-shrink-0"> </span>`),db=V(`<div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div>`),fb=V(`<div class="overflow-auto h-full"><div class="divide-y divide-line-subtle"></div></div>`),pb=V(`<!> <div class="flex-shrink-0 overflow-hidden"><!></div>`,1),mb=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line"><div class="flex items-center justify-between mb-3"><button><!> Back to traces</button> <div class="flex items-center gap-2"><div class="flex items-center gap-1"><button class="p-1.5 hover:bg-hover rounded transition-colors" title="Copy trace JSON to clipboard"><!></button> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Download trace as JSON"><!></button></div> <div class="flex items-center gap-1 bg-hover rounded-md p-0.5"><button title="Waterfall view (w)"><!> Timeline</button> <button title="Flame graph view (f)"><!> Flame</button> <button title="List view (l)"><!> List</button></div> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="flex items-start justify-between gap-4"><div class="flex-1 min-w-0"><h3 class="font-semibold text-base mb-1.5 text-fg"> </h3> <div class="text-xs text-fg-subtle space-y-0.5"><!> <div> </div> <div class="font-mono flex items-center gap-1"><span class="truncate"> </span> <!></div></div></div> <div class="text-right flex-shrink-0"><div> </div> <div class="text-xs text-fg-muted"> </div> <div class="text-xs text-fg-subtle mt-1"> </div></div></div></div> <!> <div class="flex-1 overflow-hidden flex"><div class="flex-1 overflow-hidden min-w-0"><!></div> <!></div></div>`);function hb(e,t){it(t,!0);let n=N(`waterfall`),r=M(()=>t.trace.spans.find(e=>e.spanId===Uc.value)??null),i=e=>Uc.value=e?.spanId??null,a=N(``),o=N(0),s=N(null);Lr(()=>{let e=e=>{e.key===`/`&&z(n)===`waterfall`&&!bg()&&(e.preventDefault(),z(s)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let c=N(!1),l=N(void 0),u=b_({initial:320,min:260,minOther:360,containerRef:{get current(){return z(l)??null}},storageKey:`autotel-devtools:span-detail-width`,invert:!0}),d=M(()=>u.size),f=M(()=>u.dragging),p=M(()=>u.separatorProps);function m(e,t,n){let r=e.filter(e=>e.status.code===`ERROR`);return r.length===0?null:r[((t?r.findIndex(e=>e.spanId===t.spanId):-1)+n+r.length)%r.length]}Lr(()=>{let e=e=>{if(!el.value){if(e.key===`Escape`){z(r)?i(null):Pu(null);return}if(!bg()){if(e.key===`w`)e.preventDefault(),P(n,`waterfall`);else if(e.key===`f`)e.preventDefault(),P(n,`flame`);else if(e.key===`l`)e.preventDefault(),P(n,`list`);else if(e.key===`e`&&!e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),1);n&&i(n)}else if(e.key===`E`&&e.shiftKey){e.preventDefault();let n=m(t.trace.spans,z(r),-1);n&&i(n)}}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});function h(e){return new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function g(){Jy(t.trace)}async function _(){await Xy(t.trace),P(c,!0),setTimeout(()=>P(c,!1),2e3)}var v=mb(),y=F(v),b=F(y),x=F(b);Ep(F(x),{size:14}),Ke(),D(x);var S=L(x,2),C=F(S),w=F(C),T=F(w),ee=e=>{Sp(e,{size:14,class:`text-success`})},te=e=>{Bp(e,{size:14,class:`text-fg-subtle`})};W(T,e=>{z(c)?e(ee):e(te,-1)}),D(w);var ne=L(w,2);Jp(F(ne),{size:14,class:`text-fg-subtle`}),D(ne),D(C);var re=L(C,2),ie=F(re);vp(F(ie),{size:12}),Ke(),D(ie);var ae=L(ie,2);cm(F(ae),{size:12}),Ke(),D(ae);var oe=L(ae,2);Om(F(oe),{size:12}),Ke(),D(oe),D(re);var se=L(re,2);Mp(F(se),{size:14,class:`text-fg-subtle`}),D(se),D(S),D(b);var ce=L(b,2),le=F(ce),E=F(le),ue=F(E,!0);D(E);var de=L(E,2),fe=F(de),pe=e=>{H(e,lb())};W(fe,e=>{t.trace.partial&&e(pe)});var me=L(fe,2),he=F(me,!0);D(me);var ge=L(me,2),_e=F(ge),ve=F(_e);D(_e),mv(L(_e,2),{get value(){return t.trace.traceId},label:`Copy trace ID`,stop:!1}),D(ge),D(de),D(le);var ye=L(le,2),be=F(ye),xe=F(be,!0);D(be);var Se=L(be,2),Ce=F(Se,!0);D(Se);var we=L(Se,2),Te=F(we);D(we),D(ye),D(ce),D(y);var Ee=L(y,2),De=e=>{var t=db(),n=F(t);$_(n,{placeholder:`Search spans… (press /)`,ariaLabel:`Search spans by name or service`,clearTitle:`Clear search`,get value(){return z(a)},set value(e){P(a,e,!0)},get ref(){return z(s)},set ref(e){P(s,e,!0)}});var r=L(n,2),i=e=>{var t=ub(),n=F(t);D(t),R(()=>U(n,`${z(o)??``}
7
+ ${z(o)===1?`match`:`matches`}`)),H(e,t)},c=M(()=>z(a).trim());W(r,e=>{z(c)&&e(i)}),D(t),H(e,t)};W(Ee,e=>{z(n)===`waterfall`&&e(De)});var Oe=L(Ee,2),ke=F(Oe),Ae=F(ke),je=e=>{{let n=M(()=>z(r)?.spanId);A_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)},get query(){return z(a)},onMatchCount:e=>P(o,e,!0)})}},Me=e=>{{let n=M(()=>z(r)?.spanId);q_(e,{get trace(){return t.trace},onSpanSelect:i,get selectedSpanId(){return z(n)}})}},Ne=e=>{var n=fb(),a=F(n);G(a,21,()=>t.trace.spans,e=>e.spanId,(e,n)=>{{let a=M(()=>z(r)?.spanId===z(n).spanId);Uy(e,{get span(){return z(n)},get trace(){return t.trace},get isSelected(){return z(a)},onSelect:()=>i(z(n))})}}),D(a),D(n),H(e,n)};W(Ae,e=>{z(n)===`waterfall`?e(je):z(n)===`flame`?e(Me,1):e(Ne,-1)}),D(ke);var Pe=L(ke,2),Fe=e=>{var n=pb(),a=I(n);g_(a,X({get dragging(){return z(f)},title:`Drag to resize the detail panel · double-click to reset`},()=>z(p)));var o=L(a,2);My(F(o),{get span(){return z(r)},get trace(){return t.trace},onClose:()=>i(null)}),D(o),R(()=>so(o,`width: ${z(d)??``}px;`)),H(e,n)};W(Pe,e=>{z(r)&&e(Fe)}),D(Oe),Ho(Oe,e=>P(l,e),()=>z(l)),D(v),R((e,n,r,i,a,o,s)=>{q(x,1,e),q(ie,1,n),q(ae,1,r),q(oe,1,i),U(ue,t.trace.rootSpan.name||`Trace`),U(he,a),U(ve,`Trace ID: ${t.trace.traceId??``}`),q(be,1,o),U(xe,t.trace.status),U(Ce,s),U(Te,`${t.trace.spans.length??``} spans`)},[()=>K($(`text-xs text-fg-muted hover:text-fg`,`flex items-center gap-1 transition-colors`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`waterfall`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`flame`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>K($(`px-2 py-1 text-xs rounded transition-colors flex items-center gap-1`,z(n)===`list`?`bg-surface text-fg shadow-sm`:`text-fg-muted hover:text-fg`)),()=>h(t.trace.startTime),()=>K($(`font-medium text-sm mb-1`,ld(t.trace.status))),()=>od(t.trace.duration)]),B(`click`,x,()=>Pu(null)),B(`click`,w,_),B(`click`,ne,g),B(`click`,ie,()=>P(n,`waterfall`)),B(`click`,ae,()=>P(n,`flame`)),B(`click`,oe,()=>P(n,`list`)),B(`click`,se,()=>tl(yg)),H(e,v),at()}ea([`click`]);var gb=V(`<span class="ml-0.5 min-w-[16px] px-1 rounded-full bg-accent text-[10px] font-semibold text-white text-center tabular-nums"> </span>`),_b=V(`<div class="sticky top-0 bg-surface p-2 border-b border-line-subtle"><div class="relative"><!> <input type="text" placeholder="Narrow options…" class="w-full pl-6 pr-2 py-1 text-xs rounded border border-line bg-subtle text-fg focus:outline-none focus:border-accent"/></div></div>`),vb=V(`<span class="text-accent normal-case"> </span>`),yb=V(`<div class="px-1 py-1 text-xs text-fg-subtle">No matches</div>`),bb=ca(`<svg viewBox="0 0 12 12" class="w-2.5 h-2.5 text-white" fill="none" stroke="currentColor" stroke-width="2"><path d="M2.5 6.5l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`),xb=V(`<button type="button" role="menuitemcheckbox"><span><!></span> <span class="flex-1 truncate"> </span> <span class="flex-shrink-0 font-mono tabular-nums text-fg-subtle"> </span></button>`),Sb=V(`<div class="flex flex-col gap-0.5"></div>`),Cb=V(`<div class="p-2 border-b border-line-subtle last:border-b-0"><div class="flex items-center justify-between px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-fg-subtle"><span> </span> <!></div> <!></div>`),wb=V(`<button type="button" class="flex items-center gap-1 w-full px-3 py-2 text-xs text-fg-subtle hover:bg-hover transition-colors border-t border-line"><!> Clear all filters</button>`),Tb=V(`<div class="absolute right-0 z-30 mt-1 w-64 max-h-[60vh] overflow-auto rounded-md border border-line bg-surface shadow-lg" role="menu"><!> <!> <!></div>`),Eb=V(`<div class="relative"><button type="button" aria-haspopup="true" title="Filter by facets"><!> <span>Filter</span> <!></button> <!></div>`);function Db(e,t){it(t,!0);let n=Z(t,`searchThreshold`,3,8),r=N(!1),i=N(``),a=N(void 0),o=M(()=>t.facets.reduce((e,t)=>e+t.selected.size,0)),s=M(()=>t.facets.some(e=>e.options.length>n()));function c(e){let t=z(i).trim().toLowerCase();return[...t?e.options.filter(e=>e.value.toLowerCase().includes(t)):e.options].sort((t,n)=>{let r=+!!e.selected.has(t.value),i=+!!e.selected.has(n.value);return r===i?t.count===n.count?t.value.localeCompare(n.value):n.count-t.count:i-r})}function l(){P(r,!z(r)),z(r)||P(i,``)}Lr(()=>{if(!z(r))return;let e=e=>{z(a)&&!e.composedPath().includes(z(a))&&(P(r,!1),P(i,``))},t=e=>{e.key===`Escape`&&(P(r,!1),P(i,``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}});var u=Eb(),d=F(u),f=F(d);um(f,{size:12});var p=L(f,4),m=e=>{var t=gb(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(p,e=>{z(o)>0&&e(m)}),D(d);var h=L(d,2),g=e=>{var n=Tb(),r=F(n),a=e=>{var t=_b(),n=F(t),r=F(n);wh(r,{size:12,class:`absolute left-2 top-1/2 -translate-y-1/2 text-fg-subtle`});var a=L(r,2);So(a),D(n),D(t),jo(a,()=>z(i),e=>P(i,e)),H(e,t)};W(r,e=>{z(s)&&e(a)});var l=L(r,2);G(l,17,()=>t.facets,e=>e.key,(e,t)=>{let n=M(()=>c(z(t)));var r=Cb(),i=F(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2),l=e=>{var n=vb(),r=F(n,!0);D(n),R(()=>U(r,z(t).selected.size)),H(e,n)};W(s,e=>{z(t).selected.size>0&&e(l)}),D(i);var u=L(i,2),d=e=>{H(e,yb())},f=e=>{var r=Sb();G(r,21,()=>z(n),e=>e.value,(e,n)=>{let r=M(()=>z(t).selected.has(z(n).value));var i=xb(),a=F(i),o=F(a),s=e=>{H(e,bb())};W(o,e=>{z(r)&&e(s)}),D(a);var c=L(a,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u),D(i),R((e,t)=>{q(i,1,e),J(i,`aria-checked`,z(r)),q(a,1,t),J(c,`title`,z(n).value),U(l,z(n).value),U(d,z(n).count)},[()=>K($(`flex items-center gap-2 px-1.5 py-1 rounded text-xs text-left transition-colors`,z(r)?`bg-accent/15 text-accent`:`text-fg-muted hover:bg-hover`)),()=>K($(`flex-shrink-0 w-3 h-3 rounded-sm border flex items-center justify-center`,z(r)?`bg-accent border-accent`:`border-line`))]),B(`click`,i,()=>z(t).onToggle(z(n).value)),H(e,i)}),D(r),H(e,r)};W(u,e=>{z(n).length===0?e(d):e(f,-1)}),D(r),R(()=>U(o,z(t).label)),H(e,r)});var u=L(l,2),d=e=>{var n=wb();ig(F(n),{size:12}),Ke(),D(n),B(`click`,n,function(...e){t.onClearAll?.apply(this,e)}),H(e,n)};W(u,e=>{z(o)>0&&e(d)}),D(n),H(e,n)};W(h,e=>{z(r)&&e(g)}),D(u),Ho(u,e=>P(a,e),()=>z(a)),R(e=>{q(d,1,e),J(d,`aria-expanded`,z(r))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded border transition-colors`,z(o)>0||z(r)?`border-accent/40 bg-accent/10 text-accent`:`border-line text-fg-muted hover:bg-hover`))]),B(`click`,d,l),H(e,u),at()}ea([`click`]);var Ob={"=~":`REGEXP`,"!~":`NOT REGEXP`},kb=/[^\s()[\],=!<>^$"']/,Ab=[`>=`,`<=`,`!=`,`=~`,`!~`,`=`,`>`,`<`,`^`,`$`];function jb(e){let t=[],n=0,r=(e,n,r,i,a=!0)=>t.push({type:e,value:n,from:r,to:i,terminated:a});for(;n<e.length;){let t=e[n];if(/\s/.test(t)){n++;continue}let i={"(":`lparen`,")":`rparen`,"[":`lbracket`,"]":`rbracket`,",":`comma`};if(i[t]){r(i[t],t,n,n+1),n++;continue}if(t===`"`||t===`'`){let i=n,a=t;n++;let o=``,s=!1;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){o+=e[n+1],n+=2;continue}if(e[n]===a){n++,s=!0;break}o+=e[n],n++}r(`string`,o,i,n,s);continue}let a=Ab.find(t=>e.startsWith(t,n));if(a){r(`sigil`,a,n,n+a.length),n+=a.length;continue}let o=n;for(;n<e.length&&kb.test(e[n]);)n++;n===o&&n++,r(`word`,e.slice(o,n),o,n)}return t}var Mb=new Set([`and`,`or`]),Nb=new Set([`null`,`nil`]),Pb=new Map([[`contains`,`CONTAINS`],[`regexp`,`REGEXP`],[`in`,`IN`]]);function Fb(e){let t=jb(e),n=[],r=()=>({from:t.length?t[t.length-1].to:0,to:e.length}),i=0,a=(e=0)=>t[i+e],o=()=>t[i++],s=(e,t)=>n.push({message:e,range:t}),c=(e=0)=>{let t=a(e);return t?.type===`word`?t.value.toLowerCase():void 0},l=(e=0)=>{let t=c(e);return t!==void 0&&Mb.has(t)};function u(e,t){return{from:e.from,to:t.to}}function d(){let e=o();if(!e){s(`Expected a value`,r());return}if(e.type===`string`)return e.terminated||s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`string`,value:e.value};if(e.type===`lbracket`){let e=[];if(a()?.type===`rbracket`)return o(),{type:`array`,values:e};for(;;){let t=d();if(!t)return{type:`array`,values:e};e.push(t);let n=a();if(n?.type===`comma`){o();continue}return n?.type===`rbracket`?(o(),{type:`array`,values:e}):(s(`Expected "," or "]" in array`,n??r()),{type:`array`,values:e})}}if(e.type===`word`){let t=e.value.toLowerCase();if(Nb.has(t))return{type:`null`};if(t===`true`)return{type:`boolean`,value:!0};if(t===`false`)return{type:`boolean`,value:!1};let n=Number(e.value);return Number.isFinite(n)?{type:`number`,value:n}:{type:`string`,value:e.value}}s(`Expected a value, found "${e.value}"`,e)}function f(){let e=a();if(!e)return;if(e.type===`sigil`)return o(),Ob[e.value]??e.value;if(e.type!==`word`)return;let t=e.value.toLowerCase();if(t===`not`){let e=c(1),t=e?Pb.get(e):void 0;return t?(o(),o(),`NOT ${t}`):void 0}let n=Pb.get(t);if(n)return o(),n}function p(){let e=a();if(!e){s(`Expected a condition`,r());return}if(e.type===`lparen`){o();let e=g(),t=a();return t?.type===`rparen`?o():s(`Unclosed parenthesis — expected ")"`,t??r()),e}if(e.type===`word`||e.type===`string`){let n=i;o();let r=f();if(r){let n=d();if(!n)return;let a=t[i-1];return{type:`comparison`,field:e.value,op:r,value:n,range:u(e,a??e)}}return i=n,o(),e.type===`string`&&!e.terminated&&s(`Unterminated quoted string`,{from:e.from,to:e.to}),{type:`freeText`,text:e.value,range:{from:e.from,to:e.to}}}s(`Unexpected "${e.value}"`,e),o()}function m(){let e=a();return!e||e.type===`rparen`||e.type===`rbracket`||e.type===`comma`?!1:!l()}function h(){let e=p();if(e)for(;;){if(c()===`and`){o();let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Ib(e,t)};continue}if(m()){let t=p();if(!t)return e;e={type:`and`,left:e,right:t,range:Ib(e,t)};continue}return e}}function g(){let e=h();if(e){for(;c()===`or`;){o();let t=h();if(!t)return e;e={type:`or`,left:e,right:t,range:Ib(e,t)}}return e}}if(t.length===0)return{ok:!0,node:{type:`all`}};let _=g(),v=a();return v&&s(`Unexpected "${v.value}"`,v),n.length>0||!_?{ok:!1,errors:n.length>0?n:[{message:`Invalid query`,range:r()}]}:{ok:!0,node:_}}function Ib(e,t){let n=`range`in e?e.range.from:0;return{from:n,to:`range`in t?t.range.to:n}}var Lb=V(`<button type="button" title="Clear query" aria-label="Clear query" class="absolute right-1.5 top-[7px] p-0.5 text-fg-subtle hover:text-fg-muted"><!></button>`),Rb=V(`<button type="button" role="option" aria-selected="false" class="block w-full px-2 py-1.5 text-left font-mono text-xs text-fg hover:bg-hover"> </button>`),zb=V(`<div role="listbox" aria-label="Query fields" class="absolute left-0 right-0 top-full z-30 mt-1 max-h-48 overflow-auto rounded border border-line bg-surface shadow-lg"></div>`),Bb=V(`<div id="query-error" role="status" class="mt-1 flex items-start gap-1.5 text-[11px] text-danger"><!> <span> <span class="text-fg-subtle"> </span></span></div>`),Vb=V(`<div><!> <input spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="Query"/> <!> <!> <!></div>`);function Hb(e,t){it(t,!0);let n=Z(t,`placeholder`,3,`Filter — e.g. service = api AND duration > 100`),r=Z(t,`fields`,19,()=>[]),i=Z(t,`ref`,15,null),a=M(()=>Fb(t.value)),o=M(()=>z(a).ok?[]:z(a).errors),s=M(()=>z(o).length>0?z(o):t.serverErrors??[]),c=M(()=>z(s).length>0&&t.value.trim().length>0),l=N(!1),u=M(()=>{let e=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),n=e?.[1]?.toLowerCase()??``;return t.value.trim().length>0&&!e?[]:r().filter(e=>e.toLowerCase().startsWith(n)).filter(e=>e.toLowerCase()!==n).slice(0,8)});function d(e){e.key===`Enter`&&!z(c)&&(e.preventDefault(),t.onSubmit(t.value)),e.key===`Escape`&&t.value&&(e.preventDefault(),t.onInput(``),t.onSubmit(``))}function f(){t.onInput(``),t.onSubmit(``),i()?.focus()}function p(e){let n=t.value.match(/(?:^|[\s(])([A-Za-z_][\w.-]*)$/),r=n?.[1]?t.value.length-n[1].length:t.value.length;t.onInput(`${t.value.slice(0,r)}${e} = `),i()?.focus()}var m=Vb(),h=F(m);wh(h,{size:12,class:`absolute left-2 top-[9px] text-fg-subtle pointer-events-none`});var g=L(h,2);So(g),Ho(g,e=>i(e),()=>i());var _=L(g,2),v=e=>{var t=Lb();ig(F(t),{size:12}),D(t),B(`click`,t,f),H(e,t)};W(_,e=>{t.value&&e(v)});var y=L(_,2),b=e=>{var t=zb();G(t,20,()=>z(u),e=>e,(e,t)=>{var n=Rb(),r=F(n,!0);D(n),R(()=>U(r,t)),B(`mousedown`,n,e=>e.preventDefault()),B(`click`,n,()=>p(t)),H(e,n)}),D(t),H(e,t)};W(y,e=>{z(l)&&z(u).length>0&&e(b)});var x=L(y,2),S=e=>{var t=Bb(),n=F(t);Ap(n,{size:12,class:`mt-px shrink-0`});var r=L(n,2),i=F(r),a=L(i),o=F(a);D(a),D(r),D(t),R(()=>{U(i,`${z(s)[0].message??``} `),U(o,`(column ${z(s)[0].range.from+1})`)}),H(e,t)};W(x,e=>{z(c)&&e(S)}),D(m),R((e,r)=>{q(m,1,e),Co(g,t.value),J(g,`placeholder`,n()),J(g,`aria-invalid`,z(c)?`true`:void 0),J(g,`aria-describedby`,z(c)?`query-error`:void 0),q(g,1,r)},[()=>K($(`relative`,t.class)),()=>K($(`w-full pl-7 pr-7 py-1.5 text-xs font-mono rounded border bg-surface text-fg`,`focus:outline-none focus:ring-1`,z(c)?`border-danger-border focus:ring-danger`:`border-line focus:ring-accent`))]),B(`input`,g,e=>t.onInput(e.currentTarget.value)),B(`keydown`,g,d),$i(`focus`,g,()=>P(l,!0)),$i(`blur`,g,()=>P(l,!1)),H(e,m),at()}ea([`input`,`keydown`,`click`,`mousedown`]);function Ub(e){return typeof e==`function`}function Wb(e){return typeof e==`object`&&!!e}var Gb=[`string`,`number`,`bigint`,`boolean`];function Kb(e){return e==null||Gb.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>Kb(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var qb=Symbol(`box`),Jb=Symbol(`is-writable`);function Yb(e,t){let n=M(e);return t?{[qb]:!0,[Jb]:!0,get current(){return z(n)},set current(e){t(e)}}:{[qb]:!0,get current(){return e()}}}function Xb(e){return Wb(e)&&qb in e}function Zb(e){return Xb(e)?e:Ub(e)?Yb(e):Qb(e)}function Qb(e){let t=N(_r(e));return{[qb]:!0,[Jb]:!0,get current(){return z(t)},set current(e){P(t,e,!0)}}}function $b(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var ex=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,tx=/\n/g,nx=/^\s*/,rx=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ix=/^:\s*/,ax=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ox=/^[;\s]*/,sx=/^\s+|\s+$/g,cx=`
8
+ `,lx=`/`,ux=`*`,dx=``,fx=`comment`,px=`declaration`;function mx(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(tx);t&&(n+=t.length);var i=e.lastIndexOf(cx);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(nx)}function u(e){var t;for(e=e||[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(lx==e.charAt(0)&&ux==e.charAt(1)){for(var n=2;dx!=e.charAt(n)&&(ux!=e.charAt(n)||lx!=e.charAt(n+1));)++n;if(n+=2,dx===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:fx,comment:o})}}function f(){var e=a(),t=c(rx);if(t){if(d(),!c(ix))return s(`property missing ':'`);var n=c(ax),r=e({type:px,property:hx(t[0].replace(ex,dx)),value:n?hx(n[0].replace(ex,dx)):dx});return c(ox),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function hx(e){return e?e.replace(sx,dx):dx}function gx(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=mx(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n=n||{},n[r]=a)}),n}var _x=/\d/,vx=[`-`,`_`,`/`,`.`];function yx(e=``){if(!_x.test(e))return e!==e.toLowerCase()}function bx(e){let t=[],n=``,r,i;for(let a of e){let e=vx.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=yx(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function xx(e){return e?bx(e).map(e=>Cx(e)).join(``):``}function Sx(e){return wx(xx(e||``))}function Cx(e){return e?e[0].toUpperCase()+e.slice(1):``}function wx(e){return e?e[0].toLowerCase()+e.slice(1):``}function Tx(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[xx(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Sx(e)]=n}return gx(e,n),t}function Ex(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Dx(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Ox=Dx(/[A-Z]/,e=>`-${e.toLowerCase()}`);function kx(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Ox(t)}: ${e[t]};`).join(`
9
+ `)}function Ax(e={}){return kx(e).replace(`
10
+ `,` `)}var jx=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function Mx(e){return jx.has(e)}function Nx(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&Mx(e))t[e]=$b(n,i);else if(a&&o)t[e]=Ex(n,i);else if(e===`class`){let r=Kb(n),a=Kb(i);r&&a?t[e]=eo(n,i):r?t[e]=eo(n):a&&(t[e]=eo(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Tx(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Tx(n),...i};else if(o&&s){let r=Tx(n),a=Tx(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Ax(t.style).replaceAll(`
11
+ `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Px=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Fx(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ix,Lx=!1,Rx=new WeakMap,zx=new WeakMap,Bx=new WeakMap,Vx=new WeakSet;Ix=class extends Date{constructor(...e){super(...e),kt(this,Vx),O(this,Rx,N(super.getTime())),O(this,zx,new Map),O(this,Bx,li),Lx||k(Vx,this,Hx).call(this)}};function Hx(){Lx=!0;var e=Ix.prototype,t=Date.prototype,n=Object.getOwnPropertyNames(t);for(let r of n)(r.startsWith(`get`)||r.startsWith(`to`)||r===`valueOf`)&&(e[r]=function(...e){if(e.length>0)return z(j(Rx,this)),t[r].apply(this,e);var n=j(zx,this).get(r);if(n===void 0){let i=li;di(j(Bx,this)),n=M(()=>(z(j(Rx,this)),t[r].apply(this,e))),j(zx,this).set(r,n),di(i)}return z(n)}),r.startsWith(`set`)&&(e[r]=function(...e){var n=t[r].apply(this,e);return P(j(Rx,this),t.getTime.call(this)),n})}var Ux,Wx,Gx=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Kx=[`difference`,`intersection`,`symmetricDifference`,`union`],qx=!1,Jx=new WeakMap,Yx=new WeakMap,Xx=new WeakMap,Zx=new WeakMap,Qx=new WeakSet;Wx=Symbol.iterator,Ux=class extends Set{constructor(e){if(super(),kt(this,Qx),O(this,Jx,new Map),O(this,Yx,N(0)),O(this,Xx,N(0)),O(this,Zx,Si||-1),e){for(var t of e)super.add(t);j(Xx,this).v=super.size}qx||k(Qx,this,eS).call(this)}has(e){var t=super.has(e),n=j(Jx,this),r=n.get(e);if(r===void 0){if(!t)return z(j(Yx,this)),!1;r=k(Qx,this,$x).call(this,!0),n.set(e,r)}return z(r),t}add(e){return super.has(e)||(super.add(e),P(j(Xx,this),super.size),hr(j(Yx,this))),this}delete(e){var t=super.delete(e),n=j(Jx,this),r=n.get(e);return r!==void 0&&(n.delete(e),P(r,!1)),t&&(P(j(Xx,this),super.size),hr(j(Yx,this))),t}clear(){if(super.size!==0){super.clear();var e=j(Jx,this);for(var t of e.values())P(t,!1);e.clear(),P(j(Xx,this),0),hr(j(Yx,this))}}keys(){return this.values()}values(){return z(j(Yx,this)),super.values()}entries(){return z(j(Yx,this)),super.entries()}[Wx](){return this.keys()}get size(){return z(j(Xx,this))}};function $x(e){return Si===j(Zx,this)?N(e):dr(e)}function eS(){qx=!0;var e=Ux.prototype,t=Set.prototype;for(let n of Gx)e[n]=function(...e){return z(j(Yx,this)),t[n].apply(this,e)};for(let n of Kx)e[n]=function(...e){z(j(Yx,this));var r=t[n].apply(this,e);return new Ux(r)}}function tS(e){return tS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tS(e)}function nS(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=tS(e))!==null;);return e}function rS(){return rS=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=nS(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},rS.apply(null,arguments)}function iS(e,t,n,r){var i=rS(tS(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}var aS,oS,sS=new WeakMap,cS=new WeakMap,lS=new WeakMap,uS=new WeakMap,dS=new WeakSet;oS=Symbol.iterator;var fS=class extends Map{constructor(e){if(super(),kt(this,dS),O(this,sS,new Map),O(this,cS,N(0)),O(this,lS,N(0)),O(this,uS,Si||-1),e){for(var[t,n]of e)super.set(t,n);j(lS,this).v=super.size}}has(e){var t=j(sS,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(dS,this,pS).call(this,0),t.set(e,n);else return z(j(cS,this)),!1}return z(n),!0}forEach(e,t){k(dS,this,mS).call(this),super.forEach(e,t)}get(e){var t=j(sS,this),n=t.get(e);if(n===void 0){if(super.has(e))n=k(dS,this,pS).call(this,0),t.set(e,n);else{z(j(cS,this));return}}return z(n),super.get(e)}set(e,t){var n=j(sS,this),r=n.get(e),i=super.get(e),a=super.set(e,t),o=j(cS,this);if(r===void 0)r=k(dS,this,pS).call(this,0),n.set(e,r),P(j(lS,this),super.size),hr(o);else if(i!==t){hr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&hr(o)}return a}delete(e){var t=j(sS,this),n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(j(lS,this),super.size),hr(j(cS,this))),r}clear(){if(super.size!==0){super.clear();var e=j(sS,this);P(j(lS,this),0);for(var t of e.values())P(t,-1);hr(j(cS,this)),e.clear()}}keys(){return z(j(cS,this)),super.keys()}values(){return k(dS,this,mS).call(this),super.values()}entries(){return k(dS,this,mS).call(this),super.entries()}[oS](){return this.entries()}get size(){return z(j(lS,this)),super.size}};aS=fS;function pS(e){return Si===j(uS,this)?N(e):dr(e)}function mS(){z(j(cS,this));var e=j(sS,this);if(j(lS,this).v!==e.size){for(var t of iS(aS.prototype,`keys`,this,2)([]))if(!e.has(t)){var n=k(dS,this,pS).call(this,0);e.set(t,n)}}for([,n]of j(sS,this))z(n)}var hS=new WeakMap,gS=new WeakMap;new class{constructor(e={}){O(this,hS,void 0),O(this,gS,void 0);let{window:t=Px,document:n=t?.document}=e;t!==void 0&&(A(hS,this,n),A(gS,this,Dt(e=>{let n=Qi(t,`focusin`,e),r=Qi(t,`focusout`,e);return()=>{n(),r()}})))}get current(){return j(gS,this)?.call(this),j(hS,this)?Fx(j(hS,this)):null}};function _S(e){return typeof e==`function`}var vS=new WeakMap,yS=new WeakMap,bS=class{constructor(e){O(this,vS,void 0),O(this,yS,void 0),A(vS,this,e),A(yS,this,Symbol(e))}get key(){return j(yS,this)}exists(){return nt(j(yS,this))}get(){let e=et(j(yS,this));if(e===void 0)throw Error(`Context "${j(vS,this)}" not found`);return e}getOr(e){let t=et(j(yS,this));return t===void 0?e:t}set(e){return tt(j(yS,this),e)}};function xS(e,t){switch(e){case`post`:Lr(t);break;case`pre`:zr(t)}}function SS(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;xS(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Pi(()=>n(t,o));return o=t,r})}function CS(e,t,n){SS(e,`post`,t,n)}function wS(e,t,n){SS(e,`pre`,t,n)}CS.pre=wS;function TS(e){return _S(e)?e():e}var ES=new WeakMap,DS=new WeakMap,OS=new WeakMap,kS=new WeakMap,AS=new WeakMap,jS=new WeakMap,MS=new WeakMap,NS=new WeakMap,PS=class{constructor(e,t={box:`border-box`}){O(this,ES,{width:0,height:0}),O(this,DS,!1),O(this,OS,void 0),O(this,kS,void 0),O(this,AS,void 0),O(this,jS,M(()=>(z(j(NS,this))?.(),this.getSize().width))),O(this,MS,M(()=>(z(j(NS,this))?.(),this.getSize().height))),O(this,NS,M(()=>{let e=TS(j(kS,this));if(e)return Dt(t=>{if(!j(AS,this))return;let n=new(j(AS,this)).ResizeObserver(e=>{A(DS,this,!0);for(let t of e){let e=j(OS,this).box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];j(ES,this).width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),j(ES,this).height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{A(DS,this,!1),n.disconnect()}})})),A(AS,this,t.window??Px),A(OS,this,t),A(kS,this,e),A(ES,this,{width:0,height:0})}calculateSize(){let e=TS(j(kS,this));if(!e||!j(AS,this))return;let t=e.offsetWidth,n=e.offsetHeight;if(j(OS,this).box===`border-box`)return{width:t,height:n};let r=j(AS,this).getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return j(DS,this)?j(ES,this):this.calculateSize()??j(ES,this)}get current(){return z(j(NS,this))?.(),this.getSize()}get width(){return z(j(jS,this))}get height(){return z(j(MS,this))}};function FS(e){Lr(()=>()=>{e()})}function IS(e,t){return setTimeout(t,e)}function LS(e){ji().then(e)}var RS=1,zS=9,BS=11;function VS(e){return Wb(e)&&e.nodeType===RS&&typeof e.nodeName==`string`}function HS(e){return Wb(e)&&e.nodeType===zS}function US(e){return Wb(e)&&e.constructor?.name===`VisualViewport`}function WS(e){return Wb(e)&&e.nodeType!==void 0}function GS(e){return WS(e)&&e.nodeType===BS&&`host`in e}function KS(e,t){if(!e||!t||!VS(e)||!VS(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&GS(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function qS(e){return HS(e)?e:US(e)?e.document:e?.ownerDocument??document}function JS(e){return GS(e)?JS(e.host):HS(e)?e.defaultView??window:VS(e)?e.ownerDocument?.defaultView??window:window}function YS(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var XS=new WeakMap,ZS=class{get root(){return z(j(XS,this))}set root(e){P(j(XS,this),e)}constructor(e){x(this,`element`,void 0),O(this,XS,M(()=>this.element.current?this.element.current.getRootNode()??document:document)),x(this,`getDocument`,()=>qS(this.root)),x(this,`getWindow`,()=>this.getDocument().defaultView??window),x(this,`getActiveElement`,()=>YS(this.root)),x(this,`isActiveElement`,e=>e===this.getActiveElement()),x(this,`querySelector`,e=>this.root?this.root.querySelector(e):null),x(this,`querySelectorAll`,e=>this.root?this.root.querySelectorAll(e):[]),x(this,`setTimeout`,(e,t)=>this.getWindow().setTimeout(e,t)),x(this,`clearTimeout`,e=>this.getWindow().clearTimeout(e)),this.element=typeof e==`function`?Yb(e):e}getElementById(e){return this.root.getElementById(e)}};function QS(e,t){return{[Li()]:n=>Xb(e)?(e.current=n,Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pi(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function $S(e){return e?`true`:`false`}function eC(e){return e?`open`:`closed`}function tC(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var nC=new WeakMap,rC=new WeakMap,iC=class{constructor(e){O(this,nC,void 0),O(this,rC,void 0),x(this,`attrs`,void 0),A(nC,this,e.getVariant?e.getVariant():null),A(rC,this,j(nC,this)?`data-${j(nC,this)}-`:`data-${e.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${j(rC,this)}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function aC(e){let t=new iC(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var oC=typeof document<`u`,sC=cC();function cC(){return oC&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function lC(e){return e instanceof HTMLElement}function uC(e){return e instanceof Element}function dC(e){return e instanceof Element||e instanceof SVGElement}function fC(e){return e.pointerType===`touch`}function pC(e){return e!==null}var mC=new WeakMap,hC=new WeakMap,gC=new WeakMap,_C=new WeakMap,vC=new WeakSet,yC=class{constructor(e){kt(this,vC),O(this,mC,void 0),O(this,hC,null),O(this,gC,null),O(this,_C,0),A(mC,this,e),FS(()=>k(vC,this,bC).call(this))}run(e){k(vC,this,bC).call(this);let t=j(mC,this).ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){k(vC,this,xC).call(this,e);return}let n=j(_C,this),r=()=>{n===j(_C,this)&&k(vC,this,xC).call(this,e)},i=()=>{if(n!==j(_C,this))return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===j(_C,this)){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{A(hC,this,window.requestAnimationFrame(()=>{A(hC,this,null),i()}))};if(!j(mC,this).afterTick.current){a();return}A(hC,this,window.requestAnimationFrame(()=>{A(hC,this,null);let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}A(gC,this,new MutationObserver(()=>{n===j(_C,this)&&(t.hasAttribute(e)||(j(gC,this)?.disconnect(),A(gC,this,null),a()))})),j(gC,this).observe(t,{attributes:!0,attributeFilter:[e]})}))}};function bC(){var e;j(hC,this)!==null&&(window.cancelAnimationFrame(j(hC,this)),A(hC,this,null)),j(gC,this)?.disconnect(),A(gC,this,null),A(_C,this,(e=j(_C,this),e++,e))}function xC(e){let t=()=>{e()};j(mC,this).afterTick?LS(t):t()}var SC=new WeakMap,CC=new WeakMap,wC=new WeakMap,TC=new WeakMap,EC=new WeakMap,DC=new WeakMap,OC=new WeakMap,kC=new WeakSet,AC=class{constructor(e){kt(this,kC),O(this,SC,void 0),O(this,CC,void 0),O(this,wC,void 0),O(this,TC,N(!1)),O(this,EC,N(void 0)),O(this,DC,!1),O(this,OC,null),A(SC,this,e),P(j(TC,this),e.open.current,!0),A(CC,this,e.enabled??!0),A(wC,this,new yC({ref:j(SC,this).ref,afterTick:j(SC,this).open})),FS(()=>k(kC,this,jC).call(this)),CS(()=>j(SC,this).open.current,e=>{if(!j(DC,this)){A(DC,this,!0);return}if(k(kC,this,jC).call(this),!e&&j(SC,this).shouldSkipExitAnimation?.()){P(j(TC,this),!1),P(j(EC,this),void 0),j(SC,this).onComplete?.();return}if(e&&P(j(TC,this),!0),P(j(EC,this),e?`starting`:`ending`,!0),e&&A(OC,this,window.requestAnimationFrame(()=>{A(OC,this,null),j(SC,this).open.current&&P(j(EC,this),void 0)})),!j(CC,this)){e||P(j(TC,this),!1),P(j(EC,this),void 0),j(SC,this).onComplete?.();return}j(wC,this).run(()=>{e===j(SC,this).open.current&&(j(SC,this).open.current||P(j(TC,this),!1),P(j(EC,this),void 0),j(SC,this).onComplete?.())})})}get shouldRender(){return z(j(TC,this))}get transitionStatus(){return z(j(EC,this))}};function jC(){j(OC,this)!==null&&(window.cancelAnimationFrame(j(OC,this)),A(OC,this,null))}function MC(){}function NC(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function PC(e,t){var n=ua();Oa(I(n),()=>t.children,e=>{var n=ua();Ra(I(n),()=>t.children??p),H(e,n)}),H(e,n)}var FC=new bS(`BitsConfig`);function IC(){let e=new RC(null,{});return FC.getOr(e).opts}function LC(e){return FC.set(new RC(FC.getOr(null),e))}var RC=class{constructor(e,t){x(this,`opts`,void 0);let n=zC(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function zC(e,t){return n=>Yb(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function BC(e,t){return n=>{let r=IC();return Yb(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var VC=BC(e=>e.defaultPortalTo,`body`);function HC(e,t){it(t,!0);let n=VC(()=>t.to),r=rt(),i=M(a);function a(){if(!oC||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&(va(o),o=null)}CS([()=>z(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=ma(PC,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=ua(),l=I(c),u=e=>{var n=ua();Ra(I(n),()=>t.children??p),H(e,n)};W(l,e=>{t.disabled&&e(u)}),H(e,c),at()}var UC=class{constructor(e,t={bubbles:!0,cancelable:!0}){x(this,`eventName`,void 0),x(this,`options`,void 0),this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Qi(e,this.eventName,e=>{t(e)},n)}};function WC(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function GC(e,t){return e===t||e.contains(t)}function KC(e){return e?.ownerDocument??document}function qC(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var JC=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],YC=JC.join(`,`),XC=typeof Element>`u`,ZC=XC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,QC=!XC&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},$C=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):$C(e.parentNode))},ew=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},tw=function(e,t,n){if($C(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(YC));return t&&ZC.call(e,YC)&&r.unshift(e),r=r.filter(n),r},nw=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!$C(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=nw(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{ZC.call(a,YC)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!$C(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=nw(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},rw=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},iw=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ew(e))&&!rw(e)?0:e.tabIndex},aw=function(e,t){var n=iw(e);return n<0&&t&&!rw(e)?0:n},ow=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sw=function(e){return e.tagName===`INPUT`},cw=function(e){return sw(e)&&e.type===`hidden`},lw=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},uw=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},dw=function(e){if(!e.name)return!0;var t=e.form||QC(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=uw(r,e.form);return!i||i===e},fw=function(e){return sw(e)&&e.type===`radio`},pw=function(e){return fw(e)&&!dw(e)},mw=function(e){var t=e&&QC(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=QC(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},hw=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},gw=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=ZC.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(ZC.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=QC(e);if(s&&!s.shadowRoot&&r(s)===!0)return hw(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(mw(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return hw(e);return!1},_w=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return ZC.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},vw=function(e,t){return!(t.disabled||cw(t)||gw(t,e)||lw(t)||_w(t))},yw=function(e,t){return!(pw(t)||iw(t)<0||!vw(e,t))},bw=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},xw=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=aw(a,i),s=i?xw(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(ow).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Sw=function(e,t){return t=t||{},xw(t.getShadowRoot?nw([e],t.includeContainer,{filter:yw.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:bw}):tw(e,t.includeContainer,yw.bind(null,t)))},Cw=function(e,t){return t=t||{},t.getShadowRoot?nw([e],t.includeContainer,{filter:vw.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):tw(e,t.includeContainer,vw.bind(null,t))},ww=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return ZC.call(e,YC)!==!1&&yw(t,e)},Tw=JC.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Ew=function(e,t){if(t=t||{},!e)throw Error(`No node provided`);return ZC.call(e,Tw)!==!1&&vw(t,e)},Dw=`data-context-menu-trigger`,Ow=`data-context-menu-content`;new bS(`Menu.Root`),new bS(`Menu.Root | Menu.Sub`),new bS(`Menu.Content`),new bS(`Menu.Group | Menu.RadioGroup`),new bS(`Menu.RadioGroup`),new bS(`Menu.CheckboxGroup`),new UC(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),aC({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]});var kw;(kw=globalThis).bitsDismissableLayers??(kw.bitsDismissableLayers=new Map);var Aw=new WeakMap,jw=new WeakMap,Mw=new WeakMap,Nw=new WeakMap,Pw=new WeakMap,Fw=new WeakMap,Iw=new WeakMap,Lw=new WeakMap,Rw=new WeakMap,zw=new WeakSet,Bw=new WeakMap,Vw=new WeakMap,Hw=new WeakMap,Uw=new WeakMap,Ww=new WeakMap,Gw=new WeakMap,Kw=new WeakMap,qw=new WeakMap,Jw=new WeakMap,Yw=class e{static create(t){return new e(t)}constructor(e){kt(this,zw),x(this,`opts`,void 0),O(this,Aw,void 0),O(this,jw,void 0),O(this,Mw,{pointerdown:!1}),O(this,Nw,!1),O(this,Pw,!1),O(this,Fw,void 0),O(this,Iw,void 0),O(this,Lw,MC),O(this,Rw,e=>{e.defaultPrevented||this.opts.ref.current&&LS(()=>{!this.opts.ref.current||j(Gw,this).call(this,e.target)||e.target&&!j(Pw,this)&&j(Iw,this).current?.(e)})}),O(this,Bw,e=>{let t=e;t.defaultPrevented&&(t=tT(e)),j(Aw,this).current(e)}),O(this,Vw,WC(e=>{if(!this.opts.ref.current){j(Lw,this).call(this);return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||eT(e,this.opts.ref.current);if(!j(Nw,this)||k(zw,this,Zw).call(this)||!t){j(Lw,this).call(this);return}let n=e;if(n.defaultPrevented&&(n=tT(n)),j(jw,this).current!==`close`&&j(jw,this).current!==`defer-otherwise-close`){j(Lw,this).call(this);return}e.pointerType===`touch`?(j(Lw,this).call(this),A(Lw,this,Qi(j(Fw,this),`click`,j(Bw,this),{once:!0}))):j(Aw,this).current(n)},10)),O(this,Hw,e=>{j(Mw,this)[e.type]=!0}),O(this,Uw,e=>{j(Mw,this)[e.type]=!1}),O(this,Ww,()=>{this.opts.ref.current&&A(Nw,this,$w(this.opts.ref.current))}),O(this,Gw,e=>this.opts.ref.current?GC(this.opts.ref.current,e):!1),O(this,Kw,WC(()=>{for(let e in j(Mw,this))j(Mw,this)[e]=!1;A(Nw,this,!1)},20)),O(this,qw,()=>{A(Pw,this,!0)}),O(this,Jw,()=>{A(Pw,this,!1)}),x(this,`props`,{onfocuscapture:j(qw,this),onblurcapture:j(Jw,this)}),this.opts=e,A(jw,this,e.interactOutsideBehavior),A(Aw,this,e.onInteractOutside),A(Iw,this,e.onFocusOutside),Lr(()=>{A(Fw,this,KC(this.opts.ref.current))});let t=MC,n=null,r=!1,i=()=>{n!=null&&(clearTimeout(n),n=null)},a=()=>{i(),j(Kw,this).call(this),globalThis.bitsDismissableLayers.delete(this),j(Vw,this).destroy(),t()};CS([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return i(),n=IS(1,()=>{n=null,!(r||!this.opts.ref.current)&&(globalThis.bitsDismissableLayers.set(this,j(jw,this)),t(),t=k(zw,this,Xw).call(this))}),a}),FS(()=>{r=!0,i(),j(Kw,this).destroy(),globalThis.bitsDismissableLayers.delete(this),j(Vw,this).destroy(),j(Lw,this).call(this),t()})}};function Xw(){return Ex(Qi(j(Fw,this),`pointerdown`,Ex(j(Hw,this),j(Ww,this)),{capture:!0}),Qi(j(Fw,this),`pointerdown`,Ex(j(Uw,this),j(Vw,this))),Qi(j(Fw,this),`focusin`,j(Rw,this)))}function Zw(){return Object.values(j(Mw,this)).some(Boolean)}function Qw(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function $w(e){let t=[...globalThis.bitsDismissableLayers],n=Qw(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function eT(e,t){let n=e.target;if(!dC(n))return!1;let r=!!n.closest(`[${Dw}]`),i=!!t.closest(`[${Ow}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:KC(n).documentElement.contains(n)&&!GC(t,n)&&qC(e,t)}function tT(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function nT(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`onInteractOutside`,3,MC),i=Z(t,`onFocusOutside`,3,MC),a=Z(t,`isValidEvent`,3,()=>!1),o=Yw.create({id:Yb(()=>t.id),interactOutsideBehavior:Yb(()=>n()),onInteractOutside:Yb(()=>r()),enabled:Yb(()=>t.enabled),onFocusOutside:Yb(()=>i()),isValidEvent:Yb(()=>a()),ref:t.ref});var s=ua();Ra(I(s),()=>t.children??p,()=>({props:o.props})),H(e,s),at()}var rT;(rT=globalThis).bitsEscapeLayers??(rT.bitsEscapeLayers=new Map);var iT=new WeakMap,aT=new WeakMap,oT=class e{static create(t){return new e(t)}constructor(e){x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,iT,()=>Qi(this.domContext.getDocument(),`keydown`,j(aT,this),{passive:!1})),O(this,aT,e=>{if(e.key!==`Escape`||!sT(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}),this.opts=e,this.domContext=new ZS(this.opts.ref);let t=MC;CS(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=j(iT,this).call(this)),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}};function sT(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function cT(e,t){it(t,!0);let n=Z(t,`escapeKeydownBehavior`,3,`close`),r=Z(t,`onEscapeKeydown`,3,MC);oT.create({escapeKeydownBehavior:Yb(()=>n()),onEscapeKeydown:Yb(()=>r()),enabled:Yb(()=>t.enabled),ref:t.ref});var i=ua();Ra(I(i),()=>t.children??p),H(e,i),at()}var lT=new WeakMap,uT=new WeakMap,dT=new WeakMap,fT=class e{constructor(){O(this,lT,Qb([])),O(this,uT,new WeakMap),O(this,dT,new WeakMap)}static getInstance(){return this.instance||(this.instance=new e),this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&j(dT,this).set(e,n),j(lT,this).current=j(lT,this).current.filter(t=>t!==e),j(lT,this).current.unshift(e)}unregister(e){j(lT,this).current=j(lT,this).current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return j(lT,this).current[0]}setFocusMemory(e,t){j(uT,this).set(e,t)}getFocusMemory(e){return j(uT,this).get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){j(dT,this).set(e,t)}getPreFocusMemory(e){return j(dT,this).get(e)}clearPreFocusMemory(e){j(dT,this).delete(e)}};x(fT,`instance`,void 0);var pT=new WeakMap,mT=new WeakMap,hT=new WeakMap,gT=new WeakMap,_T=new WeakMap,vT=new WeakSet,yT=class e{constructor(e){kt(this,vT),O(this,pT,!1),O(this,mT,null),O(this,hT,fT.getInstance()),O(this,gT,[]),O(this,_T,void 0),A(_T,this,e)}get paused(){return j(pT,this)}pause(){A(pT,this,!0)}resume(){A(pT,this,!1)}mount(e){j(mT,this)&&this.unmount(),A(mT,this,e),j(hT,this).register(this),k(vT,this,CT).call(this),k(vT,this,xT).call(this)}unmount(){j(mT,this)&&(k(vT,this,bT).call(this),k(vT,this,ST).call(this),j(hT,this).unregister(this),j(hT,this).clearPreFocusMemory(this),A(mT,this,null))}static use(t){let n=null;return CS([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new e(t)),n.mount(r)):n&&(n.unmount(),n=null)}),FS(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function bT(){for(let e of j(gT,this))e();A(gT,this,[])}function xT(){if(!j(mT,this))return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});j(_T,this).onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!j(mT,this))return;let e=k(vT,this,TT).call(this);e?(e.focus(),j(hT,this).setFocusMemory(this,e)):j(mT,this).focus()})}function ST(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(j(_T,this).onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=j(hT,this).getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}function CT(){if(!j(mT,this)||!j(_T,this).trap.current)return;let e=j(mT,this),t=e.ownerDocument;j(gT,this).push(Qi(t,`focusin`,t=>{if(j(pT,this)||!j(hT,this).isActiveScope(this))return;let n=t.target;if(n){if(e.contains(n))j(hT,this).setFocusMemory(this,n);else{let n=j(hT,this).getFocusMemory(this);if(n&&e.contains(n)&&Ew(n))t.preventDefault(),n.focus();else{let t=k(vT,this,TT).call(this),n=k(vT,this,ET).call(this)[0];(t||n||e).focus()}}}},{capture:!0}),Qi(e,`keydown`,e=>{if(!j(_T,this).loop||j(pT,this)||e.key!==`Tab`||!j(hT,this).isActiveScope(this))return;let n=k(vT,this,wT).call(this);if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=j(hT,this).getFocusMemory(this);if(t&&!e.contains(t)){let t=k(vT,this,TT).call(this),n=k(vT,this,ET).call(this)[0],r=t||n;r?(r.focus(),j(hT,this).setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),j(gT,this).push(()=>n.disconnect())}function wT(){return j(mT,this)?Sw(j(mT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function TT(){return k(vT,this,wT).call(this)[0]||null}function ET(){return j(mT,this)?Cw(j(mT,this),{includeContainer:!1,getShadowRoot:!0}):[]}function DT(e,t){it(t,!0);let n=Z(t,`enabled`,3,!1),r=Z(t,`trapFocus`,3,!1),i=Z(t,`loop`,3,!1),a=Z(t,`onCloseAutoFocus`,3,MC),o=Z(t,`onOpenAutoFocus`,3,MC),s=yT.use({enabled:Yb(()=>n()),trap:Yb(()=>r()),loop:i(),onCloseAutoFocus:Yb(()=>a()),onOpenAutoFocus:Yb(()=>o()),ref:t.ref});var c=ua();Ra(I(c),()=>t.focusScope??p,()=>({props:s.props})),H(e,c),at()}var OT,kT=()=>{};(OT=globalThis).bitsTextSelectionLayers??(OT.bitsTextSelectionLayers=new Map);var AT=new WeakMap,jT=new WeakMap,MT=new WeakMap,NT=new WeakMap,PT=new WeakSet,FT=new WeakMap,IT=new WeakMap,LT=new WeakMap,RT=class e{static create(t){return new e(t)}constructor(e){kt(this,PT),x(this,`opts`,void 0),x(this,`domContext`,void 0),O(this,AT,MC),O(this,jT,!1),O(this,MT,kT),O(this,NT,kT),O(this,FT,e=>{j(NT,this).call(this,e)}),O(this,IT,e=>{if(!j(jT,this))return;let t=this.opts.ref.current,n=e.target;!lC(t)||!lC(n)||!UT(this)||!KS(t,n)||(j(MT,this).call(this,e),!e.defaultPrevented&&A(AT,this,VT(t,this.domContext.getDocument().body)))}),O(this,LT,()=>{j(AT,this).call(this),A(AT,this,MC)}),this.opts=e,this.domContext=new ZS(e.ref);let t=MC;CS(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(A(jT,this,e),A(MT,this,n),A(NT,this,r),e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=k(PT,this,zT).call(this)),()=>{A(jT,this,!1),t(),j(LT,this).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}};function zT(){return Ex(Qi(this.domContext.getDocument(),`pointerdown`,j(IT,this)),Qi(this.domContext.getDocument(),`pointerup`,$b(j(LT,this),j(FT,this))))}var BT=e=>e.style.userSelect||e.style.webkitUserSelect;function VT(e,t){let n=BT(t),r=BT(e);return HT(t,`none`),HT(e,`text`),()=>{HT(t,n),HT(e,r)}}function HT(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function UT(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function WT(e,t){it(t,!0);let n=Z(t,`preventOverflowTextSelection`,3,!0),r=Z(t,`onPointerDown`,3,MC),i=Z(t,`onPointerUp`,3,MC);RT.create({id:Yb(()=>t.id),onPointerDown:Yb(()=>r()),onPointerUp:Yb(()=>i()),enabled:Yb(()=>t.enabled&&n()),ref:t.ref});var a=ua();Ra(I(a),()=>t.children??p),H(e,a),at()}var GT;(GT=globalThis).bitsIdCounter??(GT.bitsIdCounter={current:0});function KT(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var qT=new WeakMap,JT=new WeakMap,YT=new WeakMap,XT=new WeakMap,ZT=new WeakSet,QT=class{constructor(e){kt(this,ZT),O(this,qT,void 0),O(this,JT,0),O(this,YT,N()),O(this,XT,void 0),A(qT,this,e)}get(...e){return A(JT,this,j(JT,this)+1),z(j(YT,this))===void 0&&A(XT,this,Br(()=>{P(j(YT,this),j(qT,this).call(this,...e),!0)})),Lr(()=>()=>{k(ZT,this,$T).call(this)}),z(j(YT,this))}};function $T(){A(JT,this,j(JT,this)-1),j(XT,this)&&j(JT,this)<=0&&(j(XT,this).call(this),P(j(YT,this),void 0),A(XT,this,void 0))}var eE=new fS,tE=N(null),nE=null,rE=null,iE=!1,aE=Yb(()=>{for(let e of eE.values())if(e)return!0;return!1}),oE=null,sE=new QT(()=>{function e(){document.body.setAttribute(`style`,z(tE)??``),document.body.style.removeProperty(`--scrollbar-width`),sC&&nE?.(),P(tE,null)}function t(){rE!==null&&(window.clearTimeout(rE),rE=null)}function n(e,n){t(),iE=!0,oE=Date.now();let r=oE,i=()=>{rE=null,oE===r&&(pE(eE)?iE=!1:(iE=!1,n()))},a=e===null?24:e;rE=window.setTimeout(i,a)}function r(){z(tE)===null&&eE.size===0&&!iE&&P(tE,document.body.getAttribute(`style`),!0)}return CS(()=>aE.current,()=>{if(!aE.current)return;r(),iE=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,sC&&(nE=Qi(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),LS(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),FS(()=>()=>{nE?.()}),{get lockMap(){return eE},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),cE=new WeakMap,lE=new WeakMap,uE=new WeakMap,dE=new WeakMap,fE=class{constructor(e,t=()=>null){O(this,cE,KT()),O(this,lE,void 0),O(this,uE,()=>null),O(this,dE,void 0),x(this,`locked`,void 0),A(lE,this,e),A(uE,this,t),A(dE,this,sE.get()),j(dE,this)&&(j(dE,this).cancelPendingCleanup(),j(dE,this).ensureInitialStyleCaptured(),j(dE,this).lockMap.set(j(cE,this),j(lE,this)??!1),this.locked=Yb(()=>j(dE,this).lockMap.get(j(cE,this))??!1,e=>j(dE,this).lockMap.set(j(cE,this),e)),FS(()=>{if(j(dE,this).lockMap.delete(j(cE,this)),pE(j(dE,this).lockMap))return;let e=j(uE,this).call(this);j(dE,this).scheduleCleanupIfNoNewLocks(e,()=>{j(dE,this).resetBodyStyle()})}))}};function pE(e){for(let[t,n]of e)if(n)return!0;return!1}function mE(e,t){it(t,!0);let n=Z(t,`preventScroll`,3,!0),r=Z(t,`restoreScrollDelay`,3,null);n()&&new fE(n(),()=>r()),at()}function hE(e,t){it(t,!0),LC({defaultPortalTo:Yb(()=>t.defaultPortalTo),defaultLocale:Yb(()=>t.defaultLocale)});var n=ua();Ra(I(n),()=>t.children??p),H(e,n),at()}var gE=[`top`,`right`,`bottom`,`left`],_E=Math.min,vE=Math.max,yE=Math.round,bE=Math.floor,xE=e=>({x:e,y:e}),SE={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function CE(e,t,n){return vE(e,_E(t,n))}function wE(e,t){return typeof e==`function`?e(t):e}function TE(e){return e.split(`-`)[0]}function EE(e){return e.split(`-`)[1]}function DE(e){return e===`x`?`y`:`x`}function OE(e){return e===`y`?`height`:`width`}function kE(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function AE(e){return DE(kE(e))}function jE(e,t,n){n===void 0&&(n=!1);let r=EE(e),i=AE(e),a=OE(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=BE(o)),[o,BE(o)]}function ME(e){let t=BE(e);return[NE(e),t,NE(t)]}function NE(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var PE=[`left`,`right`],FE=[`right`,`left`],IE=[`top`,`bottom`],LE=[`bottom`,`top`];function RE(e,t,n){switch(e){case`top`:case`bottom`:return n?t?FE:PE:t?PE:FE;case`left`:case`right`:return t?IE:LE;default:return[]}}function zE(e,t,n,r){let i=EE(e),a=RE(TE(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(NE)))),a}function BE(e){let t=TE(e);return SE[t]+e.slice(t.length)}function VE(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function HE(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:VE(e)}function UE(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function WE(e,t,n){let{reference:r,floating:i}=e,a=kE(t),o=AE(t),s=OE(o),c=TE(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=EE(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function GE(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=wE(t,e),p=HE(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=UE(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=UE(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var KE=50,qE=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:GE},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=WE(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<KE&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=WE(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},JE=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=wE(e,t)||{};if(l==null)return{};let d=HE(u),f={x:n,y:r},p=AE(i),m=OE(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=_E(d[_],T),te=_E(d[v],T),ne=C-h[m]-te,re=C/2-h[m]/2+w,ie=CE(ee,re,ne),ae=!c.arrow&&EE(i)!=null&&re!==ie&&a.reference[m]/2-(re<ee?ee:te)-h[m]/2<0,oe=ae?re<ee?re-ee:re-ne:0;return{[p]:f[p]+oe,data:{[p]:ie,centerOffset:re-ie-oe,...ae&&{alignmentOffset:oe}},reset:ae}}}),YE=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=wE(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=TE(r),_=kE(o),v=TE(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[BE(o)]:ME(o)),x=p!==`none`;!d&&x&&b.push(...zE(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=jE(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===kE(t)||T.every(e=>kE(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=kE(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function XE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZE(e){return gE.some(t=>e[t]>=0)}var QE=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=wE(e,t);switch(i){case`referenceHidden`:{let e=XE(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ZE(e)}}}case`escaped`:{let e=XE(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ZE(e)}}}default:return{}}}}},$E=new Set([`left`,`top`]);async function eD(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=TE(n),s=EE(n),c=kE(n)===`y`,l=$E.has(o)?-1:1,u=a&&c?-1:1,d=wE(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var tD=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await eD(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},nD=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=wE(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=kE(i),p=DE(f),m=u[p],h=u[f],g=(e,t)=>CE(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},rD=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=wE(e,t),u={x:n,y:r},d=kE(i),f=DE(d),p=u[f],m=u[d],h=wE(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=$E.has(TE(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},iD=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=wE(e,t),c=await i.detectOverflow(t,s),l=TE(n),u=EE(n),d=kE(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=_E(p-c[m],g),y=_E(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*vE(c.left,c.right):S=p-2*vE(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function aD(){return typeof window<`u`}function oD(e){return lD(e)?(e.nodeName||``).toLowerCase():`#document`}function sD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cD(e){return((lD(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function lD(e){return aD()?e instanceof Node||e instanceof sD(e).Node:!1}function uD(e){return aD()?e instanceof Element||e instanceof sD(e).Element:!1}function dD(e){return aD()?e instanceof HTMLElement||e instanceof sD(e).HTMLElement:!1}function fD(e){return!aD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof sD(e).ShadowRoot}function pD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=wD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function mD(e){return/^(table|td|th)$/.test(oD(e))}function hD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var gD=/transform|translate|scale|rotate|perspective|filter/,_D=/paint|layout|strict|content/,vD=e=>!!e&&e!==`none`,yD;function bD(e){let t=uD(e)?wD(e):e;return vD(t.transform)||vD(t.translate)||vD(t.scale)||vD(t.rotate)||vD(t.perspective)||!SD()&&(vD(t.backdropFilter)||vD(t.filter))||gD.test(t.willChange||``)||_D.test(t.contain||``)}function xD(e){let t=ED(e);for(;dD(t)&&!CD(t);){if(bD(t))return t;if(hD(t))return null;t=ED(t)}return null}function SD(){return yD??(yD=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),yD}function CD(e){return/^(html|body|#document)$/.test(oD(e))}function wD(e){return sD(e).getComputedStyle(e)}function TD(e){return uD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ED(e){if(oD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||fD(e)&&e.host||cD(e);return fD(t)?t.host:t}function DD(e){let t=ED(e);return CD(t)?(e.ownerDocument||e).body:dD(t)&&pD(t)?t:DD(t)}function OD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=DD(e),i=r===e.ownerDocument?.body,a=sD(r);if(i){let e=kD(a);return t.concat(a,a.visualViewport||[],pD(r)?r:[],e&&n?OD(e):[])}return t.concat(r,OD(r,[],n))}function kD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AD(e){let t=wD(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=dD(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=yE(n)!==a||yE(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function jD(e){return uD(e)?e:e.contextElement}function MD(e){let t=jD(e);if(!dD(t))return xE(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=AD(t),o=(a?yE(n.width):n.width)/r,s=(a?yE(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ND=xE(0);function PD(e){let t=sD(e);return!SD()||!t.visualViewport?ND:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===sD(e)}function ID(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=jD(e),o=xE(1);t&&(r?uD(r)&&(o=MD(r)):o=MD(e));let s=FD(a,n,r)?PD(a):xE(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=sD(a),t=uD(r)?sD(r):r,n=e,i=kD(n);for(;i&&t!==n;){let e=MD(i),t=i.getBoundingClientRect(),r=wD(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=sD(i),i=kD(n)}}return UE({width:u,height:d,x:c,y:l})}function LD(e,t){let n=TD(e).scrollLeft;return t?t.left+n:ID(cD(e)).left+n}function RD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-LD(e,n),y:n.top+t.scrollTop}}function zD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=cD(r),s=t?hD(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=xE(1),u=xE(0),d=dD(r);if((d||!a)&&((oD(r)!==`body`||pD(o))&&(c=TD(r)),d)){let e=ID(r);l=MD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?RD(o,c):xE(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function BD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function VD(e){let t=TD(e),n=e.ownerDocument.body,r=vE(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=vE(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+LD(e),o=-t.scrollTop;return wD(n).direction===`rtl`&&(a+=vE(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var HD=25;function UD(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=sD(e),a=cD(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!SD()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(LD(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=HD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function WD(e,t){let n=ID(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=MD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function GD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=UD(e,n,t);else if(t===`document`)r=VD(cD(e));else if(uD(t))r=WD(t,n);else{let n=PD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return UE(r)}function KD(e,t){let n=t.get(e);if(n)return n;let r=OD(e,[],!1).filter(e=>uD(e)&&oD(e)!==`body`),i=null,a=wD(e).position===`fixed`,o=a?ED(e):e;for(;uD(o)&&!CD(o);){let e=wD(o),t=bD(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ED(o)}return t.set(e,r),r}function qD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?hD(t)?[]:KD(t,this._c):[].concat(n),r],o=GD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=GD(t,a[e],i);s=vE(n.top,s),c=_E(n.right,c),l=_E(n.bottom,l),u=vE(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function JD(e){let{width:t,height:n}=AD(e);return{width:t,height:n}}function YD(e,t,n){let r=dD(t),i=cD(t),a=n===`fixed`,o=ID(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=xE(0);if((r||!a)&&((oD(t)!==`body`||pD(i))&&(s=TD(t)),r)){let e=ID(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=LD(i));let l=i&&!r&&!a?RD(i,s):xE(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function XD(e){return wD(e).position===`static`}function ZD(e,t){if(!dD(e)||wD(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return cD(e)===n&&(n=n.ownerDocument.body),n}function QD(e,t){let n=sD(e);if(hD(e))return n;if(!dD(e)){let t=ED(e);for(;t&&!CD(t);){if(uD(t)&&!XD(t))return t;t=ED(t)}return n}let r=ZD(e,t);for(;r&&mD(r)&&XD(r);)r=ZD(r,t);return r&&CD(r)&&XD(r)&&!bD(r)?n:r||xD(e)||n}var $D=async function(e){let t=this.getOffsetParent||QD,n=this.getDimensions,r=await n(e.floating);return{reference:YD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eO(e){return wD(e).direction===`rtl`}var tO={convertOffsetParentRelativeRectToViewportRelativeRect:zD,getDocumentElement:cD,getClippingRect:qD,getOffsetParent:QD,getElementRects:$D,getClientRects:BD,getDimensions:JD,getScale:MD,isElement:uD,isRTL:eO};function nO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rO(e,t,n){let r=null,i,a=cD(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=bE(d),h=bE(a.clientWidth-(u+f)),g=bE(a.clientHeight-(d+p)),_=bE(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:vE(0,_E(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!nO(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=sD(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function iO(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=jD(e),u=i||a?[...l?OD(l):[],...t?OD(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?rO(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ID(e):null;c&&g();function g(){let t=ID(e);h&&!nO(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var aO=tD,oO=nD,sO=YE,cO=iD,lO=QE,uO=JE,dO=rD,fO=(e,t,n)=>{let r=new Map,i=n??{},a={...tO,...i.platform,_c:r};return qE(e,t,{...i,platform:a})};function pO(e){return typeof e==`function`?e():e}function mO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hO(e,t){let n=mO(e);return Math.round(t*n)/n}function gO(e){return{[`--bits-${e}-content-transform-origin`]:`var(--bits-floating-transform-origin)`,[`--bits-${e}-content-available-width`]:`var(--bits-floating-available-width)`,[`--bits-${e}-content-available-height`]:`var(--bits-floating-available-height)`,[`--bits-${e}-anchor-width`]:`var(--bits-floating-anchor-width)`,[`--bits-${e}-anchor-height`]:`var(--bits-floating-anchor-height)`}}function _O(e){let t=e.whileElementsMounted,n=M(()=>pO(e.open)??!0),r=M(()=>pO(e.middleware)),i=M(()=>pO(e.transform)??!0),a=M(()=>pO(e.placement)??`bottom`),o=M(()=>pO(e.strategy)??`absolute`),s=M(()=>pO(e.sideOffset)??0),c=M(()=>pO(e.alignOffset)??0),l=e.reference,u=N(0),d=N(0),f=Qb(null),p=N(_r(z(o))),m=N(_r(z(a))),h=N(_r({})),g=N(!1),_=!1,v=0,y=M(()=>{let e=f.current?hO(f.current,z(u)):z(u),t=f.current?hO(f.current,z(d)):z(d);return z(i)?{position:z(p),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...f.current&&mO(f.current)>=1.5&&{willChange:`transform`}}:{position:z(p),left:`${e}px`,top:`${t}px`}}),b;function x(){if(l.current===null||f.current===null)return;let e=l.current,t=f.current,i=++v;fO(e,t,{middleware:z(r),placement:z(a),strategy:z(o)}).then(r=>{if(i===v&&l.current===e&&f.current===t){if(vO(e)){P(h,{...z(h),hide:{...z(h).hide,referenceHidden:!0}},!0);return}if(!z(n)&&z(u)!==0&&z(d)!==0){let e=Math.max(Math.abs(z(s)),Math.abs(z(c)),15);if(r.x<=e&&r.y<=e)return}P(u,r.x,!0),P(d,r.y,!0),P(p,r.strategy,!0),P(m,r.placement,!0),P(h,r.middlewareData,!0),P(g,!0)}})}function S(){typeof b==`function`&&(b(),b=void 0),v++}function C(){if(S(),t===void 0){x();return}z(n)&&l.current!==null&&f.current!==null&&(b=t(l.current,f.current,x))}function w(){!z(n)&&f.current===null&&P(g,!1)}function T(){return[z(r),z(a),z(o),z(s),z(c),z(n)]}return Lr(()=>{t===void 0&&z(n)&&x()}),Lr(C),Lr(()=>{if(t!==void 0){if(T(),!z(n)){_=!1;return}if(!z(g)){_=!1;return}if(!_){_=!0;return}x()}}),Lr(w),Lr(()=>S),{floating:f,reference:l,get strategy(){return z(p)},get placement(){return z(m)},get middlewareData(){return z(h)},get isPositioned(){return z(g)},get floatingStyles(){return z(y)},get update(){return x}}}function vO(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var yO={top:`bottom`,right:`left`,bottom:`top`,left:`right`},bO=new bS(`Floating.Root`),xO=new bS(`Floating.Content`),SO=new bS(`Floating.Root`),CO=class e{static create(t=!1){return t?SO.set(new e):bO.set(new e)}constructor(){x(this,`anchorNode`,Qb(null)),x(this,`customAnchorNode`,Qb(null)),x(this,`triggerNode`,Qb(null)),Lr(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current==`string`?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}},wO=new WeakMap,TO=new WeakMap,EO=new WeakMap,DO=new WeakMap,OO=new WeakMap,kO=new WeakMap,AO=new WeakMap,jO=new WeakMap,MO=new WeakMap,NO=new WeakMap,PO=new WeakMap,FO=new WeakMap,IO=new WeakMap,LO=new WeakMap,RO=new WeakMap,zO=new WeakMap,BO=new WeakMap,VO=new WeakMap,HO=new WeakMap,UO=new WeakMap,WO=new WeakMap,GO=new WeakMap,KO=new WeakMap,qO=new WeakMap,JO=class e{static create(t,n=!1){return n?xO.set(new e(t,SO.get())):xO.set(new e(t,bO.get()))}get hasExplicitBoundaries(){return z(j(jO,this))}set hasExplicitBoundaries(e){P(j(jO,this),e)}get detectOverflowOptions(){return z(j(MO,this))}set detectOverflowOptions(e){P(j(MO,this),e)}get middleware(){return z(j(LO,this))}set middleware(e){P(j(LO,this),e)}get placedSide(){return z(j(RO,this))}set placedSide(e){P(j(RO,this),e)}get placedAlign(){return z(j(zO,this))}set placedAlign(e){P(j(zO,this),e)}get arrowX(){return z(j(BO,this))}set arrowX(e){P(j(BO,this),e)}get arrowY(){return z(j(VO,this))}set arrowY(e){P(j(VO,this),e)}get cannotCenterArrow(){return z(j(HO,this))}set cannotCenterArrow(e){P(j(HO,this),e)}get contentZIndex(){return z(j(UO,this))}set contentZIndex(e){P(j(UO,this),e,!0)}get arrowBaseSide(){return z(j(WO,this))}set arrowBaseSide(e){P(j(WO,this),e)}get wrapperProps(){return z(j(GO,this))}set wrapperProps(e){P(j(GO,this),e)}get props(){return z(j(KO,this))}set props(e){P(j(KO,this),e)}get arrowStyle(){return z(j(qO,this))}set arrowStyle(e){P(j(qO,this),e)}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`contentRef`,Qb(null)),x(this,`wrapperRef`,Qb(null)),x(this,`arrowRef`,Qb(null)),x(this,`contentAttachment`,QS(this.contentRef)),x(this,`wrapperAttachment`,QS(this.wrapperRef)),x(this,`arrowAttachment`,QS(this.arrowRef)),x(this,`arrowId`,Qb(KT())),O(this,wO,M(()=>{if(typeof this.opts.style==`string`)return Tx(this.opts.style);if(!this.opts.style)return{}})),O(this,TO,void 0),O(this,EO,new PS(()=>this.arrowRef.current??void 0)),O(this,DO,M(()=>j(EO,this)?.width??0)),O(this,OO,M(()=>j(EO,this)?.height??0)),O(this,kO,M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`))),O(this,AO,M(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current])),O(this,jO,M(()=>z(j(AO,this)).length>0)),O(this,MO,M(()=>({padding:this.opts.collisionPadding.current,boundary:z(j(AO,this)).filter(pC),altBoundary:this.hasExplicitBoundaries}))),O(this,NO,N(void 0)),O(this,PO,N(void 0)),O(this,FO,N(void 0)),O(this,IO,N(void 0)),O(this,LO,M(()=>[aO({mainAxis:this.opts.sideOffset.current+z(j(OO,this)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&oO({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?dO():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&sO({...this.detectOverflowOptions}),cO({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(j(NO,this),t,!0),P(j(PO,this),n,!0),P(j(FO,this),r,!0),P(j(IO,this),i,!0)}}),this.arrowRef.current&&uO({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),XO({arrowWidth:z(j(DO,this)),arrowHeight:z(j(OO,this))}),this.opts.hideWhenDetached.current&&lO({strategy:`referenceHidden`,...this.detectOverflowOptions})].filter(Boolean))),x(this,`floating`,void 0),O(this,RO,M(()=>QO(this.floating.placement))),O(this,zO,M(()=>$O(this.floating.placement))),O(this,BO,M(()=>this.floating.middlewareData.arrow?.x??0)),O(this,VO,M(()=>this.floating.middlewareData.arrow?.y??0)),O(this,HO,M(()=>this.floating.middlewareData.arrow?.centerOffset!==0)),O(this,UO,N()),O(this,WO,M(()=>yO[this.placedSide])),O(this,GO,M(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":``,style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${z(j(NO,this))}px`,"--bits-floating-available-height":`${z(j(PO,this))}px`,"--bits-floating-anchor-width":`${z(j(FO,this))}px`,"--bits-floating-anchor-height":`${z(j(IO,this))}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:`hidden`,"pointer-events":`none`},...z(j(wO,this))},dir:this.opts.dir.current,...this.wrapperAttachment}))),O(this,KO,M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Ax({...z(j(wO,this))}),...this.contentAttachment}))),O(this,qO,M(()=>({position:`absolute`,left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[this.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[this.placedSide],visibility:this.cannotCenterArrow?`hidden`:void 0}))),this.opts=e,this.root=t,A(TO,this,e.updatePositionStrategy),e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),CS(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=_O({strategy:()=>this.opts.strategy.current,placement:()=>z(j(kO,this)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>iO(...e,{animationFrame:j(TO,this)?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),Lr(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),CS(()=>this.contentRef.current,e=>{if(!e||!this.opts.enabled.current)return;let t=JS(e),n=t.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let n=t.getComputedStyle(e).zIndex;n!==this.contentZIndex&&(this.contentZIndex=n)});return()=>{t.cancelAnimationFrame(n)}}),Lr(()=>{this.floating.floating.current=this.wrapperRef.current})}},YO=class e{static create(t,n=!1){return n?new e(t,SO.get()):new e(t,bO.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?Zb(e.virtualEl.current):e.ref}};function XO(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ZO(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function ZO(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function QO(e){return ZO(e)[0]}function $O(e){return ZO(e)[1]}function ek(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);CO.create(n());var r=ua();Ra(I(r),()=>t.children??p),H(e,r),at()}function tk(e,t){it(t,!0);let n=Z(t,`tooltip`,3,!1);YO.create({id:Yb(()=>t.id),virtualEl:Yb(()=>t.virtualEl),ref:t.ref},n());var r=ua();Ra(I(r),()=>t.children??p),H(e,r),at()}function nk(e,t){it(t,!0);let n=Z(t,`side`,3,`bottom`),r=Z(t,`sideOffset`,3,0),i=Z(t,`align`,3,`center`),a=Z(t,`alignOffset`,3,0),o=Z(t,`arrowPadding`,3,0),s=Z(t,`avoidCollisions`,3,!0),c=Z(t,`collisionBoundary`,19,()=>[]),l=Z(t,`collisionPadding`,3,0),u=Z(t,`hideWhenDetached`,3,!1),d=Z(t,`onPlaced`,3,()=>{}),f=Z(t,`sticky`,3,`partial`),m=Z(t,`updatePositionStrategy`,3,`optimized`),h=Z(t,`strategy`,3,`fixed`),g=Z(t,`dir`,3,`ltr`),_=Z(t,`style`,19,()=>({})),v=Z(t,`wrapperId`,19,KT),y=Z(t,`customAnchor`,3,null),b=Z(t,`tooltip`,3,!1),x=JO.create({side:Yb(()=>n()),sideOffset:Yb(()=>r()),align:Yb(()=>i()),alignOffset:Yb(()=>a()),id:Yb(()=>t.id),arrowPadding:Yb(()=>o()),avoidCollisions:Yb(()=>s()),collisionBoundary:Yb(()=>c()),collisionPadding:Yb(()=>l()),hideWhenDetached:Yb(()=>u()),onPlaced:Yb(()=>d()),sticky:Yb(()=>f()),updatePositionStrategy:Yb(()=>m()),strategy:Yb(()=>h()),dir:Yb(()=>g()),style:Yb(()=>_()),enabled:Yb(()=>t.enabled),wrapperId:Yb(()=>v()),customAnchor:Yb(()=>y())},b()),S=M(()=>Nx(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=ua();Ra(I(C),()=>t.content??p,()=>({props:x.props,wrapperProps:z(S)})),H(e,C),at()}function rk(e,t){it(t,!0),Go(()=>{t.onPlaced?.()});var n=ua();Ra(I(n),()=>t.content??p,()=>({props:{},wrapperProps:{}})),H(e,n),at()}var ik=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function ak(e,t){let n=Z(t,`isStatic`,3,!1),r=Y(t,ik);var i=ua(),a=I(i),o=e=>{rk(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{nk(e,X({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};W(a,e=>{n()?e(o):e(s,-1)}),H(e,i)}var ok=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled.ref.tooltip.contentPointerEvents`.split(`.`)),sk=V(`<!> <!>`,1);function ck(e,t){it(t,!0);let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Z(t,`tooltip`,3,!1),c=Z(t,`contentPointerEvents`,3,`auto`),l=Y(t,ok),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(z(u)?`fixed`:`absolute`));ak(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return z(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=sk(),f=I(d),m=e=>{mE(e,{get preventScroll(){return z(u)}})},h=e=>{mE(e,{get preventScroll(){return z(u)}})};W(f,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),DT(L(f,2),{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(e,r)=>{let a=()=>(r?.()).props;cT(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{nT(e,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{let r=()=>(n?.()).props;WT(e,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,n)=>{var i=ua(),u=I(i);{let e=M(()=>({props:Nx(l,o(),r(),a(),{style:{pointerEvents:c()}}),wrapperProps:s()}));Ra(u,()=>t.popper??p,()=>z(e))}H(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),H(e,d)},$$slots:{content:!0}}),at()}var lk=new Set(`$$slots.$$events.$$legacy.popper.open.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.ref.shouldRender`.split(`.`));function uk(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,lk);var c=ua(),l=I(c),u=e=>{ck(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>s))};W(l,e=>{t.shouldRender&&e(u)}),H(e,c)}var dk=new Set(`$$slots.$$events.$$legacy.popper.onEscapeKeydown.escapeKeydownBehavior.preventOverflowTextSelection.id.onPointerDown.onPointerUp.side.sideOffset.align.alignOffset.arrowPadding.avoidCollisions.collisionBoundary.collisionPadding.sticky.hideWhenDetached.updatePositionStrategy.strategy.dir.preventScroll.wrapperId.style.onPlaced.onInteractOutside.onCloseAutoFocus.onOpenAutoFocus.onFocusOutside.interactOutsideBehavior.loop.trapFocus.isValidEvent.customAnchor.isStatic.enabled`.split(`.`));function fk(e,t){let n=Z(t,`interactOutsideBehavior`,3,`close`),r=Z(t,`trapFocus`,3,!0),i=Z(t,`isValidEvent`,3,()=>!1),a=Z(t,`customAnchor`,3,null),o=Z(t,`isStatic`,3,!1),s=Y(t,dk);ck(e,X({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>s,{forceMount:!0}))}function pk(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]??[0,0],[c,l]=t[o]??[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function mk(e,t){return e[0]>=t.left&&e[0]<=t.right&&e[1]>=t.top&&e[1]<=t.bottom}function hk(e,t){let n=e.left+e.width/2,r=e.top+e.height/2,i=t.left+t.width/2,a=t.top+t.height/2,o=i-n,s=a-r;return Math.abs(o)>Math.abs(s)?o>0?`right`:`left`:s>0?`bottom`:`top`}var gk=new WeakMap,_k=new WeakMap,vk=new WeakMap,yk=new WeakMap,bk=new WeakMap,xk=new WeakMap,Sk=new WeakMap,Ck=new WeakMap,wk=new WeakMap,Tk=new WeakSet,Ek=class{constructor(e){kt(this,Tk),O(this,gk,void 0),O(this,_k,void 0),O(this,vk,void 0),O(this,yk,null),O(this,bk,null),O(this,xk,[]),O(this,Sk,null),O(this,Ck,null),O(this,wk,null),A(gk,this,e),A(_k,this,e.buffer??1);let t=e.transitIntentTimeout;A(vk,this,typeof t==`number`&&t>0?t:null),CS([e.triggerNode,e.contentNode,e.enabled],([e,t,n])=>{if(!e||!t||!n){A(Sk,this,null),k(Tk,this,Mk).call(this);return}return j(Sk,this)&&j(Sk,this)!==e&&k(Tk,this,Mk).call(this),A(Sk,this,e),[Qi(qS(e),`pointermove`,n=>{k(Tk,this,jk).call(this,[n.clientX,n.clientY],e,t)}),Qi(e,`pointerleave`,e=>{let n=e.relatedTarget;if(uC(n)&&t.contains(n))return;let r=j(gk,this).ignoredTargets?.()??[];uC(n)&&r.some(e=>e===n||e.contains(n))||(A(xk,this,uC(n)&&r.length>0?r.filter(e=>n.contains(e)):[]),A(yk,this,[e.clientX,e.clientY]),A(bk,this,`content`),k(Tk,this,Ok).call(this))}),Qi(e,`pointerenter`,()=>{k(Tk,this,Mk).call(this)}),Qi(t,`pointerenter`,()=>{k(Tk,this,Mk).call(this)}),Qi(t,`pointerleave`,t=>{let n=t.relatedTarget;uC(n)&&e.contains(n)||(A(yk,this,[t.clientX,t.clientY]),A(bk,this,`trigger`),k(Tk,this,Ok).call(this))})].reduce((e,t)=>()=>{e(),t()},()=>{})})}};function Dk(){j(Ck,this)!==null&&(cancelAnimationFrame(j(Ck,this)),A(Ck,this,null))}function Ok(){k(Tk,this,Dk).call(this),A(Ck,this,requestAnimationFrame(()=>{A(Ck,this,null),!(!j(yk,this)||!j(bk,this))&&(k(Tk,this,Mk).call(this),j(gk,this).onPointerExit())}))}function kk(){j(wk,this)!==null&&(clearTimeout(j(wk,this)),A(wk,this,null))}function Ak(){j(vk,this)!==null&&(k(Tk,this,kk).call(this),A(wk,this,window.setTimeout(()=>{A(wk,this,null),!(!j(yk,this)||!j(bk,this))&&(k(Tk,this,Mk).call(this),j(gk,this).onPointerExit())},j(vk,this))))}function jk(e,t,n){if(!j(yk,this)||!j(bk,this))return;k(Tk,this,Dk).call(this),k(Tk,this,Ak).call(this);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();if(j(bk,this)===`content`&&mk(e,i)){k(Tk,this,Mk).call(this);return}if(j(bk,this)===`trigger`&&mk(e,r)){k(Tk,this,Mk).call(this);return}if(j(bk,this)===`content`&&j(xk,this).length>0)for(let t of j(xk,this)){let n=t.getBoundingClientRect();if(mk(e,n))return;let i=hk(r,n),a=k(Tk,this,Nk).call(this,r,n,i);if(a&&pk(e,a))return}let a=hk(r,i),o=k(Tk,this,Nk).call(this,r,i,a);if(o&&pk(e,o))return;let s=j(bk,this)===`content`?i:r;pk(e,k(Tk,this,Pk).call(this,j(yk,this),s,a,j(bk,this)))||(k(Tk,this,Mk).call(this),j(gk,this).onPointerExit())}function Mk(){A(yk,this,null),A(bk,this,null),A(xk,this,[]),k(Tk,this,Dk).call(this),k(Tk,this,kk).call(this)}function Nk(e,t,n){let r=j(_k,this);switch(n){case`top`:return[[Math.min(e.left,t.left)-r,e.top],[Math.min(e.left,t.left)-r,t.bottom],[Math.max(e.right,t.right)+r,t.bottom],[Math.max(e.right,t.right)+r,e.top]];case`bottom`:return[[Math.min(e.left,t.left)-r,e.bottom],[Math.min(e.left,t.left)-r,t.top],[Math.max(e.right,t.right)+r,t.top],[Math.max(e.right,t.right)+r,e.bottom]];case`left`:return[[e.left,Math.min(e.top,t.top)-r],[t.right,Math.min(e.top,t.top)-r],[t.right,Math.max(e.bottom,t.bottom)+r],[e.left,Math.max(e.bottom,t.bottom)+r]];case`right`:return[[e.right,Math.min(e.top,t.top)-r],[t.left,Math.min(e.top,t.top)-r],[t.left,Math.max(e.bottom,t.bottom)+r],[e.right,Math.max(e.bottom,t.bottom)+r]]}}function Pk(e,t,n,r){let i=j(_k,this)*4,[a,o]=e;switch(r===`trigger`?k(Tk,this,Fk).call(this,n):n){case`top`:return[[a-i,o+i],[a+i,o+i],[t.right+i,t.bottom],[t.right+i,t.top],[t.left-i,t.top],[t.left-i,t.bottom]];case`bottom`:return[[a-i,o-i],[a+i,o-i],[t.right+i,t.top],[t.right+i,t.bottom],[t.left-i,t.bottom],[t.left-i,t.top]];case`left`:return[[a+i,o-i],[a+i,o+i],[t.right,t.bottom+i],[t.left,t.bottom+i],[t.left,t.top-i],[t.right,t.top-i]];case`right`:return[[a-i,o-i],[a-i,o+i],[t.left,t.bottom+i],[t.right,t.bottom+i],[t.right,t.top-i],[t.left,t.top-i]]}}function Fk(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}var Ik=aC({component:`popover`,parts:[`root`,`trigger`,`content`,`close`,`overlay`]}),Lk=new bS(`Popover.Root`),Rk=new WeakMap,zk=new WeakMap,Bk=new WeakMap,Vk=new WeakMap,Hk=new WeakMap,Uk=new WeakMap,Wk=new WeakMap,Gk=new WeakMap,Kk=new WeakMap,qk=new WeakSet,Jk=class e{static create(t){return Lk.set(new e(t))}get contentNode(){return z(j(Rk,this))}set contentNode(e){P(j(Rk,this),e,!0)}get triggerNode(){return z(j(zk,this))}set triggerNode(e){P(j(zk,this),e,!0)}get overlayNode(){return z(j(Bk,this))}set overlayNode(e){P(j(Bk,this),e,!0)}get openedViaHover(){return z(j(Vk,this))}set openedViaHover(e){P(j(Vk,this),e,!0)}get hasInteractedWithContent(){return z(j(Hk,this))}set hasInteractedWithContent(e){P(j(Hk,this),e,!0)}get hoverCooldown(){return z(j(Uk,this))}set hoverCooldown(e){P(j(Uk,this),e,!0)}get closeDelay(){return z(j(Wk,this))}set closeDelay(e){P(j(Wk,this),e,!0)}constructor(e){kt(this,qk),x(this,`opts`,void 0),O(this,Rk,N(null)),x(this,`contentPresence`,void 0),O(this,zk,N(null)),O(this,Bk,N(null)),x(this,`overlayPresence`,void 0),O(this,Vk,N(!1)),O(this,Hk,N(!1)),O(this,Uk,N(!1)),O(this,Wk,N(0)),O(this,Gk,null),O(this,Kk,null),this.opts=e,this.contentPresence=new AC({ref:Yb(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new AC({ref:Yb(()=>this.overlayNode),open:this.opts.open}),CS(()=>this.opts.open.current,e=>{e||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,k(qk,this,Yk).call(this))})}setDomContext(e){A(Kk,this,e)}toggleOpen(){k(qk,this,Yk).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){k(qk,this,Yk).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){k(qk,this,Yk).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(k(qk,this,Yk).call(this),this.closeDelay<=0?this.opts.open.current=!1:j(Kk,this)&&A(Gk,this,j(Kk,this).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),A(Gk,this,null)},this.closeDelay))))}cancelDelayedClose(){k(qk,this,Yk).call(this)}markInteraction(){this.hasInteractedWithContent=!0,k(qk,this,Yk).call(this)}};function Yk(){j(Gk,this)!==null&&j(Kk,this)&&(j(Kk,this).clearTimeout(j(Gk,this)),A(Gk,this,null))}var Xk=new WeakMap,Zk=new WeakMap,Qk=new WeakMap,$k=new WeakSet,eA=new WeakMap,tA=class e{static create(t){return new e(t,Lk.get())}constructor(e,t){kt(this,$k),x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`domContext`,void 0),O(this,Xk,null),O(this,Zk,null),O(this,Qk,N(!1)),O(this,eA,M(()=>({id:this.opts.id.current,"aria-haspopup":`dialog`,"aria-expanded":$S(this.root.opts.open.current),"data-state":eC(this.root.opts.open.current),"aria-controls":k($k,this,aA).call(this),[Ik.trigger]:``,disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),this.opts=e,this.root=t,this.attachment=QS(this.opts.ref,e=>this.root.triggerNode=e),this.domContext=new ZS(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),CS(()=>this.opts.closeDelay.current,e=>{this.root.closeDelay=e})}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||fC(e)||(P(j(Qk,this),!0),k($k,this,rA).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;let t=this.opts.openDelay.current;t<=0?this.root.handleHoverOpen():A(Xk,this,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),A(Xk,this,null)},t))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(fC(e)||(P(j(Qk,this),!1),k($k,this,nA).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(k($k,this,iA).call(this),z(j(Qk,this))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}z(j(Qk,this))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),k($k,this,iA).call(this),this.root.toggleOpen())}get props(){return z(j(eA,this))}set props(e){P(j(eA,this),e)}};function nA(){j(Xk,this)!==null&&(this.domContext.clearTimeout(j(Xk,this)),A(Xk,this,null))}function rA(){j(Zk,this)!==null&&(this.domContext.clearTimeout(j(Zk,this)),A(Zk,this,null))}function iA(){k($k,this,nA).call(this),k($k,this,rA).call(this)}function aA(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}var oA=new WeakMap,sA=new WeakMap,cA=class e{static create(t){return new e(t,Lk.get())}constructor(e,t){x(this,`opts`,void 0),x(this,`root`,void 0),x(this,`attachment`,void 0),x(this,`onInteractOutside`,e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!uC(e.target))return;let t=e.target.closest(Ik.selector(`trigger`));if(!(t&&t===this.root.triggerNode)){if(this.opts.customAnchor.current){if(uC(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current==`string`){let t=document.querySelector(this.opts.customAnchor.current);if(t&&t.contains(e.target))return}}this.root.handleClose()}}),x(this,`onEscapeKeydown`,e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()}),O(this,oA,M(()=>({open:this.root.opts.open.current}))),O(this,sA,M(()=>({id:this.opts.id.current,tabindex:-1,"data-state":eC(this.root.opts.open.current),...tC(this.root.contentPresence.transitionStatus),[Ik.content]:``,style:{pointerEvents:`auto`,contain:`layout style`},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}))),x(this,`popperProps`,{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}),this.opts=e,this.root=t,this.attachment=QS(this.opts.ref,e=>this.root.contentNode=e),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new Ek({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}onpointerdown(e){this.root.markInteraction()}onfocusin(e){let t=e.target;uC(t)&&ww(t)&&this.root.markInteraction()}onpointerenter(e){fC(e)||this.root.cancelDelayedClose()}onpointerleave(e){fC(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return z(j(oA,this))}set snippetProps(e){P(j(oA,this),e)}get props(){return z(j(sA,this))}set props(e){P(j(sA,this),e)}},lA=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`forceMount`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`customAnchor`,`style`]),uA=V(`<div><div><!></div></div>`);function dA(e,t){let n=da();it(t,!0);let r=Z(t,`ref`,15,null),i=Z(t,`id`,19,()=>NC(n)),a=Z(t,`forceMount`,3,!1),o=Z(t,`onOpenAutoFocus`,3,MC),s=Z(t,`onCloseAutoFocus`,3,MC),c=Z(t,`onEscapeKeydown`,3,MC),l=Z(t,`onInteractOutside`,3,MC),u=Z(t,`trapFocus`,3,!0),d=Z(t,`preventScroll`,3,!1),f=Z(t,`customAnchor`,3,null),m=Y(t,lA),h=cA.create({id:Yb(()=>i()),ref:Yb(()=>r(),e=>r(e)),onInteractOutside:Yb(()=>l()),onEscapeKeydown:Yb(()=>c()),customAnchor:Yb(()=>f())}),g=M(()=>Nx(m,h.props)),_=M(()=>u()&&h.shouldTrapFocus);function v(e){h.shouldTrapFocus||e.preventDefault(),o()(e)}var y=ua(),b=I(y),x=e=>{fk(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!0,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Nx(r(),{style:gO(`popover`)},{style:t.style}));var o=ua(),s=I(o),c=e=>{var n=ua(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));Ra(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=uA();Do(n,()=>({...i()}));var r=F(n);Do(r,()=>({...z(a)})),Ra(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))},S=e=>{uk(e,X(()=>z(g),()=>h.popperProps,{get ref(){return h.opts.ref},get open(){return h.root.opts.open.current},get id(){return i()},get trapFocus(){return z(_)},get preventScroll(){return d()},loop:!0,forceMount:!1,get customAnchor(){return f()},onOpenAutoFocus:v,get onCloseAutoFocus(){return s()},get shouldRender(){return h.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>Nx(r(),{style:gO(`popover`)},{style:t.style}));var o=ua(),s=I(o),c=e=>{var n=ua(),r=I(n);{let e=M(()=>({props:z(a),wrapperProps:i(),...h.snippetProps}));Ra(r,()=>t.child,()=>z(e))}H(e,n)},l=e=>{var n=uA();Do(n,()=>({...i()}));var r=F(n);Do(r,()=>({...z(a)})),Ra(F(r),()=>t.children??p),D(r),D(n),H(e,n)};W(s,e=>{t.child?e(c):e(l,-1)}),H(e,o)},$$slots:{popper:!0}}))};W(b,e=>{a()?e(x):a()||e(S,1)}),H(e,y),at()}var fA=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`type`,`disabled`,`openOnHover`,`openDelay`,`closeDelay`]),pA=V(`<button><!></button>`);function mA(e,t){let n=da();it(t,!0);let r=Z(t,`id`,19,()=>NC(n)),i=Z(t,`ref`,15,null),a=Z(t,`type`,3,`button`),o=Z(t,`disabled`,3,!1),s=Z(t,`openOnHover`,3,!1),c=Z(t,`openDelay`,3,700),l=Z(t,`closeDelay`,3,300),u=Y(t,fA),d=tA.create({id:Yb(()=>r()),ref:Yb(()=>i(),e=>i(e)),disabled:Yb(()=>!!o()),openOnHover:Yb(()=>s()),openDelay:Yb(()=>c()),closeDelay:Yb(()=>l())}),f=M(()=>Nx(u,d.props,{type:a()}));tk(e,{get id(){return r()},get ref(){return d.opts.ref},children:(e,n)=>{var r=ua(),i=I(r),a=e=>{var n=ua();Ra(I(n),()=>t.child,()=>({props:z(f)})),H(e,n)},o=e=>{var n=pA();Do(n,()=>({...z(f)})),Ra(F(n),()=>t.children??p),D(n),H(e,n)};W(i,e=>{t.child?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),at()}function hA(e,t){it(t,!0);let n=Z(t,`open`,15,!1),r=Z(t,`onOpenChange`,3,MC),i=Z(t,`onOpenChangeComplete`,3,MC);Jk.create({open:Yb(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Yb(()=>i())}),ek(e,{children:(e,n)=>{var r=ua();Ra(I(r),()=>t.children??p),H(e,r)},$$slots:{default:!0}}),at()}var gA=V(`<!> `,1),_A=V(`<button type="button"> <!></button>`),vA=V(`<button type="button"> </button>`),yA=V(`<div role="group" aria-label="Presets"></div> <div class="mt-1 border-t border-line pt-2 px-2 pb-1"><div class="text-[11px] uppercase tracking-wide text-fg-subtle mb-1.5">Custom range</div> <label class="block text-[11px] text-fg-muted mb-1">From <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <label class="block text-[11px] text-fg-muted mb-2">To <input type="datetime-local" class="mt-0.5 w-full rounded border border-line bg-subtle px-1.5 py-1 text-xs text-fg focus:outline-none focus:border-accent"/></label> <div class="mb-2 border-t border-line pt-2"><div class="mb-1 text-[11px] text-fg-muted">Show times in</div> <div class="flex gap-1"></div> <div class="mt-1 text-[11px] text-fg-subtle"> </div></div> <button type="button">Apply</button></div>`,1),bA=V(`<!> <!>`,1);function xA(e,t){it(t,!0);let n=N(!1),r=M(()=>t.selection.type===`custom`?{start:t.selection.start,end:t.selection.end}:{start:Date.now()-9e5,end:Date.now()}),i=N(``),a=N(``);function o(e){P(n,e,!0),e&&(P(i,u(z(r).start),!0),P(a,u(z(r).end),!0))}function s(e){t.onChange({type:`preset`,preset:e}),P(n,!1)}function c(){let e=d(z(i)),r=d(z(a));e!==null&&r!==null&&(t.onChange({type:`custom`,start:e,end:r}),P(n,!1))}let l=M(()=>d(z(i))!==null&&d(z(a))!==null);function u(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}T${n(t.getHours())}:${n(t.getMinutes())}`}function d(e){if(!e)return null;let t=new Date(e).getTime();return Number.isFinite(t)?t:null}var f=ua();za(I(f),()=>hA,(e,r)=>{r(e,{onOpenChange:o,get open(){return z(n)},set open(e){P(n,e,!0)},children:(e,n)=>{var r=bA(),o=I(r);{let e=M(()=>$(`inline-flex items-center gap-1.5 px-2 py-1 text-xs rounded border`,`border-line bg-surface text-fg-muted hover:text-fg hover:bg-hover`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,t.class));za(o,()=>mA,(n,r)=>{r(n,{"aria-label":`Time window`,title:`Change the time window`,get class(){return z(e)},children:(e,n)=>{var r=gA(),i=I(r);Pp(i,{size:12});var a=L(i);R(e=>U(a,` ${e??``}`),[()=>Es(t.selection)]),H(e,r)},$$slots:{default:!0}})})}za(L(o,2),()=>HC,(e,n)=>{n(e,{children:(e,n)=>{var r=ua();za(I(r),()=>dA,(e,n)=>{n(e,{sideOffset:6,align:`start`,class:`z-50 w-64 rounded-md border border-line bg-surface p-1 shadow-lg`,children:(e,n)=>{var r=yA(),o=I(r);G(o,21,()=>bs,e=>e.id,(e,n)=>{let r=M(()=>t.selection.type===`preset`&&t.selection.preset===z(n).id);var i=_A(),a=F(i),o=L(a),c=e=>{Sp(e,{size:12,class:`text-accent`})};W(o,e=>{z(r)&&e(c)}),D(i),R(e=>{J(i,`aria-current`,z(r)?`true`:void 0),q(i,1,e),U(a,`${z(n).label??``} `)},[()=>K($(`flex w-full items-center justify-between rounded px-2 py-1.5 text-xs`,`text-fg hover:bg-hover focus-visible:outline-none focus-visible:bg-hover`,z(r)&&`bg-selected font-medium`))]),B(`click`,i,()=>s(z(n).id)),H(e,i)}),D(o);var u=L(o,2),d=L(F(u),2),f=L(F(d));So(f),D(d);var p=L(d,2),m=L(F(p));So(m),D(p);var h=L(p,2),g=L(F(h),2);G(g,20,()=>[{id:`local`,label:`Local`},{id:`utc`,label:`UTC`}],e=>e.id,(e,t)=>{var n=vA(),r=F(n,!0);D(n),R(e=>{J(n,`aria-pressed`,Uu.value===t.id),q(n,1,e),U(r,t.label)},[()=>K($(`flex-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,Uu.value===t.id?`bg-accent text-white`:`border border-line text-fg-muted hover:text-fg`))]),B(`click`,n,()=>Uu.value=t.id),H(e,n)}),D(g);var _=L(g,2),v=F(_);D(_),D(h);var y=L(h,2);D(u),R((e,t)=>{U(v,`Currently ${e??``}`),y.disabled=!z(l),q(y,1,t)},[()=>Ig(Uu.value),()=>K($(`w-full rounded px-2 py-1 text-xs font-medium`,`bg-accent text-white hover:opacity-90`,`disabled:opacity-40 disabled:cursor-not-allowed`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`))]),jo(f,()=>z(i),e=>P(i,e)),jo(m,()=>z(a),e=>P(a,e)),B(`click`,y,c),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,r)},$$slots:{default:!0}})}),H(e,f),at()}ea([`click`]);var SA=V(`<button type="button" aria-live="polite" title="Show the newest matches and follow new data again"><!> </button>`);function CA(e,t){it(t,!0);let n=M(()=>!t.live&&t.count>0),r=M(()=>t.count>999?`999+`:String(t.count));var i=ua(),a=I(i),o=e=>{var n=SA(),i=F(n);op(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${z(r)??``} new`)},[()=>K($(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium`,`bg-accent text-white shadow-sm hover:opacity-90 focus-visible:outline-none`,`focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`,`transition-opacity`,t.class))]),B(`click`,n,function(...e){t.onResume?.apply(this,e)}),H(e,n)};W(a,e=>{z(n)&&e(o)}),H(e,i),at()}ea([`click`]);async function wA(e,t){try{let n=await t.fetch.call(globalThis,`${t.baseUrl}/api/query/${e}/fields`,{signal:t.signal});if(!n.ok)return[];let r=await n.json();return Array.isArray(r.fields)?r.fields:[]}catch{return[]}}async function TA(e,t,n){let r={query:t.query};t.window&&(r.window=t.window),t.limit!==void 0&&(r.limit=t.limit),t.cursor&&(r.cursor=t.cursor);let i;try{i=await n.fetch.call(globalThis,e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(r),signal:n.signal})}catch(e){return DA(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}if(i.status===400){let e=a.errors;return e?.length?{status:`invalid`,errors:e}:{status:`error`,message:`Invalid query request`}}return i.status===403?{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`}:i.ok?{status:`ok`,payload:a}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}async function EA(e,t){let n=await TA(`${t.baseUrl}/api/query/traces`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,traces:r.traces??[],nextCursor:r.nextCursor??null}}function DA(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}async function OA(e,t){let n=await TA(`${t.baseUrl}/api/query/logs`,e,t);if(n.status!==`ok`)return n;let r=n.payload;return{status:`ok`,logs:r.logs??[],nextCursor:r.nextCursor??null}}async function kA(e,t){let n=await TA(`${t.baseUrl}/api/query/errors`,e,t);return n.status===`ok`?{status:`ok`,errors:n.payload.errors??[]}:n}async function AA(e,t){let n=await TA(`${t.baseUrl}/api/query/webmcp`,{query:``,...e},t);return n.status===`ok`?{status:`ok`,webmcp:n.payload.webmcp??{tools:[],summary:{installations:0,emptyInstallations:0,toolsOffered:0,toolsWithdrawn:0,calls:0,errors:0,resultBytes:0,envelopeBytes:0,toolsWithDroppedAnnotations:0,toolsWithoutInputSchema:0,toolsWithLabelMismatch:0,toolsRedefined:0,refusedCalls:0}}}:n}function jA(){return{reasons:{query:!1,scrolled:!1,selected:!1,window:!1},pending:0}}function MA(e){return!Object.values(e.reasons).some(Boolean)}function NA(e){return MA(e)?0:e.pending}function PA(e,t){switch(t.type){case`query-changed`:return FA(e,`query`,t.query.trim().length>0);case`scrolled`:return FA(e,`scrolled`,!t.atTop);case`row-selected`:return FA(e,`selected`,!0);case`row-deselected`:return FA(e,`selected`,!1);case`window-changed`:return FA(e,`window`,t.bounded);case`arrived`:return MA(e)?e:{...e,pending:Math.max(0,e.pending+t.count)};case`resumed`:return jA()}}function FA(e,t,n){if(e.reasons[t]===n)return e;let r={reasons:{...e.reasons,[t]:n},pending:e.pending};return MA(r)&&(r.pending=0),r}var IA={run:async(e,t)=>{let n=await EA(e,t);return n.status===`ok`?{status:`ok`,rows:n.traces,nextCursor:n.nextCursor}:n}},LA={run:async(e,t)=>{let n=await OA(e,t);return n.status===`ok`?{status:`ok`,rows:n.logs,nextCursor:n.nextCursor}:n}},RA=200,zA=100;function BA(e,t){let n=e.now??(()=>Date.now()),r=e.debounceMs??RA,i=e.pageSize??zA,a=new is(``),o=hl,s=new is([]),c=new is([]),l=new is(null),u=new is(!1),d=new is(!1),f=new is(null),p=new is(jA()),m=0,h=null,g=null;function _(e){p.value=PA(p.value,e)}async function v(r={}){let p=++m;h?.abort();let g=new AbortController;h=g,u.value=!0;let _=ws(o.value,n()),v=await t.run({query:a.value,window:As(_),limit:i,cursor:r.append?f.value??void 0:void 0},{fetch:e.client.fetch,baseUrl:typeof e.client.baseUrl==`function`?e.client.baseUrl():e.client.baseUrl,signal:g.signal});if(p===m)switch(u.value=!1,v.status){case`ok`:s.value=r.append?[...s.value,...v.rows]:v.rows,f.value=v.nextCursor,c.value=[],l.value=null,d.value=!0;return;case`invalid`:c.value=v.errors,l.value=null;return;case`error`:c.value=[],l.value=v.message;return;case`aborted`:return}}function y(){if(g&&clearTimeout(g),r<=0){v();return}g=setTimeout(()=>{g=null,v()},r)}return{text:a,window:o,results:s,errors:c,failure:l,loading:u,ready:d,nextCursor:f,tail:p,get live(){return MA(p.value)},get pending(){return NA(p.value)},setText(e){a.value=e,_({type:`query-changed`,query:e}),y()},submit(){g&&(clearTimeout(g),g=null),v()},refresh(){return g&&(clearTimeout(g),g=null),v()},setWindow(e){o.value=e,_({type:`window-changed`,bounded:!Ts(ws(e,n()))}),v()},setScrolledToTop(e){_({type:`scrolled`,atTop:e})},setSelected(e){_(e?{type:`row-selected`}:{type:`row-deselected`})},arrived(e){_({type:`arrived`,count:e}),MA(p.value)&&v()},resume(){_({type:`resumed`}),a.value=``,v()},loadMore(){!f.value||u.value||v({append:!0})},removeRows(e){s.value=s.value.filter(t=>!e(t))},dispose(){g&&clearTimeout(g),h?.abort()}}}function VA(e){return BA(e,IA)}function HA(e){return BA(e,LA)}function UA(e,t){let n=t,r=!0;if(typeof IntersectionObserver>`u`)return{update:e=>{n=e}};let i=new IntersectionObserver(e=>{let t=e[e.length-1];if(t){if(!t.isIntersecting){r=!0;return}!r||n.disabled||(r=!1,n.onReach())}},{root:n.root??null,rootMargin:n.rootMargin??`200px`});return i.observe(e),{update(e){let t=n.disabled;n=e,t&&!e.disabled&&(r=!0)},destroy(){i.disconnect()}}}function WA(e){let t=e.target;return/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable}function GA(e,t){return e>t-1?t-1:e}function KA(e,t,n,r){return n===0?e:e<0?t>0?0:r===`last`?n-1:0:Math.min(Math.max(e+t,0),n-1)}function qA(e){let{count:t,onActivate:n,scrollToIndex:r,fromUnsetUp:i=`first`}=e,a=N(-1),o=M(()=>GA(z(a),t())),s=e=>{t()!==0&&(P(a,KA(z(o),e,t(),i),!0),r?.(z(a)))};return{get cursor(){return z(o)},set cursor(e){P(a,e,!0)},onKeyDown:e=>{WA(e)||(e.key===`ArrowDown`||e.key===`j`?(e.preventDefault(),s(1)):e.key===`ArrowUp`||e.key===`k`?(e.preventDefault(),s(-1)):e.key===`Enter`&&z(o)>=0&&z(o)<t()&&(e.preventDefault(),n(z(o))))}}}var JA=V(`<button><span class="truncate"> </span> <!></button>`),YA=V(`<span class="flex-shrink-0 px-1.5 py-0.5 rounded bg-warning-bg text-warning text-[10px] font-medium uppercase tracking-wide" title="Partial trace: the root span has not arrived, so this row shows the highest span received and a duration covering only that part.">partial</span>`),XA=V(`<div role="option" tabindex="-1" data-focus-inset=""><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <button type="button"> </button> <div class="flex items-center gap-1.5 min-w-0"><!> <span class="truncate text-sm text-fg"> </span> <!> <!></div> <span class="font-mono text-xs text-fg-muted text-right tabular-nums"> </span> <span class="trace-col-spans font-mono text-xs text-fg-subtle text-right tabular-nums"> </span> <span class="trace-col-time font-mono text-[11px] text-fg-subtle truncate"> </span> <span> </span> <!></div>`),ZA=V(`<span class="text-xs font-normal text-accent"> </span>`),QA=V(`<div class="flex items-center gap-1 mr-2 px-2 border-r border-line"><button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-accent/10"><!> </button> <button class="flex items-center gap-1 px-2 py-1 text-xs rounded bg-danger-bg text-danger hover:bg-danger-bg/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-danger-bg"><!> </button></div>`),$A=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered traces received while paused">Drop buffer</button>`),ej=V(`<button class="p-1.5 hover:bg-hover rounded transition-colors" title="Export all traces as JSON"><!></button>`),tj=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading traces…</div>`),nj=V(`<div class="mx-auto flex max-w-2xl flex-col items-center gap-3 px-6 py-12 text-center text-sm text-fg-subtle"><p class="font-medium text-fg">No traces yet — send telemetry to get started</p> <p class="max-w-lg text-xs text-fg-muted">Both standard OTLP transports are ready. Existing SDK defaults
12
+ usually work unchanged.</p> <div class="grid w-full gap-2 text-left md:grid-cols-2"><div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/gRPC</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317</code></div> <div class="rounded-md border border-line bg-subtle p-3"><div class="mb-1 text-[11px] font-semibold uppercase tracking-wide">OTLP/HTTP</div> <code class="break-all text-xs text-fg">OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318</code></div></div></div>`),rj=V(`<div class="text-center text-fg-subtle text-sm py-12">No traces match the current filter.</div>`),ij=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),aj=V(`<div><div class="trace-grid sticky top-0 z-10 px-4 py-2 border-b border-line bg-subtle text-[11px] font-semibold uppercase tracking-wide text-fg-subtle"><label class="cursor-pointer flex items-center"><input type="checkbox" class="w-3.5 h-3.5 rounded border-line text-accent"/></label> <!> <!> <!> <!> <!> <!> <span></span></div> <!> <!></div>`),oj=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> <!></h3> <div class="flex items-center gap-1"><!> <button><!> </button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Import traces from file"><!></button> <!> <button class="p-1.5 hover:bg-hover rounded transition-colors" title="Keyboard shortcuts (?)"><!></button></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>OK</option></select> <!> <div class="flex items-center text-xs text-fg-subtle flex-shrink-0" title="Only show traces at least this slow"><span class="mr-1">≥</span> <input type="number" placeholder="0" class="w-14 px-1 py-1 rounded border border-line bg-surface text-fg-muted focus:outline-none"/> <span class="ml-1">ms</span></div></div> <div class="trace-list-container flex-1 overflow-auto focus:outline-none" role="listbox" aria-label="Traces" tabindex="0"><!></div> <!></div>`);function sj(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>z(s).key===n());var o=JA(),c=F(o),l=F(c,!0);D(c);var u=L(c,2),d=e=>{var t=ua(),n=I(t),r=e=>{op(e,{size:11,class:`flex-shrink-0`})},i=e=>{ep(e,{size:11,class:`flex-shrink-0`})};W(n,e=>{z(s).dir===`asc`?e(r):e(i,-1)}),H(e,t)};W(u,e=>{z(a)&&e(d)}),D(o),R((e,n)=>{q(o,1,e),J(o,`title`,n),U(l,t())},[()=>K($(`flex items-center gap-1 min-w-0 transition-colors hover:text-fg-muted`,z(a)?`text-fg-muted`:`text-fg-subtle`,r()===`end`&&`justify-end`,i())),()=>`Sort by ${t().toLowerCase()}`]),B(`click`,o,()=>Hl(n())),H(e,o)},r=(e,t=p,n=p,r=p)=>{let i=M(()=>t().status===`ERROR`),a=M(()=>gg(t().service||`unknown`)),o=M(()=>oe.cursor===r());var s=XA(),c=M(()=>xg(()=>Pu(t().traceId))),l=F(s),u=F(l);So(u),D(l);var d=L(l,2),f=F(d,!0);D(d);var m=L(d,2),h=F(m),g=e=>{Ap(e,{size:13,class:`text-danger flex-shrink-0`})};W(h,e=>{z(i)&&e(g)});var v=L(h,2),y=F(v,!0);D(v);var b=L(v,2),x=e=>{H(e,YA())};W(b,e=>{t().partial&&e(x)}),mv(L(b,2),{get value(){return t().traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(m);var S=L(m,2),C=F(S,!0);D(S);var w=L(S,2),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne,!0);D(ne),Op(L(ne,2),{size:15,class:`text-fg-subtle justify-self-end`}),D(s),R((e,i,c,l,p)=>{q(s,1,e),J(s,`aria-selected`,z(o)),J(s,`data-row-index`,r()),wo(u,n()),q(d,1,i),so(d,`background-color: ${z(a).fill??``}; color: ${z(a).stroke??``};`),J(d,`title`,`Filter by ${t().service||`unknown`}`),U(f,t().service||`unknown`),J(v,`title`,t().rootSpan.name),U(y,t().rootSpan.name||`unknown`),U(C,c),U(T,t().spans.length),U(te,l),q(ne,1,p),U(re,t().status)},[()=>K($(`group trace-grid px-4 py-2 border-b border-line-subtle cursor-pointer transition-colors`,`row-virtual`,n()?`bg-accent/10`:z(i)?`bg-danger-bg/40 hover:bg-danger-bg/70`:`hover:bg-hover`,z(o)&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>K($(`text-[11px] font-medium px-2 py-0.5 rounded truncate text-left transition-shadow`,z(_).has(t().service||`unknown`)&&`ring-1 ring-inset ring-accent`)),()=>od(t().duration),()=>sd(t().startTime),()=>K($(`text-[10px] font-semibold px-1.5 py-0.5 rounded justify-self-start`,z(i)?`bg-danger-bg text-danger`:t().status===`OK`?`bg-success-bg text-success`:`bg-hover text-fg-muted`))]),B(`click`,s,()=>{oe.cursor=r(),Pu(t().traceId)}),B(`keydown`,s,function(...e){z(c)?.apply(this,e)}),B(`click`,u,e=>e.stopPropagation()),B(`change`,u,()=>fu(t().traceId)),B(`click`,d,e=>{e.stopPropagation(),Rl(t().service||`unknown`)}),H(e,s)};function i(e,t,n,r,i){return n===`error`&&e.status!==`ERROR`||n===`ok`&&e.status===`ERROR`||r>0&&e.duration<r||i.size>0&&!i.has(e.service||`unknown`)?!1:ev(t.toLowerCase(),[e.service,e.rootSpan?.name,e.traceId,e.correlationId,...e.spans.map(e=>e.name)])}let a=M(()=>ql.value),o=M(()=>yl.value),s=M(()=>Nl.value),c=M(()=>uu.value),l=M(()=>Tl.value),u=M(()=>Ol.value),d=M(()=>du.value),f=M(()=>gu.value),m=M(()=>Pl.value),h=M(()=>Fl.value),g=M(()=>Il.value),_=M(()=>Ll.value),v=M(()=>{let e=new Map;for(let t of z(a)){let n=t.service||`unknown`;e.set(n,(e.get(n)??0)+1)}return{key:`service`,label:`Service`,options:[...e.entries()].map(([e,t])=>({value:e,count:t})),selected:z(_),onToggle:Rl}}),y=M(()=>z(v).options.length>1),b=N(null),x=N(!1),S=M(()=>z(f)>0);Lr(()=>{if(z(c))return;let e=e=>{if(!(el.value||z(x))){if(e.key===`/`&&!bg()){e.preventDefault(),z(b)?.focus();return}e.key===`Escape`&&(z(S)?mu():document.activeElement===z(b)&&(Pl.value=``,C.setText(``))),e.key===`a`&&(e.metaKey||e.ctrlKey)&&!bg()&&(e.preventDefault(),pu())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let C=VA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:w}});function w(){let e=ml.value;return(e?Qo(e):null)??globalThis.location.origin}Lr(()=>()=>C.dispose());let T=N(null),ee=N(_r([]));Lr(()=>{let e=w();e!==z(T)&&(P(T,e,!0),wA(`traces`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(ee,e,!0)),!C.ready.value&&Pl.value?C.setText(Pl.value):C.refresh())});let te=N(0);Lr(()=>{let e=z(a).length;e>z(te)&&C.arrived(e-z(te)),P(te,e,!0)}),Lr(()=>{C.setSelected(z(c)!=null)});let ne=M(()=>C.results.value),re=M(()=>{let e=C.ready.value&&C.failure.value===null,t=z(o);return e&&(t=z(m).length>0?z(ne):ie(z(ne),z(o))),t.filter(t=>i(t,e?``:z(m),z(h),z(g),z(_)))});function ie(e,t){let n=new Set(e.map(e=>e.traceId));return[...e,...t.filter(e=>!n.has(e.traceId))]}let ae=N(void 0),oe=qA({count:()=>z(re).length,onActivate:e=>{let t=z(re)[e];t&&Pu(t.traceId)},scrollToIndex:e=>queueMicrotask(()=>{z(ae)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})})});function se(){let e=z(re).filter(e=>z(d).has(e.traceId));e.length>0&&Yy(e)}async function ce(){let e=[...z(d)];if(!(e.length===0||!globalThis.confirm(`Delete ${e.length} stored trace${e.length===1?``:`s`}?`)))try{await fetch(`${w()}/api/traces`,{method:`DELETE`,headers:{"content-type":`application/json`},body:JSON.stringify({traceIds:e})})}catch{}finally{let t=new Set(e);C.removeRows(e=>t.has(e.traceId)),hu()}}let le=M(()=>z(m).length>0||z(h)!==`all`||z(g)>0||z(_).size>0),E=M(()=>z(re).length>0&&z(re).every(e=>z(d).has(e.traceId)));var ue=ua(),de=I(ue),fe=e=>{hb(e,{get trace(){return z(c)}})},pe=e=>{var t=oj(),i=F(t),o=F(i),s=F(o);Wp(s,{size:16});var c=L(s),p=L(c),m=e=>{var t=ZA(),n=F(t);D(t),R(()=>U(n,`(${z(f)??``} selected)`)),H(e,t)};W(p,e=>{z(S)&&e(m)}),D(o);var _=L(o,2),w=F(_),T=e=>{var t=QA(),n=F(t),r=F(n);Jp(r,{size:12});var i=L(r);D(n);var a=L(n,2),o=F(a);Hh(o,{size:12});var s=L(o);D(a),D(t),R(()=>{n.disabled=!z(S),J(n,`title`,z(S)?`Export selected traces`:`Tick traces to export them · Export selected`),U(i,` Export${z(S)?` (${z(f)})`:``}`),a.disabled=!z(S),J(a,`title`,z(S)?`Delete selected traces`:`Tick traces to delete them · Delete selected`),U(s,` Delete${z(S)?` (${z(f)})`:``}`)}),B(`click`,n,se),B(`click`,a,ce),H(e,t)};W(w,e=>{z(re).length>0&&e(T)});var te=L(w,2),ne=F(te),ie=e=>{oh(e,{size:12})},ue=e=>{nh(e,{size:12})};W(ne,e=>{z(l)?e(ie):e(ue,-1)});var de=L(ne);D(te);var fe=L(te,2),pe=e=>{var t=$A();B(`click`,t,function(...e){ku?.apply(this,e)}),H(e,t)};W(fe,e=>{z(l)&&z(u)>0&&e(pe)});var me=L(fe,2);Jh(F(me),{size:14,class:`text-fg-subtle`}),D(me);var he=L(me,2),ge=e=>{var t=ej();Jp(F(t),{size:14,class:`text-fg-subtle`}),D(t),B(`click`,t,()=>Yy(z(re))),H(e,t)};W(he,e=>{z(re).length>0&&e(ge)});var _e=L(he,2);Mp(F(_e),{size:14,class:`text-fg-subtle`}),D(_e),D(_),D(i);var ve=L(i,2),ye=F(ve);Hb(ye,{get value(){return C.text.value},onInput:e=>{C.setText(e),Pl.value=e},onSubmit:()=>C.submit(),get serverErrors(){return C.errors.value},get fields(){return z(ee)},class:`flex-1`,get ref(){return z(b)},set ref(e){P(b,e,!0)}});var be=L(ye,2);xA(be,{get selection(){return C.window.value},onChange:e=>C.setWindow(e)});var xe=L(be,2);CA(xe,{get count(){return C.pending},get live(){return C.live},onResume:()=>{Pl.value=``,C.resume()}});var Se=L(xe,2),Ce=F(Se);Ce.value=Ce.__value=`all`;var we=L(Ce);we.value=we.__value=`error`;var Te=L(we);Te.value=Te.__value=`ok`,D(Se);var Ee;lo(Se);var De=L(Se,2),Oe=e=>{{let t=M(()=>[z(v)]);Db(e,{get facets(){return z(t)},get onClearAll(){return zl}})}};W(De,e=>{z(y)&&e(Oe)});var ke=L(De,2),Ae=L(F(ke),2);So(Ae),J(Ae,`min`,0),J(Ae,`step`,50),Ke(2),D(ke),D(ve);var je=L(ve,2),Me=F(je),Ne=e=>{H(e,tj())},Pe=e=>{H(e,nj())},Fe=e=>{H(e,rj())},Ie=e=>{var t=aj(),i=F(t),a=F(i),o=F(a);So(o),D(a);var s=L(a,2);n(s,()=>`Service`,()=>`service`);var c=L(s,2);n(c,()=>`Operation`,()=>`name`);var l=L(c,2);n(l,()=>`Duration`,()=>`duration`,()=>`end`);var u=L(l,2);n(u,()=>`Spans`,()=>`spans`,()=>`end`,()=>`trace-col-spans`);var f=L(u,2);n(f,()=>`Time`,()=>`time`,()=>void 0,()=>`trace-col-time`);var p=L(f,2);n(p,()=>`Status`,()=>`status`),Ke(2),D(i);var m=L(i,2);G(m,19,()=>z(re),e=>e.traceId,(e,t,n)=>{{let i=M(()=>z(d).has(z(t).traceId));r(e,()=>z(t),()=>z(i),()=>z(n))}});var h=L(m,2),g=e=>{var t=ij(),n=F(t,!0);D(t),Za(t,(e,t)=>UA?.(e,t),()=>({onReach:()=>C.loadMore(),disabled:C.loading.value})),R(()=>U(n,C.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(h,e=>{C.nextCursor.value&&e(g)}),D(t),R(()=>{J(a,`title`,z(E)?`Clear selection`:`Select all`),wo(o,z(E))}),B(`click`,o,e=>e.stopPropagation()),B(`change`,o,()=>z(E)?mu():pu()),H(e,t)};W(Me,e=>{C.loading.value&&!C.ready.value&&z(a).length===0?e(Ne):z(re).length===0&&!z(le)?e(Pe,1):z(re).length===0?e(Fe,2):e(Ie,-1)}),D(je),Ho(je,e=>P(ae,e),()=>z(ae));var Le=L(je,2),Re=e=>{kg(e,{onclose:()=>P(x,!1),onimport:async e=>{try{let t=eb(await rb(e));return t.success&&t.traces.length>0?(Hu(t.traces),{imported:t.traces.length,errors:[],warnings:t.warnings}):{imported:0,errors:t.errors,warnings:t.warnings}}catch(e){return{imported:0,errors:[String(e)],warnings:[]}}}})};W(Le,e=>{z(x)&&e(Re)}),D(t),R(e=>{U(c,` Traces (${(z(le)?`${z(re).length} of ${z(a).length}`:z(a).length)??``}) `),q(te,1,e),J(te,`title`,z(l)?`Resume live tail`:`Pause live tail`),U(de,` ${z(l)?`Resume${z(u)>0?` (+${z(u)})`:``}`:`Pause`}`),Ee!==(Ee=z(h))&&(Se.value=(Se.__value=z(h))??``,co(Se,z(h))),Co(Ae,z(g)||``)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(l)?`bg-warning-bg text-warning hover:bg-warning-bg/80`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Ou?.apply(this,e)}),B(`click`,me,()=>P(x,!0)),B(`click`,_e,()=>tl(vg)),B(`change`,Se,e=>Fl.value=e.currentTarget.value),B(`input`,Ae,e=>Il.value=Number(e.currentTarget.value)||0),B(`keydown`,je,function(...e){oe.onKeyDown?.apply(this,e)}),H(e,t)};W(de,e=>{z(c)?e(fe):e(pe,-1)}),H(e,ue),at()}ea([`click`,`keydown`,`change`,`input`]);var cj=(e,t=p,n=p,r=p)=>{let i=M(t);var a=lj(),o=F(a);za(o,()=>z(i),(e,t)=>{t(e,{size:12})});var s=L(o,1,!0);D(a),R(()=>{q(a,1,`flex items-center gap-1 px-2 py-1 bg-subtle rounded-md ${r()??``}`),U(s,n())}),H(e,a)},lj=V(`<span><!> </span>`),uj=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-violet-100 text-violet-700 rounded-full"> </span>`),dj=V(`<div class="flex-1 flex flex-col items-center justify-center text-center gap-4 px-6"><!> <div class="max-w-md"><p class="text-sm font-medium text-fg">Waiting for coding-agent telemetry</p> <p class="text-xs text-fg-muted mt-1.5">Launch Claude Code wired to this receiver and its sessions, tokens,
13
13
  cost, tool, MCP, sub-agent &amp; skill usage will appear here.</p></div> <div class="flex items-center gap-2 bg-subtle border border-line rounded-md px-3 py-2 font-mono text-xs text-fg"><!> <span></span> <!></div> <p class="text-[11px] text-fg-muted/80 max-w-md">Uses OTLP <span class="font-mono">http/protobuf</span> on <span class="font-mono">:4318</span>. Standard OTLP/gRPC exporters can
14
- connect on <span class="font-mono">:4317</span>.</p></div>`),tj=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),nj=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),rj=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),ij=V(`<span class="text-[11px] text-fg-muted"> </span>`),aj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),oj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),sj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),cj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),lj=V(`<span class="text-red-500"> </span>`),uj=V(`<span> </span>`),dj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),fj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools &amp; MCP</div> <div class="flex flex-col gap-1"></div></div>`),pj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),mj=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),hj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),gj=V(`<span class="text-amber-600"> </span>`),_j=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),vj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),yj=V(`<!>Hide prompts`,1),bj=V(`<!>Reveal prompts`,1),xj=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),Sj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),Cj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <div class="flex flex-col gap-1"></div></div>`,1),wj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Tj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Ej(e,t){it(t,!0);let n=M(()=>Xl.value),r=M(()=>Ql.value),i=M(()=>Zl.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){return Object.entries(e).sort((e,t)=>t[1].costUsd-e[1].costUsd)}function u(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function d(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${sd(n)} tok`),e.durationMs&&t.push(ad(e.durationMs)),e.effort&&t.push(e.effort),e.speed&&t.push(e.speed),e.skillName&&t.push(`skill:${e.skillName}`),e.agentName&&t.push(`agent:${e.agentName}`)}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(ad(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?dd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(ad(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function f(e){return e.rollup.inputTokens+e.rollup.outputTokens}let p=M(()=>z(r)?[...z(r).timeline].reverse().slice(0,200):[]),m=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),h=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),g=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),v=M(()=>z(r)?.rollup.hooks),y=M(()=>z(r)?.rollup.compactions??[]),b=M(()=>new Map(z(y).map(e=>[e.atEventId,e]))),x=M(()=>z(y).reduce((e,t)=>e+t.droppedTokens,0)),S=M(()=>z(h).length>0||z(g).length>0||z(v)!==void 0&&z(v).runs>0);var C=Tj(),w=F(C),T=F(w),ee=F(T);lp(ee,{size:16,class:`text-violet-500`});var te=L(ee,2),ne=e=>{var t=$A(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(te,e=>{z(n).length>0&&e(ne)}),D(T),D(w);var re=L(w,2),ie=e=>{var t=ej(),n=F(t);lp(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);zh(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,Q_(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},ae=e=>{var t=wj(),C=I(t),w=F(C),T=F(w);Gp(T,{size:12,class:`text-emerald-500`});var ee=L(T,1,!0);D(w);var te=L(w,2),ne=F(te);Lp(ne,{size:12,class:`text-amber-500`});var re=L(ne);D(te);var ie=L(te,2),ae=F(ie);xp(ae,{size:12,class:`text-emerald-500`});var oe=L(ae),se=L(oe);rg(se,{size:12,class:`text-red-500 ml-1`});var ce=L(se,1,!0);D(ie);var le=L(ie,2),E=e=>{var t=tj(),n=F(t);Gh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(le,e=>{z(i).apiErrors>0&&e(E)});var ue=L(le,2);G(ue,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>tg,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var de=L(ue,2);G(de,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Th,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var fe=L(de,2);G(fe,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>lp,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var pe=L(fe,2);G(pe,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];ZA(e,()=>Nh,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)});var me=L(pe,2);G(me,17,()=>l(z(i).byEffort),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>dm,()=>z(t),()=>`text-amber-600`)}});var he=L(me,2);G(he,17,()=>l(z(i).bySkill),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>Nh,()=>z(t),()=>`text-fuchsia-600`)}});var ge=L(he,2);G(ge,17,()=>l(z(i).byAgent),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);ZA(e,()=>lp,()=>z(t),()=>`text-violet-600`)}}),G(L(ge,2),17,()=>l(z(i).byModel),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=nj(),s=F(a);D(a),R(e=>U(s,`${r()??``} ×${i().requests??``} ${e??``}`),[()=>o(i().costUsd)]),H(e,a)}),D(C);var _e=L(C,2),ve=F(_e);G(ve,21,()=>z(n),e=>e.id,(e,t)=>{var n=rj(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var d=L(i,2),p=F(d),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(d),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>sd(f(z(t))),()=>ad(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>$l(z(t).id)),H(e,n)}),D(ve);var ye=L(ve,2),be=F(ye),xe=e=>{var t=Cj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var l=L(s,2),f=e=>{var t=ij(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(l,e=>{(z(r).terminal||z(r).appVersion)&&e(f)}),D(i);var _=L(i,2),C=F(_),w=F(C),T=L(w),ee=e=>{H(e,aj())};W(T,e=>{z(r).rollup.costEstimatedUsd>0&&e(ee)}),D(C);var te=L(C,2),ne=F(te);D(te);var re=L(te,2),ie=F(re);D(re);var ae=L(re,2),oe=e=>{var t=oj(),n=F(t);xh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(y).length??``} context reset${z(y).length>1?`s`:``} · ${e??``} tokens`),[()=>sd(z(x))]),H(e,t)};W(ae,e=>{z(y).length>0&&e(oe)});var se=L(ae,2),ce=F(se);Lm(ce,{size:11});var le=L(ce,1,!0);D(se);var E=L(se,2),ue=e=>{var t=sj(),n=F(t);pm(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(E,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(ue)});var de=L(E,2),fe=e=>{var t=cj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(de,e=>{z(r).rollup.commits&&e(fe)}),D(_),D(n);var pe=L(n,2),me=e=>{var t=fj(),n=L(F(t),2);G(n,21,()=>z(m),e=>e.name,(e,t)=>{var n=dj(),r=F(n),i=F(r),a=e=>{Th(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{lp(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Nh(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=lj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=uj(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(pe,e=>{z(m).length>0&&e(me)});var he=L(pe,2),ge=e=>{var t=vj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(h),e=>e.name,(e,t)=>{var n=pj(),r=F(n),i=F(r);sh(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=uj(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=uj(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(g),e=>e.name,(e,t)=>{var n=hj(),r=F(n),i=F(r);sp(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=mj(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=_j(),n=F(t);Zh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=gj(),n=F(t);D(t),R(()=>U(n,`${z(v).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(v).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=lj(),n=F(t);D(t),R(()=>U(n,`${z(v).errored??``} err`)),H(e,t)};W(c,e=>{z(v).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(v).runs??``}`)),H(e,t)};W(a,e=>{z(v)&&z(v).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(he,e=>{z(S)&&e(ge)});var _e=L(he,2),ve=F(_e),ye=L(F(ve),2),be=F(ye),xe=e=>{var t=yj();Zp(I(t),{size:12}),Ke(),H(e,t)},Se=e=>{var t=bj();$p(I(t),{size:12}),Ke(),H(e,t)};W(be,e=>{z(a)?e(xe):e(Se,-1)}),D(ye),D(ve);var Ce=L(ve,2);G(Ce,21,()=>z(p),e=>e.id,(e,t)=>{let n=M(()=>z(b).get(z(t).id));var r=Sj(),i=I(r),a=e=>{var t=xj(),r=F(t);xh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
15
- context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>sd(z(n).droppedTokens)]),H(e,t)};W(i,e=>{z(n)&&e(a)});var o=L(i,2),s=F(o),c=F(s,!0);D(s);var l=L(s,2),f=F(l,!0);D(l);var p=L(l,2),m=F(p,!0);D(p);var h=L(p,2),g=F(h,!0);D(h),D(o),R((e,n,r)=>{U(c,e),q(l,1,`px-1.5 py-0.5 rounded text-[10px] flex-shrink-0 ${z(t).type===`api_error`?`bg-red-100 text-red-700`:z(t).decision===`reject`?`bg-amber-100 text-amber-700`:`bg-subtle text-fg-muted`}`),U(f,z(t).type),U(m,n),U(g,r)},[()=>od(z(t).timestamp),()=>u(z(t)),()=>d(z(t))]),H(e,r)}),D(Ce),D(_e),R((e,t,n)=>{U(c,z(r).id),U(w,`${e??``} `),U(ne,`${t??``} in / ${n??``} out`),U(ie,`${z(r).rollup.apiRequests??``} req`),U(le,z(r).rollup.prompts)},[()=>o(z(r).rollup.costUsd),()=>sd(z(r).rollup.inputTokens),()=>sd(z(r).rollup.outputTokens)]),B(`click`,ye,()=>P(a,!z(a))),H(e,t)};W(be,e=>{z(r)&&e(xe)}),D(ye),D(_e),R((e,t,n)=>{U(ee,e),U(re,` ${t??``} in / ${n??``} out`),U(oe,`${z(i).accepted??``} `),U(ce,z(i).rejected)},[()=>o(z(i).costUsd),()=>sd(z(i).inputTokens),()=>sd(z(i).outputTokens)]),H(e,t)};W(re,e=>{z(n).length===0?e(ie):e(ae,-1)}),D(C),H(e,C),at()}ea([`click`]);function Dj(e,t){return e==null&&t==null?`—`:`${e??`—`}→${t??`—`}`}function Oj(e,t=!0){return e==null||!t?`—`:e<1e-4?`$${(e*1e6).toFixed(2)}μ`:e<.01?`$${(e*1e3).toFixed(3)}m`:`$${e.toFixed(4)}`}function kj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} cached)`:String(e)}function Aj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} reasoning)`:String(e)}function jj(e){return e==null?`—`:`${e>=10?Math.round(e):e.toFixed(1)} tok/s`}function Mj(e){return e==null?`—`:e<1?`${Math.round(e*1e3)}ms`:`${e.toFixed(e<10?2:1)}s`}function Nj(e){if(e.length===0)return{label:``,details:``};let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()],r=e=>{let n=t.get(e)??0;return n>1?`${e} (x${n})`:e},i=n.map(r).join(`, `);return n.length===1?{label:r(n[0]),details:``}:n.length===2?{label:`${r(n[0])}, ${r(n[1])}`,details:i}:{label:`${r(n[0])}, ${r(n[1])}, …`,details:i}}var Pj=new Set([`chat`,`text_completion`,`generate_content`,`embeddings`]),Fj=new Set([`invoke_agent`,`create_agent`]);function Ij(e){return e.operation===`execute_handoff`||e.handoff!=null}function Lj(e){let t=new Set;for(let n of e){let r=n.endMs-n.startMs;for(let i of e){if(i===n)continue;let e=i.endMs-i.startMs;if(i.startMs>=n.startMs&&i.endMs<=n.endMs&&e<r){t.add(n.spanId);break}}}return t}function Rj(e){let t={spanCount:e.length,modelCalls:0,toolCalls:0,agentInvocations:0,handoffs:0,errors:0,inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedTokens:0,totalCostUsd:0,costKnown:!1,costComplete:!0,durationMs:0,models:[],providers:[]};if(e.length===0)return t.costComplete=!1,t;let n=Lj(e),r=1/0,i=-1/0,a=0,o=0,s=new Set,c=new Set,l=new Set,u=0;for(let d of e){r=Math.min(r,d.startMs),i=Math.max(i,d.endMs),d.status===`error`&&t.errors++;let e=d.operation,f=n.has(d.spanId);if(e===`execute_tool`&&!f&&a++,!f)for(let e of d.toolCalls)e.id?l.add(e.id):u++;if(Fj.has(e)&&t.agentInvocations++,Ij(d)&&t.handoffs++,Pj.has(e)&&!f){t.modelCalls++;let e=d.responseModel??d.requestModel;e&&e!==`unknown`&&s.add(e),d.provider&&d.provider!==`unknown`&&c.add(d.provider);let n=d.usage;t.inputTokens+=n.inputTokens??0,t.outputTokens+=n.outputTokens??0,t.reasoningTokens+=n.reasoningOutputTokens??0,t.cachedTokens+=n.cacheReadInputTokens??0,d.cost&&d.cost.source!==`unknown`?(t.totalCostUsd+=d.cost.total,o++):t.costComplete=!1}}return t.totalTokens=t.inputTokens+t.outputTokens,t.toolCalls=a>0?a:l.size+u,t.costKnown=o>0,t.modelCalls===0&&(t.costComplete=!1),t.durationMs=i>r?i-r:0,t.models=[...s],t.providers=[...c],t}function zj(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId,r=e??`trace:${n.traceId}`,i=t.get(r);i?(i.rows.push(n),i.latest=Math.max(i.latest,n.normalized.startMs)):t.set(r,{key:r,conversationId:e,traceId:n.traceId,rows:[n],latest:n.normalized.startMs})}return[...t.values()].sort((e,t)=>t.latest-e.latest)}var Bj=Ns({"openai/gpt-4o":128e3,"openai/gpt-4o-mini":128e3,"openai/gpt-4.1":1047576,"openai/gpt-4-turbo":128e3,"openai/gpt-4":8192,"openai/gpt-3.5-turbo":16385,"openai/o1":2e5,"openai/o3":2e5,"anthropic/claude-opus-4":2e5,"anthropic/claude-sonnet-4":2e5,"anthropic/claude-3-5-sonnet":2e5,"anthropic/claude-3-5-haiku":2e5,"anthropic/claude-3-opus":2e5,"anthropic/claude-3-haiku":2e5,"google/gemini-2.5-pro":1048576,"google/gemini-2.5-flash":1048576,"google/gemini-2.0-flash":1048576,"google/gemini-1.5-pro":2097152,"google/gemini-1.5-flash":1048576,"mistral/mistral-large":128e3,"mistral/mistral-small":32e3,"groq/llama-3.1-70b":131072,"deepseek/deepseek-chat":65536}),Vj=V(`<span class="inline-flex items-center gap-1.5"><svg class="flex-shrink-0 -rotate-90" role="img"><circle fill="none" stroke="currentColor" class="text-line"></circle><circle fill="none" stroke="currentColor" stroke-linecap="round"></circle></svg> <span> </span></span>`);function Hj(e,t){it(t,!0);let n=Z(t,`size`,3,30),r=M(()=>t.total>0?Math.min(t.used/t.total,1):0),i=M(()=>Math.round(z(r)*100)),a=M(()=>z(r)>=.9?{arc:`text-danger`,label:`text-danger`}:z(r)>=.7?{arc:`text-warning`,label:`text-warning`}:{arc:`text-success`,label:`text-fg-muted`}),o=M(()=>(n()-3)/2),s=M(()=>2*Math.PI*z(o)),c=M(()=>z(s)*(1-z(r))),l=M(()=>`${t.used.toLocaleString()} / ${t.total.toLocaleString()} tokens · ${z(i)}% of context window`);var u=Vj(),d=F(u),f=F(d);J(f,`stroke-width`,3);var p=L(f);J(p,`stroke-width`,3),D(d);var m=L(d,2),h=F(m);D(m),D(u),R((e,t)=>{J(u,`title`,z(l)),J(u,`aria-label`,z(l)),J(d,`width`,n()),J(d,`height`,n()),J(d,`viewBox`,`0 0 ${n()} ${n()}`),J(f,`cx`,n()/2),J(f,`cy`,n()/2),J(f,`r`,z(o)),J(p,`cx`,n()/2),J(p,`cy`,n()/2),J(p,`r`,z(o)),J(p,`stroke-dasharray`,z(s)),J(p,`stroke-dashoffset`,z(c)),q(p,0,e),q(m,1,t),U(h,`${z(i)??``}%`)},[()=>K($(`transition-all duration-300`,z(a).arc)),()=>K($(`font-mono text-[11px] tabular-nums`,z(a).label))]),H(e,u),at()}var Uj=V(`<span><!> </span>`),Wj=V(`<span class="group inline-flex items-center gap-0.5"><span class="font-mono text-fg"> </span> <!></span>`),Gj=V(`<button type="button" class="font-mono text-[11px] text-accent hover:underline cursor-pointer" title="Open trace in waterfall"> </button>`),Kj=V(`<span class="font-mono text-[11px] text-fg-subtle"> </span>`),qj=V(`<span class="text-fg-subtle font-mono text-xs"> </span>`),Jj=V(`<span class="inline-flex items-center gap-1 font-mono text-xs" title="Streaming: time to first chunk · output throughput"><!> </span>`),Yj=V(`<div><!> <!> <!> <!> <span class="text-fg-subtle"> </span> <span class="group inline-flex items-center gap-0.5"><!> <!></span> <!> <span class="ml-auto flex items-center gap-3 text-fg-muted"><!> <span class="inline-flex items-center gap-1" title="Latency"><!> </span> <span class="inline-flex items-center gap-1 font-mono text-xs" title="Tokens in (cached) → out (reasoning)"><!> <span class="text-fg-subtle">→</span> </span> <!> <span><!> </span></span></div>`);function Xj(e,t){it(t,!0);let n={openai:`bg-emerald-500/15 text-emerald-600 border-emerald-500/30`,anthropic:`bg-orange-500/15 text-orange-600 border-orange-500/30`,google:`bg-blue-500/15 text-blue-600 border-blue-500/30`,mistral:`bg-fuchsia-500/15 text-fuchsia-600 border-fuchsia-500/30`,groq:`bg-amber-500/15 text-amber-600 border-amber-500/30`,deepseek:`bg-cyan-500/15 text-cyan-600 border-cyan-500/30`},r=M(()=>n[t.span.provider]??`bg-subtle text-fg-muted border-line`),i=M(()=>ad(t.span.endMs-t.span.startMs)),a=M(()=>kj(t.span.usage.inputTokens,t.span.usage.cacheReadInputTokens)),o=M(()=>Aj(t.span.usage.outputTokens,t.span.usage.reasoningOutputTokens)),s=M(()=>Bj(t.span.provider,t.span.responseModel??t.span.requestModel)),c=M(()=>z(s)!=null&&t.span.usage.inputTokens!=null),l=M(()=>[[`temp`,t.span.params.temperature],[`top_p`,t.span.params.topP],[`max`,t.span.params.maxTokens]].filter(([,e])=>e!==void 0).map(([e,t])=>`${e} ${t}`).join(` · `)),u=M(()=>{let e=t.span.streaming;if(!e)return null;let n=[];return e.timeToFirstChunkS!==void 0&&n.push(`TTFC ${Mj(e.timeToFirstChunkS)}`),e.outputTokensPerSecond!==void 0&&n.push(jj(e.outputTokensPerSecond)),n.length>0?n.join(` · `):null}),d=M(()=>t.span.cost?.source===`table`||t.span.cost?.source===`reported`),f=`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-xs font-medium`,p=`bg-amber-500/15 text-amber-600 border-amber-500/30`,m=M(()=>t.span.provider===`unknown`&&t.span.agent?.name?null:t.span.provider),h=M(()=>t.span.responseModel??t.span.requestModel),g=M(()=>t.span.agent?.name&&(t.span.provider===`unknown`||z(h)===`unknown`));var _=Yj(),v=F(_),y=e=>{var n=Uj(),r=F(n);lp(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),U(i,` agent: ${t.span.agent.name??``}`)},[()=>K($(f,`bg-violet-500/15 text-violet-600 border-violet-500/30`))]),H(e,n)},b=e=>{var t=Uj(),n=F(t);Vp(n,{size:12});var i=L(n);D(t),R(e=>{q(t,1,e),U(i,` ${z(m)??``}`)},[()=>K($(f,z(r)))]),H(e,t)};W(v,e=>{z(g)?e(y):e(b,-1)});var x=L(v,2),S=e=>{var n=Uj(),r=F(n);kh(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),J(n,`title`,t.span.guard.message??(t.span.guard.stopped?`Guard stopped the run`:`Guard warning`)),U(i,` guard${t.span.guard.rule?`: ${t.span.guard.rule}`:``}`)},[()=>K($(f,t.span.guard.stopped||t.span.guard.action===`stop`?`bg-red-500/15 text-red-600 border-red-500/30`:p))]),H(e,n)};W(x,e=>{t.span.guard&&e(S)});var C=L(x,2),w=e=>{var n=Uj(),r=F(n);Gh(r,{size:12});var i=L(r);D(n),R((e,r)=>{q(n,1,e),J(n,`title`,r),U(i,` ${t.span.warnings.length??``} warning${t.span.warnings.length===1?``:`s`}`)},[()=>K($(f,p)),()=>t.span.warnings.map(e=>e.message??e.setting??e.type).filter(Boolean).join(`
16
- `)]),H(e,n)};W(C,e=>{t.span.warnings&&t.span.warnings.length>0&&e(w)});var T=L(C,2),ee=e=>{var t=Wj(),n=F(t),r=F(n,!0);D(n),Q_(L(n,2),{get value(){return z(h)},label:`Copy model name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(t),R(()=>U(r,z(h))),H(e,t)};W(T,e=>{z(h)!==`unknown`&&e(ee)});var te=L(T,2),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re),ae=e=>{var n=Gj(),r=F(n);D(n),R(e=>U(r,`trace ${e??``}…`),[()=>t.span.traceId.slice(0,8)]),B(`click`,n,function(...e){t.onOpenTrace?.apply(this,e)}),H(e,n)},oe=e=>{var n=Kj(),r=F(n);D(n),R(e=>{J(n,`title`,t.span.traceId),U(r,`trace ${e??``}…`)},[()=>t.span.traceId.slice(0,8)]),H(e,n)};W(ie,e=>{t.onOpenTrace?e(ae):e(oe,-1)}),Q_(L(ie,2),{get value(){return t.span.traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(re);var se=L(re,2),ce=e=>{var t=qj(),n=F(t,!0);D(t),R(()=>U(n,z(l))),H(e,t)};W(se,e=>{z(l)&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=Jj(),n=F(t);dm(n,{size:12});var r=L(n);D(t),R(()=>U(r,` ${z(u)??``}`)),H(e,t)};W(E,e=>{z(u)&&e(ue)});var de=L(E,2),fe=F(de);Np(fe,{size:12});var pe=L(fe);D(de);var me=L(de,2),he=F(me);xm(he,{size:12});var ge=L(he),_e=L(ge,2);D(me);var ve=L(me,2),ye=e=>{{let n=M(()=>t.span.usage.inputTokens??0),r=M(()=>z(s)??0);Hj(e,{get used(){return z(n)},get total(){return z(r)}})}};W(ve,e=>{z(c)&&e(ye)});var be=L(ve,2),xe=F(be);Lp(xe,{size:12});var Se=L(xe);D(be),D(le),D(_),R((e,n,r)=>{q(_,1,e),U(ne,t.span.operation),U(pe,` ${z(i)??``}`),U(ge,` ${z(a)??``} `),U(_e,` ${z(o)??``}`),q(be,1,n),J(be,`title`,t.span.cost?.source===`reported`?`Reported cost (gen_ai.usage.cost.usd)`:t.span.cost?.source===`table`?`Estimated cost`:`No price for ${t.span.provider}/${t.span.requestModel}`),U(Se,` ${r??``}`)},[()=>K($(`flex items-center gap-3 flex-wrap`,`px-3 py-2 border-b border-line`,`text-sm`)),()=>K($(`inline-flex items-center gap-1`,z(d)?`text-fg`:`text-fg-subtle`)),()=>Oj(t.span.cost?.total,z(d))]),H(e,_),at()}ea([`click`]);function Zj(e){if(!e)return``;if(/[\s/:.]/.test(e))return e;let t=e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).trim();return!t.includes(` `)&&t===e?e.charAt(0).toUpperCase()+e.slice(1):t.split(` `).filter(Boolean).map(e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function Qj(e){if(e===void 0)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var $j=V(`<div> </div> <pre> </pre>`,1);function eM(e,t){it(t,!0);let n=Z(t,`tone`,3,`neutral`);var r=$j(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,n,r)=>{q(i,1,e),U(a,t.label),q(o,1,n),U(s,r)},[()=>K($(`text-[10px] font-medium uppercase tracking-wider mb-1`,n()===`positive`?`text-success`:`text-fg-subtle`)),()=>K($(`text-xs p-2 rounded overflow-x-auto whitespace-pre-wrap`,n()===`positive`?`bg-surface border border-success-border text-fg`:`bg-subtle border border-line text-fg`)),()=>Qj(t.value)]),H(e,r),at()}var tM=V(`<span class="font-mono text-[11px] text-violet-600/70 truncate"> </span>`),nM=V(`<span class="ml-auto text-[10px] uppercase tracking-wide text-fg-subtle">no result</span>`),rM=V(`<div class="px-3 py-2 border-t border-emerald-500/30 bg-emerald-500/15"><!></div>`),iM=V(`<div class="px-3 py-1.5 border-t border-line-subtle bg-subtle/60 text-[10px] font-mono text-fg-subtle"> </div>`),aM=V(`<div class="px-3 py-2 border-t border-violet-500/30 bg-surface"><!></div> <!> <!>`,1),oM=V(`<div class="mt-2 border border-violet-500/30 rounded-md overflow-hidden"><button type="button"><!> <!> <span class="font-mono font-medium text-violet-600"> </span> <!> <!></button> <!></div>`);function sM(e,t){it(t,!0);let n=M(()=>Zj(t.call.name)),r=M(()=>z(n)&&z(n)!==t.call.name?z(n):void 0),i=N(!1);function a(e){if(typeof e!=`object`||!e||Array.isArray(e))return``;let t=Object.entries(e);return t.length===0?``:t.slice(0,3).map(([e,t])=>`${e}: ${typeof t==`string`?`"${t.length>20?t.slice(0,20)+`…`:t}"`:t===null?`null`:typeof t==`object`?`…`:String(t)}`).join(`, `)}let o=M(()=>typeof t.call.arguments==`string`?(()=>{try{return JSON.parse(t.call.arguments)}catch{return t.call.arguments}})():t.call.arguments),s=M(()=>t.call.result),c=M(()=>a(z(o)));var l=oM(),u=F(l),d=F(u);{let e=M(()=>$(`text-violet-600 transition-transform shrink-0`,z(i)&&`rotate-90`));Dp(d,{size:12,get class(){return z(e)}})}var f=L(d,2);tg(f,{size:12,class:`text-violet-600 shrink-0`});var p=L(f,2),m=F(p,!0);D(p);var h=L(p,2),g=e=>{var t=tM(),n=F(t);D(t),R(()=>U(n,`(${z(c)??``})`)),H(e,t)};W(h,e=>{!z(i)&&z(c)&&e(g)});var _=L(h,2),v=e=>{H(e,nM())};W(_,e=>{!z(i)&&z(s)===void 0&&e(v)}),D(u);var y=L(u,2),b=e=>{var n=aM(),r=I(n);eM(F(r),{label:`Input`,get value(){return z(o)}}),D(r);var i=L(r,2),a=e=>{var t=rM();eM(F(t),{label:`Output`,get value(){return z(s)},tone:`positive`}),D(t),H(e,t)};W(i,e=>{z(s)!==void 0&&e(a)});var c=L(i,2),l=e=>{var n=iM(),r=F(n);D(n),R(()=>U(r,`id: ${t.call.id??``}`)),H(e,n)};W(c,e=>{t.call.id&&e(l)}),H(e,n)};W(y,e=>{z(i)&&e(b)}),D(l),R(e=>{q(u,1,e),J(p,`title`,z(r)),U(m,t.call.name)},[()=>K($(`w-full px-2.5 py-1.5 flex items-center gap-1.5 text-left`,`text-xs bg-violet-500/15 hover:bg-violet-500/25 transition-colors`))]),B(`click`,u,()=>P(i,!z(i))),H(e,l),at()}ea([`click`]);var cM=(e,t=p)=>{var n=la(),r=I(n),i=e=>{var n=dM(),r=F(n,!0);D(n),R(()=>U(r,t().text)),H(e,n)},a=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[image · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},o=e=>{var n=fM(),r=F(n);D(n),R(()=>U(r,`[audio · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},s=e=>{var n=pM(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(()=>{U(r,`Content stored externally (${t().direction??``}). Reference: `),U(a,t().ref)}),H(e,n)},c=e=>{let n=M(()=>JSON.stringify(t().value,null,2));P_(e,{get content(){return z(n)},children:(e,t)=>{var r=mM(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}})};W(r,e=>{t().kind===`text`?e(i):t().kind===`image`?e(a,1):t().kind===`audio`?e(o,2):t().kind===`ref`?e(s,3):e(c,-1)}),H(e,n)},lM=(e,t=p)=>{var n=SM(),r=F(n);tg(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=vM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.fromAgent)),H(e,n)};W(a,e=>{t().handoff?.fromAgent&&e(o)});var s=L(a,2),c=e=>{var n=yM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.toAgent)),H(e,n)};W(s,e=>{t().handoff?.toAgent&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)});var d=L(l,2),f=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(d,e=>{t().agent?.name&&e(f)}),D(i),D(n),H(e,n)},uM=(e,t=p)=>{var n=wM(),r=F(n);lp(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=xM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(a,e=>{t().agent?.name&&e(o)});var s=L(a,2),c=e=>{var n=CM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.description)),H(e,n)};W(s,e=>{t().agent?.description&&e(c)});var l=L(s,2),u=e=>{var n=bM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)}),D(i),Ke(2),D(n),H(e,n)},dM=V(`<p class="whitespace-pre-wrap leading-relaxed text-fg text-sm"> </p>`),fM=V(`<div class="text-xs text-fg-subtle italic"> </div>`),pM=V(`<div class="text-xs text-fg-muted italic"> <code class="not-italic text-fg"> </code></div>`),mM=V(`<pre class="text-xs bg-code text-fg p-2 rounded overflow-x-auto"> </pre>`),hM=V(`<span class="text-[10px] text-fg-subtle"> </span>`),gM=V(`<span class="text-[10px] font-mono text-fg-subtle"> </span>`),_M=V(`<div><div class="flex items-center gap-1.5 mb-1.5"><span><!> </span> <!> <!> <!></div> <div class="space-y-2"></div> <!></div>`),vM=V(`<div class="text-fg-subtle">from</div> <div class="font-mono"> </div>`,1),yM=V(`<div class="text-fg-subtle">to</div> <div class="font-mono"> </div>`,1),bM=V(`<div class="text-fg-subtle">conversation</div> <div class="font-mono text-xs text-fg-muted truncate"> </div>`,1),xM=V(`<div class="text-fg-subtle">agent</div> <div class="font-mono"> </div>`,1),SM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent handoff</div> <div class="grid grid-cols-[80px_1fr] gap-y-2 text-fg-muted"><!> <!> <!> <!></div></div>`),CM=V(`<div class="text-fg-subtle">description</div> <div> </div>`,1),wM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent run</div> <div class="grid grid-cols-[100px_1fr] gap-y-2 text-fg-muted"><!> <!> <!></div> <p class="text-xs text-fg-subtle italic">Agent-run spans aggregate child LLM calls. Open child spans for
17
- transcripts.</p></div>`),TM=V(`<div class="p-4 text-sm text-fg-subtle italic">No conversation payload on this span. Enable content capture (<code class="text-xs">OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true</code>) in your instrumentation to see prompts and completions.</div>`),EM=V(`<div class="p-3 space-y-2"></div>`);function DM(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>i[t().role]??i.user),a=M(()=>z(n).icon);var o=_M(),s=F(o),c=F(s),l=F(c);Ra(l,()=>z(a),(e,t)=>{t(e,{size:10})});var u=L(l);D(c);var d=L(c,2),f=e=>{var n=hM(),r=F(n);D(n),R(()=>U(r,`finish: ${t().finishReason??``}`)),H(e,n)};W(d,e=>{t().finishReason&&e(f)});var m=L(d,2),h=e=>{var n=gM(),r=F(n);D(n),R(()=>U(r,`tool_call_id=${t().toolCallId??``}`)),H(e,n)};W(m,e=>{t().toolCallId&&e(h)});var g=L(m,2);{let e=M(()=>r(t()));Q_(g,{get value(){return z(e)},label:`Copy message`,class:`ml-auto opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(s);var _=L(s,2);G(_,20,()=>t().parts,e=>e,(e,t)=>{cM(e,()=>t)}),D(_),G(L(_,2),16,()=>t().toolCalls??[],e=>e,(e,t)=>{sM(e,{get call(){return t}})}),D(o),R((e,t)=>{q(o,1,e),q(c,1,t),U(u,` ${z(n).label??``}`)},[()=>K($(`group border rounded-lg px-3 py-2`,z(n).wrap)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5`,`rounded text-[10px] font-medium uppercase tracking-wide`,z(n).chip))]),H(e,o)};function r(e){let t=e.parts.map(e=>e.kind===`text`?e.text:e.kind===`ref`?`[ref:${e.direction}] ${e.ref}`:e.kind===`image`||e.kind===`audio`?`[${e.kind} · ${e.mediaType} · ${e.dataRef}]`:JSON.stringify(e.value,null,2));for(let n of e.toolCalls??[])t.push(JSON.stringify({tool:n.name,...n},null,2));return t.join(`
14
+ connect on <span class="font-mono">:4317</span>.</p></div>`),fj=V(`<span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-red-600"><!> </span>`),pj=V(`<span class="px-2 py-1 bg-subtle rounded-md text-fg-muted font-mono"> </span>`),mj=V(`<button><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg truncate"> </span> <span class="text-[11px] text-fg-muted"> </span></div> <div class="flex items-center gap-2 mt-1 text-[11px] text-fg-muted"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span></div></button>`),hj=V(`<span class="text-[11px] text-fg-muted"> </span>`),gj=V(`<span class="text-amber-500" title="includes estimated cost">~</span>`),_j=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg-muted flex items-center gap-1 border border-line" title="Context was replaced by a summary — inferred from token counts, not reported by the agent"><!> </span>`),vj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span>`),yj=V(`<span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span>`),bj=V(`<span class="text-red-500"> </span>`),xj=V(`<span> </span>`),Sj=V(`<span title="Context this tool's results added"> </span>`),Cj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> <!> <!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!> <!></span></div>`),wj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Tools &amp; MCP</div> <div class="flex flex-col gap-1"></div></div>`),Tj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span></span> <!> <!></span></div>`),Ej=V(`<span class="text-fg-muted flex-shrink-0"> </span>`),Dj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg truncate flex items-center gap-1.5"><!> </span> <!></div>`),Oj=V(`<span class="text-amber-600"> </span>`),kj=V(`<div class="flex items-center justify-between text-xs"><span class="font-mono text-fg flex items-center gap-1.5"><!> hooks</span> <span class="text-fg-muted flex items-center gap-2 flex-shrink-0"><span> </span> <!> <!></span></div>`),Aj=V(`<div class="p-3 border-b border-line"><div class="text-[11px] font-semibold text-fg-muted uppercase mb-2">Runtime environment</div> <div class="flex flex-col gap-1"><!> <!> <!></div></div>`),jj=V(`<!>Hide prompts`,1),Mj=V(`<!>Reveal prompts`,1),Nj=V(`<button type="button"> <span class="opacity-70"> </span></button>`),Pj=V(`<div class="flex flex-wrap items-center gap-1 mb-2"><!> <!></div>`),Fj=V(`<div class="py-3 text-center text-xs text-fg-subtle">No events match.</div>`),Ij=V(`<div><!> <span class="whitespace-nowrap"> </span> <span></span></div>`),Lj=V(`<!> <div class="flex items-center gap-2 text-xs py-1 border-b border-line/50"><span class="text-fg-muted tabular-nums flex-shrink-0"> </span> <span> </span> <span class="text-fg truncate"> </span> <span class="text-fg-muted truncate ml-auto text-right"> </span></div>`,1),Rj=V(`<div class="p-3 border-b border-line"><div class="flex items-center justify-between gap-2"><span class="font-mono text-xs text-fg"> </span> <!></div> <div class="flex flex-wrap gap-2 mt-2 text-[11px]"><span class="px-2 py-0.5 bg-subtle rounded text-fg"> <!></span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <span class="px-2 py-0.5 bg-subtle rounded text-fg"> </span> <!> <span class="px-2 py-0.5 bg-subtle rounded text-fg flex items-center gap-1"><!> </span> <!> <!></div></div> <!> <!> <div class="p-3"><div class="flex items-center justify-between mb-2"><div class="text-[11px] font-semibold text-fg-muted uppercase">Timeline</div> <button class="flex items-center gap-1 text-[11px] text-fg-muted hover:text-fg" title="Reveal / hide captured prompt text"><!></button></div> <!> <div class="flex flex-col gap-1"><!> <!></div></div>`,1),zj=V(`<div class="flex flex-wrap gap-2 p-3 border-b border-line text-xs"><span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> </span> <span class="flex items-center gap-1 px-2 py-1 bg-subtle rounded-md text-fg"><!> <!> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex-1 flex min-h-0"><div class="w-64 flex-shrink-0 overflow-y-auto border-r border-line"></div> <div class="flex-1 overflow-y-auto min-w-0"><!></div></div>`,1),Bj=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between p-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Agents <!></h3></div> <!></div>`);function Vj(e,t){it(t,!0);let n=M(()=>Zl.value),r=M(()=>$l.value),i=M(()=>Ql.value),a=N(!1);function o(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function c(e){return Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1])}function l(e){return Object.entries(e).sort((e,t)=>t[1].costUsd-e[1].costUsd)}function u(e){switch(e.type){case`api_request`:return e.model??`api request`;case`api_error`:return`api error`;case`tool_result`:case`tool_decision`:return e.tool?.name??`tool`;case`user_prompt`:return`prompt`;case`mcp_connection`:return e.mcpServerName??`mcp server`;case`plugin_loaded`:return e.pluginName??`plugin`;case`hook_execution`:return e.hookName??`hook`;default:return e.rawEventName}}function d(e){let t=[];if(e.type===`api_request`){e.costUsd!==void 0&&t.push(o(e.costUsd));let n=(e.inputTokens??0)+(e.outputTokens??0);n>0&&t.push(`${cd(n)} tok`),e.durationMs&&t.push(od(e.durationMs)),e.effort&&t.push(e.effort),e.speed&&t.push(e.speed),e.skillName&&t.push(`skill:${e.skillName}`),e.agentName&&t.push(`agent:${e.agentName}`)}else e.type===`tool_result`?(e.tool?.isMcp&&e.tool.mcpServer?t.push(`mcp:${e.tool.mcpServer}`):e.tool&&t.push(e.tool.category),e.success===!1&&t.push(`failed`),e.durationMs&&t.push(od(e.durationMs))):e.type===`tool_decision`?e.tool&&t.push(e.tool.category):e.type===`user_prompt`?e.promptText?t.push(z(a)?fd(e.promptText):`${e.promptLength??e.promptText.length} chars (hidden)`):e.promptLength!==void 0&&t.push(`${e.promptLength} chars`):e.type===`api_error`?(e.statusCode&&t.push(String(e.statusCode)),e.errorMessage&&t.push(e.errorMessage)):e.type===`mcp_connection`?(e.mcpStatus&&t.push(e.mcpStatus),e.mcpTransport&&t.push(e.mcpTransport),e.durationMs&&t.push(od(e.durationMs))):e.type===`plugin_loaded`?e.pluginVersion&&t.push(`v${e.pluginVersion}`):e.type===`hook_execution`&&(e.hookBlocked&&t.push(`${e.hookBlocked} blocked`),e.hookErrored&&t.push(`${e.hookErrored} errored`));return t.join(` · `)}function f(e){return e.rollup.inputTokens+e.rollup.outputTokens}let p=N(_r(new Set)),m=N(``),h=M(()=>{let e=new Map;for(let t of z(r)?.timeline??[])e.set(t.type,(e.get(t.type)??0)+1);return[...e].sort((e,t)=>t[1]-e[1])});function g(e){let t=new Set(z(p));t.delete(e)||t.add(e),P(p,t,!0)}let v=M(()=>{if(!z(r))return[];let e=new Set(z(h).map(([e])=>e)),t=[...z(p)].filter(t=>e.has(t)),n=z(m).trim().toLowerCase();return[...z(r).timeline].reverse().filter(e=>(t.length===0||t.includes(e.type))&&(!n||e.type.includes(n)||`${u(e)} ${d(e)}`.toLowerCase().includes(n))).slice(0,200)}),y=M(()=>z(r)?Object.values(z(r).rollup.tools).sort((e,t)=>t.count-e.count):[]),b=M(()=>z(r)?Object.values(z(r).rollup.mcpConnections):[]),x=M(()=>z(r)?Object.values(z(r).rollup.plugins):[]),S=M(()=>z(r)?.rollup.hooks),C=M(()=>z(r)?.rollup.compactions??[]),w=M(()=>new Map(z(C).map(e=>[e.atEventId,e]))),T=M(()=>z(C).reduce((e,t)=>e+t.droppedTokens,0)),ee=M(()=>z(b).length>0||z(x).length>0||z(S)!==void 0&&z(S).runs>0);var te=Bj(),ne=F(te),re=F(ne),ie=F(re);up(ie,{size:16,class:`text-violet-500`});var ae=L(ie,2),oe=e=>{var t=uj(),r=F(t,!0);D(t),R(()=>U(r,z(n).length)),H(e,t)};W(ae,e=>{z(n).length>0&&e(oe)}),D(re),D(ne);var se=L(ne,2),ce=e=>{var t=dj(),n=F(t);up(n,{size:40,class:`text-fg-muted opacity-40`});var r=L(n,4),i=F(r);Bh(i,{size:13,class:`text-fg-muted flex-shrink-0`});var a=L(i,2);a.textContent=`npx autotel-devtools claude`,mv(L(a,2),{value:`npx autotel-devtools claude`,label:`Copy launch command`}),D(r),Ke(2),D(t),H(e,t)},le=e=>{var t=zj(),te=I(t),ne=F(te),re=F(ne);Kp(re,{size:12,class:`text-emerald-500`});var ie=L(re,1,!0);D(ne);var ae=L(ne,2),oe=F(ae);Rp(oe,{size:12,class:`text-amber-500`});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Sp(le,{size:12,class:`text-emerald-500`});var E=L(le),ue=L(E);ig(ue,{size:12,class:`text-red-500 ml-1`});var de=L(ue,1,!0);D(ce);var fe=L(ce,2),pe=e=>{var t=fj(),n=F(t);Kh(n,{size:12});var r=L(n);D(t),R(()=>U(r,`${z(i).apiErrors??``} errors`)),H(e,t)};W(fe,e=>{z(i).apiErrors>0&&e(pe)});var me=L(fe,2);G(me,17,()=>c(z(i).toolCategories),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];cj(e,()=>ng,()=>`${r()} ${i()}`,()=>`text-fg-muted`)});var he=L(me,2);G(he,17,()=>c(z(i).mcpServers),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];cj(e,()=>Eh,()=>`mcp:${r()} ${i()}`,()=>`text-sky-600`)});var ge=L(he,2);G(ge,17,()=>c(z(i).subAgents),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];cj(e,()=>up,()=>`${r()} ${i()}`,()=>`text-violet-600`)});var _e=L(ge,2);G(_e,17,()=>c(z(i).skills),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];cj(e,()=>Ph,()=>`${r()} ${i()}`,()=>`text-fuchsia-600`)});var ve=L(_e,2);G(ve,17,()=>l(z(i).byEffort),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);cj(e,()=>fm,()=>z(t),()=>`text-amber-600`)}});var ye=L(ve,2);G(ye,17,()=>l(z(i).bySkill),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);cj(e,()=>Ph,()=>z(t),()=>`text-fuchsia-600`)}});var be=L(ye,2);G(be,17,()=>l(z(i).byAgent),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];{let t=M(()=>`${r()} ${o(i().costUsd)}`);cj(e,()=>up,()=>z(t),()=>`text-violet-600`)}}),G(L(be,2),17,()=>l(z(i).byModel),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=pj(),s=F(a);D(a),R(e=>U(s,`${r()??``} ×${i().requests??``} ${e??``}`),[()=>o(i().costUsd)]),H(e,a)}),D(te);var xe=L(te,2),Se=F(xe);G(Se,21,()=>z(n),e=>e.id,(e,t)=>{var n=mj(),i=F(n),a=F(i),c=F(a,!0);D(a);var l=L(a,2),u=F(l,!0);D(l),D(i);var d=L(i,2),p=F(d),m=F(p,!0);D(p);var h=L(p,4),g=F(h);D(h);var _=L(h,4),v=F(_,!0);D(_),D(d),D(n),R((e,i,a,o)=>{q(n,1,`w-full text-left px-3 py-2.5 border-b border-line hover:bg-subtle transition-colors ${z(r)?.id===z(t).id?`bg-subtle`:``}`),U(c,e),U(u,z(t).agent),U(m,i),U(g,`${a??``} tok`),U(v,o)},[()=>s(z(t).id),()=>o(z(t).rollup.costUsd),()=>cd(f(z(t))),()=>od(z(t).lastSeen-z(t).firstSeen)]),B(`click`,n,()=>eu(z(t).id)),H(e,n)}),D(Se);var Ce=L(Se,2),we=F(Ce),Te=e=>{var t=Rj(),n=I(t),i=F(n),s=F(i),c=F(s,!0);D(s);var l=L(s,2),f=e=>{var t=hj(),n=F(t);D(t),R(()=>U(n,`${z(r).terminal??``??``}${z(r).appVersion?` · v${z(r).appVersion}`:``}`)),H(e,t)};W(l,e=>{(z(r).terminal||z(r).appVersion)&&e(f)}),D(i);var te=L(i,2),ne=F(te),re=F(ne),ie=L(re),ae=e=>{H(e,gj())};W(ie,e=>{z(r).rollup.costEstimatedUsd>0&&e(ae)}),D(ne);var oe=L(ne,2),se=F(oe);D(oe);var ce=L(oe,2),le=F(ce);D(ce);var E=L(ce,2),ue=e=>{var t=_j(),n=F(t);Sh(n,{size:11});var r=L(n);D(t),R(e=>U(r,`${z(C).length??``} context reset${z(C).length>1?`s`:``} · ${e??``} tokens`),[()=>cd(z(T))]),H(e,t)};W(E,e=>{z(C).length>0&&e(ue)});var de=L(E,2),fe=F(de);Rm(fe,{size:11});var pe=L(fe,1,!0);D(de);var me=L(de,2),he=e=>{var t=vj(),n=F(t);mm(n,{size:11});var i=L(n);D(t),R(()=>U(i,`+${z(r).rollup.linesAdded??``}/-${z(r).rollup.linesRemoved??``}`)),H(e,t)};W(me,e=>{(z(r).rollup.linesAdded||z(r).rollup.linesRemoved)&&e(he)});var ge=L(me,2),_e=e=>{var t=yj(),n=F(t);D(t),R(()=>U(n,`${z(r).rollup.commits??``} commits`)),H(e,t)};W(ge,e=>{z(r).rollup.commits&&e(_e)}),D(te),D(n);var ve=L(n,2),ye=e=>{var t=wj(),n=L(F(t),2);G(n,21,()=>z(y),e=>e.name,(e,t)=>{var n=Cj(),r=F(n),i=F(r),a=e=>{Eh(e,{size:11,class:`text-sky-500`})};W(i,e=>{z(t).isMcp&&e(a)});var o=L(i,2),s=e=>{up(e,{size:11,class:`text-violet-500`})};W(o,e=>{z(t).category===`subagent`&&e(s)});var c=L(o,2),l=e=>{Ph(e,{size:11,class:`text-fuchsia-500`})};W(c,e=>{z(t).category===`skill`&&e(l)});var u=L(c);D(r);var d=L(r,2),f=F(d),p=F(f);D(f);var m=L(f,2),h=e=>{var n=bj(),r=F(n);D(n),R(()=>U(r,`${z(t).failures??``} fail`)),H(e,n)};W(m,e=>{z(t).failures>0&&e(h)});var g=L(m,2),_=e=>{var n=xj(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>od(z(t).totalDurationMs)]),H(e,n)};W(g,e=>{z(t).totalDurationMs>0&&e(_)});var v=L(g,2),y=e=>{var n=Sj(),r=F(n);D(n),R(e=>U(r,`+${e??``} tok`),[()=>cd(z(t).contextTokens)]),H(e,n)};W(v,e=>{z(t).contextTokens>0&&e(y)}),D(d),D(n),R(()=>{U(u,` ${z(t).name??``}`),U(p,`×${z(t).count??``}`)}),H(e,n)}),D(n),D(t),H(e,t)};W(ve,e=>{z(y).length>0&&e(ye)});var be=L(ve,2),xe=e=>{var t=Aj(),n=L(F(t),2),r=F(n);G(r,17,()=>z(b),e=>e.name,(e,t)=>{var n=Tj(),r=F(n),i=F(r);ch(i,{size:11,class:`text-sky-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=F(o),c=L(s,2),l=e=>{var n=xj(),r=F(n,!0);D(n),R(()=>U(r,z(t).transport)),H(e,n)};W(c,e=>{z(t).transport&&e(l)});var u=L(c,2),d=e=>{var n=xj(),r=F(n);D(n),R(()=>U(r,`${z(t).connects??``}↑/${z(t).disconnects??``}↓`)),H(e,n)};W(u,e=>{z(t).disconnects>0&&e(d)}),D(o),D(n),R(()=>{U(a,` ${z(t).name??``}`),q(s,1,`w-1.5 h-1.5 rounded-full ${z(t).connected?`bg-emerald-500`:`bg-fg-subtle`}`),J(s,`title`,z(t).connected?`connected`:`disconnected`)}),H(e,n)});var i=L(r,2);G(i,17,()=>z(x),e=>e.name,(e,t)=>{var n=Dj(),r=F(n),i=F(r);cp(i,{size:11,class:`text-fuchsia-500 flex-shrink-0`});var a=L(i);D(r);var o=L(r,2),s=e=>{var n=Ej(),r=F(n);D(n),R(()=>U(r,`v${z(t).version??``}`)),H(e,n)};W(o,e=>{z(t).version&&e(s)}),D(n),R(()=>U(a,` ${z(t).name??``}`)),H(e,n)});var a=L(i,2),o=e=>{var t=kj(),n=F(t);Qh(F(n),{size:11,class:`text-amber-500 flex-shrink-0`}),Ke(),D(n);var r=L(n,2),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var t=Oj(),n=F(t);D(t),R(()=>U(n,`${z(S).blocked??``} blocked`)),H(e,t)};W(o,e=>{z(S).blocked>0&&e(s)});var c=L(o,2),l=e=>{var t=bj(),n=F(t);D(t),R(()=>U(n,`${z(S).errored??``} err`)),H(e,t)};W(c,e=>{z(S).errored>0&&e(l)}),D(r),D(t),R(()=>U(a,`×${z(S).runs??``}`)),H(e,t)};W(a,e=>{z(S)&&z(S).runs>0&&e(o)}),D(n),D(t),H(e,t)};W(be,e=>{z(ee)&&e(xe)});var Se=L(be,2),Ce=F(Se),we=L(F(Ce),2),Te=F(we),Ee=e=>{var t=jj();Qp(I(t),{size:12}),Ke(),H(e,t)},De=e=>{var t=Mj();em(I(t),{size:12}),Ke(),H(e,t)};W(Te,e=>{z(a)?e(Ee):e(De,-1)}),D(we),D(Ce);var Oe=L(Ce,2),ke=e=>{var t=Pj(),n=F(t),r=e=>{var t=ua();G(I(t),17,()=>z(h),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=Nj(),o=F(a),s=L(o),c=F(s,!0);D(s),D(a),R((e,t)=>{J(a,`aria-pressed`,e),q(a,1,`px-1.5 py-0.5 rounded text-[10px] border transition-colors ${t??``}`),U(o,`${r()??``} `),U(c,i())},[()=>z(p).has(r()),()=>z(p).has(r())?`bg-accent/10 text-accent border-accent/40`:`bg-subtle text-fg-muted border-transparent hover:border-line`]),B(`click`,a,()=>g(r())),H(e,a)}),H(e,t)};W(n,e=>{z(h).length>1&&e(r)}),$_(L(n,2),{placeholder:`Filter events…`,ariaLabel:`Filter timeline events`,class:`relative ml-auto w-44`,inputClass:`border-line focus:border-line py-0.5 text-[11px]`,get value(){return z(m)},set value(e){P(m,e,!0)}}),D(t),H(e,t)};W(Oe,e=>{z(h).length>0&&e(ke)});var Ae=L(Oe,2),je=F(Ae),Me=e=>{H(e,Fj())};W(je,e=>{z(v).length===0&&e(Me)}),G(L(je,2),17,()=>z(v),e=>e.id,(e,t)=>{let n=M(()=>z(w).get(z(t).id));var r=Lj(),i=I(r),a=e=>{var t=Ij(),r=F(t);Sh(r,{size:11,class:`flex-shrink-0`});var i=L(r,2),a=F(i);D(i);var o=L(i,2);D(t),R(e=>{q(t,1,`flex items-center gap-2 my-1 text-[11px] ${z(n).confidence===`likely`?`text-fg-muted`:`text-fg-muted/70`}`),U(a,`${e??``} tokens left the agent's
15
+ context · ${z(n).confidence??``}`),q(o,1,`flex-1 border-t border-dashed ${z(n).confidence===`likely`?`border-line`:`border-line/60`}`)},[()=>cd(z(n).droppedTokens)]),H(e,t)};W(i,e=>{z(n)&&e(a)});var o=L(i,2),s=F(o),c=F(s,!0);D(s);var l=L(s,2),f=F(l,!0);D(l);var p=L(l,2),m=F(p,!0);D(p);var h=L(p,2),g=F(h,!0);D(h),D(o),R((e,n,r)=>{U(c,e),q(l,1,`px-1.5 py-0.5 rounded text-[10px] flex-shrink-0 ${z(t).type===`api_error`?`bg-red-100 text-red-700`:z(t).decision===`reject`?`bg-amber-100 text-amber-700`:`bg-subtle text-fg-muted`}`),U(f,z(t).type),U(m,n),U(g,r)},[()=>sd(z(t).timestamp),()=>u(z(t)),()=>d(z(t))]),H(e,r)}),D(Ae),D(Se),R((e,t,n)=>{U(c,z(r).id),U(re,`${e??``} `),U(se,`${t??``} in / ${n??``} out`),U(le,`${z(r).rollup.apiRequests??``} req`),U(pe,z(r).rollup.prompts)},[()=>o(z(r).rollup.costUsd),()=>cd(z(r).rollup.inputTokens),()=>cd(z(r).rollup.outputTokens)]),B(`click`,we,()=>P(a,!z(a))),H(e,t)};W(we,e=>{z(r)&&e(Te)}),D(Ce),D(xe),R((e,t,n)=>{U(ie,e),U(se,` ${t??``} in / ${n??``} out`),U(E,`${z(i).accepted??``} `),U(de,z(i).rejected)},[()=>o(z(i).costUsd),()=>cd(z(i).inputTokens),()=>cd(z(i).outputTokens)]),H(e,t)};W(se,e=>{z(n).length===0?e(ce):e(le,-1)}),D(te),H(e,te),at()}ea([`click`]);function Hj(e,t){return e==null&&t==null?`—`:`${e??`—`}→${t??`—`}`}function Uj(e,t=!0){return e==null||!t?`—`:e<1e-4?`$${(e*1e6).toFixed(2)}μ`:e<.01?`$${(e*1e3).toFixed(3)}m`:`$${e.toFixed(4)}`}function Wj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} cached)`:String(e)}function Gj(e,t){return e==null?`—`:t&&t>0?`${e} (${t} reasoning)`:String(e)}function Kj(e){return e==null?`—`:`${e>=10?Math.round(e):e.toFixed(1)} tok/s`}function qj(e){return e==null?`—`:e<1?`${Math.round(e*1e3)}ms`:`${e.toFixed(e<10?2:1)}s`}function Jj(e){if(e.length===0)return{label:``,details:``};let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);let n=[...t.keys()],r=e=>{let n=t.get(e)??0;return n>1?`${e} (x${n})`:e},i=n.map(r).join(`, `);return n.length===1?{label:r(n[0]),details:``}:n.length===2?{label:`${r(n[0])}, ${r(n[1])}`,details:i}:{label:`${r(n[0])}, ${r(n[1])}, …`,details:i}}var Yj=new Set([`chat`,`text_completion`,`generate_content`,`embeddings`]),Xj=new Set([`invoke_agent`,`create_agent`]);function Zj(e){return e.operation===`execute_handoff`||e.handoff!=null}function Qj(e){let t=new Set;for(let n of e){let r=n.endMs-n.startMs;for(let i of e){if(i===n)continue;let e=i.endMs-i.startMs;if(i.startMs>=n.startMs&&i.endMs<=n.endMs&&e<r){t.add(n.spanId);break}}}return t}function $j(e){let t={spanCount:e.length,modelCalls:0,toolCalls:0,agentInvocations:0,handoffs:0,errors:0,inputTokens:0,outputTokens:0,totalTokens:0,reasoningTokens:0,cachedTokens:0,totalCostUsd:0,costKnown:!1,costComplete:!0,durationMs:0,models:[],providers:[]};if(e.length===0)return t.costComplete=!1,t;let n=Qj(e),r=1/0,i=-1/0,a=0,o=0,s=new Set,c=new Set,l=new Set,u=0;for(let d of e){r=Math.min(r,d.startMs),i=Math.max(i,d.endMs),d.status===`error`&&t.errors++;let e=d.operation,f=n.has(d.spanId);if(e===`execute_tool`&&!f&&a++,!f)for(let e of d.toolCalls)e.id?l.add(e.id):u++;if(Xj.has(e)&&t.agentInvocations++,Zj(d)&&t.handoffs++,Yj.has(e)&&!f){t.modelCalls++;let e=d.responseModel??d.requestModel;e&&e!==`unknown`&&s.add(e),d.provider&&d.provider!==`unknown`&&c.add(d.provider);let n=d.usage;t.inputTokens+=n.inputTokens??0,t.outputTokens+=n.outputTokens??0,t.reasoningTokens+=n.reasoningOutputTokens??0,t.cachedTokens+=n.cacheReadInputTokens??0,d.cost&&d.cost.source!==`unknown`?(t.totalCostUsd+=d.cost.total,o++):t.costComplete=!1}}return t.totalTokens=t.inputTokens+t.outputTokens,t.toolCalls=a>0?a:l.size+u,t.costKnown=o>0,t.modelCalls===0&&(t.costComplete=!1),t.durationMs=i>r?i-r:0,t.models=[...s],t.providers=[...c],t}function eM(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId,r=e??`trace:${n.traceId}`,i=t.get(r);i?(i.rows.push(n),i.latest=Math.max(i.latest,n.normalized.startMs)):t.set(r,{key:r,conversationId:e,traceId:n.traceId,rows:[n],latest:n.normalized.startMs})}return[...t.values()].sort((e,t)=>t.latest-e.latest)}function tM(e){let t=e.responseModel??e.requestModel,n=e.provider===`unknown`||t===`unknown`;return e.agent?.name&&n?{kind:`agent`,text:`agent: ${e.agent.name}`}:e.operation===`execute_tool`&&e.tool?.name&&n?{kind:`tool`,text:`tool: ${e.tool.name}`}:{kind:`model`,text:`${e.provider}/${t}`}}var nM=Ps({"openai/gpt-4o":128e3,"openai/gpt-4o-mini":128e3,"openai/gpt-4.1":1047576,"openai/gpt-4-turbo":128e3,"openai/gpt-4":8192,"openai/gpt-3.5-turbo":16385,"openai/o1":2e5,"openai/o3":2e5,"anthropic/claude-opus-4":2e5,"anthropic/claude-sonnet-4":2e5,"anthropic/claude-3-5-sonnet":2e5,"anthropic/claude-3-5-haiku":2e5,"anthropic/claude-3-opus":2e5,"anthropic/claude-3-haiku":2e5,"google/gemini-2.5-pro":1048576,"google/gemini-2.5-flash":1048576,"google/gemini-2.0-flash":1048576,"google/gemini-1.5-pro":2097152,"google/gemini-1.5-flash":1048576,"mistral/mistral-large":128e3,"mistral/mistral-small":32e3,"groq/llama-3.1-70b":131072,"deepseek/deepseek-chat":65536}),rM=V(`<span class="inline-flex items-center gap-1.5"><svg class="flex-shrink-0 -rotate-90" role="img"><circle fill="none" stroke="currentColor" class="text-line"></circle><circle fill="none" stroke="currentColor" stroke-linecap="round"></circle></svg> <span> </span></span>`);function iM(e,t){it(t,!0);let n=Z(t,`size`,3,30),r=M(()=>t.total>0?Math.min(t.used/t.total,1):0),i=M(()=>Math.round(z(r)*100)),a=M(()=>z(r)>=.9?{arc:`text-danger`,label:`text-danger`}:z(r)>=.7?{arc:`text-warning`,label:`text-warning`}:{arc:`text-success`,label:`text-fg-muted`}),o=M(()=>(n()-3)/2),s=M(()=>2*Math.PI*z(o)),c=M(()=>z(s)*(1-z(r))),l=M(()=>`${t.used.toLocaleString()} / ${t.total.toLocaleString()} tokens · ${z(i)}% of context window`);var u=rM(),d=F(u),f=F(d);J(f,`stroke-width`,3);var p=L(f);J(p,`stroke-width`,3),D(d);var m=L(d,2),h=F(m);D(m),D(u),R((e,t)=>{J(u,`title`,z(l)),J(u,`aria-label`,z(l)),J(d,`width`,n()),J(d,`height`,n()),J(d,`viewBox`,`0 0 ${n()} ${n()}`),J(f,`cx`,n()/2),J(f,`cy`,n()/2),J(f,`r`,z(o)),J(p,`cx`,n()/2),J(p,`cy`,n()/2),J(p,`r`,z(o)),J(p,`stroke-dasharray`,z(s)),J(p,`stroke-dashoffset`,z(c)),q(p,0,e),q(m,1,t),U(h,`${z(i)??``}%`)},[()=>K($(`transition-all duration-300`,z(a).arc)),()=>K($(`font-mono text-[11px] tabular-nums`,z(a).label))]),H(e,u),at()}var aM=V(`<span><!> </span>`),oM=V(`<span class="group inline-flex items-center gap-0.5"><span class="font-mono text-fg"> </span> <!></span>`),sM=V(`<button type="button" class="font-mono text-[11px] text-accent hover:underline cursor-pointer" title="Open trace in waterfall"> </button>`),cM=V(`<span class="font-mono text-[11px] text-fg-subtle"> </span>`),lM=V(`<span class="text-fg-subtle font-mono text-xs"> </span>`),uM=V(`<span class="inline-flex items-center gap-1 font-mono text-xs" title="Streaming: time to first chunk · output throughput"><!> </span>`),dM=V(`<span class="inline-flex items-center gap-1 font-mono text-xs" title="Tokens in (cached) → out (reasoning)"><!> <span class="text-fg-subtle">→</span> </span>`),fM=V(`<span class="inline-flex items-center gap-1 text-fg"><!> </span>`),pM=V(`<div><!> <!> <!> <!> <span class="text-fg-subtle"> </span> <span class="group inline-flex items-center gap-0.5"><!> <!></span> <!> <span class="ml-auto flex items-center gap-3 text-fg-muted"><!> <span class="inline-flex items-center gap-1" title="Latency"><!> </span> <!> <!> <!></span></div>`);function mM(e,t){it(t,!0);let n={openai:`bg-emerald-500/15 text-emerald-600 border-emerald-500/30`,anthropic:`bg-orange-500/15 text-orange-600 border-orange-500/30`,google:`bg-blue-500/15 text-blue-600 border-blue-500/30`,mistral:`bg-fuchsia-500/15 text-fuchsia-600 border-fuchsia-500/30`,groq:`bg-amber-500/15 text-amber-600 border-amber-500/30`,deepseek:`bg-cyan-500/15 text-cyan-600 border-cyan-500/30`},r=M(()=>n[t.span.provider]??`bg-subtle text-fg-muted border-line`),i=M(()=>od(t.span.endMs-t.span.startMs)),a=M(()=>Wj(t.span.usage.inputTokens,t.span.usage.cacheReadInputTokens)),o=M(()=>Gj(t.span.usage.outputTokens,t.span.usage.reasoningOutputTokens)),s=M(()=>nM(t.span.provider,t.span.responseModel??t.span.requestModel)),c=M(()=>z(s)!=null&&t.span.usage.inputTokens!=null),l=M(()=>[[`temp`,t.span.params.temperature],[`top_p`,t.span.params.topP],[`max`,t.span.params.maxTokens]].filter(([,e])=>e!==void 0).map(([e,t])=>`${e} ${t}`).join(` · `)),u=M(()=>{let e=t.span.streaming;if(!e)return null;let n=[];return e.timeToFirstChunkS!==void 0&&n.push(`TTFC ${qj(e.timeToFirstChunkS)}`),e.outputTokensPerSecond!==void 0&&n.push(Kj(e.outputTokensPerSecond)),n.length>0?n.join(` · `):null}),d=M(()=>t.span.cost?.source===`table`||t.span.cost?.source===`reported`),f=`inline-flex items-center gap-1 px-2 py-0.5 rounded border text-xs font-medium`,p=`bg-amber-500/15 text-amber-600 border-amber-500/30`,m=M(()=>t.span.responseModel??t.span.requestModel),h=M(()=>tM(t.span));var g=pM(),_=F(g),v=e=>{var t=aM(),n=F(t),r=e=>{up(e,{size:12})},i=e=>{ng(e,{size:12})};W(n,e=>{z(h).kind===`agent`?e(r):e(i,-1)});var a=L(n);D(t),R(e=>{q(t,1,e),U(a,` ${z(h).text??``}`)},[()=>K($(f,`bg-violet-500/15 text-violet-600 border-violet-500/30`))]),H(e,t)},y=e=>{var n=aM(),i=F(n);Hp(i,{size:12});var a=L(i);D(n),R(e=>{q(n,1,e),U(a,` ${t.span.provider??``}`)},[()=>K($(f,z(r)))]),H(e,n)};W(_,e=>{z(h).kind===`model`?e(y,-1):e(v)});var b=L(_,2),x=e=>{var n=aM(),r=F(n);Ah(r,{size:12});var i=L(r);D(n),R(e=>{q(n,1,e),J(n,`title`,t.span.guard.message??(t.span.guard.stopped?`Guard stopped the run`:`Guard warning`)),U(i,` guard${t.span.guard.rule?`: ${t.span.guard.rule}`:``}`)},[()=>K($(f,t.span.guard.stopped||t.span.guard.action===`stop`?`bg-red-500/15 text-red-600 border-red-500/30`:p))]),H(e,n)};W(b,e=>{t.span.guard&&e(x)});var S=L(b,2),C=e=>{var n=aM(),r=F(n);Kh(r,{size:12});var i=L(r);D(n),R((e,r)=>{q(n,1,e),J(n,`title`,r),U(i,` ${t.span.warnings.length??``} warning${t.span.warnings.length===1?``:`s`}`)},[()=>K($(f,p)),()=>t.span.warnings.map(e=>e.message??e.setting??e.type).filter(Boolean).join(`
16
+ `)]),H(e,n)};W(S,e=>{t.span.warnings&&t.span.warnings.length>0&&e(C)});var w=L(S,2),T=e=>{var t=oM(),n=F(t),r=F(n,!0);D(n),mv(L(n,2),{get value(){return z(m)},label:`Copy model name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(t),R(()=>U(r,z(m))),H(e,t)};W(w,e=>{z(m)!==`unknown`&&e(T)});var ee=L(w,2),te=F(ee,!0);D(ee);var ne=L(ee,2),re=F(ne),ie=e=>{var n=sM(),r=F(n);D(n),R(e=>U(r,`trace ${e??``}…`),[()=>t.span.traceId.slice(0,8)]),B(`click`,n,function(...e){t.onOpenTrace?.apply(this,e)}),H(e,n)},ae=e=>{var n=cM(),r=F(n);D(n),R(e=>{J(n,`title`,t.span.traceId),U(r,`trace ${e??``}…`)},[()=>t.span.traceId.slice(0,8)]),H(e,n)};W(re,e=>{t.onOpenTrace?e(ie):e(ae,-1)}),mv(L(re,2),{get value(){return t.span.traceId},label:`Copy trace ID`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(ne);var oe=L(ne,2),se=e=>{var t=lM(),n=F(t,!0);D(t),R(()=>U(n,z(l))),H(e,t)};W(oe,e=>{z(l)&&e(se)});var ce=L(oe,2),le=F(ce),E=e=>{var t=uM(),n=F(t);fm(n,{size:12});var r=L(n);D(t),R(()=>U(r,` ${z(u)??``}`)),H(e,t)};W(le,e=>{z(u)&&e(E)});var ue=L(le,2),de=F(ue);Pp(de,{size:12});var fe=L(de);D(ue);var pe=L(ue,2),me=e=>{var t=dM(),n=F(t);Sm(n,{size:12});var r=L(n),i=L(r,2);D(t),R(()=>{U(r,` ${z(a)??``} `),U(i,` ${z(o)??``}`)}),H(e,t)};W(pe,e=>{(t.span.usage.inputTokens!=null||t.span.usage.outputTokens!=null)&&e(me)});var he=L(pe,2),ge=e=>{{let n=M(()=>t.span.usage.inputTokens??0),r=M(()=>z(s)??0);iM(e,{get used(){return z(n)},get total(){return z(r)}})}};W(he,e=>{z(c)&&e(ge)});var _e=L(he,2),ve=e=>{var n=fM(),r=F(n);Rp(r,{size:12});var i=L(r);D(n),R(e=>{J(n,`title`,t.span.cost?.source===`reported`?`Reported cost (gen_ai.usage.cost.usd)`:`Estimated cost`),U(i,` ${e??``}`)},[()=>Uj(t.span.cost?.total)]),H(e,n)};W(_e,e=>{z(d)&&e(ve)}),D(ce),D(g),R(e=>{q(g,1,e),U(te,t.span.operation),U(fe,` ${z(i)??``}`)},[()=>K($(`flex items-center gap-3 flex-wrap`,`px-3 py-2 border-b border-line`,`text-sm`))]),H(e,g),at()}ea([`click`]);function hM(e){if(!e)return``;if(/[\s/:.]/.test(e))return e;let t=e.replace(/[_-]+/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).trim();return!t.includes(` `)&&t===e?e.charAt(0).toUpperCase()+e.slice(1):t.split(` `).filter(Boolean).map(e=>e.length>1&&e===e.toUpperCase()?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function gM(e){if(e===void 0)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var _M=V(`<div> </div> <pre> </pre>`,1);function vM(e,t){it(t,!0);let n=Z(t,`tone`,3,`neutral`);var r=_M(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,n,r)=>{q(i,1,e),U(a,t.label),q(o,1,n),U(s,r)},[()=>K($(`text-[10px] font-medium uppercase tracking-wider mb-1`,n()===`positive`?`text-success`:`text-fg-subtle`)),()=>K($(`text-xs p-2 rounded overflow-x-auto whitespace-pre-wrap`,n()===`positive`?`bg-surface border border-success-border text-fg`:`bg-subtle border border-line text-fg`)),()=>gM(t.value)]),H(e,r),at()}var yM=V(`<span class="font-mono text-[11px] text-violet-600/70 truncate"> </span>`),bM=V(`<span class="ml-auto text-[10px] uppercase tracking-wide text-fg-subtle">no result</span>`),xM=V(`<div class="px-3 py-2 border-t border-emerald-500/30 bg-emerald-500/15"><!></div>`),SM=V(`<div class="px-3 py-1.5 border-t border-line-subtle bg-subtle/60 text-[10px] font-mono text-fg-subtle"> </div>`),CM=V(`<div class="px-3 py-2 border-t border-violet-500/30 bg-surface"><!></div> <!> <!>`,1),wM=V(`<div class="mt-2 border border-violet-500/30 rounded-md overflow-hidden"><button type="button"><!> <!> <span class="font-mono font-medium text-violet-600"> </span> <!> <!></button> <!></div>`);function TM(e,t){it(t,!0);let n=M(()=>hM(t.call.name)),r=M(()=>z(n)&&z(n)!==t.call.name?z(n):void 0),i=N(!1);function a(e){if(typeof e!=`object`||!e||Array.isArray(e))return``;let t=Object.entries(e);return t.length===0?``:t.slice(0,3).map(([e,t])=>`${e}: ${typeof t==`string`?`"${t.length>20?t.slice(0,20)+`…`:t}"`:t===null?`null`:typeof t==`object`?`…`:String(t)}`).join(`, `)}let o=M(()=>typeof t.call.arguments==`string`?(()=>{try{return JSON.parse(t.call.arguments)}catch{return t.call.arguments}})():t.call.arguments),s=M(()=>t.call.result),c=M(()=>a(z(o)));var l=wM(),u=F(l),d=F(u);{let e=M(()=>$(`text-violet-600 transition-transform shrink-0`,z(i)&&`rotate-90`));Op(d,{size:12,get class(){return z(e)}})}var f=L(d,2);ng(f,{size:12,class:`text-violet-600 shrink-0`});var p=L(f,2),m=F(p,!0);D(p);var h=L(p,2),g=e=>{var t=yM(),n=F(t);D(t),R(()=>U(n,`(${z(c)??``})`)),H(e,t)};W(h,e=>{!z(i)&&z(c)&&e(g)});var _=L(h,2),v=e=>{H(e,bM())};W(_,e=>{!z(i)&&z(s)===void 0&&e(v)}),D(u);var y=L(u,2),b=e=>{var n=CM(),r=I(n);vM(F(r),{label:`Input`,get value(){return z(o)}}),D(r);var i=L(r,2),a=e=>{var t=xM();vM(F(t),{label:`Output`,get value(){return z(s)},tone:`positive`}),D(t),H(e,t)};W(i,e=>{z(s)!==void 0&&e(a)});var c=L(i,2),l=e=>{var n=SM(),r=F(n);D(n),R(()=>U(r,`id: ${t.call.id??``}`)),H(e,n)};W(c,e=>{t.call.id&&e(l)}),H(e,n)};W(y,e=>{z(i)&&e(b)}),D(l),R(e=>{q(u,1,e),J(p,`title`,z(r)),U(m,t.call.name)},[()=>K($(`w-full px-2.5 py-1.5 flex items-center gap-1.5 text-left`,`text-xs bg-violet-500/15 hover:bg-violet-500/25 transition-colors`))]),B(`click`,u,()=>P(i,!z(i))),H(e,l),at()}ea([`click`]);var EM=(e,t=p)=>{var n=ua(),r=I(n),i=e=>{var n=kM(),r=F(n,!0);D(n),R(()=>U(r,t().text)),H(e,n)},a=e=>{var n=AM(),r=F(n);D(n),R(()=>U(r,`[image · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},o=e=>{var n=AM(),r=F(n);D(n),R(()=>U(r,`[audio · ${t().mediaType??``} · ref=${t().dataRef??``}]`)),H(e,n)},s=e=>{var n=jM(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(()=>{U(r,`Content stored externally (${t().direction??``}). Reference: `),U(a,t().ref)}),H(e,n)},c=e=>{let n=M(()=>JSON.stringify(t().value,null,2));X_(e,{get content(){return z(n)},children:(e,t)=>{var r=MM(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}})};W(r,e=>{t().kind===`text`?e(i):t().kind===`image`?e(a,1):t().kind===`audio`?e(o,2):t().kind===`ref`?e(s,3):e(c,-1)}),H(e,n)},DM=(e,t=p)=>{var n=BM(),r=F(n);ng(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=IM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.fromAgent)),H(e,n)};W(a,e=>{t().handoff?.fromAgent&&e(o)});var s=L(a,2),c=e=>{var n=LM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().handoff.toAgent)),H(e,n)};W(s,e=>{t().handoff?.toAgent&&e(c)});var l=L(s,2),u=e=>{var n=RM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)});var d=L(l,2),f=e=>{var n=zM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(d,e=>{t().agent?.name&&e(f)}),D(i),D(n),H(e,n)},OM=(e,t=p)=>{var n=HM(),r=F(n);up(F(r),{size:14}),Ke(),D(r);var i=L(r,2),a=F(i),o=e=>{var n=zM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.name)),H(e,n)};W(a,e=>{t().agent?.name&&e(o)});var s=L(a,2),c=e=>{var n=VM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().agent.description)),H(e,n)};W(s,e=>{t().agent?.description&&e(c)});var l=L(s,2),u=e=>{var n=RM(),r=L(I(n),2),i=F(r,!0);D(r),R(()=>U(i,t().conversationId)),H(e,n)};W(l,e=>{t().conversationId&&e(u)}),D(i),Ke(2),D(n),H(e,n)},kM=V(`<p class="whitespace-pre-wrap leading-relaxed text-fg text-sm"> </p>`),AM=V(`<div class="text-xs text-fg-subtle italic"> </div>`),jM=V(`<div class="text-xs text-fg-muted italic"> <code class="not-italic text-fg"> </code></div>`),MM=V(`<pre class="text-xs bg-code text-fg p-2 rounded overflow-x-auto"> </pre>`),NM=V(`<span class="text-[10px] text-fg-subtle"> </span>`),PM=V(`<span class="text-[10px] font-mono text-fg-subtle"> </span>`),FM=V(`<div><div class="flex items-center gap-1.5 mb-1.5"><span><!> </span> <!> <!> <!></div> <div class="space-y-2"></div> <!></div>`),IM=V(`<div class="text-fg-subtle">from</div> <div class="font-mono"> </div>`,1),LM=V(`<div class="text-fg-subtle">to</div> <div class="font-mono"> </div>`,1),RM=V(`<div class="text-fg-subtle">conversation</div> <div class="font-mono text-xs text-fg-muted truncate"> </div>`,1),zM=V(`<div class="text-fg-subtle">agent</div> <div class="font-mono"> </div>`,1),BM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent handoff</div> <div class="grid grid-cols-[80px_1fr] gap-y-2 text-fg-muted"><!> <!> <!> <!></div></div>`),VM=V(`<div class="text-fg-subtle">description</div> <div> </div>`,1),HM=V(`<div class="p-4 space-y-3 text-sm"><div class="flex items-center gap-2 text-violet-600 font-medium"><!> Agent run</div> <div class="grid grid-cols-[100px_1fr] gap-y-2 text-fg-muted"><!> <!> <!></div> <p class="text-xs text-fg-subtle italic">Agent-run spans aggregate child LLM calls. Open child spans for
17
+ transcripts.</p></div>`),UM=V(`<div class="p-4 text-sm text-fg-subtle italic">No conversation payload on this span. Enable content capture (<code class="text-xs">OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true</code>) in your instrumentation to see prompts and completions.</div>`),WM=V(`<div class="p-3 space-y-2"></div>`);function GM(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>i[t().role]??i.user),a=M(()=>z(n).icon);var o=FM(),s=F(o),c=F(s),l=F(c);za(l,()=>z(a),(e,t)=>{t(e,{size:10})});var u=L(l);D(c);var d=L(c,2),f=e=>{var n=NM(),r=F(n);D(n),R(()=>U(r,`finish: ${t().finishReason??``}`)),H(e,n)};W(d,e=>{t().finishReason&&e(f)});var m=L(d,2),h=e=>{var n=PM(),r=F(n);D(n),R(()=>U(r,`tool_call_id=${t().toolCallId??``}`)),H(e,n)};W(m,e=>{t().toolCallId&&e(h)});var g=L(m,2);{let e=M(()=>r(t()));mv(g,{get value(){return z(e)},label:`Copy message`,class:`ml-auto opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(s);var _=L(s,2);G(_,20,()=>t().parts,e=>e,(e,t)=>{EM(e,()=>t)}),D(_),G(L(_,2),16,()=>t().toolCalls??[],e=>e,(e,t)=>{TM(e,{get call(){return t}})}),D(o),R((e,t)=>{q(o,1,e),q(c,1,t),U(u,` ${z(n).label??``}`)},[()=>K($(`group border rounded-lg px-3 py-2`,z(n).wrap)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5`,`rounded text-[10px] font-medium uppercase tracking-wide`,z(n).chip))]),H(e,o)};function r(e){let t=e.parts.map(e=>e.kind===`text`?e.text:e.kind===`ref`?`[ref:${e.direction}] ${e.ref}`:e.kind===`image`||e.kind===`audio`?`[${e.kind} · ${e.mediaType} · ${e.dataRef}]`:JSON.stringify(e.value,null,2));for(let n of e.toolCalls??[])t.push(JSON.stringify({tool:n.name,...n},null,2));return t.join(`
18
18
 
19
- `)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:Dh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Yh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:lp},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:tg}};var a=la(),o=I(a),s=e=>{var n=la(),r=I(n),i=e=>{lM(e,()=>t.span)},a=e=>{uM(e,()=>t.span)},o=e=>{H(e,TM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=EM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var OM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),kM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),AM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),jM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),MM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),NM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function PM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=jM(),a=F(i),l=F(a);lp(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=OM(),r=F(n);jh(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=AM(),l=F(c),u=F(l),d=e=>{rp(e,{size:11})},f=e=>{Vp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=kM(),m=F(p),h=e=>{Gh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),oo(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${ad(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K($(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K($(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>ad(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=la(),d=I(u),f=e=>{H(e,MM())},m=e=>{var t=NM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}ea([`click`]);function FM(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function IM(e,t=60){if(e==null)return``;if(typeof e==`string`)return FM(e,t);try{return FM(JSON.stringify(e),t)}catch{return FM(String(e),t)}}function LM(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function RM(e){let{inputTokens:t,outputTokens:n}=e.usage;if(t!=null||n!=null)return{input:t,output:n}}function zM(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function BM(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:IM(n)}function VM(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Fj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:RM(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=BM(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(Pj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:LM(e),depth:t,...o,tokens:RM(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=IM(n.arguments,40),o=n.result===void 0?``:` → ${IM(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=zM(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:FM(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:LM(e),sublabel:e.operation,depth:t,...o,tokens:RM(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function HM(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var UM={agent:{icon:lp,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:Tm,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Vp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:pp,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:tg,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Lm,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:rp,dot:`bg-violet-500`,text:`text-violet-600`}};function WM(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var GM=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),KM=V(`<span class="text-line-subtle select-none">·</span>`),qM=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),JM=V(`<span class="flex-1"></span>`),YM=V(`<span title="tokens in → out"> </span>`),XM=V(`<span class="text-fg-muted"> </span>`),ZM=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),QM=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function $M(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>HM(t.nodes));var i=la(),a=I(i),o=e=>{H(e,GM())},s=e=>{var i=QM();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>UM[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=ZM(),l=F(c),u=F(l),d=e=>{H(e,KM())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>$(`shrink-0`,z(i).text));Ra(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=qM(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,JM())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=YM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>WM(z(r).tokens)]),H(e,t)},S=M(()=>WM(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=XM(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>ad(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),oo(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K($(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K($(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K($(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}ea([`click`]);function eN(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var tN=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),nN=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),rN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function iN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Gp,label:`Cost`,value:Oj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:xm,label:`Tokens`,value:`${eN(t.summary.inputTokens)}→${eN(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:pp,label:`Reasoning`,value:eN(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Vp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:tg,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:lp,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Np,label:`Duration`,value:ad(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Gh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=la(),i=I(r),a=e=>{var r=rN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=tN(),i=F(r);{let e=M(()=>$(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));Ra(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K($(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=nN(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var aN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function oN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}Lr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:lp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:rp,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:tg,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Vp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Vp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=la();$i(`keydown`,br,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=aN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);Ra(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);Tp(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{th(e,{size:15})},le=e=>{ah(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);Dp(F(E),{size:15}),D(E);var ue=L(E,2);rg(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{oo(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K($(`w-2 h-2 rounded-full`,z(d).dot)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K($(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}ea([`click`]);function sN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function cN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(sN)?!0:e.messages.some(e=>sN(e.finishReason))}function lN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function uN(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${lN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${lN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(Pj.has(t)){if(cN(e)){let t=Nj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function dN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,...uN(e)}))}function fN(e,t){return t?zj(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function pN(e){return Dj(e.inputTokens,e.outputTokens)}function mN(e){return Oj(e?.total,e?.source===`table`)}function hN(e,t){let n=e.normalized;return R_(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,e.service])}var gN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),_N=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),vN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),yN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),bN=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),xN=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),SN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
19
+ `)}let i={system:{wrap:`bg-subtle border-line`,chip:`bg-hover text-fg-muted`,label:`system`,icon:Oh},user:{wrap:`bg-blue-500/10 border-blue-500/30`,chip:`bg-blue-500/15 text-blue-600`,label:`user`,icon:Xh},assistant:{wrap:`bg-emerald-500/10 border-emerald-500/30`,chip:`bg-emerald-500/15 text-emerald-600`,label:`assistant`,icon:up},tool:{wrap:`bg-amber-500/10 border-amber-500/30`,chip:`bg-amber-500/15 text-amber-600`,label:`tool`,icon:ng}};var a=ua(),o=I(a),s=e=>{var n=ua(),r=I(n),i=e=>{DM(e,()=>t.span)},a=e=>{OM(e,()=>t.span)},o=e=>{H(e,UM())};W(r,e=>{t.span.operation===`execute_handoff`||t.span.handoff?e(i):t.span.operation===`invoke_agent`||t.span.operation===`create_agent`?e(a,1):e(o,-1)}),H(e,n)},c=e=>{var r=WM();G(r,20,()=>t.span.messages,e=>e,(e,t)=>{n(e,()=>t)}),D(r),H(e,r)};W(o,e=>{t.span.messages.length===0?e(s):e(c,-1)}),H(e,a),at()}var KM=V(`<span class="inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-700 border border-amber-500/20 font-mono" title="Agent security signal"><!> </span>`),qM=V(`<button type="button"><!> <span class="truncate"> </span></button>`),JM=V(`<div class="flex items-center gap-3"><div><!> <span class="truncate"> </span></div> <div class="relative flex-1 h-6 bg-subtle border border-line-subtle rounded"></div></div>`),YM=V(`<div class="border border-line rounded-lg overflow-hidden bg-surface"><header class="px-3 py-2 border-b border-line bg-subtle flex items-center gap-2 text-sm"><!> <span class="font-mono text-xs text-fg-muted truncate"> </span> <span class="text-xs text-fg-subtle ml-auto flex items-center gap-1.5 flex-wrap justify-end"><!> </span></header> <div class="p-3 space-y-1.5"></div></div>`),XM=V(`<div class="p-6 text-sm text-fg-subtle">No conversations to display.</div>`),ZM=V(`<div class="p-3 space-y-3 overflow-y-auto h-full"></div>`);function QM(e,t){it(t,!0);let n=(e,n=p)=>{let r=M(()=>s(n()));var i=YM(),a=F(i),l=F(a);up(l,{size:14,class:`text-violet-600`});var u=L(l,2),d=F(u,!0);D(u);var f=L(u,2),m=F(f);G(m,16,()=>c(n()),e=>e,(e,t)=>{var n=KM(),r=F(n);Mh(r,{size:10});var i=L(r);D(n),R(()=>U(i,` ${t??``}`)),H(e,n)});var h=L(m);D(f),D(a);var g=L(a,2);G(g,20,()=>z(r).laneOrder,e=>e,(e,i)=>{let a=M(()=>z(r).laneMap.get(i)),s=M(()=>i.startsWith(`handoff:`));var c=JM(),l=F(c),u=F(l),d=e=>{ip(e,{size:11})},f=e=>{Hp(e,{size:11,class:`text-fg-subtle`})};W(u,e=>{z(s)?e(d):e(f,-1)});var p=L(u,2),m=F(p,!0);D(p),D(l);var h=L(l,2);G(h,21,()=>z(a),e=>e.spanId,(e,a)=>{let c=M(()=>(z(a).startMs-n().startMs)/z(r).durationMs*100),l=M(()=>Math.max(.5,(z(a).endMs-z(a).startMs)/z(r).durationMs*100)),u=M(()=>z(a).status===`error`),d=M(()=>z(a).spanId===t.selectedSpanId),f=M(()=>z(r).wrapperIdsByLane.get(i)?.has(z(a).spanId)??!1);var p=qM(),m=F(p),h=e=>{Kh(e,{size:9})};W(m,e=>{z(u)&&e(h)});var g=L(m,2),_=F(g,!0);D(g),D(p),R((e,t)=>{J(p,`title`,e),q(p,1,t),so(p,`left: ${z(c)??``}%; width: ${z(l)??``}%; min-width: 8px; z-index: ${z(f)?1:2};`),U(_,z(a).operation)},[()=>`${z(a).operation} · ${od(z(a).endMs-z(a).startMs)}${z(a).usage.inputTokens==null?``:` · ${z(a).usage.inputTokens}→${z(a).usage.outputTokens??`—`}`}${z(f)?` (wraps children)`:``}`,()=>K($(`absolute top-0.5 bottom-0.5 rounded text-[10px] font-mono px-1 truncate flex items-center gap-1 transition-all`,o(z(f),z(s),z(u)),z(d)&&`ring-2 ring-accent ring-offset-1`))]),B(`click`,p,()=>t.onSelectSpan?.(z(a).spanId)),H(e,p)}),D(h),D(c),R(e=>{q(l,1,e),J(l,`title`,i),U(m,i)},[()=>K($(`w-44 shrink-0 flex items-center gap-1.5 text-xs font-mono truncate`,z(s)?`text-violet-600`:`text-fg-muted`))]),H(e,c)}),D(g),D(i),R((e,t)=>{J(u,`title`,n().conversationId),U(d,e),U(h,` ${n().spans.length??``} span${n().spans.length===1?``:`s`} · ${t??``} · ${n().service??``}`)},[()=>n().conversationId.startsWith(`trace:`)?`trace ${n().conversationId.slice(6,14)}…`:`conversation ${n().conversationId.slice(0,12)}…`,()=>od(z(r).durationMs)]),H(e,i)};function r(e){let t=new Map;for(let n of e){let e=n.normalized.conversationId??`trace:${n.traceId}`,r=t.get(e);r?(r.spans.push(n.normalized),r.startMs=Math.min(r.startMs,n.normalized.startMs),r.endMs=Math.max(r.endMs,n.normalized.endMs)):t.set(e,{conversationId:e,service:n.service,traceId:n.traceId,spans:[n.normalized],startMs:n.normalized.startMs,endMs:n.normalized.endMs})}return[...t.values()].sort((e,t)=>t.startMs-e.startMs)}function i(e){return e.handoff?`handoff: ${e.handoff.fromAgent??`?`} → ${e.handoff.toAgent??`?`}`:e.agent?.name?e.agent.name:`${e.provider}/${e.responseModel??e.requestModel}`}function a(e){let t=new Set;for(let n=0;n<e.length;n++){let r=e[n];for(let i=0;i<e.length;i++){if(n===i)continue;let a=e[i];if(a.startMs>=r.startMs&&a.endMs<=r.endMs&&a.endMs-a.startMs<r.endMs-r.startMs){t.add(r.spanId);break}}}return t}function o(e,t,n){return e?`bg-transparent border border-dashed border-line text-fg-subtle hover:bg-hover/50`:t?`bg-violet-500/15 hover:bg-violet-500/25 text-violet-600 border border-violet-500/30`:n?`bg-red-500/15 hover:bg-red-500/25 text-red-600 border border-red-500/30`:`bg-emerald-500/15 hover:bg-emerald-500/25 text-emerald-600 border border-emerald-500/30`}function s(e){let t=[],n=new Map;for(let r of e.spans){let e=i(r);n.has(e)||(n.set(e,[]),t.push(e)),n.get(e).push(r)}let r=new Map;for(let[e,t]of n)r.set(e,a(t));return{laneOrder:t,laneMap:n,wrapperIdsByLane:r,durationMs:Math.max(1,e.endMs-e.startMs)}}function c(e){let t=new Set;for(let n of e.spans){let e=n.agentSecurity;e&&(e.consentOutcome&&t.add(`consent:${e.consentOutcome}`),e.policyDecision===`deny`&&t.add(`policy:deny`),e.injectionVerdict&&e.injectionVerdict!==`clean`&&t.add(`injection:${e.injectionVerdict}`),e.guardStopped&&t.add(`guard:stop`),e.securityEvent&&t.add(e.securityEvent),e.planStepIndex!==void 0&&t.add(`plan:#${e.planStepIndex}`))}return[...t]}let l=M(()=>r(t.rows));var u=ua(),d=I(u),f=e=>{H(e,XM())},m=e=>{var t=ZM();G(t,21,()=>z(l),e=>e.conversationId,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(d,e=>{z(l).length===0?e(f):e(m,-1)}),H(e,u),at()}ea([`click`]);function $M(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function eN(e,t=60){if(e==null)return``;if(typeof e==`string`)return $M(e,t);try{return $M(JSON.stringify(e),t)}catch{return $M(String(e),t)}}function tN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?e.provider&&e.provider!==`unknown`?`${e.provider}/${t}`:t:e.agent?.name??e.provider??`model`}function nN(e){let{inputTokens:t,outputTokens:n}=e.usage;if(t!=null||n!=null)return{input:t,output:n}}function rN(e){for(let t=e.messages.length-1;t>=0;t--){let n=e.messages[t];if(n.role!==`assistant`)continue;let r=n.parts.filter(e=>e.kind===`text`).map(e=>e.text).join(` `).trim();if(r)return r}}function iN(e){let t=e.extras?.raw??{},n=t.tool_response??t.tool_result;return n==null?``:eN(n)}function aN(e){if(e.length===0)return[];let t=new Map(e.map(e=>[e.spanId,e])),n=new Map,r=[];for(let i of e){let e=i.parentSpanId;if(e&&t.has(e)){let t=n.get(e)??[];t.push(i),n.set(e,t)}else r.push(i)}let i=new Set;for(let t of e)t.operation===`execute_tool`&&t.tool?.callId&&i.add(t.tool.callId);let a=new Set,o=(e,t)=>e.startMs-t.startMs||e.endMs-t.endMs,s=0,c=()=>`trace-${s++}`;function l(e,t){return(n.get(e.spanId)??[]).sort(o).map(e=>u(e,t))}function u(e,t){let n=e.operation,r=e.endMs-e.startMs,o={startMs:e.startMs,durationMs:r,spanId:e.spanId};if(n===`execute_handoff`||e.handoff){let n=e.handoff?.fromAgent??`?`,r=e.handoff?.toAgent??`?`;return{id:c(),kind:`handoff`,label:`${n} → ${r}`,depth:t,...o,children:l(e,t+1)}}if(Xj.has(n))return{id:c(),kind:`agent`,label:`Agent: ${e.agent?.name??`agent`}`,depth:t,...o,tokens:nN(e),children:l(e,t+1)};if(n===`execute_tool`){let n=e.tool?.name??e.agent?.name??e.name??`tool`,r=iN(e);return{id:c(),kind:`tool`,label:`Tool: ${n}`,sublabel:r?`→ ${r}`:void 0,depth:t,...o,children:l(e,t+1)}}if(Yj.has(n)){let n=l(e,t+1);if(n.length>0)return{id:c(),kind:`group`,label:tN(e),depth:t,...o,tokens:nN(e),children:n};let r=[],s=e.usage.reasoningOutputTokens??0;s>0&&r.push({id:c(),kind:`reasoning`,label:`Reasoning`,sublabel:`${s} tokens`,depth:t+1,children:[]});for(let n of e.toolCalls){if(n.id&&i.has(n.id)||n.id&&a.has(n.id))continue;n.id&&a.add(n.id);let e=eN(n.arguments,40),o=n.result===void 0?``:` → ${eN(n.result,40)}`;r.push({id:c(),kind:`tool`,label:`Tool: ${n.name}`,sublabel:`${e}${o}`.trim()||void 0,depth:t+1,children:[]})}let u=rN(e);return u&&r.push({id:c(),kind:`text`,label:`Text`,sublabel:$M(u),depth:t+1,children:[]}),{id:c(),kind:`step`,label:tN(e),sublabel:e.operation,depth:t,...o,tokens:nN(e),children:r}}return{id:c(),kind:`step`,label:e.name||n,depth:t,...o,children:l(e,t+1)}}return r.sort(o).map(e=>u(e,0))}function oN(e){let t=[],n=e=>{t.push(e);for(let t of e.children)n(t)};for(let t of e)n(t);return t}var sN={agent:{icon:up,dot:`bg-violet-500`,text:`text-violet-600`},group:{icon:Em,dot:`bg-blue-500`,text:`text-blue-600`},step:{icon:Hp,dot:`bg-blue-500`,text:`text-fg`},reasoning:{icon:mp,dot:`bg-amber-500`,text:`text-amber-600`},tool:{icon:ng,dot:`bg-purple-500`,text:`text-purple-600`},text:{icon:Rm,dot:`bg-emerald-500`,text:`text-emerald-600`},handoff:{icon:ip,dot:`bg-violet-500`,text:`text-violet-600`}};function cN(e){if(!e)return``;let{input:t,output:n}=e;return t==null&&n==null?``:`${t??`—`}→${n??`—`}`}var lN=V(`<div class="p-6 text-sm text-fg-subtle">No trace to display.</div>`),uN=V(`<span class="text-line-subtle select-none">·</span>`),dN=V(`<span class="min-w-0 flex-1 truncate text-fg-subtle font-sans"> </span>`),fN=V(`<span class="flex-1"></span>`),pN=V(`<span title="tokens in → out"> </span>`),mN=V(`<span class="text-fg-muted"> </span>`),hN=V(`<button type="button"><span class="relative flex items-center gap-1.5 shrink-0"><!> <span></span> <!></span> <span> </span> <!> <span class="shrink-0 flex items-center gap-2 text-fg-subtle tabular-nums"><!> <!></span></button>`),gN=V(`<div class="py-1 overflow-y-auto h-full font-mono text-xs"></div>`);function _N(e,t){it(t,!0);let n=Z(t,`selectedSpanId`,3,null),r=M(()=>oN(t.nodes));var i=ua(),a=I(i),o=e=>{H(e,lN())},s=e=>{var i=gN();G(i,21,()=>z(r),e=>e.id,(e,r)=>{let i=M(()=>sN[z(r).kind]),a=M(()=>z(i).icon),o=M(()=>z(r).spanId!=null),s=M(()=>z(r).spanId!=null&&z(r).spanId===n());var c=hN(),l=F(c),u=F(l),d=e=>{H(e,uN())};W(u,e=>{z(r).depth>0&&e(d)});var f=L(u,2),p=L(f,2);{let e=M(()=>$(`shrink-0`,z(i).text));za(p,()=>z(a),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}D(l);var m=L(l,2),h=F(m,!0);D(m);var g=L(m,2),_=e=>{var t=dN(),n=F(t,!0);D(t),R(()=>U(n,z(r).sublabel)),H(e,t)},v=e=>{H(e,fN())};W(g,e=>{z(r).sublabel?e(_):e(v,-1)});var y=L(g,2),b=F(y),x=e=>{var t=pN(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>cN(z(r).tokens)]),H(e,t)},S=M(()=>cN(z(r).tokens));W(b,e=>{z(S)&&e(x)});var C=L(b,2),w=e=>{var t=mN(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>od(z(r).durationMs)]),H(e,t)};W(C,e=>{z(r).durationMs!=null&&z(r).durationMs>0&&e(w)}),D(y),D(c),R((e,t,n)=>{c.disabled=!z(o),q(c,1,e),so(c,`padding-left: ${z(r).depth*18+8}px`),q(f,1,t),q(m,1,n),U(h,z(r).label)},[()=>K($(`group flex w-full items-center gap-2 py-1 pr-3 text-left transition-colors`,z(o)?`hover:bg-subtle cursor-pointer`:`cursor-default`,z(s)&&`bg-accent/10`)),()=>K($(`w-1.5 h-1.5 rounded-full shrink-0`,z(i).dot)),()=>K($(`shrink-0 font-medium`,z(i).text))]),B(`click`,c,()=>z(r).spanId&&t.onSelectSpan?.(z(r).spanId)),H(e,c)}),D(i),H(e,i)};W(a,e=>{z(r).length===0?e(o):e(s,-1)}),H(e,i),at()}ea([`click`]);function vN(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var yN=V(`<div><!> <span class="text-[10px] uppercase tracking-wide text-fg-subtle"> </span> <span class="text-xs font-mono font-semibold tabular-nums"> </span></div>`),bN=V(`<div class="flex items-center gap-1.5 px-2 py-1 text-[11px] text-fg-subtle font-mono truncate max-w-full"> </div>`),xN=V(`<div class="flex flex-wrap items-stretch gap-1.5 px-3 py-2 border-b border-line bg-subtle/40" role="group" aria-label="Run summary"><!> <!></div>`);function SN(e,t){it(t,!0);let n=M(()=>[t.summary.costKnown&&{icon:Kp,label:`Cost`,value:Uj(t.summary.totalCostUsd)+(t.summary.costComplete?``:`+`),title:t.summary.costComplete?`Total cost across this run (exact)`:`Total cost — lower bound; some model calls are not in the price table`,accent:!0},t.summary.totalTokens>0&&{icon:Sm,label:`Tokens`,value:`${vN(t.summary.inputTokens)}→${vN(t.summary.outputTokens)}`,title:`${t.summary.inputTokens.toLocaleString()} in → ${t.summary.outputTokens.toLocaleString()} out`},t.summary.reasoningTokens>0&&{icon:mp,label:`Reasoning`,value:vN(t.summary.reasoningTokens),title:`${t.summary.reasoningTokens.toLocaleString()} reasoning tokens`},t.summary.modelCalls>0&&{icon:Hp,label:`Model calls`,value:String(t.summary.modelCalls),title:`${t.summary.modelCalls} LLM request(s)`},t.summary.toolCalls>0&&{icon:ng,label:`Tools`,value:String(t.summary.toolCalls),title:`${t.summary.toolCalls} tool execution(s)`},t.summary.agentInvocations>1&&{icon:up,label:`Agents`,value:String(t.summary.agentInvocations),title:`${t.summary.agentInvocations} agent invocation(s)`},t.summary.durationMs>0&&{icon:Pp,label:`Duration`,value:od(t.summary.durationMs),title:`Wall-clock span of the run`},t.summary.errors>0&&{icon:Kh,label:`Errors`,value:String(t.summary.errors),title:`${t.summary.errors} errored span(s)`,danger:!0}].filter(Boolean));var r=ua(),i=I(r),a=e=>{var r=xN(),i=F(r);G(i,17,()=>z(n),e=>e.label,(e,t)=>{let n=M(()=>z(t).icon);var r=yN(),i=F(r);{let e=M(()=>$(`shrink-0`,z(t).danger?`text-danger`:z(t).accent?`text-accent`:`text-fg-subtle`));za(i,()=>z(n),(t,n)=>{n(t,{size:12,get class(){return z(e)}})})}var a=L(i,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(r),R(e=>{q(r,1,e),J(r,`title`,z(t).title),U(o,z(t).label),U(c,z(t).value)},[()=>K($(`flex items-center gap-1.5 px-2 py-1 rounded border bg-surface`,z(t).danger?`border-danger/30 text-danger`:z(t).accent?`border-accent/30 text-fg`:`border-line text-fg`))]),H(e,r)});var a=L(i,2),o=e=>{var n=bN(),r=F(n);D(n),R((e,i)=>{J(n,`title`,e),U(r,`${i??``}${t.summary.models.length>2?` +${t.summary.models.length-2}`:``}`)},[()=>`Models: ${t.summary.models.join(`, `)}`,()=>t.summary.models.slice(0,2).join(` · `)]),H(e,n)};W(a,e=>{t.summary.models.length>0&&e(o)}),D(r),H(e,r)};W(i,e=>{z(n).length>0&&e(a)}),H(e,r),at()}var CN=V(`<div class="border-b border-line bg-surface shadow-sm" role="region" aria-label="Guided tour"><div class="h-0.5 bg-line"><div class="h-full bg-accent transition-all duration-300"></div></div> <div class="flex items-start gap-3 px-3 py-2.5"><div class="flex items-center gap-2 shrink-0 pt-0.5"><span></span> <span><!> </span></div> <div class="min-w-0 flex-1"><div class="text-sm font-semibold text-fg leading-tight"> </div> <p class="mt-0.5 text-xs text-fg-muted leading-relaxed"> </p></div> <div class="flex items-center gap-1 shrink-0"><span class="text-[11px] text-fg-subtle tabular-nums mr-1"> </span> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Previous step" title="Previous (←)"><!></button> <button type="button"><!></button> <button type="button" class="p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover disabled:opacity-30 disabled:hover:bg-transparent transition-colors" aria-label="Next step" title="Next (→ or Space)"><!></button> <button type="button" class="p-1 ml-1 rounded text-fg-subtle hover:text-fg hover:bg-hover transition-colors" aria-label="Exit tour" title="Exit (Esc)"><!></button></div></div></div>`);function wN(e,t){it(t,!0);let n=Z(t,`index`,15),r=N(!1),i=M(()=>t.steps[n()]),a=M(()=>n()<=0),o=M(()=>n()>=t.steps.length-1),s=M(()=>t.steps.length>1?(n()+1)/t.steps.length*100:100);function c(){z(o)||n(n()+1)}function l(){z(a)||n(n()-1)}function u(){P(r,!z(r))}Lr(()=>{if(!z(r))return;if(z(o)){P(r,!1);return}let e=setTimeout(()=>{n(n()+1)},2600);return()=>clearTimeout(e)});function d(e){e.key===`ArrowRight`||e.key===` `?(e.preventDefault(),c()):e.key===`ArrowLeft`?(e.preventDefault(),l()):e.key===`Escape`&&t.onClose()}let f={Agent:{icon:up,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Handoff:{icon:ip,dot:`bg-violet-500`,chip:`text-violet-600 bg-violet-500/10`},Tool:{icon:ng,dot:`bg-amber-500`,chip:`text-amber-600 bg-amber-500/10`}};function p(e){return e.startsWith(`Model`)?{icon:Hp,dot:`bg-emerald-500`,chip:`text-emerald-600 bg-emerald-500/10`}:f[e]??{icon:Hp,dot:`bg-accent`,chip:`text-fg-muted bg-hover`}}var m=ua();$i(`keydown`,br,d);var h=I(m),g=e=>{let d=M(()=>p(z(i).role)),f=M(()=>z(d).icon);var m=CN(),h=F(m),g=F(h);D(h);var _=L(h,2),v=F(_),y=F(v),b=L(y,2),x=F(b);za(x,()=>z(f),(e,t)=>{t(e,{size:11})});var S=L(x);D(b),D(v);var C=L(v,2),w=F(C),T=F(w,!0);D(w);var ee=L(w,2),te=F(ee,!0);D(ee),D(C);var ne=L(C,2),re=F(ne),ie=F(re);D(re);var ae=L(re,2);Ep(F(ae),{size:15}),D(ae);var oe=L(ae,2),se=F(oe),ce=e=>{nh(e,{size:15})},le=e=>{oh(e,{size:15})};W(se,e=>{z(r)?e(ce):e(le,-1)}),D(oe);var E=L(oe,2);Op(F(E),{size:15}),D(E);var ue=L(E,2);ig(F(ue),{size:15}),D(ue),D(ne),D(_),D(m),R((e,c,l)=>{so(g,`width: ${z(s)??``}%`),q(y,1,e),q(b,1,c),U(S,` ${z(i).role??``}`),U(T,z(i).title),U(te,z(i).explain),U(ie,`${n()+1} / ${t.steps.length??``}`),ae.disabled=z(a),q(oe,1,l),J(oe,`aria-label`,z(r)?`Pause auto-play`:`Play tour`),J(oe,`title`,z(r)?`Pause`:`Auto-play`),E.disabled=z(o)},[()=>K($(`w-2 h-2 rounded-full`,z(d).dot)),()=>K($(`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide`,z(d).chip)),()=>K($(`p-1 rounded transition-colors`,z(r)?`text-accent bg-accent/10`:`text-fg-subtle hover:text-fg hover:bg-hover`))]),B(`click`,ae,l),B(`click`,oe,u),B(`click`,E,c),B(`click`,ue,function(...e){t.onClose?.apply(this,e)}),H(e,m)};W(h,e=>{z(i)&&e(g)}),H(e,m),at()}ea([`click`]);function TN(e){if(!e)return!1;let t=e.toLowerCase();return t===`tool_call`||t===`tool_calls`||t===`tool_use`||t===`function_call`}function EN(e){return e.toolCalls.length>0||e.messages.some(e=>e.role===`assistant`&&(e.toolCalls?.length??0)>0)||e.finishReasons?.some(TN)?!0:e.messages.some(e=>TN(e.finishReason))}function DN(e){let t=e.responseModel??e.requestModel;return t&&t!==`unknown`?t:e.provider===`unknown`?`model`:e.provider}function ON(e){let t=e.operation;if(t===`invoke_agent`||t===`create_agent`)return{role:`Agent`,title:`Agent: ${e.agent?.name??`agent`}`,explain:`An agent orchestrates the work — it reads the goal, calls the model, runs tools, and decides what to do next.`};if(t===`execute_handoff`||e.handoff){let t=e.handoff?.fromAgent??`?`,n=e.handoff?.toAgent??`?`;return{role:`Handoff`,title:`Handoff: ${t} → ${n}`,explain:`Control passes from "${t}" to "${n}" — a specialised agent takes over for the next part of the task.`}}if(t===`execute_tool`)return{role:`Tool`,title:`Tool: ${e.tool?.name??e.agent?.name??e.name??`tool`}`,explain:`A tool is real code the agent ran — the model chose the input, the function returned the output.`};if(t===`embeddings`)return{role:`Embeddings`,title:`Embeddings: ${DN(e)}`,explain:`The text is turned into vectors so the agent can search or compare meaning, not just keywords.`};if(t===`speech`||t===`transcription`)return{role:t===`speech`?`Speech`:`Transcription`,title:`${t===`speech`?`Text → speech`:`Audio → text`}: ${DN(e)}`,explain:t===`speech`?`The model converts text into spoken audio.`:`The model converts spoken audio into text the agent can read.`};if(Yj.has(t)){if(EN(e)){let t=Jj(e.toolCalls.map(e=>e.name).filter(Boolean));return{role:`Model · planning`,title:t.label?`Model calls ${t.label}`:`Model decides what to do`,explain:`The model reads the request, reasons about it, and decides which tools to call — it requests them, it does not run them yet.`}}return{role:`Model · responding`,title:`Model writes the answer`,explain:`The model takes everything gathered so far and synthesises it into the answer. This step often carries the most input, so it can be the most expensive.`}}return{role:t,title:e.name||t,explain:`A step in the agent run.`}}function kN(e){return[...e].sort((e,t)=>e.startMs-t.startMs||e.endMs-t.endMs).map(e=>({span:e,...ON(e)}))}function AN(e,t){return t?eM(e).find(e=>e.rows.some(e=>e.normalized.spanId===t))?.rows??[]:[]}function jN(e){return Hj(e.inputTokens,e.outputTokens)}function MN(e){return Uj(e?.total,e?.source===`table`)}function NN(e,t){let n=e.normalized;return ev(t.toLowerCase(),[n.responseModel??n.requestModel,n.requestModel,n.provider,String(n.operation),n.name,n.agent?.name,n.tool?.name,e.service])}var PN=V(`<span class="ml-1 text-[10px] text-fg-subtle">(by trace)</span>`),FN=V(`<div class="flex items-center gap-1 px-3 py-1.5 border-b border-line bg-subtle/50"><button type="button"><!> List</button> <button type="button"><!> Timeline <!></button> <button type="button" title="Decompose the selected run into reasoning, tools, text and nested agents"><!> Trace</button> <button type="button" title="Step through this run with plain-language narration"><!> Explain run</button></div>`),IN=V(`<li class="px-3 py-6 text-xs text-fg-subtle text-center">No matches</li>`),LN=V(`<div class="mt-0.5 text-[10px] text-fg-subtle truncate"> </div>`),RN=V(`<li role="option"><button type="button"><div class="flex items-center gap-1.5 text-xs font-mono"><!> <span class="text-fg truncate"> </span></div> <div class="mt-0.5 flex items-center gap-2 text-[11px] text-fg-subtle"><span> </span> <span>·</span> <span> </span> <span>·</span> <span> </span> <span class="ml-auto"> </span></div> <!></button></li>`),zN=V(`<div class="px-3 py-2 border-b border-line bg-subtle/50"><div class="mb-1.5 flex items-center justify-between gap-2 text-[11px] font-medium text-fg-muted"><span> </span> <span> </span></div> <!></div> <ul class="divide-y divide-line overflow-y-auto flex-1 focus:outline-none" tabindex="0" role="listbox" aria-label="GenAI spans"><!> <!></ul>`,1),BN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No GenAI spans yet</div> <p>Spans appear here as soon as your app emits OpenTelemetry GenAI semconv
20
20
  attributes (any of <code class="text-xs">gen_ai.system</code>, <code class="text-xs">gen_ai.provider.name</code>, or <code class="text-xs">gen_ai.operation.name</code>). Works with Vercel AI
21
21
  SDK <code class="text-xs">experimental_telemetry</code>, Pydantic AI +
22
22
  Logfire, OpenAI Agents v2, Anthropic, Google GenAI, LangChain, OpenLLMetry
23
- — anything following the spec.</p></div>`),CN=V(`<div class="flex flex-col h-full"><!> <div class="flex-1 overflow-hidden"><!></div></div>`),wN=V(`<div class="p-6 text-sm text-fg-subtle">Select a span (in List) to trace its run, or wait for a multi-span run
24
- to arrive.</div>`),TN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),EN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),DN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function ON(e,t){it(t,!0);let n=e=>{var t=_N(),n=F(t);Nm(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);qm(i,{size:12});var a=L(i,2),s=e=>{H(e,gN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);jm(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Nh(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=xN(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),L_(L(r,2),{get value(){return z(s)},onValue:e=>zl.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,vN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>z(t).normalized.responseModel??z(t).normalized.requestModel),s=M(()=>z(t).normalized.agent?.name&&(z(t).normalized.provider===`unknown`||z(o)===`unknown`));var c=bN(),d=F(c),p=F(d),m=F(p),h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);lp(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Vp(e,{size:11,get class(){return z(t)}})}};W(m,e=>{z(s)?e(h):e(g,-1)});var _=L(m,2),v=F(_,!0);D(_),D(p);var S=L(p,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=yN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(d),Vo(d,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(c),R((e,i,a,l)=>{J(c,`aria-selected`,z(r)),J(d,`data-row-index`,z(n)),q(d,1,e),U(v,z(s)?`agent: ${z(t).normalized.agent.name}`:`${z(t).normalized.provider}/${z(o)}`),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K($(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>ad(z(t).normalized.endMs-z(t).normalized.startMs),()=>pN(z(t).normalized.usage),()=>mN(z(t).normalized.cost)]),B(`click`,d,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,c)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>tu.value),a=N(null),o=N(`list`),s=M(()=>zl.value),c=M(()=>z(i).filter(e=>hN(e,z(s)))),l=_r([]),u=IA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>zj(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>fN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>Rj(z(g).map(e=>e.normalized))),v=M(()=>VM(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?dN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}Lr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=la(),T=I(w),ee=e=>{var t=SN(),n=F(t);Lm(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=CN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);PM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=TN(),r=F(t);n(r);var i=L(r,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,wN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);$M(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=DN(),i=F(t);n(i);var o=L(i,2),s=e=>{oN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=EN(),n=I(t),r=F(n);tp(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Yp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{iN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);Xj(c,{get span(){return z(f).normalized},onOpenTrace:()=>Pu(z(f).traceId,z(f).normalized.spanId)}),DM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>Pu(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K($(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K($(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}ea([`click`,`keydown`]);var kN=`__start__`,AN=`__end__`;function jN(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function MN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function NN(e){return e[`db.system.name`]!=null||e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function PN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function FN(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function IN(e){let t=e.attributes??{};return jN(t)?{role:`tool`,label:Q(t[`ai.toolCall.name`])??Q(t[`gen_ai.tool.name`])??FN(e.name)}:MN(t)?{role:`llm`,label:FN(e.name)}:NN(t)?{role:`db`,label:Q(t[`db.operation.name`])??Q(t[`db.operation`])??Q(t[`db.system.name`])??Q(t[`db.system`])??FN(e.name)}:PN(e,t)?{role:`http`,label:Q(t[`http.route`])??Q(t[`url.path`])??FN(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:FN(e.name)}:{role:`function`,label:FN(e.name)}}function LN(e){let t=Q(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function RN(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=LN(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=LN(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=LN(n[`gen_ai.prompt`])):r.input=LN(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=LN(n[`gen_ai.completion`])):r.output=LN(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=LN(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=LN(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function zN(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function BN(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=IN(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),zN(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=RN(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:kN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:AN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(kN,e),a.set(AN,t);for(let e of d)u.has(e.id)||c(kN,e.id),l.has(e.id)||c(e.id,AN)}return{nodes:[...a.values()],edges:[...s.values()]}}function VN(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var HN=7.2,UN=28,WN=96,GN=280,KN=32,qN=24;function JN(e){let t=e.label.length*HN+UN,n=e.count>1?34:0;return Math.max(WN,Math.min(GN,t+n))}function YN(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,JN(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??WN)+KN,0)),g=Math.max(...h,WN),_=[];return f.forEach((e,t)=>{let n=qN+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??WN;_.push({...e,x:n,y:qN+t*122,width:i,layer:t}),n+=i+KN}}),{nodes:_,edges:n,width:g+48,height:48+(d+1)*122}}var XN={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},ZN=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],QN=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
23
+ — anything following the spec.</p></div>`),VN=V(`<div class="flex flex-col h-full"><!> <div class="flex-1 overflow-hidden"><!></div></div>`),HN=V(`<div class="p-6 text-sm text-fg-subtle">Select a span (in List) to trace its run, or wait for a multi-span run
24
+ to arrive.</div>`),UN=V(`<div class="flex flex-col h-full"><!> <!> <div class="flex-1 overflow-hidden"><!></div></div>`),WN=V(`<div class="flex items-center justify-between px-3 pt-2"><button type="button" class="@md:hidden inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors"><!> Back</button> <button type="button" class="ml-auto inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Open in Traces</button></div> <!> <!> <!>`,1),GN=V(`<div class="flex flex-col h-full"><!> <!> <div class="@container flex flex-1 overflow-hidden"><div><!></div> <div><!></div></div></div>`);function KN(e,t){it(t,!0);let n=e=>{var t=FN(),n=F(t);Pm(F(n),{size:12}),Ke(),D(n);var r=L(n,2),i=F(r);Jm(i,{size:12});var a=L(i,2),s=e=>{H(e,PN())};W(a,e=>{z(p)||e(s)}),D(r);var c=L(r,2);Mm(F(c),{size:12}),Ke(),D(c);var l=L(c,2);Ph(F(l),{size:12}),Ke(),D(l),D(t),R((e,t,i,a)=>{q(n,1,e),r.disabled=!z(p)&&!1,q(r,1,t),q(c,1,i),l.disabled=z(g).length===0||z(y),q(l,1,a)},[()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`list`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`timeline`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,z(o)===`trace`?`bg-surface border border-line text-fg shadow-sm`:`text-fg-subtle hover:text-fg-muted`)),()=>K($(`ml-auto inline-flex items-center gap-1 px-2 py-1 rounded text-xs font-medium transition-colors`,`text-accent hover:bg-accent/10 disabled:opacity-40 disabled:hover:bg-transparent`))]),B(`click`,n,()=>P(o,`list`)),B(`click`,r,()=>P(o,`timeline`)),B(`click`,c,()=>P(o,`trace`)),B(`click`,l,S),H(e,t)},r=e=>{var t=zN(),n=I(t),r=F(n),o=F(r),p=F(o);D(o);var h=L(o,2),g=F(h);D(h),D(r),$_(L(r,2),{get value(){return z(s)},onValue:e=>Bl.value=e,class:``,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by model, operation, agent…`,ariaLabel:`Filter GenAI spans`}),D(n);var _=L(n,2),v=F(_),S=e=>{H(e,IN())};W(v,e=>{z(c).length===0&&e(S)}),G(L(v,2),19,()=>z(c),e=>e.normalized.spanId,(e,t,n)=>{let r=M(()=>z(t).normalized.spanId===z(f)?.normalized.spanId),i=M(()=>z(t).normalized.status===`error`),o=M(()=>tM(z(t).normalized));var s=RN(),c=F(s),d=F(c),p=F(d),m=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);up(e,{size:11,get class(){return z(t)}})}},h=e=>{{let t=M(()=>z(i)?`text-danger`:`text-accent`);ng(e,{size:11,get class(){return z(t)}})}},g=e=>{{let t=M(()=>z(i)?`text-danger`:`text-fg-subtle`);Hp(e,{size:11,get class(){return z(t)}})}};W(p,e=>{z(o).kind===`agent`?e(m):z(o).kind===`tool`?e(h,1):e(g,-1)});var _=L(p,2),v=F(_,!0);D(_),D(d);var S=L(d,2),C=F(S),w=F(C,!0);D(C);var T=L(C,4),ee=F(T,!0);D(T);var te=L(T,4),ne=F(te,!0);D(te);var re=L(te,2),ie=F(re,!0);D(re),D(S);var ae=L(S,2),oe=e=>{var n=LN(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(ae,e=>{z(t).service&&e(oe)}),D(c),Ho(c,(e,t)=>l[t]=e,e=>l?.[e],()=>[z(n)]),D(s),R((e,i,a,l)=>{J(s,`aria-selected`,z(r)),J(c,`data-row-index`,z(n)),q(c,1,e),U(v,z(o).text),U(w,z(t).normalized.operation),U(ee,i),U(ne,a),U(ie,l)},[()=>K($(`w-full text-left px-3 py-2 hover:bg-subtle transition-colors`,z(r)&&`bg-hover hover:bg-hover`,z(n)===u.cursor&&`ring-1 ring-inset ring-accent bg-accent/10`)),()=>od(z(t).normalized.endMs-z(t).normalized.startMs),()=>jN(z(t).normalized.usage),()=>MN(z(t).normalized.cost)]),B(`click`,c,()=>{if(u.cursor=z(n),P(a,z(t).normalized.spanId,!0),z(y)){let e=z(x).findIndex(e=>e.span.spanId===z(t).normalized.spanId);e>=0&&P(b,e,!0)}}),H(e,s)}),D(_),R(()=>{U(p,`Spans (${(z(d)?`${z(c).length} of ${z(i).length}`:z(i).length)??``})`),U(g,`${z(m)??``} run${z(m)===1?``:`s`}`)}),B(`keydown`,_,function(...e){u.onKeyDown?.apply(this,e)}),H(e,t)},i=M(()=>nu.value),a=N(null),o=N(`list`),s=M(()=>Bl.value),c=M(()=>z(i).filter(e=>NN(e,z(s)))),l=_r([]),u=qA({count:()=>z(c).length,fromUnsetUp:`last`,onActivate:e=>{P(a,z(c)[e].normalized.spanId,!0)},scrollToIndex:e=>l[e]?.scrollIntoView({block:`nearest`})}),d=M(()=>z(s).length>0),f=M(()=>z(c).find(e=>e.normalized.spanId===z(a))??z(c)[0]??z(i).find(e=>e.normalized.spanId===z(a))??z(i)[0]),p=M(()=>z(i).some(e=>e.normalized.conversationId)),m=M(()=>eM(z(i)).length),h=M(()=>z(a)!==null),g=M(()=>AN(z(i),z(f)?.normalized.spanId??z(a)??void 0)),_=M(()=>$j(z(g).map(e=>e.normalized))),v=M(()=>aN(z(g).map(e=>e.normalized))),y=N(!1),b=N(0),x=M(()=>z(y)?kN(z(g).map(e=>e.normalized)):[]);function S(){z(g).length!==0&&(P(o,`list`),z(a)===null&&P(a,z(g)[0].normalized.spanId,!0),P(b,0),P(y,!0))}function C(){P(y,!1)}Lr(()=>{if(!z(y))return;let e=z(x)[z(b)]?.span.spanId;e&&e!==z(a)&&P(a,e,!0)});var w=ua(),T=I(w),ee=e=>{var t=BN(),n=F(t);Rm(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},te=e=>{var t=VN(),r=F(t);n(r);var s=L(r,2),c=F(s);{let e=M(()=>z(f)?.normalized.spanId??null);QM(c,{get rows(){return z(i)},get selectedSpanId(){return z(e)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}D(s),D(t),H(e,t)},ne=e=>{var t=UN(),r=F(t);n(r);var i=L(r,2),s=e=>{SN(e,{get summary(){return z(_)}})};W(i,e=>{z(_).spanCount>0&&e(s)});var c=L(i,2),l=F(c),u=e=>{H(e,HN())},d=e=>{{let t=M(()=>z(f)?.normalized.spanId??null);_N(e,{get nodes(){return z(v)},get selectedSpanId(){return z(t)},onSelectSpan:e=>{P(a,e,!0),P(o,`list`)}})}};W(l,e=>{z(g).length===0?e(u):e(d,-1)}),D(c),D(t),H(e,t)},re=e=>{var t=GN(),i=F(t);n(i);var o=L(i,2),s=e=>{wN(e,{get steps(){return z(x)},onClose:C,get index(){return z(b)},set index(e){P(b,e,!0)}})};W(o,e=>{z(y)&&z(x).length>0&&e(s)});var c=L(o,2),l=F(c),u=F(l);r(u),D(l);var d=L(l,2),p=F(d),m=e=>{var t=WN(),n=I(t),r=F(n);np(F(r),{size:11}),Ke(),D(r);var i=L(r,2);Xp(F(i),{size:11}),Ke(),D(i),D(n);var o=L(n,2),s=e=>{SN(e,{get summary(){return z(_)}})};W(o,e=>{z(_).spanCount>0&&e(s)});var c=L(o,2);mM(c,{get span(){return z(f).normalized},onOpenTrace:()=>Fu(z(f).traceId,z(f).normalized.spanId)}),GM(L(c,2),{get span(){return z(f).normalized}}),B(`click`,r,()=>P(a,null)),B(`click`,i,()=>Fu(z(f).traceId,z(f).normalized.spanId)),H(e,t)};W(p,e=>{z(f)&&e(m)}),D(d),D(c),D(t),R((e,t)=>{q(l,1,e),q(d,1,t)},[()=>K($(`flex flex-col w-full border-line @md:w-72 @md:shrink-0 @md:border-r`,z(h)&&`hidden @md:flex`)),()=>K($(`flex-1 overflow-y-auto w-full`,!z(h)&&`hidden @md:block`))]),H(e,t)};W(T,e=>{z(i).length===0?e(ee):z(o)===`timeline`?e(te,1):z(o)===`trace`?e(ne,2):e(re,-1)}),H(e,w),at()}ea([`click`,`keydown`]);var qN=`__start__`,JN=`__end__`;function YN(e){return e[`ai.toolCall.name`]!=null||e[`operation.name`]===`ai.toolCall`||e[`ai.operationId`]===`ai.toolCall`||e[`gen_ai.operation.name`]===`execute_tool`||e[`gen_ai.tool.name`]!=null}function XN(e){return e[`gen_ai.system`]!=null||e[`gen_ai.provider.name`]!=null||e[`ai.model.provider`]!=null||e[`gen_ai.request.model`]!=null||e[`ai.model.id`]!=null}function ZN(e){return e[`db.system.name`]!=null||e[`db.system`]!=null||e[`db.statement`]!=null||e[`db.query.text`]!=null}function QN(e,t){return e.kind===`CLIENT`&&(t[`http.method`]!=null||t[`http.request.method`]!=null||t[`url.full`]!=null||t[`http.url`]!=null)}function $N(e){let t=e.lastIndexOf(`:`);return t>0&&e.slice(t+1).startsWith(`ai.`)?e.slice(t+1):e}function eP(e){let t=e.attributes??{};return YN(t)?{role:`tool`,label:Q(t[`ai.toolCall.name`])??Q(t[`gen_ai.tool.name`])??$N(e.name)}:XN(t)?{role:`llm`,label:$N(e.name)}:ZN(t)?{role:`db`,label:Q(t[`db.operation.name`])??Q(t[`db.operation`])??Q(t[`db.system.name`])??Q(t[`db.system`])??$N(e.name)}:QN(e,t)?{role:`http`,label:Q(t[`http.route`])??Q(t[`url.path`])??$N(e.name)}:e.kind===`SERVER`||e.kind===`CONSUMER`?{role:`entry`,label:$N(e.name)}:{role:`function`,label:$N(e.name)}}function tP(e){let t=Q(e);if(t===void 0)return e;let n=t.trim();if(!n||n[0]!==`{`&&n[0]!==`[`)return e;try{return JSON.parse(n)}catch{return e}}function nP(e,t){let n=e.attributes??{},r={};return t===`tool`?(n[`ai.toolCall.args`]!=null&&(r.input=tP(n[`ai.toolCall.args`])),n[`ai.toolCall.result`]!=null&&(r.output=tP(n[`ai.toolCall.result`]))):t===`llm`?(n[`ai.prompt`]==null?n[`gen_ai.prompt`]!=null&&(r.input=tP(n[`gen_ai.prompt`])):r.input=tP(n[`ai.prompt`]),n[`ai.response.text`]==null?n[`gen_ai.completion`]!=null&&(r.output=tP(n[`gen_ai.completion`])):r.output=tP(n[`ai.response.text`])):t===`db`&&(n[`db.statement`]==null?n[`db.query.text`]!=null&&(r.input=n[`db.query.text`]):r.input=n[`db.statement`]),r.input===void 0&&(r.input=tP(n[`autotel.input`]??n[`code.function.input`]??n.input??n[`rpc.request.body`])),r.output===void 0&&(r.output=tP(n[`autotel.output`]??n[`code.function.output`]??n.output??n[`rpc.response.body`])),r}function rP(e,t){if(!t)return;let n=e.metrics??{};t.inputTokens!=null&&(n.inputTokens=(n.inputTokens??0)+t.inputTokens),t.outputTokens!=null&&(n.outputTokens=(n.outputTokens??0)+t.outputTokens),t.costUsd!=null&&(n.costUsd=(n.costUsd??0)+t.costUsd),e.metrics=n}function iP(e,t={}){let n=t.bookends??!0,r=new Map;for(let t of e)r.set(t.spanId,t);let i=new Map,a=new Map,o=[...e].sort((e,t)=>e.startTime-t.startTime);for(let e of o){let{role:n,label:r}=eP(e),o=`${n}|${r}`;i.set(e.spanId,o);let s=a.get(o);if(s||(s={id:o,label:r,role:n,count:0,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},a.set(o,s)),s.count++,e.status?.code===`ERROR`&&s.errorCount++,s.totalDurationMs+=e.duration,s.spanIds.push(e.spanId),rP(s,t.metricsBySpanId?.get(e.spanId)),s.sample.input===void 0&&s.sample.output===void 0){let t=nP(e,n);(t.input!==void 0||t.output!==void 0)&&(s.sample=t)}}let s=new Map,c=(e,t)=>{if(e===t)return;let n=`${e}>${t}`,r=s.get(n);r?r.count++:s.set(n,{source:e,target:t,count:1})},l=new Set,u=new Set;for(let e of o){let t=i.get(e.spanId),n=e.parentSpanId?r.get(e.parentSpanId):void 0;if(n){let e=i.get(n.spanId);e!==t&&(c(e,t),l.add(e),u.add(t))}}let d=[...a.values()];if(n&&d.length>0){let e={id:qN,label:`__start__`,role:`entry`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}},t={id:JN,label:`__end__`,role:`end`,count:1,errorCount:0,totalDurationMs:0,spanIds:[],sample:{}};a.set(qN,e),a.set(JN,t);for(let e of d)u.has(e.id)||c(qN,e.id),l.has(e.id)||c(e.id,JN)}return{nodes:[...a.values()],edges:[...s.values()]}}function aP(e){let t={};for(let n of e){if(!n.metrics)continue;let{inputTokens:e,outputTokens:r,costUsd:i}=n.metrics;e!=null&&(t.inputTokens=(t.inputTokens??0)+e),r!=null&&(t.outputTokens=(t.outputTokens??0)+r),i!=null&&(t.costUsd=(t.costUsd??0)+i)}return t}var oP=7.2,sP=28,cP=96,lP=280,uP=32,dP=24;function fP(e){let t=e.label.length*oP+sP,n=e.count>1?34:0;return Math.max(cP,Math.min(lP,t+n))}function pP(e){let{nodes:t,edges:n}=e;if(t.length===0)return{nodes:[],edges:[],width:0,height:0};let r=t.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of n)i.get(e.source)?.push(e.target),a.get(e.target)?.push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:[r[0]],l=[...c];for(let e of c)o.set(e,0);let u=0;for(;l.length&&u++<r.length*r.length+r.length;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<t+1&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let d=Math.max(...o.values()),f=Array.from({length:d+1},()=>[]);for(let e of r)f[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=d;e++){let t=f[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),f[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let p=new Map(t.map(e=>[e.id,e])),m=new Map(t.map(e=>[e.id,fP(e)])),h=f.map(e=>e.reduce((e,t)=>e+(m.get(t)??cP)+uP,0)),g=Math.max(...h,cP),_=[];return f.forEach((e,t)=>{let n=dP+(g-h[t])/2;for(let r of e){let e=p.get(r),i=m.get(r)??cP;_.push({...e,x:n,y:dP+t*122,width:i,layer:t}),n+=i+uP}}),{nodes:_,edges:n,width:g+48,height:48+(d+1)*122}}var mP={entry:{fill:`fill-emerald-500/15`,stroke:`stroke-emerald-500/60`,text:`fill-emerald-600`,dot:`bg-emerald-500`,label:`Entry`},end:{fill:`fill-rose-500/15`,stroke:`stroke-rose-500/60`,text:`fill-rose-600`,dot:`bg-rose-500`,label:`End`},llm:{fill:`fill-blue-500/15`,stroke:`stroke-blue-500/60`,text:`fill-blue-600`,dot:`bg-blue-500`,label:`LLM`},tool:{fill:`fill-violet-500/15`,stroke:`stroke-violet-500/60`,text:`fill-violet-600`,dot:`bg-violet-500`,label:`AI tool`},function:{fill:`fill-amber-500/15`,stroke:`stroke-amber-500/60`,text:`fill-amber-600`,dot:`bg-amber-500`,label:`Function`},db:{fill:`fill-teal-500/15`,stroke:`stroke-teal-500/60`,text:`fill-teal-600`,dot:`bg-teal-500`,label:`Database`},http:{fill:`fill-sky-500/15`,stroke:`stroke-sky-500/60`,text:`fill-sky-600`,dot:`bg-sky-500`,label:`HTTP`}},hP=[`entry`,`llm`,`tool`,`function`,`db`,`http`,`end`],gP=V(`<div class="p-6 text-sm text-fg-subtle"><div class="flex items-center gap-2 mb-2 text-fg-muted font-medium"><!> No flow to show yet</div> <p>The Flow view turns a trace into a call graph — entry points, LLM calls,
25
25
  AI tool calls and plain functions, with repeated calls collapsed into one
26
26
  node (e.g. <code class="text-xs">calculate (5)</code>). Send a trace to
27
- devtools and it appears here.</p></div>`),$N=V(`<option> </option>`),eP=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),tP=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),nP=V(`<span> </span>`),rP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),iP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),aP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),oP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),sP=ca(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),cP=ca(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),lP=ca(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),uP=ca(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),dP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),fP=V(`<span>·</span> <span class="text-danger"> </span>`,1),pP=V(`<span>·</span> <span> </span>`,1),mP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),hP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),gP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),_P=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),vP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),yP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),bP=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function xP(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=tu.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?YN(BN(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?VN(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return R_(t,[e.label,XN[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||Pu(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null)}}Lr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=la(),w=I(C),T=e=>{var t=QN(),n=F(t);$h(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=bP(),o=F(t),f=F(o),b=e=>{var t=eP();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=$N(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),lo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=tP(),n=F(t);$h(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=rP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=nP(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Oj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>Dj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>$(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));L_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=iP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>ZN,e=>e,(e,t)=>{var n=aP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${XN[t].label??``}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,XN[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=oP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=cP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=la(),a=I(i),o=e=>{var i=sP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K($(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>XN[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=uP(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=lP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K($(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+22),q(d,0,i),U(f,a)},[()=>K($(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K($(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K($(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>XN[z(u).role]);var n=yP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);Q_(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=dP(),n=I(t);Yp(F(n),{size:11}),Ke(),D(n),Q_(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=fP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=pP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>ad(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=hP(),n=F(t);Lp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=mP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Oj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>Dj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=gP(),n=F(t);{let e=M(()=>Qj(z(u).sample.input));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=_P(),n=F(t);{let e=M(()=>Qj(z(u).sample.output));P_(n,{get content(){return z(e)},children:(e,t)=>{eM(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=vP();Lm(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
28
- ${z(u).count===1?`call`:`calls`}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}ea([`focusin`,`focusout`,`click`,`keydown`]);var SP=(e,t=p,n=p)=>{var r=wP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},CP=(e,t=p,n=p,r=p)=>{var i=la(),a=I(i),o=e=>{var i=TP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>Mu(r())),H(e,i)},s=e=>{SP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},wP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),TP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),EP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),DP=V(`<option> </option>`),OP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),kP=V(`<div class="space-y-2"></div>`),AP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function jP(e,t){it(t,!0);let n=(e,t=p)=>{var n=EP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);SP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);CP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);CP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);CP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?od(t().lastSeen):`n/a`);SP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K($(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>eu.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&R_(e,[t.name]))});var l=AP(),u=F(l),d=F(u),f=F(d),m=F(f);dp(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);xo(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=DP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;co(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,OP())},w=e=>{var t=kP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),So(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,so(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}ea([`click`,`input`,`change`]);var MP=200,NP=70,PP=20;function FP(e,t){return ms(e,t)}function IP(e){let t=e.attributes||{};return t[`db.system.name`]||t[`db.system`]||t[`db.namespace`]||t[`db.name`]||t[`db.query.text`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system.name`]||t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function LP(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function RP(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=FP(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=IP(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?FP(e,r.service):void 0)||us(i.attributes,`peer.service`,`http.host`,`db.system.name`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r){if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:IP(i)});else{let e=t.get(s),n=IP(i);n!==`service`&&(e.nodeType=n)}}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=LP(a,50),r.p99Latency=LP(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=FP(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function zP(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-NP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-NP))/2,i=e*MP+70+PP;t.forEach((e,t)=>{n.set(e,{x:i-70,y:r+t*122+PP})})}return n}function BP(e,t,n){return Math.min(n,Math.max(t,e))}function VP(e,t,n,r,i){let a=BP(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function HP(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=BP(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function UP(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(_r({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(VP({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(HP(e,t(),n(),c,a,o))},reset:g}}var WP=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=GP(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K($(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},GP=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),KP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),qP=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),JP=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),YP=ca(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),XP=ca(`<rect fill="none" class="stroke-accent"></rect>`),ZP=ca(`<rect></rect><path></path><ellipse></ellipse>`,1),QP=ca(`<polygon></polygon>`),$P=ca(`<rect></rect>`),eF=ca(`<rect fill="#64748b"></rect>`),tF=ca(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),nF=ca(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),rF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),iF=V(`<span class="text-danger"> </span>`),aF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),oF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),sF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),cF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function lF(e,t){it(t,!0);let n=M(()=>vl.value),r=N(null),i=N(null),a=N(``),o=M(()=>RP(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return R_(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>zP(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=UP({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:ad(e.avgLatency),minLatency:ad(e.minLatency),maxLatency:ad(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:ad(e.avgLatency)}))},null,2)});var w=la(),T=I(w),ee=e=>{var t=KP();Zf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=qP();Th(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=cF(),n=F(t),o=F(n),u=F(o);Zf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);L_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,JP())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);oo(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+26),l=M(()=>z(i).x),u=M(()=>z(i).y+26),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${ad(z(t).p50Latency)}`:`${z(t).requestCount}× · ${ad(z(t).p50Latency)}`);var m=YP(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K($(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=la(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>hg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=nF(),_=F(g),v=e=>{var t=XP();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=ZP(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A68,6 0 0,0 138,46 L138,6 A68,6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,70),J(i,`rx`,68),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=QP();R(()=>{J(t,`points`,`70,2 138,13 138,39 70,50 2,39 2,13`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=$P();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=eF();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=tF(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,70),J(re,`y`,23),U(ie,r),J(ae,`x`,70),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K($(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),$i(`mouseenter`,g,()=>P(i,z(t).id,!0)),$i(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Vo(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);lh(F(ue),{size:14}),D(ue);var de=L(ue,2);Vm(F(de),{size:14}),D(de);var fe=L(de,2);yh(F(fe),{size:14}),D(fe);var pe=L(fe,2);hh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=sF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),Q_(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);P_(l,{get content(){return z(C)},children:(e,t)=>{var n=rF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());WP(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());WP(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);WP(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>ad(z(y).avgLatency));WP(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>ad(z(y).minLatency));WP(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>ad(z(y).maxLatency));WP(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=oF(),n=F(t);Q_(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=aF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{rp(e,{size:10})},l=e=>{rp(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=iF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>ad(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K($(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),$i(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}ea([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function uF(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return pF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function dF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,pF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function fF(e,t){return pF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function pF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return mF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function mF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function hF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _F(e){let t,n,r;e.length===2?(t=e===hF||e===gF?e:vF,n=e,r=e):(t=hF,n=(t,n)=>hF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function vF(){return 0}function yF(e){return e===null?NaN:+e}var bF=_F(hF),xF=bF.right;bF.left,_F(yF).center;var SF=Math.sqrt(50),CF=Math.sqrt(10),wF=Math.sqrt(2);function TF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=SF?10:a>=CF?5:a>=wF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?TF(e,t,n*2):[s,c,l]}function EF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?TF(t,e,n):TF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function DF(e,t,n){return t=+t,e=+e,n=+n,TF(e,t,n)[2]}function OF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?DF(t,e,n):DF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function kF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function AF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function jF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function MF(){}var NF=.7,PF=1/NF,FF=`\\s*([+-]?\\d+)\\s*`,IF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,LF=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,RF=/^#([0-9a-f]{3,8})$/,zF=RegExp(`^rgb\\(${FF},${FF},${FF}\\)$`),BF=RegExp(`^rgb\\(${LF},${LF},${LF}\\)$`),VF=RegExp(`^rgba\\(${FF},${FF},${FF},${IF}\\)$`),HF=RegExp(`^rgba\\(${LF},${LF},${LF},${IF}\\)$`),UF=RegExp(`^hsl\\(${IF},${LF},${LF}\\)$`),WF=RegExp(`^hsla\\(${IF},${LF},${LF},${IF}\\)$`),GF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};AF(MF,XF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KF,formatHex:KF,formatHex8:qF,formatHsl:JF,formatRgb:YF,toString:YF});function KF(){return this.rgb().formatHex()}function qF(){return this.rgb().formatHex8()}function JF(){return lI(this).formatHsl()}function YF(){return this.rgb().formatRgb()}function XF(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=RF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ZF(t):n===3?new tI(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?QF(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?QF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=zF.exec(e))?new tI(t[1],t[2],t[3],1):(t=BF.exec(e))?new tI(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VF.exec(e))?QF(t[1],t[2],t[3],t[4]):(t=HF.exec(e))?QF(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UF.exec(e))?cI(t[1],t[2]/100,t[3]/100,1):(t=WF.exec(e))?cI(t[1],t[2]/100,t[3]/100,t[4]):GF.hasOwnProperty(e)?ZF(GF[e]):e===`transparent`?new tI(NaN,NaN,NaN,0):null}function ZF(e){return new tI(e>>16&255,e>>8&255,e&255,1)}function QF(e,t,n,r){return r<=0&&(e=t=n=NaN),new tI(e,t,n,r)}function $F(e){return e instanceof MF||(e=XF(e)),e?(e=e.rgb(),new tI(e.r,e.g,e.b,e.opacity)):new tI}function eI(e,t,n,r){return arguments.length===1?$F(e):new tI(e,t,n,r??1)}function tI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}AF(tI,eI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new tI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tI(oI(this.r),oI(this.g),oI(this.b),aI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nI,formatHex:nI,formatHex8:rI,formatRgb:iI,toString:iI}));function nI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}`}function rI(){return`#${sI(this.r)}${sI(this.g)}${sI(this.b)}${sI((isNaN(this.opacity)?1:this.opacity)*255)}`}function iI(){let e=aI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${oI(this.r)}, ${oI(this.g)}, ${oI(this.b)}${e===1?`)`:`, ${e})`}`}function aI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sI(e){return e=oI(e),(e<16?`0`:``)+e.toString(16)}function cI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dI(e,t,n,r)}function lI(e){if(e instanceof dI)return new dI(e.h,e.s,e.l,e.opacity);if(e instanceof MF||(e=XF(e)),!e)return new dI;if(e instanceof dI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new dI(o,s,c,e.opacity)}function uI(e,t,n,r){return arguments.length===1?lI(e):new dI(e,t,n,r??1)}function dI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}AF(dI,uI,jF(MF,{brighter(e){return e=e==null?PF:PF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?NF:NF**+e,new dI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new tI(mI(e>=240?e-240:e+120,i,r),mI(e,i,r),mI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dI(fI(this.h),pI(this.s),pI(this.l),aI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=aI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${fI(this.h)}, ${pI(this.s)*100}%, ${pI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function fI(e){return e=(e||0)%360,e<0?e+360:e}function pI(e){return Math.max(0,Math.min(1,e||0))}function mI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var hI=e=>()=>e;function gI(e,t){return function(n){return e+n*t}}function _I(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function vI(e){return(e=+e)==1?yI:function(t,n){return n-t?_I(t,n,e):hI(isNaN(t)?n:t)}}function yI(e,t){var n=t-e;return n?gI(e,n):hI(isNaN(e)?t:e)}var bI=(function e(t){var n=vI(t);function r(e,t){var r=n((e=eI(e)).r,(t=eI(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=yI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function xI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function SI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function CI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=MI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function wI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function TI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function EI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=MI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var DI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,OI=new RegExp(DI.source,`g`);function kI(e){return function(){return e}}function AI(e){return function(t){return e(t)+``}}function jI(e,t){var n=DI.lastIndex=OI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=DI.exec(e))&&(i=OI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:TI(r,i)})),n=OI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?AI(c[0].x):kI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function MI(e,t){var n=typeof t,r;return t==null||n===`boolean`?hI(t):(n===`number`?TI:n===`string`?(r=XF(t))?(t=r,bI):jI:t instanceof XF?bI:t instanceof Date?wI:SI(t)?xI:Array.isArray(t)?CI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?EI:TI)(e,t)}function NI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function PI(e){return function(){return e}}function FI(e){return+e}var II=[0,1];function LI(e){return e}function RI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:PI(isNaN(t)?NaN:.5)}function zI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function BI(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=RI(i,r),a=n(o,a)):(r=RI(r,i),a=n(a,o)),function(e){return a(r(e))}}function VI(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=RI(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=xF(e,t,1,r)-1;return a[n](i[n](t))}}function HI(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function UI(){var e=II,t=II,n=MI,r,i,a,o=LI,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==LI&&(o=zI(e[0],e[n-1])),s=n>2?VI:BI,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),TI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,FI),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=NI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:LI,u()):o!==LI},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function WI(){return UI()(LI,LI)}function GI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function KI(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qI(e){return e=KI(Math.abs(e)),e?e[1]:NaN}function JI(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function YI(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var XI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ZI(e){if(!(t=XI.exec(e)))throw Error(`invalid format: `+e);var t;return new QI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ZI.prototype=QI.prototype;function QI(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}QI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function $I(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var eL;function tL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(eL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+KI(e,Math.max(0,t+a-1))[0]}function nL(e,t){var n=KI(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var rL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:GI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nL(e*100,t),r:nL,s:tL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function iL(e){return e}var aL=Array.prototype.map,oL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function sL(e){var t=e.grouping===void 0||e.thousands===void 0?iL:JI(aL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?iL:YI(aL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=ZI(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):rL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=rL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=$I(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?oL[8+eL/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=ZI(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3,i=10**-r,a=oL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var cL,lL,uL;dL({thousands:`,`,grouping:[3],currency:[`$`,``]});function dL(e){return cL=sL(e),lL=cL.format,uL=cL.formatPrefix,cL}function fL(e){return Math.max(0,-qI(Math.abs(e)))}function pL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qI(t)/3)))*3-qI(Math.abs(e)))}function mL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qI(t)-qI(e))+1}function hL(e,t,n,r){var i=OF(e,t,n),a;switch(r=ZI(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=pL(i,o))&&(r.precision=a),uL(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=mL(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=fL(i))&&(r.precision=a-(r.type===`%`)*2)}return lL(r)}function gL(e){var t=e.domain;return e.ticks=function(e){var n=t();return EF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=DF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function _L(){var e=WI();return e.copy=function(){return HI(e,_L())},kF.apply(e,arguments),gL(e)}function vL(e){return function(){return e}}var yL=Math.PI,bL=2*yL,xL=1e-6,SL=bL-xL;function CL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function wL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return CL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var TL=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?CL:wL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>xL){if(!(Math.abs(u*s-c*l)>xL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((yL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>xL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>xL||Math.abs(this._y1-l)>xL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%bL+bL),d>SL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>xL&&this._append`A${n},${n},0,${+(d>=yL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};TL.prototype;function EL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new TL(t)}Array.prototype.slice;function DL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function OL(e){this._context=e}OL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function kL(e){return new OL(e)}function AL(e){return e[0]}function jL(e){return e[1]}function ML(e,t){var n=vL(!0),r=null,i=kL,a=null,o=EL(s);e=typeof e==`function`?e:e===void 0?AL:vL(e),t=typeof t==`function`?t:t===void 0?jL:vL(t);function s(s){var c,l=(s=DL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:vL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function NL(e,t,n){var r=null,i=vL(!0),a=null,o=kL,s=null,c=EL(l);e=typeof e==`function`?e:e===void 0?AL:vL(+e),t=typeof t==`function`?t:vL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?jL:vL(+n);function l(l){var u,d,f,p=(l=DL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return ML().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:vL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:vL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:vL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:vL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:vL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var PL=ca(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),FL=V(`<span>—</span>`);function IL(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=_L().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=_L().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return ML().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=la(),c=I(s),l=e=>{var a=PL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K($(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=FL();R(e=>{q(i,1,e),oo(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K($(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function LL(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function RL(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function zL(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${KL(t[0])}`:n===t.length?`>${KL(t[t.length-1])}`:`${KL(t[n-1])}–${KL(t[n])}`,count:e,from:r,to:i}}):[]}function BL(e){if(e.bucketCounts&&e.explicitBounds)return zL(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(VL(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${KL(t)}–${KL(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return VL(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function VL(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${KL(c)}–${KL(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function HL(e,t){if(e.bucketCounts&&e.explicitBounds)return RL(e.bucketCounts,e.explicitBounds,t);let n=BL(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function UL(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function WL(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function GL(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function KL(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function qL(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function JL(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=HL(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function YL(e){let t=e.filter(e=>BL(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=BL(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>BL(e).length===r.length&&BL(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>BL(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:BL(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var XL=V(`<div>No data in this window</div>`),ZL=ca(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),QL=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),$L=ca(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),eR=ca(`<path opacity="0.15"></path>`),tR=ca(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),nR=ca(`<circle r="2.5"></circle>`),rR=ca(`<!><!>`,1),iR=ca(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),aR=ca(`<svg role="img"><g><!><!><!><!></g></svg>`);function oR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:GL(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?qL(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?_L().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?_L().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?WL(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?WL(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:ML().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return hg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:NL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=la(),T=I(w),ee=e=>{var n=XL();R(e=>{q(n,1,e),oo(n,`height:${r()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=aR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=la(),i=I(r),a=e=>{var r=ZL(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=la(),i=I(r),a=e=>{var r=QL(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=la();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=la(),a=I(i),o=e=>{var n=$L();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=la();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=rR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=la(),i=I(r),a=e=>{var r=eR();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=tR();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=nR();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=iR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K($(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}ea([`click`,`keydown`]);var sR=V(`<div>No bucket data on this point</div>`),cR=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),lR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),uR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),dR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function fR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>BL(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:HL(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=la(),u=I(l),d=e=>{var r=sR();R(e=>{q(r,1,e),oo(r,`height:${n()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=dR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=cR(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),oo(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=lR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=uR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),oo(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K($(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var pR=V(`<div>No bucketed data in this window</div>`),mR=V(`<span class="ml-0.5"> </span>`),hR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),gR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),_R=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),vR=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function yR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>YL(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=la(),s=I(o),c=e=>{var n=pR();R(e=>q(n,1,e),[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=vR(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=hR(),a=F(i,!0),o=L(a),s=e=>{var n=mR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{oo(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=_R();G(s,21,()=>[...z(o).cells].reverse(),Oa,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=gR();R((e,i,a)=>{oo(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K($(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var bR=V(`<div>No bucketed data in this window</div>`),xR=ca(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),SR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),CR=ca(`<path fill="var(--color-accent)"></path>`),wR=ca(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),TR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),ER=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function DR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>JL(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?_L().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?_L().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?WL(0,z(u).maxValue,4):[]),m=M(()=>z(u)?WL(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:NL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:ML().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=la(),C=I(S),w=e=>{var n=bR();R(e=>{q(n,1,e),oo(n,`height:${i()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=ER(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=la(),i=I(r),a=e=>{var r=xR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=la(),i=I(r),a=e=>{var r=SR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=la(),a=I(i),o=e=>{var i=CR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=la(),i=I(r),a=e=>{var r=wR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=TR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K($(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var OR=V(`<button type="button"><!> </button>`),kR=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),AR=V(`<option> </option>`),jR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),MR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),NR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),PR=V(`<div><!> <!></div>`);function FR(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Uh},{id:`percentiles`,label:`Percentiles`,icon:_p},{id:`heatmap`,label:`Heatmap`,icon:_m}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=PR(),l=F(c),u=e=>{var n=kR();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=OR(),a=F(i);Ra(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=NR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=AR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;co(o),D(a);var l=L(a,2),u=e=>{var n=jR(),r=F(n);xo(r),Ke(),D(n),R(()=>Co(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=MR(),r=F(n);xo(r),Tm(L(r,2),{size:11}),Ke(),D(n),R(()=>Co(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,so(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K($(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}ea([`click`,`change`]);var IR=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),LR=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),RR=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),zR=V(`<span> </span>`),BR=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),VR=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),HR=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),UR=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),WR=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),GR=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),KR=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),qR=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),JR=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),YR=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function XR(e,t){it(t,!0);function n(){let e=pl.value;return(e?Zo(e):null)??globalThis.location.origin}let r=N(_r([])),i=N(null),a=N(_r([])),o=N(null),s=N(!1),c=N(``),l=M(()=>ml.value),u=N(_r(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await uF(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await dF({name:e,window:ks(Cs(ml.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){ml.value=e,z(i)&&_(z(i))}function x(e,t){Nu(e),Wc(e,t),Mu(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await fF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}Lr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?LL(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:hg(e.seriesId).stroke,label:ie(e),value:UL(z(m)?LL(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=YR(),se=F(oe),ce=F(se);yp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);uA(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=IR();Vh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);ph(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=LR(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,RR())},ve=e=>{var t=JR(),n=F(t),r=F(n);L_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=BR(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?LL(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);IL(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=zR(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
29
- series`)},[()=>K($(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,VR())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,HR())},b=e=>{var t=qR(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=UR(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);FR(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,WR())},g=e=>{yR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{DR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{fR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));oR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=KR();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=GR(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),oo(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K($(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}ea([`click`]);function ZR(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function QR(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function $R(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return QR(e.body)}}function ez(e,t,n){if(n!==`all`){let t=ZR(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return R_(t.toLowerCase(),[QR(e.body),e.severityText,e.resourceName,e.traceId])}function tz(e){let t=ZR(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function nz(e){let t=ZR(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function rz(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function iz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var az=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),oz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),sz=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),cz=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),lz=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),uz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),dz=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0 flex-1"> </span> <!></button> <!> <!></div> <!></div>`),fz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),pz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),mz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),hz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),gz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),_z=V(`<!> <!>`,1),vz=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function yz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>QR(t().body)),r=M(()=>tz(t())),i=M(()=>nz(t())),a=M(()=>z(c).has(t().id));var o=dz(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var b=L(_,2),x=e=>{var n=az(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(b,e=>{t().resourceName&&e(x)}),D(d);var S=L(d,2),C=e=>{var n=oz();km(F(n),{size:12}),D(n),B(`click`,n,()=>y(t())),H(e,n)};W(S,e=>{t().traceId&&e(C)});var w=L(S,2);{let e=M(()=>$R(t()));Q_(w,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var T=L(u,2),ee=e=>{var r=uz(),i=F(r);P_(i,{get content(){return z(n)},children:(e,t)=>{var r=sz(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>iz(t()));P_(e,{get content(){return z(n)},children:(e,n)=>{var r=cz(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>iz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=lz(),r=F(n);km(F(r),{size:12}),Ke(),D(r),Q_(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>y(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(T,e=>{z(a)&&e(ee)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(v,z(n))},[()=>K($(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>rz(t().timestamp),()=>K($(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>ql.value),i=M(()=>wl.value),a=M(()=>Ol.value),o=N(``),s=N(`all`),c=N(_r(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=jA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(pl.value?Zo(pl.value):null)??globalThis.location.origin}});Lr(()=>()=>u.dispose());let d=N(null),f=N(_r([]));Lr(()=>{let e=(pl.value?Zo(pl.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),pA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);Lr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);return e&&(t=z(o).length>0?z(h):_(z(h),z(r))),t.filter(t=>ez(t,e?``:z(o),z(s)))});function _(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let v=M(()=>z(o).length>0||z(s)!==`all`);function y(e){e.traceId&&(Nu(e.traceId),Mu(`traces`))}var b=vz(),x=F(b),S=F(x),C=F(S);rm(C,{size:16});var w=L(C);D(S);var T=L(S,2),ee=F(T),te=F(ee),ne=e=>{ah(e,{size:12})},re=e=>{th(e,{size:12})};W(te,e=>{z(i)?e(ne):e(re,-1)});var ie=L(te);D(ee);var ae=L(ee,2),oe=e=>{var t=fz();B(`click`,t,function(...e){Ou?.apply(this,e)}),H(e,t)};W(ae,e=>{z(i)&&z(a)>0&&e(oe)}),D(T),D(x);var se=L(x,2),ce=F(se);jb(ce,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var le=L(ce,2);uA(le,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var E=L(le,2);fA(E,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var ue=L(E,2),de=F(ue);de.value=de.__value=`all`;var fe=L(de);fe.value=fe.__value=`error`;var pe=L(fe);pe.value=pe.__value=`warn`;var me=L(pe);me.value=me.__value=`info`,D(ue);var he;co(ue),D(se);var ge=L(se,2),_e=F(ge),ve=e=>{H(e,pz())},ye=e=>{H(e,mz())},be=e=>{H(e,hz())},xe=e=>{var t=_z(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=gz(),n=F(t,!0);D(t),Xa(t,(e,t)=>MA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(_e,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ve):z(g).length===0&&!z(v)?e(ye,1):z(g).length===0?e(be,2):e(xe,-1)}),D(ge),D(b),R(e=>{U(w,` Logs (${z(g).length??``})`),q(ee,1,e),J(ee,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ie,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),he!==(he=z(s))&&(ue.value=(ue.__value=z(s))??``,so(ue,z(s)))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,ee,function(...e){Du?.apply(this,e)}),B(`change`,ue,e=>P(s,e.currentTarget.value,!0)),H(e,b),at()}ea([`click`,`change`]);var bz=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),xz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),Sz=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),Cz=V(`<li><!></li>`),wz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Tz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=la(),s=I(o),c=e=>{H(e,bz())},l=e=>{var n=wz();G(n,21,()=>t.frames,Oa,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=Cz(),c=F(s),l=e=>{var r=xz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K($(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=Sz(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var Ez=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
30
- rather than written.</p>`),Dz=V(`<button type="button" class="rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-hover">Open in editor</button>`),Oz=V(`<li><span class="w-8 shrink-0 select-none text-right text-fg-subtle"> </span> <span class="whitespace-pre"> </span></li>`),kz=V(`<div class="flex flex-col"><div class="flex items-center justify-between border-b border-line px-3 py-1.5"><span class="font-mono text-[11px] text-fg-subtle"> </span> <!></div> <ol class="overflow-x-auto py-1"></ol></div>`);function Az(e,t){it(t,!0);var n=la(),r=I(n),i=e=>{H(e,Ez())},a=e=>{var n=kz(),r=F(n),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var n=Dz();B(`click`,n,()=>t.onopen?.(t.window)),H(e,n)};W(o,e=>{t.onopen&&e(s)}),D(r);var c=L(r,2);G(c,21,()=>t.window.lines,Oa,(e,n,r)=>{let i=M(()=>t.window.startLine+r),a=M(()=>z(i)===t.window.line);var o=Oz(),s=F(o),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(o),R(e=>{J(o,`aria-current`,z(a)?`true`:void 0),q(o,1,e),U(c,z(i)),U(u,z(n))},[()=>K($(`flex gap-3 px-3 font-mono text-[11px] leading-5`,z(a)?`bg-danger-bg text-fg`:`text-fg-muted`))]),H(e,o)}),D(c),D(n),R(()=>U(a,`${t.window.file??``}:${t.window.line??``}`)),H(e,n)};W(r,e=>{t.window===null?e(i):e(a,-1)}),H(e,n),at()}ea([`click`]);function jz(e){return e.startsWith(`node:`)||e.startsWith(`[`)||e.startsWith(`<`)?`native`:/(^|[/\\])node_modules([/\\]|$)/.test(e)?`dependency`:`app`}var Mz=/^\s*at\s+(?:async\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/,Nz=/^\s*at\s+(?:async\s+)?(.+?):(\d+):(\d+)$/;function Pz(e){if(!e.startsWith(`file://`))return e;try{let t=decodeURIComponent(new URL(e).pathname);return/^\/[A-Za-z]:/.test(t)?t.slice(1):t}catch{return e}}function Fz(e){let t=[];for(let n of e.split(`
31
- `)){let e=Mz.exec(n);if(e){let n=Pz(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:jz(n)});continue}let r=Nz.exec(n);if(r){let e=Pz(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:jz(e)})}}return t}var Iz=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),Lz=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function Rz(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>Fz(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=la(),u=I(l),d=e=>{var t=Lz(),n=F(t);Tz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=Iz();Az(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function zz(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var Bz=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),Vz=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),Hz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),Uz=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),Wz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),Gz=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),Kz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),qz=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),Jz=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),Yz=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),Xz=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),Zz=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),Qz=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),$z=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),eB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),tB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),nB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function rB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=Xz(),c=F(s),l=F(c),u=F(l),d=e=>{Cp(e,{size:16,class:`text-fg-subtle`})},f=e=>{Dp(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=Bz(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);Q_(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Np(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Np(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=Yz(),r=F(n),i=e=>{var n=Hz(),r=L(F(n),2);Rz(r,{get stackTrace(){return t().stackTrace},get loadSource(){return ts}});var i=L(r,2);P_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=Vz(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=Wz(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,Oa,(e,t)=>{var n=Uz(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=Kz(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=Gz(),r=F(n),i=F(r);xm(i,{size:10});var a=L(i);Yp(L(a),{size:10}),D(r),Q_(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=Jz(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=qz(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>od(t().firstSeen),()=>od(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>zz(z(a)),()=>zz(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return R_(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?au.value:ou.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>su.value),f=M(()=>cu.value),m=IA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Nu(e),Mu(`traces`)}var v=nB(),y=F(v),b=F(y),x=F(b);Gh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=Zz(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=Qz(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;co(te),D(ee),D(y);var ae=L(y,2),oe=e=>{L_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=$z(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=eB();Gh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=tB();Ch(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=la();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Vo(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,so(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}ea([`click`,`change`,`keydown`]);var iB={info:0,warning:1,error:2,critical:3};function aB(e,t=`info`){return typeof e==`string`&&e in iB?e:t}function oB(e,t){return iB[e]>=iB[t]}var sB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function cB(e){return typeof e==`string`&&e.length>0?e:void 0}function lB(e,t){let n=e.attributes??{},r=cB(n[sB.event]),i=n[sB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:cB(n[sB.category]),outcome:cB(n[sB.outcome]),severity:aB(n[sB.severity],i?`warning`:`info`),reason:cB(n[sB.reason]),suspicious:i,signal:cB(n[sB.signal])}}function uB(e){let t=[];for(let n of e)for(let e of n.spans){let r=lB(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function dB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function fB(e,t){return oB(e.severity,t)}function pB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var mB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),hB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),gB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),_B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),vB=V(`<span class="text-fg-subtle"> </span>`),yB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),bB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function xB(e,t){it(t,!0);let n=N(`info`),r=M(()=>uB(vl.value)),i=M(()=>dB(z(r))),a=M(()=>z(r).filter(e=>fB(e,z(n))));function o(e,t){Nu(e,t),Mu(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=bB(),l=F(c),u=F(l),d=F(u);kh(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=mB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;co(m),D(l);var b=L(l,2),x=e=>{var t=hB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=gB();kh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=la();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=yB(),r=F(n),i=F(r),a=e=>{dh(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=_B(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=vB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);xm(ee,{size:10});var te=L(ee);Yp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+pB(z(t).severity),()=>od(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,so(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}ea([`change`,`click`]);async function SB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var CB=V(`<!> Mark now`,1),wB=V(`<!> Comparing since mark`,1),TB=V(`<option> </option>`),EB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),DB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),OB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),kB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
32
- current time window.</p>`),AB=V(`<p class="text-xs text-fg-subtle">Describe the spans you are investigating, or mark a moment and compare
27
+ devtools and it appears here.</p></div>`),_P=V(`<option> </option>`),vP=V(`<select class="text-xs bg-surface border border-line rounded px-2 py-1 text-fg max-w-[16rem]"></select>`),yP=V(`<div class="flex items-center gap-1.5 text-xs font-medium text-fg-muted"><!> </div>`),bP=V(`<span> </span>`),xP=V(`<div class="flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-accent/10 border border-accent/30 text-[11px] font-medium text-accent" title="Total LLM tokens and cost for this trace"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),SP=V(`<span class="text-[10px] text-fg-muted whitespace-nowrap"> </span>`),CP=V(`<div class="flex items-center gap-1 text-[10px] text-fg-subtle"><span></span> </div>`),wP=V(`<div class="absolute left-1/2 top-3 -translate-x-1/2 z-10 px-3 py-1.5 rounded border border-line bg-subtle text-xs text-fg-muted shadow-sm"> </div>`),TP=ca(`<text text-anchor="middle" class="fill-fg-subtle text-[10px]" dy="-2"> </text>`),EP=ca(`<path fill="none" stroke-width="1.5" marker-end="url(#flow-arrow)"></path><!>`,1),DP=ca(`<g><rect width="28" height="16" rx="8"></rect><text text-anchor="middle" dominant-baseline="central" class="fill-white text-[10px] font-semibold"> </text></g>`),OP=ca(`<g role="button" tabindex="0"><rect rx="8"></rect><text text-anchor="middle" dominant-baseline="central"> </text><!></g>`),kP=V(`<button type="button" class="ml-auto shrink-0 inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-fg-subtle hover:text-fg hover:bg-hover transition-colors" title="Open this span in the Traces waterfall"><!> Traces</button> <!>`,1),AP=V(`<span>·</span> <span class="text-danger"> </span>`,1),jP=V(`<span>·</span> <span> </span>`,1),MP=V(`<span class="font-medium"> </span> <span class="text-fg-subtle">·</span>`,1),NP=V(`<div class="mt-1.5 flex items-center gap-1.5 text-[11px] text-accent"><!> <!> <span class="font-mono text-accent/80"> </span></div>`),PP=V(`<div class="px-3 py-2 border-b border-line"><!></div>`),FP=V(`<div class="px-3 py-2 border-b border-success-border bg-success-bg"><!></div>`),IP=V(`<div class="px-3 py-3 text-xs text-fg-subtle flex items-center gap-1.5"><!> No input/output captured for this node.</div>`),LP=V(`<div class="w-80 shrink-0 border-l border-line overflow-y-auto bg-surface"><div class="px-3 py-2.5 border-b border-line"><div class="group flex items-center gap-1.5"><span></span> <span class="font-mono text-sm font-medium text-fg truncate"> </span> <!> <!></div> <div class="mt-1 flex items-center gap-2 text-[11px] text-fg-subtle flex-wrap"><span class="uppercase tracking-wide"> </span> <span>·</span> <span> </span> <!> <!></div> <!></div> <!> <!> <!></div>`),RP=V(`<div class="flex flex-col h-full"><div class="flex items-center gap-3 px-3 py-1.5 border-b border-line bg-subtle/50 flex-wrap"><!> <!> <!> <div class="flex items-center gap-3 flex-wrap"><!> <!></div></div> <div class="flex flex-1 overflow-hidden"><div class="relative flex-1 overflow-auto bg-surface focus:outline-none" role="application" aria-label="Flow call graph — arrow keys to navigate, Enter to open in Traces" tabindex="0"><!> <svg class="min-w-full" role="presentation"><defs><marker id="flow-arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" class="fill-fg-subtle"></path></marker></defs><!><!></svg></div> <!></div></div>`);function zP(e,t){it(t,!0);let n=M(()=>yl.value),r=N(null),i=N(null),a=M(()=>z(n).find(e=>e.traceId===z(r))??z(n)[0]),o=M(()=>{let e=new Map;if(!z(a))return e;let t=nu.value.filter(e=>e.traceId===z(a).traceId),n=e=>e?.source===`table`?e.total:void 0,r=e=>e.normalized.usage.inputTokens!=null||e.normalized.usage.outputTokens!=null||n(e.normalized.cost)!=null,i=new Set(t.filter(r).map(e=>e.raw.spanId)),o=new Map(z(a).spans.map(e=>[e.spanId,e])),s=e=>{let t=e.parentSpanId;for(;t;){if(i.has(t))return!0;t=o.get(t)?.parentSpanId}return!1};for(let i of t){if(!r(i)||s(i.raw))continue;let{usage:t,cost:a}=i.normalized;e.set(i.raw.spanId,{inputTokens:t.inputTokens,outputTokens:t.outputTokens,costUsd:n(a)})}return e}),s=M(()=>z(a)?pP(iP(z(a).spans,{metricsBySpanId:z(o)})):null),c=M(()=>z(s)?aP(z(s).nodes):{}),l=M(()=>{let e=new Map;if(z(s))for(let t of z(s).nodes)e.set(t.id,t);return e}),u=M(()=>z(i)?z(l).get(z(i))??null:null),d=N(``);function f(e,t){return ev(t,[e.label,mP[e.role].label])}let p=M(()=>z(d).trim().length>0),m=M(()=>{let e=new Set;if(!z(s)||!z(p))return e;let t=z(d).trim().toLowerCase();for(let n of z(s).nodes)f(n,t)&&e.add(n.id);return e}),h=M(()=>z(m).size),g=M(()=>z(s)?.nodes.length??0);function _(e,t){let n=z(l).get(e),r=z(l).get(t);if(!n||!r)return``;let i=n.x+n.width/2,a=n.y+44,o=r.x+r.width/2,s=r.y,c=(a+s)/2;return`M ${i} ${a} C ${i} ${c}, ${o} ${c}, ${o} ${s}`}function v(e){P(i,z(i)===e?null:e,!0)}function y(e){!z(a)||e.spanIds.length===0||Fu(z(a).traceId,e.spanIds[0])}function b(e){let t=z(s)?.nodes??[];if(t.length===0)return;let n=z(i)?z(l).get(z(i)):void 0;if(!n){P(i,t[0].id,!0);return}if(e===`left`||e===`right`){let r=t.filter(e=>e.layer===n.layer).sort((e,t)=>e.x-t.x),a=r.findIndex(e=>e.id===n.id),o=r[e===`left`?a-1:a+1];o&&P(i,o.id,!0);return}let r=n.layer+(e===`down`?1:-1),a=t.filter(e=>e.layer===r);if(a.length===0)return;let o=n.x+n.width/2,c=a.reduce((e,t)=>Math.abs(t.x+t.width/2-o)<Math.abs(e.x+e.width/2-o)?t:e);P(i,c.id,!0)}let x=N(!1);function S(e){if(z(x))switch(e.key){case`ArrowLeft`:e.preventDefault(),b(`left`);break;case`ArrowRight`:e.preventDefault(),b(`right`);break;case`ArrowUp`:e.preventDefault(),b(`up`);break;case`ArrowDown`:e.preventDefault(),b(`down`);break;case`Enter`:z(u)&&y(z(u));break;case`Escape`:P(i,null)}}Lr(()=>(window.addEventListener(`keydown`,S),()=>window.removeEventListener(`keydown`,S)));var C=ua(),w=I(C),T=e=>{var t=gP(),n=F(t);eg(F(n),{size:16}),Ke(),D(n),Ke(2),D(t),H(e,t)},ee=e=>{var t=RP(),o=F(t),f=F(o),b=e=>{var t=vP();G(t,21,()=>z(n),e=>e.traceId,(e,t)=>{var n=_P(),r=F(n);D(n);var i={};R(e=>{U(r,`${z(t).service??``} · ${e??``}`),i!==(i=z(t).traceId)&&(n.value=(n.__value=z(t).traceId)??``)},[()=>z(t).rootSpan?.name??z(t).traceId.slice(0,8)]),H(e,n)}),D(t),uo(t,()=>z(r),e=>P(r,e)),H(e,t)},S=e=>{var t=yP(),n=F(t);eg(n,{size:13});var r=L(n);D(t),R(()=>U(r,` ${z(a).rootSpan?.name??`Flow`??``}`)),H(e,t)};W(f,e=>{z(n).length>1?e(b):e(S,-1)});var C=L(f,2),w=e=>{var t=xP(),n=F(t);Rp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=bP(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Uj(z(c).costUsd)]),H(e,t)};W(r,e=>{z(c).costUsd!=null&&e(i)});var a=L(r,2),o=F(a,!0);D(a),D(t),R(e=>U(o,e),[()=>Hj(z(c).inputTokens,z(c).outputTokens)]),H(e,t)};W(C,e=>{(z(c).costUsd!=null||z(c).inputTokens!=null)&&e(w)});var T=L(C,2);{let e=M(()=>$(`bg-subtle text-fg`,z(p)?`border-accent ring-1 ring-accent`:`border-line`));$_(T,{class:`ml-auto w-48 max-w-[14rem]`,get inputClass(){return z(e)},ariaLabel:`Search flow nodes by name or type`,placeholder:`Search nodes…`,clearTitle:`Clear search`,get value(){return z(d)},set value(e){P(d,e,!0)}})}var ee=L(T,2),te=F(ee),ne=e=>{var t=SP(),n=F(t);D(t),R(()=>U(n,`Nodes (${z(h)??``} of ${z(g)??``})`)),H(e,t)};W(te,e=>{z(p)&&e(ne)}),G(L(te,2),16,()=>hP,e=>e,(e,t)=>{var n=CP(),r=F(n),i=L(r);D(n),R(e=>{q(r,1,e),U(i,` ${mP[t].label??``}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,mP[t].dot))]),H(e,n)}),D(ee),D(o);var re=L(o,2),ie=F(re),ae=F(ie),oe=e=>{var t=wP(),n=F(t);D(t),R(e=>U(n,`No matches for “${e??``}”`),[()=>z(d).trim()]),H(e,t)};W(ae,e=>{z(p)&&z(h)===0&&e(oe)});var se=L(ae,2),ce=L(F(se));G(ce,17,()=>z(s).edges,e=>e.source+`>`+e.target,(e,t)=>{let n=M(()=>z(i)&&z(t).source!==z(i)&&z(t).target!==z(i));var r=EP(),a=I(r),o=L(a),s=e=>{let n=M(()=>z(l).get(z(t).source)),r=M(()=>z(l).get(z(t).target));var i=ua(),a=I(i),o=e=>{var i=TP(),a=F(i);D(i),R(()=>{J(i,`x`,(z(n).x+z(n).width/2+z(r).x+z(r).width/2)/2),J(i,`y`,(z(n).y+44+z(r).y)/2),U(a,`×${z(t).count??``}`)}),H(e,i)};W(a,e=>{z(n)&&z(r)&&e(o)}),H(e,i)};W(o,e=>{z(t).count>1&&e(s)}),R((e,t)=>{J(a,`d`,e),q(a,0,t)},[()=>_(z(t).source,z(t).target),()=>K($(`stroke-fg-subtle transition-opacity`,z(n)&&`opacity-20`))]),H(e,r)}),G(L(ce),17,()=>z(s).nodes,e=>e.id,(e,t)=>{let n=M(()=>mP[z(t).role]),r=M(()=>z(t).id===z(i)),a=M(()=>z(m).has(z(t).id)),o=M(()=>z(p)&&z(a)),s=M(()=>z(p)&&!z(a)||z(i)&&!z(r)),c=M(()=>z(t).errorCount>0);var l=OP(),u=F(l),d=L(u),f=F(d,!0);D(d);var h=L(d),g=e=>{var n=DP(),r=F(n),i=L(r),a=F(i,!0);D(i),D(n),R(e=>{J(r,`x`,z(t).x+z(t).width-26),J(r,`y`,z(t).y-8),q(r,0,e),J(i,`x`,z(t).x+z(t).width-12),J(i,`y`,z(t).y),U(a,z(c)?`${z(t).count-z(t).errorCount}/${z(t).count}`:`${z(t).count}`)},[()=>K($(z(c)?`fill-red-500`:`fill-fg-muted`))]),H(e,n)};W(h,e=>{z(t).count>1&&e(g)}),D(l),R((e,n,i,a)=>{q(l,0,e),J(u,`x`,z(t).x),J(u,`y`,z(t).y),J(u,`width`,z(t).width),J(u,`height`,44),q(u,0,n),J(u,`stroke-width`,z(r)||z(o)?2.5:1.5),J(d,`x`,z(t).x+z(t).width/2),J(d,`y`,z(t).y+22),q(d,0,i),U(f,a)},[()=>K($(`cursor-pointer transition-opacity focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,z(s)&&`opacity-40`)),()=>K($(z(n).fill,z(o)?`stroke-accent`:z(c)?`stroke-red-500`:z(n).stroke,(z(r)||z(o))&&`stroke-[2.5px]`)),()=>K($(`text-[12px] font-medium font-mono`,z(n).text)),()=>z(t).label.length>26?z(t).label.slice(0,25)+`…`:z(t).label]),B(`click`,l,()=>v(z(t).id)),B(`keydown`,l,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(z(t).id))}),H(e,l)}),D(se),D(ie);var le=L(ie,2),E=e=>{let t=M(()=>mP[z(u).role]);var n=LP(),r=F(n),i=F(r),o=F(i),s=L(o,2),c=F(s,!0);D(s);var l=L(s,2);mv(l,{get value(){return z(u).label},label:`Copy node name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`});var d=L(l,2),f=e=>{var t=kP(),n=I(t);Xp(F(n),{size:11}),Ke(),D(n),mv(L(n,2),{get value(){return z(a).traceId},label:`Copy trace ID`,class:`shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),B(`click`,n,()=>y(z(u))),H(e,t)};W(d,e=>{z(u).spanIds.length>0&&e(f)}),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,4),_=F(g);D(g);var v=L(g,2),b=e=>{var t=AP(),n=L(I(t),2),r=F(n);D(n),R(()=>U(r,`${z(u).errorCount??``} errored`)),H(e,t)};W(v,e=>{z(u).errorCount>0&&e(b)});var x=L(v,2),S=e=>{var t=jP(),n=L(I(t),2),r=F(n,!0);D(n),R(e=>U(r,e),[()=>od(z(u).totalDurationMs)]),H(e,t)};W(x,e=>{z(u).totalDurationMs>0&&e(S)}),D(p);var C=L(p,2),w=e=>{var t=NP(),n=F(t);Rp(n,{size:11,class:`text-accent`});var r=L(n,2),i=e=>{var t=MP(),n=I(t),r=F(n,!0);D(n),Ke(2),R(e=>U(r,e),[()=>Uj(z(u).metrics.costUsd)]),H(e,t)};W(r,e=>{z(u).metrics.costUsd!=null&&e(i)});var a=L(r,2),o=F(a);D(a),D(t),R(e=>U(o,`${e??``} tokens`),[()=>Hj(z(u).metrics.inputTokens,z(u).metrics.outputTokens)]),H(e,t)};W(C,e=>{z(u).metrics&&e(w)}),D(r);var T=L(r,2),ee=e=>{var t=PP(),n=F(t);{let e=M(()=>gM(z(u).sample.input));X_(n,{get content(){return z(e)},children:(e,t)=>{vM(e,{label:`Input`,get value(){return z(u).sample.input}})},$$slots:{default:!0}})}D(t),H(e,t)};W(T,e=>{z(u).sample.input!==void 0&&e(ee)});var te=L(T,2),ne=e=>{var t=FP(),n=F(t);{let e=M(()=>gM(z(u).sample.output));X_(n,{get content(){return z(e)},children:(e,t)=>{vM(e,{label:`Output`,get value(){return z(u).sample.output},tone:`positive`})},$$slots:{default:!0}})}D(t),H(e,t)};W(te,e=>{z(u).sample.output!==void 0&&e(ne)});var re=L(te,2),ie=e=>{var t=IP();Rm(F(t),{size:13}),Ke(),D(t),H(e,t)};W(re,e=>{z(u).sample.input===void 0&&z(u).sample.output===void 0&&e(ie)}),D(n),R(e=>{q(o,1,e),U(c,z(u).label),U(h,z(t).label),U(_,`${z(u).count??``}
28
+ ${z(u).count===1?`call`:`calls`}`)},[()=>K($(`inline-block w-2 h-2 rounded-sm`,z(t).dot))]),H(e,n)};W(le,e=>{z(u)&&e(E)}),D(re),D(t),R(()=>{J(se,`width`,z(s).width),J(se,`height`,z(s).height),J(se,`viewBox`,`0 0 ${z(s).width} ${z(s).height}`)}),B(`focusin`,ie,()=>P(x,!0)),B(`focusout`,ie,()=>P(x,!1)),H(e,t)};W(w,e=>{!z(a)||!z(s)||z(s).nodes.length===0?e(T):e(ee,-1)}),H(e,C),at()}ea([`focusin`,`focusout`,`click`,`keydown`]);var BP=(e,t=p,n=p)=>{var r=HP(),i=F(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(r),R(()=>{U(a,t()),U(s,n())}),H(e,r)},VP=(e,t=p,n=p,r=p)=>{var i=ua(),a=I(i),o=e=>{var i=UP(),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=F(s,!0);D(s),D(i),R(e=>{J(i,`title`,e),U(o,t()),U(c,n())},[()=>`View ${t().toLowerCase()} in the ${r()} tab`]),B(`click`,i,()=>Nu(r())),H(e,i)},s=e=>{BP(e,t,n)};W(a,e=>{n()>0?e(o):e(s,-1)}),H(e,i)},HP=V(`<div><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-fg"> </div></div>`),UP=V(`<button type="button" class="group/stat text-left rounded -m-1 p-1 hover:bg-hover transition-colors"><div class="text-[11px] uppercase tracking-wide text-fg-subtle"> </div> <div class="text-sm text-accent group-hover/stat:underline"> </div></button>`),WP=V(`<div class="border border-line rounded-md p-3 bg-surface"><div class="flex items-start justify-between gap-2 mb-2"><div><div class="text-sm font-medium text-fg"> </div> <div class="text-xs text-fg-subtle uppercase tracking-wide"> </div></div> <span> </span></div> <div class="grid grid-cols-2 gap-2 text-xs text-fg-muted sm:grid-cols-5"><!> <!> <!> <!> <!></div></div>`),GP=V(`<option> </option>`),KP=V(`<div class="text-center text-fg-subtle text-sm py-12">No resources derived yet. Send traces or logs with resource metadata.</div>`),qP=V(`<div class="space-y-2"></div>`),JP=V(`<div class="flex flex-col h-full p-4"><div class="flex flex-col gap-3 mb-4 pb-3 border-b border-line"><div class="flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3></div> <div class="flex flex-wrap gap-2"><input type="search" placeholder="Filter resources" class="px-3 py-2 text-xs border border-line rounded-md min-w-[180px]"/> <select class="px-3 py-2 text-xs border border-line rounded-md bg-surface"><option>All types</option><!></select></div></div> <div class="flex-1 overflow-auto"><!></div></div>`);function YP(e,t){it(t,!0);let n=(e,t=p)=>{var n=WP(),r=F(n),a=F(r),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a);var u=L(a,2),d=F(u,!0);D(u),D(r);var f=L(r,2),m=F(f);BP(m,()=>`Requests`,()=>t().requestCount);var h=L(m,2);VP(h,()=>`Errors`,()=>t().errorCount,()=>`errors`);var g=L(h,2);VP(g,()=>`Traces`,()=>t().traceCount,()=>`traces`);var _=L(g,2);VP(_,()=>`Logs`,()=>t().logCount,()=>`logs`);var v=L(_,2);{let e=M(()=>t().lastSeen?sd(t().lastSeen):`n/a`);BP(v,()=>`Last Seen`,()=>z(e))}D(f),D(n),R(e=>{U(s,t().name),U(l,t().type),q(u,1,e),U(d,t().health)},[()=>K($(`px-2 py-1 rounded border text-[11px] font-medium capitalize`,i(t().health)))]),H(e,n)},r=[`service`,`database`,`cache`,`messaging`,`external`,`unknown`];function i(e){switch(e){case`healthy`:return`bg-success-bg text-success border-success-border`;case`degraded`:return`bg-warning-bg text-warning border-warning-border`;case`unhealthy`:return`bg-danger-bg text-danger border-danger-border`;default:return`bg-subtle text-fg-muted border-line`}}let a=M(()=>tu.value),o=N(``),s=N(`all`),c=M(()=>{let e=z(o).trim().toLowerCase();return z(a).filter(t=>(z(s)===`all`||t.type===z(s))&&ev(e,[t.name]))});var l=JP(),u=F(l),d=F(u),f=F(d),m=F(f);fp(m,{size:16});var h=L(m);D(f),D(d);var g=L(d,2),_=F(g);So(_);var v=L(_,2),y=F(v);y.value=y.__value=`all`,G(L(y),16,()=>r,e=>e,(e,t)=>{var n=GP(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(v);var b;lo(v),D(g),D(u);var x=L(u,2),S=F(x),C=e=>{H(e,KP())},w=e=>{var t=qP();G(t,21,()=>z(c),e=>e.name,(e,t)=>{n(e,()=>z(t))}),D(t),H(e,t)};W(S,e=>{z(c).length===0?e(C):e(w,-1)}),D(x),D(l),R(()=>{U(h,` Resources (${z(a).length??``})`),Co(_,z(o)),b!==(b=z(s))&&(v.value=(v.__value=z(s))??``,co(v,z(s)))}),B(`input`,_,e=>P(o,e.currentTarget.value,!0)),B(`change`,v,e=>P(s,e.currentTarget.value,!0)),H(e,l),at()}ea([`click`,`input`,`change`]);var XP=200,ZP=70,QP=20;function $P(e,t){return hs(e,t)}function eF(e){let t=e.attributes||{};return t[`db.system.name`]||t[`db.system`]||t[`db.namespace`]||t[`db.name`]||t[`db.query.text`]||t[`db.statement`]?`database`:t[`messaging.system`]||t[`messaging.destination`]||t[`messaging.url`]?`messaging`:t[`rpc.system.name`]||t[`rpc.system`]||t[`rpc.service`]||t[`peer.service`]?`external`:`service`}function tF(e,t){if(e.length===0)return 0;let n=Math.ceil(t/100*e.length)-1;return e[Math.max(0,n)]}function nF(e){let t=new Map,n=new Map;for(let r of e){let e=new Map;for(let t of r.spans)e.set(t.spanId,t);for(let i of r.spans){let a=$P(i,r.service),o=t.get(a);o||(o={id:a,name:a,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`},t.set(a,o)),o.requestCount++,i.status.code===`ERROR`&&o.errorCount++,o.avgLatency=(o.avgLatency*(o.requestCount-1)+i.duration)/o.requestCount,o.minLatency=Math.min(o.minLatency,i.duration),o.maxLatency=Math.max(o.maxLatency,i.duration),o.spanKinds.add(i.kind);let s=eF(i),c=String(i.attributes?.[`service.name`]||r.service||a);if(s!==`service`&&a!==c&&(o.nodeType=s),i.kind===`CLIENT`){let e=r.spans.find(e=>e.parentSpanId===i.spanId&&e.kind===`SERVER`),o=String(i.attributes?.[`service.name`]||r.service||a),s=(e?$P(e,r.service):void 0)||ds(i.attributes,`peer.service`,`http.host`,`db.system.name`,`db.system`,`net.peer.name`,`rpc.service`,`messaging.system`)||`external`;if(t.has(o)||t.set(o,{id:o,name:o,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:`service`}),o!==s){let e=`${o}->${s}`,r=n.get(e);if(!r){if(r={id:e,source:o,target:s,requestCount:0,errorCount:0,avgLatency:0,p50Latency:0,p99Latency:0,latencies:[]},n.set(e,r),!t.has(s))t.set(s,{id:s,name:s,requestCount:0,errorCount:0,avgLatency:0,minLatency:1/0,maxLatency:0,spanKinds:new Set,nodeType:eF(i)});else{let e=t.get(s),n=eF(i);n!==`service`&&(e.nodeType=n)}}r.requestCount++,i.status.code===`ERROR`&&r.errorCount++,r.avgLatency=(r.avgLatency*(r.requestCount-1)+i.duration)/r.requestCount,r.latencies.push(i.duration);let a=[...r.latencies].sort((e,t)=>e-t);r.p50Latency=tF(a,50),r.p99Latency=tF(a,99)}}if(i.kind!==`SERVER`||!i.parentSpanId)continue;let l=e.get(i.parentSpanId);if(!l||l.kind!==`CLIENT`)continue;let u=$P(l,r.service);if(u===a)continue;let d=`${u}->${a}`;n.has(d)||n.set(d,{id:d,source:u,target:a,requestCount:1,errorCount:+(i.status.code===`ERROR`),avgLatency:i.duration,p50Latency:i.duration,p99Latency:i.duration,latencies:[i.duration]})}}return{nodes:[...t.values()].map(e=>({...e,minLatency:e.minLatency===1/0?0:e.minLatency})),connections:[...n.values()]}}function rF(e,t){let n=new Map;if(e.length===0)return n;if(e.length===1)return n.set(e[0].id,{x:180,y:92}),n;let r=e.map(e=>e.id),i=new Map,a=new Map;for(let e of r)i.set(e,[]),a.set(e,[]);for(let e of t)i.has(e.source)&&i.get(e.source).push(e.target),a.has(e.target)&&a.get(e.target).push(e.source);let o=new Map,s=r.filter(e=>(a.get(e)?.length??0)===0),c=s.length>0?s:r,l=[...c];for(let e of c)o.set(e,0);for(;l.length>0;){let e=l.shift(),t=o.get(e)??0;for(let n of i.get(e)??[])(o.get(n)??-1)<=t&&(o.set(n,t+1),l.push(n))}for(let e of r)o.has(e)||o.set(e,0);let u=Math.max(...Array.from(o.values())),d=Array.from({length:u+1},()=>[]);for(let e of r)d[o.get(e)].push(e);for(let e=0;e<2;e++)for(let e=1;e<=u;e++){let t=d[e-1],n=new Map;t.forEach((e,t)=>n.set(e,t)),d[e].sort((e,t)=>{let r=a.get(e)??[],i=a.get(t)??[];return(r.length>0?r.reduce((e,t)=>e+(n.get(t)??0),0)/r.length:999)-(i.length>0?i.reduce((e,t)=>e+(n.get(t)??0),0)/i.length:999)})}let f=Math.max(...d.map(e=>e.length)),p=Math.max(f*122-ZP,52);for(let e=0;e<=u;e++){let t=d[e],r=(p-(t.length*122-ZP))/2,i=e*XP+70+QP;t.forEach((e,t)=>{n.set(e,{x:i-70,y:r+t*122+QP})})}return n}function iF(e,t,n){return Math.min(n,Math.max(t,e))}function aF(e,t,n,r,i){let a=iF(t,r,i);if(a===e.scale)return e;let o=(n.x-e.translate.x)/e.scale,s=(n.y-e.translate.y)/e.scale;return{scale:a,translate:{x:n.x-o*a,y:n.y-s*a}}}function oF(e,t,n,r,i,a){let o=e.maxX-e.minX,s=e.maxY-e.minY,c=t-r*2,l=n-r*2,u=iF(Math.min(o>0?c/o:a,s>0?l/s:a),i,a);return{scale:u,translate:{x:(t-o*u)/2-e.minX*u,y:(n-s*u)/2-e.minY*u}}}function sF(e){let{viewWidth:t,viewHeight:n,svg:r,contentBounds:i,minScale:a=.2,maxScale:o=3,zoomStep:s=1.2,fitPadding:c=24}=e,l=N(1),u=N(_r({x:0,y:0})),d=N(!1),f={x:0,y:0,tx:0,ty:0},p=(e,i)=>{let a=r();if(!a)return{x:e,y:i};let o=a.getBoundingClientRect(),s=o.width>0?t()/o.width:1,c=o.height>0?n()/o.height:1;return{x:(e-o.left)*s,y:(i-o.top)*c}},m=e=>{P(l,e.scale,!0),P(u,e.translate,!0)},h=(e,t)=>m(aF({scale:z(l),translate:z(u)},e,t,a,o)),g=()=>{P(l,1),P(u,{x:0,y:0},!0)},_=e=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let t=p(e.clientX,e.clientY),n=e.deltaY<0?s:1/s;h(z(l)*n,t)},v=e=>{e.button===0&&(e.target?.closest(`[data-node]`)||(P(d,!0),f={x:e.clientX,y:e.clientY,tx:z(u).x,ty:z(u).y},r()?.setPointerCapture?.(e.pointerId)))},y=e=>{let i=r();if(!z(d)||!i)return;let a=i.getBoundingClientRect(),o=a.width>0?t()/a.width:1,s=a.height>0?n()/a.height:1;P(u,{x:f.tx+(e.clientX-f.x)*o,y:f.ty+(e.clientY-f.y)*s},!0)},b=e=>{z(d)&&(P(d,!1),r()?.releasePointerCapture?.(e.pointerId))},x=()=>({x:t()/2,y:n()/2});return{get scale(){return z(l)},get translate(){return z(u)},get isPanning(){return z(d)},onWheel:_,onPointerDown:v,onPointerMove:y,onPointerEnd:b,zoomIn:()=>h(z(l)*s,x()),zoomOut:()=>h(z(l)/s,x()),fit:()=>{let e=i();if(!e){g();return}m(oF(e,t(),n(),c,a,o))},reset:g}}var cF=(e,t=p,n=p,r)=>{let i=pn(()=>g(r?.(),!1));var a=lF(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,t()),q(c,1,e),U(l,n())},[()=>K($(`font-medium`,z(i)?`text-danger`:`text-fg`))]),H(e,a)},lF=V(`<div class="flex justify-between text-xs"><span class="text-fg-subtle"> </span> <span> </span></div>`),uF=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No traces available to build service map. <br/> Traces will appear here as they are captured.</p></div>`),dF=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle p-8"><!> <p class="text-sm text-center">No services detected in traces. <br/> Service information is extracted from span attributes.</p></div>`),fF=V(`<span class="text-xs text-fg-subtle flex-shrink-0">No service matches</span>`),pF=ca(`<g><path fill="none" stroke-linecap="round"></path><text text-anchor="middle"> </text></g>`),mF=ca(`<rect fill="none" class="stroke-accent"></rect>`),hF=ca(`<rect></rect><path></path><ellipse></ellipse>`,1),gF=ca(`<polygon></polygon>`),_F=ca(`<rect></rect>`),vF=ca(`<rect fill="#64748b"></rect>`),yF=ca(`<tspan fill="#dc2626" class="font-semibold"> </tspan>`),bF=ca(`<g role="button" tabindex="0"><!><g filter="url(#nodeShadow)"><!></g><!><text text-anchor="middle" class="text-[11px] font-semibold" fill="#1f2937"> </text><text text-anchor="middle" class="text-[10px]" fill="#475569"> <!></text></g>`),xF=V(`<div class="space-y-3 pr-8"><!> <!> <!> <!> <!> <!></div>`),SF=V(`<span class="text-danger"> </span>`),CF=V(`<div class="text-xs p-2 bg-surface rounded border border-line"><div class="flex items-center gap-1 text-fg-muted"><span class="font-medium"> </span> <!></div> <div class="flex items-center gap-2 mt-1 text-fg-subtle"><span> </span> <!> <span> </span></div></div>`),wF=V(`<div class="mt-4 pt-4 border-t border-line"><div class="group flex items-center justify-between mb-2"><h5 class="text-xs font-medium text-fg-muted">Connections</h5> <!></div> <div class="space-y-2"></div></div>`),TF=V(`<div class="w-64 border-l border-line bg-subtle overflow-auto"><div class="p-4"><div class="flex items-center justify-between mb-4"><div class="group flex items-center gap-1 min-w-0"><h4 class="font-semibold text-fg truncate"> </h4> <!></div> <button class="text-fg-subtle hover:text-fg-muted">×</button></div> <!> <!></div></div>`),EF=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="text-xs text-fg-subtle"> </div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!></div> <div class="flex-1 overflow-hidden flex"><div class="relative flex-1 overflow-auto p-4"><svg role="application" aria-label="Service map. Drag to pan, ctrl or cmd and scroll to zoom."><defs><marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#94a3b8"></polygon></marker><marker id="arrowhead-error" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto"><polygon points="0 0, 10 3.5, 0 7" fill="#ef4444"></polygon></marker><filter id="nodeShadow" x="-20%" y="-20%" width="140%" height="140%"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-color="#0f172a" flood-opacity="0.14"></feDropShadow></filter></defs><g><!><!></g></svg> <div class="absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-line bg-surface p-1 shadow-sm"><button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom in" aria-label="Zoom in"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Fit to content" aria-label="Fit to content"><!></button> <button type="button" class="flex h-7 w-7 items-center justify-center rounded text-fg-muted hover:bg-hover hover:text-fg focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent transition-colors" title="Reset to 1:1" aria-label="Reset zoom to 1:1"><!></button></div></div> <!></div> <div class="flex items-center gap-4 px-4 py-2 border-t border-line bg-subtle text-xs"><div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-accent bg-surface"></div> <span class="text-fg-muted">Healthy</span></div> <div class="flex items-center gap-1"><div class="w-4 h-4 rounded-full border-2 border-danger-border bg-surface"></div> <span class="text-fg-muted">Has Errors</span></div> <div class="flex items-center gap-1"><div class="w-6 h-0.5 bg-fg-subtle"></div> <span class="text-fg-muted">Connection</span></div></div></div>`);function DF(e,t){it(t,!0);let n=M(()=>yl.value),r=N(null),i=N(null),a=N(``),o=M(()=>nF(z(n))),s=M(()=>z(o).nodes),c=M(()=>z(o).connections),l=M(()=>z(a).length>0);function u(e){return ev(z(a).toLowerCase(),[e.name])}let d=M(()=>z(s).filter(u)),f=M(()=>new Set(z(d).map(e=>e.id))),p=M(()=>z(d).length>0),m=M(()=>rF(z(s),z(c))),h=M(()=>{let e=400;for(let[,t]of z(m))t.x+140+20>e&&(e=t.x+140+20);return e}),g=M(()=>{let e=300;for(let[,t]of z(m))t.y+52+20>e&&(e=t.y+52+20);return e}),_=N(null),v=sF({viewWidth:()=>z(h),viewHeight:()=>z(g),svg:()=>z(_),contentBounds:()=>{let e=1/0,t=1/0,n=-1/0,r=-1/0;for(let[,i]of z(m))e=Math.min(e,i.x),t=Math.min(t,i.y),n=Math.max(n,i.x+140),r=Math.max(r,i.y+52);return Number.isFinite(e)?{minX:e,minY:t,maxX:n,maxY:r}:null}}),y=M(()=>z(r)?z(s).find(e=>e.id===z(r))??null:null);function b(e,t){if(e.key===`Enter`||e.key===` `){e.preventDefault(),P(r,z(r)===t?null:t,!0);return}e.key===`Escape`&&z(r)&&(e.stopPropagation(),P(r,null))}let x=M(()=>z(r)?z(c).filter(e=>e.source===z(r)||e.target===z(r)):[]),S=M(()=>z(x).length>0?JSON.stringify(z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:od(e.avgLatency)})),null,2):``),C=M(()=>{if(!z(y))return``;let e=z(y);return JSON.stringify({service:e.name,requests:e.requestCount,errors:e.errorCount,errorRate:`${(e.errorCount/e.requestCount*100).toFixed(1)}%`,avgLatency:od(e.avgLatency),minLatency:od(e.minLatency),maxLatency:od(e.maxLatency),connections:z(x).map(e=>({source:e.source,target:e.target,requests:e.requestCount,errors:e.errorCount,avgLatency:od(e.avgLatency)}))},null,2)});var w=ua(),T=I(w),ee=e=>{var t=uF();Qf(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},te=e=>{var t=dF();Eh(F(t),{size:48,class:`mb-4 opacity-50`}),Ke(2),D(t),H(e,t)},ne=e=>{var t=EF(),n=F(t),o=F(n),u=F(o);Qf(u,{size:16});var w=L(u);D(o);var T=L(o,2),ee=F(T);D(T),D(n);var te=L(n,2),ne=F(te);$_(ne,{placeholder:`Find a service by name…`,ariaLabel:`Find a service by name`,get value(){return z(a)},set value(e){P(a,e,!0)}});var re=L(ne,2),ie=e=>{H(e,fF())};W(re,e=>{z(l)&&!z(p)&&e(ie)}),D(te);var ae=L(te,2),oe=F(ae),se=F(oe);so(se,`min-height: 300px;`);var ce=L(F(se)),le=F(ce);G(le,17,()=>z(c),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).source)),i=M(()=>z(m).get(z(t).target));var a=ua(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).source||z(r)===z(t).target),o=M(()=>z(t).errorCount>0),s=M(()=>z(n).x+140),c=M(()=>z(n).y+26),l=M(()=>z(i).x),u=M(()=>z(i).y+26),d=M(()=>Math.abs(z(l)-z(s))*.5),f=M(()=>z(t).requestCount>0?z(t).errorCount/z(t).requestCount*100:0),p=M(()=>z(o)?`${z(t).requestCount}× · ${z(f).toFixed(0)}% err · ${od(z(t).p50Latency)}`:`${z(t).requestCount}× · ${od(z(t).p50Latency)}`);var m=pF(),h=F(m),g=L(h),_=F(g,!0);D(g),D(m),R(e=>{J(h,`d`,`M${z(s)},${z(c)} C${z(s)+z(d)},${z(c)} ${z(l)-z(d)},${z(u)} ${z(l)},${z(u)}`),J(h,`stroke`,z(o)?`#ef4444`:`#94a3b8`),J(h,`stroke-width`,z(o)||z(a)?2.5:1.5),J(h,`stroke-dasharray`,z(o)?`6 4`:void 0),J(h,`stroke-opacity`,z(r)&&!z(a)?.2:1),J(h,`marker-end`,`url(#${z(o)?`arrowhead-error`:`arrowhead`})`),J(g,`x`,(z(s)+z(l))/2),J(g,`y`,(z(c)+z(u))/2-6),q(g,0,e),J(g,`opacity`,z(r)&&!z(a)?.25:1),U(_,z(p))},[()=>K($(`at-edge-label text-[10px]`,z(o)?`fill-danger font-medium`:`fill-fg-subtle`))]),H(e,m)};W(o,e=>{z(n)&&z(i)&&e(s)}),H(e,a)}),G(L(le),17,()=>z(s),e=>e.id,(e,t)=>{let n=M(()=>z(m).get(z(t).id));var a=ua(),o=I(a),s=e=>{let a=M(()=>z(r)===z(t).id),o=M(()=>z(i)===z(t).id),s=M(()=>z(t).errorCount>0),c=M(()=>z(f).has(z(t).id)),u=M(()=>z(l)&&!z(c)),d=M(()=>gg(z(t).id)),p=M(()=>z(d).fill),m=M(()=>z(s)?`#ef4444`:z(d).stroke),h=M(()=>z(a)||z(s)?2.5:z(o)?2:1.5);var g=bF(),_=F(g),v=e=>{var t=mF();J(t,`x`,-3),J(t,`y`,-3),J(t,`rx`,11),J(t,`stroke-width`,2.5),R(()=>{J(t,`width`,146),J(t,`height`,58)}),H(e,t)};W(_,e=>{z(l)&&z(c)&&e(v)});var y=L(_),S=F(y),C=e=>{var t=hF(),n=I(t);J(n,`x`,2),J(n,`y`,6);var r=L(n),i=L(r);J(i,`cy`,6),J(i,`ry`,6),R(()=>{J(n,`width`,136),J(n,`height`,40),J(n,`fill`,z(p)),J(r,`d`,`M2,46 A68,6 0 0,0 138,46 L138,6 A68,6 0 0,1 2,6 Z`),J(r,`fill`,z(p)),J(r,`stroke`,z(m)),J(r,`stroke-width`,z(h)),J(i,`cx`,70),J(i,`rx`,68),J(i,`fill`,z(p)),J(i,`stroke`,z(m)),J(i,`stroke-width`,z(h))}),H(e,t)},w=e=>{var t=gF();R(()=>{J(t,`points`,`70,2 138,13 138,39 70,50 2,39 2,13`),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)},T=e=>{var t=_F();J(t,`x`,2),J(t,`y`,2),J(t,`rx`,8),R(()=>{J(t,`width`,136),J(t,`height`,48),J(t,`fill`,z(p)),J(t,`stroke`,z(m)),J(t,`stroke-width`,z(h))}),H(e,t)};W(S,e=>{z(t).nodeType===`database`?e(C):z(t).nodeType===`messaging`?e(w,1):e(T,-1)}),D(y);var ee=L(y),te=e=>{var t=vF();J(t,`x`,0),J(t,`y`,0),J(t,`rx`,8),J(t,`opacity`,.4),R(()=>{J(t,`width`,140),J(t,`height`,52)}),H(e,t)},ne=M(()=>z(r)&&!z(a)&&!z(x).some(e=>e.source===z(t).id||e.target===z(t).id));W(ee,e=>{z(ne)&&e(te)});var re=L(ee),ie=F(re,!0);D(re);var ae=L(re),oe=F(ae),se=L(oe),ce=e=>{var n=yF(),r=F(n);D(n),R(()=>U(r,` · ${z(t).errorCount??``} err`)),H(e,n)};W(se,e=>{z(s)&&e(ce)}),D(ae),D(g),R((e,r)=>{J(g,`data-node`,z(t).id),J(g,`transform`,`translate(${z(n).x}, ${z(n).y})`),q(g,0,e),J(g,`aria-label`,z(t).name),J(re,`x`,70),J(re,`y`,23),U(ie,r),J(ae,`x`,70),J(ae,`y`,38),U(oe,`${z(t).requestCount??``} span${z(t).requestCount===1?``:`s`} `)},[()=>K($(`cursor-pointer`,z(u)&&`opacity-30`)),()=>z(t).name.length>16?z(t).name.slice(0,14)+`…`:z(t).name]),B(`click`,g,()=>P(r,z(a)?null:z(t).id,!0)),B(`keydown`,g,e=>b(e,z(t).id)),$i(`mouseenter`,g,()=>P(i,z(t).id,!0)),$i(`mouseleave`,g,()=>P(i,null)),H(e,g)};W(o,e=>{z(n)&&e(s)}),H(e,a)}),D(ce),D(se),Ho(se,e=>P(_,e),()=>z(_));var E=L(se,2),ue=F(E);uh(F(ue),{size:14}),D(ue);var de=L(ue,2);Hm(F(de),{size:14}),D(de);var fe=L(de,2);bh(F(fe),{size:14}),D(fe);var pe=L(fe,2);gh(F(pe),{size:14}),D(pe),D(E),D(oe);var me=L(oe,2),he=e=>{var t=TF(),n=F(t),i=F(n),a=F(i),o=F(a),s=F(o,!0);D(o),mv(L(o,2),{get value(){return z(y).name},label:`Copy service name`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(a);var c=L(a,2);D(i);var l=L(i,2);X_(l,{get content(){return z(C)},children:(e,t)=>{var n=xF(),r=F(n);{let e=M(()=>z(y).requestCount.toString());cF(r,()=>`Requests`,()=>z(e))}var i=L(r,2);{let e=M(()=>z(y).errorCount.toString());cF(i,()=>`Errors`,()=>z(e),()=>z(y).errorCount>0)}var a=L(i,2);{let e=M(()=>`${(z(y).errorCount/z(y).requestCount*100).toFixed(1)}%`);cF(a,()=>`Error Rate`,()=>z(e),()=>z(y).errorCount>0)}var o=L(a,2);{let e=M(()=>od(z(y).avgLatency));cF(o,()=>`Avg Latency`,()=>z(e))}var s=L(o,2);{let e=M(()=>od(z(y).minLatency));cF(s,()=>`Min Latency`,()=>z(e))}var c=L(s,2);{let e=M(()=>od(z(y).maxLatency));cF(c,()=>`Max Latency`,()=>z(e))}D(n),H(e,n)},$$slots:{default:!0}});var u=L(l,2),d=e=>{var t=wF(),n=F(t);mv(L(F(n),2),{get value(){return z(S)},label:`Copy connections`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n);var i=L(n,2);G(i,21,()=>z(x),e=>e.id,(e,t)=>{var n=CF(),i=F(n),a=F(i),o=F(a,!0);D(a);var s=L(a,2),c=e=>{ip(e,{size:10})},l=e=>{ip(e,{size:10,class:`rotate-180`})};W(s,e=>{z(t).source===z(r)?e(c):e(l,-1)}),D(i);var u=L(i,2),d=F(u),f=F(d);D(d);var p=L(d,2),m=e=>{var n=SF(),r=F(n);D(n),R(()=>U(r,`${z(t).errorCount??``} err`)),H(e,n)};W(p,e=>{z(t).errorCount>0&&e(m)});var h=L(p,2),g=F(h,!0);D(h),D(u),D(n),R(e=>{U(o,z(t).source===z(r)?z(t).target:z(t).source),U(f,`${z(t).requestCount??``} req`),U(g,e)},[()=>od(z(t).avgLatency)]),H(e,n)}),D(i),D(t),H(e,t)};W(u,e=>{z(x).length>0&&e(d)}),D(n),D(t),R(()=>U(s,z(y).name)),B(`click`,c,()=>P(r,null)),H(e,t)};W(me,e=>{z(y)&&e(he)}),D(ae),Ke(2),D(t),R(e=>{U(w,` Service Map (${(z(l)?`${z(d).length} of ${z(s).length}`:z(s).length)??``} services)`),U(ee,`${z(c).length??``} connections`),J(se,`viewBox`,`0 0 ${z(h)} ${z(g)}`),q(se,0,e),J(ce,`transform`,`translate(${v.translate.x}, ${v.translate.y}) scale(${v.scale})`)},[()=>K($(`w-full h-full`,v.isPanning?`cursor-grabbing`:`cursor-grab`))]),$i(`wheel`,se,function(...e){v.onWheel?.apply(this,e)}),B(`pointerdown`,se,function(...e){v.onPointerDown?.apply(this,e)}),B(`pointermove`,se,function(...e){v.onPointerMove?.apply(this,e)}),B(`pointerup`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointercancel`,se,function(...e){v.onPointerEnd?.apply(this,e)}),$i(`pointerleave`,se,function(...e){v.onPointerEnd?.apply(this,e)}),B(`click`,ue,function(...e){v.zoomIn?.apply(this,e)}),B(`click`,de,function(...e){v.zoomOut?.apply(this,e)}),B(`click`,fe,function(...e){v.fit?.apply(this,e)}),B(`click`,pe,function(...e){v.reset?.apply(this,e)}),H(e,t)};W(T,e=>{z(n).length===0?e(ee):z(s).length===0?e(te,1):e(ne,-1)}),H(e,w),at()}ea([`pointerdown`,`pointermove`,`pointerup`,`click`,`keydown`]);async function OF(e,t=``){let n=t?`?q=${encodeURIComponent(t)}`:``;return jF(`${e.baseUrl}/api/metrics${n}`,{method:`GET`,signal:e.signal},e,e=>e.metrics??[])}async function kF(e,t){let n={name:e.name};return e.window&&(n.window=e.window),n.maxPoints=e.maxPoints??1500,jF(`${t.baseUrl}/api/query/metrics`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(n),signal:t.signal},t,e=>e.series??[])}async function AF(e,t){return jF(`${t.baseUrl}/api/metrics?name=${encodeURIComponent(e)}`,{method:`DELETE`,signal:t.signal},t,e=>e.deletedSeries??0)}async function jF(e,t,n,r){let i;try{i=await n.fetch(e,t)}catch(e){return MF(e)?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}if(i.status===403)return{status:`error`,message:`Forbidden: the devtools server rejected this origin. Open the viewer from the same machine.`};let a;try{a=await i.json()}catch{return{status:`error`,message:`Unexpected response from ${n.baseUrl} (not JSON)`}}return i.ok?{status:`ok`,data:r(a)}:{status:`error`,message:`Server error: ${a.error??i.statusText}`}}function MF(e){return typeof e==`object`&&!!e&&`name`in e&&e.name===`AbortError`}function NF(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function PF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function FF(e){let t,n,r;e.length===2?(t=e===NF||e===PF?e:IF,n=e,r=e):(t=NF,n=(t,n)=>NF(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function IF(){return 0}function LF(e){return e===null?NaN:+e}var RF=FF(NF),zF=RF.right;RF.left,FF(LF).center;var BF=Math.sqrt(50),VF=Math.sqrt(10),HF=Math.sqrt(2);function UF(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=BF?10:a>=VF?5:a>=HF?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?UF(e,t,n*2):[s,c,l]}function WF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?UF(t,e,n):UF(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function GF(e,t,n){return t=+t,e=+e,n=+n,UF(e,t,n)[2]}function KF(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?GF(t,e,n):GF(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function qF(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function JF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function YF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function XF(){}var ZF=.7,QF=1/ZF,$F=`\\s*([+-]?\\d+)\\s*`,eI=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,tI=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,nI=/^#([0-9a-f]{3,8})$/,rI=RegExp(`^rgb\\(${$F},${$F},${$F}\\)$`),iI=RegExp(`^rgb\\(${tI},${tI},${tI}\\)$`),aI=RegExp(`^rgba\\(${$F},${$F},${$F},${eI}\\)$`),oI=RegExp(`^rgba\\(${tI},${tI},${tI},${eI}\\)$`),sI=RegExp(`^hsl\\(${eI},${tI},${tI}\\)$`),cI=RegExp(`^hsla\\(${eI},${tI},${tI},${eI}\\)$`),lI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};JF(XF,mI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:uI,formatHex:uI,formatHex8:dI,formatHsl:fI,formatRgb:pI,toString:pI});function uI(){return this.rgb().formatHex()}function dI(){return this.rgb().formatHex8()}function fI(){return DI(this).formatHsl()}function pI(){return this.rgb().formatRgb()}function mI(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=nI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?hI(t):n===3?new yI(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?gI(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?gI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=rI.exec(e))?new yI(t[1],t[2],t[3],1):(t=iI.exec(e))?new yI(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=aI.exec(e))?gI(t[1],t[2],t[3],t[4]):(t=oI.exec(e))?gI(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sI.exec(e))?EI(t[1],t[2]/100,t[3]/100,1):(t=cI.exec(e))?EI(t[1],t[2]/100,t[3]/100,t[4]):lI.hasOwnProperty(e)?hI(lI[e]):e===`transparent`?new yI(NaN,NaN,NaN,0):null}function hI(e){return new yI(e>>16&255,e>>8&255,e&255,1)}function gI(e,t,n,r){return r<=0&&(e=t=n=NaN),new yI(e,t,n,r)}function _I(e){return e instanceof XF||(e=mI(e)),e?(e=e.rgb(),new yI(e.r,e.g,e.b,e.opacity)):new yI}function vI(e,t,n,r){return arguments.length===1?_I(e):new yI(e,t,n,r??1)}function yI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}JF(yI,vI,YF(XF,{brighter(e){return e=e==null?QF:QF**+e,new yI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ZF:ZF**+e,new yI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yI(wI(this.r),wI(this.g),wI(this.b),CI(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bI,formatHex:bI,formatHex8:xI,formatRgb:SI,toString:SI}));function bI(){return`#${TI(this.r)}${TI(this.g)}${TI(this.b)}`}function xI(){return`#${TI(this.r)}${TI(this.g)}${TI(this.b)}${TI((isNaN(this.opacity)?1:this.opacity)*255)}`}function SI(){let e=CI(this.opacity);return`${e===1?`rgb(`:`rgba(`}${wI(this.r)}, ${wI(this.g)}, ${wI(this.b)}${e===1?`)`:`, ${e})`}`}function CI(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function TI(e){return e=wI(e),(e<16?`0`:``)+e.toString(16)}function EI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new kI(e,t,n,r)}function DI(e){if(e instanceof kI)return new kI(e.h,e.s,e.l,e.opacity);if(e instanceof XF||(e=mI(e)),!e)return new kI;if(e instanceof kI)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new kI(o,s,c,e.opacity)}function OI(e,t,n,r){return arguments.length===1?DI(e):new kI(e,t,n,r??1)}function kI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}JF(kI,OI,YF(XF,{brighter(e){return e=e==null?QF:QF**+e,new kI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ZF:ZF**+e,new kI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new yI(MI(e>=240?e-240:e+120,i,r),MI(e,i,r),MI(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new kI(AI(this.h),jI(this.s),jI(this.l),CI(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=CI(this.opacity);return`${e===1?`hsl(`:`hsla(`}${AI(this.h)}, ${jI(this.s)*100}%, ${jI(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function AI(e){return e=(e||0)%360,e<0?e+360:e}function jI(e){return Math.max(0,Math.min(1,e||0))}function MI(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var NI=e=>()=>e;function PI(e,t){return function(n){return e+n*t}}function FI(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function II(e){return(e=+e)==1?LI:function(t,n){return n-t?FI(t,n,e):NI(isNaN(t)?n:t)}}function LI(e,t){var n=t-e;return n?PI(e,n):NI(isNaN(e)?t:e)}var RI=(function e(t){var n=II(t);function r(e,t){var r=n((e=vI(e)).r,(t=vI(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=LI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function zI(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function BI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function VI(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=XI(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function HI(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function UI(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function WI(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=XI(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var GI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,KI=new RegExp(GI.source,`g`);function qI(e){return function(){return e}}function JI(e){return function(t){return e(t)+``}}function YI(e,t){var n=GI.lastIndex=KI.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=GI.exec(e))&&(i=KI.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:UI(r,i)})),n=KI.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?JI(c[0].x):qI(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function XI(e,t){var n=typeof t,r;return t==null||n===`boolean`?NI(t):(n===`number`?UI:n===`string`?(r=mI(t))?(t=r,RI):YI:t instanceof mI?RI:t instanceof Date?HI:BI(t)?zI:Array.isArray(t)?VI:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?WI:UI)(e,t)}function ZI(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function QI(e){return function(){return e}}function $I(e){return+e}var eL=[0,1];function tL(e){return e}function nL(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:QI(isNaN(t)?NaN:.5)}function rL(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function iL(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=nL(i,r),a=n(o,a)):(r=nL(r,i),a=n(a,o)),function(e){return a(r(e))}}function aL(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=nL(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=zF(e,t,1,r)-1;return a[n](i[n](t))}}function oL(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function sL(){var e=eL,t=eL,n=XI,r,i,a,o=tL,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==tL&&(o=rL(e[0],e[n-1])),s=n>2?aL:iL,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||(c=s(e.map(r),t,n)))(r(o(i)))}return d.invert=function(n){return o(i((l||(l=s(t,e.map(r),UI)))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,$I),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=ZI,u()},d.clamp=function(e){return arguments.length?(o=e?!0:tL,u()):o!==tL},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function cL(){return sL()(tL,tL)}function lL(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function uL(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function dL(e){return e=uL(Math.abs(e)),e?e[1]:NaN}function fL(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function pL(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var mL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hL(e){if(!(t=mL.exec(e)))throw Error(`invalid format: `+e);var t;return new gL({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}hL.prototype=gL.prototype;function gL(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}gL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function _L(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var vL;function yL(e,t){var n=uL(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(vL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+uL(e,Math.max(0,t+a-1))[0]}function bL(e,t){var n=uL(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var xL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:lL,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bL(e*100,t),r:bL,s:yL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function SL(e){return e}var CL=Array.prototype.map,wL=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function TL(e){var t=e.grouping===void 0||e.thousands===void 0?SL:fL(CL.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?SL:pL(CL.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=hL(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):xL[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=xL[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=_L(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?wL[8+vL/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,ee=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(ee+e,ee.length?m-r.length:1/0),ee=``),u){case`<`:e=n+e+r+ee;break;case`=`:e=n+ee+e+r;break;case`^`:e=ee.slice(0,T=ee.length>>1)+n+e+r+ee.slice(T);break;default:e=ee+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=hL(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(dL(t)/3)))*3,i=10**-r,a=wL[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var EL,DL,OL;kL({thousands:`,`,grouping:[3],currency:[`$`,``]});function kL(e){return EL=TL(e),DL=EL.format,OL=EL.formatPrefix,EL}function AL(e){return Math.max(0,-dL(Math.abs(e)))}function jL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(dL(t)/3)))*3-dL(Math.abs(e)))}function ML(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,dL(t)-dL(e))+1}function NL(e,t,n,r){var i=KF(e,t,n),a;switch(r=hL(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=jL(i,o))&&(r.precision=a),OL(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=ML(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=AL(i))&&(r.precision=a-(r.type===`%`)*2)}return DL(r)}function PL(e){var t=e.domain;return e.ticks=function(e){var n=t();return WF(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return NL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=GF(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function FL(){var e=cL();return e.copy=function(){return oL(e,FL())},qF.apply(e,arguments),PL(e)}function IL(e){return function(){return e}}var LL=Math.PI,RL=2*LL,zL=1e-6,BL=RL-zL;function VL(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function HL(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return VL;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var UL=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?VL:HL(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>zL){if(!(Math.abs(u*s-c*l)>zL)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((LL-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>zL&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>zL||Math.abs(this._y1-l)>zL)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%RL+RL),d>BL?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>zL&&this._append`A${n},${n},0,${+(d>=LL)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};UL.prototype;function WL(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new UL(t)}Array.prototype.slice;function GL(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function KL(e){this._context=e}KL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function qL(e){return new KL(e)}function JL(e){return e[0]}function YL(e){return e[1]}function XL(e,t){var n=IL(!0),r=null,i=qL,a=null,o=WL(s);e=typeof e==`function`?e:e===void 0?JL:IL(e),t=typeof t==`function`?t:t===void 0?YL:IL(t);function s(s){var c,l=(s=GL(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:IL(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:IL(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:IL(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function ZL(e,t,n){var r=null,i=IL(!0),a=null,o=qL,s=null,c=WL(l);e=typeof e==`function`?e:e===void 0?JL:IL(+e),t=typeof t==`function`?t:IL(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?YL:IL(+n);function l(l){var u,d,f,p=(l=GL(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return XL().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:IL(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:IL(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:IL(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:IL(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:IL(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:IL(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:IL(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var QL=ca(`<svg role="img"><path fill="none" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"></path></svg>`),$L=V(`<span>—</span>`);function eR(e,t){it(t,!0);let n=Z(t,`width`,3,80),r=Z(t,`height`,3,20),i=Z(t,`color`,3,`var(--color-accent)`),a=M(()=>t.points.map(e=>e.value??0)),o=M(()=>{if(t.points.length<2)return null;let e=FL().domain([t.points[0].timestamp,t.points[t.points.length-1].timestamp]).range([1,n()-1]),i=Math.min(...z(a)),o=Math.max(...z(a)),s=FL().domain(i===o?[i-1,o+1]:[i,o]).range([r()-1,1]);return XL().x(t=>e(t.timestamp)).y(e=>s(e.value??0))(t.points)});var s=ua(),c=I(s),l=e=>{var a=QL(),s=F(a);D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,t.ariaLabel??`Sparkline, ${t.points.length} points`),q(a,0,e),J(s,`d`,z(o)),J(s,`stroke`,i())},[()=>K($(`overflow-visible`,t.class))]),H(e,a)},u=e=>{var i=$L();R(e=>{q(i,1,e),so(i,`width:${n()??``}px;height:${r()??``}px`)},[()=>K($(`text-[10px] text-fg-subtle`,t.class))]),H(e,i)};W(c,e=>{z(o)?e(l):e(u,-1)}),H(e,s),at()}function tR(e,t){if(t===void 0)return e;if(t===`cumulative`&&e.length<2)return[];let n=[],r=+(t===`cumulative`);for(let i=r;i<e.length;i++){let r=e[i-1],a=r?.value??0,o=e[i].value??0,s=o;t===`cumulative`&&o>=a&&(s=o-a);let c=e[i].startTimestamp??r?.timestamp,l=c===void 0?0:(e[i].timestamp-c)/1e3;n.push({...e[i],value:l>0?s/l:s})}return n}function nR(e,t,n){if(e.length!==t.length+1)return;let r=e.reduce((e,t)=>e+t,0);if(r===0)return;let i=n*r,a=0;for(let n=0;n<e.length;n++){let r=e[n];if(a+r>=i){let e=n===0?0:t[n-1],o=n<t.length?t[n]:t[t.length-1];if(r===0)return o;let s=(i-a)/r;return e+(o-e)*s}a+=r}return t[t.length-1]}function rR(e,t){return e.length===t.length+1?t.length===0?[{label:`all`,count:e[0],from:-1/0,to:1/0}]:e.map((e,n)=>{let r=n===0?-1/0:t[n-1],i=n<t.length?t[n]:1/0;return{label:n===0?`≤${uR(t[0])}`:n===t.length?`>${uR(t[t.length-1])}`:`${uR(t[n-1])}–${uR(t[n])}`,count:e,from:r,to:i}}):[]}function iR(e){if(e.bucketCounts&&e.explicitBounds)return rR(e.bucketCounts,e.explicitBounds);if(e.scale===void 0)return[];let t=2**2**-e.scale,n=[];if(aR(n,e.negative,t,!0),e.zeroCount!==void 0){let t=e.zeroThreshold??0;n.push({label:t>0?`−${uR(t)}–${uR(t)}`:`0`,count:e.zeroCount,from:-t,to:t})}return aR(n,e.positive,t,!1),n.sort((e,t)=>e.from-t.from)}function aR(e,t,n,r){if(t)for(let i=0;i<t.bucketCounts.length;i++){let a=t.offset+i,o=n**a,s=n**(a+1),c=r?-s:o,l=r?-o:s;e.push({label:`${uR(c)}–${uR(l)}`,count:t.bucketCounts[i],from:c,to:l})}}function oR(e,t){if(e.bucketCounts&&e.explicitBounds)return nR(e.bucketCounts,e.explicitBounds,t);let n=iR(e),r=n.reduce((e,t)=>e+t.count,0);if(r===0)return;let i=t*r,a=0;for(let e of n){if(a+e.count>=i)return e.count===0?e.to:e.from+(i-a)/e.count*(e.to-e.from);a+=e.count}return n[n.length-1]?.to}function sR(e,t){if(e.length===0)return;let n=e.map(e=>e.value??0);switch(t){case`sum`:return n.reduce((e,t)=>e+t,0);case`avg`:return n.reduce((e,t)=>e+t,0)/n.length;case`min`:return Math.min(...n);case`max`:return Math.max(...n);case`last`:return n[n.length-1];case`count`:return e.length}}function cR(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(1,n),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.floor(e/o)*o,c=Math.ceil(t/o)*o,l=[],u=Math.round((c-s)/o);for(let e=0;e<=u;e++)l.push(s+e*o);return l}function lR(e,t){if(e.length<=t||t<3)return e;let n=Math.max(1,Math.floor((t-2)/2)),r=e.length/n,i=new Map;i.set(0,e[0]),i.set(e.length-1,e[e.length-1]);for(let t=0;t<n;t++){let n=Math.floor(t*r),a=Math.min(e.length,Math.floor((t+1)*r));if(n>=a)continue;let o=n,s=n;for(let t=n;t<a;t++){let n=e[t].value??0;n<(e[o].value??0)&&(o=t),n>(e[s].value??0)&&(s=t)}i.set(o,e[o]),i.set(s,e[s])}return[...i.entries()].sort((e,t)=>e[0]-t[0]).map(([,e])=>e)}function uR(e){return Number.isFinite(e)?Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*100)/100):`∞`}function dR(e){if(e.length===0)return[];let t=[...new Set(e.flatMap(e=>e.map(e=>e.timestamp)))].sort((e,t)=>e-t),n=e.map(e=>new Map(e.map(e=>[e.timestamp,e.value??0]))),r=new Map(t.map(e=>[e,0]));return n.map(e=>t.map(t=>{let n=r.get(t)??0,i=e.get(t)??0,a=n+Math.max(0,i);return r.set(t,a),{timestamp:t,y0:n,y1:a}}))}function fR(e,t){return t.map(t=>({quantile:t,points:e.flatMap(e=>{let n=oR(e,t);return n===void 0?[]:[{timestamp:e.timestamp,value:n}]})}))}function pR(e){let t=e.filter(e=>iR(e).length>0);if(t.length===0)return{columns:[],rows:[],max:0};let n=t[0],r=iR(n),i=r.map(e=>({label:e.label,from:e.from,to:e.to}));if(i.length===0)return{columns:[],rows:[],max:0};let a=t.filter(e=>iR(e).length===r.length&&iR(e).every((e,t)=>e.label===r[t].label)),o=Math.max(0,...a.flatMap(e=>iR(e).map(e=>e.count)));return{columns:a.slice().sort((e,t)=>e.timestamp-t.timestamp).map(e=>({timestamp:e.timestamp,cells:iR(e).map(({count:e})=>({count:e,intensity:o>0?e/o:0}))})),rows:i,max:o}}var mR=V(`<div>No data in this window</div>`),hR=ca(`<line x1="0" stroke="var(--color-line-subtle)" stroke-width="1"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),gR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),_R=ca(`<path opacity="0.75" stroke="var(--color-surface)" stroke-width="0.5" data-testid="stack-band"></path>`),vR=ca(`<path opacity="0.15"></path>`),yR=ca(`<path fill="none" stroke-width="1.5" stroke-linejoin="round"></path>`),bR=ca(`<circle r="2.5"></circle>`),xR=ca(`<!><!>`,1),SR=ca(`<circle r="3.5" fill="var(--color-warning)" stroke="var(--color-surface)" stroke-width="1" role="button" tabindex="0" class="cursor-pointer"></circle>`),CR=ca(`<svg role="img"><g><!><!><!><!></g></svg>`);function wR(e,t){it(t,!0);let n=Z(t,`width`,3,640),r=Z(t,`height`,3,220),i=Z(t,`area`,3,!1),a=Z(t,`stacked`,3,!1),o={top:8,right:12,bottom:22,left:44},s=M(()=>Math.max(1,n()-o.left-o.right)),c=M(()=>Math.max(1,r()-o.top-o.bottom)),l=M(()=>t.series.map(e=>({...e,points:lR(e.points,400)}))),u=M(()=>z(l).filter(e=>!t.isolated?.size||t.isolated.has(e.seriesId))),d=M(()=>a()?dR(z(u).map(e=>e.points)):null),f=M(()=>{let e=z(u).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=z(d)?z(d).flatMap(e=>e.map(e=>e.y1)):e.map(e=>e.value??0),r=Math.min(...t),i=Math.max(...t),a=Math.min(0,...n),o=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,minValue:a,maxValue:o===a?a+1:o}}),p=M(()=>z(f)?FL().domain([z(f).minTime,z(f).maxTime]).range([0,z(s)]):null),m=M(()=>z(f)?FL().domain([z(f).minValue,z(f).maxValue]).range([z(c),0]):null),h=M(()=>z(f)?cR(z(f).minValue,z(f).maxValue,4):[]),g=M(()=>z(f)?cR(z(f).minTime,z(f).maxTime,4):[]);function _(e){return!z(p)||!z(m)||e.length===0||e.length===1?null:XL().x(e=>z(p)(e.timestamp)).y(e=>z(m)(e.value??0))(e)}function v(e){return!z(p)||!z(m)||e.length<2?null:ZL().x(e=>z(p)(e.timestamp)).y0(z(m)(Math.max(0,z(f)?.minValue??0))).y1(e=>z(m)(e.value??0))(e)}function y(e){return gg(e.seriesId).stroke}function b(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function x(e){return Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):String(Math.round(e*1e3)/1e3)}function S(e){return!z(p)||!z(m)||e.length<2?null:ZL().x(e=>z(p)(e.timestamp)).y0(e=>z(m)(e.y0)).y1(e=>z(m)(e.y1))(e)}let C=M(()=>!z(p)||!z(m)?[]:z(u).flatMap(e=>e.points.flatMap(t=>(t.exemplars??[]).filter(e=>e.traceId).map(n=>({key:`${e.seriesId}:${n.timestamp}:${n.traceId}`,x:z(p)(n.timestamp||t.timestamp),y:z(m)(n.value),traceId:n.traceId,spanId:n.spanId,value:n.value})))));var w=ua(),T=I(w),ee=e=>{var n=mR();R(e=>{q(n,1,e),so(n,`height:${r()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},te=e=>{var a=CR(),l=F(a),f=F(l);G(f,16,()=>z(h),e=>e,(e,t)=>{let n=M(()=>z(m)?z(m)(t):0);var r=ua(),i=I(r),a=e=>{var r=hR(),i=I(r),a=L(i),o=F(a,!0);D(a),R(e=>{J(i,`x2`,z(s)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(o,e)},[()=>x(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(c)&&e(a)}),H(e,r)});var w=L(f);G(w,16,()=>z(g),e=>e,(e,t)=>{let n=M(()=>z(p)?z(p)(t):0);var r=ua(),i=I(r),a=e=>{var r=gR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(c)+14),U(i,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var T=L(w),ee=e=>{var t=ua();G(I(t),19,()=>z(u),e=>e.seriesId,(e,t,n)=>{let r=M(()=>S(z(d)[z(n)]));var i=ua(),a=I(i),o=e=>{var n=_R();R(e=>{J(n,`d`,z(r)),J(n,`fill`,e)},[()=>y(z(t))]),H(e,n)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),H(e,t)},te=e=>{var t=ua();G(I(t),17,()=>z(u),e=>e.seriesId,(e,t)=>{let n=M(()=>_(z(t).points));var r=xR(),a=I(r),o=e=>{let n=M(()=>v(z(t).points));var r=ua(),i=I(r),a=e=>{var r=vR();R(e=>{J(r,`d`,z(n)),J(r,`fill`,e)},[()=>y(z(t))]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)};W(a,e=>{i()&&e(o)});var s=L(a),c=e=>{var r=yR();R(e=>{J(r,`d`,z(n)),J(r,`stroke`,e)},[()=>y(z(t))]),H(e,r)},l=e=>{var n=bR();R((e,t,r)=>{J(n,`cx`,e),J(n,`cy`,t),J(n,`fill`,r)},[()=>z(p)?z(p)(z(t).points[0].timestamp):0,()=>z(m)?z(m)(z(t).points[0].value??0):0,()=>y(z(t))]),H(e,n)};W(s,e=>{z(n)?e(c):z(t).points.length===1&&e(l,1)}),H(e,r)}),H(e,t)};W(T,e=>{z(d)?e(ee):e(te,-1)}),G(L(T),17,()=>z(C),e=>e.key,(e,n)=>{var r=SR();R(e=>{J(r,`cx`,z(n).x),J(r,`cy`,z(n).y),J(r,`aria-label`,`Open trace ${z(n).traceId??``} (${e??``})`)},[()=>x(z(n).value)]),B(`click`,r,()=>t.onExemplar?.(z(n).traceId,z(n).spanId)),B(`keydown`,r,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t.onExemplar?.(z(n).traceId,z(n).spanId))}),H(e,r)}),D(l),D(a),R(e=>{J(a,`width`,n()),J(a,`height`,r()),J(a,`viewBox`,`0 0 ${n()??``} ${r()??``}`),J(a,`aria-label`,`Time series chart, ${z(u).length??``} series`),q(a,0,e),J(l,`transform`,`translate(${o.left??``},${o.top??``})`)},[()=>K($(`overflow-visible`,t.class))]),H(e,a)};W(T,e=>{z(f)?e(te,-1):e(ee)}),H(e,w),at()}ea([`click`,`keydown`]);var TR=V(`<div>No bucket data on this point</div>`),ER=V(`<div class="flex-1 flex flex-col items-center justify-end h-full gap-1"><span class="text-[10px] text-fg-subtle tabular-nums"> </span> <div class="w-full rounded-t bg-accent/70 hover:bg-accent transition-colors"></div> <span class="text-[10px] text-fg-subtle truncate w-full text-center"> </span></div>`),DR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg"> </span></span>`),OR=V(`<span class="ml-auto"><span class="text-fg-subtle">count</span> <span class="font-mono text-fg"> </span></span>`),kR=V(`<div><div class="flex items-end gap-1" role="img"></div> <div class="flex items-center gap-4 text-[11px] text-fg-muted border-t border-line pt-2"><!> <!></div></div>`);function AR(e,t){it(t,!0);let n=Z(t,`height`,3,160),r=M(()=>iR(t.point)),i=M(()=>Math.max(1,...z(r).map(e=>e.count))),a=M(()=>z(r).reduce((e,t)=>e+t.count,0)),o=M(()=>[.5,.9,.99].map(e=>({label:`p${e*100}`,value:oR(t.point,e)})));function s(e){if(e===void 0)return`—`;let n=Math.round(e*100)/100;return t.unit?`${n}${t.unit}`:String(n)}function c(e){return z(a)===0?`0%`:`${Math.round(e/z(a)*100)}%`}var l=ua(),u=I(l),d=e=>{var r=TR();R(e=>{q(r,1,e),so(r,`height:${n()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,r)},f=e=>{var l=kR(),u=F(l);G(u,21,()=>z(r),e=>e.label,(e,t)=>{var n=ER(),r=F(n),a=F(r,!0);D(r);var o=L(r,2),s=L(o,2),l=F(s,!0);D(s),D(n),R(e=>{U(a,z(t).count),so(o,`height:${z(t).count/z(i)*100}%`),J(o,`title`,`${z(t).label??``}: ${z(t).count??``} (${e??``})`),U(l,z(t).label)},[()=>c(z(t).count)]),H(e,n)}),D(u);var d=L(u,2),f=F(d);G(f,17,()=>z(o),e=>e.label,(e,t)=>{var n=DR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R(e=>{U(i,z(t).label),U(o,e)},[()=>s(z(t).value)]),H(e,n)});var p=L(f,2),m=e=>{var n=OR(),r=L(F(n),2),i=F(r,!0);D(r),D(n),R(()=>U(i,t.point.count)),H(e,n)};W(p,e=>{t.point.count!==void 0&&e(m)}),D(d),D(l),R(e=>{q(l,1,e),so(u,`height:${n()??``}px`),J(u,`aria-label`,`Histogram, ${z(r).length??``} buckets, ${z(a)??``} observations`)},[()=>K($(`flex flex-col gap-2`,t.class))]),H(e,l)};W(u,e=>{z(r).length===0?e(d):e(f,-1)}),H(e,l),at()}var jR=V(`<div>No bucketed data in this window</div>`),MR=V(`<span class="ml-0.5"> </span>`),NR=V(`<div class="text-[10px] text-fg-subtle flex items-center justify-end"> <!></div>`),PR=V(`<button type="button" class="w-full rounded-[1px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent"></button>`),FR=V(`<div class="flex-1 min-w-[8px] flex flex-col gap-px"></div>`),IR=V(`<div><div class="flex" role="img"><div class="shrink-0 pr-2 text-right"></div> <div class="flex-1 min-w-0 overflow-x-auto"><div class="flex gap-px h-full"></div></div></div> <div class="flex items-center gap-2 text-[10px] text-fg-subtle pl-2"><span> </span> <span class="flex-1 border-t border-line-subtle"></span> <span> </span> <span class="ml-2"> </span></div></div>`);function LR(e,t){it(t,!0);let n=Z(t,`rowHeight`,3,22),r=M(()=>pR(t.points));function i(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function a(e){return e===0?`background: var(--color-subtle)`:`background: color-mix(in oklch, var(--color-accent) ${(.12+e*.88)*100}%, transparent)`}var o=ua(),s=I(o),c=e=>{var n=jR();R(e=>q(n,1,e),[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded p-6`,t.class))]),H(e,n)},l=e=>{var o=IR(),s=F(o),c=F(s);G(c,21,()=>[...z(r).rows].reverse(),e=>e.label,(e,r)=>{var i=NR(),a=F(i,!0),o=L(a),s=e=>{var n=MR(),r=F(n,!0);D(n),R(()=>U(r,t.unit)),H(e,n)};W(o,e=>{t.unit&&e(s)}),D(i),R(()=>{so(i,`height:${n()??``}px`),U(a,z(r).label)}),H(e,i)}),D(c);var l=L(c,2),u=F(l);G(u,21,()=>z(r).columns,e=>e.timestamp,(e,o)=>{var s=FR();G(s,21,()=>[...z(o).cells].reverse(),ka,(e,s,c)=>{let l=M(()=>z(o).cells.length-1-c);var u=PR();R((e,i,a)=>{so(u,`height:${n()??``}px; ${e??``}`),J(u,`title`,`${z(r).rows[z(l)].label??``}${t.unit??``??``} at ${i??``}: ${z(s).count??``}`),J(u,`aria-label`,`${z(r).rows[z(l)].label??``} at ${a??``}: ${z(s).count??``} observations`)},[()=>a(z(s).intensity),()=>i(z(o).timestamp),()=>i(z(o).timestamp)]),B(`click`,u,()=>t.onCell?.(z(o).timestamp,z(l))),H(e,u)}),D(s),H(e,s)}),D(u),D(l),D(s);var d=L(s,2),f=F(d),p=F(f,!0);D(f);var m=L(f,4),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(d),D(o),R((e,t,n)=>{q(o,1,e),J(s,`aria-label`,`Distribution heatmap, ${z(r).rows.length??``} buckets over ${z(r).columns.length??``} intervals, busiest cell ${z(r).max??``}`),U(p,t),U(h,n),U(_,`busiest ${z(r).max??``}`)},[()=>K($(`flex flex-col gap-1`,t.class)),()=>i(z(r).columns[0].timestamp),()=>i(z(r).columns[z(r).columns.length-1].timestamp)]),H(e,o)};W(s,e=>{z(r).columns.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var RR=V(`<div>No bucketed data in this window</div>`),zR=ca(`<line x1="0" stroke="var(--color-line-subtle)"></line><text x="-6" text-anchor="end" dominant-baseline="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`,1),BR=ca(`<text text-anchor="middle" class="fill-[var(--color-fg-subtle)] text-[10px]"> </text>`),VR=ca(`<path fill="var(--color-accent)"></path>`),HR=ca(`<path fill="none" stroke="var(--color-accent)" stroke-width="1.25"></path>`),UR=V(`<span><span class="text-fg-subtle"> </span> <span class="font-mono text-fg ml-1"> </span></span>`),WR=V(`<div><svg role="img" class="overflow-visible"><g><!><!><!><!></g></svg> <div class="flex items-center gap-4 text-[11px] border-t border-line pt-2"></div></div>`);function GR(e,t){it(t,!0);let n=Z(t,`quantiles`,19,()=>[.5,.9,.99]),r=Z(t,`width`,3,640),i=Z(t,`height`,3,220),a={top:8,right:12,bottom:22,left:48},o=M(()=>Math.max(1,r()-a.left-a.right)),s=M(()=>Math.max(1,i()-a.top-a.bottom)),c=M(()=>[...n()].sort((e,t)=>e-t)),l=M(()=>fR(t.points,z(c))),u=M(()=>{let e=z(l).flatMap(e=>e.points);if(e.length===0)return null;let t=e.map(e=>e.timestamp),n=e.map(e=>e.value),r=Math.min(...t),i=Math.max(...t),a=Math.max(...n);return{minTime:r,maxTime:i===r?r+1:i,maxValue:a===0?1:a}}),d=M(()=>z(u)?FL().domain([z(u).minTime,z(u).maxTime]).range([0,z(o)]):null),f=M(()=>z(u)?FL().domain([0,z(u).maxValue]).range([z(s),0]):null),p=M(()=>z(u)?cR(0,z(u).maxValue,4):[]),m=M(()=>z(u)?cR(z(u).minTime,z(u).maxTime,4):[]);function h(e){return!z(d)||!z(f)||e.points.length<2?null:ZL().x(e=>z(d)(e.timestamp)).y0(z(s)).y1(e=>z(f)(e.value))(e.points)}function g(e){return!z(d)||!z(f)||e.points.length<2?null:XL().x(e=>z(d)(e.timestamp)).y(e=>z(f)(e.value))(e.points)}function _(e){return .3-e*.08}function v(e){return`p${Math.round(e*100)}`}function y(e){return new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}function b(e){let n=Math.round(e*10)/10;return t.unit?`${n}${t.unit}`:String(n)}let x=M(()=>z(l).map(e=>({quantile:e.quantile,value:e.points[e.points.length-1]?.value})));var S=ua(),C=I(S),w=e=>{var n=RR();R(e=>{q(n,1,e),so(n,`height:${i()??``}px`)},[()=>K($(`flex items-center justify-center text-xs text-fg-subtle border border-line rounded`,t.class))]),H(e,n)},T=e=>{var n=WR(),u=F(n),S=F(u),C=F(S);G(C,16,()=>z(p),e=>e,(e,t)=>{let n=M(()=>z(f)?z(f)(t):0);var r=ua(),i=I(r),a=e=>{var r=zR(),i=I(r),a=L(i),s=F(a,!0);D(a),R(e=>{J(i,`x2`,z(o)),J(i,`y1`,z(n)),J(i,`y2`,z(n)),J(a,`y`,z(n)),U(s,e)},[()=>b(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(s)&&e(a)}),H(e,r)});var w=L(C);G(w,16,()=>z(m),e=>e,(e,t)=>{let n=M(()=>z(d)?z(d)(t):0);var r=ua(),i=I(r),a=e=>{var r=BR(),i=F(r,!0);D(r),R(e=>{J(r,`x`,z(n)),J(r,`y`,z(s)+14),U(i,e)},[()=>y(t)]),H(e,r)};W(i,e=>{z(n)>=0&&z(n)<=z(o)&&e(a)}),H(e,r)});var T=L(w);G(T,19,()=>[...z(l)].reverse(),e=>e.quantile,(e,t,n)=>{let r=M(()=>h(z(t)));var i=ua(),a=I(i),o=e=>{var i=VR();R((e,t)=>{J(i,`d`,z(r)),J(i,`opacity`,e),J(i,`data-testid`,`band-${t??``}`)},[()=>_(z(l).length-1-z(n)),()=>v(z(t).quantile)]),H(e,i)};W(a,e=>{z(r)&&e(o)}),H(e,i)}),G(L(T),17,()=>z(l),e=>e.quantile,(e,t)=>{let n=M(()=>g(z(t)));var r=ua(),i=I(r),a=e=>{var r=HR();R(e=>{J(r,`d`,z(n)),J(r,`data-testid`,`line-${e??``}`)},[()=>v(z(t).quantile)]),H(e,r)};W(i,e=>{z(n)&&e(a)}),H(e,r)}),D(S),D(u);var ee=L(u,2);G(ee,21,()=>z(x),e=>e.quantile,(e,t)=>{var n=UR(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>v(z(t).quantile),()=>z(t).value===void 0?`—`:b(z(t).value)]),H(e,n)}),D(ee),D(n),R((e,t)=>{q(n,1,e),J(u,`width`,r()),J(u,`height`,i()),J(u,`viewBox`,`0 0 ${r()??``} ${i()??``}`),J(u,`aria-label`,`Percentile bands: ${t??``}`),J(S,`transform`,`translate(${a.left??``},${a.top??``})`)},[()=>K($(`flex flex-col gap-2`,t.class)),()=>z(c).map(v).join(`, `)]),H(e,n)};W(C,e=>{z(u)?e(T,-1):e(w)}),H(e,S),at()}var KR=V(`<button type="button"><!> </button>`),qR=V(`<div class="flex rounded border border-line overflow-hidden" role="group" aria-label="Chart type"></div>`),JR=V(`<option> </option>`),YR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Show cumulative or delta counter change per second"><input type="checkbox" class="w-3 h-3 rounded border-line"/> Rate</label>`),XR=V(`<label class="flex items-center gap-1.5 text-[11px] text-fg-muted cursor-pointer" title="Stack the series so each sits on the sum of those below"><input type="checkbox" class="w-3 h-3 rounded border-line"/> <!> Stack</label>`),ZR=V(`<label class="flex items-center gap-1 text-[11px] text-fg-muted"><span class="text-fg-subtle">Summarise</span> <select aria-label="Summary statistic" class="rounded border border-line bg-surface px-1.5 py-1 text-[11px] text-fg"></select></label> <!> <!>`,1),QR=V(`<div><!> <!></div>`);function $R(e,t){it(t,!0);let n=M(()=>t.kind===`histogram`||t.kind===`exponentialHistogram`),r=M(()=>t.kind!==`gauge`),i=M(()=>t.kind===`sum`),a=[{id:`timeseries`,label:`Time series`,icon:Wh},{id:`percentiles`,label:`Percentiles`,icon:vp},{id:`heatmap`,label:`Heatmap`,icon:vm}],o=M(()=>z(n)?a:a.filter(e=>e.id===`timeseries`)),s=[{id:`sum`,label:`Sum`},{id:`avg`,label:`Avg`},{id:`min`,label:`Min`},{id:`max`,label:`Max`},{id:`last`,label:`Last`},{id:`count`,label:`Count`}];var c=QR(),l=F(c),u=e=>{var n=qR();G(n,21,()=>z(o),e=>e.id,(e,n)=>{let r=M(()=>z(n).icon);var i=KR(),a=F(i);za(a,()=>z(r),(e,t)=>{t(e,{size:11})});var o=L(a);D(i),R(e=>{J(i,`aria-pressed`,t.mode===z(n).id),J(i,`title`,z(n).label),q(i,1,e),U(o,` ${z(n).label??``}`)},[()=>K($(`flex items-center gap-1 px-2 py-1 text-[11px] transition-colors`,`focus-visible:outline-none focus-visible:bg-hover`,t.mode===z(n).id?`bg-selected text-fg font-medium`:`text-fg-muted hover:bg-hover`))]),B(`click`,i,()=>t.onMode(z(n).id)),H(e,i)}),D(n),H(e,n)};W(l,e=>{z(o).length>1&&e(u)});var d=L(l,2),f=e=>{var n=ZR(),a=I(n),o=L(F(a),2);G(o,21,()=>s,e=>e.id,(e,t)=>{var n=JR(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).label),i!==(i=z(t).id)&&(n.value=(n.__value=z(t).id)??``)}),H(e,n)}),D(o);var c;lo(o),D(a);var l=L(a,2),u=e=>{var n=YR(),r=F(n);So(r),Ke(),D(n),R(()=>wo(r,t.rate)),B(`change`,r,e=>t.onRate(e.currentTarget.checked)),H(e,n)};W(l,e=>{z(i)&&e(u)});var d=L(l,2),f=e=>{var n=XR(),r=F(n);So(r),Em(L(r,2),{size:11}),Ke(),D(n),R(()=>wo(r,t.stacked)),B(`change`,r,e=>t.onStacked(e.currentTarget.checked)),H(e,n)};W(d,e=>{z(r)&&e(f)}),R(()=>{c!==(c=t.aggregate)&&(o.value=(o.__value=t.aggregate)??``,co(o,t.aggregate))}),B(`change`,o,e=>t.onAggregate(e.currentTarget.value)),H(e,n)};W(d,e=>{t.mode===`timeseries`&&e(f)}),D(c),R(e=>q(c,1,e),[()=>K($(`flex items-center gap-3 flex-wrap`,t.class))]),H(e,c),at()}ea([`click`,`change`]);var ez=V(`<button type="button" title="Delete this metric stream" aria-label="Delete selected metric" class="p-1.5 hover:bg-danger-bg rounded transition-colors text-fg-subtle hover:text-danger"><!></button>`),tz=V(`<div role="alert" class="m-4 rounded border border-danger-border bg-danger-bg px-3 py-2 text-xs text-danger"> </div>`),nz=V(`<div class="flex-1 flex items-center justify-center text-sm text-fg-subtle">No metrics received yet. Point an OTLP exporter at this server.</div>`),rz=V(`<span> </span>`),iz=V(`<button type="button" role="option"><div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-fg truncate"> </span> <!></div> <div class="mt-0.5 flex items-center gap-2 text-[10px] text-fg-subtle"><span class="uppercase tracking-wide"> </span> <!> <span> </span></div></button>`),az=V(`<div class="p-3 text-xs text-fg-subtle">No metric matches that filter.</div>`),oz=V(`<div class="text-sm text-fg-subtle">Select a metric.</div>`),sz=V(`<p class="text-xs text-fg-muted mt-0.5"> </p>`),cz=V(`<div class="text-xs text-fg-subtle">No data for this metric in the selected window.</div>`),lz=V(`<button type="button"><span class="w-2.5 h-2.5 rounded-sm shrink-0"></span> <span class="truncate text-fg-muted font-mono"> </span> <span class="ml-auto font-mono text-fg tabular-nums"> </span></button>`),uz=V(`<div class="mt-3 border-t border-line pt-2 space-y-1" role="group" aria-label="Series"></div>`),dz=V(`<div class="mb-3"><h4 class="text-sm font-semibold text-fg"> </h4> <!></div> <!> <!> <!>`,1),fz=V(`<div class="flex-1 flex min-h-0"><div class="w-72 shrink-0 border-r border-line flex flex-col min-h-0"><div class="p-2 border-b border-line"><!></div> <div class="flex-1 overflow-auto" role="listbox" aria-label="Metrics"><!> <!></div></div> <div class="flex-1 min-w-0 overflow-auto p-4"><!></div></div>`),pz=V(`<div class="flex flex-col h-full"><div class="flex items-center justify-between px-4 py-2 border-b border-line gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg shrink-0"><!> Metrics</h3> <!> <div class="flex items-center gap-1"><!> <button type="button" title="Refresh" aria-label="Refresh metrics" class="p-1.5 hover:bg-hover rounded transition-colors text-fg-subtle"><!></button></div></div> <!> <!></div>`);function mz(e,t){it(t,!0);function n(){let e=ml.value;return(e?Qo(e):null)??globalThis.location.origin}let r=N(_r([])),i=N(null),a=N(_r([])),o=N(null),s=N(!1),c=N(``),l=M(()=>hl.value),u=N(_r(new Set)),d=N(`timeseries`),f=N(`sum`),p=N(!1),m=N(!0),h=()=>({fetch:globalThis.fetch.bind(globalThis),baseUrl:n()});async function g(e=z(c)){let t=await OF(h(),e);t.status===`ok`?(P(r,t.data,!0),P(o,null),!z(i)&&z(r).length>0&&v(z(r)[0].name)):t.status===`error`&&P(o,t.message,!0)}async function _(e){P(s,!0);let t=await kF({name:e,window:As(ws(hl.value,Date.now()))},h());t.status!==`aborted`&&(P(s,!1),t.status===`ok`?(P(a,t.data,!0),P(o,null)):P(o,t.message,!0))}function v(e){P(i,e,!0),P(u,new Set,!0),P(d,`timeseries`),P(f,`sum`),P(p,!1),_(e)}function y(){g(),z(i)&&_(z(i))}function b(e){hl.value=e,z(i)&&_(z(i))}function x(e,t){Pu(e),Gc(e,t),Nu(`traces`)}function S(e){let t=new Set(z(u));t.has(e)?t.delete(e):t.add(e),P(u,t,!0)}async function C(){if(!z(i)||!globalThis.confirm(`Delete every stored series for “${z(i)}”?`))return;let e=await AF(z(i),h());if(e.status!==`ok`){e.status===`error`&&P(o,e.message,!0);return}P(i,null),P(a,[],!0),await g(``)}Lr(()=>{let e=z(c),t=setTimeout(()=>void g(e),200);return()=>clearTimeout(t)});let w=M(()=>z(r).find(e=>e.name===z(i))),T=M(()=>z(w)?.kind===`histogram`||z(w)?.kind===`exponentialHistogram`),ee=M(()=>z(a).map(e=>({...e,points:z(m)?tR(e.points,e.temporality):e.points}))),te=M(()=>z(a).flatMap(e=>e.points).sort((e,t)=>e.timestamp-t.timestamp)),ne=M(()=>z(r)),re=M(()=>z(a).map(e=>({id:e.seriesId,color:gg(e.seriesId).stroke,label:ie(e),value:sR(z(m)?tR(e.points,e.temporality):e.points,e.kind===`gauge`?`last`:z(f))})));function ie(e){let t=Object.entries(e.attributes),n=Object.entries(e.resource??{}).filter(([e])=>e!==`service.name`);return[...t,...n].map(([e,t])=>`${e}=${String(t)}`).join(` `)||e.service}function ae(e,t){return e===void 0?`—`:`${(Math.round(e*100)/100).toLocaleString(void 0,{maximumFractionDigits:2})}${t&&t!==`1`?` ${t}`:``}${z(m)&&z(w)?.kind===`sum`?`/s`:``}`}var oe=pz(),se=F(oe),ce=F(se);bp(F(ce),{size:16}),Ke(),D(ce);var le=L(ce,2);xA(le,{get selection(){return z(l)},onChange:b});var E=L(le,2),ue=F(E),de=e=>{var t=ez();Hh(F(t),{size:14}),D(t),B(`click`,t,C),H(e,t)};W(ue,e=>{z(i)&&e(de)});var fe=L(ue,2),pe=F(fe);{let e=M(()=>z(s)?`animate-spin`:``);mh(pe,{size:14,get class(){return z(e)}})}D(fe),D(E),D(se);var me=L(se,2),he=e=>{var t=tz(),n=F(t,!0);D(t),R(()=>U(n,z(o))),H(e,t)};W(me,e=>{z(o)&&e(he)});var ge=L(me,2),_e=e=>{H(e,nz())},ve=e=>{var t=fz(),n=F(t),r=F(n);$_(F(r),{get value(){return z(c)},onValue:e=>P(c,e,!0),placeholder:`Filter metrics…`,ariaLabel:`Filter metrics`}),D(r);var o=L(r,2),s=F(o);G(s,17,()=>z(ne),e=>e.name+e.kind,(e,t)=>{var n=iz(),r=F(n),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=e=>{{let n=M(()=>z(m)?tR(z(a)[0].points,z(a)[0].temporality):z(a)[0].points);eR(e,{get points(){return z(n)},width:48,height:14,get ariaLabel(){return`${z(t).name??``} trend`}})}};W(c,e=>{z(t).name===z(i)&&z(a).length>0&&e(l)}),D(r);var u=L(r,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2),h=e=>{var n=rz(),r=F(n,!0);D(n),R(()=>U(r,z(t).unit)),H(e,n)};W(p,e=>{z(t).unit&&z(t).unit!==`1`&&e(h)});var g=L(p,2),_=F(g);D(g),D(u),D(n),R(e=>{J(n,`aria-selected`,z(t).name===z(i)),q(n,1,e),U(s,z(t).name),U(f,z(t).kind),U(_,`${z(t).seriesCount??``}
29
+ series`)},[()=>K($(`w-full text-left px-3 py-2 border-b border-line-subtle hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(t).name===z(i)&&`bg-selected`))]),B(`click`,n,()=>v(z(t).name)),H(e,n)});var l=L(s,2),h=e=>{H(e,az())};W(l,e=>{z(ne).length===0&&e(h)}),D(o),D(n);var g=L(n,2),_=F(g),y=e=>{H(e,oz())},b=e=>{var t=dz(),n=I(t),r=F(n),i=F(r,!0);D(r);var o=L(r,2),s=e=>{var t=sz(),n=F(t,!0);D(t),R(()=>U(n,z(w).description)),H(e,t)};W(o,e=>{z(w).description&&e(s)}),D(n);var c=L(n,2);$R(c,{get kind(){return z(w).kind},get mode(){return z(d)},onMode:e=>P(d,e,!0),get aggregate(){return z(f)},onAggregate:e=>P(f,e,!0),get stacked(){return z(p)},onStacked:e=>P(p,e,!0),get rate(){return z(m)},onRate:e=>P(m,e,!0),class:`mb-3`});var l=L(c,2),h=e=>{H(e,cz())},g=e=>{LR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},_=e=>{GR(e,{get points(){return z(te)},get unit(){return z(w).unit}})},v=e=>{AR(e,{get point(){return z(te)[z(te).length-1]},get unit(){return z(w).unit}})},y=e=>{{let t=M(()=>z(ee).length===1&&!z(p));wR(e,{get series(){return z(ee)},get isolated(){return z(u)},get stacked(){return z(p)},get area(){return z(t)},onExemplar:x})}};W(l,e=>{z(a).length===0?e(h):z(d)===`heatmap`?e(g,1):z(d)===`percentiles`?e(_,2):z(T)?e(v,3):e(y,-1)});var b=L(l,2),C=e=>{var t=uz();G(t,21,()=>z(re),e=>e.id,(e,t)=>{var n=lz(),r=F(n),i=L(r,2),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),D(n),R((e,i,o)=>{J(n,`aria-pressed`,e),q(n,1,i),so(r,`background:${z(t).color??``}`),U(a,z(t).label),U(s,o)},[()=>z(u).has(z(t).id),()=>K($(`w-full flex items-center gap-2 px-1 py-0.5 rounded text-[11px] hover:bg-hover`,`focus-visible:outline-none focus-visible:bg-hover`,z(u).size>0&&!z(u).has(z(t).id)&&`opacity-40`)),()=>ae(z(t).value,z(w).unit)]),B(`click`,n,()=>S(z(t).id)),H(e,n)}),D(t),H(e,t)};W(b,e=>{z(a).length>0&&z(d)===`timeseries`&&e(C)}),R(()=>U(i,z(w).name)),H(e,t)};W(_,e=>{z(w)?e(b,-1):e(y)}),D(g),D(t),H(e,t)};W(ge,e=>{z(r).length===0?e(_e):e(ve,-1)}),D(oe),B(`click`,fe,y),H(e,oe),at()}ea([`click`]);function hz(e){let t=e.severityNumber,n=(e.severityText??``).toUpperCase();return n===`ERROR`||t!==void 0&&t>=17?`error`:n===`WARN`||n===`WARNING`||t!==void 0&&t>=13?`warn`:`info`}function gz(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function _z(e){try{return JSON.stringify({body:e.body,severity:e.severityText??null,severityNumber:e.severityNumber??null,timestamp:e.timestamp,traceId:e.traceId??null,attributes:e.attributes??{}},null,2)}catch{return gz(e.body)}}function vz(e,t,n){if(n!==`all`){let t=hz(e);if(n===`error`&&t!==`error`||n===`warn`&&t!==`warn`&&t!==`error`||n===`info`&&t!==`info`)return!1}return ev(t.toLowerCase(),[gz(e.body),e.severityText,e.resourceName,e.traceId])}function yz(e){let t=hz(e);return t===`error`?`text-danger`:t===`warn`?`text-warning`:`text-fg-subtle`}function bz(e){let t=hz(e);return t===`error`?`bg-danger`:t===`warn`?`bg-warning`:`bg-line`}function xz(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function Sz(e){try{return JSON.stringify(e.attributes??{},null,2)}catch{return`{}`}}var Cz=V(`<span class="inline-flex items-baseline gap-1 max-w-[16rem] font-mono text-[11px] whitespace-nowrap"><span class="text-fg-subtle"> </span> <span class="text-fg-muted truncate"> </span></span>`),wz=V(`<span class="flex-shrink-0 text-fg-subtle truncate max-w-[10rem]"> </span>`),Tz=V(`<button type="button" title="Go to trace" aria-label="Go to trace" class="flex-shrink-0 inline-flex items-center justify-center p-1 rounded text-fg-subtle hover:text-fg hover:bg-hover opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity"><!></button>`),Ez=V(`<div class="font-mono text-xs break-words whitespace-pre-wrap pr-6"> </div>`),Dz=V(`<pre class="font-mono text-[11px] text-fg-muted whitespace-pre-wrap break-words pr-6"> </pre>`),Oz=V(`<div class="flex items-center gap-1"><button type="button" class="inline-flex items-center gap-1 text-xs text-fg-muted hover:underline"><!> Go to trace</button> <!></div>`),kz=V(`<div class="pl-3 pr-2 pb-2 space-y-2"><!> <!> <!></div>`),Az=V(`<div class="group relative flex flex-col border-b border-line-subtle hover:bg-hover"><span aria-hidden="true"></span> <div class="flex items-center gap-2 pl-3 pr-2 py-1 text-xs"><button type="button" class="flex flex-1 items-center gap-2 min-w-0 text-left"><span class="font-mono tabular-nums text-fg-subtle flex-shrink-0"> </span> <span> </span> <span class="font-mono text-fg truncate min-w-0"> </span> <span class="flex items-center gap-1.5 min-w-0 flex-1 overflow-hidden"></span> <!></button> <!> <!></div> <!></div>`),jz=V(`<button class="px-2 py-1 text-xs rounded text-fg-subtle hover:bg-hover transition-colors" title="Drop buffered logs received while paused">Drop buffer</button>`),Mz=V(`<div class="text-center text-fg-subtle text-sm py-12">Loading logs…</div>`),Nz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs yet. Send logs via AutotelLogExporter or POST /ingest/logs.</div>`),Pz=V(`<div class="text-center text-fg-subtle text-sm py-12">No logs match the current filter.</div>`),Fz=V(`<div class="px-4 py-3 text-center text-xs text-fg-subtle"> </div>`),Iz=V(`<!> <!>`,1),Lz=V(`<div class="flex flex-col h-full"><div class="px-4 py-3 border-b border-line flex items-center justify-between gap-2"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> </h3> <div class="flex items-center gap-1"><button><!> </button> <!></div></div> <div class="px-4 py-2 border-b border-line flex items-center gap-2"><!> <!> <!> <select class="text-xs border border-line rounded px-1.5 py-1 bg-surface text-fg-muted"><option>All</option><option>Errors</option><option>Warn+</option><option>Info</option></select></div> <div class="flex-1 overflow-auto space-y-0"><!></div></div>`);function Rz(e,t){it(t,!0);let n=(e,t=p)=>{let n=M(()=>gz(t().body)),r=M(()=>yz(t())),i=M(()=>bz(t())),a=M(()=>z(c).has(t().id));var o=Az(),s=F(o),u=L(s,2),d=F(u),f=F(d),m=F(f,!0);D(f);var h=L(f,2),g=F(h,!0);D(h);var v=L(h,2),y=F(v,!0);D(v);var x=L(v,2);G(x,21,()=>c_(t().attributes??{},4),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=Cz(),o=F(a),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(()=>{J(a,`title`,`${r()}: ${i()}`),U(s,r()),U(l,i())}),H(e,a)}),D(x);var S=L(x,2),C=e=>{var n=wz(),r=F(n,!0);D(n),R(()=>U(r,t().resourceName)),H(e,n)};W(S,e=>{t().resourceName&&e(C)}),D(d);var w=L(d,2),T=e=>{var n=Tz();Am(F(n),{size:12}),D(n),B(`click`,n,()=>b(t())),H(e,n)};W(w,e=>{t().traceId&&e(T)});var ee=L(w,2);{let e=M(()=>_z(t()));mv(ee,{get value(){return z(e)},label:`Copy log as JSON`,class:`flex-shrink-0 opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(u);var te=L(u,2),ne=e=>{var r=kz(),i=F(r);X_(i,{get content(){return z(n)},children:(e,t)=>{var r=Ez(),i=F(r,!0);D(r),R(()=>U(i,z(n))),H(e,r)},$$slots:{default:!0}});var a=L(i,2),o=e=>{{let n=M(()=>Sz(t()));X_(e,{get content(){return z(n)},children:(e,n)=>{var r=Dz(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>Sz(t())]),H(e,r)},$$slots:{default:!0}})}},s=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(a,e=>{z(s)&&e(o)});var c=L(a,2),l=e=>{var n=Oz(),r=F(n);Am(F(r),{size:12}),Ke(),D(r),mv(L(r,2),{get value(){return t().traceId},label:`Copy trace ID`}),D(n),B(`click`,r,()=>b(t())),H(e,n)};W(c,e=>{t().traceId&&e(l)}),D(r),H(e,r)};W(te,e=>{z(a)&&e(ne)}),D(o),R((e,r,i)=>{q(s,1,e),J(d,`aria-expanded`,z(a)),J(d,`title`,z(a)?`Collapse log`:`Expand log`),U(m,r),q(h,1,i),U(g,t().severityText??`LOG`),U(y,z(n))},[()=>K($(`absolute inset-y-0 left-0 w-0.5`,z(i))),()=>xz(t().timestamp),()=>K($(`flex-shrink-0 font-medium uppercase tracking-wide text-[10px]`,z(r)))]),B(`click`,d,()=>l(t().id)),H(e,o)},r=M(()=>Jl.value),i=M(()=>Tl.value),a=M(()=>kl.value),o=N(``),s=N(`all`),c=N(_r(new Set));function l(e){let t=new Set(z(c));t.has(e)?t.delete(e):t.add(e),P(c,t,!0)}let u=HA({client:{fetch:globalThis.fetch.bind(globalThis),baseUrl:()=>(ml.value?Qo(ml.value):null)??globalThis.location.origin}});Lr(()=>()=>u.dispose());let d=N(null),f=N(_r([]));Lr(()=>{let e=(ml.value?Qo(ml.value):null)??globalThis.location.origin;e!==z(d)&&(P(d,e,!0),wA(`logs`,{fetch:globalThis.fetch.bind(globalThis),baseUrl:e}).then(e=>P(f,e,!0)),u.refresh())});let m=N(0);Lr(()=>{let e=z(r).length;e>z(m)&&u.arrived(e-z(m)),P(m,e,!0)});let h=M(()=>u.results.value),g=M(()=>{let e=u.ready.value&&u.failure.value===null,t=z(r);e&&(t=z(o).length>0?z(h):v(z(h),z(r)));let n=new Set;return t.filter(t=>!n.has(t.id)&&n.add(t.id)&&vz(t,e?``:z(o),z(s)))});function v(e,t){let n=new Set(e.map(e=>e.id));return[...e,...t.filter(e=>!n.has(e.id))]}let y=M(()=>z(o).length>0||z(s)!==`all`);function b(e){e.traceId&&(Pu(e.traceId),Nu(`traces`))}var x=Lz(),S=F(x),C=F(S),w=F(C);im(w,{size:16});var T=L(w);D(C);var ee=L(C,2),te=F(ee),ne=F(te),re=e=>{oh(e,{size:12})},ie=e=>{nh(e,{size:12})};W(ne,e=>{z(i)?e(re):e(ie,-1)});var ae=L(ne);D(te);var oe=L(te,2),se=e=>{var t=jz();B(`click`,t,function(...e){ku?.apply(this,e)}),H(e,t)};W(oe,e=>{z(i)&&z(a)>0&&e(se)}),D(ee),D(S);var ce=L(S,2),le=F(ce);Hb(le,{get value(){return u.text.value},onInput:e=>{u.setText(e),P(o,e,!0)},onSubmit:()=>u.submit(),get serverErrors(){return u.errors.value},get fields(){return z(f)},placeholder:`Filter — e.g. severity_number >= 17 AND service = api`,class:`flex-1`});var E=L(le,2);xA(E,{get selection(){return u.window.value},onChange:e=>u.setWindow(e)});var ue=L(E,2);CA(ue,{get count(){return u.pending},get live(){return u.live},onResume:()=>{P(o,``),u.resume()}});var de=L(ue,2),fe=F(de);fe.value=fe.__value=`all`;var pe=L(fe);pe.value=pe.__value=`error`;var me=L(pe);me.value=me.__value=`warn`;var he=L(me);he.value=he.__value=`info`,D(de);var ge;lo(de),D(ce);var _e=L(ce,2),ve=F(_e),ye=e=>{H(e,Mz())},be=e=>{H(e,Nz())},xe=e=>{H(e,Pz())},Se=e=>{var t=Iz(),r=I(t);G(r,17,()=>z(g),e=>e.id,(e,t)=>{n(e,()=>z(t))});var i=L(r,2),a=e=>{var t=Fz(),n=F(t,!0);D(t),Za(t,(e,t)=>UA?.(e,t),()=>({onReach:()=>u.loadMore(),disabled:u.loading.value})),R(()=>U(n,u.loading.value?`Loading…`:`Scroll for more`)),H(e,t)};W(i,e=>{u.nextCursor.value&&e(a)}),H(e,t)};W(ve,e=>{u.loading.value&&!u.ready.value&&z(r).length===0?e(ye):z(g).length===0&&!z(y)?e(be,1):z(g).length===0?e(xe,2):e(Se,-1)}),D(_e),D(x),R(e=>{U(T,` Logs (${z(g).length??``})`),q(te,1,e),J(te,`title`,z(i)?`Resume live tail`:`Pause live tail`),U(ae,` ${z(i)?`Resume${z(a)>0?` (+${z(a)})`:``}`:`Pause`}`),ge!==(ge=z(s))&&(de.value=(de.__value=z(s))??``,co(de,z(s)))},[()=>K($(`flex items-center gap-1 px-2 py-1 text-xs rounded transition-colors`,z(i)?`bg-warning-bg text-warning hover:bg-warning-bg`:`hover:bg-hover text-fg-muted`))]),B(`click`,te,function(...e){Ou?.apply(this,e)}),B(`change`,de,e=>P(s,e.currentTarget.value,!0)),H(e,x),at()}ea([`click`,`change`]);var zz=V(`<p class="p-3 text-xs text-fg-muted">No stack frames on this error.</p>`),Bz=V(`<button type="button"><span class="font-mono text-xs text-fg"> </span> <span class="font-mono text-[11px] text-fg-subtle"> </span></button>`),Vz=V(`<div class="flex flex-col items-start gap-0.5 px-3 py-2"><span class="flex items-center gap-2"><span class="font-mono text-xs text-fg-muted"> </span> <span class="rounded bg-subtle px-1.5 py-0.5 text-[10px] text-fg-subtle"> </span></span> <span class="font-mono text-[11px] text-fg-muted"> </span></div>`),Hz=V(`<li><!></li>`),Uz=V(`<ol class="divide-y divide-line-subtle"></ol>`);function Wz(e,t){it(t,!0);let n=Z(t,`selected`,3,null),r={dependency:`node_modules`,native:`runtime`};function i(e){return`${e.file}:${e.line}:${e.column}`}function a(e){return n()!==null&&n().file===e.file&&n().line===e.line&&n().column===e.column}var o=ua(),s=I(o),c=e=>{H(e,zz())},l=e=>{var n=Uz();G(n,21,()=>t.frames,ka,(e,n)=>{let o=M(()=>z(n).kind===`app`?null:r[z(n).kind]);var s=Hz(),c=F(s),l=e=>{var r=Bz(),o=F(r),s=F(o,!0);D(o);var c=L(o,2),l=F(c,!0);D(c),D(r),R((e,t)=>{q(r,1,e),U(s,z(n).function??`(anonymous)`),U(l,t)},[()=>K($(`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-hover`,a(z(n))&&`bg-subtle border-l-2 border-accent`)),()=>i(z(n))]),B(`click`,r,()=>t.onselect?.(z(n))),H(e,r)},u=e=>{var t=Vz(),r=F(t),a=F(r),s=F(a,!0);D(a);var c=L(a,2),l=F(c,!0);D(c),D(r);var u=L(r,2),d=F(u,!0);D(u),D(t),R(e=>{U(s,z(n).function??`(anonymous)`),U(l,z(o)),U(d,e)},[()=>i(z(n))]),H(e,t)};W(c,e=>{z(n).kind===`app`?e(l):e(u,-1)}),D(s),H(e,s)}),D(n),H(e,n)};W(s,e=>{t.frames.length===0?e(c):e(l,-1)}),H(e,o),at()}ea([`click`]);var Gz=V(`<p class="p-3 text-xs text-fg-muted">This file could not be read. It may be outside the project, or generated
30
+ rather than written.</p>`),Kz=V(`<button type="button" class="rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-hover">Open in editor</button>`),qz=V(`<li><span class="w-8 shrink-0 select-none text-right text-fg-subtle"> </span> <span class="whitespace-pre"> </span></li>`),Jz=V(`<div class="flex flex-col"><div class="flex items-center justify-between border-b border-line px-3 py-1.5"><span class="font-mono text-[11px] text-fg-subtle"> </span> <!></div> <ol class="overflow-x-auto py-1"></ol></div>`);function Yz(e,t){it(t,!0);var n=ua(),r=I(n),i=e=>{H(e,Gz())},a=e=>{var n=Jz(),r=F(n),i=F(r),a=F(i);D(i);var o=L(i,2),s=e=>{var n=Kz();B(`click`,n,()=>t.onopen?.(t.window)),H(e,n)};W(o,e=>{t.onopen&&e(s)}),D(r);var c=L(r,2);G(c,21,()=>t.window.lines,ka,(e,n,r)=>{let i=M(()=>t.window.startLine+r),a=M(()=>z(i)===t.window.line);var o=qz(),s=F(o),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(o),R(e=>{J(o,`aria-current`,z(a)?`true`:void 0),q(o,1,e),U(c,z(i)),U(u,z(n))},[()=>K($(`flex gap-3 px-3 font-mono text-[11px] leading-5`,z(a)?`bg-danger-bg text-fg`:`text-fg-muted`))]),H(e,o)}),D(c),D(n),R(()=>U(a,`${t.window.file??``}:${t.window.line??``}`)),H(e,n)};W(r,e=>{t.window===null?e(i):e(a,-1)}),H(e,n),at()}ea([`click`]);function Xz(e){return e.startsWith(`node:`)||e.startsWith(`[`)||e.startsWith(`<`)?`native`:/(^|[/\\])node_modules([/\\]|$)/.test(e)?`dependency`:`app`}var Zz=/^\s*at\s+(?:async\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/,Qz=/^\s*at\s+(?:async\s+)?(.+?):(\d+):(\d+)$/;function $z(e){if(!e.startsWith(`file://`))return e;try{let t=decodeURIComponent(new URL(e).pathname);return/^\/[A-Za-z]:/.test(t)?t.slice(1):t}catch{return e}}function eB(e){let t=[];for(let n of e.split(`
31
+ `)){let e=Zz.exec(n);if(e){let n=$z(e[2]);t.push({function:e[1],file:n,line:Number(e[3]),column:Number(e[4]),kind:Xz(n)});continue}let r=Qz.exec(n);if(r){let e=$z(r[1]);t.push({file:e,line:Number(r[2]),column:Number(r[3]),kind:Xz(e)})}}return t}var tB=V(`<div class="overflow-hidden rounded border border-line"><!></div>`),nB=V(`<div class="flex flex-col gap-2"><div class="overflow-hidden rounded border border-line"><!></div> <!></div>`);function rB(e,t){it(t,!0);let n=Z(t,`context`,3,4),r=M(()=>eB(t.stackTrace)),i=N(null),a=N(null),o=N(!1),s=0;async function c(e){P(i,e,!0),P(o,!1);let r=++s,c=await t.loadSource(e,n());r===s&&(P(a,c,!0),P(o,!0))}var l=ua(),u=I(l),d=e=>{var t=nB(),n=F(t);Wz(F(n),{get frames(){return z(r)},get selected(){return z(i)},onselect:c}),D(n);var s=L(n,2),l=e=>{var t=tB();Yz(F(t),{get window(){return z(a)}}),D(t),H(e,t)};W(s,e=>{z(o)&&e(l)}),D(t),H(e,t)};W(u,e=>{z(r).length>0&&e(d)}),H(e,l),at()}function iB(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}var aB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),oB=V(`<pre class="text-xs font-mono bg-code text-fg p-2 rounded overflow-x-auto whitespace-pre-wrap"> </pre>`),sB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Stack Trace</h5> <!> <details class="mt-2"><summary class="cursor-pointer text-[11px] text-fg-subtle hover:text-fg">Raw stack</summary> <!></details></div>`),cB=V(`<span class="px-2 py-0.5 text-xs font-mono bg-hover text-fg-muted rounded"> </span>`),lB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Affected Operations</h5> <div class="flex flex-wrap gap-1"></div></div>`),uB=V(`<div class="group flex items-center gap-1"><button class="flex items-center gap-1 text-xs text-fg-muted hover:text-fg font-mono"><!> <!></button> <!></div>`),dB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Recent Traces</h5> <div class="space-y-1"></div></div>`),fB=V(`<div class="flex gap-2"><span class="text-fg-subtle"> </span> <span class="font-mono text-fg-muted"> </span></div>`),pB=V(`<div><h5 class="text-xs font-semibold text-fg-muted mb-1.5">Context</h5> <div class="text-xs space-y-0.5"></div></div>`),mB=V(`<div class="border-t border-line p-3 bg-subtle space-y-3"><!> <!> <!> <!> <div class="text-xs text-fg-subtle pt-2 border-t border-line"><div class="flex gap-4"><span> </span> <span> </span></div></div></div>`),hB=V(`<div role="option"><button class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1"><span class="text-sm font-semibold text-danger"> </span> <span class="px-1.5 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded"> </span> <!></div> <div class="group flex items-start gap-1 mb-2"><p class="text-sm text-fg-muted truncate"> </p> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span class="flex items-center gap-1"><!> </span> <span class="flex items-center gap-1"><!> </span></div></div></button> <!></div>`),gB=V(`<span class="text-xs font-normal text-fg-muted"> </span>`),_B=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-danger-bg text-danger rounded-full"> </span>`),vB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Groups:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Total:</span> <span class="font-semibold text-fg"> </span></div> <div class="text-sm"><span class="text-fg-muted">Last hour:</span> <span class="font-semibold text-danger"> </span></div></div>`),yB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No errors captured</p> <p class="text-xs text-fg-subtle mt-1">Errors from failed traces will appear here</p></div>`),bB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No matching errors</p> <p class="text-xs text-fg-subtle mt-1">No error groups match the current filter</p></div>`),xB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Errors <!> <!></h3> <div class="flex items-center gap-2"><select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>Most Recent</option><option>Most Frequent</option></select></div></div> <!> <!> <div role="listbox" tabindex="0" aria-label="Error groups" class="flex-1 overflow-auto space-y-2 focus:outline-none"><!></div></div>`);function SB(e,t){it(t,!0);let n=(e,t=p,n=p,r=p,i=p)=>{let a=M(()=>Date.now()-t().firstSeen),o=M(()=>Date.now()-t().lastSeen);var s=hB(),c=F(s),l=F(c),u=F(l),d=e=>{wp(e,{size:16,class:`text-fg-subtle`})},f=e=>{Op(e,{size:16,class:`text-fg-subtle`})};W(u,e=>{n()?e(d):e(f,-1)}),D(l);var v=L(l,2),y=F(v),b=F(y),x=F(b,!0);D(b);var S=L(b,2),C=F(S);D(S);var w=L(S,2),T=e=>{var n=aB(),r=F(n,!0);D(n),R(()=>U(r,t().service)),H(e,n)};W(w,e=>{t().service&&e(T)}),D(y);var ee=L(y,2),te=F(ee),ne=F(te,!0);D(te);var re=L(te,2);{let e=M(()=>`${t().type}: ${t().message}`);mv(re,{get value(){return z(e)},label:`Copy error message`,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`})}D(ee);var ie=L(ee,2),ae=F(ie),oe=F(ae);Pp(oe,{size:12});var se=L(oe);D(ae);var ce=L(ae,2),le=F(ce);Pp(le,{size:12});var E=L(le);D(ce),D(ie),D(v),D(c);var ue=L(c,2),de=e=>{var n=mB(),r=F(n),i=e=>{var n=sB(),r=L(F(n),2);rB(r,{get stackTrace(){return t().stackTrace},get loadSource(){return ns}});var i=L(r,2);X_(L(F(i),2),{get content(){return t().stackTrace},children:(e,n)=>{var r=oB(),i=F(r,!0);D(r),R(()=>U(i,t().stackTrace)),H(e,r)},$$slots:{default:!0}}),D(i),D(n),H(e,n)};W(r,e=>{t().stackTrace&&e(i)});var a=L(r,2),o=e=>{var n=lB(),r=L(F(n),2);G(r,21,()=>t().affectedSpans,ka,(e,t)=>{var n=cB(),r=F(n,!0);D(n),R(()=>U(r,z(t))),H(e,n)}),D(r),D(n),H(e,n)};W(a,e=>{t().affectedSpans.length>0&&e(o)});var s=L(a,2),c=e=>{var n=dB(),r=L(F(n),2);G(r,20,()=>t().affectedTraces.slice(0,5),e=>e,(e,t)=>{var n=uB(),r=F(n),i=F(r);Sm(i,{size:10});var a=L(i);Xp(L(a),{size:10}),D(r),mv(L(r,2),{get value(){return t},label:`Copy trace ID`,size:10,class:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100 transition-opacity`}),D(n),R(e=>U(a,` ${e??``}... `),[()=>t.slice(0,16)]),B(`click`,r,()=>g(t)),H(e,n)}),D(r),D(n),H(e,n)};W(s,e=>{t().affectedTraces.length>0&&e(c)});var l=L(s,2),u=e=>{var n=pB(),r=L(F(n),2);G(r,21,()=>Object.entries(t().attributes),([e,t])=>e,(e,t)=>{var n=M(()=>_(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=fB(),o=F(a),s=F(o);D(o);var c=L(o,2),l=F(c,!0);D(c),D(a),R(e=>{U(s,`${r()??``}:`),U(l,e)},[()=>String(i())]),H(e,a)}),D(r),D(n),H(e,n)},d=M(()=>t().attributes&&Object.keys(t().attributes).length>0);W(l,e=>{z(d)&&e(u)});var f=L(l,2),p=F(f),m=F(p),h=F(m);D(m);var v=L(m,2),y=F(v);D(v),D(p),D(f),D(n),R((e,t)=>{U(h,`First seen: ${e??``}`),U(y,`Last seen: ${t??``}`)},[()=>sd(t().firstSeen),()=>sd(t().lastSeen)]),H(e,n)};W(ue,e=>{n()&&e(de)}),D(s),R((e,n)=>{J(s,`aria-selected`,i()),J(s,`data-row-index`,r()),q(s,1,`border border-line rounded-md bg-surface overflow-hidden${i()?` ring-1 ring-inset ring-accent bg-accent/10`:``}`),U(x,t().type),U(C,`${t().count??``}x`),U(ne,t().message),U(se,` First: ${e??``}`),U(E,` Last: ${n??``}`)},[()=>iB(z(a)),()=>iB(z(o))]),B(`click`,c,()=>{m.cursor=r(),h(t().fingerprint)}),H(e,s)};function r(e,t){return ev(t.toLowerCase(),[e.type,e.message,...e.affectedTraces])}let i=N(`recent`),a=N(null),o=N(``),s=N(void 0),c=M(()=>z(i)===`recent`?ou.value:su.value),l=M(()=>z(c).filter(e=>r(e,z(o)))),u=M(()=>z(o).length>0),d=M(()=>cu.value),f=M(()=>lu.value),m=qA({count:()=>z(l).length,onActivate:e=>{let t=z(l)[e];t&&h(t.fingerprint)},scrollToIndex:e=>z(s)?.querySelector(`[data-row-index="${e}"]`)?.scrollIntoView({block:`nearest`})});function h(e){P(a,z(a)===e?null:e,!0)}function g(e){Pu(e),Nu(`traces`)}var v=xB(),y=F(v),b=F(y),x=F(b);Kh(x,{size:16,class:`text-danger`});var S=L(x,2),C=e=>{var t=gB(),n=F(t);D(t),R(()=>U(n,`(${z(l).length??``} of ${z(c).length??``})`)),H(e,t)};W(S,e=>{z(u)&&e(C)});var w=L(S,2),T=e=>{var t=_B(),n=F(t,!0);D(t),R(()=>U(n,z(d))),H(e,t)};W(w,e=>{z(d)>0&&e(T)}),D(b);var ee=L(b,2),te=F(ee),ne=F(te);ne.value=ne.__value=`recent`;var re=L(ne);re.value=re.__value=`frequent`,D(te);var ie;lo(te),D(ee),D(y);var ae=L(y,2),oe=e=>{$_(e,{class:`mb-4`,inputClass:`border-line bg-subtle text-fg focus:border-line focus:ring-1 focus:ring-accent`,placeholder:`Filter by type, message, trace id…`,ariaLabel:`Filter errors`,get value(){return z(o)},set value(e){P(o,e,!0)}})};W(ae,e=>{z(c).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=vB(),n=F(t),r=L(F(n),2),i=F(r,!0);D(r),D(n);var a=L(n,2),o=L(F(a),2),s=F(o,!0);D(o),D(a);var p=L(a,2),m=L(F(p),2),h=F(m,!0);D(m),D(p),D(t),R(()=>{U(i,z(u)?`${z(l).length} of ${z(c).length}`:z(c).length),U(s,z(d)),U(h,z(f))}),H(e,t)};W(se,e=>{z(d)>0&&e(ce)});var le=L(se,2),E=F(le),ue=e=>{var t=yB();Kh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},de=e=>{var t=bB();wh(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},fe=e=>{var t=ua();G(I(t),19,()=>z(l),e=>e.fingerprint,(e,t,r)=>{n(e,()=>z(t),()=>z(a)===z(t).fingerprint,()=>z(r),()=>m.cursor===z(r))}),H(e,t)};W(E,e=>{z(c).length===0?e(ue):z(l).length===0?e(de,1):e(fe,-1)}),D(le),Ho(le,e=>P(s,e),()=>z(s)),D(v),R(()=>{ie!==(ie=z(i))&&(te.value=(te.__value=z(i))??``,co(te,z(i)))}),B(`change`,te,e=>P(i,e.target.value,!0)),B(`keydown`,le,function(...e){m.onKeyDown?.apply(this,e)}),H(e,v),at()}ea([`click`,`change`,`keydown`]);var CB={info:0,warning:1,error:2,critical:3};function wB(e,t=`info`){return typeof e==`string`&&e in CB?e:t}function TB(e,t){return CB[e]>=CB[t]}var EB={marker:`autotel.security`,forceKeep:`autotel.security.force_keep`,event:`security.event`,category:`security.category`,outcome:`security.outcome`,severity:`security.severity`,actorId:`security.actor_id`,targetType:`security.target_type`,targetId:`security.target_id`,tenantId:`security.tenant_id`,reason:`security.reason`,droppedKeys:`security.dropped_keys`,suspiciousRequest:`security.suspicious_request`,signal:`security.signal`};function DB(e){return typeof e==`string`&&e.length>0?e:void 0}function OB(e,t){let n=e.attributes??{},r=DB(n[EB.event]),i=n[EB.suspiciousRequest]===!0;return!r&&!i?null:{traceId:e.traceId,spanId:e.spanId,spanName:e.name,service:t,timestamp:e.startTime,event:r,category:DB(n[EB.category]),outcome:DB(n[EB.outcome]),severity:wB(n[EB.severity],i?`warning`:`info`),reason:DB(n[EB.reason]),suspicious:i,signal:DB(n[EB.signal])}}function kB(e){let t=[];for(let n of e)for(let e of n.spans){let r=OB(e,n.service);r&&t.push(r)}return t.sort((e,t)=>t.timestamp-e.timestamp)}function AB(e){let t={info:0,warning:0,error:0,critical:0};for(let n of e)t[n.severity]+=1;return t}function jB(e,t){return TB(e.severity,t)}function MB(e){switch(e){case`critical`:return`bg-red-100 text-red-700`;case`error`:return`bg-orange-100 text-orange-700`;case`warning`:return`bg-amber-100 text-amber-700`;default:return`bg-hover text-fg-muted`}}var NB=V(`<span class="ml-1 px-2 py-0.5 text-xs font-medium bg-red-100 text-red-700 rounded-full"> </span>`),PB=V(`<div class="flex gap-4 mb-4 p-3 bg-subtle rounded-md border border-line"><div class="text-sm"><span class="text-fg-muted">Critical:</span> <span class="font-semibold text-red-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Error:</span> <span class="font-semibold text-orange-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Warning:</span> <span class="font-semibold text-amber-600"> </span></div> <div class="text-sm"><span class="text-fg-muted">Info:</span> <span class="font-semibold text-fg"> </span></div></div>`),FB=V(`<div class="flex flex-col items-center justify-center h-full text-fg-subtle py-12"><!> <p class="text-sm">No security events captured</p> <p class="text-xs text-fg-subtle mt-1">Spans with security.* attributes (autotel-audit) will appear here</p></div>`),IB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded"> </span>`),LB=V(`<span class="text-fg-subtle"> </span>`),RB=V(`<div class="border border-line rounded-md bg-surface p-3"><div class="flex items-center gap-2 mb-1"><!> <span class="text-sm font-semibold text-fg"> </span> <span> </span> <!> <!> <!></div> <p class="text-xs text-fg-muted truncate mb-2 font-mono"> <!></p> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <button class="flex items-center gap-1 text-fg-muted hover:text-fg font-mono"><!> <!></button></div></div>`),zB=V(`<div class="flex flex-col h-full p-4"><div class="flex items-center justify-between mb-4 pb-3 border-b border-line"><h3 class="text-sm font-semibold flex items-center gap-2 text-fg"><!> Security <!></h3> <select class="text-xs border border-line rounded px-2 py-1 bg-surface text-fg-muted"><option>All severities</option><option>Warning+</option><option>Error+</option><option>Critical only</option></select></div> <!> <div class="flex-1 overflow-auto space-y-2"><!></div></div>`);function BB(e,t){it(t,!0);let n=N(`info`),r=M(()=>kB(yl.value)),i=M(()=>AB(z(r))),a=M(()=>z(r).filter(e=>jB(e,z(n))));function o(e,t){Pu(e,t),Nu(`traces`)}function s(e){return e.event?e.event:e.signal?`probe: ${e.signal}`:`suspicious request`}var c=zB(),l=F(c),u=F(l),d=F(u);Ah(d,{size:16,class:`text-red-500`});var f=L(d,2),p=e=>{var t=NB(),n=F(t,!0);D(t),R(()=>U(n,z(r).length)),H(e,t)};W(f,e=>{z(r).length>0&&e(p)}),D(u);var m=L(u,2),h=F(m);h.value=h.__value=`info`;var g=L(h);g.value=g.__value=`warning`;var _=L(g);_.value=_.__value=`error`;var v=L(_);v.value=v.__value=`critical`,D(m);var y;lo(m),D(l);var b=L(l,2),x=e=>{var t=PB(),n=F(t),r=L(F(n),2),a=F(r,!0);D(r),D(n);var o=L(n,2),s=L(F(o),2),c=F(s,!0);D(s),D(o);var l=L(o,2),u=L(F(l),2),d=F(u,!0);D(u),D(l);var f=L(l,2),p=L(F(f),2),m=F(p,!0);D(p),D(f),D(t),R(()=>{U(a,z(i).critical),U(c,z(i).error),U(d,z(i).warning),U(m,z(i).info)}),H(e,t)};W(b,e=>{z(r).length>0&&e(x)});var S=L(b,2),C=F(S),w=e=>{var t=FB();Ah(F(t),{size:32,class:`mb-2 text-fg-subtle`}),Ke(4),D(t),H(e,t)},T=e=>{var t=ua();G(I(t),17,()=>z(a),e=>e.traceId+e.spanId,(e,t)=>{var n=RB(),r=F(n),i=F(r),a=e=>{fh(e,{size:14,class:`text-amber-500`})};W(i,e=>{z(t).suspicious&&e(a)});var c=L(i,2),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=e=>{var n=IB(),r=F(n,!0);D(n),R(()=>U(r,z(t).category)),H(e,n)};W(f,e=>{z(t).category&&e(p)});var m=L(f,2),h=e=>{var n=IB(),r=F(n,!0);D(n),R(()=>U(r,z(t).outcome)),H(e,n)};W(m,e=>{z(t).outcome&&e(h)});var g=L(m,2),_=e=>{var n=IB(),r=F(n,!0);D(n),R(()=>U(r,z(t).service)),H(e,n)};W(g,e=>{z(t).service&&e(_)}),D(r);var v=L(r,2),y=F(v),b=L(y),x=e=>{var n=LB(),r=F(n);D(n),R(()=>U(r,`— ${z(t).reason??``}`)),H(e,n)};W(b,e=>{z(t).reason&&e(x)}),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);Sm(ee,{size:10});var te=L(ee);Xp(L(te),{size:10}),D(T),D(S),D(n),R((e,n,r,i)=>{U(l,e),q(u,1,n),U(d,z(t).severity),U(y,`${z(t).spanName??``} `),U(w,r),U(te,` ${i??``}... `)},[()=>s(z(t)),()=>`px-1.5 py-0.5 text-xs font-medium rounded `+MB(z(t).severity),()=>sd(z(t).timestamp),()=>z(t).traceId.slice(0,16)]),B(`click`,T,()=>o(z(t).traceId,z(t).spanId)),H(e,n)}),H(e,t)};W(C,e=>{z(a).length===0?e(w):e(T,-1)}),D(S),D(c),R(()=>{y!==(y=z(n))&&(m.value=(m.__value=z(n))??``,co(m,z(n)))}),B(`change`,m,e=>P(n,e.target.value,!0)),H(e,c),at()}ea([`change`,`click`]);async function VB(e,t){let n;try{n=await t.fetch(`${t.baseUrl}/api/analysis/compare`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t.signal})}catch(e){return e?.name===`AbortError`?{status:`aborted`}:{status:`error`,message:e instanceof Error?`Network error: ${e.message}`:`Network error`}}let r;try{r=await n.json()}catch{return{status:`error`,message:`Unexpected response (not JSON)`}}let i=r;if(n.status===501)return{status:`unavailable`,message:i.message??`Comparison is unavailable on this server.`};if(n.status===400)return{status:`invalid`,message:i.message??i.error??`Invalid query`};if(!n.ok)return{status:`error`,message:i.error??n.statusText};let a=i.outlierCount??0,o=i.baselineCount??0;return a===0||o===0?{status:`empty`,outlierCount:a,baselineCount:o}:{status:`ok`,differences:i.differences??[],outlierCount:a,baselineCount:o}}var HB=V(`<!> Mark now`,1),UB=V(`<!> Comparing since mark`,1),WB=V(`<option> </option>`),GB=V(`<div class="mb-2 grid grid-cols-2 gap-2"><label class="block text-[11px] text-fg-muted">Arm <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"></select></label> <label class="block text-[11px] text-fg-muted">Against <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Every other arm</option><!></select></label></div>`),KB=V(`<label class="mb-2 block text-[11px] text-fg-muted">Experiment <select class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 text-xs text-fg focus:border-accent focus:outline-none"><option>Compare by query instead</option><!></select></label> <!>`,1),qB=V(`<label class="mb-1 block text-[11px] text-fg-muted">Investigating <input placeholder="duration > 500" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label>`),JB=V(`<p class="mb-1 text-[11px] text-fg-subtle">Comparing spans since the mark against those before it, within the
32
+ current time window.</p>`),YB=V(`<p class="text-xs text-fg-subtle">Describe the spans you are investigating, or mark a moment and compare
33
33
  what came after it. The result ranks the attributes that tell the two
34
- groups apart.</p>`),jB=V(`<p class="text-xs text-danger"> </p>`),MB=V(`<p class="text-xs text-fg-muted"> </p>`),NB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"> <span class="text-fg-subtle">=</span> </td><td class="py-1 pr-2 tabular-nums"> </td><td class="py-1 pr-2 tabular-nums text-fg-muted"> </td></tr>`),PB=V(`<p class="mb-2 text-[11px] text-fg-subtle"> </p> <table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Attribute</th><th class="py-1 pr-2 font-medium">These</th><th class="py-1 pr-2 font-medium">Those</th></tr></thead><tbody></tbody></table>`,1),FB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="border-b border-line px-4 py-3"><div class="mb-2 flex items-center gap-2"><button type="button"><!></button> <button type="button" class="flex items-center gap-1 rounded bg-accent px-2 py-1 text-xs text-white hover:opacity-90 disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> </button></div> <!> <!> <label class="block text-[11px] text-fg-muted"> <input placeholder="everything else" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function IB(e,t){it(t,!0);let n=N(`duration > 500`),r=N(``),i=N(_r([])),a=N(``),o=N(``),s=N(``),c=e=>z(i).find(t=>t.name===e)?.arms??[];function l(){let e=pl.value;return e===null?null:Zo(e)}let u=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;async function d(){let e=l();if(e!==null)try{let t=await fetch(`${e}/api/query/attributes?key=experiment.name&pair=experiment.variant`);if(!t.ok)return;let n=await t.json(),r=new Map;for(let e of n.pairs??[]){let t=String(e.value),n=String(e.paired);if(t===``||n===``)continue;let i=r.get(t)??[];i.includes(n)||i.push(n),r.set(t,i)}P(i,[...r].map(([e,t])=>({name:e,arms:t})),!0)}catch{}}Lr(()=>{d()});function f(e){P(a,e,!0);let t=c(e);P(o,t[0]??``,!0),P(s,t[1]??``,!0),e!==``&&P(h,null),m()}function p(e){P(o,e,!0),z(s)===e&&P(s,``),m()}function m(){if(z(a)===``||z(o)===``)return;let e=`experiment.name = ${u(z(a))}`;P(n,`${e} AND experiment.variant = ${u(z(o))}`),P(r,z(s)===``?`${e} AND experiment.variant != ${u(z(o))}`:`${e} AND experiment.variant = ${u(z(s))}`,!0)}let h=N(null),g=N(!1),_=N(null),v=e=>`${Math.round(e*100)}%`;function y(){let e=Cs(ml.value,Date.now());if(z(h)===null){let t=ks(e);return{outlier:{query:z(n),window:t},baseline:{query:z(r),window:t}}}return{outlier:{query:z(r),window:{start:z(h),end:Date.now()}},baseline:{query:z(r),window:{start:e?.start??0,end:z(h)}}}}async function b(){let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(_,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(g,!0);try{P(_,await SB({...y(),ignoreFields:z(a)===``?void 0:[`experiment.name`,`experiment.variant`]},{fetch:globalThis.fetch.bind(globalThis),baseUrl:t}),!0)}finally{P(g,!1)}}var x=FB(),S=F(x),C=F(S),w=F(C),T=F(w),ee=e=>{var t=CB();am(I(t),{size:12}),Ke(),H(e,t)},te=e=>{var t=wB();rg(I(t),{size:12}),Ke(),H(e,t)};W(T,e=>{z(h)===null?e(ee):e(te,-1)}),D(w);var ne=L(w,2),re=F(ne);ah(re,{size:12});var ie=L(re);D(ne),D(C);var ae=L(C,2),oe=e=>{var t=DB(),n=I(t),r=L(F(n)),l=F(r);l.value=l.__value=``,G(L(l),17,()=>z(i),e=>e.name,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).name),i!==(i=z(t).name)&&(n.value=(n.__value=z(t).name)??``)}),H(e,n)}),D(r);var u;co(r),D(n);var d=L(n,2),h=e=>{var t=EB(),n=F(t),r=L(F(n));G(r,20,()=>c(z(a)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(r);var i;co(r),D(n);var l=L(n,2),u=L(F(l)),d=F(u);d.value=d.__value=``,G(L(d),16,()=>c(z(a)).filter(e=>e!==z(o)),e=>e,(e,t)=>{var n=TB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(u);var f;co(u),D(l),D(t),R(()=>{i!==(i=z(o))&&(r.value=(r.__value=z(o))??``,so(r,z(o))),f!==(f=z(s))&&(u.value=(u.__value=z(s))??``,so(u,z(s)))}),B(`change`,r,e=>p(e.currentTarget.value)),B(`change`,u,e=>{P(s,e.currentTarget.value,!0),m()}),H(e,t)};W(d,e=>{z(a)!==``&&e(h)}),R(()=>{u!==(u=z(a))&&(r.value=(r.__value=z(a))??``,so(r,z(a)))}),B(`change`,r,e=>f(e.currentTarget.value)),H(e,t)};W(ae,e=>{z(i).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=OB(),r=L(F(t));xo(r),D(t),Ao(r,()=>z(n),e=>P(n,e)),H(e,t)},le=e=>{H(e,kB())};W(se,e=>{z(h)===null?e(ce):e(le,-1)});var E=L(se,2),ue=F(E),de=L(ue);xo(de),D(E),D(S);var fe=L(S,2),pe=F(fe),me=e=>{H(e,AB())},he=e=>{var t=jB(),n=F(t,!0);D(t),R(()=>U(n,z(_).message)),H(e,t)},ge=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`Nothing to compare: ${z(_).outlierCount??``} against ${z(_).baselineCount??``}
35
- spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=la(),n=I(t),r=e=>{var t=MB(),n=F(t);D(t),R(()=>U(n,`No attribute separates these ${z(_).outlierCount??``} spans from the
36
- ${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=PB(),n=I(t),r=F(n);D(n);var i=L(n,2),a=L(F(i));G(a,21,()=>z(_).differences,e=>`${e.field}=${e.value}`,(e,t)=>{var n=NB(),r=F(n),i=F(r,!0),a=L(i,2,!0);D(r);var o=L(r),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(n),R((e,n)=>{U(i,z(t).field),U(a,z(t).value),U(s,e),U(l,n)},[()=>v(z(t).outlierFraction),()=>v(z(t).baselineFraction)]),H(e,n)}),D(a),D(i),R(()=>U(r,`${z(_).outlierCount??``} spans against ${z(_).baselineCount??``}. A
37
- hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K($(`flex items-center gap-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,z(h)===null?`border border-line text-fg-muted hover:text-fg`:`bg-accent text-white`))]),B(`click`,w,()=>P(h,z(h)===null?Date.now():null,!0)),B(`click`,ne,b),Ao(de,()=>z(r),e=>P(r,e)),H(e,x),at()}ea([`click`,`change`]);var LB=V(`<span class="text-xs text-fg"> </span>`),RB=V(`<span class="text-xs text-fg-muted">Instrumentation coverage</span>`),zB=V(`<p class="text-xs text-fg-subtle">Loading…</p>`),BB=V(`<div class="flex items-start gap-2 text-xs text-fg-muted"><!> <p> </p></div>`),VB=V(`<p class="text-xs text-danger"> </p>`),HB=V(`<p class="text-xs text-fg-muted">The map records no entry points.</p>`),UB=V(`<span class="mr-1 inline-block h-1.5 w-1.5 rounded-full bg-danger" aria-label="never seen"></span>`),WB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"><!> </td><td> </td><td class="py-1"><a class="text-fg-subtle hover:text-accent hover:underline"> </a></td></tr>`),GB=V(`<table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Entry point</th><th class="py-1 pr-2 font-medium">Spans</th><th class="py-1 font-medium">Source</th></tr></thead><tbody></tbody></table>`),KB=V(`<div class="flex h-full flex-col overflow-hidden"><div class="flex items-center justify-between border-b border-line px-4 py-3"><div><!></div> <button type="button" class="flex items-center gap-1 rounded border border-line px-2 py-1 text-xs text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> Refresh</button></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function qB(e,t){it(t,!0);let n=N(_r({status:`idle`}));async function r(){P(n,{status:`loading`},!0);try{let e=pl.value,t=e===null?null:Zo(e);if(t===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}let r=await fetch(`${t}/api/coverage`),i=await r.json();r.status===404?P(n,{status:`missing`,message:i.message??`No map found.`},!0):r.ok?P(n,{status:`ok`,...i},!0):P(n,{status:`error`,message:i.message??r.statusText},!0)}catch(e){P(n,{status:`error`,message:e instanceof Error?e.message:`Request failed`},!0)}}Lr(()=>{r()});let i=e=>`vscode://file/${e.file}${e.handler?.line?`:${e.handler.line}`:``}`;var a=KB(),o=F(a),s=F(o),c=F(s),l=e=>{var t=LB(),r=F(t);D(t),R(()=>U(r,`${z(n).total-z(n).seenCount} of ${z(n).total??``} entry points have emitted
38
- nothing`)),H(e,t)},u=e=>{H(e,RB())};W(c,e=>{z(n).status===`ok`?e(l):e(u,-1)}),D(s);var d=L(s,2);ph(F(d),{size:12}),Ke(),D(d),D(o);var f=L(o,2),p=F(f),m=e=>{H(e,zB())},h=e=>{var t=BB(),r=F(t);tm(r,{size:14,class:`mt-0.5 shrink-0`});var i=L(r,2),a=F(i,!0);D(i),D(t),R(()=>U(a,z(n).message)),H(e,t)},g=e=>{var t=VB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},_=e=>{H(e,HB())},v=e=>{var t=GB(),r=L(F(t));G(r,21,()=>z(n).entries,e=>`${e.method??``} ${e.path}`,(e,t)=>{var n=WB(),r=F(n),a=F(r),o=e=>{H(e,UB())};W(a,e=>{z(t).seen||e(o)});var s=L(a);D(r);var c=L(r),l=F(c,!0);D(c);var u=L(c),d=F(u),f=F(d,!0);D(d),D(u),D(n),R(e=>{U(s,` ${z(t).method?`${z(t).method} `:``}${z(t).path??``}`),q(c,1,K(z(t).seen?`py-1 pr-2 tabular-nums text-fg-muted`:`py-1 pr-2 text-danger`)),U(l,z(t).seen?z(t).spanCount:`none`),J(d,`href`,e),U(f,z(t).file)},[()=>i(z(t))]),H(e,n)}),D(r),D(t),H(e,t)};W(p,e=>{z(n).status===`loading`||z(n).status===`idle`?e(m):z(n).status===`missing`?e(h,1):z(n).status===`error`?e(g,2):z(n).entries.length===0?e(_,3):e(v,-1)}),D(f),D(a),B(`click`,d,r),H(e,a),at()}ea([`click`]);var JB=V(`<p class="p-4 text-sm text-fg-muted">Loading…</p>`),YB=V(`<p class="p-4 text-sm text-danger"> </p>`),XB=V(`<div class="flex items-start gap-2 m-3 p-2 rounded bg-warning-bg text-warning text-xs"><!> <span> </span></div>`),ZB=V(`<span class="text-xs text-fg-muted font-normal"> </span>`),QB=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-success-bg text-success rounded">offered</span>`),$B=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded">withdrawn</span>`),eV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The title the browser may show does not match the name that runs">label mismatch</span>`),tV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="This name came back with a different descriptor after it was first offered">redefined</span>`),nV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="A known library refusal — the handler did not run"> </span>`),rV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The browser discarded these at registration"> </span>`),iV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="Chrome does not unwrap the MCP envelope; the agent parses it">envelope</span>`),aV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="The browser replaced an empty result with its own text">substituted</span>`),oV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The agent was not told what arguments to send">no schema</span>`),sV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-subtle rounded" title="Seen executing but never at registration — annotations and schema are unknown">not observed at registration</span>`),cV=V(`<span class="text-danger"> </span>`),lV=V(`<span>session <code class="font-mono"> </code></span>`),uV=V(`<span> </span>`),dV=V(`<div class="flex items-start gap-2 text-fg-muted"><span> <code class="font-mono"></code> </span></div>`),fV=V(`, kept <code class="font-mono"> </code>`,1),pV=V(`<div class="text-fg-muted">annotations sent <code class="font-mono"> </code><!></div>`),mV=V(`<button type="button" class="flex items-center gap-1 text-fg-subtle hover:text-fg"> </button>`),hV=V(`<span class="text-fg-subtle"> </span>`),gV=V(`<span class="text-fg-muted"> </span>`),_V=V(`<span class="text-fg-muted break-all"> </span>`),vV=V(`<li class="font-mono text-[11px] flex flex-wrap gap-2"><!> <span class="text-fg-subtle"> </span> <!> <span> </span> <!></li>`),yV=V(`<div><div class="flex items-center justify-between mb-1.5"><h5 class="font-semibold text-fg-muted">Recent calls</h5> <!></div> <ul class="space-y-1"></ul></div>`),bV=V(`<div class="border-t border-line p-3 bg-subtle space-y-3 text-xs"><div class="flex flex-wrap gap-4 text-fg-muted"><span>service <code class="font-mono"> </code></span> <!> <span>installation <code class="font-mono"> </code></span> <!></div> <!> <!> <!></div>`),xV=V(`<li><button type="button" class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1 flex-wrap"><span class="text-sm font-mono font-semibold"> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <!> <span> </span> <span> </span></div></div></button> <!></li>`),SV=V(`<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 p-3 border-b border-line"><div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle">offered now</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div> <div><div> </div> <div class="text-xs text-fg-subtle">with dropped annotations</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div></div> <!> <ul class="divide-y divide-line"></ul>`,1),CV=V(`<div class="p-6 max-w-xl space-y-3 text-sm"><p class="text-fg-muted">No WebMCP tools observed in this window.</p> <p class="text-fg-subtle text-xs">WebMCP needs Chrome 151+ with <code class="font-mono bg-code px-1 rounded">chrome://flags/#web-machine-learning-model-context</code> enabled. Check with <code class="font-mono">'modelContext' in document</code>.</p> <pre class="bg-code text-fg p-2 rounded text-xs overflow-x-auto"></pre> <p class="text-fg-subtle text-xs">Registrations that happen before <code class="font-mono">instrumentWebMCP()</code> runs are invisible to it.</p></div>`),wV=V(`<div class="h-full overflow-auto"><div class="flex items-center justify-between p-3 border-b border-line"><div class="flex items-center gap-2"><!> <h2 class="text-sm font-semibold">WebMCP tools</h2></div> <button type="button" class="flex items-center gap-1 text-xs text-fg-subtle hover:text-fg">Refresh</button></div> <!></div>`);function TV(e,t){it(t,!0);let n=N(_r({status:`idle`})),r=N(null),i,a=N(!1),o=e=>`${e.service}/${e.installationId}/${e.name}`;async function s(){i?.abort();let e=new AbortController;i=e;let t=pl.value,r=t===null?null:Zo(t);if(r===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(n,{status:`loading`},!0);let a=await yA({window:ks(Cs(ml.value,Date.now()))},{fetch,baseUrl:r,signal:e.signal});e.signal.aborted||(a.status===`ok`?P(n,{status:`ok`,inventory:a.webmcp},!0):a.status===`invalid`?P(n,{status:`error`,message:`The server rejected the query.`},!0):a.status===`error`&&P(n,{status:`error`,message:a.message},!0))}Lr(()=>{ml.value,pl.value,s()});let c=M(()=>z(n).status===`ok`?z(n).inventory:void 0),l=M(()=>z(c)?.summary),u=e=>e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`,d=e=>z(a)?dd(e):`•`.repeat(Math.min(e.length,32));var f=wV(),p=F(f),m=F(p);tg(F(m),{size:16,class:`text-fg-muted`}),Ke(2),D(m);var h=L(m,2);D(p);var g=L(p,2),_=e=>{H(e,JB())},v=e=>{var t=YB(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},y=e=>{var t=SV(),n=I(t),i=F(n),s=F(i),f=F(s,!0);D(s),Ke(2),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(p);var v=L(p,2),y=F(v);let b;var x=F(y,!0);D(y),Ke(2),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);D(T),D(S),D(n);var te=L(n,2),ne=e=>{var t=XB(),n=F(t);Gh(n,{size:14,class:`mt-0.5 shrink-0`});var r=L(n,2),i=F(r);D(r),D(t),R(()=>U(i,`${z(l).emptyInstallations??``} installation${z(l).emptyInstallations===1?``:`s`} registered no tools. \`instrumentWebMCP()\` only sees registrations
39
- that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=xV(),s=F(i),c=F(s),l=F(c),f=F(l),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var n=ZB(),r=F(n);D(n),R(()=>U(r,`title ${z(t).title??``}`)),H(e,n)};W(m,e=>{z(t).title&&z(t).labelMismatch&&e(h)});var g=L(m,2),_=e=>{H(e,QB())},v=e=>{H(e,$B())};W(g,e=>{z(t).offered?e(_):e(v,-1)});var y=L(g,2),b=e=>{H(e,eV())};W(y,e=>{z(t).labelMismatch&&e(b)});var x=L(y,2),S=e=>{H(e,tV())};W(x,e=>{z(t).redefined&&e(S)});var C=L(x,2),w=e=>{var n=nV(),r=F(n);D(n),R(()=>U(r,`refused ${z(t).refusedCalls??``}`)),H(e,n)};W(C,e=>{z(t).refusedCalls>0&&e(w)});var T=L(C,2),ee=e=>{var n=rV(),r=F(n);D(n),R(e=>U(r,`dropped ${e??``}`),[()=>z(t).annotationsDropped.join(`, `)]),H(e,n)};W(T,e=>{z(t).annotationsDropped.length>0&&e(ee)});var te=L(T,2),ne=e=>{H(e,iV())};W(te,e=>{z(t).envelopeCalls>0&&e(ne)});var re=L(te,2),ie=e=>{H(e,aV())};W(re,e=>{z(t).substitutedCalls>0&&e(ie)});var ae=L(re,2),oe=e=>{H(e,oV())};W(ae,e=>{z(t).observedAtRegistration&&z(t).hasInputSchema===!1&&e(oe)});var se=L(ae,2),ce=e=>{H(e,sV())};W(se,e=>{z(t).observedAtRegistration||e(ce)}),D(l);var le=L(l,2),E=F(le),ue=F(E);D(E);var de=L(E,2),fe=e=>{var n=cV(),r=F(n);D(n),R(()=>U(r,`${z(t).errors??``} failed`)),H(e,n)};W(de,e=>{z(t).errors>0&&e(fe)});var pe=L(de,2),me=F(pe);D(pe);var he=L(pe,2),ge=F(he,!0);D(he),D(le),D(c),D(s);var _e=L(s,2),ve=e=>{var n=bV(),r=F(n),i=F(r),o=L(F(i)),s=F(o,!0);D(o),D(i);var c=L(i,2),l=e=>{var n=lV(),r=L(F(n)),i=F(r,!0);D(r),D(n),R(()=>U(i,z(t).sessionId)),H(e,n)};W(c,e=>{z(t).sessionId&&e(l)});var f=L(c,2),p=L(F(f)),m=F(p,!0);D(p),D(f);var h=L(f,2),g=e=>{var n=uV(),r=F(n);D(n),R(()=>U(r,`${z(t).descriptionLength??``}-char description`)),H(e,n)};W(h,e=>{z(t).descriptionLength!==void 0&&e(g)}),D(r);var _=L(r,2),v=e=>{var n=dV(),r=F(n),i=F(r),a=L(i);a.textContent=`{ content: [...] }`;var o=L(a);D(r),D(n),R((e,n)=>{U(i,`${z(t).envelopeCalls??``} of ${z(t).calls??``} results arrived as an MCP `),U(o,` envelope. Chrome hands the agent the wrapper unparsed, so
34
+ groups apart.</p>`),XB=V(`<p class="text-xs text-danger"> </p>`),ZB=V(`<p class="text-xs text-fg-muted"> </p>`),QB=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"> <span class="text-fg-subtle">=</span> </td><td class="py-1 pr-2 tabular-nums"> </td><td class="py-1 pr-2 tabular-nums text-fg-muted"> </td></tr>`),$B=V(`<p class="mb-2 text-[11px] text-fg-subtle"> </p> <table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Attribute</th><th class="py-1 pr-2 font-medium">These</th><th class="py-1 pr-2 font-medium">Those</th></tr></thead><tbody></tbody></table>`,1),eV=V(`<div class="flex h-full flex-col overflow-hidden"><div class="border-b border-line px-4 py-3"><div class="mb-2 flex items-center gap-2"><button type="button"><!></button> <button type="button" class="flex items-center gap-1 rounded bg-accent px-2 py-1 text-xs text-white hover:opacity-90 disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> </button></div> <!> <!> <label class="block text-[11px] text-fg-muted"> <input placeholder="everything else" class="mt-0.5 w-full rounded border border-line bg-subtle px-2 py-1 font-mono text-xs text-fg focus:border-accent focus:outline-none"/></label></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function tV(e,t){it(t,!0);let n=N(`duration > 500`),r=N(``),i=N(_r([])),a=N(``),o=N(``),s=N(``),c=e=>z(i).find(t=>t.name===e)?.arms??[];function l(){let e=ml.value;return e===null?null:Qo(e)}let u=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;async function d(){let e=l();if(e!==null)try{let t=await fetch(`${e}/api/query/attributes?key=experiment.name&pair=experiment.variant`);if(!t.ok)return;let n=await t.json(),r=new Map;for(let e of n.pairs??[]){let t=String(e.value),n=String(e.paired);if(t===``||n===``)continue;let i=r.get(t)??[];i.includes(n)||i.push(n),r.set(t,i)}P(i,[...r].map(([e,t])=>({name:e,arms:t})),!0)}catch{}}Lr(()=>{d()});function f(e){P(a,e,!0);let t=c(e);P(o,t[0]??``,!0),P(s,t[1]??``,!0),e!==``&&P(h,null),m()}function p(e){P(o,e,!0),z(s)===e&&P(s,``),m()}function m(){if(z(a)===``||z(o)===``)return;let e=`experiment.name = ${u(z(a))}`;P(n,`${e} AND experiment.variant = ${u(z(o))}`),P(r,z(s)===``?`${e} AND experiment.variant != ${u(z(o))}`:`${e} AND experiment.variant = ${u(z(s))}`,!0)}let h=N(null),g=N(!1),_=N(null),v=e=>`${Math.round(e*100)}%`;function y(){let e=ws(hl.value,Date.now());if(z(h)===null){let t=As(e);return{outlier:{query:z(n),window:t},baseline:{query:z(r),window:t}}}return{outlier:{query:z(r),window:{start:z(h),end:Date.now()}},baseline:{query:z(r),window:{start:e?.start??0,end:z(h)}}}}async function b(){let e=ml.value,t=e===null?null:Qo(e);if(t===null){P(_,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(g,!0);try{P(_,await VB({...y(),ignoreFields:z(a)===``?void 0:[`experiment.name`,`experiment.variant`]},{fetch:globalThis.fetch.bind(globalThis),baseUrl:t}),!0)}finally{P(g,!1)}}var x=eV(),S=F(x),C=F(S),w=F(C),T=F(w),ee=e=>{var t=HB();om(I(t),{size:12}),Ke(),H(e,t)},te=e=>{var t=UB();ig(I(t),{size:12}),Ke(),H(e,t)};W(T,e=>{z(h)===null?e(ee):e(te,-1)}),D(w);var ne=L(w,2),re=F(ne);oh(re,{size:12});var ie=L(re);D(ne),D(C);var ae=L(C,2),oe=e=>{var t=KB(),n=I(t),r=L(F(n)),l=F(r);l.value=l.__value=``,G(L(l),17,()=>z(i),e=>e.name,(e,t)=>{var n=WB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,z(t).name),i!==(i=z(t).name)&&(n.value=(n.__value=z(t).name)??``)}),H(e,n)}),D(r);var u;lo(r),D(n);var d=L(n,2),h=e=>{var t=GB(),n=F(t),r=L(F(n));G(r,20,()=>c(z(a)),e=>e,(e,t)=>{var n=WB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(r);var i;lo(r),D(n);var l=L(n,2),u=L(F(l)),d=F(u);d.value=d.__value=``,G(L(d),16,()=>c(z(a)).filter(e=>e!==z(o)),e=>e,(e,t)=>{var n=WB(),r=F(n,!0);D(n);var i={};R(()=>{U(r,t),i!==(i=t)&&(n.value=(n.__value=t)??``)}),H(e,n)}),D(u);var f;lo(u),D(l),D(t),R(()=>{i!==(i=z(o))&&(r.value=(r.__value=z(o))??``,co(r,z(o))),f!==(f=z(s))&&(u.value=(u.__value=z(s))??``,co(u,z(s)))}),B(`change`,r,e=>p(e.currentTarget.value)),B(`change`,u,e=>{P(s,e.currentTarget.value,!0),m()}),H(e,t)};W(d,e=>{z(a)!==``&&e(h)}),R(()=>{u!==(u=z(a))&&(r.value=(r.__value=z(a))??``,co(r,z(a)))}),B(`change`,r,e=>f(e.currentTarget.value)),H(e,t)};W(ae,e=>{z(i).length>0&&e(oe)});var se=L(ae,2),ce=e=>{var t=qB(),r=L(F(t));So(r),D(t),jo(r,()=>z(n),e=>P(n,e)),H(e,t)},le=e=>{H(e,JB())};W(se,e=>{z(h)===null?e(ce):e(le,-1)});var E=L(se,2),ue=F(E),de=L(ue);So(de),D(E),D(S);var fe=L(S,2),pe=F(fe),me=e=>{H(e,YB())},he=e=>{var t=XB(),n=F(t,!0);D(t),R(()=>U(n,z(_).message)),H(e,t)},ge=e=>{var t=ZB(),n=F(t);D(t),R(()=>U(n,`Nothing to compare: ${z(_).outlierCount??``} against ${z(_).baselineCount??``}
35
+ spans. A share of zero events says nothing about either group.`)),H(e,t)},_e=e=>{var t=ua(),n=I(t),r=e=>{var t=ZB(),n=F(t);D(t),R(()=>U(n,`No attribute separates these ${z(_).outlierCount??``} spans from the
36
+ ${z(_).baselineCount??``} they were compared with.`)),H(e,t)},i=e=>{var t=$B(),n=I(t),r=F(n);D(n);var i=L(n,2),a=L(F(i));G(a,21,()=>z(_).differences,e=>`${e.field}=${e.value}`,(e,t)=>{var n=QB(),r=F(n),i=F(r,!0),a=L(i,2,!0);D(r);var o=L(r),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(n),R((e,n)=>{U(i,z(t).field),U(a,z(t).value),U(s,e),U(l,n)},[()=>v(z(t).outlierFraction),()=>v(z(t).baselineFraction)]),H(e,n)}),D(a),D(i),R(()=>U(r,`${z(_).outlierCount??``} spans against ${z(_).baselineCount??``}. A
37
+ hypothesis to check against individual traces, not a conclusion.`)),H(e,t)};W(n,e=>{z(_).differences.length===0?e(r):e(i,-1)}),H(e,t)};W(pe,e=>{z(_)?z(_).status===`unavailable`||z(_).status===`invalid`||z(_).status===`error`?e(he,1):z(_).status===`empty`?e(ge,2):z(_).status===`ok`&&e(_e,3):e(me)}),D(fe),D(x),R(e=>{q(w,1,e),ne.disabled=z(g),U(ie,` ${z(g)?`Comparing…`:`Compare`}`),U(ue,`${z(h)===null?`Compared with`:`Restricted to`} `)},[()=>K($(`flex items-center gap-1 rounded px-2 py-1 text-xs`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,z(h)===null?`border border-line text-fg-muted hover:text-fg`:`bg-accent text-white`))]),B(`click`,w,()=>P(h,z(h)===null?Date.now():null,!0)),B(`click`,ne,b),jo(de,()=>z(r),e=>P(r,e)),H(e,x),at()}ea([`click`,`change`]);var nV=V(`<span class="text-xs text-fg"> </span>`),rV=V(`<span class="text-xs text-fg-muted">Instrumentation coverage</span>`),iV=V(`<p class="text-xs text-fg-subtle">Loading…</p>`),aV=V(`<div class="flex items-start gap-2 text-xs text-fg-muted"><!> <p> </p></div>`),oV=V(`<p class="text-xs text-danger"> </p>`),sV=V(`<p class="text-xs text-fg-muted">The map records no entry points.</p>`),cV=V(`<span class="mr-1 inline-block h-1.5 w-1.5 rounded-full bg-danger" aria-label="never seen"></span>`),lV=V(`<tr class="border-t border-line-subtle"><td class="py-1 pr-2 font-mono"><!> </td><td> </td><td class="py-1"><a class="text-fg-subtle hover:text-accent hover:underline"> </a></td></tr>`),uV=V(`<table class="w-full text-left text-xs"><thead class="text-[11px] uppercase tracking-wide text-fg-muted"><tr><th class="py-1 pr-2 font-medium">Entry point</th><th class="py-1 pr-2 font-medium">Spans</th><th class="py-1 font-medium">Source</th></tr></thead><tbody></tbody></table>`),dV=V(`<div class="flex h-full flex-col overflow-hidden"><div class="flex items-center justify-between border-b border-line px-4 py-3"><div><!></div> <button type="button" class="flex items-center gap-1 rounded border border-line px-2 py-1 text-xs text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"><!> Refresh</button></div> <div class="flex-1 overflow-auto px-4 py-3"><!></div></div>`);function fV(e,t){it(t,!0);let n=N(_r({status:`idle`}));async function r(){P(n,{status:`loading`},!0);try{let e=ml.value,t=e===null?null:Qo(e);if(t===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}let r=await fetch(`${t}/api/coverage`),i=await r.json();r.status===404?P(n,{status:`missing`,message:i.message??`No map found.`},!0):r.ok?P(n,{status:`ok`,...i},!0):P(n,{status:`error`,message:i.message??r.statusText},!0)}catch(e){P(n,{status:`error`,message:e instanceof Error?e.message:`Request failed`},!0)}}Lr(()=>{r()});let i=e=>`vscode://file/${e.file}${e.handler?.line?`:${e.handler.line}`:``}`;var a=dV(),o=F(a),s=F(o),c=F(s),l=e=>{var t=nV(),r=F(t);D(t),R(()=>U(r,`${z(n).total-z(n).seenCount} of ${z(n).total??``} entry points have emitted
38
+ nothing`)),H(e,t)},u=e=>{H(e,rV())};W(c,e=>{z(n).status===`ok`?e(l):e(u,-1)}),D(s);var d=L(s,2);mh(F(d),{size:12}),Ke(),D(d),D(o);var f=L(o,2),p=F(f),m=e=>{H(e,iV())},h=e=>{var t=aV(),r=F(t);nm(r,{size:14,class:`mt-0.5 shrink-0`});var i=L(r,2),a=F(i,!0);D(i),D(t),R(()=>U(a,z(n).message)),H(e,t)},g=e=>{var t=oV(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},_=e=>{H(e,sV())},v=e=>{var t=uV(),r=L(F(t));G(r,21,()=>z(n).entries,e=>`${e.method??``} ${e.path}`,(e,t)=>{var n=lV(),r=F(n),a=F(r),o=e=>{H(e,cV())};W(a,e=>{z(t).seen||e(o)});var s=L(a);D(r);var c=L(r),l=F(c,!0);D(c);var u=L(c),d=F(u),f=F(d,!0);D(d),D(u),D(n),R(e=>{U(s,` ${z(t).method?`${z(t).method} `:``}${z(t).path??``}`),q(c,1,K(z(t).seen?`py-1 pr-2 tabular-nums text-fg-muted`:`py-1 pr-2 text-danger`)),U(l,z(t).seen?z(t).spanCount:`none`),J(d,`href`,e),U(f,z(t).file)},[()=>i(z(t))]),H(e,n)}),D(r),D(t),H(e,t)};W(p,e=>{z(n).status===`loading`||z(n).status===`idle`?e(m):z(n).status===`missing`?e(h,1):z(n).status===`error`?e(g,2):z(n).entries.length===0?e(_,3):e(v,-1)}),D(f),D(a),B(`click`,d,r),H(e,a),at()}ea([`click`]);var pV=V(`<p class="p-4 text-sm text-fg-muted">Loading…</p>`),mV=V(`<p class="p-4 text-sm text-danger"> </p>`),hV=V(`<div class="flex items-start gap-2 m-3 p-2 rounded bg-warning-bg text-warning text-xs"><!> <span> </span></div>`),gV=V(`<span class="text-xs text-fg-muted font-normal"> </span>`),_V=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-success-bg text-success rounded">offered</span>`),vV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded">withdrawn</span>`),yV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The title the browser may show does not match the name that runs">label mismatch</span>`),bV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="This name came back with a different descriptor after it was first offered">redefined</span>`),xV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="A known library refusal — the handler did not run"> </span>`),SV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The browser discarded these at registration"> </span>`),CV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="Chrome does not unwrap the MCP envelope; the agent parses it">envelope</span>`),wV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-muted rounded" title="The browser replaced an empty result with its own text">substituted</span>`),TV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-warning-bg text-warning rounded" title="The agent was not told what arguments to send">no schema</span>`),EV=V(`<span class="px-1.5 py-0.5 text-xs font-medium bg-hover text-fg-subtle rounded" title="Seen executing but never at registration — annotations and schema are unknown">not observed at registration</span>`),DV=V(`<span class="text-danger"> </span>`),OV=V(`<span>session <code class="font-mono"> </code></span>`),kV=V(`<span> </span>`),AV=V(`<div class="flex items-start gap-2 text-fg-muted"><span> <code class="font-mono"></code> </span></div>`),jV=V(`, kept <code class="font-mono"> </code>`,1),MV=V(`<div class="text-fg-muted">annotations sent <code class="font-mono"> </code><!></div>`),NV=V(`<button type="button" class="flex items-center gap-1 text-fg-subtle hover:text-fg"> </button>`),PV=V(`<span class="text-fg-subtle"> </span>`),FV=V(`<span class="text-fg-muted"> </span>`),IV=V(`<span class="text-fg-muted break-all"> </span>`),LV=V(`<li class="font-mono text-[11px] flex flex-wrap gap-2"><!> <span class="text-fg-subtle"> </span> <!> <span> </span> <!></li>`),RV=V(`<div><div class="flex items-center justify-between mb-1.5"><h5 class="font-semibold text-fg-muted">Recent calls</h5> <!></div> <ul class="space-y-1"></ul></div>`),zV=V(`<div class="border-t border-line p-3 bg-subtle space-y-3 text-xs"><div class="flex flex-wrap gap-4 text-fg-muted"><span>service <code class="font-mono"> </code></span> <!> <span>installation <code class="font-mono"> </code></span> <!></div> <!> <!> <!></div>`),BV=V(`<li><button type="button" class="w-full p-3 flex items-start gap-3 hover:bg-subtle transition-colors text-left"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1 flex-wrap"><span class="text-sm font-mono font-semibold"> </span> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <div class="flex items-center gap-4 text-xs text-fg-subtle"><span> </span> <!> <span> </span> <span> </span></div></div></button> <!></li>`),VV=V(`<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 p-3 border-b border-line"><div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle">offered now</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div> <div><div> </div> <div class="text-xs text-fg-subtle">with dropped annotations</div></div> <div><div class="text-lg font-semibold"> </div> <div class="text-xs text-fg-subtle"> </div></div></div> <!> <ul class="divide-y divide-line"></ul>`,1),HV=V(`<div class="p-6 max-w-xl space-y-3 text-sm"><p class="text-fg-muted">No WebMCP tools observed in this window.</p> <p class="text-fg-subtle text-xs">WebMCP needs Chrome 151+ with <code class="font-mono bg-code px-1 rounded">chrome://flags/#web-machine-learning-model-context</code> enabled. Check with <code class="font-mono">'modelContext' in document</code>.</p> <pre class="bg-code text-fg p-2 rounded text-xs overflow-x-auto"></pre> <p class="text-fg-subtle text-xs">Registrations that happen before <code class="font-mono">instrumentWebMCP()</code> runs are invisible to it.</p></div>`),UV=V(`<div class="h-full overflow-auto"><div class="flex items-center justify-between p-3 border-b border-line"><div class="flex items-center gap-2"><!> <h2 class="text-sm font-semibold">WebMCP tools</h2></div> <button type="button" class="flex items-center gap-1 text-xs text-fg-subtle hover:text-fg">Refresh</button></div> <!></div>`);function WV(e,t){it(t,!0);let n=N(_r({status:`idle`})),r=N(null),i,a=N(!1),o=e=>`${e.service}/${e.installationId}/${e.name}`;async function s(){i?.abort();let e=new AbortController;i=e;let t=ml.value,r=t===null?null:Qo(t);if(r===null){P(n,{status:`error`,message:`The telemetry receiver is not connected.`},!0);return}P(n,{status:`loading`},!0);let a=await AA({window:As(ws(hl.value,Date.now()))},{fetch,baseUrl:r,signal:e.signal});e.signal.aborted||(a.status===`ok`?P(n,{status:`ok`,inventory:a.webmcp},!0):a.status===`invalid`?P(n,{status:`error`,message:`The server rejected the query.`},!0):a.status===`error`&&P(n,{status:`error`,message:a.message},!0))}Lr(()=>{hl.value,ml.value,s()});let c=M(()=>z(n).status===`ok`?z(n).inventory:void 0),l=M(()=>z(c)?.summary),u=e=>e<1024?`${e} B`:`${(e/1024).toFixed(1)} kB`,d=e=>z(a)?fd(e):`•`.repeat(Math.min(e.length,32));var f=UV(),p=F(f),m=F(p);ng(F(m),{size:16,class:`text-fg-muted`}),Ke(2),D(m);var h=L(m,2);D(p);var g=L(p,2),_=e=>{H(e,pV())},v=e=>{var t=mV(),r=F(t,!0);D(t),R(()=>U(r,z(n).message)),H(e,t)},y=e=>{var t=VV(),n=I(t),i=F(n),s=F(i),f=F(s,!0);D(s),Ke(2),D(i);var p=L(i,2),m=F(p),h=F(m,!0);D(m);var g=L(m,2),_=F(g);D(g),D(p);var v=L(p,2),y=F(v);let b;var x=F(y,!0);D(y),Ke(2),D(v);var S=L(v,2),C=F(S),w=F(C,!0);D(C);var T=L(C,2),ee=F(T);D(T),D(S),D(n);var te=L(n,2),ne=e=>{var t=hV(),n=F(t);Kh(n,{size:14,class:`mt-0.5 shrink-0`});var r=L(n,2),i=F(r);D(r),D(t),R(()=>U(i,`${z(l).emptyInstallations??``} installation${z(l).emptyInstallations===1?``:`s`} registered no tools. \`instrumentWebMCP()\` only sees registrations
39
+ that happen after it runs — call it before registering your tools.`)),H(e,t)};W(te,e=>{z(l).emptyInstallations>0&&e(ne)});var re=L(te,2);G(re,21,()=>z(c).tools,e=>o(e),(e,t)=>{let n=M(()=>o(z(t)));var i=BV(),s=F(i),c=F(s),l=F(c),f=F(l),p=F(f,!0);D(f);var m=L(f,2),h=e=>{var n=gV(),r=F(n);D(n),R(()=>U(r,`title ${z(t).title??``}`)),H(e,n)};W(m,e=>{z(t).title&&z(t).labelMismatch&&e(h)});var g=L(m,2),_=e=>{H(e,_V())},v=e=>{H(e,vV())};W(g,e=>{z(t).offered?e(_):e(v,-1)});var y=L(g,2),b=e=>{H(e,yV())};W(y,e=>{z(t).labelMismatch&&e(b)});var x=L(y,2),S=e=>{H(e,bV())};W(x,e=>{z(t).redefined&&e(S)});var C=L(x,2),w=e=>{var n=xV(),r=F(n);D(n),R(()=>U(r,`refused ${z(t).refusedCalls??``}`)),H(e,n)};W(C,e=>{z(t).refusedCalls>0&&e(w)});var T=L(C,2),ee=e=>{var n=SV(),r=F(n);D(n),R(e=>U(r,`dropped ${e??``}`),[()=>z(t).annotationsDropped.join(`, `)]),H(e,n)};W(T,e=>{z(t).annotationsDropped.length>0&&e(ee)});var te=L(T,2),ne=e=>{H(e,CV())};W(te,e=>{z(t).envelopeCalls>0&&e(ne)});var re=L(te,2),ie=e=>{H(e,wV())};W(re,e=>{z(t).substitutedCalls>0&&e(ie)});var ae=L(re,2),oe=e=>{H(e,TV())};W(ae,e=>{z(t).observedAtRegistration&&z(t).hasInputSchema===!1&&e(oe)});var se=L(ae,2),ce=e=>{H(e,EV())};W(se,e=>{z(t).observedAtRegistration||e(ce)}),D(l);var le=L(l,2),E=F(le),ue=F(E);D(E);var de=L(E,2),fe=e=>{var n=DV(),r=F(n);D(n),R(()=>U(r,`${z(t).errors??``} failed`)),H(e,n)};W(de,e=>{z(t).errors>0&&e(fe)});var pe=L(de,2),me=F(pe);D(pe);var he=L(pe,2),ge=F(he,!0);D(he),D(le),D(c),D(s);var _e=L(s,2),ve=e=>{var n=zV(),r=F(n),i=F(r),o=L(F(i)),s=F(o,!0);D(o),D(i);var c=L(i,2),l=e=>{var n=OV(),r=L(F(n)),i=F(r,!0);D(r),D(n),R(()=>U(i,z(t).sessionId)),H(e,n)};W(c,e=>{z(t).sessionId&&e(l)});var f=L(c,2),p=L(F(f)),m=F(p,!0);D(p),D(f);var h=L(f,2),g=e=>{var n=kV(),r=F(n);D(n),R(()=>U(r,`${z(t).descriptionLength??``}-char description`)),H(e,n)};W(h,e=>{z(t).descriptionLength!==void 0&&e(g)}),D(r);var _=L(r,2),v=e=>{var n=AV(),r=F(n),i=F(r),a=L(i);a.textContent=`{ content: [...] }`;var o=L(a);D(r),D(n),R((e,n)=>{U(i,`${z(t).envelopeCalls??``} of ${z(t).calls??``} results arrived as an MCP `),U(o,` envelope. Chrome hands the agent the wrapper unparsed, so
40
40
  ${e??``} would be about
41
41
  ${n??``}
42
- returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=pV(),r=L(F(n)),i=F(r,!0);D(r);var a=L(r),o=e=>{var n=fV(),r=L(I(n)),i=F(r,!0);D(r),R(e=>U(i,e),[()=>z(t).annotationsSent.filter(e=>!z(t).annotationsDropped.includes(e)).join(`, `)||`none`]),H(e,n)};W(a,e=>{z(t).annotationsDropped.length>0&&e(o)}),D(n),R(e=>U(i,e),[()=>z(t).annotationsSent.join(`, `)]),H(e,n)};W(y,e=>{z(t).annotationsSent.length>0&&e(b)});var x=L(y,2),S=e=>{var n=yV(),r=F(n),i=L(F(r),2),o=e=>{var t=mV(),n=F(t,!0);D(t),R(()=>U(n,z(a)?`Hide payloads`:`Reveal payloads`)),B(`click`,t,()=>P(a,!z(a))),H(e,t)},s=M(()=>z(t).recentCalls.some(e=>e.input||e.result));W(i,e=>{z(s)&&e(o)}),D(r);var c=L(r,2);G(c,21,()=>z(t).recentCalls,e=>e.spanId,(e,t)=>{var n=vV(),r=F(n),i=e=>{var n=hV(),r=F(n);D(n),R(()=>U(r,`#${z(t).seq??``}`)),H(e,n)};W(r,e=>{z(t).seq!==void 0&&e(i)});var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=e=>{var n=gV(),r=F(n,!0);D(n),R(()=>U(r,z(t).refusal??`refused`)),H(e,n)};W(s,e=>{z(t).refused&&e(c)});var l=L(s,2);let f;var p=F(l);D(l);var m=L(l,2),h=e=>{var n=_V(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>d(z(t).result)]),H(e,n)};W(m,e=>{z(t).result&&e(h)}),D(n),R((e,n)=>{U(o,e),f=q(l,1,``,null,f,{"text-danger":z(t).error}),U(p,`${z(t).resultType??`result`??``} · ${n??``}`)},[()=>od(z(t).timestamp),()=>u(z(t).resultBytes)]),H(e,n)}),D(c),D(n),H(e,n)};W(x,e=>{z(t).recentCalls.length>0&&e(S)}),D(n),R(()=>{U(s,z(t).service),U(m,z(t).installationId)}),H(e,n)};W(_e,e=>{z(r)===z(n)&&e(ve)}),D(i),R((e,n,r)=>{U(p,z(t).name),U(ue,`${e??``} calls`),U(me,`${n??``} median result`),U(ge,r)},[()=>sd(z(t).calls),()=>u(z(t).medianResultBytes),()=>od(z(t).lastSeen)]),B(`click`,s,()=>P(r,z(r)===z(n)?null:z(n),!0)),H(e,i)}),D(re),R((e,t,n)=>{U(f,z(l).toolsOffered),U(h,e),U(_,`calls${z(l).errors>0?`, ${z(l).errors} failed`:``}`),b=q(y,1,`text-lg font-semibold`,null,b,{"text-warning":z(l).toolsWithDroppedAnnotations>0}),U(x,z(l).toolsWithDroppedAnnotations),U(w,t),U(ee,`result bytes${n??``}`)},[()=>sd(z(l).calls),()=>u(z(l).resultBytes),()=>z(l).envelopeBytes>0?` · ${u(z(l).envelopeBytes)} envelope`:``]),H(e,t)},b=e=>{var t=CV(),n=L(F(t),4);n.textContent=`npm install autotel-webmcp autotel-web
42
+ returning the text plainly.`)},[()=>u(z(t).resultBytes),()=>u(Math.max(0,z(t).resultBytes-z(t).envelopeBytes))]),H(e,n)};W(_,e=>{z(t).envelopeCalls>0&&e(v)});var y=L(_,2),b=e=>{var n=MV(),r=L(F(n)),i=F(r,!0);D(r);var a=L(r),o=e=>{var n=jV(),r=L(I(n)),i=F(r,!0);D(r),R(e=>U(i,e),[()=>z(t).annotationsSent.filter(e=>!z(t).annotationsDropped.includes(e)).join(`, `)||`none`]),H(e,n)};W(a,e=>{z(t).annotationsDropped.length>0&&e(o)}),D(n),R(e=>U(i,e),[()=>z(t).annotationsSent.join(`, `)]),H(e,n)};W(y,e=>{z(t).annotationsSent.length>0&&e(b)});var x=L(y,2),S=e=>{var n=RV(),r=F(n),i=L(F(r),2),o=e=>{var t=NV(),n=F(t,!0);D(t),R(()=>U(n,z(a)?`Hide payloads`:`Reveal payloads`)),B(`click`,t,()=>P(a,!z(a))),H(e,t)},s=M(()=>z(t).recentCalls.some(e=>e.input||e.result));W(i,e=>{z(s)&&e(o)}),D(r);var c=L(r,2);G(c,21,()=>z(t).recentCalls,e=>e.spanId,(e,t)=>{var n=LV(),r=F(n),i=e=>{var n=PV(),r=F(n);D(n),R(()=>U(r,`#${z(t).seq??``}`)),H(e,n)};W(r,e=>{z(t).seq!==void 0&&e(i)});var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=e=>{var n=FV(),r=F(n,!0);D(n),R(()=>U(r,z(t).refusal??`refused`)),H(e,n)};W(s,e=>{z(t).refused&&e(c)});var l=L(s,2);let f;var p=F(l);D(l);var m=L(l,2),h=e=>{var n=IV(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>d(z(t).result)]),H(e,n)};W(m,e=>{z(t).result&&e(h)}),D(n),R((e,n)=>{U(o,e),f=q(l,1,``,null,f,{"text-danger":z(t).error}),U(p,`${z(t).resultType??`result`??``} · ${n??``}`)},[()=>sd(z(t).timestamp),()=>u(z(t).resultBytes)]),H(e,n)}),D(c),D(n),H(e,n)};W(x,e=>{z(t).recentCalls.length>0&&e(S)}),D(n),R(()=>{U(s,z(t).service),U(m,z(t).installationId)}),H(e,n)};W(_e,e=>{z(r)===z(n)&&e(ve)}),D(i),R((e,n,r)=>{U(p,z(t).name),U(ue,`${e??``} calls`),U(me,`${n??``} median result`),U(ge,r)},[()=>cd(z(t).calls),()=>u(z(t).medianResultBytes),()=>sd(z(t).lastSeen)]),B(`click`,s,()=>P(r,z(r)===z(n)?null:z(n),!0)),H(e,i)}),D(re),R((e,t,n)=>{U(f,z(l).toolsOffered),U(h,e),U(_,`calls${z(l).errors>0?`, ${z(l).errors} failed`:``}`),b=q(y,1,`text-lg font-semibold`,null,b,{"text-warning":z(l).toolsWithDroppedAnnotations>0}),U(x,z(l).toolsWithDroppedAnnotations),U(w,t),U(ee,`result bytes${n??``}`)},[()=>cd(z(l).calls),()=>u(z(l).resultBytes),()=>z(l).envelopeBytes>0?` · ${u(z(l).envelopeBytes)} envelope`:``]),H(e,t)},b=e=>{var t=HV(),n=L(F(t),4);n.textContent=`npm install autotel-webmcp autotel-web
43
43
 
44
44
  import { instrumentWebMCP } from 'autotel-webmcp';
45
- instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}ea([`click`]);var EV={traces:XA,agents:Ej,genai:ON,flow:xP,resources:jP,"service-map":lF,metrics:XR,logs:yz,errors:rB,security:xB,compare:IB,coverage:qB,webmcp:TV},DV=[{id:`traces`,label:`Traces`,icon:Up},{id:`agents`,label:`Agents`,icon:lp},{id:`genai`,label:`GenAI`,icon:Nh},{id:`flow`,label:`Flow`,icon:$h},{id:`resources`,label:`Resources`,icon:dp},{id:`service-map`,label:`Service Map`,icon:qm},{id:`metrics`,label:`Metrics`,icon:yp},{id:`logs`,label:`Logs`,icon:rm},{id:`errors`,label:`Errors`,icon:Gh},{id:`security`,label:`Security`,icon:kh},{id:`compare`,label:`Compare`,icon:hm},{id:`coverage`,label:`Coverage`,icon:_h},{id:`webmcp`,label:`WebMCP`,icon:tg}].filter(e=>EV[e.id]!==void 0),OV=DV.map(e=>e.id),kV=16,AV=48;function jV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;vy(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?AV:kV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function MV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function NV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||vy(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,MV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function PV(e,t){it(t,!0);let n=M(()=>Bc.value),r=M(()=>EV[z(n)]??EV.traces);var i=la(),a=I(i),o=e=>{var t=la();Ra(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var FV=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),IV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),LV=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),RV=V(`<span> </span> <!> <!>`,1),zV=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function BV(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>fl.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>yl.value),o=N(!1);Lr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);Lr(()=>{if(n())return;let e=()=>{P(s,Math.round(Cl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);Lr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=pl.value,n=(t?Zo(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=zV(),f=F(d),p=F(f),m=e=>{H(e,FV())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=RV(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=IV(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=LV(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K($(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K($(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K($(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var VV=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),HV=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),UV=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function WV(e,t){it(t,!0);let n=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=UV(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);rg(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,Oa,(e,t)=>{var n=HV(),r=F(n);G(r,21,()=>z(t).keys,Oa,(e,t)=>{var n=VV(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?xg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?xg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Vo(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}ea([`click`]);var GV=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),KV=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),qV=V(`<span> </span>`),JV=V(`<button><!> <span> </span> <!></button>`),YV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),XV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),ZV=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),QV=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),$V=V(`<div><!></div>`),eH=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),tH=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function nH(e,t){it(t,!0);let n=N(void 0),r=M(()=>Fc.value),i=M(()=>Bc.value),a=M(()=>Rc.value??`bottom`),o=M(()=>il.value),s=M(()=>zc.value),c=cg(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>al(z(l)?`vertical`:`horizontal`)),f=M(()=>su.value),p=M(()=>nu.value),m=M(()=>ru.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>DV.map(e=>({...e,badge:z(h)[e.id]}))),_=jV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:ol,resetSize:sl}),v=NV({dock:()=>z(a),pipActive:()=>z(s),onDock:Lu});async function y(){if(z(s)){fg(()=>zc.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await dg(t,()=>zc.value=!1,{width:760,height:600})&&(zc.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:og,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>$c.value);function w(){return Vc.value?vg:Bc.value===`traces`?_g:gg}Lr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if($c.value){tl();return}if(yg())return;if(zc.value){fg(()=>zc.value=!1);return}ju();return}if(t.key===`?`&&!yg()){t.preventDefault(),nl(w());return}if(!$c.value&&!yg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&Mu(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?$m:z(a)===`left`?Zm:Ym),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=la(),ce=I(se),le=e=>{var t=tH(),r=I(t),o=F(r),f=e=>{var t=GV(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K($(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K($(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K($(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=KV();ym(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);id(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=JV(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);Ra(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=qV(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K($(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K($(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>Mu(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=la();Ra(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);BV(ce,{compact:!0});var le=L(ce,2);jp(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=YV(),r=F(n);e(r),D(n),B(`click`,n,function(...e){Ru?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=XV(),n=F(t),r=e=>{zm(e,{size:15})},i=e=>{rh(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=ZV();rg(F(t),{size:16}),D(t),B(`click`,t,function(...e){ju?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>nl(w()))}D(p);var he=L(p,2);PV(F(he),{}),D(he);var ge=L(he,2),_e=e=>{WV(e,{get shortcuts(){return z(C)},get onClose(){return tl}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Vo(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=eH();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=$V(),i=F(r),a=e=>{var n=QV(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K($(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),oo(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K($(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K($(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),qa(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}ea([`pointerdown`,`keydown`,`dblclick`,`click`]);var rH=V(`<button><!> </button>`),iH=V(`<nav></nav>`);function aH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Bc.value);var i=iH();G(i,21,()=>DV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=rH(),s=F(o);Ra(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K($(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>Mu(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K($(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}ea([`click`]);var oH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),sH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),cH=V(`<span class="text-danger truncate"> </span>`),lH=V(`<span class="text-warning truncate"> </span>`),uH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function dH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>kl.value),o=M(()=>[{n:cl.value.length,one:`trace`,many:`traces`},{n:dl.value.length,one:`log`,many:`logs`},{n:ul.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),Jy({traces:cl.value,logs:dl.value,errors:ul.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Bu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await Zy(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),ku(a.snapshot)};var f=uH(),p=F(f),m=e=>{var t=oH(),n=I(t);hp(n,{size:12});var r=L(n,6);rg(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){Au?.apply(this,e)}),H(e,t)},h=e=>{var t=sH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);hp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);qh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Vh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Vo(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=cH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=lH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K($(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}ea([`click`,`change`]);var fH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function pH(e,t){it(t,!0);function n(){return Vc.value?vg:Bc.value===`traces`?_g:gg}let r=M(()=>Gc.value),i=M(()=>$c.value);Lr(()=>{Gc.value=Kc()});let a=N(void 0);Lr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),Lr(()=>{let e=e=>{if(e.key===`?`&&!yg()){e.preventDefault(),nl(n());return}if(!$c.value&&!yg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<OV.length&&Mu(OV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=fH(),c=F(s),l=F(c);aH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);BV(d,{});var f=L(d,2),p=F(f),m=e=>{Gm(e,{size:14})},h=e=>{Fh(e,{size:14})},g=e=>{Um(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);jp(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);dH(b,{});var x=L(b,2);aH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);PV(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{WV(e,{get shortcuts(){return z(i)},get onClose(){return tl}})};W(C,e=>{z(i)&&e(w)}),D(s),Vo(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Jc?.apply(this,e)}),B(`click`,v,()=>el(n())),H(e,s),at()}ea([`click`]);var mH=250,hH=5e3;function gH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??mH,r=e.limit??hH,i=0,a=null,o=null,s=!1;function c(){let t=pl.value,n=e.baseUrl??(t?Zo(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:ks(Cs(ml.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([_H(o,l),vA(o,l)]);e!==i||s||(u.status===`ok`?(hl.value=u.traces,_l.value=`ready`):u.status===`error`&&(_l.value=`unavailable`),d.status===`ok`&&(gl.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function _H(e,t){let n=[],r=new Set,i;do{let a=await hA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var vH=`data-autotel-portal`;function yH(e){let t=e.querySelector(`[${vH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(vH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}function bH(){return document.modelContext}var xH=50,SH=20;function CH(e){return typeof e!=`number`||!Number.isFinite(e)?SH:Math.min(Math.max(Math.trunc(e),1),xH)}var wH="Filter expression, e.g. `service = api duration > 100`, `status = ERROR`, `name contains checkout`. Conditions side by side mean AND; `OR` and parentheses work. A bare word is free text, matched against the span name, service, trace id and every attribute value. Empty string matches everything.",TH={type:`object`,properties:{query:{type:`string`,description:wH},limit:{type:`number`,description:`Rows to return, 1–${xH}. Defaults to ${SH}.`}}};function EH(e){return{traceId:e.traceId,name:e.rootSpan.name,service:e.service,status:e.status,durationMs:Math.round(e.duration),spans:e.spans.length,startedAt:new Date(e.startTime).toISOString(),...e.partial&&{partial:!0}}}function DH(e){return{spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,kind:e.kind,durationMs:Math.round(e.duration),status:e.status.code,...e.status.message&&{statusMessage:e.status.message},attributes:e.attributes}}function OH(e){return{severity:e.severityText??`UNSET`,body:typeof e.body==`string`?e.body:JSON.stringify(e.body),service:e.resourceName,traceId:e.traceId,at:new Date(e.timestamp).toISOString()}}function kH(e){return e.status===`invalid`?`Invalid query: ${e.errors.map(e=>e.message).join(`; `)}`:e.status===`aborted`?`Query cancelled.`:`Devtools query failed: ${e.message}`}async function AH(e,t){try{let n=await e.execute(t??{});return typeof n==`string`?n:JSON.stringify(n)??``}catch(e){return`Error: ${e instanceof Error?e.message:String(e)}`}}function jH(e){return{autotel_query_traces:{description:`Search traces the local devtools receiver has stored. Returns one row per trace: id, root span name, service, status, duration and span count. Use autotel_get_trace for the spans of a specific trace.`,input:TH,execute:async t=>{let n=await hA({query:typeof t.query==`string`?t.query:``,limit:CH(t.limit)},e);return n.status===`ok`?{traces:n.traces.map(EH),truncated:n.nextCursor!==null}:kH(n)}},autotel_get_trace:{description:`Every span of one trace, by id: name, kind, duration, status and attributes. Use after autotel_query_traces has narrowed to a trace worth opening.`,input:{type:`object`,properties:{traceId:{type:`string`,description:`Trace id, as returned by autotel_query_traces.`}},required:[`traceId`]},execute:async t=>{let n=typeof t.traceId==`string`?t.traceId.trim():``;if(!n)return`traceId is required — take one from autotel_query_traces.`;let r=await hA({query:`trace_id = "${n}"`,limit:1},e);if(r.status!==`ok`)return kH(r);let i=r.traces[0];return i?{...EH(i),spans:i.spans.map(DH)}:`No stored trace with id ${n}.`}},autotel_list_errors:{description:`Failing operations grouped by fingerprint: type, message, occurrence count, affected services and sample trace ids. The first call to make when asked what is broken.`,input:{type:`object`,properties:{query:{type:`string`,description:wH}}},execute:async t=>{let n=await vA({query:typeof t.query==`string`?t.query:``},e);return n.status===`ok`?{errors:n.errors.map(e=>({type:e.type,message:e.message,count:e.count,service:e.service,lastSeen:new Date(e.lastSeen).toISOString(),sampleTraceIds:e.affectedTraces.slice(0,3)}))}:kH(n)}},autotel_query_logs:{description:`Search stored log records. Returns severity, body, service, and the trace id when the log was emitted inside one.`,input:TH,execute:async t=>{let n=await _A({query:typeof t.query==`string`?t.query:``,limit:CH(t.limit)},e);return n.status===`ok`?{logs:n.logs.map(OH),truncated:n.nextCursor!==null}:kH(n)}},autotel_webmcp_inventory:{description:`The WebMCP tool surface this page has exposed to agents, as recorded by autotel-webmcp: which tools were offered, how often they were called, and which annotations the browser silently discarded at registration. Use to check a page's own tools behave as written.`,execute:async()=>{let t=await yA({},e);if(t.status!==`ok`)return kH(t);let{summary:n,tools:r}=t.webmcp;return{summary:n,tools:r.map(e=>({name:e.name,offered:e.offered,calls:e.calls,hasInputSchema:e.hasInputSchema,annotationsDropped:e.annotationsDropped,labelMismatch:e.labelMismatch,redefined:e.redefined}))}}}}}function MH(e){let t=new AbortController,n=jH(e);return{async mount(){let e=bH();if(e)for(let[r,i]of Object.entries(n))await e.registerTool({name:r,description:i.description,annotations:{readOnlyHint:!0},...i.input&&{inputSchema:i.input},execute:e=>AH(i,e)},{signal:t.signal})},unmount(){t.abort()}}}var NH=V(`<!> <!>`,1),PH=V(`<div class="contents"><!></div>`);function FH(e,t){it(t,!0);function n(e){Mu(e.tab??`traces`),Nl.value=e.q??``,Pl.value=e.status??`all`,Fl.value=e.minDuration??0,ml.value=e.window??bs,Ml.value=e.sort??Zu,zl.value=e.genaiQuery??``,e.traceId&&Wc(e.traceId,e.spanId)}Lr(()=>{pl.value=t.wsUrl});let r=gH();Lr(()=>(r.refresh(),()=>r.dispose())),Lr(()=>{ml.value,cl.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);Lr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,yH(e instanceof ShadowRoot?e:document.body),!0)}),Lr(()=>{t.deepLink&&n(t.deepLink)}),Lr(()=>{let e=Uc.value;e&&cl.value.some(t=>t.traceId===e.traceId)&&(Nu(e.traceId,e.spanId??null),Mu(`traces`),Uc.value=null)});let o=null;Lr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Bc.value,traceId:Vc.value??void 0,spanId:Hc.value??void 0,q:Nl.value||void 0,status:Pl.value,minDuration:Fl.value,window:ml.value,sort:Ml.value,genaiQuery:zl.value||void 0};if(Uc.value)return;let n=ed(e);if(n===location.hash)return;let r=td(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=$u(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),Lr(()=>{Wu(),es(Zo(t.wsUrl));let e=new Xo(t.wsUrl);fl.value=`connecting`;let n=e.onStatusChange(e=>{fl.value=e}),r=e.onMessage(Tu);return e.connect(),()=>{r(),n(),e.disconnect()}}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=Zo(t.wsUrl);if(!e)return;let n=MH({fetch:globalThis.fetch.bind(globalThis),baseUrl:e});return n.mount(),()=>n.unmount()});var s=PH();iE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=la(),i=I(r),a=e=>{pH(e,{})},o=e=>{var t=NH(),n=I(t);Hf(n,{}),nH(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Vo(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function IH(e,t){let n=pa(FH,{target:e,props:t});return()=>{_a(n)}}var LH=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
46
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[80px\\]{width:80px}.w-\\[200px\\]{width:200px}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,RH=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=LH,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=IH(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(RH,`observedAttributes`,[`mode`,`ws-url`]);function zH(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,RH)}var BH=document.currentScript;function VH(){let e=$u(location.hash);return Object.keys(e).length>0?e:void 0}function HH(){let e=VH();if(!BH?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(BH.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function UH(){if(zH(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=HH(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=LH,i.appendChild(a),IH(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,UH):UH(),e.mountWidget=IH,e.registerElement=zH,e})({});
45
+ instrumentWebMCP(); // before you register any tools`,Ke(2),D(t),H(e,t)};W(g,e=>{z(n).status===`loading`?e(_):z(n).status===`error`?e(v,1):z(c)&&z(l)&&z(c).tools.length>0?e(y,2):e(b,-1)}),D(f),B(`click`,h,()=>void s()),H(e,f),at()}ea([`click`]);var GV={traces:sj,agents:Vj,genai:KN,flow:zP,resources:YP,"service-map":DF,metrics:mz,logs:Rz,errors:SB,security:BB,compare:tV,coverage:fV,webmcp:WV},KV=[{id:`traces`,label:`Traces`,icon:Wp},{id:`agents`,label:`Agents`,icon:up},{id:`genai`,label:`GenAI`,icon:Ph},{id:`flow`,label:`Flow`,icon:eg},{id:`resources`,label:`Resources`,icon:fp},{id:`service-map`,label:`Service Map`,icon:Jm},{id:`metrics`,label:`Metrics`,icon:bp},{id:`logs`,label:`Logs`,icon:im},{id:`errors`,label:`Errors`,icon:Kh},{id:`security`,label:`Security`,icon:Ah},{id:`compare`,label:`Compare`,icon:gm},{id:`coverage`,label:`Coverage`,icon:vh},{id:`webmcp`,label:`WebMCP`,icon:ng}].filter(e=>GV[e.id]!==void 0),qV=KV.map(e=>e.id),JV=16,YV=48;function XV(e){let{isVertical:t,dock:n,axisSize:r,setSize:i,resetSize:a}=e,o=N(!1);return{get resizing(){return z(o)},onPointerDown:e=>{e.stopPropagation();let a=t(),s=a?`vertical`:`horizontal`,c=a?e.clientY:e.clientX,l=r(),u=n()===`bottom`||n()===`right`?-1:1;__(e,{cursor:a?`ns-resize`:`ew-resize`,onStart:()=>P(o,!0),onMove:e=>{let t=a?e.clientY:e.clientX;i(s,l+(t-c)*u)},onEnd:()=>P(o,!1)})},onKeyDown:e=>{let a=t()?`vertical`:`horizontal`,o=e.shiftKey?YV:JV,s=t()?{ArrowUp:n()===`bottom`?o:-o,ArrowDown:n()===`bottom`?-o:o}:{ArrowLeft:n()===`right`?o:-o,ArrowRight:n()===`right`?-o:o};e.key in s&&(e.preventDefault(),i(a,r()+s[e.key]))},onDblClick:()=>a(t()?`vertical`:`horizontal`)}}function ZV(e,t,n,r){let i={left:e,right:n-e,top:t,bottom:r-t};return Object.keys(i).reduce((e,t)=>i[t]<i[e]?t:e)}function QV(e){let{dock:t,pipActive:n,onDock:r}=e,i=N(!1),a=N(null);return{get dragging(){return z(i)},get dropTarget(){return z(a)},onHeaderPointerDown:e=>{e.button===0&&(e.target.closest(`button`)||n()||__(e,{cursor:`grabbing`,onStart:()=>{P(i,!0),P(a,t(),!0)},onMove:e=>{P(a,ZV(e.clientX,e.clientY,window.innerWidth,window.innerHeight),!0)},onEnd:()=>{P(i,!1),z(a)&&z(a)!==t()&&r(z(a)),P(a,null)}}))}}}function $V(e,t){it(t,!0);let n=M(()=>Vc.value),r=M(()=>GV[z(n)]??GV.traces);var i=ua(),a=I(i),o=e=>{var t=ua();za(I(t),()=>z(r),(e,t)=>{t(e,{})}),H(e,t)};W(a,e=>{z(r)&&e(o)}),H(e,i),at()}var eH=V(`<span class="absolute inset-0 rounded-full bg-success opacity-75 animate-ping" aria-hidden="true"></span>`),tH=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry ingest rate"> </span>`),nH=V(`<span class="text-xs font-mono tabular-nums text-fg-subtle" title="Telemetry store usage and retention cap"> </span>`),rH=V(`<span> </span> <!> <!>`,1),iH=V(`<div role="status"><span class="relative inline-flex w-2 h-2 shrink-0"><!> <span aria-hidden="true"></span></span> <!></div>`);function aH(e,t){it(t,!0);let n=Z(t,`compact`,3,!1),r=M(()=>pl.value),i=M(()=>z(r)===`connected`?{dot:`bg-success`,label:`Connected`,text:`text-success`}:z(r)===`connecting`?{dot:`bg-warning animate-pulse`,label:`Connecting…`,text:`text-warning`}:{dot:`bg-danger`,label:`Disconnected`,text:`text-fg-subtle`}),a=M(()=>bl.value),o=N(!1);Lr(()=>{if(z(a),z(a)===0)return;P(o,!0);let e=setTimeout(()=>P(o,!1),900);return()=>clearTimeout(e)});let s=N(0);Lr(()=>{if(n())return;let e=()=>{P(s,Math.round(wl(5e3).total),!0)};e();let t=setInterval(e,1e3);return()=>clearInterval(t)});let c=M(()=>!n()&&z(r)===`connected`&&z(s)>0),l=N(null);Lr(()=>{if(n()||z(r)!==`connected`)return;let e=!0,t=async()=>{let t=ml.value,n=(t?Qo(t):null)??globalThis.location?.origin;if(n)try{let t=await fetch(`${n}/api/stats`);t.ok&&e&&P(l,await t.json(),!0)}catch{}};t();let i=setInterval(t,3e4);return()=>{e=!1,clearInterval(i)}});function u(e){return e<1024**2?`${Math.round(e/1024)} KB`:e<1024**3?`${(e/1024**2).toFixed(1)} MB`:`${(e/1024**3).toFixed(1)} GB`}var d=iH(),f=F(d),p=F(f),m=e=>{H(e,eH())};W(p,e=>{z(o)&&z(r)===`connected`&&e(m)});var h=L(p,2);D(f);var g=L(f,2),_=e=>{var t=rH(),n=I(t),r=F(n,!0);D(n);var a=L(n,2),o=e=>{var t=tH(),n=F(t);D(t),R(()=>U(n,`· ${z(s)??``}/s`)),H(e,t)};W(a,e=>{z(c)&&e(o)});var d=L(a,2),f=e=>{var t=nH(),n=F(t);D(t),R((e,t)=>U(n,`· ${e??``} / ${t??``}`),[()=>u(z(l).bytesUsed),()=>u(z(l).maxBytes)]),H(e,t)};W(d,e=>{z(l)&&e(f)}),R(e=>{q(n,1,e),U(r,z(i).label)},[()=>K($(`text-xs font-medium`,z(i).text))]),H(e,t)};W(g,e=>{n()||e(_)}),D(d),R((e,t)=>{q(d,1,e),J(d,`aria-label`,`OTLP receiver: ${z(i).label}`),J(d,`title`,`OTLP receiver: ${z(i).label}${z(s)>0?` · ${z(s)}/s`:``}`),q(h,1,t)},[()=>K($(`flex items-center gap-1.5`,!n()&&`px-3 py-2`)),()=>K($(`relative inline-block w-2 h-2 rounded-full`,z(i).dot))]),H(e,d),at()}var oH=V(`<kbd class="inline-block px-1.5 py-0.5 font-mono text-xs font-semibold bg-hover border border-line rounded text-fg mr-1 last:mr-0 shadow-[0_1px_0_#d4d4d8]"> </kbd>`),sH=V(`<tr class="border-b border-line-subtle last:border-b-0"><td class="py-2.5 px-4 whitespace-nowrap align-middle w-[1%]"></td><td class="py-2.5 pr-4 pl-1 text-sm text-fg-muted align-middle"> </td></tr>`),cH=V(`<div class="fixed inset-0 z-[1000] flex items-center justify-center" role="dialog" aria-modal="true" aria-label="Keyboard shortcuts"><button type="button" aria-label="Close" class="absolute inset-0 bg-black/55 backdrop-blur-[2px] at-backdrop-in"></button> <div tabindex="-1" class="at-modal-in relative z-[1] bg-surface border border-line rounded-lg shadow-xl w-[480px] max-w-[90vw] max-h-[80vh] flex flex-col overflow-hidden outline-none"><div class="flex items-center justify-between px-4 py-3 border-b border-line bg-subtle flex-shrink-0"><span class="text-sm font-semibold text-fg">Keyboard Shortcuts</span> <button class="inline-flex items-center justify-center w-7 h-7 p-0 bg-transparent border border-line rounded cursor-pointer text-sm text-fg-subtle hover:bg-danger-bg hover:border-danger-border hover:text-danger transition-colors" title="Close (Esc)"><!></button></div> <div class="overflow-y-auto py-2"><table class="w-full border-collapse"><tbody></tbody></table></div></div></div>`);function lH(e,t){it(t,!0);let n=N(void 0);Lr(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t.onClose())},r=z(n);return r&&(r.addEventListener(`keydown`,e),r.focus()),window.addEventListener(`keydown`,e),()=>{r&&r.removeEventListener(`keydown`,e),window.removeEventListener(`keydown`,e)}});var r=cH(),i=F(r),a=L(i,2),o=F(a),s=L(F(o),2);ig(F(s),{size:14}),D(s),D(o);var c=L(o,2),l=F(c),u=F(l);G(u,21,()=>t.shortcuts,ka,(e,t)=>{var n=sH(),r=F(n);G(r,21,()=>z(t).keys,ka,(e,t)=>{var n=oH(),r=F(n,!0);D(n),R(()=>U(r,z(t)===`CmdOrCtrl`?Sg?`⌘`:`Ctrl`:z(t)===`AltOrOpt`?Sg?`⌥`:`Alt`:z(t))),H(e,n)}),D(r);var i=L(r),a=F(i,!0);D(i),D(n),R(()=>U(a,z(t).description)),H(e,n)}),D(u),D(l),D(c),D(a),Ho(a,e=>P(n,e),()=>z(n)),D(r),B(`click`,i,function(...e){t.onClose?.apply(this,e)}),B(`click`,s,function(...e){t.onClose?.apply(this,e)}),H(e,r),at()}ea([`click`]);var uH=V(`<div role="separator" aria-label="Resize panel" tabindex="0" title="Drag to resize · double-click to reset"><div></div> <div></div></div>`),dH=V(`<span class="text-fg-subtle/60 flex-shrink-0 pl-0.5" aria-hidden="true"><!></span>`),fH=V(`<span> </span>`),pH=V(`<button><!> <span> </span> <!></button>`),mH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Dock position (click to cycle: bottom → right → left) — or drag the header to an edge" aria-label="Change dock position"><!></button>`),hH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors"><!></button>`),gH=V(`<button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Close (Esc)" aria-label="Close devtools"><!></button>`),_H=V(`<span class="px-2.5 py-1 rounded-md bg-accent text-white text-xs font-semibold shadow-lg"> </span>`),vH=V(`<div><!></div>`),yH=V(`<div class="fixed inset-0 z-[1001] pointer-events-none" aria-hidden="true"></div>`),bH=V(`<section aria-label="Autotel devtools"><!> <header><!> <div class="flex items-center gap-2 flex-shrink-0 pr-1 mr-0.5"><!> <span class="text-xs font-semibold tracking-tight text-fg hidden sm:inline">autotel</span></div> <nav class="flex items-center gap-0.5 overflow-x-auto min-w-0 flex-1 at-no-scrollbar" aria-label="Devtools sections"></nav> <div class="flex items-center gap-1 flex-shrink-0 pl-1"><!> <button class="p-1.5 rounded-md text-fg-subtle hover:text-fg hover:bg-subtle transition-colors" title="Keyboard shortcuts (?)" aria-label="Keyboard shortcuts"><!></button> <!> <!> <!></div></header> <div class="flex-1 min-h-0 overflow-hidden"><!></div> <!></section> <!>`,1);function xH(e,t){it(t,!0);let n=N(void 0),r=M(()=>Ic.value),i=M(()=>Vc.value),a=M(()=>zc.value??`bottom`),o=M(()=>al.value),s=M(()=>Bc.value),c=lg(),l=M(()=>z(a)===`bottom`||z(a)===`top`),u=M(()=>z(l)?z(o).vertical:z(o).horizontal),d=M(()=>ol(z(l)?`vertical`:`horizontal`)),f=M(()=>cu.value),p=M(()=>ru.value),m=M(()=>iu.value),h=M(()=>({genai:z(p)>0?z(p):void 0,flow:z(m)>0?z(m):void 0,errors:z(f)>0?z(f):void 0})),g=M(()=>KV.map(e=>({...e,badge:z(h)[e.id]}))),_=XV({isVertical:()=>z(l),dock:()=>z(a),axisSize:()=>z(u),setSize:sl,resetSize:cl}),v=QV({dock:()=>z(a),pipActive:()=>z(s),onDock:Ru});async function y(){if(z(s)){pg(()=>Bc.value=!1);return}let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot?e.host:null;t&&await fg(t,()=>Bc.value=!1,{width:760,height:600})&&(Bc.value=!0)}let b=globalThis.window!==void 0&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function x(e,{dock:t}){if(b||z(s))return{duration:0};let n=t===`left`||t===`right`?`X`:`Y`,r=t===`bottom`||t===`right`?1:-1;return{duration:240,easing:sg,css:(e,t)=>`transform: translate${n}(${t*r*100}%)`}}let S=[`traces`,`genai`,`flow`,`service-map`,`metrics`,`logs`,`errors`],C=M(()=>el.value);function w(){return Hc.value?yg:Vc.value===`traces`?vg:_g}Lr(()=>{let e=z(n)?.getRootNode(),t=e instanceof ShadowRoot||e instanceof Document?e:window,r=e=>{let t=e;if(t.key===`Escape`){if(el.value){nl();return}if(bg())return;if(Bc.value){pg(()=>Bc.value=!1);return}Mu();return}if(t.key===`?`&&!bg()){t.preventDefault(),rl(w());return}if(!el.value&&!bg()&&t.key>=`1`&&t.key<=`7`){let e=Number.parseInt(t.key,10)-1;e<S.length&&Nu(S[e])}};return t.addEventListener(`keydown`,r),()=>t.removeEventListener(`keydown`,r)});let T=M(()=>z(s)?`inset-0`:{bottom:`left-0 right-0 bottom-0`,top:`left-0 right-0 top-0`,right:`top-0 bottom-0 right-0`,left:`top-0 bottom-0 left-0`}[z(a)]),ee=M(()=>z(s)?``:{bottom:`border-t`,top:`border-b`,right:`border-l`,left:`border-r`}[z(a)]),te=M(()=>({bottom:`-top-1 left-0 right-0 h-2 cursor-ns-resize`,top:`-bottom-1 left-0 right-0 h-2 cursor-ns-resize`,right:`-left-1 top-0 bottom-0 w-2 cursor-ew-resize`,left:`-right-1 top-0 bottom-0 w-2 cursor-ew-resize`})[z(a)]),ne=M(()=>({bottom:`inset-x-0 top-1 h-px`,top:`inset-x-0 bottom-1 h-px`,right:`inset-y-0 left-1 w-px`,left:`inset-y-0 right-1 w-px`})[z(a)]),re=M(()=>z(s)?``:z(l)?`height: ${z(u)}px;`:`width: ${z(u)}px;`),ie=M(()=>z(s)?``:{bottom:`box-shadow: 0 -12px 32px -14px var(--at-shadow), 0 -2px 6px -4px var(--at-shadow);`,top:`box-shadow: 0 12px 32px -14px var(--at-shadow), 0 2px 6px -4px var(--at-shadow);`,right:`box-shadow: -12px 0 32px -14px var(--at-shadow), -2px 0 6px -4px var(--at-shadow);`,left:`box-shadow: 12px 0 32px -14px var(--at-shadow), 2px 0 6px -4px var(--at-shadow);`}[z(a)]),ae=M(()=>z(a)===`right`?eh:z(a)===`left`?Qm:Xm),oe=[{edge:`bottom`,pos:`left-0 right-0 bottom-0 h-24`,label:`Dock bottom`},{edge:`top`,pos:`left-0 right-0 top-0 h-24`,label:`Dock top`},{edge:`left`,pos:`top-0 bottom-0 left-0 w-44`,label:`Dock left`},{edge:`right`,pos:`top-0 bottom-0 right-0 w-44`,label:`Dock right`}];var se=ua(),ce=I(se),le=e=>{var t=bH(),r=I(t),o=F(r),f=e=>{var t=uH(),n=F(t),r=L(n,2);D(t),R((e,i,a,o)=>{J(t,`aria-orientation`,z(l)?`horizontal`:`vertical`),J(t,`aria-valuenow`,e),J(t,`aria-valuemin`,z(d).min),J(t,`aria-valuemax`,z(d).max),q(t,1,i),q(n,1,a),q(r,1,o)},[()=>Math.round(z(u)),()=>K($(`absolute z-20 group touch-none select-none outline-none`,z(te))),()=>K($(`absolute bg-line-subtle transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(ne))),()=>K($(`absolute rounded-full bg-line transition-colors duration-150`,`group-hover:bg-accent group-focus-visible:bg-accent`,_.resizing&&`!bg-accent`,z(l)?`left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2 w-9 h-1`:`top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 h-9 w-1`))]),B(`pointerdown`,t,function(...e){_.onPointerDown?.apply(this,e)}),B(`keydown`,t,function(...e){_.onKeyDown?.apply(this,e)}),B(`dblclick`,t,function(...e){_.onDblClick?.apply(this,e)}),H(e,t)};W(o,e=>{z(s)||e(f)});var p=L(o,2),m=F(p),h=e=>{var t=dH();bm(F(t),{size:14}),D(t),H(e,t)};W(m,e=>{z(s)||e(h)});var b=L(m,2);ad(F(b),{width:18,height:18}),Ke(2),D(b);var S=L(b,2);G(S,21,()=>z(g),e=>e.id,(e,t)=>{let n=M(()=>z(t).icon),r=M(()=>z(i)===z(t).id);var a=pH(),o=F(a);{let e=M(()=>z(t).id===`errors`&&z(t).badge?`text-danger`:void 0);za(o,()=>z(n),(t,n)=>{n(t,{size:14,get class(){return z(e)}})})}var s=L(o,2),c=F(s,!0);D(s);var l=L(s,2),u=e=>{var n=fH(),r=F(n,!0);D(n),R(e=>{q(n,1,e),U(r,z(t).badge>99?`99+`:z(t).badge)},[()=>K($(`px-1.5 py-px text-[10px] font-semibold rounded-full`,z(t).id===`errors`?`bg-danger-bg text-danger`:`bg-accent/15 text-fg-muted`))]),H(e,n)};W(l,e=>{z(t).badge&&e(u)}),D(a),R(e=>{J(a,`aria-current`,z(r)?`page`:void 0),q(a,1,e),U(c,z(t).label)},[()=>K($(`flex items-center gap-1.5 px-2.5 h-8 rounded-md flex-shrink-0`,`text-xs transition-colors cursor-pointer`,z(r)?`bg-accent/12 text-fg font-semibold ring-1 ring-inset ring-accent/20`:`text-fg-subtle font-medium hover:text-fg hover:bg-subtle`))]),B(`click`,a,()=>Nu(z(t).id)),H(e,a)}),D(S);var se=L(S,2);{let e=e=>{let t=M(()=>z(ae));var n=ua();za(I(n),()=>z(t),(e,t)=>{t(e,{size:15})}),H(e,n)};var ce=F(se);aH(ce,{compact:!0});var le=L(ce,2);Mp(F(le),{size:15}),D(le);var E=L(le,2),ue=t=>{var n=mH(),r=F(n);e(r),D(n),B(`click`,n,function(...e){zu?.apply(this,e)}),H(t,n)};W(E,e=>{z(s)||e(ue)});var de=L(E,2),fe=e=>{var t=hH(),n=F(t),r=e=>{Bm(e,{size:15})},i=e=>{ih(e,{size:15})};W(n,e=>{z(s)?e(r):e(i,-1)}),D(t),R(()=>{J(t,`title`,z(s)?`Return to docked panel`:`Pop out to a separate window`),J(t,`aria-label`,z(s)?`Return to docked panel`:`Pop out to window`)}),B(`click`,t,y),H(e,t)};W(de,e=>{c&&e(fe)});var pe=L(de,2),me=e=>{var t=gH();ig(F(t),{size:16}),D(t),B(`click`,t,function(...e){Mu?.apply(this,e)}),H(e,t)};W(pe,e=>{z(s)||e(me)}),D(se),B(`click`,le,()=>rl(w()))}D(p);var he=L(p,2);$V(F(he),{}),D(he);var ge=L(he,2),_e=e=>{lH(e,{get shortcuts(){return z(C)},get onClose(){return nl}})};W(ge,e=>{z(C)&&e(_e)}),D(r),Ho(r,e=>P(n,e),()=>z(n));var ve=L(r,2),ye=e=>{var t=yH();G(t,21,()=>oe,e=>e.edge,(e,t)=>{let n=M(()=>v.dropTarget===z(t).edge);var r=vH(),i=F(r),a=e=>{var n=_H(),r=F(n,!0);D(n),R(()=>U(r,z(t).label)),H(e,n)};W(i,e=>{z(n)&&e(a)}),D(r),R(e=>q(r,1,e),[()=>K($(`absolute flex items-center justify-center transition-colors duration-100`,z(t).pos,z(n)?`bg-accent/15 ring-2 ring-inset ring-accent`:`bg-accent/5`))]),H(e,r)}),D(t),H(e,t)};W(ve,e=>{v.dragging&&e(ye)}),R((e,t)=>{q(r,1,e),so(r,`${z(re)} ${z(ie)}`),q(p,1,t)},[()=>K($(`fixed z-[1000] flex flex-col`,`bg-surface text-fg`,z(T),z(ee),`border-line`)),()=>K($(`flex items-center gap-1 pl-2 pr-2 h-11 flex-shrink-0`,`border-b border-line bg-surface`,z(s)?``:`cursor-grab active:cursor-grabbing`))]),B(`pointerdown`,p,function(...e){v.onHeaderPointerDown?.apply(this,e)}),Ja(3,r,()=>x,()=>({dock:z(a)})),H(e,t)};W(ce,e=>{z(r)&&e(le)}),H(e,se),at()}ea([`pointerdown`,`keydown`,`dblclick`,`click`]);var SH=V(`<button><!> </button>`),CH=V(`<nav></nav>`);function wH(e,t){it(t,!0);let n=Z(t,`orientation`,3,`horizontal`),r=M(()=>Vc.value);var i=CH();G(i,21,()=>KV,({id:e,label:t,icon:n})=>e,(e,t)=>{let n=()=>z(t).id,i=()=>z(t).label,a=()=>z(t).icon;var o=SH(),s=F(o);za(s,a,(e,t)=>{t(e,{size:14})});var c=L(s);D(o),R(e=>{q(o,1,e),U(c,` ${i()??``}`)},[()=>K($(`flex items-center gap-2 px-3 py-2 text-xs font-medium rounded transition-colors whitespace-nowrap`,z(r)===n()?`bg-accent text-white`:`text-fg-subtle hover:bg-hover hover:text-fg`))]),B(`click`,o,()=>Nu(n())),H(e,o)}),D(i),R(e=>q(i,1,e),[()=>K($(`flex gap-1 p-1`,n()===`vertical`?`flex-col w-48 border-r border-line`:`border-b border-line overflow-x-auto`))]),H(e,i),at()}ea([`click`]);var TH=V(`<!> <span class="font-medium">Snapshot mode</span> <span class="text-warning">— live updates paused.</span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-warning-bg transition-colors" title="Exit snapshot and clear data"><!> Exit</button>`,1),EH=V(`<span class="text-fg-subtle"> </span> <button class="ml-auto inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:bg-transparent"><!> Download snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover transition-colors" title="Load a snapshot file"><!> Load snapshot</button> <button class="inline-flex items-center gap-1 px-2 py-0.5 rounded hover:bg-hover hover:text-danger transition-colors" title="Clear all captured data — traces, logs, metrics and errors"><!> Clear</button>`,1),DH=V(`<span class="text-danger truncate"> </span>`),OH=V(`<span class="text-warning truncate"> </span>`),kH=V(`<div><!> <input type="file" accept="application/json,.json" class="hidden"/> <!> <!></div>`);function AH(e,t){it(t,!0);let n=N(void 0),r=N(null),i=N(null),a=M(()=>Al.value),o=M(()=>[{n:ll.value.length,one:`trace`,many:`traces`},{n:fl.value.length,one:`log`,many:`logs`},{n:dl.value.length,one:`error`,many:`errors`}].filter(e=>e.n>0).map(e=>`${e.n} ${e.n===1?e.one:e.many}`)),s=M(()=>z(o).length===0),c=()=>{P(r,null),P(i,null),ab({traces:ll.value,logs:fl.value,errors:dl.value})},l=()=>{z(n)?.click()},u=()=>{P(r,null),P(i,null),Vu()},d=async e=>{P(r,null),P(i,null);let t=e.currentTarget,n=t.files?.[0];if(t.value=``,!n)return;let a=await cb(n);if(!a.success||!a.snapshot){P(r,a.errors.join(`; `)||`Failed to load snapshot`,!0);return}a.warnings.length>0&&P(i,a.warnings.join(`; `),!0),Au(a.snapshot)};var f=kH(),p=F(f),m=e=>{var t=TH(),n=I(t);gp(n,{size:12});var r=L(n,6);ig(F(r),{size:12}),Ke(),D(r),B(`click`,r,function(...e){ju?.apply(this,e)}),H(e,t)},h=e=>{var t=EH(),n=I(t),r=F(n,!0);D(n);var i=L(n,2);gp(F(i),{size:12}),Ke(),D(i);var a=L(i,2);Jh(F(a),{size:12}),Ke(),D(a);var d=L(a,2);Hh(F(d),{size:12}),Ke(),D(d),R(e=>{U(r,e),i.disabled=z(s),J(i,`title`,z(s)?`Nothing captured yet`:`Download a snapshot of traces, logs, errors and metrics`)},[()=>z(s)?`No data captured`:z(o).join(` · `)]),B(`click`,i,c),B(`click`,a,l),B(`click`,d,u),H(e,t)};W(p,e=>{z(a)?e(m):e(h,-1)});var g=L(p,2);Ho(g,e=>P(n,e),()=>z(n));var _=L(g,2),v=e=>{var t=DH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(r)),U(n,z(r))}),H(e,t)};W(_,e=>{z(r)&&e(v)});var y=L(_,2),b=e=>{var t=OH(),n=F(t,!0);D(t),R(()=>{J(t,`title`,z(i)),U(n,z(i))}),H(e,t)};W(y,e=>{z(i)&&!z(r)&&e(b)}),D(f),R(e=>q(f,1,e),[()=>K($(`border-b border-line px-3 py-1.5 text-xs flex items-center gap-2`,z(a)?`bg-warning-bg text-warning`:`bg-subtle text-fg-muted`))]),B(`change`,g,d),H(e,f),at()}ea([`click`,`change`]);var jH=V(`<div class="flex h-screen w-screen bg-surface text-fg"><div class="hidden md:flex flex-col border-r border-line"><!> <div class="mt-auto p-2 border-t border-line flex flex-col gap-1"><!> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors"><!> </button> <button class="flex items-center gap-2 px-3 py-2 text-xs text-fg-subtle hover:bg-hover hover:text-fg rounded transition-colors" title="Keyboard shortcuts (?)"><!> Shortcuts</button></div></div> <div class="flex-1 flex flex-col min-w-0"><!> <div class="md:hidden"><!></div> <div class="flex-1 overflow-hidden"><!></div></div> <!></div>`);function MH(e,t){it(t,!0);function n(){return Hc.value?yg:Vc.value===`traces`?vg:_g}let r=M(()=>Kc.value),i=M(()=>el.value);Lr(()=>{Kc.value=qc()});let a=N(void 0);Lr(()=>{let e=null,t=z(a)?.getRootNode();t instanceof ShadowRoot?e=t.host:globalThis.document!==void 0&&(e=document.documentElement),e&&e.setAttribute(`data-theme`,z(r))}),Lr(()=>{let e=e=>{if(e.key===`?`&&!bg()){e.preventDefault(),rl(n());return}if(!el.value&&!bg()&&e.key>=`1`&&e.key<=`9`){let t=parseInt(e.key,10)-1;t<qV.length&&Nu(qV[t])}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});let o=M(()=>z(r)===`dark`?`Dark`:z(r)===`light`?`Light`:`System`);var s=jH(),c=F(s),l=F(c);wH(l,{orientation:`vertical`});var u=L(l,2),d=F(u);aH(d,{});var f=L(d,2),p=F(f),m=e=>{Km(e,{size:14})},h=e=>{Ih(e,{size:14})},g=e=>{Wm(e,{size:14})};W(p,e=>{z(r)===`dark`?e(m):z(r)===`light`?e(h,1):e(g,-1)});var _=L(p);D(f);var v=L(f,2);Mp(F(v),{size:14}),Ke(),D(v),D(u),D(c);var y=L(c,2),b=F(y);AH(b,{});var x=L(b,2);wH(F(x),{orientation:`horizontal`}),D(x);var S=L(x,2);$V(F(S),{}),D(S),D(y);var C=L(y,2),w=e=>{lH(e,{get shortcuts(){return z(i)},get onClose(){return nl}})};W(C,e=>{z(i)&&e(w)}),D(s),Ho(s,e=>P(a,e),()=>z(a)),R(()=>{J(f,`title`,`Theme: ${z(o)} (click to cycle)`),U(_,` ${z(o)??``}`)}),B(`click`,f,function(...e){Yc?.apply(this,e)}),B(`click`,v,()=>tl(n())),H(e,s),at()}ea([`click`]);var NH=250,PH=5e3;function FH(e={}){let t=e.now??(()=>Date.now()),n=e.debounceMs??NH,r=e.limit??PH,i=0,a=null,o=null,s=!1;function c(){let t=ml.value,n=e.baseUrl??(t?Qo(t):null)??globalThis.location?.origin??``;return{fetch:e.fetch??globalThis.fetch.bind(globalThis),baseUrl:n}}async function l(){if(s)return;let e=++i;a?.abort();let n=new AbortController;a=n;let o={query:``,window:As(ws(hl.value,t())),limit:r},l={...c(),signal:n.signal},[u,d]=await Promise.all([IH(o,l),kA(o,l)]);e!==i||s||(u.status===`ok`?(gl.value=u.traces,vl.value=`ready`):u.status===`error`&&(vl.value=`unavailable`),d.status===`ok`&&(_l.value=d.errors))}function u(){if(!s){if(o&&clearTimeout(o),n<=0){l();return}o=setTimeout(()=>{o=null,l()},n)}}return{refresh:l,invalidate:u,dispose(){s=!0,o&&clearTimeout(o),a?.abort()}}}async function IH(e,t){let n=[],r=new Set,i;do{let a=await EA({...e,cursor:i},t);if(a.status!==`ok`)return a;if(n.push(...a.traces),i=a.nextCursor??void 0,i&&r.has(i))return{status:`error`,message:`The trace query returned a repeated pagination cursor.`};i&&r.add(i)}while(i);return{status:`ok`,traces:n,nextCursor:null}}var LH=`data-autotel-portal`;function RH(e){let t=e.querySelector(`[${LH}]`);if(t)return t;let n=document.createElement(`div`);return n.setAttribute(LH,``),n.style.position=`absolute`,n.style.top=`0`,n.style.left=`0`,n.style.zIndex=`2147483000`,e.appendChild(n),n}function zH(){return document.modelContext}var BH=50,VH=20;function HH(e){return typeof e!=`number`||!Number.isFinite(e)?VH:Math.min(Math.max(Math.trunc(e),1),BH)}var UH="Filter expression, e.g. `service = api duration > 100`, `status = ERROR`, `name contains checkout`. Conditions side by side mean AND; `OR` and parentheses work. A bare word is free text, matched against the span name, service, trace id and every attribute value. Empty string matches everything.",WH={type:`object`,properties:{query:{type:`string`,description:UH},limit:{type:`number`,description:`Rows to return, 1–${BH}. Defaults to ${VH}.`}}};function GH(e){return{traceId:e.traceId,name:e.rootSpan.name,service:e.service,status:e.status,durationMs:Math.round(e.duration),spans:e.spans.length,startedAt:new Date(e.startTime).toISOString(),...e.partial&&{partial:!0}}}function KH(e){return{spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,kind:e.kind,durationMs:Math.round(e.duration),status:e.status.code,...e.status.message&&{statusMessage:e.status.message},attributes:e.attributes}}function qH(e){return{severity:e.severityText??`UNSET`,body:typeof e.body==`string`?e.body:JSON.stringify(e.body),service:e.resourceName,traceId:e.traceId,at:new Date(e.timestamp).toISOString()}}function JH(e){return e.status===`invalid`?`Invalid query: ${e.errors.map(e=>e.message).join(`; `)}`:e.status===`aborted`?`Query cancelled.`:`Devtools query failed: ${e.message}`}async function YH(e,t){try{let n=await e.execute(t??{});return typeof n==`string`?n:JSON.stringify(n)??``}catch(e){return`Error: ${e instanceof Error?e.message:String(e)}`}}function XH(e){return{autotel_query_traces:{description:`Search traces the local devtools receiver has stored. Returns one row per trace: id, root span name, service, status, duration and span count. Use autotel_get_trace for the spans of a specific trace.`,input:WH,execute:async t=>{let n=await EA({query:typeof t.query==`string`?t.query:``,limit:HH(t.limit)},e);return n.status===`ok`?{traces:n.traces.map(GH),truncated:n.nextCursor!==null}:JH(n)}},autotel_get_trace:{description:`Every span of one trace, by id: name, kind, duration, status and attributes. Use after autotel_query_traces has narrowed to a trace worth opening.`,input:{type:`object`,properties:{traceId:{type:`string`,description:`Trace id, as returned by autotel_query_traces.`}},required:[`traceId`]},execute:async t=>{let n=typeof t.traceId==`string`?t.traceId.trim():``;if(!n)return`traceId is required — take one from autotel_query_traces.`;let r=await EA({query:`trace_id = "${n}"`,limit:1},e);if(r.status!==`ok`)return JH(r);let i=r.traces[0];return i?{...GH(i),spans:i.spans.map(KH)}:`No stored trace with id ${n}.`}},autotel_list_errors:{description:`Failing operations grouped by fingerprint: type, message, occurrence count, affected services and sample trace ids. The first call to make when asked what is broken.`,input:{type:`object`,properties:{query:{type:`string`,description:UH}}},execute:async t=>{let n=await kA({query:typeof t.query==`string`?t.query:``},e);return n.status===`ok`?{errors:n.errors.map(e=>({type:e.type,message:e.message,count:e.count,service:e.service,lastSeen:new Date(e.lastSeen).toISOString(),sampleTraceIds:e.affectedTraces.slice(0,3)}))}:JH(n)}},autotel_query_logs:{description:`Search stored log records. Returns severity, body, service, and the trace id when the log was emitted inside one.`,input:WH,execute:async t=>{let n=await OA({query:typeof t.query==`string`?t.query:``,limit:HH(t.limit)},e);return n.status===`ok`?{logs:n.logs.map(qH),truncated:n.nextCursor!==null}:JH(n)}},autotel_webmcp_inventory:{description:`The WebMCP tool surface this page has exposed to agents, as recorded by autotel-webmcp: which tools were offered, how often they were called, and which annotations the browser silently discarded at registration. Use to check a page's own tools behave as written.`,execute:async()=>{let t=await AA({},e);if(t.status!==`ok`)return JH(t);let{summary:n,tools:r}=t.webmcp;return{summary:n,tools:r.map(e=>({name:e.name,offered:e.offered,calls:e.calls,hasInputSchema:e.hasInputSchema,annotationsDropped:e.annotationsDropped,labelMismatch:e.labelMismatch,redefined:e.redefined}))}}}}}function ZH(e){let t=new AbortController,n=XH(e);return{async mount(){let e=zH();if(e)for(let[r,i]of Object.entries(n))await e.registerTool({name:r,description:i.description,annotations:{readOnlyHint:!0},...i.input&&{inputSchema:i.input},execute:e=>YH(i,e)},{signal:t.signal})},unmount(){t.abort()}}}var QH=V(`<!> <!>`,1),$H=V(`<div class="contents"><!></div>`);function eU(e,t){it(t,!0);function n(e){Nu(e.tab??`traces`),Pl.value=e.q??``,Fl.value=e.status??`all`,Il.value=e.minDuration??0,hl.value=e.window??xs,Nl.value=e.sort??Qu,Bl.value=e.genaiQuery??``,e.traceId&&Gc(e.traceId,e.spanId)}Lr(()=>{ml.value=t.wsUrl});let r=FH();Lr(()=>(r.refresh(),()=>r.dispose())),Lr(()=>{hl.value,ll.value.length,r.invalidate()});let i=N(void 0),a=N(void 0);Lr(()=>{if(!z(i))return;let e=z(i).getRootNode();P(a,RH(e instanceof ShadowRoot?e:document.body),!0)}),Lr(()=>{t.deepLink&&n(t.deepLink)}),Lr(()=>{let e=Wc.value;e&&ll.value.some(t=>t.traceId===e.traceId)&&(Pu(e.traceId,e.spanId??null),Nu(`traces`),Wc.value=null)});let o=null;Lr(()=>{if(t.mode!==`fullpage`)return;let e={tab:Vc.value,traceId:Hc.value??void 0,spanId:Uc.value??void 0,q:Pl.value||void 0,status:Fl.value,minDuration:Il.value,window:hl.value,sort:Nl.value,genaiQuery:Bl.value||void 0};if(Wc.value)return;let n=td(e);if(n===location.hash)return;let r=nd(o,e);o=e;let i=`${location.pathname}${location.search}${n}`;r===`push`?history.pushState(history.state,``,i):history.replaceState(history.state,``,i)}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=()=>{let e=ed(location.hash);o=e,n(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)}),Lr(()=>{Gu(),ts(Qo(t.wsUrl));let e=new Zo(t.wsUrl);pl.value=`connecting`;let n=e.onStatusChange(e=>{pl.value=e}),r=e.onMessage(Eu);return e.connect(),()=>{r(),n(),e.disconnect()}}),Lr(()=>{if(t.mode!==`fullpage`)return;let e=Qo(t.wsUrl);if(!e)return;let n=ZH({fetch:globalThis.fetch.bind(globalThis),baseUrl:e});return n.mount(),()=>n.unmount()});var s=$H();hE(F(s),{get defaultPortalTo(){return z(a)},children:(e,n)=>{var r=ua(),i=I(r),a=e=>{MH(e,{})},o=e=>{var t=QH(),n=I(t);Uf(n,{}),xH(L(n,2),{}),H(e,t)};W(i,e=>{t.mode===`fullpage`?e(a):e(o,-1)}),H(e,r)},$$slots:{default:!0}}),D(s),Ho(s,e=>P(i,e),()=>z(i)),H(e,s),at()}function tU(e,t){let n=ma(eU,{target:e,props:t});return()=>{va(n)}}var nU=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
46
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:"Hanken Grotesk", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", monospace;--color-red-100:#ffe2e2;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-red-700:#bf000f;--color-orange-100:#ffedd5;--color-orange-400:#ff8b1a;--color-orange-500:#fe6e00;--color-orange-600:#f05100;--color-orange-700:#c53c00;--color-amber-100:#fef3c6;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-700:#b75000;--color-yellow-100:#fef9c2;--color-yellow-500:#edb200;--color-yellow-600:#cd8900;--color-green-100:#dcfce7;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-emerald-500:#00bb7f;--color-emerald-600:#009767;--color-teal-500:#00baa7;--color-teal-600:#009588;--color-cyan-100:#cefafe;--color-cyan-500:#00b7d7;--color-cyan-600:#0092b5;--color-sky-500:#00a5ef;--color-sky-600:#0084cc;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-indigo-500:#625fff;--color-indigo-600:#4f39f6;--color-violet-100:#ede9fe;--color-violet-500:#8d54ff;--color-violet-600:#7f22fe;--color-violet-700:#7008e7;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-500:#ac4bff;--color-purple-600:#9810fa;--color-fuchsia-500:#e12afb;--color-fuchsia-600:#c600db;--color-rose-500:#ff2357;--color-rose-600:#e70044;--color-gray-50:#f9fafb;--color-gray-100:#f3f4f6;--color-gray-400:#99a1af;--color-gray-500:#6a7282;--color-gray-900:#101828;--color-stone-500:#79716b;--color-stone-600:#57534d;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--at-surface);--color-subtle:var(--at-muted);--color-hover:var(--at-surface-hover);--color-code:var(--at-code);--color-fg:var(--at-text-primary);--color-fg-muted:var(--at-text-secondary);--color-fg-subtle:var(--at-text-muted);--color-line:var(--at-border);--color-line-subtle:var(--at-border-light);--color-accent:var(--at-accent);--color-danger:var(--at-error-text);--color-danger-bg:var(--at-error-bg);--color-danger-border:var(--at-error-border);--color-success:var(--at-ok-text);--color-success-bg:var(--at-ok-bg);--color-success-border:var(--at-ok-border);--color-warning:var(--at-warn-text);--color-warning-bg:var(--at-warn-bg);--color-warning-border:var(--at-warn-border);--color-selected:var(--at-selected-bg)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-100:color(display-p3 .980386 .889727 .887779);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-red-700:color(display-p3 .692737 .116232 .104679);--color-orange-100:color(display-p3 .988762 .931393 .843273);--color-orange-400:color(display-p3 .950192 .561807 .211017);--color-orange-500:color(display-p3 .946589 .449788 .0757345);--color-orange-600:color(display-p3 .887467 .341665 .0219962);--color-orange-700:color(display-p3 .729844 .257256 .0511062);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-700:color(display-p3 .67989 .32771 .0520514);--color-yellow-100:color(display-p3 .993436 .977463 .782913);--color-yellow-500:color(display-p3 .903651 .703062 .0745389);--color-yellow-600:color(display-p3 .776342 .542492 .041709);--color-green-100:color(display-p3 .885269 .984329 .910368);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-emerald-500:color(display-p3 .267113 .726847 .508397);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-teal-500:color(display-p3 .266569 .721518 .655462);--color-teal-600:color(display-p3 .207114 .579584 .53668);--color-cyan-100:color(display-p3 .843085 .97553 .992573);--color-cyan-500:color(display-p3 .246703 .710032 .841444);--color-cyan-600:color(display-p3 .193249 .564651 .707197);--color-sky-500:color(display-p3 .219113 .639027 .931479);--color-sky-600:color(display-p3 .162505 .509376 .796082);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-indigo-500:color(display-p3 .380374 .372235 .971707);--color-indigo-600:color(display-p3 .297656 .227891 .929242);--color-violet-100:color(display-p3 .926222 .913546 .990178);--color-violet-500:color(display-p3 .523372 .329605 .990884);--color-violet-600:color(display-p3 .459951 .162666 .957985);--color-violet-700:color(display-p3 .40161 .0841901 .871151);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-500:color(display-p3 .629519 .30089 .990817);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-fuchsia-500:color(display-p3 .81268 .241966 .951571);--color-fuchsia-600:color(display-p3 .716587 .083681 .841036);--color-rose-500:color(display-p3 .921824 .240748 .355666);--color-rose-600:color(display-p3 .848792 .102011 .269259);--color-gray-50:color(display-p3 .977213 .98084 .985102);--color-gray-100:color(display-p3 .953567 .956796 .964321);--color-gray-400:color(display-p3 .605734 .630385 .680158);--color-gray-500:color(display-p3 .421287 .446085 .504784);--color-gray-900:color(display-p3 .070423 .0928982 .151928);--color-stone-500:color(display-p3 .467445 .443064 .42264);--color-stone-600:color(display-p3 .339543 .325291 .304619)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-100:lab(92.243% 10.2865 3.83865);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-red-700:lab(40.4273% 67.2623 53.7441);--color-orange-100:lab(94.7127% 3.58394 14.3151);--color-orange-400:lab(70.0429% 42.5156 75.8207);--color-orange-500:lab(64.272% 57.1788 90.3583);--color-orange-600:lab(57.1026% 64.2584 89.8886);--color-orange-700:lab(46.4615% 57.7275 70.8507);--color-amber-100:lab(95.916% -1.21653 23.111);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-700:lab(47.2709% 42.9082 69.2966);--color-yellow-100:lab(97.3564% -4.51407 27.344);--color-yellow-500:lab(76.3898% 14.5258 98.4589);--color-yellow-600:lab(62.7799% 22.4197 86.1544);--color-green-100:lab(96.1861% -13.8464 6.52365);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-emerald-600:lab(55.0481% -49.9246 15.93);--color-teal-500:lab(67.3859% -49.0983 -2.63511);--color-teal-600:lab(55.0223% -41.0774 -3.90277);--color-cyan-100:lab(95.3146% -13.8285 -6.84732);--color-cyan-500:lab(67.805% -35.3952 -30.2018);--color-cyan-600:lab(55.1767% -26.7496 -30.5139);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-sky-600:lab(51.7754% -11.4712 -49.8349);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-indigo-500:lab(48.295% 38.3129 -81.9673);--color-indigo-600:lab(38.4009% 52.6132 -92.3857);--color-violet-100:lab(93.0838% 4.35197 -9.88284);--color-violet-500:lab(49.9355% 55.1776 -81.8963);--color-violet-600:lab(41.088% 68.9966 -91.995);--color-violet-700:lab(35.2783% 67.9912 -88.793);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-500:lab(52.0183% 66.11 -78.2316);--color-purple-600:lab(43.0295% 75.21 -86.5669);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-fuchsia-600:lab(47.5131% 83.4271 -63.0363);--color-rose-500:lab(56.101% 79.4328 31.4532);--color-rose-600:lab(49.1882% 81.577 36.0311);--color-gray-50:lab(98.2596% -.247031 -.706708);--color-gray-100:lab(96.1596% -.0823438 -1.13575);--color-gray-400:lab(65.9269% -.832707 -8.17473);--color-gray-500:lab(47.7841% -.393182 -10.0268);--color-gray-900:lab(8.11897% .811279 -12.254);--color-stone-500:lab(48.1164% 2.35701 4.26852);--color-stone-600:lab(35.5168% 1.08604 4.07829)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-10{top:calc(var(--spacing) * 10)}.top-\\[7px\\]{top:7px}.top-\\[9px\\]{top:9px}.top-\\[calc\\(100\\%-2px\\)\\]{top:calc(100% - 2px)}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-0\\.5{bottom:calc(var(--spacing) * .5)}.bottom-1{bottom:var(--spacing)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-1{left:calc(var(--spacing) * -1)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-px{left:-1px}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[1000\\]{z-index:1000}.z-\\[1001\\]{z-index:1001}.z-\\[1100\\]{z-index:1100}.z-\\[1200\\]{z-index:1200}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-m-1{margin:calc(var(--spacing) * -1)}.m-3{margin:calc(var(--spacing) * 3)}.m-4{margin:calc(var(--spacing) * 4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:var(--spacing)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-1\\/2{height:50%}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-24{height:calc(var(--spacing) * 24)}.h-\\[300px\\]{height:300px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[160px\\]{max-height:160px}.max-h-\\[200px\\]{max-height:200px}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:0}.min-h-\\[120px\\]{min-height:120px}.w-0{width:0}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-14{width:calc(var(--spacing) * 14)}.w-24{width:calc(var(--spacing) * 24)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[1\\%\\]{width:1%}.w-\\[480px\\]{width:480px}.w-\\[min\\(560px\\,92vw\\)\\]{width:min(560px,92vw)}.w-\\[min\\(700px\\,92vw\\)\\]{width:min(700px,92vw)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[10rem\\]{max-width:10rem}.max-w-\\[14rem\\]{max-width:14rem}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[90vw\\]{max-width:90vw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[420px\\]{max-width:420px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\\[8px\\]{min-width:8px}.min-w-\\[16px\\]{min-width:16px}.min-w-\\[180px\\]{min-width:180px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-y{resize:vertical}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[80px_1fr\\]{grid-template-columns:80px 1fr}.grid-cols-\\[100px_1fr\\]{grid-template-columns:100px 1fr}.grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-px{gap:1px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:0;margin-block-end:0}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-line>:not(:last-child)){border-color:var(--color-line)}:where(.divide-line-subtle>:not(:last-child)){border-color:var(--color-line-subtle)}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/30{border-color:color-mix(in oklab, var(--color-accent) 30%, transparent)}}.border-accent\\/40{border-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/20{border-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500\\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab, red, red)){.border-blue-500\\/30{border-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.border-cyan-500\\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab, red, red)){.border-cyan-500\\/30{border-color:color-mix(in oklab, var(--color-cyan-500) 30%, transparent)}}.border-danger-border{border-color:var(--color-danger-border)}.border-danger\\/30{border-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\\/30{border-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.border-emerald-500\\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/30{border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.border-fuchsia-500\\/30{border-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.border-fuchsia-500\\/30{border-color:color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent)}}.border-green-500\\/30{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.border-green-500\\/30{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.border-indigo-500\\/30{border-color:#625fff4d}@supports (color:color-mix(in lab, red, red)){.border-indigo-500\\/30{border-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.border-line{border-color:var(--color-line)}.border-line-subtle{border-color:var(--color-line-subtle)}.border-line\\/50{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/50{border-color:color-mix(in oklab, var(--color-line) 50%, transparent)}}.border-line\\/60{border-color:var(--color-line)}@supports (color:color-mix(in lab, red, red)){.border-line\\/60{border-color:color-mix(in oklab, var(--color-line) 60%, transparent)}}.border-orange-500\\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab, red, red)){.border-orange-500\\/30{border-color:color-mix(in oklab, var(--color-orange-500) 30%, transparent)}}.border-purple-500\\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab, red, red)){.border-purple-500\\/30{border-color:color-mix(in oklab, var(--color-purple-500) 30%, transparent)}}.border-red-500\\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/30{border-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.border-stone-500\\/30{border-color:#79716b4d}@supports (color:color-mix(in lab, red, red)){.border-stone-500\\/30{border-color:color-mix(in oklab, var(--color-stone-500) 30%, transparent)}}.border-success-border{border-color:var(--color-success-border)}.border-transparent{border-color:#0000}.border-violet-500\\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab, red, red)){.border-violet-500\\/30{border-color:color-mix(in oklab, var(--color-violet-500) 30%, transparent)}}.border-warning-border{border-color:var(--color-warning-border)}.border-white{border-color:var(--color-white)}.border-l-warning{border-left-color:var(--color-warning)}.\\!bg-accent{background-color:var(--color-accent)!important}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/5{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/10{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.bg-accent\\/12{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/12{background-color:color-mix(in oklab, var(--color-accent) 12%, transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/15{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.bg-accent\\/70{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\\/70{background-color:color-mix(in oklab, var(--color-accent) 70%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-black\\/55{background-color:#0000008c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/55{background-color:color-mix(in oklab, var(--color-black) 55%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/10{background-color:color-mix(in oklab, var(--color-blue-500) 10%, transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\\/15{background-color:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.bg-code{background-color:var(--color-code)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500\\/15{background-color:#00b7d726}@supports (color:color-mix(in lab, red, red)){.bg-cyan-500\\/15{background-color:color-mix(in oklab, var(--color-cyan-500) 15%, transparent)}}.bg-danger{background-color:var(--color-danger)}.bg-danger-bg,.bg-danger-bg\\/40{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.bg-danger-bg\\/40{background-color:color-mix(in oklab, var(--color-danger-bg) 40%, transparent)}}.bg-danger\\/5{background-color:var(--color-danger)}@supports (color:color-mix(in lab, red, red)){.bg-danger\\/5{background-color:color-mix(in oklab, var(--color-danger) 5%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-fg-subtle{background-color:var(--color-fg-subtle)}.bg-fuchsia-500\\/15{background-color:#e12afb26}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-500\\/15{background-color:color-mix(in oklab, var(--color-fuchsia-500) 15%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\\/15{background-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.bg-green-500\\/15{background-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.bg-hover{background-color:var(--color-hover)}.bg-indigo-500\\/15{background-color:#625fff26}@supports (color:color-mix(in lab, red, red)){.bg-indigo-500\\/15{background-color:color-mix(in oklab, var(--color-indigo-500) 15%, transparent)}}.bg-line{background-color:var(--color-line)}.bg-line-subtle{background-color:var(--color-line-subtle)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\\/15{background-color:color-mix(in oklab, var(--color-orange-500) 15%, transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\\/15{background-color:#ac4bff26}@supports (color:color-mix(in lab, red, red)){.bg-purple-500\\/15{background-color:color-mix(in oklab, var(--color-purple-500) 15%, transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/15{background-color:color-mix(in oklab, var(--color-red-500) 15%, transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-selected{background-color:var(--color-selected)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-stone-500\\/15{background-color:#79716b26}@supports (color:color-mix(in lab, red, red)){.bg-stone-500\\/15{background-color:color-mix(in oklab, var(--color-stone-500) 15%, transparent)}}.bg-subtle,.bg-subtle\\/40{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/40{background-color:color-mix(in oklab, var(--color-subtle) 40%, transparent)}}.bg-subtle\\/50{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/50{background-color:color-mix(in oklab, var(--color-subtle) 50%, transparent)}}.bg-subtle\\/60{background-color:var(--color-subtle)}@supports (color:color-mix(in lab, red, red)){.bg-subtle\\/60{background-color:color-mix(in oklab, var(--color-subtle) 60%, transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-surface{background-color:var(--color-surface)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-transparent{background-color:#0000}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/10{background-color:color-mix(in oklab, var(--color-violet-500) 10%, transparent)}}.bg-violet-500\\/15{background-color:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.bg-violet-500\\/15{background-color:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.fill-\\[var\\(--color-fg-subtle\\)\\]{fill:var(--color-fg-subtle)}.fill-amber-500\\/15{fill:#f99c0026}@supports (color:color-mix(in lab, red, red)){.fill-amber-500\\/15{fill:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.fill-amber-600{fill:var(--color-amber-600)}.fill-blue-500\\/15{fill:#3080ff26}@supports (color:color-mix(in lab, red, red)){.fill-blue-500\\/15{fill:color-mix(in oklab, var(--color-blue-500) 15%, transparent)}}.fill-blue-600{fill:var(--color-blue-600)}.fill-danger{fill:var(--color-danger)}.fill-emerald-500\\/15{fill:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.fill-emerald-500\\/15{fill:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.fill-emerald-600{fill:var(--color-emerald-600)}.fill-fg-muted{fill:var(--color-fg-muted)}.fill-fg-subtle{fill:var(--color-fg-subtle)}.fill-red-500{fill:var(--color-red-500)}.fill-rose-500\\/15{fill:#ff235726}@supports (color:color-mix(in lab, red, red)){.fill-rose-500\\/15{fill:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500\\/15{fill:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.fill-sky-500\\/15{fill:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.fill-sky-600{fill:var(--color-sky-600)}.fill-teal-500\\/15{fill:#00baa726}@supports (color:color-mix(in lab, red, red)){.fill-teal-500\\/15{fill:color-mix(in oklab, var(--color-teal-500) 15%, transparent)}}.fill-teal-600{fill:var(--color-teal-600)}.fill-violet-500\\/15{fill:#8d54ff26}@supports (color:color-mix(in lab, red, red)){.fill-violet-500\\/15{fill:color-mix(in oklab, var(--color-violet-500) 15%, transparent)}}.fill-violet-600{fill:var(--color-violet-600)}.fill-warning{fill:var(--color-warning)}.fill-white{fill:var(--color-white)}.stroke-accent{stroke:var(--color-accent)}.stroke-amber-500\\/60{stroke:#f99c0099}@supports (color:color-mix(in lab, red, red)){.stroke-amber-500\\/60{stroke:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.stroke-blue-500\\/60{stroke:#3080ff99}@supports (color:color-mix(in lab, red, red)){.stroke-blue-500\\/60{stroke:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.stroke-emerald-500\\/60{stroke:#00bb7f99}@supports (color:color-mix(in lab, red, red)){.stroke-emerald-500\\/60{stroke:color-mix(in oklab, var(--color-emerald-500) 60%, transparent)}}.stroke-fg-subtle{stroke:var(--color-fg-subtle)}.stroke-red-500{stroke:var(--color-red-500)}.stroke-rose-500\\/60{stroke:#ff235799}@supports (color:color-mix(in lab, red, red)){.stroke-rose-500\\/60{stroke:color-mix(in oklab, var(--color-rose-500) 60%, transparent)}}.stroke-sky-500\\/60{stroke:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.stroke-sky-500\\/60{stroke:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.stroke-teal-500\\/60{stroke:#00baa799}@supports (color:color-mix(in lab, red, red)){.stroke-teal-500\\/60{stroke:color-mix(in oklab, var(--color-teal-500) 60%, transparent)}}.stroke-violet-500\\/60{stroke:#8d54ff99}@supports (color:color-mix(in lab, red, red)){.stroke-violet-500\\/60{stroke:color-mix(in oklab, var(--color-violet-500) 60%, transparent)}}.stroke-\\[2\\.5px\\]{stroke-width:2.5px}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block-start:1px;padding-block-end:1px}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/80{color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.text-accent\\/80{color:color-mix(in oklab, var(--color-accent) 80%, transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-danger{color:var(--color-danger)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-fg{color:var(--color-fg)}.text-fg-muted,.text-fg-muted\\/70{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/70{color:color-mix(in oklab, var(--color-fg-muted) 70%, transparent)}}.text-fg-muted\\/80{color:var(--color-fg-muted)}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\\/80{color:color-mix(in oklab, var(--color-fg-muted) 80%, transparent)}}.text-fg-subtle,.text-fg-subtle\\/60{color:var(--color-fg-subtle)}@supports (color:color-mix(in lab, red, red)){.text-fg-subtle\\/60{color:color-mix(in oklab, var(--color-fg-subtle) 60%, transparent)}}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-gray-50{color:var(--color-gray-50)}.text-gray-100{color:var(--color-gray-100)}.text-gray-500{color:var(--color-gray-500)}.text-gray-900{color:var(--color-gray-900)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-line{color:var(--color-line)}.text-line-subtle{color:var(--color-line-subtle)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-stone-600{color:var(--color-stone-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-600\\/70{color:#7f22feb3}@supports (color:color-mix(in lab, red, red)){.text-violet-600\\/70{color:color-mix(in oklab, var(--color-violet-600) 70%, transparent)}}.text-violet-700{color:var(--color-violet-700)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_0_\\#d4d4d8\\]{--tw-shadow:0 1px 0 var(--tw-shadow-color,#d4d4d8);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-accent,.ring-accent\\/20{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.ring-accent\\/20{--tw-ring-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.ring-danger{--tw-ring-color:var(--color-danger)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.row-virtual{content-visibility:auto;contain-intrinsic-size:auto 32px}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:bg-accent:is(:where(.group):hover *){background-color:var(--color-accent)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\/stat\\:underline:is(:where(.group\\/stat):hover *){text-decoration-line:underline}}.group-focus-visible\\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--color-accent)}.last\\:mr-0:last-child{margin-right:0}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-danger-border:hover{border-color:var(--color-danger-border)}.hover\\:border-line:hover{border-color:var(--color-line)}.hover\\:bg-accent:hover,.hover\\:bg-accent\\/5:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/5:hover{background-color:color-mix(in oklab, var(--color-accent) 5%, transparent)}}.hover\\:bg-accent\\/10:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/10:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab, var(--color-accent) 15%, transparent)}}.hover\\:bg-accent\\/20:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/20:hover{background-color:color-mix(in oklab, var(--color-accent) 20%, transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab, var(--color-accent) 90%, transparent)}}.hover\\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\\:bg-danger-bg:hover,.hover\\:bg-danger-bg\\/60:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/60:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 60%, transparent)}}.hover\\:bg-danger-bg\\/70:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/70:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 70%, transparent)}}.hover\\:bg-danger-bg\\/80:hover{background-color:var(--color-danger-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-danger-bg) 80%, transparent)}}.hover\\:bg-emerald-500\\/25:hover{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-500\\/25:hover{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.hover\\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\\:bg-hover:hover,.hover\\:bg-hover\\/50:hover{background-color:var(--color-hover)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-hover\\/50:hover{background-color:color-mix(in oklab, var(--color-hover) 50%, transparent)}}.hover\\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab, var(--color-red-500) 25%, transparent)}}.hover\\:bg-subtle:hover{background-color:var(--color-subtle)}.hover\\:bg-violet-500\\/25:hover{background-color:#8d54ff40}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-violet-500\\/25:hover{background-color:color-mix(in oklab, var(--color-violet-500) 25%, transparent)}}.hover\\:bg-warning-bg:hover,.hover\\:bg-warning-bg\\/80:hover{background-color:var(--color-warning-bg)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-warning-bg\\/80:hover{background-color:color-mix(in oklab, var(--color-warning-bg) 80%, transparent)}}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-fg:hover{color:var(--color-fg)}.hover\\:text-fg-muted:hover{color:var(--color-fg-muted)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.focus\\:border-line:focus{border-color:var(--color-line)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\\:ring-danger:focus{--tw-ring-color:var(--color-danger)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-hover:focus-visible{background-color:var(--color-hover)}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-accent:focus-visible{--tw-ring-color:var(--color-accent)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-accent:focus-visible{outline-color:var(--color-accent)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (hover:hover){.disabled\\:hover\\:bg-accent\\/10:disabled:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab, red, red)){.disabled\\:hover\\:bg-accent\\/10:disabled:hover{background-color:color-mix(in oklab, var(--color-accent) 10%, transparent)}}.disabled\\:hover\\:bg-danger-bg:disabled:hover{background-color:var(--color-danger-bg)}.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}@media (min-width:40rem){.sm\\:inline{display:inline}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width:48rem){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@container (width>=28rem){.\\@md\\:block{display:block}.\\@md\\:flex{display:flex}.\\@md\\:hidden{display:none}.\\@md\\:w-72{width:calc(var(--spacing) * 72)}.\\@md\\:shrink-0{flex-shrink:0}.\\@md\\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}}}*{box-sizing:border-box}:host,:root{--at-surface:#fcfdfe;--at-surface-hover:#f5f6f9;--at-muted:#f2f5f8;--at-code:#f3f6fa;--at-text-primary:#1a1f29;--at-text-secondary:#515864;--at-text-muted:#868d97;--at-border:#dfe1e5;--at-border-light:#eef0f3;--at-shadow:#171f2e1a;--at-accent:#3177dc;--at-error-bg:#ffecea;--at-error-text:#cc2827;--at-error-border:#f8a49d;--at-ok-bg:#e0fae4;--at-ok-text:#0e8c41;--at-ok-border:#89da9b;--at-warn-bg:#fff0d1;--at-warn-text:#a16500;--at-warn-border:#e5c379;--at-highlight-bg:#fff6d1;--at-selected-bg:#e9f3ff;--at-scrollbar-thumb:#ced1d6;--at-scrollbar-thumb-hover:#999fa8}@supports (color:color(display-p3 0 0 0)){:host,:root{--at-surface:color(display-p3 .989609 .992382 .997175);--at-surface-hover:color(display-p3 .960878 .966392 .975929);--at-muted:color(display-p3 .951795 .958673 .970576);--at-code:color(display-p3 .955784 .964045 .978342);--at-text-primary:color(display-p3 .106201 .12247 .157281);--at-text-secondary:color(display-p3 .323937 .346032 .388256);--at-text-muted:color(display-p3 .528711 .550898 .589512);--at-border:color(display-p3 .875378 .883503 .897566);--at-border-light:color(display-p3 .934839 .941694 .953557);--at-shadow:color(display-p3 .0979137 .121845 .174352/.1);--at-accent:color(display-p3 .266557 .461859 .837181);--at-error-bg:color(display-p3 1.00853 .923821 .911661);--at-error-text:color(display-p3 .7372 .221951 .191652);--at-error-border:color(display-p3 .924106 .659231 .626897);--at-ok-bg:color(display-p3 .896905 .977035 .900254);--at-ok-text:color(display-p3 .247857 .539374 .286752);--at-ok-border:color(display-p3 .609805 .847347 .627399);--at-warn-bg:color(display-p3 .997819 .943515 .816698);--at-warn-text:color(display-p3 .607081 .403503 .0845266);--at-warn-border:color(display-p3 .876737 .768181 .515098);--at-highlight-bg:color(display-p3 .994932 .96424 .830533);--at-selected-bg:color(display-p3 .910207 .951093 1.02232);--at-scrollbar-thumb:color(display-p3 .80912 .819793 .838278);--at-scrollbar-thumb-hover:color(display-p3 .60332 .622263 .655172)}}@supports (color:lab(0% 0 0)){:host,:root{--at-surface:lab(99.2988% -.132054 -.745118);--at-surface-hover:lab(96.9735% -.261605 -1.48877);--at-muted:lab(96.2747% -.325292 -1.86008);--at-code:lab(96.736% -.388592 -2.23104);--at-text-primary:lab(11.741% -.349499 -7.30943);--at-text-secondary:lab(37.2801% -.862852 -7.73156);--at-text-muted:lab(58.1854% -1.04666 -6.62941);--at-border:lab(89.5439% -.387847 -2.23061);--at-border-light:lab(94.7667% -.325233 -1.86);--at-shadow:lab(11.6682% -.113927 -10.842/.1);--at-accent:lab(49.8997% 5.63273 -59.1615);--at-error-bg:lab(95.0829% 9.19622 4.96011);--at-error-text:lab(45.8049% 62.9533 44.1);--at-error-border:lab(75.8489% 31.0226 17.1029);--at-ok-bg:lab(95.8936% -11.84 7.56052);--at-ok-text:lab(50.824% -45.5785 30.3918);--at-ok-border:lab(80.6679% -35.8792 23.2774);--at-warn-bg:lab(95.5261% 2.02972 19.535);--at-warn-text:lab(48.6413% 21.7782 63.415);--at-warn-border:lab(80.5062% 5.88706 41.41);--at-highlight-bg:lab(96.7959% -.972748 19.4827);--at-selected-bg:lab(95.2674% -1.71572 -11.035);--at-scrollbar-thumb:lab(83.7382% -.510752 -2.97043);--at-scrollbar-thumb-hover:lab(65.1562% -.902712 -5.53997)}}:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-warn-bg:#7e5d1d38;--at-warn-text:#f1bf5b;--at-warn-border:#b07b00;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-warn-bg:color(display-p3 .474062 .369044 .161788/.22);--at-warn-text:color(display-p3 .915105 .755059 .421563);--at-warn-border:color(display-p3 .660566 .489104 .15495);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=dark]),:root[data-theme=dark]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-warn-bg:lab(42.0282% 9.23485 40.2236/.22);--at-warn-text:lab(80.4197% 11.1201 56.0991);--at-warn-border:lab(55.853% 15.6735 62.0226);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}@media (prefers-color-scheme:dark){:host([data-theme=system]),:root[data-theme=system]{--at-surface:#151b25;--at-surface-hover:#1d2431;--at-muted:#191f2b;--at-code:#1b222d;--at-text-primary:#dfe5ed;--at-text-secondary:#9ca5b3;--at-text-muted:#727b88;--at-border:#2e3643;--at-border-light:#232934;--at-shadow:#00000073;--at-accent:#63a6ff;--at-error-bg:#742e2940;--at-error-text:#ff7f73;--at-error-border:#cf413a;--at-ok-bg:#39794933;--at-ok-text:#6ed889;--at-ok-border:#2e9e52;--at-highlight-bg:#b8a4571f;--at-selected-bg:#6087c22e;--at-scrollbar-thumb:#3d434d;--at-scrollbar-thumb-hover:#565e6c}@supports (color:color(display-p3 0 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:color(display-p3 .0866362 .104012 .141551);--at-surface-hover:color(display-p3 .119527 .140938 .187194);--at-muted:color(display-p3 .10291 .122282 .164135);--at-code:color(display-p3 .112011 .131618 .173879);--at-text-primary:color(display-p3 .880198 .897517 .925177);--at-text-secondary:color(display-p3 .618009 .647763 .695453);--at-text-muted:color(display-p3 .454817 .481202 .527256);--at-border:color(display-p3 .187231 .209329 .256415);--at-border-light:color(display-p3 .14159 .16023 .200008);--at-shadow:color(display-p3 0 0 0/.45);--at-accent:color(display-p3 .445537 .644287 .978823);--at-error-bg:color(display-p3 .422373 .197971 .171651/.25);--at-error-text:color(display-p3 .938127 .52257 .468553);--at-error-border:color(display-p3 .751519 .297873 .256966);--at-ok-bg:color(display-p3 .287508 .467968 .304198/.2);--at-ok-text:color(display-p3 .538207 .838899 .565385);--at-ok-border:color(display-p3 .319936 .612208 .354223);--at-highlight-bg:color(display-p3 .708898 .646062 .385093/.12);--at-selected-bg:color(display-p3 .407909 .526271 .742584/.18);--at-scrollbar-thumb:color(display-p3 .241934 .260441 .299404);--at-scrollbar-thumb-hover:color(display-p3 .342885 .367416 .419047)}}@supports (color:lab(0% 0 0)){:host([data-theme=system]),:root[data-theme=system]{--at-surface:lab(9.40435% -.26536 -8.00193);--at-surface-hover:lab(14.0233% -.313595 -9.45683);--at-muted:lab(11.7138% -.289485 -8.72938);--at-code:lab(12.8756% -.320837 -8.73908);--at-text-primary:lab(90.6923% -.891328 -4.41389);--at-text-secondary:lab(67.4629% -1.51783 -8.03232);--at-text-muted:lab(51.2096% -1.21292 -8.07107);--at-border:lab(22.1597% -.497714 -9.15806);--at-border-light:lab(16.373% -.418156 -8.05204);--at-shadow:lab(0% 0 0/.45);--at-accent:lab(66.6499% -1.4444 -52.3046);--at-error-bg:lab(29.4384% 31.1218 19.7271/.25);--at-error-text:lab(68.3188% 49.5998 30.86);--at-error-border:lab(49.5145% 56.3761 37.3383);--at-ok-bg:lab(45.5916% -30.0637 19.6786/.2);--at-ok-text:lab(78.7102% -45.0683 29.4705);--at-ok-border:lab(57.7987% -45.4011 30.0617);--at-highlight-bg:lab(67.9375% .259876 42.1122/.12);--at-selected-bg:lab(55.3782% -1.45972 -35.4324/.18);--at-scrollbar-thumb:lab(27.992% -.544697 -7.38333);--at-scrollbar-thumb-hover:lab(39.5702% -.685155 -9.23098)}}}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--at-scrollbar-thumb,#d4d4d8);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--at-scrollbar-thumb-hover,#a1a1aa)}.waterfall-row:hover .waterfall-bar{filter:brightness(1.1)}.waterfall-bar{transition:all .15s ease-out}.trace-list-container{container-type:inline-size}.trace-grid{grid-template-columns:20px 104px minmax(0,1fr) 84px 52px 88px 60px 16px;align-items:center;gap:.75rem;display:grid}@container (width<=640px){.trace-grid{grid-template-columns:20px 92px minmax(0,1fr) 80px 58px 16px}.trace-col-spans,.trace-col-time{display:none}}@keyframes at-modal-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes at-fade-in{0%{opacity:0}to{opacity:1}}.at-modal-in{animation:.17s cubic-bezier(.22,1,.36,1) at-modal-in}.at-backdrop-in{animation:.17s ease-out at-fade-in}.at-wrap-anywhere{overflow-wrap:anywhere;word-break:normal}.at-no-scrollbar{scrollbar-width:none}.at-no-scrollbar::-webkit-scrollbar{display:none}@media (prefers-reduced-motion:reduce){.at-modal-in,.at-backdrop-in{animation:none}}.at-edge-label{paint-order:stroke;stroke:var(--color-surface);stroke-width:3px;stroke-linejoin:round}:where(a,button,[role=button],input,select,textarea,summary,[tabindex]:not([tabindex="-1"])):focus-visible{outline:2px solid var(--at-accent);outline-offset:2px}:where([data-focus-inset]):focus-visible{outline-offset:-2px}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,rU=class extends HTMLElement{constructor(...e){super(...e),x(this,`cleanup`,null)}connectedCallback(){let e=this.attachShadow({mode:`open`}),t=document.createElement(`link`);t.rel=`stylesheet`,t.href=`https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap`,e.appendChild(t);let n=document.createElement(`style`);n.textContent=nU,e.appendChild(n);let r=this.getAttribute(`mode`)||`widget`,i=this.getAttribute(`ws-url`)||this.deriveWsUrl();this.cleanup=tU(e,{mode:r,wsUrl:i})}disconnectedCallback(){this.cleanup?.(),this.cleanup=null}deriveWsUrl(){return`ws://${location.host}/ws`}};x(rU,`observedAttributes`,[`mode`,`ws-url`]);function iU(){customElements.get(`autotel-devtools`)||customElements.define(`autotel-devtools`,rU)}var aU=document.currentScript;function oU(){let e=ed(location.hash);return Object.keys(e).length>0?e:void 0}function sU(){let e=oU();if(!aU?.src)return{mode:`widget`,wsUrl:`ws://${location.host}/ws`,deepLink:e};let t=new URL(aU.src),n=t.searchParams;return{mode:n.get(`mode`)||`widget`,wsUrl:n.get(`ws`)||`ws://${t.host}/ws`,deepLink:e}}function cU(){if(iU(),document.querySelector(`autotel-devtools`))return;let{mode:e,wsUrl:t,deepLink:n}=sU(),r=document.createElement(`div`);r.id=`autotel-devtools-root`,document.body.appendChild(r);let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`);a.textContent=nU,i.appendChild(a),tU(i,{mode:e,wsUrl:t,deepLink:n})}return document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,cU):cU(),e.mountWidget=tU,e.registerElement=iU,e})({});