1import{registerComponent,executeScripts}from"helpers";import WYATTElement from"wyatt";import{checkForDuplicateIDs}from"dev-tools";registerComponent("live-region",class extends WYATTElement{constructor(){super(),this.ariaLive||(this.ariaLive="polite"),this.moveStyles()}connectedCallback(){this.subscribe(WYATT.PubSub.events.updateDOM,this.conditionallyUpdateDOM.bind(this))}conditionallyUpdateDOM(data){if(!data)return;const item=data.find(({liveRegion})=>liveRegion===this.dataset.liveRegion);if(item){const newDOM=new DOMParser().parseFromString(item.html,"text/html").querySelector(`[data-live-region="${this.dataset.liveRegion}"]`);executeScripts(newDOM),this.moveStyles(newDOM),this.replaceWith(newDOM),checkForDuplicateIDs()}}moveStyles(DOM=this){DOM.querySelectorAll('link[rel="stylesheet"], [data-source]').forEach(asset=>{const fileName=this.fileName(asset);fileName&&(WYATT.config.liveRegion.existingExternalAssets.includes(fileName)?asset.remove():(document.head.appendChild(asset),WYATT.config.liveRegion.existingExternalAssets.push(fileName)))})}fileName(asset){const assetMatch=(asset.dataset.source||asset.src||asset.href).match(/\/assets\/(.*?)\?/);return assetMatch?assetMatch[1]:null}}); 2//# sourceMappingURL=/cdn/shop/t/3/assets/live-region.js.map?v=87193018095779862531785854985
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.