https://nasawatch.com/wp-content/plugins/newspack-plugin/dist/my-account.js?ver=7519be913f62d559c4f4
1(()=>{"use strict";function e(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}function t(e,t,n,c){window.newspackRAS=window.newspackRAS||[],"string"==typeof e&&(e=[...document.querySelectorAll(e)]),e&&!Array.isArray(e)&&(e=[e]),e?.length&&(n||(n=()=>({})),e.forEach(e=>{e.addEventListener(c||("FORM"===e.tagName?"submit":"click"),c=>{setTimeout(()=>{"FORM"!==e.tagName&&c.defaultPrevented||window.newspackRAS.push([t,n(e)])})})}))}function n(e,n){wp?.hooks?.addAction("experimental__woocommerce_blocks-checkout-render-checkout-form","newspack/my-account/activity",()=>{t(".wc-block-components-checkout-place-order-button",e,n)}),t('form[name="checkout"]',e,n)}const c=e=>{const t=e.getAttribute("href").match(/subscription_id=(\d+)/);return t?t[1]:null};e(function(){const e=new URL(window.location.href);if(e.pathname.includes("edit-address")){const t=document.querySelector(".woocommerce-MyAccount-content form");t&&!t.name&&t.setAttribute("name",e.pathname.includes("billing")?"billing_address":"shipping_address")}t(".subscription_details .button.cancel","subscription_cancelled",e=>({subscription_id:c(e)})),t(".subscription_details .button.reactivate","subscription_reactivated",e=>({subscription_id:c(e)})),newspack_my_account.is_switch_subscription_checkout_page&&n("subscription_switched",()=>({subscription_id:newspack_my_account.cart_switch_subscriptions_summary?.subscription_id,upgraded_or_downgraded:newspack_my_account.cart_switch_subscriptions_summary?.upgraded_or_downgraded})),t(".payment-method .button.delete","payment_method_deleted"),t("form#add_payment_method","payment_method_added",e=>({payment_method:e.querySelector('input[name="payment_method"]')?.value}));const o=document.querySelector("#order_review"),r=o?.querySelector('input[name="woocommerce_change_payment"]');o&&r&&t(o,"payment_method_changed",()=>({subscription_id:r.value,update_all_subscriptions:o.querySelector("#update_all_subscriptions_payment_method")?.checked})),newspack_my_account.is_reorder_checkout_page&&(newspack_my_account.cart_reorder_summary?.early_renewal?n("subscription_renewal_early",()=>({subscription_id:newspack_my_account.cart_reorder_summary?.early_renewal?.subscription_id})):n("product_reordered",()=>({order_id:newspack_my_account.cart_reorder_summary?.order_id,product_id:newspack_my_account.cart_reorder_summary?.product_id})))}),e(function(){const{nonce:e,rest_url:t,should_rate_limit:n}=newspack_my_account||{},c=document.getElementById("add_payment_method");if(c&&Boolean(n)){const n=document.querySelector(".woocommerce-notices-wrapper"),o=c.querySelector('input[type="submit"], button[type="submit"]'),r=function(r){if(c.hasAttribute("data-check-rate-limit")){n.textContent="",o.setAttribute("disabled",""),r.preventDefault();const a=new XMLHttpRequest;a.onreadystatechange=function(){if(4===a.readyState&&a.status>=200&&a.status<300){o.removeAttribute("disabled");const e=JSON.parse(a.responseText);if(e?.success&&(c.removeAttribute("data-check-rate-limit"),c.requestSubmit(o),c.setAttribute("data-check-rate-limit","1")),e?.error){const t=document.createElement("div"),c=document.createElement("ul"),o=document.createElement("li");c.classList.add("woocommerce-error"),o.textContent=e.error,t.appendChild(c),c.appendChild(o),n.appendChild(t),n.scrollIntoView({behavior:"smooth"})}}},a.open("GET",t+"newspack/v1/check-rate"),a.setRequestHeader("X-WP-Nonce",e),a.send()}};c.setAttribute("data-check-rate-limit","1"),c.addEventListener("submit",r,!0),o.addEventListener("click",r,!0)}}),e(function(){window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(e=>{const t=e.getReader(),n=new URLSearchParams(window.location.search),c=n.get("newspack_newsletters_subscription_subscribed");c&&t?.email&&t?.authenticated&&e.dispatchActivity("newsletter_signup",{email:t.email,lists:c.split(","),newsletters_subscription_method:"my-account"}),n.delete("newspack_newsletters_subscription_subscribed");const o=n.toString()?"?"+n.toString():"";window.history.replaceState({},"",window.location.pathname+o)})})})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.