if (typeof __mpu == 'undefined') var __mpu = [`69516`, `organizedbyl.com`];
window.addEventListener('load', function() {

      let hostb4 = __mpu[1].toLowerCase();
      let hostcr = document.location.host.toLowerCase();
      if (hostb4.slice(0, 4) === 'www.') hostb4 = hostb4.slice(4);
      if (hostcr.slice(0, 4) === 'www.') hostcr = hostcr.slice(4);

      if (__mpu[0] != `69516`) return;
      if (hostb4 != hostcr) return;

      // start popup html
      var styleEl = document.createElement('style');
var styleElCustomCss = document.createElement('style');
var styleButtonForOwner = document.createElement('style');
var linkEl  = document.createElement('link');
var scriptEl  = document.createElement('script');
var adBanner  = document.createElement('div');
var formInputStyle = document.createElement('style');

styleElCustomCss.innerHTML = ``;
styleEl.innerHTML = `
    #mypopups-substrate-140834 {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 100%;
        font: inherit;
        vertical-align: baseline;
        text-transform: none;
    }
    .mypopups-substare p{
    margin-top: 0;
    margin-bottom: 0;
    }
    .mypopups-substare :focus {
        outline: 0;
    }
    .mypopups-substare ol, .mypopups-substare ul {
        list-style: none;
    }
    .mypopups-substare em{
        font-style: italic !important;
    }
    .mypopups-substare p:not(:first-child) {
       line-height: normal;
    }
    .mypopups-substare blockquote, .mypopups-substare q {
        quotes: none;
    }
    .mypopups-substare blockquote:before, .mypopups-substare blockquote:after,
    .mypopups-substare q:before, .mypopups-substare q:after {
        content: '';
        content: none;
    }
    .mypopups-substare  button {
        text-transform: none;
        background-image: none;
    }
    .mypopups-substare input{
        padding: 0;
        max-width: none !important;
    }
    .mypopups-substare {
        display: none;
    }
    .mypopups-substare .div[data-vimeo-initialized] iframe, .mypopups-substare .vimeo-pl-mp {
        width: 100%;
        height: 100%;
    }
    .mypopups-substare .text-linked {
        color: #1daa7e !important;
        cursor: pointer;
        text-decoration: none;
    }
    .mypopups-substare .text-linked:hover {
        color: #363636 !important;
    }
    @media (max-width: 768px) {
                #mypopups-substrate-140834 {
            display: none !important;
        }
            }
    @media (min-width: 768px) {
        }
`;

const nowd = new Date();
var styleLink = 'https://mypopups.com/embed/style.css?r=' + Math.floor((new Date(nowd.getFullYear(), nowd.getMonth(), nowd.getDate()).getTime() / 1000));

var googleFonts = `https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Archivo:ital,wght@0,400;0,700;1,400;1,700&family=Arvo:ital,wght@0,400;0,700;1,400;1,700&family=Cardo:ital,wght@0,400;0,700;1,400&family=Concert+One&family=Cormorant+Garamond:ital,wght@0,400;0,700;1,400;1,700&family=Fjalla+One&family=Frank+Ruhl+Libre:wght@400;500;700;900&family=Karla:ital,wght@0,400;0,700;1,400;1,700&family=Lato:ital,wght@0,400;0,900;1,400;1,900&family=Lora:ital,wght@0,400;0,700;1,400;1,700&family=Montserrat:ital,wght@0,400;0,800;1,400;1,800&family=Oswald:wght@400;700&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,400;0,800;1,400;1,800&family=Rakkas&family=Roboto:ital,wght@0,400;0,900;1,400;1,900&family=Rubik:ital,wght@0,400;0,900;1,400;1,900&family=Source+Sans+Pro:ital,wght@0,400;0,900;1,400;1,900&family=Spectral:ital,wght@0,400;0,800;1,400;1,800&family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&family=Work+Sans:ital,wght@0,400;0,800;1,400;1,800&family=Yatra+One&display=swap`;
var fontsLink = googleFonts;

var styles = document.createElement('link');
var googleFontsLinkEl = document.createElement('link');

googleFontsLinkEl.setAttribute('href', fontsLink);
googleFontsLinkEl.setAttribute('rel', 'stylesheet');
googleFontsLinkEl.setAttribute('type', 'text/css');

styles.setAttribute('rel', 'stylesheet');
styles.setAttribute('type', 'text/css');
styles.setAttribute('href', styleLink);

document.head.appendChild(styles);
document.head.appendChild(googleFontsLinkEl);
document.head.appendChild(formInputStyle);

styleButtonForOwner.innerHTML = `
    @font-face {
        font-family: "ProximaNova-Lt";
        src: url('https://mypopups.com/fonts/ProximaNova-Light.woff2');
        font-weight: normal;
        font-style: normal;
    }
    @font-face {
        font-family: "Proxima Nova Rg";
        src: url('https://mypopups.com/fonts/ProximaNova-Regular.woff2');
        font-weight: normal;
        font-style: normal;
    }

    .test-wrp {
        width: 278px;
        box-shadow: 0 5px 30px rgba(61, 63, 86, 0.25);
        border-radius: 5px;
        background-color: #fff;
        display: flex;
        z-index: 35;
        align-items: center;
        flex-direction: column;
    }
    .test-wrp .test-title {
        color: #808191;
        font-size: 15px;
        font-weight: 600;
        padding-top: 20px;
        padding-bottom: 11px;
    }
    .test-wrp .test-description {
        color: #808191;
        font-size: 13px;
        font-weight: 400;
        line-height: 20px;
        width: 230px;
        text-align: center;
        padding-bottom: 11px;
    }
    .test-wrp .test-btn {
        width: 141px;
        height: 39px;
        border-radius: 5px;
        background-color: #1eaa7e;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        font-family: Helvetica, Arial, sans-serif;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .test-wrp .test-bottom {
        color: #b9b9bd;
        font-size: 11px;
        font-weight: 400;
        line-height: 20px;
        padding-top: 11px;
        padding-bottom: 9px;
    }
`;

scriptEl.type = 'text/javascript';
linkEl.rel  = 'stylesheet';
linkEl.type = 'text/css';
linkEl.href = "https://mypopups.com/static/libraries/animate/animate.css";
linkEl.media = 'all';
adBanner.className = 'adBanner';
adBanner.style.height = '1px';
adBanner.style.width = '1px';
adBanner.style.background = 'transparency';
document.querySelector('head').appendChild(styleEl);
document.querySelector('head').appendChild(styleElCustomCss);
document.querySelector('head').appendChild(styleButtonForOwner);
document.querySelector('head').appendChild(linkEl);
document.querySelector('body').appendChild(adBanner);
document.querySelector('body').appendChild(scriptEl);
      let toPrepend = `<div style="visibility: hidden;"><div id="mypopups-substrate-140834" class="mypopups-substare" positioning="center" mobile="0" data-popuptype="desktop" style='position: fixed; justify-content: center; align-items: center; z-index: 999999999; inset: 0px; background-image: url("null"); background-color: rgba(180, 180, 180, 0); background-repeat: no-repeat; background-size: cover; background-position: center center; width: 100vw !important; height: 100vh !important;'><div id="mypopups-modal-140834" class="mypopups-modal" style="width: 650px; height: 454px; position: fixed; animation: 1s ease 0s 1 normal none running flash;"><div class="mypopups-container" data-id="0" style="height: 100%; width: 100%; position: relative; overflow: hidden;"><div style='background-image: url("null"); background-color: rgba(255, 255, 255, 0); opacity: 0; background-repeat: no-repeat; background-position: center center; background-size: cover; width: 100%; height: 100%;'></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":true,"attachedToLeft":true,"attachedToRight":true,"notAttached":{"h":454,"w":650,"t":68,"l":0}}' style="box-sizing: content-box; transform: rotate(0deg); border-radius: 0px; z-index: 1; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 0px; top: 68px; width: 650px; height: 386px; min-width: 10px; min-height: 10px;"><div style='width: calc(100% + 2px); height: calc(100% + 2px); outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/c35ae7b8893adcc567be2f9aa987e0b4.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 1; background-color: transparent; box-sizing: initial; border-radius: 0px; padding: 0px; margin-top: -1px; margin-left: -1px; box-shadow: none; border: none; position: initial;'></div></div><div class="base-element" onclick="(function(element, id, event) {

            var container = this.closest('.mypopups-substare');
            var baseElement = this.closest('.base-element');
            var modal = document.getElementById('mypopups-modal-' + id);

            var youtube = document.getElementsByClassName('youtube-pl-mp');
            var clickedOnModal = modal.contains(event.target);
            var clickedOnThisElement = event.target === this;


						if (baseElement || container &amp;&amp; clickedOnThisElement) {
							container.style.display = 'none';
							var onClosePreviewEvent = new CustomEvent(&quot;onClosePreview&quot;);
							container.dispatchEvent(onClosePreviewEvent);



							var youtubeLength = youtube.length;

							 for (var i = 0; i &lt; youtubeLength; i++)
							 youtube[i].src = youtube[i].src;


							 window['hideModal140834']();
						}

        }).call(this, this, '140834', event);" full-screen-positions='{"attachedToTop":false,"attachedToBottom":true,"attachedToLeft":false,"attachedToRight":true,"notAttached":{"h":454,"w":650,"t":"10","l":305}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 2; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 305px; top: 10px; width: 40px; height: 40px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/599bd4a57627aa86523a08d6067786cf.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 2; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":82,"l":373}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 3; position: absolute; animation-name: backInUp; animation-delay: 0s; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 373px; top: 82px; width: 234px; height: 355px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/f50f3100e9d7178cfc6dfdf21da7605e.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 3; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":95,"l":26}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 4; position: absolute; animation-name: flash; animation-delay: 0s; animation-duration: 2s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 26px; top: 95px; width: 288px; height: 235px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/6ac9d0c085cb52047069b7926eedbbd6.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 4; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":true,"attachedToLeft":true,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":321,"l":0}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 5; position: absolute; opacity: 1; animation-name: none; animation-delay: 0s; animation-duration: 2s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 0px; top: 321px; width: 170px; height: 133px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/69759b487b7a31569fe0a3801b344de5.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 5; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":true,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":352,"l":170}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 6; position: absolute; opacity: 1; animation-name: none; animation-delay: 0.3s; animation-duration: 2s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 170px; top: 352px; width: 136px; height: 102px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/bafa1c2af4f5db22f496c86cdde734fc.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 6; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":64,"l":316}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 7; position: absolute; animation-name: fadeInDown; animation-delay: 0.6s; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 316px; top: 64px; width: 63px; height: 157px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/6593d20741bb81d4f0b4f93418798798.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 7; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":65,"l":571}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 8; position: absolute; animation-name: fadeInDown; animation-delay: 0.9s; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 571px; top: 65px; width: 64px; height: 157px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/a6bed62785d96cfb9bc7d75cbc9cc05a.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 8; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":67,"l":583}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 9; position: absolute; animation-name: fadeInDown; animation-delay: 1.2s; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 583px; top: 67px; width: 61px; height: 102px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/f86cb7f1641c1157532435cd821a4d36.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 9; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":68,"l":283}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 10; position: absolute; animation-name: fadeInDown; animation-delay: 0.3s; animation-duration: 1s; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 283px; top: 68px; width: 57px; height: 97px; min-width: 10px; min-height: 10px;"><div style='width: 100%; height: 100%; outline: none; background-image: url("https://mypopups.com/storage/themes/1/f/c/4612/63aa1b1630ffa0791b8b9f610a1e69a5.png"); background-size: 100% 100%; opacity: 1; transform: initial; z-index: 10; background-color: transparent; box-sizing: initial; box-shadow: none; border-radius: 0px; border: none; position: initial;'></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":120,"l":353}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 11; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 353px; top: 120px; width: 235px; height: 69px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 11; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><div style="line-height: 33px !important" data-line-height="true"><strong><em><span style="text-align: center; display: inline;" data-text-align="true"><span style="font-family: Montserrat; display: inline;" data-font-family="true"><span style="font-size: 26px; display: inline;" data-font-size="true"><span style="color: rgb(225, 176, 94); display: inline;" data-font-color="true"><span style="letter-spacing: 0px; display: inline;" data-letter-spacing="true">How was your session?</span></span></span><span style="font-size: 46px; display: inline;" data-font-size="true"><span style="color: rgb(225, 176, 94); display: inline;" data-font-color="true"><br></span></span></span></span></em></strong></div></div></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":204,"l":333}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 12; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 333px; top: 204px; width: 297px; height: 26px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 12; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><p><em>Leave us a Review for an</em></p></div></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":233,"l":372}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 13; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 372px; top: 233px; width: 219px; height: 32px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 13; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><p><strong><em><span style="text-align: center; display: inline;" data-text-align="true"><span style="font-family: Montserrat; display: inline;" data-font-family="true"><span style="font-size: 36px; display: inline;" data-font-size="true">EXTRA</span></span></span></em></strong></p></div></div></div><div class="base-element" onclick="(function(element, id, event) {

            var container = this.closest('.mypopups-substare');
            var baseElement = this.closest('.base-element');
            var modal = document.getElementById('mypopups-modal-' + id);

            var youtube = document.getElementsByClassName('youtube-pl-mp');
            var clickedOnModal = modal.contains(event.target);
            var clickedOnThisElement = event.target === this;


						if (baseElement || container &amp;&amp; clickedOnThisElement) {
							container.style.display = 'none';
							var onClosePreviewEvent = new CustomEvent(&quot;onClosePreview&quot;);
							container.dispatchEvent(onClosePreviewEvent);



							var youtubeLength = youtube.length;

							 for (var i = 0; i &lt; youtubeLength; i++)
							 youtube[i].src = youtube[i].src;


							 window['hideModal140834']();
						}

        }).call(this, this, '140834', event);" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":382,"l":385}}' style="box-sizing: content-box; transform: rotate(0deg); border-width: 10px; border-style: solid; border-radius: 26px; border-color: rgb(200, 0, 0); z-index: 14; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 385px; top: 382px; width: 184px; height: 24px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgb(200, 0, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; transform: initial; z-index: 14; box-sizing: initial; border: none; padding: 0px; box-shadow: none; position: initial;"><div style="width: 100%;"><p><strong><span style="text-align: center; display: inline;" data-text-align="true"><span style="font-family: Montserrat; display: inline;" data-font-family="true"><span style="font-size: 21px; display: inline;" data-font-size="true"><span style="color: rgb(255, 255, 255); display: inline;" data-font-color="true">Review OBL</span></span></span></span></strong></p></div></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":278,"l":389}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 15; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 389px; top: 278px; width: 133px; height: 81px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 15; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><p><strong><span style="text-align: center; display: inline;" data-text-align="true"><span style='font-family: "Source Sans Pro"; display: inline;' data-font-family="true"><span style="font-size: 106px; display: inline;" data-font-size="true"><span style="color: rgb(200, 0, 0); display: inline;" data-font-color="true"><span style="letter-spacing: -1px; display: inline;" data-letter-spacing="true">10</span></span></span></span></span></strong></p></div></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":291,"l":454}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 16; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 454px; top: 291px; width: 166px; height: 32px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 16; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><p><strong><span style="text-align: center; display: inline;" data-text-align="true"><span style="font-family: Montserrat; display: inline;" data-font-family="true"><span style="font-size: 55px; display: inline;" data-font-size="true"><span style="color: rgb(200, 0, 0); display: inline;" data-font-color="true"><span style="letter-spacing: 0px; display: inline;" data-letter-spacing="true">%</span></span></span></span></span></strong></p></div></div></div><div class="base-element" full-screen-positions='{"attachedToTop":false,"attachedToBottom":false,"attachedToLeft":false,"attachedToRight":false,"notAttached":{"h":454,"w":650,"t":335,"l":455}}' style="box-sizing: content-box; transform: rotate(0deg); z-index: 17; position: absolute; animation-name: undefined; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; left: 455px; top: 335px; width: 164px; height: 22px; min-width: 10px; min-height: 10px;"><div style="width: calc(100% + 2px); height: calc(100% + 2px); text-align: center; outline: none; display: flex; font-weight: normal; font-style: normal; font-family: Roboto; color: black; text-decoration: black; border-radius: 0px; background-color: rgba(255, 255, 255, 0); align-items: center; font-size: 15px; justify-content: center; line-height: normal; word-break: break-word; margin-top: -1px; margin-left: -1px; border: none; transform: initial; z-index: 17; box-sizing: initial; box-shadow: none; position: initial;"><div style="width: 100%;"><p><strong><span style="text-align: center; display: inline;" data-text-align="true"><span style="font-family: Montserrat; display: inline;" data-font-family="true"><span style="font-size: 26px; display: inline;" data-font-size="true"><span style="color: rgb(200, 0, 0); display: inline;" data-font-color="true"><span style="letter-spacing: -1px; display: inline;" data-letter-spacing="true">OFF</span></span></span></span></span></strong></p></div></div></div></div><div class="powered-by-link" style='bottom: -25px; display: block; width: 230px; position: absolute; left: 50%; transform: translateX(-50%); text-align: center; cursor: pointer; color: rgb(255, 255, 255); mix-blend-mode: exclusion; font-size: 13px; font-weight: 400; line-height: 1.5; font-family: "Proxima Nova Rg", Helvetica, Arial, sans-serif; z-index: 2147483647;'>
            Powered by
            <a href="https://mypopups.com" style="text-decoration:none; color:#fff; mix-blend-mode: exclusion;" target="_blank">
                MyPopUps
            </a>
        </div></div></div></div>`;

toPrepend = toPrepend.replace(/&quot;null&quot;/g, '');
toPrepend = toPrepend.replace(/&quot;undefined&quot;/g, '');
toPrepend = toPrepend.replace(/\"null\"/g, '');
toPrepend = toPrepend.replace(/\"undefined\"/g, '');
toPrepend = toPrepend.replace(/undefined/g, '&quot;&quot;');

document.body.insertAdjacentHTML('afterbegin', toPrepend);
document.querySelector('#mypopups-substrate-140834').style.display = 'none';

let img_rgx = new RegExp(`url\((?!['"]?(?:data):)['"]?([^'"\)]*)['"]?\)`, 'g');
let img_urls = toPrepend.match(img_rgx), img_loaded = false, img_length = img_urls.length;
let img_temp = [];

for (let i = 0; i < img_urls.length; i++) {
  let url = img_urls[i].slice(4)
                       .slice(0, -1)
                       .replace(/(\&quot\;)/g, '')
                       .replace(/(\&quot)/g, '');

  if (url && url != 'null' && url != 'undefined' && url.trim().length > 0) {
    img_temp[i] = new Image();
    img_temp[i].src = url;
    img_temp[i].onload = addIMGLoad;
    img_temp[i].onerror = addIMGLoad;
  } else img_length--;
}

function addIMGLoad() {
  img_loaded++;
  if (img_length == img_loaded)
    showThePopups();
}
if (img_length <= 0) showThePopups();

      // start video script
      var blockPlMp, elementPlMp, syoutube = document.createElement('script');
syoutube.setAttribute('src','https://www.youtube.com/player_api');
document.head.appendChild(syoutube);
window.onYouTubePlayerAPIReady = function() {
    blockPlMp = [];
    elementPlMp = document.querySelectorAll('.youtube-pl-mp');
    elementPlMp.forEach((element, i) => {
        blockPlMp[i] = 0;
        new YT.Player(element.id, {
            width: element.getAttribute('data-width'),
            height: element.getAttribute('data-height'),
            videoId: element.getAttribute('data-id'),
            playerVars : {
                autoplay: element.getAttribute('data-autoplay'),
                controls: element.getAttribute('data-controls'),

            },
            events: {
                onStateChange : function(event){
                    if(event.data == 0 && blockPlMp[i] == 0){
                        blockPlMp[i] = 1;
                        eval(element.getAttribute('data-action'));
                    }
                }
            }
        });
    });
}
      var svimeo = document.createElement('script');
svimeo.setAttribute('src','https://player.vimeo.com/api/player.js');
document.head.appendChild(svimeo);

svimeo.onload = function() {
   elementPlMp = document.querySelectorAll('.vimeo-pl-mp');
   elementPlMp.forEach((element, i) => {
        var id = element.id;
        var dataId = element.getAttribute('data-id');
        var width = element.getAttribute('data-width');
        var height = element.getAttribute('data-height');
        var autoplay = element.getAttribute('data-autoplay');
        var controls = element.getAttribute('data-controls');
        new Vimeo.Player(id, {
            id: dataId,
            width: width,
            height: height,
            autoplay: autoplay,
            controls: controls,
            loop: false
        }).on('ended', function(){
            eval(element.getAttribute('data-action'));
        });
    });
};
      // end video script

      // start display rules advanced script
      function mpu_get_stats_for_advanced_user_display() {

  function getEU() {
    let languagesEU = {
      bg: ['български', 'Bulgarian'],
      fr: ['français', 'French'],
      pl: ['polski', 'Polish'],
      cs: ['česky', 'Czech'],
      hr: ['hrvatski', 'Croatian'],
      pt: ['português', 'Portuguese'],
      da: ['dansk', 'Danish'],
      hu: ['magyar', 'Hungarian'],
      ro: ['română', 'Romanian'],
      de: ['Deutsch', 'German'],
      is: ['íslenska', 'Icelandic'],
      ru: ['pусский', 'Russian'],
      et: ['eesti', 'Estonian'],
      it: ['italiano', 'Italian'],
      sk: ['slovenčina', 'Slovak'],
      el: ['ελληνικά', 'Greek'],
      lt: ['lietuvių', 'Lithuanian'],
      sl: ['slovenščina', 'Slovenian'],
      es: ['español', 'Spanish'],
      lv: ['latviešu', 'Latvian'],
      sv: ['svenska', 'Swedish'],
      fi: ['suomi', 'Finnish'],
      nl: ['Nederlands', 'Dutch']
    }

    let userLanguages = JSON.parse(JSON.stringify(navigator.languages));
    let possibleLanguages = [];
    let euKeys = Object.keys(languagesEU);

    let systemInfo = Intl.DateTimeFormat().resolvedOptions();
    let systemLocale = systemInfo.locale;
    let systemTimezone = systemInfo.timeZone;
        systemInfo.browserLanguages = userLanguages;

    if (!userLanguages.includes(systemLocale)) {
      userLanguages.push(systemLocale);
    }

    for (let i = 0; i < userLanguages.length; ++i) {

      let language = userLanguages[i].toLowerCase();
      for (let j = 0; j < euKeys.length; ++j) {

        let languageKey = euKeys[j];
        if (language.includes(languageKey)) {
          let sL = languagesEU[languageKey];
          let languageName = sL[0][0].toUpperCase() + sL[0].slice(1);
          let languageEnglishName = sL[1];
          possibleLanguages.push(`${languageEnglishName} (${languageName})`);
        }

      }

    }

    let inEU = false;
    if (possibleLanguages.length > 0) {
      inEU = true;
    } else if (systemTimezone.includes('Europe')) {
      inEU = true;
    }

    return {
      inEU: inEU,
      sourceLang: userLanguages,
      sourceSys: systemInfo
    }
  }

  let data = {
    url: window.location,
    cpu: window.navigator.hardwareConcurrency || -1,
    screen: {
      w: window.screen.width,
      h: window.screen.height,
      wInner: window.innerWidth,
      hInner: window.innerHeight
    },
    eu: getEU(),
    type: 'S'
  }

  return data;

}
      // end display rules advanced script

      // start before rules
      window['isShowId140834'] = true;
let alredyCountedCoversion = false;
window['mpu_uuid_mypopups-substrate-140834'] = `5f9cadfe-b3ea-11ee-ab2e-309c23ce08f7`;

window['hideModal140834'] = function() {
    document.querySelector('#mypopups-substrate-140834').style.display = 'none';
    if (document.querySelector('#mypopups-substrate-140834').getAttribute('positioning') === 'full-screen') {
      document.body.style.overflow = `auto`;
    }
    localStorage.removeItem('time140834')
    checkPriority()

};
function checkPriority(){
     if(localStorage.getItem('mp-priority140834') === '3'){

                
                
                

       }
}
window['showModal140834'] = function() {

  if ((0 === 0 && window.innerWidth > 768) || (0 === 1 && window.innerWidth < 768)) {

    let currentPopup = document.querySelector(`#mypopups-substrate-140834`);

    document.querySelector('#mypopups-substrate-140834').style.display = 'flex';
    document.querySelector('#mypopups-modal-140834').setAttribute('timeopen', Math.round(Date.now() / 1000));

    window['setstat'](140834, 1, 0 , `5f9cadfe-b3ea-11ee-ab2e-309c23ce08f7`);

    if (document.querySelector('#mypopups-substrate-140834').getAttribute('positioning') === 'full-screen'){
        document.body.style.overflow = `hidden`;
        document.getElementsByClassName('powered-by-link')[0].style.bottom = '0px'
    }

  }

};

window['setstat'] = function(id, seen = 0, engaged = 0, uId = 0){
    var url = window.location.pathname;
    var datenow = Math.round(Date.now() / 1000);
    var stats = localStorage.getItem('statsid-'+id) || '{}';

    stats = JSON.parse(stats);

    if(!stats['url['+ url +']time-'+datenow]){
        stats['url['+ url +']time-'+datenow] = {"engaged":0,"seen":0,"time":0,"url":""};
        stats['url['+ url +']time-'+datenow].seen += seen;
        stats['url['+ url +']time-'+datenow].time = datenow;
        stats['url['+ url +']time-'+datenow].url = window.location.pathname;
        if(engaged > 0 && alredyCountedCoversion === false){
            stats['url['+ url +']time-'+datenow].engaged += engaged;
            alredyCountedCoversion = true;
        }
        localStorage.setItem('statsid-' + id, JSON.stringify(stats));
    }
    if (engaged > 0) {
        var convertedThemes = JSON.parse(localStorage.getItem('convertedThemes140834')) ? JSON.parse(localStorage.getItem('convertedThemes140834')) : [];
        if(!convertedThemes.some(themeId => themeId === id.toString()))
        convertedThemes.push(id.toString());
        localStorage.setItem('convertedThemes140834', JSON.stringify(convertedThemes));
    }
    sendStatistic(id, uId);
};

setTimeout(function () {
  sendStatistic(140834, 0, 'S');
  window.addEventListener('visibilitychange', function() {
    if (document.visibilityState === 'hidden') {
      sendStatistic(140834, 0, 'E');
    }
  });
  window.addEventListener('beforeunload', function() { sendStatistic(140834, 0, 'E'); });
  window.addEventListener('unload', function() { sendStatistic(140834, 0, 'E'); });
});

window['subscribe'] = function(e) {

    if (e.type !== 'submit') {
        return;
    }

    var options = {};
    var merges = {};

    let id_of_the_event = e.target.closest('.mypopups-substare').getAttribute('id');
    let real_uuid = window['mpu_uuid_' + id_of_the_event];

    e.target.querySelectorAll('input').forEach(function(element){
        if(element.getAttribute('data-options') == 'true')
            options[element.name] = element.value;
        else
            merges[element.name] = element.value;
    });

    var data = JSON.stringify({
        code: 'bd438336-ef10-11e9-a6e4-005056008dab',
        // sub: '5f9cadfe-b3ea-11ee-ab2e-309c23ce08f7',
        sub: real_uuid,
        options: options,
        merge_fields: merges,
    });
    fetch("https://mypopups.com/api/embed/subscribe", {
        method: 'POST',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        },
        body: data
    }).then((response) => {
        // TODO: rewrite, need put in one element
        var postSubmitAction = e.target.parentNode.getAttribute('on-post-submit');
        var onPostSubmitStatistic = e.target.parentNode.getAttribute('on-post-submit-statistic');

        if (postSubmitAction) {
            eval(postSubmitAction);
        }

        if (onPostSubmitStatistic) {
            eval(onPostSubmitStatistic);
        }
    });
}

window['onsubmitFollowIt'] = function(e){
    var postSubmitAction = e.target.parentNode.getAttribute('on-post-submit');
    var onPostSubmitStatistic = e.target.parentNode.getAttribute('on-post-submit-statistic');

    if (postSubmitAction) {
        var data = {};
        var additionalFields = {};
        data['coming_from_url'] = window.location.href;
        data['feed_code'] = e.target.elements['feed_code'].value;
        e.target.querySelectorAll('input').forEach(function(input){
            switch(input.name) {
              case "EMAIL":
                data['email'] = btoa(input.value);
                break;
              case "4EktDwr3De":
                break;
              case "feed_code":
                break;
              default:
                additionalFields[input.name] = input.value;
            }
        });
        if(Object.keys(additionalFields).length > 0)
            data.other_fields = additionalFields;

        var userInfo = JSON.stringify(data)
            var xhr = new XMLHttpRequest();
            xhr.open("POST", 'https://api.follow.it/api/user/feed/follow/mpu/subscription_form', true);
            xhr.setRequestHeader('Content-Type', 'application/json');
            xhr.send(userInfo);
        eval(postSubmitAction);
    }

    if (onPostSubmitStatistic) {
        eval(onPostSubmitStatistic);
    }
}

function handleResponse(statType, data) {

  if (statType != false) {
    if (typeof data['rules_request_id'] != 'undefined' && data['rules_request_id'] && data['rules_request_id'] != '' && statType == 'S') {
      let rid = data['rules_request_id'];
      window['mpu_global_rid_unique'] = rid;
    }
    if (typeof data['display_id'] != 'undefined' && data['display_id'] && data['display_id'] != '' && statType == 'S') {
      let did = data['display_id'];
      window['mpu_global_display_id'] = did;
    }
  }

}

function sendStatistic(id, uId, statType = false) {
    var data = {};
    var tmpstats = {};
    var tmpdata = [];
    let searchId = 'statsid-'+id;

    if (statType == false) {

      window[searchId] = JSON.parse(localStorage.getItem(searchId));

      for(var i in window[searchId]){
        if(!tmpstats[window[searchId][i].url])
        tmpstats[window[searchId][i].url] = [];
        tmpstats[window[searchId][i].url].push(
          window[searchId][i]
        );
      }

      for(var i in tmpstats){
        tmpdata.push({
          url: i,
          stats: tmpstats[i]
        });
      }

    }

    data.code = 'bd438336-ef10-11e9-a6e4-005056008dab-jtnvkqhlnp';
    data.timeoffset = -180;
    data.stats = [{
        sub: uId !== 0 ? uId :  `5f9cadfe-b3ea-11ee-ab2e-309c23ce08f7`,
        id: id,
        stats: tmpdata
    }];

    if (statType == 'S') {
      window['mpu_stat_end_done'] = false;
    }

    if (statType != false && !window['mpu_stat_end_done']) {

      data.advanced_display_beta = mpu_get_stats_for_advanced_user_display();
      data.advanced_display_beta.type = statType;
      if (statType == 'E') {
        window['mpu_stat_end_done'] = true;
        if (typeof window['mpu_global_rid_unique'] != 'undefined') {
          data.advanced_display_beta.rid = window['mpu_global_rid_unique'];
        }
      }

      // fetch("https://rules.mypopups.com/check_display_rules", {
      //   method: 'POST',
      //   headers: {
      //       'Accept': 'application/json',
      //       'Content-Type': 'application/json'
      //   },
      //   body: JSON.stringify(data),
      //   keepalive: true,
      //   credentials: 'include'
      // }).then(response => {

      //     return response.json();

      // }).then((data) => {

      //   handleResponse(statType, data);

      // }).catch(error => {

      //     // console.log(error);

      // });

      return;

    }

    fetch("https://mypopups.com/api/embed/stats", {
        method: 'POST',
        headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify(data)
    }).then(response => {

        localStorage.removeItem(searchId);
        return response.json();

    }).catch(error => {

        // console.log(error);

    })

}

var popupContainer = document.getElementById('mypopups-substrate-140834');
 popupContainer.style.opacity = '1';

(function (window, document) {
    var toArray = function (iterable) {
        var array = []

        for (var element of iterable) {
            array.push(element)
        }

        return array
    }

    var autoPopulateActions = {
        currentUrl: function (callback) {
            callback(window.location.origin)
        },
        firstUrl: function (callback) {
            callback('http://notimplemented.yet')
        },
        previousUrl: function (callback) {
            callback(document.referrer)
        },
        previousDomain: function (callback) {
            var url = new URL(document.referrer)

            callback(url.origin)
        },
        ipAddress: function (callback) {
            fetch('https://mypopups.com/api/embed/ip')
                .then(x => x.json())
                .then(({data}) => {
                    callback(data.ip)
                })
        },
        promotionName: function (callback) {
            callback('new year review pop up')
        },
        noop: function (callback) {
            callback(null)
        }
    }

    var service = {
        autoPopulate: function () {
            var autoPopulateInputs = popupContainer.querySelectorAll('input:not([mp-data-auto-populate="none"])');

            toArray(autoPopulateInputs).forEach(function (input) {
                var actionName = input.getAttribute('mp-data-auto-populate')

                var action = autoPopulateActions[actionName] || autoPopulateActions.noop

                 if(input.hasAttribute('value')) return
                action(function (value) {
                    input.setAttribute('value', value)
                })
            })
        }
    }

    service.autoPopulate()
})(window, document)
      function init() {

          // Reposition
          var themes = document.getElementsByClassName('mypopups-substare');
positionThemes(filterPopUpsByAttribute(themes, 'positioning', 'full-screen'));
positionThemes(filterPopUpsByAttribute(themes, 'positioning', 'banner'));
positionThemes(filterPopUpsByAttribute(themes, 'mobile', "1"));

// Show Popup after preloading and positioning (@iC)
(function () {

  let veryUniquePreview = document.getElementById('very-unique-home-preview');
  if (veryUniquePreview) {

    if (veryUniquePreview.classList.contains('hideThisForNow'))
      veryUniquePreview.classList.remove('hideThisForNow');

  }

})();

/**
 * vertically position elements of pop-up in
 * full-screen mode in case they are attached to some border
 * @param element
 * @param fullScreenPositions
 */
function  positionElementsVertically(element, fullScreenPositions) {
    if (fullScreenPositions.attachedToTop && fullScreenPositions.attachedToBottom) {
        element.style.height = '100%';
        element.style.top = 0;
        return
    }
    if (fullScreenPositions.attachedToTop) {
        element.style.top = 0;
        element.style.bottom = '';
    }
    if (fullScreenPositions.attachedToBottom) {
        element.style.bottom = 0;
        element.style.top = '';
    }
}
/**
 * horizontally position elements of pop-up in
 * full-screen mode in case they are attached to some border
 * @param element
 * @param fullScreenPositions
 */
function positionElementsHorizontally(element, fullScreenPositions) {
    if (fullScreenPositions.attachedToRight) {
        element.style.right = 0;
        element.style.left = '';
    }
    if (fullScreenPositions.attachedToLeft) {
        element.style.left = 0;
        element.style.right = '';
    }
}

function positionFullScreenTheme(theme) {
   let modal = theme.getElementsByClassName("mypopups-modal")[0];
   let elements = theme.querySelectorAll("div[full-screen-positions]");
   let fullScreenPositions,
        heightDiff,
        widthDiff,
        sumDifference,
        screenWidth;

  for (let i=0; i<=elements.length-1; i++) {
    fullScreenPositions =  JSON.parse(elements[i].getAttribute('full-screen-positions'));
    heightDiff = (window.innerHeight / fullScreenPositions.notAttached.h).toFixed(4);
    theme.getAttribute("positioning") === 'banner'
      ? screenWidth = document.body.scrollWidth
      : screenWidth = window.innerWidth;
    widthDiff =  (screenWidth / fullScreenPositions.notAttached.w).toFixed(4);
    sumDifference = ((parseFloat(heightDiff) + parseFloat(widthDiff)) /2).toFixed(4);
    if (fullScreenPositions) {

      if (theme.getAttribute("mobile") === '0' && theme.getAttribute("positioning") === 'full-screen') {
        if (theme.getElementsByClassName("mypopups-substare").length > 1) return;
        //adjusting form elements
        checkFormSizes(elements[i], sumDifference);
        //adjusting border radius if any
        if (elements[i].style.borderRadius)
          elements[i].style.borderRadius = Math.floor(parseInt(elements[i].style.borderRadius) * sumDifference) + 'px';
        if (elements[i].style.borderWidth) {
          let width = Math.round(parseInt(elements[i].style.borderWidth) * sumDifference);
          width > 1 ? elements[i].style.borderWidth = width + 'px' : elements[i].style.borderWidth = width + 1 + 'px';
        }

        //adjusting height-related properties

        //handling the close btn case
        if (elements[i].childNodes[0].style.borderRadius === '50%') {
          elements[i].style.height = Math.floor(parseInt(elements[i].style.height) * widthDiff) + 'px';
        } else elements[i].style.height = Math.floor(parseInt(elements[i].style.height) * heightDiff) + 'px';

        elements[i].style.top = Math.floor(fullScreenPositions.notAttached.t * heightDiff) + 'px';
        //adjusting width-related properties similar for banners and full-screen
        adjustElementsScale(elements[i], widthDiff, fullScreenPositions.notAttached);
        if (elements[i].parentNode.nodeName !== 'FORM')
          adjustTextParameters(elements[i], heightDiff, widthDiff);
      } else if (theme.getAttribute("mobile") === '0' && theme.getAttribute("positioning") === 'banner') {
        checkFormSizes(elements[i], widthDiff);

        if (parseInt(theme.childNodes[0].style.height) === fullScreenPositions.notAttached.h)
          theme.childNodes[0].style.height = Math.floor(parseInt(theme.childNodes[0].style.height) * widthDiff) + 'px';

        if (theme.childNodes[0].style.width === '100%')
          theme.childNodes[0].style.width = document.body.scrollWidth + 'px';
        if (elements[i].style.borderRadius)
          elements[i].style.borderRadius = Math.floor(parseInt(elements[i].style.borderRadius) * widthDiff) + 'px';
        if (elements[i].style.borderWidth) {
          elements[i].style.borderWidth = Math.round(parseInt(elements[i].style.borderWidth) * widthDiff) + 'px';
          if (elements[i].parentNode.nodeName === 'FORM') {
            elements[i].style.borderWidth = parseInt(elements[i].style.borderWidth) + 1 + 'px';
          }
        }

        //adjusting height-related properties
        elements[i].style.top = Math.floor(fullScreenPositions.notAttached.t * widthDiff) + 'px';
        elements[i].style.height = Math.floor(parseInt(elements[i].style.height) * widthDiff) + 'px';

        adjustElementsScale(elements[i], widthDiff, fullScreenPositions.notAttached);
        if (elements[i].parentNode.nodeName !== 'FORM')
          adjustTextParameters(elements[i], 0, widthDiff);
      } else {
            //checking if it's preview or Live and using 'preview device' or mobile screen sizes for scaling
            let previewContainer = document.getElementsByClassName('preview-conteiner-mobile');
            if(previewContainer.length===0) {
              let mobHeight = previewContainer[0] ? themes[0].clientHeight : window.innerHeight,
                  mobWidth = previewContainer[0] ? themes[0].clientWidth : window.innerWidth,
                  mobileHeightDifference = mobHeight / 100 * parseInt(modal.style.height),
                  mobileWidthDifference = mobWidth / 100 * parseInt(modal.style.width),
                  averageTop = fullScreenPositions.notAttached.h / 2 - fullScreenPositions.notAttached.t,
                  averageLeft = fullScreenPositions.notAttached.w / 2 - fullScreenPositions.notAttached.l;

              elements[i].style.top = mobileHeightDifference / 2 - averageTop + 'px';
              elements[i].style.left = mobileWidthDifference / 2 - averageLeft + 'px';
            }
          }

            // if(theme.getAttribute("mobile")!=='0'){
            //         positionElementsVertically(elements[i], fullScreenPositions);
            //         positionElementsHorizontally(elements[i], fullScreenPositions);
            //     }
        }
    }

  //to avoid repetitive scaling when multiple themes enabled
  theme.setAttribute('scaled', true);
}

function checkFormSizes(element, difference){
  let input = element.getElementsByTagName("input")[0];
  if (input){
    let inputFontSize =  Math.floor(parseInt(input.style.fontSize) * difference) + "px";
    input.style.setProperty("--fs", inputFontSize);
    input.style.fontSize = inputFontSize ;
  }

  let btn = element.getElementsByTagName('button')[0];
  if(btn && btn.getAttribute('type') === 'submit'){
    btn.style.fontSize =  Math.floor(parseInt(btn.style.fontSize) * difference) + 'px';
  }
}

function adjustElementsScale(el, difference, fs){
  el.style.left =  Math.floor(fs.l * difference) + 2 + 'px';
  el.style.width =  Math.floor(parseInt(el.style.width) * difference) + 'px';
}

function adjustTextParameters(element, heightD, widthD) {
  if( element.firstChild.style.backgroundSize) return;
  //covering the 'static height' banner case
  if (heightD === 0) heightD = widthD;

  let sumDifference = (parseFloat(heightD) + parseFloat(widthD)) / 2;
  let textElements = element.querySelectorAll('[data-font-size="true"]');
  //adjusting text size
  if (textElements.length > 0) {
    textElements.forEach(textEl => {
      let fs = parseInt(textEl.style.fontSize);
      textEl.style.fontSize = Math.floor(fs * sumDifference) + 'px';
    });
  } else {
    let textRaw = element.getElementsByTagName('p');
    if (textRaw.length !== 0) {
      textRaw[0].style.fontSize = Math.floor(15 * sumDifference) + 'px';
    } else {
      if (element.getElementsByTagName('span').length > 0) {
        element.getElementsByTagName('span')[0].style.fontSize = Math.floor(15 * sumDifference) + 'px';
      }
    }
  }

  //adjusting line heights
  let alignedElements = element.querySelectorAll('[data-line-height="true"]');
  alignedElements.forEach(textEl => {
    let fs = parseFloat(textEl.style.lineHeight);
    !document.getElementById('preview-content-container')
      ?  textEl.style.lineHeight = Math.floor(fs * heightD) + 'px'
      :  textEl.style.lineHeight =  Math.floor(fs * heightD) + 5 + 'px'

  });

}

function filterPopUpsByAttribute(themes, attribute, value) {
    var filteredArray = [];
    for (var i=0; i <= themes.length-1; i++) {
        if(themes[i].getAttribute(attribute) === value && !themes[i].getAttribute('scaled')) {
          filteredArray.push(themes[i]);
        }
    }
    return filteredArray
}

function positionThemes(themes) {
    if(themes.length) themes.map(theme => positionFullScreenTheme(theme))
}


          // end before rules
          // start display rules
                                          if (window['isShowId140834']) {
  window['isShowId140834'] = false;
  var whichPages = JSON.parse('[{"option":"homepage","value":""}]');
  for(var i in whichPages){

      if(whichPages[i].option == 'homepage'){
          if(document.location.pathname == '/' && document.location.search == ''){
              window['isShowId140834'] = true;
          }
      }
      if(whichPages[i].option == 'contains'){
          if(document.location.search.indexOf(whichPages[i].value) != -1){
              window['isShowId140834'] = true;
          }
          if(document.location.hash.indexOf(whichPages[i].value) != -1){
              window['isShowId140834'] = true;
          }
          if(document.location.href.indexOf(whichPages[i].value) != -1){
              window['isShowId140834'] = true;
          }
      }
      if(whichPages[i].option == 'starts'){
          if(document.location.href.indexOf(whichPages[i].value) == 0){
              window['isShowId140834'] = true;
          }
      }
      if(whichPages[i].option == 'ends'){
         var EndOfUrl = document.location.pathname.split('/').pop();
         var ruleUrl = whichPages[i].value;

         var testUrl = document.location.pathname.split('/');

      if(testUrl.pop()==''){
           EndOfUrl =  testUrl.pop();
      }
      if(EndOfUrl.replace(/\//g, '') == ruleUrl.replace(/\//g, '')){
              window['isShowId140834'] = true;
          }
      }
      if(whichPages[i].option == 'matches'){
          if(document.location.href == (whichPages[i].value)){
              window['isShowId140834'] = true;
          }
      }
  }
}
                                  if ("" && ("no" === "yes" || window['isShowId140834'])){
    window['showModal140834']()
}
                        if(window['isShowId140834']){

    //if (typeof window['isShowIdOnlyOnce140834'] == 'undefined') {
      //window['isShowIdOnlyOnce140834'] = true;
      window['isShowId140834'] = false;
    //}
    var timestampInterval = 14
    var nowFullDate = new Date();
    let currentMonth = nowFullDate.getMonth() + 1
    var nowDate = new Date(
        nowFullDate.getFullYear(),
        currentMonth,
        nowFullDate.getDate()
    ).getTime();
    
    timestampInterval = timestampInterval * 24 * 60 * 60 * 1000;

    if (0 === 0 && window.innerWidth > 768 || 0 === 1 && window.innerWidth <= 768) {

      if (localStorage.getItem('dayShowInterval140834') != timestampInterval) {
          localStorage.setItem('dayShowInterval140834', timestampInterval);
          localStorage.setItem('timestampInterval140834', nowDate + timestampInterval);
          window['isShowId140834'] = true;
      }

      if (localStorage.getItem('timestampInterval140834') <= nowDate) {
          localStorage.setItem('timestampInterval140834', nowDate + timestampInterval, timestampInterval);
          window['isShowId140834'] = true;
      }

    }
}
                                  if (window['isShowId140834']) {

  var visitorDontShow = JSON.parse('{"checked":true,"converted":"yes","previously":"this"}');
  var IdsOfThemesOnPage = JSON.parse('[140834]');
  var convertedThemesIds = JSON.parse(localStorage.getItem('convertedThemes140834')) ? JSON.parse(localStorage.getItem('convertedThemes140834')) : [];
  var dontShowTheme = false;
  var parsedIds = [];

  for (let i = 0; i < IdsOfThemesOnPage.length; ++i) {
    let id = IdsOfThemesOnPage[i];
    if (JSON.parse(localStorage.getItem('convertedThemes' + id))) {
      let ids = JSON.parse(localStorage.getItem('convertedThemes' + id));
      for (let j = 0; j < ids.length; ++j) {
        let convertedIn = parseInt(ids[j]);
        if (!isNaN(convertedIn) && !parsedIds.includes(convertedIn)) {
          parsedIds.push(convertedIn);
        }
      }
    }
  }

  if (convertedThemesIds.length < parsedIds.length) {
    convertedThemesIds = parsedIds;
  }

  if (visitorDontShow.previously === "this") {
    if (visitorDontShow.converted === "yes") {
      dontShowTheme = isThisThemeConvertedByUser(convertedThemesIds);
    } else {
      dontShowTheme = !isThisThemeConvertedByUser(convertedThemesIds);
    }
  }

  if (visitorDontShow.previously === "any") {
    dontShowTheme = visitorDontShow.converted === "yes" ? areAnyOfThemesOnPageConverted(convertedThemesIds) : areAnyOfThemesOnPageNotConverted(convertedThemesIds);
  }

  if (dontShowTheme) {
    window['isShowId140834'] = false;
  }

}

function isThisThemeConvertedByUser(convertedThemesIds) {
  return convertedThemesIds.includes('140834') || convertedThemesIds.includes(parseInt('140834'));
  // return convertedThemesIds.some(themeId => themeId === '140834')
}

function areAnyOfThemesOnPageConverted(convertedThemesIds) {
  return containsAny(IdsOfThemesOnPage, convertedThemesIds.map(parseInt));
}

function areAnyOfThemesOnPageNotConverted(convertedThemesIds) {
  return notContainsAny(IdsOfThemesOnPage, convertedThemesIds.map(parseInt));
}

function containsAny(source, target) {
  var result = source.filter(function(item){ return target.indexOf(item) > -1});
  return (result.length > 0);
}

function notContainsAny(source,target) {
  var result = source.filter(function(item){ return target.indexOf(item) > -1});
  return (result.length === 0);
}
                                                                                                                                     localStorage.setItem('mp-priority140834', 3);
             if(window['isShowId140834']){
 localStorage.removeItem('time140834')
        //window['hideModal140834']();

    var maxSecond = 5;
    setTimeout(function(){
                    window['showModal140834']();
                localStorage.setItem('time140834', 'end')
        //console.log('Least-Page ---- In FIle');
         //localStorage.setItem('mp-priority', 2)
    }, maxSecond * 1000);
}
                                                  // end display rules
      };

                init();
      
      // adjustments logic
      (() => {

  let powered = document.getElementsByClassName('powered-by-link');
  for (let i = 0; i < powered.length; ++i)
    powered[i].style.fontFamily = `'Proxima Nova Rg', Helvetica, Arial, sans-serif`;

})();

      // start after rules
      
      // start positioning logic
      let popups      = document.getElementsByClassName('mypopups-substare'),
    rgbaToAlpha = (popup) => popup.style.backgroundColor.replace(/^.*,(.+)\)/, '$1'),
    getPosition = (popup) => popup.attributes.positioning.value,
    getBG       = (popup) => {
      if (typeof popup.style.background != 'undefined')
        return (popup.style.background === 'transparent');
      else return false;
    },
    isClose     = (popup) => {
      if (typeof popup.attributes.onclick != 'undefined')
        return popup.attributes.onclick.value.includes('onClosePreview');
      else return false;
    },
    getMobile   = (popup) => popup.attributes.mobile.value;

let reposition = (popup, pos) => {

  if (pos == 'undefined' || pos == '""' || pos.length == 0) position = 'center'; else position = pos;
  if (position != 'banner') {

    let modal = popup.querySelector('.mypopups-modal');
    let left = modal.style.left;
    let right = modal.style.right;
    let mheight = parseInt(modal.style.height.slice(0, -2));
    let mwidth = parseInt(modal.style.width.slice(0, -2));

    if (mheight % 2 !== 0) modal.style.height = `${mheight-1}px`;
    if (mwidth % 2 !== 0) modal.style.width = `${mwidth-1}px`;

    if (position == 'center') modal.style.top = `calc(50% - ${mheight / 2}px)`;
    if ((!right && (!left || left == 'auto')) || pos === 'undefined') {
      if (position != 'center') {
        modal.style.top = '';
        modal.style.left = '0';
        modal.style.right = '0';
        modal.style.margin = '0 auto';

        if (typeof modal.style.bottom == 'undefined' || modal.style.bottom.length == 0)
          modal.style.top = '0px';
      } else {
        modal.style.left = `calc(50% - ${mwidth / 2}px)`;
        modal.style.top = `calc(50% - ${mheight / 2}px)`;
      }
    }

  }

  popup.style.width  = 0;
  popup.style.height = 0;
  popup.setAttribute('posited', true);

}

for (let i = 0; i < popups.length; ++i) {
  let popup = popups[i];
  if (typeof popup.attributes.posited != 'undefined') continue;

  let mobile = getMobile(popup),
      position = getPosition(popup),
      close = isClose(popup),
      transparent = getBG(popup),
      alpha = rgbaToAlpha(popup);

  if (mobile.trim() !== '0') continue;
  if (position == 'full-screen') continue;
  if ((transparent || alpha.trim() === '0') && !close) reposition(popup, position);
}

      function showThePopups() {

          function checkIfHasFont(elem, bold = false) {
  if (typeof elem.style != 'undefined') {
    if (typeof elem.style.fontFamily != 'undefined') {
      let filtred = [];
      let font = elem.style.fontFamily;
          font = font.split(',');

      for (let i = 0; i < font.length; i++) {
        font[i] = font[i].trim();
        if (font[i] && font[i].length > 0) {
          let banned = ['sans-serif', 'helvetica', 'arial', 'proxima nova rg', `"proxima nova rg"`, 'cormorant', 'roboto'];
          if (!banned.includes(font[i].toLowerCase()) && !font[i].toLowerCase().includes('sansserif')) {
            if (bold) font[i] = `bold 1em ${font[i]}`;
            else font[i] = `1em ${font[i]}`;
            filtred.push(font[i]);
          }
        }
      }

      return filtred;
    } else return false;
  } else return false;
}

function checkFonts(elem, bold = false) {
  if (typeof elem == 'undefined' || elem == null) return [];
  if (!bold && ['STRONG', 'B'].includes(elem.tagName)) bold = true;

  let fonts = [];
  let font = checkIfHasFont(elem, bold);
  if (font) fonts = [...fonts, ...font];

  if (elem.childNodes.length > 0)
    for (let i = 0; i < elem.childNodes.length; ++i)
      fonts = [...fonts, ...checkFonts(elem.childNodes[i], bold)];

  return fonts;
}

function filterFonts(fonts) {

  let filtered = [];

  for (let i = 0; i < fonts.length; i++) {
    let font = fonts[i].trim();
    if (font.length == 0) continue;
    if (font.includes('cursive')) {
      font = font.replace(' cursive', '');
      font = font.trim();
    }
    if (!filtered.includes(font)) filtered.push(font);
  }

  return filtered;

}

function testFonts(fonts, callback) {

  if (typeof document.fonts == 'undefined') callback();
  else if (typeof document.fonts.check == 'undefined') callback();
  else {

    let loaded = [], created = [];
    let intervaler, i = 0;

    function entireCheck() {
      for (let i = 0; i < fonts.length; ++i) {
        if (loaded.includes(fonts[i])) continue;
        if (!created.includes(fonts[i])) {
          let isBold = (fonts[i].slice(0,4) == 'bold');
          let font = (isBold) ? fonts[i].slice(9) : fonts[i].slice(4);
          let fontNameForId = fonts[i].replace(/\"/g, '').replace(/\ /g, '');
          let el = document.createElement('mpu');
              el.style.visibility = 'hidden';
              el.style.fontSize = '300px';
              el.style.position = 'fixed';
              el.style.left = '-9999px';
              el.style.opacity = '0';
              el.style.setProperty('font-family', font, 'important');
              el.innerText = fontNameForId + 'giItT1WQy@!-/#';
              el.setAttribute('id', `mpu-font-${fontNameForId}`);
              created.push(fonts[i]);

          if (isBold) el.style.fontWeight = 'bold';
          document.body.appendChild(el);
        }

        if (document.fonts.check(fonts[i]) || fonts[i] == '1em Cormorant') {
          let fontNameForId = fonts[i].replace(/\"/g, '').replace(/\ /g, '');
          loaded.push(fonts[i]);
          document.getElementById(`mpu-font-${fontNameForId}`).remove();
        }
      }
    }

    entireCheck();

    if (loaded.length == fonts.length) {
      clearInterval(intervaler);
      setTimeout(() => { callback(); }, 150);
      return;
    }

    intervaler = setInterval(() => {
      entireCheck(); i += 100;
      if (loaded.length >= fonts.length || i >= 10000) {
        clearInterval(intervaler);
        callback();
      }
    }, 100);

  }

}

let popupInCase = document.getElementById('mypopups-substrate-140834');
let fontsScrape = filterFonts(checkFonts((typeof popup == 'object')?popup:popupInCase));
testFonts(fontsScrape, () => { afterAllFontsDone(); });

          function afterAllFontsDone() {

              // Window load > DOMContentLoaded
              const createdPopups = document.querySelectorAll('.mypopups-substare');

              // Hide in WordPress customiser
              let thisVisibility = 'visible';
              if (typeof wp !== 'undefined')
                if (typeof wp.customize !== 'undefined' || typeof elementor === 'object')
                  thisVisibility = 'hidden';

              // Show every Pop-up
              for (let i = 0; i < createdPopups.length; ++i)
                if (createdPopups[i].parentNode.style.visibility != thisVisibility)
                  createdPopups[i].parentNode.style.visibility = thisVisibility;

          }

      }

});
