// source --> https://tudastar.szappanmentor.hu/wp-content/plugins/learnpress/assets/js/dist/utils.min.js?ver=4.3.6 
(()=>{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()})()})();
// source --> https://tudastar.szappanmentor.hu/wp-content/plugins/learnpress/assets/js/dist/frontend/single-course.min.js?ver=4.3.6 
(()=>{var e={9455(e,t,o){"use strict";o.d(t,{A:()=>r});var s=o(1601),n=o.n(s),i=o(6314),a=o.n(i)()(n());a.push([e.id,"/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n    padding: 12px 20px;\n    color: #ffffff;\n    display: inline-block;\n    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n    background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n    background: linear-gradient(135deg, #73a5ff, #5477f5);\n    position: fixed;\n    opacity: 0;\n    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n    border-radius: 2px;\n    cursor: pointer;\n    text-decoration: none;\n    max-width: calc(50% - 20px);\n    z-index: 2147483647;\n}\n\n.toastify.on {\n    opacity: 1;\n}\n\n.toast-close {\n    background: transparent;\n    border: 0;\n    color: white;\n    cursor: pointer;\n    font-family: inherit;\n    font-size: 1em;\n    opacity: 0.4;\n    padding: 0 5px;\n}\n\n.toastify-right {\n    right: 15px;\n}\n\n.toastify-left {\n    left: 15px;\n}\n\n.toastify-top {\n    top: -150px;\n}\n\n.toastify-bottom {\n    bottom: -150px;\n}\n\n.toastify-rounded {\n    border-radius: 25px;\n}\n\n.toastify-avatar {\n    width: 1.5em;\n    height: 1.5em;\n    margin: -7px 5px;\n    border-radius: 2px;\n}\n\n.toastify-center {\n    margin-left: auto;\n    margin-right: auto;\n    left: 0;\n    right: 0;\n    max-width: fit-content;\n    max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n    .toastify-right, .toastify-left {\n        margin-left: auto;\n        margin-right: auto;\n        left: 0;\n        right: 0;\n        max-width: fit-content;\n    }\n}\n",""]);const r=a},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",s=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),s&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),s&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,s,n,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(s)for(var r=0;r<this.length;r++){var c=this[r][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);s&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),n&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=n):d[4]="".concat(n)),t.push(d))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},5072(e){"use strict";var t=[];function o(e){for(var o=-1,s=0;s<t.length;s++)if(t[s].identifier===e){o=s;break}return o}function s(e,s){for(var i={},a=[],r=0;r<e.length;r++){var c=e[r],l=s.base?c[0]+s.base:c[0],d=i[l]||0,u="".concat(l," ").concat(d);i[l]=d+1;var p=o(u),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var m=n(f,s);s.byIndex=r,t.splice(r,0,{identifier:u,updater:m,references:1})}a.push(u)}return a}function n(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,n){var i=s(e=e||[],n=n||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var r=o(i[a]);t[r].references--}for(var c=s(e,n),l=0;l<i.length;l++){var d=o(i[l]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=c}}},7659(e){"use strict";var t={};e.exports=function(e,o){var s=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(o)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,o){"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var s="";o.supports&&(s+="@supports (".concat(o.supports,") {")),o.media&&(s+="@media ".concat(o.media," {"));var n=void 0!==o.layer;n&&(s+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),s+=o.css,n&&(s+="}"),o.media&&(s+="}"),o.supports&&(s+="}");var i=o.sourceMap;i&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7736(e){var t;t=function(e){var t=function(e){return new t.lib.init(e)};function o(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}function s(e,t){return!(!e||"string"!=typeof t||!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1))}return t.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},t.lib=t.prototype={toastify:"1.12.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||t.defaults.text,this.options.node=e.node||t.defaults.node,this.options.duration=0===e.duration?0:e.duration||t.defaults.duration,this.options.selector=e.selector||t.defaults.selector,this.options.callback=e.callback||t.defaults.callback,this.options.destination=e.destination||t.defaults.destination,this.options.newWindow=e.newWindow||t.defaults.newWindow,this.options.close=e.close||t.defaults.close,this.options.gravity="bottom"===e.gravity?"toastify-bottom":t.defaults.gravity,this.options.positionLeft=e.positionLeft||t.defaults.positionLeft,this.options.position=e.position||t.defaults.position,this.options.backgroundColor=e.backgroundColor||t.defaults.backgroundColor,this.options.avatar=e.avatar||t.defaults.avatar,this.options.className=e.className||t.defaults.className,this.options.stopOnFocus=void 0===e.stopOnFocus?t.defaults.stopOnFocus:e.stopOnFocus,this.options.onClick=e.onClick||t.defaults.onClick,this.options.offset=e.offset||t.defaults.offset,this.options.escapeMarkup=void 0!==e.escapeMarkup?e.escapeMarkup:t.defaults.escapeMarkup,this.options.ariaLive=e.ariaLive||t.defaults.ariaLive,this.options.style=e.style||t.defaults.style,e.backgroundColor&&(this.options.style.background=e.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");for(var t in e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'),this.options.style)e.style[t]=this.options.style[t];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){var s=document.createElement("img");s.src=this.options.avatar,s.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(s):e.insertAdjacentElement("afterbegin",s)}if(!0===this.options.close){var n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="&#10006;",n.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var i=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&i>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0){var a=this;e.addEventListener("mouseover",function(t){window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",function(){e.timeOutValue=window.setTimeout(function(){a.removeElement(e)},a.options.duration)})}if(void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var r=o("x",this.options),c=o("y",this.options),l="left"==this.options.position?r:"-"+r,d="toastify-top"==this.options.gravity?c:"-"+c;e.style.transform="translate("+l+","+d+")"}return e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e="string"==typeof this.options.selector?document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||"undefined"!=typeof ShadowRoot&&this.options.selector instanceof ShadowRoot?this.options.selector:document.body))throw"Root element is not defined";var o=t.defaults.oldestFirst?e.firstChild:e.lastChild;return e.insertBefore(this.toastElement,o),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},o={top:15,bottom:15},n={top:15,bottom:15},i=document.getElementsByClassName("toastify"),a=0;a<i.length;a++){e=!0===s(i[a],"toastify-top")?"toastify-top":"toastify-bottom";var r=i[a].offsetHeight;e=e.substr(9,e.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(i[a].style[e]=n[e]+"px",n[e]+=r+15):!0===s(i[a],"toastify-left")?(i[a].style[e]=t[e]+"px",t[e]+=r+15):(i[a].style[e]=o[e]+"px",o[e]+=r+15)}return this},t.lib.init.prototype=t.lib,t},e.exports?e.exports=t():this.Toastify=t()}},t={};function o(s){var n=t[s];if(void 0!==n)return n.exports;var i=t[s]={id:s,exports:{}};return e[s].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nc=void 0,(()=>{"use strict";window.React,window.wp.element,window.LP.quiz;const e=jQuery,{throttle:t}=lodash;document.addEventListener("DOMContentLoaded",()=>{(()=>{const t=document.querySelector("#sidebar-toggle");t&&(e(window).innerWidth()<=768||LP.Cookies.get("sidebar-toggle")?t.setAttribute("checked","checked"):t.removeAttribute("checked")),document.addEventListener("click",t=>{var o;"sidebar-toggle"===t.target.id&&(LP.Cookies.set("sidebar-toggle",!!t.target.checked),o=LP.Cookies.get("sidebar-toggle"),e("body").removeClass("lp-sidebar-toggle__open"),e("body").removeClass("lp-sidebar-toggle__close"),o?e("body").addClass("lp-sidebar-toggle__close"):e("body").addClass("lp-sidebar-toggle__open"))})})()});const s=jQuery;let n=null;const i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init(){return!!this.instance||(this.elLPOverlay=s(".lp-overlay"),!!this.elLPOverlay.length&&(n=this.elLPOverlay,this.elMainContent=n.find(".main-content"),this.elTitle=n.find(".modal-title"),this.elBtnYes=n.find(".btn-yes"),this.elBtnNo=n.find(".btn-no"),this.elFooter=n.find(".lp-modal-footer"),s(document).on("click",".close, .btn-no",function(){n.hide()}),s(document).on("click",".btn-yes",function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes(e)}),this.instance=this,!0))},setElCalledModal(e){this.elCalledModal=e},setContentModal(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal(e){this.elTitle.html(e)}},a=i,r={elBtnFinishCourse:null,elBtnCompleteItem:null,init(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",e=>{e.preventDefault();const t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title);const o=document.createElement("div");o.appendChild(document.createTextNode(t.dataset.confirm));const s=o.innerHTML;a.setContentModal('<div class="pd-2em">'+s+"</div>"),a.callBackYes=()=>{t.submit()}}),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach(e=>e.addEventListener("click",e=>{e.preventDefault();const t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=()=>{t.submit()}})))}},c=window.wp.url,l=jQuery,d={init(){this.scrollToItemViewing=function(){const e=l(".viewing-course-item");if(e.length){const t=l("#learn-press-course-curriculum"),o=(l("#popup-sidebar").outerHeight(),l(".section-title").outerHeight(),l(".section-header").outerHeight()),s=new RegExp("^viewing-course-item-([0-9].*)"),n=e.attr("class").split(/\s+/);let i=0;if(l.each(n,function(e,t){const o=s.exec(t);if(o)return i=o[1],!1}),0===i)return;const a=l(".course-item-"+i);a.addClass("current"),a.offset().top;const r=a.offset().top-t.offset().top+t.scrollTop();t.animate({scrollTop:LP.Hook.applyFilters("scroll-item-current",r-o)},800)}},this.scrollToItemViewing()}},u=()=>{const e=document.querySelector("#popup-course"),t=document.querySelector("#learn-press-course-curriculum");if(e&&t){const o=t.querySelector(".curriculum-sections"),s=e.querySelector(".search-course"),n=e.querySelector('.search-course input[type="text"]');if(!n||!o||!s)return;const i=o.querySelectorAll("li.section"),a=o.querySelectorAll("li.course-item"),r=[];a.forEach(e=>{const t=e.dataset.id,o=e.querySelector(".item-name");r.push({id:t,name:o?o.textContent.toLowerCase():""})});const c=e=>{e.preventDefault();const t=n.value;s.classList.add("searching"),t||s.classList.remove("searching");const o=[];r.forEach(e=>{t&&!e.name.match(t.toLowerCase())||(o.push(e.id),a.forEach(e=>{-1!==o.indexOf(e.dataset.id)?e.classList.remove("hide-if-js"):e.classList.add("hide-if-js")}))}),i.forEach(e=>{const t=e.querySelectorAll(".course-item"),s=[];t.forEach(e=>{o.includes(e.dataset.id)&&s.push(e.dataset.id)}),0===s.length?e.classList.add("hide-if-js"):e.classList.remove("hide-if-js")})},l=s.querySelector(".clear");l&&l.addEventListener("click",e=>{e.preventDefault(),n.value="",c(e)}),s.addEventListener("submit",c),n.addEventListener("keyup",c)}};function p(e=""){let t=0;const o=document.querySelector(".viewing-course-item");if(o){const e=new RegExp("^viewing-course-item-([0-9].*)");o.classList.forEach(function(o){const s=e.exec(o);if(s)return t=s[1],!1})}let s=!1,n=!1;const i=async({ele:e,returnData:t,sectionID:o,itemID:s,data2:n,pages2:i,page2:r})=>{const c=(new DOMParser).parseFromString(t,"text/html");if(n){const e=c.querySelector(".curriculum-sections"),t=c.querySelector(".curriculum-more__button");t&&(i<=r?t.remove():t.dataset.page=r),e.insertAdjacentHTML("beforeend",n)}const l=c.querySelector(`[data-section-id="${o}"]`);if(l){const e=[...l.querySelectorAll(".course-item")].map(e=>e.dataset.id),t=l.querySelector(".section-content"),n=l.querySelector(".section-item__loadmore");if(s&&!e.includes(s)){const e=await a("",2,o,s),{data3:i,pages3:r,paged3:c,page:l}=e;r<=c||r<=l?n.remove():n.dataset.page=l,i&&t&&t.insertAdjacentHTML("beforeend",i)}}e.insertAdjacentHTML("beforeend",c.body.innerHTML),d.init()},a=async(e,t,o,n)=>{let i=lpData.lp_rest_url+"lp/v1/lazy-load/course-curriculum-items/";i=(0,c.addQueryArgs)(i,{sectionId:o||"",page:t});let r={};0!==parseInt(lpData.user_id)&&(r={headers:{"X-WP-Nonce":lpData.nonce}});let l=await fetch(i,{method:"GET",...r});l=await l.json();const{data:d,status:u,pages:p,message:f}=l,{page:m}=d;let h;if("success"===u){const s=d.content;if(h=d.item_ids,e+=s,o&&h&&n&&!h.includes(n))return a(e,t+1,o,n)}return s=!1,{data3:e,pages3:p||d.pages,status3:u,message3:f,page:m||0}},r=async(t,o,s)=>{let i=lpData.lp_rest_url+"lp/v1/lazy-load/course-curriculum/";i=(0,c.addQueryArgs)(i,{courseId:e||lpGlobalSettings.post_id||"",page:o,sectionID:s||"",loadMore:!0});let a={};0!==parseInt(lpData.user_id)&&(a={headers:{"X-WP-Nonce":lpData.nonce}});let l=await fetch(i,{method:"GET",...a});l=await l.json();const{data:d,status:u,message:p}=l,f=d.content,m=d.section_ids,h=d.pages;return"success"===u&&(t+=f,s&&m&&m.length>0&&!m.includes(s))?r(t,o+1,s):(n=!1,{data2:t,pages2:h||d.pages,page2:o,status2:u,message2:p})};(()=>{const o=document.querySelector(".learnpress-course-curriculum");o&&(async o=>{const s=o.querySelector(".lp-skeleton-animation"),n=o.dataset.id,a=o.dataset.section;try{const s=1;let l=lpData.lp_rest_url+"lp/v1/lazy-load/course-curriculum/";l=(0,c.addQueryArgs)(l,{courseId:e||lpGlobalSettings.post_id||"",page:s,sectionID:a||"",idItemViewing:t});let d={};0!==parseInt(lpData.user_id)&&(d={headers:{"X-WP-Nonce":lpData.nonce}});let u=await fetch(l,{method:"GET",...d});u=await u.json();const{data:p,status:f,message:m}=u,h=p.section_ids;if("error"===f)throw new Error(m||"Error");const g=p.content;if(a)if(h&&!h.includes(a)){const e=await r("",s+1,a);if(e){const{data2:t,pages2:s,page2:r}=e;await i({ele:o,returnData:g,sectionID:a,itemID:n,data2:t,pages2:s,page2:r})}}else await i({ele:o,returnData:g,sectionID:a,itemID:n});else g&&o.insertAdjacentHTML("beforeend",g)}catch(e){o.insertAdjacentHTML("beforeend",`<div class="lp-ajax-message error" style="display:block">${e.message||"Error: Query lp/v1/lazy-load/course-curriculum"}</div>`)}s&&s.remove(),u()})(o)})(),document.addEventListener("click",e=>{[...document.querySelectorAll(".section-item__loadmore")].map(async t=>{if(t.contains(e.target)&&!s){s=!0;const e=t.parentNode,o=e.getAttribute("data-section-id"),n=e.querySelector(".section-content"),i=parseInt(t.dataset.page);t.classList.add("loading");try{const e=await a("",i+1,o,""),{data3:s,pages3:r,status3:c,message3:l}=e;if("error"===c)throw new Error(l||"Error");r<=i+1?t.remove():t.dataset.page=i+1,n.insertAdjacentHTML("beforeend",s)}catch(e){n.insertAdjacentHTML("beforeend",`<div class="lp-ajax-message error" style="display:block">${e.message||"Error: Query lp/v1/lazy-load/course-curriculum"}</div>`)}t.classList.remove("loading"),u()}}),[...document.querySelectorAll(".curriculum-more__button")].map(async t=>{if(t.contains(e.target)&&!n){n=!0;const e=parseInt(t.dataset.page),o=t.parentNode.parentNode.querySelector(".curriculum-sections");if(e&&o){t.classList.add("loading");try{const s=await r("",e+1,""),{data2:n,pages2:i,status2:a,message2:c}=s;if("error"===a)throw new Error(c||"Error");i<=e+1?t.remove():t.dataset.page=e+1,o.insertAdjacentHTML("beforeend",n)}catch(e){o.insertAdjacentHTML("beforeend",`<div class="lp-ajax-message error" style="display:block">${e.message||"Error: Query lp/v1/lazy-load/course-curriculum"}</div>`)}t.classList.remove("loading"),u()}}}),document.querySelector(".learnpress-course-curriculum")&&[...document.querySelectorAll(".section")].map(t=>{t.contains(e.target)&&t.querySelector(".section-left").contains(e.target)&&t.classList.toggle("closed")})})}const f="loading",m=(e,t)=>{e&&(t?e.classList.add(f):e.classList.remove(f))};var h=o(7736),g=o.n(h),y=o(5072),v=o.n(y),b=o(7825),w=o.n(b),L=o(7659),E=o.n(L),x=o(5056),k=o.n(x),S=o(540),C=o.n(S),T=o(1113),_=o.n(T),q=o(9455),A={};function D(e,t,o){const s=document.querySelectorAll(e);s.length&&s.forEach(s=>{const n=s.querySelector(t),i=e.replace(".","")+"__open",a=s.querySelector(e+"__close"),r=()=>s.classList.contains(i),c=()=>{r()&&s.classList.remove(i)};n&&(n.onclick=function(e){e.preventDefault(),r()?c():r()||s.classList.add(i)}),document.addEventListener("click",e=>{if(!r())return;const s=e.target;s.closest(o)||s.closest(t)||c()}),a&&a.addEventListener("click",e=>{e.preventDefault(),c()}),document.addEventListener("keydown",e=>{27===e.keyCode&&c()},!1)})}A.styleTagTransform=_(),A.setAttributes=k(),A.insert=E().bind(null,"head"),A.domAPI=w(),A.insertStyleElement=C(),v()(q.A,A),q.A&&q.A.locals&&q.A.locals;const M=jQuery;document.addEventListener("DOMContentLoaded",function(){M("#popup-course"),M("#learn-press-course-curriculum"),(()=>{const e=document.querySelectorAll(".course-extra-box");[...e].map(t=>{const o=t.querySelector(".course-extra-box__title");t.classList.remove("active");const s=t.querySelector(".course-extra-box__content");s.style.height="0",o.addEventListener("click",()=>{const o=t.classList.contains("active");[...e].forEach(e=>{e!==t&&(e.classList.remove("active"),e.querySelector(".course-extra-box__content").style.height="0")}),o?(t.classList.remove("active"),s.style.height="0"):(t.classList.add("active"),s.style.height=s.scrollHeight+"px")})})})(),M("#learn-press-course-tabs").on("change",'input[name="learn-press-course-tab-radio"]',function(e){const t=M('input[name="learn-press-course-tab-radio"]:checked').val();LP.Cookies.set("course-tab",t),M('label[for="'+M(e.target).attr("id")+'"]').closest("li").addClass("active").siblings().removeClass("active")}),function(){const e=M(".course-summary-sidebar");if(!e.length)return;const t=M(window),o=e.children(),s=e.offset();let n=0;const i=e.height(),a=o.height();t.on("scroll.fixed-course-sidebar",function(){n=t.scrollTop();const r=n-s.top+32;if(r<0)return e.removeClass("slide-top slide-down"),void o.css("top","");r>i-a?(e.removeClass("slide-down").addClass("slide-top"),o.css("top",i-a)):(e.removeClass("slide-top").addClass("slide-down"),o.css("top",32))}).trigger("scroll.fixed-course-sidebar")}(),(()=>{const e=document.querySelectorAll("form.enroll-course");e.length>0&&e.forEach(e=>{e.addEventListener("submit",t=>{t.preventDefault();const o=e.querySelector("input[name=enroll-course]").value,s=e.querySelector("button.button-enroll-course");m(s,1),(async(t,o)=>{try{const s=await wp.apiFetch({path:"lp/v1/courses/enroll-course",method:"POST",data:{id:t}}),{status:n,data:{redirect:i},message:a}=s;if("success"!==n)throw m(o,0),new Error(a);o.remove(),a&&n&&(e.innerHTML+=`<div class="learn-press-message ${n}">${a}</div>`,i&&(window.location.href=i))}catch(e){g()({text:e.message,gravity:lpData.toast.gravity,position:lpData.toast.position,className:`${lpData.toast.classPrefix} error`,close:1==lpData.toast.close,stopOnFocus:1==lpData.toast.stopOnFocus,duration:lpData.toast.duration}).showToast()}})(o,s)})}),null!==document.querySelector(".course-detail-info")&&window.addEventListener("pageshow",e=>{(e.persisted||void 0!==window.performance&&"back_forward"==String(window.performance.getEntriesByType("navigation")[0].type))&&location.reload()})})(),(()=>{const e=document.querySelectorAll("form.purchase-course");e.length>0&&e.forEach(e=>{const t=async(o,s,n=!1)=>{try{const i=new FormData(e),r=Object.fromEntries(Array.from(i.keys(),e=>{const t=i.getAll(e);return[e,t.length>1?t:t.pop()]}));r.id=o,r.repurchaseType=n;const c=await wp.apiFetch({path:"lp/v1/courses/purchase-course",method:"POST",data:r}),{status:l,data:{redirect:d,type:u,html:p,titlePopup:f},message:h}=c;if("success"!==l)throw m(s,0),new Error(h);if("allow_repurchase"===u?m(s,0):s.remove(),"allow_repurchase"===u&&"success"===l){if(!e.querySelector(".lp_allow_repurchase_select")){if(!a.init())return;a.elLPOverlay.show(),a.setTitleModal(f||""),a.setContentModal(p),a.callBackYes=()=>{a.elLPOverlay.hide(),document.querySelectorAll(".lp_allow_repurchase_select").forEach(o=>{const s=o.querySelectorAll("[name=_lp_allow_repurchase_type]");for(let o=0,n=s.length;o<n;o++)if(s[o].checked){const n=s[o].value,i=e.querySelector("input[name=purchase-course]").value,a=e.querySelector("button.button-purchase-course");m(a,1),t(i,a,n);break}})}}}else h&&l&&(e.innerHTML+=`<div class="learn-press-message ${l}">${h}</div>`,"success"===l&&d&&(window.location.href=d))}catch(e){g()({text:e.message,gravity:lpData.toast.gravity,position:lpData.toast.position,className:`${lpData.toast.classPrefix} error`,close:1==lpData.toast.close,stopOnFocus:1==lpData.toast.stopOnFocus,duration:lpData.toast.duration}).showToast()}};e.addEventListener("submit",o=>{o.preventDefault();const s=e.querySelector("input[name=purchase-course]").value,n=e.querySelector("button.button-purchase-course");m(n,1),t(s,n)})})})(),(()=>{const e=document.querySelectorAll(".lp-form-retake-course");e.length&&e.forEach(e=>{const t=e.querySelector(".button-retake-course"),o=e.querySelector("[name=retake-course]").value,s=e.querySelector(".lp-ajax-message");e.addEventListener("submit",e=>{e.preventDefault()}),t.addEventListener("click",e=>{var n;e.preventDefault(),t.classList.add("loading"),t.disabled=!0,n=t,wp.apiFetch({path:"/lp/v1/courses/retake-course",method:"POST",data:{id:o}}).then(e=>{const{status:t,message:o,data:i}=e;s.innerHTML=o,null!=t&&"success"===t?(n.style.display="none",setTimeout(()=>{window.location.replace(i.url_redirect)},1e3)):s.classList.add("error")}).catch(e=>{s.classList.add("error"),s.innerHTML="error: "+e.message}).then(()=>{n.classList.remove("loading"),n.disabled=!1,s.style.display="block"})})})})(),(()=>{const e=document.querySelectorAll(".lp-course-progress-wrapper");if(!e.length)return;if("IntersectionObserver"in window){const o=new IntersectionObserver((e,s)=>{e.forEach(e=>{if(e.isIntersecting){const s=e.target;setTimeout(function(){t(s)},600),o.unobserve(s)}})});[...e].map(e=>o.observe(e))}const t=async e=>{let t="lp/v1/lazy-load/course-progress";lpData.urlParams.hasOwnProperty("lang")&&(t+="?lang="+lpData.urlParams.lang);const o=await wp.apiFetch({path:t,method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpData.user_id||""}}),{data:s}=o;e.innerHTML=s}})(),(()=>{const e=document.querySelectorAll("form.continue-course");e.length&&lpData.user_id>0&&(async()=>await wp.apiFetch({path:"lp/v1/courses/continue-course",method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}}))().then(function(t){"success"===t.status&&e.forEach(e=>{e.style.display="inline-block",e.action=t.data})})})(),r.init(),document.addEventListener("click",function(e){const t=e.target;if(t.classList.contains("lp-loadmore-material")){const e=t,o=t.closest(".lp-target"),s=window.lpAJAXG.getDataSetCurrent(o);s.args.paged++,m(e,1);const n={success:t=>{const{status:n,message:i,data:a}=t;"success"===n?(o.querySelector("table.course-material-table tbody").insertAdjacentHTML("beforeend",a.content),a.paged===a.total_pages&&e.remove(),window.lpAJAXG.setDataSetCurrent(o,s)):console.error(i)},error:e=>{console.error(e)},completed:()=>{m(e,0)}};window.lpAJAXG.fetchAJAX(s,n)}}),function(){const e=document.querySelector(".TabsDragScroll");if(!e)return;const t=e.querySelector("ul");let o=!1;t.addEventListener("mousemove",e=>{o&&(t.scrollLeft-=e.movementX,t.classList.add("dragging"))}),document.addEventListener("mouseup",()=>{o=!1,t.classList.remove("dragging")}),t.addEventListener("mousedown",()=>{o=!0}),t.querySelectorAll("li").forEach(e=>{e.addEventListener("click",()=>(e=>{const o=e.offsetLeft,s=e.offsetWidth,n=t.clientWidth/2-s/2;t.scrollTo({left:o-n,behavior:"smooth"})})(e))})}(),function(){D(".social-share-toggle",".share-toggle-icon",".content-widget-social-share");var e=document.querySelector(".btn-clipboard");e&&e.addEventListener("click",function(t){var o=document.querySelector(".clipboard-value");o.focus(),o.select();try{document.execCommand("copy");var s=e.getAttribute("data-copied");e.innerHTML=s+'<span class="tooltip">'+s+"</span>"}catch(e){}})}()});const O=setInterval(function(){document.querySelector(".learnpress-course-curriculum")&&(p(),clearInterval(O))},1);LP.Hook.addAction("lp_course_curriculum_skeleton",function(e){p(e)})})()})();
// source --> https://tudastar.szappanmentor.hu/wp-content/plugins/gallery-lightbox-slider/js/jquery/photobox/jquery.photobox.min.js?ver=1.0.0.43 
/*!
    photobox v1.9.9
    (c) 2013 Yair Even Or <http://dropthebit.com>

    MIT-style license.
*/

/* MouseWheel plugin
    * ! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
    * Licensed under the MIT License (LICENSE.txt).
    *
    * Version: 3.1.11
    *
    * Requires: jQuery 1.2.2+
*/

!function(c,s,a){"use strict";var n,r,l,h,u,d,p,f,m,v,g,b,i,w,y,A,C,x,o,T,k,t,L,M,H,D,O,E,z,P,S,F,X,B,I=[],N=-1,R=!("placeholder"in s.createElement("input")),Y=((le=c("<p>")[0]).style.cssText="pointer-events:auto",!le.style.pointerEvents),j=!1,q=c(),W="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_=te("transformOrigin"),e=te("transition"),U="transitionend webkitTransitionEnd oTransitionEnd otransitionend",Q=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},K={},G=new Image,Z=new Image,J={single:!1,beforeShow:null,afterClose:null,loop:!0,thumb:null,thumbs:!0,thumbAttr:"data-src",counter:"(A/B)",title:!0,autoplay:!1,time:3e3,history:!1,hideFlash:!0,zoomable:!0,wheelNextPrev:!0,keys:{close:[27,88,67],prev:[37,80],next:[39,78]}},V=c('<div id="pbOverlay">').append(x=c('<input type="checkbox" id="pbThumbsToggler" checked hidden>'),k=c('<div class="pbLoader"><b></b><b></b><b></b></div>'),A=c('<div id="pbPrevBtn" class="prevNext"><b></b></div>').on("click",ne),C=c('<div id="pbNextBtn" class="prevNext"><b></b></div>').on("click",ne),M=c('<div class="pbWrapper">').append(w=c("<img>"),y=c("<div>")),c('<div id="pbCloseBtn">').on("click",ge)[0],t=c('<div id="pbAutoplayBtn">').append(c('<div class="pbProgress">')),o=c('<div id="pbCaption">').append('<label for="pbThumbsToggler" title="thumbnails on/off"></label>',T=c('<div class="pbCaptionText">').append('<div class="title"></div><div class="counter">'),L=c("<div>").addClass("pbThumbs")));function $(){Y&&V.hide(),c(s).on("touchstart.testMouse",function(){c(s).off("touchstart.testMouse"),j=!0,V.addClass("mobile")}),t.off().on("click",b.toggle),L.off().on("click","a",v.click),R&&V.addClass("msie"),V.off().on("click","img",function(e){e.stopPropagation()}),c(s.body).append(V),g=s.documentElement}function ee(e,t,o){1==t?(w.css({transform:"translateX(25%)",transition:".2s",opacity:0}),setTimeout(function(){i(f)},200)):-1==t&&(w.css({transform:"translateX(-25%)",transition:".2s",opacity:0}),setTimeout(function(){i(m)},200)),1==o?x.prop("checked",!0):-1==o&&x.prop("checked",!1)}function te(e){var t,o=s.createElement("p").style,i=["ms","O","Moz","Webkit"];if(""==o[e])return e;for(e=e.charAt(0).toUpperCase()+e.slice(1),t=i.length;t--;)if(""==o[i[t]+e])return i[t]+e}function oe(e){var t=e.keyCode,e=l.keys;return 0<=c.inArray(t,e.close)&&ge()||0<=c.inArray(t,e.next)&&!l.single&&se(m)||0<=c.inArray(t,e.prev)&&!l.single&&se(f)||!0}function ie(e,t,o){1==o?se(m):-1==o&&se(f)}function ne(){return se("pbPrevBtn"==this.id?f:m),!1}function se(e){if(!l.loop&&(N==I.length-1&&e==m||0==N&&e==f))return;i(e)}function ae(){if(T.off(U).removeClass("change"),l.counter){try{var e=l.counter.replace("A",N+1).replace("B",I.length)}catch(e){l.counter="(A/B)",ae()}o.find(".counter").text(e)}l.title&&o.find(".title").html("<span>"+I[N][1]+"</span>")}c.fn.photobox=function(t,o,i){return this.each(function(){var e=c(this).data("_photobox");return e?("destroy"===t&&e.destroy(),this):("string"!=typeof t&&(t="a"),"prepareDOM"===t?($(),this):(e=c.extend({},J,o||{}),r=new n(e,this,t),c(this).data("_photobox",r),void(r.callback=i)))})},(n=function(e,t,o){this.options=c.extend({},e),this.target=o,this.selector=c(t||s),this.thumbsList=null;o=this.imageLinksFilter(this.selector.find(o));this.imageLinks=o[0],this.images=o[1],this.init()}).prototype={init:function(){var t=this;this.selector.one("mouseenter.photobox",this.target,function(e){t.thumbsList=v.generate.apply(t)}),this.selector.on("click.photobox",this.target,function(e){e.preventDefault(),t.open(this)}),this.observerTimeout=null,R||1!=this.selector[0].nodeType||this.observeDOM(this.selector[0],this.onDOMchanges.bind(this))},onDOMchanges:function(){var i=this;clearTimeout(this.observerTimeout),i.observerTimeout=setTimeout(function(){var e,t=i.imageLinksFilter(i.selector.find(i.target)),o=0;if(i.imageLinks.length!=t[0].length){if(i.imageLinks=t[0],i.images=t[1],r&&i.selector==r.selector)for(I=i.images,h=i.imageLinks,e=I.length;e--;)I[e][0];i.thumbsList=v.generate.apply(i),L.html(i.thumbsList),i.images.length&&u&&i.options.thumbs&&(-1==(o=i.thumbsList.find('a[href="'+u+'"]').eq(0).parent().index())&&(o=0),v.changeActive(o,0))}},50)},open:function(e){var t=c.inArray(e,this.imageLinks);return-1==t||(l=this.options,I=this.images,h=this.imageLinks,(r=this).setup(1),V.on(U,function(){V.off(U).addClass("on"),i(t,!0)}).addClass("show"),R&&V.trigger("MSTransitionEnd")),!1},imageLinksFilter:function(e){var n,s=this,a=[],r={};return[e.filter(function(e){var t,o=c(this),i="";return r.content=o[0].getAttribute("title")||"",s.options.thumb&&(t=o.find(s.options.thumb)[0]),s.options.thumb&&t||(t=o.find("img")[0]),t&&(n=t.getAttribute("data-pb-captionlink"),i=t.getAttribute(s.options.thumbAttr)||t.getAttribute("src"),r.content=t.getAttribute("alt")||t.getAttribute("title")||""),n&&(2==(n=n.split("[")).length?(r.linkText=n[0],r.linkHref=n[1].slice(0,-1)):(r.linkText=n,r.linkHref=n),r.content+=' <a href="'+r.linkHref+'">'+r.linkText+"</a>"),a.push([o[0].href,r.content,i]),!0}),a]},observeDOM:(H=a.MutationObserver||a.WebKitMutationObserver,D=a.addEventListener,function(e,o){var i;H?(i=this,new H(function(e,t){(e[0].addedNodes.length||e[0].removedNodes.length)&&o(i)}).observe(e,{childList:!0,subtree:!0})):D&&(e.addEventListener("DOMNodeInserted",o.bind(i),!1),e.addEventListener("DOMNodeRemoved",o.bind(i),!1))}),setup:function(e){var t,o,i,n=e?"on":"off";l.thumbs&&(j||L[n]("mouseenter.photobox",v.calc)[n]("mousemove.photobox",v.move)),e?(w.css({transition:"0s"}).removeAttr("style"),V.show(),L.html(this.thumbsList).trigger("mouseenter.photobox"),l.thumbs?V.addClass("thumbs"):(x.prop("checked",!1),V.removeClass("thumbs")),this.images.length<2||l.single?V.removeClass("thumbs hasArrows hasCounter hasAutoplay"):(V.addClass("hasArrows hasCounter"),1e3<l.time?(V.addClass("hasAutoplay"),l.autoplay?b.progress.start():b.pause()):V.removeClass("hasAutoplay")),l.hideFlash&&c("iframe, object, embed").css("visibility","hidden")):c(a).off("resize.photobox"),c(s).off("keydown.photobox")[n]({"keydown.photobox":oe}),j&&(V.removeClass("hasArrows"),M[n]("swipe",ee)),l.zoomable&&(V[n]({"mousewheel.photobox":pe}),R||L[n]({"mousewheel.photobox":fe})),!l.single&&l.wheelNextPrev&&V[n]({"mousewheel.photobox":(t=ie,i=!(o=1e3),function(){i||(t.call(),i=!0,setTimeout(function(){i=!1},o))})})},destroy:function(){l=this.options,this.selector.off("click.photobox",this.target).removeData("_photobox"),ge()}},F=S=P=0,b={autoPlayTimer:!(v={generate:function(){for(var e,t,o,i,n=c("<ul>"),s=[],a=this.imageLinks.length,r=!1,l=0;l<a;l++)r=!!c(this.imageLinks[l]).parent().hasClass("bx-clone"),o=this.imageLinks[l],(t=this.images[l][2])&&(e=this.images[l][1],i=o.rel?" class='"+o.rel+"'":"",s.push("<li "+(r?'style="display:none;"':"")+" "+i+'><a href="'+o.href+'"><img src="'+t+'" alt="" title="'+e+'" /></a></li>'));return n.html(s.join("")),n},click:function(e){e.preventDefault(),q.removeClass("active"),q=c(this).parent().addClass("active");e=c(this.parentNode).index();return i(e,0,1)},changeActiveTimeout:X=null,changeActive:function(e,t,o){l.thumbs&&(q.index(),q.removeClass("active"),q=L.find("li").eq(e).addClass("active"),!o&&q[0]&&(clearTimeout(this.changeActiveTimeout),this.changeActiveTimeout=setTimeout(function(){var e=q[0].offsetLeft+q[0].clientWidth/2-g.clientWidth/2;t?L.delay(800):L.stop(),L.animate({scrollLeft:e},500,"swing")},200)))},calc:function(e){return E=L[0],P=E.clientWidth,S=E.scrollWidth,O=.15*P,F=L.offset().left,z=e.pageX-O-F,z=(S-P)*(z/(P-2*O)),L.animate({scrollLeft:z},200),clearTimeout(X),X=setTimeout(function(){X=null},200),this},move:function(e){var t;X||((e=e.pageX-O-F)<0&&(e=0),t=(S-P)*(e/(P-2*O)),Q(function(){E.scrollLeft=t}))}}),play:function(){b.autoPlayTimer=setTimeout(function(){i(m)},l.time),b.progress.start(),t.removeClass("play"),b.setTitle("Click to stop autoplay"),l.autoplay=!0},pause:function(){clearTimeout(b.autoPlayTimer),b.progress.reset(),t.addClass("play"),b.setTitle("Click to resume autoplay"),l.autoplay=!1},progress:{reset:function(){t.find("div").removeAttr("style"),setTimeout(function(){t.removeClass("playing")},200)},start:function(){R||t.find("div").css(e,l.time+"ms"),t.addClass("playing")}},setTitle:function(e){e&&t.prop("title",e+" (every "+l.time/1e3+" seconds)")},toggle:function(e){e.stopPropagation(),b[l.autoplay?"pause":"play"]()}},i=function(e,t,o){var i,n,s;B||(B=setTimeout(function(){B=null},150),(!e||e<0)&&(e=0),l.loop||(C.toggleClass("pbHide",e==I.length-1),A.toggleClass("pbHide",0==e)),"function"==typeof l.beforeShow&&l.beforeShow(h[e]),V.removeClass("error"),0<=N&&V.addClass(N<e?"next":"prev"),d=N,u=I[N=e][0],f=(N||(l.loop?I.length:0))-1,m=(N+1)%I.length||(l.loop?0:-1),ve(),y.empty(),K.onerror=null,w.add(y).data("zoom",1),"video"==(p="video"==h[e].rel?"video":"image")?(y.html((n=I[N][0],s=c("<a>").prop("href",I[N][0])[0].search?"&":"?",n+=s+"vq=hd720&wmode=opaque",c("<iframe>").prop({scrolling:"no",frameborder:0,allowTransparency:!0,src:n}).attr({webkitAllowFullScreen:!0,mozallowfullscreen:!0,allowFullScreen:!0}))).addClass("pbHide"),ue(t)):(i=setTimeout(function(){V.addClass("pbLoading")},50),R&&V.addClass("pbHide"),l.autoplay&&b.progress.reset(),(K=new Image).onload=function(){K.onload=null,0<=f&&(G.src=I[f][0]),0<=m&&(Z.src=I[m][0]),clearTimeout(i),ue(t)},K.onerror=ce,K.src=u),T.on(U,ae).addClass("change"),(t||R)&&ae(),v.changeActive(e,t,o),he.save())};var re,le,he={save:function(){"pushState"in window.history&&decodeURIComponent(window.location.hash.slice(1))!=u&&l.history&&window.history.pushState("photobox",s.title+"-"+I[N][1],window.location.pathname+window.location.search+"#"+encodeURIComponent(u))},load:function(){if(l&&!l.history)return!1;var e=decodeURIComponent(window.location.hash.slice(1));!e&&V.hasClass("show")&&ge(),c('a[href="'+e+'"]').trigger("click.photobox")},clear:function(){l.history&&"pushState"in window.history&&window.history.pushState("photobox",s.title,window.location.pathname+window.location.search)}};function ce(){V.addClass("error"),w[0].src=W,K.onerror=null}function ue(e){var t,o;function i(){clearTimeout(o),t.off(U).css({transition:"none"}),V.removeClass("video"),"video"==p?(w[0].src=W,y.addClass("prepare"),V.addClass("video")):w.prop({src:u,class:"prepare"}),setTimeout(function(){w.add(y).removeAttr("style").removeClass("prepare"),V.removeClass("pbHide next prev"),setTimeout(function(){w.add(y).on(U,de),R&&de()},0)},50)}o=setTimeout(i,2e3),k.fadeOut(300,function(){V.removeClass("pbLoading"),k.removeAttr("style")}),V.addClass("pbHide"),w.add(y).removeAttr("style").removeClass("zoomable"),null==h[d]||e||"video"!=h[d].rel?t=w:(t=y,w.addClass("prepare")),e||R?i():t.on(U,i)}function de(){w.add(y).off(U).addClass("zoomable"),"video"==p?y.removeClass("pbHide"):t&&l.autoplay&&b.play(),r&&"function"==typeof r.callback&&r.callback.apply(h[N])}function pe(e,t,o){if(o)return!1;if("video"==p){var i=y.data("zoom")||1;if((i+=t/10)<.5)return!1;y.data("zoom",i).css({width:624*i,height:351*i})}else{i=w.data("zoom")||1,o=w[0].getBoundingClientRect();(i+=t/10)<.1&&(i=.1),Q(function(){w.data("zoom",i).css({transform:"scale("+i+")"})}),o.height>g.clientHeight||o.width>g.clientWidth?c(s).on("mousemove.photobox",me):(c(s).off("mousemove.photobox"),w[0].style[_]="50% 50%")}return!1}function fe(e,t){e.preventDefault(),e.stopPropagation();e=r.thumbsList;e.css("height",e[0].clientHeight+10*t),t=o[0].clientHeight/2,M[0].style.cssText="margin-top: -"+t+"px; padding: "+t+"px 0;",L.hide().show(0)}function me(e){var t=(e.clientY/g.clientHeight*(g.clientHeight+200)-100)/g.clientHeight*100,o=(e.clientX/g.clientWidth*100).toFixed(2)+"% "+t.toFixed(2)+"%";Q(function(){w[0].style[_]=o})}function ve(){clearTimeout(b.autoPlayTimer),c(s).off("mousemove.photobox"),K.onload=function(){},K.src=G.src=Z.src=u}function ge(){if(!V.hasClass("show"))return!1;function e(){""!=V[0].className&&(V.removeClass("show pbHide error pbLoading"),w.removeAttr("class").removeAttr("style").off().data("zoom",1),w[0].src=W,o.find(".title").empty(),Y&&setTimeout(function(){V.hide()},200),l.hideFlash&&c("iframe, object, embed").css("visibility","visible"))}ve(),y.find("iframe").prop("src","").empty(),n.prototype.setup(),he.clear(),V.removeClass("on video").addClass("pbHide"),N=-1,w.on(U,e),R&&e(),setTimeout(function(){r=null},1e3),setTimeout(e,500),"function"==typeof l.afterClose&&l.afterClose(V)}window.onpopstate=(re=window.onpopstate,function(e){re&&re.apply(this,arguments),"photobox"==e.state&&he.load()}),c.event.special.swipe={setup:function(){c(this).bind("touchstart",c.event.special.swipe.handler)},teardown:function(){c(this).unbind("touchstart",c.event.special.swipe.handler)},handler:function(o){var i,n,s=[].slice.call(arguments,1),e=o.originalEvent.touches,a=0,r=0,l=this;function h(){l.removeEventListener("touchmove",t),i=n=null}function t(e){e.preventDefault();var t=i-e.touches[0].pageX,e=n-e.touches[0].pageY;return 20<=Math.abs(t)?(h(),a=0<t?-1:1):20<=Math.abs(e)&&(h(),r=0<e?1:-1),o.type="swipe",s.unshift(o,a,r),(c.event.dispatch||c.event.handle).apply(l,s)}o=c.event.fix(o),1==e.length&&(i=e[0].pageX,n=e[0].pageY,this.addEventListener("touchmove",t,!1))}},le=function(c){function t(e){var t,o=e||window.event,i=m.call(arguments,1),n=0,s=0,a=0,r=0,l=0,h=0;if((e=c.event.fix(o)).type="mousewheel","detail"in o&&(a=-1*o.detail),"wheelDelta"in o&&(a=o.wheelDelta),"wheelDeltaY"in o&&(a=o.wheelDeltaY),"wheelDeltaX"in o&&(s=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(s=-1*a,a=0),n=0===a?s:a,"deltaY"in o&&(n=a=-1*o.deltaY),"deltaX"in o&&(s=o.deltaX,0===a&&(n=-1*s)),0!==a||0!==s){1===o.deltaMode?(n*=t=c.data(this,"mousewheel-line-height"),a*=t,s*=t):2===o.deltaMode&&(n*=t=c.data(this,"mousewheel-page-height"),a*=t,s*=t);var r=Math.max(Math.abs(a),Math.abs(s));return f&&!(r<f)||d(o,f=r)&&(f/=40),d(o,r)&&(n/=40,s/=40,a/=40),n=Math[1<=n?"floor":"ceil"](n/f),s=Math[1<=s?"floor":"ceil"](s/f),a=Math[1<=a?"floor":"ceil"](a/f),v.settings.normalizeOffset&&this.getBoundingClientRect&&(r=this.getBoundingClientRect(),l=e.clientX-r.left,h=e.clientY-r.top),e.deltaX=s,e.deltaY=a,e.deltaFactor=f,e.offsetX=l,e.offsetY=h,e.deltaMode=0,i.unshift(e,n,s,a),p&&clearTimeout(p),p=setTimeout(u,200),(c.event.dispatch||c.event.handle).apply(this,i)}}function u(){f=null}function d(e,t){return v.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var p,f,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],m=Array.prototype.slice;if(c.event.fixHooks)for(var i=e.length;i;)c.event.fixHooks[e[--i]]=c.event.mouseHooks;var v=c.event.special.mousewheel={version:"3.1.11",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t;c.data(this,"mousewheel-line-height",v.getLineHeight(this)),c.data(this,"mousewheel-page-height",v.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){e=c(e)["offsetParent"in c.fn?"offsetParent":"parent"]();return e.length||(e=c("body")),parseInt(e.css("fontSize"),10)},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof define&&define.amd?define(["jquery"],le):"object"==typeof exports?module.exports=le:le(jQuery),c(s).ready($),window._photobox={DOM:{overlay:V},close:ge,history:he,defaults:J}}(jQuery,document,window);