PageSourceSearch

https://www.3chi.com/wp-content/cache/min/1/embed.js?ver=1790090391

js 3chi.com collected 2026-09-25 23:51:13 UTC 29,183 bytes, 19 lines download raw bytes

1/*! RevenueHunt embed.js commit=b870e7ab */
2"use strict";window.rhScheduledMaintenance=!1,window.rhVersion="1.0.0",window.rhDate=new Date;var RH_ADMIN_ORIGIN="https://admin.revenuehunt.com",RH_API_ORIGIN="https://api.revenuehunt.com",RH_SPACE_ORIGIN="https://space.revenuehunt.com";function prqSetCookie(o,t,n){console_log("embed.js - prqSetCookie - "+o+" - "+t+" - "+n);var e,r="";n&&((e=new Date).setTime(e.getTime()+24*n*60*60*1e3),r="; expires="+e.toUTCString());try{document.cookie=o+"="+(t||"")+r+"; sameSite=Lax; path=/"}catch(e){console.warn("Failed to set cookie:",e),console.warn("cookie details:",o,t,n)}}function prqGetCookie(o){try{for(var e=o+"=",t=document.cookie.split(";"),n=0;n<t.length;n++){for(var r=t[n];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e))return r.substring(e.length,r.length)}}catch(e){console.warn("Failed to read cookie:",e),console.warn("cookie name:",o)}return null}function console_log(e){return!(!prqGetCookie("console_log")&&"localhost"!==window.location.hostname)&&(console.log(e),!0)}function iFrameEvent(e){console_log("embed.js - iFrameEvent - "+e);var o=document.querySelector(".rh-widget iframe"),e=JSON.stringify(e);o&&o.contentWindow&&o.contentWindow.postMessage&&o.contentWindow.postMessage(e,"*")}!function(){if(window.rhCurrentScript="",document.currentScript&&document.currentScript.src)window.rhCurrentScript=document.currentScript.src;else for(var e=document.getElementsByTagName("script"),o=0;o<e.length;o++)if(e[o].src&&-1!==e[o].src.indexOf("embed.js")){window.rhCurrentScript=e[o].src;break}var t,n=new URLSearchParams;if(window.rhCurrentScript)try{t=new URL(window.rhCurrentScript),n=new URLSearchParams(t.search)}catch(e){console.warn("RevenueHunt: Could not parse script URL:",window.rhCurrentScript)}window.rhCurrentShop=n.get("shop")}(),window.iFrameEvent=iFrameEvent,function(){try{function j(e){"function"==typeof prqAddedAllToCartCallback&&prqAddedAllToCartCallback(e)}window.addingToCart=!1,console_log("console_log enabled // "+window.rhVersion+" // "+window.rhDate);const i=(e,o)=>{const t=new XMLHttpRequest;t.onreadystatechange=()=>{4===t.readyState&&200===t.status&&o(JSON.parse(t.responseText))},t.open("GET",e,!0),t.send(null)},P=(e,o,t)=>{const n=new XMLHttpRequest;n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&t(JSON.parse(n.responseText))},n.open("POST",e,!0),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.send(JSON.stringify(o))};function t(t){t&&0<t.length&&i("/cart.js",function(e){for(var o=0;o<t.length;o++)t[o].innerHTML=e.item_count})}function B(o){console_log("embed.js - waitForPopulatedCart");var t=1;window.addingToCart?(console_log("start loop"),function e(){setTimeout(function(){window.addingToCart?(console_log("wait... "+t),++t<20&&e()):(console_log("redirecting to url..."),window.location.href=o)},2e3)}()):(console_log("redirecting to url..."),window.location.href=o)}function L(){var o=document.getElementById("CartCount");o&&i("/cart.js",function(e){o.innerHTML="<span>"+e.item_count+"</span>",0===e.item_count?o.classList.add("hide"):o.classList.remove("hide")});t(document.getElementsByClassName("cart-item-count-header"));var e=document.getElementsByClassName("cart_count");t(e)}function W(e){console_log("embed.js - addProductsToCartBigCommerce"),console_log(e),window.addingToCart=!0;var o,r=[];for(o in e){var a="/cart.php?action=add&sku="+encodeURIComponent(JSON.parse(o).sku)+"&qty="+encodeURIComponent(e[o]);r.push(a)}console_log(r);!function o(t){var n;n=r[t],new Promise(function(e,o){var t=new XMLHttpRequest;t.open("GET",n,!0),t.onreadystatechange=function(){4==t.readyState&&(200==t.status?e(!0):o(Error(t.statusText)))},t.onerror=function(){o(Error("network error"))},t.send()}).then(function(e){console_log(r[t]),console_log(e),++t<r.length?o(t):(console_log("embed.js - addProductsToCartBigCommerce - finished"),window.addingToCart=!1,a="/cart.php",window.location.href=a)})}(0)}function O(l){return console_log("embed.js - wcAddToCart"),new Promise(function(e,o){var t,n=new XMLHttpRequest,r=(window.rhCurrentShop&&null!==window.rhCurrentShop?n.open("POST","https://"+window.rhCurrentShop+"/?wc-ajax=add_to_cart"):n.open("POST","/?wc-ajax=add_to_cart"),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),[]);for(t in l){var a=encodeURIComponent(t),i=encodeURIComponent(l[t]);
2r.push(a+"="+i)}r=r.join("&"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status?(e(JSON.parse(n.responseText)),iFrameEvent({action:"added_one",product:l}),"function"==typeof prqAddedOneToCartCallback&&prqAddedOneToCartCallback(l)):o(Error(n.statusText)))},n.onerror=function(){o(Error("network error"))},n.send(r)})}var r=100,n=40,I={quiz_started:"quiz_name",question_viewed:"question_title",block_answered:"choice_text",email_lead:"quiz_name",phone_lead:"quiz_name",results_page_viewed:"results_page_title",product_recommended:"product_name",product_clicked:"product_name",product_added_to_cart:"product_name",proceed_to_checkout:"quiz_name",quiz_retake_quiz:"quiz_name"};function z(e,o){o=o;var o=(o=(o=String(o).toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,""))&&!/^[a-z]/.test(o)?"quiz_"+o:o)||"unknown",t=e+"_"+o;return t.length<=n?t:(t=n-e.length-1,e+"_"+o.slice(0,t))}function U(e,o){var t,n;"undefined"==typeof gtag?console.warn("RevenueHunt: make sure to load gtag, before the embed.js script"):(o=function(e){var o,t={};for(o in e){var n=e[o];null!=n&&(n=String(n),t[o]=n.length<=r?n:n.slice(0,r-3)+"...")}return t}(o||{}),t=o,console_log("ga4 event: "+(t=(n=I[e=e])&&t[n]?z(e,t[n]):e)),gtag("event",t,o))}const l=()=>{console_log("embed.js - addWindowEventListenerMessage"),window.addEventListener("message",function(e){if(e.origin===RH_ADMIN_ORIGIN||"http://localhost:9528"===e.origin||"https://admin-dev.revenuehunt.com"===e.origin){var o,t,n,r,a,i,l,c="object"==typeof e.data?e.data:JSON.parse(e.data);try{"gtag_event"===c.action&&(console_log("gtag_event"),console_log(c),a=c.gtag_id,w=c.gtag_action,y=c.gtag_category,g=c.gtag_label,"undefined"==typeof gtag?console.warn("RevenueHunt: make sure to load gtag, before the embed.js script"):(console_log("trigger gtag"),y={event_category:y,event_label:g},void 0!==a&&(console_log("set user defined gtag"),y.send_to=a),gtag("event",w,y)))}catch(c){console_log(c)}try{"ga4_event"===c.action&&(console_log("ga4_event"),console_log(c),U(c.event,c.params))}catch(c){console_log(c)}try{"fbpixel_event"===c.action&&(q=c.facebook_pixel,o=c.fbq_action,t=c.fbq_event,l=c.fbq_params,void 0===window.fbq&&q&&(b=window,v=document,b.fbq||(n=b.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)},b._fbq||(b._fbq=n),(n.push=n).loaded=!0,n.version="2.0",n.queue=[],(b=v.createElement("script")).async=!0,b.src="https://connect.facebook.net/en_US/fbevents.js",(v=v.getElementsByTagName("script")[0]).parentNode.insertBefore(b,v)),window.fbq("init",q)),void 0!==window.fbq&&(l?window.fbq(o,t,l):window.fbq(o,t)))}catch(c){console_log(c)}if("iframe_height"===c.action){if(0===(r=document.querySelectorAll(".rh-inline")).length)return;for(let e=0;e<r.length;e++){var d=r[e].dataset.url.split("/").pop();c.quizid===d&&(m=(h=r[e]).querySelector(".rh-inline iframe"))}if(!h||!m)return;F(h,m);e="true"===h.getAttribute("data-fixed-height");"response"===c.location&&(e=!1),0===c.height||e||(h.style.height=c.height+"px",m.style.height=c.height+"px")}if("quiz_callback"===c.action){console_log("embed.js - quiz_callback"),prqSetCookie("prq-responseId-"+c.quiz.id,c.response.id,7);var s=c;if(console_log("embed.js - tagCartWithResponseId"),s.responseId||s.quizAnswers){var u={};if(s.responseId&&(u.__prq_response_id=s.responseId,u.__prq_quiz_id=s.quizId),s.quizAnswers)for(var p in s.quizAnswers)u[p]=s.quizAnswers[p];console_log("/cart/update.js"),console_log(u),P("/cart/update.js",{attributes:u},function(e){console_log(e)})}"function"==typeof prqQuizCallback&&prqQuizCallback(c),console_log("set klaviyo identify"),console_log(c.klaviyoIdentify),c.klaviyoIdentify&&"object"==typeof klaviyo?klaviyo.push(["identify",c.klaviyoIdentify]):c.klaviyoIdentify&&"object"==typeof _learnq&&_learnq.push(["identify",c.klaviyoIdentify])}if("slide_callback"===c.action&&"function"==typeof prqSlideCallback&&(console_log("embed.js - slide_callback"),prqSlideCallback(c)),"start_callback"===c.action&&"function"==typeof prqStartCallback&&(console_log("embed.js - start_callback"),prqStartCallback(c)),"view_product"===c.action&&(window.location.href=c.url),"proceed_to_cart"===c.action){console_log("embed.js - proceed_to_cart"),console_log(c);var g="/cart";if("undefined"!=typeof Shopify&&Shopify&&Shopify.routes&&Shopify.routes.root&&(g=Shopify.routes.root+"cart"),"ShopifyShop"===c.platform&&c.discountcode&&(g="/discount/"+c.discountcode.trim()+"/?redirect=/cart"),"ShopifyShop"===c.platform&&g.includes("?")?g=g+"&locale="+c.locale:"ShopifyShop"===c.platform&&(g=g+"?locale="+c.locale),"MagentoShop"===c.platform&&(g="/checkout/cart/"),c.carturl&&"ShopifyShop"!==c.platform&&(g=(g="/"+(g=c.carturl)).replace("//","/")),c.quizid&&(g+=c.setutm),"BigcommerceShop"===c.platform)return void W(c.products);try{"ShopifyShop"!==c.platform?(console_log("embed.js - waitForPopulatedCart:"),console_log(g),B(g)):M()?(console_log("embed.js - Rebuy Cart"),Rebuy.SmartCart.show(),document.querySelector("rebuy-cart__flyout").style.zIndex=9999999999,iFrameEvent({action:"checking_out_false"})):(console_log("embed.js - Cart Redirect:"),console_log(g),window.location.href=g)}catch(c){console_log(c)}}if("retake_quiz"===c.action||"view_question"===c.action||"quiz_callback"===c.action){if(console_log("retake_quiz or view_question or quiz_callback"),
2console_log(c),0===(r=document.querySelectorAll(".rh-inline")).length)return;for(let e=0;e<r.length;e++){var h,m,d=r[e].dataset.url.split("/").pop();c.quizid===d&&(m=(h=r[e]).querySelector(".rh-inline iframe"))}if(!h||!m)return;F(h,m),h.style.height=h.dataset.rhInitialHeight,m.style.height=h.dataset.rhInitialIframeHeight,G(h)}if("close_quiz"===c.action&&(console_log("embed.js - close_quiz"),N(c.quizid)),"add_one"===c.action&&"function"==typeof prqAddOneToCartCallback&&(console_log("embed.js - add_one callback"),prqAddOneToCartCallback(c)),"add_one"===c.action&&"ShopifyShop"===c.platform){if(console_log("embed.js - add_one Shopify"),console_log(c),c.recharge)return console_log("ReCharge product"),console_log(a={id:c.variantId,sellingPlanId:c.recharge.external_plan_id,sellingPlanGroupId:c.recharge.external_plan_group_id,isSubscription:!0}),void window.ReChargeWidget.api.postToCart(a);console_log("Shopify product"),P("/cart/add.js",{quantity:1,id:c.variantId},function(e){L(),"function"==typeof prqAddedOneToCartCallback&&prqAddedOneToCartCallback(e)})}if("add_one"===c.action&&"WoocommerceShop"===c.platform&&(console_log("embed.js - add_one WooCommerce"),A=c.variantId||c.originId,O(f={quantity:1,product_id:A,product_sku:c.sku})),"add_one"===c.action&&"MagentoShop"===c.platform){console_log("embed.js - add_one Magento");var f={quantity:1,product_id:A=c.variantId||c.originId,product_sku:c.sku};const E=new XMLHttpRequest;E.responseType="json",E.open("GET","/productquiz/index/addquizproductstocart/product_id/"+A+"?"+H()),E.onload=()=>{console_log(E.response),"function"==typeof prqAddedOneToCartCallback&&prqAddedOneToCartCallback(f)},E.send()}if("add_all"===c.action&&"function"==typeof prqAddAllToCartCallback&&(console_log("embed.js - add_all"),prqAddAllToCartCallback(c)),"add_all"===c.action&&"ShopifyShop"===c.platform&&(console_log("embed.js - add_all Shopify"),window.addingToCart=!0,_=c.variantId.split("||"),i={},_.forEach(function(e){i[parseInt(e)]=1}),P("/cart/update.js",{updates:i},function(e){window.addingToCart=!1,L(),j(c)})),"add_all"===c.action&&"WoocommerceShop"===c.platform&&(console_log("embed.js - add_all WooCommerce"),window.addingToCart=!0,_=c.variantId.split("||"),function o(t){O({quantity:1,product_id:_[t]}).then(function(e){++t<_.length?o(t):(window.addingToCart=!1,iFrameEvent({action:"added_all"}),j(c))})}(0)),"add_all"===c.action&&"MagentoShop"===c.platform){console_log("embed.js - add_all Magento");var w=c.variantId.replace(/\|\|/g,",");const T=new XMLHttpRequest;T.responseType="json",T.open("GET","/productquiz/index/addallquizproductstocart/product_ids/"+w+"?"+H()),T.onload=()=>{console_log(T.response),iFrameEvent({action:"added_all"}),j(c)},T.send()}if("change_variant"===c.action){console_log("embed.js - change_variant");var _,y=(_=c.variantId.split("||"))[0],b=_[1];if(console_log(y),console_log(b),"ShopifyShop"===c.platform){var v,y=JSON.parse(y),b=JSON.parse(b);if(y.recharge)return console_log("ReCharge product"),console_log(v={id:y.variant_id,sellingPlanId:y.recharge.external_plan_id,sellingPlanGroupId:y.recharge.external_plan_group_id,isSubscription:!0}),void window.ReChargeWidget.api.postToCart(v);var q={};q[b.variant_id]=0,q[y.variant_id]=c.quantity,console_log("/cart/update.js"),console_log(q),P("/cart/update.js",{updates:q},function(e){console_log(e)})}"WoocommerceShop"===c.platform&&O(f={quantity:1,product_id:y})}if("remove_one"===c.action&&"function"==typeof prqRemoveOneFromCartCallback&&(console_log("remove_one callback"),prqRemoveOneFromCartCallback(c)),"remove_one"===c.action&&"ShopifyShop"===c.platform&&(console_log("remove_one Shopify"),l={},void 0!==c.quantity&&c.quantity||(c.quantity=0),l[c.variantId]=c.quantity,console_log("/cart/update.js"),console_log(l),P("/cart/update.js",{updates:l},function(e){console_log(e),L(),"function"==typeof prqRemovedOneFromCartCallback&&prqRemovedOneFromCartCallback(e)})),"remove_one"===c.action&&"WoocommerceShop"===c.platform){console_log("embed.js - remove_one WooCommerce");var C,S=new XMLHttpRequest,k=(S.open("POST","/?wc-ajax=remove_from_cart"),S.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),{cart_item_key:c.originId}),x=[];for(C in k){var I=encodeURIComponent(C),z=encodeURIComponent(k[C]);x.push(I+"="+z)}x=x.join("&"),S.onload=function(){console_log(S)},S.send(x)}if("remove_one"===c.action&&"MagentoShop"===c.platform){console_log("embed.js - remove_one Magento");var A,f={quantity:1,product_id:A=c.variantId||c.originId,product_sku:c.sku};const R=new XMLHttpRequest;R.responseType="json",R.open("GET","/productquiz/index/removequizproductstocart/product_id/"+A+"?"+H()),R.onload=()=>{console_log(R.response),"function"==typeof prqRemovedOneFromCartCallback&&prqRemovedOneFromCartCallback(f)},R.send()}}},!1)},p=()=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",o="",t=0;t<6;t++)o+=e.charAt(Math.floor(Math.random()*e.length));return o};function H(){return"cachebuster="+p()}const d=e=>"[object Object]"===Object.prototype.toString.call(e),g=(e,o=!1,t=!1,n=!1,r=!1)=>{o=c(o,t,n,r),t=new URLSearchParams(o).toString();return e+(""===t?"":"?"+t)},s=e=>{var o=e.indexOf("#quiz-");return-1!==o?e.substring(0,o)+e.substring(o+6):e},h=e=>{var o,t;return console_log("shopifyCurrency"),console_log(e),"undefined"!=typeof Shopify&&Shopify&&Shopify.currency?({active:t,rate:o}=Shopify.currency,t=`currency_code=${t}&currency_rate=`+o,e.includes("?")?e+"&"+t:e+"?"+t):e},c=function(e,o,t,n){console_log("embed.js - quizParameters");var r,a,i,l=new URLSearchParams(window.location.search),c={};e&&(o=c.popup="true"),t&&(c.popupWidth=t),n&&(c.popupHeight=n),o||(c.autoscroll="false"),d(window.prq_vars)&&(c=Object.assign(c,window.prq_vars)),console_log("URLSearchParams");for(r of l.entries())r[0].startsWith("prq_")&&(a=r[0].replace("prq_",""),i=r[1],console_log(r),c[a]=i);return c},u=function(e){return console_log("embed.js - isAutoScroll"),console_log(e),!e||"false"!==e.toLowerCase()},M=()=>null!==document.querySelector("body.smart-cart--enabled")&&"undefined"!=typeof Rebuy&&void 0!==Rebuy?.SmartCart,m=function(){document.querySelectorAll(".rh-widget iframe")&&document.querySelectorAll(".rh-widget iframe").forEach(function(e){e.remove()}),document.querySelectorAll(".rh-widget").forEach(function(e){e.style.backgroundColor="#aaa";var o=document.createElement("div"),t=(o.style.textAlign="center",o.style.display="flex",o.style.flexDirection="column",o.style.justifyContent="center",o.style.height="calc(100% - 60px)",o.style.width="calc(100% - 60px)",o.style.padding="30px",o.style.color="#fff",document.createElement("h2")),t=(t.textContent="Quiz Temporarily Unavailable",o.appendChild(t),document.createElement("p"));t.textContent="We're currently improving your experience! Please check back shortly after our brief maintenance peri
2od.",o.appendChild(t),e.appendChild(o)})},f=function(){document.querySelectorAll(".rh-widget iframe")&&document.querySelectorAll(".rh-widget iframe").forEach(function(e){e.remove()}),document.querySelectorAll(".rh-widget").forEach(function(e){var o=p(),t=e.dataset.url,t=s(t),t=g(t,!1,u(e.dataset.autoscroll)),t=h(t),n=(console_log("RenderInlineEmbed - shopifyCurrency"),console_log(t),document.createElement("iframe"));n.name="Product Recommendation Quiz",n.title="Product Recommendation Quiz",n.ariaLabel="Product Recommendation Quiz",n.src=t,n.id=o,n.style.cssText="transform-style: preserve-3d; padding: 0; border: none; margin: 0 auto; height: 100%; flex-grow: 1; background: url("+RH_ADMIN_ORIGIN+"/rolling.svg) no-repeat center;",n.setAttribute("data-hj-allow-iframe","true"),e.appendChild(n),document.getElementById(o).onload=function(){document.getElementById(o).contentWindow.focus()}})},w=function(){document.querySelectorAll("a").forEach(function(e){var o;e&&e.href&&"string"==typeof e.href&&e.href.match(/\#quiz\-/)&&(o=e.href.split("#quiz-")[1],e.addEventListener("click",function(e){e.preventDefault(),document.getElementById(o)&&document.getElementById(o).remove(),C(o,!1,"true")}))})},_=()=>{var e,o,t=window.rhCurrentScript,n=document.URL;for({regex:e,domain:o}of[{regex:/admin\-dev\.revenuehunt\.com/,domain:"https://admin-dev.revenuehunt.com"},{regex:/localhost|productrecommendationquizforwoocommerce|productrecommendationquiz.local/,domain:"http://localhost:9528"}])if(e.test(t)||e.test(n))return o;return RH_ADMIN_ORIGIN},y=function(){var e=_(),e='.rh-chat {      width: 50px;      height: 50px;      bottom: 20px;      right: 20px;      cursor: pointer;      position: fixed;      border-radius: 25px;        -webkit-border-radius: 25px;        -moz-border-radius: 25px;        -webkit-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);        -moz-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);      box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);    }          .rh-greeting {        padding: 8px;        background-color: white;        bottom: 29px;        right: 80px;        position: fixed;        color: #666;        font-size: 12px;        border: 1px solid #eee;        border-radius: 6px;          -webkit-border-radius: 6px;          -moz-border-radius: 6px;          -webkit-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);          -moz-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);        box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;      }        span.rh-close {      cursor: pointer;      font-weight: bold;      background-image: url(\''+e+"/close-x.svg');        background-size: cover;        background-position: center;        opacity: 0.25;        width: 10px;        height: 10px;        margin-left: 4px;        display: inline-block !important;      }          .rh-dot {        width: 10px;        height: 10px;        background-color: #FF5500;        border: 2px solid white;        float: right;        box-sizing: content-box;        border-radius: 10px;          -webkit-border-radius: 10px;          -moz-border-radius: 10px;        display: block !important;      }          .rh-icon {        width: 25px;        height: 25px;        position: absolute;        margin: 12px;        background-image: url('"+e+"/chat-quiz-white.svg');          background-size: cover;          background-position: center;          display: inline-block !important;        }",o=document.createElement("style");o.innerText=e.replace(/[\r\n]+/gm,""),document.head.appendChild(o)},b=(window.rhCloseGreeting=function(){console_log("rhCloseGreeting"),document.getElementById("rh-greeting")&&(document.getElementById("rh-greeting").outerHTML="")},window.rhCloseNotification=function(){console_log("rhCloseNotification"),document.getElementById("rh-dot")&&(document.getElementById("rh-dot").outerHTML="")},window.rhClickChat=function(e,o,t){console_log("rhClickChat"),console_log(e),window.rhCloseGreeting(),window.rhCloseNotification(),window.openQuizPopup(e,o,t)},function(e,o,t,n,r,a){var i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div");l.classList.add("rh-chat"),l.style.backgroundColor=o,l.addEventListener("click",function(){window.rhClickChat(e,r,a)}
2),c.classList.add("rh-icon"),l.appendChild(c),t&&((o=document.createElement("div")).classList.add("rh-dot"),o.setAttribute("id","rh-dot"),l.appendChild(o)),i.appendChild(l),n&&(c=document.createElement("div"),t=document.createElement("span"),c.classList.add("rh-greeting"),c.setAttribute("id","rh-greeting"),c.textContent=n,t.classList.add("rh-close"),t.addEventListener("click",window.rhCloseGreeting),c.appendChild(t),i.appendChild(c)),document.body.appendChild(i)}),v=function(){var o=document.getElementById("rh-chat");if(null!==o){console_log("--------------------------------"),console_log("RenderChatEmbed");var t=o.getAttribute("data-quiz-id"),t=s(t),n=o.getAttribute("data-chat-color"),r=o.getAttribute("data-chat-dot")&&"true"===o.getAttribute("data-chat-dot").toLocaleLowerCase(),a=o.getAttribute("data-chat-hide")&&"true"===o.getAttribute("data-chat-hide").toLocaleLowerCase(),i=o.getAttribute("data-popup-width"),l=o.getAttribute("data-popup-height");let e=!1;o.getAttribute("data-chat-greeting")&&(e=o.getAttribute("data-chat-greeting"));o=prqGetCookie("prq-responseId-"+t);console_log(o),a&&o||(y(),b(t,n,r,e,i,l))}},q=function(){console_log("embed.js - GetAutomaticPopupData");var e,o,t,n,r,a,i=prqGetCookie("data-timeout"),l=Date.now(),c=!1,d=!1;i&&(console_log("data-timeout cookie set:"),d=i.split("||")[0],c=parseInt(i.split("||")[1])),null!==document.getElementById("auto-popup")&&(e=document.getElementById("auto-popup"),o=parseFloat(e.getAttribute("data-timeout")),t=e.getAttribute("data-exit-intent")&&"true"===e.getAttribute("data-exit-intent").toLocaleLowerCase(),n=e.getAttribute("data-aggressive")&&"true"===e.getAttribute("data-aggressive").toLocaleLowerCase(),window.popupWidth=e.getAttribute("data-popup-width"),window.popupHeight=e.getAttribute("data-popup-height"),d=e.getAttribute("data-quiz-id"),r=prqGetCookie("auto-popup-"+(d=s(d))),n&&(r=prqGetCookie("prq-responseId-"+d)),c=1e3*(o=o&&o<=0?.5:o)+l),i||prqSetCookie("data-timeout",d+"||"+c,7),d&&t&&!r&&document.addEventListener("mouseout",e=>{e.toElement||e.relatedTarget||r||window.popupAlreadyShown||(window.popupAlreadyShown=d,C(d,!1,"true",window.popupWidth,window.popupHeight))}),console_log("timeTimeout:"),console_log((c-l)/1e3),console_log(d),d&&!r&&0<c-l&&(console_log("setInterval TIMEOUT"),a=setInterval(function(){l=Date.now(),c-l<0&&!window.popupAlreadyShown&&(console_log("Show Quiz after timeout: "+d),window.popupAlreadyShown=d,C(d,!1,"true",window.popupWidth,window.popupHeight),clearInterval(a))},1e3))},C=function(e,o,t,n,r){var a,i,l,c,d,s,u;t&&window.prqPopup?console_log("window.isPopup: "+t):(t&&(window.prqPopup=e,document.querySelector("body").style.overflow="hidden",prqSetCookie("auto-popup-"+e,"true",7)),a=_(),(i=document.createElement("div")).className="rh-modal",i.style.cssText="display: block; position: fixed; z-index: 9998 !important; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(254,254,254,0.6);",(l=document.createElement("span")).innerHTML="&times;",l.ariaLabel="Close",l.style.cssText="position: fixed; color: #888888; z-index: 9999 !important; font-size: 36px; line-height: 36px; text-align: center; font-weight: normal; right: 20px; top: 20px; cursor: pointer; width: 38px; height: 38px; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color: rgba(255,255,255,0.5)",l.onclick=function(e){console_log("click X close quiz");var o="[id='"+window.prqPopup+"'] iframe";document.querySelector(o)?iFrameEvent({action:"close_quiz"}):console.error("iFrame not found for ID: "+window.prqPopup),document.querySelector("body").style.overflow=null,window.prqPopup=!1,i.style.display="none",-1!==window.location.hash.indexOf("#quiz-")&&history.pushState("",document.title,window.location.pathname+window.location.search)},s=a+"/public/quiz/"+e,d=g(s,t,!1,n,r),void 0!==o&&!1!==o&&(c=!0,d=a+"/public/quiz/"+e+"/results/"+o),d=h(d),console_log("showQuiz - shopifyCurrency"),console_log(d),s=document.querySelectorAll(".rh-inline"),u=!1,c&&0<s.length&&(window.quizId=e,s.forEach(function(e){var o,t;e.dataset.url.split("/").pop()===window.quizId&&(u=!0,document.querySelector("body").style.overflow=null,e.querySelectorAll("iframe").forEach(function(e){e.remove()}),o=p(),(t=document.createElement("iframe")).name="Product Recommendation Quiz",t.title="Product Recommendation Quiz",t.ariaLabel="Product Recommendation Quiz",t.src=d,t.id=o,t.style.cssText="transform-style: preserve-3d; padding: 0; border: none; margin: 0 auto; height: 100%; flex-grow: 1; background: url("+RH_ADMIN_ORIGIN+"/rolling.svg) no-repeat center;",t.setAttribute("data-hj-allow-iframe","true"),e.appendChild(t),document.getElementById(o).onload=function(){document.getElementById(o).contentWindow.focus()})}),u)||((t=document.createElement("div")).id=e,t.className="rh-widget",t.dataset.url=d,t.style.cssText="display: flex; background-color: rgba(254,254,254,0.4); margin: 0; padding: 0; height: 100%;",t.style["flex-grow"]=1,window.onclick=function(e){e.target===i&&(i.style.display="none")},i.appendChild(t),t.appendChild(l),document.getElementsByTagName("body")[0].appendChild(i),f()))},S=e=>{var o=document.createElement("link");o.rel="dns-prefetch",o.href=e,document.head.appendChild(o)},k=function(){var e=window.location.hash;if(console_log("checkHash"),console_log("hash"),e.match(/\#quiz\-/)){const n=e.split("#quiz-")[1];var o=document.querySelector(".rh-widget span"),t=()=>C(n,!1,"true");o?(o.click(),setTimeout(t,200)):t()}if(e.match(/\#results\-/)){const r=e.split("#results-")[1].split("-");console_log("#results"),console_log(r),C(r[0],r[1],!1),document.querySelectorAll(".rh-inline").forEach(e
2=>{var o=e.dataset.url.split("/").pop();r[0]===o&&(document.querySelector("body").style.overflow=null,e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}))})}},N=e=>{document.querySelector(`[id='${e}'] span`).click()},G=e=>{if(!e||!e.dataset||"false"===e.dataset.autoscroll)return!1;var e=e.getBoundingClientRect(),o=e.y+window.pageYOffset;e&&e.y<0&&(console_log("scroll_to: "+o),window.scrollTo({top:o,left:0,behavior:"smooth"}))},F=(e,o)=>{void 0===e.dataset.rhInitialHeight&&(e.dataset.rhInitialHeight=e.style.height||"600px",e.dataset.rhInitialIframeHeight=o.style.height||"100%")},E=()=>{window.addEventListener("hashchange",()=>{console_log("embed.js - detectHashChange"),k()})},x=()=>{/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&window.addEventListener("pageshow",function(){document.querySelectorAll(".rh-widget iframe").forEach(function(e){console_log("embed.js - is Safari, reload iframe"),e.src=e.src})})},T=e=>{var o=document.createElement("style");o.textContent=e,document.head.append(o)},R=(window.openQuizPopup=function(e,o,t){C(e,!1,"true",o,t)},`
3  .rh-inline, .rh-inline iframe{-webkit-transition: height 0.5s; -moz-transition: height 0.5s; -ms-transition: height 0.5s; -o-transition: height 0.5s; transition: height 0.5s;}
4  .mtop-20 { margin-top: 20px; }
5  .mbot-20 { margin-bottom: 20px; }
6  .rh-quiz-list { display: none; }
7  .rh-info-box {
8      background-color: #D8F0FE;
9      color: #2c81b2;
10      border: 1px dotted #2c81b2;
11      padding: 15px;
12      border-radius: 8px;
13      -webkit-border-radius: 8px;
14      -moz-border-radius: 8px;
15  }
16  .rh-inline { width: 100%; display: flex; }
17  .rh-inline iframe { width: 100%; }
18  .rh-fullwidth { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
19`);function e(){console_log("embed.js # prqApp # 2024-01-24 # v001"),console_log("rhScheduledMaintenance: "+window.rhScheduledMaintenance),T(R),[RH_API_ORIGIN,RH_SPACE_ORIGIN].forEach(S)}function A(){setTimeout(function(){if(e(),q(),f(),w(),v(),x(),k(),E(),"undefined"!=typeof Shopify&&Shopify&&Shopify.designMode){var o=document.querySelectorAll(".rh-quiz-list");for(let e=0;e<o.length;e++)o[e].style.display="block"}l()},50)}void 0===window.prqAppLoaded&&(window.rhScheduledMaintenance?setTimeout(function(){e(),m(),x()},50):A(),window.prqAppLoaded=!0,"function"==typeof prqAppLoadedCallback&&prqAppLoadedCallback())}catch(e){console.error(e),a=RH_API_ORIGIN+"/ahoy/events",o={events:[{name:"Embed.js JavaScript Error",properties:{message:(o=e).toString(),location:window.location.href,stack:o.stack}}]},fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}).catch(e=>{console.error("Error sending event data to Ahoy:",e)})}var o,a}()

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.