@gengage/assistant-fe 0.6.32 → 0.6.33

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.
@@ -1716,7 +1716,8 @@ function Qr(e) {
1716
1716
  }), n.addEventListener("click", (c) => {
1717
1717
  s.classList.contains("is-hidden") || s.contains(c.target) || d.contains(c.target) || (s.classList.add("is-hidden"), d.setAttribute("aria-pressed", "false"));
1718
1718
  }), n.querySelector('[data-action="clear"]')?.addEventListener("click", () => e.clear()), n.querySelector('[data-action="toggle"]')?.addEventListener("click", (c) => {
1719
- i.panel.classList.toggle("is-minimized"), c.currentTarget.textContent = i.panel.classList.contains("is-minimized") ? "Open" : "Min";
1719
+ const p = i.panel.classList.toggle("is-minimized");
1720
+ c.currentTarget.textContent = p ? "Open" : "Min", r.style.bottom = p ? "auto" : "10px";
1720
1721
  }), i.search?.addEventListener("input", () => {
1721
1722
  o.search = i.search.value || "", a();
1722
1723
  }), i.sections?.addEventListener("click", (c) => {
@@ -2452,8 +2453,14 @@ function Sn(e) {
2452
2453
  .json-number { color: #fbbf24; }
2453
2454
  .json-boolean { color: #f0abfc; }
2454
2455
  .json-null { color: #cbd5e1; }
2456
+ /* Minimized: collapse to just the header. The body sections are hidden
2457
+ AND the panel/host stop reserving full viewport height (the host's
2458
+ inline bottom offset is released in JS), so only the title bar remains
2459
+ and the page underneath is clickable again. */
2460
+ .is-minimized { height: auto; max-height: none; }
2455
2461
  .is-minimized .controls, .is-minimized .list { display: none; }
2456
2462
  .is-minimized .state-view { display: none; }
2463
+ .is-minimized .filters-popup { display: none; }
2457
2464
  @media (max-width: 620px) {
2458
2465
  .panel { width: calc(100vw - 20px); }
2459
2466
  }
@@ -5,7 +5,7 @@
5
5
  `],{type:"text/javascript"}),i=URL.createObjectURL(o);try{return{worker:new Worker(i,{type:"module",name:t}),cleanup(){URL.revokeObjectURL(i)}}}catch(a){throw URL.revokeObjectURL(i),a}}function is(e,t={}){if(!Array.isArray(e))return[];const r=t.maxItems??8,n=t.maxFeatures??8;return e.map(o=>as(o,t.defaultBrand,n)).filter(o=>!!o).slice(0,r)}function as(e,t,r){if(!e||typeof e!="object"||Array.isArray(e))return null;const n=e,o=Ue(n);return o?ls({sku:o.sku,name:o.name,url:o.url,image:o.image,price:o.price,currency:o.currency,category:o.category,category_names:o.category_names,brand:n.brand||t,features:ss(n.features,r),specs:cs(n.specs,r),in_stock:o.in_stock}):null}function ss(e,t){return Array.isArray(e)?e.filter(Boolean).slice(0,t):void 0}function cs(e,t){if(!(!e||typeof e!="object"||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([,r])=>r!=null).slice(0,t))}function ls(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}function Lt(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t=e,r=Array.isArray(t.rows)?t.rows:[];return{...t,rows:r.map(ds).filter(Boolean)}}function ln(e,t){const r=Array.isArray(e)?e.filter(s=>!!(s&&typeof s=="object"&&!Array.isArray(s))):[],n=Lt(t),o=Array.isArray(n.columns)?n.columns.map(String):[];if(!o.length)return r;const i=new Map(r.map(s=>[String(s.sku||s.id||""),s])),a=o.map(s=>i.get(s)).filter(s=>!!s);return a.length?a:r}function us(e,t){const r=Lt(e?.table),n=ln(t,r);return{...e||{},table:r,products:n,multiple_product_details:n}}function ds(e){return!e||typeof e!="object"||Array.isArray(e)?null:Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function fs(e=[],t={}){const r={},n=[];return(Array.isArray(e)?e.map(o=>qe(o,t)).filter(o=>!!o):[]).forEach((o,i)=>{const a=`product-${i.toString()}`;n.push(a);const s={sku:o.sku,product:o};r[a]={type:"ProductCard",props:{product:o,index:i,action:{title:o.name,type:"launchSingleProduct",payload:s}}}}),r.root={type:"ProductGrid",props:{layout:"grid"},children:n},{widget:"chat",panelHint:"panel",spec:{root:"root",elements:r}}}function ps(e,t={}){return{widget:"chat",panelHint:"panel",spec:{root:"root",elements:{root:{type:"ProductDetailsPanel",props:{product:qe(e,t)||e||{}}}}}}}function ms(e={},t={}){const r=(e.multiple_product_details||e.products||[]).map(o=>qe(o,t)).filter(o=>!!o),n=e.table||gs(e.comparison_table);return{widget:"chat",panelHint:"panel",spec:{root:"root",elements:{root:{type:"ComparisonTable",props:{products:r,recommended:r.find(o=>o.sku===e.recommended_choice_sku)||r[0],attributes:Object.entries(n).map(([o,i])=>({label:o,values:Array.isArray(i)?i.map(String):[String(i??"")]})),highlights:Mr(e.key_differences),specialCases:Mr(e.special_considerations),recommendedText:e.recommended_choice,productActions:Object.fromEntries(r.map(o=>[o.sku,{title:o.name,type:"launchSingleProduct",payload:{sku:o.sku,product:o}}]))}}}}}}function gs(e){return Array.isArray(e)?Object.fromEntries(e.map(t=>{const r=typeof t?.label=="string"?t.label.trim():"";return r?[r,t.values]:null}).filter(t=>!!t)):{}}function ys(e=[]){return{widget:"chat",panelHint:"inline",spec:{root:"root",elements:{root:{type:"ActionButtons",props:{buttons:(Array.isArray(e)?e:[]).map(t=>{const r=t.label||t.title||t.shortName||"",n=t.action||t.requestDetails||t.request_details;return!r||!n?.type?null:{label:r,action:{title:r,type:n.type,...n.payload!==void 0?{payload:n.payload}:{}}}}).filter(t=>!!t)}}}}}}function hs(e){return Object.freeze([...e])}function un(e,t,r="v1"){return`endpoint:${r}:${ie({endpoint:e,request:t})}`}function bs(e){const t=e.version||"v1",r=n=>o=>({partition:`${e.partitionPrefix}/${n}`,key:un(n,o,t),...e.ttlMs?{ttlMs:e.ttlMs}:{}});return{launcher_action:r("launcher_action"),similar_products:r("similar_products"),product_groupings:r("product_groupings")}}function ws(e){return{...e}}function ks(e,t={}){return new Response(e.map(r=>JSON.stringify(r)).join(`
6
6
  `)+`
7
7
  `,{...t,headers:{"content-type":"application/x-ndjson",...t.headers||{}}})}function _s(e,t={}){return new Response(JSON.stringify(e),{...t,headers:{"content-type":"application/json",...t.headers||{}}})}var Ee=new Set(["and","are","for","from","the","with"]),Ss={token:.26,keyword:.22,category:.18,facet:.16,color:.08,attribute:.06,price:.08,retrieval:.08},vs=["amber","beige","black","blue","blush","bronze","brown","cream","gold","green","grey","ivory","lilac","mixed","orange","pastel","pink","purple","red","silver","white","yellow"];function H(e,t){return String(e??"").toLocaleLowerCase(t||void 0).normalize("NFKD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^\p{L}\p{N}]+/gu," ").replace(/\s+/gu," ").trim()}function $(e,t=Ee,r){const n=t instanceof Set?t:new Set([...Ee,...t]),o=new Set,i=[];for(const a of H(e,r).split(/\s+/u))a.length<3||n.has(a)||o.has(a)||(o.add(a),i.push(a));return i}function ue(e,t={}){if(Ps(e))return e;const r=t.similarityMapper?.(e);if(r)return r;const n=t.facetKeys,o=I(e.category_names??e.category),i=I(e.category_ids),a=Rs(e.facet_hits),s=Object.entries(a).filter(([g])=>!n||n.some(b=>H(b,t.locale)===H(g,t.locale))).map(([,g])=>g),c=F(e.name,e.title),l=F(e.brand),u=t.sourceKeywords??[],f=[c,l,...o,...s,...I(e.promotions),F(e.description),...u].join(" "),m=$(f,t.stopWords,t.locale),p=F(t.sourceProductType,Ls(o,c,m,t.locale),m[0]),y=V([...Is(f,vs,t.locale),...Object.entries(a).filter(([g])=>/colou?r/iu.test(g)).flatMap(([,g])=>$(g,t.stopWords,t.locale))],t.locale),h=V([...s.flatMap(g=>$(g,t.stopWords,t.locale)),...I(e.promotions).flatMap(g=>$(g,t.stopWords,t.locale))],t.locale).slice(0,24);return{sku:F(e.sku),title:c,brand:l,productType:p,categoryNames:o,categoryIds:i,facets:a,keywords:V([...u.flatMap(g=>$(g,t.stopWords,t.locale)),...m],t.locale).slice(0,12),tokens:m,colors:y,attributes:h,price:js(e)}}function As(e,t={}){const r=F(e.product_type,e.productType),n=F(e.title,r,I(e.keywords).join(" ")),o=V([...I(e.keywords),...I(e.colors),...I(e.materials),...I(e.styles),...I(e.attributes)]);return ue({sku:"__photo__",name:n,category_names:r?[r]:[],facet_hits:{colors:I(e.colors).join(", "),materials:I(e.materials).join(", "),styles:I(e.styles).join(", "),attributes:I(e.attributes).join(", ")},promotions:o},{...t,sourceProductType:r,sourceKeywords:o})}function xs(e,t={}){const r=ue(e,t);return V([...t.sourceQueries??[],Ge([r.productType,...r.colors.slice(0,1),...r.attributes.slice(0,2)]),Ge([r.productType,...r.keywords.slice(0,3)]),Ge([r.categoryNames[r.categoryNames.length-1],...r.keywords.slice(0,2)]),Ge(r.title.split(/\s+/u).slice(0,6)),r.productType].map(n=>n.trim()).filter(Boolean)).slice(0,t.queryLimit??6)}function Ot(e,t,r={}){const n={...Ss,...r.weights},o=ue(t,r),i=[],a=de(e.tokens,o.tokens,r.locale),s=de(e.keywords,o.tokens,r.locale),c=Os(e.categoryNames,o.categoryNames,r.locale)||de(pn(e.categoryNames,r.locale),pn(o.categoryNames,r.locale),r.locale),l=de(e.attributes,o.attributes,r.locale),u=de(e.colors,o.colors,r.locale),f=de(e.attributes,o.tokens,r.locale),m=Bs(e.price,o.price),p=Ms(o.sku,r.hitCounts)>0?1:0,y=Ns(e,o),h=a*n.token+s*n.keyword+c*n.category+l*n.facet+u*n.color+f*n.attribute+m*n.price+p*n.retrieval,g=$s(y?h:h*.35);return y&&e.productType&&e.productType===o.productType&&i.push("same product type"),c>.4&&i.push("similar category"),l>.2&&i.push("matching product attributes"),u>0&&i.push("matching colour"),m>.8&&i.push("similar price"),y||i.push("weaker product-type match"),{score:Number(g.toFixed(4)),reasons:i}}function Ts(e,t,r={}){const n=ue(e,r),o=new Set([n.sku,...r.ignoreSkus??[]].filter(Boolean));return dn(t.filter(i=>{const a=F(i.sku);return a&&!o.has(a)}),r.maxCandidates).map(i=>{const a=Ot(n,i,r);return{...i,similarity_score:a.score,similarity_reasons:a.reasons}}).sort((i,a)=>a.similarity_score-i.similarity_score).slice(0,Math.max(1,Math.min(r.limit??12,100)))}async function Es(e,t,r={}){const n=ue(e,r),o=new Set([n.sku,...r.ignoreSkus??[]].filter(Boolean)),i=dn(t.filter(c=>{const l=F(c.sku);return l&&!o.has(l)}),r.maxCandidates),a=Math.max(1,Math.floor(r.batchSize??50)),s=[];for(let c=0;c<i.length;c+=1){fn(r.signal);const l=i[c],u=Ot(n,l,r);s.push({...l,similarity_score:u.score,similarity_reasons:u.reasons}),(c+1)%a===0&&await Cs(r.yield)}return fn(r.signal),s.sort((c,l)=>l.similarity_score-c.similarity_score).slice(0,Math.max(1,Math.min(r.limit??12,100)))}function dn(e,t){if(t===void 0)return e;const r=Math.floor(Number(t));return Number.isFinite(r)&&r>0?e.slice(0,r):e}async function Cs(e){if(e){await e();return}await new Promise(t=>{const r=globalThis;if(typeof r.scheduler?.yield=="function"){r.scheduler.yield().then(t,t);return}if(typeof setTimeout=="function"){setTimeout(t,0);return}t()})}function fn(e){if(e?.aborted)throw new DOMException("Similarity ranking aborted.","AbortError")}function Ps(e){return!!(e&&typeof e=="object"&&Array.isArray(e.tokens))}function F(...e){for(const t of e)if(typeof t=="string"&&t.trim())return t.trim();return""}function I(e){return Array.isArray(e)?e.map(t=>F(t)).filter(Boolean):typeof e=="string"&&e.trim()?e.split(/[,;/|]+/u).map(t=>t.trim()).filter(Boolean):[]}function Rs(e){return!e||typeof e!="object"||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).map(([t,r])=>[t,F(r)]).filter(([,t])=>t))}function js(e){const t=Number(e.price_discounted);if(Number.isFinite(t)&&t>0)return t;const r=Number(e.price);return Number.isFinite(r)&&r>0?r:0}function V(e,t){const r=new Set,n=[];for(const o of e){const i=H(o,t);!i||r.has(i)||(r.add(i),n.push(i))}return n}function Is(e,t,r){const n=` ${H(e,r)} `;return t.filter(o=>n.includes(` ${H(o,r)} `))}function Ls(e,t,r,n){const o=H(e[e.length-1]??e[0]??"",n);if(o){const i=$(o,Ee,n),a=new Set($(t,Ee,n));return i.find(s=>a.has(s))??i[0]??o}return r[0]??""}function Ge(e){return e.map(t=>H(t)).filter(Boolean).join(" ").replace(/\s+/gu," ").trim().slice(0,120)}function pn(e,t){return e.flatMap(r=>$(r,Ee,t))}function de(e,t,r){const n=V(e,r),o=new Set(V(t,r));return n.length===0||o.size===0?0:n.filter(i=>o.has(i)).length/n.length}function Os(e,t,r){const n=V(e,r),o=new Set(V(t,r));return n.length===0||o.size===0?0:n.filter(i=>o.has(i)).length/n.length}function Bs(e,t){return e<=0||t<=0?0:Math.min(e,t)/Math.max(e,t)}function Ms(e,t){return!e||!t?0:typeof t.get=="function"?t.get(e)??0:t[e]??0}function Ns(e,t){if(!e.productType||!t.productType||e.productType===t.productType)return!0;const r=new Set($(e.productType)),n=new Set([...$(t.productType),...t.tokens]);return[...r].some(o=>n.has(o))}function $s(e){return Math.max(0,Math.min(1,e))}function Fs(e){const t=(e?.chat||e?._chat)?.root||e?._chat?.root;return t?t.getRootNode?.()?.host||t:Array.from(document.querySelectorAll("*")).find(r=>r.shadowRoot?.querySelector?.(".gengage-chat-root, .gengage-chat-launcher-container"))}function qs(e,t){const r=Fs(e);r?.style&&(t?r.style.removeProperty("display"):r.style.setProperty("display","none","important")),t||(e?.chat||e?._chat)?.close?.()}var Us="nd_be_url";function Ds(e,t){const r=zs()||e.beUrl||t;if(!r)throw new Error("resolveBeUrl: backend URL is required. The injector must supply a fallback URL; the SDK has no default.");return r}function zs(){try{const e=new URLSearchParams(window.location.search).get(Us)?.trim();if(!e)return null;const t=new URL(e);return t.protocol!=="https:"&&t.protocol!=="http:"?null:t.toString().replace(/\/+$/u,"")}catch{return null}}function mn(e){const t=e?.payload;if(typeof t=="string")return t;if(t&&typeof t=="object"&&"text"in t){const n=t.text;if(typeof n=="string")return n}const r=e?.action;return r&&typeof r.payload=="string"?r.payload:r&&typeof r.title=="string"?r.title:""}var Bt=[{pattern:/\bhttps?:\/\/[^\s?#]+(?:\?[^\s#]*)?/giu,replacement:Gs},{pattern:/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/giu,replacement:"[email]"},{pattern:/\b(?:\+?\d[\d\s().-]{7,}\d)\b/gu,replacement:"[phone]"},{pattern:/\b(?:token|secret|csrf|cookie|bearer|session|sid|cart(?:[_-]?id)?)\s*[:=]\s*[^\s,;&]+/giu,replacement:"[secret]"},{pattern:/\b(?:order|cart|session)[_-]?(?:id|no|number)?\s*[:#=]?\s*[A-Z0-9-]{6,}\b/giu,replacement:"[secret]"}],Mt={patterns:Bt};function Nt(e,t=Mt){let r=typeof e=="string"?e:e==null?"":String(e);for(const n of t.patterns||[]){const o=n.replacement;r=typeof o=="function"?r.replace(n.pattern,i=>o(i)):r.replace(n.pattern,o)}return r}function gn(e,t=Mt){return Nt(mn(e),t)}function Gs(e){try{const t=new URL(e);return`${t.origin}${t.pathname}${t.search?"?[query]":""}`}catch{return"[url]"}}var Hs=["assistantName","homeDomain","categories","policyTopics"],Vs={intent:["searchContract","competitorBrands"]};function Ks(e,t,r,n={}){const o=yn(t,r,n);return Object.keys(o).length?{...e,account_config:o}:e}function yn(e,t,r={}){if(!e)return{};const n={},o=r.baseKeys||Hs;for(const s of o)hn(n,e,s);const i=e[t];i&&typeof i=="object"&&!Array.isArray(i)&&Object.assign(n,Ws(i));const a=r.opAllowlist||Vs;for(const s of a[t]||[])hn(n,e,s);return n}function hn(e,t,r){t[r]!==void 0&&(e[r]=t[r])}function Ws(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var Js=["addToCart","search","searchKeyword","facetedSearch","searchGiftOptions","similaritySearch"];function Zs(e,t,r={}){const n=window,o=n.gengage||(n.gengage={}),i=o.tools||(o.tools={});i[e]=t;for(const a of r.accountAliases||[])i[a]=t;if(r.exposeStandardAliases!==!1)for(const a of r.standardAliases||Js){const s=t[a];typeof s=="function"&&(i[a]=i[a]||s)}return t}function Ys({getPageType:e,getProduct:t}){return()=>({url:window.location.href,title:document.title,pageType:e(),product:t()})}function Qs({accountId:e,getPageType:t,getProduct:r,getToolNames:n,getSearchCapabilities:o,getMemory:i}){return async()=>({accountId:e,url:window.location.href,pageType:t(),productSku:r()?.sku??null,toolNames:n(),...o?{searchCapabilities:o()}:{},...i?{memoryPolicy:i().policy}:{},timestamp:new Date().toISOString()})}function Xs({accountId:e,runtimeFile:t="runtime.js",startExport:r="start",globalBaseUrlKey:n,errorLabel:o,trustedRuntimeOrigins:i}={}){if(!e)throw new Error("accountId is required.");const a=o||e,s=window,c=()=>{const p=s.GengageInjectorConfig||{},y=p[e]||{};return{...p,...y}},l=()=>{const p=c();if(p.runtimeUrl)return p.runtimeUrl;const y=p.assetBaseUrl||p.baseUrl||document.currentScript?.getAttribute("src")||(n?s[n]:null);if(!y)throw new Error(`${a} runtime URL cannot be resolved.`);return new URL(t,y).href},u=p=>{if(i===!0)return p;const y=new URL(p,window.location.href).origin,h=new Set([window.location.origin]),g=c();Ce(h,document.currentScript?.getAttribute("src")),Ce(h,g.assetBaseUrl),Ce(h,g.baseUrl),Ce(h,n?s[n]:void 0);for(const b of i||[])Ce(h,b);if(!h.has(y))throw new Error(`${a} runtime origin ${y} is not trusted.`);return p},f=s.GengageAssistantInjector||(s.GengageAssistantInjector={}),m=f[e]||(f[e]={});return m.loaderPromise||(m.loaderPromise=import(u(l())).then(p=>{const y=p[r];if(typeof y!="function")throw new Error(`${a} runtime export ${r} is unavailable.`);return y()}).catch(p=>{throw delete m.loaderPromise,console.error(`[Gengage][${e}] runtime load failed`,p),p})),m.loaderPromise}function Ce(e,t){if(t)try{const r=new URL(t,window.location.href);e.add(r.origin)}catch{e.add(t)}}var ec=500,bn="__GENGAGE_AGENTIC_ACTIVITY__";function wn({accountId:e,clock:t=()=>Date.now()}={}){const r=new Set;let n=1;const o={accountId:e,entries:[]};function i(a){const s=_n({id:n++,at:t(),accountId:e,...a});o.entries.push(s),o.entries.length>ec&&(o.entries=o.entries.slice(-500));for(const c of r)c(s,o.entries);return s}return{accountId:e,get entries(){return o.entries.slice()},clear(){o.entries=[];for(const a of r)a(null,o.entries)},record:i,subscribe(a){return typeof a!="function"?()=>{}:(r.add(a),a(null,o.entries),()=>r.delete(a))}}}function kn(e){const t=window[bn];if(t?.accountId===e&&typeof t.record=="function")return t;const r=wn({accountId:e});return window[bn]=r,r}function _n(e){const t=String(e.kind||e.type||"activity"),r=Sn(t),n=e.severity||vn({...e,kind:t});return{...e,kind:t,section:r,severity:n,group:e.group||An({...e,kind:t,section:r}),noise:e.noise===!0||n==="info"&&tc({...e,kind:t})}}function tc(e){const t=String(e?.kind||"");if(t==="flow/trace"){const r=String(e?.event?.type||"");if(r==="step:start"||r==="step:end")return!0}if(t==="flow/metadata"){const r=String(e?.event?.phase||e?.event?.type||e?.event?.name||"").toLowerCase();if(r==="panelloading"||r==="heartbeat"||r==="tick")return!0}return!!t.startsWith("runtime/")}function Sn(e){return e.startsWith("flow/")?"Flow":e.startsWith("intent/")?"Intent":e.startsWith("be/")?"Backend":e.startsWith("tool/")?"Tools":e==="beacon"?"Telemetry":"Runtime"}function vn(e){const t=String(e?.kind||"");return/\/(?:error|rejected|thrown)$/u.test(t)||e?.error||t==="be/response"&&Number(e?.status)>=400?"error":t==="flow/metadata"&&/fallback|retry|missing|empty/iu.test(String(e?.event?.phase||e?.event?.type||""))||t==="be/response"&&Number(e?.status)>=300?"warn":"info"}function An(e){const t=String(e?.kind||"");if(t.startsWith("tool/"))return e?.tool?`Tool: ${e.tool}`:"Tools";if(t.startsWith("be/"))return e?.op?`BE: ${e.op}`:"Backend";if(t==="flow/request"){const r=e?.request?.type||e?.request?.action?.type;return r?`Flow: ${r}`:"Flow request"}if(t==="flow/action"){const r=e?.event?.name||e?.event?.action||e?.event?.type;return r?`Action: ${r}`:"Flow action"}return t==="flow/ui"?e?.widget?`UI: ${e.widget}`:"UI":t.startsWith("flow/")?"Flow lifecycle":t.startsWith("intent/")?e?.intent?.kind?`Intent: ${e.intent.kind}`:"Intent":t==="beacon"?e?.payload?.type?`Beacon: ${e.payload.type}`:"Beacon":e?.section||"Runtime"}var rc=8,$t=120;function xn(e=[]){const t=Array.isArray(e)?e:[],r={status:"idle",sessionId:"",requestType:"",actionType:"",model:"",current:"Waiting for activity",errors:0,warnings:0,startedAt:null,lastAt:null,tools:[],beOps:[],uiSurfaces:[],timeline:[]},n={intent:null,route:null,panel:null,threadExtensions:{},pageProduct:null,products:null,ui:null,lastText:""};for(const o of t)nc(r,n,o);return r.tools=Ut(r.tools).slice(-8),r.beOps=Ut(r.beOps).slice(-8),r.uiSurfaces=Ut(r.uiSurfaces).slice(-8),r.timeline=r.timeline.slice(-36),!r.lastAt&&t.length&&(r.lastAt=t.at(-1)?.at||null),{flow:r,context:n}}function Pe(e,t=""){if(!e||typeof e!="object")return null;const r=O({source:t,panel:He(e.panel||e.panel_state),threadExtensions:fc(e.thread?.extensions||e.threadExtensions||e.extensions),pageProduct:hc(e.product||e.page?.product),products:fe(e.products||e.last_search_products||e.items),ui:Ft(e.spec),intent:qt(e.intent),route:Ke({searchParams:e.searchParams||e.search_params,flowParams:e.flowParams||e.flow_params})});return Object.keys(r).some(n=>n!=="source")?r:null}function He(e){if(!e||typeof e!="object")return null;const t=fe(e.last_search_products||e.current_panel_products),r=pe(e.screen_sku_list||e.search_suggestions_skus);return O({source:e.list_source||e.source,screenType:k(e.screen_type||e.screen),screenSummary:k(e.screen_summary||e.ai_plist_summary),screenSkus:r,chatMentionedSkus:pe(e.chat_mentioned_skus),lastSearch:pc(e.last_search),productCount:t?.count??Dt(e.current_panel_product_count),productSkus:t?.skus})}function Ft(e,t="",r=""){if(!e||typeof e!="object")return null;const n=bc(e);if(!n)return null;const o=n.props||{},i=mc(e,n,o),a=Array.isArray(o.buttons)?o.buttons:Array.isArray(o.actions)?o.actions:[],s=Array.isArray(o.rows)?o.rows.length:Array.isArray(o.comparison_table)?o.comparison_table.length:void 0;return O({widget:t,panelHint:r,rootType:n.type,productCount:i?.count,productSkus:i?.skus,buttonCount:a.length||void 0,buttonLabels:a.length?pe(a.map(c=>c.label||c.title)):void 0,comparisonRows:s})}function nc(e,t,r={}){if(!(!r||typeof r!="object"))switch(e.lastAt=r.at||e.lastAt,r.severity==="error"&&(e.errors+=1),r.severity==="warn"&&(e.warnings+=1),r.state&&Ve(t,r.state),r.kind){case"flow/request":oc(e,t,r);break;case"flow/metadata":ic(e,t,r);break;case"flow/trace":sc(e,r);break;case"flow/ui":ac(e,t,r);break;case"flow/text-final":t.lastText=k(r.content,$t),L(e,r,"Text",t.lastText,"done");break;case"flow/done":e.status=e.status==="error"?"error":"done",e.current="Done",L(e,r,"Done","Flow completed","done");break;case"flow/error":case"flow/rejected":case"flow/thrown":e.status="error",e.current="Flow error",L(e,r,"Error",k(r.error||r.kind),"error");break;case"tool/start":e.status=e.status==="idle"?"running":e.status,e.current=`Tool: ${r.tool||"tool"}`,e.tools.push(r.tool||"tool"),L(e,r,"Tool",r.tool||"tool","running");break;case"tool/done":e.tools.push(r.tool||"tool"),L(e,r,"Tool",r.tool||"tool","done");break;case"tool/error":e.status="error",e.current=`Tool error: ${r.tool||"tool"}`,e.tools.push(r.tool||"tool"),L(e,r,"Tool",r.tool||"tool","error");break;case"be/request":e.status=e.status==="idle"?"running":e.status,e.current=`BE: ${r.op||"request"}`,e.beOps.push(r.op||"unknown"),cc(t,r),L(e,r,"BE",r.op||"request","running");break;case"be/response":e.beOps.push(r.op||r.result?.op||"unknown"),lc(t,r.result),L(e,r,"BE",r.op||r.result?.intent?.kind||"response",r.severity||"done");break;case"intent/selected":t.intent=qt(r.intent),t.route=Ke({searchParams:r.searchParams,flowParams:r.flowParams}),e.current=`Intent: ${t.intent?.kind||"selected"}`,L(e,r,"Intent",t.intent?.kind||"selected","done");break;default:r.kind?.startsWith?.("runtime/")&&L(e,r,"Runtime",r.title||r.kind,"done");break}}function oc(e,t,r){const n=r.request||{};e.status="running",e.startedAt=r.at||e.startedAt,e.sessionId=k(n.session_id||n.sessionId||e.sessionId),e.requestType=k(n.type||e.requestType),e.actionType=k(n.action?.type||n.payload?.type||e.actionType),e.current=e.actionType||e.requestType||"Flow request",Ve(t,Pe(n.context||{},"request.context")),L(e,r,"Request",[e.requestType,e.actionType].filter(Boolean).join(" / ")||"request","running")}function ic(e,t,r){const n=r.event||{};e.sessionId=k(n.sessionId||n.session_id||e.sessionId),e.model=k(n.model||e.model),n.panelLoading===!0&&(e.current="Panel loading"),Ve(t,Pe(n,"flow.metadata")),L(e,r,"Metadata",k(n.name||n.phase||n.type||"metadata"),r.severity)}function ac(e,t,r){const n=Ft(r.spec,r.widget,r.panelHint);n&&(t.ui=n,typeof n.productCount=="number"&&(t.products={count:n.productCount,skus:n.productSkus||[]}),e.uiSurfaces.push(n.rootType),e.current=`UI: ${n.rootType}`,L(e,r,"UI",n.rootType||"ui","done"))}function sc(e,t){const r=t.event||{},n=k(r.type||"trace"),o=k(r.stepName||r.stepKind||"");e.sessionId=k(r.sessionId||e.sessionId),e.current=o?`${n}: ${o}`:n,L(e,t,"Trace",[n,o].filter(Boolean).join(" / ")||"trace",wc(n))}function cc(e,t){const r=t.params||{};Ve(e,Pe(r,"be.params")),r.panel_state&&(e.panel=He(r.panel_state)),r.structured_context&&(e.panel=Tn(e.panel,He(r.structured_context)));const n=Ke({searchParams:r.search_params,flowParams:r.flow_params});n&&(e.route=n)}function lc(e,t){if(!t||typeof t!="object")return;t.intent&&(e.intent=qt(t.intent));const r=Ke({searchParams:t.search_params,flowParams:t.flow_params});r&&(e.route=r)}function Ve(e,t){!t||typeof t!="object"||(t.panel&&(e.panel=Tn(e.panel,t.panel)),t.threadExtensions&&(e.threadExtensions={...e.threadExtensions,...t.threadExtensions}),t.pageProduct&&(e.pageProduct=t.pageProduct),t.products&&(e.products=t.products),t.ui&&(e.ui=t.ui),t.intent&&(e.intent=t.intent),t.route&&(e.route=t.route))}function Tn(e,t){return e?t?O({...e,...t}):e:t||null}function L(e,t,r,n,o="done"){e.timeline.push(O({id:t.id,at:t.at,label:r,detail:k(n,$t),status:o==="info"?"done":o,kind:t.kind}))}function qt(e){return!e||typeof e!="object"?null:O({kind:k(e.kind||e.intent||e.type),target:k(e.target),confidence:typeof e.confidence=="number"?Math.round(e.confidence*100)/100:void 0})}function Ke({searchParams:e,flowParams:t}={}){const r=O({search:uc(e),flow:dc(t)});return Object.keys(r).length?r:null}function uc(e){return!e||typeof e!="object"?null:O({query:k(e.query||e.search_query),category:k(e.category||e.category_name||e.categoryName),categoryId:k(e.categoryId||e.category_id),limit:Dt(e.limit),facets:Array.isArray(e.facets)?e.facets.length:void 0})}function dc(e){return!e||typeof e!="object"?null:O({target:k(e.target),sku:k(e.sku||e.product_sku),skus:pe(e.skus||e.sku_list),action:k(e.action||e.action_type)})}function fc(e){if(!e||typeof e!="object")return{};const t={};for(const[r,n]of Object.entries(e))n!=null&&(t[r]=n&&typeof n=="object"?O({keys:Object.keys(n).slice(0,8),summary:k(n.summary||n.occasion||n.target_date_iso||n.type)}):k(n));return t}function pc(e){return!e||typeof e!="object"?null:O({query:k(e.query),source:k(e.source),category:k(e.category||e.category_name),count:Dt(e.count)})}function fe(e){if(!Array.isArray(e))return null;const t=e.filter(Boolean);return O({count:t.length,skus:pe(t.map(r=>r?.sku||r?.code||r?.id)),names:pe(t.map(r=>r?.name||r?.title),4)})}function mc(e,t,r){if(t.type==="ProductDetailsPanel")return fe([r.product||r.item].filter(Boolean));if(t.type==="ProductGrid"){const n=gc(r.products,r.items,r.cards);return fe(n||yc(e,t))}return fe(r.products||r.items||r.cards)}function gc(...e){return e.find(t=>Array.isArray(t))||null}function yc(e,t){const r=e.elements||{};return(Array.isArray(t.children)?t.children:[]).map(n=>r[n]).filter(n=>n?.type==="ProductCard").map(n=>n.props?.product||n.props?.item||n.props).filter(Boolean)}function hc(e){return!e||typeof e!="object"?null:O({sku:k(e.sku||e.code||e.id),name:k(e.name||e.title),category:k(e.category),url:k(e.url)})}function bc(e){const t=e.elements||{};return t[e.root||"root"]||t.root||e.rootElement||null}function pe(e,t=rc){if(!Array.isArray(e))return;const r=e.map(n=>k(n)).filter(Boolean);return r.length?r.slice(0,t):void 0}function Ut(e){return[...new Set(e.map(t=>k(t)).filter(Boolean))]}function Dt(e){return Number.isFinite(Number(e))?Number(e):void 0}function wc(e){return/error$/u.test(e)?"error":/start$/u.test(e)?"running":"done"}function k(e,t=$t){const r=String(e??"").replace(/\s+/gu," ").trim();return r.length>t?`${r.slice(0,t-1)}...`:r}function O(e){return Object.fromEntries(Object.entries(e||{}).filter(([,t])=>t==null||t===""?!1:Array.isArray(t)?t.length>0:typeof t=="object"?Object.keys(t).length>0:!0))}function En(e,t){if(!e||typeof e!="object"||!t)return e;const r={...e};for(const[n,o]of Object.entries(e))typeof o!="function"||o.__gengageActivityWrapped||(r[n]=async function(a,...s){t.record({kind:"tool/start",tool:n,params:a});try{const c=await o.call(this,a,...s);return t.record({kind:"tool/done",tool:n,params:a,result:Pc(c),state:Pe(c,`tool:${n}`)}),c}catch(c){throw t.record({kind:"tool/error",tool:n,params:a,error:me(c)}),c}},Object.defineProperty(r[n],"__gengageActivityWrapped",{value:!0}));return r}function Cn(e,t){return t?r=>(t.record({kind:"beacon",payload:r}),e?.(r)):e}function Pn(e,t){if(!t)return!1;const r=window.GengageAssistantInjector?.[e],n=r?.streamTransport;if(typeof n!="function"||n.__gengageActivityWrapped)return!1;const o=function(a,s,c,l){t.record({kind:"flow/request",request:a});try{const u=n.call(this,a,kc(s,t),c,l);return u&&typeof u.then=="function"?u.catch(f=>{throw t.record({kind:"flow/rejected",requestType:a?.type,error:me(f)}),f}):u}catch(u){throw t.record({kind:"flow/thrown",requestType:a?.type,error:me(u)}),u}};return Object.defineProperty(o,"__gengageActivityWrapped",{value:!0}),r.streamTransport=o,t.record({kind:"runtime/transport-wrapped",title:"streamTransport wrapped"}),!0}function Rn({accountId:e,collector:t,promptBaseUrl:r}={}){if(!t||window.__GENGAGE_ACTIVITY_FETCH_PATCHED__)return;window.__GENGAGE_ACTIVITY_FETCH_PATCHED__=!0;const n=window.fetch?.bind(window);typeof n=="function"&&(window.fetch=async(o,i)=>{const a=xc(o,i),s=Ec(a.url);let c="";s&&(c=a.body?.op_name||a.body?.op||"unknown",t.record({kind:"be/request",source:"main-thread-fetch",url:a.url,op:c,opDomain:a.body?.op_domain||"",prompt:await _c({accountId:e,opName:c,promptBaseUrl:r}),params:a.body?.op_payload||{},rawBody:a.body}));const l=await n(o,i);return s&&l.clone().text().then(u=>{const f=Cc(u);t.record({kind:"be/response",source:"main-thread-fetch",url:a.url,status:l.status,op:c,result:f,rawText:u}),jn(t,f)}).catch(u=>{t.record({kind:"be/response",source:"main-thread-fetch",url:a.url,status:l.status,op:c,error:me(u)})}),l})}function kc(e,t){if(!e||e.__gengageActivityWrapped)return e;const r={...e};Object.defineProperty(r,"__gengageActivityWrapped",{value:!0});for(const n of["onAction","onMetadata","onUISpec","onTextChunk","onError","onDone"])typeof e[n]=="function"&&(r[n]=(...o)=>(n==="onAction"?t.record({kind:"flow/action",event:o[0]}):n==="onMetadata"?t.record({kind:"flow/metadata",event:o[0]}):n==="onUISpec"?t.record({kind:"flow/ui",widget:o[1],panelHint:o[2],clearPanel:o[3]===!0,spec:o[0]}):n==="onTextChunk"&&o[1]===!0?t.record({kind:"flow/text-final",content:o[0],extra:o[2]}):n==="onError"?t.record({kind:"flow/error",error:me(o[0])}):n==="onDone"&&t.record({kind:"flow/done"}),e[n](...o)));return r}function zt(e,t){!e||!t||(e.record(t),t.kind==="be/response"&&jn(e,t.result))}async function _c({accountId:e,opName:t,promptBaseUrl:r}){if(!e||!t)return null;const n=Sc({accountId:e,baseId:String(e).replace(/-agentic$/u,""),promptBaseUrl:r});if(!n)return{error:"Configure agenticActivityPromptBaseUrl to inspect prompt source in this build."};try{const o=new URL(`${t}.yaml`,n).href,i=await fetch(o,{cache:"no-store"});return i.ok?{url:o,yaml:await i.text()}:{url:o,error:`HTTP ${i.status}`}}catch(o){return{error:me(o)}}}function Sc({accountId:e,baseId:t,promptBaseUrl:r}){if(typeof r=="string"&&r.trim())return r;const n=vc(e,t);return n||Ac(t)}function vc(e,t){const r=window.__GENGAGE_AGENTIC_PROMPT_BASE_URL__;if(typeof r=="string"&&r.trim())return r;if(r&&typeof r=="object"){const o=r[e]||r[t];if(typeof o=="string"&&o.trim())return o}const n=(window.GengageInjectorConfig?.[e]||window.GengageInjectorConfig?.[t])?.agenticActivityPromptBaseUrl;return typeof n=="string"&&n.trim()?n:null}function Ac(e){const t=Array.from(document.scripts||[]);for(const r of t){const n=r?.src||"";if(n.includes("/agentic/index.js"))return new URL(`../prompts/${e}/`,n).href;if(n.includes("/agentic.iife.js"))return new URL(`prompts/${e}/`,n).href}return null}function jn(e,t){const r=t?.intent;r&&e.record({kind:"intent/selected",intent:r,searchParams:t?.search_params,flowParams:t?.flow_params})}function xc(e,t){const r=typeof e=="string"?e:e?.url||"",n=t?.body||(typeof e!="string"?e?.body:null);return{url:String(r||""),body:Tc(n)}}function Tc(e){if(!e||typeof e!="string")return{};try{return JSON.parse(e)}catch{return{raw:e}}}function Ec(e){try{const t=new URL(e,window.location.href);return t.pathname==="/v1/execute"&&/agentic\.gengage\.ai$/u.test(t.hostname)}catch{return!1}}function Cc(e){const t={};for(const r of String(e||"").split(/\r?\n/u)){const n=r.trim();if(n)try{Object.assign(t,JSON.parse(n))}catch{t._raw=[t._raw,n].filter(Boolean).join(`
8
- `)}}return t}function Pc(e){if(Array.isArray(e))return{type:"array",length:e.length,preview:e.slice(0,5)};if(!e||typeof e!="object")return e;const t={};for(const[r,n]of Object.entries(e))Array.isArray(n)?t[r]={type:"array",length:n.length,preview:n.slice(0,5)}:n&&typeof n=="object"?t[r]={type:"object",keys:Object.keys(n).slice(0,20)}:t[r]=n;return t}function me(e){return e?.message||String(e)}var In="gengage-agentic-activity-overlay",Re="all",Gt="all",Ln=["Flow","Tools","Backend","Intent","Telemetry","Runtime"],On=["info","warn","error"];function Bn(e){if(!e||typeof e.subscribe!="function")return null;const t=document.getElementById(In);if(t?.shadowRoot)return t;const r=document.createElement("div");r.id=In,r.style.cssText="position:fixed;left:10px;top:10px;bottom:10px;z-index:2147483647;";const n=r.attachShadow({mode:"open"});n.innerHTML=Qc(e.accountId),document.documentElement.appendChild(r);const o={entries:[],section:Re,severity:Gt,search:"",grouped:!1,follow:!0,stateVisible:!0,verbose:!1},i={stateView:n.querySelector('[data-role="state-view"]'),list:n.querySelector('[data-role="list"]'),count:n.querySelector('[data-role="count"]'),visibleCount:n.querySelector('[data-role="visible-count"]'),panel:n.querySelector('[data-role="panel"]'),search:n.querySelector('[data-role="search"]'),sections:n.querySelector('[data-role="section-filters"]'),severities:n.querySelector('[data-role="severity-filters"]'),groupToggle:n.querySelector('[data-action="group"]'),followToggle:n.querySelector('[data-action="follow"]'),stateToggle:n.querySelector('[data-action="state"]'),verboseToggle:n.querySelector('[data-action="verbose"]')};Rc(r,i.list);const a=()=>Ic(i,o),s=n.querySelector('[data-role="filters-popup"]'),c=n.querySelector('[data-action="filters-toggle"]');return c?.addEventListener("click",()=>{const l=s.classList.toggle("is-hidden")===!1;c.setAttribute("aria-pressed",String(l))}),n.addEventListener("click",l=>{s.classList.contains("is-hidden")||s.contains(l.target)||c.contains(l.target)||(s.classList.add("is-hidden"),c.setAttribute("aria-pressed","false"))}),n.querySelector('[data-action="clear"]')?.addEventListener("click",()=>e.clear()),n.querySelector('[data-action="toggle"]')?.addEventListener("click",l=>{i.panel.classList.toggle("is-minimized"),l.currentTarget.textContent=i.panel.classList.contains("is-minimized")?"Open":"Min"}),i.search?.addEventListener("input",()=>{o.search=i.search.value||"",a()}),i.sections?.addEventListener("click",l=>{const u=l.target?.closest?.("[data-section-filter]")?.dataset?.sectionFilter;u&&(o.section=u,a())}),i.severities?.addEventListener("click",l=>{const u=l.target?.closest?.("[data-severity-filter]")?.dataset?.severityFilter;u&&(o.severity=u,a())}),i.groupToggle?.addEventListener("click",()=>{o.grouped=!o.grouped,i.groupToggle.setAttribute("aria-pressed",String(o.grouped)),i.groupToggle.textContent=o.grouped?"Grouped":"Flat",a()}),i.followToggle?.addEventListener("click",()=>{o.follow=!o.follow,i.followToggle.setAttribute("aria-pressed",String(o.follow)),i.followToggle.textContent=o.follow?"Follow":"Paused"}),i.stateToggle?.addEventListener("click",()=>{o.stateVisible=!o.stateVisible,i.stateToggle.setAttribute("aria-pressed",String(o.stateVisible)),i.stateToggle.textContent=o.stateVisible?"State":"State off",a()}),i.verboseToggle?.addEventListener("click",()=>{o.verbose=!o.verbose,i.verboseToggle.setAttribute("aria-pressed",String(o.verbose)),i.verboseToggle.textContent=o.verbose?"Verbose":"Concise",a()}),n.querySelector('[data-action="expand-all"]')?.addEventListener("click",()=>{i.list?.querySelectorAll("details").forEach(l=>{l.open=!0})}),n.querySelector('[data-action="collapse-all"]')?.addEventListener("click",()=>{i.list?.querySelectorAll("details").forEach(l=>{l.open=!1})}),i.list?.addEventListener("click",l=>{const u=l.target?.closest?.('[data-action="copy-json"]');if(!u)return;const f=Number(u.dataset.entryId||0);Jc(o.entries.find(m=>m.id===f),u)}),e.subscribe((l,u)=>{o.entries=u.slice(),a()}),r}function Rc(e,t){e.addEventListener("wheel",r=>{const n=jc(r.composedPath?.()||[],t);n&&(n.scrollTop+=r.deltaY,n.scrollLeft+=r.deltaX,r.preventDefault(),r.stopPropagation())},{passive:!1,capture:!0})}function jc(e,t){for(const r of e)if(!(!r||r.nodeType!==1)&&Mn(r))return r;return Mn(t)?t:null}function Mn(e){return!!(e&&(e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1)&&getComputedStyle(e).overflow!=="hidden")}function Ic(e,t){const r=Nn(t.entries,t),n=r.slice(-260).reverse();$n(e.sections,t.entries,t.section,"section"),$n(e.severities,t.entries,t.severity,"severity"),e.count&&(e.count.textContent=String(t.entries.length)),e.visibleCount&&(e.visibleCount.textContent=String(r.length)),Mc(e.stateView,xn(t.entries),t.stateVisible),Bc(e.list,n,t)}function Nn(e,t={}){const r=t.section||Re,n=t.severity||Gt,o=zn(t.search),i=t.verbose===!0;return(Array.isArray(e)?e:[]).filter(a=>!i&&a.noise===!0||r!==Re&&a.section!==r||n!==Gt&&a.severity!==n?!1:o?Yc(a).includes(o):!0)}function $n(e,t,r,n){if(!e)return;e.textContent="";const o=n==="section"?Lc(t):Oc(t),i=document.createElement("button");i.type="button",i.dataset[`${n}Filter`]=Re,i.className=r===Re?"chip is-active":"chip",i.textContent=`All ${t.length}`,e.appendChild(i);for(const a of o){const s=t.filter(l=>l[n]===a).length,c=document.createElement("button");c.type="button",c.dataset[`${n}Filter`]=a,c.className=r===a?`chip is-active ${n}-${ge(a)}`:`chip ${n}-${ge(a)}`,c.textContent=`${Vn(a)} ${s}`,e.appendChild(c)}}function Lc(e){const t=new Set(e.map(r=>r.section).filter(Boolean));return Ln.filter(r=>t.has(r)).concat([...t].filter(r=>!Ln.includes(r)).sort())}function Oc(e){const t=new Set(e.map(r=>r.severity).filter(Boolean));return On.filter(r=>t.has(r)).concat([...t].filter(r=>!On.includes(r)).sort())}function Bc(e,t,r){if(!e)return;if(e.textContent="",!t.length){const o=document.createElement("div");o.className="empty",o.textContent=r.entries.length?"No activity matches the current filters.":"Waiting for agentic activity...",e.appendChild(o);return}const n=document.createDocumentFragment();if(r.grouped)for(const o of Kc(t))n.appendChild(Wc(o));else for(const o of t)n.appendChild(qn(o));e.appendChild(n),r.follow&&requestAnimationFrame(()=>e.scrollTop=0)}function Mc(e,t,r){if(!e||(e.textContent="",e.classList.toggle("is-hidden",!r),!r))return;const{flow:n,context:o}=t,i=document.createDocumentFragment();i.appendChild(Nc(n)),i.appendChild($c(o)),i.appendChild(Fc(n.timeline)),e.appendChild(i)}function Nc(e){const t=document.createElement("section");return t.className=`viz-card flow-card status-${ge(e.status)}`,t.appendChild(Ht("Flow State",e.status)),Fn(t,[["Current",e.current],["Session",e.sessionId],["Request",[e.requestType,e.actionType].filter(Boolean).join(" / ")],["Model",e.model],["Tools",e.tools?.join(", ")],["BE ops",e.beOps?.join(", ")],["UI",e.uiSurfaces?.join(", ")],["Health",qc(e)]]),t}function $c(e){const t=document.createElement("section");return t.className="viz-card context-card",t.appendChild(Ht("Context State",e.panel?.screenType||e.ui?.rootType||"empty")),Fn(t,[["Intent",Uc(e.intent)],["Route",Dc(e.route)],["Screen",zc(e)],["Last search",Gc(e.panel?.lastSearch)],["Products",Hc(e.panel,e.products)],["Page product",Vc(e.pageProduct)],["Extensions",Object.keys(e.threadExtensions||{}).join(", ")],["Last text",e.lastText]]),t}function Fc(e){const t=document.createElement("section");t.className="viz-card timeline-card",t.appendChild(Ht("Flow Timeline",`${e.length} steps`));const r=document.createElement("ol");if(r.className="timeline",e.length)for(const n of e){const o=document.createElement("li");o.className=`timeline-step step-${ge(n.status||"done")}`;const i=document.createElement("span");i.className="timeline-time",i.textContent=Hn(n.at);const a=document.createElement("span");a.className="timeline-label",a.textContent=n.label||n.kind||"Step";const s=document.createElement("span");s.className="timeline-detail",s.textContent=n.detail||n.kind||"",o.append(i,a,s),r.appendChild(o)}else{const n=document.createElement("li");n.className="timeline-empty",n.textContent="No flow events yet.",r.appendChild(n)}return t.appendChild(r),t}function Ht(e,t){const r=document.createElement("div");r.className="viz-title";const n=document.createElement("span");n.textContent=e;const o=document.createElement("span");return o.className="viz-badge",o.textContent=t||"idle",r.append(n,o),r}function Fn(e,t){for(const[r,n]of t){if(n==null||n==="")continue;const o=document.createElement("div");o.className="viz-row";const i=document.createElement("span");i.className="viz-key",i.textContent=r;const a=document.createElement("span");a.className="viz-value",a.textContent=String(n),o.append(i,a),e.appendChild(o)}}function qc(e){return!e.errors&&!e.warnings?"clean":`${e.errors||0} errors, ${e.warnings||0} warnings`}function Uc(e){return e?[e.kind,e.target,e.confidence!=null?`conf ${e.confidence}`:""].filter(Boolean).join(" / "):""}function Dc(e){return e?[e.search?[e.search.query,e.search.category,e.search.categoryId,e.search.facets?`${e.search.facets} facets`:""].filter(Boolean).join(" / "):"",e.flow?[e.flow.target,e.flow.sku,e.flow.skus?.join(", "),e.flow.action].filter(Boolean).join(" / "):""].filter(Boolean).join(" -> "):""}function zc(e){const t=e.panel||{},r=e.ui||{};return[t.screenType,r.rootType,r.widget,r.panelHint].filter(Boolean).join(" / ")}function Gc(e){return e?[e.query,e.source,e.category,e.count!=null?`${e.count} results`:""].filter(Boolean).join(" / "):""}function Hc(e,t){const r=e?.productSkus||e?.screenSkus||t?.skus||[],n=e?.productCount??t?.count;return n==null&&!r.length?"":[`${n??r.length} products`,r.join(", ")].filter(Boolean).join(" / ")}function Vc(e){return e?[e.sku,e.name,e.category].filter(Boolean).join(" / "):""}function Kc(e){const t=new Map;for(const r of e){const n=`${r.section||"Runtime"}:${r.group||r.kind}`,o=t.get(n)||{key:n,section:r.section||"Runtime",severity:r.severity||"info",title:r.group||r.kind,entries:[]};o.entries.push(r),o.severity=Zc(o.severity,r.severity),t.set(n,o)}return[...t.values()]}function Wc(e){const t=document.createElement("section");t.className=`group group-${ge(e.severity)}`,t.dataset.section=e.section;const r=document.createElement("div");r.className="group-head";const n=document.createElement("span");n.className="section",n.textContent=e.section;const o=document.createElement("span");o.className="group-title",o.textContent=e.title;const i=document.createElement("span");i.className="group-count",i.textContent=String(e.entries.length),r.append(n,o,i),t.appendChild(r);for(const a of e.entries)t.appendChild(qn(a));return t}function qn(e){const t=document.createElement("details");t.dataset.entryId=String(e.id||""),t.dataset.section=e.section||"Runtime",t.dataset.severity=e.severity||"info",t.className=`entry entry-${ge(e.severity||"info")}`,t.open=e.severity==="error";const r=document.createElement("summary"),n=document.createElement("div");n.className="entry-meta";const o=document.createElement("span");o.className="sev-dot";const i=document.createElement("span");i.className="time",i.textContent=Hn(e.at);const a=document.createElement("span");a.className="section",a.textContent=e.section||"Runtime";const s=document.createElement("span");if(s.className="kind-chip",s.textContent=e.kind||"",n.append(o,i,a,s),e.severity==="warn"||e.severity==="error"){const g=document.createElement("span");g.className="severity",g.textContent=Vn(e.severity),n.append(g)}const c=document.createElement("div");c.className="entry-title-row";const l=document.createElement("span");l.className="caret",l.textContent="▸";const u=document.createElement("span");u.className="title",u.textContent=Gn(e),c.append(l,u),r.append(n,c);const f=document.createElement("div");f.className="entry-body";const m=document.createElement("div");if(m.className="entry-toolbar",e.group){const g=document.createElement("span");g.className="kind",g.textContent=e.group,m.append(g)}const p=document.createElement("button");p.type="button",p.dataset.action="copy-json",p.dataset.entryId=String(e.id||""),p.textContent="Copy JSON",m.append(p);const y=document.createElement("pre"),h=document.createElement("code");return h.innerHTML=Un(e),y.appendChild(h),f.append(m,y),t.append(r,f),t}function Un(e){const t=Vt(e),r=/("(?:\\u[\da-fA-F]{4}|\\[^u]|[^\\"])*"(?:\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/gu;let n="",o=0;for(const i of t.matchAll(r)){const a=i[0];n+=je(t.slice(o,i.index));let s="json-number";a.startsWith('"')?s=a.endsWith(":")?"json-key":"json-string":a==="true"||a==="false"?s="json-boolean":a==="null"&&(s="json-null"),n+=`<span class="${s}">${je(a)}</span>`,o=i.index+a.length}return n+je(t.slice(o))}function Jc(e,t){if(!e)return;const r=Vt(e),n=()=>{const o=t.textContent;t.textContent="Copied",setTimeout(()=>{t.textContent=o},900)};if(navigator.clipboard?.writeText){navigator.clipboard.writeText(r).then(n).catch(()=>Dn(r,n));return}Dn(r,n)}function Dn(e,t){const r=document.createElement("textarea");r.value=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;",document.body.appendChild(r),r.select();try{document.execCommand("copy"),t()}finally{r.remove()}}function Zc(e,t){const r={info:0,warn:1,error:2};return(r[t]||0)>(r[e]||0)?t:e}function Yc(e){return zn([e.kind,e.section,e.severity,e.group,Gn(e),e.tool,e.op,e.request?.type,e.request?.action?.type,e.event?.name,e.event?.action,e.event?.type,Vt(e)].join(" "))}function zn(e){return String(e||"").toLocaleLowerCase("tr-TR").trim()}function Gn(e){if(e.kind==="flow/request")return e.request?.type||e.request?.action?.type||"request";if(e.kind==="flow/action")return e.event?.name||e.event?.action||e.event?.type||"action";if(e.kind==="flow/metadata")return e.event?.name||e.event?.phase||e.event?.type||"metadata";if(e.kind==="flow/ui")return e.widget||e.panelHint||"ui";if(e.kind==="flow/text-final")return Xc(e.content||"final text",90);if(e.kind==="be/request")return e.op||"BE request";if(e.kind==="be/response"){const t=e.result?.intent?.kind||e.result?.intent_kind||e.result?.kind;return t?`intent selected: ${t}`:e.op||"BE response"}return e.kind==="intent/selected"?e.intent?.kind||e.kind:e.kind.startsWith("tool/")?e.tool||"tool":e.kind==="beacon"?e.payload?.type||"beacon":e.title||e.kind}function Qc(e){return`
8
+ `)}}return t}function Pc(e){if(Array.isArray(e))return{type:"array",length:e.length,preview:e.slice(0,5)};if(!e||typeof e!="object")return e;const t={};for(const[r,n]of Object.entries(e))Array.isArray(n)?t[r]={type:"array",length:n.length,preview:n.slice(0,5)}:n&&typeof n=="object"?t[r]={type:"object",keys:Object.keys(n).slice(0,20)}:t[r]=n;return t}function me(e){return e?.message||String(e)}var In="gengage-agentic-activity-overlay",Re="all",Gt="all",Ln=["Flow","Tools","Backend","Intent","Telemetry","Runtime"],On=["info","warn","error"];function Bn(e){if(!e||typeof e.subscribe!="function")return null;const t=document.getElementById(In);if(t?.shadowRoot)return t;const r=document.createElement("div");r.id=In,r.style.cssText="position:fixed;left:10px;top:10px;bottom:10px;z-index:2147483647;";const n=r.attachShadow({mode:"open"});n.innerHTML=Qc(e.accountId),document.documentElement.appendChild(r);const o={entries:[],section:Re,severity:Gt,search:"",grouped:!1,follow:!0,stateVisible:!0,verbose:!1},i={stateView:n.querySelector('[data-role="state-view"]'),list:n.querySelector('[data-role="list"]'),count:n.querySelector('[data-role="count"]'),visibleCount:n.querySelector('[data-role="visible-count"]'),panel:n.querySelector('[data-role="panel"]'),search:n.querySelector('[data-role="search"]'),sections:n.querySelector('[data-role="section-filters"]'),severities:n.querySelector('[data-role="severity-filters"]'),groupToggle:n.querySelector('[data-action="group"]'),followToggle:n.querySelector('[data-action="follow"]'),stateToggle:n.querySelector('[data-action="state"]'),verboseToggle:n.querySelector('[data-action="verbose"]')};Rc(r,i.list);const a=()=>Ic(i,o),s=n.querySelector('[data-role="filters-popup"]'),c=n.querySelector('[data-action="filters-toggle"]');return c?.addEventListener("click",()=>{const l=s.classList.toggle("is-hidden")===!1;c.setAttribute("aria-pressed",String(l))}),n.addEventListener("click",l=>{s.classList.contains("is-hidden")||s.contains(l.target)||c.contains(l.target)||(s.classList.add("is-hidden"),c.setAttribute("aria-pressed","false"))}),n.querySelector('[data-action="clear"]')?.addEventListener("click",()=>e.clear()),n.querySelector('[data-action="toggle"]')?.addEventListener("click",l=>{const u=i.panel.classList.toggle("is-minimized");l.currentTarget.textContent=u?"Open":"Min",r.style.bottom=u?"auto":"10px"}),i.search?.addEventListener("input",()=>{o.search=i.search.value||"",a()}),i.sections?.addEventListener("click",l=>{const u=l.target?.closest?.("[data-section-filter]")?.dataset?.sectionFilter;u&&(o.section=u,a())}),i.severities?.addEventListener("click",l=>{const u=l.target?.closest?.("[data-severity-filter]")?.dataset?.severityFilter;u&&(o.severity=u,a())}),i.groupToggle?.addEventListener("click",()=>{o.grouped=!o.grouped,i.groupToggle.setAttribute("aria-pressed",String(o.grouped)),i.groupToggle.textContent=o.grouped?"Grouped":"Flat",a()}),i.followToggle?.addEventListener("click",()=>{o.follow=!o.follow,i.followToggle.setAttribute("aria-pressed",String(o.follow)),i.followToggle.textContent=o.follow?"Follow":"Paused"}),i.stateToggle?.addEventListener("click",()=>{o.stateVisible=!o.stateVisible,i.stateToggle.setAttribute("aria-pressed",String(o.stateVisible)),i.stateToggle.textContent=o.stateVisible?"State":"State off",a()}),i.verboseToggle?.addEventListener("click",()=>{o.verbose=!o.verbose,i.verboseToggle.setAttribute("aria-pressed",String(o.verbose)),i.verboseToggle.textContent=o.verbose?"Verbose":"Concise",a()}),n.querySelector('[data-action="expand-all"]')?.addEventListener("click",()=>{i.list?.querySelectorAll("details").forEach(l=>{l.open=!0})}),n.querySelector('[data-action="collapse-all"]')?.addEventListener("click",()=>{i.list?.querySelectorAll("details").forEach(l=>{l.open=!1})}),i.list?.addEventListener("click",l=>{const u=l.target?.closest?.('[data-action="copy-json"]');if(!u)return;const f=Number(u.dataset.entryId||0);Jc(o.entries.find(m=>m.id===f),u)}),e.subscribe((l,u)=>{o.entries=u.slice(),a()}),r}function Rc(e,t){e.addEventListener("wheel",r=>{const n=jc(r.composedPath?.()||[],t);n&&(n.scrollTop+=r.deltaY,n.scrollLeft+=r.deltaX,r.preventDefault(),r.stopPropagation())},{passive:!1,capture:!0})}function jc(e,t){for(const r of e)if(!(!r||r.nodeType!==1)&&Mn(r))return r;return Mn(t)?t:null}function Mn(e){return!!(e&&(e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1)&&getComputedStyle(e).overflow!=="hidden")}function Ic(e,t){const r=Nn(t.entries,t),n=r.slice(-260).reverse();$n(e.sections,t.entries,t.section,"section"),$n(e.severities,t.entries,t.severity,"severity"),e.count&&(e.count.textContent=String(t.entries.length)),e.visibleCount&&(e.visibleCount.textContent=String(r.length)),Mc(e.stateView,xn(t.entries),t.stateVisible),Bc(e.list,n,t)}function Nn(e,t={}){const r=t.section||Re,n=t.severity||Gt,o=zn(t.search),i=t.verbose===!0;return(Array.isArray(e)?e:[]).filter(a=>!i&&a.noise===!0||r!==Re&&a.section!==r||n!==Gt&&a.severity!==n?!1:o?Yc(a).includes(o):!0)}function $n(e,t,r,n){if(!e)return;e.textContent="";const o=n==="section"?Lc(t):Oc(t),i=document.createElement("button");i.type="button",i.dataset[`${n}Filter`]=Re,i.className=r===Re?"chip is-active":"chip",i.textContent=`All ${t.length}`,e.appendChild(i);for(const a of o){const s=t.filter(l=>l[n]===a).length,c=document.createElement("button");c.type="button",c.dataset[`${n}Filter`]=a,c.className=r===a?`chip is-active ${n}-${ge(a)}`:`chip ${n}-${ge(a)}`,c.textContent=`${Vn(a)} ${s}`,e.appendChild(c)}}function Lc(e){const t=new Set(e.map(r=>r.section).filter(Boolean));return Ln.filter(r=>t.has(r)).concat([...t].filter(r=>!Ln.includes(r)).sort())}function Oc(e){const t=new Set(e.map(r=>r.severity).filter(Boolean));return On.filter(r=>t.has(r)).concat([...t].filter(r=>!On.includes(r)).sort())}function Bc(e,t,r){if(!e)return;if(e.textContent="",!t.length){const o=document.createElement("div");o.className="empty",o.textContent=r.entries.length?"No activity matches the current filters.":"Waiting for agentic activity...",e.appendChild(o);return}const n=document.createDocumentFragment();if(r.grouped)for(const o of Kc(t))n.appendChild(Wc(o));else for(const o of t)n.appendChild(qn(o));e.appendChild(n),r.follow&&requestAnimationFrame(()=>e.scrollTop=0)}function Mc(e,t,r){if(!e||(e.textContent="",e.classList.toggle("is-hidden",!r),!r))return;const{flow:n,context:o}=t,i=document.createDocumentFragment();i.appendChild(Nc(n)),i.appendChild($c(o)),i.appendChild(Fc(n.timeline)),e.appendChild(i)}function Nc(e){const t=document.createElement("section");return t.className=`viz-card flow-card status-${ge(e.status)}`,t.appendChild(Ht("Flow State",e.status)),Fn(t,[["Current",e.current],["Session",e.sessionId],["Request",[e.requestType,e.actionType].filter(Boolean).join(" / ")],["Model",e.model],["Tools",e.tools?.join(", ")],["BE ops",e.beOps?.join(", ")],["UI",e.uiSurfaces?.join(", ")],["Health",qc(e)]]),t}function $c(e){const t=document.createElement("section");return t.className="viz-card context-card",t.appendChild(Ht("Context State",e.panel?.screenType||e.ui?.rootType||"empty")),Fn(t,[["Intent",Uc(e.intent)],["Route",Dc(e.route)],["Screen",zc(e)],["Last search",Gc(e.panel?.lastSearch)],["Products",Hc(e.panel,e.products)],["Page product",Vc(e.pageProduct)],["Extensions",Object.keys(e.threadExtensions||{}).join(", ")],["Last text",e.lastText]]),t}function Fc(e){const t=document.createElement("section");t.className="viz-card timeline-card",t.appendChild(Ht("Flow Timeline",`${e.length} steps`));const r=document.createElement("ol");if(r.className="timeline",e.length)for(const n of e){const o=document.createElement("li");o.className=`timeline-step step-${ge(n.status||"done")}`;const i=document.createElement("span");i.className="timeline-time",i.textContent=Hn(n.at);const a=document.createElement("span");a.className="timeline-label",a.textContent=n.label||n.kind||"Step";const s=document.createElement("span");s.className="timeline-detail",s.textContent=n.detail||n.kind||"",o.append(i,a,s),r.appendChild(o)}else{const n=document.createElement("li");n.className="timeline-empty",n.textContent="No flow events yet.",r.appendChild(n)}return t.appendChild(r),t}function Ht(e,t){const r=document.createElement("div");r.className="viz-title";const n=document.createElement("span");n.textContent=e;const o=document.createElement("span");return o.className="viz-badge",o.textContent=t||"idle",r.append(n,o),r}function Fn(e,t){for(const[r,n]of t){if(n==null||n==="")continue;const o=document.createElement("div");o.className="viz-row";const i=document.createElement("span");i.className="viz-key",i.textContent=r;const a=document.createElement("span");a.className="viz-value",a.textContent=String(n),o.append(i,a),e.appendChild(o)}}function qc(e){return!e.errors&&!e.warnings?"clean":`${e.errors||0} errors, ${e.warnings||0} warnings`}function Uc(e){return e?[e.kind,e.target,e.confidence!=null?`conf ${e.confidence}`:""].filter(Boolean).join(" / "):""}function Dc(e){return e?[e.search?[e.search.query,e.search.category,e.search.categoryId,e.search.facets?`${e.search.facets} facets`:""].filter(Boolean).join(" / "):"",e.flow?[e.flow.target,e.flow.sku,e.flow.skus?.join(", "),e.flow.action].filter(Boolean).join(" / "):""].filter(Boolean).join(" -> "):""}function zc(e){const t=e.panel||{},r=e.ui||{};return[t.screenType,r.rootType,r.widget,r.panelHint].filter(Boolean).join(" / ")}function Gc(e){return e?[e.query,e.source,e.category,e.count!=null?`${e.count} results`:""].filter(Boolean).join(" / "):""}function Hc(e,t){const r=e?.productSkus||e?.screenSkus||t?.skus||[],n=e?.productCount??t?.count;return n==null&&!r.length?"":[`${n??r.length} products`,r.join(", ")].filter(Boolean).join(" / ")}function Vc(e){return e?[e.sku,e.name,e.category].filter(Boolean).join(" / "):""}function Kc(e){const t=new Map;for(const r of e){const n=`${r.section||"Runtime"}:${r.group||r.kind}`,o=t.get(n)||{key:n,section:r.section||"Runtime",severity:r.severity||"info",title:r.group||r.kind,entries:[]};o.entries.push(r),o.severity=Zc(o.severity,r.severity),t.set(n,o)}return[...t.values()]}function Wc(e){const t=document.createElement("section");t.className=`group group-${ge(e.severity)}`,t.dataset.section=e.section;const r=document.createElement("div");r.className="group-head";const n=document.createElement("span");n.className="section",n.textContent=e.section;const o=document.createElement("span");o.className="group-title",o.textContent=e.title;const i=document.createElement("span");i.className="group-count",i.textContent=String(e.entries.length),r.append(n,o,i),t.appendChild(r);for(const a of e.entries)t.appendChild(qn(a));return t}function qn(e){const t=document.createElement("details");t.dataset.entryId=String(e.id||""),t.dataset.section=e.section||"Runtime",t.dataset.severity=e.severity||"info",t.className=`entry entry-${ge(e.severity||"info")}`,t.open=e.severity==="error";const r=document.createElement("summary"),n=document.createElement("div");n.className="entry-meta";const o=document.createElement("span");o.className="sev-dot";const i=document.createElement("span");i.className="time",i.textContent=Hn(e.at);const a=document.createElement("span");a.className="section",a.textContent=e.section||"Runtime";const s=document.createElement("span");if(s.className="kind-chip",s.textContent=e.kind||"",n.append(o,i,a,s),e.severity==="warn"||e.severity==="error"){const g=document.createElement("span");g.className="severity",g.textContent=Vn(e.severity),n.append(g)}const c=document.createElement("div");c.className="entry-title-row";const l=document.createElement("span");l.className="caret",l.textContent="▸";const u=document.createElement("span");u.className="title",u.textContent=Gn(e),c.append(l,u),r.append(n,c);const f=document.createElement("div");f.className="entry-body";const m=document.createElement("div");if(m.className="entry-toolbar",e.group){const g=document.createElement("span");g.className="kind",g.textContent=e.group,m.append(g)}const p=document.createElement("button");p.type="button",p.dataset.action="copy-json",p.dataset.entryId=String(e.id||""),p.textContent="Copy JSON",m.append(p);const y=document.createElement("pre"),h=document.createElement("code");return h.innerHTML=Un(e),y.appendChild(h),f.append(m,y),t.append(r,f),t}function Un(e){const t=Vt(e),r=/("(?:\\u[\da-fA-F]{4}|\\[^u]|[^\\"])*"(?:\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/gu;let n="",o=0;for(const i of t.matchAll(r)){const a=i[0];n+=je(t.slice(o,i.index));let s="json-number";a.startsWith('"')?s=a.endsWith(":")?"json-key":"json-string":a==="true"||a==="false"?s="json-boolean":a==="null"&&(s="json-null"),n+=`<span class="${s}">${je(a)}</span>`,o=i.index+a.length}return n+je(t.slice(o))}function Jc(e,t){if(!e)return;const r=Vt(e),n=()=>{const o=t.textContent;t.textContent="Copied",setTimeout(()=>{t.textContent=o},900)};if(navigator.clipboard?.writeText){navigator.clipboard.writeText(r).then(n).catch(()=>Dn(r,n));return}Dn(r,n)}function Dn(e,t){const r=document.createElement("textarea");r.value=e,r.style.cssText="position:fixed;left:-9999px;top:-9999px;",document.body.appendChild(r),r.select();try{document.execCommand("copy"),t()}finally{r.remove()}}function Zc(e,t){const r={info:0,warn:1,error:2};return(r[t]||0)>(r[e]||0)?t:e}function Yc(e){return zn([e.kind,e.section,e.severity,e.group,Gn(e),e.tool,e.op,e.request?.type,e.request?.action?.type,e.event?.name,e.event?.action,e.event?.type,Vt(e)].join(" "))}function zn(e){return String(e||"").toLocaleLowerCase("tr-TR").trim()}function Gn(e){if(e.kind==="flow/request")return e.request?.type||e.request?.action?.type||"request";if(e.kind==="flow/action")return e.event?.name||e.event?.action||e.event?.type||"action";if(e.kind==="flow/metadata")return e.event?.name||e.event?.phase||e.event?.type||"metadata";if(e.kind==="flow/ui")return e.widget||e.panelHint||"ui";if(e.kind==="flow/text-final")return Xc(e.content||"final text",90);if(e.kind==="be/request")return e.op||"BE request";if(e.kind==="be/response"){const t=e.result?.intent?.kind||e.result?.intent_kind||e.result?.kind;return t?`intent selected: ${t}`:e.op||"BE response"}return e.kind==="intent/selected"?e.intent?.kind||e.kind:e.kind.startsWith("tool/")?e.tool||"tool":e.kind==="beacon"?e.payload?.type||"beacon":e.title||e.kind}function Qc(e){return`
9
9
  <style>
10
10
  :host { all: initial; }
11
11
  .panel {
@@ -391,8 +391,14 @@
391
391
  .json-number { color: #fbbf24; }
392
392
  .json-boolean { color: #f0abfc; }
393
393
  .json-null { color: #cbd5e1; }
394
+ /* Minimized: collapse to just the header. The body sections are hidden
395
+ AND the panel/host stop reserving full viewport height (the host's
396
+ inline bottom offset is released in JS), so only the title bar remains
397
+ and the page underneath is clickable again. */
398
+ .is-minimized { height: auto; max-height: none; }
394
399
  .is-minimized .controls, .is-minimized .list { display: none; }
395
400
  .is-minimized .state-view { display: none; }
401
+ .is-minimized .filters-popup { display: none; }
396
402
  @media (max-width: 620px) {
397
403
  .panel { width: calc(100vw - 20px); }
398
404
  }
@@ -1,4 +1,4 @@
1
- import { i as U } from "./widget-base-CYbh5dI9.js";
1
+ import { i as U } from "./widget-base-DhkuNWft.js";
2
2
  var j = ({ element: t, renderElement: e }) => {
3
3
  if (!t.children || t.children.length === 0) return null;
4
4
  const r = document.createElement("div");
@@ -1,4 +1,4 @@
1
- import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-CwGrFmYS.js";
1
+ import { c as e, d as t, f as r, i as s, l as n, n as i, r as l, s as C, t as c, u as d } from "./runtime-4QEfxNRC.js";
2
2
  export {
3
3
  d as CHAT_SCROLL_ELEMENT_ID,
4
4
  s as ChatPresentationState,