(()=>{var e={230:()=>{function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"-1",u=new XMLHttpRequest,d=document.getElementById(e),p=d.querySelector(".review-hub"),l=d.querySelector(".pagination-container");p.classList.add("loading"),u.onreadystatechange=function(){!function(e,r,a,i,o){if(4===e.readyState&&200===e.status){var c=JSON.parse(e.responseText),s=i;for(var u in s.innerHTML="",o.innerHTML="",c.reviews)if(c.reviews.hasOwnProperty(u)){var d=document.createElement("div");d.classList.add("review-box");var p=c.reviews[u],l=document.createElement("span");l.textContent=u;var v=document.createElement("img");v.src=p.book_logo_url,v.alt=u;var _=document.createElement("p");_.textContent=p.book_welcome_bonus;var h=document.createElement("div");h.innerHTML=p.book_rating_html;var b=document.createElement("a");if(b.href=p.book_review_url,b.classList.add("read-review-btn"),b.textContent="Read Review",d.appendChild(v),d.appendChild(l),d.appendChild(h),d.appendChild(_),p&&p.book_key_features&&Array.isArray(p.book_key_features)&&p.book_key_features.length>0){var g=document.createElement("ul");p.book_key_features.forEach((function(e){var t=document.createElement("li");t.textContent=e.key_feature_name+": "+e.key_feature_value,g.appendChild(t)}))}t(d,p.book_categories),d.appendChild(b),s.appendChild(d),o.innerHTML=c.pagination_links,o.querySelectorAll(".pagination-container > a").forEach((function(e){e.addEventListener("click",(function(t){return t.preventDefault(),n(e.getAttribute("data-hub-id"),this.getAttribute("data-page-number")),!1}))}))}""==s.innerHTML&&(s.innerHTML=c.no_results_text),a.classList.remove("loading")}}(u,0,p,r,l)},u.open("POST",review_hub_vars.url,!0),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),u.send("action=get_reviews&nonce="+review_hub_vars.nonce+"&posts_per_page="+a+"&page="+i+"&hub_id="+e+"&search_name="+o+"&review_types="+c+"&specifc_reviews="+s)}function t(e,t){if(t&&t.length>0){var r=document.createElement("ul");r.classList.add("categories"),t.forEach((function(e){var t=document.createElement("li"),n="";switch(e){case"poker":n="poker";break;case"sports":n="sports";break;case"casino":n="casino"}t.classList.add(n),t.textContent=e,r.appendChild(t)})),e.appendChild(r)}}function r(e){var t=new Array;return t.hub_id=e.getAttribute("data-hub-id"),t.post_per_page=e.getAttribute("data-ppp"),t.current_page=e.getAttribute("data-page"),t.review_types=e.getAttribute("data-reviews-cat"),t.specifc_reviews=e.getAttribute("data-specifc-reviews"),t.hub_container=e.querySelector(".reviews-list-wrapper"),t.search_input=e.querySelector('.search-box > .search_controls > input[type="text"]'),t.search_button=e.querySelector(".search-box > .search_controls > button.search_button"),t}function n(t,n){var a=document.getElementById(t),i=a.querySelector('input[type="text"]').value;a.setAttribute("data-page",n);var o=r(a);e(o.hub_id,o.hub_container,o.post_per_page,o.current_page,i,o.review_types,o.specifc_reviews)}document.addEventListener("DOMContentLoaded",(function(){if("interactive"==document.readyState){var t=document.getElementsByClassName("review-hub-wrapper");Array.from(t).forEach((function(t){var n=r(t),a=n.search_input;n.search_button.addEventListener("click",(function(n){var a=this.parentNode.querySelector('input[type="text"]').value;!function(t,n){t.setAttribute("data-page",1);var a=r(t);e(a.hub_id,a.hub_container,a.post_per_page,a.current_page,n,a.review_types,a.specifc_reviews)}(t,a)})),a.addEventListener("input",(function(e){!function(e){var t=e.target,r=t.parentNode.querySelector("button.search_button"),n=t.value,a=3;n.length>=a?r.classList.add("ready"):r.classList.remove("ready")}(e)})),e(n.hub_id,n.hub_container,n.post_per_page,n.current_page,"",n.review_types,n.specifc_reviews)}))}}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(230)})()})();