1"use strict";(self.webpackChunkbundle_default=self.webpackChunkbundle_default||[]).push([[9156],{9156:(t,e,o)=>{o.r(e),o.d(e,{default:()=>l});var s=o(4572),a=o(3537);class l extends HTMLElement{constructor(...t){super(...t),(0,s.Z)(this,"modal",null),(0,s.Z)(this,"trigger",null),(0,s.Z)(this,"loadPromise",null)}connectedCallback(){this.trigger=this.querySelector(".RepublishModal-trigger"),this.trigger&&this.trigger.addEventListener("click",(()=>{this.openModal()}))}openModal(){this.ensureLoaded().then((()=>{this.modal?.open()}))}ensureLoaded(){return this.loadPromise||(this.loadPromise=this.fetchAndInject()),this.loadPromise}async fetchAndInject(){const t=new URL(window.location.href);t.searchParams.set("_republish","true");const e=await fetch(t.toString()),o=await e.text(),s=(new DOMParser).parseFromString(o,"text/html").querySelector("[data-bsp-modal]");s&&(this.appendChild(s),this.modal=new a.Z(s),this.querySelectorAll("[data-copy]").forEach((t=>{t.addEventListener("click",(()=>{this.handleCopy(t)}))})))}handleCopy(t){const e=t.getAttribute("data-copy");let o=null;"html"===e?o=this.querySelector("[data-republish-html]"):"plaintext"===e&&(o=this.querySelector("[data-republish-plaintext]")),o&&navigator.clipboard.writeText(o.value).then((()=>{const e=t.textContent;t.textContent="Copied!",setTimeout((()=>{t.textContent=e}),2e3)}))}}},3537:(t,e,o)=>{o.d(e,{Z:()=>a});var s=o(4572);class a{constructor(t){(0,s.Z)(this,"modal",void 0),(0,s.Z)(this,"modalId",""),(0,s.Z)(this,"closeButton",null),this.modal=t,this.modal&&(this.modalId=this.modal.getAttribute("id")||"",this.closeButton=this.modal.querySelector("[data-bsp-modal-close]"),this.closeButton&&this.closeButton.addEventListener("click",(()=>{this.close()})),this.modal.addEventListener("click",(t=>{console.log(t.target),t.target===this.modal&&this.close()})),document.addEventListener("keydown",(t=>{"Escape"===t.key&&this.close()})))}open(){this.modal.showModal(),this.modal.setAttribute("data-bsp-modal-open","true"),document.body.setAttribute("data-bsp-modal-open",this.modalId),this.modal.dispatchEvent(new Event("open"))}close(){this.modal.close(),this.modal.removeAttribute("data-bsp-modal-open"),document.body.removeAttribute("data-bsp-modal-open"),this.modal.dispatchEvent(new Event("close"))}on(t,e){this.modal.addEventListener(t,e)}}}}]);
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.