/* Form submission functions for the Mailchimp Widget */ (function ($) { function mc_beforeForm() { // Disable the submit button $('.mc_signup_submit_button').attr('disabled', 'disabled'); } function mc_success(data, status, xhr, submittedForm) { let form = $(submittedForm); if (!submittedForm || !form) { form = $('.mc_signup_form'); } // Re-enable the submit button $('.mc_signup_submit_button').removeAttr('disabled'); // Put the response in the message div form.find('.mc_message_wrapper').html(data); // See if we're successful, if so, wipe the fields const reg = /class=(["'])mc_success_msg\1/i; if (reg.test(data)) { $(form).each(function () { this.reset(); }); $('.mc_submit_type').val('js'); } window.scrollTo({ top: parseInt(form.offset().top, 10) - 28, behavior: 'smooth', }); } $(function ($) { // Change our submit type from HTML (default) to JS $('.mc_submit_type').val('js'); // Remove the no JS field. $('.mailchimp_sf_no_js').remove(); // Attach our form submitter action $('.mc_signup_form').ajaxForm({ url: window.mailchimpSF.ajax_url, type: 'POST', dataType: 'text', beforeSubmit: mc_beforeForm, success: mc_success, }); }); })(window.jQuery); /* Datepicker functions for the Mailchimp Widget */ (function ($) { if ($('.date-pick').length > 0) { // Datepicker for the date-pick class $('.date-pick').each(function () { let format = $(this).data('format') || 'mm/dd/yyyy'; format = format.replace(/yyyy/i, 'yy'); $(this).datepicker({ autoFocusNextInput: true, constrainInput: false, changeMonth: true, changeYear: true, // eslint-disable-next-line no-unused-vars beforeShow(input, inst) { $('#ui-datepicker-div').addClass('show'); }, dateFormat: format.toLowerCase(), }); }); } if ($('.birthdate-pick').length > 0) { const d = new Date(); $('.birthdate-pick').each(function () { let format = $(this).data('format') || 'mm/dd'; format = format.replace(/yyyy/i, 'yy'); $(this).datepicker({ autoFocusNextInput: true, constrainInput: false, changeMonth: true, changeYear: false, minDate: new Date(d.getFullYear(), 1 - 1, 1), maxDate: new Date(d.getFullYear(), 12 - 1, 31), // eslint-disable-next-line no-unused-vars beforeShow(input, inst) { $('#ui-datepicker-div').removeClass('show'); }, dateFormat: format.toLowerCase(), }); }); } // Phone validation custom error message. if ($('.mailchimp-sf-phone').length > 0) { $('.mailchimp-sf-phone').each(function () { $(this) .on('input', function () { this.setCustomValidity(''); }) .on('invalid', function () { if (!this.validity.valid) { this.setCustomValidity(window.mailchimpSF.phone_validation_error); } }); }); } })(window.jQuery); ; !function(){const t=["none","bounce","flash","pulse","rubberBand","shakeX","shakeY","headShake","swing","tada","wobble","jello","heartBeat","hinge","jackInTheBox","backInDown","backInLeft","backInRight","backInUp","backOutDown","backOutLeft","backOutRight","backOutUp","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInTopLeft","fadeInTopRight","fadeInBottomLeft","fadeInBottomRight","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","fadeOutTopLeft","fadeOutTopRight","fadeOutBottomRight","fadeOutBottomLeft","flip","flipInX","flipInY","flipOutX","flipOutY","lightSpeedInRight","lightSpeedInLeft","lightSpeedOutRight","lightSpeedOutLeft","rotateIn","rotateInDownLeft","rotateInDownRight","rotateInUpLeft","rotateInUpRight","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","slideInDown","slideInLeft","slideInRight","slideInUp","slideOutDown","slideOutLeft","slideOutRight","slideOutUp","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","rollIn","rollOut"],e=["backOutDown","backOutLeft","backOutRight","backOutUp","bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","fadeOutTopLeft","fadeOutTopRight","fadeOutBottomRight","fadeOutBottomLeft","flipOutX","flipOutY","lightSpeedOutRight","lightSpeedOutLeft","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","slideOutDown","slideOutLeft","slideOutRight","slideOutUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","rollOut"],n=["none","delay-100ms","delay-200ms","delay-500ms","delay-1s","delay-2s","delay-3s","delay-4s","delay-5s"],o=["none","slow","slower","fast","faster"],a=[];let i=!1;const s=i=>{if(i.classList.contains("o-anim-ready"))return;const s=i.classList;if(i.animationClasses=[],!d(i)){const e=t.find((t=>Array.from(s).find((e=>e===t)))),a=n.find((t=>Array.from(s).find((e=>e===t)))),d=o.find((t=>Array.from(s).find((e=>e===t))));e&&(i.animationClasses.push(e),i.classList.remove(e)),a&&(i.animationClasses.push(a),i.classList.remove(a)),d&&(i.animationClasses.push(d),i.classList.remove(d)),i.classList.add("hidden-animated")}if(s.add("o-anim-ready"),e.forEach((t=>{i.className.includes(t)&&i.addEventListener("animationend",(()=>{i.classList.remove(t)}),{once:!0})})),s.contains("o-anim-hover")){i.classList.remove("hidden-animated"),i.classList.remove("animated");const{animationName:t}=i.style;i.style.animationName="none",i.addEventListener("mouseenter",(()=>{i.classList.add("animated"),i.style.animationName=t}))}i.addEventListener("animationend",(()=>{i.classList.remove("animated")})),i.animationClasses&&0{const e=window.scrollY||window.pageYOffset,n=l(f(t)),o=t.getBoundingClientRect().top+e+n,a=e,i=e+window.innerHeight,s=o,d=o+t.clientHeight;return d>=a&&s<=i||s<=i&&d>=i||d>=a&&s<=a},u=t=>{let e=[],n=[];for(const o of t){const t=o.classList;if(t.contains("o-anim-custom-delay")){let n;for(const e of t)if(e.includes("o-anim-value-delay-")){n=e;break}n&&e.push(n)}if(t.contains("o-anim-custom-speed")){let e;for(const n of t)if(n.includes("o-anim-value-speed-")){e=n;break}e&&n.push(e)}}if(e=[...new Set(e)],n=[...new Set(n)],0t.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1");t.innerHTML=e.reduce(((t,e)=>{const n=e.replace("o-anim-value-delay-","");return t+`.animated.${o(e)} { animation-delay: ${n}; -webkit-animation-delay: ${n}; }`}),"")+"\n"+n.reduce(((t,e)=>{const n=e.replace("o-anim-value-speed-","");return t+`.animated.${o(e)} { animation-duration: ${n}; -webkit-animation-duration: ${n}; }`}),""),document.body.appendChild(t)}},f=t=>{let e=0;for(const n of t.classList.entries())if(n[1].includes("o-anim-offset-")){const t=n[1].replace("o-anim-offset-","");if(isNaN(t.charAt(0)))continue;e=t.endsWith("px")?parseFloat(t):t;break}return e},l=t=>{var e;return"string"==typeof t?(t=null!==(e=parseFloat(t))&&void 0!==e?e:0,t=Math.min(Math.max(t,0),100),t=window.innerHeight*(t/100)):"number"!=typeof t&&(t=0),t};document.querySelectorAll(".wp-lightbox-container").forEach((t=>{t.addEventListener("click",(()=>{(()=>{const t=document.querySelectorAll(".animated:not(.o-anim-ready)");if(0!==t.length){u(t);for(const e of t)s(e)}})()}))})),window.addEventListener("load",(()=>{const t=document.querySelectorAll(".animated");u(t);for(const e of t)s(e);i||(window.addEventListener("scroll",(()=>{requestAnimationFrame((()=>{const t=[];for(const e of a){const{element:n,triggerOffset:o}=e,{top:a}=n.getBoundingClientRect();a+l(o)<=.95*window.innerHeight&&0n.classList.add(t))),n.classList.remove("hidden-animated"),delete n.animationClasses,t.push(e))}t.forEach((t=>{const e=a.indexOf(t);a.splice(e,1)}))}))})),i=!0)}))}();;