copilot-usage-studio 0.2.0 → 0.2.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.
- package/CHANGELOG.md +30 -2
- package/README.md +46 -13
- package/data/github-copilot-pricing.json +34 -6
- package/dist/copilot-usage-studio/browser/chunk-23NLHIOR.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-5JYQJM5G.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-7I2HDBC6.js +1 -0
- package/dist/copilot-usage-studio/browser/{chunk-TVSYR63W.js → chunk-OS2XPCVW.js} +2 -2
- package/dist/copilot-usage-studio/browser/{chunk-J47KKACI.js → chunk-QMNOUQ2X.js} +1 -1
- package/dist/copilot-usage-studio/browser/{chunk-NXH37FKU.js → chunk-RTOXDOOI.js} +1 -1
- package/dist/copilot-usage-studio/browser/chunk-TICIZRSM.js +1 -0
- package/dist/copilot-usage-studio/browser/chunk-WOIYAEKB.js +4 -0
- package/dist/copilot-usage-studio/browser/{chunk-QQOFM3HF.js → chunk-WWU6QMJC.js} +1 -1
- package/dist/copilot-usage-studio/browser/chunk-XMVGLQQH.js +1 -0
- package/dist/copilot-usage-studio/browser/index.html +2 -2
- package/dist/copilot-usage-studio/browser/main-XFPP45VE.js +1 -0
- package/dist/copilot-usage-studio/browser/styles-7RDDQXQV.css +1 -0
- package/docs/local-deployment.md +92 -17
- package/docs/pricing.md +5 -3
- package/docs/scanner-api.md +40 -0
- package/lib/cli.mjs +15 -1
- package/lib/local-runtime.mjs +499 -19
- package/lib/scanner-worker.mjs +25 -0
- package/package.json +20 -2
- package/scripts/pricing-utils.mjs +5 -0
- package/scripts/scan-vscode-sessions.mjs +387 -1475
- package/scripts/scanner-customization-evidence.mjs +613 -0
- package/scripts/scanner-customization-inventory.mjs +1022 -0
- package/scripts/scanner-memory.mjs +229 -0
- package/scripts/scanner-session-parser.mjs +1237 -0
- package/scripts/scanner-traversal.mjs +203 -0
- package/scripts/scanner-workspace.mjs +237 -0
- package/dist/copilot-usage-studio/browser/chunk-CUKTUQ6W.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-EYAHOEVS.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-FXNLFSUB.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-HJNYITFH.js +0 -1
- package/dist/copilot-usage-studio/browser/chunk-KDAJN6DF.js +0 -4
- package/dist/copilot-usage-studio/browser/main-TL27ZSEQ.js +0 -1
- package/dist/copilot-usage-studio/browser/styles-GZOQ5QIH.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as wo,b as yo,c as Vt,d as ut,e as So}from"./chunk-OS2XPCVW.js";import{b as To,i as Eo,j as Ce,k as $n,l as $t,m as jt,n as ko,o as Ro,r as we,s as Io,t as Do,u as Bt}from"./chunk-TICIZRSM.js";import{$ as At,$a as M,A as Me,Aa as Ue,B as It,Ba as Pe,C as _e,Ca as x,D as G,Da as v,E as Ki,Ea as dt,F as H,Fa as z,G as Yi,Ga as U,H as oe,Ha as P,I as W,Ia as s,J as T,Ja as a,K as Qi,Ka as R,L as Ji,La as F,M as Ne,Ma as A,N as me,Na as ho,O as w,Oa as D,P as y,Pa as Vn,Q as Dn,Qa as S,R as le,Ra as zt,S as lt,Sa as g,T as Zi,Ta as Te,U as j,Ua as V,V as Dt,Va as l,W as An,Wa as f,X as Ln,Xa as b,Y as Xi,Ya as $,Z as N,Za as Ye,_a as h,a as O,aa as Lt,ab as k,b as Q,ba as Nn,bb as fo,c as Ui,ca as eo,cb as Ve,d as Vi,da as to,db as q,e as $i,ea as Fn,eb as _o,f as We,fa as no,fb as Co,g as pe,ga as Nt,gb as xo,h as ue,ha as zn,hb as pt,i as ge,ia as Ft,ib as vo,j as L,ja as io,jb as bo,k as ji,ka as c,l as En,la as ct,lb as Ut,m as Bi,ma as oo,mb as Oe,n as ae,na as ro,nb as Ie,o as Hi,oa as ao,ob as ee,p as ke,pa as so,pb as Mo,q as qi,qa as lo,qb as Po,r as Rt,ra as Un,rb as Oo,s as Ge,sa as J,sb as ye,t as kn,ta as co,tb as Ao,u as Rn,ua as Fe,ub as Lo,v as Ke,va as po,vb as No,w as Wi,wa as uo,wb as Fo,x as Re,xa as go,xb as zo,y as In,ya as mo,yb as Uo,z as Gi,za as ze,zb as Vo}from"./chunk-WOIYAEKB.js";var gt=class{_doc;constructor(t){this._doc=t}manager},Ht=(()=>{class n extends gt{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,o,r){return e.addEventListener(i,o,r),()=>this.removeEventListener(e,i,o,r)}removeEventListener(e,i,o,r){return e.removeEventListener(i,o,r)}static \u0275fac=function(i){return new(i||n)(W(le))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),Gt=new oe(""),qn=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(d=>{d.manager=this});let o=e.filter(d=>!(d instanceof Ht));this._plugins=o.slice().reverse();let r=e.find(d=>d instanceof Ht);r&&this._plugins.push(r)}addEventListener(e,i,o,r){return this._findPluginFor(i).addEventListener(e,i,o,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(r=>r.supports(e)),!i)throw new G(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(W(Gt),W(Dt))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),jn="ng-app-id";function $o(n){for(let t of n)t.remove()}function jo(n,t){let e=t.createElement("style");return e.textContent=n,e}function oa(n,t,e,i){let o=n.head?.querySelectorAll(`style[${jn}="${t}"],link[${jn}="${t}"]`);if(o)for(let r of o)r.removeAttribute(jn),r instanceof HTMLLinkElement?i.set(r.href.slice(r.href.lastIndexOf("/")+1),{usage:0,elements:[r]}):r.textContent&&e.set(r.textContent,{usage:0,elements:[r]})}function Hn(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Wn=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,o,r={}){this.doc=e,this.appId=i,this.nonce=o,oa(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let o of e)this.addUsage(o,this.inline,jo);i?.forEach(o=>this.addUsage(o,this.external,Hn))}removeStyles(e,i){for(let o of e)this.removeUsage(o,this.inline);i?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,i,o){let r=i.get(e);r?r.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(d=>this.addElement(d,o(e,this.doc)))})}removeUsage(e,i){let o=i.get(e);o&&(o.usage--,o.usage<=0&&($o(o.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])$o(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:o}]of this.inline)o.push(this.addElement(e,jo(i,this.doc)));for(let[i,{elements:o}]of this.external)o.push(this.addElement(e,Hn(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||n)(W(le),W(Fn),W(zn,8),W(Nt))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),Bn={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Gn=/%COMP%/g;var Ho="%COMP%",ra=`_nghost-${Ho}`,aa=`_ngcontent-${Ho}`,sa=!0,la=new oe("",{factory:()=>sa});function ca(n){return aa.replace(Gn,n)}function da(n){return ra.replace(Gn,n)}function qo(n,t){return t.map(e=>e.replace(Gn,n))}var Kn=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,i,o,r,d,p,u=null,m=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=d,this.ngZone=p,this.nonce=u,this.tracingService=m,this.defaultRenderer=new mt(e,d,p,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,i);return o instanceof Wt?o.applyToHost(e):o instanceof ht&&o.applyStyles(),o}getOrCreateRenderer(e,i){let o=this.rendererByCompId,r=o.get(i.id);if(!r){let d=this.doc,p=this.ngZone,u=this.eventManager,m=this.sharedStylesHost,_=this.removeStylesOnCompDestroy,C=this.tracingService;switch(i.encapsulation){case Ft.Emulated:r=new Wt(u,m,i,this.appId,_,d,p,C);break;case Ft.ShadowDom:return new qt(u,e,i,d,p,this.nonce,C,m);case Ft.ExperimentalIsolatedShadowDom:return new qt(u,e,i,d,p,this.nonce,C);default:r=new ht(u,m,i,_,d,p,C);break}o.set(i.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||n)(W(qn),W(Wn),W(Fn),W(la),W(le),W(Dt),W(zn),W(ro,8))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),mt=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,i,o){this.eventManager=t,this.doc=e,this.ngZone=i,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Bn[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Bo(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Bo(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new G(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,o){if(o){e=o+":"+e;let r=Bn[o];r?t.setAttributeNS(r,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let o=Bn[i];o?t.removeAttributeNS(o,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,o){o&(ct.DashCase|ct.Important)?t.style.setProperty(e,i,o&ct.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&ct.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i,o){if(typeof t=="string"&&(t=pt().getGlobalEventTarget(this.doc,t),!t))throw new G(5102,!1);let r=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(r=this.tracingService.wrapEventListener(t,e,r)),this.eventManager.addEventListener(t,e,r,o)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function Bo(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var qt=class extends mt{hostEl;sharedStylesHost;shadowRoot;constructor(t,e,i,o,r,d,p,u){super(t,o,r,p),this.hostEl=e,this.sharedStylesHost=u,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let m=i.styles;m=qo(i.id,m);for(let C of m){let E=document.createElement("style");d&&E.setAttribute("nonce",d),E.textContent=C,this.shadowRoot.appendChild(E)}let _=i.getExternalStyles?.();if(_)for(let C of _){let E=Hn(C,o);d&&E.setAttribute("nonce",d),this.shadowRoot.appendChild(E)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},ht=class extends mt{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,o,r,d,p,u){super(t,r,d,p),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let m=i.styles;this.styles=u?qo(u,m):m,this.styleUrls=i.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&oo.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Wt=class extends ht{contentAttr;hostAttr;constructor(t,e,i,o,r,d,p,u){let m=o+"-"+i.id;super(t,e,i,r,d,p,u,m),this.contentAttr=ca(m),this.hostAttr=da(m)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}};var Kt=class n extends bo{supportsDOMEvents=!0;static makeCurrent(){vo(new n)}onAndCancel(t,e,i,o){return t.addEventListener(e,i,o),()=>{t.removeEventListener(e,i,o)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=ga();return e==null?null:ma(e)}resetBaseElement(){ft=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Mo(document.cookie,t)}},ft=null;function ga(){return ft=ft||document.head.querySelector("base"),ft?ft.getAttribute("href"):null}function ma(n){return new URL(n,document.baseURI).pathname}var ha=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})(),Wo=["alt","control","meta","shift"],fa={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},_a={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},Go=(()=>{class n extends gt{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,o,r){let d=n.parseEventName(i),p=n.eventCallback(d.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>pt().onAndCancel(e,d.domEventName,p,r))}static parseEventName(e){let i=e.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let r=n._normalizeKey(i.pop()),d="",p=i.indexOf("code");if(p>-1&&(i.splice(p,1),d="code."),Wo.forEach(m=>{let _=i.indexOf(m);_>-1&&(i.splice(_,1),d+=m+".")}),d+=r,i.length!=0||r.length===0)return null;let u={};return u.domEventName=o,u.fullKey=d,u}static matchEventFullKeyCode(e,i){let o=fa[e.key]||e.key,r="";return i.indexOf("code.")>-1&&(o=e.code,r="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Wo.forEach(d=>{if(d!==o){let p=_a[d];p(e)&&(r+=d+".")}}),r+=o,r===i)}static eventCallback(e,i,o){return r=>{n.matchEventFullKeyCode(r,e)&&o.runGuarded(()=>i(r))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||n)(W(le))};static \u0275prov=H({token:n,factory:n.\u0275fac})}return n})();async function Yn(n,t,e){let i=O({rootComponent:n},Ca(t,e));return xo(i)}function Ca(n,t){return{platformRef:t?.platformRef,appProviders:[...Pa,...n?.providers??[]],platformProviders:Ma}}function xa(){Kt.makeCurrent()}function va(){return new An}function ba(){return to(document),document}var Ma=[{provide:Nt,useValue:Oo},{provide:no,useValue:xa,multi:!0},{provide:le,useFactory:ba}];var Pa=[{provide:Ji,useValue:"root"},{provide:An,useFactory:va},{provide:Gt,useClass:Ht,multi:!0},{provide:Gt,useClass:Go,multi:!0},Kn,Wn,qn,{provide:ao,useExisting:Kn},{provide:Po,useClass:ha},[]];var Ko=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(i){return new(i||n)(W(le))};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var I="primary",Tt=Symbol("RouteTitle"),ei=class{params;constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Xe(n){return new ei(n)}function Qn(n,t,e){for(let i=0;i<n.length;i++){let o=n[i],r=t[i];if(o[0]===":")e[o.substring(1)]=r;else if(o!==r.path)return!1}return!0}function ya(n,t,e){let i=e.path.split("/"),o=i.indexOf("**");if(o===-1){if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.length<n.length))return null;let u={},m=n.slice(0,i.length);return Qn(i,m,u)?{consumed:m,posParams:u}:null}if(o!==i.lastIndexOf("**"))return null;let r=i.slice(0,o),d=i.slice(o+1);if(r.length+d.length>n.length||e.pathMatch==="full"&&t.hasChildren()&&e.path!=="**")return null;let p={};return!Qn(r,n.slice(0,r.length),p)||!Qn(d,n.slice(n.length-d.length),p)?null:{consumed:n,posParams:p}}function en(n){return new Promise((t,e)=>{n.pipe(Re()).subscribe({next:i=>t(i),error:i=>e(i)})})}function Sa(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!Se(n[e],t[e]))return!1;return!0}function Se(n,t){let e=n?ti(n):void 0,i=t?ti(t):void 0;if(!e||!i||e.length!=i.length)return!1;let o;for(let r=0;r<e.length;r++)if(o=e[r],!nr(n[o],t[o]))return!1;return!0}function ti(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function nr(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),i=[...t].sort();return e.every((o,r)=>i[r]===o)}else return n===t}function Ta(n){return n.length>0?n[n.length-1]:null}function qe(n){return En(n)?n:uo(n)?ge(Promise.resolve(n)):L(n)}function ir(n){return En(n)?en(n):Promise.resolve(n)}var Ea={exact:ar,subset:sr},or={exact:ka,subset:Ra,ignored:()=>!0},rr={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ni={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function Yo(n,t,e){return Ea[e.paths](n.root,t.root,e.matrixParams)&&or[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function ka(n,t){return Se(n,t)}function ar(n,t,e){if(!je(n.segments,t.segments)||!Jt(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!ar(n.children[i],t.children[i],e))return!1;return!0}function Ra(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>nr(n[e],t[e]))}function sr(n,t,e){return lr(n,t,t.segments,e)}function lr(n,t,e,i){if(n.segments.length>e.length){let o=n.segments.slice(0,e.length);return!(!je(o,e)||t.hasChildren()||!Jt(o,e,i))}else if(n.segments.length===e.length){if(!je(n.segments,e)||!Jt(n.segments,e,i))return!1;for(let o in t.children)if(!n.children[o]||!sr(n.children[o],t.children[o],i))return!1;return!0}else{let o=e.slice(0,n.segments.length),r=e.slice(n.segments.length);return!je(n.segments,o)||!Jt(n.segments,o,i)||!n.children[I]?!1:lr(n.children[I],t,r,i)}}function Jt(n,t,e){return t.every((i,o)=>or[e](n[o].parameters,i.parameters))}var be=class{root;queryParams;fragment;_queryParamMap;constructor(t=new B([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Xe(this.queryParams),this._queryParamMap}toString(){return Aa.serialize(this)}},B=class{segments;children;parent=null;constructor(t,e){this.segments=t,this.children=e,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Zt(this)}},$e=class{path;parameters;_parameterMap;constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Xe(this.parameters),this._parameterMap}toString(){return dr(this)}};function Ia(n,t){return je(n,t)&&n.every((e,i)=>Se(e.parameters,t[i].parameters))}function je(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function Da(n,t){let e=[];return Object.entries(n.children).forEach(([i,o])=>{i===I&&(e=e.concat(t(o,i)))}),Object.entries(n.children).forEach(([i,o])=>{i!==I&&(e=e.concat(t(o,i)))}),e}var pn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:()=>new Be,providedIn:"root"})}return n})(),Be=class{parse(t){let e=new oi(t);return new be(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${_t(t.root,!0)}`,i=Fa(t.queryParams),o=typeof t.fragment=="string"?`#${La(t.fragment)}`:"";return`${e}${i}${o}`}},Aa=new Be;function Zt(n){return n.segments.map(t=>dr(t)).join("/")}function _t(n,t){if(!n.hasChildren())return Zt(n);if(t){let e=n.children[I]?_t(n.children[I],!1):"",i=[];return Object.entries(n.children).forEach(([o,r])=>{o!==I&&i.push(`${o}:${_t(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=Da(n,(i,o)=>o===I?[_t(n.children[I],!1)]:[`${o}:${_t(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[I]!=null?`${Zt(n)}/${e[0]}`:`${Zt(n)}/(${e.join("//")})`}}function cr(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Yt(n){return cr(n).replace(/%3B/gi,";")}function La(n){return encodeURI(n)}function ii(n){return cr(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Xt(n){return decodeURIComponent(n)}function Qo(n){return Xt(n.replace(/\+/g,"%20"))}function dr(n){return`${ii(n.path)}${Na(n.parameters)}`}function Na(n){return Object.entries(n).map(([t,e])=>`;${ii(t)}=${ii(e)}`).join("")}function Fa(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(o=>`${Yt(e)}=${Yt(o)}`).join("&"):`${Yt(e)}=${Yt(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var za=/^[^\/()?;#]+/;function Jn(n){let t=n.match(za);return t?t[0]:""}var Ua=/^[^\/()?;=#]+/;function Va(n){let t=n.match(Ua);return t?t[0]:""}var $a=/^[^=?&#]+/;function ja(n){let t=n.match($a);return t?t[0]:""}var Ba=/^[^&#]+/;function Ha(n){let t=n.match(Ba);return t?t[0]:""}var oi=class{url;remaining;constructor(t){this.url=t,this.remaining=t}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new B([],{}):new B([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(t=0){if(t>50)throw new G(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0,t));let o={};return this.peekStartsWith("(")&&(o=this.parseParens(!1,t)),(e.length>0||Object.keys(i).length>0)&&(o[I]=new B(e,i)),o}parseSegment(){let t=Jn(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new G(4009,!1);return this.capture(t),new $e(Xt(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=Va(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=Jn(this.remaining);o&&(i=o,this.capture(i))}t[Xt(e)]=Xt(i)}parseQueryParam(t){let e=ja(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let d=Ha(this.remaining);d&&(i=d,this.capture(i))}let o=Qo(e),r=Qo(i);if(t.hasOwnProperty(o)){let d=t[o];Array.isArray(d)||(d=[d],t[o]=d),d.push(r)}else t[o]=r}parseParens(t,e){let i={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let o=Jn(this.remaining),r=this.remaining[o.length];if(r!=="/"&&r!==")"&&r!==";")throw new G(4010,!1);let d;o.indexOf(":")>-1?(d=o.slice(0,o.indexOf(":")),this.capture(d),this.capture(":")):t&&(d=I);let p=this.parseChildren(e+1);i[d??I]=Object.keys(p).length===1&&p[I]?p[I]:new B([],p),this.consumeOptional("//")}return i}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new G(4011,!1)}};function pr(n){return n.segments.length>0?new B([],{[I]:n}):n}function ur(n){let t={};for(let[i,o]of Object.entries(n.children)){let r=ur(o);if(i===I&&r.segments.length===0&&r.hasChildren())for(let[d,p]of Object.entries(r.children))t[d]=p;else(r.segments.length>0||r.hasChildren())&&(t[i]=r)}let e=new B(n.segments,t);return qa(e)}function qa(n){if(n.numberOfChildren===1&&n.children[I]){let t=n.children[I];return new B(n.segments.concat(t.segments),t.children)}return n}function et(n){return n instanceof be}function Wa(n,t,e=null,i=null,o=new Be){let r=gr(n);return mr(r,t,e,i,o)}function gr(n){let t;function e(r){let d={};for(let u of r.children){let m=e(u);d[u.outlet]=m}let p=new B(r.url,d);return r===n&&(t=p),p}let i=e(n.root),o=pr(i);return t??o}function mr(n,t,e,i,o){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return Zn(r,r,r,e,i,o);let d=Ga(t);if(d.toRoot())return Zn(r,r,new B([],{}),e,i,o);let p=Ka(d,r,n),u=p.processChildren?xt(p.segmentGroup,p.index,d.commands):fr(p.segmentGroup,p.index,d.commands);return Zn(r,p.segmentGroup,u,e,i,o)}function tn(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Mt(n){return typeof n=="object"&&n!=null&&n.outlets}function Jo(n,t,e){n||="\u0275";let i=new be;return i.queryParams={[n]:t},e.parse(e.serialize(i)).queryParams[n]}function Zn(n,t,e,i,o,r){let d={};for(let[m,_]of Object.entries(i??{}))d[m]=Array.isArray(_)?_.map(C=>Jo(m,C,r)):Jo(m,_,r);let p;n===t?p=e:p=hr(n,t,e);let u=pr(ur(p));return new be(u,d,o)}function hr(n,t,e){let i={};return Object.entries(n.children).forEach(([o,r])=>{r===t?i[o]=e:i[o]=hr(r,t,e)}),new B(n.segments,i)}var nn=class{isAbsolute;numberOfDoubleDots;commands;constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&tn(i[0]))throw new G(4003,!1);let o=i.find(Mt);if(o&&o!==Ta(i))throw new G(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Ga(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new nn(!0,0,n);let t=0,e=!1,i=n.reduce((o,r,d)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let p={};return Object.entries(r.outlets).forEach(([u,m])=>{p[u]=typeof m=="string"?m.split("/"):m}),[...o,{outlets:p}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:d===0?(r.split("/").forEach((p,u)=>{u==0&&p==="."||(u==0&&p===""?e=!0:p===".."?t++:p!=""&&o.push(p))}),o):[...o,r]},[]);return new nn(e,t,i)}var Je=class{segmentGroup;processChildren;index;constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function Ka(n,t,e){if(n.isAbsolute)return new Je(t,!0,0);if(!e)return new Je(t,!1,NaN);if(e.parent===null)return new Je(e,!0,0);let i=tn(n.commands[0])?0:1,o=e.segments.length-1+i;return Ya(e,o,n.numberOfDoubleDots)}function Ya(n,t,e){let i=n,o=t,r=e;for(;r>o;){if(r-=o,i=i.parent,!i)throw new G(4005,!1);o=i.segments.length}return new Je(i,!1,o-r)}function Qa(n){return Mt(n[0])?n[0].outlets:{[I]:n}}function fr(n,t,e){if(n??=new B([],{}),n.segments.length===0&&n.hasChildren())return xt(n,t,e);let i=Ja(n,t,e),o=e.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){let r=new B(n.segments.slice(0,i.pathIndex),{});return r.children[I]=new B(n.segments.slice(i.pathIndex),n.children),xt(r,0,o)}else return i.match&&o.length===0?new B(n.segments,{}):i.match&&!n.hasChildren()?ri(n,t,e):i.match?xt(n,0,o):ri(n,t,e)}function xt(n,t,e){if(e.length===0)return new B(n.segments,{});{let i=Qa(e),o={};if(Object.keys(i).some(r=>r!==I)&&n.children[I]&&n.numberOfChildren===1&&n.children[I].segments.length===0){let r=xt(n.children[I],t,e);return new B(n.segments,r.children)}return Object.entries(i).forEach(([r,d])=>{typeof d=="string"&&(d=[d]),d!==null&&(o[r]=fr(n.children[r],t,d))}),Object.entries(n.children).forEach(([r,d])=>{i[r]===void 0&&(o[r]=d)}),new B(n.segments,o)}}function Ja(n,t,e){let i=0,o=t,r={match:!1,pathIndex:0,commandIndex:0};for(;o<n.segments.length;){if(i>=e.length)return r;let d=n.segments[o],p=e[i];if(Mt(p))break;let u=`${p}`,m=i<e.length-1?e[i+1]:null;if(o>0&&u===void 0)break;if(u&&m&&typeof m=="object"&&m.outlets===void 0){if(!Xo(u,m,d))return r;i+=2}else{if(!Xo(u,{},d))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}function ri(n,t,e){let i=n.segments.slice(0,t),o=0;for(;o<e.length;){let r=e[o];if(Mt(r)){let u=Za(r.outlets);return new B(i,u)}if(o===0&&tn(e[0])){let u=n.segments[t];i.push(new $e(u.path,Zo(e[0]))),o++;continue}let d=Mt(r)?r.outlets[I]:`${r}`,p=o<e.length-1?e[o+1]:null;d&&p&&tn(p)?(i.push(new $e(d,Zo(p))),o+=2):(i.push(new $e(d,{})),o++)}return new B(i,{})}function Za(n){let t={};return Object.entries(n).forEach(([e,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=ri(new B([],{}),0,i))}),t}function Zo(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function Xo(n,t,e){return n==e.path&&Se(t,e.parameters)}var vt="imperative",re=(function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n})(re||{}),he=class{id;url;constructor(t,e){this.id=t,this.url=e}},tt=class extends he{type=re.NavigationStart;navigationTrigger;restoredState;constructor(t,e,i="imperative",o=null){super(t,e),this.navigationTrigger=i,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},De=class extends he{urlAfterRedirects;type=re.NavigationEnd;constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},se=(function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n[n.Aborted=4]="Aborted",n})(se||{}),on=(function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n})(on||{}),xe=class extends he{reason;code;type=re.NavigationCancel;constructor(t,e,i,o){super(t,e),this.reason=i,this.code=o}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function _r(n){return n instanceof xe&&(n.code===se.Redirect||n.code===se.SupersededByNewNavigation)}var Ae=class extends he{reason;code;type=re.NavigationSkipped;constructor(t,e,i,o){super(t,e),this.reason=i,this.code=o}},nt=class extends he{error;target;type=re.NavigationError;constructor(t,e,i,o){super(t,e),this.error=i,this.target=o}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},rn=class extends he{urlAfterRedirects;state;type=re.RoutesRecognized;constructor(t,e,i,o){super(t,e),this.urlAfterRedirects=i,this.state=o}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ai=class extends he{urlAfterRedirects;state;type=re.GuardsCheckStart;constructor(t,e,i,o){super(t,e),this.urlAfterRedirects=i,this.state=o}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},si=class extends he{urlAfterRedirects;state;shouldActivate;type=re.GuardsCheckEnd;constructor(t,e,i,o,r){super(t,e),this.urlAfterRedirects=i,this.state=o,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},li=class extends he{urlAfterRedirects;state;type=re.ResolveStart;constructor(t,e,i,o){super(t,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ci=class extends he{urlAfterRedirects;state;type=re.ResolveEnd;constructor(t,e,i,o){super(t,e),this.urlAfterRedirects=i,this.state=o}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},di=class{route;type=re.RouteConfigLoadStart;constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},pi=class{route;type=re.RouteConfigLoadEnd;constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ui=class{snapshot;type=re.ChildActivationStart;constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},gi=class{snapshot;type=re.ChildActivationEnd;constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},mi=class{snapshot;type=re.ActivationStart;constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},hi=class{snapshot;type=re.ActivationEnd;constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var it=class{},Pt=class{},ot=class{url;navigationBehaviorOptions;constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function Xa(n){return!(n instanceof it)&&!(n instanceof ot)&&!(n instanceof Pt)}var fi=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(t){this.rootInjector=t,this.children=new Et(this.rootInjector)}},Et=(()=>{class n{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,i){let o=this.getOrCreateContext(e);o.outlet=i,this.contexts.set(e,o)}onChildOutletDestroyed(e){let i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new fi(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(i){return new(i||n)(W(Ne))};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),an=class{_root;constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=_i(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=_i(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Ci(t,this._root);return e.length<2?[]:e[e.length-2].children.map(o=>o.value).filter(o=>o!==t)}pathFromRoot(t){return Ci(t,this._root).map(e=>e.value)}};function _i(n,t){if(n===t.value)return t;for(let e of t.children){let i=_i(n,e);if(i)return i}return null}function Ci(n,t){if(n===t.value)return[t];for(let e of t.children){let i=Ci(n,e);if(i.length)return i.unshift(t),i}return[]}var de=class{value;children;constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Qe(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var sn=class extends an{snapshot;constructor(t,e){super(t),this.snapshot=e,Ti(this,t)}toString(){return this.snapshot.toString()}};function Cr(n,t){let e=es(n,t),i=new pe([new $e("",{})]),o=new pe({}),r=new pe({}),d=new pe({}),p=new pe(""),u=new He(i,o,d,p,r,I,n,e.root);return u.snapshot=e.root,new sn(new de(u,[]),e)}function es(n,t){let e={},i={},o={},d=new Ot([],e,o,"",i,I,n,null,{},t);return new ln("",new de(d,[]))}var He=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(t,e,i,o,r,d,p,u){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=o,this.dataSubject=r,this.outlet=d,this.component=p,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(ae(m=>m[Tt]))??L(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=o,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(ae(t=>Xe(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(ae(t=>Xe(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Si(n,t,e="emptyOnly"){let i,{routeConfig:o}=n;return t!==null&&(e==="always"||o?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:O(O({},t.params),n.params),data:O(O({},t.data),n.data),resolve:O(O(O(O({},n.data),t.data),o?.data),n._resolvedData)}:i={params:O({},n.params),data:O({},n.data),resolve:O(O({},n.data),n._resolvedData??{})},o&&vr(o)&&(i.resolve[Tt]=o.title),i}var Ot=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[Tt]}constructor(t,e,i,o,r,d,p,u,m,_){this.url=t,this.params=e,this.queryParams=i,this.fragment=o,this.data=r,this.outlet=d,this.component=p,this.routeConfig=u,this._resolve=m,this._environmentInjector=_}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Xe(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Xe(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},ln=class extends an{url;constructor(t,e){super(e),this.url=t,Ti(this,e)}toString(){return xr(this._root)}};function Ti(n,t){t.value._routerState=n,t.children.forEach(e=>Ti(n,e))}function xr(n){let t=n.children.length>0?` { ${n.children.map(xr).join(", ")} } `:"";return`${n.value}${t}`}function Xn(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Se(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),Se(t.params,e.params)||n.paramsSubject.next(e.params),Sa(t.url,e.url)||n.urlSubject.next(e.url),Se(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function xi(n,t){let e=Se(n.params,t.params)&&Ia(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||xi(n.parent,t.parent))}function vr(n){return typeof n.title=="string"||n.title===null}var ts=new oe(""),br=(()=>{class n{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=I;activateEvents=new j;deactivateEvents=new j;attachEvents=new j;detachEvents=new j;routerOutletData=_o();parentContexts=T(Et);location=T(so);changeDetector=T(Co);inputBinder=T(un,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:o}=e.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new G(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new G(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new G(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new G(4013,!1);this._activatedRoute=e;let o=this.location,d=e.snapshot.component,p=this.parentContexts.getOrCreateContext(this.name).children,u=new vi(e,p,o.injector,this.routerOutletData);this.activated=o.createComponent(d,{index:o.length,injector:u,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=co({type:n,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Lt]})}return n})(),vi=class{route;childContexts;parent;outletData;constructor(t,e,i,o){this.route=t,this.childContexts=e,this.parent=i,this.outletData=o}get(t,e){return t===He?this.route:t===Et?this.childContexts:t===ts?this.outletData:this.parent.get(t,e)}},un=new oe("");var Mr=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=J({type:n,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,o){i&1&&R(0,"router-outlet")},dependencies:[br],encapsulation:2})}return n})();function Ei(n){let t=n.children&&n.children.map(Ei),e=t?Q(O({},n),{children:t}):O({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==I&&(e.component=Mr),e}function ns(n,t,e){let i=wt(n,t._root,e?e._root:void 0);return new sn(i,t)}function wt(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let o=is(n,t,e);return new de(i,o)}else{if(n.shouldAttach(t.value)){let r=n.retrieve(t.value);if(r!==null){let d=r.route;return d.value._futureSnapshot=t.value,d.children=t.children.map(p=>wt(n,p)),d}}let i=os(t.value),o=t.children.map(r=>wt(n,r));return new de(i,o)}}function is(n,t,e){return t.children.map(i=>{for(let o of e.children)if(n.shouldReuseRoute(i.value,o.value.snapshot))return wt(n,i,o);return wt(n,i)})}function os(n){return new He(new pe(n.url),new pe(n.params),new pe(n.queryParams),new pe(n.fragment),new pe(n.data),n.outlet,n.component,n)}var yt=class{redirectTo;navigationBehaviorOptions;constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Pr="ngNavigationCancelingError";function cn(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=et(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,o=Or(!1,se.Redirect);return o.url=e,o.navigationBehaviorOptions=i,o}function Or(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Pr]=!0,e.cancellationCode=t,e}function rs(n){return wr(n)&&et(n.url)}function wr(n){return!!n&&n[Pr]}var bi=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(t,e,i,o,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=o,this.inputBindingEnabled=r}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),Xn(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let o=Qe(e);t.children.forEach(r=>{let d=r.value.outlet;this.deactivateRoutes(r,o[d],i),delete o[d]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,i)})}deactivateRoutes(t,e,i){let o=t.value,r=e?e.value:null;if(o===r)if(o.component){let d=i.getContext(o.outlet);d&&this.deactivateChildRoutes(t,e,d.children)}else this.deactivateChildRoutes(t,e,i);else r&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,r=Qe(t);for(let d of Object.values(r))this.deactivateRouteAndItsChildren(d,o);if(i&&i.outlet){let d=i.outlet.detach(),p=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:d,route:t,contexts:p})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),o=i&&t.value.component?i.children:e,r=Qe(t);for(let d of Object.values(r))this.deactivateRouteAndItsChildren(d,o);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let o=Qe(e);t.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],i),this.forwardEvent(new hi(r.value.snapshot))}),t.children.length&&this.forwardEvent(new gi(t.value.snapshot))}activateRoutes(t,e,i){let o=t.value,r=e?e.value:null;if(Xn(o),o===r)if(o.component){let d=i.getOrCreateContext(o.outlet);this.activateChildRoutes(t,e,d.children)}else this.activateChildRoutes(t,e,i);else if(o.component){let d=i.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let p=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),d.children.onOutletReAttached(p.contexts),d.attachRef=p.componentRef,d.route=p.route.value,d.outlet&&d.outlet.attach(p.componentRef,p.route.value),Xn(p.route.value),this.activateChildRoutes(t,null,d.children)}else d.attachRef=null,d.route=o,d.outlet&&d.outlet.activateWith(o,d.injector),this.activateChildRoutes(t,null,d.children)}else this.activateChildRoutes(t,null,i)}},dn=class{path;route;constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Ze=class{component;route;constructor(t,e){this.component=t,this.route=e}};function as(n,t,e){let i=n._root,o=t?t._root:null;return Ct(i,o,e,[i.value])}function ss(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function at(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!Yi(n)?n:t.get(n):i}function Ct(n,t,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=Qe(t);return n.children.forEach(d=>{ls(d,r[d.value.outlet],e,i.concat([d.value]),o),delete r[d.value.outlet]}),Object.entries(r).forEach(([d,p])=>bt(p,e.getContext(d),o)),o}function ls(n,t,e,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=n.value,d=t?t.value:null,p=e?e.getContext(n.value.outlet):null;if(d&&r.routeConfig===d.routeConfig){let u=cs(d,r,r.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new dn(i)):(r.data=d.data,r._resolvedData=d._resolvedData),r.component?Ct(n,t,p?p.children:null,i,o):Ct(n,t,e,i,o),u&&p&&p.outlet&&p.outlet.isActivated&&o.canDeactivateChecks.push(new Ze(p.outlet.component,d))}else d&&bt(t,p,o),o.canActivateChecks.push(new dn(i)),r.component?Ct(n,null,p?p.children:null,i,o):Ct(n,null,e,i,o);return o}function cs(n,t,e){if(typeof e=="function")return me(t._environmentInjector,()=>e(n,t));switch(e){case"pathParamsChange":return!je(n.url,t.url);case"pathParamsOrQueryParamsChange":return!je(n.url,t.url)||!Se(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xi(n,t)||!Se(n.queryParams,t.queryParams);default:return!xi(n,t)}}function bt(n,t,e){let i=Qe(n),o=n.value;Object.entries(i).forEach(([r,d])=>{o.component?t?bt(d,t.children.getContext(r),e):bt(d,null,e):bt(d,t,e)}),o.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Ze(t.outlet.component,o)):e.canDeactivateChecks.push(new Ze(null,o)):e.canDeactivateChecks.push(new Ze(null,o))}function kt(n){return typeof n=="function"}function ds(n){return typeof n=="boolean"}function ps(n){return n&&kt(n.canLoad)}function us(n){return n&&kt(n.canActivate)}function gs(n){return n&&kt(n.canActivateChild)}function ms(n){return n&&kt(n.canDeactivate)}function hs(n){return n&&kt(n.canMatch)}function yr(n){return n instanceof Bi||n?.name==="EmptyError"}var Qt=Symbol("INITIAL_VALUE");function rt(){return Me(n=>Hi(n.map(t=>t.pipe(Ke(1),Gi(Qt)))).pipe(ae(t=>{for(let e of t)if(e!==!0){if(e===Qt)return Qt;if(e===!1||fs(e))return e}return!0}),Ge(t=>t!==Qt),Ke(1)))}function fs(n){return et(n)||n instanceof yt}function Sr(n){return n.aborted?L(void 0).pipe(Ke(1)):new $i(t=>{let e=()=>{t.next(),t.complete()};return n.addEventListener("abort",e),()=>n.removeEventListener("abort",e)})}function Tr(n){return It(Sr(n))}function _s(n){return ke(t=>{let{targetSnapshot:e,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:r}}=t;return r.length===0&&o.length===0?L(Q(O({},t),{guardsResult:!0})):Cs(r,e,i).pipe(ke(d=>d&&ds(d)?xs(e,o,n):L(d)),ae(d=>Q(O({},t),{guardsResult:d})))})}function Cs(n,t,e){return ge(n).pipe(ke(i=>Os(i.component,i.route,e,t)),Re(i=>i!==!0,!0))}function xs(n,t,e){return ge(t).pipe(Rn(i=>qi(bs(i.route.parent,e),vs(i.route,e),Ps(n,i.path),Ms(n,i.route))),Re(i=>i!==!0,!0))}function vs(n,t){return n!==null&&t&&t(new mi(n)),L(!0)}function bs(n,t){return n!==null&&t&&t(new ui(n)),L(!0)}function Ms(n,t){let e=t.routeConfig?t.routeConfig.canActivate:null;if(!e||e.length===0)return L(!0);let i=e.map(o=>Rt(()=>{let r=t._environmentInjector,d=at(o,r),p=us(d)?d.canActivate(t,n):me(r,()=>d(t,n));return qe(p).pipe(Re())}));return L(i).pipe(rt())}function Ps(n,t){let e=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(r=>ss(r)).filter(r=>r!==null).map(r=>Rt(()=>{let d=r.guards.map(p=>{let u=r.node._environmentInjector,m=at(p,u),_=gs(m)?m.canActivateChild(e,n):me(u,()=>m(e,n));return qe(_).pipe(Re())});return L(d).pipe(rt())}));return L(o).pipe(rt())}function Os(n,t,e,i){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return L(!0);let r=o.map(d=>{let p=t._environmentInjector,u=at(d,p),m=ms(u)?u.canDeactivate(n,t,e,i):me(p,()=>u(n,t,e,i));return qe(m).pipe(Re())});return L(r).pipe(rt())}function ws(n,t,e,i,o){let r=t.canLoad;if(r===void 0||r.length===0)return L(!0);let d=r.map(p=>{let u=at(p,n),m=ps(u)?u.canLoad(t,e):me(n,()=>u(t,e)),_=qe(m);return o?_.pipe(Tr(o)):_});return L(d).pipe(rt(),Er(i))}function Er(n){return Vi(_e(t=>{if(typeof t!="boolean")throw cn(n,t)}),ae(t=>t===!0))}function ys(n,t,e,i,o,r){let d=t.canMatch;if(!d||d.length===0)return L(!0);let p=d.map(u=>{let m=at(u,n),_=hs(m)?m.canMatch(t,e,o):me(n,()=>m(t,e,o));return qe(_).pipe(Tr(r))});return L(p).pipe(rt(),Er(i))}var Ee=class n extends Error{segmentGroup;constructor(t){super(),this.segmentGroup=t||null,Object.setPrototypeOf(this,n.prototype)}},St=class n extends Error{urlTree;constructor(t){super(),this.urlTree=t,Object.setPrototypeOf(this,n.prototype)}};function Ss(n){throw new G(4e3,!1)}function Ts(n){throw Or(!1,se.GuardRejected)}var Mi=class{urlSerializer;urlTree;constructor(t,e){this.urlSerializer=t,this.urlTree=e}async lineralizeSegments(t,e){let i=[],o=e.root;for(;;){if(i=i.concat(o.segments),o.numberOfChildren===0)return i;if(o.numberOfChildren>1||!o.children[I])throw Ss(`${t.redirectTo}`);o=o.children[I]}}async applyRedirectCommands(t,e,i,o,r){let d=await Es(e,o,r);if(d instanceof be)throw new St(d);let p=this.applyRedirectCreateUrlTree(d,this.urlSerializer.parse(d),t,i);if(d[0]==="/")throw new St(p);return p}applyRedirectCreateUrlTree(t,e,i,o){let r=this.createSegmentGroup(t,e.root,i,o);return new be(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let p=r.substring(1);i[o]=e[p]}else i[o]=r}),i}createSegmentGroup(t,e,i,o){let r=this.createSegments(t,e.segments,i,o),d={};return Object.entries(e.children).forEach(([p,u])=>{d[p]=this.createSegmentGroup(t,u,i,o)}),new B(r,d)}createSegments(t,e,i,o){return e.map(r=>r.path[0]===":"?this.findPosParam(t,r,o):this.findOrReturn(r,i))}findPosParam(t,e,i){let o=i[e.path.substring(1)];if(!o)throw new G(4001,!1);return o}findOrReturn(t,e){let i=0;for(let o of e){if(o.path===t.path)return e.splice(i),o;i++}return t}};function Es(n,t,e){if(typeof n=="string")return Promise.resolve(n);let i=n;return en(qe(me(e,()=>i(t))))}function ks(n,t){return n.providers&&!n._injector&&(n._injector=Un(n.providers,t,`Route: ${n.path}`)),n._injector??t}function ve(n){return n.outlet||I}function Rs(n,t){let e=n.filter(i=>ve(i)===t);return e.push(...n.filter(i=>ve(i)!==t)),e}var Pi={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function kr(n){return{routeConfig:n.routeConfig,url:n.url,params:n.params,queryParams:n.queryParams,fragment:n.fragment,data:n.data,outlet:n.outlet,title:n.title,paramMap:n.paramMap,queryParamMap:n.queryParamMap}}function Is(n,t,e,i,o,r,d){let p=Rr(n,t,e);if(!p.matched)return L(p);let u=kr(r(p));return i=ks(t,i),ys(i,t,e,o,u,d).pipe(ae(m=>m===!0?p:O({},Pi)))}function Rr(n,t,e){if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?O({},Pi):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let o=(t.matcher||ya)(e,n,t);if(!o)return O({},Pi);let r={};Object.entries(o.posParams??{}).forEach(([p,u])=>{r[p]=u.path});let d=o.consumed.length>0?O(O({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:e.slice(o.consumed.length),parameters:d,positionalParamSegments:o.posParams??{}}}function er(n,t,e,i,o){return e.length>0&&Ls(n,e,i,o)?{segmentGroup:new B(t,As(i,new B(e,n.children))),slicedSegments:[]}:e.length===0&&Ns(n,e,i)?{segmentGroup:new B(n.segments,Ds(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new B(n.segments,n.children),slicedSegments:e}}function Ds(n,t,e,i){let o={};for(let r of e)if(gn(n,t,r)&&!i[ve(r)]){let d=new B([],{});o[ve(r)]=d}return O(O({},i),o)}function As(n,t){let e={};e[I]=t;for(let i of n)if(i.path===""&&ve(i)!==I){let o=new B([],{});e[ve(i)]=o}return e}function Ls(n,t,e,i){return e.some(o=>!gn(n,t,o)||!(ve(o)!==I)?!1:!(i!==void 0&&ve(o)===i))}function Ns(n,t,e){return e.some(i=>gn(n,t,i))}function gn(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Fs(n,t,e){return t.length===0&&!n.children[e]}var Oi=class{};async function zs(n,t,e,i,o,r,d="emptyOnly",p){return new wi(n,t,e,i,o,d,r,p).recognize()}var Us=31,wi=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(t,e,i,o,r,d,p,u){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=d,this.urlSerializer=p,this.abortSignal=u,this.applyRedirects=new Mi(this.urlSerializer,this.urlTree)}noMatchError(t){return new G(4002,`'${t.segmentGroup}'`)}async recognize(){let t=er(this.urlTree.root,[],[],this.config).segmentGroup,{children:e,rootSnapshot:i}=await this.match(t),o=new de(i,e),r=new ln("",o),d=Wa(i,[],this.urlTree.queryParams,this.urlTree.fragment);return d.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(d),{state:r,tree:d}}async match(t){let e=new Ot([],Object.freeze({}),Object.freeze(O({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),I,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,t,I,e),rootSnapshot:e}}catch(i){if(i instanceof St)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Ee?this.noMatchError(i):i}}async processSegmentGroup(t,e,i,o,r){if(i.segments.length===0&&i.hasChildren())return this.processChildren(t,e,i,r);let d=await this.processSegment(t,e,i,i.segments,o,!0,r);return d instanceof de?[d]:[]}async processChildren(t,e,i,o){let r=[];for(let u of Object.keys(i.children))u==="primary"?r.unshift(u):r.push(u);let d=[];for(let u of r){let m=i.children[u],_=Rs(e,u),C=await this.processSegmentGroup(t,_,m,u,o);d.push(...C)}let p=Ir(d);return Vs(p),p}async processSegment(t,e,i,o,r,d,p){for(let u of e)try{return await this.processSegmentAgainstRoute(u._injector??t,e,u,i,o,r,d,p)}catch(m){if(m instanceof Ee||yr(m))continue;throw m}if(Fs(i,o,r))return new Oi;throw new Ee(i)}async processSegmentAgainstRoute(t,e,i,o,r,d,p,u){if(ve(i)!==d&&(d===I||!gn(o,r,i)))throw new Ee(o);if(i.redirectTo===void 0)return this.matchSegmentAgainstRoute(t,o,i,r,d,u);if(this.allowRedirects&&p)return this.expandSegmentAgainstRouteUsingRedirect(t,o,e,i,r,d,u);throw new Ee(o)}async expandSegmentAgainstRouteUsingRedirect(t,e,i,o,r,d,p){let{matched:u,parameters:m,consumedSegments:_,positionalParamSegments:C,remainingSegments:E}=Rr(e,o,r);if(!u)throw new Ee(e);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Us&&(this.allowRedirects=!1));let Y=this.createSnapshot(t,o,r,m,p);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let Z=await this.applyRedirects.applyRedirectCommands(_,o.redirectTo,C,kr(Y),t),te=await this.applyRedirects.lineralizeSegments(o,Z);return this.processSegment(t,i,e,te.concat(E),d,!1,p)}createSnapshot(t,e,i,o,r){let d=new Ot(i,o,Object.freeze(O({},this.urlTree.queryParams)),this.urlTree.fragment,js(e),ve(e),e.component??e._loadedComponent??null,e,Bs(e),t),p=Si(d,r,this.paramsInheritanceStrategy);return d.params=Object.freeze(p.params),d.data=Object.freeze(p.data),d}async matchSegmentAgainstRoute(t,e,i,o,r,d){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let p=X=>this.createSnapshot(t,i,X.consumedSegments,X.parameters,d),u=await en(Is(e,i,o,t,this.urlSerializer,p,this.abortSignal));if(i.path==="**"&&(e.children={}),!u?.matched)throw new Ee(e);t=i._injector??t;let{routes:m}=await this.getChildConfig(t,i,o),_=i._loadedInjector??t,{parameters:C,consumedSegments:E,remainingSegments:Y}=u,Z=this.createSnapshot(t,i,E,C,d),{segmentGroup:te,slicedSegments:K}=er(e,E,Y,m,r);if(K.length===0&&te.hasChildren()){let X=await this.processChildren(_,m,te,Z);return new de(Z,X)}if(m.length===0&&K.length===0)return new de(Z,[]);let ne=ve(i)===r,ie=await this.processSegment(_,m,te,K,ne?I:r,!0,Z);return new de(Z,ie instanceof de?[ie]:[])}async getChildConfig(t,e,i){if(e.children)return{routes:e.children,injector:t};if(e.loadChildren){if(e._loadedRoutes!==void 0){let r=e._loadedNgModuleFactory;return r&&!e._loadedInjector&&(e._loadedInjector=r.create(t).injector),{routes:e._loadedRoutes,injector:e._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await en(ws(t,e,i,this.urlSerializer,this.abortSignal))){let r=await this.configLoader.loadChildren(t,e);return e._loadedRoutes=r.routes,e._loadedInjector=r.injector,e._loadedNgModuleFactory=r.factory,r}throw Ts(e)}return{routes:[],injector:t}}};function Vs(n){n.sort((t,e)=>t.value.outlet===I?-1:e.value.outlet===I?1:t.value.outlet.localeCompare(e.value.outlet))}function $s(n){let t=n.value.routeConfig;return t&&t.path===""}function Ir(n){let t=[],e=new Set;for(let i of n){if(!$s(i)){t.push(i);continue}let o=t.find(r=>i.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...i.children),e.add(o)):t.push(i)}for(let i of e){let o=Ir(i.children);t.push(new de(i.value,o))}return t.filter(i=>!e.has(i))}function js(n){return n.data||{}}function Bs(n){return n.resolve||{}}function Hs(n,t,e,i,o,r,d){return ke(async p=>{let{state:u,tree:m}=await zs(n,t,e,i,p.extractedUrl,o,r,d);return Q(O({},p),{targetSnapshot:u,urlAfterRedirects:m})})}function qs(n){return ke(t=>{let{targetSnapshot:e,guards:{canActivateChecks:i}}=t;if(!i.length)return L(t);let o=new Set(i.map(p=>p.route)),r=new Set;for(let p of o)if(!r.has(p))for(let u of Dr(p))r.add(u);let d=0;return ge(r).pipe(Rn(p=>o.has(p)?Ws(p,e,n):(p.data=Si(p,p.parent,n).resolve,L(void 0))),_e(()=>d++),In(1),ke(p=>d===r.size?L(t):ue))})}function Dr(n){let t=n.children.map(e=>Dr(e)).flat();return[n,...t]}function Ws(n,t,e){let i=n.routeConfig,o=n._resolve;return i?.title!==void 0&&!vr(i)&&(o[Tt]=i.title),Rt(()=>(n.data=Si(n,n.parent,e).resolve,Gs(o,n,t).pipe(ae(r=>(n._resolvedData=r,n.data=O(O({},n.data),r),null)))))}function Gs(n,t,e){let i=ti(n);if(i.length===0)return L({});let o={};return ge(i).pipe(ke(r=>Ks(n[r],t,e).pipe(Re(),_e(d=>{if(d instanceof yt)throw cn(new Be,d);o[r]=d}))),In(1),ae(()=>o),kn(r=>yr(r)?ue:ji(r)))}function Ks(n,t,e){let i=t._environmentInjector,o=at(n,i),r=o.resolve?o.resolve(t,e):me(i,()=>o(t,e));return qe(r)}function tr(n){return Me(t=>{let e=n(t);return e?ge(e).pipe(ae(()=>t)):L(t)})}var Ar=(()=>{class n{buildTitle(e){let i,o=e.root;for(;o!==void 0;)i=this.getResolvedTitleForRoute(o)??i,o=o.children.find(r=>r.outlet===I);return i}getResolvedTitleForRoute(e){return e.data[Tt]}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:()=>T(Ys),providedIn:"root"})}return n})(),Ys=(()=>{class n extends Ar{title;constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||n)(W(Ko))};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),mn=new oe("",{factory:()=>({})}),hn=new oe(""),Lr=(()=>{class n{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=T(fo);async loadComponent(e,i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return Promise.resolve(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let o=(async()=>{try{let r=await ir(me(e,()=>i.loadComponent())),d=await Fr(Nr(r));return this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=d,d}finally{this.componentLoaders.delete(i)}})();return this.componentLoaders.set(i,o),o}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Promise.resolve({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=(async()=>{try{let r=await Qs(i,this.compiler,e,this.onLoadEndListener);return i._loadedRoutes=r.routes,i._loadedInjector=r.injector,i._loadedNgModuleFactory=r.factory,r}finally{this.childrenLoaders.delete(i)}})();return this.childrenLoaders.set(i,o),o}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();async function Qs(n,t,e,i){let o=await ir(me(e,()=>n.loadChildren())),r=await Fr(Nr(o)),d;r instanceof lo||Array.isArray(r)?d=r:d=await t.compileModuleAsync(r),i&&i(n);let p,u,m=!1,_;return Array.isArray(d)?(u=d,m=!0):(p=d.create(e).injector,_=d,u=p.get(hn,[],{optional:!0,self:!0}).flat()),{routes:u.map(Ei),injector:p,factory:_}}function Js(n){return n&&typeof n=="object"&&"default"in n}function Nr(n){return Js(n)?n.default:n}async function Fr(n){return n}var ki=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:()=>T(Zs),providedIn:"root"})}return n})(),Zs=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zr=new oe("");var Xs=()=>{},Ur=new oe(""),Vr=(()=>{class n{currentNavigation=N(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=N(null);events=new We;transitionAbortWithErrorSubject=new We;configLoader=T(Lr);environmentInjector=T(Ne);destroyRef=T(lt);urlSerializer=T(pn);rootContexts=T(Et);location=T(Ut);inputBindingEnabled=T(un,{optional:!0})!==null;titleStrategy=T(Ar);options=T(mn,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=T(ki);createViewTransition=T(zr,{optional:!0});navigationErrorHandler=T(Ur,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>L(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=o=>this.events.next(new di(o)),i=o=>this.events.next(new pi(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;Ve(()=>{this.transitions?.next(Q(O({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:i,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(e){return this.transitions=new pe(null),this.transitions.pipe(Ge(i=>i!==null),Me(i=>{let o=!1,r=new AbortController,d=()=>!o&&this.currentTransition?.id===i.id;return L(i).pipe(Me(p=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",se.SupersededByNewNavigation),ue;this.currentTransition=i;let u=this.lastSuccessfulNavigation();this.currentNavigation.set({id:p.id,initialUrl:p.rawUrl,extractedUrl:p.extractedUrl,targetBrowserUrl:typeof p.extras.browserUrl=="string"?this.urlSerializer.parse(p.extras.browserUrl):p.extras.browserUrl,trigger:p.source,extras:p.extras,previousNavigation:u?Q(O({},u),{previousNavigation:null}):null,abort:()=>r.abort(),routesRecognizeHandler:p.routesRecognizeHandler,beforeActivateHandler:p.beforeActivateHandler});let m=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),_=p.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!m&&_!=="reload")return this.events.next(new Ae(p.id,this.urlSerializer.serialize(p.rawUrl),"",on.IgnoredSameUrlNavigation)),p.resolve(!1),ue;if(this.urlHandlingStrategy.shouldProcessUrl(p.rawUrl))return L(p).pipe(Me(C=>(this.events.next(new tt(C.id,this.urlSerializer.serialize(C.extractedUrl),C.source,C.restoredState)),C.id!==this.navigationId?ue:Promise.resolve(C))),Hs(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy,r.signal),_e(C=>{i.targetSnapshot=C.targetSnapshot,i.urlAfterRedirects=C.urlAfterRedirects,this.currentNavigation.update(E=>(E.finalUrl=C.urlAfterRedirects,E)),this.events.next(new Pt)}),Me(C=>ge(i.routesRecognizeHandler.deferredHandle??L(void 0)).pipe(ae(()=>C))),_e(()=>{let C=new rn(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(C)}));if(m&&this.urlHandlingStrategy.shouldProcessUrl(p.currentRawUrl)){let{id:C,extractedUrl:E,source:Y,restoredState:Z,extras:te}=p,K=new tt(C,this.urlSerializer.serialize(E),Y,Z);this.events.next(K);let ne=Cr(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=i=Q(O({},p),{targetSnapshot:ne,urlAfterRedirects:E,extras:Q(O({},te),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(ie=>(ie.finalUrl=E,ie)),L(i)}else return this.events.next(new Ae(p.id,this.urlSerializer.serialize(p.extractedUrl),"",on.IgnoredByUrlHandlingStrategy)),p.resolve(!1),ue}),ae(p=>{let u=new ai(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);return this.events.next(u),this.currentTransition=i=Q(O({},p),{guards:as(p.targetSnapshot,p.currentSnapshot,this.rootContexts)}),i}),_s(p=>this.events.next(p)),Me(p=>{if(i.guardsResult=p.guardsResult,p.guardsResult&&typeof p.guardsResult!="boolean")throw cn(this.urlSerializer,p.guardsResult);let u=new si(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot,!!p.guardsResult);if(this.events.next(u),!d())return ue;if(!p.guardsResult)return this.cancelNavigationTransition(p,"",se.GuardRejected),ue;if(p.guards.canActivateChecks.length===0)return L(p);let m=new li(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);if(this.events.next(m),!d())return ue;let _=!1;return L(p).pipe(qs(this.paramsInheritanceStrategy),_e({next:()=>{_=!0;let C=new ci(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(C)},complete:()=>{_||this.cancelNavigationTransition(p,"",se.NoDataFromResolver)}}))}),tr(p=>{let u=_=>{let C=[];if(_.routeConfig?._loadedComponent)_.component=_.routeConfig?._loadedComponent;else if(_.routeConfig?.loadComponent){let E=_._environmentInjector;C.push(this.configLoader.loadComponent(E,_.routeConfig).then(Y=>{_.component=Y}))}for(let E of _.children)C.push(...u(E));return C},m=u(p.targetSnapshot.root);return m.length===0?L(p):ge(Promise.all(m).then(()=>p))}),tr(()=>this.afterPreactivation()),Me(()=>{let{currentSnapshot:p,targetSnapshot:u}=i,m=this.createViewTransition?.(this.environmentInjector,p.root,u.root);return m?ge(m).pipe(ae(()=>i)):L(i)}),Ke(1),Me(p=>{let u=ns(e.routeReuseStrategy,p.targetSnapshot,p.currentRouterState);this.currentTransition=i=p=Q(O({},p),{targetRouterState:u}),this.currentNavigation.update(_=>(_.targetRouterState=u,_)),this.events.next(new it);let m=i.beforeActivateHandler.deferredHandle;return m?ge(m.then(()=>p)):L(p)}),_e(p=>{new bi(e.routeReuseStrategy,i.targetRouterState,i.currentRouterState,u=>this.events.next(u),this.inputBindingEnabled).activate(this.rootContexts),d()&&(o=!0,this.currentNavigation.update(u=>(u.abort=Xs,u)),this.lastSuccessfulNavigation.set(Ve(this.currentNavigation)),this.events.next(new De(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects))),this.titleStrategy?.updateTitle(p.targetRouterState.snapshot),p.resolve(!0))}),It(Sr(r.signal).pipe(Ge(()=>!o&&!i.targetRouterState),_e(()=>{this.cancelNavigationTransition(i,r.signal.reason+"",se.Aborted)}))),_e({complete:()=>{o=!0}}),It(this.transitionAbortWithErrorSubject.pipe(_e(p=>{throw p}))),Wi(()=>{r.abort(),o||this.cancelNavigationTransition(i,"",se.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),kn(p=>{if(o=!0,this.destroyed)return i.resolve(!1),ue;if(wr(p))this.events.next(new xe(i.id,this.urlSerializer.serialize(i.extractedUrl),p.message,p.cancellationCode)),rs(p)?this.events.next(new ot(p.url,p.navigationBehaviorOptions)):i.resolve(!1);else{let u=new nt(i.id,this.urlSerializer.serialize(i.extractedUrl),p,i.targetSnapshot??void 0);try{let m=me(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(m instanceof yt){let{message:_,cancellationCode:C}=cn(this.urlSerializer,m);this.events.next(new xe(i.id,this.urlSerializer.serialize(i.extractedUrl),_,C)),this.events.next(new ot(m.redirectTo,m.navigationBehaviorOptions))}else throw this.events.next(u),p}catch(m){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(m)}}return ue}))}))}cancelNavigationTransition(e,i,o){let r=new xe(e.id,this.urlSerializer.serialize(e.extractedUrl),i,o);this.events.next(r),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=Ve(this.currentNavigation),o=i?.targetBrowserUrl??i?.extractedUrl;return e.toString()!==o?.toString()&&!i?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function el(n){return n!==vt}var $r=new oe("");var tl=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:()=>T(nl),providedIn:"root"})}return n})(),yi=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}shouldDestroyInjector(t){return!0}},nl=(()=>{class n extends yi{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Nn(n)))(o||n)}})();static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ri=(()=>{class n{urlSerializer=T(pn);options=T(mn,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=T(Ut);urlHandlingStrategy=T(ki);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new be;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:i,targetBrowserUrl:o}){let r=e!==void 0?this.urlHandlingStrategy.merge(e,i):i,d=o??r;return d instanceof be?this.urlSerializer.serialize(d):d}routerUrlState(e){return e?.targetBrowserUrl===void 0||e?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(e.finalUrl)}}commitTransition({targetRouterState:e,finalUrl:i,initialUrl:o}){i&&e?(this.currentUrlTree=i,this.rawUrlTree=this.urlHandlingStrategy.merge(i,o),this.routerState=e):this.rawUrlTree=o}routerState=Cr(null,T(Ne));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:()=>T(il),providedIn:"root"})}return n})(),il=(()=>{class n extends Ri{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&setTimeout(()=>{e(i.url,i.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(e,i){e instanceof tt?this.updateStateMemento():e instanceof Ae?this.commitTransition(i):e instanceof rn?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof it?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):e instanceof xe&&!_r(e)?this.restoreHistory(i):e instanceof nt?this.restoreHistory(i,!0):e instanceof De&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,i){let{extras:o,id:r}=i,{replaceUrl:d,state:p}=o;if(this.location.isCurrentPathEqualTo(e)||d){let u=this.browserPageId,m=O(O({},p),this.generateNgRouterState(r,u,i));this.location.replaceState(e,"",m)}else{let u=O(O({},p),this.generateNgRouterState(r,this.browserPageId+1,i));this.location.go(e,"",u)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,r=this.currentPageId-o;r!==0?this.location.historyGo(r):this.getCurrentUrlTree()===e.finalUrl&&r===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i,o){return this.canceledNavigationResolution==="computed"?O({navigationId:e,\u0275routerPageId:i},this.routerUrlState(o)):O({navigationId:e},this.routerUrlState(o))}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Nn(n)))(o||n)}})();static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function jr(n,t){n.events.pipe(Ge(e=>e instanceof De||e instanceof xe||e instanceof nt||e instanceof Ae),ae(e=>e instanceof De||e instanceof Ae?0:(e instanceof xe?e.code===se.Redirect||e.code===se.SupersededByNewNavigation:!1)?2:1),Ge(e=>e!==2),Ke(1)).subscribe(()=>{t()})}var Ii=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=T(po);stateManager=T(Ri);options=T(mn,{optional:!0})||{};pendingTasks=T(Zi);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=T(Vr);urlSerializer=T(pn);location=T(Ut);urlHandlingStrategy=T(ki);injector=T(Ne);_events=new We;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=T(tl);injectorCleanup=T($r,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=T(hn,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!T(un,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new Ui;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,r=Ve(this.navigationTransitions.currentNavigation);if(o!==null&&r!==null){if(this.stateManager.handleRouterEvent(i,r),i instanceof xe&&i.code!==se.Redirect&&i.code!==se.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof De)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(i instanceof ot){let d=i.navigationBehaviorOptions,p=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),u=O({scroll:o.extras.scroll,browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||el(o.source)},d);this.scheduleNavigation(p,vt,null,u,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}Xa(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortWithErrorSubject.next(o)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),vt,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i,o,r)=>{this.navigateToSyncWithBrowser(e,o,i,r)})}navigateToSyncWithBrowser(e,i,o,r){let d=o?.navigationId?o:null,p=o?.\u0275routerUrl??e;if(o?.\u0275routerUrl&&(r=Q(O({},r),{browserUrl:e})),o){let m=O({},o);delete m.navigationId,delete m.\u0275routerPageId,delete m.\u0275routerUrl,Object.keys(m).length!==0&&(r.state=m)}let u=this.parseUrl(p);this.scheduleNavigation(u,i,d,r).catch(m=>{this.disposed||this.injector.get(Ln)(m)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Ve(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(Ei),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,i={}){let{relativeTo:o,queryParams:r,fragment:d,queryParamsHandling:p,preserveFragment:u}=i,m=u?this.currentUrlTree.fragment:d,_=null;switch(p??this.options.defaultQueryParamsHandling){case"merge":_=O(O({},this.currentUrlTree.queryParams),r);break;case"preserve":_=this.currentUrlTree.queryParams;break;default:_=r||null}_!==null&&(_=this.removeEmptyProps(_));let C;try{let E=o?o.snapshot:this.routerState.snapshot.root;C=gr(E)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),C=this.currentUrlTree.root}return mr(C,e,_,m??null,this.urlSerializer)}navigateByUrl(e,i={skipLocationChange:!1}){let o=et(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(r,vt,null,i)}navigate(e,i={skipLocationChange:!1}){return ol(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.console.warn(Ki(4018,!1)),this.urlSerializer.parse("/")}}isActive(e,i){let o;if(i===!0?o=O({},rr):i===!1?o=O({},ni):o=O(O({},ni),i),et(e))return Yo(this.currentUrlTree,e,o);let r=this.parseUrl(e);return Yo(this.currentUrlTree,r,o)}removeEmptyProps(e){return Object.entries(e).reduce((i,[o,r])=>(r!=null&&(i[o]=r),i),{})}scheduleNavigation(e,i,o,r,d){if(this.disposed)return Promise.resolve(!1);let p,u,m;d?(p=d.resolve,u=d.reject,m=d.promise):m=new Promise((C,E)=>{p=C,u=E});let _=this.pendingTasks.add();return jr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(_))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:r,resolve:p,reject:u,promise:m,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),m.catch(Promise.reject.bind(Promise))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ol(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new G(4008,!1)}var rl=new oe("");function Di(n,...t){return Qi([{provide:hn,multi:!0,useValue:n},[],{provide:He,useFactory:al},{provide:go,multi:!0,useFactory:sl},t.map(e=>e.\u0275providers)])}function al(){return T(Ii).routerState.root}function sl(){let n=T(Dn);return t=>{let e=n.get(mo);if(t!==e.components[0])return;let i=n.get(Ii),o=n.get(ll);n.get(cl)===1&&i.initialNavigation(),n.get(dl,null,{optional:!0})?.setUpPreloading(),n.get(rl,null,{optional:!0})?.init(),i.resetRootComponentType(e.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var ll=new oe("",{factory:()=>new We}),cl=new oe("",{factory:()=>1});var dl=new oe("");var Br=[];var Hr={providers:[Xi(),yo(),Di(Br)]};var fn=class n{http=T(wo);destroyRef=T(lt);document=T(le);lastAutomaticRefreshAt=0;automaticRefreshCooldownMs=15e3;sessionData=N(null);loadState=N("loading");loadError=N(null);refreshState=N("idle");refreshMessage=N(null);runtimeStatus=N(null);runtimeStatusAvailable=N(!1);constructor(){let t=setTimeout(()=>this.pollRuntimeStatus(),500),e=setInterval(()=>{(this.loadState()==="loading"||this.loadState()==="error"||this.refreshState()==="refreshing")&&this.pollRuntimeStatus()},1500),i=()=>{this.document.visibilityState==="visible"&&this.refreshIfStale()};this.document.addEventListener("visibilitychange",i),this.destroyRef.onDestroy(()=>{clearTimeout(t),clearInterval(e),this.document.removeEventListener("visibilitychange",i)}),this.loadSessionData()}refresh(t="quick"){this.refreshState()!=="refreshing"&&(this.refreshState.set("refreshing"),this.refreshMessage.set(t==="customizations"?"Finding customization usage evidence...":t==="full"?"Rebuilding all local Copilot data...":"Checking for new Copilot data..."),this.http.post(ut("/api/scan"),{mode:t}).subscribe({next:({sessionData:e,status:i})=>{i&&(this.runtimeStatus.set(Q(O({},i),{scanning:!1,activeScanId:0,activeScanMode:""})),this.runtimeStatusAvailable.set(!0)),this.sessionData.set(e),this.loadState.set("ready");let o=Number(e.ingestion?.incrementalSessionsImported??0);this.loadError.set(null),this.refreshState.set("success"),this.refreshMessage.set(t==="customizations"?"Customization analysis complete":t==="full"?`${e.sessions.length.toLocaleString()} sessions rebuilt`:o>0?`${o.toLocaleString()} ${o===1?"session":"sessions"} added or updated`:"Up to date")},error:e=>{let i=this.statusFromError(e);i&&(this.runtimeStatus.set(i),this.runtimeStatusAvailable.set(!0));let o=this.errorMessage(e);if(o.toLowerCase().includes("scan stopped by user")){this.refreshState.set("idle"),this.refreshMessage.set("Scan stopped. Existing data was kept.");return}this.refreshState.set("error"),this.refreshMessage.set(this.isMissingRuntime(e)?"Refresh is unavailable in static-only mode":o)}}))}cancelScan(){this.http.post(ut("/api/scan/cancel"),{}).subscribe({next:({status:t})=>{t&&(this.runtimeStatus.set(t),this.runtimeStatusAvailable.set(!0)),this.refreshState.set("idle"),this.refreshMessage.set("Scan stopped. Existing data was kept.")},error:t=>{this.refreshState.set("error"),this.refreshMessage.set(this.errorMessage(t))}})}refreshIfStale(){let t=Date.now();if(this.loadState()!=="ready"||this.refreshState()==="refreshing"||t-this.lastAutomaticRefreshAt<this.automaticRefreshCooldownMs)return;let e=Date.parse(this.sessionData()?.generatedAt??"");Number.isFinite(e)&&t-e<this.automaticRefreshCooldownMs||(this.lastAutomaticRefreshAt=t,this.refresh("quick"))}statusFromError(t){return t&&typeof t=="object"&&"error"in t&&t.error&&typeof t.error=="object"&&"status"in t.error&&t.error.status&&typeof t.error.status=="object"?t.error.status:null}errorMessage(t){return t&&typeof t=="object"&&"error"in t&&t.error&&typeof t.error=="object"&&"error"in t.error&&typeof t.error.error=="string"?t.error.error:t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:"The local session data could not be loaded."}isMissingRuntime(t){if(!t||typeof t!="object")return!1;let e="status"in t?Number(t.status):0;return e===0||e===404||e===502||e===504}pollRuntimeStatus(){this.http.get(ut("/api/status")).subscribe({next:t=>{this.runtimeStatus.set(t),this.runtimeStatusAvailable.set(!0),t.scanning&&t.scanProgress?.message&&this.refreshMessage.set(t.scanProgress.message),t.hasData&&this.loadState()!=="ready"&&this.loadSessionData()},error:()=>{this.runtimeStatusAvailable.set(!1)}})}loadSessionData(){this.http.get(ut("/data/sessions.json")).subscribe({next:t=>{this.sessionData.set(t),this.loadState.set("ready"),this.loadError.set(null)},error:t=>{this.loadState.set("error"),this.loadError.set(this.errorMessage(t))}})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})};var ul=(n,t)=>t.title+t.subtitle,gl=(n,t)=>t.at+t.message;function ml(n,t){if(n&1&&(F(0,"span"),l(1),A()),n&2){let e=g(4);c(),f(e.currentWorkspaceLabel)}}function hl(n,t){if(n&1&&(F(0,"div",4)(1,"div")(2,"strong"),l(3),A(),x(4,ml,2,1,"span"),A(),F(5,"span"),l(6),A(),ho(7,"progress",12),A()),n&2){let e=g(3);c(3),f(e.progressLabel),c(),v(e.currentWorkspaceLabel?4:-1),c(2),f(e.progressPercent?e.progressPercent+"%":"Working"),c(),Vn("value",e.progressPercent||null)}}function fl(n,t){if(n&1){let e=D();F(0,"button",15),zt("click",function(){w(e);let o=g(4);return y(o.refresh.emit())}),l(1),A()}if(n&2){let e=g(4);Vn("disabled",e.refreshState==="refreshing"),Pe("aria-busy",e.refreshState==="refreshing"),c(),b(" ",e.isEmptyState?"Scan local Copilot data":"Try scan again"," ")}}function _l(n,t){if(n&1){let e=D();F(0,"button",16),zt("click",function(){w(e);let o=g(4);return y(o.cancelScan.emit())}),l(1,"Stop scan"),A()}}function Cl(n,t){if(n&1&&(F(0,"div",6),x(1,fl,2,3,"button",13),x(2,_l,2,0,"button",14),A()),n&2){let e=g(3);c(),v(e.isScanning?-1:1),c(),v(e.isScanning?2:-1)}}function xl(n,t){if(n&1&&(F(0,"article",19)(1,"div")(2,"strong"),l(3),A(),F(4,"small"),l(5),A()(),F(6,"span"),l(7),A()()),n&2){let e=t.$implicit;V("scanning",e.status==="scanning")("warning",e.status==="warning"),c(3),f(e.title),c(2),f(e.subtitle),c(2),f(e.findings)}}function vl(n,t){if(n&1&&(F(0,"div",9)(1,"div",17)(2,"strong"),l(3,"What has been found"),A(),F(4,"span"),l(5),A()(),z(6,xl,8,7,"article",18,ul),A()),n&2){let e=g(3);c(5),b(" ",e.scanProgressCountLabel," "),c(),U(e.workspaceOutcomes)}}function bl(n,t){if(n&1&&(F(0,"li"),l(1),A()),n&2){let e=t.$implicit;V("error",e.level==="error"),c(),f(e.message)}}function Ml(n,t){if(n&1&&(F(0,"ol",10),z(1,bl,2,3,"li",20,gl),A()),n&2){let e=g(3);c(),U(e.recentLogs)}}function Pl(n,t){if(n&1&&(F(0,"p",11),l(1),A()),n&2){let e=g(3);c(),b("Log file: ",e.runtimeStatus.logFile)}}function Ol(n,t){if(n&1&&(x(0,hl,8,4,"div",4),F(1,"p",5),l(2),A(),x(3,Cl,3,2,"div",6),F(4,"details",7)(5,"summary"),l(6,"View details"),A(),F(7,"div",8)(8,"div")(9,"span"),l(10),A(),F(11,"strong"),l(12),A(),F(13,"small"),l(14),A()(),F(15,"div")(16,"span"),l(17,"Imported sessions"),A(),F(18,"strong"),l(19),h(20,"number"),A(),F(21,"small"),l(22),h(23,"number"),A()(),F(24,"div")(25,"span"),l(26,"Fallback chats"),A(),F(27,"strong"),l(28),h(29,"number"),A(),F(30,"small"),l(31,"Used only when exact logs are absent"),A()(),F(32,"div")(33,"span"),l(34,"Memory and rules"),A(),F(35,"strong"),l(36),h(37,"number"),A(),F(38,"small"),l(39),h(40,"number"),h(41,"number"),A()()(),x(42,vl,8,1,"div",9),x(43,Ml,3,0,"ol",10),x(44,Pl,2,1,"p",11),A()),n&2){let e=g(2);v(e.isScanning?0:-1),c(2),f(e.scanAdvice),c(),v(e.showPanelActions?3:-1),c(7),f(e.isScanning?"Scanning now":"Last scan"),c(2),f(e.isScanning?e.scanModeLabel:e.runtimeStatus.lastScanCompletedAt?"Complete":e.runtimeStatus.phase),c(2),f(e.scanStatusLabel),c(5),f(M(20,15,e.foundSoFar.sessions)),c(3),b("",M(23,17,e.foundSoFar.debugLogFolders)," exact debug-log folders"),c(6),f(M(29,19,e.foundSoFar.chatSnapshots)),c(8),f(M(37,21,e.foundSoFar.memories+e.foundSoFar.customizations)),c(3),$("",M(40,23,e.foundSoFar.memories)," memories \xB7 ",M(41,25,e.foundSoFar.customizations)," customizations"),c(3),v(e.workspaceOutcomes.length?42:-1),c(),v(e.recentLogs.length?43:-1),c(),v(e.runtimeStatus.logFile?44:-1)}}function wl(n,t){if(n&1){let e=D();F(0,"p",11),l(1,"Waiting for local runtime status..."),A(),F(2,"button",21),zt("click",function(){w(e);let o=g(2);return y(o.refresh.emit())}),l(3,"Scan local Copilot data"),A()}}function yl(n,t){if(n&1&&(F(0,"section",1)(1,"div",2)(2,"p",3),l(3),A(),F(4,"h2"),l(5),A(),F(6,"p"),l(7),A()(),x(8,Ol,45,27)(9,wl,4,0),A()),n&2){let e=g();V("loading",e.state==="loading")("danger",e.state==="error"&&!e.isEmptyState),c(3),f(e.isScanning?"Scan in progress":e.isEmptyState?"Get started":"Local data"),c(2),f(e.statusTitle),c(2),f(e.statusBody),c(),v(e.runtimeStatusAvailable&&e.runtimeStatus?8:9)}}var _n=class n{state;error=null;refreshState="idle";runtimeStatus=null;runtimeStatusAvailable=!1;refresh=new j;cancelScan=new j;get isEmptyState(){return this.error?.toLowerCase().includes("no session data is available")??!1}get scanElapsedLabel(){let t=this.runtimeStatus?.lastScanStartedAt;if(!t)return"";let e=this.runtimeStatus?.scanning?Date.now()-Date.parse(t):this.runtimeStatus?.lastScanDurationMs??0;if(!Number.isFinite(e)||e<=0)return"";let i=Math.round(e/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m ${i%60}s`}get isScanning(){return this.runtimeStatus?.scanning===!0||this.refreshState==="refreshing"}get showPanelActions(){return this.isScanning||this.state!=="ready"}get statusTitle(){return this.isScanning?this.runtimeStatus?.activeScanMode==="customizations"?"Checking usage evidence":"Scanning VS Code usage data":this.refreshState==="success"?"Scan complete":this.refreshState==="error"?"Scan did not finish":this.state==="error"&&this.isEmptyState?"No local sessions imported yet":this.state==="error"?"Could not load local session data":"Reading local sessions"}get statusBody(){return this.isScanning?this.runtimeStatus?.activeScanMode==="customizations"?`${this.customizationScanSummary}. Existing data stays visible while the scan runs.`:`${this.scanProgressCountLabel}. Existing data stays visible while the scan runs.`:this.refreshState==="success"?`Scan complete - ${this.foundSoFar.sessions.toLocaleString()} session${this.foundSoFar.sessions===1?"":"s"} found - last updated just now.`:this.refreshState==="error"?this.runtimeStatus?.lastError||this.error||"The scan stopped before fresh data was imported.":this.state==="error"&&this.isEmptyState?"Scan this computer for local VS Code Copilot usage, memories, and sessions.":this.error||"Checking the local Copilot data imported by the runtime."}get scanStatusLabel(){return this.isScanning?this.scanElapsedLabel?`Started ${this.scanElapsedLabel} ago`:"Started just now":this.runtimeStatus?.lastError&&this.refreshState==="error"?this.scanElapsedLabel?`Stopped after ${this.scanElapsedLabel}`:"Stopped before completion":this.runtimeStatus?.lastScanCompletedAt?this.scanElapsedLabel?`Last scan took ${this.scanElapsedLabel}`:"Last scan complete":"No completed scan yet"}get currentWorkspaceLabel(){let t=this.runtimeStatus?.scanProgress;return t?.workspace||t?.workspaceDir||""}get progressLabel(){let t=this.runtimeStatus?.scanProgress,e=Number(t?.workspaceIndex??t?.index??0),i=Number(t?.workspaceTotal??t?.total??0);return this.runtimeStatus?.activeScanMode==="customizations"?this.currentWorkspaceLabel?"Current workspace":t?.stage==="workspace-scope"&&i===0?"No current workspace matched":"Checking current workspace":e>0&&i>0?`Storage entry ${e.toLocaleString()} of ${i.toLocaleString()}`:this.friendlyStageLabel(t?.stage)}get progressPercent(){let t=this.runtimeStatus?.scanProgress,e=Number(t?.workspaceIndex??t?.index??0),i=Number(t?.workspaceTotal??t?.total??0);return e>0&&i>0?Math.max(1,Math.min(100,Math.round(e/i*100))):0}get foundSoFar(){let t=this.runtimeStatus?.workspaceProgress??[],e=t.reduce((C,E)=>C+Number(E.sessions??0),0),i=t.reduce((C,E)=>C+Number(E.memories??0),0),o=t.reduce((C,E)=>C+Number(E.customizations??E.customizationInventory??0),0),r=Math.max(this.runtimeStatus?.sessionCount??0,e),d=Math.max(this.runtimeStatus?.memoryCount??0,i),p=t.reduce((C,E)=>C+Number(E.chatSnapshots??0),0),u=t.reduce((C,E)=>C+Number(E.debugLogFolders??0),0),m=t.filter(C=>C.completed).length,_=Math.max(Number(this.runtimeStatus?.scanProgress?.workspaceTotal??0),...t.map(C=>Number(C.workspaceTotal??0)),t.length);return{sessions:r,memories:d,chatSnapshots:p,debugLogFolders:u,customizations:o,checkedWorkspaces:m,totalWorkspaces:_}}get scanModeLabel(){let t=this.runtimeStatus?.activeScanMode;return t==="customizations"?"Usage evidence scan":t==="full"?"Global full scan":"Global scan"}get scanProgressCountLabel(){if(this.runtimeStatus?.activeScanMode==="customizations")return this.customizationScanSummary;let t=this.runtimeStatus?.scanProgress,e=Number(t?.workspaceIndex??t?.index??0),i=Number(t?.workspaceTotal??t?.total??0);return this.isScanning&&e>0&&i>0?`${e.toLocaleString()} of ${i.toLocaleString()} storage entries checked`:`${this.foundSoFar.checkedWorkspaces.toLocaleString()} of ${this.foundSoFar.totalWorkspaces.toLocaleString()} storage entries checked`}get customizationScanSummary(){let t=this.runtimeStatus?.scanProgress,e=Number(t?.customizationInventory??this.foundSoFar.customizations??0),i=Number(t?.sessions??0),o=Number(t?.matches??0),r=[e?`${e.toLocaleString()} customization${e===1?"":"s"}`:"",i?`${i.toLocaleString()} session${i===1?"":"s"} checked`:"",o?`${o.toLocaleString()} text match${o===1?"":"es"}`:""].filter(Boolean);return r.length?r.join(" - "):"Checking current workspace customizations"}get recentLogs(){return this.runtimeStatus?.recentLogs?.slice(-6)??[]}get workspaceOutcomes(){return(this.runtimeStatus?.workspaceProgress??[]).slice(-6).reverse().map(e=>{let i=e.workspace||e.workspaceDir||"VS Code workspace",o=Number(e.debugLogFolders??0),r=Number(e.chatSnapshots??0),d=Number(e.sessions??0),p=Number(e.memories??0),u=Number(e.customizations??e.customizationInventory??0),m=[d?`${d.toLocaleString()} session${d===1?"":"s"}`:"",o?`${o.toLocaleString()} debug-log folder${o===1?"":"s"}`:"",r?`${r.toLocaleString()} chat snapshot${r===1?"":"s"}`:"",p?`${p.toLocaleString()} memor${p===1?"y":"ies"}`:"",u?`${u.toLocaleString()} customization${u===1?"":"s"}`:""].filter(Boolean).join(" \xB7 ");return{title:i,subtitle:this.friendlyStageLabel(e.lastStage),status:e.completed?d||o||r||p||u?"complete":"warning":"scanning",findings:m||"No Copilot data found here yet"}})}get scanAdvice(){return this.isScanning?this.runtimeStatus?.activeScanMode==="customizations"?this.currentWorkspaceLabel?"Checking whether current-workspace customization text appears in visible model-request logs.":"Looking for the current VS Code workspace before checking customization usage.":this.foundSoFar.totalWorkspaces>20?"Large VS Code profiles can take a few minutes. You can stop the scan and keep the last imported snapshot.":"The page will update when the scan finishes.":this.foundSoFar.sessions===0&&this.foundSoFar.chatSnapshots>0?"Only fallback chat records were found. Enable Agent Debug Log file logging for exact model-call usage.":this.foundSoFar.sessions===0?"No sessions have been imported yet. Run a scan after using Copilot Chat or Agent mode in VS Code.":"Data is loaded from local VS Code files. Run another scan after new Copilot activity."}friendlyStageLabel(t){return{starting:"Starting scan",roots:"Finding VS Code data",workspaces:"Finding VS Code history",workspace:"Checking local VS Code data","workspace-state":"Reading saved workspace metadata",customizations:"Finding Copilot customization files","customization-evidence":"Checking visible customization text matches","chat-snapshots":"Checking chat snapshots","workspace-complete":"Storage entry complete",complete:"Scan complete",stopped:"Scan stopped",failed:"Scan failed"}[t??""]??"Preparing scan"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-data-state-panel"]],inputs:{state:"state",error:"error",refreshState:"refreshState",runtimeStatus:"runtimeStatus",runtimeStatusAvailable:"runtimeStatusAvailable"},outputs:{refresh:"refresh",cancelScan:"cancelScan"},decls:1,vars:1,consts:[["aria-live","polite",1,"state-panel",3,"loading","danger"],["aria-live","polite",1,"state-panel"],[1,"state-panel-main"],[1,"eyebrow"],[1,"scan-progress"],[1,"runtime-advice"],[1,"scan-actions"],[1,"runtime-advanced"],[1,"runtime-summary"],["aria-label","Scan findings by workspace",1,"workspace-outcomes"],[1,"runtime-log"],[1,"runtime-log-file"],["max","100",3,"value"],["type","button",1,"scan-button",3,"disabled"],["type","button",1,"scan-button","secondary"],["type","button",1,"scan-button",3,"click","disabled"],["type","button",1,"scan-button","secondary",3,"click"],[1,"workspace-outcomes-heading"],[1,"workspace-outcome",3,"scanning","warning"],[1,"workspace-outcome"],[3,"error"],["type","button",1,"scan-button",3,"click"]],template:function(e,i){e&1&&x(0,yl,10,8,"section",0),e&2&&v(i.state==="loading"||i.state==="error"||i.refreshState==="refreshing"?0:-1)},dependencies:[ee],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%]:empty{display:none}.state-panel[_ngcontent-%COMP%]{display:grid;gap:10px;margin-bottom:12px;border:1px solid var(--line);border-radius:14px;padding:12px;background:var(--header-gradient);box-shadow:var(--shadow-soft)}.state-panel.loading[_ngcontent-%COMP%]{align-content:start}.state-panel.danger[_ngcontent-%COMP%]{border-color:#ff6b5f66;background:linear-gradient(135deg,rgba(255,107,95,.12),transparent 58%),var(--surface)}.state-panel-main[_ngcontent-%COMP%]{display:grid;gap:5px}.state-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .state-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.state-panel[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--text-strong);font-size:18px;line-height:1.12}.state-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--muted);line-height:1.45}.eyebrow[_ngcontent-%COMP%]{color:var(--accent-2);font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.runtime-summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.runtime-summary[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .scan-progress[_ngcontent-%COMP%], .workspace-outcomes[_ngcontent-%COMP%], .runtime-advanced[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:11px;background:color-mix(in srgb,var(--surface) 82%,transparent)}.runtime-summary[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:3px;min-width:0;padding:10px 12px}.runtime-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .runtime-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.runtime-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:820;letter-spacing:.08em;text-transform:uppercase}.runtime-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-strong);font-size:17px;line-height:1.15;text-overflow:ellipsis;white-space:nowrap}.scan-progress[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 12px}.scan-progress[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:2px;min-width:0}.scan-progress[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .scan-progress[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px;font-weight:780}.scan-progress[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.scan-progress[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]{grid-column:1 / -1;width:100%;height:8px;overflow:hidden;border:0;border-radius:999px;background:color-mix(in srgb,var(--line) 72%,transparent)}.scan-progress[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]::-webkit-progress-bar{background:color-mix(in srgb,var(--line) 72%,transparent)}.scan-progress[_ngcontent-%COMP%] progress[_ngcontent-%COMP%]::-webkit-progress-value{border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2))}.workspace-outcomes[_ngcontent-%COMP%]{display:grid;gap:8px;padding:10px}.workspace-outcomes-heading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}.workspace-outcomes-heading[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:13px}.workspace-outcomes-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-weight:720}.workspace-outcome[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(160px,.72fr) minmax(0,1fr);gap:10px;align-items:center;border:1px solid color-mix(in srgb,var(--accent-2) 24%,var(--line));border-radius:9px;padding:8px 10px;background:color-mix(in srgb,var(--accent-2) 5%,var(--surface-soft))}.workspace-outcome.scanning[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 34%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--surface-soft))}.workspace-outcome.warning[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--warning) 32%,var(--line));background:color-mix(in srgb,var(--warning) 6%,var(--surface-soft))}.workspace-outcome[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:2px;min-width:0}.workspace-outcome[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .workspace-outcome[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .workspace-outcome[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-outcome[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px}.workspace-outcome[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .workspace-outcome[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--muted);font-size:11px}.scan-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.scan-button[_ngcontent-%COMP%]{min-height:36px;border:1px solid color-mix(in srgb,var(--accent) 48%,var(--line));border-radius:999px;padding:0 14px;background:color-mix(in srgb,var(--accent) 10%,var(--surface));color:var(--text-strong);font:inherit;font-weight:760;cursor:pointer}.scan-button.secondary[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--muted) 28%,var(--line));background:color-mix(in srgb,var(--surface) 72%,transparent);color:var(--muted)}.scan-button[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 16%,var(--surface))}.scan-button[_ngcontent-%COMP%]:disabled{cursor:wait;opacity:.65}.runtime-advanced[_ngcontent-%COMP%]{padding:8px 10px}.runtime-advanced[open][_ngcontent-%COMP%]{display:grid;gap:10px}.runtime-advanced[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-weight:760;cursor:pointer}.runtime-log[_ngcontent-%COMP%]{display:grid;gap:4px;margin:8px 0 0;padding:0;color:var(--muted);font-size:12px;list-style:none;text-align:left}.runtime-advice[_ngcontent-%COMP%]{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.4}.runtime-log[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{overflow:hidden;border:1px solid var(--line);border-radius:7px;padding:7px 9px;background:color-mix(in srgb,var(--surface) 72%,transparent);text-overflow:ellipsis;white-space:nowrap}.runtime-log[_ngcontent-%COMP%] li.error[_ngcontent-%COMP%]{border-color:#ff6b5f59;color:var(--text-strong)}.runtime-log-file[_ngcontent-%COMP%]{overflow-wrap:anywhere;color:var(--muted);font-size:12px}@media(max-width:760px){.runtime-summary[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.runtime-summary[_ngcontent-%COMP%]{grid-template-columns:1fr}.workspace-outcomes-heading[_ngcontent-%COMP%], .workspace-outcome[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr}}"]})};function Wr(n,t){let e=we(n),i=n.modelBreakdown.map(C=>Ro(C,e)),o=Sl(i),r=Il(n.traceEvents,n.modelBreakdown,n.modelLimits??[],e,t),d=Rl(n.traceEvents,n.modelBreakdown),p=kl(n,i,d),u=n.tokens.cachedInput>0||n.tokens.cacheWrite>0,m=Tl(n,i,r),_=El(r);return{hasCacheData:u,modelRows:i,categoryRows:o,costAnswer:m,costDrivers:p,modelCallRows:r,topTokenEvents:d,turnInsights:_}}function st(n){let t=Zr(n),e=$l(t),i=[],o=Math.max(...n.traceEvents.filter(d=>d.type==="llm_request").map(d=>d.inputTokens),0);return(n.tokens.input+n.tokens.cachedInput+n.tokens.cacheWrite>=15e4||o>=1e5)&&i.push({label:"High input context",tone:"high",help:"Large prompt/context payloads are being sent into the model. This usually means repo context, prior conversation, or tool results are driving cost."}),n.modelBreakdown.length>1&&i.push({label:"Mixed models",tone:"medium",help:"This run used more than one model. Cost is the sum of each model row, so model switches can make estimates harder to read at a glance."}),{size:e,sizeTone:e==="Very large"?"high":e==="Large"?"medium":"info",totalTokens:t,warnings:i}}function Gr(n){return`${n.size} session based on ${n.totalTokens.toLocaleString()} imported tokens. Current thresholds: Small under 100k, Medium under 500k, Large under 1.5M, Very large at 1.5M or more.`}function Kr(n,t){return n.filter(e=>Nl(e)).map((e,i)=>{let o=zi(e,t),r=Fi(e),d=$t(o,{input:r,cachedInput:e.cachedInputTokens??0}),p=Bt(e)??e.estimatedCost?.usd??fe(r,d.input)+fe(e.cachedInputTokens??0,d.cachedInput)+fe(e.cacheWriteTokens??0,d.cacheWrite??0)+fe(e.outputTokens,d.output);return Q(O({},e),{flowIndex:i+1,totalTokens:Ni(e),pricingModel:o,estimatedUsd:p})})}function Yr(n,t){return t==="all"?!0:t==="model"?!!(n.inputTokens||n.outputTokens||n.type==="llm_request"):t==="tool"?n.type.includes("tool")||Fl().some(e=>n.name.toLowerCase().includes(e)):t==="discovery"?Li(n):t==="message"?n.type==="user_message":t==="response"?n.type==="agent_response"||n.type==="assistant.message":n.status!=="ok"&&n.status!=="unknown"}function Qr(n,t){let e=zi(n,t),i=Fi(n),o=$t(e,{input:i,cachedInput:n.cachedInputTokens??0}),r=fe(i,o.input),d=fe(n.cachedInputTokens??0,o.cachedInput),p=fe(n.cacheWriteTokens??0,o.cacheWrite??0),u=fe(n.outputTokens,o.output),m=Bt(n)??n.estimatedCost?.usd??r+d+p+u,_=Ni(n),C=n.rawModel||n.model||xn(n.detail);return{normalizedFields:[{label:"Raw index",value:`#${n.index}`},{label:"Timestamp",value:n.timestamp},{label:"Type",value:n.type},{label:"Name",value:n.name},{label:"Status",value:n.status},...n.model?[{label:"Model",value:n.model}]:[],...C?[{label:"Raw model",value:C}]:[],...n.inputTokens||n.outputTokens?[{label:"Raw inputTokens",value:n.inputTokens.toLocaleString()},{label:"Normal input tokens",value:i.toLocaleString()},...n.cachedInputTokens?[{label:"Cached input tokens",value:n.cachedInputTokens.toLocaleString()}]:[],...n.cacheWriteTokens?[{label:"Cache write tokens",value:n.cacheWriteTokens.toLocaleString()}]:[],{label:"Output tokens",value:n.outputTokens.toLocaleString()},{label:"Total tokens",value:_.toLocaleString()},{label:"Pricing row",value:e},{label:"Pricing tier",value:n.pricingTier??o.label??o.tierLabel??"Default"},{label:n.sourceUsage?"GitHub usage":"Estimated cost",value:`$${m.toLocaleString(void 0,{minimumFractionDigits:6,maximumFractionDigits:6})}`},...n.sourceUsage?[{label:"Source usage credits",value:n.sourceUsage.credits.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:6})}]:[],...n.sourceEstimatedCost?[{label:"Source estimatedCost",value:n.sourceEstimatedCost}]:[]]:[],...n.ttftMs?[{label:"TTFT",value:`${n.ttftMs.toLocaleString()} ms`}]:[],...n.maxTokens?[{label:"Max tokens",value:n.maxTokens.toLocaleString()}]:[],...n.reasoningEffort?[{label:"Reasoning effort",value:n.reasoningEffort}]:[],...n.hasReasoning?[{label:"Reasoning text",value:"Present in debug log payload"}]:[]],attributeFields:n.attributes??[],detail:n.detail||"No detail text imported for this event.",hasCost:!!(n.inputTokens||n.outputTokens),inputUsd:r,outputUsd:u,estimatedUsd:m,totalTokens:_,pricingModel:e,usesFallbackPrice:jt(C,e)}}var Jr=jt;function Zr(n){return Vl(n.tokens)}function Sl(n){return[{label:"Normal input",tokens:Cn(n,"input"),usd:n.reduce((t,e)=>t+e.inputUsd,0),description:"Non-cached prompt/context tokens priced at the normal input rate. Raw VS Code inputTokens can be higher when cachedTokens are present."},{label:"Output",tokens:Cn(n,"output"),usd:n.reduce((t,e)=>t+e.outputUsd,0),description:"Generated model response tokens."},{label:"Cached input",tokens:Cn(n,"cachedInput"),usd:n.reduce((t,e)=>t+e.cachedInputUsd,0),description:"Prompt tokens served from provider cache when that billing signal is available."},{label:"Cache write",tokens:Cn(n,"cacheWrite"),usd:n.reduce((t,e)=>t+e.cacheWriteUsd,0),description:"Provider cache creation tokens. GitHub lists this mainly for Anthropic models."}]}function Tl(n,t,e){let i=Math.max(we(n),0),o=Zr(n),r=t.reduce((K,ne)=>K+ne.inputUsd+ne.cachedInputUsd+ne.cacheWriteUsd,0),d=t.reduce((K,ne)=>K+ne.outputUsd,0),p=i>0?r/i*100:0,u=i>0?d/i*100:0,m=[...t].sort((K,ne)=>ne.totalUsd-K.totalUsd)[0]??null,_=m&&i>0?m.totalUsd/i*100:0,C=[...e].sort((K,ne)=>ne.estimatedUsd-K.estimatedUsd)[0]??null,E=C&&i>0?C.estimatedUsd/i*100:0,Y=p>=u?"Input/context":"Output",Z=Math.max(p,u),te=o?i/o*1e3:0;return{category:Y,categoryShare:Z,categoryDetail:Y==="Input/context"?"Most usage comes from tokens sent into the model: normal input, cached input, prior chat, repo context, and tool results.":"Most usage comes from generated model output. Inspect long responses or repeated generation.",costPer1k:te,inputShare:p,outputShare:u,topModelLabel:m?.model??n.model,topModelShare:_,topCallLabel:C?`#${C.callNumber}`:"None",topCallShare:E,topCallDetail:C?`Raw event #${C.index}, ${C.totalTokens.toLocaleString()} tokens.`:"No token-bearing model call rows were imported."}}function El(n){let t=n.reduce((d,p)=>d+p.estimatedUsd,0),e=[...n].sort((d,p)=>p.estimatedUsd-d.estimatedUsd)[0]??null,i=[...n].sort((d,p)=>p.inputTokens-d.inputTokens)[0]??null,o=[...n].sort((d,p)=>p.outputTokens-d.outputTokens)[0]??null,r=n.length?t/n.length:0;return[{label:"Model calls",value:n.length.toLocaleString(),detail:"Token-bearing llm_request events imported from the VS Code debug log."},{label:"Most expensive call",value:e?`#${e.callNumber} \xB7 $${e.estimatedUsd.toFixed(4)}`:"None",detail:e?`${e.totalTokens.toLocaleString()} tokens, raw event #${e.index}.`:"No priced model call rows are available."},{label:"Largest raw input",value:i?`#${i.callNumber} \xB7 ${i.inputTokens.toLocaleString()}`:"None",detail:i?"This is the biggest raw inputTokens payload sent into the model before splitting normal and cached input.":"No input token totals were imported."},{label:"Largest output",value:o?`#${o.callNumber} \xB7 ${o.outputTokens.toLocaleString()}`:"None",detail:o?"This is the largest generated response in the imported model calls.":"No output token totals were imported."},{label:"Avg cost / call",value:`$${r.toFixed(4)}`,detail:"Useful for spotting whether cost came from one spike or many steady calls."}]}function kl(n,t,e){let i=t.reduce((ie,X)=>ie+X.inputUsd+X.cachedInputUsd+X.cacheWriteUsd,0),o=t.reduce((ie,X)=>ie+X.outputUsd,0),r=Math.max(we(n),0),d=r>0?i/r*100:0,p=r>0?o/r*100:0,u=t.reduce((ie,X)=>ie+X.inputUsd,0),m=t.reduce((ie,X)=>ie+X.cachedInputUsd,0),_=t.reduce((ie,X)=>ie+X.cacheWriteUsd,0),C=e[0],E=C&&r>0?C.estimatedUsd/r*100:0,Y=[...t].sort((ie,X)=>X.totalUsd-ie.totalUsd)[0],Z=Y&&r>0?Y.totalUsd/r*100:0,te=n.traceSummary.toolCalls,K=n.traceSummary.modelTurns>0?te/n.traceSummary.modelTurns:0,ne=t.length;return[{title:"Input-side spend",value:`$${i.toFixed(4)}`,detail:d>=p?`${d.toFixed(0)}% of the $${r.toFixed(4)} run usage. Split: $${u.toFixed(4)} normal input, $${m.toFixed(4)} cached input${_?`, $${_.toFixed(4)} cache write`:""}.`:`Input/cache contributes ${d.toFixed(0)}% of the $${r.toFixed(4)} run usage. Output is larger here.`,tone:d>=75?"high":d>=50?"medium":"low"},{title:"Largest model call",value:C?`$${C.estimatedUsd.toFixed(4)}`:"None",detail:C?`Raw event index #${C.index} used ${C.totalTokens.toLocaleString()} tokens and accounts for about ${E.toFixed(0)}% of this run.`:"No token-bearing model calls were imported for this session.",tone:E>=25?"high":E>=10?"medium":"low"},{title:"Model mix",value:ne===1?Y?.model??n.model:`${ne} models`,detail:Y?`${Y.model} contributes about ${Z.toFixed(0)}% of usage using the ${Y.pricingModel} price row.`:"No model breakdown is available for this session.",tone:ne>1||Z>=80?"medium":"low"},{title:"Tool activity",value:te.toLocaleString(),detail:te>0?`${K.toFixed(1)} tool calls per model turn. Tool results can increase later prompt/context size when they are sent back to the model.`:"No tool calls were imported for this session.",tone:K>=4?"high":K>=2?"medium":"low"}]}function Rl(n,t){return Xr(n,t).sort((e,i)=>i.totalTokens-e.totalTokens).slice(0,5)}function Il(n,t,e,i,o){let r=new Map,d=-1,p=Xr(n,t).map((u,m)=>{let _=zl(u,n),C=Dl(u,n,d),E=Al(u,e),Y=Ll(E,u),Z=(r.get(Y)??0)+u.inputTokens;r.set(Y,Z);let te=qr(E?.promptLimitTokens),K=qr(E?.contextWindowTokens);return d=u.index,Q(O({},u),{callNumber:m+1,share:i>0?u.estimatedUsd/i*100:0,contextLabel:_.label,contextDetail:_.detail,startsAfterUserRequest:!!C,userRequestIndex:C?.index??null,userRequestDetail:C?Ai(C.detail,110):null,promptLimitTokens:te,contextWindowTokens:K,promptLimitShare:te?u.inputTokens/te:null,contextWindowShare:K?u.inputTokens/K:null,cumulativeRawInputTokens:Z,repeatedInputFactorAtCall:u.inputTokens>0?Z/u.inputTokens:0})});return o==="largest"?[...p].sort((u,m)=>m.estimatedUsd-u.estimatedUsd||m.totalTokens-u.totalTokens):p}function Li(n){let t=n.attributes?.find(o=>o.label==="category")?.value.toLowerCase()??"",e=n.name.toLowerCase(),i=n.detail.toLowerCase();return n.type==="discovery"||e.includes("discovery")||e.includes("customization")||t==="customization"||i.startsWith("resolved ")}function Dl(n,t,e){return[...t].reverse().find(i=>i.type==="user_message"&&i.index>e&&i.index<n.index)??null}function Al(n,t){if(!t.length)return null;let e=n.rawModel||n.model||xn(n.detail),i=Ce(e);return i?t.find(o=>[o.model,o.modelId,...o.rawModels].map(d=>Ce(d)).filter(Boolean).some(d=>d===i||i.includes(d)||d.includes(i)))??(t.length===1?t[0]:null):t.length===1?t[0]:null}function Ll(n,t){return Ce(n?.modelId??"")||Ce(n?.model??"")||Ce(t.rawModel??"")||Ce(t.model??"")||Ce(t.pricingModel??"")||"unknown"}function qr(n){return typeof n=="number"&&n>0?n:null}function Xr(n,t){return n.filter(e=>e.inputTokens||e.outputTokens).map(e=>{let i=zi(e,t),o=Fi(e),r=$t(i,{input:o,cachedInput:e.cachedInputTokens??0}),d=fe(o,r.input),p=fe(e.cachedInputTokens??0,r.cachedInput),u=fe(e.cacheWriteTokens??0,r.cacheWrite??0),m=fe(e.outputTokens,r.output),_=Bt(e)??e.estimatedCost?.usd??d+p+u+m;return Q(O({},e),{totalTokens:Ni(e),pricingModel:i,usesFallbackPrice:jt(e.model||xn(e.detail),i),inputUsd:d,cachedInputUsd:p,cacheWriteUsd:u,outputUsd:m,estimatedUsd:_})})}function Ni(n){return n.totalTokens??n.inputTokens+n.outputTokens+(n.cacheWriteTokens??0)}function Fi(n){return Math.max(0,n.inputTokens-(n.cachedInputTokens??0))}function Nl(n){return n.type==="user_message"||n.type==="llm_request"||n.type.includes("tool")||n.type==="agent_response"}function Fl(){return["read_file","list_dir","grep_search","semantic_search","fetch_webpage","apply_patch","run_in_terminal"]}function zi(n,t){if(n.pricingModel)return n.pricingModel;let e=t.length===1?t[0].pricingModel:null,i=n.model??xn(n.detail);return jl(i)??e??$n(i)}function fe(n,t){return n/1e6*t}function zl(n,t){let e=[...t].reverse().find(i=>i.index<n.index&&i.detail&&i.type!=="llm_request"&&i.type!=="agent_response");return e?{label:Ul(e.type),detail:Ai(e.detail)}:{label:"No nearby context",detail:Ai(n.detail)}}function Ul(n){return n==="user_message"?"After user prompt":n.includes("tool")?"After tool event":`After ${n.replace(/_/g," ")}`}function Ai(n,t=180){let e=String(n??"").replace(/\s+/g," ").trim();return e.length>t?`${e.slice(0,t-1)}...`:e}function Vl(n){return n.input+n.cachedInput+n.cacheWrite+n.output}function $l(n){return n>=15e5?"Very large":n>=5e5?"Large":n>=1e5?"Medium":"Small"}function Cn(n,t){return n.reduce((e,i)=>e+i.tokens[t],0)}function xn(n){return String(n).split(":")[0]?.trim()??""}function jl(n){let t=Ce(n);if(!t)return null;let e=$n(n);return Ce(e)===t||t.includes(Ce(e))?e:null}var vn=class n{createState(t){let e=q(()=>{let _=t.selectedSession();return _?Wr(_,t.modelCallSort()):null}),i=q(()=>{let _=t.selectedSession();return _?Kr(_.traceEvents,_.modelBreakdown):[]}),o=q(()=>{let _=t.selectedSession();return _?_.traceEvents.filter(C=>Yr(C,t.traceFilter())):[]}),r=q(()=>{let _=t.selectedTraceEventIndex(),C=o();return C.find(E=>E.index===_)??C[0]??null}),d=q(()=>{let _=t.selectedSession(),C=r();return!_||!C?null:Qr(C,_.modelBreakdown)}),p=q(()=>{let _=t.selectedSession();return!!(_&&!t.filteredSessions().some(C=>C.id===_.id))}),u=q(()=>{let _=t.selectedSession();return _?_.modelBreakdown.filter(C=>Jr(C.model,C.pricingModel)).map(C=>({model:C.model,pricingModel:C.pricingModel,turns:C.turns})):[]}),m=q(()=>{let _=t.selectedSession();return _?st(_):null});return{costExplanation:e,flowEvents:i,filteredTraceEvents:o,selectedTraceEvent:r,selectedTraceEventDetails:d,selectedSessionOutsideFilters:p,selectedPricingFallbacks:u,selectedTriage:m}}static \u0275fac=function(e){return new(e||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})};var Bl=(n,t)=>t.label,Hl=(n,t)=>t.model,ql=(n,t)=>t.title,ea=(n,t)=>t.name;function Wl(n,t){n&1&&(s(0,"strong"),l(1,"Not in local logs"),a(),s(2,"em"),l(3,"not priced for this run"),a())}function Gl(n,t){if(n&1&&(s(0,"strong"),l(1),h(2,"number"),a(),s(3,"em"),l(4),h(5,"number"),a()),n&2){let e=g().$implicit;c(),b("",M(2,2,e.tokens)," tokens"),c(3),b("$",k(5,4,e.usd,"1.6-6"))}}function Kl(n,t){if(n&1&&(s(0,"article")(1,"span"),l(2),R(3,"app-help-popover",22),a(),x(4,Wl,4,0)(5,Gl,6,7),a()),n&2){let e=t.$implicit,i=g();V("unavailable",e.tokens===0&&i.isCacheCategory(e))("hidden-cache",!i.cost.hasCacheData&&i.isCacheCategory(e)),c(2),b(" ",e.label," "),c(),P("text",e.description)("label","Explain "+e.label),c(),v(!i.cost.hasCacheData&&i.isCacheCategory(e)?4:5)}}function Yl(n,t){n&1&&(s(0,"em",25),l(1,"fallback"),a())}function Ql(n,t){if(n&1&&(s(0,"em"),l(1),h(2,"number"),h(3,"number"),a()),n&2){let e=g().$implicit;c(),$("",M(2,2,e.tokens.cachedInput)," cached in / ",M(3,4,e.tokens.cacheWrite)," cache write")}}function Jl(n,t){if(n&1&&(l(0," Per-call tiered rates "),s(1,"em"),l(2),a()),n&2){let e=g().$implicit;c(2),f(e.pricingTierLabel)}}function Zl(n,t){if(n&1&&(s(0,"em"),l(1),h(2,"number"),h(3,"number"),a()),n&2){let e=g(2).$implicit;c(),$("$",k(2,2,e.cachedInputRate,"1.0-3")," cached / $",k(3,5,e.cacheWriteRate,"1.0-3")," write")}}function Xl(n,t){if(n&1&&(s(0,"em"),l(1),h(2,"number"),a()),n&2){let e=g(2).$implicit;c(),b("$",k(2,1,e.cachedInputRate,"1.0-3")," cached")}}function ec(n,t){if(n&1&&(l(0),h(1,"number"),h(2,"number"),x(3,Zl,4,8,"em")(4,Xl,3,4,"em")),n&2){let e=g().$implicit;$(" $",k(1,3,e.inputRate,"1.0-3")," in / $",k(2,6,e.outputRate,"1.0-3")," out "),c(3),v(e.cacheWriteRate?3:4)}}function tc(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g().$implicit;b(" / ",k(1,1,e.cachedInputUsd,"1.6-6")," cached ")}}function nc(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g().$implicit;b(" / ",k(1,1,e.cacheWriteUsd,"1.6-6")," write ")}}function ic(n,t){if(n&1&&(s(0,"div",17)(1,"strong",23),l(2),s(3,"em"),l(4),h(5,"number"),a()(),s(6,"span",24),l(7),s(8,"em"),l(9),a(),x(10,Yl,2,0,"em",25),a(),s(11,"span",26),l(12),h(13,"number"),h(14,"number"),x(15,Ql,4,6,"em"),a(),s(16,"span",27),x(17,Jl,3,1)(18,ec,5,9),a(),s(19,"span",28),l(20),h(21,"number"),s(22,"em"),l(23),h(24,"number"),x(25,tc,2,4),x(26,nc,2,4),l(27),h(28,"number"),a()(),s(29,"span",29),l(30),h(31,"number"),a()()),n&2){let e=t.$implicit;c(2),b(" ",e.model," "),c(2),$("",M(5,16,e.turns)," model turns \xB7 ",e.provider),c(3),b(" ",e.pricingModel," "),c(2),f(e.pricingTierLabel),c(),v(e.usesFallbackPrice?10:-1),c(2),$(" ",M(13,18,e.tokens.input)," normal in / ",M(14,20,e.tokens.output)," out "),c(3),v(e.tokens.cachedInput||e.tokens.cacheWrite?15:-1),c(2),v(e.hasMixedPricingTiers?17:18),c(3),b(" $",k(21,22,e.totalUsd,"1.6-6")," "),c(3),b(" ",k(24,25,e.inputUsd,"1.6-6")," in "),c(2),v(e.cachedInputUsd||e.cacheWriteUsd?25:-1),c(),v(e.cacheWriteUsd?26:-1),c(),b(" / ",k(28,28,e.outputUsd,"1.6-6")," out "),c(3),b("",k(31,31,e.share,"1.0-0"),"%")}}function oc(n,t){if(n&1&&(s(0,"article",21)(1,"span"),l(2),a(),s(3,"strong"),l(4),a(),s(5,"p"),l(6),a()()),n&2){let e=t.$implicit;P("ngClass",e.tone),c(2),f(e.title),c(2),f(e.value),c(2),f(e.detail)}}function rc(n,t){if(n&1&&(s(0,"li")(1,"strong"),l(2),a(),s(3,"em"),l(4),a()()),n&2){let e=t.$implicit,i=g(4);c(2),f(e.name),c(2),f(i.payloadSizeLabel(e.totalChars))}}function ac(n,t){if(n&1&&(s(0,"ol"),z(1,rc,5,2,"li",null,ea),a()),n&2){let e=g(),i=g(2);c(),U(i.topToolSchemas(e))}}function sc(n,t){n&1&&(s(0,"p"),l(1,"No tool schema side-file details were imported for this run."),a())}function lc(n,t){if(n&1&&(s(0,"li")(1,"strong"),l(2),h(3,"number"),a(),s(4,"em"),l(5),a()()),n&2){let e=t.$implicit,i=g(4);c(2),$("",e.name," \xB7 ",M(3,3,e.calls)," calls"),c(3),f(i.payloadSizeLabel(e.argsChars+e.resultChars))}}function cc(n,t){if(n&1&&(s(0,"ol"),z(1,lc,6,5,"li",null,ea),a()),n&2){let e=g(),i=g(2);c(),U(i.topToolResults(e))}}function dc(n,t){n&1&&(s(0,"p"),l(1,"No tool argument/result payload sizes were imported for this run."),a())}function pc(n,t){if(n&1&&(s(0,"details",30)(1,"summary")(2,"span"),l(3,"Setup payload clues"),a(),s(4,"em"),l(5,"Instruction, tool schema, and tool text sizes"),a()(),s(6,"div",31)(7,"article")(8,"span"),l(9,"System prompt"),a(),s(10,"strong"),l(11),a(),s(12,"em"),l(13),h(14,"number"),h(15,"number"),a()(),s(16,"article")(17,"span"),l(18,"Tool schemas"),a(),s(19,"strong"),l(20),a(),s(21,"em"),l(22),h(23,"number"),h(24,"number"),a()(),s(25,"article")(26,"span"),l(27,"MCP tools"),a(),s(28,"strong"),l(29),h(30,"number"),a(),s(31,"em"),l(32),a()(),s(33,"article")(34,"span"),l(35,"Tool text groups"),a(),s(36,"strong"),l(37),h(38,"number"),a(),s(39,"em"),l(40,"largest imported argument/result groups"),a()()(),s(41,"div",32)(42,"article")(43,"span"),l(44,"Largest tool schemas"),a(),x(45,ac,3,0,"ol")(46,sc,2,0,"p"),a(),s(47,"article")(48,"span"),l(49,"Largest tool argument/result text"),a(),x(50,cc,3,0,"ol")(51,dc,2,0,"p"),a()()()),n&2){let e=t,i=g(2);c(11),f(i.payloadSizeLabel(e.systemPromptChars)),c(2),$("",M(14,11,e.modelCallsWithSystemPromptFile)," model calls referenced ",M(15,13,e.systemPromptFiles)," file(s)"),c(7),f(i.payloadSizeLabel(e.toolSchemaChars)),c(2),$("",M(23,15,e.toolCount)," tools from ",M(24,17,e.toolSchemaFiles)," file(s)"),c(7),f(M(30,19,e.mcpToolCount)),c(3),f(i.mcpToolSummary(e)),c(5),f(M(38,21,i.topToolResults(e).length)),c(8),v(i.topToolSchemas(e).length?45:46),c(5),v(i.topToolResults(e).length?50:51)}}function uc(n,t){if(n&1&&x(0,pc,52,23,"details",30),n&2){let e,i=g();v((e=i.session.requestPayload)?0:-1,e)}}var bn=class n{session;cost;help;pricingSourceUrl;isCacheCategory(t){return t.label==="Cached input"||t.label==="Cache write"}formatCompactNumber(t){return t>=1e3?`${(t/1e3).toLocaleString(void 0,{maximumFractionDigits:t>=1e4?0:1})}k`:t.toLocaleString()}hasPayloadEvidence(t){return t?!!(t.systemPromptChars||t.toolSchemaChars||t.toolCount||t.mcpToolCount||t.toolResultCharsByName.length||t.reasoningEfforts.length):!1}payloadSizeLabel(t){return t>=1e6?`${(t/1e6).toLocaleString(void 0,{maximumFractionDigits:2})}M chars`:t>=1e3?`${(t/1e3).toLocaleString(void 0,{maximumFractionDigits:t>=1e4?0:1})}k chars`:`${t.toLocaleString()} chars`}topToolSchemas(t){return t.largestToolSchemas.slice(0,4)}topToolResults(t){return[...t.toolResultCharsByName].sort((e,i)=>i.resultChars+i.argsChars-(e.resultChars+e.argsChars)).slice(0,4)}mcpToolSummary(t){if(!t.mcpToolCount)return"No MCP tools found in imported tool schema side files.";let e=t.mcpToolNames.slice(0,3).join(", "),i=t.mcpToolNames.length>3?`, +${t.mcpToolNames.length-3} more`:"";return e?`${e}${i}`:"MCP tools were counted, but names were not available."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-cost"]],inputs:{session:"session",cost:"cost",help:"help",pricingSourceUrl:"pricingSourceUrl"},decls:94,vars:34,consts:[[1,"cost-explainer"],[1,"cost-explainer-header"],[1,"eyebrow"],[1,"panel-lede"],[1,"cost-header-actions"],["target","_blank","rel","noreferrer",1,"price-link",3,"href"],["aria-label","Cost answer",1,"diagnostic-hero"],[1,"primary-diagnosis"],[1,"diagnostic-facts"],[1,"section-label"],[1,"cost-categories"],[3,"unavailable","hidden-cache"],["role","table","aria-label","Model price rows",1,"cost-table"],["role","row",1,"cost-row","cost-row-heading"],["label","Explain price row",3,"text"],["label","Explain token columns",3,"text"],["label","Explain rates",3,"text"],["role","row",1,"cost-row"],["aria-label","Cost details",1,"cost-detail-stack"],[1,"cost-detail-panel"],[1,"driver-grid"],[3,"ngClass"],[3,"text","label"],["role","cell","data-label","Model"],["role","cell","data-label","Price row"],[1,"warning-text"],["role","cell","data-label","Tokens"],["role","cell","data-label","Rates / 1M"],["role","cell","data-label","Cost"],["role","cell","data-label","Share"],[1,"cost-detail-panel","payload-evidence"],[1,"payload-grid"],[1,"payload-lists"]],template:function(e,i){e&1&&(s(0,"section",0)(1,"div",1)(2,"div")(3,"p",2),l(4,"Cost diagnosis"),a(),s(5,"h3"),l(6,"Cost answer"),a(),s(7,"p",3),l(8,"Usage first. Token buckets explain the shape."),a()(),s(9,"div",4)(10,"a",5),l(11,"GitHub price source"),a()()(),s(12,"section",6)(13,"article",7)(14,"span"),l(15,"Primary driver"),a(),s(16,"strong"),l(17),a(),s(18,"p"),l(19),a()(),s(20,"div",8)(21,"div")(22,"span"),l(23,"Share"),a(),s(24,"strong"),l(25),h(26,"number"),a(),s(27,"em"),l(28),h(29,"number"),h(30,"number"),a()(),s(31,"div")(32,"span"),l(33,"Top model"),a(),s(34,"strong"),l(35),a(),s(36,"em"),l(37),h(38,"number"),a()(),s(39,"div")(40,"span"),l(41,"Top call"),a(),s(42,"strong"),l(43),a(),s(44,"em"),l(45),h(46,"number"),a()(),s(47,"div")(48,"span"),l(49,"Cost / 1k tokens"),a(),s(50,"strong"),l(51),h(52,"number"),a(),s(53,"em"),l(54,"Using imported token totals"),a()()()(),s(55,"div",9)(56,"h4"),l(57,"Priced buckets"),a()(),s(58,"div",10),z(59,Kl,6,8,"article",11,Bl),a(),s(61,"div",9)(62,"h4"),l(63,"Model pricing"),a()(),s(64,"div",12)(65,"div",13)(66,"span"),l(67,"Model"),a(),s(68,"span"),l(69,"Price row "),R(70,"app-help-popover",14),a(),s(71,"span"),l(72," Tokens "),R(73,"app-help-popover",15),a(),s(74,"span"),l(75,"Rates / 1M "),R(76,"app-help-popover",16),a(),s(77,"span"),l(78,"Cost"),a(),s(79,"span"),l(80,"Share"),a()(),z(81,ic,32,34,"div",17,Hl),a(),s(83,"section",18)(84,"details",19)(85,"summary")(86,"span"),l(87,"Cost drivers"),a(),s(88,"em"),l(89,"Secondary signals behind usage"),a()(),s(90,"div",20),z(91,oc,7,4,"article",21,ql),a()(),x(93,uc,1,1),a()()),e&2&&(c(10),P("href",i.pricingSourceUrl,io),c(7),f(i.cost.costAnswer.category),c(2),f(i.cost.costAnswer.categoryDetail),c(6),b("",k(26,16,i.cost.costAnswer.categoryShare,"1.0-0"),"%"),c(3),$("",k(29,19,i.cost.costAnswer.inputShare,"1.0-0"),"% input / ",k(30,22,i.cost.costAnswer.outputShare,"1.0-0"),"% output"),c(7),f(i.cost.costAnswer.topModelLabel),c(2),b("",k(38,25,i.cost.costAnswer.topModelShare,"1.0-0"),"% of usage"),c(6),f(i.cost.costAnswer.topCallLabel),c(2),$("",k(46,28,i.cost.costAnswer.topCallShare,"1.0-0"),"% \xB7 ",i.cost.costAnswer.topCallDetail),c(6),b("$",k(52,31,i.cost.costAnswer.costPer1k,"1.4-4")),c(8),U(i.cost.categoryRows),c(11),P("text",i.help.priceRow),c(3),P("text","Token columns use priced buckets: normal input, cached input, cache write, and output. Raw VS Code inputTokens is kept in Trace event details."),c(3),P("text",i.help.appEstimate),c(5),U(i.cost.modelRows),c(10),U(i.cost.costDrivers),c(2),v(i.hasPayloadEvidence(i.session.requestPayload)?93:-1))},dependencies:[Oe,ye,ee],styles:['[_nghost-%COMP%]{display:block}.cost-explainer[_ngcontent-%COMP%]{display:grid;gap:12px;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--surface);box-shadow:0 18px 50px #00000038}.cost-explainer-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.cost-header-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}.eyebrow[_ngcontent-%COMP%]{margin:0;color:var(--muted-2);font-size:11px;font-weight:850;letter-spacing:0;text-transform:uppercase}.cost-explainer[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text-strong)}.panel-lede[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--muted);font-size:13px}.price-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-self:start;width:fit-content;min-height:28px;border:1px solid var(--line);border-radius:999px;padding:0 10px;background:var(--surface-soft);color:var(--text);font-size:12px;font-weight:800;text-decoration:none;white-space:nowrap}.diagnostic-hero[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(260px,.72fr) minmax(0,1.28fr);gap:8px}.primary-diagnosis[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.primary-diagnosis[_ngcontent-%COMP%]{display:grid;align-content:start;gap:7px;min-height:100%;padding:13px;border-color:#7c5cff61;background:linear-gradient(135deg,#7c5cff33,#1fd1a514),var(--surface-soft)}.primary-diagnosis[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .section-label[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--muted-2);font-size:12px}.primary-diagnosis[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-weight:850;text-transform:uppercase}.primary-diagnosis[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:23px;line-height:1}.primary-diagnosis[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--text);line-height:1.45;overflow-wrap:anywhere}.diagnostic-facts[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;padding:10px}.diagnostic-facts[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:15px;line-height:1.15;overflow-wrap:anywhere}.diagnostic-facts[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--text);font-size:11px;font-style:normal;line-height:1.35;overflow-wrap:anywhere}.estimate-note[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:8px;padding:10px 12px;background:#ffffff05}.estimate-note.high[_ngcontent-%COMP%]{border-left-color:var(--danger)}.estimate-note.medium[_ngcontent-%COMP%]{border-left-color:var(--warning)}.estimate-note[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:grid;gap:3px}.estimate-note[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .estimate-note[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px}.estimate-note[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.estimate-note[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{margin-top:3px;color:var(--text-strong);font-size:14px;line-height:1.2}.estimate-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere}.estimate-note-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}.estimate-note-meta[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{min-height:24px;border:1px solid var(--line);border-radius:999px;padding:0 8px;background:var(--surface-soft);color:var(--text);font-size:11px;text-transform:none}.section-label[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 14px;margin-bottom:-6px}.section-label[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .cost-drivers[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;color:var(--text-strong);font-size:15px}.section-label[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted)}.cost-detail-stack[_ngcontent-%COMP%]{display:grid;gap:8px}.cost-detail-panel[_ngcontent-%COMP%]{display:grid;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--surface-soft) 58%,transparent)}.cost-detail-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;cursor:pointer;padding:10px 12px;list-style:none}.cost-detail-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.cost-detail-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:after{content:"+";display:inline-grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-weight:760}.cost-detail-panel[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:after{content:"-"}.cost-detail-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--text-strong);font-size:13px;font-weight:760}.cost-detail-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-style:normal}.driver-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.driver-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;align-content:start;gap:7px;border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:8px;padding:12px;background:var(--surface-soft)}.driver-grid[_ngcontent-%COMP%] article.medium[_ngcontent-%COMP%]{border-top-color:var(--warning)}.driver-grid[_ngcontent-%COMP%] article.high[_ngcontent-%COMP%]{border-top-color:var(--danger)}.driver-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:12px;font-weight:800;text-transform:uppercase}.driver-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:20px;line-height:1.1;overflow-wrap:anywhere}.driver-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--text);font-size:13px;line-height:1.45}.payload-evidence[_ngcontent-%COMP%]{border-color:#1fd1a529;background:#1fd1a509}.payload-grid[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%]{display:grid;gap:8px;padding:0 10px 10px}.payload-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(4,minmax(0,1fr))}.payload-lists[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:0}.payload-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;align-content:start;gap:5px;border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--surface-soft)}.payload-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.payload-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:16px;font-weight:760;line-height:1.15;overflow-wrap:anywhere}.payload-grid[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:12px;font-style:normal;line-height:1.35}.payload-lists[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{display:grid;gap:5px;margin:0;padding:0;list-style:none}.payload-lists[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}.payload-lists[_ngcontent-%COMP%] li[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{min-width:0;color:var(--text);font-size:12px;font-weight:720;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cost-categories[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.cost-categories[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;gap:5px;border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--surface-soft)}.cost-categories[_ngcontent-%COMP%] article.unavailable[_ngcontent-%COMP%]{background:#ffffff08}.cost-categories[_ngcontent-%COMP%] article.hidden-cache[_ngcontent-%COMP%]{border-style:dashed}.cost-categories[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:13px;font-style:normal}.cost-categories[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-row-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px}.cost-categories[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong)}.cost-categories[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:18px}.cost-table[_ngcontent-%COMP%]{display:grid;border:1px solid var(--line);border-radius:8px;overflow:auto hidden;background:var(--surface)}.cost-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(140px,1.05fr) minmax(110px,.8fr) minmax(130px,1fr) minmax(130px,.92fr) minmax(120px,.86fr) minmax(54px,.32fr);gap:10px;align-items:start;min-width:760px;padding:11px 12px;border-bottom:1px solid var(--line)}.cost-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.cost-row-heading[_ngcontent-%COMP%]{background:var(--surface-soft);font-size:12px;font-weight:800;text-transform:uppercase}.cost-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:3px}.warning-text[_ngcontent-%COMP%]{color:var(--warning-text, #ffe0a0)!important;font-weight:800}.muted[_ngcontent-%COMP%]{color:var(--muted)}@media(max-width:1100px){.cost-categories[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%], .payload-grid[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-explainer-header[_ngcontent-%COMP%]{display:grid}.diagnostic-facts[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.cost-table[_ngcontent-%COMP%]{overflow:visible;border:0;gap:10px;background:transparent}.cost-row-heading[_ngcontent-%COMP%]{display:none}.cost-row[_ngcontent-%COMP%]{grid-template-columns:1fr;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.cost-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(94px,.3fr) minmax(0,1fr);gap:10px}.cost-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:before{content:attr(data-label);color:var(--muted-2);font-size:11px;font-weight:850;text-transform:uppercase}}@media(max-width:900px){.diagnostic-hero[_ngcontent-%COMP%], .estimate-note[_ngcontent-%COMP%]{grid-template-columns:1fr}.estimate-note-meta[_ngcontent-%COMP%]{justify-content:flex-start}}@media(max-width:600px){.cost-categories[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%], .payload-grid[_ngcontent-%COMP%], .payload-lists[_ngcontent-%COMP%]{grid-template-columns:1fr}.cost-header-actions[_ngcontent-%COMP%]{display:grid;justify-content:stretch}.price-link[_ngcontent-%COMP%]{justify-content:center;width:100%}.diagnostic-facts[_ngcontent-%COMP%]{grid-template-columns:1fr}.section-label[_ngcontent-%COMP%]{display:grid}.cost-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:3px}}.cost-explainer[_ngcontent-%COMP%]{gap:12px;border-radius:14px;box-shadow:0 14px 36px #0000002e}.eyebrow[_ngcontent-%COMP%], .primary-diagnosis[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:10px;font-weight:760;letter-spacing:.08em}.cost-explainer[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;font-weight:760;line-height:1.2}.panel-lede[_ngcontent-%COMP%]{font-size:12px}.price-link[_ngcontent-%COMP%]{padding:4px 8px;font-size:11px;font-weight:720}.diagnostic-hero[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%]{gap:8px}.primary-diagnosis[_ngcontent-%COMP%], .diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .estimate-note[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .cost-table[_ngcontent-%COMP%]{border-radius:12px}.diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{padding:10px}.diagnostic-facts[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:15px;font-weight:760}.diagnostic-facts[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .driver-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-categories[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .cost-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .section-label[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px}.section-label[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .cost-drivers[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:14px;font-weight:760}.driver-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:17px;font-weight:760}.cost-categories[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:15px;font-weight:760}.cost-row[_ngcontent-%COMP%]{gap:10px;padding:9px 10px}.cost-row-heading[_ngcontent-%COMP%]{font-size:11px;font-weight:720}.theme-light[_nghost-%COMP%] .cost-explainer[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .cost-explainer[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffc2,#ffffff70),var(--surface);box-shadow:var(--shadow)}.theme-light[_nghost-%COMP%] .primary-diagnosis[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .primary-diagnosis[_ngcontent-%COMP%]{border-color:#6f5cff38;background:radial-gradient(circle at 0% 0%,rgba(111,92,255,.13),transparent 38%),linear-gradient(135deg,#0c9f830f,#6f5cff09),var(--surface)}.theme-light[_nghost-%COMP%] .diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .diagnostic-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .driver-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .driver-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .cost-categories[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .cost-categories[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .payload-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .payload-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .payload-lists[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .payload-lists[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{background:#ffffffa3}.theme-light[_nghost-%COMP%] .estimate-note[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .estimate-note[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .payload-evidence[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .payload-evidence[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0c9f830a,#6f5cff05),var(--surface)}.theme-light[_nghost-%COMP%] .cost-table[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .cost-table[_ngcontent-%COMP%]{background:var(--surface);box-shadow:var(--shadow-soft)}']})};var Mn=class n{ingestion;summary;help;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-import-context"]],inputs:{ingestion:"ingestion",summary:"summary",help:"help"},decls:64,vars:37,consts:[["aria-label","Imported data context",1,"import-context"],[1,"import-context-title"],[1,"import-context-note"],[1,"import-pill"],[1,"import-context-body"],["label","Explain debug logs",3,"text"],["label","Explain chat snapshots",3,"text"],["label","Explain state DBs",3,"text"],["label","Explain title improvement",3,"text"],["label","Explain empty logs skipped",3,"text"],["label","Explain no-request chats",3,"text"]],template:function(e,i){e&1&&(s(0,"details",0)(1,"summary")(2,"span",1),l(3,"Import context"),a(),s(4,"span",2),l(5,"Totals across imported sessions, not the selected run"),a(),s(6,"span",3),l(7),h(8,"number"),a(),s(9,"span",3),l(10),h(11,"number"),a(),s(12,"span",3),l(13),h(14,"number"),a(),s(15,"span",3),l(16),h(17,"number"),a()(),s(18,"div",4)(19,"p"),l(20," These scan diagnostics explain where the local session data came from. The selected run estimate starts below in the run header. "),a(),s(21,"dl")(22,"div")(23,"dt"),l(24,"Debug logs "),R(25,"app-help-popover",5),a(),s(26,"dd"),l(27),h(28,"number"),a()(),s(29,"div")(30,"dt"),l(31,"Chat snapshots "),R(32,"app-help-popover",6),a(),s(33,"dd"),l(34),h(35,"number"),a()(),s(36,"div")(37,"dt"),l(38,"State DBs "),R(39,"app-help-popover",7),a(),s(40,"dd"),l(41),h(42,"number"),a()(),s(43,"div")(44,"dt"),l(45,"Titles improved "),R(46,"app-help-popover",8),a(),s(47,"dd"),l(48),h(49,"number"),a()(),s(50,"div")(51,"dt"),l(52,"Empty logs skipped "),R(53,"app-help-popover",9),a(),s(54,"dd"),l(55),h(56,"number"),a()(),s(57,"div")(58,"dt"),l(59,"No-request chats "),R(60,"app-help-popover",10),a(),s(61,"dd"),l(62),h(63,"number"),a()()()()()),e&2&&(c(7),b("",M(8,16,i.summary.count)," sessions"),c(3),b("$",k(11,18,i.summary.usd,"1.2-2")," imported estimate"),c(3),b("",M(14,21,i.ingestion.importedDebugLogSessions)," debug logs"),c(3),b("",M(17,23,i.ingestion.enrichedFromStateDbs)," titles improved"),c(9),P("text",i.help.debugLogs),c(2),f(M(28,25,i.ingestion.importedDebugLogSessions)),c(5),P("text",i.help.chatSnapshots),c(2),f(M(35,27,i.ingestion.importedChatSnapshotSessions)),c(5),P("text",i.help.stateDbs),c(2),f(M(42,29,i.ingestion.scannedStateDbs)),c(5),P("text",i.help.stateEnriched),c(2),f(M(49,31,i.ingestion.enrichedFromStateDbs)),c(5),P("text",i.help.emptyDebugLogs),c(2),f(M(56,33,i.ingestion.skippedEmptyDebugLogs)),c(5),P("text",i.help.snapshotsWithoutRequests),c(2),f(M(63,35,i.ingestion.skippedChatSnapshotsWithoutRequests)))},dependencies:[ye,ee],styles:['.import-context[_ngcontent-%COMP%]{border:1px solid var(--line, #dfe6ed);border-radius:12px;background:#ffffff05}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:34px;padding:7px 10px;color:var(--muted, #60717f);cursor:pointer;list-style:none}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .14s ease}.import-context[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.import-context-title[_ngcontent-%COMP%]{color:var(--text-strong, #16202a);font-size:11px;font-weight:780;letter-spacing:.06em;text-transform:uppercase}.import-context-note[_ngcontent-%COMP%]{flex:1 1 auto;min-width:180px;color:var(--muted, #60717f);font-size:11px}.import-pill[_ngcontent-%COMP%]{flex:0 0 auto;border:1px solid var(--line, #dfe6ed);border-radius:999px;padding:3px 7px;background:var(--surface-soft, #f8fafb);color:var(--text, #16202a);font-size:10px;font-weight:720;white-space:nowrap}.import-context-body[_ngcontent-%COMP%]{display:grid;gap:8px;border-top:1px solid var(--line, #dfe6ed);padding:8px 10px 10px}.import-context-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted, #60717f);font-size:11px}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:0}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;min-width:0;border:1px solid var(--line, #e6edf2);border-radius:9px;padding:7px;background:var(--surface-soft, #f8fafb)}.import-context-body[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;min-width:0;color:var(--muted, #60717f);font-size:11px;line-height:1.2}.import-context-body[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--text-strong, #16202a);font-size:13px;font-weight:760}@media(max-width:1100px){.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{flex-wrap:wrap}.import-context-note[_ngcontent-%COMP%]{flex:1 0 100%;order:3}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{margin-top:5px}.import-context-title[_ngcontent-%COMP%], .import-context-note[_ngcontent-%COMP%], .import-pill[_ngcontent-%COMP%]{grid-column:2}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr}}']})};var gc=(n,t)=>t.label;function mc(n,t){if(n&1&&(s(0,"div")(1,"span"),l(2," Reasoning "),R(3,"app-help-popover",6),a(),s(4,"strong"),l(5),a()()),n&2){let e=g();c(3),P("text",e.reasoningHelp()),c(2),f(t)}}function hc(n,t){if(n&1&&(s(0,"span",10),l(1),R(2,"app-help-popover",11),a()),n&2){let e=t.$implicit;P("ngClass",e.tone),c(),b(" ",e.label," "),c(),P("text",e.help)("label","Explain "+e.label)}}function fc(n,t){if(n&1&&(s(0,"section",7)(1,"div",2)(2,"span"),l(3,"Attention"),a(),s(4,"h3"),l(5," Triage "),R(6,"app-help-popover",8),a()(),s(7,"div",9),z(8,hc,3,4,"span",10,gc),a()()),n&2){let e=g(),i=g();c(6),P("text",i.triageHelp),c(2),U(e.warnings)}}function _c(n,t){n&1&&x(0,fc,10,1,"section",7),n&2&&v(t.warnings.length?0:-1)}function Cc(n,t){if(n&1){let e=D();s(0,"section",4)(1,"div",2)(2,"span"),l(3,"Context snapshot"),a(),s(4,"h3"),l(5," Context movement "),R(6,"app-help-popover",12),a()(),s(7,"div",13)(8,"div")(9,"span"),l(10),a(),s(11,"strong"),l(12),a(),s(13,"p"),l(14),a()(),s(15,"button",14),S("click",function(){w(e);let o=g();return y(o.openCallsTimeline.emit())}),l(16," Open Calls timeline "),a()(),s(17,"div",15)(18,"div")(19,"span"),l(20,"Biggest request"),a(),s(21,"strong"),l(22),h(23,"number"),a()(),s(24,"div")(25,"span"),l(26,"Repeated load"),a(),s(27,"strong"),l(28),h(29,"number"),a()(),s(30,"div")(31,"span"),l(32,"Model requests"),a(),s(33,"strong"),l(34),h(35,"number"),a()()()()}if(n&2){let e=t,i=g();c(10),f(e.model),c(2),f(i.limitAnswer(e)),c(2),f(i.limitDetail(e)),c(8),f(M(23,6,e.largestRawInputTokens)),c(6),b("",k(29,8,e.repeatedInputFactor,"1.1-1"),"x"),c(6),f(M(35,11,e.modelCalls))}}function xc(n,t){if(n&1&&(s(0,"div")(1,"dt"),l(2,"Permission"),a(),s(3,"dd"),l(4),a()(),s(5,"div")(6,"dt"),l(7,"Pending edits"),a(),s(8,"dd"),l(9),a()()),n&2){let e=t;c(4),f(e.permissionLevel||"unknown"),c(5),f(e.hasPendingEdits?"Yes":"No")}}var Pn=class n{session;triage=null;triageHelp="";openCallsTimeline=new j;reasoningLabel(){let t=this.session.traceSummary.reasoningEfforts??[];return t.length?t.map(e=>`${e.effort}${e.count>1?` x${e.count}`:""}`).join(", "):""}reasoningHelp(){return"Reasoning effort is shown only when VS Code logged the request setting. It is useful context for debugging a run, but it is not a separate cost bucket."}limitRead(){let t=this.session.modelLimits??[];return t.length?t.reduce((e,i)=>{let o=this.limitShare(e),r=this.limitShare(i);return r!==o?r>o?i:e:i.largestRawInputTokens>e.largestRawInputTokens?i:e}):null}limitShare(t){return t.promptLimitShare??t.contextWindowShare??0}limitPercent(t){return Math.round(this.limitShare(t)*100)}limitMeterPercent(t){return Math.min(100,Math.max(0,this.limitShare(t)*100))}limitDenominatorLabel(t){return t.promptLimitTokens?`${t.promptLimitTokens.toLocaleString()} prompt limit`:t.contextWindowTokens?`${t.contextWindowTokens.toLocaleString()} context window`:"no local limit metadata"}limitAnswer(t){let e=this.limitShare(t),i=t.modelCalls>1&&t.repeatedInputFactor>=2;return e>=.8?"Near limit":e>=.6?"Elevated peak":i?"Repeated context":"Low peak"}limitDetail(t){let e=t.largestRawInputTokens.toLocaleString(),i=this.limitPercent(t);return t.modelCalls>1?`Biggest request: ${e} input tokens, ${i}% of the model prompt limit.`:`Single model request: ${e} input tokens, ${i}% of the model prompt limit.`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-overview"]],inputs:{session:"session",triage:"triage",triageHelp:"triageHelp"},outputs:{openCallsTimeline:"openCallsTimeline"},decls:70,vars:27,consts:[[1,"overview-grid"],[1,"overview-panel","evidence-panel"],[1,"panel-title"],[1,"facts","trace-cards"],[1,"overview-panel","limit-panel"],[1,"overview-panel","session-details"],["label","Explain reasoning",3,"text"],[1,"overview-panel","session-triage"],["label","Explain triage labels",3,"text"],[1,"badge-row"],[1,"triage-badge",3,"ngClass"],[3,"text","label"],["text","This is a quick snapshot. The full Calls timeline shows every model request, user-prompt markers, rises, drops, and links back to Trace.","label","Explain context snapshot"],[1,"limit-snapshot"],["type","button",1,"open-calls-timeline",3,"click"],[1,"limit-facts"]],template:function(e,i){if(e&1&&(s(0,"section",0)(1,"section",1)(2,"div",2)(3,"span"),l(4,"At a glance"),a(),s(5,"h3"),l(6,"Evidence"),a()(),s(7,"div",3)(8,"div")(9,"span"),l(10,"Model calls"),a(),s(11,"strong"),l(12),h(13,"number"),a()(),s(14,"div")(15,"span"),l(16,"Tool calls"),a(),s(17,"strong"),l(18),h(19,"number"),a()(),s(20,"div")(21,"span"),l(22,"Errors"),a(),s(23,"strong"),l(24),h(25,"number"),a()(),s(26,"div")(27,"span"),l(28,"Raw events"),a(),s(29,"strong"),l(30),h(31,"number"),a()(),x(32,mc,6,2,"div"),a()(),x(33,_c,1,1),a(),x(34,Cc,36,13,"section",4),s(35,"section",5)(36,"div",2)(37,"span"),l(38,"Metadata"),a(),s(39,"h3"),l(40,"Session details"),a()(),s(41,"dl")(42,"div")(43,"dt"),l(44,"Type"),a(),s(45,"dd"),l(46),a()(),s(47,"div")(48,"dt"),l(49,"Location"),a(),s(50,"dd"),l(51),a()(),s(52,"div")(53,"dt"),l(54,"Status"),a(),s(55,"dd"),l(56),a()(),s(57,"div")(58,"dt"),l(59,"Created"),a(),s(60,"dd"),l(61),h(62,"date"),a()(),s(63,"div")(64,"dt"),l(65,"Last activity"),a(),s(66,"dd"),l(67),h(68,"date"),a()(),x(69,xc,10,2),a()()),e&2){let o,r,d,p;c(12),f(M(13,13,i.session.traceSummary.modelTurns)),c(6),f(M(19,15,i.session.traceSummary.toolCalls)),c(6),f(M(25,17,i.session.traceSummary.errors)),c(6),f(M(31,19,i.session.traceSummary.totalEvents)),c(2),v((o=i.reasoningLabel())?32:-1,o),c(),v((r=i.triage)?33:-1,r),c(),v((d=i.limitRead())?34:-1,d),c(12),f(i.session.sessionType),c(5),f(i.session.location),c(5),f(i.session.status),c(5),f(k(62,21,i.session.startedAt,"M/d/yyyy, h:mm:ss a")),c(6),f(k(68,24,i.session.endedAt,"M/d/yyyy, h:mm:ss a")),c(2),v((p=i.session.vscodeState)?69:-1,p)}},dependencies:[ye,Oe,Ie,ee],styles:["[_nghost-%COMP%]{display:grid;gap:10px}.overview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);gap:10px;align-items:stretch}.overview-panel[_ngcontent-%COMP%]{display:grid;gap:10px;min-width:0;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--surface)}.evidence-panel[_ngcontent-%COMP%]:only-child{grid-column:1 / -1}.panel-title[_ngcontent-%COMP%]{display:grid;gap:2px}.panel-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.panel-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;margin:0;color:var(--text-strong);font-size:15px;font-weight:760}.facts[_ngcontent-%COMP%]{display:grid;gap:8px}.trace-cards[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}.facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface-soft)}.facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .session-details[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--muted);font-size:12px}.facts[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:18px;font-weight:760;line-height:1.1;overflow-wrap:anywhere}.session-triage[_ngcontent-%COMP%]{align-content:start;background:linear-gradient(135deg,rgba(255,186,74,.08),transparent 60%),var(--surface)}.badge-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;gap:6px}.triage-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;width:fit-content;max-width:100%;border:1px solid var(--line);border-radius:999px;padding:4px 8px;background:#ffffff0f;color:var(--text);font-size:11px;font-weight:720;line-height:1.2}.triage-badge.medium[_ngcontent-%COMP%]{border-color:#ffba4a6b;background:#ffba4a1f;color:var(--warning-text, #ffe0a0)}.triage-badge.high[_ngcontent-%COMP%]{border-color:#f0795a6b;background:#f0795a24;color:var(--danger-text, #ffc2b4)}.session-details[_ngcontent-%COMP%]{gap:12px}.limit-panel[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:radial-gradient(circle at 92% 0%,rgba(111,92,255,.1),transparent 34%),linear-gradient(135deg,#27d6b013,#6f5cff0a),var(--surface)}.limit-snapshot[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}.limit-snapshot[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:grid;gap:4px;min-width:0}.limit-snapshot[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .limit-facts[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:12px}.limit-snapshot[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child > span[_ngcontent-%COMP%]{color:var(--accent-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.limit-snapshot[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:17px;font-weight:780;line-height:1.08}.limit-snapshot[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:880px;margin:0;color:var(--text);font-size:12px;line-height:1.45}.open-calls-timeline[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-height:32px;border:1px solid rgba(31,209,165,.35);border-radius:999px;padding:0 12px;background:var(--teal-soft);color:var(--success-text, #bbfff0);font:inherit;font-size:12px;font-weight:780;white-space:nowrap;box-shadow:var(--shadow-soft, none);cursor:pointer}.open-calls-timeline[_ngcontent-%COMP%]:hover, .open-calls-timeline[_ngcontent-%COMP%]:focus-visible{border-color:var(--accent-2);outline:none;background:#1fd1a52e}.limit-facts[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.limit-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:3px;min-width:0;border:1px solid var(--line);border-radius:9px;padding:8px 9px;background:color-mix(in srgb,var(--surface-soft) 84%,transparent)}.limit-facts[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:15px;font-weight:760;line-height:1.1;overflow-wrap:anywhere}.session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}.session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:var(--surface-soft)}.session-details[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .session-details[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.session-details[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{color:var(--text);font-size:12px;font-weight:680;overflow-wrap:anywhere}.theme-light[_nghost-%COMP%] .overview-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .overview-panel[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffb8,#ffffff6b),var(--surface);box-shadow:var(--shadow-soft)}.theme-light[_nghost-%COMP%] .facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background:#ffffff9e}.theme-light[_nghost-%COMP%] .session-triage[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .session-triage[_ngcontent-%COMP%]{background:radial-gradient(circle at 100% 0%,rgba(255,186,74,.13),transparent 34%),var(--surface)}.theme-light[_nghost-%COMP%] .limit-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .limit-panel[_ngcontent-%COMP%]{background:radial-gradient(circle at 88% 0%,rgba(111,92,255,.1),transparent 32%),linear-gradient(135deg,#0c9f8313,#6f5cff09),var(--surface)}.theme-light[_nghost-%COMP%] .limit-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .limit-facts[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .open-calls-timeline[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .open-calls-timeline[_ngcontent-%COMP%]{background:#ffffff9e}.theme-light[_nghost-%COMP%] .triage-badge[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .triage-badge[_ngcontent-%COMP%]{background:#ffffffb8}@media(max-width:1050px){.overview-grid[_ngcontent-%COMP%], .session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.overview-grid[_ngcontent-%COMP%], .trace-cards[_ngcontent-%COMP%], .session-details[_ngcontent-%COMP%] dl[_ngcontent-%COMP%], .limit-facts[_ngcontent-%COMP%], .limit-snapshot[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})};var vc=(n,t)=>t.value,bc=(n,t)=>t.label;function Mc(n,t){if(n&1&&(s(0,"strong"),l(1),a()),n&2){let e=g();c(),b("",e.activeFilterCount()," active")}}function Pc(n,t){if(n&1&&(s(0,"option",9),l(1),a()),n&2){let e=t.$implicit;P("value",e.value),c(),f(e.label)}}function Oc(n,t){if(n&1&&(s(0,"option",9),l(1),a()),n&2){let e=t.$implicit;P("value",e),c(),f(e==="all"?"All workspaces":e)}}function wc(n,t){if(n&1&&(s(0,"option",9),l(1),a()),n&2){let e=t.$implicit;P("value",e),c(),f(e==="all"?"All models":e)}}function yc(n,t){if(n&1&&(s(0,"option",9),l(1),a()),n&2){let e=t.$implicit;P("value",e),c(),f(e==="all"?"All sizes":e)}}function Sc(n,t){if(n&1&&(s(0,"option",9),l(1),a()),n&2){let e=t.$implicit;P("value",e),c(),f(e==="all"?"All signals":e)}}function Tc(n,t){if(n&1&&(s(0,"span",19),l(1),a()),n&2){let e=t.$implicit;P("ngClass",e.tone),c(),b(" ",e.label," ")}}function Ec(n,t){if(n&1&&(s(0,"span",16)(1,"span",19),l(2),a(),z(3,Tc,2,2,"span",19,bc),a()),n&2){let e=t;c(),P("ngClass",e.sizeTone),c(),b(" ",e.size," "),c(),U(e.warnings.slice(0,1))}}function kc(n,t){if(n&1){let e=D();s(0,"button",13),S("click",function(){let o=w(e).$implicit,r=g();return y(r.selectSession.emit(o))}),s(1,"span",14),l(2),a(),s(3,"span",15),l(4),a(),x(5,Ec,5,2,"span",16),s(6,"span",17)(7,"span"),l(8),h(9,"date"),a(),s(10,"strong"),l(11),h(12,"number"),a()(),s(13,"span",18),l(14),a()()}if(n&2){let e,i=t.$implicit,o=g();V("active",o.selectedSessionId===i.id),c(2),f(i.firstPrompt),c(2),$("",i.workspace," \xB7 ",i.model),c(),v((e=o.sessionTriage(i))?5:-1,e),c(3),f(k(9,9,i.startedAt,"MMM d, HH:mm")),c(3),b("$",k(12,12,o.usageUsd(i),"1.2-2")),c(3),f(o.sourceKindLabel(i.sourceKind))}}function Rc(n,t){n&1&&(s(0,"p",12),l(1,"No sessions match these filters."),a())}var On=class n{sessions=[];filteredSessions=[];selectedSessionId=null;query="";sizeFilter="all";warningFilter="all";workspaceFilter="all";modelFilter="all";timeFilter="all";warningOptions=[];sizeOptions=[];workspaceOptions=[];modelOptions=[];timeOptions=[];queryChange=new j;sizeFilterChange=new j;warningFilterChange=new j;workspaceFilterChange=new j;modelFilterChange=new j;timeFilterChange=new j;selectSession=new j;closeRail=new j;activeFilterCount(){return[this.timeFilter,this.workspaceFilter,this.modelFilter,this.sizeFilter,this.warningFilter].filter(t=>t!=="all").length}sessionTriage(t){return st(t)}sourceKindLabel(t){return t==="vscode-copilot-debug-log"?"Debug log":t==="vscode-chat-session-snapshot"?"Chat snapshot":t}usageUsd(t){return we(t)}trackBySessionId(t,e){return e.id}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-rail"]],inputs:{sessions:"sessions",filteredSessions:"filteredSessions",selectedSessionId:"selectedSessionId",query:"query",sizeFilter:"sizeFilter",warningFilter:"warningFilter",workspaceFilter:"workspaceFilter",modelFilter:"modelFilter",timeFilter:"timeFilter",warningOptions:"warningOptions",sizeOptions:"sizeOptions",workspaceOptions:"workspaceOptions",modelOptions:"modelOptions",timeOptions:"timeOptions"},outputs:{queryChange:"queryChange",sizeFilterChange:"sizeFilterChange",warningFilterChange:"warningFilterChange",workspaceFilterChange:"workspaceFilterChange",modelFilterChange:"modelFilterChange",timeFilterChange:"timeFilterChange",selectSession:"selectSession",closeRail:"closeRail"},decls:53,vars:10,consts:[[1,"sidebar"],[1,"sidebar-header"],["type","button","aria-label","Close session browser",1,"sidebar-close",3,"click"],[1,"search"],["type","search","placeholder","Prompt, repo, model, tag",3,"ngModelChange","ngModel"],["open","",1,"filter-disclosure"],["aria-label","Session filters",1,"filters"],[1,"wide"],[3,"ngModelChange","ngModel"],[3,"value"],[1,"session-list"],["type","button",1,"session-card",3,"active"],[1,"empty","dark"],["type","button",1,"session-card",3,"click"],[1,"session-title"],[1,"session-meta"],[1,"badge-row","compact"],[1,"session-footer"],[1,"session-scan"],[1,"triage-badge",3,"ngClass"]],template:function(e,i){e&1&&(s(0,"aside",0)(1,"header",1)(2,"div")(3,"strong"),l(4,"Sessions"),a(),s(5,"span"),l(6),a()(),s(7,"button",2),S("click",function(){return i.closeRail.emit()}),l(8,"\xD7"),a()(),s(9,"label",3)(10,"span"),l(11,"Search"),a(),s(12,"input",4),S("ngModelChange",function(r){return i.queryChange.emit(r)}),a()(),s(13,"details",5)(14,"summary")(15,"span"),l(16,"Filters"),a(),x(17,Mc,2,1,"strong"),a(),s(18,"div",6)(19,"label",7)(20,"span"),l(21,"Time"),a(),s(22,"select",8),S("ngModelChange",function(r){return i.timeFilterChange.emit(r)}),z(23,Pc,2,2,"option",9,vc),a()(),s(25,"label",7)(26,"span"),l(27,"Workspace"),a(),s(28,"select",8),S("ngModelChange",function(r){return i.workspaceFilterChange.emit(r)}),z(29,Oc,2,2,"option",9,dt),a()(),s(31,"label",7)(32,"span"),l(33,"Model"),a(),s(34,"select",8),S("ngModelChange",function(r){return i.modelFilterChange.emit(r)}),z(35,wc,2,2,"option",9,dt),a()(),s(37,"label")(38,"span"),l(39,"Size"),a(),s(40,"select",8),S("ngModelChange",function(r){return i.sizeFilterChange.emit(r)}),z(41,yc,2,2,"option",9,dt),a()(),s(43,"label")(44,"span"),l(45,"Signal"),a(),s(46,"select",8),S("ngModelChange",function(r){return i.warningFilterChange.emit(r)}),z(47,Sc,2,2,"option",9,dt),a()()()(),s(49,"div",10),z(50,kc,15,15,"button",11,i.trackBySessionId,!0,Rc,2,0,"p",12),a()()),e&2&&(c(6),$("",i.filteredSessions.length," of ",i.sessions.length),c(6),P("ngModel",i.query),c(5),v(i.activeFilterCount()?17:-1),c(5),P("ngModel",i.timeFilter),c(),U(i.timeOptions),c(5),P("ngModel",i.workspaceFilter),c(),U(i.workspaceOptions),c(5),P("ngModel",i.modelFilter),c(),U(i.modelOptions),c(5),P("ngModel",i.sizeFilter),c(),U(i.sizeOptions),c(5),P("ngModel",i.warningFilter),c(),U(i.warningOptions),c(3),U(i.filteredSessions))},dependencies:[Vo,zo,Uo,Ao,Fo,Lo,No,Oe,Ie,ee],styles:["[_nghost-%COMP%]{display:block;min-width:0}.sidebar[_ngcontent-%COMP%]{position:sticky;top:58px;display:flex;flex-direction:column;gap:14px;align-self:start;min-width:0;height:calc(100vh - 58px);min-height:0;border-right:1px solid var(--line);padding:14px;background:var(--rail);color:var(--text);scrollbar-color:var(--scrollbar, #34475e) transparent}.sidebar-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}.sidebar-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px}.sidebar-header[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px}.sidebar-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:11px}.sidebar-close[_ngcontent-%COMP%]{display:none;width:32px;height:32px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:20px;line-height:1;cursor:pointer}.filter-disclosure[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--surface-soft) 76%,transparent)}.filter-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;color:var(--text);font-size:11px;font-weight:780;cursor:pointer}.filter-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent-2);font-size:10px}.filter-disclosure[_ngcontent-%COMP%] .filters[_ngcontent-%COMP%]{padding:0 8px 8px}.search[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:6px;color:var(--muted);font-size:12px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;min-height:34px;border:1px solid var(--line);border-radius:9px;padding:7px 10px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:13px}.filters[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.filters[_ngcontent-%COMP%] .wide[_ngcontent-%COMP%]{grid-column:1 / -1}.filter-count[_ngcontent-%COMP%]{margin:-2px 0 0;color:var(--muted-2);font-size:12px}.session-list[_ngcontent-%COMP%]{display:grid;gap:8px;min-height:0;min-width:0;overflow:auto}.session-card[_ngcontent-%COMP%]{display:grid;gap:6px;width:100%;min-width:0;border:1px solid var(--line);border-radius:11px;padding:11px;background:var(--session-card-bg, var(--surface));color:inherit;text-align:left;cursor:pointer;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease}.session-card[_ngcontent-%COMP%]:hover{border-color:var(--line-strong);background:var(--session-card-hover, var(--surface-raised));transform:translateY(-1px)}.session-card.active[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--session-card-active, var(--surface-soft));box-shadow:0 0 0 2px var(--accent-soft)}.session-card[_ngcontent-%COMP%]:focus-visible, .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible, .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgba(39,214,176,.75);outline-offset:2px}.session-title[_ngcontent-%COMP%]{display:-webkit-box;color:var(--text-strong);font-size:13px;font-weight:680;line-height:1.28;overflow:hidden;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2}.session-meta[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%], .session-scan[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;overflow-wrap:anywhere}.session-footer[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px}.session-footer[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong)}.badge-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:7px}.triage-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;width:fit-content;border:1px solid var(--line);border-radius:999px;padding:3px 7px;background:var(--surface-soft);color:var(--text);font-size:11px;font-weight:720}.triage-badge.medium[_ngcontent-%COMP%]{border-color:#ffba4a73;background:#ffba4a1f;color:var(--warning-text, #ffe0a0)}.triage-badge.high[_ngcontent-%COMP%]{border-color:#ff6b5f80;background:#ff6b5f1f;color:var(--danger-text, #ffc2bd)}.theme-light[_nghost-%COMP%] .sidebar[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .sidebar[_ngcontent-%COMP%]{background:radial-gradient(circle at 0% 0%,rgba(12,159,131,.09),transparent 32%),linear-gradient(180deg,#ffffffb8,#fff3),var(--rail)}.theme-light[_nghost-%COMP%] .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background:#ffffffd1;box-shadow:0 1px #ffffffe6 inset}.theme-light[_nghost-%COMP%] .session-card[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .session-card[_ngcontent-%COMP%]{box-shadow:0 8px 20px #1f2d400e}.theme-light[_nghost-%COMP%] .session-card[_ngcontent-%COMP%]:hover, .theme-light [_nghost-%COMP%] .session-card[_ngcontent-%COMP%]:hover{box-shadow:0 12px 26px #1f2d4017}.theme-light[_nghost-%COMP%] .session-card.active[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .session-card.active[_ngcontent-%COMP%]{border-color:#6f5cff80;box-shadow:0 0 0 2px #6f5cff1f,0 14px 30px #1f2d401a}.empty[_ngcontent-%COMP%]{margin:0;color:var(--muted)}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar, .session-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:10px;height:10px}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .session-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background:var(--scrollbar, #34475e);background-clip:padding-box}@media(max-width:900px){[_nghost-%COMP%]{position:fixed;inset:0 auto 0 0;z-index:100;width:min(380px,92vw);transform:translate(-104%);transition:transform .18s ease}.rail-open[_nghost-%COMP%], .rail-open [_nghost-%COMP%]{transform:translate(0)}.sidebar[_ngcontent-%COMP%]{position:static;height:100%;max-height:none;border:0;border-right:1px solid var(--line);padding:14px;overflow:hidden;box-shadow:18px 0 50px #040a1247}.sidebar-close[_ngcontent-%COMP%]{display:grid;place-items:center}.session-list[_ngcontent-%COMP%]{max-height:none}}@media(max-width:600px){.session-card[_ngcontent-%COMP%]{gap:5px;padding:10px}.session-title[_ngcontent-%COMP%]{font-size:14px}.session-meta[_ngcontent-%COMP%], .session-card[_ngcontent-%COMP%] .badge-row[_ngcontent-%COMP%]{display:none}.session-footer[_ngcontent-%COMP%]{gap:8px;font-size:12px}}"]})};var Ic=(n,t)=>t.value,ta=(n,t)=>t.index,na=(n,t)=>t.label,Dc=(n,t)=>t.title;function Ac(n,t){if(n&1){let e=D();s(0,"button",4),S("click",function(){let o=w(e).$implicit,r=g(2);return y(r.traceFilterChange.emit(o.value))}),l(1),a()}if(n&2){let e=t.$implicit,i=g(2);V("active",i.traceFilter===e.value),c(),b(" ",e.label," ")}}function Lc(n,t){n&1&&l(0," \xB7 opened from Calls ")}function Nc(n,t){if(n&1&&(s(0,"dl")(1,"div")(2,"dt"),l(3,"Tokens"),a(),s(4,"dd"),l(5),h(6,"number"),a()(),s(7,"div")(8,"dt"),l(9,"Estimate"),a(),s(10,"dd"),l(11),h(12,"number"),a()(),s(13,"div")(14,"dt"),l(15,"Status"),a(),s(16,"dd"),l(17),a()()()),n&2){let e=t,i=g();c(5),f(e.hasCost?M(6,3,e.totalTokens):"n/a"),c(6),f(e.hasCost?"$"+k(12,5,e.estimatedUsd,"1.6-6"):"No token cost"),c(6),f(i.status)}}function Fc(n,t){if(n&1&&(s(0,"section",8)(1,"div")(2,"span"),l(3," Selected event "),x(4,Lc,1,0),a(),s(5,"strong"),l(6),a(),s(7,"em"),l(8),h(9,"date"),a()(),x(10,Nc,18,8,"dl"),a()),n&2){let e,i=t,o=g(2);P("ngClass",o.eventKind(i)),c(4),v(o.openedFromTurns?4:-1),c(2),$("#",i.index," \xB7 ",i.name),c(2),Ye("",k(9,8,i.timestamp,"HH:mm:ss")," \xB7 ",o.eventKindLabel(i)," \xB7 ",i.type),c(2),v((e=o.selectedTraceEventDetails)?10:-1,e)}}function zc(n,t){if(n&1&&(s(0,"b"),l(1),h(2,"number"),a()),n&2){let e=g(2).$implicit;c(),b("",M(2,1,e.cachedInputTokens)," cached in")}}function Uc(n,t){if(n&1&&(s(0,"b"),l(1),h(2,"number"),a()),n&2){let e=g(2).$implicit;c(),b("",M(2,1,e.cacheWriteTokens)," cache write")}}function Vc(n,t){if(n&1&&(s(0,"em",16)(1,"strong"),l(2),h(3,"number"),a(),s(4,"span"),l(5),h(6,"number"),x(7,zc,3,3,"b"),x(8,Uc,3,3,"b"),s(9,"b"),l(10),h(11,"number"),a()()()),n&2){let e=g().$implicit,i=g(2);c(2),b("",M(3,5,e.totalTokens??e.inputTokens+e.outputTokens+(e.cacheWriteTokens??0))," tokens"),c(3),b(" ",M(6,7,i.normalInputTokens(e))," normal in "),c(2),v(e.cachedInputTokens?7:-1),c(),v(e.cacheWriteTokens?8:-1),c(2),b("",M(11,9,e.outputTokens)," out")}}function $c(n,t){if(n&1&&(s(0,"em"),l(1),a()),n&2){let e=g().$implicit;c(),f(e.type)}}function jc(n,t){if(n&1){let e=D();s(0,"button",14),S("click",function(){let o=w(e).$implicit,r=g(2);return y(r.selectTraceEvent.emit(o))}),s(1,"span",15),l(2),h(3,"date"),a(),s(4,"strong"),l(5),s(6,"small"),l(7),a()(),s(8,"p"),l(9),a(),x(10,Vc,12,11,"em",16)(11,$c,2,1,"em"),a()}if(n&2){let e=t.$implicit,i=g(2);V("active",(i.selectedTraceEvent==null?null:i.selectedTraceEvent.index)===e.index),P("ngClass",i.eventRowClass(e)),Pe("data-trace-event-index",e.index),c(2),$("",k(3,10,e.timestamp,"HH:mm:ss")," \xB7 #",e.index),c(3),b(" ",e.name," "),c(2),f(i.eventKindLabel(e)),c(2),f(e.detail),c(),v(e.inputTokens||e.outputTokens?10:11)}}function Bc(n,t){n&1&&(s(0,"p",12),l(1,"No trace events match this filter."),a())}function Hc(n,t){n&1&&(s(0,"strong"),l(1,"Opened from Calls"),a())}function qc(n,t){if(n&1){let e=D();s(0,"div",18)(1,"button",4),S("click",function(){let o=w(e),r=g(),d=g(2);return y(d.copyEventDetail(r,o))}),l(2),a(),s(3,"button",4),S("click",function(){w(e);let o=g(),r=g(2);return y(r.copyEventJson(o))}),l(4),a()()}if(n&2){let e=g(3);c(2),b(" ",e.copiedTarget()==="detail"?"Copied":"Copy detail"," "),c(2),b(" ",e.copiedTarget()==="json"?"Copied":"Copy JSON"," ")}}function Wc(n,t){if(n&1&&(s(0,"div",21)(1,"dt"),l(2),a(),s(3,"dd"),l(4),a()()),n&2){let e=t.$implicit;P("ngClass",e.tone??"plain"),c(2),f(e.label),c(2),f(e.value)}}function Gc(n,t){if(n&1&&R(0,"i",31),n&2){let e=g(3),i=g(2);Te("width",i.cachedInputShare(e),"%")}}function Kc(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g(3);b(" / ",M(1,1,e.cachedInputTokens)," cached input ")}}function Yc(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g(3);b(" / ",M(1,1,e.cacheWriteTokens)," cache write ")}}function Qc(n,t){if(n&1&&(s(0,"div",22)(1,"span"),l(2,"Input/cache/output split"),a(),s(3,"div"),R(4,"i",28),x(5,Gc,1,2,"i",29),R(6,"i",30),a(),s(7,"p"),l(8),h(9,"number"),x(10,Kc,2,3),x(11,Yc,2,3),l(12),h(13,"number"),a()()),n&2){let e=g(2),i=g(2);c(4),Te("width",i.inputShare(e),"%"),c(),v(e.cachedInputTokens?5:-1),c(3),b(" ",M(9,7,i.normalInputTokens(e))," normal input "),c(2),v(e.cachedInputTokens?10:-1),c(),v(e.cacheWriteTokens?11:-1),c(),b(" / ",M(13,9,e.outputTokens)," output ")}}function Jc(n,t){if(n&1&&(s(0,"p",23),l(1),a()),n&2){let e=g();c(),b("Fallback pricing row: ",e.pricingModel)}}function Zc(n,t){if(n&1&&(s(0,"div")(1,"dt"),l(2),a(),s(3,"dd"),l(4),a()()),n&2){let e=t.$implicit;c(2),f(e.label),c(2),f(e.value)}}function Xc(n,t){if(n&1&&(s(0,"section",25)(1,"h5"),l(2),a(),s(3,"dl",32),z(4,Zc,5,2,"div",null,na),a()()),n&2){let e=t.$implicit;c(2),f(e.title),c(2),U(e.fields)}}function ed(n,t){if(n&1&&(s(0,"section",19)(1,"span"),l(2),a(),s(3,"p"),l(4),a(),s(5,"dl",20),z(6,Wc,5,3,"div",21,na),a(),x(8,Qc,14,11,"div",22),x(9,Jc,2,1,"p",23),a(),s(10,"div",24),z(11,Xc,6,1,"section",25,Dc),a(),s(13,"section",26)(14,"h5"),l(15),a(),s(16,"p"),l(17),a()(),s(18,"details",27)(19,"summary")(20,"span"),l(21,"Normalized event JSON"),a(),s(22,"em"),l(23,"Imported fields only, not the full VS Code raw payload."),a()(),s(24,"pre"),l(25),a()()),n&2){let e=t,i=g(),o=g(2);P("ngClass",o.inspectorMode(i)),c(2),f(o.inspectorHeadline(i,e)),c(2),f(o.inspectorHint(i,e)),c(2),U(o.primaryFacts(i,e)),c(2),v(e.hasCost&&o.eventKind(i)==="model-call"?8:-1),c(),v(e.usesFallbackPrice?9:-1),c(2),U(o.groupedFields(e)),c(4),f(o.detailHeading(i)),c(2),f(e.detail),c(8),f(o.eventJson(i))}}function td(n,t){if(n&1&&(s(0,"div",17)(1,"span"),l(2),a(),s(3,"div")(4,"h4"),l(5),a(),s(6,"p"),l(7),x(8,Hc,2,0,"strong"),a()(),x(9,qc,5,2,"div",18),a(),x(10,ed,26,8)),n&2){let e,i,o=t,r=g(2);c(2),b("#",o.index),c(3),f(o.name),c(2),$(" ",r.eventKindLabel(o)," \xB7 ",o.type," "),c(),v(r.openedFromTurns?8:-1),c(),v((e=r.selectedTraceEventDetails)?9:-1,e),c(),v((i=r.selectedTraceEventDetails)?10:-1,i)}}function nd(n,t){n&1&&(s(0,"p",12),l(1,"Select a trace event to inspect it."),a())}function id(n,t){if(n&1&&(s(0,"div",6),z(1,Ac,2,3,"button",7,Ic),a(),x(3,Fc,11,11,"section",8),s(4,"div",9)(5,"div",10),z(6,jc,12,13,"button",11,ta,!1,Bc,2,0,"p",12),a(),s(9,"aside",13),x(10,td,11,7)(11,nd,2,0,"p",12),a()()),n&2){let e,i,o=g();c(),U(o.traceFilterOptions),c(2),v((e=o.selectedTraceEvent)?3:-1,e),c(3),U(o.filteredTraceEvents),c(4),v((i=o.selectedTraceEvent)?10:11,i)}}function od(n,t){if(n&1&&(s(0,"em"),l(1),h(2,"number"),h(3,"number"),a()),n&2){let e=g().$implicit;c(),$("",M(2,2,e.totalTokens)," tokens \xB7 about $",k(3,4,e.estimatedUsd,"1.6-6"))}}function rd(n,t){if(n&1&&(s(0,"article",33)(1,"span"),l(2),a(),s(3,"div")(4,"strong"),l(5),a(),x(6,od,4,7,"em"),a(),s(7,"p"),l(8),a()()),n&2){let e=t.$implicit;P("ngClass",e.type),c(2),f(e.flowIndex),c(3),f(e.type),c(),v(e.totalTokens?6:-1),c(2),f(e.detail)}}function ad(n,t){if(n&1&&(s(0,"div",5),z(1,rd,9,5,"article",33,ta),a()),n&2){let e=g();c(),U(e.flowEvents)}}var wn=class n{elementRef=T(eo);pendingScrollIndex=null;copiedTarget=N(null);traceView;traceFilter;traceFilterOptions;filteredTraceEvents;selectedTraceEvent=null;selectedTraceEventDetails=null;openedFromTurns=!1;flowEvents;traceViewChange=new j;traceFilterChange=new j;selectTraceEvent=new j;ngOnChanges(t){(t.selectedTraceEvent||t.openedFromTurns)&&this.openedFromTurns&&this.selectedTraceEvent&&(this.pendingScrollIndex=this.selectedTraceEvent.index)}ngAfterViewChecked(){if(this.pendingScrollIndex===null)return;let t=this.pendingScrollIndex;this.pendingScrollIndex=null;let e=this.elementRef.nativeElement.querySelector(`[data-trace-event-index="${t}"]`);typeof e?.scrollIntoView=="function"&&e.scrollIntoView({block:"center"})}eventRowClass(t){return[this.eventKind(t),t.inputTokens||t.outputTokens?"token-bearing":"",t.status!=="ok"&&t.status!=="unknown"?"error":"",t.type==="user_message"?"user-message":""].filter(Boolean)}eventKind(t){return t.inputTokens||t.outputTokens||t.type==="llm_request"||t.type.toLowerCase().includes("model")||t.model||t.rawModel||this.modelLikeText(t.name)||this.modelLikeText(t.detail)?"model-call":t.type.includes("tool")||this.toolLikeName(t.name)?"tool-call":t.type==="user_message"?"user-message":t.type==="agent_response"||t.type==="assistant.message"?"agent-response":Li(t)?"discovery":"trace-event"}eventKindLabel(t){let e=this.eventKind(t);return e==="model-call"?"Model":e==="tool-call"?"Tool":e==="user-message"?"User":e==="agent-response"?"Response":e==="discovery"?"Discovery":"Event"}groupedFields(t){let e=[{title:"Timing",fields:[]},{title:"Model",fields:[]},{title:"Tokens",fields:[]},{title:"Pricing",fields:[]},{title:"Payload",fields:[]}];for(let i of t.normalizedFields)this.groupForField(i.label,e).fields.push(i);return t.attributeFields.length&&e.find(i=>i.title==="Payload")?.fields.push(...t.attributeFields),e.filter(i=>i.fields.length)}eventJson(t){return JSON.stringify(t,null,2)}copyEventDetail(t,e){this.copyText(e.detail||t.detail||"","detail")}copyEventJson(t){this.copyText(this.eventJson(t),"json")}inspectorMode(t){return this.eventKind(t)}inspectorHeadline(t,e){let i=this.eventKind(t);return i==="model-call"?e.hasCost?"Cost-bearing model call":"Model event without token totals":i==="tool-call"?"Tool activity":i==="user-message"?"User prompt event":i==="agent-response"?"Agent response event":i==="discovery"?"Discovery or setup event":"Raw trace event"}inspectorHint(t,e){let i=this.eventKind(t);return i==="model-call"?e.hasCost?"This is the event priced by Cost and opened from Calls.":"This event is model-related, but the imported row does not include token totals.":i==="tool-call"?"Tool calls are not priced directly here. Their results may affect later model input if sent back as context.":i==="user-message"?"This records the user message boundary. Cost appears on later model-call events.":i==="agent-response"?"This records the assistant response payload. Token cost is tied to the corresponding model-call event.":i==="discovery"?"Setup/discovery events explain environment work, but usually do not carry direct token cost.":"Inspect the normalized fields and raw JSON when you need source-level evidence."}primaryFacts(t,e){let i=this.eventKind(t);return i==="model-call"?[{label:"Estimate",value:e.hasCost?`$${this.formatCost(e.estimatedUsd)}`:"No token cost",tone:e.hasCost?"cost":"plain"},{label:"Total tokens",value:e.hasCost?e.totalTokens.toLocaleString():"n/a"},{label:"Normal input",value:this.normalInputTokens(t).toLocaleString()},...t.cachedInputTokens?[{label:"Cached input",value:t.cachedInputTokens.toLocaleString(),tone:"cost"}]:[],...t.cacheWriteTokens?[{label:"Cache write",value:t.cacheWriteTokens.toLocaleString(),tone:"cost"}]:[],{label:"Output",value:t.outputTokens?t.outputTokens.toLocaleString():"0"},...t.reasoningEffort?[{label:"Reasoning",value:t.reasoningEffort,tone:"plain"}]:[],{label:"Pricing row",value:e.pricingModel||"n/a"}]:i==="tool-call"?[{label:"Tool/event",value:t.name,tone:"tool"},{label:"Status",value:t.status},{label:"Payload fields",value:`${e.attributeFields.length}`},{label:"Direct cost",value:e.hasCost?`$${this.formatCost(e.estimatedUsd)}`:"None"}]:[{label:"Type",value:t.type},{label:"Status",value:t.status},{label:"Payload fields",value:`${e.attributeFields.length}`},{label:"Tokens",value:e.hasCost?e.totalTokens.toLocaleString():"n/a"}]}detailHeading(t){let e=this.eventKind(t);return e==="model-call"?"Model-call detail":e==="tool-call"?"Tool detail":e==="user-message"?"User message":e==="agent-response"?"Response detail":"Imported detail"}inputShare(t){let e=this.pricedTokenTotal(t);return e>0?this.normalInputTokens(t)/e*100:0}cachedInputShare(t){let e=this.pricedTokenTotal(t);return e>0?(t.cachedInputTokens??0)/e*100:0}outputShare(t){let e=this.pricedTokenTotal(t);return e>0?t.outputTokens/e*100:0}normalInputTokens(t){return Math.max(0,t.inputTokens-(t.cachedInputTokens??0))}pricedTokenTotal(t){return this.normalInputTokens(t)+(t.cachedInputTokens??0)+(t.cacheWriteTokens??0)+t.outputTokens}groupForField(t,e){let i=t.toLowerCase();return["raw index","timestamp","ttft"].includes(i)?e[0]:["type","name","status","model","raw model","reasoning text"].includes(i)?e[1]:i.includes("tokens")&&i!=="pricing row"?e[2]:i.includes("pricing")||i.includes("cost")?e[3]:e[4]}toolLikeName(t){return["read_file","list_dir","grep_search","semantic_search","fetch_webpage","apply_patch","run_in_terminal"].some(e=>t.toLowerCase().includes(e))}modelLikeText(t){let e=t.toLowerCase();return["gpt-","claude","gemini","o3","o4","llm_request","language model","copilotlanguagemodel"].some(i=>e.includes(i))}formatCost(t){return t.toLocaleString(void 0,{minimumFractionDigits:6,maximumFractionDigits:6})}async copyText(t,e){t.trim()&&(await navigator.clipboard.writeText(t),this.copiedTarget.set(e),window.setTimeout(()=>{this.copiedTarget()===e&&this.copiedTarget.set(null)},1600))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-trace"]],inputs:{traceView:"traceView",traceFilter:"traceFilter",traceFilterOptions:"traceFilterOptions",filteredTraceEvents:"filteredTraceEvents",selectedTraceEvent:"selectedTraceEvent",selectedTraceEventDetails:"selectedTraceEventDetails",openedFromTurns:"openedFromTurns",flowEvents:"flowEvents"},outputs:{traceViewChange:"traceViewChange",traceFilterChange:"traceFilterChange",selectTraceEvent:"selectTraceEvent"},features:[Lt],decls:16,vars:5,consts:[[1,"trace-tools"],[1,"trace-header"],[1,"eyebrow"],[1,"trace-actions"],["type","button",3,"click"],[1,"flow-chart"],["aria-label","Trace event filter",1,"trace-filter-row","segmented-control"],["type","button",3,"active"],["aria-label","Selected trace event",1,"selected-event-strip",3,"ngClass"],[1,"trace-workbench"],[1,"event-log"],["type","button",1,"event-row",3,"active","ngClass"],[1,"empty"],[1,"trace-inspector"],["type","button",1,"event-row",3,"click","ngClass"],[1,"event-time"],[1,"event-token-badge"],[1,"inspector-title"],["aria-label","Trace event actions",1,"inspector-actions"],[1,"inspector-lens",3,"ngClass"],[1,"inspector-primary-facts"],[3,"ngClass"],["aria-label","Model call token split",1,"inspector-token-split"],[1,"warning-text"],[1,"inspector-groups"],[1,"inspector-group"],[1,"inspector-detail"],[1,"raw-event"],[1,"input-bar"],[1,"cached-input-bar",3,"width"],[1,"output-bar"],[1,"cached-input-bar"],[1,"inspector-fields","compact"],[1,"flow-node",3,"ngClass"]],template:function(e,i){e&1&&(s(0,"section",0)(1,"div",1)(2,"div")(3,"p",2),l(4,"Step 3 \xB7 Verify"),a(),s(5,"h3"),l(6,"Inspect the source event"),a(),s(7,"p"),l(8,"Open the normalized debug-log event behind a turn or signal."),a()(),s(9,"div",3)(10,"button",4),S("click",function(){return i.traceViewChange.emit("logs")}),l(11," View Logs "),a(),s(12,"button",4),S("click",function(){return i.traceViewChange.emit("flow")}),l(13," Flow "),a()()(),x(14,id,12,3)(15,ad,3,0,"div",5),a()),e&2&&(c(10),V("active",i.traceView==="logs"),c(2),V("active",i.traceView==="flow"),c(2),v(i.traceView==="logs"?14:15))},dependencies:[Oe,Ie,ee],styles:['[_nghost-%COMP%]{display:block}.trace-tools[_ngcontent-%COMP%]{display:grid;gap:14px}.trace-header[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:start;justify-content:space-between}.eyebrow[_ngcontent-%COMP%]{margin:0;color:var(--muted-2);font-size:11px;font-weight:850;letter-spacing:0;text-transform:uppercase}.trace-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .trace-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.trace-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--text-strong)}.trace-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--muted)}.trace-filter-row[_ngcontent-%COMP%]{width:fit-content}.trace-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:10px}.trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:6px;padding:8px 12px;background:var(--surface-soft);color:var(--text);font-weight:700;cursor:pointer}.trace-actions[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-color:#1fd1a559;background:var(--teal-soft);color:var(--success-text, #bbfff0)}.segmented-control[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:34px;border:0;border-right:1px solid var(--line);padding:7px 10px;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:800;cursor:pointer}.segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{border-right:0}.segmented-control[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--accent);color:#fff}.trace-workbench[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(310px,.8fr);gap:14px;align-items:start}.selected-event-strip[_ngcontent-%COMP%]{position:sticky;top:68px;z-index:8;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid var(--line);border-left:4px solid var(--accent-2);border-radius:12px;padding:10px 12px;background:linear-gradient(90deg,rgba(31,209,165,.1),transparent 48%),var(--surface-raised);box-shadow:var(--shadow-soft, 0 14px 36px rgba(0, 0, 0, .24));-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.selected-event-strip.model-call[_ngcontent-%COMP%]{border-left-color:#6f5cfff2;background:linear-gradient(90deg,rgba(111,92,255,.13),transparent 48%),var(--surface-raised)}.selected-event-strip.tool-call[_ngcontent-%COMP%]{border-left-color:#ffba4adb}.selected-event-strip[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:grid;gap:3px;min-width:0}.selected-event-strip[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .selected-event-strip[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .selected-event-strip[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-style:normal}.selected-event-strip[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}.selected-event-strip[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);overflow-wrap:anywhere}.selected-event-strip[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:flex;gap:8px;margin:0}.selected-event-strip[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{min-width:92px;border:1px solid var(--line);border-radius:9px;padding:7px 9px;background:#ffffff09}.selected-event-strip[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .selected-event-strip[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.selected-event-strip[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px;font-weight:820;overflow-wrap:anywhere}.event-log[_ngcontent-%COMP%]{display:grid;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface)}.event-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:76px 180px minmax(0,1fr) minmax(190px,.75fr);gap:12px;align-items:start;width:100%;border:0;border-left:4px solid transparent;padding:10px 12px;border-bottom:1px solid var(--line);background:var(--surface-soft);text-align:left;font:inherit;cursor:pointer}.event-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.event-row[_ngcontent-%COMP%]:hover, .event-row.active[_ngcontent-%COMP%]{background:#1fd1a514}.event-row.active[_ngcontent-%COMP%]{border-left-color:var(--accent-2);background:#1fd1a51a;box-shadow:inset 0 0 0 1px #1fd1a524}.event-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .event-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-style:normal}.event-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:grid;gap:5px;color:var(--text-strong);overflow-wrap:anywhere}.event-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{width:fit-content;border:1px solid var(--line);border-radius:999px;padding:2px 6px;color:var(--muted);background:#ffffff08;font-size:10px;font-weight:850;text-transform:uppercase}.event-row[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);overflow-wrap:anywhere}.event-row.error[_ngcontent-%COMP%]{background:#ff6b5f14}.event-row.model-call[_ngcontent-%COMP%]{border-left-color:#6f5cfff2}.event-row.model-call[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{border-color:#6f5cff6b;color:var(--accent);background:#6f5cff24}.event-row.tool-call[_ngcontent-%COMP%]{border-left-color:#ffba4ad1}.event-row.tool-call[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{border-color:#ffba4a6b;color:var(--warning-text, #ffe0a0);background:#ffba4a1f}.event-row.agent-response[_ngcontent-%COMP%]{border-left-color:#4a9dffd1}.event-row.discovery[_ngcontent-%COMP%]{border-left-color:#94a3b8ad}.event-row.user-message[_ngcontent-%COMP%]{border-left-color:var(--accent-2);background:#1fd1a512}.event-row.token-bearing[_ngcontent-%COMP%]{background:linear-gradient(90deg,rgba(111,92,255,.08),transparent 42%),var(--surface-soft)}.event-token-badge[_ngcontent-%COMP%]{display:grid;gap:3px;align-items:start;width:100%;min-width:0;border:1px solid rgba(111,92,255,.38);border-radius:10px;padding:5px 8px;background:#6f5cff21;color:var(--text-strong)!important;font-weight:850;line-height:1.25}.input-bar[_ngcontent-%COMP%]{background:var(--accent)}.cached-input-bar[_ngcontent-%COMP%]{background:var(--accent-2)}.output-bar[_ngcontent-%COMP%]{flex:1;background:var(--warning)}.event-token-badge[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:1px;color:var(--muted);font-size:11px}.event-token-badge[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .event-token-badge[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:inherit;font:inherit}.trace-inspector[_ngcontent-%COMP%]{position:sticky;top:92px;display:grid;gap:14px;max-height:calc(100vh - 112px);overflow:auto;border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--surface-soft)}.inspector-title[_ngcontent-%COMP%]{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px;align-items:start}.inspector-title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:32px;border:1px solid rgba(31,209,165,.35);border-radius:10px;background:var(--teal-soft);color:var(--success-text, #bbfff0);font-weight:900}.inspector-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .inspector-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.inspector-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{overflow-wrap:anywhere}.inspector-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .inspector-fields[_ngcontent-%COMP%] dd[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--text-strong)}.inspector-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-fields[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .inspector-topline[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .inspector-group[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{color:var(--muted);font-size:12px}.inspector-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:inline-flex;margin-left:6px;border:1px solid rgba(31,209,165,.35);border-radius:999px;padding:2px 6px;color:var(--success-text, #bbfff0);background:var(--teal-soft);font-size:10px;font-weight:850;text-transform:uppercase}.inspector-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.inspector-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:28px;border:1px solid var(--line);border-radius:999px;padding:5px 9px;background:var(--surface);color:var(--text);font:inherit;font-size:11px;font-weight:760;cursor:pointer}.inspector-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{border-color:var(--line-strong);background:#ffffff0e}.inspector-lens[_ngcontent-%COMP%]{display:grid;gap:10px;border:1px solid var(--line);border-left:4px solid var(--accent-2);border-radius:12px;padding:12px;background:linear-gradient(135deg,rgba(31,209,165,.08),transparent 58%),var(--surface)}.inspector-lens.model-call[_ngcontent-%COMP%]{border-left-color:#6f5cfff2;background:linear-gradient(135deg,rgba(111,92,255,.13),transparent 58%),var(--surface)}.inspector-lens.tool-call[_ngcontent-%COMP%]{border-left-color:#ffba4adb;background:linear-gradient(135deg,rgba(255,186,74,.1),transparent 58%),var(--surface)}.inspector-lens.agent-response[_ngcontent-%COMP%]{border-left-color:#4a9dffdb}.inspector-lens.discovery[_ngcontent-%COMP%]{border-left-color:#94a3b8d1}.inspector-lens[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px;font-weight:820}.inspector-lens[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:12px}.inspector-primary-facts[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}.inspector-primary-facts[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;gap:4px;min-width:0;border:1px solid var(--line);border-radius:10px;padding:9px;background:#ffffff09}.inspector-primary-facts[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{grid-column:1 / -1}.inspector-primary-facts[_ngcontent-%COMP%] .cost[_ngcontent-%COMP%]{border-color:#1fd1a547;background:#1fd1a512}.inspector-primary-facts[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{border-color:#ffba4a52;background:#ffba4a14}.inspector-primary-facts[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .inspector-primary-facts[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.inspector-primary-facts[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-weight:760}.inspector-primary-facts[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{color:var(--text-strong);font-size:13px;font-weight:820;overflow-wrap:anywhere}.inspector-token-split[_ngcontent-%COMP%]{display:grid;gap:6px;border:1px solid var(--line);border-radius:10px;padding:9px;background:#ffffff09}.inspector-token-split[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.inspector-token-split[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;height:8px;overflow:hidden;border-radius:999px;background:#ffffff14}.inspector-token-split[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:block;min-width:2px}.inspector-token-split[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--text);font-size:12px}.inspector-topline[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.inspector-topline[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface)}.inspector-topline.has-cost[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-color:#1fd1a547;background:#1fd1a512}.inspector-topline[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:16px;line-height:1.1;overflow-wrap:anywhere}.inspector-cost[_ngcontent-%COMP%]{display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface)}.inspector-cost[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:24px}.inspector-groups[_ngcontent-%COMP%]{display:grid;gap:10px}.inspector-group[_ngcontent-%COMP%]{display:grid;gap:8px;border:1px solid var(--line);border-radius:10px;padding:10px;background:#ffffff06}.inspector-group[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;text-transform:uppercase}.inspector-fields[_ngcontent-%COMP%]{display:grid;gap:8px;margin:0}.inspector-fields[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;align-items:baseline}.inspector-fields.compact[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{grid-template-columns:90px minmax(0,1fr)}.inspector-fields[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .inspector-fields[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0}.inspector-fields[_ngcontent-%COMP%] dd[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{overflow-wrap:anywhere}.inspector-detail[_ngcontent-%COMP%]{display:grid;gap:8px;border-top:1px solid var(--line);padding-top:12px}.inspector-detail[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;text-transform:uppercase}.raw-event[_ngcontent-%COMP%]{border-top:1px solid var(--line);padding-top:10px}.raw-event[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;font-weight:780;cursor:pointer}.raw-event[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--text)}.raw-event[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted-2);font-size:11px;font-style:normal;font-weight:650;text-align:right}.raw-event[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{max-height:320px;overflow:auto;margin:10px 0 0;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface-tint, rgba(0, 0, 0, .22));color:var(--text);font:12px/1.55 Cascadia Code,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere}.flow-chart[_ngcontent-%COMP%]{display:grid;gap:10px;max-width:760px}.flow-node[_ngcontent-%COMP%]{position:relative;display:grid;grid-template-columns:34px minmax(150px,220px) minmax(0,1fr);gap:12px;align-items:start;border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--surface-soft)}.flow-node[_ngcontent-%COMP%]:after{content:"";position:absolute;left:27px;bottom:-11px;width:2px;height:10px;background:var(--line)}.flow-node[_ngcontent-%COMP%]:last-child:after{display:none}.flow-node[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;font-weight:900}.flow-node[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);text-transform:capitalize}.flow-node[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{display:block;margin-top:3px;color:var(--muted);font-style:normal;font-size:12px}.flow-node[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted);overflow-wrap:anywhere}.warning-text[_ngcontent-%COMP%]{color:var(--warning-text, #ffcf75)!important;font-weight:800}.empty[_ngcontent-%COMP%]{margin:0;color:var(--muted)}@media(max-width:900px){.trace-workbench[_ngcontent-%COMP%]{grid-template-columns:1fr}.trace-inspector[_ngcontent-%COMP%]{position:sticky}}@media(max-width:600px){.trace-header[_ngcontent-%COMP%]{display:grid}.event-row[_ngcontent-%COMP%], .inspector-fields[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .inspector-fields.compact[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .inspector-topline[_ngcontent-%COMP%], .inspector-primary-facts[_ngcontent-%COMP%], .flow-node[_ngcontent-%COMP%]{grid-template-columns:1fr}}.trace-tools[_ngcontent-%COMP%]{gap:12px}.eyebrow[_ngcontent-%COMP%]{font-size:10px;font-weight:760;letter-spacing:.08em}.trace-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;font-weight:760}.trace-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px}.trace-actions[_ngcontent-%COMP%]{gap:6px}.trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:30px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:720}.segmented-control[_ngcontent-%COMP%]{border-radius:999px}.trace-workbench[_ngcontent-%COMP%]{gap:12px}.event-log[_ngcontent-%COMP%], .trace-inspector[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%], .flow-node[_ngcontent-%COMP%]{border-radius:12px}.event-row[_ngcontent-%COMP%]{grid-template-columns:68px 150px minmax(0,1fr) minmax(180px,.75fr);gap:10px;padding:9px 10px}.event-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .event-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .event-row[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .inspector-cost[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .inspector-fields[_ngcontent-%COMP%] dt[_ngcontent-%COMP%], .inspector-detail[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .inspector-topline[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .inspector-group[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], .flow-node[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .flow-node[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px}.event-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .inspector-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:13px;font-weight:760}.trace-inspector[_ngcontent-%COMP%]{top:78px;gap:12px;max-height:calc(100vh - 92px);padding:12px}.inspector-title[_ngcontent-%COMP%]{grid-template-columns:34px minmax(0,1fr) auto}.inspector-title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{min-height:28px;border-radius:9px;font-size:12px}.inspector-cost[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:19px;font-weight:760}.inspector-topline[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:15px;font-weight:760}.inspector-fields[_ngcontent-%COMP%]{gap:7px}.flow-node[_ngcontent-%COMP%]{grid-template-columns:30px minmax(140px,200px) minmax(0,1fr);padding:10px}.theme-light[_nghost-%COMP%] .trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .trace-inspector[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .trace-inspector[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .event-log[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .event-log[_ngcontent-%COMP%]{box-shadow:var(--shadow-soft)}.theme-light[_nghost-%COMP%] .trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .trace-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%]{background:#ffffffad}.theme-light[_nghost-%COMP%] .selected-event-strip[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .selected-event-strip[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .trace-inspector[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .trace-inspector[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffd1,#ffffffa8),var(--surface-raised)}.theme-light[_nghost-%COMP%] .selected-event-strip[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .selected-event-strip[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .inspector-primary-facts[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-primary-facts[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .inspector-token-split[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-token-split[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .inspector-group[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-group[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .inspector-topline[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-topline[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .inspector-cost[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-cost[_ngcontent-%COMP%]{background:#ffffffa8}.theme-light[_nghost-%COMP%] .event-log[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .event-log[_ngcontent-%COMP%]{background:var(--surface)}.theme-light[_nghost-%COMP%] .event-row[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .event-row[_ngcontent-%COMP%]{background:#ffffffad}.theme-light[_nghost-%COMP%] .event-row[_ngcontent-%COMP%]:hover, .theme-light [_nghost-%COMP%] .event-row[_ngcontent-%COMP%]:hover, .theme-light[_nghost-%COMP%] .event-row.active[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .event-row.active[_ngcontent-%COMP%]{background:#0c9f8314}.theme-light[_nghost-%COMP%] .event-row.token-bearing[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .event-row.token-bearing[_ngcontent-%COMP%]{background:linear-gradient(90deg,rgba(111,92,255,.075),transparent 42%),#ffffffb3}.theme-light[_nghost-%COMP%] .inspector-lens[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-lens[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(12,159,131,.055),transparent 58%),var(--surface)}.theme-light[_nghost-%COMP%] .inspector-lens.model-call[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .inspector-lens.model-call[_ngcontent-%COMP%]{background:linear-gradient(135deg,rgba(111,92,255,.09),transparent 58%),var(--surface)}.theme-light[_nghost-%COMP%] .raw-event[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .raw-event[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:#f4f8fc}@media(max-width:1250px){.trace-workbench[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}.trace-inspector[_ngcontent-%COMP%]{order:-1;top:148px;z-index:4;max-height:min(300px,calc(100vh - 168px))}.event-row[_ngcontent-%COMP%]{grid-template-columns:76px minmax(135px,.55fr) minmax(0,1fr) minmax(180px,auto)}}@media(max-width:600px){.selected-event-strip[_ngcontent-%COMP%]{grid-template-columns:1fr}.selected-event-strip[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr}.event-row[_ngcontent-%COMP%]{grid-template-columns:1fr}.inspector-title[_ngcontent-%COMP%]{grid-template-columns:34px minmax(0,1fr)}.inspector-actions[_ngcontent-%COMP%]{grid-column:1 / -1;justify-content:flex-start}.raw-event[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:grid}.raw-event[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{text-align:left}}']})};var sd=(n,t)=>t.label,ia=(n,t)=>t.index,ld=(n,t)=>t.signature;function cd(n,t){if(n&1&&R(0,"i",21),n&2){let e=g(),i=g(2);Te("width",i.cachedInputShare(e),"%")}}function dd(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g();b(" / ",M(1,1,e.cachedInputTokens)," cached in ")}}function pd(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g();b(" / ",M(1,1,e.cacheWriteTokens)," cache write ")}}function ud(n,t){if(n&1){let e=D();s(0,"section",6)(1,"div")(2,"span"),l(3,"Largest single call"),a(),s(4,"strong"),l(5),h(6,"number"),a(),s(7,"p"),l(8),h(9,"number"),h(10,"number"),a()(),s(11,"div",15)(12,"span"),l(13,"Input/cache/output split"),a(),s(14,"div",16),R(15,"i",17),x(16,cd,1,2,"i",18),R(17,"i",19),a(),s(18,"p"),l(19),h(20,"number"),x(21,dd,2,3),x(22,pd,2,3),l(23),h(24,"number"),a()(),s(25,"button",20),S("click",function(){let o=w(e),r=g(2);return y(r.openTraceEvent.emit(o.index))}),l(26),a()()}if(n&2){let e=t,i=g(2);c(5),$("#",e.callNumber," \xB7 $",k(6,15,e.estimatedUsd,"1.4-4")),c(3),Ye("",e.model||e.name," \xB7 ",M(9,18,e.totalTokens)," tokens \xB7 ",k(10,20,e.share,"1.0-0"),"% of usage. Most runs are cumulative, so read this as the biggest spike, not the sole cause."),c(7),Te("width",i.normalInputShare(e),"%"),c(),v(e.cachedInputTokens?16:-1),c(),Te("width",i.outputShare(e),"%"),c(2),b(" ",M(20,23,i.normalInputTokens(e))," normal in "),c(2),v(e.cachedInputTokens?21:-1),c(),v(e.cacheWriteTokens?22:-1),c(),b(" / ",M(24,25,e.outputTokens)," out "),c(3),b(" Open trace #",e.index," ")}}function gd(n,t){if(n&1&&(s(0,"div",27)(1,"span")(2,"em"),l(3," Biggest request "),R(4,"app-help-popover",31),a(),s(5,"strong"),l(6),h(7,"number"),a()(),s(8,"span")(9,"em"),l(10," Limit used "),R(11,"app-help-popover",32),a(),s(12,"strong"),l(13),a()(),s(14,"span")(15,"em"),l(16," Repeated load "),R(17,"app-help-popover",33),a(),s(18,"strong"),l(19),h(20,"number"),a()(),s(21,"span")(22,"em"),l(23," Model requests "),R(24,"app-help-popover",34),a(),s(25,"strong"),l(26),h(27,"number"),a()()()),n&2){let e=t,i=g(3);c(4),P("text",i.contextHelp.biggestRequest)("interactive",!1),c(2),f(M(7,12,e.inputTokens)),c(5),P("text",i.contextHelp.limitUsed)("interactive",!1),c(2),f(i.contextLimitPercentLabel(e)),c(4),P("text",i.contextHelp.repeatedInput)("interactive",!1),c(2),b("",k(20,14,i.contextRepeatedFactor(),"1.1-1"),"x"),c(5),P("text",i.contextHelp.calls)("interactive",!1),c(2),f(M(27,17,i.cost.modelCallRows.length))}}function md(n,t){if(n&1&&(s(0,"small",26),l(1,"You"),a()),n&2){let e=g().$implicit,i=g(3);Pe("aria-label",i.userRequestMarkerLabel(e))}}function hd(n,t){if(n&1){let e=D();s(0,"button",35),S("click",function(){let o=w(e).$implicit,r=g(3);return y(r.openTraceEvent.emit(o.index))}),s(1,"span",36),l(2),s(3,"span",37),x(4,md,2,1,"small",26),a()(),s(5,"i",38),R(6,"b"),a(),s(7,"strong"),l(8),h(9,"number"),a(),s(10,"em"),l(11),a()()}if(n&2){let e=t.$implicit,i=g(3);V("after-user-request",e.startsAfterUserRequest),P("ngClass",i.contextPressureClass(e)),Pe("aria-label","Open trace event "+e.index+" for model call "+e.callNumber),c(2),b(" #",e.callNumber," "),c(2),v(e.startsAfterUserRequest?4:-1),c(2),Te("height",i.contextBarHeight(e),"%"),c(2),f(M(9,10,e.inputTokens)),c(3),f(i.contextLimitPercentLabel(e))}}function fd(n,t){if(n&1&&(s(0,"p",30),l(1),a()),n&2){let e=g(3);c(),f(e.contextTimelineSummary())}}function _d(n,t){if(n&1&&(s(0,"section",7)(1,"div",22)(2,"div")(3,"span",23),l(4,"Context load"),a(),s(5,"h4"),l(6," Input sent to the model "),R(7,"app-help-popover",24),a(),s(8,"p"),l(9,"Each bar is one model request. A drop means the next request sent less context; a climb means more context was carried forward."),a(),s(10,"p",25)(11,"span",26),l(12,"You"),a(),l(13," Model request after a user prompt. "),a()(),x(14,gd,28,19,"div",27),a(),s(15,"div",28),z(16,hd,12,12,"button",29,ia),a(),x(18,fd,2,1,"p",30),a()),n&2){let e,i,o=g(2);c(7),P("text",o.contextHelp.timeline),c(7),v((e=o.contextPeakCall())?14:-1,e),c(2),U(o.contextTimelineRows()),c(2),v((i=o.contextPeakCall())?18:-1,i)}}function Cd(n,t){if(n&1&&(s(0,"div",43)(1,"span",45),l(2),s(3,"em"),l(4),h(5,"number"),a()(),s(6,"span",46),l(7),h(8,"number"),s(9,"em"),l(10),h(11,"number"),h(12,"number"),a()(),s(13,"span",47),l(14),h(15,"number"),s(16,"em"),l(17),h(18,"number"),a()(),s(19,"span",48),l(20),h(21,"number"),s(22,"em"),l(23),h(24,"number"),a()()()),n&2){let e=t.$implicit;c(2),$(" Calls #",e.firstCall,"-#",e.lastCall," "),c(2),b("",M(5,10,e.callCount)," model calls"),c(3),b(" ",M(8,12,e.totalChars)," chars "),c(3),$("",M(11,14,e.systemPromptChars)," instructions / ",M(12,16,e.toolSchemaChars)," tools"),c(4),b(" ",M(15,18,e.toolCount)," tools "),c(3),b("",M(18,20,e.mcpToolCount)," MCP tools"),c(3),b(" ",k(21,22,e.averageInputTokens,"1.0-0")," avg input "),c(3),b("",M(24,25,e.maxInputTokens)," biggest request")}}function xd(n,t){if(n&1&&(s(0,"details",8)(1,"summary")(2,"span")(3,"strong"),l(4,"Setup footprint"),a(),s(5,"em"),l(6),a()(),s(7,"b"),l(8),a()(),s(9,"div",39)(10,"div",40)(11,"article")(12,"span"),l(13,"Instructions"),a(),s(14,"strong"),l(15),h(16,"number"),a(),s(17,"p"),l(18,"chars in the referenced system/custom prompt side file."),a()(),s(19,"article")(20,"span"),l(21,"Tool schemas"),a(),s(22,"strong"),l(23),h(24,"number"),a(),s(25,"p"),l(26),h(27,"number"),a()(),s(28,"article")(29,"span"),l(30,"MCP tools"),a(),s(31,"strong"),l(32),h(33,"number"),a(),s(34,"p"),l(35),a()(),s(36,"article")(37,"span"),l(38,"Setup versions"),a(),s(39,"strong"),l(40),h(41,"number"),a(),s(42,"p"),l(43,"Different instruction/tool payloads observed across model calls."),a()()(),s(44,"div",41)(45,"div",42)(46,"span",13),l(47,"Where"),a(),s(48,"span",13),l(49,"Payload"),a(),s(50,"span",13),l(51,"Tools"),a(),s(52,"span",13),l(53,"Model input"),a()(),z(54,Cd,25,27,"div",43,ld),a(),s(56,"p",44),l(57," This is efficiency evidence: it shows what setup payload was referenced near model calls. It does not assign exact dollars to instructions, tools, or MCP. "),a()()()),n&2){let e=t;c(6),f(e.summary),c(2),f(e.changeLabel),c(7),f(M(16,8,e.instructionChars)),c(8),f(M(24,10,e.toolSchemaChars)),c(3),b("",M(27,12,e.toolCount)," tools described to the model."),c(6),f(M(33,14,e.mcpToolCount)),c(3),f(e.mcpPreview),c(5),f(M(41,16,e.profiles.length)),c(14),U(e.profiles)}}function vd(n,t){if(n&1&&(s(0,"article")(1,"span"),l(2),a(),s(3,"strong"),l(4),a(),s(5,"p"),l(6),a()()),n&2){let e=t.$implicit;c(2),f(e.label),c(2),f(e.value),c(2),f(e.detail)}}function bd(n,t){n&1&&(s(0,"em",54),l(1,"fallback pricing"),a())}function Md(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g().$implicit;b(" / ",M(1,1,e.cachedInputTokens)," cached in ")}}function Pd(n,t){if(n&1&&(l(0),h(1,"number")),n&2){let e=g().$implicit;b(" / ",M(1,1,e.cacheWriteTokens)," cache write ")}}function Od(n,t){if(n&1){let e=D();s(0,"div",49)(1,"strong",50)(2,"button",51),S("click",function(){let o=w(e).$implicit,r=g(2);return y(r.openTraceEvent.emit(o.index))}),l(3),a()(),s(4,"span",52),l(5),h(6,"date"),s(7,"em"),l(8),a()(),s(9,"span",53),l(10),s(11,"em"),l(12),a(),x(13,bd,2,0,"em",54),a(),s(14,"span",55),l(15),h(16,"number"),s(17,"em"),l(18),h(19,"number"),x(20,Md,2,3),x(21,Pd,2,3),l(22),h(23,"number"),a()(),s(24,"span",56),l(25),h(26,"number"),s(27,"em"),l(28),h(29,"number"),h(30,"number"),a()(),s(31,"span",57)(32,"span",58),R(33,"i"),a(),l(34),h(35,"number"),a(),s(36,"span",59),l(37),s(38,"em"),l(39),a()()()}if(n&2){let e=t.$implicit,i=g(2);Te("--share",e.share,"%"),c(3),b(" #",e.callNumber," "),c(2),b(" ",k(6,19,e.timestamp,"HH:mm:ss")," "),c(3),b("raw index #",e.index),c(2),b(" ",e.model||e.name," "),c(2),f(e.pricingModel),c(),v(e.usesFallbackPrice?13:-1),c(2),b(" ",M(16,22,e.totalTokens)," "),c(3),b(" ",M(19,24,i.normalInputTokens(e))," normal in "),c(2),v(e.cachedInputTokens?20:-1),c(),v(e.cacheWriteTokens?21:-1),c(),b(" / ",M(23,26,e.outputTokens)," out "),c(3),b(" $",k(26,28,e.estimatedUsd,"1.6-6")," "),c(3),$(" ",k(29,31,i.inputCostUsd(e),"1.6-6")," input/cache / ",k(30,34,e.outputUsd,"1.6-6")," out "),c(6),b(" ",k(35,37,e.share,"1.0-0"),"% "),c(3),b(" ",e.contextLabel," "),c(2),f(e.contextDetail)}}function wd(n,t){if(n&1&&(x(0,ud,27,27,"section",6),x(1,_d,19,3,"section",7),x(2,xd,58,18,"details",8),s(3,"details",9)(4,"summary")(5,"span"),l(6,"Call stats"),a(),s(7,"strong"),l(8),h(9,"number"),a()(),s(10,"div",10),z(11,vd,7,3,"article",null,sd),a()(),s(13,"div",11)(14,"div",12)(15,"span",13),l(16,"Call"),a(),s(17,"span",13),l(18,"When"),a(),s(19,"span",13),l(20,"Model"),a(),s(21,"span",13),l(22,"Tokens"),a(),s(23,"span",13),l(24,"Cost"),a(),s(25,"span",13),l(26,"Share"),a(),s(27,"span",13),l(28,"Nearby context"),a()(),z(29,Od,40,40,"div",14,ia),a()),n&2){let e,i,o=g();v((e=o.topModelCall())?0:-1,e),c(),v(o.hasContextTimeline()?1:-1),c(),v((i=o.setupFootprint())?2:-1,i),c(6),b("",M(9,4,o.cost.modelCallRows.length)," model calls"),c(3),U(o.cost.turnInsights),c(18),U(o.cost.modelCallRows)}}function yd(n,t){n&1&&(s(0,"p",5),l(1,"This imported session has no token-bearing model call rows."),a())}var yn=class n{cost;sort;sortChange=new j;openTraceEvent=new j;contextHelp={timeline:"Each bar is one model request from the VS Code Agent Debug Log. Taller means more input was sent into the model for that request. A sharp drop means the next request sent less context. A You marker means a user prompt happened before that model request.",biggestRequest:"The single model request with the most input tokens recorded by VS Code. This helps spot the largest one-time context load.",limitUsed:"How much of the model prompt limit the biggest request used. This comes from VS Code model metadata, not billing. Lower is more room left in that one request.",repeatedInput:"Total raw input across all model calls divided by the biggest single request. High means the run repeatedly sent a lot of context, even if no one request was near the model limit.",calls:"Token-bearing model requests imported from the VS Code Agent Debug Log. Tool calls and UI events are not counted here unless they include model tokens."};topModelCall(){return[...this.cost.modelCallRows].sort((t,e)=>e.estimatedUsd-t.estimatedUsd)[0]??null}contextTimelineRows(){return[...this.cost.modelCallRows].sort((t,e)=>t.callNumber-e.callNumber)}hasContextTimeline(){return this.contextTimelineRows().some(t=>t.inputTokens>0)}contextPeakCall(){return[...this.cost.modelCallRows].sort((t,e)=>e.inputTokens-t.inputTokens)[0]??null}contextBarHeight(t){let e=this.contextPeakCall()?.inputTokens??0;return e>0&&t.inputTokens>0?Math.max(6,t.inputTokens/e*100):0}contextLimitShare(t){return t.promptLimitShare??t.contextWindowShare??null}contextLimitLabel(t){return t.promptLimitTokens?`${t.promptLimitTokens.toLocaleString()} prompt limit`:t.contextWindowTokens?`${t.contextWindowTokens.toLocaleString()} context window`:"limit unavailable"}contextLimitPercentLabel(t){let e=this.contextLimitShare(t);return e===null?"limit n/a":`${Math.round(e*100)}%`}contextPressureClass(t){let e=this.contextLimitShare(t);return e===null?"":e>=.8?"near-limit":e>=.6?"elevated-limit":""}contextRepeatedFactor(){let t=this.contextTimelineRows(),e=Math.max(...t.map(o=>o.inputTokens),0),i=t.reduce((o,r)=>o+r.inputTokens,0);return e>0?i/e:0}contextTimelineSummary(){let t=this.contextPeakCall();return t?`Call #${t.callNumber} sent the most context: ${t.inputTokens.toLocaleString()} input tokens, using ${this.contextLimitPercentLabel(t)} of the model prompt limit. The run kept sending context repeatedly: ${this.contextRepeatedFactor().toFixed(1)}x the biggest request in total.`:"No token-bearing model calls were imported for this run."}userRequestMarkerLabel(t){return t.userRequestDetail?`After user request #${t.userRequestIndex}: ${t.userRequestDetail}`:"After a user request"}setupPayloadBadges(t){let e=t.setupPayload;if(!e)return[];let i=[];return e.systemPromptChars>0&&i.push({label:"Inst",detail:`${e.systemPromptChars.toLocaleString()} chars from ${e.systemPromptFile}`}),(e.toolSchemaChars>0||e.toolCount>0)&&i.push({label:"Tools",detail:`${e.toolCount.toLocaleString()} tools, ${e.toolSchemaChars.toLocaleString()} schema chars`}),e.mcpToolCount>0&&i.push({label:"MCP",detail:`${e.mcpToolCount.toLocaleString()} MCP tools referenced`}),i}setupPayloadSummary(t){let e=this.setupPayloadBadges(t);return e.length?`Setup payload: ${e.map(i=>i.detail).join(" \xB7 ")}`:""}setupFootprint(){let t=this.contextTimelineRows().filter(p=>this.setupPayloadSignature(p));if(!t.length)return null;let e=new Map;for(let p of t){let u=p.setupPayload,m=this.setupPayloadSignature(p);if(!u||!m)continue;let _=e.get(m);if(_){_.lastCall=p.callNumber,_.callCount+=1,_.totalInputTokens+=p.inputTokens,_.averageInputTokens=_.totalInputTokens/_.callCount,_.maxInputTokens=Math.max(_.maxInputTokens,p.inputTokens);continue}e.set(m,{signature:m,firstCall:p.callNumber,lastCall:p.callNumber,callCount:1,systemPromptChars:u.systemPromptChars,toolSchemaChars:u.toolSchemaChars,totalChars:u.systemPromptChars+u.toolSchemaChars,toolCount:u.toolCount,mcpToolCount:u.mcpToolCount,totalInputTokens:p.inputTokens,averageInputTokens:p.inputTokens,maxInputTokens:p.inputTokens})}let i=[...e.values()].sort((p,u)=>p.firstCall-u.firstCall),o=i[i.length-1],r=t[t.length-1]?.setupPayload?.mcpToolNames??[],d=r.length>3?`${r.slice(0,3).join(", ")} +${r.length-3} more`:r.length?r.join(", "):"No MCP tools in setup payload.";return{summary:i.length===1?`Same setup payload across ${t.length.toLocaleString()} model calls`:`${i.length.toLocaleString()} setup payload versions across ${t.length.toLocaleString()} model calls`,changeLabel:i.length===1?"No setup changes":`${i.length-1} change${i.length===2?"":"s"}`,instructionChars:o.systemPromptChars,toolSchemaChars:o.toolSchemaChars,toolCount:o.toolCount,mcpToolCount:o.mcpToolCount,mcpPreview:d,profiles:i}}setupPayloadChanged(t){let e=this.setupPayloadSignature(t);if(!e)return!1;let i=this.contextTimelineRows().filter(o=>o.callNumber<t.callNumber).reverse().find(o=>this.setupPayloadSignature(o));return!i||this.setupPayloadSignature(i)!==e}setupPayloadChangeSummary(t){return this.setupPayloadChanged(t)?this.setupPayloadSummary(t).replace("Setup payload: ","Setup changed: "):""}setupPayloadSignature(t){let e=t.setupPayload;return e?[e.systemPromptFile,e.systemPromptChars,e.toolsFile,e.toolSchemaChars,e.toolCount,e.mcpToolCount,e.mcpToolNames.join(",")].join("|"):""}inputShare(t){return t.totalTokens>0?t.inputTokens/t.totalTokens*100:0}normalInputTokens(t){return Math.max(0,t.inputTokens-(t.cachedInputTokens??0))}normalInputShare(t){return t.totalTokens>0?this.normalInputTokens(t)/t.totalTokens*100:0}cachedInputShare(t){return t.totalTokens>0?(t.cachedInputTokens??0)/t.totalTokens*100:0}inputCostUsd(t){return t.inputUsd+(t.cachedInputUsd??0)+(t.cacheWriteUsd??0)}outputShare(t){return t.totalTokens>0?t.outputTokens/t.totalTokens*100:0}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-session-turns"]],inputs:{cost:"cost",sort:"sort"},outputs:{sortChange:"sortChange",openTraceEvent:"openTraceEvent"},decls:16,vars:5,consts:[[1,"model-call-table","run-panel"],[1,"model-call-header"],[1,"eyebrow"],["aria-label","Model call sort",1,"segmented-control"],["type","button",3,"click"],[1,"empty"],["aria-label","Highest cost model call",1,"turn-focus-strip"],["aria-label","Context load timeline",1,"context-load-timeline"],[1,"setup-footprint-panel"],[1,"turn-insights-disclosure"],["aria-label","Turn highlights",1,"turn-insight-grid"],["role","table","aria-label","Per-turn model calls",1,"model-call-table"],["role","row",1,"model-call-row","model-call-heading"],["role","columnheader"],["role","row",1,"model-call-row",3,"--share"],["aria-label","Token split",1,"token-split"],[1,"token-split-bar"],[1,"input-bar"],[1,"cached-input-bar",3,"width"],[1,"output-bar"],["type","button",1,"trace-jump",3,"click"],[1,"cached-input-bar"],[1,"context-load-header"],[1,"mini-label"],["label","Explain context load timeline",3,"text"],[1,"context-load-legend"],[1,"user-request-marker"],["aria-label","Context load summary",1,"context-load-summary"],["aria-label","Raw input timeline",1,"context-call-bars"],["type","button",1,"context-call-bar",3,"ngClass","after-user-request"],[1,"context-load-note"],["label","Explain biggest request",3,"text","interactive"],["label","Explain limit used",3,"text","interactive"],["label","Explain repeated load",3,"text","interactive"],["label","Explain model requests",3,"text","interactive"],["type","button",1,"context-call-bar",3,"click","ngClass"],[1,"context-call-index"],[1,"context-marker-stack"],["aria-hidden","true"],[1,"setup-footprint-body"],["aria-label","Setup footprint metrics",1,"setup-footprint-metrics"],["role","table","aria-label","Setup footprint profiles",1,"setup-profile-table"],["role","row",1,"setup-profile-row","setup-profile-heading"],["role","row",1,"setup-profile-row"],[1,"setup-footprint-note"],["role","cell","data-label","Where"],["role","cell","data-label","Payload"],["role","cell","data-label","Tools"],["role","cell","data-label","Model input"],["role","row",1,"model-call-row"],["role","cell","data-label","Call"],["type","button",1,"trace-link",3,"click"],["role","cell","data-label","When"],["role","cell","data-label","Model"],[1,"warning-text"],["role","cell","data-label","Tokens"],["role","cell","data-label","Cost"],["role","cell","data-label","Share"],["aria-hidden","true",1,"share-meter"],["role","cell","data-label","Nearby context"]],template:function(e,i){e&1&&(s(0,"section",0)(1,"div",1)(2,"div")(3,"p",2),l(4,"Step 2 \xB7 Review"),a(),s(5,"h3"),l(6,"Model call timeline"),a(),s(7,"p"),l(8,"Scan priced model calls as a sequence. The share column shows how much each call contributed to this run."),a()(),s(9,"div",3)(10,"button",4),S("click",function(){return i.sortChange.emit("timeline")}),l(11," Timeline "),a(),s(12,"button",4),S("click",function(){return i.sortChange.emit("largest")}),l(13," Largest first "),a()()(),x(14,wd,31,6)(15,yd,2,0,"p",5),a()),e&2&&(c(10),V("active",i.sort==="timeline"),c(2),V("active",i.sort==="largest"),c(2),v(i.cost.modelCallRows.length?14:15))},dependencies:[Oe,ye,Ie,ee],styles:['[_nghost-%COMP%]{display:block}.run-panel[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:14px;padding:18px;background:var(--surface)}.model-call-table[_ngcontent-%COMP%]{display:grid;gap:14px}.model-call-header[_ngcontent-%COMP%]{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}.eyebrow[_ngcontent-%COMP%]{margin:0;color:var(--muted-2);font-size:11px;font-weight:850;letter-spacing:0;text-transform:uppercase}.model-call-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text-strong)}.model-call-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--muted);font-size:13px}.segmented-control[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:34px;border:0;border-right:1px solid var(--line);padding:7px 10px;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:800;cursor:pointer}.segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{border-right:0}.segmented-control[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--accent);color:#fff}.turn-insight-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.turn-insights-disclosure[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:12px;background:#ffffff05}.turn-insights-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;padding:0 12px;color:var(--text);cursor:pointer;list-style:none}.turn-insights-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.turn-insights-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{content:">";color:var(--accent);font-weight:800;transition:transform .18s ease}.turn-insights-disclosure[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{transform:rotate(90deg)}.turn-insights-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:auto;color:var(--muted-2);font-size:11px;font-weight:850;text-transform:uppercase}.turn-insights-disclosure[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:12px}.turn-insights-disclosure[open][_ngcontent-%COMP%] .turn-insight-grid[_ngcontent-%COMP%]{padding:0 10px 10px}.turn-insight-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;gap:5px;border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--surface-soft)}.turn-insight-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:12px;font-weight:850;text-transform:uppercase}.turn-insight-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:19px;line-height:1.15;overflow-wrap:anywhere}.turn-insight-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--text);line-height:1.45;overflow-wrap:anywhere}.turn-focus-strip[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.6fr) auto;gap:14px;align-items:center;border:1px solid rgba(124,92,255,.34);border-radius:12px;padding:10px 12px;background:linear-gradient(135deg,#7c5cff26,#1fd1a512),var(--surface-soft)}.turn-focus-strip[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .token-split[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:11px;font-weight:850;text-transform:uppercase}.turn-focus-strip[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:4px;color:var(--text-strong);font-size:17px;line-height:1.15}.turn-focus-strip[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--text);font-size:12px;line-height:1.35}.token-split-bar[_ngcontent-%COMP%]{display:flex;height:8px;overflow:hidden;border-radius:999px;margin-top:8px;background:#ffffff14}.token-split-bar[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:block;min-width:2px}.context-load-timeline[_ngcontent-%COMP%]{display:grid;gap:12px;border:1px solid rgba(31,209,165,.24);border-radius:12px;padding:12px;background:radial-gradient(circle at 8% 0%,rgba(31,209,165,.12),transparent 38%),linear-gradient(135deg,#7c5cff14,#1fd1a509),var(--surface-soft)}.context-load-header[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);gap:14px;align-items:start}.mini-label[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.context-load-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:3px 0 0;color:var(--text-strong);font-size:16px;font-weight:760;line-height:1.2}.context-load-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .context-load-note[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.45}.context-load-legend[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-top:8px!important}.context-load-header[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{color:var(--text-strong);font:inherit;font-weight:760}.context-load-summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.context-load-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:9px;background:#ffffff06}.context-load-summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;color:var(--muted-2);font-size:10px;font-style:normal;font-weight:760;text-transform:uppercase}.context-load-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px;line-height:1.1;overflow-wrap:anywhere}.context-call-bars[_ngcontent-%COMP%]{display:grid;grid-auto-columns:minmax(60px,1fr);grid-auto-flow:column;gap:7px;overflow-x:auto;padding:2px 0 6px}.context-call-bar[_ngcontent-%COMP%]{display:grid;grid-template-rows:auto 58px auto auto;gap:5px;align-items:end;min-width:60px;border:1px solid var(--line);border-radius:10px;padding:7px;background:#ffffff06;color:var(--text);font:inherit;text-align:left;cursor:pointer}.context-call-bar.after-user-request[_ngcontent-%COMP%]{border-color:#1fd1a53d;box-shadow:inset 0 2px #1fd1a54d}.context-call-bar[_ngcontent-%COMP%]:hover, .context-call-bar[_ngcontent-%COMP%]:focus-visible{border-color:#1fd1a580;outline:none;background:#1fd1a512}.context-call-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .context-call-bar[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-style:normal;font-weight:760}.context-call-index[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:4px}.context-marker-stack[_ngcontent-%COMP%]{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:3px}.user-request-marker[_ngcontent-%COMP%], .setup-payload-marker[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:fit-content;min-width:19px;height:13px;border:1px solid rgba(31,209,165,.24);border-radius:999px;padding:0 4px;background:#1fd1a512;color:var(--success-text, #bbfff0);font-size:8px;font-weight:760;line-height:1;text-transform:none}.setup-payload-marker[_ngcontent-%COMP%]{min-width:30px;border-color:#7c5cff3d;background:#7c5cff14;color:var(--text)}.setup-payload-line[_ngcontent-%COMP%]{color:var(--muted-2)!important}.setup-footprint-panel[_ngcontent-%COMP%]{border:1px solid rgba(124,92,255,.2);border-radius:12px;background:radial-gradient(circle at 0% 0%,rgba(124,92,255,.08),transparent 34%),var(--surface-soft)}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 12px;cursor:pointer;list-style:none}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:2px}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:13px;font-weight:760}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .setup-footprint-note[_ngcontent-%COMP%]{color:var(--muted);font-size:12px;font-style:normal;line-height:1.4}.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{flex:0 0 auto;border:1px solid rgba(124,92,255,.24);border-radius:999px;padding:4px 8px;background:#7c5cff17;color:var(--text);font-size:11px;font-weight:760}.setup-footprint-body[_ngcontent-%COMP%]{display:grid;gap:10px;padding:0 12px 12px}.setup-footprint-metrics[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.setup-footprint-metrics[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{display:grid;gap:4px;border:1px solid var(--line);border-radius:10px;padding:9px;background:#ffffff06}.setup-footprint-metrics[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.setup-footprint-metrics[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:16px;line-height:1.1;overflow-wrap:anywhere}.setup-footprint-metrics[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .setup-profile-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{margin:0;color:var(--muted);font-size:12px;line-height:1.35;overflow-wrap:anywhere}.setup-profile-table[_ngcontent-%COMP%]{display:grid;overflow:auto hidden;border:1px solid var(--line);border-radius:10px}.setup-profile-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(160px,1fr) minmax(120px,.75fr) minmax(170px,1fr);gap:10px;min-width:720px;padding:9px 10px;border-bottom:1px solid var(--line)}.setup-profile-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.setup-profile-heading[_ngcontent-%COMP%]{background:var(--surface-soft);color:var(--muted-2);font-size:11px;font-weight:760;text-transform:uppercase}.setup-profile-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:3px;color:var(--text-strong);font-size:12px}.setup-footprint-note[_ngcontent-%COMP%]{margin:0}.context-call-bar[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:flex;align-items:end;width:100%;height:58px;overflow:hidden;border-radius:8px;background:#ffffff0e}.context-call-bar[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{display:block;width:100%;min-height:4px;border-radius:8px 8px 0 0;background:linear-gradient(180deg,var(--accent-2),var(--accent))}.context-call-bar[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:11px;line-height:1.1;overflow-wrap:anywhere}.context-call-bar.elevated-limit[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{background:linear-gradient(180deg,var(--warning),var(--accent))}.context-call-bar.near-limit[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{background:linear-gradient(180deg,var(--danger),var(--warning))}.context-call-bar.elevated-limit[_ngcontent-%COMP%]{border-color:#f4a0415c}.context-call-bar.near-limit[_ngcontent-%COMP%]{border-color:#ff5b6e61}.input-bar[_ngcontent-%COMP%]{background:var(--accent)}.cached-input-bar[_ngcontent-%COMP%]{background:var(--accent-2)}.output-bar[_ngcontent-%COMP%]{background:var(--warning)}.model-call-table[_ngcontent-%COMP%]{display:grid;border:1px solid var(--line);border-radius:8px;overflow:auto hidden;background:var(--surface)}.model-call-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(58px,.35fr) minmax(92px,.55fr) minmax(150px,.95fr) minmax(145px,.85fr) minmax(145px,.85fr) minmax(64px,.35fr) minmax(260px,1.45fr);gap:12px;align-items:start;min-width:1000px;padding:11px 12px;border-bottom:1px solid var(--line);background:transparent}.model-call-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.model-call-heading[_ngcontent-%COMP%]{background:var(--surface-soft);font-size:12px;font-weight:800;text-transform:uppercase}.model-call-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .model-call-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:grid;gap:3px}.model-call-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong)}.model-call-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .model-call-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:13px;font-style:normal}.model-call-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child em[_ngcontent-%COMP%]{overflow-wrap:anywhere}.trace-link[_ngcontent-%COMP%]{width:fit-content;border:1px solid rgba(31,209,165,.35);border-radius:999px;padding:4px 8px;background:var(--teal-soft);color:var(--success-text, #bbfff0);font:inherit;font-size:12px;font-weight:900;cursor:pointer}.trace-link[_ngcontent-%COMP%]:hover, .trace-jump[_ngcontent-%COMP%]:hover{border-color:var(--accent-2);background:#1fd1a52e}.trace-jump[_ngcontent-%COMP%]{min-height:32px;border:1px solid rgba(31,209,165,.35);border-radius:999px;padding:0 12px;background:var(--teal-soft);color:var(--success-text, #bbfff0);font:inherit;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer}.share-meter[_ngcontent-%COMP%]{display:block!important;width:54px;height:5px;overflow:hidden;border-radius:999px;background:#ffffff14}.share-meter[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:block;width:var(--share, 0%);height:100%;border-radius:inherit;background:var(--accent)}.warning-text[_ngcontent-%COMP%]{color:var(--warning-text, #ffe0a0)!important;font-weight:800}.empty[_ngcontent-%COMP%]{margin:0;color:var(--muted)}@media(max-width:1100px){.model-call-header[_ngcontent-%COMP%]{display:grid}.turn-focus-strip[_ngcontent-%COMP%], .context-load-header[_ngcontent-%COMP%]{grid-template-columns:1fr}.model-call-table[_ngcontent-%COMP%]{overflow:visible;border:0;gap:10px;background:transparent}.setup-footprint-metrics[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.model-call-heading[_ngcontent-%COMP%]{display:none}.model-call-row[_ngcontent-%COMP%]{grid-template-columns:1fr;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft)}.model-call-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(92px,.28fr) minmax(0,1fr);gap:10px}.model-call-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:before{content:attr(data-label);color:var(--muted-2);font-size:11px;font-weight:850;text-transform:uppercase}}@media(max-width:560px){.setup-footprint-panel[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{align-items:flex-start;flex-direction:column;padding:10px 12px}.setup-footprint-metrics[_ngcontent-%COMP%]{grid-template-columns:1fr}.model-call-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:3px}}.run-panel[_ngcontent-%COMP%]{border-radius:14px;padding:14px}.eyebrow[_ngcontent-%COMP%], .turn-insight-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:10px;font-weight:760;letter-spacing:.08em}.model-call-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;font-weight:760;line-height:1.2}.model-call-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .model-call-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .model-call-row[_ngcontent-%COMP%] em[_ngcontent-%COMP%], .turn-insight-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px}.segmented-control[_ngcontent-%COMP%]{border-radius:999px}.segmented-control[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:30px;padding:6px 10px;font-size:12px;font-weight:720}.turn-insight-grid[_ngcontent-%COMP%], .model-call-table[_ngcontent-%COMP%]{gap:10px}.turn-insight-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .model-call-table[_ngcontent-%COMP%], .model-call-row[_ngcontent-%COMP%]{border-radius:12px}.turn-insight-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%]{padding:10px}.turn-insight-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:760}.model-call-row[_ngcontent-%COMP%]{gap:10px;padding:9px 10px}.model-call-heading[_ngcontent-%COMP%]{font-size:11px;font-weight:720}.trace-link[_ngcontent-%COMP%]{padding:3px 7px;font-size:11px;font-weight:760}.turn-focus-strip[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .token-split[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:10px;font-weight:760;letter-spacing:.08em}.turn-focus-strip[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:760}.theme-light[_nghost-%COMP%] .run-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .run-panel[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffc2,#ffffff75),var(--surface);box-shadow:var(--shadow)}.theme-light[_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .segmented-control[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .turn-insights-disclosure[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .turn-insights-disclosure[_ngcontent-%COMP%]{background:#ffffff94}.theme-light[_nghost-%COMP%] .turn-insight-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .turn-insight-grid[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .model-call-row[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .model-call-row[_ngcontent-%COMP%]{background:#ffffffa3}.theme-light[_nghost-%COMP%] .turn-focus-strip[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .turn-focus-strip[_ngcontent-%COMP%]{border-color:#6f5cff33;background:radial-gradient(circle at 0% 0%,rgba(111,92,255,.12),transparent 36%),linear-gradient(135deg,#0c9f830e,#6f5cff06),var(--surface)}.theme-light[_nghost-%COMP%] .context-load-timeline[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .context-load-timeline[_ngcontent-%COMP%]{border-color:#0c9f832e;background:radial-gradient(circle at 8% 0%,rgba(12,159,131,.11),transparent 36%),linear-gradient(135deg,#6f5cff0e,#0c9f830a),#ffffffb3}.theme-light[_nghost-%COMP%] .context-load-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .context-load-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%]{background:#ffffffa3}.theme-light[_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%]:hover, .theme-light [_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%]:hover, .theme-light[_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%]:focus-visible, .theme-light [_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%]:focus-visible{background:#0c9f8314}.theme-light[_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .context-call-bar[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{background:#61708521}.theme-light[_nghost-%COMP%] .user-request-marker[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .user-request-marker[_ngcontent-%COMP%]{border-color:#0c9f833d;background:#0c9f8317;color:#087763}.theme-light[_nghost-%COMP%] .setup-payload-marker[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .setup-payload-marker[_ngcontent-%COMP%]{border-color:#6f5cff33;background:#6f5cff12;color:#5846b8}.theme-light[_nghost-%COMP%] .setup-footprint-panel[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .setup-footprint-panel[_ngcontent-%COMP%]{border-color:#6f5cff29;background:radial-gradient(circle at 0% 0%,rgba(111,92,255,.07),transparent 34%),#ffffffa3}.theme-light[_nghost-%COMP%] .setup-footprint-metrics[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .setup-footprint-metrics[_ngcontent-%COMP%] article[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .setup-profile-row[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .setup-profile-row[_ngcontent-%COMP%]{background:#ffffff94}.theme-light[_nghost-%COMP%] .model-call-table[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .model-call-table[_ngcontent-%COMP%]{background:var(--surface);box-shadow:var(--shadow-soft)}.theme-light[_nghost-%COMP%] .model-call-row[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .model-call-row[_ngcontent-%COMP%]{background:#ffffffb8}.theme-light[_nghost-%COMP%] .share-meter[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .share-meter[_ngcontent-%COMP%], .theme-light[_nghost-%COMP%] .token-split-bar[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .token-split-bar[_ngcontent-%COMP%]{background:#61708529}']})};var Sd=(n,t)=>t.model+t.pricingModel;function Td(n,t){if(n&1&&(s(0,"span"),l(1),R(2,"app-help-popover",9),a()),n&2){let e=t,i=g();c(),b(" ",e.size," "),c(),P("text",i.sessionSizeHelp(e))}}function Ed(n,t){if(n&1&&(s(0,"span",2),l(1),R(2,"app-help-popover",10),a()),n&2){let e=g();c(),b(" Reasoning ",t," "),c(),P("text",e.reasoningEffortHelp(e.session))}}function kd(n,t){if(n&1&&(s(0,"span",3),l(1),a()),n&2){let e=g();c(),f(e.savedMemoryLabel())}}function Rd(n,t){if(n&1){let e=D();s(0,"button",12),S("click",function(){w(e);let o=g(2);return y(o.openFirstFilteredSession.emit())}),l(1,"Open first visible run"),a()}}function Id(n,t){if(n&1&&(s(0,"div",7)(1,"div")(2,"span"),l(3,"Open run is outside the current filters"),a(),s(4,"strong"),l(5),a(),s(6,"p"),l(7,"The selected run stays open so you do not lose your place, but the sidebar filters currently hide it."),a()(),x(8,Rd,2,0,"button",11),a()),n&2){let e=g();c(5),b("",e.filteredCount," sessions visible in the rail"),c(3),v(e.filteredCount?8:-1)}}function Dd(n,t){if(n&1&&(s(0,"span",13),l(1),R(2,"app-help-popover",14),a()),n&2){let e=t.$implicit,i=g(2);c(),$(" ",e.model," estimated with ",e.pricingModel," pricing "),c(),P("text",i.pricingFallbackReason(e.model,e.pricingModel))}}function Ad(n,t){if(n&1){let e=D();s(0,"div",8)(1,"div")(2,"span"),l(3,"Pricing assumption"),a(),s(4,"strong"),l(5),a(),s(6,"p"),z(7,Dd,3,3,"span",13,Sd),a()(),s(9,"button",12),S("click",function(){w(e);let o=g();return y(o.viewPrices.emit())}),l(10,"View prices"),a()()}if(n&2){let e=g();c(5),$("",e.pricingFallbacks.length," raw model id",e.pricingFallbacks.length===1?"":"s"," missing from the local price table"),c(2),U(e.pricingFallbacks)}}var Sn=class n{session;triage=null;outsideFilters=!1;filteredCount=0;pricingFallbacks=[];savedMemoryCount=0;savedPlanCount=0;sessionSizeHelp;pricingFallbackReason;openFirstFilteredSession=new j;viewPrices=new j;reasoningEffortLabel(t){let e=t.traceSummary.reasoningEfforts??[];return e.length?e.map(i=>`${i.effort} (${i.count})`).join(", "):""}reasoningEffortHelp(t){let e=this.reasoningEffortLabel(t);return e?`Reasoning setting VS Code recorded for this run's model requests. Higher reasoning can improve hard tasks, but it may also use more tokens or take longer. Imported values: ${e}.`:"VS Code did not record a reasoning setting for this run."}costLabel(t){return Do(t)}costHelp(t){return t.sourceUsage?"Usage reported by VS Code Copilot for this run.":"Fallback estimate from imported token buckets and GitHub model prices because source usage was not logged."}displayedUsageUsd(t){return we(t)}displayedUsageCredits(t){return Io(t)}savedMemoryLabel(){let t=[];this.savedPlanCount&&t.push(`${this.savedPlanCount} plan${this.savedPlanCount===1?"":"s"}`);let e=this.savedMemoryCount-this.savedPlanCount;return e>0&&t.push(`${e} memor${e===1?"y":"ies"}`),`Saved ${t.join(" \xB7 ")}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-selected-run-header"]],inputs:{session:"session",triage:"triage",outsideFilters:"outsideFilters",filteredCount:"filteredCount",pricingFallbacks:"pricingFallbacks",savedMemoryCount:"savedMemoryCount",savedPlanCount:"savedPlanCount",sessionSizeHelp:"sessionSizeHelp",pricingFallbackReason:"pricingFallbackReason"},outputs:{openFirstFilteredSession:"openFirstFilteredSession",viewPrices:"viewPrices"},decls:24,vars:23,consts:[[1,"detail-header"],[1,"source-meta"],[1,"reasoning-chip"],[1,"memory-chip"],[1,"detail-subtitle"],[1,"price"],["label","Explain displayed cost",3,"text"],[1,"source-callout","filter-mismatch-callout"],[1,"source-callout","pricing-fallback-callout"],["label","Explain run size",3,"text"],["label","Explain reasoning effort",3,"text"],["type","button",1,"ghost-button"],["type","button",1,"ghost-button",3,"click"],[1,"inline-fallback"],["label","Explain fallback pricing",3,"text"]],template:function(e,i){if(e&1&&(s(0,"div",0)(1,"div")(2,"div",1),x(3,Td,3,2,"span"),x(4,Ed,3,2,"span",2),x(5,kd,2,1,"span",3),a(),s(6,"h2"),l(7),a(),s(8,"p",4),l(9),h(10,"number"),h(11,"number"),a()(),s(12,"div",5)(13,"span"),l(14),R(15,"app-help-popover",6),a(),s(16,"strong"),l(17),h(18,"number"),a(),s(19,"em"),l(20),h(21,"number"),a()()(),x(22,Id,9,2,"div",7),x(23,Ad,11,2,"div",8)),e&2){let o,r;c(3),v((o=i.triage)?3:-1,o),c(),v((r=i.reasoningEffortLabel(i.session))?4:-1,r),c(),v(i.savedMemoryCount?5:-1),c(2),f(i.session.title),c(2),Ye(" ",i.session.model," \xB7 ",M(10,13,i.session.traceSummary.modelTurns)," model turns \xB7 ",M(11,15,i.session.traceSummary.totalTokens)," tokens "),c(5),b(" ",i.costLabel(i.session)," "),c(),P("text",i.costHelp(i.session)),c(2),b("$",k(18,17,i.displayedUsageUsd(i.session),"1.2-2")),c(3),b("",k(21,20,i.displayedUsageCredits(i.session),"1.0-2")," credits"),c(2),v(i.outsideFilters?22:-1),c(),v(i.pricingFallbacks.length?23:-1)}},dependencies:[ye,ee],styles:[".detail-header[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,auto);align-items:stretch;gap:12px;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--header-gradient, linear-gradient(135deg, rgba(111, 92, 255, .13), rgba(39, 214, 176, .055)), var(--surface-soft))}.detail-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{min-width:min(100%,380px)}.source-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 3px}.source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:999px;padding:2px 7px;background:var(--surface-soft);color:var(--text);font-size:10px;font-weight:720}.source-meta[_ngcontent-%COMP%] > span.reasoning-chip[_ngcontent-%COMP%]{border-color:#8b7dff6b;background:#8b7dff21;color:var(--text-strong)}.source-meta[_ngcontent-%COMP%] > span.memory-chip[_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--accent) 34%,var(--line));background:color-mix(in srgb,var(--accent) 9%,var(--surface-soft));color:var(--accent)}h2[_ngcontent-%COMP%]{margin:3px 0 0;color:var(--text-strong);font-size:17px;font-weight:760;line-height:1.18;letter-spacing:0}.detail-subtitle[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text);font-size:12px}.price[_ngcontent-%COMP%]{display:grid;align-content:center;justify-items:end;min-width:220px;border:1px solid rgba(31,209,165,.22);border-radius:10px;padding:10px;background:#1fd1a514}.price[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted);font-size:12px}.price[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:clamp(22px,2.5vw,30px);font-weight:760;line-height:1;letter-spacing:0}.price[_ngcontent-%COMP%] > em[_ngcontent-%COMP%]{margin-top:4px;color:var(--muted);font-size:11px;font-style:normal;font-weight:720}.source-callout[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-left:4px solid var(--accent-2);border-radius:12px;padding:12px;background:var(--surface-soft)}.source-callout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;margin-bottom:3px;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}.source-callout[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:15px;font-weight:760}.source-callout[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:920px;margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.42}.source-callout[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:center;white-space:nowrap}.source-callout[_ngcontent-%COMP%] .inline-fallback[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;margin:0 12px 4px 0;color:inherit;font-size:13px;font-weight:800;text-transform:none}.filter-mismatch-callout[_ngcontent-%COMP%], .pricing-fallback-callout[_ngcontent-%COMP%]{margin-top:10px}.ghost-button[_ngcontent-%COMP%]{border:1px solid var(--line);border-radius:9px;padding:7px 10px;background:var(--surface-soft);color:var(--text);font:inherit;font-size:13px;font-weight:720;cursor:pointer}.ghost-button[_ngcontent-%COMP%]:hover{border-color:var(--line-strong)}.ghost-button[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgba(39,214,176,.75);outline-offset:2px}.theme-light[_nghost-%COMP%] .detail-header[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .detail-header[_ngcontent-%COMP%]{border-color:#bdcbdae6;box-shadow:var(--shadow-soft)}.theme-light[_nghost-%COMP%] .source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{background:#ffffffb8}.theme-light[_nghost-%COMP%] .price[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .price[_ngcontent-%COMP%]{border-color:#0c9f8338;background:radial-gradient(circle at 100% 0%,rgba(12,159,131,.1),transparent 42%),#ffffff9e;box-shadow:0 10px 24px #1f2d4014}.theme-light[_nghost-%COMP%] .source-callout[_ngcontent-%COMP%], .theme-light [_nghost-%COMP%] .source-callout[_ngcontent-%COMP%]{box-shadow:var(--shadow-soft)}@media(max-width:900px){.detail-header[_ngcontent-%COMP%], .source-callout[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:12px}.price[_ngcontent-%COMP%]{justify-items:start;min-width:0}}@media(max-width:600px){.source-meta[_ngcontent-%COMP%]{gap:5px}}"]})};var Ld=()=>[import("./chunk-23NLHIOR.js").then(n=>n.UsagePageComponent)],Nd=()=>[import("./chunk-5JYQJM5G.js").then(n=>n.MemoryPageComponent)],Fd=()=>[import("./chunk-XMVGLQQH.js").then(n=>n.CustomizationsPageComponent)],zd=()=>[import("./chunk-7I2HDBC6.js").then(n=>n.PricingPageComponent)],Ud=()=>[import("./chunk-QMNOUQ2X.js").then(n=>n.AnalyticsPageComponent)],Vd=()=>[import("./chunk-WWU6QMJC.js").then(n=>n.ComparePageComponent)];function $d(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("usage"))}),l(1," Usage "),a()}if(n&2){let e=g();V("active",e.activeView()==="usage")}}function jd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("sessions"))}),l(1," Sessions "),a()}if(n&2){let e=g();V("active",e.activeView()==="sessions")}}function Bd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("memory"))}),l(1," Memory "),a()}if(n&2){let e=g();V("active",e.activeView()==="memory")}}function Hd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("customizations"))}),s(1,"span",19),l(2,"Customizations"),a(),s(3,"span",20),l(4,"Preview"),a()()}if(n&2){let e=g();V("active",e.activeView()==="customizations")}}function qd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("compare"))}),l(1," Compare "),a()}if(n&2){let e=g();V("active",e.activeView()==="compare")}}function Wd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("analytics"))}),l(1," Insights "),a()}if(n&2){let e=g();V("active",e.activeView()==="analytics")}}function Gd(n,t){if(n&1){let e=D();s(0,"button",18),S("click",function(){w(e);let o=g();return y(o.activeView.set("pricing"))}),l(1," Prices "),a()}if(n&2){let e=g();V("active",e.activeView()==="pricing")}}function Kd(n,t){if(n&1){let e=D();s(0,"app-session-rail",21),S("queryChange",function(o){w(e);let r=g();return y(r.setQuery(o))})("sizeFilterChange",function(o){w(e);let r=g();return y(r.setSizeFilter(o))})("warningFilterChange",function(o){w(e);let r=g();return y(r.setWarningFilter(o))})("workspaceFilterChange",function(o){w(e);let r=g();return y(r.setWorkspaceFilter(o))})("modelFilterChange",function(o){w(e);let r=g();return y(r.setModelFilter(o))})("timeFilterChange",function(o){w(e);let r=g();return y(r.setTimeFilter(o))})("selectSession",function(o){w(e);let r=g();return y(r.selectSessionFromRail(o))})("closeRail",function(){w(e);let o=g();return y(o.closeSessionRail())}),a(),s(1,"button",22),S("click",function(){w(e);let o=g();return y(o.closeSessionRail())}),a()}if(n&2){let e,i=g();P("sessions",i.sessions())("filteredSessions",i.filteredSessions())("selectedSessionId",((e=i.selectedSession())==null?null:e.id)??null)("query",i.query())("sizeFilter",i.sizeFilter())("warningFilter",i.warningFilter())("workspaceFilter",i.workspaceFilter())("modelFilter",i.modelFilter())("timeFilter",i.timeFilter())("warningOptions",i.warningOptions())("sizeOptions",i.sizeOptions)("workspaceOptions",i.workspaceOptions())("modelOptions",i.modelOptions())("timeOptions",i.timeOptions)}}function Yd(n,t){if(n&1){let e=D();s(0,"app-session-data-state-panel",23),S("refresh",function(){w(e);let o=g();return y(o.refreshSessionData())})("cancelScan",function(){w(e);let o=g();return y(o.cancelScan())}),a()}if(n&2){let e=g();P("state",e.sessionDataLoadState())("error",e.sessionDataLoadError())("refreshState",e.sessionDataRefreshState())("runtimeStatus",e.runtimeStatus())("runtimeStatusAvailable",e.runtimeStatusAvailable())}}function Qd(n,t){if(n&1&&(s(0,"aside",24)(1,"div")(2,"strong"),l(3),a(),s(4,"p"),l(5),a()(),s(6,"code"),l(7),a()()),n&2){let e=t;c(3),f(e.title),c(2),f(e.body),c(2),f(e.setting)}}function Jd(n,t){if(n&1){let e=D();s(0,"app-usage-page",26),S("allowancePlanChange",function(o){w(e);let r=g(3);return y(r.setAllowancePlan(o))})("openSession",function(o){w(e);let r=g(3);return y(r.openSession(o))}),a()}if(n&2){let e=g(3);P("sessions",e.sessions())("allowancePlan",e.allowancePlan())("canOpenSession",e.canOpenSessions)}}function Zd(n,t){n&1&&(s(0,"p",27),l(1,"Loading usage..."),a())}function Xd(n,t){n&1&&(Fe(0,Jd,1,3)(1,Zd,2,0),ze(2,0,Ld,null,1),Ue())}function ep(n,t){if(n&1){let e=D();s(0,"app-memory-page",28),S("openSession",function(o){w(e);let r=g(3);return y(r.openSession(o))}),a()}if(n&2){let e=g(3);P("memories",e.memories())("sessions",e.sessions())("canOpenSession",e.canOpenSessions)}}function tp(n,t){n&1&&(s(0,"p",27),l(1,"Loading memories..."),a())}function np(n,t){n&1&&(Fe(0,ep,1,3)(1,tp,2,0),ze(2,0,Nd,null,1),Ue())}function ip(n,t){if(n&1){let e=D();s(0,"app-customizations-page",29),S("scanEvidence",function(){w(e);let o=g(3);return y(o.refreshSessionData("customizations"))})("cancelScan",function(){w(e);let o=g(3);return y(o.cancelScan())})("openSession",function(o){w(e);let r=g(3);return y(r.openSession(o))}),a()}if(n&2){let e=g(3);P("customizations",e.customizations())("sessions",e.sessions())("ingestion",e.ingestion())("refreshState",e.sessionDataRefreshState())("refreshMessage",e.sessionDataRefreshMessage())("runtimeStatus",e.runtimeStatus())}}function op(n,t){n&1&&(s(0,"p",27),l(1,"Loading customizations..."),a())}function rp(n,t){n&1&&(Fe(0,ip,1,6)(1,op,2,0),ze(2,0,Fd,null,1),Ue())}function ap(n,t){if(n&1){let e=D();s(0,"app-pricing-page",30),S("selectedAllowancePlanChange",function(o){w(e);let r=g(3);return y(r.setAllowancePlan(o))}),a()}if(n&2){let e=g(3);P("sessions",e.sessions())("selectedAllowancePlan",e.allowancePlan())}}function sp(n,t){n&1&&(s(0,"p",27),l(1,"Loading prices\u2026"),a())}function lp(n,t){n&1&&(Fe(0,ap,1,2)(1,sp,2,0),ze(2,0,zd,null,1),Ue())}function cp(n,t){if(n&1){let e=D();s(0,"app-analytics-page",31),S("openSession",function(o){w(e);let r=g(3);return y(r.openSession(o))}),a()}if(n&2){let e=g(3);P("sessions",e.sessions())}}function dp(n,t){n&1&&(s(0,"p",27),l(1,"Loading insights..."),a())}function pp(n,t){n&1&&(Fe(0,cp,1,1)(1,dp,2,0),ze(2,0,Ud,null,1),Ue())}function up(n,t){if(n&1){let e=D();s(0,"app-compare-page",32),S("compareAChange",function(o){w(e);let r=g(3);return y(r.compareA.set(o))})("compareBChange",function(o){w(e);let r=g(3);return y(r.compareB.set(o))}),a()}if(n&2){let e=g(3);P("sessions",e.sessions())("compareA",e.compareA())("compareB",e.compareB())}}function gp(n,t){n&1&&(s(0,"p",27),l(1,"Loading comparison\u2026"),a())}function mp(n,t){n&1&&(Fe(0,up,1,3)(1,gp,2,0),ze(2,0,Vd,null,1),Ue())}function hp(n,t){n&1&&(s(0,"span"),l(1),a()),n&2&&(c(),f(t.title))}function fp(n,t){if(n&1&&R(0,"app-session-import-context",35),n&2){let e=g(3);P("ingestion",t)("summary",e.summary())("help",e.help)}}function _p(n,t){if(n&1){let e=D();s(0,"button",42),S("click",function(){w(e);let o=g(4);return y(o.selectedRunView.set("cost"))}),s(1,"span"),l(2,"1 \xB7 Diagnose"),a(),s(3,"strong"),l(4,"Cost"),a(),s(5,"em"),l(6),h(7,"number"),a()(),s(8,"button",42),S("click",function(){w(e);let o=g(4);return y(o.selectedRunView.set("turns"))}),s(9,"span"),l(10,"2 \xB7 Review"),a(),s(11,"strong"),l(12,"Calls"),a(),s(13,"em"),l(14),h(15,"number"),a()(),s(16,"button",42),S("click",function(){w(e);let o=g(4);return y(o.selectedRunView.set("trace"))}),s(17,"span"),l(18,"3 \xB7 Verify"),a(),s(19,"strong"),l(20,"Trace"),a(),s(21,"em"),l(22),h(23,"number"),a()()}if(n&2){let e=t,i=g(),o=g(3);V("active",o.selectedRunView()==="cost"),c(6),$("",e.costAnswer.category," \xB7 ",k(7,10,e.costAnswer.categoryShare,"1.0-0"),"%"),c(2),V("active",o.selectedRunView()==="turns"),c(6),b("",M(15,13,e.modelCallRows.length)," model calls"),c(2),V("active",o.selectedRunView()==="trace"),c(6),b("",M(23,15,i.traceSummary.totalEvents)," raw events")}}function Cp(n,t){if(n&1){let e=D();s(0,"app-session-overview",43),S("openCallsTimeline",function(){w(e);let o=g(4);return y(o.selectedRunView.set("turns"))}),a()}if(n&2){let e=g(),i=g(3);P("session",e)("triage",i.selectedTriage())("triageHelp",i.sessionTriageHelp)}}function xp(n,t){if(n&1&&R(0,"app-session-cost",44),n&2){let e=g(2),i=g(3);P("session",e)("cost",t)("help",i.help)("pricingSourceUrl",i.pricingSourceUrl)}}function vp(n,t){if(n&1&&x(0,xp,1,4,"app-session-cost",44),n&2){let e,i=g(4);v((e=i.costExplanation())?0:-1,e)}}function bp(n,t){if(n&1){let e=D();s(0,"app-session-turns",46),S("sortChange",function(o){w(e);let r=g(5);return y(r.modelCallSort.set(o))})("openTraceEvent",function(o){w(e);let r=g(5);return y(r.openTraceEvent(o))}),a()}if(n&2){let e=g(5);P("cost",t)("sort",e.modelCallSort())}}function Mp(n,t){if(n&1&&x(0,bp,1,2,"app-session-turns",45),n&2){let e,i=g(4);v((e=i.costExplanation())?0:-1,e)}}function Pp(n,t){if(n&1){let e=D();s(0,"app-session-trace",47),S("traceViewChange",function(o){w(e);let r=g(4);return y(r.traceView.set(o))})("traceFilterChange",function(o){w(e);let r=g(4);return y(r.setTraceFilter(o))})("selectTraceEvent",function(o){w(e);let r=g(4);return y(r.selectTraceEvent(o))}),a()}if(n&2){let e=g(4);P("traceView",e.traceView())("traceFilter",e.traceFilter())("traceFilterOptions",e.traceFilterOptions)("filteredTraceEvents",e.filteredTraceEvents())("selectedTraceEvent",e.selectedTraceEvent())("selectedTraceEventDetails",e.selectedTraceEventDetails())("openedFromTurns",e.traceOpenedFromTurns())("flowEvents",e.flowEvents())}}function Op(n,t){if(n&1){let e=D();s(0,"section",36)(1,"app-selected-run-header",37),S("openFirstFilteredSession",function(){w(e);let o=g(3);return y(o.openFirstFilteredSession())})("viewPrices",function(){w(e);let o=g(3);return y(o.activeView.set("pricing"))}),a(),s(2,"nav",38)(3,"button",39),S("click",function(){w(e);let o=g(3);return y(o.selectedRunView.set("overview"))}),s(4,"span"),l(5,"Run facts"),a(),s(6,"strong"),l(7,"Overview"),a(),s(8,"em"),l(9,"Metadata and evidence counts"),a()(),x(10,_p,24,17),a(),x(11,Cp,1,3,"app-session-overview",40),x(12,vp,1,1),x(13,Mp,1,1),x(14,Pp,1,8,"app-session-trace",41),a()}if(n&2){let e,i=g(3);c(),P("session",t)("triage",i.selectedTriage())("outsideFilters",i.selectedSessionOutsideFilters())("filteredCount",i.filteredSessions().length)("pricingFallbacks",i.selectedPricingFallbacks())("savedMemoryCount",i.selectedSessionMemories().length)("savedPlanCount",i.selectedSessionPlanCount())("sessionSizeHelp",i.sessionSizeHelp)("pricingFallbackReason",i.pricingFallbackReason),c(2),V("active",i.selectedRunView()==="overview"),c(7),v((e=i.costExplanation())?10:-1,e),c(),v(i.selectedRunView()==="overview"?11:-1),c(),v(i.selectedRunView()==="cost"?12:-1),c(),v(i.selectedRunView()==="turns"?13:-1),c(),v(i.selectedRunView()==="trace"?14:-1)}}function wp(n,t){if(n&1){let e=D();s(0,"section",25)(1,"div",33)(2,"button",34),S("click",function(){w(e);let o=g(2);return y(o.openSessionRail())}),s(3,"span"),l(4,"Browse sessions"),a(),s(5,"strong"),l(6),h(7,"number"),a()(),x(8,hp,2,1,"span"),a(),x(9,fp,1,3,"app-session-import-context",35),x(10,Op,15,16,"section",36),a()}if(n&2){let e,i,o,r=g(2);c(6),f(M(7,4,r.filteredSessions().length)),c(2),v((e=r.selectedSession())?8:-1,e),c(),v((i=(i=r.sessionData())==null?null:i.ingestion)?9:-1,i),c(),v((o=r.selectedSession())?10:-1,o)}}function yp(n,t){if(n&1&&(x(0,Qd,8,3,"aside",24),x(1,Xd,4,0)(2,np,4,0)(3,rp,4,0)(4,lp,4,0)(5,pp,4,0)(6,mp,4,0)(7,wp,11,6,"section",25)),n&2){let e,i=g();v((e=i.debugLogGuidance())?0:-1,e),c(),v(i.activeView()==="usage"?1:i.activeView()==="memory"?2:i.activeView()==="customizations"?3:i.activeView()==="pricing"?4:i.activeView()==="analytics"?5:i.activeView()==="compare"?6:i.activeView()==="sessions"?7:-1)}}var Tn=class n{sessionDataService=T(fn);selectedRunExplanationService=T(vn);document=T(le);sessionData=this.sessionDataService.sessionData;sessionDataLoadState=this.sessionDataService.loadState;sessionDataLoadError=this.sessionDataService.loadError;sessionDataRefreshState=this.sessionDataService.refreshState;sessionDataRefreshMessage=this.sessionDataService.refreshMessage;runtimeStatus=this.sessionDataService.runtimeStatus;runtimeStatusAvailable=this.sessionDataService.runtimeStatusAvailable;selectedId=N(null);compareA=N(null);compareB=N(null);query=N("");sizeFilter=N("all");warningFilter=N("all");workspaceFilter=N("all");modelFilter=N("all");timeFilter=N("all");traceView=N("logs");traceFilter=N("all");selectedTraceEventIndex=N(null);traceOpenedFromTurns=N(!1);modelCallSort=N("timeline");availableViews=So(["usage","sessions","memory","customizations","compare","analytics","pricing"]);hostMode=Vt().mode;canOpenSessions=this.availableViews.includes("sessions");activeView=N(this.readInitialView());selectedRunView=N("overview");sessionRailOpen=N(!1);theme=N(this.readStoredTheme());allowancePlan=N("business-standard");activeRefreshMode=N(null);pricingSourceUrl=To;help={appEstimate:"Estimated from imported local token counts and GitHub published model prices. This is useful for debugging a run, but it is not your GitHub bill.",debugLogs:"Best source for cost debugging. These VS Code logs include the model used plus input and output token counts for each model call.",chatSnapshots:"Useful for seeing chat history, but weaker for cost. They often do not include the full prompt/context token count sent to the model.",stateDbs:"VS Code local databases. We read them only to improve titles, labels, location, and restored-session details.",stateEnriched:"This many sessions got better names/details from VS Code state. Cost still comes from debug logs.",emptyDebugLogs:"Folders VS Code created but never filled with useful chat/model activity. We skip them so they do not look like real zero-cost runs.",snapshotsWithoutRequests:"Chat files without usable request records. They do not contain enough structure to import safely.",inputTokens:"Normal, non-cached input/context tokens priced at the GitHub input rate. Raw VS Code inputTokens can be higher when cachedTokens are present.",outputTokens:"Generated model response tokens.",cachedInput:"Input/context tokens VS Code reported as cachedTokens. They are part of the raw input sent to the model, but priced with GitHub cached-input rates instead of normal input rates.",cacheWrite:"Provider cache creation tokens when the billing source exposes them. GitHub lists this mainly for Anthropic pricing rows.",priceRow:"The GitHub model pricing row used to estimate this model. Unknown models keep their display label and show any pricing fallback separately.",pricingFallback:"Some imported model names do not exactly match a GitHub pricing row. Those runs keep their original model label, but their estimate uses this pricing row as an explicit fallback assumption."};sessionTriageHelp="Fast read derived from imported tokens and model mix. These are cost-debugging signals, not billing rows.";sizeOptions=["all","Small","Medium","Large","Very large"];timeOptions=[{value:"all",label:"All time"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"90d",label:"Last 90 days"}];traceFilterOptions=[{value:"all",label:"All events"},{value:"model",label:"Model calls"},{value:"tool",label:"Tools"},{value:"discovery",label:"Discovery"},{value:"message",label:"User messages"},{value:"response",label:"Agent responses"},{value:"error",label:"Errors"}];sessions=q(()=>this.sessionData()?.sessions??[]);memories=q(()=>this.sessionData()?.memories??[]);customizations=q(()=>this.sessionData()?.customizations??[]);ingestion=q(()=>this.sessionData()?.ingestion??null);debugLogGuidance=q(()=>{let t=this.sessionData(),e=t?.ingestion;if(!e||e.importedDebugLogSessions>0)return null;let i=Vt().agentDebugLogFileLoggingEnabled,o=e.importedChatSnapshotSessions>0||(t?.sessions.length??0)>0;return{title:i===!1?"Agent Debug Log file logging is off":"No Agent Debug Log sessions imported",body:o?"Some weaker local data was imported, but exact model-call usage needs VS Code Agent Debug Log file logging.":"No exact model-call data was found. Enable VS Code Agent Debug Log file logging, run a Copilot chat or agent session, then refresh.",setting:"github.copilot.chat.agentDebugLog.fileLogging.enabled"}});warningOptions=q(()=>{let t=new Set;for(let e of this.sessions())for(let i of this.sessionTriage(e).warnings)t.add(i.label);return["all",...[...t].sort()]});workspaceOptions=q(()=>["all",...[...new Set(this.sessions().map(t=>t.workspace).filter(Boolean))].sort()]);modelOptions=q(()=>["all",...[...new Set(this.sessions().map(t=>t.model).filter(Boolean))].sort()]);latestSessionTime=q(()=>Math.max(0,...this.sessions().map(t=>Date.parse(t.startedAt)||0)));filteredSessions=q(()=>{let t=this.query().trim().toLowerCase(),e=this.sizeFilter(),i=this.warningFilter(),o=this.workspaceFilter(),r=this.modelFilter(),d=this.timeFilter();return[...this.sessions()].sort((u,m)=>m.startedAt.localeCompare(u.startedAt)).filter(u=>this.matchesQuery(u,t)&&this.matchesSizeFilter(u,e)&&this.matchesWarningFilter(u,i)&&this.matchesWorkspaceFilter(u,o)&&this.matchesModelFilter(u,r)&&this.matchesTimeFilter(u,d))});selectedSession=q(()=>{let t=this.selectedId()??this.filteredSessions()[0]?.id;return this.sessions().find(e=>e.id===t)??null});selectedSessionMemories=q(()=>{let t=this.selectedSession()?.id;return t?this.memories().filter(e=>e.sessionId===t):[]});selectedSessionPlanCount=q(()=>this.selectedSessionMemories().filter(t=>t.kind==="plan").length);selectedRunExplanationState=this.selectedRunExplanationService.createState({filteredSessions:this.filteredSessions,selectedSession:this.selectedSession,modelCallSort:this.modelCallSort,traceFilter:this.traceFilter,selectedTraceEventIndex:this.selectedTraceEventIndex});costExplanation=this.selectedRunExplanationState.costExplanation;flowEvents=this.selectedRunExplanationState.flowEvents;filteredTraceEvents=this.selectedRunExplanationState.filteredTraceEvents;selectedTraceEvent=this.selectedRunExplanationState.selectedTraceEvent;selectedTraceEventDetails=this.selectedRunExplanationState.selectedTraceEventDetails;selectedSessionOutsideFilters=this.selectedRunExplanationState.selectedSessionOutsideFilters;selectedPricingFallbacks=this.selectedRunExplanationState.selectedPricingFallbacks;selectedTriage=this.selectedRunExplanationState.selectedTriage;summary=q(()=>{let t=this.sessions(),e=t.reduce((i,o)=>(i.usd+=we(o),i.input+=o.tokens.input,i.output+=o.tokens.output,i.cachedInput+=o.tokens.cachedInput,i.cacheWrite+=o.tokens.cacheWrite,i),{usd:0,input:0,output:0,cachedInput:0,cacheWrite:0});return O({count:t.length},e)});initializedFromSessionData=!1;constructor(){At(()=>{let t=this.sessionData();!t||this.initializedFromSessionData||(this.initializedFromSessionData=!0,this.selectedId.set(t.sessions[0]?.id??null),this.compareA.set(t.sessions[0]?.id??null),this.compareB.set(t.sessions[1]?.id??null))}),At(()=>{let t=this.theme();this.document.documentElement.dataset.theme=t,this.document.documentElement.style.colorScheme=t,this.persistTheme(t)}),At(()=>{this.sessionDataRefreshState()!=="refreshing"&&this.activeRefreshMode.set(null)})}toggleTheme(){this.theme.set(this.theme()==="light"?"dark":"light")}themeLabel(){return this.theme()==="light"?"Light":"Dark"}refreshSessionData(t="quick"){this.activeRefreshMode.set(t),this.sessionDataService.refresh(t)}refreshActiveViewData(){this.refreshSessionData("quick")}topbarScanLabel(){return this.sessionDataRefreshState()==="refreshing"?this.activeRefreshMode()==="customizations"?"Analyzing":this.activeRefreshMode()==="full"?"Rescanning":"Checking":"Refresh"}topbarScanStatus(){let t=this.runtimeStatus(),e=this.sessionDataRefreshMessage();if(this.sessionDataRefreshState()==="refreshing"){let i=t?.scanProgress,o=Number(i?.workspaceIndex??i?.index??0),r=Number(i?.workspaceTotal??i?.total??0),d=i?.workspace||i?.workspaceDir||"";return o>0&&r>0?t?.activeScanMode==="customizations"?"Checking customization evidence":`${o.toLocaleString()} of ${r.toLocaleString()} storage entries checked`:t?.activeScanMode==="customizations"?"Checking customization evidence":e||"Scanning local VS Code data"}return t?.scanning===!0?t.activeScanMode==="customizations"?"Checking customization evidence in the background":"Background scan running":this.sessionDataRefreshState()==="error"?e||"Scan failed":this.sessionDataRefreshState()==="success"&&e?e:this.dataUpdatedLabel()}cancelScan(){this.sessionDataService.cancelScan()}showGlobalStatePanel(){return this.sessionDataLoadState()!=="ready"||this.sessionDataRefreshState()==="error"?!0:this.sessionDataRefreshState()!=="refreshing"?!1:this.activeView()!=="customizations"||this.activeRefreshMode()!=="customizations"}isRuntimeScanning(){return this.runtimeStatus()?.scanning===!0||this.sessionDataRefreshState()==="refreshing"}dataUpdatedLabel(){let t=this.sessionData()?.generatedAt;if(!t)return"No imported data";let e=new Date(t);return Number.isNaN(e.getTime())?"Imported data ready":`Updated ${e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`}selectSession(t){this.selectedId.set(t.id),this.selectedRunView.set("overview"),this.selectedTraceEventIndex.set(null),this.traceOpenedFromTurns.set(!1)}openFirstFilteredSession(){let t=this.filteredSessions()[0];t&&this.selectSession(t)}setQuery(t){this.query.set(t)}setSizeFilter(t){this.sizeFilter.set(t)}setWarningFilter(t){this.warningFilter.set(t)}selectSessionFromRail(t){this.selectSession(t),this.sessionRailOpen.set(!1)}openSessionRail(){this.sessionRailOpen.set(!0)}closeSessionRail(){this.sessionRailOpen.set(!1)}setWorkspaceFilter(t){this.workspaceFilter.set(t)}setModelFilter(t){this.modelFilter.set(t)}setTimeFilter(t){this.timeFilter.set(t)}setAllowancePlan(t){Eo.some(e=>e.id===t)&&this.allowancePlan.set(t)}setTraceFilter(t){this.traceFilter.set(t),this.selectedTraceEventIndex.set(null),this.traceOpenedFromTurns.set(!1)}selectTraceEvent(t){this.selectedTraceEventIndex.set(t.index),this.traceOpenedFromTurns.set(!1)}openTraceEvent(t){this.selectedRunView.set("trace"),this.traceView.set("logs"),this.traceFilter.set("all"),this.selectedTraceEventIndex.set(t),this.traceOpenedFromTurns.set(!0)}pricingFallbackReason=ko;openSession(t){t&&this.isViewAvailable("sessions")&&(this.selectedId.set(t.id),this.activeView.set("sessions"),this.selectedRunView.set("overview"),this.selectedTraceEventIndex.set(null),this.traceOpenedFromTurns.set(!1))}sessionTriage(t){return st(t)}sessionSizeHelp(t){return Gr(t)}matchesQuery(t,e){return e?[t.firstPrompt,t.title,t.workspace,t.model,t.tags.join(" ")].join(" ").toLowerCase().includes(e):!0}matchesSizeFilter(t,e){return e==="all"||this.sessionTriage(t).size===e}matchesWarningFilter(t,e){return e==="all"||this.sessionTriage(t).warnings.some(i=>i.label===e)}matchesWorkspaceFilter(t,e){return e==="all"||t.workspace===e}matchesModelFilter(t,e){return e==="all"||t.model===e}matchesTimeFilter(t,e){if(e==="all")return!0;let i=this.latestSessionTime(),o=Date.parse(t.startedAt),r=Number(e.replace("d",""));return!i||!Number.isFinite(o)||!Number.isFinite(r)?!1:o>=i-r*24*60*60*1e3}readStoredTheme(){try{return globalThis.localStorage?.getItem("copilot-usage-studio-theme")==="dark"?"dark":"light"}catch{return"light"}}readInitialView(){try{let e=Vt().initialView||new URL(globalThis.location?.href??"").searchParams.get("view"),i=e==="sessions"||e==="usage"||e==="memory"||e==="customizations"||e==="compare"||e==="analytics"||e==="pricing"?e:"usage";return this.isViewAvailable(i)?i:this.firstAvailableView()}catch{return this.firstAvailableView()}}isViewAvailable(t){return this.availableViews.includes(t)}firstAvailableView(){let[t]=this.availableViews;return t==="sessions"||t==="usage"||t==="memory"||t==="customizations"||t==="compare"||t==="analytics"||t==="pricing"?t:"usage"}persistTheme(t){try{globalThis.localStorage?.setItem("copilot-usage-studio-theme",t)}catch{}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-root"]],decls:37,vars:31,consts:[[1,"shell"],[1,"topbar"],[1,"brand"],["aria-hidden","true",1,"brand-mark"],[1,"eyebrow"],["aria-label","Application views",1,"view-nav"],["type","button",3,"active"],[1,"topbar-actions"],[1,"data-refresh"],["type","button","title","Check for new Copilot sessions and memories",1,"data-refresh-button",3,"click","disabled"],["aria-hidden","true",1,"refresh-icon"],["aria-live","polite",1,"data-refresh-status"],["type","button",1,"theme-toggle",3,"click"],["aria-hidden","true",1,"theme-toggle-track"],[1,"theme-toggle-thumb"],[1,"app-body"],[1,"content"],[3,"state","error","refreshState","runtimeStatus","runtimeStatusAvailable"],["type","button",3,"click"],[1,"nav-label"],[1,"nav-preview"],[3,"queryChange","sizeFilterChange","warningFilterChange","workspaceFilterChange","modelFilterChange","timeFilterChange","selectSession","closeRail","sessions","filteredSessions","selectedSessionId","query","sizeFilter","warningFilter","workspaceFilter","modelFilter","timeFilter","warningOptions","sizeOptions","workspaceOptions","modelOptions","timeOptions"],["type","button","aria-label","Close session browser",1,"rail-backdrop",3,"click"],[3,"refresh","cancelScan","state","error","refreshState","runtimeStatus","runtimeStatusAvailable"],["aria-label","Agent Debug Log guidance",1,"source-guidance"],[1,"sessions-page"],[3,"allowancePlanChange","openSession","sessions","allowancePlan","canOpenSession"],[1,"deferred-panel"],[3,"openSession","memories","sessions","canOpenSession"],[3,"scanEvidence","cancelScan","openSession","customizations","sessions","ingestion","refreshState","refreshMessage","runtimeStatus"],[3,"selectedAllowancePlanChange","sessions","selectedAllowancePlan"],[3,"openSession","sessions"],[3,"compareAChange","compareBChange","sessions","compareA","compareB"],[1,"sessions-mobile-toolbar"],["type","button",1,"session-rail-toggle",3,"click"],[3,"ingestion","summary","help"],[1,"detail"],[3,"openFirstFilteredSession","viewPrices","session","triage","outsideFilters","filteredCount","pricingFallbacks","savedMemoryCount","savedPlanCount","sessionSizeHelp","pricingFallbackReason"],["aria-label","Selected run investigation flow",1,"run-tabs","debugger-map"],["type","button",1,"overview-tab",3,"click"],[3,"session","triage","triageHelp"],[3,"traceView","traceFilter","traceFilterOptions","filteredTraceEvents","selectedTraceEvent","selectedTraceEventDetails","openedFromTurns","flowEvents"],["type","button",1,"flow-tab",3,"click"],[3,"openCallsTimeline","session","triage","triageHelp"],[3,"session","cost","help","pricingSourceUrl"],[3,"cost","sort"],[3,"sortChange","openTraceEvent","cost","sort"],[3,"traceViewChange","traceFilterChange","selectTraceEvent","traceView","traceFilter","traceFilterOptions","filteredTraceEvents","selectedTraceEvent","selectedTraceEventDetails","openedFromTurns","flowEvents"]],template:function(e,i){e&1&&(s(0,"main",0)(1,"header",1)(2,"div",2)(3,"span",3),l(4,"US"),a(),s(5,"div")(6,"p",4),l(7,"Local usage intelligence"),a(),s(8,"h1"),l(9,"Copilot Usage Studio"),a()()(),s(10,"nav",5),x(11,$d,2,2,"button",6),x(12,jd,2,2,"button",6),x(13,Bd,2,2,"button",6),x(14,Hd,5,2,"button",6),x(15,qd,2,2,"button",6),x(16,Wd,2,2,"button",6),x(17,Gd,2,2,"button",6),a(),s(18,"div",7)(19,"div",8)(20,"button",9),S("click",function(){return i.refreshActiveViewData()}),s(21,"span",10),l(22,"\u21BB"),a(),s(23,"span"),l(24),a()(),s(25,"span",11),l(26),a()(),s(27,"button",12),S("click",function(){return i.toggleTheme()}),s(28,"span",13),R(29,"span",14),a(),s(30,"span"),l(31),a()()()(),s(32,"div",15),x(33,Kd,2,14),s(34,"section",16),x(35,Yd,1,5,"app-session-data-state-panel",17),x(36,yp,8,2),a()()()),e&2&&(V("theme-light",i.theme()==="light")("theme-dark",i.theme()==="dark")("host-vscode",i.hostMode==="vscode"),c(11),v(i.isViewAvailable("usage")?11:-1),c(),v(i.isViewAvailable("sessions")?12:-1),c(),v(i.isViewAvailable("memory")?13:-1),c(),v(i.isViewAvailable("customizations")?14:-1),c(),v(i.isViewAvailable("compare")?15:-1),c(),v(i.isViewAvailable("analytics")?16:-1),c(),v(i.isViewAvailable("pricing")?17:-1),c(2),V("error",i.sessionDataRefreshState()==="error"),c(),P("disabled",i.sessionDataRefreshState()==="refreshing"),Pe("aria-busy",i.sessionDataRefreshState()==="refreshing"),c(),V("spinning",i.sessionDataRefreshState()==="refreshing"),c(3),f(i.topbarScanLabel()),c(2),b(" ",i.topbarScanStatus()," "),c(),Pe("aria-pressed",i.theme()==="dark")("aria-label","Switch to "+(i.theme()==="light"?"dark":"light")+" theme"),c(4),f(i.themeLabel()),c(),V("with-rail",i.activeView()==="sessions")("rail-open",i.sessionRailOpen()),c(),v(i.activeView()==="sessions"?33:-1),c(2),v(i.showGlobalStatePanel()?35:-1),c(),v(i.sessionDataLoadState()==="ready"?36:-1))},dependencies:[_n,bn,Mn,Pn,On,wn,yn,Sn,ee],styles:['.shell[_ngcontent-%COMP%], .shell[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box}.shell[_ngcontent-%COMP%]{display:grid;grid-template-columns:360px 1fr;min-height:100vh}.sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;min-height:100vh;padding:24px;background:#17212b;color:#f7fafc}.brand[_ngcontent-%COMP%], .detail-header[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:4px 0 0;letter-spacing:0}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:24px}.eyebrow[_ngcontent-%COMP%]{margin:0;color:#66818d;font-size:12px;font-weight:700;letter-spacing:0;text-transform:uppercase}.sidebar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%]{color:#9fb1bf}.source-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 4px}.source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;border:1px solid #dbe5eb;border-radius:999px;padding:3px 8px;color:#60717f;background:#f8fafb;font-size:12px;font-weight:800}.view-nav[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:0;border:1px solid rgba(255,255,255,.14);border-radius:6px;padding:9px 10px;background:#ffffff12;color:#d8e4eb;font-weight:800;cursor:pointer}.view-nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-color:#52b4a9;background:#52b4a92e;color:#fff}.search[_ngcontent-%COMP%]{display:grid;gap:8px;color:#cbd6df;font-size:13px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;border:1px solid #d5dde5;border-radius:8px;padding:10px 12px;background:#fff;color:#16202a}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border-color:#ffffff24;background:#ffffff14;color:#fff}.session-list[_ngcontent-%COMP%]{display:grid;gap:10px;overflow:auto}.session-card[_ngcontent-%COMP%]{display:grid;gap:8px;width:100%;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:14px;background:#ffffff0f;color:inherit;text-align:left;cursor:pointer}.session-card.active[_ngcontent-%COMP%]{border-color:#52b4a9;background:#52b4a924}.session-title[_ngcontent-%COMP%]{font-weight:800;line-height:1.3;overflow-wrap:anywhere}.session-meta[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%]{color:#b6c3ce;font-size:13px;overflow-wrap:anywhere}.session-footer[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f7fafc}.sidebar[_ngcontent-%COMP%], .session-list[_ngcontent-%COMP%], .session-card[_ngcontent-%COMP%]{min-width:0}.badge-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:7px}.triage-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;width:fit-content;border:1px solid #d8e2e8;border-radius:999px;padding:4px 8px;background:#f7fafb;color:#445766;font-size:12px;font-weight:850}.sidebar[_ngcontent-%COMP%] .triage-badge[_ngcontent-%COMP%]{border-color:#ffffff26;background:#ffffff14;color:#dce8ef}.triage-badge.medium[_ngcontent-%COMP%]{border-color:#e6c98f;background:#fff8ea;color:#7a4d09}.triage-badge.high[_ngcontent-%COMP%]{border-color:#e7b6a6;background:#fff3ef;color:#8a391f}.content[_ngcontent-%COMP%]{display:grid;gap:22px;align-content:start;padding:28px}.workspace-overview[_ngcontent-%COMP%]{display:grid;gap:12px}.import-context[_ngcontent-%COMP%]{border:1px solid var(--line, #dfe6ed);border-radius:12px;background:#ffffff05}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:42px;padding:9px 12px;color:var(--muted, #60717f);cursor:pointer;list-style:none}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .14s ease}.import-context[open][_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{transform:rotate(45deg)}.import-context-title[_ngcontent-%COMP%]{color:var(--text-strong, #16202a);font-size:12px;font-weight:780;letter-spacing:.06em;text-transform:uppercase}.import-context-note[_ngcontent-%COMP%]{flex:1 1 auto;min-width:180px;color:var(--muted, #60717f);font-size:12px}.import-pill[_ngcontent-%COMP%]{flex:0 0 auto;border:1px solid var(--line, #dfe6ed);border-radius:999px;padding:4px 8px;background:var(--surface-soft, #f8fafb);color:var(--text, #16202a);font-size:11px;font-weight:720;white-space:nowrap}.import-context-body[_ngcontent-%COMP%]{display:grid;gap:10px;border-top:1px solid var(--line, #dfe6ed);padding:10px 12px 12px}.import-context-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--muted, #60717f);font-size:12px}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:0}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:4px;min-width:0;border:1px solid var(--line, #e6edf2);border-radius:9px;padding:8px;background:var(--surface-soft, #f8fafb)}.import-context-body[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;min-width:0;color:var(--muted, #60717f);font-size:11px;line-height:1.2}.import-context-body[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--text-strong, #16202a);font-size:15px;font-weight:760}.summary-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.metric[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%]{border:1px solid #dfe6ed;border-radius:8px;background:#fff}.metric[_ngcontent-%COMP%]{display:grid;gap:6px;padding:16px}.metric[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .price[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#60717f;font-size:13px}.metric[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .price[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#16202a;font-size:24px;letter-spacing:0}.detail[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%]{display:grid;gap:18px;padding:22px}.detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:26px}.detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 14px;color:#3b312a;font-size:16px}.ingestion[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .ingestion-lede[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:5px 0 0;color:#60717f;font-size:13px}.compact-ingestion[_ngcontent-%COMP%]{grid-template-columns:minmax(210px,.65fr) minmax(0,1.35fr);align-items:center;gap:14px;padding:12px 14px}.ingestion-lede[_ngcontent-%COMP%]{min-width:0}.ingestion-lede[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-top:3px;color:#16202a;font-size:16px;line-height:1.2}.ingestion-lede[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;overflow-wrap:anywhere}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;border:1px solid #e6edf2;border-radius:8px;padding:8px 10px;background:#f8fafb}.ingestion[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;min-width:0;color:#60717f;font-size:12px;line-height:1.2}.ingestion[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{flex:0 0 auto;margin:0;color:#16202a;font-size:16px;font-weight:800}.price[_ngcontent-%COMP%]{display:grid;justify-items:end;min-width:140px}.source-callout[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.source-callout[_ngcontent-%COMP%]{border-left:4px solid #52b4a9;padding-left:14px}.source-callout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;margin-bottom:3px;color:#60717f;font-size:12px;font-weight:800;text-transform:uppercase}.source-callout[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#16202a}.source-callout[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{max-width:920px;margin:5px 0 0;color:#4e6070;line-height:1.5}.source-callout[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#245a62;font-weight:800;white-space:nowrap}.source-callout[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:center;white-space:nowrap}.source-callout[_ngcontent-%COMP%] .inline-fallback[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;margin:0 12px 4px 0;color:inherit;font-size:13px;font-weight:800;text-transform:none}.filter-mismatch-callout[_ngcontent-%COMP%], .pricing-fallback-callout[_ngcontent-%COMP%]{margin-top:14px}.empty[_ngcontent-%COMP%]{margin:0;color:#60717f}.ghost-button[_ngcontent-%COMP%]{border:1px solid #c9d7de;border-radius:6px;padding:9px 12px;color:#245a62;background:#fff;font-weight:800;cursor:pointer}.ghost-button[_ngcontent-%COMP%]:hover{border-color:#7fb0b7}.pricing-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.pricing-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:4px 0 0;color:#16202a;font-size:28px;letter-spacing:0}.muted[_ngcontent-%COMP%]{color:#8795a1!important}@media(max-width:1200px)and (min-width:901px){.shell[_ngcontent-%COMP%]{grid-template-columns:300px minmax(0,1fr)}.sidebar[_ngcontent-%COMP%]{gap:16px;padding:20px}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:22px}.view-nav[_ngcontent-%COMP%]{grid-template-columns:1fr}.session-card[_ngcontent-%COMP%]{padding:12px}}@media(max-width:900px){.shell[_ngcontent-%COMP%]{grid-template-columns:1fr}.sidebar[_ngcontent-%COMP%]{gap:14px;min-height:auto}.session-list[_ngcontent-%COMP%]{max-height:240px;padding-right:4px}.brand[_ngcontent-%COMP%]{display:grid;justify-content:start}.view-nav[_ngcontent-%COMP%], .summary-grid[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr}.detail-header[_ngcontent-%COMP%], .source-callout[_ngcontent-%COMP%], .pricing-header[_ngcontent-%COMP%]{display:grid}.price[_ngcontent-%COMP%]{justify-items:start}}@media(max-width:600px){.sidebar[_ngcontent-%COMP%]{padding:20px 16px}.session-list[_ngcontent-%COMP%]{max-height:150px}.session-card[_ngcontent-%COMP%]{gap:5px;padding:10px}.session-title[_ngcontent-%COMP%]{font-size:14px}.session-meta[_ngcontent-%COMP%], .session-card[_ngcontent-%COMP%] .badge-row[_ngcontent-%COMP%]{display:none}.session-footer[_ngcontent-%COMP%]{gap:8px;font-size:12px}}.shell[_ngcontent-%COMP%]{--bg: #0d1118;--top: #101824;--rail: #0a0e15;--surface: #151d29;--surface-raised: #192333;--surface-soft: #111923;--text: #eef5ff;--text-strong: #ffffff;--muted: #93a4b8;--muted-2: #6f8094;--line: #263445;--line-strong: #34475e;--accent: #7c5cff;--accent-2: #1fd1a5;--warning: #ffba4a;--danger: #ff6b5f;--accent-soft: rgba(124, 92, 255, .2);--teal-soft: rgba(31, 209, 165, .13);display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);min-height:100vh;background:var(--bg);color:var(--text)}.topbar[_ngcontent-%COMP%]{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);gap:18px;align-items:center;border-bottom:1px solid var(--line);padding:14px 22px;background:radial-gradient(circle at 18% 0%,rgba(124,92,255,.16),transparent 28%),var(--top)}.brand[_ngcontent-%COMP%]{justify-content:flex-start}.brand-mark[_ngcontent-%COMP%]{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:linear-gradient(135deg,var(--accent),#4d9cff);color:#fff;font-size:13px;font-weight:950}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-top:2px;color:var(--text-strong);font-size:18px}.eyebrow[_ngcontent-%COMP%]{color:var(--muted-2)}.topbar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%]{color:#8fa0b5}.view-nav[_ngcontent-%COMP%]{display:inline-flex;justify-self:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:4px;background:#0a0e15ad}.view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;border-radius:7px;padding:8px 12px;background:transparent;color:var(--muted);font-size:13px}.view-nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--accent);color:#fff}.app-body[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;min-height:calc(100vh - 65px);min-width:0;background:var(--bg)}.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:330px minmax(0,1fr)}.sidebar[_ngcontent-%COMP%]{position:sticky;top:65px;align-self:start;min-width:0;height:calc(100vh - 65px);min-height:0;border-right:1px solid var(--line);padding:18px;background:var(--rail)}.content[_ngcontent-%COMP%]{min-width:0;padding:24px;background:radial-gradient(circle at 80% 0%,rgba(124,92,255,.12),transparent 30%),var(--bg)}.search[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--muted)}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border-color:var(--line);background:var(--surface-soft);color:var(--text)}.session-list[_ngcontent-%COMP%]{min-height:0}.session-card[_ngcontent-%COMP%]{border-color:var(--line);background:#111a25}.session-card[_ngcontent-%COMP%]:hover{border-color:var(--line-strong);background:#142033}.session-card.active[_ngcontent-%COMP%]{border-color:var(--accent);background:#201a3e;box-shadow:0 0 0 2px var(--accent-soft)}.sessions-page[_ngcontent-%COMP%]{display:grid;gap:14px}.sessions-page[_ngcontent-%COMP%] > .summary-grid[_ngcontent-%COMP%]{margin:0}.sessions-page[_ngcontent-%COMP%] .ingestion[_ngcontent-%COMP%]{margin:0}.detail[_ngcontent-%COMP%]{display:grid;gap:14px;overflow:visible}.detail-header[_ngcontent-%COMP%]{align-items:stretch;border:1px solid var(--line);border-radius:14px;padding:18px;background:linear-gradient(135deg,#7c5cff2e,#1fd1a514),var(--surface-soft)}.detail-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{min-width:min(100%,380px)}.detail[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{display:grid;align-content:center;min-width:190px;border:1px solid rgba(31,209,165,.22);border-radius:12px;padding:16px;background:#1fd1a514}.detail[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:clamp(26px,4vw,42px);line-height:1}.credit-meter[_ngcontent-%COMP%]{display:grid;gap:7px;width:100%;margin-top:12px}.credit-meter[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.credit-meter[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{max-width:120px;border:1px solid var(--line);border-radius:999px;padding:5px 8px;background:#050c1661;color:var(--text);font:inherit;font-size:12px;font-weight:720}.credit-bar[_ngcontent-%COMP%]{height:6px;overflow:hidden;border-radius:999px;background:#ffffff1a}.credit-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent-2),#ffba4a)}.credit-meter[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-style:normal;font-weight:650;text-align:right}.run-tabs[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(120px,.72fr) repeat(3,minmax(145px,1fr));gap:6px}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:relative;display:grid;align-content:center;gap:3px;min-height:58px;border:1px solid var(--line);border-radius:11px;padding:9px 10px;background:var(--surface-soft);color:var(--muted);font:inherit;text-align:left;cursor:pointer}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:after{content:"";position:absolute;top:50%;right:-12px;width:14px;height:1px;background:var(--line-strong)}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child:after{display:none}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{border-color:var(--line-strong);color:var(--text)}.run-tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-color:#6f5cff80;background:linear-gradient(135deg,#6f5cff2e,#27d6b014),var(--surface-soft);color:var(--text-strong);box-shadow:0 0 0 1px #6f5cff1f,0 14px 30px #00000029}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--muted-2);font-size:9px;font-weight:760;letter-spacing:.08em;text-transform:uppercase}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px;font-weight:760;line-height:1.1}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--muted);font-size:11px;font-style:normal;line-height:1.25;overflow-wrap:anywhere}.run-tabs[_ngcontent-%COMP%] .flow-tab[_ngcontent-%COMP%]{border-top:3px solid var(--accent-2)}.run-tabs[_ngcontent-%COMP%] .overview-tab[_ngcontent-%COMP%]{border-top:3px solid var(--line-strong)}.session-title[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .metric[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .price[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .ingestion-lede[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .pricing-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .source-callout[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--text-strong)}.session-meta[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%], .session-scan[_ngcontent-%COMP%], .filter-count[_ngcontent-%COMP%], .metric[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .price[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .pricing-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .source-callout[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .ingestion-lede[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .empty[_ngcontent-%COMP%], .muted[_ngcontent-%COMP%]{color:var(--muted)}.deferred-panel[_ngcontent-%COMP%]{margin:0;border:1px solid var(--line);border-radius:14px;padding:18px;background:var(--surface);color:var(--muted);box-shadow:var(--shadow-soft)}.source-guidance[_ngcontent-%COMP%]{display:grid;gap:6px;border:1px solid color-mix(in srgb,var(--warning) 34%,var(--line));border-radius:12px;padding:12px 14px;background:var(--surface);box-shadow:var(--shadow-soft)}.source-guidance[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--text-strong);font-size:14px}.source-guidance[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.45}.source-guidance[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{color:var(--text);font-size:12px;overflow-wrap:anywhere}.ingestion[_ngcontent-%COMP%] dd[_ngcontent-%COMP%], .detail-subtitle[_ngcontent-%COMP%]{color:var(--text)}.metric[_ngcontent-%COMP%], .detail[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%]{border-color:var(--line);background:var(--surface)}.detail[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%]{box-shadow:0 18px 50px #00000038}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .source-callout[_ngcontent-%COMP%]{background:var(--surface-soft)}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border-color:var(--line)}.source-callout[_ngcontent-%COMP%]{border-left-color:var(--accent-2)}.triage-badge[_ngcontent-%COMP%], .source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-color:var(--line);background:var(--surface-soft);color:var(--text)}.triage-badge.medium[_ngcontent-%COMP%]{border-color:#ffba4a73;background:#ffba4a1f;color:#ffe0a0}.triage-badge.high[_ngcontent-%COMP%]{border-color:#ff6b5f80;background:#ff6b5f1f;color:#ffc2bd}.ghost-button[_ngcontent-%COMP%]{border-color:var(--line);background:var(--surface-soft);color:var(--text)}@media(max-width:1100px){.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:280px minmax(0,1fr)}.topbar[_ngcontent-%COMP%]{grid-template-columns:minmax(170px,1fr) auto minmax(170px,1fr);justify-items:initial}.view-nav[_ngcontent-%COMP%]{justify-self:center}}@media(max-width:900px){.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:1fr}.content[_ngcontent-%COMP%]{order:1;padding:18px}.sidebar[_ngcontent-%COMP%]{order:2;position:static;height:auto;max-height:45vh;border-top:1px solid var(--line);border-right:0;overflow:auto}.view-nav[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.summary-grid[_ngcontent-%COMP%], .metrics[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-ingestion[_ngcontent-%COMP%]{grid-template-columns:1fr}.compact-ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.topbar[_ngcontent-%COMP%]{padding:12px 14px}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:16px}.view-nav[_ngcontent-%COMP%], .run-tabs[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-grid[_ngcontent-%COMP%], .metrics[_ngcontent-%COMP%], .compact-ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr}}.shell[_ngcontent-%COMP%], [_nghost-%COMP%]{background:#090d14}.shell[_ngcontent-%COMP%]{--bg: #090d14;--top: #0d1420;--rail: #0a1019;--surface: #111a26;--surface-raised: #152130;--surface-soft: #0d1520;--text: #dfe7f1;--text-strong: #f7fbff;--muted: #91a0b3;--muted-2: #728196;--line: #1f2b3a;--line-strong: #314154;--accent: #6f5cff;--accent-2: #27d6b0;--accent-soft: rgba(111, 92, 255, .16);--teal-soft: rgba(39, 214, 176, .12);font-size:14px}.topbar[_ngcontent-%COMP%]{grid-template-columns:minmax(190px,1fr) auto minmax(190px,1fr);gap:14px;min-height:58px;padding:10px 18px;background:linear-gradient(180deg,rgba(255,255,255,.018),transparent),var(--top)}.brand[_ngcontent-%COMP%]{gap:10px;align-items:center}.brand-mark[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:8px;font-size:11px;box-shadow:0 8px 28px #6f5cff40}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:760;line-height:1.1}.eyebrow[_ngcontent-%COMP%], .topbar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%]{color:var(--muted-2);font-size:10px;font-weight:760;letter-spacing:.08em}.view-nav[_ngcontent-%COMP%]{gap:3px;border-radius:999px;padding:3px;background:#070b12c7}.view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:999px;min-height:30px;padding:6px 11px;font-size:12px;font-weight:720}.view-nav[_ngcontent-%COMP%] .nav-label[_ngcontent-%COMP%], .view-nav[_ngcontent-%COMP%] .nav-preview[_ngcontent-%COMP%]{display:block;line-height:1.05}.view-nav[_ngcontent-%COMP%] .nav-preview[_ngcontent-%COMP%]{margin-top:1px;color:var(--nav-preview-text, #7c8aa0);font-size:9px;font-weight:760;text-transform:uppercase}.view-nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%] .nav-preview[_ngcontent-%COMP%]{color:var(--nav-preview-active-text, rgba(255, 255, 255, .86))}.view-nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{box-shadow:0 7px 18px #6f5cff3d}.app-body[_ngcontent-%COMP%]{min-height:calc(100vh - 58px)}.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:clamp(236px,24vw,300px) minmax(0,1fr)}.sidebar[_ngcontent-%COMP%]{top:58px;height:calc(100vh - 58px);gap:14px;padding:14px}.content[_ngcontent-%COMP%]{gap:18px;padding:20px;background:var(--bg)}.search[_ngcontent-%COMP%]{gap:6px;font-size:12px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{min-height:34px;border-radius:9px;padding:7px 10px;font-size:13px}.filters[_ngcontent-%COMP%]{display:grid;gap:8px}.filters[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:5px;font-size:12px}.filter-count[_ngcontent-%COMP%]{margin:-2px 0 0;color:var(--muted-2);font-size:12px}.session-list[_ngcontent-%COMP%]{gap:8px}.session-card[_ngcontent-%COMP%]{gap:6px;border-radius:11px;padding:11px;background:#0e1723;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease}.session-title[_ngcontent-%COMP%]{display:-webkit-box;font-size:13px;font-weight:680;line-height:1.28;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:4}.session-meta[_ngcontent-%COMP%], .session-footer[_ngcontent-%COMP%], .session-scan[_ngcontent-%COMP%]{font-size:12px}.session-card[_ngcontent-%COMP%]:hover{transform:translateY(-1px)}.session-card[_ngcontent-%COMP%]:focus-visible, .view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible, .run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible, .ghost-button[_ngcontent-%COMP%]:focus-visible, .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible, .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgba(39,214,176,.75);outline-offset:2px}.triage-badge[_ngcontent-%COMP%], .source-meta[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{padding:3px 7px;font-size:11px;font-weight:720}.summary-grid[_ngcontent-%COMP%]{gap:10px}.metric[_ngcontent-%COMP%]{gap:4px;border-radius:12px;padding:12px;background:var(--surface)}.metric[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .price[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px}.metric[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:19px;font-weight:760}.detail[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%]{border-radius:14px;padding:16px;box-shadow:0 14px 36px #0000002e}.compact-ingestion[_ngcontent-%COMP%]{gap:12px;padding:12px}.ingestion-lede[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:14px}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{gap:7px}.ingestion[_ngcontent-%COMP%] dl[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border-radius:9px;padding:7px 9px}.ingestion[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{font-size:11px}.ingestion[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{font-size:14px;font-weight:760}.detail[_ngcontent-%COMP%]{gap:16px}.detail-header[_ngcontent-%COMP%]{border-radius:14px;padding:14px;background:linear-gradient(135deg,#6f5cff21,#27d6b00e),var(--surface-soft)}.detail[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .ingestion[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:19px;font-weight:760;line-height:1.18}.detail-subtitle[_ngcontent-%COMP%]{margin:6px 0 0;font-size:13px}.detail[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{min-width:150px;border-radius:12px;padding:12px}.detail[_ngcontent-%COMP%] .price[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:clamp(24px,3vw,34px);font-weight:760}.credit-meter[_ngcontent-%COMP%]{margin-top:10px}.run-tabs[_ngcontent-%COMP%]{gap:6px}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:58px}.source-callout[_ngcontent-%COMP%]{border-radius:12px;padding:12px}.source-callout[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:15px;font-weight:760}.source-callout[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px;line-height:1.42}.sidebar[_ngcontent-%COMP%], .session-list[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{scrollbar-color:#34475e transparent}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar, .session-list[_ngcontent-%COMP%]::-webkit-scrollbar, .content[_ngcontent-%COMP%]::-webkit-scrollbar{width:10px;height:10px}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .session-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background:#34475e;background-clip:padding-box}.ghost-button[_ngcontent-%COMP%]{border-radius:9px;padding:7px 10px;font-size:13px;font-weight:720}@media(max-width:1100px){.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:248px minmax(0,1fr)}.topbar[_ngcontent-%COMP%]{grid-template-columns:minmax(170px,1fr) auto minmax(170px,1fr)}.view-nav[_ngcontent-%COMP%]{justify-self:center;grid-column:auto}}@media(max-width:760px){.topbar[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) auto}.view-nav[_ngcontent-%COMP%]{justify-self:stretch;grid-column:1 / -1}}@media(max-width:900px){.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:1fr}.topbar[_ngcontent-%COMP%]{gap:10px}.content[_ngcontent-%COMP%]{padding:14px}.sidebar[_ngcontent-%COMP%]{max-height:36vh;padding:12px 14px}.view-nav[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.detail-header[_ngcontent-%COMP%]{gap:12px}.run-tabs[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:after{display:none}}@media(max-width:600px){.topbar[_ngcontent-%COMP%]{padding:9px 12px}.topbar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%]{display:none}.brand-mark[_ngcontent-%COMP%]{width:28px;height:28px}.brand[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:15px}.view-nav[_ngcontent-%COMP%]{grid-template-columns:repeat(6,minmax(0,1fr))}.view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:6px 5px;font-size:11px}.summary-grid[_ngcontent-%COMP%], .metrics[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.session-list[_ngcontent-%COMP%]{max-height:170px}.source-meta[_ngcontent-%COMP%]{gap:5px}.run-tabs[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media(max-width:1100px){.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{flex-wrap:wrap}.import-context-note[_ngcontent-%COMP%]{flex:1 0 100%;order:3}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start}.import-context[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:before{margin-top:5px}.import-context-title[_ngcontent-%COMP%], .import-context-note[_ngcontent-%COMP%], .import-pill[_ngcontent-%COMP%]{grid-column:2}.import-context-body[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr}}.shell[_ngcontent-%COMP%]{--bg: #f4f7fb;--top: rgba(255, 255, 255, .86);--rail: #eef5f7;--surface: #ffffff;--surface-raised: #ffffff;--surface-soft: #f8fbfd;--surface-tint: #eef6ff;--text: #26364a;--text-strong: #081423;--muted: #617187;--muted-2: #8191a5;--line: #dbe5ee;--line-strong: #b6c8da;--accent: #6f5cff;--accent-2: #0c9f83;--warning: #c77900;--danger: #d84a3a;--accent-soft: rgba(111, 92, 255, .13);--teal-soft: rgba(12, 159, 131, .1);--focus-ring: rgba(12, 159, 131, .42);--shadow: 0 18px 42px rgba(31, 45, 64, .1);--shadow-soft: 0 8px 22px rgba(31, 45, 64, .07);--control-bg: rgba(255, 255, 255, .82);--nav-bg: rgba(255, 255, 255, .72);--nav-preview-text: #66758b;--nav-preview-active-text: rgba(255, 255, 255, .9);--session-card-bg: rgba(255, 255, 255, .7);--session-card-hover: #ffffff;--session-card-active: linear-gradient(135deg, rgba(111, 92, 255, .12), rgba(12, 159, 131, .08)), #ffffff;--header-gradient: radial-gradient(circle at 100% 0%, rgba(111, 92, 255, .12), transparent 34%), linear-gradient(135deg, rgba(12, 159, 131, .065), rgba(111, 92, 255, .035)), var(--surface);--page-gradient: radial-gradient(circle at 78% 0%, rgba(111, 92, 255, .11), transparent 30%), radial-gradient(circle at 12% 0%, rgba(12, 159, 131, .105), transparent 24%), var(--bg);--scrollbar: #b7c6d7;--success-text: #047863;--warning-text: #8a5700;--danger-text: #a4372b;color-scheme:light}.shell.theme-dark[_ngcontent-%COMP%]{--bg: #090d14;--top: #0d1420;--rail: #0a1019;--surface: #111a26;--surface-raised: #152130;--surface-soft: #0d1520;--surface-tint: #101a28;--text: #dfe7f1;--text-strong: #f7fbff;--muted: #91a0b3;--muted-2: #728196;--line: #1f2b3a;--line-strong: #314154;--accent: #6f5cff;--accent-2: #27d6b0;--warning: #ffba4a;--danger: #ff6b5f;--accent-soft: rgba(111, 92, 255, .16);--teal-soft: rgba(39, 214, 176, .12);--focus-ring: rgba(39, 214, 176, .75);--shadow: 0 18px 50px rgba(0, 0, 0, .22);--shadow-soft: 0 14px 36px rgba(0, 0, 0, .18);--control-bg: rgba(7, 11, 18, .78);--nav-bg: rgba(7, 11, 18, .78);--nav-preview-text: #9ba8bb;--nav-preview-active-text: rgba(255, 255, 255, .88);--session-card-bg: #0e1723;--session-card-hover: #142033;--session-card-active: #201a3e;--header-gradient: linear-gradient(135deg, rgba(111, 92, 255, .13), rgba(39, 214, 176, .055)), var(--surface-soft);--page-gradient: var(--bg);--scrollbar: #34475e;--success-text: #bbfff0;--warning-text: #ffe0a0;--danger-text: #ffc2bd;color-scheme:dark}.shell.theme-light[_ngcontent-%COMP%]{background:var(--page-gradient);color:var(--text)}.shell.theme-light[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffc7,#ffffff94),radial-gradient(circle at 22% 0%,rgba(111,92,255,.16),transparent 30%),var(--top);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);box-shadow:0 1px #ffffffb3 inset,0 12px 30px #1f2d4014}.topbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}.data-refresh[_ngcontent-%COMP%]{display:grid;justify-items:end;gap:3px;min-width:0}.data-refresh-button[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;border:1px solid var(--line);border-radius:999px;padding:5px 11px;background:var(--control-bg);color:var(--text-strong);font:inherit;font-size:12px;font-weight:780;line-height:1;cursor:pointer;box-shadow:var(--shadow-soft)}.data-refresh-button[_ngcontent-%COMP%]:hover:not(:disabled){border-color:color-mix(in srgb,var(--accent-2) 48%,var(--line));background:color-mix(in srgb,var(--accent-2) 8%,var(--control-bg))}.data-refresh-button[_ngcontent-%COMP%]:disabled{cursor:wait;opacity:.72}.data-refresh-button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.refresh-icon[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:14px;height:14px;color:var(--accent-2);font-size:16px;line-height:1}.refresh-icon.spinning[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_refresh-spin .9s linear infinite}.data-refresh-status[_ngcontent-%COMP%]{overflow:hidden;max-width:min(36vw,420px);color:var(--muted);font-size:11px;line-height:1.2;text-align:right;text-overflow:ellipsis;white-space:nowrap}.data-refresh.error[_ngcontent-%COMP%] .data-refresh-status[_ngcontent-%COMP%]{color:var(--danger-text)}@keyframes _ngcontent-%COMP%_refresh-spin{to{transform:rotate(360deg)}}.theme-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;min-height:32px;border:1px solid var(--line);border-radius:999px;padding:4px 10px 4px 5px;background:var(--control-bg);color:var(--text);font:inherit;font-size:12px;font-weight:740;cursor:pointer;box-shadow:var(--shadow-soft)}.theme-toggle-track[_ngcontent-%COMP%]{position:relative;display:inline-flex;width:36px;height:22px;border-radius:999px;background:linear-gradient(135deg,#6f5cff2e,#0c9f8333)}.theme-toggle-thumb[_ngcontent-%COMP%]{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 4px 10px #1f2d4038;transition:transform .16s ease,background .16s ease}.theme-dark[_ngcontent-%COMP%] .theme-toggle-thumb[_ngcontent-%COMP%]{transform:translate(14px);background:#101824}.theme-toggle[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.shell.theme-light[_ngcontent-%COMP%] .brand-mark[_ngcontent-%COMP%]{color:#fff;box-shadow:0 10px 26px #6f5cff3d}.shell.theme-light[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] .eyebrow[_ngcontent-%COMP%]{color:#738094}.shell.theme-light[_ngcontent-%COMP%] .view-nav[_ngcontent-%COMP%]{background:var(--nav-bg);box-shadow:0 1px #ffffffdb inset,0 10px 28px #1f2d4014}.shell.theme-light[_ngcontent-%COMP%] .view-nav[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:linear-gradient(135deg,var(--accent),#4d9cff)}.shell.theme-light[_ngcontent-%COMP%] .app-body[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{background:var(--page-gradient)}.shell.theme-light[_ngcontent-%COMP%] .sidebar[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffff8f,#fff3),var(--rail)}.shell.theme-light[_ngcontent-%COMP%] .detail-header[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--header-gradient)}.shell.theme-light[_ngcontent-%COMP%] .metric[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .ingestion[_ngcontent-%COMP%]{box-shadow:var(--shadow)}.shell.theme-light[_ngcontent-%COMP%] .session-card[_ngcontent-%COMP%]{background:var(--session-card-bg)}.shell.theme-light[_ngcontent-%COMP%] .session-card[_ngcontent-%COMP%]:hover{background:var(--session-card-hover)}.shell.theme-light[_ngcontent-%COMP%] .session-card.active[_ngcontent-%COMP%]{background:var(--session-card-active)}.shell.theme-light[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{gap:16px}.shell.theme-light[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .ingestion[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .import-context[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{box-shadow:var(--shadow-soft)}.shell.theme-light[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%]{background:linear-gradient(180deg,#ffffffb8,#ffffff5c),var(--surface)}.shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%]{border:1px solid rgba(219,229,238,.82);border-radius:14px;padding:6px;background:#ffffff7a;box-shadow:var(--shadow-soft)}.shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:#ffffffa8}.shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:#fff}.shell.theme-light[_ngcontent-%COMP%] .run-tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{box-shadow:0 10px 24px #1f2d401c}.shell.theme-light[_ngcontent-%COMP%] .import-context[_ngcontent-%COMP%]{background:#ffffffa8}.shell.theme-light[_ngcontent-%COMP%] .source-callout[_ngcontent-%COMP%]{background:linear-gradient(135deg,#0c9f830b,#6f5cff05),var(--surface)}.shell.theme-light[_ngcontent-%COMP%] .credit-meter[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .shell.theme-light[_ngcontent-%COMP%] .filters[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background:var(--control-bg)}.shell.theme-light[_ngcontent-%COMP%] .credit-bar[_ngcontent-%COMP%]{background:#6170852e}.shell.theme-light[_ngcontent-%COMP%] .triage-badge.medium[_ngcontent-%COMP%]{color:var(--warning-text)}.shell.theme-light[_ngcontent-%COMP%] .triage-badge.high[_ngcontent-%COMP%]{color:var(--danger-text)}.sidebar[_ngcontent-%COMP%], .session-list[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]{scrollbar-color:var(--scrollbar) transparent}.sidebar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .session-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--scrollbar);background-clip:padding-box}@media(max-width:760px){.topbar-actions[_ngcontent-%COMP%]{justify-content:end}}@media(max-width:520px){.theme-toggle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{display:none}.theme-toggle[_ngcontent-%COMP%]{padding-inline:5px}}.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:clamp(280px,26vw,360px) minmax(0,1fr)}.rail-backdrop[_ngcontent-%COMP%], .sessions-mobile-toolbar[_ngcontent-%COMP%]{display:none}@media(max-width:900px){.app-body.with-rail[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}.app-body.rail-open[_ngcontent-%COMP%] .rail-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:90;display:block;border:0;background:#040a127a;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);cursor:pointer}.sessions-mobile-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.sessions-mobile-toolbar[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{min-width:0;overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.session-rail-toggle[_ngcontent-%COMP%]{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;min-height:34px;border:1px solid var(--line);border-radius:9px;padding:7px 10px;background:var(--surface);color:var(--text-strong);font:inherit;font-size:12px;font-weight:760;cursor:pointer;box-shadow:var(--shadow-soft)}.session-rail-toggle[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:grid;place-items:center;min-width:20px;height:20px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:10px}}@media(max-width:600px){.topbar[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr) auto;width:100%;min-width:0}.brand[_ngcontent-%COMP%]{grid-column:1;grid-row:1;min-width:0}.topbar-actions[_ngcontent-%COMP%]{grid-column:2;grid-row:1}.view-nav[_ngcontent-%COMP%]{display:grid;grid-column:1 / -1;grid-row:2;grid-template-columns:repeat(6,minmax(0,1fr));justify-self:stretch;width:100%;min-width:0;gap:2px}.view-nav[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:0;padding:6px 2px;font-size:10px}}']})};Yn(Tn,Hr).catch(n=>console.error(n));
|