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AM,YACa,IAAIC,GACZ7L,MACtB,G","sources":["webpack://essence_site/external var \"jQuery\"","webpack://essence_site/webpack/bootstrap","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://essence_site/./wp/wp-content/themes/gu/assets/js/newsletter/util.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-commerce.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-main.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-ads.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-banners.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-newsletter-signup.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-videos.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-rightrail.js","webpack://essence_site/./node_modules/@babel/runtime/helpers/esm/readOnlyError.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-touts.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-custom.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-promo.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-topnav.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-expandedmenu.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/js/injector/injector-footer.js","webpack://essence_site/./wp/wp-content/themes/pubstack/assets/injector.js"],"sourcesContent":["module.exports = jQuery;","// 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","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","/**\n * Validate all fields in the container.\n *\n * - Fields with required attribute are all required.\n * - email field name should be \"email\".\n * - email confirm field name should be \"email_confirm\".\n */\n\nexport const isFormValid = ($container, validateList = true) => {\n\tconst ERROR_REQUIRED_CLASS = \"invalid-required\";\n\tconst ERROR_INVALID_EMAIL_CLASS = \"invalid-email\";\n\tconst ERROR_INVALID_CONFIRM_CLASS = \"invalid-confirm\";\n\n\tconst isFieldValid = (field, $container) => {\n\t\tlet isValid = true;\n\n\t\tfield.classList.remove(ERROR_REQUIRED_CLASS);\n\t\tfield.classList.remove(ERROR_INVALID_EMAIL_CLASS);\n\t\tfield.classList.remove(ERROR_INVALID_CONFIRM_CLASS);\n\n\t\t// Required validation.\n\t\tif (field.hasAttribute(\"required\")) {\n\t\t\tif (field.value.trim()) {\n\t\t\t\tfield.classList.remove(ERROR_REQUIRED_CLASS);\n\t\t\t} else {\n\t\t\t\tfield.classList.add(ERROR_REQUIRED_CLASS);\n\t\t\t\tisValid = false;\n\t\t\t}\n\t\t}\n\n\t\t// Email validation.\n\t\tif (\"email\" === field.type && isValid) {\n\t\t\tif (\n\t\t\t\t!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9_-]+\\.[a-zA-Z0-9-.]{2,61}$/.test(\n\t\t\t\t\tfield.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfield.classList.add(ERROR_INVALID_EMAIL_CLASS);\n\t\t\t\tisValid = false;\n\t\t\t} else {\n\t\t\t\tfield.classList.remove(ERROR_INVALID_EMAIL_CLASS);\n\t\t\t}\n\t\t}\n\n\t\t// Email Confirm Validation.\n\t\tif (field.name.includes(\"email_confirm\")) {\n\t\t\t// Check if the field is in a modal.\n\t\t\tconst $email = $container.find('[name=\"email\"]');\n\t\t\tif (\n\t\t\t\t!$email.hasClass(ERROR_REQUIRED_CLASS) &&\n\t\t\t\t!$email.hasClass(ERROR_INVALID_EMAIL_CLASS)\n\t\t\t) {\n\t\t\t\tif ($email.val() !== field.value) {\n\t\t\t\t\tfield.classList.add(ERROR_INVALID_CONFIRM_CLASS);\n\t\t\t\t\tisValid = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.classList.remove(ERROR_INVALID_CONFIRM_CLASS);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn isValid;\n\t};\n\n\tlet isValid = true;\n\t$container.find(\"[name]\").each((index, field) => {\n\t\tif (!isFieldValid(field, $container)) {\n\t\t\tisValid = false;\n\t\t}\n\t});\n\n\t// Validate opt-in list.\n\tif (validateList) {\n\t\tconst selector =\n\t\t\t\"[name='newsletter_name[]'][type=hidden], [name='newsletter_name[]'][type=checkbox]:checked\";\n\n\t\tconst list = $container\n\t\t\t.find(selector)\n\t\t\t.map((index, field) => field.value)\n\t\t\t.get();\n\n\t\tif (!list.length) {\n\t\t\t$container.find(\".error-invalid-list\").show();\n\t\t\tisValid = false;\n\t\t} else {\n\t\t\t$container.find(\".error-invalid-list\").hide();\n\t\t}\n\t}\n\n\treturn isValid;\n};\n\nexport const replaceWithSuccess = ($form, mode = \"signup\", email) => {\n\tlet message = \"\";\n\n\tswitch (mode) {\n\t\tcase \"update\":\n\t\t\tmessage = \"Thank you! Your email preferences were updated successfully.\";\n\t\t\tbreak;\n\t\tcase \"unsubscribe\":\n\t\t\tmessage = \"You have successfully unsubscribed \" + email + \" from Trending News.\";\n\t\t\tvar $title = document.querySelector(\".title-sorry\");\n\t\t\tif ($title) {\n\t\t\t\t$title.style.display = \"none\";\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tvar $title = document.querySelector(\".title\");\n\t\t\tif ($title) {\n\t\t\t\t$title.style.display = \"none\";\n\t\t\t}\n\t\t\tvar $subTitle = document.querySelector(\".subtitle\");\n\t\t\tif ($subTitle) {\n\t\t\t\t$subTitle.style.display = \"none\";\n\t\t\t}\n\t\t\tmessage =\n\t\t\t\t\"

