"use strict";var KTApp=function(){var t={},e=function(t){var e=t.data("theme")?"tooltip-"+t.data("theme"):"",a="auto"==t.data("width")?"tooltop-auto-width":"",n=t.data("trigger")?t.data("trigger"):"hover";$(t).tooltip({trigger:n,template:''})},a=function(){$('[data-toggle="tooltip"]').each(function(){e($(this))})},n=function(t){var e=t.data("skin")?"popover-"+t.data("skin"):"",a=t.data("trigger")?t.data("trigger"):"hover";t.popover({trigger:a,template:' '})},i=function(){$('[data-toggle="popover"]').each(function(){n($(this))})},o=function(t,e){t=$(t),new KTCard(t[0],e)},l=function(){$('[data-card="true"]').each(function(){var t=$(this);!0!==t.data("data-card-initialized")&&(o(t,{}),t.data("data-card-initialized",!0))})};return{init:function(e){e&&(t=e),KTApp.initComponents()},initComponents:function(){$('[data-scroll="true"]').each(function(){var t=$(this);KTUtil.scrollInit(this,{mobileNativeScroll:!0,handleWindowResize:!0,rememberPosition:"true"==t.data("remember-position"),height:function(){return KTUtil.isBreakpointDown("lg")&&t.data("mobile-height")?t.data("mobile-height"):t.data("height")}})}),a(),i(),$("body").on("click","[data-close=alert]",function(){$(this).closest(".alert").hide()}),$(".custom-file-input").on("change",function(){var t=$(this).val();$(this).next(".custom-file-label").addClass("selected").html(t)}),l(),"undefined"!=typeof Sticky&&new Sticky('[data-sticky="true"]'),$("body").on("show.bs.dropdown",function(t){var e=$(t.target).find("[data-attach='body']");if(0!==e.length){var a=$(t.target).find(".dropdown-menu").detach();e.data("dropdown-menu",a),$("body").append(a),a.css("display","block"),a.position({my:"right top",at:"right bottom",of:$(t.relatedTarget)})}}),$("body").on("hide.bs.dropdown",function(t){var e=$(t.target).find("[data-attach='body']");if(0!==e.length){var a=e.data("dropdown-menu");$(t.target).append(a.detach()),a.hide()}})},initTooltips:function(){a()},initTooltip:function(t){e(t)},initPopovers:function(){i()},initPopover:function(t){n(t)},initCard:function(t,e){o(t,e)},initCards:function(){l()},initSticky:function(){initSticky()},initAbsoluteDropdown:function(t){!function(t){var e;t&&$("body").on("show.bs.dropdown",t,function(t){e=$(t.target).find(".dropdown-menu"),$("body").append(e.detach()),e.css("display","block"),e.position({my:"right top",at:"right bottom",of:$(t.relatedTarget)})}).on("hide.bs.dropdown",t,function(t){$(t.target).append(e.detach()),e.hide()})}(t)},block:function(t,e){var a,n=$(t),i='0){var o="blockui "+(!1===e.shadow?"blockui":"");a='
'+e.message+""+i+"
";n=document.createElement("div");$("body").prepend(n),KTUtil.addClass(n,o),n.innerHTML=a,e.width=KTUtil.actualWidth(n)+10,KTUtil.remove(n),"body"==t&&(a='
'+e.message+""+i+"
")}else a=i;var l={message:a,centerY:e.centerY,centerX:e.centerX,css:{top:"30%",left:"50%",border:"0",padding:"0",backgroundColor:"none",width:e.width},overlayCSS:{backgroundColor:e.overlayColor,opacity:e.opacity,cursor:"wait",zIndex:"body"==t?1100:10},onUnblock:function(){n&&n[0]&&(KTUtil.css(n[0],"position",""),KTUtil.css(n[0],"zoom",""))}};"body"==t?(l.css.top="50%",$.blockUI(l)):(n=$(t)).block(l)},unblock:function(t){t&&"body"!=t?$(t).unblock():$.unblockUI()},blockPage:function(t){return KTApp.block("body",t)},unblockPage:function(){return KTApp.unblock("body")},getSettings:function(){return t}}}();"undefined"!=typeof module&&void 0!==module.exports&&(module.exports=KTApp),$(document).ready(function(){KTApp.init(KTAppSettings)});var KTCard=function(t,e){var a=this,n=KTUtil.getById(t),i=KTUtil.getBody();if(n){var o={toggleSpeed:400,sticky:{releseOnReverse:!1,offset:300,zIndex:101}},l={construct:function(t){return KTUtil.data(n).has("card")?a=KTUtil.data(n).get("card"):(l.init(t),l.build(),KTUtil.data(n).set("card",a)),a},init:function(t){a.element=n,a.events=[],a.options=KTUtil.deepExtend({},o,t),a.header=KTUtil.child(n,".card-header"),a.footer=KTUtil.child(n,".card-footer"),KTUtil.child(n,".card-body")?a.body=KTUtil.child(n,".card-body"):KTUtil.child(n,".form")&&(a.body=KTUtil.child(n,".form"))},build:function(){var t=KTUtil.find(a.header,"[data-card-tool=remove]");t&&KTUtil.addEvent(t,"click",function(t){t.preventDefault(),l.remove()});var e=KTUtil.find(a.header,"[data-card-tool=reload]");e&&KTUtil.addEvent(e,"click",function(t){t.preventDefault(),l.reload()});var n=KTUtil.find(a.header,"[data-card-tool=toggle]");n&&KTUtil.addEvent(n,"click",function(t){t.preventDefault(),l.toggle()})},initSticky:function(){a.options.sticky.offset;a.header&&window.addEventListener("scroll",l.onScrollSticky)},onScrollSticky:function(t){var e=a.options.sticky.offset;if(!isNaN(e)){var n=KTUtil.getScrollTop();n>=e&&!1===KTUtil.hasClass(i,"card-sticky-on")?(l.eventTrigger("stickyOn"),KTUtil.addClass(i,"card-sticky-on"),l.updateSticky()):1.5*n<=e&&KTUtil.hasClass(i,"card-sticky-on")&&(l.eventTrigger("stickyOff"),KTUtil.removeClass(i,"card-sticky-on"),l.resetSticky())}},updateSticky:function(){var t,e,n;a.header&&(KTUtil.hasClass(i,"card-sticky-on")&&(t=a.options.sticky.position.top instanceof Function?parseInt(a.options.sticky.position.top.call(this,a)):parseInt(a.options.sticky.position.top),e=a.options.sticky.position.left instanceof Function?parseInt(a.options.sticky.position.left.call(this,a)):parseInt(a.options.sticky.position.left),n=a.options.sticky.position.right instanceof Function?parseInt(a.options.sticky.position.right.call(this,a)):parseInt(a.options.sticky.position.right),KTUtil.css(a.header,"z-index",a.options.sticky.zIndex),KTUtil.css(a.header,"top",t+"px"),KTUtil.css(a.header,"left",e+"px"),KTUtil.css(a.header,"right",n+"px")))},resetSticky:function(){a.header&&!1===KTUtil.hasClass(i,"card-sticky-on")&&(KTUtil.css(a.header,"z-index",""),KTUtil.css(a.header,"top",""),KTUtil.css(a.header,"left",""),KTUtil.css(a.header,"right",""))},remove:function(){!1!==l.eventTrigger("beforeRemove")&&(KTUtil.remove(n),l.eventTrigger("afterRemove"))},setContent:function(t){t&&(a.body.innerHTML=t)},getBody:function(){return a.body},getSelf:function(){return n},reload:function(){l.eventTrigger("reload")},toggle:function(){KTUtil.hasClass(n,"card-collapse")||KTUtil.hasClass(n,"card-collapsed")?l.expand():l.collapse()},collapse:function(){!1!==l.eventTrigger("beforeCollapse")&&(KTUtil.slideUp(a.body,a.options.toggleSpeed,function(){l.eventTrigger("afterCollapse")}),KTUtil.addClass(n,"card-collapse"))},expand:function(){!1!==l.eventTrigger("beforeExpand")&&(KTUtil.slideDown(a.body,a.options.toggleSpeed,function(){l.eventTrigger("afterExpand")}),KTUtil.removeClass(n,"card-collapse"),KTUtil.removeClass(n,"card-collapsed"))},eventTrigger:function(t){for(var e=0;eo&&eo?(!1===i.hasAttribute("data-header-scroll")&&i.setAttribute("data-header-scroll","on"),t&&(l.eventTrigger("scrollOn",a),t=!1)):(!0===i.hasAttribute("data-header-scroll")&&i.removeAttribute("data-header-scroll"),0==t&&(l.eventTrigger("scrollOff",a),t=!0)))})},eventTrigger:function(t,e){for(var n=0;n .menu-toggle, [data-menu-toggle="click"] > .menu-link .menu-toggle',"click",r.handleSubmenuDropdownClick),a.eventHandlers.event_5=KTUtil.on(i,'[data-menu-toggle="tab"] > .menu-toggle, [data-menu-toggle="tab"] > .menu-link .menu-toggle',"click",r.handleSubmenuDropdownTabClick)),a.eventHandlers.event_6=KTUtil.on(i,".menu-item > .menu-link:not(.menu-toggle):not(.menu-link-toggle-skip)","click",r.handleLinkClick),a.options.scroll&&a.options.scroll.height&&r.scrollInit()},reset:function(){KTUtil.off(i,"click",a.eventHandlers.event_1),KTUtil.off(i,"mouseover",a.eventHandlers.event_2),KTUtil.off(i,"mouseout",a.eventHandlers.event_3),KTUtil.off(i,"click",a.eventHandlers.event_4),KTUtil.off(i,"click",a.eventHandlers.event_5),KTUtil.off(i,"click",a.eventHandlers.event_6)},scrollInit:function(){a.options.scroll&&a.options.scroll.height?(KTUtil.scrollDestroy(i,!0),KTUtil.scrollInit(i,{mobileNativeScroll:!0,windowScroll:!1,resetHeightOnDestroy:!0,handleWindowResize:!0,height:a.options.scroll.height,rememberPosition:a.options.scroll.rememberPosition})):KTUtil.scrollDestroy(i,!0)},scrollUpdate:function(){a.options.scroll&&a.options.scroll.height&&KTUtil.scrollUpdate(i)},scrollTop:function(){a.options.scroll&&a.options.scroll.height&&KTUtil.scrollTop(i)},getSubmenuMode:function(t){return KTUtil.isBreakpointUp("lg")?t&&KTUtil.hasAttr(t,"data-menu-toggle")&&"hover"==KTUtil.attr(t,"data-menu-toggle")?"dropdown":KTUtil.isset(a.options.submenu,"desktop.state.body")?KTUtil.hasClasses(o,a.options.submenu.desktop.state.body)?a.options.submenu.desktop.state.mode:a.options.submenu.desktop.default:KTUtil.isset(a.options.submenu,"desktop")?a.options.submenu.desktop:void 0:KTUtil.isBreakpointUp("md")&&KTUtil.isBreakpointDown("lg")&&KTUtil.isset(a.options.submenu,"tablet")?a.options.submenu.tablet:!(!KTUtil.isBreakpointDown("md")||!KTUtil.isset(a.options.submenu,"mobile"))&&a.options.submenu.mobile},isConditionalSubmenuDropdown:function(){return!(!KTUtil.isBreakpointUp("lg")||!KTUtil.isset(a.options.submenu,"desktop.state.body"))},resetSubmenuProps:function(t){var e=KTUtil.findAll(i,".menu-submenu");if(e)for(var a=0,n=e.length;a0&&!1===KTUtil.hasClass(e,"menu-toggle")&&0===e.querySelectorAll(".menu-toggle").length)for(var n=0,o=a.length;n');o.appendChild(n),KTUtil.addEvent(n,"click",function(e){e.stopPropagation(),e.preventDefault(),KTUtil.remove(this),r.hideSubmenuDropdown(t,!0)})},pauseDropdownHover:function(t){var e=new Date;a.pauseDropdownHoverTime=e.getTime()+t},resumeDropdownHover:function(){return(new Date).getTime()>a.pauseDropdownHoverTime},resetActiveItem:function(t){for(var e,n,o=0,l=(e=i.querySelectorAll(".menu-item-active")).length;o0&&KTUtil.attr(i,"data-offcanvas-"+a.classCustom,"on"),a.state="shown",a.options.overlay&&(a.overlay=KTUtil.insertAfter(document.createElement("DIV"),n),KTUtil.addClass(a.overlay,a.classOverlay),KTUtil.addEvent(a.overlay,"click",function(t){t.preventDefault(),l.hide(a.target)})),l.eventTrigger("afterShow"))},hide:function(){"hidden"!=a.state&&(l.eventTrigger("beforeHide"),l.toggleClass("hide"),KTUtil.removeAttr(i,"data-offcanvas-"+a.classBase),KTUtil.removeClass(n,a.classShown),a.attrCustom.length>0&&KTUtil.removeAttr(i,"data-offcanvas-"+a.attrCustom),a.state="hidden",a.options.overlay&&a.overlay&&KTUtil.remove(a.overlay),l.eventTrigger("afterHide"))},toggleClass:function(t){var e,n=KTUtil.attr(a.target,"id");if(a.options.toggleBy&&a.options.toggleBy[0]&&a.options.toggleBy[0].target)for(var i in a.options.toggleBy)a.options.toggleBy[i].target===n&&(e=a.options.toggleBy[i]);else a.options.toggleBy&&a.options.toggleBy.target&&(e=a.options.toggleBy);if(e){var o=KTUtil.getById(e.target);"show"===t&&KTUtil.addClass(o,e.state),"hide"===t&&KTUtil.removeClass(o,e.state)}},eventTrigger:function(t,e){for(var n=0;na.options.offset?!1===i.hasAttribute("data-scrolltop")&&i.setAttribute("data-scrolltop","on"):!0===i.hasAttribute("data-scrolltop")&&i.removeAttribute("data-scrolltop")},scroll:function(t){t.preventDefault(),KTUtil.scrollTop(0,a.options.speed)},eventTrigger:function(t,e){for(var n=0;n=this.getBreakpoint("lg")+1||("tablet"==t&&e>=this.getBreakpoint("md")+1&&e=this.getBreakpoint("md")+1||("tablet-and-mobile"==t&&e<=this.getBreakpoint("lg")||"minimal-desktop-and-below"==t&&e<=this.getBreakpoint("xl"))))))},isBreakpointUp:function(t){return this.getViewPort().width>=this.getBreakpoint(t)},isBreakpointDown:function(t){return this.getViewPort().widtht);a++);},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},isAngularVersion:function(){return void 0!==window.Zone},deepExtend:function(t){t=t||{};for(var e=1;e0&&t.classList.add(KTUtil.trim(a[n]));else if(!KTUtil.hasClass(t,e))for(var i=0;i=0&&e.item(a)!==this;);return a>-1});for(var a=[];t&&t!==document;t=t.parentNode)e?t.matches(e)&&a.push(t):a.push(t);return a},children:function(t,e,a){if(t&&t.childNodes){for(var n=[],i=0,o=t.childNodes.length;i=0&&n(i(u,t,s,a)),u>=0&&u>=a?(n(e),o()):r(l)})}},actualCss:function(t,e,a){var n,i="";if(t instanceof HTMLElement!=!1)return t.getAttribute("kt-hidden-"+e)&&!1!==a?parseFloat(t.getAttribute("kt-hidden-"+e)):(i=t.style.cssText,t.style.cssText="position: absolute; visibility: hidden; display: block;","width"==e?n=t.offsetWidth:"height"==e&&(n=t.offsetHeight),t.style.cssText=i,t.setAttribute("kt-hidden-"+e,n),parseFloat(n))},actualHeight:function(t,e){return KTUtil.actualCss(t,"height",e)},actualWidth:function(t,e){return KTUtil.actualCss(t,"width",e)},getScroll:function(t,e){return e="scroll"+e,t==window||t==document?self["scrollTop"==e?"pageYOffset":"pageXOffset"]||browserSupportsBoxModel&&document.documentElement[e]||document.body[e]:t[e]},css:function(t,e,a){if(t)if(void 0!==a)t.style[e]=a;else{var n=(t.ownerDocument||document).defaultView;if(n&&n.getComputedStyle)return e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),n.getComputedStyle(t,null).getPropertyValue(e);if(t.currentStyle)return e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),a=t.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(a)?function(e){var a=t.style.left,n=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=e||0,e=t.style.pixelLeft+"px",t.style.left=a,t.runtimeStyle.left=n,e}(a):a}},slide:function(t,e,a,n,i){if(!(!t||"up"==e&&!1===KTUtil.visible(t)||"down"==e&&!0===KTUtil.visible(t))){a=a||600;var o=KTUtil.actualHeight(t),l=!1,r=!1;KTUtil.css(t,"padding-top")&&!0!==KTUtil.data(t).has("slide-padding-top")&&KTUtil.data(t).set("slide-padding-top",KTUtil.css(t,"padding-top")),KTUtil.css(t,"padding-bottom")&&!0!==KTUtil.data(t).has("slide-padding-bottom")&&KTUtil.data(t).set("slide-padding-bottom",KTUtil.css(t,"padding-bottom")),KTUtil.data(t).has("slide-padding-top")&&(l=parseInt(KTUtil.data(t).get("slide-padding-top"))),KTUtil.data(t).has("slide-padding-bottom")&&(r=parseInt(KTUtil.data(t).get("slide-padding-bottom"))),"up"==e?(t.style.cssText="display: block; overflow: hidden;",l&&KTUtil.animate(0,l,a,function(e){t.style.paddingTop=l-e+"px"},"linear"),r&&KTUtil.animate(0,r,a,function(e){t.style.paddingBottom=r-e+"px"},"linear"),KTUtil.animate(0,o,a,function(e){t.style.height=o-e+"px"},"linear",function(){t.style.height="",t.style.display="none","function"==typeof n&&n()})):"down"==e&&(t.style.cssText="display: block; overflow: hidden;",l&&KTUtil.animate(0,l,a,function(e){t.style.paddingTop=e+"px"},"linear",function(){t.style.paddingTop=""}),r&&KTUtil.animate(0,r,a,function(e){t.style.paddingBottom=e+"px"},"linear",function(){t.style.paddingBottom=""}),KTUtil.animate(0,o,a,function(e){t.style.height=e+"px"},"linear",function(){t.style.height="",t.style.display="",t.style.overflow="","function"==typeof n&&n()}))}},slideUp:function(t,e,a){KTUtil.slide(t,"up",e,a)},slideDown:function(t,e,a){KTUtil.slide(t,"down",e,a)},show:function(t,e){void 0!==t&&(t.style.display=e||"block")},hide:function(t){void 0!==t&&(t.style.display="none")},addEvent:function(t,e,a,n){null!=t&&t.addEventListener(e,a)},removeEvent:function(t,e,a){null!==t&&t.removeEventListener(e,a)},on:function(t,e,a,n){if(e){var i=KTUtil.getUniqueID("event");return window.KTUtilDelegatedEventHandlers[i]=function(a){for(var i=t.querySelectorAll(e),o=a.target;o&&o!==t;){for(var l=0,r=i.length;l1?"."+e[1]:"",i=/(\d+)(\d{3})/;i.test(a);)a=a.replace(i,"$1,$2");return a+n},detectIE:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var a=t.indexOf("rv:");return parseInt(t.substring(a+3,t.indexOf(".",a)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)},isRTL:function(){var t=KTUtil.getByTagName("html")[0];if(t)return"rtl"==KTUtil.attr(t,"direction")},scrollInit:function(t,e){if(t){e=KTUtil.deepExtend({},{wheelSpeed:.5,swipeEasing:!0,wheelPropagation:!1,minScrollbarLength:40,maxScrollbarLength:300,suppressScrollX:!0},e),a(),e.handleWindowResize&&KTUtil.addResizeHandler(function(){a()})}function a(){var a,n,i=t.getAttributeNames();if(i.length>0&&i.forEach(function(a){if(/^data-.*/g.test(a)&&0==["scroll","height","mobile-height"].includes(n)){var n=a.replace("data-","").toLowerCase().replace(/(?:[\s-])\w/g,function(t){return t.replace("-","").toUpperCase()});e[n]=KTUtil.filterBoolean(t.getAttribute(a))}}),!1!==(n=e.height instanceof Function?e.height.call():!0===KTUtil.isMobileDevice()&&e.mobileHeight?parseInt(e.mobileHeight):parseInt(e.height)))if(n=parseInt(n),!e.mobileNativeScroll&&!e.disableForMobile||!0!==KTUtil.isMobileDevice())if(n>0&&KTUtil.css(t,"height",n+"px"),e.desktopNativeScroll)KTUtil.css(t,"overflow","auto");else{"true"==KTUtil.attr(t,"data-window-scroll")&&(e.windowScroll=!0),(a=KTUtil.data(t).get("ps"))?a.update():(KTUtil.css(t,"overflow","hidden"),KTUtil.addClass(t,"scroll"),a=new PerfectScrollbar(t,e),KTUtil.data(t).set("ps",a));KTUtil.attr(t,"id")}else(a=KTUtil.data(t).get("ps"))?(e.resetHeightOnDestroy?KTUtil.css(t,"height","auto"):(KTUtil.css(t,"overflow","auto"),n>0&&KTUtil.css(t,"height",n+"px")),a.destroy(),a=KTUtil.data(t).remove("ps")):n>0&&(KTUtil.css(t,"overflow","auto"),KTUtil.css(t,"height",n+"px"));else KTUtil.scrollDestroy(t,!0)}},scrollUpdate:function(t){var e=KTUtil.data(t).get("ps");e&&e.update()},scrollUpdateAll:function(t){for(var e=KTUtil.findAll(t,".ps"),a=0,n=e.length;a1?n.toString(16):`0${n.toString(16)}`};return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=parseInt(255*e/100),`#${a(t.substring(0,2),e)}${a(t.substring(2,4),e)}${a(t.substring(4,6),e)}`},colorLighten:function(t,e){var a=function(t,e){var a=parseInt(t,16)+e,n=a>255?255:a;return n=n.toString(16).length>1?n.toString(16):`0${n.toString(16)}`};return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=parseInt(255*e/100),`#${a(t.substring(0,2),e)}${a(t.substring(2,4),e)}${a(t.substring(4,6),e)}`},throttle:function(t,e,a){t||(t=setTimeout(function(){e(),t=void 0},a))},debounce:function(t,e,a){clearTimeout(t),t=setTimeout(e,a)},btnWait:function(t,e,a,n=!0){if(t&&(n&&KTUtil.attr(t,"disabled",!0),e&&(KTUtil.addClass(t,e),KTUtil.attr(t,"wait-class",e)),a)){var i=KTUtil.find(t,".btn-caption");i?(KTUtil.data(i).set("caption",KTUtil.getHTML(i)),KTUtil.setHTML(i,a)):(KTUtil.data(t).set("caption",KTUtil.getHTML(t)),KTUtil.setHTML(t,a))}},btnRelease:function(t){if(t){KTUtil.removeAttr(t,"disabled"),KTUtil.hasAttr(t,"wait-class")&&KTUtil.removeClass(t,KTUtil.attr(t,"wait-class"));var e=KTUtil.find(t,".btn-caption");e&&KTUtil.data(e).has("caption")?KTUtil.setHTML(e,KTUtil.data(e).get("caption")):KTUtil.data(t).has("caption")&&KTUtil.setHTML(t,KTUtil.data(t).get("caption"))}},isOffscreen:function(t,e,a=0){var n=KTUtil.getViewPort().width,i=KTUtil.getViewPort().height,o=KTUtil.offset(t).top,l=KTUtil.outerHeight(t)+a,r=KTUtil.offset(t).left,s=KTUtil.outerWidth(t)+a;if("bottom"==e){if(io+1.5*l)return!0}if("top"==e){if(o<0)return!0;if(o>l)return!0}return"left"==e&&r<0||"right"==e&&n1&&o.goTo(a.options.startStep),o.updateUI()},build:function(){KTUtil.addEvent(a.btnNext,"click",function(t){t.preventDefault(),o.goTo(o.getNextStep(),!0)}),KTUtil.addEvent(a.btnPrev,"click",function(t){t.preventDefault(),o.goTo(o.getPrevStep(),!0)}),KTUtil.addEvent(a.btnFirst,"click",function(t){t.preventDefault(),o.goTo(o.getFirstStep(),!0)}),KTUtil.addEvent(a.btnLast,"click",function(t){t.preventDefault(),o.goTo(o.getLastStep(),!0)}),!0===a.options.clickableSteps&&KTUtil.on(n,'[data-wizard-type="step"]',"click",function(){var t=KTUtil.index(this)+1;t!==a.currentStep&&o.goTo(t,!0)})},goTo:function(t,e){if(console.log("go to:"+t),!(t===a.currentStep||t>a.totalSteps||t<0)){var n;if(t=t?parseInt(t):o.getNextStep(),!0===e&&(n=t>a.currentStep?o.eventTrigger("beforeNext"):o.eventTrigger("beforePrev")),!0!==a.stopped)return!1!==n&&(!0===e&&o.eventTrigger("beforeChange"),a.currentStep=t,o.updateUI(),!0===e&&o.eventTrigger("change")),!0===e&&(t>a.startStep?o.eventTrigger("afterNext"):o.eventTrigger("afterPrev")),a;a.stopped=!1}},stop:function(){a.stopped=!0},start:function(){a.stopped=!1},isLastStep:function(){return a.currentStep===a.totalSteps},isFirstStep:function(){return 1===a.currentStep},isBetweenStep:function(){return!1===o.isLastStep()&&!1===o.isFirstStep()},updateUI:function(){var t="",e=a.currentStep-1;t=o.isLastStep()?"last":o.isFirstStep()?"first":"between",KTUtil.attr(a.element,"data-wizard-state",t);var n=KTUtil.findAll(a.element,'[data-wizard-type="step"]');if(n&&n.length>0)for(var i=0,l=n.length;i0)for(i=0,l=r.length;i0)for(i=0,l=s.length;i=a.currentStep+1?a.currentStep+1:a.totalSteps},getPrevStep:function(){return a.currentStep-1>=1?a.currentStep-1:1},eventTrigger:function(t,e){for(var n=0;n0)l.log("Locked container already exist in: ",a);else if(0!==t(a).find(".datatable-row").length){var n=t("
").addClass("datatable-lock datatable-lock-left"),i=t("
").addClass("datatable-lock datatable-lock-scroll"),r=t("
").addClass("datatable-lock datatable-lock-right");t(a).find(".datatable-row").each(function(){var e=t("").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(n),a=t("").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(i),o=t("").addClass("datatable-row").data("obj",t(this).data("obj")).appendTo(r);t(this).find(".datatable-cell").each(function(){var n=t(this).data("locked");void 0!==n?(void 0===n.left&&!0!==n||t(this).appendTo(e),void 0!==n.right&&t(this).appendTo(o)):t(this).appendTo(a)}),t(this).remove()}),e.lockEnabled.left.length>0&&(t(o.wrap).addClass("datatable-lock"),t(n).appendTo(a)),(e.lockEnabled.left.length>0||e.lockEnabled.right.length>0)&&t(i).appendTo(a),e.lockEnabled.right.length>0&&(t(o.wrap).addClass("datatable-lock"),t(r).appendTo(a))}else l.log("No row exist in: ",a)}(a)})})}};return e.init(),e},fullRender:function(){t(o.tableHead).empty(),l.setHeadTitle(),l.getOption("layout.footer")&&(t(o.tableFoot).empty(),l.setHeadTitle(o.tableFoot)),l.spinnerCallback(!0),t(o.wrap).removeClass("datatable-loaded"),l.insertData()},lockEnabledColumns:function(){var e=t(window).width(),n=i.columns,o={left:[],right:[]};return t.each(n,function(t,n){void 0!==n.locked&&(void 0!==n.locked.left&&a.getBreakpoint(n.locked.left)<=e&&o.left.push(n.locked.left),void 0!==n.locked.right&&a.getBreakpoint(n.locked.right)<=e&&o.right.push(n.locked.right))}),o},afterRender:function(e,a){t(o).ready(function(){l.isLocked()&&l.redraw(),t(o.tableBody).css("visibility",""),t(o.wrap).addClass("datatable-loaded"),l.spinnerCallback(!1)})},hoverTimer:0,isScrolling:!1,setupHover:function(){t(window).scroll(function(t){clearTimeout(l.hoverTimer),l.isScrolling=!0}),t(o.tableBody).find(".datatable-cell").off("mouseenter","mouseleave").on("mouseenter",function(){if(l.hoverTimer=setTimeout(function(){l.isScrolling=!1},200),!l.isScrolling){var e=t(this).closest(".datatable-row").addClass("datatable-row-hover"),a=t(e).index()+1;t(e).closest(".datatable-lock").parent().find(".datatable-row:nth-child("+a+")").addClass("datatable-row-hover")}}).on("mouseleave",function(){var e=t(this).closest(".datatable-row").removeClass("datatable-row-hover"),a=t(e).index()+1;t(e).closest(".datatable-lock").parent().find(".datatable-row:nth-child("+a+")").removeClass("datatable-row-hover")})},adjustLockContainer:function(){if(!l.isLocked())return 0;var e=t(o.tableHead).width(),a=t(o.tableHead).find(".datatable-lock-left").width(),n=t(o.tableHead).find(".datatable-lock-right").width();void 0===a&&(a=0),void 0===n&&(n=0);var i=Math.floor(e-a-n);return t(o.table).find(".datatable-lock-scroll").css("width",i),i},dragResize:function(){var e,a,n=!1,i=void 0;t(o.tableHead).find(".datatable-cell").mousedown(function(o){i=t(this),n=!0,e=o.pageX,a=t(this).width(),t(i).addClass("datatable-cell-resizing")}).mousemove(function(l){if(n){var r=t(i).index(),s=t(o.tableBody),d=t(i).closest(".datatable-lock");if(d){var c=t(d).index();s=t(o.tableBody).find(".datatable-lock").eq(c)}t(s).find(".datatable-row").each(function(n,i){t(i).find(".datatable-cell").eq(r).width(a+(l.pageX-e)).children().width(a+(l.pageX-e))}),t(i).children().css("width",a+(l.pageX-e))}}).mouseup(function(){t(i).removeClass("datatable-cell-resizing"),n=!1}),t(document).mouseup(function(){t(i).removeClass("datatable-cell-resizing"),n=!1})},initHeight:function(){if(i.layout.height&&i.layout.scroll){var e=t(o.tableHead).find(".datatable-row").outerHeight(),a=t(o.tableFoot).find(".datatable-row").outerHeight(),n=i.layout.height;e>0&&(n-=e),a>0&&(n-=a),n-=2,t(o.tableBody).css("max-height",Math.floor(parseFloat(n)))}},setupBaseDOM:function(){o.initialDatatable=t(o).clone(),"TABLE"===t(o).prop("tagName")?(o.table=t(o).removeClass("datatable").addClass("datatable-table"),0===t(o.table).parents(".datatable").length&&(o.table.wrap(t("
").addClass("datatable").addClass("datatable-"+i.layout.theme)),o.wrap=t(o.table).parent())):(o.wrap=t(o).addClass("datatable").addClass("datatable-"+i.layout.theme),o.table=t("").addClass("datatable-table").appendTo(o)),void 0!==i.layout.class&&t(o.wrap).addClass(i.layout.class),t(o.table).removeClass("datatable-destroyed").css("display","block"),void 0===t(o).attr("id")&&(l.setOption("data.saveState",!1),t(o.table).attr("id",a.getUniqueID("datatable-"))),l.getOption("layout.minHeight")&&t(o.table).css("min-height",l.getOption("layout.minHeight")),l.getOption("layout.height")&&t(o.table).css("max-height",l.getOption("layout.height")),null===i.data.type&&t(o.table).css("width","").css("display",""),o.tableHead=t(o.table).find("thead"),0===t(o.tableHead).length&&(o.tableHead=t("").prependTo(o.table)),o.tableBody=t(o.table).find("tbody"),0===t(o.tableBody).length&&(o.tableBody=t("").appendTo(o.table)),void 0!==i.layout.footer&&i.layout.footer&&(o.tableFoot=t(o.table).find("tfoot"),0===t(o.tableFoot).length&&(o.tableFoot=t("").appendTo(o.table)))},setupCellField:function(e){void 0===e&&(e=t(o.table).children());var a=i.columns;t.each(e,function(e,n){t(n).find(".datatable-row").each(function(e,n){t(n).find(".datatable-cell").each(function(e,n){void 0!==a[e]&&t(n).data(a[e])})})})},setupTemplateCell:function(e){void 0===e&&(e=o.tableBody);var a=i.columns;t(e).find(".datatable-row").each(function(e,n){var i=t(n).data("obj");if(void 0!==i){var r=l.getOption("rows.callback");"function"==typeof r&&r(t(n),i,e);var s=l.getOption("rows.beforeTemplate");"function"==typeof s&&s(t(n),i,e),void 0===i&&(i={},t(n).find(".datatable-cell").each(function(e,n){var o=t.grep(a,function(e,a){return t(n).data("field")===e.field})[0];void 0!==o&&(i[o.field]=t(n).text())})),t(n).find(".datatable-cell").each(function(n,r){var s=t.grep(a,function(e,a){return t(r).data("field")===e.field})[0];if(void 0!==s&&void 0!==s.template){var d="";"string"==typeof s.template&&(d=l.dataPlaceholder(s.template,i)),"function"==typeof s.template&&(d=s.template(i,e,o)),"undefined"!=typeof DOMPurify&&(d=DOMPurify.sanitize(d));var c=document.createElement("span");c.innerHTML=d,t(r).html(c),void 0!==s.overflow&&(t(c).css("overflow",s.overflow),t(c).css("position","relative"))}});var d=l.getOption("rows.afterTemplate");"function"==typeof d&&d(t(n),i,e)}})},setupSystemColumn:function(){if(o.dataSet=o.dataSet||[],0!==o.dataSet.length){var e=i.columns;t(o.tableBody).find(".datatable-row").each(function(a,n){t(n).find(".datatable-cell").each(function(a,n){var i=t.grep(e,function(e,a){return t(n).data("field")===e.field})[0];if(void 0!==i){var o=t(n).text();if(void 0!==i.selector&&!1!==i.selector){if(t(n).find('.checkbox [type="checkbox"]').length>0)return;t(n).addClass("datatable-cell-check");var r=t("").addClass("datatable-row-subtable datatable-row-loading").hide().append(t("").addClass("datatable-row-detail").insertAfter(a);var r=t("
").addClass("datatable-subtable").attr("colspan",l.getTotalColumns())),t(n).after(r),t(n).hasClass("datatable-row-even")&&t(r).addClass("datatable-row-subtable-even")),t(r).toggle();var s=t(r).find(".datatable-subtable"),d=t(this).closest("[data-field]:first-child").find(".datatable-toggle-subtable").data("value"),c=t(this).find("i").removeAttr("class");t(n).hasClass("datatable-row-subtable-expanded")?(t(c).addClass(l.getOption("layout.icons.rowDetail.collapse")),t(n).removeClass("datatable-row-subtable-expanded"),t(o).trigger("datatable-on-collapse-subtable",[n])):(t(c).addClass(l.getOption("layout.icons.rowDetail.expand")),t(n).addClass("datatable-row-subtable-expanded"),t(o).trigger("datatable-on-expand-subtable",[n])),0===t(s).find(".datatable").length&&(t.map(o.dataSet,function(t,e){return d===t[i.columns[0].field]&&(a.data=t,!0)}),a.detailCell=s,a.parentRow=n,a.subTable=s,e(a),t(s).children(".datatable").on("datatable-on-init",function(e){t(r).removeClass("datatable-row-loading")}),"local"===l.getOption("data.type")&&t(r).removeClass("datatable-row-loading"))},n=i.columns;t(o.tableBody).find(".datatable-row").each(function(e,i){t(i).find(".datatable-cell").each(function(e,i){var o=t.grep(n,function(e,a){return t(i).data("field")===e.field})[0];if(void 0!==o){var r=t(i).text();if(void 0!==o.subtable&&o.subtable){if(t(i).find(".datatable-toggle-subtable").length>0)return;t(i).html(t("").addClass("datatable-toggle-subtable").attr("href","#").attr("data-value",r).attr("title",l.getOption("detail.title")).on("click",a).append(t("").css("width",t(i).data("width")).addClass(l.getOption("layout.icons.rowDetail.collapse"))))}}})})}},dataMapCallback:function(t){var e=t;return"function"==typeof l.getOption("data.source.read.map")?l.getOption("data.source.read.map")(t):(void 0!==t&&void 0!==t.data&&(e=t.data),e)},isSpinning:!1,spinnerCallback:function(t,e){void 0===e&&(e=o);var a=l.getOption("layout.spinner");void 0!==a&&a&&(t?l.isSpinning||(void 0!==a.message&&!0===a.message&&(a.message=l.getOption("translate.records.processing")),l.isSpinning=!0,void 0!==n&&n.block(e,a)):(l.isSpinning=!1,void 0!==n&&n.unblock(e)))},sortCallback:function(e,a,n){var i=n.type||"string",o=n.format||"",l=n.field;return t(e).sort(function(n,r){var s=n[l],d=r[l];switch(i){case"date":if("undefined"==typeof moment)throw new Error("Moment.js is required.");var c=moment(s,o).diff(moment(d,o));return"asc"===a?c>0?1:c<0?-1:0:c<0?1:c>0?-1:0;case"number":return isNaN(parseFloat(s))&&null!=s&&(s=Number(s.replace(/[^0-9\.-]+/g,""))),isNaN(parseFloat(d))&&null!=d&&(d=Number(d.replace(/[^0-9\.-]+/g,""))),s=parseFloat(s),d=parseFloat(d),"asc"===a?s>d?1:sd?-1:0;case"html":return t(e).sort(function(e,n){return s=t(e[l]).text(),d=t(n[l]).text(),"asc"===a?s>d?1:sd?-1:0});case"string":default:return"asc"===a?s>d?1:sd?-1:0}})},log:function(t,e){void 0===e&&(e=""),o.debug&&console.log(t,e)},autoHide:function(){var e=!1,a=t(o.table).find("[data-autohide-enabled]");a.length&&(e=!0,a.hide());var n=function(e){e.preventDefault();var a=t(this).closest(".datatable-row"),n=t(a).next();if(t(n).hasClass("datatable-row-detail"))t(this).find("i").removeClass(l.getOption("layout.icons.rowDetail.expand")).addClass(l.getOption("layout.icons.rowDetail.collapse")),t(n).remove();else{t(this).find("i").removeClass(l.getOption("layout.icons.rowDetail.collapse")).addClass(l.getOption("layout.icons.rowDetail.expand"));var o=t(a).find(".datatable-cell:hidden").clone().show();n=t("
").addClass("datatable-detail").attr("colspan",l.getTotalColumns()).appendTo(n),s=t("");t(o).each(function(){var e=t(this).data("field"),a=t.grep(i.columns,function(t,a){return e===t.field})[0];void 0!==a&&!1===a.visible||t(s).append(t('').append(t('').append(t("").append(a.title))).append(this))}),t(r).append(s)}};setTimeout(function(){t(o.table).find(".datatable-cell").show(),t(o.tableBody).each(function(){for(var a=0;t(this)[0].offsetWidth").addClass("datatable-cell datatable-toggle-detail").append(t("").addClass("datatable-toggle-detail").attr("href","").on("click",n).append(''))),0===t(o.tableHead).find(".datatable-toggle-detail").length?(t(o.tableHead).find(".datatable-row").first().prepend(''),t(o.tableFoot).find(".datatable-row").first().prepend('')):t(o.tableHead).find(".datatable-toggle-detail").find("span")})}),l.adjustCellsWidth.call()},setAutoColumns:function(){l.getOption("data.autoColumns")&&(t.each(o.dataSet[0],function(e,a){0===t.grep(i.columns,function(t,a){return e===t.field}).length&&i.columns.push({field:e,title:e})}),t(o.tableHead).find(".datatable-row").remove(),l.setHeadTitle(),l.getOption("layout.footer")&&(t(o.tableFoot).find(".datatable-row").remove(),l.setHeadTitle(o.tableFoot)))},isLocked:function(){var t=l.lockEnabledColumns();return t.left.length>0||t.right.length>0},isSubtable:function(){return a.hasClass(o.wrap[0],"datatable-subtable")||!1},getExtraSpace:function(e){return parseInt(t(e).css("paddingRight"))+parseInt(t(e).css("paddingLeft"))+(parseInt(t(e).css("marginRight"))+parseInt(t(e).css("marginLeft")))+Math.ceil(t(e).css("border-right-width").replace("px",""))},dataPlaceholder:function(e,a){var n=e;return t.each(a,function(t,e){n=n.replace("{{"+t+"}}",e)}),n},getTableId:function(e){void 0===e&&(e="");var a=t(o).attr("id");return void 0===a&&(a=t(o).attr("class").split(" ")[0]),a+e},getTablePrefix:function(t){return void 0!==t&&(t="-"+t),l.getTableId()+"-"+l.getDepth()+t},getDepth:function(){var e=0,a=o.table;do{a=t(a).parents(".datatable-table"),e++}while(t(a).length>0);return e},stateKeep:function(t,e){t=l.getTablePrefix(t),!1!==l.getOption("data.saveState")&&localStorage&&localStorage.setItem(t,JSON.stringify(e))},stateGet:function(t,e){if(t=l.getTablePrefix(t),!1!==l.getOption("data.saveState")){var a=null;return localStorage&&(a=localStorage.getItem(t)),null!=a?JSON.parse(a):void 0}},stateUpdate:function(e,a){var n=l.stateGet(e);null==n&&(n={}),l.stateKeep(e,t.extend({},n,a))},stateRemove:function(t){t=l.getTablePrefix(t),localStorage&&localStorage.removeItem(t)},getTotalColumns:function(e){return void 0===e&&(e=o.tableBody),t(e).find(".datatable-row").first().find(".datatable-cell").length},getOneRow:function(e,a,n){void 0===n&&(n=!0);var i=t(e).find(".datatable-row:not(.datatable-row-detail):nth-child("+a+")");return n&&(i=i.find(".datatable-cell")),i},sortColumn:function(e,a,n){void 0===a&&(a="asc"),void 0===n&&(n=!1);var i=t(e).index(),l=t(o.tableBody).find(".datatable-row"),r=t(e).closest(".datatable-lock").index();-1!==r&&(l=t(o.tableBody).find(".datatable-lock:nth-child("+(r+1)+")").find(".datatable-row"));var s=t(l).parent();t(l).sort(function(e,o){var l=t(e).find("td:nth-child("+i+")").text(),r=t(o).find("td:nth-child("+i+")").text();return n&&(l=parseInt(l),r=parseInt(r)),"asc"===a?l>r?1:lr?-1:0}).appendTo(s)},sorting:function(){var e={init:function(){i.sortable&&(t(o.tableHead).find(".datatable-cell:not(.datatable-cell-check)").addClass("datatable-cell-sort").off("click").on("click",e.sortClick),e.setIcon())},setIcon:function(){var e=l.getDataSourceParam("sort");if(!t.isEmptyObject(e)){var a=l.getColumnByField(e.field);if(void 0!==a&&!(void 0!==a.sortable&&!1===a.sortable||void 0!==a.selector&&!0===a.selector)){var n=t(o.tableHead).find('.datatable-cell[data-field="'+e.field+'"]').attr("data-sort",e.sort),i=t(n).find("span"),r=t(i).find("i"),s=l.getOption("layout.icons.sort");t(r).length>0?t(r).removeAttr("class").addClass(s[e.sort]):t(i).append(t("").addClass(s[e.sort])),t(n).addClass("datatable-cell-sorted")}}},sortClick:function(n){var r=l.getDataSourceParam("sort"),s=t(this).data("field"),d=l.getColumnByField(s);if(void 0!==d&&(void 0===d.sortable||!1!==d.sortable)&&(void 0===d.selector||!0!==d.selector)&&(t(o.tableHead).find("th").removeClass("datatable-cell-sorted"),a.addClass(this,"datatable-cell-sorted"),t(o.tableHead).find(".datatable-cell > span > i").remove(),i.sortable)){l.spinnerCallback(!0);var c="desc";l.getObject("field",r)===s&&(c=l.getObject("sort",r)),r={field:s,sort:c=void 0===c||"desc"===c?"asc":"desc"},l.setDataSourceParam("sort",r),e.setIcon(),setTimeout(function(){l.dataRender("sort"),t(o).trigger("datatable-on-sort",r)},300)}}};e.init()},localDataUpdate:function(){var e=l.getDataSourceParam();void 0===o.originalDataSet&&(o.originalDataSet=o.dataSet);var a=l.getObject("sort.field",e),n=l.getObject("sort.sort",e),i=l.getColumnByField(a);if(void 0!==i&&!0!==l.getOption("data.serverSorting")?"function"==typeof i.sortCallback?o.dataSet=i.sortCallback(o.originalDataSet,n,i):o.dataSet=l.sortCallback(o.originalDataSet,n,i):o.dataSet=o.originalDataSet,"object"==typeof e.query&&!l.getOption("data.serverFiltering")){e.query=e.query||{};var r=function(t){for(var e in t)if(t.hasOwnProperty(e))if("string"==typeof t[e]){if(t[e].toLowerCase()==s||-1!==t[e].toLowerCase().indexOf(s))return!0}else if("number"==typeof t[e]){if(t[e]===s)return!0}else if("object"==typeof t[e]&&r(t[e]))return!0;return!1},s=t(l.getOption("search.input")).val();void 0!==s&&""!==s&&(s=s.toLowerCase(),o.dataSet=t.grep(o.dataSet,r),delete e.query[l.getGeneralSearchKey()]),t.each(e.query,function(t,a){""===a&&delete e.query[t]}),o.dataSet=l.filterArray(o.dataSet,e.query),o.dataSet=o.dataSet.filter(function(){return!0})}return o.dataSet},filterArray:function(e,a,n){if("object"!=typeof e)return[];if(void 0===n&&(n="AND"),"object"!=typeof a)return e;if(n=n.toUpperCase(),-1===t.inArray(n,["AND","OR","NOT"]))return[];var i=Object.keys(a).length,o=[];return t.each(e,function(e,r){var s=r,d=0;t.each(a,function(t,e){e=e instanceof Array?e:[e];var a=l.getObject(t,s);if(void 0!==a&&a){var n=a.toString().toLowerCase();e.forEach(function(t,e){t.toString().toLowerCase()!=n&&-1===n.indexOf(t.toString().toLowerCase())||d++})}}),("AND"==n&&d==i||"OR"==n&&d>0||"NOT"==n&&0==d)&&(o[e]=r)}),e=o},resetScroll:function(){void 0===i.detail&&1===l.getDepth()&&(t(o.table).find(".datatable-row").css("left",0),t(o.table).find(".datatable-lock").css("top",0),t(o.tableBody).scrollTop(0))},getColumnByField:function(e){var a;if(void 0!==e)return t.each(i.columns,function(t,n){if(e===n.field)return a=n,!1}),a},getDefaultSortColumn:function(){var e;return t.each(i.columns,function(a,n){if(void 0!==n.sortable&&-1!==t.inArray(n.sortable,["asc","desc"]))return e={sort:n.sortable,field:n.field},!1}),e},getHiddenDimensions:function(e,a){var n={position:"absolute",visibility:"hidden",display:"block"},i={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},o=t(e).parents().addBack().not(":visible");a="boolean"==typeof a&&a;var l=[];return o.each(function(){var t={};for(var e in n)t[e]=this.style[e],this.style[e]=n[e];l.push(t)}),i.width=t(e).width(),i.outerWidth=t(e).outerWidth(a),i.innerWidth=t(e).innerWidth(),i.height=t(e).height(),i.innerHeight=t(e).innerHeight(),i.outerHeight=t(e).outerHeight(a),o.each(function(t){var e=l[t];for(var a in n)this.style[a]=e[a]}),i},getGeneralSearchKey:function(){var e=t(l.getOption("search.input"));return l.getOption("search.key")||t(e).prop("name")},getObject:function(t,e){return t.split(".").reduce(function(t,e){return null!==t&&void 0!==t[e]?t[e]:null},e)},extendObj:function(t,e,a){var n=e.split("."),i=0;return function t(e){var o=n[i++];void 0!==e[o]&&null!==e[o]?"object"!=typeof e[o]&&"function"!=typeof e[o]&&(e[o]={}):e[o]={},i===n.length?e[o]=a:t(e[o])}(t),t},rowEvenOdd:function(){t(o.tableBody).find(".datatable-row").removeClass("datatable-row-even"),t(o.wrap).hasClass("datatable-subtable")?t(o.tableBody).find(".datatable-row:not(.datatable-row-detail):even").addClass("datatable-row-even"):t(o.tableBody).find(".datatable-row:nth-child(even)").addClass("datatable-row-even")},timer:0,redraw:function(){return l.adjustCellsWidth.call(),l.isLocked()&&(l.scrollbar(),l.resetScroll(),l.adjustCellsHeight.call()),l.adjustLockContainer.call(),l.initHeight.call(),o},load:function(){return l.reload(),o},reload:function(){return function(t,e){clearTimeout(l.timer),l.timer=setTimeout(t,e)}(function(){i.data.serverFiltering||l.localDataUpdate(),l.dataRender(),t(o).trigger("datatable-on-reloaded")},l.getOption("search.delay")),o},getRecord:function(e){return void 0===o.tableBody&&(o.tableBody=t(o.table).children("tbody")),t(o.tableBody).find(".datatable-cell:first-child").each(function(a,n){if(e==t(n).text()){var i=t(n).closest(".datatable-row").index()+1;return o.API.record=o.API.value=l.getOneRow(o.tableBody,i),o}}),o},getColumn:function(e){return l.setSelectedRecords(),o.API.value=t(o.API.record).find('[data-field="'+e+'"]'),o},destroy:function(){t(o).parent().find(".datatable-pager").remove();var e=t(o.initialDatatable).addClass("datatable-destroyed").show();return t(o).replaceWith(e),t(o=e).trigger("datatable-on-destroy"),l.isInit=!1,e=null},sort:function(e,a){a=void 0===a?"asc":a,l.spinnerCallback(!0);var n={field:e,sort:a};return l.setDataSourceParam("sort",n),setTimeout(function(){l.dataRender("sort"),t(o).trigger("datatable-on-sort",n),t(o.tableHead).find(".datatable-cell > span > i").remove()},300),o},getValue:function(){return t(o.API.value).text()},setActive:function(e){"string"==typeof e&&(e=t(o.tableBody).find('.checkbox-single > [type="checkbox"][value="'+e+'"]')),t(e).prop("checked",!0);var a=[];t(e).each(function(e,n){t(n).closest("tr").addClass("datatable-row-active");var i=t(n).attr("value");void 0!==i&&a.push(i)}),t(o).trigger("datatable-on-check",[a])},setInactive:function(e){"string"==typeof e&&(e=t(o.tableBody).find('.checkbox-single > [type="checkbox"][value="'+e+'"]')),t(e).prop("checked",!1);var a=[];t(e).each(function(e,n){t(n).closest("tr").removeClass("datatable-row-active");var i=t(n).attr("value");void 0!==i&&a.push(i)}),t(o).trigger("datatable-on-uncheck",[a])},setActiveAll:function(e){var a=t(o.table).find("> tbody, > thead").find("tr").not(".datatable-row-subtable").find('.datatable-cell-check [type="checkbox"]');e?l.setActive(a):l.setInactive(a)},setSelectedRecords:function(){return o.API.record=t(o.tableBody).find(".datatable-row-active"),o},getSelectedRecords:function(){return l.setSelectedRecords(),o.API.record=o.rows(".datatable-row-active").nodes(),o.API.record},getOption:function(t){return l.getObject(t,i)},setOption:function(t,e){i=l.extendObj(i,t,e)},search:function(e,a){void 0!==a&&(a=t.makeArray(a)),n=function(){var n=l.getDataSourceQuery();if(void 0===a&&void 0!==e){var r=l.getGeneralSearchKey();n[r]=e}"object"==typeof a&&(t.each(a,function(t,a){n[a]=e}),t.each(n,function(e,a){(""===a||t.isEmptyObject(a))&&delete n[e]})),l.setDataSourceQuery(n),o.setDataSourceParam("pagination",Object.assign({},o.getDataSourceParam("pagination"),{page:1})),i.data.serverFiltering||l.localDataUpdate(),l.dataRender("search")},r=l.getOption("search.delay"),clearTimeout(l.timer),l.timer=setTimeout(n,r);var n,r},setDataSourceParam:function(e,a){o.API.params=t.extend({},{pagination:{page:1,perpage:l.getOption("data.pageSize")},sort:l.getDefaultSortColumn(),query:{}},o.API.params,l.stateGet(l.stateId)),o.API.params=l.extendObj(o.API.params,e,a),l.stateKeep(l.stateId,o.API.params)},getDataSourceParam:function(e){return o.API.params=t.extend({},{pagination:{page:1,perpage:l.getOption("data.pageSize")},sort:l.getDefaultSortColumn(),query:{}},o.API.params,l.stateGet(l.stateId)),"string"==typeof e?l.getObject(e,o.API.params):o.API.params},getDataSourceQuery:function(){return l.getDataSourceParam("query")||{}},setDataSourceQuery:function(t){l.setDataSourceParam("query",t)},getCurrentPage:function(){return t(o.table).siblings(".datatable-pager").last().find(".datatable-pager-nav").find(".datatable-pager-link.datatable-pager-link-active").data("page")||1},getPageSize:function(){return t(o.table).siblings(".datatable-pager").last().find("select.datatable-pager-size").val()||10},getTotalRows:function(){return o.API.params.pagination.total},getDataSet:function(){return o.originalDataSet},nodeTr:[],nodeTd:[],nodeCols:[],recentNode:[],table:function(){if(void 0!==o.table)return o.table},row:function(e){return l.rows(e),l.nodeTr=l.recentNode=t(l.nodeTr).first(),o},rows:function(e){return l.isLocked()?l.nodeTr=l.recentNode=t(o.tableBody).find(e).filter(".datatable-lock-scroll > .datatable-row"):l.nodeTr=l.recentNode=t(o.tableBody).find(e).filter(".datatable-row"),o},column:function(e){return l.nodeCols=l.recentNode=t(o.tableBody).find(".datatable-cell:nth-child("+(e+1)+")"),o},columns:function(e){var a=o.table;l.nodeTr===l.recentNode&&(a=l.nodeTr);var n=t(a).find('.datatable-cell[data-field="'+e+'"]');return n.length>0?l.nodeCols=l.recentNode=n:l.nodeCols=l.recentNode=t(a).find(e).filter(".datatable-cell"),o},cell:function(e){return l.cells(e),l.nodeTd=l.recentNode=t(l.nodeTd).first(),o},cells:function(e){var a=t(o.tableBody).find(".datatable-cell");return void 0!==e&&(a=t(a).filter(e)),l.nodeTd=l.recentNode=a,o},remove:function(){return t(l.nodeTr.length)&&l.nodeTr===l.recentNode&&t(l.nodeTr).remove(),l.layoutUpdate(),o},visible:function(e){if(t(l.recentNode.length)){var a=l.lockEnabledColumns();if(l.recentNode===l.nodeCols){var n=l.recentNode.index();if(l.isLocked()){var o=t(l.recentNode).closest(".datatable-lock-scroll").length;o?n+=a.left.length+1:t(l.recentNode).closest(".datatable-lock-right").length&&(n+=a.left.length+o+1)}}e?(l.recentNode===l.nodeCols&&delete i.columns[n].visible,t(l.recentNode).show()):(l.recentNode===l.nodeCols&&l.setOption("columns."+n+".visible",!1),t(l.recentNode).hide()),l.columnHide(),l.redraw()}},nodes:function(){return l.recentNode},dataset:function(){return o},gotoPage:function(t){void 0!==l.pagingObject&&(l.isInit=!0,l.pagingObject.openPage(t))}};if(t.each(l,function(t,e){o[t]=e}),void 0!==i)if("string"==typeof i){var r=i;void 0!==(o=t(this).data(e))&&(i=o.options,l[r].apply(this,Array.prototype.slice.call(arguments,1)))}else o.data(e)||t(this).hasClass("datatable-loaded")||(o.dataSet=null,o.textAlign={left:"datatable-cell-left",center:"datatable-cell-center",right:"datatable-cell-right"},i=t.extend(!0,{},t.fn.KTDatatable.defaults,i),o.options=i,l.init.apply(this,[i]),t(o.wrap).data(e,o));else void 0===(o=t(this).data(e))&&t.error("KTDatatable not initialized"),i=o.options;return o}console.warn("No KTDatatable element exist.")},t.fn.KTDatatable.defaults={data:{type:"local",source:null,pageSize:10,saveState:!0,serverPaging:!1,serverFiltering:!1,serverSorting:!1,autoColumns:!1,attr:{rowProps:[]}},layout:{theme:"default",class:"datatable-primary",scroll:!1,height:null,minHeight:null,footer:!1,header:!0,customScrollbar:!0,spinner:{overlayColor:"#000000",opacity:0,type:"loader",state:"primary",message:!0},icons:{sort:{asc:"flaticon2-arrow-up",desc:"flaticon2-arrow-down"},pagination:{next:"flaticon2-next",prev:"flaticon2-back",first:"flaticon2-fast-back",last:"flaticon2-fast-next",more:"flaticon-more-1"},rowDetail:{expand:"fa fa-caret-down",collapse:"fa fa-caret-right"}}},sortable:!0,resizable:!1,filterable:!1,pagination:!0,editable:!1,columns:[],search:{onEnter:!1,input:null,delay:400,key:null},rows:{callback:function(){},beforeTemplate:function(){},afterTemplate:function(){},autoHide:!0},toolbar:{layout:["pagination","info"],placement:["bottom"],items:{pagination:{type:"default",pages:{desktop:{layout:"default",pagesNumber:5},tablet:{layout:"default",pagesNumber:3},mobile:{layout:"compact"}},navigation:{prev:!0,next:!0,first:!0,last:!0,more:!1},pageSizeSelect:[]},info:!0}},translate:{records:{processing:"Please wait...",noRecords:"No records found"},toolbar:{pagination:{items:{default:{first:"First",prev:"Previous",next:"Next",last:"Last",more:"More pages",input:"Page number",select:"Select page size",all:"all"},info:"Showing {{start}} - {{end}} of {{total}}"}}}},extensions:{}}}(jQuery),function(t){t.fn.KTDatatable=t.fn.KTDatatable||{},t.fn.KTDatatable.checkbox=function(e,a){var n={selectedAllRows:!1,selectedRows:[],unselectedRows:[],init:function(){n.selectorEnabled()&&(e.setDataSourceParam(a.vars.selectedAllRows,!1),e.stateRemove("checkbox"),a.vars.requestIds&&e.setDataSourceParam(a.vars.requestIds,!0),t(e).on("datatable-on-reloaded",function(){e.stateRemove("checkbox"),e.setDataSourceParam(a.vars.selectedAllRows,!1),n.selectedAllRows=!1,n.selectedRows=[],n.unselectedRows=[]}),n.selectedAllRows=e.getDataSourceParam(a.vars.selectedAllRows),t(e).on("datatable-on-layout-updated",function(a,i){i.table==t(e.wrap).attr("id")&&e.ready(function(){n.initVars(),n.initEvent(),n.initSelect()})}),t(e).on("datatable-on-check",function(a,i){i.forEach(function(t){n.selectedRows.push(t),n.unselectedRows=n.remove(n.unselectedRows,t)});var o={};o.selectedRows=t.unique(n.selectedRows),o.unselectedRows=t.unique(n.unselectedRows),e.stateKeep("checkbox",o)}),t(e).on("datatable-on-uncheck",function(a,i){i.forEach(function(t){n.unselectedRows.push(t),n.selectedRows=n.remove(n.selectedRows,t)});var o={};o.selectedRows=t.unique(n.selectedRows),o.unselectedRows=t.unique(n.unselectedRows),e.stateKeep("checkbox",o)}))},initEvent:function(){t(e.tableHead).find('.checkbox-all > [type="checkbox"]').click(function(i){if(n.selectedRows=n.unselectedRows=[],e.stateRemove("checkbox"),n.selectedAllRows=!!t(this).is(":checked"),!a.vars.requestIds){t(this).is(":checked")&&(n.selectedRows=t.makeArray(t(e.tableBody).find('.checkbox-single > [type="checkbox"]').map(function(e,a){return t(a).val()})));var o={};o.selectedRows=t.unique(n.selectedRows),e.stateKeep("checkbox",o)}e.setDataSourceParam(a.vars.selectedAllRows,n.selectedAllRows),t(e).trigger("datatable-on-click-checkbox",[t(this)])}),t(e.tableBody).find('.checkbox-single > [type="checkbox"]').click(function(i){var o=t(this).val();t(this).is(":checked")?(n.selectedRows.push(o),n.unselectedRows=n.remove(n.unselectedRows,o)):(n.unselectedRows.push(o),n.selectedRows=n.remove(n.selectedRows,o)),!a.vars.requestIds&&n.selectedRows.length<1&&t(e.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!1);var l={};l.selectedRows=n.selectedRows.filter(n.unique),l.unselectedRows=n.unselectedRows.filter(n.unique),e.stateKeep("checkbox",l),t(e).trigger("datatable-on-click-checkbox",[t(this)])})},unique:function(t,e,a){return a.indexOf(t)===e},initSelect:function(){n.selectedAllRows&&a.vars.requestIds?(e.hasClass("datatable-error")||t(e.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!0),e.setActiveAll(!0),n.unselectedRows.forEach(function(t){e.setInactive(t)})):(n.selectedRows.forEach(function(t){e.setActive(t)}),!e.hasClass("datatable-error")&&t(e.tableBody).find('.checkbox-single > [type="checkbox"]').not(":checked").length<1&&t(e.tableHead).find('.checkbox-all > [type="checkbox"]').prop("checked",!0))},selectorEnabled:function(){return t.grep(e.options.columns,function(t,e){return t.selector||!1})[0]},initVars:function(){var t=e.stateGet("checkbox");void 0!==t&&(n.selectedRows=t.selectedRows||[],n.unselectedRows=t.unselectedRows||[])},getSelectedId:function(i){if(n.initVars(),n.selectedAllRows&&a.vars.requestIds){void 0===i&&(i=a.vars.rowIds);var o=e.getObject(i,e.lastResponse)||[];return o.length>0&&n.unselectedRows.forEach(function(t){o=n.remove(o,parseInt(t))}),t.unique(o)}return n.selectedRows},remove:function(t,e){return t.filter(function(t){return t!==e})}};return e.checkbox=function(){return n},"object"==typeof a&&(a=t.extend(!0,{},t.fn.KTDatatable.checkbox.default,a),n.init.apply(this,[a])),e},t.fn.KTDatatable.checkbox.default={vars:{selectedAllRows:"selectedAllRows",requestIds:"requestIds",rowIds:"meta.rowIds"}}}(jQuery);var defaults={layout:{icons:{pagination:{next:"flaticon2-next",prev:"flaticon2-back",first:"flaticon2-fast-back",last:"flaticon2-fast-next",more:"flaticon-more-1"},rowDetail:{expand:"fa fa-caret-down",collapse:"fa fa-caret-right"}}}};KTUtil.isRTL()&&(defaults={layout:{icons:{pagination:{next:"flaticon2-back",prev:"flaticon2-next",first:"flaticon2-fast-next",last:"flaticon2-fast-back"},rowDetail:{collapse:"fa fa-caret-down",expand:"fa fa-caret-right"}}}}),$.extend(!0,$.fn.KTDatatable.defaults,defaults),KTUtil.ready(function(){KTLayoutHeader.init("kt_header","kt_header_mobile"),KTLayoutHeaderMenu.init("kt_header_menu","kt_header_navs"),KTLayoutHeaderTopbar.init("kt_header_mobile_topbar_toggle"),KTLayoutAside.init("kt_aside"),KTLayoutAsideMenu.init("kt_aside_menu"),KTLayoutSubheader.init("kt_subheader"),KTLayoutContent.init("kt_content"),KTLayoutFooter.init("kt_footer"),KTLayoutScrolltop.init("kt_scrolltop"),KTLayoutStickyCard.init("kt_page_sticky_card"),KTLayoutStretchedCard.init("kt_page_stretched_card"),KTLayoutExamples.init(),KTLayoutDemoPanel.init("kt_demo_panel"),KTLayoutChat.init(),KTLayoutQuickActions.init("kt_quick_actions"),KTLayoutQuickNotifications.init("kt_quick_notifications"),KTLayoutQuickPanel.init("kt_quick_panel"),KTLayoutQuickSearch.init("kt_quick_search"),KTLayoutQuickUser.init("kt_quick_user"),KTLayoutSearch().init("kt_quick_search_dropdown"),KTLayoutSearchOffcanvas().init("kt_quick_search_offcanvas")});var KTLayoutAsideMenu=function(){var t,e;return{init:function(a){var n,i;(t=KTUtil.getById(a))&&(i="1"===KTUtil.attr(t,"data-menu-dropdown")?"dropdown":"accordion",KTUtil.isBreakpointDown("lg")&&"1"===KTUtil.attr(t,"data-menu-scroll")&&(n={rememberPosition:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height);return e-=parseInt(KTUtil.css(t,"marginBottom"))+parseInt(KTUtil.css(t,"marginTop"))}}),e=new KTMenu(t,{scroll:n,submenu:{desktop:i,tablet:"accordion",mobile:"accordion"},accordion:{expandAll:!1}}))},getElement:function(){return t},getMenu:function(){return e},pauseDropdownHover:function(t){e&&e.pauseDropdownHover(t)},closeMobileOffcanvas:function(){e&&KTUtil.isMobileDevice()&&e.hide()}}}();"undefined"!=typeof module&&(module.exports=KTLayoutAsideMenu);var KTLayoutAside=function(){var t,e;return{init:function(a){var n;(t=KTUtil.getById(a),KTUtil.getBody(),t)&&(n=KTUtil.hasClass(t,"aside-offcanvas-default")?"aside-offcanvas-default":"aside",e=new KTOffcanvas(t,{baseClass:n,overlay:!0,closeBy:"kt_aside_close_btn",toggleBy:{target:"kt_aside_mobile_toggle",state:"mobile-toggle-active"}}))},getElement:function(){return t},getOffcanvas:function(){return e}}}();"undefined"!=typeof module&&(module.exports=KTLayoutAside);var KTLayoutContent=function(){var t;return{init:function(e){t=KTUtil.getById(e)},getHeight:function(){return e=KTUtil.getViewPort().height,t&&(e=e-parseInt(KTUtil.css(t,"paddingTop"))-parseInt(KTUtil.css(t,"paddingBottom"))),e-=KTLayoutHeader.getHeight(),e-=KTLayoutSubheader.getHeight(),e-=KTLayoutFooter.getHeight();var e},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutContent);var KTLayoutFooter=function(){var t;return{init:function(e){t=KTUtil.getById(e)},getHeight:function(){return e=0,t&&(e=KTUtil.actualHeight(t)),e;var e},getElement:function(){return t}}}();"undefined"!=typeof module&&(module.exports=KTLayoutFooter);var KTLayoutHeaderMenu=function(){var t,e,a,n,i;return{init:function(o,l){t=KTUtil.getById(o),a=KTUtil.getById(l),i=KTUtil.findAll(a,".tab-pane"),t&&(n=new KTOffcanvas(a,{overlay:!0,baseClass:"header-navs",closeBy:"kt_header_mobile_close",toggleBy:{target:"kt_header_mobile_toggle",state:"burge-icon-active"}}),e=new KTMenu(t,{submenu:{desktop:"dropdown",tablet:"accordion",mobile:"accordion"},accordion:{slideSpeed:200,expandAll:!1}}),function(){if(i)for(var t=0,e=i.length;t",KTUtil.setHTML(i,l),e.appendChild(i),n.value="",a.scrollTop=parseInt(KTUtil.css(e,"height")),(o=KTUtil.data(a).get("ps"))&&o.update(),setTimeout(function(){var t=document.createElement("DIV");KTUtil.addClass(t,"d-flex flex-column mb-5 align-items-start");var i;KTUtil.setHTML(t,'
Right before vacation season we have the next Big Deal for you.
'),e.appendChild(t),n.value="",a.scrollTop=parseInt(KTUtil.css(e,"height")),(i=KTUtil.data(a).get("ps"))&&i.update()},2e3)}};return{init:function(){t(KTUtil.getById("kt_chat_modal")),"keenthemes.com"!=encodeURI(window.location.hostname)&&"www.keenthemes.com"!=encodeURI(window.location.hostname)||setTimeout(function(){if(!KTCookie.getCookie("kt_app_chat_shown")){var t=new Date((new Date).getTime()+36e5);KTCookie.setCookie("kt_app_chat_shown",1,{expires:t}),KTUtil.getById("kt_app_chat_launch_btn")&&KTUtil.getById("kt_app_chat_launch_btn").click()}},2e3)},setup:function(e){t(e)}}}();"undefined"!=typeof module&&(module.exports=KTLayoutChat);var KTLayoutDemoPanel=function(){var t,e;return{init:function(a){(t=KTUtil.getById(a))&&(!function(){e=new KTOffcanvas(t,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_demo_panel_close",toggleBy:"kt_demo_panel_toggle"});var a=KTUtil.find(t,".offcanvas-header"),n=KTUtil.find(t,".offcanvas-content"),i=KTUtil.find(t,".offcanvas-wrapper"),o=KTUtil.find(t,".offcanvas-footer");KTUtil.scrollInit(i,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var e=parseInt(KTUtil.getViewPort().height);return a&&(e-=parseInt(KTUtil.actualHeight(a)),e-=parseInt(KTUtil.css(a,"marginTop")),e-=parseInt(KTUtil.css(a,"marginBottom"))),n&&(e-=parseInt(KTUtil.css(n,"marginTop")),e-=parseInt(KTUtil.css(n,"marginBottom"))),i&&(e-=parseInt(KTUtil.css(i,"marginTop")),e-=parseInt(KTUtil.css(i,"marginBottom"))),o&&(e-=parseInt(KTUtil.actualHeight(o)),e-=parseInt(KTUtil.css(o,"marginTop")),e-=parseInt(KTUtil.css(o,"marginBottom"))),e-=parseInt(KTUtil.css(t,"paddingTop")),e-=parseInt(KTUtil.css(t,"paddingBottom")),e-=2}}),"undefined"!=typeof offcanvas&&0===offcanvas.length&&offcanvas.on("hide",function(){var t=new Date((new Date).getTime()+36e5);KTCookie.setCookie("kt_demo_panel_shown",1,{expires:t})})}(),"keenthemes.com"!=encodeURI(window.location.hostname)&&"www.keenthemes.com"!=encodeURI(window.location.hostname)||setTimeout(function(){if(!KTCookie.getCookie("kt_demo_panel_shown")){var t=new Date((new Date).getTime()+9e5);KTCookie.setCookie("kt_demo_panel_shown",1,{expires:t}),void 0!==e&&e.show()}},4e3))}}}();"undefined"!=typeof module&&(module.exports=KTLayoutDemoPanel);var KTLayoutExamples={init:function(t,e){!function(t){var e=t;void 0===e&&(e=document.querySelectorAll(".example:not(.example-compact):not(.example-hover):not(.example-basic)"));for(var a=0;aConnection error. Please try again later..'),g(),KTUtil.scrollUpdate(i)}})},1e3)},v=function(e){a.value="",s="",d=!1,KTUtil.hide(n),KTUtil.removeClass(t,p),m()},b=function(){if(a.value.length<2)return f(),void m();1!=u&&(c&&clearTimeout(c),c=setTimeout(function(){h()},200))};return{init:function(s){(t=KTUtil.getById(s))&&(e=KTUtil.find(t,".quick-search-form"),a=KTUtil.find(t,".form-control"),n=KTUtil.find(t,".quick-search-close"),i=KTUtil.find(t,".quick-search-wrapper"),o=KTUtil.find(t,".dropdown-menu"),l=KTUtil.find(t,'[data-toggle="dropdown"]'),KTUtil.find(t,".input-group"),r=KTUtil.find(t,".input-group .input-group-append"),KTUtil.addEvent(a,"keyup",b),KTUtil.addEvent(a,"focus",b),e.onkeypress=function(t){13==(t.charCode||t.keyCode||0)&&t.preventDefault()},KTUtil.addEvent(n,"click",v))}}};"undefined"!=typeof module&&(module.exports=KTLayoutSearch);var KTLayoutSearchInline=KTLayoutSearch,KTLayoutSearchOffcanvas=KTLayoutSearch;