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AIH,EAAU,IAAMA,GAMpB,SAAW,UAG/CtB,EAAQ,QAASiB,GACjBjB,EAAQ,SAAUoB,GAClBpB,EAAQ,WAAYqB,GACpBrB,EAAQ,WAAYsB,GAEK,SAAzBzB,EAAQ,cAA2BG,EAAQ,YAAauB,GAC9B,UAA1B1B,EAAQ,eAA6BG,EAAQ,aAAc0B,GAC/B,YAA5B7B,EAAQ,iBAAiCG,EAAQ,eAAgB2B,GACrC,YAA5B9B,EAAQ,iBAAiCG,EAAQ,eAAgB4B,EACnE,GAGsC,KAGtC,OAAOvB,CAAQ,C","sources":["webpack:///../../../../../../plugin-modules/node_modules/react-dom/client.js","webpack:///external var [\"ReactDOM\"]","webpack:///webpack/bootstrap","webpack:///external var [\"React\"]","webpack:///../wp-utils/v1/htmlToElement.js","webpack:///./src/black-friday.js"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","module.exports = ReactDOM;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const __WEBPACK_NAMESPACE_OBJECT__ = React;","function htmlToElement(html) {\r\n let temp = document.createElement(\"template\");\r\n temp.innerHTML = html;\r\n return temp.content.firstChild;\r\n}\r\n\r\nexport default htmlToElement;\r\n","import { useRef, useEffect } from \"react\";\r\nimport { createRoot } from \"react-dom/client\";\r\n\r\nimport \"./black-friday.scss\";\r\nimport htmlToElement from \"./../../wp-utils/v1/htmlToElement\";\r\n// add promo notice\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n if (window.h5apPlayer?.isPipe) {\r\n return;\r\n }\r\n const menu = document.querySelector(\"#wp-admin-bar-bp3d_offer_menu\");\r\n const wrap = document.querySelector(\".wrap\");\r\n if (!wrap) return;\r\n const offerElement = document.createElement(\"div\");\r\n const html = `<div class='bp3d-admin-notice-wrap'>\r\n <div class='bpl-admin-notice bpl-promotion'>\r\n <div class='notice-content'>\r\n <div class='logo-wrap'>\r\n <div class='bpl-logo'>\r\n <img src='https://ps.w.org/3d-viewer/assets/icon-128x128.png' />\r\n </div>\r\n <span class='bpl-icon bpl-icon-promotion'></span>\r\n </div>\r\n \r\n <div class='bpl-message'>\r\n <h3>Black Friday to Cyber Monday Exclusive.</h3>\r\n <div>Upgrade your WordPress experience with <strong>3D Viewer Pro</strong> and save up to 40% during our biggest sale of the year!</div>\r\n <a href='edit.php?post_type=bp3d-model-viewer&page=3d-viewer-pricing-manual' class='bpl-btn bpl-btn-primary'>Save Big →</a>\r\n </div>\r\n \r\n <button class='bplPromoClose close-notice'>\r\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'>\r\n <path d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z' />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>`;\r\n\r\n offerElement.appendChild(htmlToElement(html));\r\n\r\n wrap.insertAdjacentElement(\"afterbegin\", offerElement);\r\n\r\n const closeEl = offerElement.querySelector(\".bplPromoClose\");\r\n\r\n const isClosed = localStorage.getItem(\"bp3dPromoClosed\");\r\n\r\n if (isClosed) {\r\n offerElement.classList.add(\"hidden\");\r\n }\r\n\r\n closeEl?.addEventListener(\"click\", (e) => {\r\n e.preventDefault();\r\n offerElement.classList.toggle(\"hidden\");\r\n\r\n localStorage.setItem(\"bp3dPromoClosed\", true);\r\n });\r\n\r\n menu?.addEventListener(\"click\", function (e) {\r\n e.preventDefault();\r\n offerElement.classList.toggle(\"hidden\");\r\n });\r\n});\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n const upgradePageEl = document.getElementById(\"fsUpgradePrice\");\r\n if (!upgradePageEl || window.bp3dPlugin?.isPipe) {\r\n return;\r\n }\r\n const pricingNotice = document.querySelector(\".bp3d-admin-notice-wrap\");\r\n if (pricingNotice) {\r\n pricingNotice.classList.add(\"hidden\");\r\n }\r\n\r\n const span = document.createElement(\"span\");\r\n upgradePageEl.insertAdjacentElement(\"afterbegin\", span);\r\n\r\n createRoot(span).render(<UpgradePageContent />);\r\n});\r\n\r\nexport const UpgradePageContent = () => {\r\n const countdownRef = useRef(null);\r\n\r\n useEffect(() => {\r\n downCount(countdownRef?.current, {\r\n date: `11/27/2023 23:59:00`,\r\n // offset: +6\r\n });\r\n }, []);\r\n\r\n return (\r\n <>\r\n <section className=\"intro\">\r\n <div className=\"container\">\r\n <div className=\"introHeader flex\">\r\n <span>Experience the thrill of Black Friday with an epic 40% off!</span> <span style={{ color: \"#ff5757\" }}>Ending On</span>\r\n {/* <img width='60px' src='https://tastewp.com/intro/emoji.svg' /> */}\r\n </div>\r\n\r\n <div className=\"countdownWrap\">\r\n <div className=\"countdown\" ref={countdownRef}>\r\n <div>\r\n <span className=\"days\">00</span>\r\n <span className=\"days_ref\">days</span>\r\n </div>\r\n <span>\r\n :<br />\r\n \r\n </span>\r\n <div>\r\n <span className=\"hours\">00</span>\r\n <span className=\"hours_ref\">hours</span>\r\n </div>\r\n <span>\r\n :<br />\r\n \r\n </span>\r\n <div>\r\n <span className=\"minutes\">00</span>\r\n <span className=\"minutes_ref\">minutes</span>\r\n </div>\r\n <span>\r\n :<br />\r\n \r\n </span>\r\n <div>\r\n <span className=\"seconds\">00</span>\r\n <span className=\"seconds_ref\">seconds</span>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"promoCode\">Coupon: [FSBFCM2023]</div>\r\n </div>\r\n </section>\r\n </>\r\n );\r\n};\r\n\r\nconst downCount = (container, options, callback) => {\r\n const settings = Object.assign({ date: null, offset: null }, options);\r\n\r\n const getText = (sl) => container.querySelector(sl).textContent;\r\n const setText = (sl, val) => {\r\n container.querySelector(sl).textContent = val;\r\n };\r\n\r\n if (!settings.date) {\r\n throw new Error(\"Date is not defined.\");\r\n }\r\n\r\n if (!Date.parse(settings.date)) {\r\n throw new Error(\"Incorrect date format, it should look like this, 12/24/2012 12:00:00.\");\r\n }\r\n\r\n const currentDate = () => {\r\n // get the client's current date\r\n const date = new Date();\r\n\r\n // turn the date to UTC\r\n const utc = date.getTime() + date.getTimezoneOffset() * 60000;\r\n\r\n return new Date(utc + 3600000 * settings.offset); // return a new Date object\r\n };\r\n\r\n function countdown() {\r\n // difference of dates\r\n const difference = new Date(settings.date) - currentDate();\r\n\r\n // if the difference is negative, then it's past the target date\r\n if (difference < 0) {\r\n // stop the timer\r\n clearInterval(interval);\r\n\r\n if (callback && typeof callback === \"function\") {\r\n callback();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // basic math variables\r\n const _second = 1000;\r\n const _minute = _second * 60;\r\n const _hour = _minute * 60;\r\n const _day = _hour * 24;\r\n\r\n // calculate dates\r\n var days = Math.floor(difference / _day);\r\n var hours = Math.floor((difference % _day) / _hour);\r\n var minutes = Math.floor((difference % _hour) / _minute);\r\n var seconds = Math.floor((difference % _minute) / _second);\r\n\r\n // fix dates so that they will show two digits\r\n days = String(days).length >= 2 ? days : \"0\" + days;\r\n hours = String(hours).length >= 2 ? hours : \"0\" + hours;\r\n minutes = String(minutes).length >= 2 ? minutes : \"0\" + minutes;\r\n seconds = String(seconds).length >= 2 ? seconds : \"0\" + seconds;\r\n\r\n // based on the date change the reference wording\r\n var refDays = days === \"01\" ? \"day\" : \"days\";\r\n var refHours = hours === \"01\" ? \"hour\" : \"hours\";\r\n var refMinutes = minutes === \"01\" ? \"minute\" : \"minutes\";\r\n var refSeconds = seconds === \"01\" ? \"second\" : \"seconds\";\r\n\r\n // set the values to the DOM\r\n setText(\".days\", days);\r\n setText(\".hours\", hours);\r\n setText(\".minutes\", minutes);\r\n setText(\".seconds\", seconds);\r\n\r\n getText(\".days_ref\") === \"days\" && setText(\".days_ref\", refDays);\r\n getText(\".hours_ref\") === \"hours\" && setText(\".hours_ref\", refHours);\r\n getText(\".minutes_ref\") === \"minutes\" && setText(\".minutes_ref\", refMinutes);\r\n getText(\".seconds_ref\") === \"seconds\" && setText(\".seconds_ref\", refSeconds);\r\n }\r\n\r\n // start\r\n var interval = setInterval(countdown, 1000);\r\n\r\n // Return the interval for later use or stopping the countdown if needed\r\n return interval;\r\n};\r\n"],"names":["m","exports","createRoot","hydrateRoot","module","ReactDOM","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","React","html","temp","document","createElement","innerHTML","content","firstChild","addEventListener","window","h5apPlayer","isPipe","menu","querySelector","wrap","offerElement","appendChild","htmlToElement","insertAdjacentElement","closeEl","localStorage","getItem","classList","add","e","preventDefault","toggle","setItem","upgradePageEl","getElementById","bp3dPlugin","pricingNotice","span","render","UpgradePageContent","countdownRef","useRef","useEffect","downCount","current","date","Fragment","className","style","color","ref","container","options","callback","settings","Object","assign","offset","getText","sl","textContent","setText","val","Error","Date","parse","interval","setInterval","difference","currentDate","utc","getTime","getTimezoneOffset","clearInterval","_minute","_second","_hour","_day","days","Math","floor","hours","minutes","seconds","refDays","String","length","refHours","refMinutes","refSeconds"],"sourceRoot":""}