Thank you!


You have successfully subscribed to Trending News\";\n\t}\n\tvar $title = document.querySelector('.wp-block-ess-newsletter-signup__headline');\n\tif ($title) {\n\t\t$title.style.display = \"none\";\n\t\t$form.replaceWith(`
${message}
`);\n\t} else {\n\t\tvar $inline = document.querySelector('#subscribe-step1');\n\t\tif ($inline) {\n\t\t\t$form.replaceWith(`
${message}
`);\n\t\t} else {\n\t\t\t$form.replaceWith(`
${message}
`);\n\t\t}\n\t}\n\n\tvar $topBar = document.querySelector('.top_image');\n\tif ($topBar) {\n\t\t$topBar.style.display = \"none\";\n\t}\n\tvar $content = document.querySelector('.email-preferences-content');\n\tif ($content) {\n\t\t$content.setAttribute('style', 'border-radius: 16px;')\n\t}\n};\n\nexport const showErrorMessage = ($response) =>\n\t$response.text(\"Oops! Something went wrong. Please try again later.\").show();\n\nexport const doSubscribeAjax = (\n\t$form,\n\tsuccessCallback,\n\tfailCallback,\n\talwaysCallback\n) => {\n\tconst $button = $form.find(\"[type=submit]\");\n\tconst $response = $form.find(\".subscribe-form-response\");\n\tconst $loading = $form.find(\".subscribe-form-loading\");\n\n\t$button.attr(\"disabled\", \"\");\n\t$response.hide();\n\t$loading.show();\n\n\tconst data = $form.serialize() + \"&action=newsletter_subscribe\";\n\tconst mail = $form.find('input[type=\"email\"]').val();\n\n\t$.ajax({\n\t\turl: pubstack.ajaxUrl,\n\t\tmethod: \"POST\",\n\t\tdataType: \"JSON\",\n\t\tdata,\n\t})\n\t\t.done(function (response) {\n\t\t\ttrackCordialNewsletter($form);\n\t\t\t// check if this subscription process has multiple steps (e.g. Article inline NL form)\n\t\t\tif (\"subscribe-next-step\" !== $form.data(\"mode\")) {\n\t\t\t\tconst email = mail ? mail : '';\n\t\t\t\tif ($form.data(\"redirect\")) {\n\t\t\t\t\tlocation.href = $form.data(\"redirect\");\n\t\t\t\t} else {\n\t\t\t\t\treplaceWithSuccess($form, $form.data(\"mode\"), email);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsuccessCallback && successCallback();\n\t\t})\n\t\t.fail(function (xhr, textStatus, error) {\n\t\t\t// Will need to reproduce this error in order to get the proper json tree structure\n\t\t\tif (\n\t\t\t\txhr.responseJSON &&\n\t\t\t\txhr.responseJSON.code === \"CONTACTS_DUPLICATE_KEY\"\n\t\t\t) {\n\t\t\t\tconsole.log(\"CONTACTS_DUPLICATE_KEY\");\n\t\t\t\tshowErrorMessage(\"Please try again soon.\");\n\t\t\t} else {\n\t\t\t\tshowErrorMessage($response);\n\t\t\t\tfailCallback && failCallback();\n\t\t\t}\n\t\t})\n\t\t.always(function () {\n\t\t\t$loading.hide();\n\t\t\t$button.removeAttr(\"disabled\");\n\t\t\talwaysCallback && alwaysCallback();\n\t\t});\n};\n\nconst trackCordialNewsletter = ($form) => {\n\tif (typeof crdl === \"undefined\") {\n\t\treturn;\n\t}\n\n\tlet event,\n\t\tproperties = {};\n\n\tconst email = $form.find(\"[name=email]\").val();\n\n\tif (\"update\" === $form.data(\"mode\")) {\n\t\tevent = \"preference_update\";\n\t} else if (\"unsubscribe\" === $form.data(\"mode\")) {\n\t\tevent = \"unsubscribe\";\n\t} else {\n\t\tevent = \"newsletter_signup\";\n\t\tproperties[\"source\"] = $form.find(\"[name=source]\").val();\n\t}\n\n\tvar auth_data = {\n\t\temail: email\n\t};\n\tvar firstName = $form.find(\"[name=first_name]\").val();\n\tvar lastName = $form.find(\"[name=last_name]\").val();\n\tvar contact_data = {\n\t\t'channels': {\n\t\t\t'email': {\n\t\t\t\t'subscribeStatus': 'subscribed'\n\t\t\t}\n\t\t},\n\t\t'first_name': firstName,\n\t\t'last_name': lastName,\n\t\t'girlsunited-trending-news-subscribers': true\n\t};\n\tcrdl('contact', auth_data, contact_data);\n\tcrdl(\"event\", event, properties);\n};\n","/**\n * Javascript for InjectorCommerce\n **/\n\nfunction InjectorCommerce() {\n this.lastThirdParagraph = (article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n // Last 3rd if there are more than 6 paragraphs/slides, or at the end of the article.\n const posFromLast = pCount + slideCount >= 6 ? 3 : 1;\n if (slideCount > posFromLast) {\n mainContent.find(`${slide}:eq(-${posFromLast})`).before(widget);\n } else {\n mainContent.find(`p:eq(-${posFromLast - slideCount})`).before(widget);\n }\n };\n}\n\nexport default InjectorCommerce;\n\nexport function initCommerceSwiper() {\n let swiperContainers = document.querySelectorAll(\n '[data-js=\"essence-carousel-swiper\"]'\n );\n\n swiperContainers.forEach((sliderEl) => {\n new Swiper(sliderEl, {\n effect: \"coverflow\",\n initialSlide: 1,\n spaceBetween: 0,\n loop: true,\n grabCursor: true,\n centeredSlides: true,\n slidesPerView: 1.3,\n coverflowEffect: {\n rotate: 0,\n stretch: 0,\n depth: 125,\n modifier: 1,\n slideShadows: true,\n },\n navigation: {\n nextEl: sliderEl.parentNode.querySelector(\".swiper-button-prev\"),\n prevEl: sliderEl.parentNode.querySelector(\".swiper-button-next\"),\n },\n breakpoints: {\n // when window width is >= 768px\n 768: {\n effect: \"slide\",\n initialSlide: 0,\n spaceBetween: 20,\n centeredSlides: false,\n slidesPerView: 3,\n coverflowEffect: {\n rotate: 0,\n stretch: 0,\n depth: 0,\n modifier: 1,\n slideShadows: false,\n },\n },\n },\n });\n });\n\n const shoppingNewSipwers = document.querySelectorAll(\n '[data-js=\"essence-shopping-swiper-new\"]'\n );\n\n shoppingNewSipwers.forEach((sliderEl) => {\n new Swiper(sliderEl, {\n spaceBetween: 20,\n grabCursor: true,\n slidesPerView: \"auto\",\n scrollbar: {\n el: sliderEl.parentNode.querySelector(\".swiper-scrollbar\"),\n },\n navigation: {\n nextEl: sliderEl.parentNode.querySelector(\".swiper-button-next\"),\n prevEl: sliderEl.parentNode.querySelector(\".swiper-button-prev\"),\n },\n breakpoints: {\n // when window width is >= 768px\n 768: {\n spaceBetween: 24,\n },\n },\n });\n });\n}\n\n// Allow injected carousel widgets to initialize themselves\n// Usage: commerceSwiper.initCommerceSwiper();\nwindow.commerceSwiper = {\n initCommerceSwiper: initCommerceSwiper,\n};\n","/**\n * Javascript for InjectorMain\n *\n **/\n\nimport InjectorAds from \"./injector-ads\";\nimport InjectorBanners from \"./injector-banners\";\nimport InjectorNewsletterSignup from \"./injector-newsletter-signup\";\nimport InjectorVideos from \"./injector-videos\";\nimport InjectorRightrail from \"./injector-rightrail\";\nimport InjectorTouts from \"./injector-touts\";\nimport InjectorCommerce from \"./injector-commerce\";\nimport InjectorCustom from \"./injector-custom\";\nimport InjectorPromo from \"./injector-promo\";\nimport InjectorTopnav from \"./injector-topnav\";\nimport InjectorExpandedmenu from \"./injector-expandedmenu\";\nimport InjectorFooter from \"./injector-footer\";\n\nconst injectorAds = new InjectorAds();\nconst injectorBanners = new InjectorBanners();\nconst injectorSignup = new InjectorNewsletterSignup();\nconst injectorVideos = new InjectorVideos();\nconst injectorRightrail = new InjectorRightrail();\nconst injectorTouts = new InjectorTouts();\nconst injectorCommerce = new InjectorCommerce();\nconst injectorCustom = new InjectorCustom();\nconst injectorPromo = new InjectorPromo();\nconst injectorTopnav = new InjectorTopnav();\nconst injectorExpandedmenu = new InjectorExpandedmenu();\nconst injectorFooter = new InjectorFooter();\n\nfunction InjectorMain() {\n this.init = function () {\n injectorRightrail.init(); // Run first.\n injectorAds.init();\n this.getWidgets();\n $(window).on(\"injector:scroll_update\", this, this.getWidgets);\n $(window).on(\"injector:inject_widgets\", this, this.injectWidgets);\n };\n\n this.injectWidgets = (_, $article, priorities) => {\n const subscribeDisplayed = sessionStorage.getItem(\n \"ess_nl_inline_displayed\"\n );\n\n let rulesUsed = [];\n let rightrail = null;\n let topnav = null;\n let expandedmenu = null;\n let footer = null;\n for (const p in priorities) {\n if (\"rightrail\" === p) {\n rightrail = priorities[p];\n } else if (\"topnav\" === p) {\n topnav = priorities[p];\n } else if (\"expandedmenu\" === p) {\n expandedmenu = priorities[p];\n } else if (\"footer\" === p) {\n footer = priorities[p];\n } else if (\n Object.hasOwn(priorities, p) &&\n /^0$|^[1-9]\\d*$/.test(p) &&\n p <= 4294967294\n ) {\n const priority = priorities[p];\n // Try/Catch to prevent widget injection errors from breaking the rightrail.\n try {\n for (const name in priority) {\n let widgets = priority[name];\n let randSum = 100;\n\n for (const w in widgets) {\n if (\n Object.hasOwn(widgets, w) &&\n /^0$|^[1-9]\\d*$/.test(w) &&\n w <= 4294967294\n ) {\n const widget = widgets[w];\n\n if (\n typeof widget === \"object\" &&\n !Array.isArray(widget) &&\n widget !== null\n ) {\n let rule = widget.rule;\n let rand = Math.floor(Math.random() * randSum);\n randSum -= rand;\n\n // Banner frequency is handled in the backend.\n if (\"banners\" === name || rand < widget.frequency) {\n // Allow to disable some injections.\n if (\n typeof pubstack.allowedInjections !== \"undefined\" &&\n !pubstack.allowedInjections.includes(name)\n ) {\n continue;\n }\n switch (name) {\n case \"ads\":\n if (!rulesUsed.includes(rule) || 1) {\n // Only one rule for ads\n // widget contains mobile, desktop and between_article ads\n injectorAds.betweenArticle($article, widget);\n injectorAds.everyThird($article, widget);\n $(window).trigger(\"ad:scroll_update\");\n }\n break;\n case \"banners\":\n if (!rulesUsed.includes(rule) || 1) {\n // Only one rule for banners\n injectorBanners.middleParagraph(\n $article,\n widget.html\n );\n }\n break;\n case \"videos\":\n // Allows for backup to place video at end\n if (rulesUsed.includes(rule) && rule === \"middle\") {\n rule = \"end\";\n }\n if (\n !rulesUsed.includes(rule) &&\n undefined !== widget.html\n ) {\n if (rule === \"middle\") {\n injectorVideos.middleParagraph(\n $article,\n widget.html\n );\n } else {\n injectorVideos.endParagraph($article, widget.html);\n }\n randSum = 0; // Only one video per article\n }\n break;\n case \"newsletter\":\n if (!rulesUsed.includes(rule) || 1) {\n // Only one rule for newsletter subscribe\n if (!subscribeDisplayed && widget !== false) {\n injectorSignup.fifthParagraph(\n $article,\n widget.html\n );\n } else {\n rule = null;\n }\n }\n break;\n case \"touts\":\n if (!rulesUsed.includes(rule) || 1) {\n // Only one rule for touts\n injectorTouts.lastThirdParagraph(\n $article,\n widget.html\n );\n }\n break;\n case \"commerce\":\n // Don't inject commerce widget in commerce articles\n if ($article.attr(\"class\").indexOf(\"commerce\") === -1) {\n if (!rulesUsed.includes(rule)) {\n // Only one rule for commerce\n injectorCommerce.lastThirdParagraph(\n $article,\n widget.html\n );\n }\n }\n break;\n case \"custom\":\n injectorCustom.middleParagraph($article, widget.html);\n break;\n case \"promo\":\n injectorPromo.inject(\n rule,\n widget.rule_num,\n $article,\n widget.html\n );\n break;\n }\n\n // Allows multiple at end of content\n if (rule !== \"end\") {\n rulesUsed.push(rule);\n }\n }\n }\n }\n }\n }\n } catch (e) {\n console.log(e);\n }\n }\n }\n // Inject rightrail after all other content injection so that float right will not look bad.\n if (\n !(\n typeof pubstack.allowedInjections !== \"undefined\" &&\n !pubstack.allowedInjections.includes(\"rightrail\")\n ) &&\n rightrail\n ) {\n injectorRightrail.inject($article, rightrail);\n $(window).trigger(\"ad:scroll_update\");\n }\n injectorTopnav.inject(topnav);\n injectorExpandedmenu.inject(expandedmenu);\n injectorFooter.inject(footer);\n\n $(window).trigger(\"injector:inject_widgets_injected\", [$article]);\n };\n this.getWidgets = (event = null, $article = null) => {\n let isFirst = true;\n if (null === $article) {\n isFirst = false;\n // First article. Otherwise, iscroll will send which article.\n $article = $(\"#main article\").first();\n }\n\n let post_id = $article.data(\"id\");\n let data = {\n isAjax: isFirst,\n articlesLoaded: $(\"#main .article\").length,\n };\n\n if (post_id === undefined) {\n post_id = pubstack.post_id;\n if (post_id === undefined) {\n return false;\n }\n }\n let sitetheme = JSON.parse(ps_ad_object[0].page_targeting).sitetheme;\n let appview = $(\"body\").hasClass(\"appview1\") ? \"&appview1=1\" : \"\";\n appview += $(\"body\").hasClass(\"appview2\") ? \"&appview2=1\" : \"\";\n\n fetch(\n pubstack.restUrl +\n \"pubstack/v1/injector-widgets/\" +\n post_id +\n \"?isAjax=\" +\n isFirst +\n \"&articlesLoaded=\" +\n $(\"#main .article\").length +\n \"&ps_theme=\" +\n sitetheme +\n appview,\n {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n }\n )\n .then((response) => response.json())\n .then((response) => {\n $(window).trigger(\"injector:inject_widgets\", [$article, response]);\n })\n .catch((error) => {\n console.error(\"Could not load injector widgets.: \", error);\n });\n };\n}\n\nexport default InjectorMain;\n","/**\n * Javascript for InjectorAds\n *\n * Finds target elements inside singular article markup and injects ads.\n **/\n\nfunction InjectorAds() {\n this.init = () => {\n this.observer = new IntersectionObserver(\n (entries, observer) => {\n entries.forEach((entry) => {\n if (entry.intersectionRatio && entry.intersectionRatio < 1) {\n if (entry.boundingClientRect.top <= 71) {\n // If intersecting at the top of the browser, remove sticky after 2 seconds.\n setTimeout(() => entry.target.classList.remove(\"sticky\"), 2000);\n } else {\n // If intersecting at the bottom of the browser, add sticky back.\n entry.target.classList.add(\"sticky\");\n }\n }\n });\n },\n {\n rootMargin: `-71px 0px 0px 0px`, // give 1px more than the header height or the element will never intersect\n threshold: [1],\n }\n );\n };\n this.betweenArticle = ($article, ads) => {\n if (typeof ads.between_article === \"string\" && ads.between_article !== \"\") {\n // Don't show this ad unit if it's the first article on the page.\n if ($article[0] === document.querySelector(\"article:first-of-type\")) {\n return;\n }\n let widget = ads.between_article;\n $article.prepend(widget.replace(\"INJECTOR_COUNTER\", 1)); // one per article.\n const target = $article.find(\".ad-position.infinite_scroll\")[0];\n if (target) {\n this.observer.observe(target);\n }\n }\n };\n this.everyThird = (article, ads) => {\n if (typeof ads.mobile === \"string\") {\n let widget = ads.mobile;\n let every = 3, galleryEvery = 3;\n if ($(window).width() >= 768) {\n widget = ads.desktop;\n every = 4; // Increases the space on desktop.\n galleryEvery = 2;\n }\n\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n\n let injector_counter = 0;\n // Check Paragraphs first.\n for (let index = every; index < pCount - 2; index += every) {\n let this_ad = widget;\n this_ad = this_ad.replace(/INJECTOR_COUNTER/g, injector_counter++);\n mainContent.children(\"p:eq(\" + index + \")\").before(this_ad);\n }\n for (let index = galleryEvery; index <= galleryCount - 1; index += galleryEvery) {\n const itemSelector = \"gallery-slide\";\n let this_ad = widget;\n this_ad = this_ad.replace(/INJECTOR_COUNTER/g, injector_counter++);\n mainContent\n .find(`.${itemSelector}:eq( ` + index + ` )`)\n .before(this_ad);\n }\n for (let index = every; index < commerceCount - 1; index += every) {\n const itemSelector = \"commerce-gallery-item\";\n let this_ad = widget;\n this_ad = this_ad.replace(/INJECTOR_COUNTER/g, injector_counter++);\n mainContent\n .find(`.${itemSelector}:eq( ` + index + ` )`)\n .before(this_ad);\n }\n }\n };\n}\n\nexport default InjectorAds;\n","/**\n * Javascript for InjectorBanners\n **/\n\nfunction InjectorBanners() {\n this.middleParagraph = (article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount >= 6) {\n let middle = Math.ceil((pCount + slideCount) / 2);\n // Add some separation between ads using \"everyThird\"\n if (middle % 3 === 0) {\n middle++;\n }\n if (pCount >= middle) {\n mainContent.children(\"p:eq(\" + middle + \")\").before(widget);\n } else {\n mainContent.find(`${slide}:eq(${middle - pCount})`).before(widget);\n }\n }\n };\n}\n\nexport default InjectorBanners;\n","/**\n * Javascript for InjectorNewsletterSignup\n **/\nimport {\n doSubscribeAjax,\n isFormValid,\n} from \"../../../../gu/assets/js/newsletter/util\"; // TODO: Move util.js to pubstack\n\nfunction InjectorNewsletterSignup() {\n this.fifthParagraph = (article, widget) => {\n if (pCount >= 6) {\n let middle = Math.ceil(pCount / 2);\n // Add some separation between ads using \"everyThird\"\n if (middle % 3 === 0) {\n middle++;\n }\n mainContent.children(\"p:eq(\" + middle + \")\").before(widget);\n }\n\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n // After 5rd Paragraph or 75% of article, whichever is HIGHER.\n const mid = Math.max(5, Math.floor(((pCount + slideCount) * 3) / 4));\n if (pCount >= mid) {\n mainContent.children(\"p:eq(\" + (mid - 1) + \")\").after(widget);\n } else {\n mainContent\n .find(\n `.${galleryCount ? \"gallery-slide\" : \"commerce-gallery-item\"}:eq(${\n mid - pCount - 1\n })`\n )\n .after(widget);\n }\n\n const section = mainContent.find(\".newsletter-subscribe-inline\");\n section.slideDown();\n this.register(section);\n };\n this.register = (section) => {\n section.find(\".js-dismiss\").on(\"click\", () => this.close(section));\n section.find(\".js-next\").on(\"click\", (e) => this.nextStep(e));\n section.find(\".subscribe-form\").each((_, form) => this.setupForm($(form))); // Setup each form found\n };\n\n this.setupForm = (form) => {\n const checkbox = form.find(\"input[type='checkbox']\");\n const submitBtn = form.find(\"button[type='submit']\");\n\n // Disable button by default if checkbox is necessary\n if (submitBtn && checkbox) {\n submitBtn.prop(\"disabled\", !checkbox.is(\":checked\"));\n\n checkbox.on(\"change\", function () {\n submitBtn.prop(\"disabled\", !$(this).is(\":checked\"));\n });\n }\n\n form.on(\"submit\", (e) => this.submit(e, form));\n };\n\n this.close = (section) => {\n sessionStorage.setItem(\"ess_nl_inline_displayed\", \"true\");\n section.slideUp(1000, function () {\n section.remove();\n });\n };\n\n this.nextStep = (e) => {\n e.preventDefault();\n\n const $step = $(e.target).closest(\".js-step\");\n if (isFormValid($step, false)) {\n $step.hide();\n $step.next().fadeIn(500);\n }\n };\n\n this.submit = (e, section) => {\n e.preventDefault();\n\n const $form = $(e.target);\n\n if (isFormValid($form)) {\n doSubscribeAjax($form, () => {\n // Article inline form has two steps\n if (\"subscribe-next-step\" === $form.data(\"mode\")) {\n // pre-populate email address from previous step\n $(\"#subscribe-step2 input[type=email]\").val(\n $(\"#subscribe-step1 input[type=email]\").val()\n );\n this.nextStep(e);\n } else {\n const scrollTop =\n section.offset().top - $(\"#masthead\").outerHeight() - 100;\n\n $(\"html, body\").animate({ scrollTop }, 500);\n setTimeout(() => this.close(section), 3000);\n }\n });\n }\n };\n}\n\nexport default InjectorNewsletterSignup;\n","/**\n * Javascript for InjectorVideos\n **/\n\nfunction InjectorVideos() {\n this.injectorCallCount = 0;\n this.middleParagraph = (article, widget) => {\n this.injectorCallCount++;\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount >= 6) {\n let middle = Math.ceil((pCount + slideCount) / 2);\n // Add some separation between ads using \"everyThird\"\n if ($(window).width() >= 768) {\n if ((galleryCount && (middle - pCount) % 2 === 0) || middle % 4 === 0) {\n middle++;\n }\n } else if (middle % 3 === 0) {\n middle++;\n }\n if (pCount >= middle) {\n mainContent.children(\"p:eq(\" + middle + \")\").before(widget);\n } else {\n mainContent.find(`${slide}:eq(${middle - pCount})`).before(widget);\n }\n } else if (this.injectorCallCount === 1) {\n this.endParagraph(article, widget);\n }\n };\n this.endParagraph = (article, widget) => {\n this.injectorCallCount++;\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n\n if (widget.includes(\"jw-video-box\")) {\n // Remove message when the video were to put at the end.\n widget = $(widget).get(1);\n }\n\n // If there is a hero video, append video only when there are more than 6 paragraphs.\n if (!mainContent.find(\".jw-video-box\").length || pCount >= 6) {\n mainContent.children(\".article__tags\").before(widget);\n }\n };\n}\n\nexport default InjectorVideos;\n","/**\n * Javascript for InjectorRightrail\n **/\n\nfunction InjectorRightrail() {\n this.init = () => {\n if ($(\"#main article\").hasClass(\"of_the_essence\")) {\n return;\n }\n\n this.updateLayout();\n $(window).on(\"injector:scroll_update\", this, this.updateLayout);\n };\n\n this.updateLayout = (event = null, $article = null) => {\n if (null === $article) {\n $article = $(\"#main article\").first();\n }\n\n if ($article.hasClass(\"of_the_essence\")) {\n return;\n }\n\n const isVideoArticle = $article.hasClass(\"video\");\n const isFeatureArticle = $article.hasClass(\"feature\");\n };\n\n this.inject = ($article, rightrail) => {\n $article.find('[data-js=\"rightrail\"]').html(rightrail);\n };\n\n this.middleParagraph = ($article, rightrail) => {\n const mainContent = $article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount >= 6) {\n let middle = Math.ceil((pCount + slideCount) / 2);\n // Add some separation between ads using \"everyThird\"\n if ($(window).width() >= 768) {\n if ((galleryCount && (middle - pCount) % 2 === 0) || middle % 4 === 0) {\n middle++;\n }\n } else if (middle % 3 === 0) {\n middle++;\n }\n if (pCount >= middle) {\n /** To insert within paragraphs */\n const targetParagraph = mainContent.children(\"p:eq(\" + middle + \")\");\n\n // If there is only one paragraph after the banner and it is too short,\n // there will be too much space on the left of the banner due to floating.\n // In that case, if there is a paragraph before the banner, and move the banner up.\n if (\n !targetParagraph.next().is(\"p\") &&\n targetParagraph.text().trim().split(/\\s+/).length < 60 &&\n targetParagraph.prev().is(\"p\")\n ) {\n targetParagraph = targetParagraph.prev();\n }\n\n targetParagraph.before(rightrail);\n mainContent.find(\".read-more-blog\").addClass(\"read-more-blog--float\");\n } else {\n /** To insert within gallery items */\n mainContent.find(`${slide}:eq(${middle - pCount})`).before(rightrail);\n }\n }\n };\n}\n\nexport default InjectorRightrail;\n","export default function _readOnlyError(name) {\n throw new TypeError(\"\\\"\" + name + \"\\\" is read-only\");\n}","/**\n * Javascript for InjectorTouts\n **/\n\nfunction InjectorTouts() {\n this.lastThirdParagraph = (article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n // Last 3rd if there are more than 6 paragraphs/slides, or at the end of the article.\n const posFromLast = pCount + slideCount >= 6 ? 3 : 1;\n if (slideCount > posFromLast) {\n mainContent.find(`${slide}:eq(-${posFromLast})`).before(widget);\n } else {\n mainContent.find(`p:eq(-${posFromLast - slideCount})`).before(widget);\n }\n };\n}\n\nexport default InjectorTouts;\n","/**\n * Javascript for InjectorCustom\n **/\n\nfunction InjectorCustom() {\n this.middleParagraph = (article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount >= 6) {\n let middle = Math.ceil((pCount + slideCount) / 2);\n // Add some separation between ads using \"everyThird\"\n if ($(window).width() >= 768) {\n if (galleryCount && (middle - pCount) % 2 === 0 || middle % 4 === 0) {\n middle ++;\n }\n } else if (middle % 3 === 0) {\n middle ++;\n }\n if (pCount >= middle) {\n mainContent.children(\"p:eq(\" + middle + \")\").before(widget);\n } else {\n mainContent.find(`${slide}:eq(${middle - pCount})`).before(widget);\n }\n\n }\n };\n}\n\nexport default InjectorCustom;\n","/**\n * Javascript for InjectorPromo\n *\n * Always use .before to make at least one paragraph follow.\n **/\n\nfunction InjectorPromo() {\n this.inject = (rule, ruleNum, article, widget) => {\n ruleNum = parseInt(ruleNum);\n\n switch (rule) {\n case \"every\":\n this.every(ruleNum, article, widget);\n break;\n case \"after\":\n this.after(ruleNum, article, widget);\n break;\n case \"last\":\n this.last(ruleNum, article, widget);\n break;\n case \"percent\":\n this.percent(ruleNum, article, widget);\n break;\n }\n };\n\n this.every = (ruleNum, article, widget) => {\n // if ($(window).width() >= 768) {\n // \truleNum += 1; // Increases the space on desktop.\n // }\n\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount < 3) {\n return;\n }\n\n // Every (N)th until the last 2nd paragraph or the last slide.\n const until = ruleNum < slideCount ? pCount + slideCount : pCount - 1;\n for (let index = ruleNum; index < until; index += ruleNum) {\n mainContent.find(`p, ${slide}`).eq(index).before(widget);\n }\n };\n\n this.after = (ruleNum, article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount < 3) {\n return;\n }\n\n // After (N)th if there are more than (N) paragraphs/slides or ignore.\n mainContent\n .find(`p, ${slide}`)\n .eq(ruleNum - 1)\n .after(widget);\n };\n\n this.last = (ruleNum, article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount < 3) {\n return;\n }\n\n // Last (N)th if there are more than (N x 2) paragraphs/slides, or at the end of the article.\n const posFromLast = pCount + slideCount >= ruleNum * 2 ? ruleNum : 0;\n if (posFromLast === 0) {\n mainContent.append(widget);\n } else {\n mainContent.find(`p, ${slide}`).eq(-posFromLast).before(widget);\n }\n };\n\n this.percent = (ruleNum, article, widget) => {\n const mainContent = article.find('[data-js=\"main-content\"]');\n const pCount = mainContent.children(\"p:not(:empty)\").length;\n const galleryCount = mainContent.find(\".gallery-slide\").length;\n const commerceCount = mainContent.find(\".commerce-gallery-item\").length;\n const slideCount = galleryCount ? galleryCount : commerceCount; // Either gallery or commerce\n const slide = galleryCount ? \".gallery-slide\" : \".commerce-gallery-item\";\n\n if (pCount + slideCount < 3) {\n return;\n }\n\n // (N)% from the start and after 3th paragraphs/slides\n const pos = Math.max(Math.ceil((pCount + slideCount) * (ruleNum / 100)), 3);\n mainContent.find(`p, ${slide}`).eq(pos).before(widget);\n };\n}\n\nexport default InjectorPromo;\n","/**\n * Javascript for InjectorTopnav\n **/\n\nfunction InjectorTopnav() {\n this.init = () => {};\n\n this.inject = (topnav) => {\n if (topnav) {\n $(\"#site-navigation\").html(topnav);\n }\n };\n}\n\nexport default InjectorTopnav;\n","/**\n * Javascript for InjectorExpandedmenu\n **/\n\nfunction InjectorExpandedmenu() {\n this.init = () => {};\n\n this.inject = (menu) => {\n $(\"body\").append(menu);\n $(window).trigger(\"injector:expandedmenu-load\");\n };\n}\n\nexport default InjectorExpandedmenu;\n","/**\n * Javascript for InjectorFooter\n **/\n\nfunction InjectorFooter() {\n this.init = () => {};\n\n this.inject = (html) => {\n $(\".site-footer\").append(html);\n $(window).trigger(\"injector:footer-load\");\n };\n}\n\nexport default InjectorFooter;\n","/**\n * Functionality to power the automatic and manual injection of editorial\n * defined widgets into the body of content.\n *\n * This is the file that Webpack is compiling into injector.[hash].js\n */\n\n// import \"./sass/injector.scss\";\nimport injectorMain from \"./js/injector/injector-main\";\n\n$(document).ready(function () {\n const InjectorMainInstance = new injectorMain();\n InjectorMainInstance.init();\n});\n"],"names":["module","exports","jQuery","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","_typeof","obj","Symbol","iterator","constructor","prototype","isFormValid","$container","validateList","ERROR_REQUIRED_CLASS","ERROR_INVALID_EMAIL_CLASS","ERROR_INVALID_CONFIRM_CLASS","isValid","find","each","index","field","classList","remove","hasAttribute","value","trim","add","type","test","name","includes","$email","hasClass","val","isFieldValid","map","get","length","hide","show","showErrorMessage","$response","text","trackCordialNewsletter","$form","crdl","event","properties","email","data","auth_data","firstName","lastName","window","commerceSwiper","initCommerceSwiper","document","querySelectorAll","forEach","sliderEl","Swiper","effect","initialSlide","spaceBetween","loop","grabCursor","centeredSlides","slidesPerView","coverflowEffect","rotate","stretch","depth","modifier","slideShadows","navigation","nextEl","parentNode","querySelector","prevEl","breakpoints","scrollbar","el","injectorAds","this","init","observer","IntersectionObserver","entries","entry","intersectionRatio","boundingClientRect","top","setTimeout","target","rootMargin","threshold","betweenArticle","$article","ads","between_article","widget","prepend","replace","observe","everyThird","article","mobile","every","galleryEvery","$","width","desktop","mainContent","pCount","children","galleryCount","commerceCount","injector_counter","this_ad","before","injectorBanners","middleParagraph","slideCount","slide","middle","Math","ceil","injectorSignup","fifthParagraph","mid","max","floor","after","section","slideDown","register","on","close","e","nextStep","_","form","setupForm","checkbox","submitBtn","prop","is","submit","sessionStorage","setItem","slideUp","preventDefault","$step","closest","next","fadeIn","successCallback","failCallback","alwaysCallback","$button","$loading","attr","serialize","mail","ajax","url","pubstack","ajaxUrl","method","dataType","done","response","location","href","message","$title","style","display","$subTitle","replaceWith","$topBar","$content","setAttribute","replaceWithSuccess","fail","xhr","textStatus","error","responseJSON","code","console","log","always","removeAttr","doSubscribeAjax","scrollTop","offset","outerHeight","animate","injectorVideos","injectorCallCount","endParagraph","injectorRightrail","updateLayout","first","inject","rightrail","html","targetParagraph","split","prev","TypeError","addClass","injectorTouts","lastThirdParagraph","posFromLast","injectorCommerce","injectorCustom","injectorPromo","rule","ruleNum","parseInt","last","percent","until","eq","append","pos","injectorTopnav","topnav","injectorExpandedmenu","menu","trigger","injectorFooter","getWidgets","injectWidgets","priorities","subscribeDisplayed","getItem","rulesUsed","expandedmenu","footer","p","Object","hasOwn","priority","widgets","randSum","w","Array","isArray","rand","random","frequency","allowedInjections","indexOf","rule_num","push","isFirst","post_id","sitetheme","JSON","parse","ps_ad_object","page_targeting","appview","fetch","restUrl","headers","then","json","catch","ready","injectorMain"],"sourceRoot":""}