PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | assets/js/dist/utils.min.js +1 -1 4.4.0 → 4.4.8 View file →
@@ -1 +1 @@
1 -(()=>{var __webpack_modules__={4694(){"use strict";const $=window.jQuery||jQuery,serializeJSON=function serializeJSON(path){const isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea");let unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,function(){const that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(!match)return;let keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=typeof indexed[match[0]]&&(indexed[match[0]]={}),$.each(keys,function(i,prop){prop=prop.replace(/\]|\[/g,"");let rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);const evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(e){console.log("Error:"+e+"\n"+objExp)}})):indexed[match[0]]=this.value}),path){path="['"+path.replace(".","']['")+"']";const c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=e=>(e=$.extend({},{offset:[0,0]},e||{}),$.each(void 0,function(){const t=$(this),n=t.data("content");if(!n||void 0!==t.data("LP_Tooltip"))return;let o=null;t.on("mouseenter",function(s){o=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();const i=t.offset();if(Array.isArray(e.offset)){const t=e.offset[1],n=e.offset[0];$.isNumeric(n)&&(i.left+=n),$.isNumeric(t)&&(i.top+=t)}o.css({top:i.top,left:i.left}),o.fadeIn()}),t.on("mouseleave",function(e){o&&o.remove()}),t.data("tooltip",!0)})),hasEvent=function(e){const t=$(this).data("events");if(void 0===t.LP)return!1;for(i=0;i<t.LP.length;i++)if(t.LP[i].namespace==e)return!0;return!1},dataToJSON=function(){const e={};return $.each(this[0].attributes,function(){const t=this.name.match(/^data-(.*)/);t&&(e[t[1]]=this.value)}),e},rows=function(){const e=$(this).height(),t=$(this).css("line-height").replace("px","");return $(this).attr({height:e,"line-height":t}),Math.floor(e/parseInt(t))},checkLines=function(e){return this.each(function(){const t=$(this).rows();e.call(this,t)})},findNext=function(e){const t=$(e),n=this.first(),o=t.index(n),s=t.eq(o+1);return!!s.length&&s},findPrev=function(e){const t=$(e),n=this.first(),o=t.index(n),s=t.eq(o-1);return!!s.length&&s},progress=function(e){return this.each(function(){const t=parseInt(e/100*360),n=$(this);t<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+t+"deg)"})})};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress;var __WEBPACK_DEFAULT_EXPORT__={serializeJSON,LP_Tooltip,hasEvent,dataToJSON,rows,checkLines,findNext,findPrev,progress}},6011(){!function(e){function t(t,n){const o=e(t),s=o.attr("data-id")||LP.uniqueId();n=e.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,o.data()),o.attr("data-id",s);let i=o.attr("data-content-tip")||o.html(),a=e('<div class="learn-press-tip-floating">'+i+"</div>"),r=null,c=0,l=!1,p="el"===n.arrowOffset?o.outerWidth()/2:8,d=e("#__"+s);function u(){if(r)return void clearTimeout(r);n.single&&e(".learn-press-tip").not(o).LP("QuickTip","close"),a.appendTo(document.body);const t=o.offset();a.css({top:t.top-a.outerHeight()-8,left:t.left-a.outerWidth()/2+p})}function h(){r&&clearTimeout(r),r=setTimeout(function(){a.detach(),r=null},c)}function f(){c=0,h(),c=n.closeInterval}return 0===d.length&&e(document.body).append(e("<div />").attr("id","__"+s).html(i).css("display","none")),i=d.html(),a.addClass(n.tipClass),o.data("content-tip",i),o.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(a.append('<a class="close"></a>'),a.on("click",".close",function(){f()})),l||o.html(""),"click"===n.event&&o.on("click",function(e){e.stopPropagation(),u()}),e(document).on("learn-press/close-all-quick-tip",function(){f()}),o.hover(function(e){e.stopPropagation(),"click"!==n.event&&u()},function(e){e.stopPropagation(),n.autoClose&&h()}).addClass("ready"),{close:f,open:function(){u()}}}e.fn.LP("QuickTip",function(n){return e.each(this,function(){let o=e(this).data("quick-tip");o||(o=new t(this,n),e(this).data("quick-tip",o)),"string"==typeof n&&o[n]&&o[n].apply(o)})})}(jQuery)},3509(){const e=jQuery;e(function(){e('.form-field input[type="password"]').wrap('<span class="lp-password-input"></span>'),e(".lp-password-input").append('<span class="lp-show-password-input"></span>'),e(".lp-show-password-input").on("click",function(){e(this).toggleClass("display-password"),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password")})})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}Object.defineProperty(e,"name",{value:"default",configurable:!0});const t=window.jQuery;let n;void 0!==t&&(t.fn.LP=n=function(e,n){if("function"==typeof n)t.fn["LP_"+e]=n;else if(e){const n=[];if(arguments.length>1)for(let e=1;e<arguments.length;e++)n.push(arguments[e]);return"function"==typeof t(this)["LP_"+e]?t(this)["LP_"+e].apply(this,n):this}return this});var o=__webpack_require__(6011),s=__webpack_require__.n(o);const i=window.jQuery,a={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm(e,t){const n=i(e);i("[learn-press-quick-confirm]").each(function(){let e;(e=i(this).data("quick-confirm"))&&(console.log(e),e.destroy())}),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(e,t){var n=i(e),o=i('<span class="learn-press-quick-confirm"></span>').insertAfter(n),s=i(e).position()||{left:0,top:0},a=null,r=null,c=3,l=function(){o.fadeOut("fast",function(){i(this).remove(),o.parent().css("position","")}),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),p()},p=function(){r&&clearInterval(r),a&&clearInterval(a)},d=function(){a=setInterval(function(){0==--c&&(l.call(o[0]),"function"==typeof t.onCancel&&t.onCancel(t.data),p()),o.find("span").html(" ("+c+")")},1e3),r=setInterval(function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(p(),o.remove(),o.parent().css("position",""),"function"==typeof t.onCancel&&t.onCancel(t.data))},350)};t=i.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},t||{}),o.html(t.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+c+")</span>").css({}),o.click(function(){"function"==typeof t.onOk&&t.onOk(t.data),l()}).hover(function(){p()},function(){d()}),o.css({left:s.left+n.outerWidth()-o.outerWidth()+t.offset.left,top:s.top+n.outerHeight()+t.offset.top+5}).hide().fadeIn("fast"),d(),this.destroy=function(){o.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),p()}}(e,t))},show(e,t){i.proxy(function(){t=i.extend({title:"",buttons:"",events:!1,autohide:!1,message:e,data:!1,id:LP.uniqueId(),onHide:null},t||{}),this.instances.push(t),this.instance=t,i(document);const n=i(document.body);this.$block||(this.$block=i('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=i('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click(function(){})),this._createWindow(e,t.title,t.buttons),this.$block.show(),this.$window.show().attr("instance",t.id),i(window).bind("resize.message-box",i.proxy(this.update,this)).bind("scroll.message-box",i.proxy(this.update,this)),this.update(!0),t.autohide&&setTimeout(function(){LP.MessageBox.hide(),"function"==typeof t.onHide&&t.onHide.call(LP.MessageBox,t)},t.autohide)},this)()},blockUI(e){e=(!1!==e?e||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(e)},hide(e,t){t?this._removeInstance(t.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),i(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update(e){let t=this,n=this.$window.find("#message-box-wrap"),o=n.data("timer"),s=function(){LP.Hook.doAction("learn_press_message_box_before_resize",t);let e=n.find(".message-box-content").css("height","").css("overflow","hidden"),o=(n.outerWidth(),n.outerHeight()),s=e.height(),a=i(window).height();n.offset().top,s>a-50?(e.css({height:a-25}),o=n.outerHeight()):e.css("height","").css("overflow",""),n.css({marginTop:(i(window).height()-o)/2}),LP.Hook.doAction("learn_press_message_box_resize",o,t)};e&&s(),o&&clearTimeout(o),o=setTimeout(s,250)},_removeInstance(e){for(let t=0;t<this.instances.length;t++)if(this.instances[t].id===e){this.instances.splice(t,1);const e=this.instances.length;e?(this.instance=this.instances[e-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance(e){for(let t=0;t<this.instances.length;t++)if(this.instances[t].id===e)return this.instances[t]},_createWindow(e,t,n){const o=this.$window.find("#message-box-wrap").html("");if(t&&o.append('<h3 class="message-box-title">'+t+"</h3>"),o.append(i('<div class="message-box-content"></div>').html(e)),n){const e=i('<div class="message-box-buttons"></div>');switch(n){case"yesNo":e.append(this._createButton(LP_Settings.localize.button_yes,"yes")),e.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":e.append(this._createButton(LP_Settings.localize.button_ok,"ok")),e.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:e.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}o.append(e)}},_createButton(e,t){const n=i('<button type="button" class="button message-box-button message-box-button-'+t+'">'+e+"</button>"),o="on"+(t.substr(0,1).toUpperCase()+t.substr(1));return n.data("callback",o).click(function(){const e=i(this).data("instance"),t=e.events[i(this).data("callback")];"function"===i.type(t)&&!1===t.apply(LP.MessageBox,[e])||LP.MessageBox.hide(null,e)}).data("instance",this.instance),n}},r={hooks:{action:{},filter:{}},addAction(e,t,n,o){return this.addHook("action",e,t,n,o),this},addFilter(e,t,n,o){return this.addHook("filter",e,t,n,o),this},doAction(e){return this.doHook("action",e,arguments)},applyFilters(e){return this.doHook("filter",e,arguments)},removeAction(e,t){return this.removeHook("action",e,t),this},removeFilter(e,t,n){return this.removeHook("filter",e,t,n),this},addHook(e,t,n,o,s){void 0===this.hooks[e][t]&&(this.hooks[e][t]=[]);const i=this.hooks[e][t];return void 0===s&&(s=t+"_"+i.length),this.hooks[e][t].push({tag:s,callable:n,priority:o}),this},doHook(e,t,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[e][t]){let o,s=this.hooks[e][t];s.sort(function(e,t){return e.priority-t.priority});for(let t=0;t<s.length;t++)o=s[t].callable,"function"!=typeof o&&(o=window[o]),"action"===e?n[t]=o.apply(null,n):n[0]=o.apply(null,n)}return"filter"===e?n[0]:n},removeHook(e,t,n,o){if(void 0!==this.hooks[e][t]){const s=this.hooks[e][t];for(let e=s.length-1;e>=0;e--)void 0!==o&&o!==s[e].tag||void 0!==n&&n!==s[e].priority||s.splice(e,1)}return this}},c=r,l={get:(e,t,n)=>{let o;if(n)o=wpCookies.get(e);else{let t=wpCookies.get("LP");t&&(t=JSON.parse(t),o=e?t[e]:t)}return o||o===t||(o=t),o},set(e,t,n,o,s,i){if(arguments.length>2)wpCookies.set(e,t,n,o,s,i);else if(2==arguments.length){let n=wpCookies.get("LP");n=n?JSON.parse(n):{},n[e]=t,wpCookies.set("LP",JSON.stringify(n),"","/")}else wpCookies.set("LP",JSON.stringify(e),"","/")},remove(e){const t=l.get(),n=new RegExp(e,"g"),o={},s=e.match(/\*/);for(const i in t)s?i.match(n)||(o[i]=t[i]):e!=i&&(o[i]=t[i]);l.set(o)}},p=l,d={__key:"LP",set(e,t){const n=d.get(),{set:o}=lodash;o(n,e,t),localStorage.setItem(d.__key,JSON.stringify(n))},get(e,t){const n=JSON.parse(localStorage.getItem(d.__key)||"{}"),{get:o}=lodash,s=o(n,e);return e?void 0!==s?s:t:n},exists:e=>e in d.get(),remove(e){const t=d.get(),n=lodash.omit(t,e);d.__set(n)},__get:()=>localStorage.getItem(d.__key),__set(e){localStorage.setItem(d.__key,JSON.stringify(e||"{}"))}},u=d;__webpack_require__(4694);let h=1;const f=window.jQuery||jQuery;var g=__webpack_require__(3509),m=__webpack_require__.n(g);const y=jQuery;String.prototype.getQueryVar=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(this);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(e,t){let n=this,o=n.split("#");return n=o[0],e.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=e+"="+t):-1!=n.indexOf("&"+e+"=")||-1!=n.indexOf("?"+e+"=")?n=n.replace(new RegExp(e+"=([^&#]*)","g"),e+"="+t):(n+=n.match(/\?/)?"&":"?",n+=e+"="+t),n+(o[1]?"#"+o[1]:"")},String.prototype.removeQueryVar=function(e){let t=this;const n=t.split("#");t=n[0],e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const o=new RegExp("[\\?&]"+e+"([[][^=]*)?=([^&#]*)","g");return t=t.replace(o,""),t+(n[1]?"#"+n[1]:"")};const w={Hook:c,setUrl(e,t,n){e&&(history.pushState({},n,e),LP.Hook.doAction("learn_press_set_location_url",e))},toggleGroupSection(e,t){const n=y(e);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle(function(){y(this).is(":visible")?y(t).addClass("toggle-on").removeClass("toggle-off"):y(t).addClass("toggle-off").removeClass("toggle-on")})},overflow(e,t){const n=y(e),o=n.css("overflow");t?n.css("overflow",t).data("overflow",o):n.css("overflow",n.data("overflow"))},getUrl:()=>window.location.href,addQueryVar:(e,t,n)=>(void 0===n?window.location.href:n).addQueryVar(e,t),removeQueryVar:(e,t)=>(void 0===t?window.location.href:t).removeQueryVar(e),reload(e){e||(e=window.location.href),window.location.href=e},parseResponse(e,t){const n=e.match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s);return n&&(e=n[1]),"json"===(t||"json")?this.parseJSON(e):e},parseJSON(e){if("string"!=typeof e)return e;const t=String.raw({raw:e}).match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s);try{e=t?JSON.parse(t[1].replace(/(?:\r\n|\r|\n)/g,"")):JSON.parse(e)}catch(t){e={}}return e},ajax(e){const t=e.type||"post",n=e.dataType||"json",o=e.action?y.extend(e.data,{"lp-ajax":e.action}):e.data,s=e.beforeSend||function(){},i=e.url||window.location.href;y.ajax({data:o,url:i,type:t,dataType:"html",beforeSend:s.apply(null,e),success(t){const o=LP.parseResponse(t,n);"function"==typeof e.success&&e.success(o,t)},error(){"function"==typeof e.error&&e.error.apply(null,LP.funcArgs2Array())}})},doAjax(e){const t=e.type||"post",n=e.dataType||"json",o=(void 0===e.prefix||"learnpress_")+e.action,s=e.action?y.extend(e.data,{action:o}):e.data;y.ajax({data:s,url:e.url||window.location.href,type:t,dataType:"html",success(t){const o=LP.parseResponse(t,n);"function"==typeof e.success&&e.success(o,t)},error(){"function"==typeof e.error&&e.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n]);return t},addFilter(e,t){const n=y(document),o="LP."+e;return n.on(o,t),LP.log(n.data("events")),this},applyFilters(){const e=y(document),t=arguments[0],n=this.funcArgs2Array(arguments);return e.hasEvent(t)?(n[0]="LP."+t,e.triggerHandler.apply(e,n)):n[1]},addAction(e,t){return this.addFilter(e,t)},doAction(){const e=y(document),t=arguments[0],n=this.funcArgs2Array(arguments);e.hasEvent(t)&&(n[0]="LP."+t,e.trigger.apply(e,n))},toElement(e,t){if(0===y(e).length)return;t=y.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},t||{});let n=y(t.container),o=0;0===n.length&&(n=y("body, html")),o=n.offset().top;const s=y(e).offset().top+n.scrollTop()-o-t.offset;t.invisible&&function(e){const t=n.scrollTop(),o=t+n.height(),s=y(e).offset().top-n.offset().top,i=s+y(e).height();return t<s&&o>i}(e)||n.fadeIn(10).delay(t.delay).animate({scrollTop:s},t.duration,t.callback)},uniqueId(e,t){let n;void 0===e&&(e="");const o=function(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?new Array(t-e.length+1).join("0")+e:e};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=e,n+=o(parseInt((new Date).getTime()/1e3,10),8),n+=o(this.php_js.uniqidSeed,5),t&&(n+=(10*Math.random()).toFixed(8).toString()),n},log(){for(let e=0,t=arguments.length;e<t;e++)console.log(arguments[e])},blockContent(){0===y("#learn-press-block-content").length&&y(LP.template("learn-press-template-block-content",{})).appendTo(y("body")),LP.hideMainScrollbar().addClass("block-content"),y(document).trigger("learn_press_block_content")},unblockContent(){setTimeout(function(){LP.showMainScrollbar().removeClass("block-content"),y(document).trigger("learn_press_unblock_content")},350)},hideMainScrollbar(e){e||(e="html, body");const t=y(e);return t.each(function(){const e=y(this),t=e.css("overflow");e.css("overflow","hidden").attr("overflow",t)}),t},showMainScrollbar(e){e||(e="html, body");const t=y(e);return t.each(function(){const e=y(this),t=e.attr("overflow");e.css("overflow",t).removeAttr("overflow")}),t},template:"undefined"!=typeof _?_.memoize(function(e,t){let n,o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};const s=function(t){return n=n||_.template(y("#"+e).html(),null,o),n(t)};return t?s(t):s},function(e,t){return e+"-"+JSON.stringify(t)}):function(){return""},alert(e,t){let n="",o="";"string"==typeof e?o=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(o=e.message)),y.alerts.alert(o,n,function(e){LP._on_alert_hide(),t&&t(e)}),this._on_alert_show()},confirm(e,t){let n="",o="";"string"==typeof e?o=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(o=e.message)),y.alerts.confirm(o,n,function(e){LP._on_alert_hide(),t&&t(e)}),this._on_alert_show()},_on_alert_show(){const e=y("#popup_container");y('<span id="popup_container_placeholder" />').insertAfter(e).data("xxx",e),e.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide(){const e=y("#popup_container_placeholder"),t=e.data("xxx");t&&t.replaceWith(e),t.appendTo(y(document.body)),t.stop().animate({top:"+=50",opacity:0},250,function(){y(this).remove()})},sendMessage(e,t,n,o){y.isPlainObject(e)&&(e=JSON.stringify(e)),n=n||"*",(t=t||window).postMessage(e,n,o)},receiveMessage(e,t){let n=e.origin||e.originalEvent.origin,o=e.data||e.originalEvent.data||"";("string"==typeof o||o instanceof String)&&0===o.indexOf("{")&&(o=LP.parseJSON(o)),LP.Hook.doAction("learn_press_receive_message",o,n)},camelCaseDashObjectKeys(e,t=!0){const n=LP,o=function(e){return Array.isArray(e)};if((s=e)===Object(s)&&!o(s)&&"function"!=typeof s){const o={};return Object.keys(e).forEach(s=>{var i;o[i=s,i.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))]=t?n.camelCaseDashObjectKeys(e[s]):e[s]}),o}return o(e)?e.map(e=>n.camelCaseDashObjectKeys(e)):e;var s},IframeSubmit:function(e){const t="ajax-iframe-"+h;let n=f('form[name="'+t+'"]');n.length||(n=f("<iframe />").appendTo(document.body).attr({name:t,src:"#"})),f(e).on("submit",function(){const n=f(e).clone().appendTo(document.body);return n.attr("target",t),n.find("#submit").remove(),!1}),h++}};y(document).ready(function(){void 0!==y.alerts&&(y.alerts.overlayColor="#000",y.alerts.overlayOpacity=.5,y.alerts.okButton=lpGlobalSettings.localize.button_ok,y.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),y(".learn-press-message.fixed").each(function(){const e=y(this),t=e.data();!function(e,t){t.delayIn&&setTimeout(function(){e.show().hide().fadeIn()},t.delayIn),t.delayOut&&setTimeout(function(){e.fadeOut()},t.delayOut+(t.delayIn||0))}(e,t)}),setTimeout(function(){y(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")},300),function(){let e=null,t=function(){y(".auto-check-lines").checkLines(function(e){e>1?y(this).removeClass("single-lines"):y(this).addClass("single-lines"),y(this).attr("rows",e)})};y(window).on("resize.check-lines",function(){e?(e&&clearTimeout(e),e=setTimeout(t,300)):t()})}(),y(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),y(".learn-press-icon").LP_Tooltip({offset:[30,30]}),y(".learn-press-message[data-autoclose]").each(function(){const e=y(this),t=parseInt(e.data("autoclose"));t&&setTimeout(function(e){e.fadeOut()},t,e)}),y(document).on("click",function(){y(document).trigger("learn-press/close-all-quick-tip")})}),e({Event_Callback:function(e){const t={};window.jQuery,this.on=function(n,o){let s=n.split("."),i="";return s.length>1&&(n=s[0],i=s[1]),t[n]||(t[n]=[[],{}]),i?(t[n][1][i]||(t[n][1][i]=[]),t[n][1][i].push(o)):t[n][0].push(o),e},this.off=function(n,o){let s=n.split("."),i="";if(s.length>1&&(n=s[0],i=s[1]),!t[n])return e;let a=-1;if(i){if(!t[n][1][i])return e;if("function"==typeof o){if(a=t[n][1][i].indexOf(o),a<0)return e;t[n][1][i].splice(a,1)}else t[n][1][i]=[]}else if("function"==typeof o){if(a=t[n][0].indexOf(o),a<0)return e;t[n][0].splice(a,1)}else t[n][0]=[];return e},this.callEvent=function(n,o){if(t[n]){if(t[n][0])for(var s=0;s<t[n][0].length;s++)"function"==typeof t[n][0][s]&&t[n][s][0].apply(e,o);if(t[n][1])for(var s in t[n][1])for(let i=0;i<t[n][1][s].length;i++)"function"==typeof t[n][1][s][i]&&t[n][1][s][i].apply(e,o)}}},MessageBox:a,Cookies:p,localStorage:u,...w}),s(),m()})()})();
1 +(()=>{var __webpack_modules__={4694(){"use strict";const $=window.jQuery||jQuery,serializeJSON=function serializeJSON(path){const isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea");let unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,function(){const that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(!match)return;let keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=typeof indexed[match[0]]&&(indexed[match[0]]={}),$.each(keys,function(i,prop){prop=prop.replace(/\]|\[/g,"");let rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);const evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(t){console.log("Error:"+t+"\n"+objExp)}})):indexed[match[0]]=this.value}),path){path="['"+path.replace(".","']['")+"']";const c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=t=>(t=$.extend({},{offset:[0,0]},t||{}),$.each(void 0,function(){const e=$(this),n=e.data("content");if(!n||void 0!==e.data("LP_Tooltip"))return;let o=null;e.on("mouseenter",function(s){o=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();const i=e.offset();if(Array.isArray(t.offset)){const e=t.offset[1],n=t.offset[0];$.isNumeric(n)&&(i.left+=n),$.isNumeric(e)&&(i.top+=e)}o.css({top:i.top,left:i.left}),o.fadeIn()}),e.on("mouseleave",function(t){o&&o.remove()}),e.data("tooltip",!0)})),hasEvent=function(t){const e=$(this).data("events");if(void 0===e.LP)return!1;for(i=0;i<e.LP.length;i++)if(e.LP[i].namespace==t)return!0;return!1},dataToJSON=function(){const t={};return $.each(this[0].attributes,function(){const e=this.name.match(/^data-(.*)/);e&&(t[e[1]]=this.value)}),t},rows=function(){const t=$(this).height(),e=$(this).css("line-height").replace("px","");return $(this).attr({height:t,"line-height":e}),Math.floor(t/parseInt(e))},checkLines=function(t){return this.each(function(){const e=$(this).rows();t.call(this,e)})},findNext=function(t){const e=$(t),n=this.first(),o=e.index(n),s=e.eq(o+1);return!!s.length&&s},findPrev=function(t){const e=$(t),n=this.first(),o=e.index(n),s=e.eq(o-1);return!!s.length&&s},progress=function(t){return this.each(function(){const e=parseInt(t/100*360),n=$(this);e<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+e+"deg)"})})};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress;var __WEBPACK_DEFAULT_EXPORT__={serializeJSON,LP_Tooltip,hasEvent,dataToJSON,rows,checkLines,findNext,findPrev,progress}},6011(){!function(t){function e(e,n){const o=t(e),s=o.attr("data-id")||LP.uniqueId();n=t.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,o.data()),o.attr("data-id",s);let i=o.attr("data-content-tip")||o.html(),a=t('<div class="learn-press-tip-floating">'+i+"</div>"),r=null,c=0,l=!1,p="el"===n.arrowOffset?o.outerWidth()/2:8,d=t("#__"+s);function u(){if(r)return void clearTimeout(r);n.single&&t(".learn-press-tip").not(o).LP("QuickTip","close"),a.appendTo(document.body);const e=o.offset();a.css({top:e.top-a.outerHeight()-8,left:e.left-a.outerWidth()/2+p})}function h(){r&&clearTimeout(r),r=setTimeout(function(){a.detach(),r=null},c)}function f(){c=0,h(),c=n.closeInterval}return 0===d.length&&t(document.body).append(t("<div />").attr("id","__"+s).html(i).css("display","none")),i=d.html(),a.addClass(n.tipClass),o.data("content-tip",i),o.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(a.append('<a class="close"></a>'),a.on("click",".close",function(){f()})),l||o.html(""),"click"===n.event&&o.on("click",function(t){t.stopPropagation(),u()}),t(document).on("learn-press/close-all-quick-tip",function(){f()}),o.hover(function(t){t.stopPropagation(),"click"!==n.event&&u()},function(t){t.stopPropagation(),n.autoClose&&h()}).addClass("ready"),{close:f,open:function(){u()}}}t.fn.LP("QuickTip",function(n){return t.each(this,function(){let o=t(this).data("quick-tip");o||(o=new e(this,n),t(this).data("quick-tip",o)),"string"==typeof n&&o[n]&&o[n].apply(o)})})}(jQuery)},3509(){const t=jQuery;t(function(){t('.form-field input[type="password"]').wrap('<span class="lp-password-input"></span>'),t(".lp-password-input").append('<span class="lp-show-password-input"></span>'),t(".lp-show-password-input").on("click",function(){t(this).toggleClass("display-password"),t(this).hasClass("display-password")?t(this).siblings(['input[type="password"]']).prop("type","text"):t(this).siblings('input[type="text"]').prop("type","password")})})}};const __webpack_module_cache__={};function __webpack_require__(t){const e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;const n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.dn=t=>{var e=Object.getOwnPropertyDescriptor(t,"name");(!e||!e.writable&&e.configurable)&&Object.defineProperty(t,"name",{value:"default",configurable:!0})},(()=>{"use strict";function t(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}__webpack_require__.dn(t);const e=window.jQuery;let n;void 0!==e&&(e.fn.LP=n=function(t,n){if("function"==typeof n)e.fn["LP_"+t]=n;else if(t){const n=[];if(arguments.length>1)for(let t=1;t<arguments.length;t++)n.push(arguments[t]);return"function"==typeof e(this)["LP_"+t]?e(this)["LP_"+t].apply(this,n):this}return this}),__webpack_require__(6011);const o=window.jQuery,s={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm(t,e){const n=o(t);o("[learn-press-quick-confirm]").each(function(){let t;(t=o(this).data("quick-confirm"))&&(console.log(t),t.destroy())}),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(t,e){var n=o(t),s=o('<span class="learn-press-quick-confirm"></span>').insertAfter(n),i=o(t).position()||{left:0,top:0},a=null,r=null,c=3,l=function(){s.fadeOut("fast",function(){o(this).remove(),s.parent().css("position","")}),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),p()},p=function(){r&&clearInterval(r),a&&clearInterval(a)},d=function(){a=setInterval(function(){0==--c&&(l.call(s[0]),"function"==typeof e.onCancel&&e.onCancel(e.data),p()),s.find("span").html(" ("+c+")")},1e3),r=setInterval(function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(p(),s.remove(),s.parent().css("position",""),"function"==typeof e.onCancel&&e.onCancel(e.data))},350)};e=o.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},e||{}),s.html(e.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+c+")</span>").css({}),s.click(function(){"function"==typeof e.onOk&&e.onOk(e.data),l()}).hover(function(){p()},function(){d()}),s.css({left:i.left+n.outerWidth()-s.outerWidth()+e.offset.left,top:i.top+n.outerHeight()+e.offset.top+5}).hide().fadeIn("fast"),d(),this.destroy=function(){s.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),p()}}(t,e))},show(t,e){o.proxy(function(){e=o.extend({title:"",buttons:"",events:!1,autohide:!1,message:t,data:!1,id:LP.uniqueId(),onHide:null},e||{}),this.instances.push(e),this.instance=e,o(document);const n=o(document.body);this.$block||(this.$block=o('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=o('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click(function(){})),this._createWindow(t,e.title,e.buttons),this.$block.show(),this.$window.show().attr("instance",e.id),o(window).bind("resize.message-box",o.proxy(this.update,this)).bind("scroll.message-box",o.proxy(this.update,this)),this.update(!0),e.autohide&&setTimeout(function(){LP.MessageBox.hide(),"function"==typeof e.onHide&&e.onHide.call(LP.MessageBox,e)},e.autohide)},this)()},blockUI(t){t=(!1!==t?t||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(t)},hide(t,e){e?this._removeInstance(e.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),o(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update(t){let e=this,n=this.$window.find("#message-box-wrap"),s=n.data("timer"),i=function(){LP.Hook.doAction("learn_press_message_box_before_resize",e);let t=n.find(".message-box-content").css("height","").css("overflow","hidden"),s=(n.outerWidth(),n.outerHeight()),i=t.height(),a=o(window).height();n.offset().top,i>a-50?(t.css({height:a-25}),s=n.outerHeight()):t.css("height","").css("overflow",""),n.css({marginTop:(o(window).height()-s)/2}),LP.Hook.doAction("learn_press_message_box_resize",s,e)};t&&i(),s&&clearTimeout(s),s=setTimeout(i,250)},_removeInstance(t){for(let e=0;e<this.instances.length;e++)if(this.instances[e].id===t){this.instances.splice(e,1);const t=this.instances.length;t?(this.instance=this.instances[t-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance(t){for(let e=0;e<this.instances.length;e++)if(this.instances[e].id===t)return this.instances[e]},_createWindow(t,e,n){const s=this.$window.find("#message-box-wrap").html("");if(e&&s.append('<h3 class="message-box-title">'+e+"</h3>"),s.append(o('<div class="message-box-content"></div>').html(t)),n){const t=o('<div class="message-box-buttons"></div>');switch(n){case"yesNo":t.append(this._createButton(LP_Settings.localize.button_yes,"yes")),t.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":t.append(this._createButton(LP_Settings.localize.button_ok,"ok")),t.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:t.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}s.append(t)}},_createButton(t,e){const n=o('<button type="button" class="button message-box-button message-box-button-'+e+'">'+t+"</button>"),s="on"+(e.substr(0,1).toUpperCase()+e.substr(1));return n.data("callback",s).click(function(){const t=o(this).data("instance"),e=t.events[o(this).data("callback")];"function"===o.type(e)&&!1===e.apply(LP.MessageBox,[t])||LP.MessageBox.hide(null,t)}).data("instance",this.instance),n}},i={hooks:{action:{},filter:{}},addAction(t,e,n,o){return this.addHook("action",t,e,n,o),this},addFilter(t,e,n,o){return this.addHook("filter",t,e,n,o),this},doAction(t){return this.doHook("action",t,arguments)},applyFilters(t){return this.doHook("filter",t,arguments)},removeAction(t,e){return this.removeHook("action",t,e),this},removeFilter(t,e,n){return this.removeHook("filter",t,e,n),this},addHook(t,e,n,o,s){void 0===this.hooks[t][e]&&(this.hooks[t][e]=[]);const i=this.hooks[t][e];return void 0===s&&(s=e+"_"+i.length),this.hooks[t][e].push({tag:s,callable:n,priority:o}),this},doHook(t,e,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[t][e]){let o,s=this.hooks[t][e];s.sort(function(t,e){return t.priority-e.priority});for(let e=0;e<s.length;e++)o=s[e].callable,"function"!=typeof o&&(o=window[o]),"action"===t?n[e]=o.apply(null,n):n[0]=o.apply(null,n)}return"filter"===t?n[0]:n},removeHook(t,e,n,o){if(void 0!==this.hooks[t][e]){const s=this.hooks[t][e];for(let t=s.length-1;t>=0;t--)void 0!==o&&o!==s[t].tag||void 0!==n&&n!==s[t].priority||s.splice(t,1)}return this}},a=i,r={get:(t,e,n)=>{let o;if(n)o=wpCookies.get(t);else{let e=wpCookies.get("LP");e&&(e=JSON.parse(e),o=t?e[t]:e)}return o||o===e||(o=e),o},set(t,e,n,o,s,i){if(arguments.length>2)wpCookies.set(t,e,n,o,s,i);else if(2==arguments.length){let n=wpCookies.get("LP");n=n?JSON.parse(n):{},n[t]=e,wpCookies.set("LP",JSON.stringify(n),"","/")}else wpCookies.set("LP",JSON.stringify(t),"","/")},remove(t){const e=r.get(),n=new RegExp(t,"g"),o={},s=t.match(/\*/);for(const i in e)s?i.match(n)||(o[i]=e[i]):t!=i&&(o[i]=e[i]);r.set(o)}},c=r,l={__key:"LP",set(t,e){const n=l.get(),{set:o}=lodash;o(n,t,e),localStorage.setItem(l.__key,JSON.stringify(n))},get(t,e){const n=JSON.parse(localStorage.getItem(l.__key)||"{}"),{get:o}=lodash,s=o(n,t);return t?void 0!==s?s:e:n},exists:t=>t in l.get(),remove(t){const e=l.get(),n=lodash.omit(e,t);l.__set(n)},__get:()=>localStorage.getItem(l.__key),__set(t){localStorage.setItem(l.__key,JSON.stringify(t||"{}"))}},p=l;__webpack_require__(4694);let d=1;const u=window.jQuery||jQuery;__webpack_require__(3509);const h=jQuery;String.prototype.getQueryVar=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(this);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(t,e){let n=this,o=n.split("#");return n=o[0],t.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=t+"="+e):-1!=n.indexOf("&"+t+"=")||-1!=n.indexOf("?"+t+"=")?n=n.replace(new RegExp(t+"=([^&#]*)","g"),t+"="+e):(n+=n.match(/\?/)?"&":"?",n+=t+"="+e),n+(o[1]?"#"+o[1]:"")},String.prototype.removeQueryVar=function(t){let e=this;const n=e.split("#");e=n[0],t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const o=new RegExp("[\\?&]"+t+"([[][^=]*)?=([^&#]*)","g");return e=e.replace(o,""),e+(n[1]?"#"+n[1]:"")};const f={Hook:a,setUrl(t,e,n){t&&(history.pushState({},n,t),LP.Hook.doAction("learn_press_set_location_url",t))},toggleGroupSection(t,e){const n=h(t);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle(function(){h(this).is(":visible")?h(e).addClass("toggle-on").removeClass("toggle-off"):h(e).addClass("toggle-off").removeClass("toggle-on")})},overflow(t,e){const n=h(t),o=n.css("overflow");e?n.css("overflow",e).data("overflow",o):n.css("overflow",n.data("overflow"))},getUrl:()=>window.location.href,addQueryVar:(t,e,n)=>(void 0===n?window.location.href:n).addQueryVar(t,e),removeQueryVar:(t,e)=>(void 0===e?window.location.href:e).removeQueryVar(t),reload(t){t||(t=window.location.href),window.location.href=t},parseResponse(t,e){const n=t.match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s);return n&&(t=n[1]),"json"===(e||"json")?this.parseJSON(t):t},parseJSON(t){if("string"!=typeof t)return t;const e=String.raw({raw:t}).match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s);try{t=e?JSON.parse(e[1].replace(/(?:\r\n|\r|\n)/g,"")):JSON.parse(t)}catch(e){t={}}return t},ajax(t){const e=t.type||"post",n=t.dataType||"json",o=t.action?h.extend(t.data,{"lp-ajax":t.action}):t.data,s=t.beforeSend||function(){},i=t.url||window.location.href;h.ajax({data:o,url:i,type:e,dataType:"html",beforeSend:s.apply(null,t),success(e){const o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},doAjax(t){const e=t.type||"post",n=t.dataType||"json",o=(void 0===t.prefix||"learnpress_")+t.action,s=t.action?h.extend(t.data,{action:o}):t.data;h.ajax({data:s,url:t.url||window.location.href,type:e,dataType:"html",success(e){const o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n]);return e},addFilter(t,e){const n=h(document),o="LP."+t;return n.on(o,e),LP.log(n.data("events")),this},applyFilters(){const t=h(document),e=arguments[0],n=this.funcArgs2Array(arguments);return t.hasEvent(e)?(n[0]="LP."+e,t.triggerHandler.apply(t,n)):n[1]},addAction(t,e){return this.addFilter(t,e)},doAction(){const t=h(document),e=arguments[0],n=this.funcArgs2Array(arguments);t.hasEvent(e)&&(n[0]="LP."+e,t.trigger.apply(t,n))},toElement(t,e){if(0===h(t).length)return;e=h.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},e||{});let n=h(e.container),o=0;0===n.length&&(n=h("body, html")),o=n.offset().top;const s=h(t).offset().top+n.scrollTop()-o-e.offset;e.invisible&&function(t){const e=n.scrollTop(),o=e+n.height(),s=h(t).offset().top-n.offset().top,i=s+h(t).height();return e<s&&o>i}(t)||n.fadeIn(10).delay(e.delay).animate({scrollTop:s},e.duration,e.callback)},uniqueId(t,e){let n;void 0===t&&(t="");const o=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?new Array(e-t.length+1).join("0")+t:t};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=t,n+=o(parseInt((new Date).getTime()/1e3,10),8),n+=o(this.php_js.uniqidSeed,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},log(){for(let t=0,e=arguments.length;t<e;t++)console.log(arguments[t])},blockContent(){0===h("#learn-press-block-content").length&&h(LP.template("learn-press-template-block-content",{})).appendTo(h("body")),LP.hideMainScrollbar().addClass("block-content"),h(document).trigger("learn_press_block_content")},unblockContent(){setTimeout(function(){LP.showMainScrollbar().removeClass("block-content"),h(document).trigger("learn_press_unblock_content")},350)},hideMainScrollbar(t){t||(t="html, body");const e=h(t);return e.each(function(){const t=h(this),e=t.css("overflow");t.css("overflow","hidden").attr("overflow",e)}),e},showMainScrollbar(t){t||(t="html, body");const e=h(t);return e.each(function(){const t=h(this),e=t.attr("overflow");t.css("overflow",e).removeAttr("overflow")}),e},template:"undefined"!=typeof _?_.memoize(function(t,e){let n,o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};const s=function(e){return n=n||_.template(h("#"+t).html(),null,o),n(e)};return e?s(e):s},function(t,e){return t+"-"+JSON.stringify(e)}):function(){return""},alert(t,e){let n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),h.alerts.alert(o,n,function(t){LP._on_alert_hide(),e&&e(t)}),this._on_alert_show()},confirm(t,e){let n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),h.alerts.confirm(o,n,function(t){LP._on_alert_hide(),e&&e(t)}),this._on_alert_show()},_on_alert_show(){const t=h("#popup_container");h('<span id="popup_container_placeholder" />').insertAfter(t).data("xxx",t),t.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide(){const t=h("#popup_container_placeholder"),e=t.data("xxx");e&&e.replaceWith(t),e.appendTo(h(document.body)),e.stop().animate({top:"+=50",opacity:0},250,function(){h(this).remove()})},sendMessage(t,e,n,o){h.isPlainObject(t)&&(t=JSON.stringify(t)),n=n||"*",(e=e||window).postMessage(t,n,o)},receiveMessage(t,e){let n=t.origin||t.originalEvent.origin,o=t.data||t.originalEvent.data||"";("string"==typeof o||o instanceof String)&&0===o.indexOf("{")&&(o=LP.parseJSON(o)),LP.Hook.doAction("learn_press_receive_message",o,n)},camelCaseDashObjectKeys(t,e=!0){const n=LP,o=function(t){return Array.isArray(t)};if((s=t)===Object(s)&&!o(s)&&"function"!=typeof s){const o={};return Object.keys(t).forEach(s=>{var i;o[i=s,i.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))]=e?n.camelCaseDashObjectKeys(t[s]):t[s]}),o}return o(t)?t.map(t=>n.camelCaseDashObjectKeys(t)):t;var s},IframeSubmit:function(t){const e="ajax-iframe-"+d;let n=u('form[name="'+e+'"]');n.length||(n=u("<iframe />").appendTo(document.body).attr({name:e,src:"#"})),u(t).on("submit",function(){const n=u(t).clone().appendTo(document.body);return n.attr("target",e),n.find("#submit").remove(),!1}),d++}};h(document).ready(function(){void 0!==h.alerts&&(h.alerts.overlayColor="#000",h.alerts.overlayOpacity=.5,h.alerts.okButton=lpGlobalSettings.localize.button_ok,h.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),h(".learn-press-message.fixed").each(function(){const t=h(this),e=t.data();!function(t,e){e.delayIn&&setTimeout(function(){t.show().hide().fadeIn()},e.delayIn),e.delayOut&&setTimeout(function(){t.fadeOut()},e.delayOut+(e.delayIn||0))}(t,e)}),setTimeout(function(){h(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")},300),function(){let t=null,e=function(){h(".auto-check-lines").checkLines(function(t){t>1?h(this).removeClass("single-lines"):h(this).addClass("single-lines"),h(this).attr("rows",t)})};h(window).on("resize.check-lines",function(){t?(t&&clearTimeout(t),t=setTimeout(e,300)):e()})}(),h(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),h(".learn-press-icon").LP_Tooltip({offset:[30,30]}),h(".learn-press-message[data-autoclose]").each(function(){const t=h(this),e=parseInt(t.data("autoclose"));e&&setTimeout(function(t){t.fadeOut()},e,t)}),h(document).on("click",function(){h(document).trigger("learn-press/close-all-quick-tip")})}),t({Event_Callback:function(t){const e={};window.jQuery,this.on=function(n,o){let s=n.split("."),i="";return s.length>1&&(n=s[0],i=s[1]),e[n]||(e[n]=[[],{}]),i?(e[n][1][i]||(e[n][1][i]=[]),e[n][1][i].push(o)):e[n][0].push(o),t},this.off=function(n,o){let s=n.split("."),i="";if(s.length>1&&(n=s[0],i=s[1]),!e[n])return t;let a=-1;if(i){if(!e[n][1][i])return t;if("function"==typeof o){if(a=e[n][1][i].indexOf(o),a<0)return t;e[n][1][i].splice(a,1)}else e[n][1][i]=[]}else if("function"==typeof o){if(a=e[n][0].indexOf(o),a<0)return t;e[n][0].splice(a,1)}else e[n][0]=[];return t},this.callEvent=function(n,o){if(e[n]){if(e[n][0])for(var s=0;s<e[n][0].length;s++)"function"==typeof e[n][0][s]&&e[n][s][0].apply(t,o);if(e[n][1])for(var s in e[n][1])for(let i=0;i<e[n][1][s].length;i++)"function"==typeof e[n][1][s][i]&&e[n][1][s][i].apply(t,o)}}},MessageBox:s,Cookies:c,localStorage:p,...f})})()})();