Give – Donation Plugin and Fundraising Platform - Version 2.13.3

Version Description

Download this release

Release Info

Developer jason_the_adams
Plugin Icon 128x128 Give – Donation Plugin and Fundraising Platform
Version 2.13.3
Comparing to
See all releases

Code changes from version 2.13.2 to 2.13.3

assets/dist/js/admin.js CHANGED
@@ -67,4 +67,4 @@ jQuery(document).ready((function(e){var t=jQuery("ul.give-payment-gatways-list")
67
  * @copyright: Copyright (c) 2016, GiveWP
68
  * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
69
  */
70
- jQuery(document).ready((function(e){function t(t){var n=void 0!==t.standard_fields&&null!==t.standard_fields?t.standard_fields:"",i=e(".give-export-donations-standard-fields ul");n.length>0&&(i.closest("tr").removeClass("give-hidden"),e(n).each((function(e,t){i.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-standard-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-standard-field-'+t+'">'+t+"</label> </li>")})));var o=void 0!==t.hidden_fields&&null!==t.hidden_fields?t.hidden_fields:"",r=e(".give-export-donations-hidden-fields ul");o&&(r.closest("tr").removeClass("give-hidden"),e(o).each((function(e,t){r.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-hidden-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-hidden-field-'+t+'">'+t+"</label> </li>")})))}e(".give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags").change((function(){var n,i,o;n=e("form#give-export_donations-form"),i=e(n).find("tr.give-export-donation-form .give-select-chosen"),o=i.prev(),i.find('input[type="text"]'),i.hasClass("variations"),e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_form_search",s:"",fields:e(n).serialize()},beforeSend:function(){o.closest("ul.chosen-results").empty()},success:function(r){e("option",o).remove();var a=[];r.length?(n.find(".give-export-donation-button").prop("disabled",!1),e.each(r,(function(e,t){o.prepend('<option value="'+t.id+'">'+t.name+"</option>"),a.push(t.id)})),o.prepend('<option value="0" selected>'+o.data("placeholder")+"</option>")):(o.prepend('<option value="0">'+o.data("no-form")+"</option>"),n.find(".give-export-donation-button").prop("disabled",!0)),n.find(".form_ids").val(a.join()),i.prev("select.give-select-chosen").trigger("chosen:updated"),t("")}})})),e(".give-export_donations #give-export_donations-form #give_payment_form_select").change((function(){var n;if(e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),jQuery(document).trigger("give_export_donations_form_change"),!(n=e(this).val()))return!1;e.ajax({type:"POST",url:ajaxurl,data:{form_id:n,action:"give_export_donations_get_custom_fields"},success:function(e){e?t(e):alert(Give.fn.getGlobalVar("error_message")),jQuery(document).trigger("give_export_donations_form_response",e)}})}));var n=e('.give-export-option-fields input[type="checkbox"]');e(".give-toggle-checkbox-selection").click((function(){var t,i,o,r;e(this).data("clicked",!e(this).data("clicked")),n.prop("checked",!e(this).data("clicked")),i=e(t=this).val(),o=e(t).attr("data-value"),i=(r=[o,i])[0],o=r[1],e(t).attr("value",i),e(t).attr("data-value",o)}))}))},699:function(e,t){var n,i,o;n=jQuery,i=function(){var e=n('[class*="sequoia[introduction][headline]_field"], [class*="sequoia[introduction][description]_field"], [class*="sequoia[introduction][image]_field"], [class*="sequoia[introduction][donate_label]_field"]');0===n('input[name="sequoia[introduction][enabled]"]').length||n('input[name="sequoia[introduction][enabled]"]').prop("checked")?n(e).show():n(e).hide()},o=function(){var e=n('[class*="sequoia[thank-you][sharing_instruction]_field"], [class*="sequoia[thank-you][twitter_message]_field"]');0===n('input[name="sequoia[thank-you][sharing]"]').length||n('input[name="sequoia[thank-you][sharing]"]').prop("checked")?n(e).show():n(e).hide()},n(document).ready((function(){n("#form_template_options").on("click",".js-template--activate",(function(e){e.preventDefault();var t=n(this).parents(".templates-list"),i=t.parent(),o=n(this).parents(".template-info").attr("data-id");n(".template-info",t).removeClass("active"),i.find(".template-options.".concat(o)).addClass("active"),n(this).text(Give.fn.getGlobalVar("deactivate")),n(this).removeClass("js-template--activate"),n(this).addClass("js-template--deactivate"),n(this).parents(".template-info").addClass("active"),i.addClass("has-activated-template"),i.prev("input[name=_give_form_template]").val(o).trigger("change")})),n("#form_template_options").on("click",".js-template--deactivate",(function(e){e.preventDefault();var t=n(this).parents(".templates-list"),i=t.parent(),o=n(this).parents(".template-info").attr("data-id");n(".template-info",t).removeClass("active"),i.find(".template-options.".concat(o)).removeClass("active"),n(this).text(Give.fn.getGlobalVar("activate")),n(this).removeClass("js-template--deactivate"),n(this).addClass("js-template--activate"),i.removeClass("has-activated-template"),i.prev("input[name=_give_form_template]").val("").trigger("change")})),n(".post-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #save-action input[type=submit]").add(".post-php.post-type-give_forms #save-action input[type=submit]").on("click",(function(){return!!n("input[name=_give_form_template]","#form_template_options").val()||(new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:Give.fn.getGlobalVar("form_template_required").title,desc:Give.fn.getGlobalVar("form_template_required").desc}}).render(),"form_template_options"!==Give.fn.getParameterByName("give_tab")&&n('a[href="#form_template_options"]').trigger("click"),!1)})),i(),n('input[name="sequoia[introduction][enabled]"]').on("change",(function(){i()})),o(),n('input[name="sequoia[thank-you][sharing]"]').on("change",(function(){o()}))}))},700:function(e,t){var n=wp.i18n,i=n.__,o=n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-account-set-default"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t,n=e.target.parentElement.parentElement.parentElement.parentElement,r=n.querySelector(".give-stripe-account-email .give-stripe-connect-data-field"),a=n.querySelector('input[name="setting-page"]').value,s="",l=o("<p><strong>%1$s</strong><br>%2$s</p>",i("Account Name","give"),e.target.parentElement.parentElement.querySelector(".give-stripe-account-name .give-stripe-connect-data-field").textContent);r&&(s=o("<p><strong>%1$s</strong><br>%2$s</p>",i("Account Email","give"),r.textContent));var c=o('<a href="%1$s" target="_blank">%2$s</a>',"https://givewp.com/documentation/core/payment-gateways/stripe-free/using-multiple-stripe-accounts-on-a-single-givewp-site/",i("View Documentation >","give"));t=o(i("global"===a?"Please confirm you’d like to set the account below as the new default Stripe account. All donation forms set to inherit the Global Settings will use this new default account. %1$s<br>%2$s%3$s":"Please confirm you’d like to set the account below as the new default Stripe account for this donation form. All donations will process through this Stripe account rather than the Global default Stripe account. %1$s<br>%2$s%3$s","give"),c,l,s),new Give.modal.GiveConfirmModal({classes:{modalWrapper:"give-modal--warning give-stripe-modal-new-default"},modalContent:{title:o('<span class="give-stripe-icon stripe-logo-with-circle"></span>%s',i("Confirm New Default Account","give")),desc:t},successConfirm:function(t){var n=new XMLHttpRequest,i=new FormData,o=Give.fn.getGlobalVar("post_id");i.append("action","give_stripe_set_account_default"),i.append("account_slug",e.target.getAttribute("data-account")),i.append("form_id",o),n.open("POST",ajaxurl),n.onload=function(){var e=JSON.parse(n.response);200===n.status&&e.success&&window.location.reload()},n.send(i)}}).render()}))}))}))},701:function(e,t){var n=wp.i18n,i=n.__;n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=i("Disconnect Stripe Account","give"),o=i("Are you sure you want to disconnect this Stripe account?","give");new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:n,desc:o},successConfirm:function(){fetch(t.getAttribute("href")).then((function(e){return e.json()})).then((function(e){e.success&&window.location.reload()}))}}).render()}))}))}))},702:function(e,t){var n=wp.i18n,i=n.__;n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=document.body.classList.contains("post-php")?".post-php":".post-new-php",t=document.querySelector("".concat(e,'.post-type-give_forms form[name="post"]'));t&&t.addEventListener("submit",(function(e){var t=document.querySelector('#stripe_form_account_options [name="give_stripe_per_form_accounts"]:checked');t&&("enabled"===t.value&&(!!document.querySelector("#stripe_form_account_options .give-stripe-account-manager-list-item.give-stripe-boxshadow-option-wrap__selected")||(e.preventDefault(),new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:i("Select Default Stripe Account","give"),desc:i("We notice that you want to accept donation with other then global default Stripe Account but you did not selected Stripe account.","give")}}).render(),"stripe_form_account_options"!==Give.fn.getParameterByName("give_tab")&&document.querySelector('a[href="#stripe_form_account_options"]').click())))}))}))},703:function(e,t){document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("div[data-give-dismissible]").forEach((function(e){var t="give-dismissed-".concat(e.dataset.giveDismissible);window.localStorage.getItem(t)||(e.classList.remove("hidden"),e.addEventListener("click",(function(n){n.target.classList.contains("notice-dismiss")&&window.localStorage.setItem(t,Date.now()),n.target.classList.contains("give-donor-dashboard-upgrade-notice__dismiss-link")&&(e.classList.add("hidden"),window.localStorage.setItem(t,Date.now()))})))}))}))},82:function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,i)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},99:function(e,t,n){"use strict";var i,o={fn:{renderNotice:function(e,t){var n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('<div class="give_error give-invalid-minimum give-hidden">'+this.getNotice(e,t)+"</div>");break;case"bad_maximum":n=jQuery('<div class="give_error give-invalid-maximum give-hidden">'+this.getNotice(e,t)+"</div>")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;var n,i,o;if(n=i=o="",t.length)switch(e){case"bad_minimum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==i&&(n=i+" "+Give.fn.formatCurrency(o,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dismissible:!0},i="undefined"!=typeof commonL10n?commonL10n.dismiss:wp.i18n.__("Dismiss this notice.");return'<div class="give-notice notice notice-'.concat(t).concat(n.dismissible?" is-dismissible":"",'"><p>').concat(e).concat(n.dismissible?' <button type="button" class="notice-dismiss"><span class="screen-reader-text">'.concat(i,"</span></button>"):"","</p</div>")}}},r=n(25),a=n.n(r),s=n(13),l=n.n(s),c={fn:{showOverlay:function(e){var t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div");i.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(i),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}},d={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){var t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){c.fn.showOverlay(e)},hideProcessingState:function(){c.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){var n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:void 0!==(n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e))&&n.trim()}return n},setInfo:function(e,t,n,i){if(!n.length)return!1;switch(e=void 0===e?"data":e){case"nonce":n.find('input[name="give-form-hash"]').val(t)}if(void 0!==i&&!i.length)return!1;switch(e){case"attr":n.attr(i,t);break;default:n.data(i,t)}return!0},getGateway:function(e){var t="";return e.length?void 0!==(t=e.find('input[name="payment-mode"]:checked').val().trim())?t:"":t},getVariablePrices:function(e){var t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,i){i=i instanceof jQuery?i:jQuery(i);var o=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:i.data("price-id"),amount:Give.fn.unFormatCurrency(i.val(),o)})})),n):n},getPriceID:function(e,t){var n=this.getVariablePrices(e),i=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e)),o=Give.fn.getCache("amount_"+i,e)?Give.fn.getCache("amount_"+i,e):-1;return t=void 0===t||t,n.length&&-1===o&&(t?(jQuery.each(n,(function(e,t){if(t.amount===i)return o=t.price_id,!1})),-1===o&&this.getMinimumAmount(e)<=i&&this.getMaximumAmount(e)>=i&&this.getMinimumAmount(e)<=i&&(o="custom")):o=jQuery('input[name="give-price-id"]',e).val()),o},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;var t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";var t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){var t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise((function(t,n){jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(i){if(!i.success)return n(i);var o=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",i.data.give_form_hash,e,""),o.length&&o.val(i.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[i.data]),t(i)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){var t=e.parents("form"),n=e.val(),i=e.data("price-id");void 0===i&&(i=e.find("option:selected").data("price-id")),"custom"===i&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);var o=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),o)),t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,i])},__sendBackToForm:function(){var e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;var n=jQuery("body").find("#give-form-"+e+"-wrap"),i=n.find("form.give-form"),o=n.hasClass("give-display-modal"),r=n.hasClass("give-display-button"),a=n.hasClass("give-display-reveal");i.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),i.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");var s=Give.fn.getParameterByName("level-id"),l=i.find('*[data-price-id="'+s+'"]');l.length>0&&this.autoSetMultiLevel(l),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):o||r?give_open_form_modal(n,i):a&&(i.find(".give-btn-reveal").hide(),i.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;var t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),i=this.getAmount(e),o=this.getPriceID(e,!0);return 0!==i&&(-1<i&&i>=t&&i<=n||-1!==o)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||!1!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:(i=a()(l.a.mark((function e(t){var n,i,o,r=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=r.length>1&&void 0!==r[1]?r[1]:{})instanceof FormData?n:new FormData(t)).append("action","give_process_donation"),n.append("give_ajax",!0),e.next=6,fetch("".concat(Give.fn.getGlobalVar("ajaxurl")),{method:"POST",body:n});case 6:return i=e.sent,e.next=9,i.text();case 9:return o=e.sent,e.abrupt("return",o.trim());case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),addErrors:function(e,t){e.find('#give_purchase_submit input[type="submit"].give-submit').before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){var t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((function(e){var n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&this.addErrors(e,t),this.resetDonationButton(e)},resetDonationButton:function(e){var t=e.find('#give_purchase_submit input[type="submit"].give-submit'),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){var n=(t=jQuery(t)).find(".card-number"),i=t.find(".card-cvc"),o=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),i.payment("formatCardCVC"),o.payment("formatCardExpiry"))}))}}}},u={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},f={fn:{twitter:function(e,t){var n=parent.window?parent.window:window,i=n.innerHeight/2-126,o=n.innerWidth/2-280;n.open("https://twitter.com/intent/tweet?url=".concat(e,"&text=").concat(t),"newwindow","width=560,height=253,top=".concat(i,",left=").concat(o))},facebook:function(e){var t=parent.window?parent.window:window,n=t.innerHeight/2-365,i=t.innerWidth/2-280;window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(e),"newwindow","width=560,height=730,top=".concat(n,",left=").concat(i))}}},h={init:function(){var e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t<e.length;)h[e[t]].init&&h[e[t]].init(),t++;jQuery(document).trigger("give:postInit")},fn:{formatCurrency:function(e,t,n){var i={symbol:"",decimal:this.getGlobalVar("decimal_separator"),thousand:this.getGlobalVar("thousands_separator"),precision:parseInt(this.getGlobalVar("number_decimals")),currency:this.getGlobalVar("currency")};if(e=e.toString().trim(),(n=void 0===n?{}:n).length&&(i={symbol:"",decimal:h.form.fn.getInfo("decimal_separator",n),thousand:h.form.fn.getInfo("thousands_separator",n),precision:h.form.fn.getInfo("number_decimals",n),currency:h.form.fn.getInfo("currency_code",n)}),(t=jQuery.extend(i,t)).precision=parseInt(t.precision),"INR"===t.currency){var o,r=accounting.formatNumber(e,{precision:i.precision,decimal:"."}),a=t.precision?".0":"",s="",l="",c="";(r=(r=accounting.unformat(r,".").toString()).toString()).indexOf(".")>0&&(a=r.substring(r.indexOf("."),r.length)),s=(r=Math.floor(r).toString()).substring(r.length-3),""!==(l=r.substring(0,r.length-3))&&(s=i.thousand+s),o=(c=l.replace(/\B(?=(\d{2})+(?!\d))/g,i.thousand)+s+a).lastIndexOf("."),e=c=c.slice(0,o)+(c.slice(o)+"000000000000").substr(0,t.precision+1),void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=accounting.formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){var n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(accounting.unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){var t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?give_vars:give_global_vars},setCache:function(e,t,n){n.length?h.cache["form_"+h.form.fn.getInfo("form-id",n)][e]=t:h.cache[e]=t},getCache:function(e,t){var n,i=h.cache["form_"+h.form.fn.getInfo("form-id",t)];return n=void 0===(n=t.length?void 0!==i?i[e]:"":h.cache[e])?"":n},__getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"="),n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(i=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},i)).loadingAnimation?'<span class="is-active spinner"></span>':"",r=null!==i.loadingText?i.loadingText:h.fn.getGlobalVar("loader_translation").updating;return!1===i.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(t=o.length?"give-has-spinner":"",t=(t+=r.length?" give-has-text":"").length?" "+t.trim():"",n='<div class="give-spinner-wrap'.concat(t,'"><div class="give-spinner-inner">').concat((r+o).trim(),"</div></div>"),null===i.show?n:(e.prepend(n),!0))},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var i=encodeURIComponent(t)+"=",o=n[1].split(/[&;]/g),r=o.length;r-- >0;)-1!==o[r].lastIndexOf(i,0)&&o.splice(r,1);return n[0]+(o.length>0?"?"+o.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};h.notice=o,h.form=d,h.donor=u,h.util=c,h.share=f;t.a=h}});
67
  * @copyright: Copyright (c) 2016, GiveWP
68
  * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
69
  */
70
+ jQuery(document).ready((function(e){function t(t){var n=void 0!==t.standard_fields&&null!==t.standard_fields?t.standard_fields:"",i=e(".give-export-donations-standard-fields ul");n.length>0&&(i.closest("tr").removeClass("give-hidden"),e(n).each((function(e,t){i.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-standard-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-standard-field-'+t+'">'+t+"</label> </li>")})));var o=void 0!==t.hidden_fields&&null!==t.hidden_fields?t.hidden_fields:"",r=e(".give-export-donations-hidden-fields ul");o&&(r.closest("tr").removeClass("give-hidden"),e(o).each((function(e,t){r.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-hidden-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-hidden-field-'+t+'">'+t+"</label> </li>")})))}e(".give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags").change((function(){var n,i,o;n=e("form#give-export_donations-form"),i=e(n).find("tr.give-export-donation-form .give-select-chosen"),o=i.prev(),i.find('input[type="text"]'),i.hasClass("variations"),e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_form_search",s:"",fields:e(n).serialize()},beforeSend:function(){o.closest("ul.chosen-results").empty()},success:function(r){e("option",o).remove();var a=[];r.length?(n.find(".give-export-donation-button").prop("disabled",!1),e.each(r,(function(e,t){o.prepend('<option value="'+t.id+'">'+t.name+"</option>"),a.push(t.id)})),o.prepend('<option value="0" selected>'+o.data("placeholder")+"</option>")):(o.prepend('<option value="0">'+o.data("no-form")+"</option>"),n.find(".give-export-donation-button").prop("disabled",!0)),n.find(".form_ids").val(a.join()),i.prev("select.give-select-chosen").trigger("chosen:updated"),t("")}})})),e(".give-export_donations #give-export_donations-form #give_payment_form_select").change((function(){var n;if(e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),jQuery(document).trigger("give_export_donations_form_change"),!(n=e(this).val()))return!1;e.ajax({type:"POST",url:ajaxurl,data:{form_id:n,action:"give_export_donations_get_custom_fields"},success:function(e){e?t(e):alert(Give.fn.getGlobalVar("error_message")),jQuery(document).trigger("give_export_donations_form_response",e)}})}));var n=e('.give-export-option-fields input[type="checkbox"]');e(".give-toggle-checkbox-selection").click((function(){var t,i,o,r;e(this).data("clicked",!e(this).data("clicked")),n.prop("checked",!e(this).data("clicked")),i=e(t=this).val(),o=e(t).attr("data-value"),i=(r=[o,i])[0],o=r[1],e(t).attr("value",i),e(t).attr("data-value",o)}))}))},699:function(e,t){var n,i,o;n=jQuery,i=function(){var e=n('[class*="sequoia[introduction][headline]_field"], [class*="sequoia[introduction][description]_field"], [class*="sequoia[introduction][image]_field"], [class*="sequoia[introduction][donate_label]_field"]');0===n('input[name="sequoia[introduction][enabled]"]').length||n('input[name="sequoia[introduction][enabled]"]').prop("checked")?n(e).show():n(e).hide()},o=function(){var e=n('[class*="sequoia[thank-you][sharing_instruction]_field"], [class*="sequoia[thank-you][twitter_message]_field"]');0===n('input[name="sequoia[thank-you][sharing]"]').length||n('input[name="sequoia[thank-you][sharing]"]').prop("checked")?n(e).show():n(e).hide()},n(document).ready((function(){n("#form_template_options").on("click",".js-template--activate",(function(e){e.preventDefault();var t=n(this).parents(".templates-list"),i=t.parent(),o=n(this).parents(".template-info").attr("data-id");n(".template-info",t).removeClass("active"),i.find(".template-options.".concat(o)).addClass("active"),n(this).text(Give.fn.getGlobalVar("deactivate")),n(this).removeClass("js-template--activate"),n(this).addClass("js-template--deactivate"),n(this).parents(".template-info").addClass("active"),i.addClass("has-activated-template"),i.prev("input[name=_give_form_template]").val(o).trigger("change")})),n("#form_template_options").on("click",".js-template--deactivate",(function(e){e.preventDefault();var t=n(this).parents(".templates-list"),i=t.parent(),o=n(this).parents(".template-info").attr("data-id");n(".template-info",t).removeClass("active"),i.find(".template-options.".concat(o)).removeClass("active"),n(this).text(Give.fn.getGlobalVar("activate")),n(this).removeClass("js-template--deactivate"),n(this).addClass("js-template--activate"),i.removeClass("has-activated-template"),i.prev("input[name=_give_form_template]").val("").trigger("change")})),n(".post-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #save-action input[type=submit]").add(".post-php.post-type-give_forms #save-action input[type=submit]").on("click",(function(){return!!n("input[name=_give_form_template]","#form_template_options").val()||(new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:Give.fn.getGlobalVar("form_template_required").title,desc:Give.fn.getGlobalVar("form_template_required").desc}}).render(),"form_template_options"!==Give.fn.getParameterByName("give_tab")&&n('a[href="#form_template_options"]').trigger("click"),!1)})),i(),n('input[name="sequoia[introduction][enabled]"]').on("change",(function(){i()})),o(),n('input[name="sequoia[thank-you][sharing]"]').on("change",(function(){o()}))}))},700:function(e,t){var n=wp.i18n,i=n.__,o=n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-account-set-default"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t,n=e.target.parentElement.parentElement.parentElement.parentElement,r=n.querySelector(".give-stripe-account-email .give-stripe-connect-data-field"),a=n.querySelector('input[name="setting-page"]').value,s="",l=o("<p><strong>%1$s</strong><br>%2$s</p>",i("Account Name","give"),e.target.parentElement.parentElement.querySelector(".give-stripe-account-name .give-stripe-connect-data-field").textContent);r&&(s=o("<p><strong>%1$s</strong><br>%2$s</p>",i("Account Email","give"),r.textContent));var c=o('<a href="%1$s" target="_blank">%2$s</a>',"https://givewp.com/documentation/core/payment-gateways/stripe-free/using-multiple-stripe-accounts-on-a-single-givewp-site/",i("View Documentation >","give"));t=o(i("global"===a?"Please confirm you’d like to set the account below as the new default Stripe account. All donation forms set to inherit the Global Settings will use this new default account. %1$s<br>%2$s%3$s":"Please confirm you’d like to set the account below as the new default Stripe account for this donation form. All donations will process through this Stripe account rather than the Global default Stripe account. %1$s<br>%2$s%3$s","give"),c,l,s),new Give.modal.GiveConfirmModal({classes:{modalWrapper:"give-modal--warning give-stripe-modal-new-default"},modalContent:{title:o('<span class="give-stripe-icon stripe-logo-with-circle"></span>%s',i("Confirm New Default Account","give")),desc:t},successConfirm:function(t){var n=new XMLHttpRequest,i=new FormData,o=Give.fn.getGlobalVar("post_id");i.append("action","give_stripe_set_account_default"),i.append("account_slug",e.target.getAttribute("data-account")),i.append("form_id",o),n.open("POST",ajaxurl),n.onload=function(){var e=JSON.parse(n.response);200===n.status&&e.success&&window.location.reload()},n.send(i)}}).render()}))}))}))},701:function(e,t){var n=wp.i18n,i=n.__;n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn"));e.length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=e.target,n=i("Disconnect Stripe Account","give"),o=i("Are you sure you want to disconnect this Stripe account?","give");new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:n,desc:o},successConfirm:function(){fetch(t.getAttribute("href")).then((function(e){return e.json()})).then((function(e){e.success&&window.location.reload()}))}}).render()}))}))}))},702:function(e,t){var n=wp.i18n,i=n.__;n.sprintf;window.addEventListener("DOMContentLoaded",(function(){var e=document.body.classList.contains("post-php")?".post-php":".post-new-php",t=document.querySelector("".concat(e,'.post-type-give_forms form[name="post"]'));t&&t.addEventListener("submit",(function(e){var t=document.querySelector('#stripe_form_account_options [name="give_stripe_per_form_accounts"]:checked');t&&("enabled"===t.value&&(!!document.querySelector("#stripe_form_account_options .give-stripe-account-manager-list-item.give-stripe-boxshadow-option-wrap__selected")||(e.preventDefault(),new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:i("Select Default Stripe Account","give"),desc:i("We notice that you want to accept donation with other then global default Stripe Account but you did not selected Stripe account.","give")}}).render(),"stripe_form_account_options"!==Give.fn.getParameterByName("give_tab")&&document.querySelector('a[href="#stripe_form_account_options"]').click())))}))}))},703:function(e,t){document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("div[data-give-dismissible]").forEach((function(e){var t="give-dismissed-".concat(e.dataset.giveDismissible);window.localStorage.getItem(t)||(e.classList.remove("hidden"),e.addEventListener("click",(function(n){n.target.classList.contains("notice-dismiss")&&window.localStorage.setItem(t,Date.now()),n.target.classList.contains("give-donor-dashboard-upgrade-notice__dismiss-link")&&(e.classList.add("hidden"),window.localStorage.setItem(t,Date.now()))})))}))}))},82:function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,i)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},99:function(e,t,n){"use strict";var i,o={fn:{renderNotice:function(e,t){var n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('<div class="give_error give-invalid-minimum give-hidden">'+this.getNotice(e,t)+"</div>");break;case"bad_maximum":n=jQuery('<div class="give_error give-invalid-maximum give-hidden">'+this.getNotice(e,t)+"</div>")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;var n,i,o;if(n=i=o="",t.length)switch(e){case"bad_minimum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==i&&(n=i+" "+Give.fn.formatCurrency(o,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dismissible:!0},i="undefined"!=typeof commonL10n?commonL10n.dismiss:wp.i18n.__("Dismiss this notice.");return'<div class="give-notice notice notice-'.concat(t).concat(n.dismissible?" is-dismissible":"",'"><p>').concat(e).concat(n.dismissible?' <button type="button" class="notice-dismiss"><span class="screen-reader-text">'.concat(i,"</span></button>"):"","</p</div>")}}},r=n(25),a=n.n(r),s=n(13),l=n.n(s),c={fn:{showOverlay:function(e){var t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div");i.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(i),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}},d={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){var t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){c.fn.showOverlay(e)},hideProcessingState:function(){c.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){var n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:void 0!==(n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e))&&n.trim()}return n},setInfo:function(e,t,n,i){if(!n.length)return!1;switch(e=void 0===e?"data":e){case"nonce":n.find('input[name="give-form-hash"]').val(t)}if(void 0!==i&&!i.length)return!1;switch(e){case"attr":n.attr(i,t);break;default:n.data(i,t)}return!0},getGateway:function(e){var t="";return e.length?void 0!==(t=e.find('input[name="payment-mode"]:checked').val().trim())?t:"":t},getVariablePrices:function(e){var t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,i){i=i instanceof jQuery?i:jQuery(i);var o=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:i.data("price-id"),amount:Give.fn.unFormatCurrency(i.val(),o)})})),n):n},getPriceID:function(e,t){var n=this.getVariablePrices(e),i=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e)),o=Give.fn.getCache("amount_"+i,e)?Give.fn.getCache("amount_"+i,e):-1;return t=void 0===t||t,n.length&&-1===o&&(t?(jQuery.each(n,(function(e,t){if(t.amount===i)return o=t.price_id,!1})),-1===o&&this.getMinimumAmount(e)<=i&&this.getMaximumAmount(e)>=i&&this.getMinimumAmount(e)<=i&&(o="custom")):o=jQuery('input[name="give-price-id"]',e).val()),o},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;var t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";var t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){var t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise((function(t,n){jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(i){if(!i.success)return n(i);var o=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",i.data.give_form_hash,e,""),o.length&&o.val(i.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[i.data]),t(i)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){var t=e.parents("form"),n=e.val(),i=e.data("price-id");void 0===i&&(i=e.find("option:selected").data("price-id")),"custom"===i&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);var o=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),o)),"custom"!==i||n?t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,i]):t.find(".give-donation-amount .give-text-input").focus()},__sendBackToForm:function(){var e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;var n=jQuery("body").find("#give-form-"+e+"-wrap"),i=n.find("form.give-form"),o=n.hasClass("give-display-modal"),r=n.hasClass("give-display-button"),a=n.hasClass("give-display-reveal");i.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),i.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");var s=Give.fn.getParameterByName("level-id"),l=i.find('*[data-price-id="'+s+'"]');l.length>0&&this.autoSetMultiLevel(l),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):o||r?give_open_form_modal(n,i):a&&(i.find(".give-btn-reveal").hide(),i.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;var t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),i=this.getAmount(e),o=this.getPriceID(e,!0);return 0!==i&&(-1<i&&i>=t&&i<=n||-1!==o)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||!1!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:(i=a()(l.a.mark((function e(t){var n,i,o,r=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=r.length>1&&void 0!==r[1]?r[1]:{})instanceof FormData?n:new FormData(t)).append("action","give_process_donation"),n.append("give_ajax",!0),e.next=6,fetch("".concat(Give.fn.getGlobalVar("ajaxurl")),{method:"POST",body:n});case 6:return i=e.sent,e.next=9,i.text();case 9:return o=e.sent,e.abrupt("return",o.trim());case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),addErrors:function(e,t){e.find('#give_purchase_submit input[type="submit"].give-submit').before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){var t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((function(e){var n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&this.addErrors(e,t),this.resetDonationButton(e)},resetDonationButton:function(e){var t=e.find('#give_purchase_submit input[type="submit"].give-submit'),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){var n=(t=jQuery(t)).find(".card-number"),i=t.find(".card-cvc"),o=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),i.payment("formatCardCVC"),o.payment("formatCardExpiry"))}))}}}},u={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},f={fn:{twitter:function(e,t){var n=parent.window?parent.window:window,i=n.innerHeight/2-126,o=n.innerWidth/2-280;n.open("https://twitter.com/intent/tweet?url=".concat(e,"&text=").concat(t),"newwindow","width=560,height=253,top=".concat(i,",left=").concat(o))},facebook:function(e){var t=parent.window?parent.window:window,n=t.innerHeight/2-365,i=t.innerWidth/2-280;window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(e),"newwindow","width=560,height=730,top=".concat(n,",left=").concat(i))}}},h={init:function(){var e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t<e.length;)h[e[t]].init&&h[e[t]].init(),t++;jQuery(document).trigger("give:postInit")},fn:{formatCurrency:function(e,t,n){var i={symbol:"",decimal:this.getGlobalVar("decimal_separator"),thousand:this.getGlobalVar("thousands_separator"),precision:parseInt(this.getGlobalVar("number_decimals")),currency:this.getGlobalVar("currency")};if(e=e.toString().trim(),(n=void 0===n?{}:n).length&&(i={symbol:"",decimal:h.form.fn.getInfo("decimal_separator",n),thousand:h.form.fn.getInfo("thousands_separator",n),precision:h.form.fn.getInfo("number_decimals",n),currency:h.form.fn.getInfo("currency_code",n)}),(t=jQuery.extend(i,t)).precision=parseInt(t.precision),"INR"===t.currency){var o,r=accounting.formatNumber(e,{precision:i.precision,decimal:"."}),a=t.precision?".0":"",s="",l="",c="";(r=(r=accounting.unformat(r,".").toString()).toString()).indexOf(".")>0&&(a=r.substring(r.indexOf("."),r.length)),s=(r=Math.floor(r).toString()).substring(r.length-3),""!==(l=r.substring(0,r.length-3))&&(s=i.thousand+s),o=(c=l.replace(/\B(?=(\d{2})+(?!\d))/g,i.thousand)+s+a).lastIndexOf("."),e=c=c.slice(0,o)+(c.slice(o)+"000000000000").substr(0,t.precision+1),void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=accounting.formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){var n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(accounting.unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){var t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?give_vars:give_global_vars},setCache:function(e,t,n){n.length?h.cache["form_"+h.form.fn.getInfo("form-id",n)][e]=t:h.cache[e]=t},getCache:function(e,t){var n,i=h.cache["form_"+h.form.fn.getInfo("form-id",t)];return n=void 0===(n=t.length?void 0!==i?i[e]:"":h.cache[e])?"":n},__getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"="),n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(i=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},i)).loadingAnimation?'<span class="is-active spinner"></span>':"",r=null!==i.loadingText?i.loadingText:h.fn.getGlobalVar("loader_translation").updating;return!1===i.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(t=o.length?"give-has-spinner":"",t=(t+=r.length?" give-has-text":"").length?" "+t.trim():"",n='<div class="give-spinner-wrap'.concat(t,'"><div class="give-spinner-inner">').concat((r+o).trim(),"</div></div>"),null===i.show?n:(e.prepend(n),!0))},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var i=encodeURIComponent(t)+"=",o=n[1].split(/[&;]/g),r=o.length;r-- >0;)-1!==o[r].lastIndexOf(i,0)&&o.splice(r,1);return n[0]+(o.length>0?"?"+o.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};h.notice=o,h.form=d,h.donor=u,h.util=c,h.share=f;t.a=h}});
assets/dist/js/give.js CHANGED
@@ -42,4 +42,4 @@ jQuery(document).ready((function(e){Give.form.fn.isFormExist()&&(e(".give-loadin
42
  * http://www.gnu.org/licenses/gpl.html
43
  *
44
  * Thanks to Amir-Hossein Sobhi for some excellent contributions!
45
- */!function(){"use strict";function a(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){s(window,e)},e.growlUI=function(t,n,r,i){var o=e('<div class="growlUI"></div>');t&&o.append("<h1>"+t+"</h1>"),n&&o.append("<h2>"+n+"</h2>"),void 0===r&&(r=3e3);var a=function(t){t=t||{},e.blockUI({message:o,fadeIn:void 0!==t.fadeIn?t.fadeIn:700,fadeOut:void 0!==t.fadeOut?t.fadeOut:1e3,timeout:void 0!==t.timeout?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};a();o.css("opacity");o.mouseover((function(){a({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)})).mouseout((function(){e(".blockMsg").fadeOut(1e3)}))},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var n=e.extend({},e.blockUI.defaults,t||{});return this.each((function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})})),this.each((function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,u(this,t)}))},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each((function(){s(this,t)}))},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,a=[];function u(u,c){var d,m,v=u==window,g=c&&void 0!==c.message?c.message:void 0;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(u).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),d=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),m=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),g=void 0===g?c.message:g,v&&o&&s(window,{fadeOut:0}),g&&"string"!=typeof g&&(g.parentNode||g.jquery)){var h=g.jquery?g[0]:g,y={};e(u).data("blockUI.history",y),y.el=h,y.parent=h.parentNode,y.display=h.style.display,y.position=h.style.position,y.parent&&y.parent.removeChild(h)}e(u).data("blockUI.onUnblock",c.onUnblock);var b,w,_,x,C=c.baseZ;b=n||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),w=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+C+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&v?(x='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):c.theme?(x='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):x=v?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>',_=e(x),g&&(c.theme?(_.css(m),_.addClass("ui-widget-content")):_.css(d)),c.theme||w.css(c.overlayCSS),w.css("position",v?"fixed":"absolute"),(n||c.forceIframe)&&b.css("opacity",0);var k=[b,w,_],I=e(v?"body":u);e.each(k,(function(){this.appendTo(I)})),c.theme&&c.draggable&&e.fn.draggable&&_.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var E=i&&(!e.support.boxModel||e("object,embed",v?null:u).length>0);if(r||E){if(v&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(r||!e.support.boxModel)&&!v)var j=p(u,"borderTopWidth"),S=p(u,"borderLeftWidth"),O=j?"(0 - "+j+")":0,T=S?"(0 - "+S+")":0;e.each(k,(function(e,t){var n=t[0].style;if(n.position="absolute",e<2)v?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),v?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),T&&n.setExpression("left",T),O&&n.setExpression("top",O);else if(c.centerY)v&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!c.centerY&&v){var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';n.setExpression("top",r)}}))}if(g&&(c.theme?_.find(".ui-widget-content").append(g):_.append(g),(g.jquery||g.nodeType)&&e(g).show()),(n||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var M=c.onBlock?c.onBlock:t,A=c.showOverlay&&!g?M:t,L=g?M:t;c.showOverlay&&w._fadeIn(c.fadeIn,A),g&&_._fadeIn(c.fadeIn,L)}else c.showOverlay&&w.show(),g&&_.show(),c.onBlock&&c.onBlock.bind(_)();if(l(1,u,c),v?(o=_[0],a=e(c.focusableElements,o),c.focusInput&&setTimeout(f,20)):function(e,t,n){var r=e.parentNode,i=e.style,o=(r.offsetWidth-e.offsetWidth)/2-p(r,"borderLeftWidth"),a=(r.offsetHeight-e.offsetHeight)/2-p(r,"borderTopWidth");t&&(i.left=o>0?o+"px":"0");n&&(i.top=a>0?a+"px":"0")}(_[0],c.centerX,c.centerY),c.timeout){var N=setTimeout((function(){v?e.unblockUI(c):e(u).unblock(c)}),c.timeout);e(u).data("blockUI.timeout",N)}}}function s(t,n){var r,i,u=t==window,s=e(t),d=s.data("blockUI.history"),f=s.data("blockUI.timeout");f&&(clearTimeout(f),s.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),null===n.onUnblock&&(n.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),i=u?e("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),n.cursorReset&&(i.length>1&&(i[1].style.cursor=n.cursorReset),i.length>2&&(i[2].style.cursor=n.cursorReset)),u&&(o=a=null),n.fadeOut?(r=i.length,i.stop().fadeOut(n.fadeOut,(function(){0==--r&&c(i,d,n,t)}))):c(i,d,n,t)}function c(t,n,r,i){var o=e(i);if(!o.data("blockUI.isBlocked")){t.each((function(e,t){this.parentNode&&this.parentNode.removeChild(this)})),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.el.style.cursor="default",n.parent&&n.parent.appendChild(n.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof r.onUnblock&&r.onUnblock(i,r);var a=e(document.body),u=a.width(),s=a[0].style.width;a.width(u-1).width(u),a[0].style.width=s}}function l(t,n,r){var i=n==window,a=e(n);if((t||(!i||o)&&(i||a.data("blockUI.isBlocked")))&&(a.data("blockUI.isBlocked",t),i&&r.bindEvents&&(!t||r.showOverlay))){var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,d):e(document).unbind(u,d)}}function d(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&o&&t.data.constrainTabKey){var n=a,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout((function(){f(i)}),10),!1}var u=t.data,s=e(t.target);return s.hasClass("blockOverlay")&&u.onOverlayClick&&u.onOverlayClick(t),s.parents("div."+u.blockMsgClass).length>0||0===s.parents().children().filter("div.blockUI").length}function f(e){if(a){var t=a[!0===e?a.length-1:0];t&&t.focus()}}function p(t,n){return parseInt(e.css(t,n),10)||0}}n(681).jQuery?(i=[n(385)],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):a(jQuery)}()},681:function(e,t){(function(t){e.exports=t}).call(this,{})},99:function(e,t,n){"use strict";var r,i={fn:{renderNotice:function(e,t){var n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('<div class="give_error give-invalid-minimum give-hidden">'+this.getNotice(e,t)+"</div>");break;case"bad_maximum":n=jQuery('<div class="give_error give-invalid-maximum give-hidden">'+this.getNotice(e,t)+"</div>")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;var n,r,i;if(n=r=i="",t.length)switch(e){case"bad_minimum":r=Give.fn.getGlobalVar(e),i=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":r=Give.fn.getGlobalVar(e),i=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==r&&(n=r+" "+Give.fn.formatCurrency(i,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dismissible:!0},r="undefined"!=typeof commonL10n?commonL10n.dismiss:wp.i18n.__("Dismiss this notice.");return'<div class="give-notice notice notice-'.concat(t).concat(n.dismissible?" is-dismissible":"",'"><p>').concat(e).concat(n.dismissible?' <button type="button" class="notice-dismiss"><span class="screen-reader-text">'.concat(r,"</span></button>"):"","</p</div>")}}},o=n(25),a=n.n(o),u=n(13),s=n.n(u),c={fn:{showOverlay:function(e){var t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");r.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(r),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}},l={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){var t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){c.fn.showOverlay(e)},hideProcessingState:function(){c.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){var n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:void 0!==(n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e))&&n.trim()}return n},setInfo:function(e,t,n,r){if(!n.length)return!1;switch(e=void 0===e?"data":e){case"nonce":n.find('input[name="give-form-hash"]').val(t)}if(void 0!==r&&!r.length)return!1;switch(e){case"attr":n.attr(r,t);break;default:n.data(r,t)}return!0},getGateway:function(e){var t="";return e.length?void 0!==(t=e.find('input[name="payment-mode"]:checked').val().trim())?t:"":t},getVariablePrices:function(e){var t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,r){r=r instanceof jQuery?r:jQuery(r);var i=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:r.data("price-id"),amount:Give.fn.unFormatCurrency(r.val(),i)})})),n):n},getPriceID:function(e,t){var n=this.getVariablePrices(e),r=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e)),i=Give.fn.getCache("amount_"+r,e)?Give.fn.getCache("amount_"+r,e):-1;return t=void 0===t||t,n.length&&-1===i&&(t?(jQuery.each(n,(function(e,t){if(t.amount===r)return i=t.price_id,!1})),-1===i&&this.getMinimumAmount(e)<=r&&this.getMaximumAmount(e)>=r&&this.getMinimumAmount(e)<=r&&(i="custom")):i=jQuery('input[name="give-price-id"]',e).val()),i},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;var t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";var t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){var t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise((function(t,n){jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(r){if(!r.success)return n(r);var i=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",r.data.give_form_hash,e,""),i.length&&i.val(r.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[r.data]),t(r)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){var t=e.parents("form"),n=e.val(),r=e.data("price-id");void 0===r&&(r=e.find("option:selected").data("price-id")),"custom"===r&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);var i=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),i)),t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,r])},__sendBackToForm:function(){var e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;var n=jQuery("body").find("#give-form-"+e+"-wrap"),r=n.find("form.give-form"),i=n.hasClass("give-display-modal"),o=n.hasClass("give-display-button"),a=n.hasClass("give-display-reveal");r.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),r.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");var u=Give.fn.getParameterByName("level-id"),s=r.find('*[data-price-id="'+u+'"]');s.length>0&&this.autoSetMultiLevel(s),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):i||o?give_open_form_modal(n,r):a&&(r.find(".give-btn-reveal").hide(),r.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;var t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),r=this.getAmount(e),i=this.getPriceID(e,!0);return 0!==r&&(-1<r&&r>=t&&r<=n||-1!==i)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||!1!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:(r=a()(s.a.mark((function e(t){var n,r,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=o.length>1&&void 0!==o[1]?o[1]:{})instanceof FormData?n:new FormData(t)).append("action","give_process_donation"),n.append("give_ajax",!0),e.next=6,fetch("".concat(Give.fn.getGlobalVar("ajaxurl")),{method:"POST",body:n});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,e.abrupt("return",i.trim());case 11:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}),addErrors:function(e,t){e.find('#give_purchase_submit input[type="submit"].give-submit').before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){var t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((function(e){var n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&this.addErrors(e,t),this.resetDonationButton(e)},resetDonationButton:function(e){var t=e.find('#give_purchase_submit input[type="submit"].give-submit'),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){var n=(t=jQuery(t)).find(".card-number"),r=t.find(".card-cvc"),i=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),r.payment("formatCardCVC"),i.payment("formatCardExpiry"))}))}}}},d={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},f={fn:{twitter:function(e,t){var n=parent.window?parent.window:window,r=n.innerHeight/2-126,i=n.innerWidth/2-280;n.open("https://twitter.com/intent/tweet?url=".concat(e,"&text=").concat(t),"newwindow","width=560,height=253,top=".concat(r,",left=").concat(i))},facebook:function(e){var t=parent.window?parent.window:window,n=t.innerHeight/2-365,r=t.innerWidth/2-280;window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(e),"newwindow","width=560,height=730,top=".concat(n,",left=").concat(r))}}},p={init:function(){var e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t<e.length;)p[e[t]].init&&p[e[t]].init(),t++;jQuery(document).trigger("give:postInit")},fn:{formatCurrency:function(e,t,n){var r={symbol:"",decimal:this.getGlobalVar("decimal_separator"),thousand:this.getGlobalVar("thousands_separator"),precision:parseInt(this.getGlobalVar("number_decimals")),currency:this.getGlobalVar("currency")};if(e=e.toString().trim(),(n=void 0===n?{}:n).length&&(r={symbol:"",decimal:p.form.fn.getInfo("decimal_separator",n),thousand:p.form.fn.getInfo("thousands_separator",n),precision:p.form.fn.getInfo("number_decimals",n),currency:p.form.fn.getInfo("currency_code",n)}),(t=jQuery.extend(r,t)).precision=parseInt(t.precision),"INR"===t.currency){var i,o=accounting.formatNumber(e,{precision:r.precision,decimal:"."}),a=t.precision?".0":"",u="",s="",c="";(o=(o=accounting.unformat(o,".").toString()).toString()).indexOf(".")>0&&(a=o.substring(o.indexOf("."),o.length)),u=(o=Math.floor(o).toString()).substring(o.length-3),""!==(s=o.substring(0,o.length-3))&&(u=r.thousand+u),i=(c=s.replace(/\B(?=(\d{2})+(?!\d))/g,r.thousand)+u+a).lastIndexOf("."),e=c=c.slice(0,i)+(c.slice(i)+"000000000000").substr(0,t.precision+1),void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=accounting.formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){var n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(accounting.unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){var t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?give_vars:give_global_vars},setCache:function(e,t,n){n.length?p.cache["form_"+p.form.fn.getInfo("form-id",n)][e]=t:p.cache[e]=t},getCache:function(e,t){var n,r=p.cache["form_"+p.form.fn.getInfo("form-id",t)];return n=void 0===(n=t.length?void 0!==r?r[e]:"":p.cache[e])?"":n},__getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"="),n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(r=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},r)).loadingAnimation?'<span class="is-active spinner"></span>':"",o=null!==r.loadingText?r.loadingText:p.fn.getGlobalVar("loader_translation").updating;return!1===r.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(t=i.length?"give-has-spinner":"",t=(t+=o.length?" give-has-text":"").length?" "+t.trim():"",n='<div class="give-spinner-wrap'.concat(t,'"><div class="give-spinner-inner">').concat((o+i).trim(),"</div></div>"),null===r.show?n:(e.prepend(n),!0))},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var r=encodeURIComponent(t)+"=",i=n[1].split(/[&;]/g),o=i.length;o-- >0;)-1!==i[o].lastIndexOf(r,0)&&i.splice(o,1);return n[0]+(i.length>0?"?"+i.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};p.notice=i,p.form=l,p.donor=d,p.util=c,p.share=f;t.a=p}});
42
  * http://www.gnu.org/licenses/gpl.html
43
  *
44
  * Thanks to Amir-Hossein Sobhi for some excellent contributions!
45
+ */!function(){"use strict";function a(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},n=/MSIE/.test(navigator.userAgent),r=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){s(window,e)},e.growlUI=function(t,n,r,i){var o=e('<div class="growlUI"></div>');t&&o.append("<h1>"+t+"</h1>"),n&&o.append("<h2>"+n+"</h2>"),void 0===r&&(r=3e3);var a=function(t){t=t||{},e.blockUI({message:o,fadeIn:void 0!==t.fadeIn?t.fadeIn:700,fadeOut:void 0!==t.fadeOut?t.fadeOut:1e3,timeout:void 0!==t.timeout?t.timeout:r,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};a();o.css("opacity");o.mouseover((function(){a({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)})).mouseout((function(){e(".blockMsg").fadeOut(1e3)}))},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var n=e.extend({},e.blockUI.defaults,t||{});return this.each((function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})})),this.each((function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,u(this,t)}))},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each((function(){s(this,t)}))},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,a=[];function u(u,c){var d,m,v=u==window,g=c&&void 0!==c.message?c.message:void 0;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(u).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),d=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),m=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),g=void 0===g?c.message:g,v&&o&&s(window,{fadeOut:0}),g&&"string"!=typeof g&&(g.parentNode||g.jquery)){var h=g.jquery?g[0]:g,y={};e(u).data("blockUI.history",y),y.el=h,y.parent=h.parentNode,y.display=h.style.display,y.position=h.style.position,y.parent&&y.parent.removeChild(h)}e(u).data("blockUI.onUnblock",c.onUnblock);var b,w,_,x,C=c.baseZ;b=n||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),w=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+C+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&v?(x='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):c.theme?(x='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute">',c.title&&(x+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),x+='<div class="ui-widget-content ui-dialog-content"></div>',x+="</div>"):x=v?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>',_=e(x),g&&(c.theme?(_.css(m),_.addClass("ui-widget-content")):_.css(d)),c.theme||w.css(c.overlayCSS),w.css("position",v?"fixed":"absolute"),(n||c.forceIframe)&&b.css("opacity",0);var k=[b,w,_],I=e(v?"body":u);e.each(k,(function(){this.appendTo(I)})),c.theme&&c.draggable&&e.fn.draggable&&_.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var E=i&&(!e.support.boxModel||e("object,embed",v?null:u).length>0);if(r||E){if(v&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(r||!e.support.boxModel)&&!v)var j=p(u,"borderTopWidth"),S=p(u,"borderLeftWidth"),O=j?"(0 - "+j+")":0,T=S?"(0 - "+S+")":0;e.each(k,(function(e,t){var n=t[0].style;if(n.position="absolute",e<2)v?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),v?n.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),T&&n.setExpression("left",T),O&&n.setExpression("top",O);else if(c.centerY)v&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!c.centerY&&v){var r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';n.setExpression("top",r)}}))}if(g&&(c.theme?_.find(".ui-widget-content").append(g):_.append(g),(g.jquery||g.nodeType)&&e(g).show()),(n||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var M=c.onBlock?c.onBlock:t,A=c.showOverlay&&!g?M:t,L=g?M:t;c.showOverlay&&w._fadeIn(c.fadeIn,A),g&&_._fadeIn(c.fadeIn,L)}else c.showOverlay&&w.show(),g&&_.show(),c.onBlock&&c.onBlock.bind(_)();if(l(1,u,c),v?(o=_[0],a=e(c.focusableElements,o),c.focusInput&&setTimeout(f,20)):function(e,t,n){var r=e.parentNode,i=e.style,o=(r.offsetWidth-e.offsetWidth)/2-p(r,"borderLeftWidth"),a=(r.offsetHeight-e.offsetHeight)/2-p(r,"borderTopWidth");t&&(i.left=o>0?o+"px":"0");n&&(i.top=a>0?a+"px":"0")}(_[0],c.centerX,c.centerY),c.timeout){var N=setTimeout((function(){v?e.unblockUI(c):e(u).unblock(c)}),c.timeout);e(u).data("blockUI.timeout",N)}}}function s(t,n){var r,i,u=t==window,s=e(t),d=s.data("blockUI.history"),f=s.data("blockUI.timeout");f&&(clearTimeout(f),s.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),null===n.onUnblock&&(n.onUnblock=s.data("blockUI.onUnblock"),s.removeData("blockUI.onUnblock")),i=u?e("body").children().filter(".blockUI").add("body > .blockUI"):s.find(">.blockUI"),n.cursorReset&&(i.length>1&&(i[1].style.cursor=n.cursorReset),i.length>2&&(i[2].style.cursor=n.cursorReset)),u&&(o=a=null),n.fadeOut?(r=i.length,i.stop().fadeOut(n.fadeOut,(function(){0==--r&&c(i,d,n,t)}))):c(i,d,n,t)}function c(t,n,r,i){var o=e(i);if(!o.data("blockUI.isBlocked")){t.each((function(e,t){this.parentNode&&this.parentNode.removeChild(this)})),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.el.style.cursor="default",n.parent&&n.parent.appendChild(n.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof r.onUnblock&&r.onUnblock(i,r);var a=e(document.body),u=a.width(),s=a[0].style.width;a.width(u-1).width(u),a[0].style.width=s}}function l(t,n,r){var i=n==window,a=e(n);if((t||(!i||o)&&(i||a.data("blockUI.isBlocked")))&&(a.data("blockUI.isBlocked",t),i&&r.bindEvents&&(!t||r.showOverlay))){var u="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(u,r,d):e(document).unbind(u,d)}}function d(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&o&&t.data.constrainTabKey){var n=a,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout((function(){f(i)}),10),!1}var u=t.data,s=e(t.target);return s.hasClass("blockOverlay")&&u.onOverlayClick&&u.onOverlayClick(t),s.parents("div."+u.blockMsgClass).length>0||0===s.parents().children().filter("div.blockUI").length}function f(e){if(a){var t=a[!0===e?a.length-1:0];t&&t.focus()}}function p(t,n){return parseInt(e.css(t,n),10)||0}}n(681).jQuery?(i=[n(385)],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):a(jQuery)}()},681:function(e,t){(function(t){e.exports=t}).call(this,{})},99:function(e,t,n){"use strict";var r,i={fn:{renderNotice:function(e,t){var n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('<div class="give_error give-invalid-minimum give-hidden">'+this.getNotice(e,t)+"</div>");break;case"bad_maximum":n=jQuery('<div class="give_error give-invalid-maximum give-hidden">'+this.getNotice(e,t)+"</div>")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;var n,r,i;if(n=r=i="",t.length)switch(e){case"bad_minimum":r=Give.fn.getGlobalVar(e),i=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":r=Give.fn.getGlobalVar(e),i=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==r&&(n=r+" "+Give.fn.formatCurrency(i,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dismissible:!0},r="undefined"!=typeof commonL10n?commonL10n.dismiss:wp.i18n.__("Dismiss this notice.");return'<div class="give-notice notice notice-'.concat(t).concat(n.dismissible?" is-dismissible":"",'"><p>').concat(e).concat(n.dismissible?' <button type="button" class="notice-dismiss"><span class="screen-reader-text">'.concat(r,"</span></button>"):"","</p</div>")}}},o=n(25),a=n.n(o),u=n(13),s=n.n(u),c={fn:{showOverlay:function(e){var t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");r.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(r),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}},l={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){var t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){c.fn.showOverlay(e)},hideProcessingState:function(){c.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){var n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:void 0!==(n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e))&&n.trim()}return n},setInfo:function(e,t,n,r){if(!n.length)return!1;switch(e=void 0===e?"data":e){case"nonce":n.find('input[name="give-form-hash"]').val(t)}if(void 0!==r&&!r.length)return!1;switch(e){case"attr":n.attr(r,t);break;default:n.data(r,t)}return!0},getGateway:function(e){var t="";return e.length?void 0!==(t=e.find('input[name="payment-mode"]:checked').val().trim())?t:"":t},getVariablePrices:function(e){var t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,r){r=r instanceof jQuery?r:jQuery(r);var i=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:r.data("price-id"),amount:Give.fn.unFormatCurrency(r.val(),i)})})),n):n},getPriceID:function(e,t){var n=this.getVariablePrices(e),r=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e)),i=Give.fn.getCache("amount_"+r,e)?Give.fn.getCache("amount_"+r,e):-1;return t=void 0===t||t,n.length&&-1===i&&(t?(jQuery.each(n,(function(e,t){if(t.amount===r)return i=t.price_id,!1})),-1===i&&this.getMinimumAmount(e)<=r&&this.getMaximumAmount(e)>=r&&this.getMinimumAmount(e)<=r&&(i="custom")):i=jQuery('input[name="give-price-id"]',e).val()),i},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;var t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";var t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){var t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise((function(t,n){jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(r){if(!r.success)return n(r);var i=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",r.data.give_form_hash,e,""),i.length&&i.val(r.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[r.data]),t(r)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){var t=e.parents("form"),n=e.val(),r=e.data("price-id");void 0===r&&(r=e.find("option:selected").data("price-id")),"custom"===r&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);var i=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),i)),"custom"!==r||n?t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,r]):t.find(".give-donation-amount .give-text-input").focus()},__sendBackToForm:function(){var e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;var n=jQuery("body").find("#give-form-"+e+"-wrap"),r=n.find("form.give-form"),i=n.hasClass("give-display-modal"),o=n.hasClass("give-display-button"),a=n.hasClass("give-display-reveal");r.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),r.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");var u=Give.fn.getParameterByName("level-id"),s=r.find('*[data-price-id="'+u+'"]');s.length>0&&this.autoSetMultiLevel(s),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):i||o?give_open_form_modal(n,r):a&&(r.find(".give-btn-reveal").hide(),r.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;var t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),r=this.getAmount(e),i=this.getPriceID(e,!0);return 0!==r&&(-1<r&&r>=t&&r<=n||-1!==i)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||!1!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:(r=a()(s.a.mark((function e(t){var n,r,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=(n=o.length>1&&void 0!==o[1]?o[1]:{})instanceof FormData?n:new FormData(t)).append("action","give_process_donation"),n.append("give_ajax",!0),e.next=6,fetch("".concat(Give.fn.getGlobalVar("ajaxurl")),{method:"POST",body:n});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,e.abrupt("return",i.trim());case 11:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)}),addErrors:function(e,t){e.find('#give_purchase_submit input[type="submit"].give-submit').before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){var t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((function(e){var n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&this.addErrors(e,t),this.resetDonationButton(e)},resetDonationButton:function(e){var t=e.find('#give_purchase_submit input[type="submit"].give-submit'),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){var n=(t=jQuery(t)).find(".card-number"),r=t.find(".card-cvc"),i=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),r.payment("formatCardCVC"),i.payment("formatCardExpiry"))}))}}}},d={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},f={fn:{twitter:function(e,t){var n=parent.window?parent.window:window,r=n.innerHeight/2-126,i=n.innerWidth/2-280;n.open("https://twitter.com/intent/tweet?url=".concat(e,"&text=").concat(t),"newwindow","width=560,height=253,top=".concat(r,",left=").concat(i))},facebook:function(e){var t=parent.window?parent.window:window,n=t.innerHeight/2-365,r=t.innerWidth/2-280;window.open("https://www.facebook.com/sharer/sharer.php?u=".concat(e),"newwindow","width=560,height=730,top=".concat(n,",left=").concat(r))}}},p={init:function(){var e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t<e.length;)p[e[t]].init&&p[e[t]].init(),t++;jQuery(document).trigger("give:postInit")},fn:{formatCurrency:function(e,t,n){var r={symbol:"",decimal:this.getGlobalVar("decimal_separator"),thousand:this.getGlobalVar("thousands_separator"),precision:parseInt(this.getGlobalVar("number_decimals")),currency:this.getGlobalVar("currency")};if(e=e.toString().trim(),(n=void 0===n?{}:n).length&&(r={symbol:"",decimal:p.form.fn.getInfo("decimal_separator",n),thousand:p.form.fn.getInfo("thousands_separator",n),precision:p.form.fn.getInfo("number_decimals",n),currency:p.form.fn.getInfo("currency_code",n)}),(t=jQuery.extend(r,t)).precision=parseInt(t.precision),"INR"===t.currency){var i,o=accounting.formatNumber(e,{precision:r.precision,decimal:"."}),a=t.precision?".0":"",u="",s="",c="";(o=(o=accounting.unformat(o,".").toString()).toString()).indexOf(".")>0&&(a=o.substring(o.indexOf("."),o.length)),u=(o=Math.floor(o).toString()).substring(o.length-3),""!==(s=o.substring(0,o.length-3))&&(u=r.thousand+u),i=(c=s.replace(/\B(?=(\d{2})+(?!\d))/g,r.thousand)+u+a).lastIndexOf("."),e=c=c.slice(0,i)+(c.slice(i)+"000000000000").substr(0,t.precision+1),void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=accounting.formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){var n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(accounting.unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){var t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?give_vars:give_global_vars},setCache:function(e,t,n){n.length?p.cache["form_"+p.form.fn.getInfo("form-id",n)][e]=t:p.cache[e]=t},getCache:function(e,t){var n,r=p.cache["form_"+p.form.fn.getInfo("form-id",t)];return n=void 0===(n=t.length?void 0!==r?r[e]:"":p.cache[e])?"":n},__getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"="),n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(r=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},r)).loadingAnimation?'<span class="is-active spinner"></span>':"",o=null!==r.loadingText?r.loadingText:p.fn.getGlobalVar("loader_translation").updating;return!1===r.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(t=i.length?"give-has-spinner":"",t=(t+=o.length?" give-has-text":"").length?" "+t.trim():"",n='<div class="give-spinner-wrap'.concat(t,'"><div class="give-spinner-inner">').concat((o+i).trim(),"</div></div>"),null===r.show?n:(e.prepend(n),!0))},removeURLParameter:function(e,t){var n=e.split("?");if(n.length>=2){for(var r=encodeURIComponent(t)+"=",i=n[1].split(/[&;]/g),o=i.length;o-- >0;)-1!==i[o].lastIndexOf(r,0)&&i.splice(o,1);return n[0]+(i.length>0?"?"+i.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};p.notice=i,p.form=l,p.donor=d,p.util=c,p.share=f;t.a=p}});
give.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
- * Version: 2.13.2
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
@@ -267,7 +267,7 @@ final class Give {
267
  private function setup_constants() {
268
  // Plugin version.
269
  if ( ! defined( 'GIVE_VERSION' ) ) {
270
- define( 'GIVE_VERSION', '2.13.2' );
271
  }
272
 
273
  // Plugin Root File.
5
  * Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
6
  * Author: GiveWP
7
  * Author URI: https://givewp.com/
8
+ * Version: 2.13.3
9
  * Text Domain: give
10
  * Domain Path: /languages
11
  *
267
  private function setup_constants() {
268
  // Plugin version.
269
  if ( ! defined( 'GIVE_VERSION' ) ) {
270
+ define( 'GIVE_VERSION', '2.13.3' );
271
  }
272
 
273
  // Plugin Root File.
languages/give.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Give - Donation Plugin plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Give - Donation Plugin 2.13.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/givewp\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-08-26T21:40:02+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: give\n"
2
  # This file is distributed under the same license as the Give - Donation Plugin plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Give - Donation Plugin 2.13.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/givewp\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2021-09-01T19:43:51+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: give\n"
output.log CHANGED
@@ -15,19 +15,20 @@ c88517be8365: Pulling fs layer
15
  142abe9b67c6: Pulling fs layer
16
  181891da1ea0: Pulling fs layer
17
  2a0fa75da19b: Pulling fs layer
18
- 136539a47de8: Pulling fs layer
19
  4612e05a72cf: Waiting
20
  f1478d838f46: Waiting
21
  c88517be8365: Waiting
22
  142abe9b67c6: Waiting
23
  181891da1ea0: Waiting
24
  2a0fa75da19b: Waiting
 
25
  136539a47de8: Waiting
26
  320f26ee9b1c: Verifying Checksum
27
  320f26ee9b1c: Download complete
 
 
28
  801bfaa63ef2: Verifying Checksum
29
  801bfaa63ef2: Download complete
30
- 30e209609427: Download complete
31
  801bfaa63ef2: Pull complete
32
  4612e05a72cf: Verifying Checksum
33
  4612e05a72cf: Download complete
@@ -36,21 +37,21 @@ c88517be8365: Download complete
36
  30e209609427: Pull complete
37
  f1478d838f46: Verifying Checksum
38
  f1478d838f46: Download complete
39
- 181891da1ea0: Verifying Checksum
40
- 181891da1ea0: Download complete
41
  320f26ee9b1c: Pull complete
42
  4612e05a72cf: Pull complete
43
  142abe9b67c6: Verifying Checksum
44
  142abe9b67c6: Download complete
 
 
45
  2a0fa75da19b: Verifying Checksum
46
  2a0fa75da19b: Download complete
47
  f1478d838f46: Pull complete
48
  c88517be8365: Pull complete
49
- 136539a47de8: Verifying Checksum
50
- 136539a47de8: Download complete
51
  142abe9b67c6: Pull complete
52
  181891da1ea0: Pull complete
53
  2a0fa75da19b: Pull complete
 
 
54
  136539a47de8: Pull complete
55
  Digest: sha256:e18a4a2e8f8acca5f1d1858eb7dddfb92afdfe850d11fc6d65dee871b6b64584
56
  Status: Downloaded newer image for docker.pkg.github.com/impress-org/givewp/php-actions_composer_givewp:php-7.2-build2
15
  142abe9b67c6: Pulling fs layer
16
  181891da1ea0: Pulling fs layer
17
  2a0fa75da19b: Pulling fs layer
 
18
  4612e05a72cf: Waiting
19
  f1478d838f46: Waiting
20
  c88517be8365: Waiting
21
  142abe9b67c6: Waiting
22
  181891da1ea0: Waiting
23
  2a0fa75da19b: Waiting
24
+ 136539a47de8: Pulling fs layer
25
  136539a47de8: Waiting
26
  320f26ee9b1c: Verifying Checksum
27
  320f26ee9b1c: Download complete
28
+ 30e209609427: Verifying Checksum
29
+ 30e209609427: Download complete
30
  801bfaa63ef2: Verifying Checksum
31
  801bfaa63ef2: Download complete
 
32
  801bfaa63ef2: Pull complete
33
  4612e05a72cf: Verifying Checksum
34
  4612e05a72cf: Download complete
37
  30e209609427: Pull complete
38
  f1478d838f46: Verifying Checksum
39
  f1478d838f46: Download complete
 
 
40
  320f26ee9b1c: Pull complete
41
  4612e05a72cf: Pull complete
42
  142abe9b67c6: Verifying Checksum
43
  142abe9b67c6: Download complete
44
+ 181891da1ea0: Verifying Checksum
45
+ 181891da1ea0: Download complete
46
  2a0fa75da19b: Verifying Checksum
47
  2a0fa75da19b: Download complete
48
  f1478d838f46: Pull complete
49
  c88517be8365: Pull complete
 
 
50
  142abe9b67c6: Pull complete
51
  181891da1ea0: Pull complete
52
  2a0fa75da19b: Pull complete
53
+ 136539a47de8: Verifying Checksum
54
+ 136539a47de8: Download complete
55
  136539a47de8: Pull complete
56
  Digest: sha256:e18a4a2e8f8acca5f1d1858eb7dddfb92afdfe850d11fc6d65dee871b6b64584
57
  Status: Downloaded newer image for docker.pkg.github.com/impress-org/givewp/php-actions_composer_givewp:php-7.2-build2
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: donation, fundraising, crowdfunding, givewp, give
5
  Requires at least: 4.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 2.13.2
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -231,6 +231,10 @@ The 2% fee on Stripe donations only applies to donations taken via our free Stri
231
  8. GiveWP has a dedicated support team to help answer any questions you may have and help you through stumbling blocks.
232
 
233
  == Changelog ==
 
 
 
 
234
  = 2.13.2: August 26th, 2021 =
235
  * Fix: Resolved issue where donation forms failed to submit when Stripe was disabled
236
 
5
  Requires at least: 4.9
6
  Tested up to: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 2.13.3
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
231
  8. GiveWP has a dedicated support team to help answer any questions you may have and help you through stumbling blocks.
232
 
233
  == Changelog ==
234
+ = 2.13.3: September 1st, 2021 =
235
+ * Fix: Resolved rare issue with Revenue not storing properly on donation form created during onboarding
236
+ * Fix: Donor selecting "Custom" donation amount now focuses on the amount field
237
+
238
  = 2.13.2: August 26th, 2021 =
239
  * Fix: Resolved issue where donation forms failed to submit when Stripe was disabled
240
 
src/DonorDashboards/Repositories/Donations.php CHANGED
@@ -69,7 +69,7 @@ class Donations {
69
  INNER JOIN {$wpdb->prefix}give_donationmeta as donationmeta ON revenue.donation_id = donationmeta.donation_id
70
  WHERE donationmeta.meta_key = '_give_payment_donor_id'
71
  AND donationmeta.meta_value = %d
72
- AND posts.post_status IN ( 'publish', 'give_subscription' )
73
  ",
74
  $donorId
75
  )
69
  INNER JOIN {$wpdb->prefix}give_donationmeta as donationmeta ON revenue.donation_id = donationmeta.donation_id
70
  WHERE donationmeta.meta_key = '_give_payment_donor_id'
71
  AND donationmeta.meta_value = %d
72
+ AND posts.post_status IN ( 'publish', 'give_subscription', 'pending' )
73
  ",
74
  $donorId
75
  )
src/DonorDashboards/Tabs/Contracts/Route.php CHANGED
@@ -58,7 +58,7 @@ abstract class Route implements RestRoute {
58
  'methods' => 'POST',
59
  'callback' => [ $this, 'handleRequestWithDonorIdCheck' ],
60
  'permission_callback' => function() {
61
- return Give()->session->get_session_expiration() !== false;
62
  },
63
  ],
64
  'args' => $this->args(),
58
  'methods' => 'POST',
59
  'callback' => [ $this, 'handleRequestWithDonorIdCheck' ],
60
  'permission_callback' => function() {
61
+ return is_user_logged_in() || Give()->session->get_session_expiration() !== false;
62
  },
63
  ],
64
  'args' => $this->args(),
src/Onboarding/DefaultFormFactory.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  namespace Give\Onboarding;
4
 
5
- use Give\Form\Template\Options as TempalteOptions;
6
 
7
  /**
8
  * @since 2.8.0
@@ -127,7 +127,7 @@ class DefaultFormFactory {
127
  'header_label' => __( 'Add Your Information', 'give' ),
128
  'headline' => __( "Who's giving today?", 'give' ),
129
  'description' => __( 'We’ll never share this information with anyone.', 'give' ),
130
- TempalteOptions::getCheckoutLabelField(),
131
  ],
132
  'thank-you' => [
133
  'image' => '',
@@ -146,44 +146,45 @@ class DefaultFormFactory {
146
  * @return array
147
  *
148
  * @since 2.8.0
 
149
  */
150
  public function getDonationLevels() {
151
  return [
152
  [
153
  '_give_id' =>
154
  [
155
- 'level_id' => 0,
156
  ],
157
- '_give_amount' => 10,
158
  ],
159
  [
160
  '_give_id' =>
161
  [
162
- 'level_id' => 1,
163
  ],
164
- '_give_amount' => 25,
165
  ],
166
  [
167
  '_give_id' =>
168
  [
169
- 'level_id' => 2,
170
  ],
171
- '_give_amount' => 50,
172
  ],
173
  [
174
  '_give_id' =>
175
  [
176
- 'level_id' => 3,
177
  ],
178
- '_give_amount' => 100,
179
  '_give_default' => 'default',
180
  ],
181
  [
182
  '_give_id' =>
183
  [
184
- 'level_id' => 5,
185
  ],
186
- '_give_amount' => 250,
187
  ],
188
  ];
189
  }
2
 
3
  namespace Give\Onboarding;
4
 
5
+ use Give\Form\Template\Options as TemplateOptions;
6
 
7
  /**
8
  * @since 2.8.0
127
  'header_label' => __( 'Add Your Information', 'give' ),
128
  'headline' => __( "Who's giving today?", 'give' ),
129
  'description' => __( 'We’ll never share this information with anyone.', 'give' ),
130
+ TemplateOptions::getCheckoutLabelField(),
131
  ],
132
  'thank-you' => [
133
  'image' => '',
146
  * @return array
147
  *
148
  * @since 2.8.0
149
+ * @since 2.13.3 Donation level id and amount value changed to string
150
  */
151
  public function getDonationLevels() {
152
  return [
153
  [
154
  '_give_id' =>
155
  [
156
+ 'level_id' => '0',
157
  ],
158
+ '_give_amount' => give_sanitize_amount_for_db( 10 ),
159
  ],
160
  [
161
  '_give_id' =>
162
  [
163
+ 'level_id' => '1',
164
  ],
165
+ '_give_amount' => give_sanitize_amount_for_db( 25 ),
166
  ],
167
  [
168
  '_give_id' =>
169
  [
170
+ 'level_id' => '2',
171
  ],
172
+ '_give_amount' => give_sanitize_amount_for_db( 50 ),
173
  ],
174
  [
175
  '_give_id' =>
176
  [
177
+ 'level_id' => '3',
178
  ],
179
+ '_give_amount' => give_sanitize_amount_for_db( 100 ),
180
  '_give_default' => 'default',
181
  ],
182
  [
183
  '_give_id' =>
184
  [
185
+ 'level_id' => '5',
186
  ],
187
+ '_give_amount' => give_sanitize_amount_for_db( 250 ),
188
  ],
189
  ];
190
  }
src/Onboarding/Migrations/SetFormDonationLevelsToStrings.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Give\Onboarding\Migrations;
4
+
5
+ use Give\Framework\Migrations\Contracts\Migration;
6
+ use Give\Onboarding\FormRepository;
7
+
8
+ /**
9
+ * This resolves an issue where the donation level data for the form created during onboarding was serialized as
10
+ * integers instead of strings, causing issues throughout
11
+ *
12
+ * @since 2.13.3
13
+ */
14
+ class SetFormDonationLevelsToStrings extends Migration
15
+ {
16
+ /**
17
+ * @var FormRepository
18
+ */
19
+ private $formRepository;
20
+
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ public static function id()
25
+ {
26
+ return 'set-form-donation-levels-to-strings';
27
+ }
28
+
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ public static function timestamp()
33
+ {
34
+ return strtotime('2020-09-01 11:47:00');
35
+ }
36
+
37
+ public function __construct(FormRepository $formRepository)
38
+ {
39
+ $this->formRepository = $formRepository;
40
+ }
41
+
42
+ /**
43
+ * @inheritDoc
44
+ */
45
+ public function run()
46
+ {
47
+ $formId = $this->formRepository->getDefaultFormID();
48
+
49
+ if (empty($formId)) {
50
+ return;
51
+ }
52
+
53
+ $donationLevels = give_get_meta($formId, '_give_donation_levels', true);
54
+
55
+ $updatedLevels = [];
56
+ foreach ($donationLevels as $level) {
57
+ $updatedLevels[] = [
58
+ '_give_id' => [
59
+ 'level_id' => (string)$level['_give_id']['level_id'],
60
+ ],
61
+ '_give_amount' => give_sanitize_amount_for_db($level['_give_amount']),
62
+ ];
63
+ }
64
+
65
+ update_post_meta($formId, '_give_donation_levels', $updatedLevels);
66
+ }
67
+ }
src/PaymentGateways/Stripe/Admin/AccountManagerSettingField.php CHANGED
@@ -292,7 +292,7 @@ class AccountManagerSettingField {
292
  *
293
  * Developer can utilize this hook to add custom action to stripe account
294
  *
295
- * @unlreased
296
  */
297
  $stripeAccountActionsHtml = apply_filters( 'give_stripe_manage_account_actions_html', '', $stripeAccount, $this->stripeAccounts, $this->defaultStripeAccountSlug );
298
 
292
  *
293
  * Developer can utilize this hook to add custom action to stripe account
294
  *
295
+ * @since 2.13.3
296
  */
297
  $stripeAccountActionsHtml = apply_filters( 'give_stripe_manage_account_actions_html', '', $stripeAccount, $this->stripeAccounts, $this->defaultStripeAccountSlug );
298
 
src/PaymentGateways/Stripe/Controllers/GetStripeAccountDetailsController.php CHANGED
@@ -19,7 +19,7 @@ class GetStripeAccountDetailsController {
19
  private $accountDetailServiceProvider;
20
 
21
  /**
22
- * @unlreased
23
  * @param AccountDetail $accountDetailServiceProvider
24
  */
25
  public function __construct( AccountDetail $accountDetailServiceProvider ) {
@@ -27,7 +27,7 @@ class GetStripeAccountDetailsController {
27
  }
28
 
29
  /**
30
- * @unlreased
31
  */
32
  public function __invoke() {
33
  $this->validateRequest();
19
  private $accountDetailServiceProvider;
20
 
21
  /**
22
+ * @since 2.13.3
23
  * @param AccountDetail $accountDetailServiceProvider
24
  */
25
  public function __construct( AccountDetail $accountDetailServiceProvider ) {
27
  }
28
 
29
  /**
30
+ * @since 2.13.3
31
  */
32
  public function __invoke() {
33
  $this->validateRequest();
src/PaymentGateways/Stripe/Repositories/AccountDetail.php CHANGED
@@ -59,7 +59,7 @@ class AccountDetail {
59
  /**
60
  * Get account detail by Stripe account slug.
61
  *
62
- * @unlreased
63
  *
64
  * @param string $accountSlug
65
  *
59
  /**
60
  * Get account detail by Stripe account slug.
61
  *
62
+ * @since 2.13.3
63
  *
64
  * @param string $accountSlug
65
  *
src/ServiceProviders/Onboarding.php CHANGED
@@ -2,7 +2,9 @@
2
 
3
  namespace Give\ServiceProviders;
4
 
 
5
  use Give\Helpers\Hooks;
 
6
  use Give\Onboarding\SettingsRepository;
7
  use Give\Onboarding\FormRepository;
8
  use Give\Onboarding\DefaultFormFactory;
@@ -53,6 +55,7 @@ class Onboarding implements ServiceProvider {
53
  * @inheritDoc
54
  */
55
  public function boot() {
 
56
 
57
  // Onboarding Wizard and Setup page require WP v5.0.x or greater
58
  if ( version_compare( get_bloginfo( 'version' ), '5.0', '<=' ) ) {
@@ -85,4 +88,16 @@ class Onboarding implements ServiceProvider {
85
  Hooks::addAction( 'admin_post_dismiss_setup_page', SetupPage::class, 'dismissSetupPage' );
86
  }
87
  }
 
 
 
 
 
 
 
 
 
 
 
 
88
  }
2
 
3
  namespace Give\ServiceProviders;
4
 
5
+ use Give\Framework\Migrations\MigrationsRegister;
6
  use Give\Helpers\Hooks;
7
+ use Give\Onboarding\Migrations\SetFormDonationLevelsToStrings;
8
  use Give\Onboarding\SettingsRepository;
9
  use Give\Onboarding\FormRepository;
10
  use Give\Onboarding\DefaultFormFactory;
55
  * @inheritDoc
56
  */
57
  public function boot() {
58
+ $this->registerMigrations();
59
 
60
  // Onboarding Wizard and Setup page require WP v5.0.x or greater
61
  if ( version_compare( get_bloginfo( 'version' ), '5.0', '<=' ) ) {
88
  Hooks::addAction( 'admin_post_dismiss_setup_page', SetupPage::class, 'dismissSetupPage' );
89
  }
90
  }
91
+
92
+ /**
93
+ * Registers migrations
94
+ *
95
+ * @since 2.13.3
96
+ */
97
+ private function registerMigrations()
98
+ {
99
+ give(MigrationsRegister::class)->addMigrations([
100
+ SetFormDonationLevelsToStrings::class
101
+ ]);
102
+ }
103
  }
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit4aefccab0275846a55dba808d8c88680::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit6f7195116828f605b1ff074cbf51ed24::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit4aefccab0275846a55dba808d8c88680
6
  {
7
  private static $loader;
8
 
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit4aefccab0275846a55dba808d8c88680
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit4aefccab0275846a55dba808d8c88680', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit4aefccab0275846a55dba808d8c88680', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit4aefccab0275846a55dba808d8c88680::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6f7195116828f605b1ff074cbf51ed24
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit6f7195116828f605b1ff074cbf51ed24', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit6f7195116828f605b1ff074cbf51ed24', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
  require __DIR__ . '/autoload_static.php';
34
 
35
+ call_user_func(\Composer\Autoload\ComposerStaticInit6f7195116828f605b1ff074cbf51ed24::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit4aefccab0275846a55dba808d8c88680
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -96,9 +96,9 @@ class ComposerStaticInit4aefccab0275846a55dba808d8c88680
96
  public static function getInitializer(ClassLoader $loader)
97
  {
98
  return \Closure::bind(function () use ($loader) {
99
- $loader->prefixLengthsPsr4 = ComposerStaticInit4aefccab0275846a55dba808d8c88680::$prefixLengthsPsr4;
100
- $loader->prefixDirsPsr4 = ComposerStaticInit4aefccab0275846a55dba808d8c88680::$prefixDirsPsr4;
101
- $loader->classMap = ComposerStaticInit4aefccab0275846a55dba808d8c88680::$classMap;
102
 
103
  }, null, ClassLoader::class);
104
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit6f7195116828f605b1ff074cbf51ed24
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
96
  public static function getInitializer(ClassLoader $loader)
97
  {
98
  return \Closure::bind(function () use ($loader) {
99
+ $loader->prefixLengthsPsr4 = ComposerStaticInit6f7195116828f605b1ff074cbf51ed24::$prefixLengthsPsr4;
100
+ $loader->prefixDirsPsr4 = ComposerStaticInit6f7195116828f605b1ff074cbf51ed24::$prefixDirsPsr4;
101
+ $loader->classMap = ComposerStaticInit6f7195116828f605b1ff074cbf51ed24::$classMap;
102
 
103
  }, null, ClassLoader::class);
104
  }
vendor/composer/installed.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php return array(
2
  'root' => array(
3
- 'pretty_version' => '2.13.2',
4
- 'version' => '2.13.2.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'b3ffa3a4172000f2aa1b6b82bcb90bb84d5d7bc0',
9
  'name' => 'impress-org/give',
10
  'dev' => false,
11
  ),
@@ -41,12 +41,12 @@
41
  ),
42
  ),
43
  'impress-org/give' => array(
44
- 'pretty_version' => '2.13.2',
45
- 'version' => '2.13.2.0',
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
- 'reference' => 'b3ffa3a4172000f2aa1b6b82bcb90bb84d5d7bc0',
50
  'dev_requirement' => false,
51
  ),
52
  'kjohnson/format-object-list' => array(
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => '2.13.3',
4
+ 'version' => '2.13.3.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'f4fdb7acd83b5eb8b8b1fa4e56e22f429f7b2221',
9
  'name' => 'impress-org/give',
10
  'dev' => false,
11
  ),
41
  ),
42
  ),
43
  'impress-org/give' => array(
44
+ 'pretty_version' => '2.13.3',
45
+ 'version' => '2.13.3.0',
46
  'type' => 'wordpress-plugin',
47
  'install_path' => __DIR__ . '/../../',
48
  'aliases' => array(),
49
+ 'reference' => 'f4fdb7acd83b5eb8b8b1fa4e56e22f429f7b2221',
50
  'dev_requirement' => false,
51
  ),
52
  'kjohnson/format-object-list' => array(