<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(function ($) {
  $(document).ready(function () {
    if (!window.elementorFrontend || !window.elementorFrontend.getElements) {
      return;
    }
    const menuCarts = window.elementorFrontend
      ?.getElements()
      ?.$body?.find(".elementor-widget-woocommerce-menu-cart");
    menuCarts.each((_, el) =&gt; {
      const settings = $(el).data("settings");
      if (!settings) {
        return;
      }
      if (settings.automatically_open_cart == null) {
        return;
      }
      const currentValue = settings.automatically_open_cart;
      settings.automatically_open_cart = "no";
      $(el).data("settings", settings);
      setTimeout(() =&gt; {
        settings.automatically_open_cart = currentValue;
        $(el).data("settings", settings);
      }, 1000);
    });
  });

  /**
   * Integrate with YayExtra product total
   */
  if (!window.wp?.hooks?.addFilter) {
    return;
  }
  window.wp.hooks.addFilter(
    "yaye_total_price_hook",
    "yaydp",
    function (html, total) {
      const extraTotalPrice = $(".yayextra-total-price");
      if (extraTotalPrice.closest(".product").length &lt; 1) {
        return html;
      }
      const yaydpDiscountedData = extraTotalPrice
        .closest(".single-product-wrapper")
        .find(".yaydp-product-discounted-data");
      if (yaydpDiscountedData.length &lt; 1) {
        return html;
      }

      const minRate = yaydpDiscountedData.data("min-rate");
      const maxRate = yaydpDiscountedData.data("min-rate");

      if (minRate &gt;= 1) {
        return html;
      }

      const discounted = total * minRate;

      function formatPrice(price) {
        window.accounting.settings.currency.symbol =
          window.yaydp_frontend_data.currency_settings.symbol;
        window.accounting.settings.currency.decimal =
          window.yaydp_frontend_data.currency_settings.decimalSeparator;
        window.accounting.settings.currency.thousand =
          window.yaydp_frontend_data.currency_settings.thousandSeparator;
        window.accounting.settings.currency.precision =
          window.yaydp_frontend_data.currency_settings.precision;
        return `
        &lt;span class="woocommerce-Price-amount amount"&gt;${window.accounting.formatMoney(
          price
        )}&lt;/span&gt;
        `;
      }

      return `
      &lt;del&gt;${formatPrice(total)}&lt;/del&gt;
      ${formatPrice(discounted)}`;
    }
  );
})(window.jQuery);
</pre></body></html>