Your IP : 216.73.216.95


Current Path : /var/test/www/html/wp-content/plugins/give/assets/dist/js/
Upload File :
Current File : /var/test/www/html/wp-content/plugins/give/assets/dist/js/give-sequoia-template.js

!function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=710)}({14:function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=i=function(e){return typeof e}:e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}e.exports=i},710:function(e,t,i){i(711),e.exports=i(712)},711:function(e,t,i){},712:function(e,t,i){"use strict";i.r(t);var n=i(14),a=i.n(n);!function(e){var t=window.sequoiaTemplateOptions,i=e(".give-embed-form"),n=e(".advance-btn",i),o=e(".back-btn"),r=e(".give-form-navigator .title"),c=e("#give-payment-mode-select"),s=!1,l={currentStep:"enabled"===t.introduction.enabled?0:1,animating:!1,goToStep:function(n){var a=p[n].title?e(p[n].selector).height()+50:e(p[n].selector).height(),o=p[l.currentStep].title?e(p[l.currentStep].selector).height()+50:e(p[l.currentStep].selector).height();a>o?e(".give-form-templates").css("min-height","".concat(a+123,"px")):setTimeout((function(){e(".give-form-templates").css("min-height","".concat(a+123,"px"))}),200),e(".step-tracker").removeClass("current"),e('.step-tracker[data-step="'+n+'"]').addClass("current"),"disabled"===t.introduction.enabled?(3===e(".step-tracker").length&&e(".step-tracker").remove(),1===(n=n>0?n:1)?e(".back-btn",i).hide():e(".back-btn",i).show(),e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")):0===n?(e(".give-form-navigator",i).removeClass("nav-visible"),e(p[n].selector).css("padding-top","")):(e(".give-form-navigator",i).addClass("nav-visible"),e(p[n].selector).css("padding-top","50px")),p[n].title&&r.text(p[n].title);var c=p.map((function(e,t){return t===n||t===l.currentStep?null:e.selector})).filter(Boolean).join(", ");if(e(c).hide(),l.currentStep!==n){var s="slide-in-right slide-in-left slide-out-right slide-out-left",d=l.currentStep<n?"left":"right",u=l.currentStep<n?"right":"left";e(p[l.currentStep].selector).removeClass(s).addClass("slide-out-".concat(d)),e(p[n].selector).show().removeClass(s).addClass("slide-in-".concat(u))}l.currentStep=n,f(),setTimeout((function(){p[l.currentStep].firstFocus&&e(p[l.currentStep].firstFocus).focus()}),200)},init:function(){var t,i;p.forEach((function(t){void 0!==t.setup&&t.setup(),e(t.selector).css("position","absolute")})),n.on("click",(function(e){e.preventDefault(),l.forward()})),o.on("click",(function(e){e.preventDefault(),l.back()})),e(".step-tracker").on("click",(function(t){t.preventDefault(),l.goToStep(parseInt(e(t.target).attr("data-step")))})),t=function(t){!1===s?e(".form-footer").css("transition","margin-top 0.2s ease"):e(".form-footer").css("transition",""),e(".form-footer").css("margin-top","".concat(t,"px"))},i=0,window.requestAnimationFrame((function n(){var a=e(p[l.currentStep].selector);i!==e(a).outerHeight()&&(t(e(a).outerHeight()),i=e(a).outerHeight()),window.requestAnimationFrame(n)})),l.goToStep(Give.fn.getParameterByName("showDonationProcessingError")||Give.fn.getParameterByName("showFailedDonationError")?2:0)},back:function(){var e=0!==l.currentStep?l.currentStep-1:0;l.goToStep(e),l.currentStep=e},forward:function(){var e=null!==l.currentStep?l.currentStep+1:1;l.goToStep(e),l.currentStep=e}},p=[{id:"introduction",title:null,selector:".give-section.introduction",label:t.introduction.donate_label,showErrors:!1,tabOrder:[".introduction .advance-btn",".step-tracker"]},{id:"choose-amount",title:t.payment_amount.header_label,selector:".give-section.choose-amount",label:t.payment_amount.next_label,showErrors:!1,tabOrder:["input.give-amount-top",".give-donation-levels-wrap button",".give-recurring-period",".give-recurring-donors-choice-period",".give_fee_mode_checkbox",".choose-amount .advance-btn",".step-tracker",".back-btn"],firstFocus:".give-default-level",setup:function(){var t=e(".give-donation-level-btn").length;1===t?e(".give-donation-levels-wrap").attr("style","display: none!important;"):t%2==0&&t<6&&e(".give-donation-levels-wrap").css("grid-template-columns","repeat(2, minmax(0, 1fr))"),e("#give-amount").on("blur",(function(){Give.form.fn.isValidDonationAmount(e("form"))?e(".advance-btn").attr("disabled",!1):e(".advance-btn").attr("disabled",!0)})),e(".give-donation-level-btn").each((function(){if(!e(this).attr("has-tooltip")){var t=e(this).attr("value"),i=e(this).text(),n=window.give_global_vars.currency_sign,a=window.give_global_vars.currency_pos;if("custom"!==t){var o="before"===a?'<div class="currency currency--before">'.concat(n,"</div>").concat(t):"".concat(t,'<div class="currency currency--after">').concat(n,"</div>");e(this).html(o)}if("custom"!==t&&i!==("before"===a?n+t:t+n)){var r='<span class="give-tooltip hint--top hint--bounce '.concat(i.length<50?"narrow":"",'" style="width: 100%" aria-label="').concat(i.length<50?i:i.substr(0,50)+"...",'" rel="tooltip"></span>');e(this).wrap(r),e(this).attr("has-tooltip",!0)}}}))}},{id:"payment",title:t.payment_information.header_label,label:t.payment_information.checkout_label,selector:".give-section.payment",showErrors:!0,tabOrder:[".payment input, .payment a, .payment button, .payment select, .payment multiselect, .payment textarea, .payment .button",".give-submit",".step-tracker",".back-btn"],firstFocus:"#give-first",setup:function(){e(".give-section.payment").on("click",".give-cancel-login, .give-checkout-register-cancel",h),e(".give-section.payment").on("click touchend",'input[name="give_login_submit"]',(function(){e('input[name="give_login_submit"] + .give-loading-animation').removeClass("give-loading-animation").addClass("sequoia-loader spinning")})),window.give_global_vars.purchase_loading="",e(".give_error").each((function(){d(e(this))})),v({container:"#give-anonymous-donation-wrap label",label:"#give-anonymous-donation-wrap label",input:"#give-anonymous-donation"}),v({container:".give-recurring-donors-choice",label:".give-recurring-donors-choice label",input:'input[name="give-recurring-period"]'}),v({container:".give-fee-recovery-donors-choice",label:".give-fee-message-label-text",input:'input[name="give_fee_mode_checkbox"]'}),v({container:".give-activecampaign-fieldset",label:".give-activecampaign-optin-label",input:".give-activecampaign-optin-input"}),v({container:".give-mailchimp-fieldset",label:".give-mc-message-text",input:'input[name="give_mailchimp_signup"]'}),v({container:".give-constant-contact-fieldset",label:".give-constant-contact-fieldset span",input:'input[name="give_constant_contact_signup"]'}),v({container:"#give_terms_agreement",label:"#give_terms_agreement label",input:'input[name="give_agree_to_terms"]'}),e("body.give-form-templates").on("click touchend",'form.give-form input[name="give-purchase"].give-submit',(function(){e("#give-purchase-button + .give-loading-animation").removeClass("give-loading-animation").addClass("sequoia-loader"),e("form").get(0).checkValidity()&&e(".sequoia-loader").addClass("spinning")})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_maximum",(function(){l.goToStep(1)})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_amount",(function(){l.goToStep(1)})),e("#give-gateway-radio-list li").each((function(){var t;switch(e("input",this).val()){case"manual":t="fas fa-tools";break;case"offline":t="fas fa-wallet";break;case"paypal":t="fab fa-paypal";break;case"stripe":case"stripe_checkout":t="far fa-credit-card";break;case"stripe_sepa":case"stripe_ach":case"stripe_ideal":case"stripe_becs":t="fas fa-university";break;case"paypalpro_payflow":t="far fa-credit-card";break;case"stripe_google_pay":t="fab fa-google";break;case"stripe_apple_pay":t="fab fa-apple";break;default:t="fas fa-hand-holding-heart"}e(this).append('<i class="'.concat(t,'"></i>'))})),new window.MutationObserver((function(t){t.forEach((function(t){if(t.addedNodes)for(var i=0;i<t.addedNodes.length;i++){var n=t.addedNodes[i];if(e(n).find(".give_error").length>0&&d(e(n).find(".give_error")),e(n).children().hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&e(n).children(".give_errors").each((function(){d(e(this))})),e(n).hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&(d(e(n)),e(".sequoia-loader").removeClass("spinning")),"give_tributes_address_state"===e(n).attr("id")){var a=e(n).attr("placeholder");e(n).prepend("<option selected disabled>".concat(a,"</option>"))}if("give_tributes_address_state"===e(n).attr("name")&&e(n).attr("class").includes("give-input")&&e(n).attr("placeholder",e(n).siblings("label").text().trim()),e(n).attr("id")&&e(n).attr("id").includes("give-checkout-login-register")&&e('[id*="give-register-account-fields"]').on("click",m),e(n).prop("tagName")&&"select"===e(n).prop("tagName").toLowerCase()){var o=e(n).attr("placeholder");e(n).prepend('<option value="" disabled selected>'.concat(o,"</option>"))}}}))})).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1})}}];function d(t){e(t).parent().hasClass("give-stripe-payment-request-button")||(0===e(".donation-errors").length&&e(".payment").prepend('<div class="donation-errors"></div>'),void 0===a()(e(".donation-errors").html())||e(".donation-errors").html().includes(e(t).html())?e(t).remove():e(t).appendTo(".donation-errors"))}function u(){0===e("#donate-fieldset").length&&e("#give-payment-mode-select").after('<fieldset id="donate-fieldset"></fieldset>');if([".give-constant-contact-fieldset",".give-activecampaign-fieldset",".give-mailchimp-fieldset","#give_terms_agreement",".give-donation-submit"].forEach((function(t){0===e("#donate-fieldset  ".concat(t)).length?e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t))):e("#donate-fieldset  ".concat(t)).html()!==e("#give_purchase_form_wrap  ".concat(t)).html()?(e("#donate-fieldset  ".concat(t)).remove(),e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t)))):e("#give_purchase_form_wrap ".concat(t)).remove()})),0!==e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]').length){var t=!1;0!==e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').length&&(t=e('input[name="give_fee_mode_checkbox"]').prop("checked"),e('.choose-amount fieldset[id*="give-fee-recovery-wrap"]').remove()),e(".choose-amount").append(e('#give_purchase_form_wrap fieldset[id*="give-fee-recovery-wrap"]')),e('input[name="give_fee_mode_checkbox"]').prop("checked",t)}e("li.give-gateway-option-selected").after(e("#give_purchase_form_wrap"));var i="gateway-"+e(".give-gateway-option-selected input").attr("value").replace("_","-");e("#give_purchase_form_wrap").attr("class",i),e("#give-ffm-section").off("click",m),e('[id*="give-register-account-fields"]').off("click",m),e("#give-ffm-section").on("click",m),e('[id*="give-register-account-fields"]').on("click",m),e("#give-ffm-section input").each((function(){switch(e(this).prop("type")){case"checkbox":e(this).prop("checked")?e(this).parent().addClass("checked"):e(this).parent().removeClass("checked");break;case"radio":e(this).prop("checked")?e(this).parent().addClass("selected"):e(this).parent().removeClass("selected")}})),g("#give-first-name-wrap","user"),g("#give-email-wrap","envelope"),g("#give-company-wrap","building"),g("#date_field-wrap","calendar-alt"),g("#url_field-wrap","globe"),g("#phone_field-wrap","phone"),g("#give-phone-wrap","phone"),g("#email_field-wrap","envelope")}function g(t,i){e(t).each((function(){""!==e(this).html()&&!1===e(this).html().includes('<i class="fas fa-'.concat(i,'"></i>'))&&(e(this).prepend('<i class="fas fa-'.concat(i,'"></i>')),e(this).children("input, selector").each((function(){e(this).attr("style","padding-left: 33px!important;")})))}))}function f(){e("select, button, input, textarea, multiselect, a").attr("tabindex",-1),p[l.currentStep].tabOrder.forEach((function(t,i){e(t).attr("tabindex",i+1)}))}function v(t){var i=t.container,n=t.label,a=t.input;!0===e(a).prop("checked")&&e(i).addClass("active"),e(n).on("click touchend",(function(t){i===n&&(t.stopPropagation(),t.preventDefault(),e(a).prop("checked",!e(a).prop("checked"))),e(i).toggleClass("active")}))}function m(t){if(e(t.target).is("input"))switch(e(t.target).prop("type")){case"checkbox":e(t.target).parent().toggleClass("checked");break;case"radio":e(t.target).parent().addClass("selected"),e(t.target).parent().siblings().removeClass("selected")}}function h(){e("#give_error_must_log_in").remove()}function b(){e('select option[selected="selected"][value=""]').length>0&&e('select option[selected="selected"][value=""]').each((function(){e(this).parent().siblings("label").length&&(e(this).text(e(this).parent().siblings("label").text().replace("*","").trim()),e(this).attr("disabled",!0))}))}l.init(),c.length&&"none"!==c.css("display")?(u(),e(document).on("give_gateway_loaded",(function(){f(),u(),b(),e("#give_purchase_form_wrap").slideDown(200,(function(){s=!1}))})),e(document).on("Give:onPreGatewayLoad",(function(){s=!0,e("#give_purchase_form_wrap").slideUp(200)})),e(document).on("Give:onPreGatewayLoad",(function(){var t=["give_error_test_mode"];e(".give_errors, .give_notices, .give_error").each((function(){t.includes(e(this).attr("id"))||e(this).slideUp(200,(function(){e(this).remove()}))}))})),e(document).on("give_gateway_loaded",(function(t,i,n){2===l.currentStep&&e(".give-form-templates").css("min-height","");var a=e("#".concat(n));if(a.parent().hasClass("give-embed-form")){var o={action:"give_cancel_login",form_id:a.find('[name="give-form-id"]').val()};e.post(Give.fn.getGlobalVar("ajaxurl"),o,(function(t){a.find("[id^=give-checkout-login-register]").replaceWith(e.parseJSON(t.fields)),a.find("[id^=give-checkout-login-register]").css({display:"block"}),a.find(".give-submit-button-wrap").show()})).done((function(){window.give_fl_trigger()}))}}))):(e("#give_purchase_form_wrap").addClass("give-single-gateway-wrap"),b())}(jQuery)}});