document.addEventListener('DOMContentLoaded',function(){const modal=document.getElementsByClassName('jetpack-subscription-modal')[0];if(!modal){return} const close=document.getElementsByClassName('jetpack-subscription-modal__close')[0];let redirectUrl='';let hasLoaded=!1;function reloadOnCloseSubscriptionModal(customUrl){const destinationUrl=customUrl?new URL(customUrl):new URL(redirectUrl);if(destinationUrl.hostname!==window.location.hostname){return} try{localStorage.setItem('jetpack-subscription-modal-on-comment-scroll-to',destinationUrl.hash)}catch{} destinationUrl.searchParams.set('_ctn',Date.now());window.location.href=destinationUrl.toString()} function JetpackSubscriptionModalOnCommentMessageListener(event){let message=event&&event.data;if(typeof message==='string'){try{message=JSON.parse(message)}catch{return}} const type=message&&message.type;const data=message&&message.data;if(type!=='subscriptionModalShow'||typeof data.url==='undefined'){return} if(subscriptionData.homeUrl!==event.origin){return} if(data.email){const emailInput=document.querySelector('.jetpack-subscription-modal__modal-content input[type="email"]');if(!emailInput){reloadOnCloseSubscriptionModal(data.url);return} const appSource=document.querySelector('.jetpack-subscription-modal__modal-content input[name="app_source"]');if(!appSource){reloadOnCloseSubscriptionModal(data.url);return} emailInput.value=data.email;if(data.is_logged_in){emailInput.setAttribute('readonly','readonly');appSource.value='atomic-subscription-modal-li'}} if(!hasLoaded){try{const storedCount=parseInt(sessionStorage.getItem('jetpack-subscription-modal-shown-count'));const showCount=(isNaN(storedCount)?0:storedCount)+1;sessionStorage.setItem('jetpack-subscription-modal-shown-count',showCount);if(showCount>5){new Image().src=document.location.protocol+'//pixel.wp.com/g.gif?v=wpcom-no-pv&x_jetpack-subscribe-modal-comm=hidden_views_limit&r='+Math.random();reloadOnCloseSubscriptionModal(data.url);return}}catch{} new Image().src=document.location.protocol+'//pixel.wp.com/g.gif?v=wpcom-no-pv&x_jetpack-subscribe-modal-comm=showed&r='+Math.random();modal.classList.toggle('open');hasLoaded=!0;redirectUrl=data.url}} window.addEventListener('message',JetpackSubscriptionModalOnCommentMessageListener);if(close){close.onclick=function(event){event.preventDefault();modal.classList.toggle('open');reloadOnCloseSubscriptionModal()}} window.onclick=function(event){if(event.target===modal){modal.style.display='none';reloadOnCloseSubscriptionModal()}};window.addEventListener('load',()=>{const subscriptionScroll=localStorage.getItem('jetpack-subscription-modal-on-comment-scroll-to');if(subscriptionScroll){window.location.hash=subscriptionScroll;localStorage.removeItem('jetpack-subscription-modal-on-comment-scroll-to');const comment=document.querySelector(subscriptionScroll);if(comment){comment.scrollIntoView({block:'center',behavior:'smooth'})}}})}); /*! This file is auto-generated */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),e=n.n(e),o=n(370),i=n.n(o),o=n(817),r=n.n(o);function u(t){try{document.execCommand(t)}catch(t){}}var c=function(t){t=r()(t);return u("cut"),t};function a(t,e){t=t,o="rtl"===document.documentElement.getAttribute("dir"),(n=document.createElement("textarea")).style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,n.style.top="".concat(o,"px"),n.setAttribute("readonly",""),n.value=t;var n,o=n,t=(e.container.appendChild(o),r()(o));return u("copy"),o.remove(),t}var l=function(t){var e=1