1var e=Object.defineProperty,t=(t,s,o)=>((t,s,o)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[s]=o)(t,"symbol"!=typeof s?s+"":s,o),s=(e,t,s)=>new Promise((o,i)=>{var n=e=>{try{a(s.next(e))}catch(t){i(t)}},r=e=>{try{a(s.throw(e))}catch(t){i(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,r);a((s=s.apply(e,t)).next())});import{z as o}from"./index.cz83wh4sws6slzdm.js";import{A as i}from"./index.fwy4myo0zwt1lnjt.js";import{F as n}from"./feefo-template.gtt8oisukmrhee1q.js";const r="feefo",a=`[data-hme-is='${r}']`,d="hme-feefo--reviews-loaded",l=".hme-feefo__web-component>div",h={[n.PRODUCT_STARS]:".product-stars-container",[n.PARENT_PRODUCT_STARS]:".product-stars-container",[n.ON_PAGE_STARS]:".product-stars-container",[n.PRODUCT_POP_UP]:".rectangle-badge",[n.PARENT_PRODUCT_POP_UP]:".rectangle-badge",[n.POP_UP]:".rectangle-badge"};class c extends i{init(){o(this.options.js).catch(e=>console.error(e)).then(()=>this.handleReviewsElementLoaded())}handleReviewsElementLoaded(){return s(this,null,function*(){if(this.options.type===n.REVIEWABLE_BADGE||this.options.type===n.PARENT_REVIEWABLE_BADGE)return void this.handleReviewableBadgeLoaded();if(this.options.type===n.PRODUCT_REVIEWS||this.options.type===n.PARENT_PRODUCT_REVIEWS)return void this.addLoadedClass();const e=yield this.waitForShadowRoot();if(!e)return;if(this.hasReviewElement(e))return void this.addLoadedClass();const t=new MutationObserver(()=>{if(this.hasReviewElement(e))return this.addLoadedClass(),void t.disconnect()});t.observe(e,{childList:!0,subtree:!0,attributes:!0}),setTimeout(()=>{t.disconnect()},3e3)})}hasReviewElement(e){const t=h[this.options.type];return!!t&&null!==e.querySelector(t)}addLoadedClass(){var e;null==(e=this.elements.self)||e.classList.add(d)}waitForShadowRoot(){return new Promise(e=>{let t=this.elements.self.querySelector(l);if(t)return e(t.shadowRoot);const s=new MutationObserver(()=>{t=this.elements.self.querySelector(l),t&&(s.disconnect(),e(t.shadowRoot))});s.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{s.disconnect()},3e3)})}handleReviewableBadgeLoaded(){return s(this,null,function*(){if(this.elements.self.querySelector("iframe"))return void this.addLoadedClass();const e=()=>{this.elements.self.querySelector("iframe")?this.addLoadedClass():requestAnimationFrame(e)};requestAnimationFrame(e)})}}t(c,"SELF",a),t(c,"NS","hme"),t(c,"IS",r);export{c as default};
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.