/*! 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'),M=jQuery(d),e&&jQuery("").prependTo(M),M.filter(".popup").length||M.find(".popup").length||M.addClass("popup"),N=M.hasClass("popup")?M:M.find(".popup").first(),N.find(".popup-title").length||(s.title=function(){return s}),N.find(".popup-content").length||(s.content=function(){return s}),N.find(".slidein-toggle").length||(N.find(".popup-title .popup-close").length?N.find(".popup-title .popup-close").addClass("slidein-toggle"):N.find(".popup-title").length?N.find(".popup-title").addClass("slidein-toggle"):N.prepend('')),t=!1}()}}(window.wpmUi=window.wpmUi||{}),function(a){a.WpmUiProgress=function(){function a(){var a=c/d*100;a<0&&(a=0),a>100&&(a=100),g.width(a+"%"),j.text(parseInt(a)+" %"),e&&e.length?(i.html(e),i.show()):i.hide()}var b=this,c=0,d=100,e="",f=null,g=null,h=null,i=null,j=null;this.value=function(d){return isNaN(d)||(c=parseInt(d),a()),b},this.max=function(c){return isNaN(c)||(d=parseInt(c),a()),b},this.label=function(c){return e=c,a(),b},this.on=function(a,c,d){return f.on(a,c,d),b},this.off=function(a,c,d){return f.off(a,c,d),b},this.$=function(){return f},b=this,function(){d=100,c=0,f=jQuery('
'),h=jQuery('
'),g=jQuery('
'),i=jQuery('
'),j=jQuery('
'),g.appendTo(h),j.appendTo(h),h.appendTo(f),i.appendTo(f),a()}()}}(window.wpmUi=window.wpmUi||{}),function(a){a.add_action||(a.filters=a.filters||{},a.add_action=function(b,c,d){a.add_filter(b,c,d)},a.add_filter=function(b,c,d){void 0!==c&&(void 0===d&&(d=10),a.filters[b]=a.filters[b]||[],a.filters[b].push({priority:d,callback:c}))},a.remove_action=function(b,c){a.remove_filter(b,c)},a.remove_filter=function(b,c){a.filters[b]=a.filters[b]||[],a.filters[b].forEach(function(d,e){d.callback===c&&a.filters[b].splice(e,1)})},a.remove_all_actions=function(b,c){a.remove_all_filters(b,c)},a.remove_all_filters=function(b,c){a.filters[b]=a.filters[b]||[],void 0===c?a.filters[b]=[]:a.filters[b].forEach(function(d,e){d.priority===c&&a.filters[b].splice(e,1)})},a.do_action=function(b,c){var d=[];void 0!==a.filters[b]&&a.filters[b].length>0&&(a.filters[b].forEach(function(a){d[a.priority]=d[a.priority]||[],d[a.priority].push(a.callback)}),d.forEach(function(a){a.forEach(function(a){a(c)})}))},a.apply_filters=function(b,c,d){var e=[];return void 0!==a.filters[b]&&a.filters[b].length>0&&(a.filters[b].forEach(function(a){e[a.priority]=e[a.priority]||[],e[a.priority].push(a.callback)}),e.forEach(function(a){a.forEach(function(a){c=a(c,d)})})),c})}(window.wpmUi=window.wpmUi||{}),function(a){a.WpmUiAjaxData=function(a,b){function c(){var a=document.createElement("INPUT"),b=new XMLHttpRequest;a.type="file",p="files"in a,o=!!(b&&"upload"in b&&"onprogress"in b.upload),q=!!window.FormData}function d(){var a=new window.XMLHttpRequest;return o&&(a.upload.addEventListener("progress",function(a){if(a.lengthComputable){e(a.loaded/a.total)}else e(-1)},!1),a.addEventListener("progress",function(a){if(a.lengthComputable){e(a.loaded/a.total)}else e(-1)},!1)),a}function e(a){o&&"function"==typeof m&&m(a)}function f(a,b,c){e(100),"function"==typeof n&&n(a,b,c)}function g(a,b){var c={};if(b=b&&q,l instanceof jQuery)if(l.find(".wp-editor-area").each(function(){var a=jQuery(this).attr("id"),b="#wp-"+a+"-wrap",c=jQuery(b),d=window.tinyMCE.get(a);d&&c.hasClass("tmce-active")&&d.save()}),b)c=new window.FormData(l[0]);else{c={};var d={},e={validate:/^[a-zA-Z_][a-zA-Z0-9_-]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_-]+$/},f=function(a,b,c){return a[b]=c,a},g=function(a){return void 0===d[a]&&(d[a]=0),d[a]++};jQuery.each(l.serializeArray(),function(){if(e.validate.test(this.name)){for(var a,b=this.name.match(e.key),d=this.value,h=this.name;void 0!==(a=b.pop());)h=h.replace(new RegExp("\\["+a+"\\]$"),""),a.match(e.push)?d=f([],g(h),d):a.match(e.fixed)?d=f([],a,d):a.match(e.named)&&(d=f({},a,d));c=jQuery.extend(!0,c,d)}}),l.find("input[type=file]").each(function(){var a=jQuery(this),b=a.attr("name"),d=a.clone(!0)[0];c[":files"]=c[":files"]||{},c[":files"][b]=d})}else if("string"==typeof l){var h=l.split("&").map(function(a){return a.split("=",2)});c=b?new window.FormData:{};for(var i in h){var j=decodeURI(h[i][0]),k=decodeURI(h[i][1]);b?c.append(j,k):void 0!==c[j]?("object"!=typeof c[j]&&(c[j]=[c[j]]),c[j].push(k)):c[j]=k}}else if("object"==typeof l)if(b){c=new window.FormData;for(var m in l)l.hasOwnProperty(m)&&c.append(m,l[m])}else c=jQuery.extend({},l);return void 0!==a&&(c instanceof window.FormData?c.append("action",a):c.action=a),c}function h(b,c){var h=g(b,!0),i={},j=null,k=!1;"json"!==c&&(c="text"),e(-1),i={url:a,type:"POST",dataType:"html",data:h,xhr:d,success:function(a,b,d){if(k=!0,j=a,"json"===c)try{j=jQuery.parseJSON(a)}catch(b){j={status:"ERR",data:a}}},error:function(a,b,c){k=!1,j=c},complete:function(a,b){j instanceof Object&&"ERR"===j.status&&(k=!1),f(j,k,a)}},h instanceof window.FormData&&(i.processData=!1,i.contentType=!1),jQuery.ajax(i)}function i(b,c){var d=g(b,!1),e=jQuery("
"),f="";for(var h in d)if(d.hasOwnProperty(h))if(":files"===h)for(var i in d[h]){var j=d[h][i];e.append(j)}else"action"===h?f=h+"="+d[h].toString():jQuery('').attr("name",h).attr("value",d[h]).appendTo(e);f=-1===a.indexOf("?")?"?"+f:"&"+f,e.attr("action",a+f).attr("method","POST").attr("enctype","multipart/form-data").attr("target",c).hide().appendTo(jQuery("body")),e.submit()}var j=this,k=null,l={},m=null,n=null,o=!1,p=!1,q=!1;this.data=function(a){return l=a,j},this.extract_data=function(a){return l=a,g(void 0,!1)},this.onprogress=function(a){return m=a,j},this.ondone=function(a){return n=a,j},this.reset=function(){return l={},m=null,n=null,j},this.load_text=function(a){return a=a||b,h(a,"text"),j},this.load_json=function(a){return a=a||b,h(a,"json"),j},this.load_http=function(a,c){return a=a||"wpmui_void",c=c||b,i(c,a),j},j=this,function(){a||"string"!=typeof window.ajaxurl||(a=window.ajaxurl),k=jQuery("body").find("#wpmui_void"),k.length||(k=jQuery("").attr("name","wpmui_void").attr("id","wpmui_void").css({width:1,height:1,display:"none",visibility:"hidden",position:"absolute",left:-1e3,top:-1e3}).hide().appendTo(jQuery("body"))),c(),j.reset()}()}}(window.wpmUi=window.wpmUi||{}),function(a){a.WpmUiBinary=function(){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.WpmUiBinary.utf8_encode=function(a){if("string"!=typeof a)return a;a=a.replace(/\r\n/g,"\n");var b,c="",d=0;for(d;d127&&b<2048?(c+=String.fromCharCode(b>>6|192),c+=String.fromCharCode(63&b|128)):(c+=String.fromCharCode(b>>12|224),c+=String.fromCharCode(b>>6&63|128),c+=String.fromCharCode(63&b|128));return c},a.WpmUiBinary.utf8_decode=function(a){if("string"!=typeof a)return a;for(var b="",c=0,d=0;c191&&d<224?(b+=String.fromCharCode((31&d)<<6|63&a.charCodeAt(c+1)),c+=2):(b+=String.fromCharCode((15&d)<<12|(63&a.charCodeAt(c+1))<<6|63&a.charCodeAt(c+2)),c+=3);return b},a.WpmUiBinary.base64_encode=function(c){if("string"!=typeof c)return c;c=a.WpmUiBinary.utf8_encode(c);for(var d,e,f,g,h,i,j,k="",l=0;l>2,h=(3&d)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j);return k},a.WpmUiBinary.base64_decode=function(c){if("string"!=typeof c)return c;c.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var d,e,f,g,h,i,j,k="",l=0;l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(d),64!==i&&(k+=String.fromCharCode(e)),64!==j&&(k+=String.fromCharCode(f));return a.WpmUiBinary.utf8_decode(k)}}}(window.wpmUi=window.wpmUi||{});