PageSourceSearch

https://www.lyleandscott.com/cdn/shop/t/458/assets/lyle-chat-trigger.js?v=12189274621763312481790072754

js lyleandscott.com collected 2026-09-24 23:00:05 UTC 1,450 bytes, 2 lines download raw bytes

1const CHAT_INIT_TIMEOUT_MS=2e3;class LyleChatTrigger extends HTMLElement{#abortController=null;#button=null;#chat=null;connectedCallback(){this.#button=this.querySelector("[data-chat-trigger]"),this.#button&&(this.#abortController=new AbortController,this.#button.addEventListener("click",this.#handleClick,{signal:this.#abortController.signal}))}disconnectedCallback(){this.#abortController?.abort(),this.#chat&&typeof this.#chat.off=="function"&&(this.#chat.off("widget:opened",this.#handleOpened),this.#chat.off("widget:closed",this.#handleClosed)),this.#chat=null}#handleClick=async()=>{const chat=await this.#getChat();if(chat){if(typeof chat.isOpen=="function"&&chat.isOpen()){chat.close();return}chat.open()}};#handleOpened=()=>{this.#button?.setAttribute("aria-expanded","true")};#handleClosed=()=>{this.#button?.setAttribute("aria-expanded","false")};async#getChat(){const chat=window.GorgiasChat;if(!chat||typeof chat.open!="function")return null;if(this.#chat!==chat&&(this.#chat=chat,typeof chat.on=="function"&&(chat.on("widget:opened",this.#handleOpened),chat.on("widget:closed",this.#handleClosed))),typeof chat.init=="function")try{await Promise.race([chat.init(),new Promise(resolve=>setTimeout(resolve,2e3))])}catch{}return chat}}customElements.get("lyle-chat-trigger")||customElements.define("lyle-chat-trigger",LyleChatTrigger);
2//# sourceMappingURL=/cdn/shop/t/458/assets/lyle-chat-trigger.js.map?v=12189274621763312481790072754

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.