🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@andrewshell/socklog

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andrewshell/socklog - npm Package Compare versions

Comparing version
0.2.0
to
0.2.1
+4
-0
dist/components/socklog-viewer.d.ts

@@ -7,4 +7,7 @@ import { LitElement } from 'lit';

maxLogs: number;
indent: number;
private logs;
private status;
private searchTerm;
private expandedIds;
private client;

@@ -18,2 +21,3 @@ private store;

getStore(): LogStore | null;
private toggleExpanded;
private formatTimestamp;

@@ -20,0 +24,0 @@ private formatJson;

+60
-18

@@ -5,29 +5,37 @@ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**

* SPDX-License-Identifier: BSD-3-Clause
*/const H=globalThis,q=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),G=new WeakMap;let at=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==J)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(q&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=G.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&G.set(e,t))}return t}toString(){return this.cssText}};const $t=o=>new at(typeof o=="string"?o:o+"",void 0,J),ct=(o,...t)=>{const e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new at(e,o,J)},_t=(o,t)=>{if(q)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),i=H.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},Q=q?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return $t(e)})(o):o;/**
*/const L=globalThis,J=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),Q=new WeakMap;let lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==K)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(J&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Q.set(e,t))}return t}toString(){return this.cssText}};const mt=o=>new lt(typeof o=="string"?o:o+"",void 0,K),ht=(o,...t)=>{const e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new lt(e,o,K)},vt=(o,t)=>{if(J)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),i=L.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},X=J?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return mt(e)})(o):o;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:mt,defineProperty:vt,getOwnPropertyDescriptor:yt,getOwnPropertyNames:bt,getOwnPropertySymbols:At,getPrototypeOf:St}=Object,$=globalThis,X=$.trustedTypes,Et=X?X.emptyScript:"",I=$.reactiveElementPolyfillSupport,x=(o,t)=>o,R={toAttribute(o,t){switch(t){case Boolean:o=o?Et:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},K=(o,t)=>!mt(o,t),Y={attribute:!0,type:String,converter:R,reflect:!1,useDefault:!1,hasChanged:K};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);let b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&vt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=yt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){const c=i==null?void 0:i.call(this);n==null||n.call(this,r),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Y}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=St(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const e=this.properties,s=[...bt(e),...At(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(Q(i))}else t!==void 0&&e.push(Q(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return _t(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((n=c.converter)==null?void 0:n.fromAttribute)!==void 0?c.converter:R;this._$Em=i;const h=a.fromAttribute(e,c.type);this[i]=h??((r=this._$Ej)==null?void 0:r.get(i))??h,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,r=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??K)(r,e)||s.useDefault&&s.reflect&&r===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i){const{wrapped:c}=r,a=this[n];c!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[x("elementProperties")]=new Map,b[x("finalized")]=new Map,I==null||I({ReactiveElement:b}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.1.1");/**
*/const{is:yt,defineProperty:bt,getOwnPropertyDescriptor:At,getOwnPropertyNames:St,getOwnPropertySymbols:Et,getPrototypeOf:wt}=Object,$=globalThis,Y=$.trustedTypes,xt=Y?Y.emptyScript:"",V=$.reactiveElementPolyfillSupport,C=(o,t)=>o,I={toAttribute(o,t){switch(t){case Boolean:o=o?xt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},Z=(o,t)=>!yt(o,t),tt={attribute:!0,type:String,converter:I,reflect:!1,useDefault:!1,hasChanged:Z};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);let S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&bt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=At(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){const c=i==null?void 0:i.call(this);n==null||n.call(this,r),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tt}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const t=wt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const e=this.properties,s=[...St(e),...Et(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(X(i))}else t!==void 0&&e.push(X(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:I).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((n=c.converter)==null?void 0:n.fromAttribute)!==void 0?c.converter:I;this._$Em=i;const h=a.fromAttribute(e,c.type);this[i]=h??((r=this._$Ej)==null?void 0:r.get(i))??h,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,r=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??Z)(r,e)||s.useDefault&&s.reflect&&r===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i){const{wrapped:c}=r,a=this[n];c!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[C("elementProperties")]=new Map,S[C("finalized")]=new Map,V==null||V({ReactiveElement:S}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.1.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const C=globalThis,L=C.trustedTypes,tt=L?L.createPolicy("lit-html",{createHTML:o=>o}):void 0,lt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+f,wt=`<${ht}>`,y=document,k=()=>y.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",Z=Array.isArray,xt=o=>Z(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",B=`[
\f\r]`,w=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,et=/-->/g,st=/>/g,_=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,ot=/"/g,dt=/^(?:script|style|textarea|title)$/i,Ct=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),N=Ct(1),S=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),rt=new WeakMap,m=y.createTreeWalker(y,129);function ut(o,t){if(!Z(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return tt!==void 0?tt.createHTML(t):t}const kt=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",r=w;for(let c=0;c<e;c++){const a=o[c];let h,u,l=-1,p=0;for(;p<a.length&&(r.lastIndex=p,u=r.exec(a),u!==null);)p=r.lastIndex,r===w?u[1]==="!--"?r=et:u[1]!==void 0?r=st:u[2]!==void 0?(dt.test(u[2])&&(i=RegExp("</"+u[2],"g")),r=_):u[3]!==void 0&&(r=_):r===_?u[0]===">"?(r=i??w,l=-1):u[1]===void 0?l=-2:(l=r.lastIndex-u[2].length,h=u[1],r=u[3]===void 0?_:u[3]==='"'?ot:it):r===ot||r===it?r=_:r===et||r===st?r=w:(r=_,i=void 0);const g=r===_&&o[c+1].startsWith("/>")?" ":"";n+=r===w?a+wt:l>=0?(s.push(h),a.slice(0,l)+lt+a.slice(l)+f+g):a+f+(l===-2?c:g)}return[ut(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class O{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const c=t.length-1,a=this.parts,[h,u]=kt(t,e);if(this.el=O.createElement(h,s),m.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=m.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(lt)){const p=u[r++],g=i.getAttribute(l).split(f),M=/([.?@])?(.*)/.exec(p);a.push({type:1,index:n,name:M[2],strings:g,ctor:M[1]==="."?Ot:M[1]==="?"?Ut:M[1]==="@"?Tt:z}),i.removeAttribute(l)}else l.startsWith(f)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(dt.test(i.tagName)){const l=i.textContent.split(f),p=l.length-1;if(p>0){i.textContent=L?L.emptyScript:"";for(let g=0;g<p;g++)i.append(l[g],k()),m.nextNode(),a.push({type:2,index:++n});i.append(l[p],k())}}}else if(i.nodeType===8)if(i.data===ht)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(f,l+1))!==-1;)a.push({type:7,index:n}),l+=f.length-1}n++}}static createElement(t,e){const s=y.createElement("template");return s.innerHTML=t,s}}function E(o,t,e=o,s){var r,c;if(t===S)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const n=P(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(o,i._$AS(o,t.values),i,s)),t}class Pt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??y).importNode(e,!0);m.currentNode=i;let n=m.nextNode(),r=0,c=0,a=s[0];for(;a!==void 0;){if(r===a.index){let h;a.type===2?h=new U(n,n.nextSibling,this,t):a.type===1?h=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(h=new Mt(n,this,t)),this._$AV.push(h),a=s[++c]}r!==(a==null?void 0:a.index)&&(n=m.nextNode(),r++)}return m.currentNode=y,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class U{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),P(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==S&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=O.createElement(ut(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const r=new Pt(i,this),c=r.u(this.options);r.p(e),this.T(c),this._$AH=r}}_$AC(t){let e=rt.get(t.strings);return e===void 0&&rt.set(t.strings,e=new O(t)),e}k(t){Z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new U(this.O(k()),this.O(k()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class z{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=E(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==S,r&&(this._$AH=t);else{const c=t;let a,h;for(t=n[0],a=0;a<n.length-1;a++)h=E(this,c[s+a],e,a),h===S&&(h=this._$AH[a]),r||(r=!P(h)||h!==this._$AH[a]),h===d?t=d:t!==d&&(t+=(h??"")+n[a+1]),this._$AH[a]=h}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ot extends z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Ut extends z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Tt extends z{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??d)===S)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Mt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const W=C.litHtmlPolyfillSupport;W==null||W(O,U),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.3.1");const Ht=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new U(t.insertBefore(k(),n),n,void 0,e??{})}return i._$AI(o),i};/**
*/const P=globalThis,z=P.trustedTypes,et=z?z.createPolicy("lit-html",{createHTML:o=>o}):void 0,dt="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,pt="?"+f,kt=`<${pt}>`,b=document,O=()=>b.createComment(""),T=o=>o===null||typeof o!="object"&&typeof o!="function",G=Array.isArray,Ct=o=>G(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",B=`[
\f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,it=/>/g,m=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,rt=/"/g,ut=/^(?:script|style|textarea|title)$/i,Pt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),R=Pt(1),A=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),nt=new WeakMap,v=b.createTreeWalker(b,129);function gt(o,t){if(!G(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return et!==void 0?et.createHTML(t):t}const Ot=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",r=k;for(let c=0;c<e;c++){const a=o[c];let h,p,l=-1,u=0;for(;u<a.length&&(r.lastIndex=u,p=r.exec(a),p!==null);)u=r.lastIndex,r===k?p[1]==="!--"?r=st:p[1]!==void 0?r=it:p[2]!==void 0?(ut.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=m):p[3]!==void 0&&(r=m):r===m?p[0]===">"?(r=i??k,l=-1):p[1]===void 0?l=-2:(l=r.lastIndex-p[2].length,h=p[1],r=p[3]===void 0?m:p[3]==='"'?rt:ot):r===rt||r===ot?r=m:r===st||r===it?r=k:(r=m,i=void 0);const g=r===m&&o[c+1].startsWith("/>")?" ":"";n+=r===k?a+kt:l>=0?(s.push(h),a.slice(0,l)+dt+a.slice(l)+f+g):a+f+(l===-2?c:g)}return[gt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class U{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const c=t.length-1,a=this.parts,[h,p]=Ot(t,e);if(this.el=U.createElement(h,s),v.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=v.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(dt)){const u=p[r++],g=i.getAttribute(l).split(f),N=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:N[2],strings:g,ctor:N[1]==="."?Ut:N[1]==="?"?Mt:N[1]==="@"?Ht:D}),i.removeAttribute(l)}else l.startsWith(f)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(ut.test(i.tagName)){const l=i.textContent.split(f),u=l.length-1;if(u>0){i.textContent=z?z.emptyScript:"";for(let g=0;g<u;g++)i.append(l[g],O()),v.nextNode(),a.push({type:2,index:++n});i.append(l[u],O())}}}else if(i.nodeType===8)if(i.data===pt)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(f,l+1))!==-1;)a.push({type:7,index:n}),l+=f.length-1}n++}}static createElement(t,e){const s=b.createElement("template");return s.innerHTML=t,s}}function w(o,t,e=o,s){var r,c;if(t===A)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const n=T(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=w(o,i._$AS(o,t.values),i,s)),t}class Tt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??b).importNode(e,!0);v.currentNode=i;let n=v.nextNode(),r=0,c=0,a=s[0];for(;a!==void 0;){if(r===a.index){let h;a.type===2?h=new M(n,n.nextSibling,this,t):a.type===1?h=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(h=new Nt(n,this,t)),this._$AV.push(h),a=s[++c]}r!==(a==null?void 0:a.index)&&(n=v.nextNode(),r++)}return v.currentNode=b,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class M{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),T(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ct(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(b.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(gt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const r=new Tt(i,this),c=r.u(this.options);r.p(e),this.T(c),this._$AH=r}}_$AC(t){let e=nt.get(t.strings);return e===void 0&&nt.set(t.strings,e=new U(t)),e}k(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new M(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class D{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=w(this,t,e,0),r=!T(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{const c=t;let a,h;for(t=n[0],a=0;a<n.length-1;a++)h=w(this,c[s+a],e,a),h===A&&(h=this._$AH[a]),r||(r=!T(h)||h!==this._$AH[a]),h===d?t=d:t!==d&&(t+=(h??"")+n[a+1]),this._$AH[a]=h}r&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ut extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Mt extends D{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Ht extends D{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??d)===A)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Nt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const W=P.litHtmlPolyfillSupport;W==null||W(U,M),(P.litHtmlVersions??(P.litHtmlVersions=[])).push("3.3.1");const Lt=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new M(t.insertBefore(O(),n),n,void 0,e??{})}return i._$AI(o),i};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const v=globalThis;class A extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return S}}var nt;A._$litElement$=!0,A.finalized=!0,(nt=v.litElementHydrateSupport)==null||nt.call(v,{LitElement:A});const F=v.litElementPolyfillSupport;F==null||F({LitElement:A});(v.litElementVersions??(v.litElementVersions=[])).push("4.2.1");/**
*/const y=globalThis;let E=class extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return A}};var ct;E._$litElement$=!0,E.finalized=!0,(ct=y.litElementHydrateSupport)==null||ct.call(y,{LitElement:E});const q=y.litElementPolyfillSupport;q==null||q({LitElement:E});(y.litElementVersions??(y.litElementVersions=[])).push("4.2.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const pt=o=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(o,t)})):customElements.define(o,t)};/**
*/const ft=o=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(o,t)})):customElements.define(o,t)};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Nt={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:K},Rt=(o=Nt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),s==="accessor"){const{name:r}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(r,a,o)},init(c){return c!==void 0&&this.C(r,void 0,o,c),c}}}if(s==="setter"){const{name:r}=e;return function(c){const a=this[r];t.call(this,c),this.requestUpdate(r,a,o)}}throw Error("Unsupported decorator location: "+s)};function D(o){return(t,e)=>typeof e=="object"?Rt(o,t,e):((s,i,n)=>{const r=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}/**
*/const Rt={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:Z},It=(o=Rt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),s==="accessor"){const{name:r}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(r,a,o)},init(c){return c!==void 0&&this.C(r,void 0,o,c),c}}}if(s==="setter"){const{name:r}=e;return function(c){const a=this[r];t.call(this,c),this.requestUpdate(r,a,o)}}throw Error("Unsupported decorator location: "+s)};function H(o){return(t,e)=>typeof e=="object"?It(o,t,e):((s,i,n)=>{const r=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function j(o){return D({...o,state:!0,attribute:!1})}class gt extends EventTarget{constructor(t){super(),this.ws=null,this.reconnectAttempts=0,this._status="disconnected",this.config={reconnect:!0,reconnectInterval:3e3,maxReconnectAttempts:10,...t}}get status(){return this._status}connect(){var t;if(((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN){this._status="connecting",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}));try{this.ws=new WebSocket(this.config.url),this.setupEventHandlers()}catch{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))}}}disconnect(){var t;this.reconnectAttempts=this.config.maxReconnectAttempts??10,(t=this.ws)==null||t.close()}setupEventHandlers(){this.ws&&(this.ws.onopen=()=>{this._status="connected",this.reconnectAttempts=0,this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onclose=()=>{this._status="disconnected",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status})),this.attemptReconnect()},this.ws.onerror=()=>{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onmessage=t=>{const e=t.data;let s;try{s=JSON.parse(e)}catch{s=e}const i={id:crypto.randomUUID(),timestamp:new Date,data:s,raw:e};this.dispatchEvent(new CustomEvent("log",{detail:i}))})}attemptReconnect(){this.config.reconnect&&(this.reconnectAttempts>=(this.config.maxReconnectAttempts??10)||(this.reconnectAttempts++,setTimeout(()=>this.connect(),this.config.reconnectInterval)))}}class ft extends EventTarget{constructor(t=1e3){super(),this.logs=[],this._filter={},this._paused=!1,this.maxLogs=t}get filter(){return this._filter}set filter(t){this._filter=t,this.dispatchEvent(new CustomEvent("filterchange",{detail:this._filter}))}get paused(){return this._paused}set paused(t){this._paused=t,this.dispatchEvent(new CustomEvent("pausechange",{detail:this._paused}))}add(t){this._paused||(this.logs.unshift(t),this.logs.length>this.maxLogs&&this.logs.pop(),this.dispatchEvent(new CustomEvent("logadded",{detail:t})))}clear(){this.logs=[],this.dispatchEvent(new CustomEvent("logscleared"))}getAll(){return[...this.logs]}getFiltered(){return this.logs.filter(t=>this.matchesFilter(t))}matchesFilter(t){const{search:e}=this._filter;if(e){const s=e.toLowerCase();return t.raw.toLowerCase().includes(s)}return!0}get count(){return this.logs.length}}var Lt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,T=(o,t,e,s)=>{for(var i=s>1?void 0:s?zt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Lt(t,e,i),i};exports.SocklogViewer=class extends A{constructor(){super(...arguments),this.url="",this.maxLogs=1e3,this.logs=[],this.status="disconnected",this.client=null,this.store=null}connectedCallback(){super.connectedCallback(),this.initializeStore(),this.url&&this.connect()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.client)==null||t.disconnect()}initializeStore(){this.store=new ft(this.maxLogs),this.store.addEventListener("logadded",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("filterchange",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("logscleared",()=>{this.logs=[]})}connect(){this.url&&(this.client=new gt({url:this.url}),this.client.addEventListener("statuschange",(t=>{this.status=t.detail})),this.client.addEventListener("log",(t=>{var e;(e=this.store)==null||e.add(t.detail)})),this.client.connect())}clear(){var t;(t=this.store)==null||t.clear()}getStore(){return this.store}formatTimestamp(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}formatJson(t){return typeof t=="string"?t:JSON.stringify(t,null,2)}render(){return this.logs.length===0?N`
*/function x(o){return H({...o,state:!0,attribute:!1})}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const zt={CHILD:2},Dt=o=>(...t)=>({_$litDirective$:o,values:t});class jt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class F extends jt{constructor(t){if(super(t),this.it=d,t.type!==zt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this._t=void 0,this.it=t;if(t===A)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}F.directiveName="unsafeHTML",F.resultType=1;const at=Dt(F);class $t extends EventTarget{constructor(t){super(),this.ws=null,this.reconnectAttempts=0,this._status="disconnected",this.config={reconnect:!0,reconnectInterval:3e3,maxReconnectAttempts:10,...t}}get status(){return this._status}connect(){var t;if(((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN){this._status="connecting",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}));try{this.ws=new WebSocket(this.config.url),this.setupEventHandlers()}catch{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))}}}disconnect(){var t;this.reconnectAttempts=this.config.maxReconnectAttempts??10,(t=this.ws)==null||t.close()}setupEventHandlers(){this.ws&&(this.ws.onopen=()=>{this._status="connected",this.reconnectAttempts=0,this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onclose=()=>{this._status="disconnected",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status})),this.attemptReconnect()},this.ws.onerror=()=>{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onmessage=t=>{const e=t.data;let s;try{s=JSON.parse(e)}catch{s=e}const i={id:crypto.randomUUID(),timestamp:new Date,data:s,raw:e};this.dispatchEvent(new CustomEvent("log",{detail:i}))})}attemptReconnect(){this.config.reconnect&&(this.reconnectAttempts>=(this.config.maxReconnectAttempts??10)||(this.reconnectAttempts++,setTimeout(()=>this.connect(),this.config.reconnectInterval)))}}class _t extends EventTarget{constructor(t=1e3){super(),this.logs=[],this._filter={},this._paused=!1,this.maxLogs=t}get filter(){return this._filter}set filter(t){this._filter=t,this.dispatchEvent(new CustomEvent("filterchange",{detail:this._filter}))}get paused(){return this._paused}set paused(t){this._paused=t,this.dispatchEvent(new CustomEvent("pausechange",{detail:this._paused}))}add(t){this._paused||(this.logs.unshift(t),this.logs.length>this.maxLogs&&this.logs.pop(),this.dispatchEvent(new CustomEvent("logadded",{detail:t})))}clear(){this.logs=[],this.dispatchEvent(new CustomEvent("logscleared"))}getAll(){return[...this.logs]}getFiltered(){return this.logs.filter(t=>this.matchesFilter(t))}matchesFilter(t){const{search:e}=this._filter;if(e){const s=e.toLowerCase();return t.raw.toLowerCase().includes(s)}return!0}get count(){return this.logs.length}}var Vt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,_=(o,t,e,s)=>{for(var i=s>1?void 0:s?Bt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Vt(t,e,i),i};exports.SocklogViewer=class extends E{constructor(){super(...arguments),this.url="",this.maxLogs=1e3,this.indent=4,this.logs=[],this.status="disconnected",this.searchTerm="",this.expandedIds=new Set,this.client=null,this.store=null}connectedCallback(){super.connectedCallback(),this.initializeStore(),this.url&&this.connect()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.client)==null||t.disconnect()}initializeStore(){this.store=new _t(this.maxLogs),this.store.addEventListener("logadded",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("filterchange",()=>{var t,e;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[],this.searchTerm=((e=this.store)==null?void 0:e.filter.search)??""}),this.store.addEventListener("logscleared",()=>{this.logs=[]})}connect(){this.url&&(this.client=new $t({url:this.url}),this.client.addEventListener("statuschange",(t=>{this.status=t.detail})),this.client.addEventListener("log",(t=>{var e;(e=this.store)==null||e.add(t.detail)})),this.client.connect())}clear(){var t;(t=this.store)==null||t.clear()}getStore(){return this.store}toggleExpanded(t){this.expandedIds.has(t)?this.expandedIds.delete(t):this.expandedIds.add(t),this.expandedIds=new Set(this.expandedIds)}formatTimestamp(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}formatJson(t,e=!1){let s;typeof t=="string"?s=t:s=e?JSON.stringify(t,null,this.indent):JSON.stringify(t);const n=s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(&quot;|")([^"\\]|\\.)*?\1(?=\s*:)/g,'<span class="json-key">$&</span>');if(!this.searchTerm)return at(n);const r=this.searchTerm.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`(${r})`,"gi"),a=n.replace(/(<[^>]*>)|([^<]+)/g,(h,p,l)=>p||l.replace(c,'<span class="search-highlight">$1</span>'));return at(a)}render(){return this.logs.length===0?R`
<div class="log-container">

@@ -38,12 +46,18 @@ <div class="empty-state">

</div>
`:N`
`:R`
<div class="log-container">
${this.logs.map(t=>N`
${this.logs.map(t=>R`
<div class="log-entry">
<div class="timestamp">${this.formatTimestamp(t.timestamp)}</div>
<div class="json">${this.formatJson(t.data)}</div>
<div class="log-header"
@click=${()=>this.toggleExpanded(t.id)}>
<span class="expand-toggle">
${this.expandedIds.has(t.id)?"⏷":"⏵"}
</span>
<span class="timestamp">${this.formatTimestamp(t.timestamp)}</span>
</div>
<div class="json">${this.formatJson(t.data,this.expandedIds.has(t.id))}</div>
</div>
`)}
</div>
`}};exports.SocklogViewer.styles=ct`
`}};exports.SocklogViewer.styles=ht`
:host {

@@ -67,6 +81,26 @@ display: block;

.log-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 2px;
}
.log-header {
cursor: pointer;
}
.log-header:hover .expand-toggle {
color: var(--socklog-toggle-hover-color, #333);
}
.expand-toggle {
user-select: none;
color: var(--socklog-toggle-color, #666);
font-size: 10px;
}
.timestamp {
color: var(--socklog-timestamp-color, #666);
font-size: 11px;
margin-bottom: 2px;
}

@@ -83,3 +117,11 @@

}
`;T([D({type:String})],exports.SocklogViewer.prototype,"url",2);T([D({type:Number})],exports.SocklogViewer.prototype,"maxLogs",2);T([j()],exports.SocklogViewer.prototype,"logs",2);T([j()],exports.SocklogViewer.prototype,"status",2);exports.SocklogViewer=T([pt("socklog-viewer")],exports.SocklogViewer);var Dt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,V=(o,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i};exports.SocklogControls=class extends A{constructor(){super(...arguments),this.store=null,this.searchValue="",this.paused=!1}connectedCallback(){super.connectedCallback(),this.setupStoreListeners()}updated(t){t.has("store")&&this.setupStoreListeners()}setupStoreListeners(){this.store&&this.store.addEventListener("pausechange",(t=>{this.paused=t.detail}))}handleSearch(t){const e=t.target;this.searchValue=e.value,this.updateFilter()}updateFilter(){if(!this.store)return;const t={};this.searchValue&&(t.search=this.searchValue),this.store.filter=t}togglePause(){this.store&&(this.store.paused=!this.store.paused)}clear(){var t;(t=this.store)==null||t.clear()}render(){return N`
.json-key {
color: var(--socklog-key-color, #5c7cba);
}
.search-highlight {
background-color: var(--socklog-highlight-bg, #fff3cd);
}
`;_([H({type:String})],exports.SocklogViewer.prototype,"url",2);_([H({type:Number})],exports.SocklogViewer.prototype,"maxLogs",2);_([H({type:Number})],exports.SocklogViewer.prototype,"indent",2);_([x()],exports.SocklogViewer.prototype,"logs",2);_([x()],exports.SocklogViewer.prototype,"status",2);_([x()],exports.SocklogViewer.prototype,"searchTerm",2);_([x()],exports.SocklogViewer.prototype,"expandedIds",2);exports.SocklogViewer=_([ft("socklog-viewer")],exports.SocklogViewer);var Wt=Object.defineProperty,qt=Object.getOwnPropertyDescriptor,j=(o,t,e,s)=>{for(var i=s>1?void 0:s?qt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Wt(t,e,i),i};exports.SocklogControls=class extends E{constructor(){super(...arguments),this.store=null,this.searchValue="",this.paused=!1}connectedCallback(){super.connectedCallback(),this.setupStoreListeners()}updated(t){t.has("store")&&this.setupStoreListeners()}setupStoreListeners(){this.store&&this.store.addEventListener("pausechange",(t=>{this.paused=t.detail}))}handleSearch(t){const e=t.target;this.searchValue=e.value,this.updateFilter()}updateFilter(){if(!this.store)return;const t={};this.searchValue&&(t.search=this.searchValue),this.store.filter=t}togglePause(){this.store&&(this.store.paused=!this.store.paused)}clear(){var t;(t=this.store)==null||t.clear()}render(){return R`
<div class="controls-inner">

@@ -102,3 +144,3 @@ <div class="search-container">

</div>
`}};exports.SocklogControls.styles=ct`
`}};exports.SocklogControls.styles=ht`
:host {

@@ -176,3 +218,3 @@ display: block;

}
`;V([D({attribute:!1})],exports.SocklogControls.prototype,"store",2);V([j()],exports.SocklogControls.prototype,"searchValue",2);V([j()],exports.SocklogControls.prototype,"paused",2);exports.SocklogControls=V([pt("socklog-controls")],exports.SocklogControls);exports.LogStore=ft;exports.WebSocketClient=gt;
`;j([H({attribute:!1})],exports.SocklogControls.prototype,"store",2);j([x()],exports.SocklogControls.prototype,"searchValue",2);j([x()],exports.SocklogControls.prototype,"paused",2);exports.SocklogControls=j([ft("socklog-controls")],exports.SocklogControls);exports.LogStore=_t;exports.WebSocketClient=$t;
//# sourceMappingURL=socklog.cjs.map

@@ -6,6 +6,6 @@ /**

*/
const R = globalThis, K = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), X = /* @__PURE__ */ new WeakMap();
let ct = class {
const I = globalThis, Z = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, G = Symbol(), Y = /* @__PURE__ */ new WeakMap();
let dt = class {
constructor(t, e, s) {
if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
if (this._$cssResult$ = !0, s !== G) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
this.cssText = t, this.t = e;

@@ -16,5 +16,5 @@ }

const e = this.t;
if (K && t === void 0) {
if (Z && t === void 0) {
const s = e !== void 0 && e.length === 1;
s && (t = X.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && X.set(e, t));
s && (t = Y.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Y.set(e, t));
}

@@ -27,3 +27,3 @@ return t;

};
const $t = (r) => new ct(typeof r == "string" ? r : r + "", void 0, Z), lt = (r, ...t) => {
const mt = (r) => new dt(typeof r == "string" ? r : r + "", void 0, G), pt = (r, ...t) => {
const e = r.length === 1 ? r[0] : t.reduce(((s, i, n) => s + ((o) => {

@@ -34,13 +34,13 @@ if (o._$cssResult$ === !0) return o.cssText;

})(i) + r[n + 1]), r[0]);
return new ct(e, r, Z);
}, _t = (r, t) => {
if (K) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
return new dt(e, r, G);
}, vt = (r, t) => {
if (Z) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
else for (const e of t) {
const s = document.createElement("style"), i = R.litNonce;
const s = document.createElement("style"), i = I.litNonce;
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
}
}, Y = K ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
}, tt = Z ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
let e = "";
for (const s of t.cssRules) e += s.cssText;
return $t(e);
return mt(e);
})(r) : r;

@@ -52,3 +52,3 @@ /**

*/
const { is: mt, defineProperty: vt, getOwnPropertyDescriptor: yt, getOwnPropertyNames: bt, getOwnPropertySymbols: At, getPrototypeOf: Et } = Object, $ = globalThis, tt = $.trustedTypes, St = tt ? tt.emptyScript : "", W = $.reactiveElementPolyfillSupport, P = (r, t) => r, z = { toAttribute(r, t) {
const { is: yt, defineProperty: bt, getOwnPropertyDescriptor: At, getOwnPropertyNames: Et, getOwnPropertySymbols: xt, getPrototypeOf: wt } = Object, _ = globalThis, et = _.trustedTypes, St = et ? et.emptyScript : "", W = _.reactiveElementPolyfillSupport, O = (r, t) => r, D = { toAttribute(r, t) {
switch (t) {

@@ -81,5 +81,5 @@ case Boolean:

return e;
} }, G = (r, t) => !mt(r, t), et = { attribute: !0, type: String, converter: z, reflect: !1, useDefault: !1, hasChanged: G };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
let A = class extends HTMLElement {
} }, Q = (r, t) => !yt(r, t), st = { attribute: !0, type: String, converter: D, reflect: !1, useDefault: !1, hasChanged: Q };
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
let x = class extends HTMLElement {
static addInitializer(t) {

@@ -91,10 +91,10 @@ this._$Ei(), (this.l ?? (this.l = [])).push(t);

}
static createProperty(t, e = et) {
static createProperty(t, e = st) {
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
i !== void 0 && vt(this.prototype, t, i);
i !== void 0 && bt(this.prototype, t, i);
}
}
static getPropertyDescriptor(t, e, s) {
const { get: i, set: n } = yt(this.prototype, t) ?? { get() {
const { get: i, set: n } = At(this.prototype, t) ?? { get() {
return this[e];

@@ -110,13 +110,13 @@ }, set(o) {

static getPropertyOptions(t) {
return this.elementProperties.get(t) ?? et;
return this.elementProperties.get(t) ?? st;
}
static _$Ei() {
if (this.hasOwnProperty(P("elementProperties"))) return;
const t = Et(this);
if (this.hasOwnProperty(O("elementProperties"))) return;
const t = wt(this);
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
}
static finalize() {
if (this.hasOwnProperty(P("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
const e = this.properties, s = [...bt(e), ...At(e)];
if (this.hasOwnProperty(O("finalized"))) return;
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
const e = this.properties, s = [...Et(e), ...xt(e)];
for (const i of s) this.createProperty(i, e[i]);

@@ -140,4 +140,4 @@ }

const s = new Set(t.flat(1 / 0).reverse());
for (const i of s) e.unshift(Y(i));
} else t !== void 0 && e.push(Y(t));
for (const i of s) e.unshift(tt(i));
} else t !== void 0 && e.push(tt(t));
return e;

@@ -171,3 +171,3 @@ }

const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
return _t(t, this.constructor.elementStyles), t;
return vt(t, this.constructor.elementStyles), t;
}

@@ -197,3 +197,3 @@ connectedCallback() {

if (i !== void 0 && s.reflect === !0) {
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : z).toAttribute(e, s.type);
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : D).toAttribute(e, s.type);
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;

@@ -206,6 +206,6 @@ }

if (i !== void 0 && this._$Em !== i) {
const h = s.getPropertyOptions(i), a = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((n = h.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? h.converter : z;
const h = s.getPropertyOptions(i), a = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((n = h.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? h.converter : D;
this._$Em = i;
const l = a.fromAttribute(e, h.type);
this[i] = l ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? l, this._$Em = null;
const c = a.fromAttribute(e, h.type);
this[i] = c ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? c, this._$Em = null;
}

@@ -217,3 +217,3 @@ }

const n = this.constructor, o = this[t];
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? G)(o, e) || s.useDefault && s.reflect && o === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? Q)(o, e) || s.useDefault && s.reflect && o === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
this.C(t, e, s);

@@ -294,3 +294,3 @@ }

};
A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[P("elementProperties")] = /* @__PURE__ */ new Map(), A[P("finalized")] = /* @__PURE__ */ new Map(), W == null || W({ ReactiveElement: A }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.1.1");
x.elementStyles = [], x.shadowRootOptions = { mode: "open" }, x[O("elementProperties")] = /* @__PURE__ */ new Map(), x[O("finalized")] = /* @__PURE__ */ new Map(), W == null || W({ ReactiveElement: x }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.1.1");
/**

@@ -301,22 +301,22 @@ * @license

*/
const k = globalThis, D = k.trustedTypes, st = D ? D.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, dt = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + f, wt = `<${ut}>`, y = document, O = () => y.createComment(""), U = (r) => r === null || typeof r != "object" && typeof r != "function", Q = Array.isArray, xt = (r) => Q(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", F = `[
\f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, rt = />/g, _ = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), ot = /'/g, nt = /"/g, pt = /^(?:script|style|textarea|title)$/i, Ct = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), L = Ct(1), S = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), m = y.createTreeWalker(y, 129);
function gt(r, t) {
if (!Q(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
return st !== void 0 ? st.createHTML(t) : t;
const T = globalThis, j = T.trustedTypes, it = j ? j.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ut = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, gt = "?" + $, Ct = `<${gt}>`, A = document, U = () => A.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", X = Array.isArray, kt = (r) => X(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", q = `[
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, rt = /-->/g, ot = />/g, v = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, at = /"/g, ft = /^(?:script|style|textarea|title)$/i, Pt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), z = Pt(1), E = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), ht = /* @__PURE__ */ new WeakMap(), y = A.createTreeWalker(A, 129);
function $t(r, t) {
if (!X(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
return it !== void 0 ? it.createHTML(t) : t;
}
const Pt = (r, t) => {
const Ot = (r, t) => {
const e = r.length - 1, s = [];
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = C;
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = P;
for (let h = 0; h < e; h++) {
const a = r[h];
let l, u, c = -1, p = 0;
for (; p < a.length && (o.lastIndex = p, u = o.exec(a), u !== null); ) p = o.lastIndex, o === C ? u[1] === "!--" ? o = it : u[1] !== void 0 ? o = rt : u[2] !== void 0 ? (pt.test(u[2]) && (i = RegExp("</" + u[2], "g")), o = _) : u[3] !== void 0 && (o = _) : o === _ ? u[0] === ">" ? (o = i ?? C, c = -1) : u[1] === void 0 ? c = -2 : (c = o.lastIndex - u[2].length, l = u[1], o = u[3] === void 0 ? _ : u[3] === '"' ? nt : ot) : o === nt || o === ot ? o = _ : o === it || o === rt ? o = C : (o = _, i = void 0);
const g = o === _ && r[h + 1].startsWith("/>") ? " " : "";
n += o === C ? a + wt : c >= 0 ? (s.push(l), a.slice(0, c) + dt + a.slice(c) + f + g) : a + f + (c === -2 ? h : g);
let c, p, l = -1, g = 0;
for (; g < a.length && (o.lastIndex = g, p = o.exec(a), p !== null); ) g = o.lastIndex, o === P ? p[1] === "!--" ? o = rt : p[1] !== void 0 ? o = ot : p[2] !== void 0 ? (ft.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = v) : p[3] !== void 0 && (o = v) : o === v ? p[0] === ">" ? (o = i ?? P, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? v : p[3] === '"' ? at : nt) : o === at || o === nt ? o = v : o === rt || o === ot ? o = P : (o = v, i = void 0);
const f = o === v && r[h + 1].startsWith("/>") ? " " : "";
n += o === P ? a + Ct : l >= 0 ? (s.push(c), a.slice(0, l) + ut + a.slice(l) + $ + f) : a + $ + (l === -2 ? h : f);
}
return [gt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
return [$t(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
};
class T {
class H {
constructor({ strings: t, _$litType$: e }, s) {

@@ -326,25 +326,25 @@ let i;

let n = 0, o = 0;
const h = t.length - 1, a = this.parts, [l, u] = Pt(t, e);
if (this.el = T.createElement(l, s), m.currentNode = this.el.content, e === 2 || e === 3) {
const c = this.el.content.firstChild;
c.replaceWith(...c.childNodes);
const h = t.length - 1, a = this.parts, [c, p] = Ot(t, e);
if (this.el = H.createElement(c, s), y.currentNode = this.el.content, e === 2 || e === 3) {
const l = this.el.content.firstChild;
l.replaceWith(...l.childNodes);
}
for (; (i = m.nextNode()) !== null && a.length < h; ) {
for (; (i = y.nextNode()) !== null && a.length < h; ) {
if (i.nodeType === 1) {
if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(dt)) {
const p = u[o++], g = i.getAttribute(c).split(f), N = /([.?@])?(.*)/.exec(p);
a.push({ type: 1, index: n, name: N[2], strings: g, ctor: N[1] === "." ? Ot : N[1] === "?" ? Ut : N[1] === "@" ? Tt : j }), i.removeAttribute(c);
} else c.startsWith(f) && (a.push({ type: 6, index: n }), i.removeAttribute(c));
if (pt.test(i.tagName)) {
const c = i.textContent.split(f), p = c.length - 1;
if (p > 0) {
i.textContent = D ? D.emptyScript : "";
for (let g = 0; g < p; g++) i.append(c[g], O()), m.nextNode(), a.push({ type: 2, index: ++n });
i.append(c[p], O());
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(ut)) {
const g = p[o++], f = i.getAttribute(l).split($), L = /([.?@])?(.*)/.exec(g);
a.push({ type: 1, index: n, name: L[2], strings: f, ctor: L[1] === "." ? Ut : L[1] === "?" ? Mt : L[1] === "@" ? Ht : V }), i.removeAttribute(l);
} else l.startsWith($) && (a.push({ type: 6, index: n }), i.removeAttribute(l));
if (ft.test(i.tagName)) {
const l = i.textContent.split($), g = l.length - 1;
if (g > 0) {
i.textContent = j ? j.emptyScript : "";
for (let f = 0; f < g; f++) i.append(l[f], U()), y.nextNode(), a.push({ type: 2, index: ++n });
i.append(l[g], U());
}
}
} else if (i.nodeType === 8) if (i.data === ut) a.push({ type: 2, index: n });
} else if (i.nodeType === 8) if (i.data === gt) a.push({ type: 2, index: n });
else {
let c = -1;
for (; (c = i.data.indexOf(f, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += f.length - 1;
let l = -1;
for (; (l = i.data.indexOf($, l + 1)) !== -1; ) a.push({ type: 7, index: n }), l += $.length - 1;
}

@@ -355,14 +355,14 @@ n++;

static createElement(t, e) {
const s = y.createElement("template");
const s = A.createElement("template");
return s.innerHTML = t, s;
}
}
function w(r, t, e = r, s) {
function S(r, t, e = r, s) {
var o, h;
if (t === S) return t;
if (t === E) return t;
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
const n = U(t) ? void 0 : t._$litDirective$;
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = w(r, i._$AS(r, t.values), i, s)), t;
const n = M(t) ? void 0 : t._$litDirective$;
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
}
class kt {
class Tt {
constructor(t, e) {

@@ -378,13 +378,13 @@ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;

u(t) {
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? y).importNode(e, !0);
m.currentNode = i;
let n = m.nextNode(), o = 0, h = 0, a = s[0];
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
y.currentNode = i;
let n = y.nextNode(), o = 0, h = 0, a = s[0];
for (; a !== void 0; ) {
if (o === a.index) {
let l;
a.type === 2 ? l = new M(n, n.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (l = new Mt(n, this, t)), this._$AV.push(l), a = s[++h];
let c;
a.type === 2 ? c = new N(n, n.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (c = new Nt(n, this, t)), this._$AV.push(c), a = s[++h];
}
o !== (a == null ? void 0 : a.index) && (n = m.nextNode(), o++);
o !== (a == null ? void 0 : a.index) && (n = y.nextNode(), o++);
}
return m.currentNode = y, i;
return y.currentNode = A, i;
}

@@ -396,3 +396,3 @@ p(t) {

}
class M {
class N {
get _$AU() {

@@ -417,3 +417,3 @@ var t;

_$AI(t, e = this) {
t = w(this, t, e), U(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t);
t = S(this, t, e), M(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : kt(t) ? this.k(t) : this._(t);
}

@@ -427,10 +427,10 @@ O(t) {

_(t) {
this._$AH !== d && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(y.createTextNode(t)), this._$AH = t;
this._$AH !== d && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
}
$(t) {
var n;
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = T.createElement(gt(s.h, s.h[0]), this.options)), s);
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement($t(s.h, s.h[0]), this.options)), s);
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
else {
const o = new kt(i, this), h = o.u(this.options);
const o = new Tt(i, this), h = o.u(this.options);
o.p(e), this.T(h), this._$AH = o;

@@ -440,10 +440,10 @@ }

_$AC(t) {
let e = at.get(t.strings);
return e === void 0 && at.set(t.strings, e = new T(t)), e;
let e = ht.get(t.strings);
return e === void 0 && ht.set(t.strings, e = new H(t)), e;
}
k(t) {
Q(this._$AH) || (this._$AH = [], this._$AR());
X(this._$AH) || (this._$AH = [], this._$AR());
const e = this._$AH;
let s, i = 0;
for (const n of t) i === e.length ? e.push(s = new M(this.O(O()), this.O(O()), this, this.options)) : s = e[i], s._$AI(n), i++;
for (const n of t) i === e.length ? e.push(s = new N(this.O(U()), this.O(U()), this, this.options)) : s = e[i], s._$AI(n), i++;
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);

@@ -463,3 +463,3 @@ }

}
class j {
class V {
get tagName() {

@@ -477,7 +477,7 @@ return this.element.tagName;

let o = !1;
if (n === void 0) t = w(this, t, e, 0), o = !U(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
if (n === void 0) t = S(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
else {
const h = t;
let a, l;
for (t = n[0], a = 0; a < n.length - 1; a++) l = w(this, h[s + a], e, a), l === S && (l = this._$AH[a]), o || (o = !U(l) || l !== this._$AH[a]), l === d ? t = d : t !== d && (t += (l ?? "") + n[a + 1]), this._$AH[a] = l;
let a, c;
for (t = n[0], a = 0; a < n.length - 1; a++) c = S(this, h[s + a], e, a), c === E && (c = this._$AH[a]), o || (o = !M(c) || c !== this._$AH[a]), c === d ? t = d : t !== d && (t += (c ?? "") + n[a + 1]), this._$AH[a] = c;
}

@@ -490,3 +490,3 @@ o && !i && this.j(t);

}
class Ot extends j {
class Ut extends V {
constructor() {

@@ -499,3 +499,3 @@ super(...arguments), this.type = 3;

}
class Ut extends j {
class Mt extends V {
constructor() {

@@ -508,3 +508,3 @@ super(...arguments), this.type = 4;

}
class Tt extends j {
class Ht extends V {
constructor(t, e, s, i, n) {

@@ -514,3 +514,3 @@ super(t, e, s, i, n), this.type = 5;

_$AI(t, e = this) {
if ((t = w(this, t, e, 0) ?? d) === S) return;
if ((t = S(this, t, e, 0) ?? d) === E) return;
const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || i);

@@ -524,3 +524,3 @@ i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;

}
class Mt {
class Nt {
constructor(t, e, s) {

@@ -533,8 +533,8 @@ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;

_$AI(t) {
w(this, t);
S(this, t);
}
}
const q = k.litHtmlPolyfillSupport;
q == null || q(T, M), (k.litHtmlVersions ?? (k.litHtmlVersions = [])).push("3.3.1");
const Ht = (r, t, e) => {
const F = T.litHtmlPolyfillSupport;
F == null || F(H, N), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.3.1");
const Rt = (r, t, e) => {
const s = (e == null ? void 0 : e.renderBefore) ?? t;

@@ -544,3 +544,3 @@ let i = s._$litPart$;

const n = (e == null ? void 0 : e.renderBefore) ?? null;
s._$litPart$ = i = new M(t.insertBefore(O(), n), n, void 0, e ?? {});
s._$litPart$ = i = new N(t.insertBefore(U(), n), n, void 0, e ?? {});
}

@@ -554,4 +554,4 @@ return i._$AI(r), i;

*/
const v = globalThis;
class E extends A {
const b = globalThis;
let w = class extends x {
constructor() {

@@ -567,3 +567,3 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;

const e = this.render();
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ht(e, this.renderRoot, this.renderOptions);
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Rt(e, this.renderRoot, this.renderOptions);
}

@@ -579,10 +579,10 @@ connectedCallback() {

render() {
return S;
return E;
}
}
var ht;
E._$litElement$ = !0, E.finalized = !0, (ht = v.litElementHydrateSupport) == null || ht.call(v, { LitElement: E });
const J = v.litElementPolyfillSupport;
J == null || J({ LitElement: E });
(v.litElementVersions ?? (v.litElementVersions = [])).push("4.2.1");
};
var lt;
w._$litElement$ = !0, w.finalized = !0, (lt = b.litElementHydrateSupport) == null || lt.call(b, { LitElement: w });
const J = b.litElementPolyfillSupport;
J == null || J({ LitElement: w });
(b.litElementVersions ?? (b.litElementVersions = [])).push("4.2.1");
/**

@@ -593,3 +593,3 @@ * @license

*/
const ft = (r) => (t, e) => {
const _t = (r) => (t, e) => {
e !== void 0 ? e.addInitializer((() => {

@@ -604,3 +604,3 @@ customElements.define(r, t);

*/
const Nt = { attribute: !0, type: String, converter: z, reflect: !1, hasChanged: G }, Rt = (r = Nt, t, e) => {
const Lt = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: Q }, It = (r = Lt, t, e) => {
const { kind: s, metadata: i } = e;

@@ -626,4 +626,4 @@ let n = globalThis.litPropertyMetadata.get(i);

};
function I(r) {
return (t, e) => typeof e == "object" ? Rt(r, t, e) : ((s, i, n) => {
function R(r) {
return (t, e) => typeof e == "object" ? It(r, t, e) : ((s, i, n) => {
const o = i.hasOwnProperty(n);

@@ -638,7 +638,50 @@ return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;

*/
function V(r) {
return I({ ...r, state: !0, attribute: !1 });
function k(r) {
return R({ ...r, state: !0, attribute: !1 });
}
class Lt extends EventTarget {
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const zt = { CHILD: 2 }, Dt = (r) => (...t) => ({ _$litDirective$: r, values: t });
class jt {
constructor(t) {
}
get _$AU() {
return this._$AM._$AU;
}
_$AT(t, e, s) {
this._$Ct = t, this._$AM = e, this._$Ci = s;
}
_$AS(t, e) {
return this.update(t, e);
}
update(t, e) {
return this.render(...e);
}
}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
class K extends jt {
constructor(t) {
if (super(t), this.it = d, t.type !== zt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
}
render(t) {
if (t === d || t == null) return this._t = void 0, this.it = t;
if (t === E) return t;
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
if (t === this.it) return this._t;
this.it = t;
const e = [t];
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
}
}
K.directiveName = "unsafeHTML", K.resultType = 1;
const ct = Dt(K);
class Vt extends EventTarget {
constructor(t) {
super(), this.ws = null, this.reconnectAttempts = 0, this._status = "disconnected", this.config = {

@@ -697,3 +740,3 @@ reconnect: !0,

}
class zt extends EventTarget {
class Bt extends EventTarget {
constructor(t = 1e3) {

@@ -738,10 +781,10 @@ super(), this.logs = [], this._filter = {}, this._paused = !1, this.maxLogs = t;

}
var Dt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, H = (r, t, e, s) => {
for (var i = s > 1 ? void 0 : s ? jt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
var Wt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, m = (r, t, e, s) => {
for (var i = s > 1 ? void 0 : s ? qt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
return s && i && Dt(t, e, i), i;
return s && i && Wt(t, e, i), i;
};
let b = class extends E {
let u = class extends w {
constructor() {
super(...arguments), this.url = "", this.maxLogs = 1e3, this.logs = [], this.status = "disconnected", this.client = null, this.store = null;
super(...arguments), this.url = "", this.maxLogs = 1e3, this.indent = 4, this.logs = [], this.status = "disconnected", this.searchTerm = "", this.expandedIds = /* @__PURE__ */ new Set(), this.client = null, this.store = null;
}

@@ -756,8 +799,8 @@ connectedCallback() {

initializeStore() {
this.store = new zt(this.maxLogs), this.store.addEventListener("logadded", () => {
this.store = new Bt(this.maxLogs), this.store.addEventListener("logadded", () => {
var r;
this.logs = ((r = this.store) == null ? void 0 : r.getFiltered()) ?? [];
}), this.store.addEventListener("filterchange", () => {
var r;
this.logs = ((r = this.store) == null ? void 0 : r.getFiltered()) ?? [];
var r, t;
this.logs = ((r = this.store) == null ? void 0 : r.getFiltered()) ?? [], this.searchTerm = ((t = this.store) == null ? void 0 : t.filter.search) ?? "";
}), this.store.addEventListener("logscleared", () => {

@@ -768,3 +811,3 @@ this.logs = [];

connect() {
this.url && (this.client = new Lt({ url: this.url }), this.client.addEventListener("statuschange", ((r) => {
this.url && (this.client = new Vt({ url: this.url }), this.client.addEventListener("statuschange", ((r) => {
this.status = r.detail;

@@ -783,2 +826,5 @@ })), this.client.addEventListener("log", ((r) => {

}
toggleExpanded(r) {
this.expandedIds.has(r) ? this.expandedIds.delete(r) : this.expandedIds.add(r), this.expandedIds = new Set(this.expandedIds);
}
formatTimestamp(r) {

@@ -793,7 +839,19 @@ return r.toLocaleTimeString("en-US", {

}
formatJson(r) {
return typeof r == "string" ? r : JSON.stringify(r, null, 2);
formatJson(r, t = !1) {
let e;
typeof r == "string" ? e = r : e = t ? JSON.stringify(r, null, this.indent) : JSON.stringify(r);
const i = e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
/(&quot;|")([^"\\]|\\.)*?\1(?=\s*:)/g,
'<span class="json-key">$&</span>'
);
if (!this.searchTerm)
return ct(i);
const n = this.searchTerm.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), o = new RegExp(`(${n})`, "gi"), h = i.replace(
/(<[^>]*>)|([^<]+)/g,
(a, c, p) => c || p.replace(o, '<span class="search-highlight">$1</span>')
);
return ct(h);
}
render() {
return this.logs.length === 0 ? L`
return this.logs.length === 0 ? z`
<div class="log-container">

@@ -804,9 +862,15 @@ <div class="empty-state">

</div>
` : L`
` : z`
<div class="log-container">
${this.logs.map(
(r) => L`
(r) => z`
<div class="log-entry">
<div class="timestamp">${this.formatTimestamp(r.timestamp)}</div>
<div class="json">${this.formatJson(r.data)}</div>
<div class="log-header"
@click=${() => this.toggleExpanded(r.id)}>
<span class="expand-toggle">
${this.expandedIds.has(r.id) ? "⏷" : "⏵"}
</span>
<span class="timestamp">${this.formatTimestamp(r.timestamp)}</span>
</div>
<div class="json">${this.formatJson(r.data, this.expandedIds.has(r.id))}</div>
</div>

@@ -819,3 +883,3 @@ `

};
b.styles = lt`
u.styles = pt`
:host {

@@ -839,6 +903,26 @@ display: block;

.log-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 2px;
}
.log-header {
cursor: pointer;
}
.log-header:hover .expand-toggle {
color: var(--socklog-toggle-hover-color, #333);
}
.expand-toggle {
user-select: none;
color: var(--socklog-toggle-color, #666);
font-size: 10px;
}
.timestamp {
color: var(--socklog-timestamp-color, #666);
font-size: 11px;
margin-bottom: 2px;
}

@@ -855,24 +939,41 @@

}
.json-key {
color: var(--socklog-key-color, #5c7cba);
}
.search-highlight {
background-color: var(--socklog-highlight-bg, #fff3cd);
}
`;
H([
I({ type: String })
], b.prototype, "url", 2);
H([
I({ type: Number })
], b.prototype, "maxLogs", 2);
H([
V()
], b.prototype, "logs", 2);
H([
V()
], b.prototype, "status", 2);
b = H([
ft("socklog-viewer")
], b);
var It = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, B = (r, t, e, s) => {
for (var i = s > 1 ? void 0 : s ? Vt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
m([
R({ type: String })
], u.prototype, "url", 2);
m([
R({ type: Number })
], u.prototype, "maxLogs", 2);
m([
R({ type: Number })
], u.prototype, "indent", 2);
m([
k()
], u.prototype, "logs", 2);
m([
k()
], u.prototype, "status", 2);
m([
k()
], u.prototype, "searchTerm", 2);
m([
k()
], u.prototype, "expandedIds", 2);
u = m([
_t("socklog-viewer")
], u);
var Ft = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, B = (r, t, e, s) => {
for (var i = s > 1 ? void 0 : s ? Jt(t, e) : t, n = r.length - 1, o; n >= 0; n--)
(o = r[n]) && (i = (s ? o(t, e, i) : o(i)) || i);
return s && i && It(t, e, i), i;
return s && i && Ft(t, e, i), i;
};
let x = class extends E {
let C = class extends w {
constructor() {

@@ -909,3 +1010,3 @@ super(...arguments), this.store = null, this.searchValue = "", this.paused = !1;

render() {
return L`
return z`
<div class="controls-inner">

@@ -931,3 +1032,3 @@ <div class="search-container">

};
x.styles = lt`
C.styles = pt`
:host {

@@ -1007,19 +1108,19 @@ display: block;

B([
I({ attribute: !1 })
], x.prototype, "store", 2);
R({ attribute: !1 })
], C.prototype, "store", 2);
B([
V()
], x.prototype, "searchValue", 2);
k()
], C.prototype, "searchValue", 2);
B([
V()
], x.prototype, "paused", 2);
x = B([
ft("socklog-controls")
], x);
k()
], C.prototype, "paused", 2);
C = B([
_t("socklog-controls")
], C);
export {
zt as LogStore,
x as SocklogControls,
b as SocklogViewer,
Lt as WebSocketClient
Bt as LogStore,
C as SocklogControls,
u as SocklogViewer,
Vt as WebSocketClient
};
//# sourceMappingURL=socklog.js.map

@@ -5,29 +5,37 @@ (function(h,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(h=typeof globalThis<"u"?globalThis:h||self,f(h.Socklog={}))})(this,(function(h){"use strict";/**

* SPDX-License-Identifier: BSD-3-Clause
*/var $t;const f=globalThis,B=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),Q=new WeakMap;let X=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Q.set(e,t))}return t}toString(){return this.cssText}};const _t=o=>new X(typeof o=="string"?o:o+"",void 0,W),Y=(o,...t)=>{const e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new X(e,o,W)},mt=(o,t)=>{if(B)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),i=f.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},tt=B?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return _t(e)})(o):o;/**
*/var mt;const f=globalThis,B=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),X=new WeakMap;let Y=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=X.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&X.set(e,t))}return t}toString(){return this.cssText}};const vt=o=>new Y(typeof o=="string"?o:o+"",void 0,W),tt=(o,...t)=>{const e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new Y(e,o,W)},yt=(o,t)=>{if(B)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const e of t){const s=document.createElement("style"),i=f.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},et=B?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return vt(e)})(o):o;/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:vt,defineProperty:yt,getOwnPropertyDescriptor:bt,getOwnPropertyNames:At,getOwnPropertySymbols:St,getPrototypeOf:Et}=Object,$=globalThis,et=$.trustedTypes,wt=et?et.emptyScript:"",F=$.reactiveElementPolyfillSupport,k=(o,t)=>o,N={toAttribute(o,t){switch(t){case Boolean:o=o?wt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},q=(o,t)=>!vt(o,t),st={attribute:!0,type:String,converter:N,reflect:!1,useDefault:!1,hasChanged:q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);let S=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&yt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=bt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){const c=i==null?void 0:i.call(this);n==null||n.call(this,r),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??st}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const t=Et(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,s=[...At(e),...St(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(tt(i))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:N).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((n=c.converter)==null?void 0:n.fromAttribute)!==void 0?c.converter:N;this._$Em=i;const d=a.fromAttribute(e,c.type);this[i]=d??((r=this._$Ej)==null?void 0:r.get(i))??d,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,r=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??q)(r,e)||s.useDefault&&s.reflect&&r===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i){const{wrapped:c}=r,a=this[n];c!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[k("elementProperties")]=new Map,S[k("finalized")]=new Map,F==null||F({ReactiveElement:S}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.1.1");/**
*/const{is:bt,defineProperty:At,getOwnPropertyDescriptor:St,getOwnPropertyNames:Et,getOwnPropertySymbols:wt,getPrototypeOf:xt}=Object,$=globalThis,st=$.trustedTypes,kt=st?st.emptyScript:"",q=$.reactiveElementPolyfillSupport,P=(o,t)=>o,R={toAttribute(o,t){switch(t){case Boolean:o=o?kt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},F=(o,t)=>!bt(o,t),it={attribute:!0,type:String,converter:R,reflect:!1,useDefault:!1,hasChanged:F};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);let w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=it){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&At(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=St(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:i,set(r){const c=i==null?void 0:i.call(this);n==null||n.call(this,r),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??it}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const t=xt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const e=this.properties,s=[...Et(e),...wt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(et(i))}else t!==void 0&&e.push(et(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const c=s.getPropertyOptions(i),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((n=c.converter)==null?void 0:n.fromAttribute)!==void 0?c.converter:R;this._$Em=i;const d=a.fromAttribute(e,c.type);this[i]=d??((r=this._$Ej)==null?void 0:r.get(i))??d,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,r=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??F)(r,e)||s.useDefault&&s.reflect&&r===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i){const{wrapped:c}=r,a=this[n];c!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach((i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)})),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[P("elementProperties")]=new Map,w[P("finalized")]=new Map,q==null||q({ReactiveElement:w}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.1.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const x=globalThis,R=x.trustedTypes,it=R?R.createPolicy("lit-html",{createHTML:o=>o}):void 0,ot="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,rt="?"+_,Ct=`<${rt}>`,v=document,P=()=>v.createComment(""),O=o=>o===null||typeof o!="object"&&typeof o!="function",J=Array.isArray,kt=o=>J(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",K=`[
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,at=/>/g,y=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),ct=/'/g,lt=/"/g,ht=/^(?:script|style|textarea|title)$/i,xt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),L=xt(1),E=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),dt=new WeakMap,b=v.createTreeWalker(v,129);function ut(o,t){if(!J(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return it!==void 0?it.createHTML(t):t}const Pt=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",r=U;for(let c=0;c<e;c++){const a=o[c];let d,p,l=-1,g=0;for(;g<a.length&&(r.lastIndex=g,p=r.exec(a),p!==null);)g=r.lastIndex,r===U?p[1]==="!--"?r=nt:p[1]!==void 0?r=at:p[2]!==void 0?(ht.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=y):p[3]!==void 0&&(r=y):r===y?p[0]===">"?(r=i??U,l=-1):p[1]===void 0?l=-2:(l=r.lastIndex-p[2].length,d=p[1],r=p[3]===void 0?y:p[3]==='"'?lt:ct):r===lt||r===ct?r=y:r===nt||r===at?r=U:(r=y,i=void 0);const m=r===y&&o[c+1].startsWith("/>")?" ":"";n+=r===U?a+Ct:l>=0?(s.push(d),a.slice(0,l)+ot+a.slice(l)+_+m):a+_+(l===-2?c:m)}return[ut(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class T{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const c=t.length-1,a=this.parts,[d,p]=Pt(t,e);if(this.el=T.createElement(d,s),b.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=b.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(ot)){const g=p[r++],m=i.getAttribute(l).split(_),I=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:I[2],strings:m,ctor:I[1]==="."?Ut:I[1]==="?"?Tt:I[1]==="@"?Mt:z}),i.removeAttribute(l)}else l.startsWith(_)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(ht.test(i.tagName)){const l=i.textContent.split(_),g=l.length-1;if(g>0){i.textContent=R?R.emptyScript:"";for(let m=0;m<g;m++)i.append(l[m],P()),b.nextNode(),a.push({type:2,index:++n});i.append(l[g],P())}}}else if(i.nodeType===8)if(i.data===rt)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)a.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const s=v.createElement("template");return s.innerHTML=t,s}}function w(o,t,e=o,s){var r,c;if(t===E)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const n=O(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=w(o,i._$AS(o,t.values),i,s)),t}class Ot{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??v).importNode(e,!0);b.currentNode=i;let n=b.nextNode(),r=0,c=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new M(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Ht(n,this,t)),this._$AV.push(d),a=s[++c]}r!==(a==null?void 0:a.index)&&(n=b.nextNode(),r++)}return b.currentNode=v,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class M{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),O(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=T.createElement(ut(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const r=new Ot(i,this),c=r.u(this.options);r.p(e),this.T(c),this._$AH=r}}_$AC(t){let e=dt.get(t.strings);return e===void 0&&dt.set(t.strings,e=new T(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new M(this.O(P()),this.O(P()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class z{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=w(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=w(this,c[s+a],e,a),d===E&&(d=this._$AH[a]),r||(r=!O(d)||d!==this._$AH[a]),d===u?t=u:t!==u&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ut extends z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}class Tt extends z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class Mt extends z{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??u)===E)return;const s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Ht{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}}const Z=x.litHtmlPolyfillSupport;Z==null||Z(T,M),(x.litHtmlVersions??(x.litHtmlVersions=[])).push("3.3.1");const Nt=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new M(t.insertBefore(P(),n),n,void 0,e??{})}return i._$AI(o),i};/**
*/const T=globalThis,I=T.trustedTypes,ot=I?I.createPolicy("lit-html",{createHTML:o=>o}):void 0,rt="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,nt="?"+_,Ct=`<${nt}>`,y=document,O=()=>y.createComment(""),U=o=>o===null||typeof o!="object"&&typeof o!="function",J=Array.isArray,Pt=o=>J(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",K=`[
\f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,ct=/>/g,b=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),lt=/'/g,ht=/"/g,dt=/^(?:script|style|textarea|title)$/i,Tt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),z=Tt(1),A=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ut=new WeakMap,S=y.createTreeWalker(y,129);function pt(o,t){if(!J(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ot!==void 0?ot.createHTML(t):t}const Ot=(o,t)=>{const e=o.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",r=M;for(let c=0;c<e;c++){const a=o[c];let d,p,l=-1,g=0;for(;g<a.length&&(r.lastIndex=g,p=r.exec(a),p!==null);)g=r.lastIndex,r===M?p[1]==="!--"?r=at:p[1]!==void 0?r=ct:p[2]!==void 0?(dt.test(p[2])&&(i=RegExp("</"+p[2],"g")),r=b):p[3]!==void 0&&(r=b):r===b?p[0]===">"?(r=i??M,l=-1):p[1]===void 0?l=-2:(l=r.lastIndex-p[2].length,d=p[1],r=p[3]===void 0?b:p[3]==='"'?ht:lt):r===ht||r===lt?r=b:r===at||r===ct?r=M:(r=b,i=void 0);const v=r===b&&o[c+1].startsWith("/>")?" ":"";n+=r===M?a+Ct:l>=0?(s.push(d),a.slice(0,l)+rt+a.slice(l)+_+v):a+_+(l===-2?c:v)}return[pt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0;const c=t.length-1,a=this.parts,[d,p]=Ot(t,e);if(this.el=H.createElement(d,s),S.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=S.nextNode())!==null&&a.length<c;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(rt)){const g=p[r++],v=i.getAttribute(l).split(_),V=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:V[2],strings:v,ctor:V[1]==="."?Mt:V[1]==="?"?Ht:V[1]==="@"?Nt:j}),i.removeAttribute(l)}else l.startsWith(_)&&(a.push({type:6,index:n}),i.removeAttribute(l));if(dt.test(i.tagName)){const l=i.textContent.split(_),g=l.length-1;if(g>0){i.textContent=I?I.emptyScript:"";for(let v=0;v<g;v++)i.append(l[v],O()),S.nextNode(),a.push({type:2,index:++n});i.append(l[g],O())}}}else if(i.nodeType===8)if(i.data===nt)a.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)a.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const s=y.createElement("template");return s.innerHTML=t,s}}function x(o,t,e=o,s){var r,c;if(t===A)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl;const n=U(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((c=i==null?void 0:i._$AO)==null||c.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=x(o,i._$AS(o,t.values),i,s)),t}class Ut{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??y).importNode(e,!0);S.currentNode=i;let n=S.nextNode(),r=0,c=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new N(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Lt(n,this,t)),this._$AV.push(d),a=s[++c]}r!==(a==null?void 0:a.index)&&(n=S.nextNode(),r++)}return S.currentNode=y,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class N{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=x(this,t,e),U(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(pt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const r=new Ut(i,this),c=r.u(this.options);r.p(e),this.T(c),this._$AH=r}}_$AC(t){let e=ut.get(t.strings);return e===void 0&&ut.set(t.strings,e=new H(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new N(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class j{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){const n=this.strings;let r=!1;if(n===void 0)t=x(this,t,e,0),r=!U(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{const c=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=x(this,c[s+a],e,a),d===A&&(d=this._$AH[a]),r||(r=!U(d)||d!==this._$AH[a]),d===u?t=u:t!==u&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mt extends j{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}class Ht extends j{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class Nt extends j{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??u)===A)return;const s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Lt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}}const Z=T.litHtmlPolyfillSupport;Z==null||Z(H,N),(T.litHtmlVersions??(T.litHtmlVersions=[])).push("3.3.1");const Rt=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new N(t.insertBefore(O(),n),n,void 0,e??{})}return i._$AI(o),i};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const A=globalThis;class C extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Nt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}}C._$litElement$=!0,C.finalized=!0,($t=A.litElementHydrateSupport)==null||$t.call(A,{LitElement:C});const G=A.litElementPolyfillSupport;G==null||G({LitElement:C}),(A.litElementVersions??(A.litElementVersions=[])).push("4.2.1");/**
*/const E=globalThis;let k=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Rt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return A}};k._$litElement$=!0,k.finalized=!0,(mt=E.litElementHydrateSupport)==null||mt.call(E,{LitElement:k});const G=E.litElementPolyfillSupport;G==null||G({LitElement:k}),(E.litElementVersions??(E.litElementVersions=[])).push("4.2.1");/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const pt=o=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(o,t)})):customElements.define(o,t)};/**
*/const gt=o=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(o,t)})):customElements.define(o,t)};/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const Rt={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:q},Lt=(o=Rt,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),s==="accessor"){const{name:r}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(r,a,o)},init(c){return c!==void 0&&this.C(r,void 0,o,c),c}}}if(s==="setter"){const{name:r}=e;return function(c){const a=this[r];t.call(this,c),this.requestUpdate(r,a,o)}}throw Error("Unsupported decorator location: "+s)};function j(o){return(t,e)=>typeof e=="object"?Lt(o,t,e):((s,i,n)=>{const r=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}/**
*/const It={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:F},zt=(o=It,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),s==="accessor"){const{name:r}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(r,a,o)},init(c){return c!==void 0&&this.C(r,void 0,o,c),c}}}if(s==="setter"){const{name:r}=e;return function(c){const a=this[r];t.call(this,c),this.requestUpdate(r,a,o)}}throw Error("Unsupported decorator location: "+s)};function L(o){return(t,e)=>typeof e=="object"?zt(o,t,e):((s,i,n)=>{const r=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/function D(o){return j({...o,state:!0,attribute:!1})}class gt extends EventTarget{constructor(t){super(),this.ws=null,this.reconnectAttempts=0,this._status="disconnected",this.config={reconnect:!0,reconnectInterval:3e3,maxReconnectAttempts:10,...t}}get status(){return this._status}connect(){var t;if(((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN){this._status="connecting",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}));try{this.ws=new WebSocket(this.config.url),this.setupEventHandlers()}catch{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))}}}disconnect(){var t;this.reconnectAttempts=this.config.maxReconnectAttempts??10,(t=this.ws)==null||t.close()}setupEventHandlers(){this.ws&&(this.ws.onopen=()=>{this._status="connected",this.reconnectAttempts=0,this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onclose=()=>{this._status="disconnected",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status})),this.attemptReconnect()},this.ws.onerror=()=>{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onmessage=t=>{const e=t.data;let s;try{s=JSON.parse(e)}catch{s=e}const i={id:crypto.randomUUID(),timestamp:new Date,data:s,raw:e};this.dispatchEvent(new CustomEvent("log",{detail:i}))})}attemptReconnect(){this.config.reconnect&&(this.reconnectAttempts>=(this.config.maxReconnectAttempts??10)||(this.reconnectAttempts++,setTimeout(()=>this.connect(),this.config.reconnectInterval)))}}class ft extends EventTarget{constructor(t=1e3){super(),this.logs=[],this._filter={},this._paused=!1,this.maxLogs=t}get filter(){return this._filter}set filter(t){this._filter=t,this.dispatchEvent(new CustomEvent("filterchange",{detail:this._filter}))}get paused(){return this._paused}set paused(t){this._paused=t,this.dispatchEvent(new CustomEvent("pausechange",{detail:this._paused}))}add(t){this._paused||(this.logs.unshift(t),this.logs.length>this.maxLogs&&this.logs.pop(),this.dispatchEvent(new CustomEvent("logadded",{detail:t})))}clear(){this.logs=[],this.dispatchEvent(new CustomEvent("logscleared"))}getAll(){return[...this.logs]}getFiltered(){return this.logs.filter(t=>this.matchesFilter(t))}matchesFilter(t){const{search:e}=this._filter;if(e){const s=e.toLowerCase();return t.raw.toLowerCase().includes(s)}return!0}get count(){return this.logs.length}}var zt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,H=(o,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&zt(t,e,i),i};h.SocklogViewer=class extends C{constructor(){super(...arguments),this.url="",this.maxLogs=1e3,this.logs=[],this.status="disconnected",this.client=null,this.store=null}connectedCallback(){super.connectedCallback(),this.initializeStore(),this.url&&this.connect()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.client)==null||t.disconnect()}initializeStore(){this.store=new ft(this.maxLogs),this.store.addEventListener("logadded",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("filterchange",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("logscleared",()=>{this.logs=[]})}connect(){this.url&&(this.client=new gt({url:this.url}),this.client.addEventListener("statuschange",(t=>{this.status=t.detail})),this.client.addEventListener("log",(t=>{var e;(e=this.store)==null||e.add(t.detail)})),this.client.connect())}clear(){var t;(t=this.store)==null||t.clear()}getStore(){return this.store}formatTimestamp(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}formatJson(t){return typeof t=="string"?t:JSON.stringify(t,null,2)}render(){return this.logs.length===0?L`
*/function C(o){return L({...o,state:!0,attribute:!1})}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const jt={CHILD:2},Dt=o=>(...t)=>({_$litDirective$:o,values:t});class Vt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class Q extends Vt{constructor(t){if(super(t),this.it=u,t.type!==jt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===u||t==null)return this._t=void 0,this.it=t;if(t===A)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Q.directiveName="unsafeHTML",Q.resultType=1;const ft=Dt(Q);class $t extends EventTarget{constructor(t){super(),this.ws=null,this.reconnectAttempts=0,this._status="disconnected",this.config={reconnect:!0,reconnectInterval:3e3,maxReconnectAttempts:10,...t}}get status(){return this._status}connect(){var t;if(((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN){this._status="connecting",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}));try{this.ws=new WebSocket(this.config.url),this.setupEventHandlers()}catch{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))}}}disconnect(){var t;this.reconnectAttempts=this.config.maxReconnectAttempts??10,(t=this.ws)==null||t.close()}setupEventHandlers(){this.ws&&(this.ws.onopen=()=>{this._status="connected",this.reconnectAttempts=0,this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onclose=()=>{this._status="disconnected",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status})),this.attemptReconnect()},this.ws.onerror=()=>{this._status="error",this.dispatchEvent(new CustomEvent("statuschange",{detail:this._status}))},this.ws.onmessage=t=>{const e=t.data;let s;try{s=JSON.parse(e)}catch{s=e}const i={id:crypto.randomUUID(),timestamp:new Date,data:s,raw:e};this.dispatchEvent(new CustomEvent("log",{detail:i}))})}attemptReconnect(){this.config.reconnect&&(this.reconnectAttempts>=(this.config.maxReconnectAttempts??10)||(this.reconnectAttempts++,setTimeout(()=>this.connect(),this.config.reconnectInterval)))}}class _t extends EventTarget{constructor(t=1e3){super(),this.logs=[],this._filter={},this._paused=!1,this.maxLogs=t}get filter(){return this._filter}set filter(t){this._filter=t,this.dispatchEvent(new CustomEvent("filterchange",{detail:this._filter}))}get paused(){return this._paused}set paused(t){this._paused=t,this.dispatchEvent(new CustomEvent("pausechange",{detail:this._paused}))}add(t){this._paused||(this.logs.unshift(t),this.logs.length>this.maxLogs&&this.logs.pop(),this.dispatchEvent(new CustomEvent("logadded",{detail:t})))}clear(){this.logs=[],this.dispatchEvent(new CustomEvent("logscleared"))}getAll(){return[...this.logs]}getFiltered(){return this.logs.filter(t=>this.matchesFilter(t))}matchesFilter(t){const{search:e}=this._filter;if(e){const s=e.toLowerCase();return t.raw.toLowerCase().includes(s)}return!0}get count(){return this.logs.length}}var Bt=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,m=(o,t,e,s)=>{for(var i=s>1?void 0:s?Wt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Bt(t,e,i),i};h.SocklogViewer=class extends k{constructor(){super(...arguments),this.url="",this.maxLogs=1e3,this.indent=4,this.logs=[],this.status="disconnected",this.searchTerm="",this.expandedIds=new Set,this.client=null,this.store=null}connectedCallback(){super.connectedCallback(),this.initializeStore(),this.url&&this.connect()}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.client)==null||t.disconnect()}initializeStore(){this.store=new _t(this.maxLogs),this.store.addEventListener("logadded",()=>{var t;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[]}),this.store.addEventListener("filterchange",()=>{var t,e;this.logs=((t=this.store)==null?void 0:t.getFiltered())??[],this.searchTerm=((e=this.store)==null?void 0:e.filter.search)??""}),this.store.addEventListener("logscleared",()=>{this.logs=[]})}connect(){this.url&&(this.client=new $t({url:this.url}),this.client.addEventListener("statuschange",(t=>{this.status=t.detail})),this.client.addEventListener("log",(t=>{var e;(e=this.store)==null||e.add(t.detail)})),this.client.connect())}clear(){var t;(t=this.store)==null||t.clear()}getStore(){return this.store}toggleExpanded(t){this.expandedIds.has(t)?this.expandedIds.delete(t):this.expandedIds.add(t),this.expandedIds=new Set(this.expandedIds)}formatTimestamp(t){return t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}formatJson(t,e=!1){let s;typeof t=="string"?s=t:s=e?JSON.stringify(t,null,this.indent):JSON.stringify(t);const n=s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(&quot;|")([^"\\]|\\.)*?\1(?=\s*:)/g,'<span class="json-key">$&</span>');if(!this.searchTerm)return ft(n);const r=this.searchTerm.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`(${r})`,"gi"),a=n.replace(/(<[^>]*>)|([^<]+)/g,(d,p,l)=>p||l.replace(c,'<span class="search-highlight">$1</span>'));return ft(a)}render(){return this.logs.length===0?z`
<div class="log-container">

@@ -38,12 +46,18 @@ <div class="empty-state">

</div>
`:L`
`:z`
<div class="log-container">
${this.logs.map(t=>L`
${this.logs.map(t=>z`
<div class="log-entry">
<div class="timestamp">${this.formatTimestamp(t.timestamp)}</div>
<div class="json">${this.formatJson(t.data)}</div>
<div class="log-header"
@click=${()=>this.toggleExpanded(t.id)}>
<span class="expand-toggle">
${this.expandedIds.has(t.id)?"⏷":"⏵"}
</span>
<span class="timestamp">${this.formatTimestamp(t.timestamp)}</span>
</div>
<div class="json">${this.formatJson(t.data,this.expandedIds.has(t.id))}</div>
</div>
`)}
</div>
`}},h.SocklogViewer.styles=Y`
`}},h.SocklogViewer.styles=tt`
:host {

@@ -67,6 +81,26 @@ display: block;

.log-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 2px;
}
.log-header {
cursor: pointer;
}
.log-header:hover .expand-toggle {
color: var(--socklog-toggle-hover-color, #333);
}
.expand-toggle {
user-select: none;
color: var(--socklog-toggle-color, #666);
font-size: 10px;
}
.timestamp {
color: var(--socklog-timestamp-color, #666);
font-size: 11px;
margin-bottom: 2px;
}

@@ -83,3 +117,11 @@

}
`,H([j({type:String})],h.SocklogViewer.prototype,"url",2),H([j({type:Number})],h.SocklogViewer.prototype,"maxLogs",2),H([D()],h.SocklogViewer.prototype,"logs",2),H([D()],h.SocklogViewer.prototype,"status",2),h.SocklogViewer=H([pt("socklog-viewer")],h.SocklogViewer);var Dt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,V=(o,t,e,s)=>{for(var i=s>1?void 0:s?Vt(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i};h.SocklogControls=class extends C{constructor(){super(...arguments),this.store=null,this.searchValue="",this.paused=!1}connectedCallback(){super.connectedCallback(),this.setupStoreListeners()}updated(t){t.has("store")&&this.setupStoreListeners()}setupStoreListeners(){this.store&&this.store.addEventListener("pausechange",(t=>{this.paused=t.detail}))}handleSearch(t){const e=t.target;this.searchValue=e.value,this.updateFilter()}updateFilter(){if(!this.store)return;const t={};this.searchValue&&(t.search=this.searchValue),this.store.filter=t}togglePause(){this.store&&(this.store.paused=!this.store.paused)}clear(){var t;(t=this.store)==null||t.clear()}render(){return L`
.json-key {
color: var(--socklog-key-color, #5c7cba);
}
.search-highlight {
background-color: var(--socklog-highlight-bg, #fff3cd);
}
`,m([L({type:String})],h.SocklogViewer.prototype,"url",2),m([L({type:Number})],h.SocklogViewer.prototype,"maxLogs",2),m([L({type:Number})],h.SocklogViewer.prototype,"indent",2),m([C()],h.SocklogViewer.prototype,"logs",2),m([C()],h.SocklogViewer.prototype,"status",2),m([C()],h.SocklogViewer.prototype,"searchTerm",2),m([C()],h.SocklogViewer.prototype,"expandedIds",2),h.SocklogViewer=m([gt("socklog-viewer")],h.SocklogViewer);var qt=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,D=(o,t,e,s)=>{for(var i=s>1?void 0:s?Ft(t,e):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&qt(t,e,i),i};h.SocklogControls=class extends k{constructor(){super(...arguments),this.store=null,this.searchValue="",this.paused=!1}connectedCallback(){super.connectedCallback(),this.setupStoreListeners()}updated(t){t.has("store")&&this.setupStoreListeners()}setupStoreListeners(){this.store&&this.store.addEventListener("pausechange",(t=>{this.paused=t.detail}))}handleSearch(t){const e=t.target;this.searchValue=e.value,this.updateFilter()}updateFilter(){if(!this.store)return;const t={};this.searchValue&&(t.search=this.searchValue),this.store.filter=t}togglePause(){this.store&&(this.store.paused=!this.store.paused)}clear(){var t;(t=this.store)==null||t.clear()}render(){return z`
<div class="controls-inner">

@@ -102,3 +144,3 @@ <div class="search-container">

</div>
`}},h.SocklogControls.styles=Y`
`}},h.SocklogControls.styles=tt`
:host {

@@ -176,3 +218,3 @@ display: block;

}
`,V([j({attribute:!1})],h.SocklogControls.prototype,"store",2),V([D()],h.SocklogControls.prototype,"searchValue",2),V([D()],h.SocklogControls.prototype,"paused",2),h.SocklogControls=V([pt("socklog-controls")],h.SocklogControls),h.LogStore=ft,h.WebSocketClient=gt,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
`,D([L({attribute:!1})],h.SocklogControls.prototype,"store",2),D([C()],h.SocklogControls.prototype,"searchValue",2),D([C()],h.SocklogControls.prototype,"paused",2),h.SocklogControls=D([gt("socklog-controls")],h.SocklogControls),h.LogStore=_t,h.WebSocketClient=$t,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
//# sourceMappingURL=socklog.umd.js.map
{
"name": "@andrewshell/socklog",
"version": "0.2.0",
"version": "0.2.1",
"description": "WebSocket-based logging web components using Lit",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display