Seers-GDPR-CCPA-Cookie-Cons.../js/admin.js

70 lines
254 KiB
JavaScript
Raw Normal View History

2022-04-19 07:18:09 +00:00
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=495)}({10:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},114:function(e,t,n){e.exports=n(313)},115:function(e,t,n){var i,o,r;
/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */o=[n(82)],void 0===(r="function"==typeof(i=function(e){var t,n,i,o,r,a,s=function(){},l=!!window.jQuery,c=e(window),d=function(e,n){t.ev.on("mfp"+e+".mfp",n)},u=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},f=function(n,i){t.ev.triggerHandler("mfp"+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},h=function(n){return n===a&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),a=n),t.currTemplate.closeBtn},p=function(){e.magnificPopup.instance||((t=new s).init(),e.magnificPopup.instance=t)};s.prototype={constructor:s,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;if(!1===n.isObj){t.items=n.items.toArray(),t.index=0;var a,s=n.items;for(o=0;o<s.length;o++)if((a=s[o]).parsed&&(a=a.el[0]),a===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(!t.isOpen){t.types=[],r="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=u("bg").on("click.mfp",(function(){t.close()})),t.wrap=u("wrap").attr("tabindex",-1).on("click.mfp",(function(e){t._checkIfClose(e.target)&&t.close()})),t.container=u("container",t.wrap)),t.contentContainer=u("content"),t.st.preloader&&(t.preloader=u("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var p=l[o];p=p.charAt(0).toUpperCase()+p.slice(1),t["init"+p].call(t)}f("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(d("MarkupParse",(function(e,t,n,i){n.close_replaceWith=h(i.type)})),r+=" mfp-close-btn-in"):t.wrap.append(h())),t.st.alignTop&&(r+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:c.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup.mfp",(function(e){27===e.keyCode&&t.close()})),c.on("resize.mfp",(function(){t.updateSize()})),t.st.closeOnContentClick||(r+=" mfp-auto-cursor"),r&&t.wrap.addClass(r);var m=t.wH=c.height(),g={};if(t.fixedContentPos&&t._hasScrollBar(m)){var v=t._getScrollbarSize();v&&(g.marginRight=v)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):g.overflow="hidden");var _=t.st.mainClass;return t.isIE7&&(_+=" mfp-ie7"),_&&t._addClassToMFP(_),t.updateItemHTML(),f("BuildControls"),e("html").css(g),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout((function(){t.content?(t._addClassToMFP("mfp-ready"),t._setFocus()):t.bgOverlay.addClass("mfp-ready"),i.on("focusin.mfp",t._onFocusIn)}),16),t.isOpen=!0,t.updateSize(m),f("Open"),n}t.updateItemHTML()},close:function(){t.isOpen&&(f("BeforeClose"),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP("mfp-removing"),setTimeout((function(){t._close()}),t.st.removalDelay)):t._close())},_close:function(){f("Close");var n="mfp-removing mfp-ready ";if(t.bgOverlay
/*!
* accounting.js v0.4.1
* Copyright 2014 Open Exchange Rates
*
* Freely distributable under the MIT license.
* Portions of accounting.js are inspired or borrowed from underscore.js
*
* Full details and documentation:
* http://openexchangerates.github.io/accounting.js/
*/
!function(n,i){var o={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},r=Array.prototype.map,a=Array.isArray,s=Object.prototype.toString;function l(e){return!!(""===e||e&&e.charCodeAt&&e.substr)}function c(e){return a?a(e):"[object Array]"===s.call(e)}function d(e){return e&&"[object Object]"===s.call(e)}function u(e,t){var n;for(n in e=e||{},t=t||{})t.hasOwnProperty(n)&&null==e[n]&&(e[n]=t[n]);return e}function f(e,t,n){var i,o,a=[];if(!e)return a;if(r&&e.map===r)return e.map(t,n);for(i=0,o=e.length;i<o;i++)a[i]=t.call(n,e[i],i,e);return a}function h(e,t){return e=Math.round(Math.abs(e)),isNaN(e)?t:e}function p(e){var t=o.settings.currency.format;return"function"==typeof e&&(e=e()),l(e)&&e.match("%v")?{pos:e,neg:e.replace("-","").replace("%v","-%v"),zero:e}:e&&e.pos&&e.pos.match("%v")?e:l(t)?o.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t}var m=o.unformat=o.parse=function(e,t){if(c(e))return f(e,(function(e){return m(e,t)}));if("number"==typeof(e=e||0))return e;t=t||o.settings.number.decimal;var n=new RegExp("[^0-9-"+t+"]",["g"]),i=parseFloat((""+e).replace(/\((.*)\)/,"-$1").replace(n,"").replace(t,"."));return isNaN(i)?0:i},g=o.toFixed=function(e,t){t=h(t,o.settings.number.precision);var n=Math.pow(10,t);return(Math.round(o.unformat(e)*n)/n).toFixed(t)},v=o.formatNumber=o.format=function(e,t,n,i){if(c(e))return f(e,(function(e){return v(e,t,n,i)}));e=m(e);var r=u(d(t)?t:{precision:t,thousand:n,decimal:i},o.settings.number),a=h(r.precision),s=e<0?"-":"",l=parseInt(g(Math.abs(e||0),a),10)+"",p=l.length>3?l.length%3:0;return s+(p?l.substr(0,p)+r.thousand:"")+l.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+r.thousand)+(a?r.decimal+g(Math.abs(e),a).split(".")[1]:"")},_=o.formatMoney=function(e,t,n,i,r,a){if(c(e))return f(e,(function(e){return _(e,t,n,i,r,a)}));e=m(e);var s=u(d(t)?t:{symbol:t,precision:n,thousand:i,decimal:r,format:a},o.settings.currency),l=p(s.format);return(e>0?l.pos:e<0?l.neg:l.zero).replace("%s",s.symbol).replace("%v",v(Math.abs(e),h(s.precision),s.thousand,s.decimal))};o.formatColumn=function(e,t,n,i,r,a){if(!e)return[];var s=u(d(t)?t:{symbol:t,precision:n,thousand:i,decimal:r,format:a},o.settings.currency),g=p(s.format),_=g.pos.indexOf("%s")<g.pos.indexOf("%v"),b=0,y=f(e,(function(e,t){if(c(e))return o.formatColumn(e,s);var n=((e=m(e))>0?g.pos:e<0?g.neg:g.zero).replace("%s",s.symbol).replace("%v",v(Math.abs(e),h(s.precision),s.thousand,s.decimal));return n.length>b&&(b=n.length),n}));return f(y,(function(e,t){return l(e)&&e.length<b?_?e.replace(s.symbol,s.symbol+new Array(b-e.length+1).join(" ")):new Array(b-e.length+1).join(" ")+e:e}))},e.exports&&(t=e.exports=o),t.accounting=o}()},313:function(e,t,n){var i=n(314);t.iframeResize=i,t.iframeResizer=i,t.iframeResizerContentWindow=n(315)},314:function(e,t,n){var i,o,r;!function(n){if("undefined"!=typeof window){var a,s=0,l=!1,c=!1,d="message".length,u="[iFrameSizer]",f=u.length,h=null,p=window.requestAnimationFrame,m={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},g={},v=null,_={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){j("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},b={};window.jQuery&&((a=window.jQuery).fn?a.fn.iFrameResize||(a.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){D(n,e)})).end()}):T("","Unable to bind to jQuery, it is not fully loaded.")),o=[],void 0===(r="function"==typeof(i=B)?i.apply(t,o):i)||(e.exports=r),window.iFrameResize=window.iFrameResize||B()}function y(){return window.MutationObserver||window.W
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var i;i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i<o;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],o=[];if(i&&t)for(var r=0,a=i.length;r<a;r++)i[r].fn!==t&&i[r].fn._!==t&&o.push(i[r]);return o.length?n[e]=o:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),o=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function o(e,t,n,i,o){var a=r.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function r(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,i,r){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,i,r)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&
/*!
* Give Admin Forms JS
*
* @description: The Give Admin Forms scripts. Only enqueued on the give_forms CPT; used to validate fields, show/hide, and other functions
* @package: Give
* @subpackage: Assets/JS
* @copyright: Copyright (c) 2016, GiveWP
* @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
var n,i;n=jQuery,i=function(){""===n(".give-level-id").text()&&n(".cmb-repeatable-grouping").each((function(e,t){var i=n(t).data("iterator")+1;n(t).find(".give-level-id").text(i),n(t).find(".give-level-id-input").val(i)})),n("body").on("cmb2_add_row",(function(e,t){!function(e){var t,i,o,r=(t=0,i=0,o=0,n("#_give_donation_levels_repeat > .cmb-repeatable-grouping").each((function(e,r){(o=n(this).find("input.give-level-id-input").val())>i&&(i=o),t++})),void 0!==i&&i>=t?parseInt(i)+1:t);n(e).find("input.give-level-id-input").val(r),n(e).find(".give-level-id").text(r)}(t)})),n("body").on("cmb2_shift_rows_complete",(function(e,t){n(".cmb-repeatable-grouping").each((function(e,t){var i=n(t).find("input.give-level-id-input").val();n(t).find(".give-level-id").text(i)}))}))},n((function(){n("body").on("change",".give-give_default_radio_inline",(function(){n(".give-give_default_radio_inline").prop("checked",!1),n(this).prop("checked",!0)})),function(){n("._give_price_option_field input:radio").on("change",(function(){"set"===n("._give_price_option_field input:radio:checked").val()?(n("._give_set_price_field").show(),n("#_give_donation_levels_field").hide(),n("._give_display_style_field").hide()):(n("._give_set_price_field").hide(),n("#_give_donation_levels_field").show(),n("._give_display_style_field").show())})).change(),n("._give_display_content_field input:radio").on("change",(function(){"enabled"===n("._give_display_content_field input:radio:checked").val()?(n("._give_content_placement_field").show(),n("._give_form_content_field").show()):(n("._give_content_placement_field").hide(),n("._give_form_content_field").hide())})).change(),n("._give_terms_option_field input:radio").on("change",(function(){"enabled"===n("._give_terms_option_field input:radio:checked").val()?(n("._give_agree_label_field").show(),n("._give_agree_text_field").show()):(n("._give_agree_label_field").hide(),n("._give_agree_text_field").hide())})).change(),n("._give_payment_display_field input:radio").on("change",(function(){"onpage"===n("._give_payment_display_field input:radio:checked").val()?n("._give_reveal_label_field").hide():n("._give_reveal_label_field").show()})).change(),n("._give_custom_amount_field input:radio").on("change",(function(){"disabled"===n("._give_custom_amount_field input:radio:checked").val()?(n("._give_custom_amount_range_field ").hide(),n("._give_custom_amount_text_field").hide()):(n("._give_custom_amount_range_field ").show(),n("._give_custom_amount_text_field").show())})).change();var e=n("._give_goal_option_field"),t=n("._give_goal_format_field input:radio");n("._give_close_form_when_goal_achieved_field input:radio").on("change",(function(){"disabled"===n("._give_close_form_when_goal_achieved_field input:radio:checked").val()?n("._give_form_goal_achieved_message_field").hide():n("._give_form_goal_achieved_message_field").show()})).change(),e.on("change",(function(){"disabled"===n("._give_goal_option_field input:radio:checked").val()?(n("._give_set_goal_field").hide(),n("._give_goal_format_field").hide(),n("._give_goal_color_field").hide(),n("._give_close_form_when_goal_achieved_field").hide(),n("._give_form_goal_achieved_message_field").hide(),n("._give_number_of_donation_goal_field").hide(),n("._give_number_of_donor_goal_field").hide()):(n("._give_set_goal_field").show(),n("._give_goal_format_field").show(),n("._give_goal_color_field").show(),n("._give_close_form_when_goal_achieved_field").show(),"enabled"===n("._give_close_form_when_goal_achieved_field input:radio:checked").val()&&n("._give_form_goal_achieved_message_field").show(),t.change())})).change(),t.on("change",(function(){var e=n("._give_goal_format_field input:radio:checked").val(),t=n("._give_goal_option_field input:radio:checked").val();"donation"===e?(n("._give_set_goal_field, ._give_number_of_donor_goal_field,._give_number_of_donation_goal_field").hide(),"disabled"!==t&&n("._give_number_of_donation_goal_field").show()):"donors"===e?(n("._give_set_goal_field, ._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field").hide(),"disabled"!==t&&n("._give_
/*!
* Give Admin Forms JS
*
* @description: The Give Admin Settings scripts. Only enqueued on the give-settings page; used for tabs and other show/hide functionality
* @package: Give
* @since: 1.5
* @subpackage: Assets/JS
* @copyright: Copyright (c) 2016, GiveWP
* @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
jQuery(document).ready((function(e){var t=jQuery("ul.give-payment-gatways-list");t.length&&t.sortable();e("body").on("change","#give-mainform #currency",(function(){var t=e("#give-mainform #currency option:selected").val(),n=JSON.parse(e(this).attr("data-formatting-setting")),i=afterText={},o=n[t],r=e("#thousands_separator","#give-mainform"),a=e("#decimal_separator","#give-mainform"),s=e("#number_decimals","#give-mainform");i=e("#give-mainform #currency_position").data("before-template").replace("{currency_pos}",o.symbol),e('#give-mainform #currency_position option[value="before"]').text(i),afterText=e("#give-mainform #currency_position").data("after-template").replace("{currency_pos}",o.symbol),e('#give-mainform #currency_position option[value="after"]').text(afterText),r.val(o.setting.thousands_separator).trigger("blur"),a.val(o.setting.decimal_separator).trigger("blur"),s.val(o.setting.number_decimals).trigger("blur")})),"disabled"!==e('input[name="name_title_prefix"]:checked').val()&&e(".give-title-prefixes-settings-wrap").show(),e('input[name="name_title_prefix"]').on("change",(function(){"disabled"!==e(this).val()?e(".give-title-prefixes-settings-wrap").show():e(".give-title-prefixes-settings-wrap").hide()})),e("a.give-repeat-setting-field").on("click",(function(t){t.preventDefault();var n=e(this).parents("td"),i=e("p:first-child",n).clone(),o=e("p",n).not(".give-field-description").length,r=e(this).data("id")+"_"+ ++o,a=e(this).prev();return e("input",a).val()&&(e(this).before(i),a=e(this).prev(),e("input",a).attr("id",r),e("input",a).val("")),!1})),e(".give-settings-page").on("click","span.give-remove-setting-field",(function(t){e(this).parents("p").remove()})),e(".give-email-notification-status","table.giveemailnotifications").on("click",(function(){var t=e(this),n=e("i",t),i=e(this).next(),o=e(this).hasClass("give-email-notification-enabled")?"disabled":"enabled",r=e(this).data("id");if(!parseInt(t.data("edit")))return e("div.give-email-notification-status-notice").remove(),e("hr.wp-header-end").after('<div class="updated error give-email-notification-status-notice"><p>'+e(this).closest(".give-email-notification-status").data("notice")+"</p></div>"),e("html, body").animate({scrollTop:e("div.give-email-notification-status-notice").position().top},"slow"),!1;e.ajax({url:ajaxurl,method:"POST",data:{action:"give_set_notification_status",status:o,notification_id:r},beforeSend:function(){t.hide(),i.addClass("is-active")},success:function(e){e.success&&(t.removeClass("give-email-notification-"+t.data("status")),t.addClass("give-email-notification-"+o),t.data("status",o),"enabled"===o?(n.removeClass("dashicons-no-alt"),n.addClass("dashicons-yes")):(n.removeClass("dashicons-yes"),n.addClass("dashicons-no-alt")),i.removeClass("is-active"),t.show())}})})),e("#give-clear-cache").on("click",(function(){e.ajax({url:ajaxurl,type:"GET",data:{action:"give_cache_flush"}}).done((function(e){e.success?new Give.modal.GiveSuccessAlert({modalContent:{title:Give.fn.getGlobalVar("flush_success"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render():new Give.modal.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("flush_error"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}))}));var n=Give.fn.getGlobalVar("decimal_separator"),i=Give.fn.getGlobalVar("thousands_separator"),o=/\(([^)]+)\)/,r={position:Give.fn.getGlobalVar("currency_pos"),symbol:Give.fn.getGlobalVar("currency_sign"),precision:Give.fn.getGlobalVar("number_decimals"),decimal:Give.fn.getGlobalVar("decimal_separator"),thousand:Give.fn.getGlobalVar("thousands_separator")};e("#number_decimals, #decimal_separator, #thousands_separator, #currency_position, #currency").on("input blur change",(function(t){var a=e("#currency_preview"),s=e("#decimal_separator"),l=e("#thousands_separator"),c=t.target.name,d=t.target.value;if("number_decimals"!==c||"input"!==t.type&&"blur"!==t.type||(d&&!isNaN(d)||"blur"!==t.type||(t.target.value=Give.fn.getGlobalVar("number_decimals")),r.precision=isNaN(parseInt(d))?Give.fn.getGlobalVar("number_dec
/*!
* Give Admin Export JS
*
* @description: The Give Admin Settings scripts. Only enqueued on the give-settings and give-tools page; used for exporting CSV
* @package: Give
* @since: 2.1
* @subpackage: Assets/JS
* @copyright: Copyright (c) 2016, GiveWP
* @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
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)}))}))},506: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][primary_color]_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(G
/**
* Give Admin JS
*
* @package: Give
* @subpackage: Assets/JS
* @copyright: Copyright (c) 2016, GiveWP
* @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/var I=!1,G=n(317);function E(){var e=jQuery(".give-settings-page"),t=jQuery(".give-nav-tab-wrapper"),n=e.width(),i=jQuery(".give-sub-nav-tab-wrapper"),o=jQuery("nav",i),r=jQuery(".give-nav-tab-wrapper > a:not(give-not-tab)"),a=[],s=[],l=0;if(600<jQuery(window).outerWidth()&&(l=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),r.removeClass("give-hidden"),new Promise((function(e,t){jQuery.each(r,(function(e,t){t=jQuery(t),(l+=parseInt(t.outerWidth()))<n?a.push(t):s.push(t)})),e(!0)})).then((function(e){if(s.length&&-1!==window.location.search.indexOf("&tab=")){var n={},r=function(){for(var e,t=[],n=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<n.length;i++)e=n[i].split("="),t[e[0]]=e[1];return t}
/**
* Give Admin JS
*
* @package: Give
* @subpackage: Assets/JS
* @copyright: Copyright (c) 2016, GiveWP
* @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/();s=s.filter((function(e){var t=-1!==parseInt(e.attr("href").indexOf("&tab="+r.tab));return t&&(n=e),!t})),n.length&&(s.unshift(a.pop()),a.push(n))}new Promise((function(e,t){a.length&&jQuery.each(a,(function(e,t){(t=jQuery(t)).hasClass("give-hidden")&&t.removeClass("give-hidden")})),e(!0)})).then((function(e){s.length?(o.html(""),jQuery.each(s,(function(e,t){(t=jQuery(t)).hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(o)})),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(i),i.show()):i.hide()}))}))}!function(e){var t=function(t,n){var i=(n=jQuery.extend({wrapper:!0,show:!1},n)).wrapper?e(".give-spinner-wrapper",t):{},o=e(".give-spinner",t);if(n.show)return i.length&&i.addClass("is-active"),void o.addClass("is-active");i.length&&i.removeClass("is-active"),o.removeClass("is-active")},n=function(e){var t=document.location.href,n=t.split("?");e=void 0===e?"":e.replace("give-","");if(n.length>=2){for(var i=n.shift(),o=n.join("?"),r=encodeURIComponent("give-message")+"=",a=o.split(/[&;]/g),s=a.length;s-- >0;)(-1!==a[s].lastIndexOf(r,0)||""!==e&&-1!==a[s].lastIndexOf("give-messages",0)&&a[s].match(e+"$"))&&a.splice(s,1);t=i+"?"+a.join("&"),window.history.pushState("",document.title,t)}return t};function i(e,t){return e=accounting.unformat(e,Give.fn.getGlobalVar("decimal_separator")).toString(),e=!1!==(t="undefined"!==t&&t)?parseFloat(e).toFixed(t):parseFloat(e).toFixed(Give.fn.getGlobalVar("currency_decimals"))}var o={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){new a.GiveConfirmModal({triggerSelector:".delete-single-donation",modalWrapper:"give-modal--warning",modalContent:{title:Give.fn.getGlobalVar("confirm_delete_donation"),desc:Give.fn.getGlobalVar("delete_payment")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})},resendSingleDonationReceipt:function(){new a.GiveConfirmModal({triggerSelector:".resend-single-donation-receipt",modalContent:{title:Give.fn.getGlobalVar("confirm_resend"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})}},s={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change((function(){var t=e(this),n={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"};return e.post(ajaxurl,n,(function(n){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");var i=e("#give-order-address-state-wrap");i.find("*").not(".order-data-address-line").remove(),void 0!==r()(n.states_found)&&!0===n.states_found?(i.append(n.data),i.find("select").chosen()):(i.append('<input type="text" name="give-payment-address[0][state]" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==r()(n.show_field)&&!1===n.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))})),!1}))},add_note:function(){e("#give-add-payment-note").on("click",(function(t){function n(){e.ajax({type:"POST",data:a,url:ajaxurl,beforeSend:function(){o.prop("disabled",!0),i.prop("disabled",!0)},success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).always((function(){o.prop("disabled",!1),i.prop("disabled",!1)}))}t.preventDefault();var i=e(this),o=e("#give-payment-note"),r=e("#donation_note_type"),a={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:o.val(),type:r.val()};if(a.note)"don