!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s0))return r=s.getHost(e),!0;for(var t=0;t0)for(var i=0;i0)for(var s=0;se.split(".").reduce((t,e)=>t&&t[e],t)),s=()=>null,i=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function r(){return"undefined"!=typeof sbjs}function c(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),a(t.getAttributionData())},o)}}t.getAttributionData=function(){const i=e.allowTracking&&r()?n:s,o=r()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,i(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!r())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const s=t.getAttributionData();!function(t){for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}(s),a(s)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const s=document.createElement("input");s.type="hidden",s.name=`${e.prefix}${n}`,s.value=i(this.values&&this.values[n]||""),t.appendChild(s)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=i(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);; ;(function ( $, window, document ) { 'use strict'; $( 'form.checkout' ).on( 'click', 'input[name="payment_method"]', function() { // Avoid toggling submit button if on confirmation screen if ( $( '#payment' ).find( '.wc-gateway-ppec-cancel' ).length ) { return; } var isPPEC = $( this ).is( '#payment_method_ppec_paypal' ); var togglePPEC = isPPEC ? 'show' : 'hide'; var toggleSubmit = isPPEC ? 'hide' : 'show'; $( '#woo_pp_ec_button_checkout' ).animate( { opacity: togglePPEC, height: togglePPEC, padding: togglePPEC }, 230 ); $( '#place_order' ).animate( { opacity: toggleSubmit, height: toggleSubmit, padding: toggleSubmit }, 230 ); } ); })( jQuery, window, document ); ; (function($){ $(function(){ var user_agent = navigator.userAgent; var is_opera_edge; var browser = user_agent.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))/i) || []; var browser_name = ''; var browser_class = ''; if ( /trident/i.test( browser[0] ) ) { browser_name = 'ie'; } else if ( browser[0] === 'Chrome' ) { is_opera_edge = user_agent.match(/\b(OPR|Edge)/); if ( is_opera_edge !== null ) { browser_name = is_opera_edge[0].replace('OPR', 'opera'); } } // use navigator.appName as browser name if we were unable to get it from user_agent if ( '' === browser_name ) { if ('standalone' in window.navigator && !window.navigator.standalone) { browser_name = 'uiwebview'; } else { browser_name = browser[0] && '' !== browser[0] ? browser[0] : navigator.appName; } } browser_name = browser_name.toLowerCase(); // convert browser name to class. Some classes do not match the browser name switch( browser_name ) { case 'msie' : browser_class = 'ie'; break; case 'firefox' : browser_class = 'gecko'; break; default : browser_class = browser_name; break; } // add `iphone` class if browsing from iphone if ( user_agent.match(/iPhone/) ) { browser_class += ' iphone'; } $( 'body' ).addClass( browser_class ); }); })(jQuery); ;