/*! WPMU Dev code library - v3.0.4
* http://premium.wpmudev.org/
* Copyright (c) 2017; * Licensed GPLv2+ */
!function(a){function b(){null===f&&(e=jQuery(document),f=jQuery("html"),g=jQuery("body"),c(),d(),g.hasClass("no-auto-init")||window.setTimeout(function(){a.upgrade_multiselect(),a.upgrade_tooltips()},20),a.binary=new a.WpmUiBinary)}function c(){var a=function(a){var b=jQuery(this).closest(".wpmui-box");return a.preventDefault(),!b.hasClass("static")&&(b.toggleClass("closed"),!1)};g.on("click",".wpmui-box > h3",a),g.on("click",".wpmui-box > h3 > .toggle",a)}function d(){var a=function(a){var b=jQuery(this),c=b.closest(".wpmui-tabs"),d=c.next(".wpmui-tab-contents"),e=c.find(".active.tab"),f=b.attr("href"),g=e.attr("href"),h=d.find(f),i=d.find(g);return b.hasClass("active")||(e.removeClass("active"),i.removeClass("active")),b.addClass("active"),h.addClass("active"),a.preventDefault(),!1};g.on("click",".wpmui-tabs .tab",a)}var e=null,f=null,g=null,h=null;a.popup=function(c,d){return b(),new a.WpmUiWindow(c,d)},a.progressbar=function(){return b(),new a.WpmUiProgress},a.ajax=function(c,d){return b(),new a.WpmUiAjaxData(c,d)},a.upgrade_multiselect=function(a){b(),a=jQuery(a||g);var c=a.find("select[multiple]").not("select[data-select-ajax]"),d=a.find("select[data-select-ajax]"),e=function(a){var b=a.attr("id"),c="#s2id_"+b;a.parent().find(c).remove()},f=function(){var b=jQuery(this),c={closeOnSelect:!1,width:"100%"};"object"!=typeof b.data("select2")&&"object"!=typeof b.data("chosen")&&(b.filter("[class*=acf-]").length||"1"!==b.data("wpmui-select")&&(b.closest(".no-auto-init",a[0]).length||(b.data("wpmui-select","1"),e(b),"function"==typeof b.wpmuiSelect&&window.setTimeout(function(){b.wpmuiSelect(c)},1))))},h=function(){var b=function(a){return a.text},c=jQuery(this),d={closeOnSelect:!1,width:"100%",multiple:!0,minimumInputLength:1,ajax:{url:c.attr("data-select-ajax"),dataType:"json",quietMillis:100,cache:!0,data:function(a){return{q:a.term,page:a.page}},processResults:function(a,b){return{results:a.items}}},templateResult:b,templateSelection:b};"object"!=typeof c.data("select2")&&"object"!=typeof c.data("chosen")&&(c.filter("[class*=acf-]").length||"1"!==c.data("wpmui-select")&&(c.closest(".no-auto-init",a[0]).length||(c.data("wpmui-select","1"),e(c),"function"==typeof c.wpmuiSelect&&window.setTimeout(function(){c.wpmuiSelect(d)},1))))};"function"==typeof jQuery.fn.each2?(c.each2(f),d.each2(h)):(c.each(f),d.each(h))},a.message=function(a){var c,d,e,f;b();var g=function(a){return a.preventDefault(),d.remove(),!1},h=function(a){jQuery(this).closest(".wpmui-msg").find(".debug").toggle()};return void 0!==a&&(("string"==typeof a||a instanceof Array)&&(a={message:a}),a.message instanceof Array&&(a.message=a.message.join("
")),!!a.message&&(a.type=void 0===a.type?"ok":a.type.toString().toLowerCase(),a.close=void 0===a.close||a.close,a.parent=void 0===a.parent?".wrap":a.parent,a.insert_after=void 0===a.insert_after?"h2":a.insert_after,a.id=void 0===a.id?"":a.id.toString().toLowerCase(),a.class=void 0===a.class?"":a.class.toString().toLowerCase(),a.details=void 0!==a.details&&a.details,"error"!==a.type&&"red"!==a.type||(a.type="err"),"success"!==a.type&&"green"!==a.type||(a.type="ok"),c=jQuery(a.parent).first(),!!c.length&&(a.id&&jQuery('.wpmui-msg[data-id="'+a.id+'"]').length?(d=jQuery('.wpmui-msg[data-id="'+a.id+'"]').first(),f=!1):(d=jQuery("
"),a.id&&d.attr("data-id",a.id),f=!0),d.find("p").html(a.message),"err"===a.type&&a.details&&window.JSON&&(jQuery('').appendTo(d).text(JSON.stringify(a.details)),jQuery('').prependTo(d.find("p:first")).click(h).after(" ")),d.removeClass().addClass("updated wpmui-msg "+a.class),"err"===a.type&&d.addClass("error"),f&&(a.close&&(e=jQuery(''),e.prependTo(d),e.click(g)),a.insert_after&&c.find(a.insert_after).length?(c=c.find(a.insert_after).first(),c.after(d)):c.prepend(d)),!0)))},a.confirm=function(b){function c(){var c=jQuery(this),d=parseInt(c.data("key"));b.modal&&("fixed"===b.layout?a._close_modal():e.remove()),f.remove(),"function"==typeof b.callback&&b.callback(d)}var d,e,f,h,i,j,k;if(!b instanceof Object)return!1;if(void 0===b.message)return!1;for(b.modal=void 0===b.modal||b.modal,b.layout=void 0===b.layout?"fixed":b.layout,b.parent=void 0===b.parent?g:b.parent,b.buttons=void 0===b.buttons?["OK"]:b.buttons,b.callback=void 0!==b.callback&&b.callback,d=jQuery(b.parent),b.modal&&("fixed"===b.layout?a._make_modal("wpmui-confirm-modal"):e=jQuery('').css({position:b.layout}).appendTo(d)),f=jQuery('').css({position:b.layout}).appendTo(d),h=jQuery('').html(b.message),i=jQuery(''),k=!0,j=0;j").html(b.buttons[j]).addClass(k?"button-primary":"button-secondary").data("key",j).click(c).prependTo(i),k=!1;return h.appendTo(f),i.appendTo(f).find(".button-primary").focus(),!0},a.tooltip=function(a,c){var d,e;b();var f=function(b){var d=b.outerWidth(),e=b.outerHeight(),f=a.outerWidth(),g=a.outerHeight(),h={};switch(h.left=(f-d)/2,h.top=(g-e)/2,h[c.pos]="auto",c.pos){case"top":h.bottom=g+5;break;case"bottom":h.top=g+5;break;case"left":h.right=f+5;break;case"right":h.left=f+5}b.css(h)},g=function(a){var b=jQuery(this).closest(".wpmui-tip-box").find(".wpmui-tip");b.addClass("wpmui-visible"),b.show(),f(b),window.setTimeout(function(){f(b)},35)},h=function(a){var b=jQuery(this).closest(".wpmui-tip-box").find(".wpmui-tip");b.removeClass("wpmui-visible"),b.hide()},i=function(a){d.hasClass("wpmui-visible")?h.call(this,a):g.call(this,a)};return"string"==typeof c&&(c={content:c}),void 0!==c.content&&(a=jQuery(a),!!a.length&&(c.trigger=void 0===c.trigger?"hover":c.trigger.toString().toLowerCase(),c.pos=void 0===c.pos?"top":c.pos.toString().toLowerCase(),c.class=void 0===c.class?"":c.class.toString().toLowerCase(),e=a.parent(),e.hasClass("wpmui-tip-box")||(e=a.wrap('').parent().addClass(c.class+"-box")),d=e.find("> .wpmui-tip"),a.off(),d.length||(d=jQuery(''),d.addClass(c.class).addClass(c.pos).appendTo(a.parent()).hide(),isNaN(c.width)||d.width(c.width)),"hover"===c.trigger?a.on("mouseenter",g).on("mouseleave",h):"click"===c.trigger&&a.on("click",i),d.html(c.content),!0))},a.upgrade_tooltips=function(){jQuery("[data-wpmui-tooltip]").each(function(){var b=jQuery(this),c={content:b.attr("data-wpmui-tooltip"),pos:b.attr("data-pos"),trigger:b.attr("data-trigger"),class:b.attr("data-class"),width:b.attr("data-width")};a.tooltip(b,c)})},a.obj=function(a){var b={};if(a instanceof Object)b=a;else if(a instanceof Array)if("function"==typeof a.reduce)b=a.reduce(function(a,b,c){return a[c]=b,a},{});else for(var c=a.length-1;c>0;c-=1)void 0!==a[c]&&(b[c]=a[c]);else"string"==typeof a?b.scalar=a:"number"==typeof a?b.scalar=a:"boolean"==typeof a&&(b.scalar=a);return b},a._modal_overlay=function(){return null===h&&(h=jQuery("").addClass("wpmui-overlay").appendTo(g)),h},a._make_modal=function(b,c){var d=a._modal_overlay();return d.removeClass().addClass("wpmui-overlay"),b&&d.addClass(b),g.addClass("wpmui-has-overlay"),f.addClass("wpmui-no-scroll"),c&&f.addClass(c),d},a._close_modal=function(a){g.removeClass("wpmui-has-overlay"),f.removeClass("wpmui-no-scroll"),a&&f.removeClass(a)},jQuery(function(){b()})}(window.wpmUi=window.wpmUi||{}),function(a){var b=1,c={};a.popups=function(){return c},a.WpmUiWindow=function(d,e){function f(){N&&!N.data("hooked")&&(N.data("hooked",!0),N.on("click",".popup-close",k),N.on("click",".popup-title",l),N.on("click",".close",s.hide),N.on("click",".destroy",s.destroy),N.on("click","thead .check-column :checkbox",q),N.on("click","tfoot .check-column :checkbox",q),N.on("click","tbody .check-column :checkbox",r),jQuery(window).on("resize",n),void 0!==jQuery().draggable&&N.draggable({containment:jQuery("body"),scroll:!1,handle:".popup-title"}))}function g(){N&&N.data("hooked")&&(N.data("hooked",!1),N.off("click",".popup-close",k),N.off("click",".popup-title",l),N.off("click",".close",s.hide),N.off("click",".check-column :checkbox",q),jQuery(window).off("resize",n))}function h(){if(!M)return!1;if(!N)return!1;var b=a._modal_overlay(),e=N.find(".popup-title"),f=N.find(".popup-content"),g=e.find(".the-title");if(d&&!g.length&&(g=e),g.html(z),v?N.removeClass("no-close"):N.addClass("no-close"),E){M.find(".buttons").remove(),N.addClass("no-buttons"),A instanceof jQuery?f.empty().append(A):f.html(A);var h=f.find(".buttons");h.length&&(h.appendTo(N),N.removeClass("no-buttons")),N.addClass(B),E=!1}if(b instanceof jQuery&&b.off("click",m),t)i(),u&&a._make_modal("","has-popup"),w&&b.on("click",m),F&&(F=!1,n()),window.setTimeout(function(){"down"===H?f.css({bottom:e.height()+1}):f.css({top:e.height()+1}),y||window.setTimeout(n,5)},5);else{j();var k,l=!0;for(k in c)if(c[k]!==s&&c[k].is_visible()&&c[k].is_modal()){l=!1;break}l&&a._close_modal("has-popup no-scroll can-scroll")}var o=N.find(".popup-close .dashicons");o.length&&("none"===H?o.removeClass().addClass("dashicons dashicons-no-alt"):"collapsed"===P?o.removeClass().addClass("dashicons").addClass(Q):"expanded"===P&&o.removeClass().addClass("dashicons").addClass(R)),N[0].className=N[0].className.replace(/\sslidein-.+?\b/g,""),"none"===H?(N.removeClass("slidein"),N.removeClass("wdev-slidein"),N.addClass("wdev-window")):(N.addClass("slidein"),N.addClass("slidein-"+H),N.addClass("slidein-"+P),N.addClass("wdev-slidein"),N.removeClass("wdev-window")),G.top&&N.addClass("snap-top"),G.left&&N.addClass("snap-left"),G.right&&N.addClass("snap-right"),G.bottom&&N.addClass("snap-bottom")}function i(){N.show();var a="none"!==H,b="collapsed"===P;if(a){if(!b&&"none"===P){var c={};P="collapsed",c=o(c),c=p(c),N.css(c),b=!0}b&&(P="expanding",n(S),F=!1,window.setTimeout(function(){P="expanded",h(),window.setTimeout(n,10)},S))}}function j(){switch(H){case"up":case"down":if("expanded"===P){var a=jQuery(window),b=(a.innerHeight(),N.position()),c={};c["margin-top"]=0,c["margin-bottom"]=0,c.bottom="auto",c.top=b.top,N.css(c),P="collapsing",c=p(),N.animate(c,S,function(){P="collapsed",h(),window.setTimeout(n,10)})}break;default:N.hide()}}function k(a){"none"===H?s.hide():t?s.hide():s.show(),a.stopPropagation()}function l(a){"none"!==H&&(t?s.hide():s.show(),a.stopPropagation())}function m(){var b=a._modal_overlay();return!!M&&(!(!b instanceof jQuery)&&(b.off("click",m),void s.hide()))}function n(a){if(!N)return!1;if("function"==typeof L)L.apply(s,[s.$()]);else{var b={};b=o(b),b=p(b),!isNaN(a)&&a>0?N.animate(b,a):N.css(b)}}function o(a){var b=jQuery(window),c=b.innerWidth(),d=b.innerHeight(),e=parseInt(N.css("border-left-width"))+parseInt(N.css("border-right-width")),f=parseInt(N.css("border-top-width"))+parseInt(N.css("border-bottom-width")),g=x+e,h=y+f;if("object"!=typeof a&&(a={}),!y||!x){var i=!x,j=!y,k=0,l=0;N.find("*").each(function(){var a=jQuery(this),b=a.position(),c=a.outerWidth()+b.left,d=a.outerHeight()+b.top;i&&k=0&&(x=c),d>=0&&(y=d),F=!0,h(),s},this.snap=function(){var a=!1;G={top:!1,left:!1,right:!1,bottom:!1};for(var b=0;b=0&&(S=b),F=!0,h(),s},this.animate=function(a,b){var c=!1,d="Webkit Moz O ms Khtml".split(" ");if(void 0!==N[0].style.animationName&&(c=!0),!1===c)for(var e=0;e