var getRandomValues,rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&!(getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&®EX.test(e)}function stringify(e){var t=[];for(let e=0;e<256;++e)t.push((e+256).toString(16).substr(1));var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=(t[e[i+0]]+t[e[i+1]]+t[e[i+2]]+t[e[i+3]]+"-"+t[e[i+4]]+t[e[i+5]]+"-"+t[e[i+6]]+t[e[i+7]]+"-"+t[e[i+8]]+t[e[i+9]]+"-"+t[e[i+10]]+t[e[i+11]]+t[e[i+12]]+t[e[i+13]]+t[e[i+14]]+t[e[i+15]]).toLowerCase();if(!validate(o))throw TypeError("Stringified UUID is invalid");return o}var Vidjet=function(){var e,t,i,o,n,a,s,r,d,c,l,m=/(tablet|ipad|playbook|silk|kindle)/i.test(navigator.userAgent)||/(android(?!.*mobi))|Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|(hpw|web)OS|Opera M(obi|ini)/i.test(navigator.userAgent),u=!1,p=!1,f=!1,g=[],h={},y=!1,v=!1,b=120;const w=40,_=40;let j=0;var I={landing:0,exit:1,scroll:2,delay:3},x=0,E=1;function _setAnalytics(){const e=document.getElementById("vidjet"),t=e?e.src:"",i=new URL(t).searchParams;o=i.get("siteId"),function(){const e=document.getElementById("vidjet"),t=e?e.src:"";t.includes("app-api.vidjet.io")||t.includes("/client-app.js")?(a="https://app-api.vidjet.io",s="https://player.vidjet.io"):t.includes("dev-app-api.vidjet.io")||t.includes("/dev-client-app.js")?(a="https://dev-app-api.vidjet.io",s="https://dev-player.vidjet.io"):t.includes("localhost")||t.includes("/local-client-app.js")?(a="http://localhost:3000",s="https://localhost:8080"):(a="https://app-api.vidjet.io",s="https://player.vidjet.io")}();const d=_getCookie("vidjet-sessionId");_setCookie("vidjet-sessionId",r=d||function(e,t,i){var o=(e=e||{}).random||(e.rng||rng)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){i=i||0;for(let e=0;e<16;++e)t[i+e]=o[e];return t}return stringify(o)}(),1),n={url:location.href,sessionId:r,productId:"81c4adfb-15f0-47db-8b5e-4e5135dfb808"===o?("undefined"!=typeof cdcDatalayer&&cdcDatalayer?.ecommerce?.items?.length&&cdcDatalayer.ecommerce.items[0].item_id)+"_"+(prestashop.page.body_classes["lang-fr"]?"fr":"en"):"product"===window?.ShopifyAnalytics?.meta?.page?.resourceType&&window.ShopifyAnalytics?.meta?.page?.resourceId||window.id_product||"undefined"!=typeof cdcDatalayer&&cdcDatalayer?.ecommerce?.items?.length&&cdcDatalayer.ecommerce.items[0].item_id||window._idp||window.productObject?.id||document.querySelector("[data-product_id]")?.getAttribute("data-product_id")||document.querySelector("meta.wooptpmProductId")?.getAttribute("data-id")}}function _integrateManualIfNeeded(){if(!(t=e,0===Object.keys(t).length&&t.constructor===Object||e.integration)){_makeRequest("/website/integrate",{siteId:e&&e._id,integrationDate:(new Date).toISOString(),integration:"manual",websiteUrl:window.location.protocol+"//"+window.location.hostname})}var t}function _isWarmangoProductCampaign(e,t){if("383ece2b-e9a7-4e37-a0a2-5f42d0a1009b"!==e)return!1;return!["d7dfa072-fb6d-48ea-9b1d-b8bb576435bd","618bf347-b02b-43d4-9ffa-079318639735","a246fc8d-fd05-4f2e-886b-fac3065d89bd"].includes(t)}function _setIframeSize(e){let t=function(e){const{mobile:t,tablet:i,desktop:o,bigDesktop:n,giantDesktop:a}={mobile:{square:.8,portrait:.65,landscape:.95},tablet:{square:.6,portrait:.3,landscape:.7},desktop:{square:.35,portrait:.25,landscape:.5},bigDesktop:{square:.3,portrait:.2,landscape:.4},giantDesktop:{square:.25,portrait:.2,landscape:.3}},s=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),r=function({height:e,width:t}){return e/t>.9&&e/t<1.2?"square":e>t?"portrait":"landscape"}(e);switch(!0){case s<=480:return s*t[r];case s<=768:return s*i[r];case s<=1024:return s*o[r];case s<=1680:return s*n[r];default:return s*a[r]}}(e);const i=c.hideBubble||m,o=y?0:30,n=i?0:b||120,{width:a,height:s}=e;return iframeHeight=s/(a/t)+o+n,{iframeWidth:t,iframeHeight:iframeHeight}}function _setBubbleSize(){if(b=b||90,"original"===c.bubbleShape){const{width:e,height:t}=h,i=e/t;return i<1?{width:b,height:b/i}:{width:b*i,height:b}}return{width:b,height:b}}function _limitOffset(e){const{height:t,width:i}=h;if(0===e.moveX&&0===e.moveY)return{offsetX:0,offsetY:0};const{iframeWidth:o,iframeHeight:n}=v?_setIframeSize({width:i,height:t}):_setBubbleSize(),a=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)-20,s=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)-20;let{moveX:r,moveY:d}=e;const c=d+n,l=r+o;return c>a&&(d-=c-a),l>s&&(r-=l-s),{offsetX:r,offsetY:d}}function _addElement(e,t,i,o,n,a){if(c.isStickyBar)return _sendEvent("display"),function(e,t,i,o,n){const a=document.createElement("div"),{backgroundColor:s,textColor:r,text:d}=c.stickyBarOptions,{moveY:l}=o;a.classList.add("vidjet-stickyBar"),a.id="vidjet-stickybar",a.style["background-color"]=s,l&&(a.style.bottom=`${l||20}px`),a.innerHTML=`\n
\n
\n \n ${d}\n
\n
\n \n
\n
\n `,document.body.appendChild(a),document.getElementById("vidjet-stickybar-open-video").addEventListener("click",(function(){a.classList.add("vidjet-hidden"),_addIframe(e,t,i,o,n)})),document.getElementById("vidjet-stickybar-close").addEventListener("click",(function(){a.classList.add("vidjet-hidden")}))}(e,t,i,o,n);_addIframe(e,t,i,o,n)}function _addIframe(t,i,o,a,d,u){const{campaignType:p}=t||{},{offsetX:f,offsetY:g}=_limitOffset(a);if(!document.querySelectorAll(".vidjet-iframe").length){let t=document.createElement("iframe");var v=new URL(`${s}/${i}/${o}`);const a="popup"===p;v.searchParams.set("sessionId",r),v.searchParams.set("device",m?"mobile":"desktop"),v.searchParams.set("url",n.url),v.searchParams.set("isDynamicFormat",_isDynamicFormat(c)),n.productId&&v.searchParams.set("productId",n.productId),t.classList.add("vidjet-iframe"),t.title="Vidjet video player",t.allow="clipboard-read; clipboard-write; fullscreen",t.style.border="none",t.style.position="fixed";const u=10;if(t.style.bottom=a?0:g?`${g}px`:`${u}px`,t.style.display="block",y&&(t.style.borderRadius="10px"),"right"!==p||a?"left"!==p||a?a?t.classList.add("vidjet-popup"):t.style.left=f?`${f}px`:0:t.style.left=f?`${f}px`:`${u}px`:t.style.right=f?`${f}px`:`${u}px`,t.style.zIndex="4815162342","3b552290-2fcf-4b40-84bb-eb6c0118d821"===i?t.style.zIndex="2147483646":"4eb27fa9-2ff9-4c62-8a74-184ded24bb80"===i&&(t.style.zIndex="29"),t.src=v.toString(),!a)if(d&&!c.isFullScreen){const{iframeWidth:e,iframeHeight:i}=_setIframeSize(h);t.style.width=`${e}px`,t.style.height=`${i}px`}else{const{width:e,height:i}=_setBubbleSize();t.style.width=`${e+w}px`,t.style.height=`${i+_}px`}if(_isWarmangoProductCampaign(i,o))return t.style.position="absolute",document.getElementsByClassName("media-viewer__image-link")[0].style.position="relative",void document.getElementsByClassName("media-viewer__image-link")[0].appendChild(t);document.body.appendChild(t);const b={action:"widgetToDisplay",data:{campaign:l,site:e}};t.onload=function(){t.contentWindow.postMessage(b,"*")}}}function _handleAddToCartEvent(t){switch(e.integration){case"shopify":!function(e){let t={items:[{id:e.variantId,qty:e.qty||1}]};fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}(t);break;case"woocommerce":window.vidjetAddToCart(t),t.isBuyNow&&(window.location.href=window.vidjetcheckoutUrl);break;case"prestashop":!function(e){const t=window.prestashop&&prestashop.static_token,i=window.prestashop&&prestashop.urls?.pages?.cart||location.origin;var o="controller=cart&add=1&action=update&ajax=true&qty="+(e.qty||1)+"&token="+t+"&id_product="+e.productId+"&ipa="+e.variantId;$.post(i,o,null,"json").then((t=>{window.prestashop&&prestashop.emit("updateCart",{reason:{},resp:t}),e.isBuyNow&&(window.location.href=window.prestashop&&prestashop.urls?.pages?.order||location.origin+"/order")})).fail((e=>{window.prestashop&&prestashop.emit("handleError",{eventType:"addProductToCart",resp:e})}))}(t)}if("9b37caa1-347d-4e4f-8478-1c4126fb9f7e"===o){const e=[document.querySelector(".vidjet-iframe"),...document.querySelectorAll(".vidjet-embed-iframe")],t={action:"scriptCloseEvent"},i=e.filter((e=>e));i.length>0&&i.forEach((e=>{e.contentWindow.postMessage(t,"*")})),document.dispatchEvent(new CustomEvent("cart:refresh"));const o=document.querySelector("cart-drawer");o&&!o.hasAttribute("open")&&o.show(),document.dispatchEvent(new CustomEvent("cart:refresh"))}}async function _getCartItems(){if("shopify"===e.integration){return(await async function(){const e=await fetch("/cart.json");if(200===e.status)return e.json();console.log(`Failed to get request, Shopify returned ${e.status} ${e.statusText}`)}()).items.map((e=>({productId:e.id,variantId:e.variant_id,quantity:e.quantity})))}}function _reactToPlayerEvent(t){const{origin:i,properties:o}=t&&t.data,a=document.querySelectorAll(".vidjet-iframe, .vidjet-embed-iframe"),s=Array.from(a).find((e=>e.contentWindow===t.source));if(!s)return;const r=document.querySelector(".vidjet-iframe")||document.querySelector(".vidjet-embed-iframe");if(r)if("closeMainPlayer"===i){if(o&&o.currentVideoId&&"original"===c.bubbleShape){const e=g.find((e=>e._id===o.currentVideoId));h={height:e.height,width:e.width}}if(v=!1,setTimeout((()=>{const{width:e,height:t}=_setBubbleSize();r.style.width=`${e+w}px`,r.style.height=`${t+_}px`}),500),c.isFullScreen){document.querySelectorAll(".vidjet-body").forEach((e=>e.classList.remove("vidjet-body"))),r.classList.remove("vidjet-fullscreen"),window.scrollTo(0,j);const e=10;r.style.bottom=c.moveY?`${c.moveY+e}px`:`${e}px`,r.style.display="block",1===c.position?(r.style.left="unset",r.style.right=c.moveX?`${c.moveX+e}px`:`${e}px`):0===c.position&&(r.style.right="unset",r.style.left=c.moveX?`${c.moveX+e}px`:`${e}px`)}}else if("openMainPlayer"===i)if(v=!0,y&&(h={width:1080,height:1920}),c.isFullScreen)r.style.height="100%",r.style.width="100%",r.style.bottom="0px",r.style.right="0px",r.style.left="0px",r.classList.add("vidjet-fullscreen"),_injectCssFullScreen();else{if(_isWarmangoProductCampaign(e._id,l._id))return r.style.width="auto",void(r.style.height="100%");const{iframeWidth:t,iframeHeight:i}=_setIframeSize(h);r.style.width=`${t}px`,r.style.height=`${i}px`}else if("destroyIframe"===i)setTimeout((()=>{_destroyIframe(),c?.isStickyBar&&document.getElementById("vidjet-stickybar")&&document.getElementById("vidjet-stickybar").classList.remove("vidjet-hidden")}),500);else if("getCartItems"===i)!async function(){const e=[document.querySelector(".vidjet-iframe"),...document.querySelectorAll(".vidjet-embed-iframe")],t={action:"sendCartItems",data:await _getCartItems()},i=e.filter((e=>e));i.length>0&&i.forEach((e=>{e.contentWindow.postMessage(t,"*")}))}();else if("addToCart"===i)_handleAddToCartEvent(o);else if("killIframe"===i){const e=document.querySelector(`iframe[data-vidjet-campaign-id="${o.campaignId}"]`);e?.parentElement?.remove()}else if("getAnalytics"===i){const e={action:"getAnalytics",data:n};r.contentWindow.postMessage(e,"*")}else if("openFullScreen"===i)!function(e){const t=".vidjet-fullscreen { \n position: fixed !important; \n height: 100% !important; \n width: 100% !important; \n z-index: 2147483647; \n top: 0; \n right: 0; \n bottom: 0px; \n left: 0px; \n max-height: none !important; \n margin: 0 !important\n } ",i=document.createElement("style");i.innerText=t,document.head.appendChild(i),window.scrollY&&(j=window.scrollY),e&&!Array.from(e.classList).includes("vidjet-fullscreen")&&e.parentElement.classList.add("vidjet-fullscreen");const o=document.querySelectorAll(".vidjet-iframe");o.forEach((e=>{e.style.display="none"}))}(s),_injectCssFullScreen();else if("closeFullScreen"===i)!function(){document.querySelectorAll(".vidjet-body").forEach((e=>e.classList.remove("vidjet-body"))),document.querySelectorAll(".vidjet-fullscreen").forEach((e=>e.classList.remove("vidjet-fullscreen"))),window.scrollTo(0,j);const e=document.querySelectorAll(".vidjet-iframe");e.forEach((e=>{e.style.display="block"}))}();else if("carouselHeight"===i){_targetCarousels(o.campaignId).forEach((e=>{e.parentElement.style.height=`calc(${o.carouselHeight}px + 32px)`,e.parentElement.style.paddingBottom="0"}))}else"youtubeThumbnailClicked"===i&&document.querySelector("#videos")?.scrollIntoView({behavior:"smooth"})}function _targetCarousels(e){let t=document.querySelectorAll(".vidjet-embed-iframe");t=Array.prototype.slice.call(t);let i=[];return 1===t.length?t:(i=t.filter((t=>t?.dataset?.vidjetCampaignId?t.dataset.vidjetCampaignId===e:t?.dataset?.src?.includes("vidjet.io")?t.dataset.src.includes(e):t?.attributes?.src?.value?.includes(e))),i)}function _injectCssFullScreen(){if("object"!=typeof Array.from(document.head.querySelectorAll("style")).find((e=>"vidjet-body"===e.id))){const e=".vidjet-body {\n position: fixed;\n top: 0;\n left: 0;\n overflow: hidden;\n height: 100vh;\n width: 100vw;\n background-color: white;\n color: white;\n }\n .vidjet-body *:not(.vidjet-fullscreen) {z-index: unset !important;} ",t=document.createElement("style");t.setAttribute("id","vidjet-body-style"),t.innerText=e,document.head.appendChild(t)}document.querySelector("body").classList.add("vidjet-body"),document.querySelector("html").classList.add("vidjet-body"),window.scrollTo(0,1)}function _decryptParams(e){let t={};return 0===e?.formatType?t.campaignType="popup":1===e?.formatType&&(0===e?.position&&(t.campaignType="left"),1===e?.position&&(t.campaignType="right")),e?.isFullScreen&&(t.isFullScreen="fullscreen"),t}function _setCookie(e,t,i){var o="";if(i){var n=new Date;n.setTime(n.getTime()+60*i*60*1e3),o="; expires="+n.toUTCString()}document.cookie=e+"="+(t||"")+o+"; path=/"}function _getCookie(e){for(var t=e+"=",i=document.cookie.split(";"),o=0;o1?(y=!0,h={width:1080,height:1920}):h={width:e.videos[0].width,height:e.videos[0].height},v=c.openByDefault&&!c.isFullScreen);const{moveX:r,moveY:d,bubbleSize:w}=c||{},_={siteId:a,_id:s,videoOriginalSize:h,moveX:r,moveY:d,isPlayerOpen:v,bubbleSize:w};b=w,e.isBulk||function(){const e=_getCookie(`vidjet_view_${l._id}`),t=e?parseInt(e)+1:1;_setCookie(`vidjet_view_${l._id}`,t,l.segmentation.viewRestriction.notShownTime+1),t>=l.segmentation.viewRestriction.maxView&&(_setCookie(`vidjet_timing_${l._id}`,new Date((new Date).getTime()+1e3*l.segmentation.viewRestriction.notShownTime*3600).toISOString(),l.segmentation.viewRestriction.notShownTime+1),_deleteCookie(`vidjet_view_${l._id}`))}(),e?.segmentation?.trigger?.type&&e.segmentation.trigger.type!==t?e.segmentation.trigger.type===i?(document.addEventListener("mouseout",(e=>{_onExitIntent(e,_)})),m&&document.addEventListener("scroll",(e=>{_onExitIntent(e,_)}))):e.segmentation.trigger.type===o?window.addEventListener("scroll",(function(t){p||(window.requestAnimationFrame((function(){!function(e,t){let i=document.documentElement,o=document.body,n="scrollTop",a="scrollHeight",s=(i[n]||o[n])/((i[a]||o[a])-i.clientHeight)*100;const{siteId:r,_id:d,moveX:l,moveY:m,isPlayerOpen:u,bubbleSize:p}=t;s>=e.segmentation.trigger.option&&!f&&(_addElement(_decryptParams(c),r,d,{moveX:l,moveY:m},u),f=!0)}(e,_),p=!1})),p=!0)}),!0):e.segmentation.trigger.type===n&&setTimeout((()=>{_addElement(_decryptParams(c),a,s,{moveX:r,moveY:d},v)}),1e3*(e.segmentation.trigger.option||10)):_addElement(_decryptParams(c),a,s,{moveX:r,moveY:d},v)}let S=0;const _onExitIntent=(e,t)=>{const{siteId:i,_id:o,moveX:n,moveY:a,isPlayerOpen:s,bubbleSize:r}=t;if(e.clientY<50&&null==e.relatedTarget&&"select"!==e.target.nodeName.toLowerCase())document.removeEventListener("mouseout",(e=>{console.log(e,"removed")})),_addElement(_decryptParams(c),i,o,{moveX:n,moveY:a},s);else if("scroll"==e.type){let e=window.pageYOffset||document.documentElement.scrollTop;e+50{console.log(e,"removed")})),_addElement(_decryptParams(c),i,o,{moveX:n,moveY:a},s)),S=e<=0?0:e}};function _deleteCookie(e){document.cookie=e+"=; Max-Age=-99999999;"}function _destroyIframe(){if(document.querySelector(".vidjet-iframe")){return document.querySelector(".vidjet-iframe").remove()}}function _makeRequest(e,t){var i=new XMLHttpRequest,o=a+e;i.open("POST",o,!0),i.setRequestHeader("Content-Type","application/json"),i.send(JSON.stringify(t))}function _sendAnalyticsToIframes(){const e=[...document.querySelectorAll(".vidjet-embed-iframe")],t={action:"getAnalytics",data:n};(d=e.filter((e=>e))).length>0&&d.forEach((e=>{e.contentWindow.postMessage(t,"*")}))}function _sendEvent(t,i){const o={siteId:e._id,campaignId:l&&l._id,sessionId:r,type:t,date:(new Date).toISOString(),device:m?"mobile":"desktop",params:i};if("cartCreated"===t){const e=_getCookie("vidjet_cart_id");e&&(o.cartId=e)}_makeRequest("/track-event",o)}function _exclusiveTimeClientBulkInGalery(t){const i=m?"touchend":"click";document.getElementsByClassName("magic-slide mt-active")[0].insertAdjacentHTML("afterend",'');const o=document.getElementsByClassName("magictoolbox-selector mz-thumb");for(let e of o)e.addEventListener(i,(()=>{document.getElementsByClassName("magic-slide mt-active")[0].style.display="block",document.getElementsByClassName("magic-slide mt-active vidjet-toggle")[0].style.display="none";const e=document.getElementsByClassName("magictoolbox-selector mz-thumb vidjet-toggle")[0];e.classList.remove("active-selector"),e.classList.remove("mz-thumb-selected")}));const n=document.createElement("a");n.innerHTML=`Audemars Piguet Royal Oak - 14img-1`,n.firstChild.addEventListener(i,(()=>{document.getElementsByClassName("magic-slide mt-active")[0].style.display="none",document.getElementsByClassName("magic-slide mt-active vidjet-toggle")[0].style.display="block";const e=document.getElementsByClassName("magictoolbox-selector mz-thumb active-selector")[0];e&&e.classList.remove("active-selector"),e&&e.classList.remove("mz-thumb-selected");const t=document.getElementsByClassName("magictoolbox-selector mz-thumb vidjet-toggle")[0];t.classList.add("active-selector"),t.classList.add("mz-thumb-selected")})),document.getElementsByClassName("magictoolbox-selector mz-thumb")[document.getElementsByClassName("magictoolbox-selector mz-thumb").length-1].parentNode.appendChild(n.firstChild);const a=document.querySelector(`iframe[data-vidjet-campaign-id="${t._id}"]`);a&&a.addEventListener("load",(function(){_sendAnalyticsToIframes();const i={action:"widgetToDisplay",data:{campaign:t,site:e}};a.contentWindow.postMessage(i,"*")}))}function _addResizeListener(){let e;window.addEventListener("resize",(function(t){clearTimeout(e),e=setTimeout((function(){!function(){if(!c)return;if("popup"===_decryptParams(c).campaignType)return;let{iframeWidth:e,iframeHeight:t}=_setIframeSize(h);const i={moveX:c.moveX,moveY:c.moveY},{offsetX:o,offsetY:n}=_limitOffset(i);if(v)_resizeIframe(e,t,o,n);else{const{width:e,height:t}=_setBubbleSize();_resizeIframe(e+w,t+_,o,n)}}()}),250)}),!0)}function _resizeIframe(e,t,i,o){const n=document.querySelector(".vidjet-iframe");if(n){const{campaignType:a}=_decryptParams(c),s="popup"===a,r=10;"right"!==a||s?"left"!==a||s||(n.style.left=i?`${i}px`:`${r}px`):n.style.right=i?`${i}px`:`${r}px`,n.style.bottom=s?0:o?`${o}px`:`${r}px`,n&&(n.style.width=`${e}px`,n.style.height=`${t}px`)}}function _isDynamicFormat(e){return e.formats?1===e.formats[0].formatType||0===e.formats[0].formatType:1===e.formatType||0===e.formatType}return{init:async function(){if(_setAnalytics(),_sendAnalyticsToIframes(),window.addEventListener("message",(e=>{"vidjet"===e.data.messageOrigin&&_reactToPlayerEvent(e)}),!1),function(){if("1f3f4a1f-b5cf-41c9-8906-be1aeebde3e1"===o){const i=[{url:"/ritual-fit",campaignId:"707e9af6-fc42-47e5-9c29-509b79964d0c",secondPath:"/ritual-fit/"},{url:"/vientre-plano",campaignId:"24189915-94f1-44de-8bdf-3f1cccfba7f5",secondPath:"/vientre-plano/"},{url:"/fitness",campaignId:"75ce73a6-65cb-48db-bbc5-0d8ee2d57401",secondPath:"/fitness/"}];for(const o of i)if(document.location.pathname===o.url||document.location.pathname===o.secondPath){var e=1,t=setInterval((function(){var i=document.getElementsByClassName("woocommerce-product-gallery__image")&&document.getElementsByClassName("woocommerce-product-gallery__image")[2];i&&(i.innerHTML=`\n
\n \n
`,clearInterval(t)),(e+=1)>=20&&clearInterval(t)}),100);break}}else if("15701a38-dae7-47d3-9881-cddf540b11a2"===o){const i=[{url:"https://atashicellular.com/antioxidante/587-tonico-regenerante-purificante.html",campaignId:"6c9e1a3b-f851-4d81-a280-162a175ad732"}];for(const o of i)if(document.location.href.includes(o.url)){e=1,t=setInterval((function(){var i=document.getElementsByClassName("product-lmage-large swiper-slide")&&document.getElementsByClassName("product-lmage-large swiper-slide")[2];i&&(i.innerHTML=`\n
\n \n
`,clearInterval(t)),(e+=1)>=20&&clearInterval(t)}),100);break}}}(),function(){let e=document.querySelector("style[data-vidjet]");if(e)return e.remove();{const e="";document.head.insertAdjacentHTML("beforeend",e)}}(),o){if(await async function(){const s=new URLSearchParams({...n,siteId:o,isMobile:m,sessionId:r});try{const o=await fetch(`${a}/widgets?${s.toString()}`,{method:"GET"}),n=await o.json();t=n.campaignsReturned,i=n.campaignIdsToKill,e=n.site}catch(e){console.error("Error fetching widget data:",e)}}(),e)if(e.isLocked)!function(){const e=[...document.querySelectorAll(".vidjet-video-wrapper"),...document.querySelectorAll(".vidjet-carousel-wrapper")];for(const t of e)t.remove()}();else if(function(){let i=!1;for(const n of t)if(_isDynamicFormat(n)){if(i)continue;if(c=m?n.formats.find((e=>e.deviceType===x)):n.formats.find((e=>e.deviceType===E)),!n.bulk){const e=_getCookie(`vidjet_timing_${n._id}`);if(e&&(new Date).getTime(){function updateIframeStyle(e){e.parentElement.style.height&&"0px"!==e.parentElement.style.height||(e.parentElement.style.height="125px"),"none"===e.parentElement.style.display&&(e.parentElement.style.display="")}e?.contentWindow?.postMessage(t,"*"),updateIframeStyle(e),e.addEventListener("load",(()=>{e?.contentWindow?.postMessage(t,"*"),updateIframeStyle(e)}))}))}}(),d.forEach((e=>{i.includes(e?.getAttribute("data-vidjet-campaign-id"))&&e?.parentElement?.remove()})),_integrateManualIfNeeded(),function(){var t=[{integration:"shopify",cookieName:"cart"},{integration:"woocommerce",cookieName:"vidjet_woo_cart_id"},{integration:"wix",cookieName:"vidjet_wix_cart_id"},{integration:"prestashop"}].find((t=>t.integration===e.integration));if(t){let e="prestashop"===t.integration?window.vidjetPreastshopCartId:_getCookie(t.cookieName);"2581441e-2743-4fd6-9c0e-e9f734fb551f"===o&&(e=_getCookie("woocommerce_cart_hash")),"shopify"===t?.integration&&e?.includes("key")&&(e.includes("%3Fkey")?e=e.split("%3Fkey")[0]:e.includes("?key")&&(e=e.split("?key")[0])),e&&e!==_getCookie("vidjet_cart_id")&&(_setCookie("vidjet_cart_id",e,1),_sendEvent("cartCreated"))}}(),c){const{isFullScreen:e}=_decryptParams(c);!e&&_addResizeListener()}}else console.error("Vidjet - No SiteId set in script url")},showCampaign:function(e,i){const o=t.find((t=>t._id==e));if(!o)return console.error(`Invalid campaign id for ${e}`);c=m?o.formats.find((e=>e.deviceType===x)):o.formats.find((e=>e.deviceType===E));const{isFullScreen:n}=_decryptParams(c);if(i)_destroyIframe(),u=!1,p=!1,f=!1,_displayIframeBasedOnTrigger(o),!n&&_addResizeListener();else{if(document.querySelectorAll(".vidjet-iframe").length)return console.warn('Campaign already running. To show this video, pass "true" as the second parameter to force show.');u=!1,p=!1,f=!1,_displayIframeBasedOnTrigger(o),!n&&_addResizeListener()}},initSpa:function(){const e=this;let t=location.href;setInterval((function(){t!=location.href&&(console.log("VIDJET: page change detected"),_destroyIframe(),u=!1,p=!1,f=!1,e.init(),t=location.href)}),500)},send:function(e,t){return"conversion"===e||"order"===e?_sendEvent(e,t):console.warn(`The '${e}' type is not supported. Please use a valid event type.`)}}}();document&&("complete"===document.readyState||(document.location.href.includes("https://elifexir.com")||document.location.href.includes("https://atashicellular.com")||document.location.href.includes("https://www.lafloreparis.com/")||document.location.href.includes("https://www.coolgadget.com/"))&&"interactive"===document.readyState)?(console.log("VIDJET: document loaded"),Vidjet.init()):window.addEventListener("load",(e=>{console.log("VIDJET: window loaded"),Vidjet.init()}));