text: var mApp=function(){var t={brand:"#716aca",metal:"#c4c5d6",light:"#ffffff",accent:"#00c5dc",primary:"#5867dd",success:"#34bfa3",info:"#36a3f7",warning:"#ffb822",danger:"#f4516c",focus:"#9816f4"},a=function(e){var t=e.data("skin")?"m-tooltip--skin-"+e.data("skin"):"",a="auto"==e.data("width")?"m-tooltop--auto-width":"",n=e.data("trigger")?e.data("trigger"):"hover";e.tooltip({trigger:n,template:'<div class="m-tooltip '+t+" "+a+' tooltip" role="tooltip">                <div class="arrow"></div>                <div class="tooltip-inner"></div>            </div>'})},e=function(){$('[data-toggle="m-tooltip"]').each(function(){a($(this))})},n=function(e){var t=e.data("skin")?"m-popover--skin-"+e.data("skin"):"",a=e.data("trigger")?e.data("trigger"):"hover";e.popover({trigger:a,template:'            <div class="m-popover '+t+' popover" role="tooltip">                <div class="arrow"></div>                <h3 class="popover-header"></h3>                <div class="popover-body"></div>            </div>'})},o=function(){$('[data-toggle="m-popover"]').each(function(){n($(this))})},i=function(e,t){e=$(e),new mPortlet(e[0],t)},l=function(){$('[m-portlet="true"]').each(function(){var e=$(this);!0!==e.data("portlet-initialized")&&(i(e,{}),e.data("portlet-initialized",!0))})},r=function(){$("[data-tab-target]").each(function(){1!=$(this).data("tabs-initialized")&&($(this).click(function(e){e.preventDefault();var t=$(this),a=t.closest('[data-tabs="true"]'),n=$(a.data("tabs-contents")),o=$(t.data("tab-target"));a.find(".m-tabs__item.m-tabs__item--active").removeClass("m-tabs__item--active"),t.addClass("m-tabs__item--active"),n.find(".m-tabs-content__item.m-tabs-content__item--active").removeClass("m-tabs-content__item--active"),o.addClass("m-tabs-content__item--active")}),$(this).data("tabs-initialized",!0))})};return{init:function(e){e&&e.colors&&(t=e.colors),mApp.initComponents()},initComponents:function(){jQuery.event.special.touchstart={setup:function(e,t,a){"function"==typeof this&&(t.includes("noPreventDefault")?this.addEventListener("touchstart",a,{passive:!1}):this.addEventListener("touchstart",a,{passive:!0}))}},jQuery.event.special.touchmove={setup:function(e,t,a){"function"==typeof this&&(t.includes("noPreventDefault")?this.addEventListener("touchmove",a,{passive:!1}):this.addEventListener("touchmove",a,{passive:!0}))}},jQuery.event.special.wheel={setup:function(e,t,a){"function"==typeof this&&(t.includes("noPreventDefault")?this.addEventListener("wheel",a,{passive:!1}):this.addEventListener("wheel",a,{passive:!0}))}},$('[data-scrollable="true"]').each(function(){var e,t,a=$(this);mUtil.isInResponsiveRange("tablet-and-mobile")?(e=a.data("mobile-max-height")?a.data("mobile-max-height"):a.data("max-height"),t=a.data("mobile-height")?a.data("mobile-height"):a.data("height")):(e=a.data("max-height"),t=a.data("max-height")),e&&a.css("max-height",e),t&&a.css("height",t),mApp.initScroller(a,{})}),e(),o(),$("body").on("click","[data-close=alert]",function(){$(this).closest(".alert").hide()}),l(),$(".custom-file-input").on("change",function(){var e=$(this).val();$(this).next(".custom-file-label").addClass("selected").html(e)}),r()},initCustomTabs:function(){r()},initTooltips:function(){e()},initTooltip:function(e){a(e)},initPopovers:function(){o()},initPopover:function(e){n(e)},initPortlet:function(e,t){i(e,t)},initPortlets:function(){l()},scrollTo:function(e,t){el=$(e);var a=el&&0<el.length?el.offset().top:0;a+=t||0,jQuery("html,body").animate({scrollTop:a},"slow")},scrollToViewport:function(e){var t=$(e).offset().top,a=e.height(),n=t-(mUtil.getViewPort().height/2-a/2);jQuery("html,body").animate({scrollTop:n},"slow")},scrollTop:function(){mApp.scrollTo()},initScroller:function(e,t,a){mUtil.isMobileDevice()?e.css("overflow","auto"):(!0!==a&&mApp.destroyScroller(e),e.mCustomScrollbar({scrollInertia:0,autoDraggerLength:!0,autoHideScrollbar:!0,autoExpandScrollbar:!1,alwaysShowScrollbar:0,axis:e.data("axis")?e.data("axis"):"y",mouseWheel:{scrollAmount:120,preventDefault:!0},setHeight:t.height?t.height:"",theme:"minimal-dark"}))},destroyScroller:function(e){e.mCustomScrollbar("destroy"),e.removeClass("mCS_destroyed")},alert:function(e){e=$.extend(!0,{container:"",place:"append",type:"success",message:"",close:!0,reset:!0,focus:!0,closeInSeconds:0,icon:""},e);var t=mUtil.getUniqueID("App_alert"),a='<div id="'+t+'" class="custom-alerts alert alert-'+e.type+' fade in">'+(e.close?'<button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>':"")+(""!==e.icon?'<i class="fa-lg fa fa-'+e.icon+'"></i>  ':"")+e.message+"</div>";return e.reset&&$(".custom-alerts").remove(),e.container?"append"==e.place?$(e.container).append(a):$(e.container).prepend(a):1===$(".page-fixed-main-content").size()?$(".page-fixed-main-content").prepend(a):($("body").hasClass("page-container-bg-solid")||$("body").hasClass("page-content-white"))&&0===$(".page-head").size()?$(".page-title").after(a):0<$(".page-bar").size()?$(".page-bar").after(a):$(".page-breadcrumb, .breadcrumbs").after(a),e.focus&&mApp.scrollTo($("#"+t)),0<e.closeInSeconds&&setTimeout(function(){$("#"+t).remove()},1e3*e.closeInSeconds),t},block:function(e,t){var a,n,o,i=$(e);if("spinner"==(t=$.extend(!0,{opacity:.03,overlayColor:"#000000",state:"brand",type:"loader",size:"lg",centerX:!0,centerY:!0,message:"",shadow:!0,width:"auto"},t)).type?o='<div class="m-spinner '+(a=t.skin?"m-spinner--skin-"+t.skin:"")+" "+(n=t.state?"m-spinner--"+t.state:"")+'"></div':(a=t.skin?"m-loader--skin-"+t.skin:"",n=t.state?"m-loader--"+t.state:"",size=t.size?"m-loader--"+t.size:"",o='<div class="m-loader '+a+" "+n+" "+size+'"></div'),t.message&&0<t.message.length){var l="m-blockui "+(!1===t.shadow?"m-blockui-no-shadow":"");html='<div class="'+l+'"><span>'+t.message+"</span><span>"+o+"</span></div>";i=document.createElement("div");mUtil.get("body").prepend(i),mUtil.addClass(i,l),i.innerHTML="<span>"+t.message+"</span><span>"+o+"</span>",t.width=mUtil.actualWidth(i)+10,mUtil.remove(i),"body"==e&&(html='<div class="'+l+'" style="margin-left:-'+t.width/2+'px;"><span>'+t.message+"</span><span>"+o+"</span></div>")}else html=o;var r={message:html,centerY:t.centerY,centerX:t.centerX,css:{top:"30%",left:"50%",border:"0",padding:"0",backgroundColor:"none",width:t.width},overlayCSS:{backgroundColor:t.overlayColor,opacity:t.opacity,cursor:"wait",zIndex:"10"},onUnblock:function(){i&&(i.css("position",""),i.css("zoom",""))}};"body"==e?(r.css.top="50%",$.blockUI(r)):(i=$(e)).block(r)},unblock:function(e){e&&"body"!=e?$(e).unblock():$.unblockUI()},blockPage:function(e){return mApp.block("body",e)},unblockPage:function(){return mApp.unblock("body")},progress:function(e,t){var a="m-loader m-loader--"+(t&&t.skin?t.skin:"light")+" m-loader--"+(t&&t.alignment?t.alignment:"right")+" m-loader--"+(t&&t.size?"m-spinner--"+t.size:"");mApp.unprogress(e),$(e).addClass(a),$(e).data("progress-classes",a)},unprogress:function(e){$(e).removeClass($(e).data("progress-classes"))},getColor:function(e){return t[e]}}}();$(document).ready(function(){mApp.init({})}),this.Element&&function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){for(var t=(this.parentNode||this.document).querySelectorAll(e),a=-1;t[++a]&&t[a]!=this;);return!!t[a]}}(Element.prototype),this.Element&&function(e){e.closest=e.closest||function(e){for(var t=this;t.matches&&!t.matches(e);)t=t.parentNode;return t.matches?t:null}}(Element.prototype),this.Element&&function(e){e.matches=e.matches||e.matchesSelector||e.webkitMatchesSelector||e.msMatchesSelector||function(e){for(var t=(this.parentNode||this.document).querySelectorAll(e),a=-1;t[++a]&&t[a]!=this;);return!!t[a]}}(Element.prototype),function(){for(var o=0,e=["webkit","moz"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e){var t=(new Date).getTime(),a=Math.max(0,16-(t-o)),n=window.setTimeout(function(){e(t+a)},a);return o=t+a,n}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach(function(e){e.hasOwnProperty("prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),a=document.createDocumentFragment();e.forEach(function(e){var t=e instanceof Node;a.appendChild(t?e:document.createTextNode(String(e)))}),this.insertBefore(a,this.firstChild)}})}),window.mUtilElementDataStore={},window.mUtilElementDataStoreID=0,window.mUtilDelegatedEventHandlers={},window.noZensmooth=!0;var mUtil=function(){var t=[],a={sm:544,md:768,lg:1024,xl:1200},n=function(){var e=!1;window.addEventListener("resize",function(){clearTimeout(e),e=setTimeout(function(){!function(){for(var e=0;e<t.length;e++)t[e].call()}()},250)})};return{init:function(e){e&&e.breakpoints&&(a=e.breakpoints),n()},addResizeHandler:function(e){t.push(e)},runResizeHandlers:function(){_runResizeHandlers()},getURLParam:function(e){var t,a,n=window.location.search.substring(1).split("&");for(t=0;t<n.length;t++)if((a=n[t].split("="))[0]==e)return unescape(a[1]);return null},isMobileDevice:function(){return this.getViewPort().width<this.getBreakpoint("lg")},isDesktopDevice:function(){return!mUtil.isMobileDevice()},getViewPort:function(){var e=window,t="inner";return"innerWidth"in window||(t="client",e=document.documentElement||document.body),{width:e[t+"Width"],height:e[t+"Height"]}},isInResponsiveRange:function(e){var t=this.getViewPort().width;return"general"==e||("desktop"==e&&t>=this.getBreakpoint("lg")+1||("tablet"==e&&t>=this.getBreakpoint("md")+1&&t<this.getBreakpoint("lg")||("mobile"==e&&t<=this.getBreakpoint("md")||("desktop-and-tablet"==e&&t>=this.getBreakpoint("md")+1||("tablet-and-mobile"==e&&t<=this.getBreakpoint("lg")||"minimal-desktop-and-below"==e&&t<=this.getBreakpoint("xl"))))))},getUniqueID:function(e){return e+Math.floor(Math.random()*(new Date).getTime())},getBreakpoint:function(e){return a[e]},isset:function(e,t){var a;if(-1!==(t=t||"").indexOf("["))throw new Error("Unsupported object path notation.");t=t.split(".");do{if(void 0===e)return!1;if(a=t.shift(),!e.hasOwnProperty(a))return!1;e=e[a]}while(t.length);return!0},getHighestZindex1:function(e){for(var t,a;e&&e!==document&&e!==window;){if(("absolute"===(t=mUtil.css(e,"position"))||"relative"===t||"fixed"===t)&&(a=parseInt(elem.css("zIndex"),10),!isNaN(a)&&0!==a))return a;e=e.parentNode}},getHighestZindex:function(e){for(var t,a,n=mUtil.get(e);n.length&&n[0]!==document;){if(("absolute"===(t=n.css("position"))||"relative"===t||"fixed"===t)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}},hasFixedPositionedParent:function(e){for(;e&&e!==document;){if(position=mUtil.css(e,"position"),"fixed"===position)return!0;e=e.parentNode}return!1},sleep:function(e){for(var t=(new Date).getTime(),a=0;a<1e7&&!((new Date).getTime()-t>e);a++);},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},isAngularVersion:function(){return void 0!==window.Zone},deepExtend:function(e){e=e||{};for(var t=1;t<arguments.length;t++){var a=arguments[t];if(a)for(var n in a)a.hasOwnProperty(n)&&("object"==typeof a[n]?e[n]=mUtil.deepExtend(e[n],a[n]):e[n]=a[n])}return e},extend:function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var a in arguments[t])arguments[t].hasOwnProperty(a)&&(e[a]=arguments[t][a]);return e},get:function(e){var t;return e===document?document:e&&1===e.nodeType?e:(t=document.getElementById(e))?t:(t=document.getElementsByTagName(e))?t[0]:(t=document.getElementsByClassName(e))?t[0]:null},hasClasses:function(e,t){if(e){for(var a=t.split(" "),n=0;n<a.length;n++)if(0==mUtil.hasClass(e,mUtil.trim(a[n])))return!1;return!0}},hasClass:function(e,t){if(e)return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)},addClass:function(e,t){if(e){var a=t.split(" ");if(e.classList)for(var n=0;n<a.length;n++)a[n]&&0<a[n].length&&e.classList.add(mUtil.trim(a[n]));else if(!hasClass(e,t))for(n=0;n<a.length;n++)e.className+=" "+mUtil.trim(a[n])}},removeClass:function(e,t){if(e){var a=t.split(" ");if(e.classList)for(var n=0;n<a.length;n++)e.classList.remove(mUtil.trim(a[n]));else if(mUtil.hasClass(e,t))for(n=0;n<a.length;n++)e.className=e.className.replace(new RegExp("\\b"+mUtil.trim(a[n])+"\\b","g"),"")}},triggerCustomEvent:function(e,t,a){if(window.CustomEvent)var n=new CustomEvent(t,{detail:a});else(n=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,a);e.dispatchEvent(n)},trim:function(e){return e.trim()},eventTriggered:function(e){return!!e.currentTarget.dataset.triggered||!(e.currentTarget.dataset.triggered=!0)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},find:function(e,t){return e.querySelector(t)},findAll:function(e,t){return e.querySelectorAll(t)},insertAfter:function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},parents:function(e,t){function o(e,t){for(var a=0,n=e.length;a<n;a++)if(e[a]==t)return!0;return!1}return function(e,t){for(var a=document.querySelectorAll(t),n=e.parentNode;n&&!o(a,n);)n=n.parentNode;return n}(e,t)},children:function(e,t,a){if(e&&e.childNodes){for(var n=[],o=0,i=e.childNodes.length;o<i;++o)1==e.childNodes[o].nodeType&&mUtil.matches(e.childNodes[o],t,a)&&n.push(e.childNodes[o]);return n}},child:function(e,t,a){var n=mUtil.children(e,t,a);return n?n[0]:null},matches:function(e,t,a){var n=Element.prototype,o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||function(e){return-1!==[].indexOf.call(document.querySelectorAll(e),this)};return!(!e||!e.tagName)&&o.call(e,t)},data:function(a){return a=mUtil.get(a),{set:function(e,t){void 0===a.customDataTag&&(mUtilElementDataStoreID++,a.customDataTag=mUtilElementDataStoreID),void 0===mUtilElementDataStore[a.customDataTag]&&(mUtilElementDataStore[a.customDataTag]={}),mUtilElementDataStore[a.customDataTag][e]=t},get:function(e){return this.has(e)?mUtilElementDataStore[a.customDataTag][e]:null},has:function(e){return!(!mUtilElementDataStore[a.customDataTag]||!mUtilElementDataStore[a.customDataTag][e])},remove:function(e){this.has(e)&&delete mUtilElementDataStore[a.customDataTag][e]}}},outerWidth:function(e,t){if(!0===t){var a=parseFloat(e.offsetWidth);return a+=parseFloat(mUtil.css(e,"margin-left"))+parseFloat(mUtil.css(e,"margin-right")),parseFloat(a)}return a=parseFloat(e.offsetWidth)},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},height:function(e){return mUtil.css(e,"height")},visible:function(e){return!(0===e.offsetWidth&&0===e.offsetHeight)},attr:function(e,t,a){if(null!=(e=mUtil.get(e)))return void 0===a?e.getAttribute(t):void e.setAttribute(t,a)},hasAttr:function(e,t){if(null!=(e=mUtil.get(e)))return!!e.getAttribute(t)},removeAttr:function(e,t){null!=(e=mUtil.get(e))&&e.removeAttribute(t)},animate:function(n,o,i,l,r,s){var e={linear:function(e,t,a,n){return a*e/n+t}};if("number"==typeof n&&"number"==typeof o&&"number"==typeof i&&"function"==typeof l){"string"==typeof r&&e[r]&&(r=e[r]),"function"!=typeof r&&(r=e.linear),"function"!=typeof s&&(s=function(){});var d=window.requestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},c=o-n;l(n);var m=window.performance&&window.performance.now?window.performance.now():+new Date;d(function e(t){var a=(t||+new Date)-m;0<=a&&l(r(a,n,c,i)),0<=a&&i<=a?(l(o),s()):d(e)})}},actualCss:function(e,t,a){var n;if(e instanceof HTMLElement!=!1)return e.getAttribute("m-hidden-"+t)&&!1!==a?parseFloat(e.getAttribute("m-hidden-"+t)):(e.style.cssText="position: absolute; visibility: hidden; display: block;","width"==t?n=e.offsetWidth:"height"==t&&(n=e.offsetHeight),e.style.cssText="",e.setAttribute("m-hidden-"+t,n),parseFloat(n))},actualHeight:function(e,t){return mUtil.actualCss(e,"height",t)},actualWidth:function(e,t){return mUtil.actualCss(e,"width",t)},getScroll:function(e,t){return t="scroll"+t,e==window||e==document?self["scrollTop"==t?"pageYOffset":"pageXOffset"]||browserSupportsBoxModel&&document.documentElement[t]||document.body[t]:e[t]},css:function(e,t,a){if(e=mUtil.get(e),void 0!==a)e.style[t]=a;else{var n=(e.ownerDocument||document).defaultView;if(n&&n.getComputedStyle)return t=t.replace(/([A-Z])/g,"-$1").toLowerCase(),n.getComputedStyle(e,null).getPropertyValue(t);if(e.currentStyle)return t=t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),a=e.currentStyle[t],/^\d+(em|pt|%|ex)?$/i.test(a)?(o=a,i=e.style.left,l=e.runtimeStyle.left,e.runtimeStyle.left=e.currentStyle.left,e.style.left=o||0,o=e.style.pixelLeft+"px",e.style.left=i,e.runtimeStyle.left=l,o):a}var o,i,l},slide:function(t,e,a,n,o){if(!(!t||"up"==e&&!1===mUtil.visible(t)||"down"==e&&!0===mUtil.visible(t))){a=a||600;var i=mUtil.actualHeight(t),l=!1,r=!1;mUtil.css(t,"padding-top")&&!0!==mUtil.data(t).has("slide-padding-top")&&mUtil.data(t).set("slide-padding-top",mUtil.css(t,"padding-top")),mUtil.css(t,"padding-bottom")&&!0!==mUtil.data(t).has("slide-padding-bottom")&&mUtil.data(t).set("slide-padding-bottom",mUtil.css(t,"padding-bottom")),mUtil.data(t).has("slide-padding-top")&&(l=parseInt(mUtil.data(t).get("slide-padding-top"))),mUtil.data(t).has("slide-padding-bottom")&&(r=parseInt(mUtil.data(t).get("slide-padding-bottom"))),"up"==e?(t.style.cssText="display: block; overflow: hidden;",l&&mUtil.animate(0,l,a,function(e){t.style.paddingTop=l-e+"px"},"linear"),r&&mUtil.animate(0,r,a,function(e){t.style.paddingBottom=r-e+"px"},"linear"),mUtil.animate(0,i,a,function(e){t.style.height=i-e+"px"},"linear",function(){n(),t.style.height="",t.style.display="none"})):"down"==e&&(t.style.cssText="display: block; overflow: hidden;",l&&mUtil.animate(0,l,a,function(e){t.style.paddingTop=e+"px"},"linear",function(){t.style.paddingTop=""}),r&&mUtil.animate(0,r,a,function(e){t.style.paddingBottom=e+"px"},"linear",function(){t.style.paddingBottom=""}),mUtil.animate(0,i,a,function(e){t.style.height=e+"px"},"linear",function(){n(),t.style.height="",t.style.display="",t.style.overflow=""}))}},slideUp:function(e,t,a){mUtil.slide(e,"up",t,a)},slideDown:function(e,t,a){mUtil.slide(e,"down",t,a)},show:function(e,t){e.style.display=t||"block"},hide:function(e){e.style.display="none"},addEvent:function(e,t,a,n){void 0!==(e=mUtil.get(e))&&e.addEventListener(t,a)},removeEvent:function(e,t,a){(e=mUtil.get(e)).removeEventListener(t,a)},on:function(i,l,e,r){if(l){var t=mUtil.getUniqueID("event");return mUtilDelegatedEventHandlers[t]=function(e){for(var t=i.querySelectorAll(l),a=e.target;a&&a!==i;){for(var n=0,o=t.length;n<o;n++)a===t[n]&&r.call(a,e);a=a.parentNode}},mUtil.addEvent(i,e,mUtilDelegatedEventHandlers[t]),t}},off:function(e,t,a){e&&mUtilDelegatedEventHandlers[a]&&(mUtil.removeEvent(e,t,mUtilDelegatedEventHandlers[a]),delete mUtilDelegatedEventHandlers[a])},one:function(e,t,a){(e=mUtil.get(e)).addEventListener(t,function(e){return e.target.removeEventListener(e.type,arguments.callee),a(e)})},hash:function(e){var t,a=0;if(0===e.length)return a;for(t=0;t<e.length;t++)a=(a<<5)-a+e.charCodeAt(t),a|=0;return a},animateClass:function(e,t,a){mUtil.addClass(e,"animated "+t),mUtil.one(e,"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){mUtil.removeClass(e,"animated "+t)}),a&&mUtil.one(e.animationEnd,a)},animateDelay:function(e,t){for(var a=["webkit-","moz-","ms-","o-",""],n=0;n<a.length;n++)mUtil.css(e,a[n]+"animation-delay",t)},animateDuration:function(e,t){for(var a=["webkit-","moz-","ms-","o-",""],n=0;n<a.length;n++)mUtil.css(e,a[n]+"animation-duration",t)},scrollTo:function(e,t,a){a||(a=600),zenscroll.toY(e,a)},scrollToViewport:function(e,t){t||(t=1200),zenscroll.intoView(e,t)},scrollToCenter:function(e,t){t||(t=1200),zenscroll.center(e,t)},scrollTop:function(e){e||(e=600),zenscroll.toY(0,e)},isArray:function(e){return e&&Array.isArray(e)},ready:function(e){(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?e():document.addEventListener("DOMContentLoaded",e)}}}();mUtil.ready(function(){mUtil.init()});var mDropdown=function(e,t){var o=this,n=mUtil.get(e),i=mUtil.get("body");if(n){var a={toggle:"click",hoverTimeout:300,skin:"light",height:"auto",maxHeight:!1,minHeight:!1,persistent:!1,mobileOverlay:!0},l={construct:function(e){return mUtil.data(n).has("dropdown")?o=mUtil.data(n).get("dropdown"):(l.init(e),l.setup(),mUtil.data(n).set("dropdown",o)),o},init:function(e){o.options=mUtil.deepExtend({},a,e),o.events=[],o.eventHandlers={},o.open=!1,o.layout={},o.layout.close=mUtil.find(n,".m-dropdown__close"),o.layout.toggle=mUtil.find(n,".m-dropdown__toggle"),o.layout.arrow=mUtil.find(n,".m-dropdown__arrow"),o.layout.wrapper=mUtil.find(n,".m-dropdown__wrapper"),o.layout.defaultDropPos=mUtil.hasClass(n,"m-dropdown--up")?"up":"down",o.layout.currentDropPos=o.layout.defaultDropPos,"hover"==mUtil.attr(n,"m-dropdown-toggle")&&(o.options.toggle="hover")},setup:function(){o.options.placement&&mUtil.addClass(n,"m-dropdown--"+o.options.placement),o.options.align&&mUtil.addClass(n,"m-dropdown--align-"+o.options.align),o.options.width&&mUtil.css(o.layout.wrapper,"width",o.options.width+"px"),"1"==mUtil.attr(n,"m-dropdown-persistent")&&(o.options.persistent=!0),"hover"==o.options.toggle&&mUtil.addEvent(n,"mouseout",l.hide),l.setZindex()},toggle:function(){return o.open?l.hide():l.show()},setContent:function(e){e=mUtil.find(n,".m-dropdown__content").innerHTML=e;return o},show:function(){if("hover"==o.options.toggle&&mUtil.hasAttr(n,"hover"))return l.clearHovered(),o;if(o.open)return o;if(o.layout.arrow&&l.adjustArrowPos(),l.eventTrigger("beforeShow"),l.hideOpened(),mUtil.addClass(n,"m-dropdown--open"),mUtil.isMobileDevice()&&o.options.mobileOverlay){var e=mUtil.css(n,"z-index")-1,t=mUtil.insertAfter(document.createElement("DIV"),n);mUtil.addClass(t,"m-dropdown__dropoff"),mUtil.css(t,"z-index",e),mUtil.data(t).set("dropdown",n),mUtil.data(n).set("dropoff",t),mUtil.addEvent(t,"click",function(e){l.hide(),mUtil.remove(this),e.preventDefault()})}return n.focus(),n.setAttribute("aria-expanded","true"),o.open=!0,l.eventTrigger("afterShow"),o},clearHovered:function(){var e=mUtil.attr(n,"timeout");mUtil.removeAttr(n,"hover"),mUtil.removeAttr(n,"timeout"),clearTimeout(e)},hideHovered:function(e){if(!0===e){if(!1===l.eventTrigger("beforeHide"))return;l.clearHovered(),mUtil.removeClass(n,"m-dropdown--open"),o.open=!1,l.eventTrigger("afterHide")}else{if(!0===mUtil.hasAttr(n,"hover"))return;if(!1===l.eventTrigger("beforeHide"))return;var t=setTimeout(function(){mUtil.attr(n,"hover")&&(l.clearHovered(),mUtil.removeClass(n,"m-dropdown--open"),o.open=!1,l.eventTrigger("afterHide"))},o.options.hoverTimeout);mUtil.attr(n,"hover","1"),mUtil.attr(n,"timeout",t)}},hideClicked:function(){!1!==l.eventTrigger("beforeHide")&&(mUtil.removeClass(n,"m-dropdown--open"),mUtil.data(n).remove("dropoff"),o.open=!1,l.eventTrigger("afterHide"))},hide:function(e){return!1===o.open||("hover"==o.options.toggle?l.hideHovered(e):l.hideClicked(),"down"==o.layout.defaultDropPos&&"up"==o.layout.currentDropPos&&(mUtil.removeClass(n,"m-dropdown--up"),o.layout.arrow.prependTo(o.layout.wrapper),o.layout.currentDropPos="down")),o},hideOpened:function(){for(var e=mUtil.findAll(i,".m-dropdown.m-dropdown--open"),t=0,a=e.length;t<a;t++){var n=e[t];mUtil.data(n).get("dropdown").hide(!0)}},adjustArrowPos:function(){var e=mUtil.outerWidth(n),t=mUtil.hasClass(o.layout.arrow,"m-dropdown__arrow--right")?"right":"left",a=0;o.layout.arrow&&(mUtil.isInResponsiveRange("mobile")&&mUtil.hasClass(n,"m-dropdown--mobile-full-width")?(a=mUtil.offset(n).left+e/2-Math.abs(parseInt(mUtil.css(o.layout.arrow,"width"))/2)-parseInt(mUtil.css(o.layout.wrapper,"left")),mUtil.css(o.layout.arrow,"right","auto"),mUtil.css(o.layout.arrow,"left",a+"px"),mUtil.css(o.layout.arrow,"margin-left","auto"),mUtil.css(o.layout.arrow,"margin-right","auto")):mUtil.hasClass(o.layout.arrow,"m-dropdown__arrow--adjust")&&(a=e/2-Math.abs(parseInt(mUtil.css(o.layout.arrow,"width"))/2),mUtil.hasClass(n,"m-dropdown--align-push")&&(a+=20),"right"==t?(mUtil.css(o.layout.arrow,"left","auto"),mUtil.css(o.layout.arrow,"right",a+"px")):(mUtil.css(o.layout.arrow,"right","auto"),mUtil.css(o.layout.arrow,"left",a+"px"))))},setZindex:function(){mUtil.css(o.layout.wrapper,"z-index")<mUtil.getHighestZindex(n)&&mUtil.css(o.layout.wrapper,"z-index",zindex)},isPersistent:function(){return o.options.persistent},isShown:function(){return o.open},eventTrigger:function(e,t){for(var a=0;a<o.events.length;a++){var n=o.events[a];n.name==e&&(1==n.one?0==n.fired&&(o.events[a].fired=!0,n.handler.call(this,o,t)):n.handler.call(this,o,t))}},addEvent:function(e,t,a){o.events.push({name:e,handler:t,one:a,fired:!1})}};return o.setDefaults=function(e){a=e},o.show=function(){return l.show()},o.hide=function(){return l.hide()},o.toggle=function(){return l.toggle()},o.isPersistent=function(){return l.isPersistent()},o.isShown=function(){return l.isShown()},o.setContent=function(e){return l.setContent(e)},o.on=function(e,t){return l.addEvent(e,t)},o.one=function(e,t){return l.addEvent(e,t,!0)},l.construct.apply(o,[t]),!0,o}};mUtil.on(document,'[m-dropdown-toggle="click"] .m-dropdown__toggle',"click",function(e){var t=this.closest(".m-dropdown");t&&((mUtil.data(t).has("dropdown")?mUtil.data(t).get("dropdown"):new mDropdown(t)).toggle(),e.preventDefault())}),mUtil.on(document,'[m-dropdown-toggle="hover"] .m-dropdown__toggle',"click",function(e){if(mUtil.isMobileDevice()){var t=this.closest(".m-dropdown");t&&((mUtil.data(t).has("dropdown")?mUtil.data(t).get("dropdown"):new mDropdown(t)).toggle(),e.preventDefault())}}),mUtil.on(document,'[m-dropdown-toggle="hover"]',"mouseover",function(e){if(mUtil.isDesktopDevice()){this&&((mUtil.data(this).has("dropdown")?mUtil.data(this).get("dropdown"):new mDropdown(this)).show(),e.preventDefault())}}),document.addEventListener("click",function(e){var t,a=mUtil.get("body"),n=e.target;if(t=a.querySelectorAll(".m-dropdown.m-dropdown--open"))for(var o=0,i=t.length;o<i;o++){var l=t[o];if(!1===mUtil.data(l).has("dropdown"))return;var r=mUtil.data(l).get("dropdown"),s=mUtil.find(l,".m-dropdown__toggle");mUtil.hasClass(l,"m-dropdown--disable-close")&&(e.preventDefault(),e.stopPropagation()),s&&n!==s&&!1===s.contains(n)&&!1===n.contains(s)?!0===r.isPersistent()?!1===l.contains(n)&&r.hide():r.hide():!1===l.contains(n)&&r.hide()}});var mHeader=function(e,t){var i=this,a=mUtil.get(e),l=mUtil.get("body");if(void 0!==a){var n={classic:!1,offset:{mobile:150,desktop:200},minimize:{mobile:!1,desktop:!1}},o={construct:function(e){return mUtil.data(a).has("header")?i=mUtil.data(a).get("header"):(o.init(e),o.build(),mUtil.data(a).set("header",i)),i},init:function(e){i.events=[],i.options=mUtil.deepExtend({},n,e)},build:function(){var o=0;!1===i.options.minimize.mobile&&!1===i.options.minimize.desktop||window.addEventListener("scroll",function(){var e,t,a,n=0;mUtil.isInResponsiveRange("desktop")?(n=i.options.offset.desktop,e=i.options.minimize.desktop.on,t=i.options.minimize.desktop.off):mUtil.isInResponsiveRange("tablet-and-mobile")&&(n=i.options.offset.mobile,e=i.options.minimize.mobile.on,t=i.options.minimize.mobile.off),a=window.pageYOffset,mUtil.isInResponsiveRange("tablet-and-mobile")&&i.options.classic&&i.options.classic.mobile||mUtil.isInResponsiveRange("desktop")&&i.options.classic&&i.options.classic.desktop?n<a?(mUtil.addClass(l,e),mUtil.removeClass(l,t)):(mUtil.addClass(l,t),mUtil.removeClass(l,e)):(n<a&&o<a?(mUtil.addClass(l,e),mUtil.removeClass(l,t)):(mUtil.addClass(l,t),mUtil.removeClass(l,e)),o=a)})},eventTrigger:function(e,t){for(var a=0;a<i.events.length;a++){var n=i.events[a];n.name==e&&(1==n.one?0==n.fired&&(i.events[a].fired=!0,n.handler.call(this,i,t)):n.handler.call(this,i,t))}},addEvent:function(e,t,a){i.events.push({name:e,handler:t,one:a,fired:!1})}};return i.setDefaults=function(e){n=e},i.on=function(e,t){return o.addEvent(e,t)},o.construct.apply(i,[t]),!0,i}},mMenu=function(e,t){var p=this,a=!1,d=mUtil.get(e),i=mUtil.get("body");if(d){var n={autoscroll:{speed:1200},accordion:{slideSpeed:200,autoScroll:!0,autoScrollSpeed:1200,expandAll:!0},dropdown:{timeout:500}},f={construct:function(e){return mUtil.data(d).has("menu")?p=mUtil.data(d).get("menu"):(f.init(e),f.reset(),f.build(),mUtil.data(d).set("menu",p)),p},init:function(e){p.events=[],p.eventHandlers={},p.options=mUtil.deepExtend({},n,e),p.pauseDropdownHoverTime=0,p.uid=mUtil.getUniqueID()},reload:function(){f.reset(),f.build()},build:function(){p.eventHandlers.event_1=mUtil.on(d,".m-menu__toggle","click",f.handleSubmenuAccordion),("dropdown"===f.getSubmenuMode()||f.isConditionalSubmenuDropdown())&&(p.eventHandlers.event_2=mUtil.on(d,'[m-menu-submenu-toggle="hover"]',"mouseover",f.handleSubmenuDrodownHoverEnter),p.eventHandlers.event_3=mUtil.on(d,'[m-menu-submenu-toggle="hover"]',"mouseout",f.handleSubmenuDrodownHoverExit),p.eventHandlers.event_4=mUtil.on(d,'[m-menu-submenu-toggle="click"] > .m-menu__toggle, [m-menu-submenu-toggle="click"] > .m-menu__link .m-menu__toggle',"click",f.handleSubmenuDropdownClick),p.eventHandlers.event_5=mUtil.on(d,'[m-menu-submenu-toggle="tab"] > .m-menu__toggle, [m-menu-submenu-toggle="tab"] > .m-menu__link .m-menu__toggle',"click",f.handleSubmenuDropdownTabClick)),p.eventHandlers.event_6=mUtil.on(d,".m-menu__item:not(.m-menu__item--submenu) > .m-menu__link:not(.m-menu__toggle):not(.m-menu__link--toggle-skip)","click",f.handleLinkClick)},reset:function(){mUtil.off(d,"click",p.eventHandlers.event_1),mUtil.off(d,"mouseover",p.eventHandlers.event_2),mUtil.off(d,"mouseout",p.eventHandlers.event_3),mUtil.off(d,"click",p.eventHandlers.event_4),mUtil.off(d,"click",p.eventHandlers.event_5),mUtil.off(d,"click",p.eventHandlers.event_6)},getSubmenuMode:function(){return mUtil.isInResponsiveRange("desktop")?mUtil.isset(p.options.submenu,"desktop.state.body")?mUtil.hasClass(i,p.options.submenu.desktop.state.body)?p.options.submenu.desktop.state.mode:p.options.submenu.desktop.default:mUtil.isset(p.options.submenu,"desktop")?p.options.submenu.desktop:void 0:mUtil.isInResponsiveRange("tablet")&&mUtil.isset(p.options.submenu,"tablet")?p.options.submenu.tablet:!(!mUtil.isInResponsiveRange("mobile")||!mUtil.isset(p.options.submenu,"mobile"))&&p.options.submenu.mobile},isConditionalSubmenuDropdown:function(){return!(!mUtil.isInResponsiveRange("desktop")||!mUtil.isset(p.options.submenu,"desktop.state.body"))},handleLinkClick:function(e){!1===f.eventTrigger("linkClick",this)&&e.preventDefault(),("dropdown"===f.getSubmenuMode()||f.isConditionalSubmenuDropdown())&&f.handleSubmenuDropdownClose(e,this)},handleSubmenuDrodownHoverEnter:function(e){if("accordion"!==f.getSubmenuMode()&&!1!==p.resumeDropdownHover()){var t=this;"1"==t.getAttribute("data-hover")&&(t.removeAttribute("data-hover"),clearTimeout(t.getAttribute("data-timeout")),t.removeAttribute("data-timeout")),f.showSubmenuDropdown(t)}},handleSubmenuDrodownHoverExit:function(e){if(!1!==p.resumeDropdownHover()&&"accordion"!==f.getSubmenuMode()){var t=this,a=p.options.dropdown.timeout,n=setTimeout(function(){"1"==t.getAttribute("data-hover")&&f.hideSubmenuDropdown(t,!0)},a);t.setAttribute("data-hover","1"),t.setAttribute("data-timeout",n)}},handleSubmenuDropdownClick:function(e){if("accordion"!==f.getSubmenuMode()){var t=this.closest(".m-menu__item");"accordion"!=t.getAttribute("m-menu-submenu-mode")&&(!1===mUtil.hasClass(t,"m-menu__item--hover")?(mUtil.addClass(t,"m-menu__item--open-dropdown"),f.showSubmenuDropdown(t)):(mUtil.removeClass(t,"m-menu__item--open-dropdown"),f.hideSubmenuDropdown(t,!0)),e.preventDefault())}},handleSubmenuDropdownTabClick:function(e){if("accordion"!==f.getSubmenuMode()){var t=this.closest(".m-menu__item");"accordion"!=t.getAttribute("m-menu-submenu-mode")&&(0==mUtil.hasClass(t,"m-menu__item--hover")&&(mUtil.addClass(t,"m-menu__item--open-dropdown"),f.showSubmenuDropdown(t)),e.preventDefault())}},handleSubmenuDropdownClose:function(e,t){if("accordion"!==f.getSubmenuMode()){var a=d.querySelectorAll(".m-menu__item.m-menu__item--submenu.m-menu__item--hover:not(.m-menu__item--tabs)");if(0<a.length&&!1===mUtil.hasClass(t,"m-menu__toggle")&&0===t.querySelectorAll(".m-menu__toggle").length)for(var n=0,o=a.length;n<o;n++)f.hideSubmenuDropdown(a[0],!0)}},handleSubmenuAccordion:function(e,t){var a,n=t||this;if("dropdown"===f.getSubmenuMode()&&(a=n.closest(".m-menu__item"))&&"accordion"!=a.getAttribute("m-menu-submenu-mode"))e.preventDefault();else{var o=n.closest(".m-menu__item"),i=mUtil.child(o,".m-menu__submenu, .m-menu__inner");if(!mUtil.hasClass(n.closest(".m-menu__item"),"m-menu__item--open-always")&&o&&i){e.preventDefault();var l=p.options.accordion.slideSpeed;if(!1===mUtil.hasClass(o,"m-menu__item--open")){if(!1===p.options.accordion.expandAll){var r=n.closest(".m-menu__nav, .m-menu__subnav"),s=mUtil.children(r,".m-menu__item.m-menu__item--open.m-menu__item--submenu:not(.m-menu__item--expanded):not(.m-menu__item--open-always)");if(r&&s)for(var d=0,c=s.length;d<c;d++){var m=s[0],u=mUtil.child(m,".m-menu__submenu");u&&mUtil.slideUp(u,l,function(){mUtil.removeClass(m,"m-menu__item--open")})}}mUtil.slideDown(i,l,function(){f.scrollToItem(n)}),mUtil.addClass(o,"m-menu__item--open")}else mUtil.slideUp(i,l,function(){f.scrollToItem(n)}),mUtil.removeClass(o,"m-menu__item--open")}}},scrollToItem:function(e){mUtil.isInResponsiveRange("desktop")&&p.options.accordion.autoScroll&&"1"!==d.getAttribute("m-menu-scrollable")&&mUtil.scrollToCenter(e,p.options.accordion.autoScrollSpeed)},hideSubmenuDropdown:function(e,t){t&&(mUtil.removeClass(e,"m-menu__item--hover"),mUtil.removeClass(e,"m-menu__item--active-tab")),e.removeAttribute("data-hover"),e.getAttribute("m-menu-dropdown-toggle-class")&&mUtil.removeClass(i,e.getAttribute("m-menu-dropdown-toggle-class"));var a=e.getAttribute("data-timeout");e.removeAttribute("data-timeout"),clearTimeout(a)},showSubmenuDropdown:function(e){var t=d.querySelectorAll(".m-menu__item--submenu.m-menu__item--hover, .m-menu__item--submenu.m-menu__item--active-tab");if(t)for(var a=0,n=t.length;a<n;a++){var o=t[a];e!==o&&!1===o.contains(e)&&!1===e.contains(o)&&f.hideSubmenuDropdown(o,!0)}f.adjustSubmenuDropdownArrowPos(e),mUtil.addClass(e,"m-menu__item--hover"),e.getAttribute("m-menu-dropdown-toggle-class")&&mUtil.addClass(i,e.getAttribute("m-menu-dropdown-toggle-class"))},createSubmenuDropdownClickDropoff:function(t){var e,a=(e=mUtil.child(t,".m-menu__submenu")?mUtil.css(e,"z-index"):0)-1,n=document.createElement('<div class="m-menu__dropoff" style="background: transparent; position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index: '+a+'"></div>');i.appendChild(n),mUtil.addEvent(n,"click",function(e){e.stopPropagation(),e.preventDefault(),mUtil.remove(this),f.hideSubmenuDropdown(t,!0)})},adjustSubmenuDropdownArrowPos:function(e){var t=mUtil.child(e,".m-menu__submenu"),a=mUtil.child(t,".m-menu__arrow.m-menu__arrow--adjust");mUtil.child(t,".m-menu__subnav");if(a){var n=0;mUtil.child(e,".m-menu__link");mUtil.hasClass(t,"m-menu__submenu--classic")||mUtil.hasClass(t,"m-menu__submenu--fixed")?mUtil.hasClass(t,"m-menu__submenu--right")?(n=mUtil.outerWidth(e)/2,mUtil.hasClass(t,"m-menu__submenu--pull")&&(n+=Math.abs(parseFloat(mUtil.css(t,"margin-right")))),n=parseInt(mUtil.css(t,"width"))-n):mUtil.hasClass(t,"m-menu__submenu--left")&&(n=mUtil.outerWidth(e)/2,mUtil.hasClass(t,"m-menu__submenu--pull")&&(n+=Math.abs(parseFloat(mUtil.css(t,"margin-left"))))):(mUtil.hasClass(t,"m-menu__submenu--center")||mUtil.hasClass(t,"m-menu__submenu--full"))&&(n=mUtil.offset(e).left-(mUtil.getViewPort().width-parseInt(mUtil.css(t,"width")))/2,n+=mUtil.outerWidth(e)/2),mUtil.css(a,"left",n+"px")}},pauseDropdownHover:function(e){var t=new Date;p.pauseDropdownHoverTime=t.getTime()+e},resumeDropdownHover:function(){return(new Date).getTime()>p.pauseDropdownHoverTime},resetActiveItem:function(e){for(var t,a,n=0,o=(t=d.querySelectorAll(".m-menu__item--active")).length;n<o;n++){var i=t[0];mUtil.removeClass(i,"m-menu__item--active"),mUtil.hide(mUtil.child(i,".m-menu__submenu"));for(var l=0,r=(a=mUtil.parents(i,".m-menu__item--submenu")).length;l<r;l++){var s=a[n];mUtil.removeClass(s,"m-menu__item--open"),mUtil.hide(mUtil.child(s,".m-menu__submenu"))}}if(!1===p.options.accordion.expandAll&&(t=d.querySelectorAll(".m-menu__item--open")))for(n=0,o=t.length;n<o;n++)mUtil.removeClass(a[0],"m-menu__item--open")},setActiveItem:function(e){f.resetActiveItem(),mUtil.addClass(e,"m-menu__item--active");for(var t=mUtil.parents(e,".m-menu__item--submenu"),a=0,n=t.length;a<n;a++)mUtil.addClass(t[a],"m-menu__item--open")},getBreadcrumbs:function(e){var t,a=[],n=mUtil.child(e,".m-menu__link");a.push({text:t=mUtil.child(n,".m-menu__link-text")?t.innerHTML:"",title:n.getAttribute("title"),href:n.getAttribute("href")});for(var o=mUtil.parents(e,".m-menu__item--submenu"),i=0,l=o.length;i<l;i++){var r=mUtil.child(o[i],".m-menu__link");a.push({text:t=mUtil.child(r,".m-menu__link-text")?t.innerHTML:"",title:r.getAttribute("title"),href:r.getAttribute("href")})}return a.reverse()},getPageTitle:function(e){var t;return mUtil.child(e,".m-menu__link-text")?t.innerHTML:""},eventTrigger:function(e,t){for(var a=0;a<p.events.length;a++){var n=p.events[a];n.name==e&&(1==n.one?0==n.fired&&(p.events[a].fired=!0,n.handler.call(this,p,t)):n.handler.call(this,p,t))}},addEvent:function(e,t,a){p.events.push({name:e,handler:t,one:a,fired:!1})}};return p.setDefaults=function(e){n=e},p.setActiveItem=function(e){return f.setActiveItem(e)},p.reload=function(){return f.reload()},p.getBreadcrumbs=function(e){return f.getBreadcrumbs(e)},p.getPageTitle=function(e){return f.getPageTitle(e)},p.getSubmenuMode=function(){return f.getSubmenuMode()},p.hideDropdown=function(e){f.hideSubmenuDropdown(e,!0)},p.pauseDropdownHover=function(e){f.pauseDropdownHover(e)},p.resumeDropdownHover=function(){return f.resumeDropdownHover()},p.on=function(e,t){return f.addEvent(e,t)},p.one=function(e,t){return f.addEvent(e,t,!0)},f.construct.apply(p,[t]),mUtil.addResizeHandler(function(){a&&p.reload()}),a=!0,p}};document.addEventListener("click",function(e){var t;if(t=mUtil.get("body").querySelectorAll('.m-menu__nav .m-menu__item.m-menu__item--submenu.m-menu__item--hover:not(.m-menu__item--tabs)[m-menu-submenu-toggle="click"]'))for(var a=0,n=t.length;a<n;a++){var o=t[a].closest(".m-menu__nav").parentNode;if(o){var i,l=mUtil.data(o).get("menu");if(!l)break;if(!l||"dropdown"!==l.getSubmenuMode())break;if(e.target!==o&&!1===o.contains(e.target))if(i=o.querySelectorAll('.m-menu__item--submenu.m-menu__item--hover:not(.m-menu__item--tabs)[m-menu-submenu-toggle="click"]'))for(var r=0,s=i.length;r<s;r++)l.hideDropdown(i[r])}}});var mOffcanvas=function(e,t){var l=this,a=mUtil.get(e),n=mUtil.get("body");if(a){var o={},i={construct:function(e){return mUtil.data(a).has("offcanvas")?l=mUtil.data(a).get("offcanvas"):(i.init(e),i.build(),mUtil.data(a).set("offcanvas",l)),l},init:function(e){l.events=[],l.options=mUtil.deepExtend({},o,e),l.overlay,l.classBase=l.options.baseClass,l.classShown=l.classBase+"--on",l.classOverlay=l.classBase+"-overlay",l.state=mUtil.hasClass(a,l.classShown)?"shown":"hidden"},build:function(){if(l.options.toggleBy)if("string"==typeof l.options.toggleBy)mUtil.addEvent(l.options.toggleBy,"click",i.toggle);else if(l.options.toggleBy&&l.options.toggleBy[0]&&l.options.toggleBy[0].target)for(var e in l.options.toggleBy)mUtil.addEvent(l.options.toggleBy[e].target,"click",i.toggle);else l.options.toggleBy&&l.options.toggleBy.target&&mUtil.addEvent(l.options.toggleBy.target,"click",i.toggle);var t=mUtil.get(l.options.closeBy);t&&mUtil.addEvent(t,"click",i.hide)},toggle:function(){i.eventTrigger("toggle"),"shown"==l.state?i.hide(this):i.show(this)},show:function(t){"shown"!=l.state&&(i.eventTrigger("beforeShow"),i.togglerClass(t,"show"),mUtil.addClass(n,l.classShown),mUtil.addClass(a,l.classShown),l.state="shown",l.options.overlay&&(l.overlay=mUtil.insertAfter(document.createElement("DIV"),a),mUtil.addClass(l.overlay,l.classOverlay),mUtil.addEvent(l.overlay,"click",function(e){e.stopPropagation(),e.preventDefault(),i.hide(t)})),i.eventTrigger("afterShow"))},hide:function(e){"hidden"!=l.state&&(i.eventTrigger("beforeHide"),i.togglerClass(e,"hide"),mUtil.removeClass(n,l.classShown),mUtil.removeClass(a,l.classShown),l.state="hidden",l.options.overlay&&l.overlay&&mUtil.remove(l.overlay),i.eventTrigger("afterHide"))},togglerClass:function(e,t){var a,n=mUtil.attr(e,"id");if(l.options.toggleBy&&l.options.toggleBy[0]&&l.options.toggleBy[0].target)for(var o in l.options.toggleBy)l.options.toggleBy[o].target===n&&(a=l.options.toggleBy[o]);else l.options.toggleBy&&l.options.toggleBy.target&&(a=l.options.toggleBy);if(a){var i=mUtil.get(a.target);"show"===t&&mUtil.addClass(i,a.state),"hide"===t&&mUtil.removeClass(i,a.state)}},eventTrigger:function(e,t){for(var a=0;a<l.events.length;a++){var n=l.events[a];n.name==e&&(1==n.one?0==n.fired&&(l.events[a].fired=!0,n.handler.call(this,l,t)):n.handler.call(this,l,t))}},addEvent:function(e,t,a){l.events.push({name:e,handler:t,one:a,fired:!1})}};return l.setDefaults=function(e){o=e},l.hide=function(){return i.hide()},l.show=function(){return i.show()},l.on=function(e,t){return i.addEvent(e,t)},l.one=function(e,t){return i.addEvent(e,t,!0)},i.construct.apply(l,[t]),!0,l}},mPortlet=function(e,t){var s=this,d=mUtil.get(e),c=mUtil.get("body");if(d){var a={bodyToggleSpeed:400,tooltips:!0,tools:{toggle:{collapse:"Collapse",expand:"Expand"},reload:"Reload",remove:"Remove",fullscreen:{on:"Fullscreen",off:"Exit Fullscreen"}}},o={construct:function(e){return mUtil.data(d).has("portlet")?s=mUtil.data(d).get("portlet"):(o.init(e),o.build(),mUtil.data(d).set("portlet",s)),s},init:function(e){s.element=d,s.events=[],s.options=mUtil.deepExtend({},a,e),s.head=mUtil.child(d,".m-portlet__head"),mUtil.child(d,".m-portlet__body")?s.body=mUtil.child(d,".m-portlet__body"):0!==mUtil.child(d,".m-form").length&&(s.body=mUtil.child(d,".m-form"))},build:function(){var e=mUtil.find(s.head,"[m-portlet-tool=remove]");e&&mUtil.addEvent(e,"click",function(e){e.preventDefault(),o.remove()});var t=mUtil.find(s.head,"[m-portlet-tool=reload]");t&&mUtil.addEvent(t,"click",function(e){e.preventDefault(),o.reload()});var a=mUtil.find(s.head,"[m-portlet-tool=toggle]");a&&mUtil.addEvent(a,"click",function(e){e.preventDefault(),o.toggle()});var n=mUtil.find(s.head,"[m-portlet-tool=fullscreen]");n&&mUtil.addEvent(n,"click",function(e){e.preventDefault(),o.fullscreen()}),o.setupTooltips()},remove:function(){!1!==o.eventTrigger("beforeRemove")&&(mUtil.hasClass(c,"m-portlet--fullscreen")&&mUtil.hasClass(d,"m-portlet--fullscreen")&&o.fullscreen("off"),o.removeTooltips(),mUtil.remove(d),o.eventTrigger("afterRemove"))},setContent:function(e){e&&(s.body.innerHTML=e)},getBody:function(){return s.body},getSelf:function(){return d},setupTooltips:function(){if(s.options.tooltips){var e=mUtil.hasClass(d,"m-portlet--collapse")||mUtil.hasClass(d,"m-portlet--collapsed"),t=mUtil.hasClass(c,"m-portlet--fullscreen")&&mUtil.hasClass(d,"m-portlet--fullscreen"),a=mUtil.find(s.head,"[m-portlet-tool=remove]");if(a){var n=t?"bottom":"top",o=new Tooltip(a,{title:s.options.tools.remove,placement:n,offset:t?"0,10px,0,0":"0,5px",trigger:"hover",template:'<div class="m-tooltip m-tooltip--portlet tooltip bs-tooltip-'+n+'" role="tooltip">                            <div class="tooltip-arrow arrow"></div>                            <div class="tooltip-inner"></div>                        </div>'});mUtil.data(a).set("tooltip",o)}var i=mUtil.find(s.head,"[m-portlet-tool=reload]");if(i){n=t?"bottom":"top",o=new Tooltip(i,{title:s.options.tools.reload,placement:n,offset:t?"0,10px,0,0":"0,5px",trigger:"hover",template:'<div class="m-tooltip m-tooltip--portlet tooltip bs-tooltip-'+n+'" role="tooltip">                            <div class="tooltip-arrow arrow"></div>                            <div class="tooltip-inner"></div>                        </div>'});mUtil.data(i).set("tooltip",o)}var l=mUtil.find(s.head,"[m-portlet-tool=toggle]");if(l){n=t?"bottom":"top",o=new Tooltip(l,{title:e?s.options.tools.toggle.expand:s.options.tools.toggle.collapse,placement:n,offset:t?"0,10px,0,0":"0,5px",trigger:"hover",template:'<div class="m-tooltip m-tooltip--portlet tooltip bs-tooltip-'+n+'" role="tooltip">                            <div class="tooltip-arrow arrow"></div>                            <div class="tooltip-inner"></div>                        </div>'});mUtil.data(l).set("tooltip",o)}var r=mUtil.find(s.head,"[m-portlet-tool=fullscreen]");if(r){n=t?"bottom":"top",o=new Tooltip(r,{title:t?s.options.tools.fullscreen.off:s.options.tools.fullscreen.on,placement:n,offset:t?"0,10px,0,0":"0,5px",trigger:"hover",template:'<div class="m-tooltip m-tooltip--portlet tooltip bs-tooltip-'+n+'" role="tooltip">                            <div class="tooltip-arrow arrow"></div>                            <div class="tooltip-inner"></div>                        </div>'});mUtil.data(r).set("tooltip",o)}}},removeTooltips:function(){if(s.options.tooltips){var e=mUtil.find(s.head,"[m-portlet-tool=remove]");e&&mUtil.data(e).has("tooltip")&&mUtil.data(e).get("tooltip").dispose();var t=mUtil.find(s.head,"[m-portlet-tool=reload]");t&&mUtil.data(t).has("tooltip")&&mUtil.data(t).get("tooltip").dispose();var a=mUtil.find(s.head,"[m-portlet-tool=toggle]");a&&mUtil.data(a).has("tooltip")&&mUtil.data(a).get("tooltip").dispose();var n=mUtil.find(s.head,"[m-portlet-tool=fullscreen]");n&&mUtil.data(n).has("tooltip")&&mUtil.data(n).get("tooltip").dispose()}},reload:function(){o.eventTrigger("reload")},toggle:function(){mUtil.hasClass(d,"m-portlet--collapse")||mUtil.hasClass(d,"m-portlet--collapsed")?o.expand():o.collapse()},collapse:function(){if(!1!==o.eventTrigger("beforeCollapse")){mUtil.slideUp(s.body,s.options.bodyToggleSpeed,function(){o.eventTrigger("afterCollapse")}),mUtil.addClass(d,"m-portlet--collapse");var e=mUtil.find(s.head,"[m-portlet-tool=toggle]");e&&mUtil.data(e).has("tooltip")&&mUtil.data(e).get("tooltip").updateTitleContent(s.options.tools.toggle.expand)}},expand:function(){if(!1!==o.eventTrigger("beforeExpand")){mUtil.slideDown(s.body,s.options.bodyToggleSpeed,function(){o.eventTrigger("afterExpand")}),mUtil.removeClass(d,"m-portlet--collapse"),mUtil.removeClass(d,"m-portlet--collapsed");var e=mUtil.find(s.head,"[m-portlet-tool=toggle]");e&&mUtil.data(e).has("tooltip")&&mUtil.data(e).get("tooltip").updateTitleContent(s.options.tools.toggle.collapse)}},fullscreen:function(e){"off"===e||mUtil.hasClass(c,"m-portlet--fullscreen")&&mUtil.hasClass(d,"m-portlet--fullscreen")?(o.eventTrigger("beforeFullscreenOff"),mUtil.removeClass(c,"m-portlet--fullscreen"),mUtil.removeClass(d,"m-portlet--fullscreen"),o.removeTooltips(),o.setupTooltips(),o.eventTrigger("afterFullscreenOff")):(o.eventTrigger("beforeFullscreenOn"),mUtil.addClass(d,"m-portlet--fullscreen"),mUtil.addClass(c,"m-portlet--fullscreen"),o.removeTooltips(),o.setupTooltips(),o.eventTrigger("afterFullscreenOn"))},eventTrigger:function(e){for(i=0;i<s.events.length;i++){var t=s.events[i];t.name==e&&(1==t.one?0==t.fired&&(s.events[i].fired=!0,t.handler.call(this,s)):t.handler.call(this,s))}},addEvent:function(e,t,a){return s.events.push({name:e,handler:t,one:a,fired:!1}),s}};return s.setDefaults=function(e){a=e},s.remove=function(){return o.remove(html)},s.reload=function(){return o.reload()},s.setContent=function(e){return o.setContent(e)},s.toggle=function(){return o.toggle()},s.collapse=function(){return o.collapse()},s.expand=function(){return o.expand()},s.fullscreen=function(){return o.fullscreen("on")},s.unFullscreen=function(){return o.fullscreen("off")},s.getBody=function(){return o.getBody()},s.getSelf=function(){return o.getSelf()},s.on=function(e,t){return o.addEvent(e,t)},s.one=function(e,t){return o.addEvent(e,t,!0)},o.construct.apply(s,[t]),s}},mQuicksearch=function(e,t){var n=this,a=mUtil.get(e),o=mUtil.get("body");if(a){var l={mode:"default",minLength:1,maxHeight:300,requestTimeout:200,inputTarget:"m_quicksearch_input",iconCloseTarget:"m_quicksearch_close",iconCancelTarget:"m_quicksearch_cancel",iconSearchTarget:"m_quicksearch_search",spinnerClass:"m-loader m-loader--skin-light m-loader--right",hasResultClass:"m-list-search--has-result",templates:{error:'<div class="m-search-results m-search-results--skin-light"><span class="m-search-result__message">{{message}}</div></div>'}},r={construct:function(e){return mUtil.data(a).has("quicksearch")?n=mUtil.data(a).get("quicksearch"):(r.init(e),r.build(),mUtil.data(a).set("quicksearch",n)),n},init:function(e){n.element=a,n.events=[],n.options=mUtil.deepExtend({},l,e),n.query="",n.form=mUtil.find(a,"form"),n.input=mUtil.get(n.options.inputTarget),n.iconClose=mUtil.get(n.options.iconCloseTarget),"default"==n.options.mode&&(n.iconSearch=mUtil.get(n.options.iconSearchTarget),n.iconCancel=mUtil.get(n.options.iconCancelTarget)),n.dropdown=new mDropdown(a,{mobileOverlay:!1}),n.cancelTimeout,n.processing=!1,n.requestTimeout=!1},build:function(){mUtil.addEvent(n.input,"keyup",r.search),"default"==n.options.mode?(mUtil.addEvent(n.input,"focus",r.showDropdown),mUtil.addEvent(n.iconCancel,"click",r.handleCancel),mUtil.addEvent(n.iconSearch,"click",function(){mUtil.isInResponsiveRange("tablet-and-mobile")&&(mUtil.addClass(o,"m-header-search--mobile-expanded"),n.input.focus())}),mUtil.addEvent(n.iconClose,"click",function(){mUtil.isInResponsiveRange("tablet-and-mobile")&&(mUtil.removeClass(o,"m-header-search--mobile-expanded"),r.closeDropdown())})):"dropdown"==n.options.mode&&(n.dropdown.on("afterShow",function(){n.input.focus()}),mUtil.addEvent(n.iconClose,"click",r.closeDropdown))},showProgress:function(){return n.processing=!0,mUtil.addClass(n.form,n.options.spinnerClass),r.handleCancelIconVisibility("off"),n},hideProgress:function(){return n.processing=!1,mUtil.removeClass(n.form,n.options.spinnerClass),r.handleCancelIconVisibility("on"),mUtil.addClass(a,n.options.hasResultClass),n},search:function(e){if(n.query=n.input.value,0===n.query.length&&(r.handleCancelIconVisibility("on"),mUtil.removeClass(a,n.options.hasResultClass),mUtil.removeClass(n.form,n.options.spinnerClass)),!(n.query.length<n.options.minLength||1==n.processing))return n.requestTimeout&&clearTimeout(n.requestTimeout),n.requestTimeout=!1,n.requestTimeout=setTimeout(function(){r.eventTrigger("search")},n.options.requestTimeout),n},handleCancelIconVisibility:function(e){"on"==e?0===n.input.value.length?(n.iconCancel&&mUtil.css(n.iconCancel,"visibility","hidden"),n.iconClose&&mUtil.css(n.iconClose,"visibility","visible")):(clearTimeout(n.cancelTimeout),n.cancelTimeout=setTimeout(function(){n.iconCancel&&mUtil.css(n.iconCancel,"visibility","visible"),n.iconClose&&mUtil.css(n.iconClose,"visibility","visible")},500)):(n.iconCancel&&mUtil.css(n.iconCancel,"visibility","hidden"),n.iconClose&&mUtil.css(n.iconClose,"visibility","hidden"))},handleCancel:function(e){n.input.value="",mUtil.css(n.iconCancel,"visibility","hidden"),mUtil.removeClass(a,n.options.hasResultClass),r.closeDropdown()},closeDropdown:function(){n.dropdown.hide()},showDropdown:function(e){},eventTrigger:function(e){for(i=0;i<n.events.length;i++){var t=n.events[i];t.name==e&&(1==t.one?0==t.fired&&(n.events[i].fired=!0,t.handler.call(this,n)):t.handler.call(this,n))}},addEvent:function(e,t,a){return n.events.push({name:e,handler:t,one:a,fired:!1}),n}};return n.setDefaults=function(e){l=e},n.search=function(){return r.handleSearch()},n.showResult=function(e){return n.dropdown.setContent(e),r.showDropdown(),n},n.showError=function(e){var t=n.options.templates.error.replace("{{message}}",e);return n.dropdown.setContent(t),r.showDropdown(),n},n.showProgress=function(){return r.showProgress()},n.hideProgress=function(){return r.hideProgress()},n.search=function(){return r.search()},n.on=function(e,t){return r.addEvent(e,t)},n.one=function(e,t){return r.addEvent(e,t,!0)},r.construct.apply(n,[t]),n}},mScrollTop=function(e,t){var o=this,a=mUtil.get(e),n=mUtil.get("body");if(a){var i={offset:300,speed:600},l={construct:function(e){return mUtil.data(a).has("scrolltop")?o=mUtil.data(a).get("scrolltop"):(l.init(e),l.build(),mUtil.data(a).set("scrolltop",o)),o},init:function(e){o.events=[],o.options=mUtil.deepExtend({},i,e)},build:function(){navigator.userAgent.match(/iPhone|iPad|iPod/i)?(window.addEventListener("touchend",function(){l.handle()}),window.addEventListener("touchcancel",function(){l.handle()}),window.addEventListener("touchleave",function(){l.handle()})):window.addEventListener("scroll",function(){l.handle()}),mUtil.addEvent(a,"click",l.scroll)},handle:function(){window.pageYOffset>o.options.offset?mUtil.addClass(n,"m-scroll-top--shown"):mUtil.removeClass(n,"m-scroll-top--shown")},scroll:function(e){e.preventDefault(),mUtil.scrollTop(o.options.speed)},eventTrigger:function(e,t){for(var a=0;a<o.events.length;a++){var n=o.events[a];n.name==e&&(1==n.one?0==n.fired&&(o.events[a].fired=!0,n.handler.call(this,o,t)):n.handler.call(this,o,t))}},addEvent:function(e,t,a){o.events.push({name:e,handler:t,one:a,fired:!1})}};return o.setDefaults=function(e){i=e},o.on=function(e,t){return l.addEvent(e,t)},o.one=function(e,t){return l.addEvent(e,t,!0)},l.construct.apply(o,[t]),!0,o}},mToggle=function(e,t){var n=this,a=mUtil.get(e);mUtil.get("body");if(a){var o={togglerState:"",targetState:""},l={construct:function(e){return mUtil.data(a).has("toggle")?n=mUtil.data(a).get("toggle"):(l.init(e),l.build(),mUtil.data(a).set("toggle",n)),n},init:function(e){n.element=a,n.events=[],n.options=mUtil.deepExtend({},o,e),n.target=mUtil.get(n.options.target),n.targetState=n.options.targetState,n.togglerState=n.options.togglerState,n.state=mUtil.hasClasses(n.target,n.targetState)?"on":"off"},build:function(){mUtil.addEvent(a,"mouseup",l.toggle)},toggle:function(){return"off"==n.state?l.toggleOn():l.toggleOff(),n},toggleOn:function(){return l.eventTrigger("beforeOn"),mUtil.addClass(n.target,n.targetState),n.togglerState&&mUtil.addClass(a,n.togglerState),n.state="on",l.eventTrigger("afterOn"),l.eventTrigger("toggle"),n},toggleOff:function(){return l.eventTrigger("beforeOff"),mUtil.removeClass(n.target,n.targetState),n.togglerState&&mUtil.removeClass(a,n.togglerState),n.state="off",l.eventTrigger("afterOff"),l.eventTrigger("toggle"),n},eventTrigger:function(e){for(i=0;i<n.events.length;i++){var t=n.events[i];t.name==e&&(1==t.one?0==t.fired&&(n.events[i].fired=!0,t.handler.call(this,n)):t.handler.call(this,n))}},addEvent:function(e,t,a){return n.events.push({name:e,handler:t,one:a,fired:!1}),n}};return n.setDefaults=function(e){o=e},n.getState=function(){return n.state},n.toggle=function(){return l.toggle()},n.toggleOn=function(){return l.toggleOn()},n.toggle=function(){return l.toggleOff()},n.on=function(e,t){return l.addEvent(e,t)},n.one=function(e,t){return l.addEvent(e,t,!0)},l.construct.apply(n,[t]),n}},mWizard=function(e,t){var l=this,o=mUtil.get(e);mUtil.get("body");if(o){var a={startStep:1,manualStepForward:!1},r={construct:function(e){return mUtil.data(o).has("wizard")?l=mUtil.data(o).get("wizard"):(r.init(e),r.build(),mUtil.data(o).set("wizard",l)),l},init:function(e){l.element=o,l.events=[],l.options=mUtil.deepExtend({},a,e),l.steps=mUtil.findAll(o,".m-wizard__step"),l.progress=mUtil.find(o,".m-wizard__progress .progress-bar"),l.btnSubmit=mUtil.find(o,'[data-wizard-action="submit"]'),l.btnNext=mUtil.find(o,'[data-wizard-action="next"]'),l.btnPrev=mUtil.find(o,'[data-wizard-action="prev"]'),l.btnLast=mUtil.find(o,'[data-wizard-action="last"]'),l.btnFirst=mUtil.find(o,'[data-wizard-action="first"]'),l.events=[],l.currentStep=1,l.totalSteps=l.steps.length,1<l.options.startStep&&r.goTo(l.options.startStep),r.updateUI()},build:function(){mUtil.addEvent(l.btnNext,"click",function(e){e.preventDefault(),r.goNext()}),mUtil.addEvent(l.btnPrev,"click",function(e){e.preventDefault(),r.goPrev()}),mUtil.addEvent(l.btnFirst,"click",function(e){e.preventDefault(),r.goFirst()}),mUtil.addEvent(l.btnLast,"click",function(e){e.preventDefault(),r.goLast()}),mUtil.on(o,".m-wizard__step a.m-wizard__step-number","click",function(){for(var e,t=this.closest(".m-wizard__step"),a=mUtil.parents(this,".m-wizard__steps"),n=mUtil.findAll(a,".m-wizard__step"),o=0,i=n.length;o<i;o++)if(t===n[o]){e=o+1;break}e&&(!1===l.options.manualStepForward?e<l.currentStep&&r.goTo(e):r.goTo(e))})},goTo:function(e){if(e!==l.currentStep)return!1!==((e=e?parseInt(e):r.getNextStep())>l.currentStep?r.eventTrigger("beforeNext"):r.eventTrigger("beforePrev"))&&(l.currentStep=e,r.updateUI(),r.eventTrigger("change")),e>l.startStep?r.eventTrigger("afterNext"):r.eventTrigger("afterPrev"),l},updateUI:function(e){r.updateProgress(),r.handleTarget(),r.setStepClass();for(var t=0,a=l.steps.length;t<a;t++)mUtil.removeClass(l.steps[t],"m-wizard__step--current m-wizard__step--done");for(t=1;t<l.currentStep;t++)mUtil.addClass(l.steps[t-1],"m-wizard__step--done");mUtil.addClass(l.steps[l.currentStep-1],"m-wizard__step--current")},isLastStep:function(){return l.currentStep===l.totalSteps},isFirstStep:function(){return 1===l.currentStep},isBetweenStep:function(){return!1===r.isLastStep()&&!1===r.isFirstStep()},setStepClass:function(){r.isLastStep()?mUtil.addClass(o,"m-wizard--step-last"):mUtil.removeClass(o,"m-wizard--step-last"),r.isFirstStep()?mUtil.addClass(o,"m-wizard--step-first"):mUtil.removeClass(o,"m-wizard--step-first"),r.isBetweenStep()?mUtil.addClass(o,"m-wizard--step-between"):mUtil.removeClass(o,"m-wizard--step-between")},goNext:function(){return r.goTo(r.getNextStep())},goPrev:function(){return r.goTo(r.getPrevStep())},goLast:function(){return r.goTo(l.totalSteps)},goFirst:function(){return r.goTo(1)},updateProgress:function(){if(l.progress)if(mUtil.hasClass(o,"m-wizard--1")){var e=l.currentStep/l.totalSteps*100,t=mUtil.find(o,".m-wizard__step-number"),a=parseInt(mUtil.css(t,"width"));mUtil.css(l.progress,"width","calc("+e+"% + "+a/2+"px)")}else if(mUtil.hasClass(o,"m-wizard--2")){l.currentStep;var n=(l.currentStep-1)*(1/(l.totalSteps-1)*100);mUtil.isInResponsiveRange("minimal-desktop-and-below")?mUtil.css(l.progress,"height",n+"%"):mUtil.css(l.progress,"width",n+"%")}else{e=l.currentStep/l.totalSteps*100;mUtil.css(l.progress,"width",e+"%")}},handleTarget:function(){var e=l.steps[l.currentStep-1],t=mUtil.get(mUtil.attr(e,"m-wizard-target")),a=mUtil.find(o,".m-wizard__form-step--current");mUtil.removeClass(a,"m-wizard__form-step--current"),mUtil.addClass(t,"m-wizard__form-step--current")},getNextStep:function(){return l.totalSteps>=l.currentStep+1?l.currentStep+1:l.totalSteps},getPrevStep:function(){return 1<=l.currentStep-1?l.currentStep-1:1},eventTrigger:function(e){for(i=0;i<l.events.length;i++){var t=l.events[i];t.name==e&&(1==t.one?0==t.fired&&(l.events[i].fired=!0,t.handler.call(this,l)):t.handler.call(this,l))}},addEvent:function(e,t,a){return l.events.push({name:e,handler:t,one:a,fired:!1}),l}};return l.setDefaults=function(e){a=e},l.goNext=function(){return r.goNext()},l.goPrev=function(){return r.goPrev()},l.goLast=function(){return r.goLast()},l.goFirst=function(){return r.goFirst()},l.goTo=function(e){return r.goTo(e)},l.getStep=function(){return l.currentStep},l.isLastStep=function(){return r.isLastStep()},l.isFirstStep=function(){return r.isFirstStep()},l.on=function(e,t){return r.addEvent(e,t)},l.one=function(e,t){return r.addEvent(e,t,!0)},r.construct.apply(l,[t]),l}};swal.setDefaults({width:400,padding:"2.5rem",buttonsStyling:!1,confirmButtonClass:"btn btn-success m-btn m-btn--custom",confirmButtonColor:null,cancelButtonClass:"btn btn-secondary m-btn m-btn--custom",cancelButtonColor:null}),function(l){l.fn.mDatatable=l.fn.mDatatable||{},l.fn.mDatatable.checkbox=function(n,o){var i={selectedAllRows:!1,selectedRows:[],unselectedRows:[],init:function(){i.selectorEnabled()&&(o.vars.requestIds&&n.setDataSourceParam(o.vars.requestIds,!0),i.selectedAllRows=n.getDataSourceParam(o.vars.selectedAllRows),l(n).on("m-datatable--on-layout-updated",function(e,t){t.table==l(n.wrap).attr("id")&&n.ready(function(){i.initVars(),i.initEvent(),i.initSelect()})}))},initEvent:function(){l(n.tableHead).find('.m-checkbox--all > [type="checkbox"]').click(function(e){if(i.selectedRows=i.unselectedRows=[],n.stateRemove("checkbox"),l(this).is(":checked")?i.selectedAllRows=!0:i.selectedAllRows=!1,!o.vars.requestIds){l(this).is(":checked")&&(i.selectedRows=l.makeArray(l(n.tableBody).find('.m-checkbox--single > [type="checkbox"]').map(function(e,t){return l(t).val()})));var t={};t.selectedRows=l.unique(i.selectedRows),n.stateKeep("checkbox",t)}n.setDataSourceParam(o.vars.selectedAllRows,i.selectedAllRows),l(n).trigger("m-datatable--on-click-checkbox",[l(this)])}),l(n.tableBody).find('.m-checkbox--single > [type="checkbox"]').click(function(e){var t=l(this).val();l(this).is(":checked")?(i.selectedRows.push(t),i.unselectedRows=i.remove(i.unselectedRows,t)):(i.unselectedRows.push(t),i.selectedRows=i.remove(i.selectedRows,t)),!o.vars.requestIds&&i.selectedRows.length<1&&l(n.tableHead).find('.m-checkbox--all > [type="checkbox"]').prop("checked",!1);var a={};a.selectedRows=l.unique(i.selectedRows),a.unselectedRows=l.unique(i.unselectedRows),n.stateKeep("checkbox",a),l(n).trigger("m-datatable--on-click-checkbox",[l(this)])})},initSelect:function(){i.selectedAllRows&&o.vars.requestIds?(n.hasClass("m-datatable--error")||l(n.tableHead).find('.m-checkbox--all > [type="checkbox"]').prop("checked",!0),n.setActiveAll(!0),i.unselectedRows.forEach(function(e){n.setInactive(e)})):(i.selectedRows.forEach(function(e){n.setActive(e)}),!n.hasClass("m-datatable--error")&&l(n.tableBody).find('.m-checkbox--single > [type="checkbox"]').not(":checked").length<1&&l(n.tableHead).find('.m-checkbox--all > [type="checkbox"]').prop("checked",!0))},selectorEnabled:function(){return l.grep(n.options.columns,function(e,t){return e.selector||!1})[0]},initVars:function(){var e=n.stateGet("checkbox");void 0!==e&&(i.selectedRows=e.selectedRows||[],i.unselectedRows=e.unselectedRows||[])},getSelectedId:function(e){if(i.initVars(),i.selectedAllRows&&o.vars.requestIds){void 0===e&&(e=o.vars.rowIds);var t=n.getObject(e,n.lastResponse)||[];return 0<t.length&&i.unselectedRows.forEach(function(e){t=i.remove(t,parseInt(e))}),t}return i.selectedRows},remove:function(e,t){return e.filter(function(e){return e!==t})}};return n.checkbox=function(){return i},"object"==typeof o&&(o=l.extend(!0,{},l.fn.mDatatable.checkbox.default,o),i.init.apply(this,[o])),n},l.fn.mDatatable.checkbox.default={vars:{selectedAllRows:"selectedAllRows",requestIds:"requestIds",rowIds:"meta.rowIds"}}}(jQuery),function(f){if(void 0===mUtil)throw new Error("mUtil is required and must be included before mDatatable.");f.fn.mDatatable=function(m){if(0===f(this).length)throw new Error("No mDatatable element exist.");var u=this;u.debug=!1;var p={isInit:!(u.API={record:null,value:null,params:null}),offset:110,stateId:"meta",ajaxParams:{},init:function(e){return null===e.data.source&&p.extractTable(),p.setupBaseDOM.call(),p.setupDOM(u.table),p.spinnerCallback(!0),p.setDataSourceQuery(p.getOption("data.source.read.params.query")),f(u).on("m-datatable--on-layout-updated",p.afterRender),u.debug&&p.stateRemove(p.stateId),f.each(p.getOption("extensions"),function(e,t){"function"==typeof f.fn.mDatatable[e]&&new f.fn.mDatatable[e](u,t)}),"remote"!==e.data.type&&"local"!==e.data.type||((!1===e.data.saveState||!1===e.data.saveState.cookie&&!1===e.data.saveState.webstorage)&&p.stateRemove(p.stateId),"local"===e.data.type&&"object"==typeof e.data.source&&(u.dataSet=u.originalDataSet=p.dataMapCallback(e.data.source)),p.dataRender()),p.setHeadTitle(),p.setHeadTitle(u.tableFoot),null===e.data.type&&(p.setupCellField.call(),p.setupTemplateCell.call(),p.setupSystemColumn.call()),void 0!==e.layout.header&&!1===e.layout.header&&f(u.table).find("thead").remove(),void 0!==e.layout.footer&&!1===e.layout.footer&&f(u.table).find("tfoot").remove(),null!==e.data.type&&"local"!==e.data.type||(p.setupSubDatatable.call(),p.setupSystemColumn.call(),p.redraw()),f(window).resize(p.fullRender),f(u).height(""),f(p.getOption("search.input")).on("keyup",function(e){p.getOption("search.onEnter")&&13!==e.which||p.search(f(this).val().toLowerCase())}),u},extractTable:function(){var i=[],n=f(u).find("tr:first-child th").get().map(function(e,t){var a=f(e).data("field");void 0===a&&(a=f(e).text().trim());var n={field:a,title:a};for(var o in m.columns)m.columns[o].field===a&&(n=f.extend(!0,{},m.columns[o],n));return i.push(n),a});m.columns=i;var e=f(u).find("tr").get().map(function(e){return f(e).find("td").get().map(function(e,t){return f(e).html()})}),o=[];f.each(e,function(e,t){if(0!==t.length){var a={};f.each(t,function(e,t){a[n[e]]=f.trim(t)}),o.push(a)}}),m.data.source=o},layoutUpdate:function(){p.setupSubDatatable.call(),p.setupSystemColumn.call(),p.columnHide.call(),p.sorting.call(),p.setupHover.call(),void 0===m.detail&&1===p.getDepth()&&p.lockTable.call(),p.resetScroll(),p.isInit||(f(u).trigger("m-datatable--on-init",{table:f(u.wrap).attr("id"),options:m}),p.isInit=!0),f(u).trigger("m-datatable--on-layout-updated",{table:f(u.wrap).attr("id")})},lockTable:function(){var t={lockEnabled:!1,init:function(){t.lockEnabled=p.lockEnabledColumns(),0===t.lockEnabled.left.length&&0===t.lockEnabled.right.length||t.enable()},enable:function(){f(u.table).find("thead,tbody,tfoot").each(function(){var e=this;0===f(this).find(".m-datatable__lock").length&&f(this).ready(function(){!function(e){if(0<f(e).find(".m-datatable__lock").length)p.log("Locked container already exist in: ",e);else if(0!==f(e).find(".m-datatable__row").length){var o=f("<div/>").addClass("m-datatable__lock m-datatable__lock--left"),i=f("<div/>").addClass("m-datatable__lock m-datatable__lock--scroll"),l=f("<div/>").addClass("m-datatable__lock m-datatable__lock--right");f(e).find(".m-datatable__row").each(function(){var t=f("<tr/>").addClass("m-datatable__row").appendTo(o),a=f("<tr/>").addClass("m-datatable__row").appendTo(i),n=f("<tr/>").addClass("m-datatable__row").appendTo(l);f(this).find(".m-datatable__cell").each(function(){var e=f(this).data("locked");void 0!==e?(void 0===e.left&&!0!==e||f(this).appendTo(t),void 0!==e.right&&f(this).appendTo(n)):f(this).appendTo(a)}),f(this).remove()}),0<t.lockEnabled.left.length&&(f(u.wrap).addClass("m-datatable--lock"),f(o).appendTo(e)),(0<t.lockEnabled.left.length||0<t.lockEnabled.right.length)&&f(i).appendTo(e),0<t.lockEnabled.right.length&&(f(u.wrap).addClass("m-datatable--lock"),f(l).appendTo(e))}else p.log("No row exist in: ",e)}(e)})})}};return t.init(),t},fullRender:function(){p.spinnerCallback(!0),f(u.wrap).removeClass("m-datatable--loaded"),p.insertData()},lockEnabledColumns:function(){var a=f(window).width(),e=m.columns,n={left:[],right:[]};return f.each(e,function(e,t){void 0!==t.locked&&(void 0!==t.locked.left&&mUtil.getBreakpoint(t.locked.left)<=a&&n.left.push(t.locked.left),void 0!==t.locked.right&&mUtil.getBreakpoint(t.locked.right)<=a&&n.right.push(t.locked.right))}),n},afterRender:function(e,t){t.table==f(u.wrap).attr("id")&&f(u).ready(function(){p.isLocked()||(p.redraw(),p.getOption("rows.autoHide")&&(p.autoHide(),f(u.table).find(".m-datatable__row").css("height",""))),f(u.tableBody).find(".m-datatable__row").removeClass("m-datatable__row--even"),f(u.wrap).hasClass("m-datatable--subtable")?f(u.tableBody).find(".m-datatable__row:not(.m-datatable__row-detail):even").addClass("m-datatable__row--even"):f(u.tableBody).find(".m-datatable__row:nth-child(even)").addClass("m-datatable__row--even"),p.isLocked()&&p.redraw(),f(u.tableBody).css("visibility",""),f(u.wrap).addClass("m-datatable--loaded"),p.scrollbar.call(),p.spinnerCallback(!1)})},hoverTimer:0,isScrolling:!1,setupHover:function(){f(window).scroll(function(e){clearTimeout(p.hoverTimer),p.isScrolling=!0}),f(u.tableBody).find(".m-datatable__cell").off("mouseenter","mouseleave").on("mouseenter",function(){if(p.hoverTimer=setTimeout(function(){p.isScrolling=!1},200),!p.isScrolling){var e=f(this).closest(".m-datatable__row").addClass("m-datatable__row--hover"),t=f(e).index()+1;f(e).closest(".m-datatable__lock").parent().find(".m-datatable__row:nth-child("+t+")").addClass("m-datatable__row--hover")}}).on("mouseleave",function(){var e=f(this).closest(".m-datatable__row").removeClass("m-datatable__row--hover"),t=f(e).index()+1;f(e).closest(".m-datatable__lock").parent().find(".m-datatable__row:nth-child("+t+")").removeClass("m-datatable__row--hover")})},adjustLockContainer:function(){if(!p.isLocked())return 0;var e=f(u.tableHead).width(),t=f(u.tableHead).find(".m-datatable__lock--left").width(),a=f(u.tableHead).find(".m-datatable__lock--right").width();void 0===t&&(t=0),void 0===a&&(a=0);var n=Math.floor(e-t-a);return f(u.table).find(".m-datatable__lock--scroll").css("width",n),n},dragResize:function(){var i,l,r=!1,s=void 0;f(u.tableHead).find(".m-datatable__cell").mousedown(function(e){s=f(this),r=!0,i=e.pageX,l=f(this).width(),f(s).addClass("m-datatable__cell--resizing")}).mousemove(function(a){if(r){var n=f(s).index(),e=f(u.tableBody),t=f(s).closest(".m-datatable__lock");if(t){var o=f(t).index();e=f(u.tableBody).find(".m-datatable__lock").eq(o)}f(e).find(".m-datatable__row").each(function(e,t){f(t).find(".m-datatable__cell").eq(n).width(l+(a.pageX-i)).children().width(l+(a.pageX-i))}),f(s).children().css("width",l+(a.pageX-i))}}).mouseup(function(){f(s).removeClass("m-datatable__cell--resizing"),r=!1}),f(document).mouseup(function(){f(s).removeClass("m-datatable__cell--resizing"),r=!1})},initHeight:function(){if(m.layout.height&&m.layout.scroll){var e=f(u.tableHead).find(".m-datatable__row").height(),t=f(u.tableFoot).find(".m-datatable__row").height(),a=m.layout.height;0<e&&(a-=e),0<t&&(a-=t),f(u.tableBody).css("max-height",a)}},setupBaseDOM:function(){u.initialDatatable=f(u).clone(),"TABLE"===f(u).prop("tagName")?(u.table=f(u).removeClass("m-datatable").addClass("m-datatable__table"),0===f(u.table).parents(".m-datatable").length&&(u.table.wrap(f("<div/>").addClass("m-datatable").addClass("m-datatable--"+m.layout.theme)),u.wrap=f(u.table).parent())):(u.wrap=f(u).addClass("m-datatable").addClass("m-datatable--"+m.layout.theme),u.table=f("<table/>").addClass("m-datatable__table").appendTo(u)),void 0!==m.layout.class&&f(u.wrap).addClass(m.layout.class),f(u.table).removeClass("m-datatable--destroyed").css("display","block"),void 0===f(u).attr("id")&&(p.setOption("data.saveState",!1),f(u.table).attr("id",mUtil.getUniqueID("m-datatable--"))),p.getOption("layout.minHeight")&&f(u.table).css("min-height",p.getOption("layout.minHeight")),p.getOption("layout.height")&&f(u.table).css("max-height",p.getOption("layout.height")),null===m.data.type&&f(u.table).css("width","").css("display",""),u.tableHead=f(u.table).find("thead"),0===f(u.tableHead).length&&(u.tableHead=f("<thead/>").prependTo(u.table)),u.tableBody=f(u.table).find("tbody"),0===f(u.tableBody).length&&(u.tableBody=f("<tbody/>").appendTo(u.table)),void 0!==m.layout.footer&&m.layout.footer&&(u.tableFoot=f(u.table).find("tfoot"),0===f(u.tableFoot).length&&(u.tableFoot=f("<tfoot/>").appendTo(u.table)))},setupCellField:function(e){void 0===e&&(e=f(u.table).children());var a=m.columns;f.each(e,function(e,t){f(t).find(".m-datatable__row").each(function(e,t){f(t).find(".m-datatable__cell").each(function(e,t){void 0!==a[e]&&f(t).data(a[e])})})})},setupTemplateCell:function(e){void 0===e&&(e=u.tableBody);var r=m.columns;f(e).find(".m-datatable__row").each(function(i,e){var l=f(e).data("obj")||{};l.getIndex=function(){return i},l.getDatatable=function(){return u};var t=p.getOption("rows.callback");"function"==typeof t&&t(f(e),l,i);var a=p.getOption("rows.beforeTemplate");"function"==typeof a&&a(f(e),l,i),void 0===l&&(l={},f(e).find(".m-datatable__cell").each(function(e,a){var t=f.grep(r,function(e,t){return f(a).data("field")===e.field})[0];void 0!==t&&(l[t.field]=f(a).text())})),f(e).find(".m-datatable__cell").each(function(e,a){var t=f.grep(r,function(e,t){return f(a).data("field")===e.field})[0];if(void 0!==t&&void 0!==t.template){var n="";"string"==typeof t.template&&(n=p.dataPlaceholder(t.template,l)),"function"==typeof t.template&&(n=t.template(l,i,u));var o=f("<span/>").append(n);f(a).html(o),void 0!==t.overflow&&f(o).css("overflow",t.overflow)}});var n=p.getOption("rows.afterTemplate");"function"==typeof n&&n(f(e),l,i)})},setupSystemColumn:function(){if(u.dataSet=u.dataSet||[],0!==u.dataSet.length){var i=m.columns;f(u.tableBody).find(".m-datatable__row").each(function(e,t){f(t).find(".m-datatable__cell").each(function(e,a){var t=f.grep(i,function(e,t){return f(a).data("field")===e.field})[0];if(void 0!==t){var n=f(a).text();if(void 0!==t.selector&&!1!==t.selector){if(0<f(a).find('.m-checkbox [type="checkbox"]').length)return;f(a).addClass("m-datatable__cell--check");var o=f("<label/>").addClass("m-checkbox m-checkbox--single").append(f("<input/>").attr("type","checkbox").attr("value",n).on("click",function(){f(this).is(":checked")?p.setActive(this):p.setInactive(this)})).append(f("<span/>"));void 0!==t.selector.class&&f(o).addClass(t.selector.class),f(a).children().html(o)}if(void 0!==t.subtable&&t.subtable){if(0<f(a).find(".m-datatable__toggle-subtable").length)return;f(a).children().html(f("<a/>").addClass("m-datatable__toggle-subtable").attr("href","#").attr("data-value",n).append(f("<i/>").addClass(p.getOption("layout.icons.rowDetail.collapse"))))}}})});var e=function(e){var t=f.grep(i,function(e,t){return void 0!==e.selector&&!1!==e.selector})[0];if(void 0!==t&&void 0!==t.selector&&!1!==t.selector){var a=f(e).find('[data-field="'+t.field+'"]');if(0<f(a).find('.m-checkbox [type="checkbox"]').length)return;f(a).addClass("m-datatable__cell--check");var n=f("<label/>").addClass("m-checkbox m-checkbox--single m-checkbox--all").append(f("<input/>").attr("type","checkbox").on("click",function(){f(this).is(":checked")?p.setActiveAll(!0):p.setActiveAll(!1)})).append(f("<span/>"));void 0!==t.selector.class&&f(n).addClass(t.selector.class),f(a).children().html(n)}};m.layout.header&&e(f(u.tableHead).find(".m-datatable__row").first()),m.layout.footer&&e(f(u.tableFoot).find(".m-datatable__row").first())}},adjustCellsWidth:function(){var e=f(u.tableHead).width(),t=p.getOneRow(u.tableHead,1).length;if(0<t){e-=20*t;var o=Math.floor(e/t);o<=p.offset&&(o=p.offset),f(u.table).find(".m-datatable__row").find(".m-datatable__cell").each(function(e,t){var a=o,n=f(t).data("width");void 0!==n&&(a=n),f(t).children().css("width",a)})}},adjustCellsHeight:function(){f.each(f(u.table).children(),function(e,t){for(var a=f(t).find(".m-datatable__row").first().parent().find(".m-datatable__row").length,n=1;n<=a;n++){var o=f(t).find(".m-datatable__row:nth-child("+n+")");if(0<f(o).length){var i=Math.max.apply(null,f(o).map(function(){return f(this).height()}).get());f(o).css("height",Math.ceil(parseInt(i)))}}})},setupDOM:function(e){f(e).find("> thead").addClass("m-datatable__head"),f(e).find("> tbody").addClass("m-datatable__body"),f(e).find("> tfoot").addClass("m-datatable__foot"),f(e).find("tr").addClass("m-datatable__row"),f(e).find("tr > th, tr > td").addClass("m-datatable__cell"),f(e).find("tr > th, tr > td").each(function(e,t){0===f(t).find("span").length&&f(t).wrapInner(f("<span/>").css("width",p.offset))})},scrollbar:function(){var n={scrollable:null,tableLocked:null,mcsOptions:{scrollInertia:0,autoDraggerLength:!0,autoHideScrollbar:!0,autoExpandScrollbar:!1,alwaysShowScrollbar:0,mouseWheel:{scrollAmount:120,preventDefault:!1},advanced:{updateOnContentResize:!0,autoExpandHorizontalScroll:!0},theme:"minimal-dark"},init:function(){p.destroyScroller(n.scrollable);var e=mUtil.getViewPort().width;if(m.layout.scroll){f(u.wrap).addClass("m-datatable--scroll");var t=f(u.tableBody).find(".m-datatable__lock--scroll");0<f(t).find(".m-datatable__row").length&&0<f(t).length?(n.scrollHead=f(u.tableHead).find("> .m-datatable__lock--scroll > .m-datatable__row"),n.scrollFoot=f(u.tableFoot).find("> .m-datatable__lock--scroll > .m-datatable__row"),n.tableLocked=f(u.tableBody).find(".m-datatable__lock:not(.m-datatable__lock--scroll)"),e>mUtil.getBreakpoint("lg")?n.mCustomScrollbar(t):n.defaultScrollbar(t)):0<f(u.tableBody).find(".m-datatable__row").length&&(n.scrollHead=f(u.tableHead).find("> .m-datatable__row"),n.scrollFoot=f(u.tableFoot).find("> .m-datatable__row"),e>mUtil.getBreakpoint("lg")?n.mCustomScrollbar(u.tableBody):n.defaultScrollbar(u.tableBody))}else f(u.table).css("overflow-x","auto")},defaultScrollbar:function(e){f(e).css("overflow","auto").css("max-height",p.getOption("layout.height")).on("scroll",n.onScrolling)},onScrolling:function(e){var t=f(this).scrollLeft(),a=f(this).scrollTop();f(n.scrollHead).css("left",-t),f(n.scrollFoot).css("left",-t),f(n.tableLocked).each(function(e,t){f(t).css("top",-a)})},mCustomScrollbar:function(e){n.scrollable=e;var t="xy";null===p.getOption("layout.height")&&(t="x");var a=f.extend({},n.mcsOptions,{axis:t,setHeight:f(u.tableBody).height(),callbacks:{whileScrolling:function(){var a=this.mcs;f(n.scrollHead).css("left",a.left),f(n.scrollFoot).css("left",a.left),f(n.tableLocked).each(function(e,t){f(t).css("top",a.top)}),clearTimeout(p.hoverTimer),p.isScrolling=!0}}});!0===p.getOption("layout.smoothScroll.scrollbarShown")&&f(e).attr("data-scrollbar-shown","true"),p.mCustomScrollbar(e,a)}};return n.init(),n},mCustomScrollbar:function(e,t){f(u.tableBody).css("overflow",""),p.destroyScroller(f(u.table).find(".mCustomScrollbar")),f(e).mCustomScrollbar(t)},setHeadTitle:function(e){void 0===e&&(e=u.tableHead);var t=m.columns,o=f(e).find(".m-datatable__row"),i=f(e).find(".m-datatable__cell");0===f(o).length&&(o=f("<tr/>").appendTo(e)),f.each(t,function(e,t){var a=f(i).eq(e);if(0===f(a).length&&(a=f("<th/>").appendTo(o)),void 0!==t.title&&f(a).html(t.title).attr("data-field",t.field).data(t),void 0!==t.textAlign){var n=void 0!==u.textAlign[t.textAlign]?u.textAlign[t.textAlign]:"";f(a).addClass(n)}}),p.setupDOM(e)},dataRender:function(e){f(u.table).siblings(".m-datatable__pager").removeClass("m-datatable--paging-loaded");var n=function(){u.dataSet=u.dataSet||[],p.localDataUpdate();var e=p.getDataSourceParam("pagination");0===e.perpage&&(e.perpage=m.data.pageSize||10),e.total=u.dataSet.length;var t=Math.max(e.perpage*(e.page-1),0),a=Math.min(t+e.perpage,e.total);return u.dataSet=f(u.dataSet).slice(t,a),e},t=function(e){var t=function(t,a){f(t.pager).hasClass("m-datatable--paging-loaded")||(f(t.pager).remove(),t.init(a)),f(t.pager).off().on("m-datatable--on-goto-page",function(e){f(t.pager).remove(),t.init(a)});var e=Math.max(a.perpage*(a.page-1),0),n=Math.min(e+a.perpage,a.total);p.localDataUpdate(),u.dataSet=f(u.dataSet).slice(e,n),p.insertData()};if(f(u.wrap).removeClass("m-datatable--error"),m.pagination)if(m.data.serverPaging&&"local"!==m.data.type){var a=p.getObject("meta",e||null);null!==a?p.paging(a):p.paging(n(),t)}else p.paging(n(),t);else p.localDataUpdate();p.insertData()};"local"===m.data.type||void 0===m.data.source.read&&null!==u.dataSet||!1===m.data.serverSorting&&"sort"===e?t():p.getData().done(t)},insertData:function(){u.dataSet=u.dataSet||[];var s=p.getDataSourceParam(),d=f("<tbody/>").addClass("m-datatable__body").css("visibility","hidden"),c=m.columns.length;f.each(u.dataSet,function(e,t){for(var a=f("<tr/>").attr("data-row",e).data("obj",t),n=(e=0,[]),o=0;o<c;o+=1){var i=m.columns[o],l=[];if(p.getObject("sort.field",s)===i.field&&l.push("m-datatable__cell--sorted"),void 0!==i.textAlign){var r=void 0!==u.textAlign[i.textAlign]?u.textAlign[i.textAlign]:"";l.push(r)}n[e++]='<td data-field="'+i.field+'"',n[e++]=' class="'+l.join(" ")+'"',n[e++]=">",n[e++]=p.getObject(i.field,t),n[e++]="</td>"}f(a).append(n.join("")),f(d).append(a)}),0===u.dataSet.length&&(p.destroyScroller(f(u.table).find(".mCustomScrollbar")),f(d).html(f("<span/>").addClass("m-datatable--error").html(p.getOption("translate.records.noRecords"))),f(u.wrap).addClass("m-datatable--error m-datatable--loaded"),p.spinnerCallback(!1)),f(u.tableBody).replaceWith(d),u.tableBody=d,p.setupDOM(u.table),p.setupCellField([u.tableBody]),p.setupTemplateCell(u.tableBody),p.layoutUpdate()},updateTableComponents:function(){u.tableHead=f(u.table).children("thead"),u.tableBody=f(u.table).children("tbody"),u.tableFoot=f(u.table).children("tfoot")},getData:function(){p.spinnerCallback(!0);var e={dataType:"json",method:"GET",data:{},timeout:3e4};if("local"===m.data.type&&(e.url=m.data.source),"remote"===m.data.type){e.url=p.getOption("data.source.read.url"),"string"!=typeof e.url&&(e.url=p.getOption("data.source.read")),"string"!=typeof e.url&&(e.url=p.getOption("data.source")),e.headers=p.getOption("data.source.read.headers"),e.method=p.getOption("data.source.read.method")||"POST";var t=p.getDataSourceParam();p.getOption("data.serverPaging")||delete t.pagination,p.getOption("data.serverSorting")||delete t.sort,e.data.datatable=t,e.data=f.extend(!0,e.data,t,p.getOption("data.source.read.params"))}return f.ajax(e).done(function(e,t,a){u.lastResponse=e,u.dataSet=u.originalDataSet=p.dataMapCallback(e),p.setAutoColumns(),f(u).trigger("m-datatable--on-ajax-done",[u.dataSet])}).fail(function(e,t,a){p.destroyScroller(f(u.table).find(".mCustomScrollbar")),f(u).trigger("m-datatable--on-ajax-fail",[e]),f(u.tableBody).html(f("<span/>").addClass("m-datatable--error").html(p.getOption("translate.records.noRecords"))),f(u.wrap).addClass("m-datatable--error m-datatable--loaded"),p.spinnerCallback(!1)}).always(function(){})},paging:function(e,t){var m={meta:null,pager:null,paginateEvent:null,pagerLayout:{pagination:null,info:null},callback:null,init:function(e){m.meta=e,m.meta.pages=Math.max(Math.ceil(m.meta.total/m.meta.perpage),1),m.meta.page>m.meta.pages&&(m.meta.page=m.meta.pages),m.paginateEvent=p.getTablePrefix(),m.pager=f(u.table).siblings(".m-datatable__pager"),f(m.pager).hasClass("m-datatable--paging-loaded")||(f(m.pager).remove(),0!==m.meta.pages&&(p.setDataSourceParam("pagination",{page:m.meta.page,pages:m.meta.pages,perpage:m.meta.perpage,total:m.meta.total}),m.callback=m.serverCallback,"function"==typeof t&&(m.callback=t),m.addPaginateEvent(),m.populate(),m.meta.page=Math.max(m.meta.page||1,m.meta.page),f(u).trigger(m.paginateEvent,m.meta),m.pagingBreakpoint.call(),f(window).resize(m.pagingBreakpoint)))},serverCallback:function(e,t){p.dataRender()},populate:function(){var e=p.getOption("layout.icons.pagination"),t=p.getOption("translate.toolbar.pagination.items.default");m.pager=f("<div/>").addClass("m-datatable__pager m-datatable--paging-loaded clearfix");var a=f("<ul/>").addClass("m-datatable__pager-nav");m.pagerLayout.pagination=a,f("<li/>").append(f("<a/>").attr("title",t.first).addClass("m-datatable__pager-link m-datatable__pager-link--first").append(f("<i/>").addClass(e.first)).on("click",m.gotoMorePage).attr("data-page",1)).appendTo(a),f("<li/>").append(f("<a/>").attr("title",t.prev).addClass("m-datatable__pager-link m-datatable__pager-link--prev").append(f("<i/>").addClass(e.prev)).on("click",m.gotoMorePage)).appendTo(a),f("<li/>").append(f("<a/>").attr("title",t.more).addClass("m-datatable__pager-link m-datatable__pager-link--more-prev").html(f("<i/>").addClass(e.more)).on("click",m.gotoMorePage)).appendTo(a),f("<li/>").append(f("<input/>").attr("type","text").addClass("m-pager-input form-control").attr("title",t.input).on("keyup",function(){f(this).attr("data-page",Math.abs(f(this).val()))}).on("keypress",function(e){13===e.which&&m.gotoMorePage(e)})).appendTo(a);var n=p.getOption("toolbar.items.pagination.pages.desktop.pagesNumber"),o=Math.ceil(m.meta.page/n)*n,i=o-n;o>m.meta.pages&&(o=m.meta.pages);for(var l=i;l<o;l++){var r=l+1;f("<li/>").append(f("<a/>").addClass("m-datatable__pager-link m-datatable__pager-link-number").text(r).attr("data-page",r).attr("title",r).on("click",m.gotoPage)).appendTo(a)}f("<li/>").append(f("<a/>").attr("title",t.more).addClass("m-datatable__pager-link m-datatable__pager-link--more-next").html(f("<i/>").addClass(e.more)).on("click",m.gotoMorePage)).appendTo(a),f("<li/>").append(f("<a/>").attr("title",t.next).addClass("m-datatable__pager-link m-datatable__pager-link--next").append(f("<i/>").addClass(e.next)).on("click",m.gotoMorePage)).appendTo(a),f("<li/>").append(f("<a/>").attr("title",t.last).addClass("m-datatable__pager-link m-datatable__pager-link--last").append(f("<i/>").addClass(e.last)).on("click",m.gotoMorePage).attr("data-page",m.meta.pages)).appendTo(a),p.getOption("toolbar.items.info")&&(m.pagerLayout.info=f("<div/>").addClass("m-datatable__pager-info").append(f("<span/>").addClass("m-datatable__pager-detail"))),f.each(p.getOption("toolbar.layout"),function(e,t){f(m.pagerLayout[t]).appendTo(m.pager)});var s=f("<select/>").addClass("selectpicker m-datatable__pager-size").attr("title",p.getOption("translate.toolbar.pagination.items.default.select")).attr("data-width","70px").val(m.meta.perpage).on("change",m.updatePerpage).prependTo(m.pagerLayout.info),d=p.getOption("toolbar.items.pagination.pageSizeSelect");0==d.length&&(d=[10,20,30,50,100]),f.each(d,function(e,t){var a=t;-1===t&&(a="All"),f("<option/>").attr("value",t).html(a).appendTo(s)}),m.paste()},paste:function(){f.each(f.unique(p.getOption("toolbar.placement")),function(e,t){"bottom"===t&&f(m.pager).clone(!0).insertAfter(u.table),"top"===t&&f(m.pager).clone(!0).addClass("m-datatable__pager--top").insertBefore(u.table)})},gotoMorePage:function(e){if(e.preventDefault(),"disabled"===f(this).attr("disabled"))return!1;var t=f(this).attr("data-page");return void 0===t&&(t=f(e.target).attr("data-page")),m.openPage(parseInt(t)),!1},gotoPage:function(e){e.preventDefault(),f(this).hasClass("m-datatable__pager-link--active")||m.openPage(parseInt(f(this).data("page")))},openPage:function(e){m.meta.page=parseInt(e),f(u).trigger(m.paginateEvent,m.meta),m.callback(m,m.meta),f(m.pager).trigger("m-datatable--on-goto-page",m.meta)},updatePerpage:function(e){e.preventDefault(),null===p.getOption("layout.height")&&f("html, body").animate({scrollTop:f(u).position().top}),m.pager=f(u.table).siblings(".m-datatable__pager").removeClass("m-datatable--paging-loaded"),e.originalEvent&&(m.meta.perpage=parseInt(f(this).val())),f(m.pager).find("select.m-datatable__pager-size").val(m.meta.perpage).attr("data-selected",m.meta.perpage),p.setDataSourceParam("pagination",{page:m.meta.page,pages:m.meta.pages,perpage:m.meta.perpage,total:m.meta.total}),f(m.pager).trigger("m-datatable--on-update-perpage",m.meta),f(u).trigger(m.paginateEvent,m.meta),m.callback(m,m.meta),m.updateInfo.call()},addPaginateEvent:function(e){f(u).off(m.paginateEvent).on(m.paginateEvent,function(e,t){p.spinnerCallback(!0),m.pager=f(u.table).siblings(".m-datatable__pager");var a=f(m.pager).find(".m-datatable__pager-nav");f(a).find(".m-datatable__pager-link--active").removeClass("m-datatable__pager-link--active"),f(a).find('.m-datatable__pager-link-number[data-page="'+t.page+'"]').addClass("m-datatable__pager-link--active"),f(a).find(".m-datatable__pager-link--prev").attr("data-page",Math.max(t.page-1,1)),f(a).find(".m-datatable__pager-link--next").attr("data-page",Math.min(t.page+1,t.pages)),f(m.pager).each(function(){f(this).find('.m-pager-input[type="text"]').prop("value",t.page)}),f(m.pager).find(".m-datatable__pager-nav").show(),t.pages<=1&&f(m.pager).find(".m-datatable__pager-nav").hide(),p.setDataSourceParam("pagination",{page:m.meta.page,pages:m.meta.pages,perpage:m.meta.perpage,total:m.meta.total}),f(m.pager).find("select.m-datatable__pager-size").val(t.perpage).attr("data-selected",t.perpage),f(u.table).find('.m-checkbox > [type="checkbox"]').prop("checked",!1),f(u.table).find(".m-datatable__row--active").removeClass("m-datatable__row--active"),m.updateInfo.call(),m.pagingBreakpoint.call()})},updateInfo:function(){var e=Math.max(m.meta.perpage*(m.meta.page-1)+1,1),t=Math.min(e+m.meta.perpage-1,m.meta.total);f(m.pager).find(".m-datatable__pager-info").find(".m-datatable__pager-detail").html(p.dataPlaceholder(p.getOption("translate.toolbar.pagination.items.info"),{start:e,end:-1===m.meta.perpage?m.meta.total:t,pageSize:-1===m.meta.perpage||m.meta.perpage>=m.meta.total?m.meta.total:m.meta.perpage,total:m.meta.total}))},pagingBreakpoint:function(){var a=f(u.table).siblings(".m-datatable__pager").find(".m-datatable__pager-nav");if(0!==f(a).length){var n=p.getCurrentPage(),o=f(a).find(".m-pager-input").closest("li");f(a).find("li").show(),f.each(p.getOption("toolbar.items.pagination.pages"),function(e,t){if(mUtil.isInResponsiveRange(e)){switch(e){case"desktop":case"tablet":Math.ceil(n/t.pagesNumber),t.pagesNumber,t.pagesNumber;f(o).hide(),m.meta=p.getDataSourceParam("pagination"),m.paginationUpdate();break;case"mobile":f(o).show(),f(a).find(".m-datatable__pager-link--more-prev").closest("li").hide(),f(a).find(".m-datatable__pager-link--more-next").closest("li").hide(),f(a).find(".m-datatable__pager-link-number").closest("li").hide()}return!1}})}},paginationUpdate:function(){var e=f(u.table).siblings(".m-datatable__pager").find(".m-datatable__pager-nav"),t=f(e).find(".m-datatable__pager-link--more-prev"),a=f(e).find(".m-datatable__pager-link--more-next"),n=f(e).find(".m-datatable__pager-link--first"),o=f(e).find(".m-datatable__pager-link--prev"),i=f(e).find(".m-datatable__pager-link--next"),l=f(e).find(".m-datatable__pager-link--last"),r=f(e).find(".m-datatable__pager-link-number"),s=Math.max(f(r).first().data("page")-1,1);f(t).each(function(e,t){f(t).attr("data-page",s)}),1===s?f(t).parent().hide():f(t).parent().show();var d=Math.min(f(r).last().data("page")+1,m.meta.pages);f(a).each(function(e,t){f(a).attr("data-page",d).show()}),d===m.meta.pages&&d===f(r).last().data("page")?f(a).parent().hide():f(a).parent().show(),1===m.meta.page?(f(n).attr("disabled",!0).addClass("m-datatable__pager-link--disabled"),f(o).attr("disabled",!0).addClass("m-datatable__pager-link--disabled")):(f(n).removeAttr("disabled").removeClass("m-datatable__pager-link--disabled"),f(o).removeAttr("disabled").removeClass("m-datatable__pager-link--disabled")),m.meta.page===m.meta.pages?(f(i).attr("disabled",!0).addClass("m-datatable__pager-link--disabled"),f(l).attr("disabled",!0).addClass("m-datatable__pager-link--disabled")):(f(i).removeAttr("disabled").removeClass("m-datatable__pager-link--disabled"),f(l).removeAttr("disabled").removeClass("m-datatable__pager-link--disabled"));var c=p.getOption("toolbar.items.pagination.navigation");c.first||f(n).remove(),c.prev||f(o).remove(),c.next||f(i).remove(),c.last||f(l).remove()}};return m.init(e),m},columnHide:function(){var o=mUtil.getViewPort().width;f.each(m.columns,function(e,t){if(void 0!==t.responsive){var a=t.field,n=f.grep(f(u.table).find(".m-datatable__cell"),function(e,t){return a===f(e).data("field")});mUtil.getBreakpoint(t.responsive.hidden)>=o?f(n).hide():f(n).show(),mUtil.getBreakpoint(t.responsive.visible)<=o?f(n).show():f(n).hide()}})},setupSubDatatable:function(){var l=p.getOption("detail.content");if("function"==typeof l&&!(0<f(u.table).find(".m-datatable__subtable").length)){f(u.wrap).addClass("m-datatable--subtable"),m.columns[0].subtable=!0;var o=function(a){a.preventDefault();var e=f(this).closest(".m-datatable__row"),t=f(e).next(".m-datatable__row-subtable");0===f(t).length&&(t=f("<tr/>").addClass("m-datatable__row-subtable m-datatable__row-loading").hide().append(f("<td/>").addClass("m-datatable__subtable").attr("colspan",p.getTotalColumns())),f(e).after(t),f(e).hasClass("m-datatable__row--even")&&f(t).addClass("m-datatable__row-subtable--even")),f(t).toggle();var n=f(t).find(".m-datatable__subtable"),o=f(this).closest("[data-field]:first-child").find(".m-datatable__toggle-subtable").data("value"),i=f(this).find("i").removeAttr("class");f(e).hasClass("m-datatable__row--subtable-expanded")?(f(i).addClass(p.getOption("layout.icons.rowDetail.collapse")),f(e).removeClass("m-datatable__row--subtable-expanded"),f(u).trigger("m-datatable--on-collapse-subtable",[e])):(f(i).addClass(p.getOption("layout.icons.rowDetail.expand")),f(e).addClass("m-datatable__row--subtable-expanded"),f(u).trigger("m-datatable--on-expand-subtable",[e])),0===f(n).find(".m-datatable").length&&(f.map(u.dataSet,function(e,t){return o===e[m.columns[0].field]&&(a.data=e,!0)}),a.detailCell=n,a.parentRow=e,a.subTable=n,l(a),f(n).children(".m-datatable").on("m-datatable--on-init",function(e){f(t).removeClass("m-datatable__row-loading")}),"local"===p.getOption("data.type")&&f(t).removeClass("m-datatable__row-loading"))},i=m.columns;f(u.tableBody).find(".m-datatable__row").each(function(e,t){f(t).find(".m-datatable__cell").each(function(e,a){var t=f.grep(i,function(e,t){return f(a).data("field")===e.field})[0];if(void 0!==t){var n=f(a).text();if(void 0!==t.subtable&&t.subtable){if(0<f(a).find(".m-datatable__toggle-subtable").length)return;f(a).html(f("<a/>").addClass("m-datatable__toggle-subtable").attr("href","#").attr("data-value",n).attr("title",p.getOption("detail.title")).on("click",o).append(f("<i/>").css("width",f(a).data("width")).addClass(p.getOption("layout.icons.rowDetail.collapse"))))}}})})}},dataMapCallback:function(e){var t=e;return"function"==typeof p.getOption("data.source.read.map")?p.getOption("data.source.read.map")(e):(void 0!==e.data&&(t=e.data),t)},isSpinning:!1,spinnerCallback:function(e){if(e){if(!p.isSpinning){var t=p.getOption("layout.spinner");!0===t.message&&(t.message=p.getOption("translate.records.processing")),p.isSpinning=!0,void 0!==mApp&&mApp.block(u,t)}}else p.isSpinning=!1,void 0!==mApp&&mApp.unblock(u)},sortCallback:function(e,i,t){var l=t.type||"string",r=t.format||"",s=t.field;if("date"===l&&"undefined"==typeof moment)throw new Error("Moment.js is required.");return f(e).sort(function(e,t){var a=e[s],n=t[s];switch(l){case"date":var o=moment(a,r).diff(moment(n,r));return"asc"===i?0<o?1:o<0?-1:0:o<0?1:0<o?-1:0;case"number":return isNaN(parseFloat(a))&&null!=a&&(a=Number(a.replace(/[^0-9\.-]+/g,""))),isNaN(parseFloat(n))&&null!=n&&(n=Number(n.replace(/[^0-9\.-]+/g,""))),a=parseFloat(a),n=parseFloat(n),"asc"===i?n<a?1:a<n?-1:0:a<n?1:n<a?-1:0;case"string":default:return"asc"===i?n<a?1:a<n?-1:0:a<n?1:n<a?-1:0}})},log:function(e,t){void 0===t&&(t=""),u.debug&&console.log(e,t)},autoHide:function(){f(u.table).find(".m-datatable__cell").show(),f(u.tableBody).each(function(){for(;f(this)[0].offsetWidth<f(this)[0].scrollWidth;)f(this).find(".m-datatable__row").each(function(e){var t=f(this).find(".m-datatable__cell").not(":hidden").last();f(t).hide(),0===e&&(f(u.tableHead).find(".m-datatable__cell").eq(f(t).index()).hide(),f(u.tableFoot).find(".m-datatable__cell").eq(f(t).index()).hide())})});var e=function(e){e.preventDefault();var t=f(this).closest(".m-datatable__row"),a=f(t).next();if(f(a).hasClass("m-datatable__row-detail"))f(this).find("i").removeClass(p.getOption("layout.icons.rowDetail.expand")).addClass(p.getOption("layout.icons.rowDetail.collapse")),f(a).remove();else{f(this).find("i").removeClass(p.getOption("layout.icons.rowDetail.collapse")).addClass(p.getOption("layout.icons.rowDetail.expand"));var n=f(t).find(".m-datatable__cell:hidden").clone().show();a=f("<tr/>").addClass("m-datatable__row-detail").insertAfter(t);var o=f("<td/>").addClass("m-datatable__detail").attr("colspan",p.getTotalColumns()).appendTo(a),i=f("<table/>");f(n).each(function(){var a=f(this).data("field"),e=f.grep(m.columns,function(e,t){return a===e.field})[0];f(i).append(f('<tr class="m-datatable__row"></tr>').append(f('<td class="m-datatable__cell"></td>').append(f("<span/>").css("width",p.offset).append(e.title))).append(this))}),f(o).append(i)}};f(u.tableBody).find(".m-datatable__row").each(function(){f(this).prepend(f("<td/>").addClass("m-datatable__cell m-datatable__toggle--detail").append(f("<a/>").addClass("m-datatable__toggle-detail").attr("href","#").on("click",e).append(f("<i/>").css("width","21px").addClass(p.getOption("layout.icons.rowDetail.collapse"))))),0===f(u.tableHead).find(".m-datatable__toggle-detail").length?(f(u.tableHead).find(".m-datatable__row").first().prepend('<th class="m-datatable__cell m-datatable__toggle-detail"><span style="width: 21px"></span></th>'),f(u.tableFoot).find(".m-datatable__row").first().prepend('<th class="m-datatable__cell m-datatable__toggle-detail"><span style="width: 21px"></span></th>')):f(u.tableHead).find(".m-datatable__toggle-detail").find("span").css("width","21px")})},hoverColumn:function(){f(u.tableBody).on("mouseenter",".m-datatable__cell",function(){var e=f(p.cell(this).nodes()).index();f(p.cells().nodes()).removeClass("m-datatable__cell--hover"),f(p.column(e).nodes()).addClass("m-datatable__cell--hover")})},setAutoColumns:function(){p.getOption("data.autoColumns")&&(f.each(u.dataSet[0],function(a,e){0===f.grep(m.columns,function(e,t){return a===e.field}).length&&m.columns.push({field:a,title:a})}),f(u.tableHead).find(".m-datatable__row").remove(),p.setHeadTitle(),p.getOption("layout.footer")&&(f(u.tableFoot).find(".m-datatable__row").remove(),p.setHeadTitle(u.tableFoot)))},isLocked:function(){return f(u.wrap).hasClass("m-datatable--lock")||!1},replaceTableContent:function(e,t){void 0===t&&(t=u.tableBody),f(t).hasClass("mCustomScrollbar")?f(t).find(".mCSB_container").html(e):f(t).html(e)},getExtraSpace:function(e){return parseInt(f(e).css("paddingRight"))+parseInt(f(e).css("paddingLeft"))+(parseInt(f(e).css("marginRight"))+parseInt(f(e).css("marginLeft")))+Math.ceil(f(e).css("border-right-width").replace("px",""))},dataPlaceholder:function(e,t){var a=e;return f.each(t,function(e,t){a=a.replace("{{"+e+"}}",t)}),a},getTableId:function(e){void 0===e&&(e="");var t=f(u).attr("id");return void 0===t&&(t=f(u).attr("class").split(" ")[0]),t+e},getTablePrefix:function(e){return void 0!==e&&(e="-"+e),p.getTableId()+"-"+p.getDepth()+e},getDepth:function(){for(var e=0,t=u.table;t=f(t).parents(".m-datatable__table"),e++,0<f(t).length;);return e},stateKeep:function(e,t){e=p.getTablePrefix(e),!1!==p.getOption("data.saveState")&&(p.getOption("data.saveState.webstorage")&&localStorage&&localStorage.setItem(e,JSON.stringify(t)),p.getOption("data.saveState.cookie")&&Cookies.set(e,JSON.stringify(t)))},stateGet:function(e,t){if(e=p.getTablePrefix(e),!1!==p.getOption("data.saveState")){var a=null;return null!=(a=p.getOption("data.saveState.webstorage")&&localStorage?localStorage.getItem(e):Cookies.get(e))?JSON.parse(a):void 0}},stateUpdate:function(e,t){var a=p.stateGet(e);null==a&&(a={}),p.stateKeep(e,f.extend({},a,t))},stateRemove:function(e){e=p.getTablePrefix(e),localStorage&&localStorage.removeItem(e),Cookies.remove(e)},getTotalColumns:function(e){return void 0===e&&(e=u.tableBody),f(e).find(".m-datatable__row").first().find(".m-datatable__cell").length},getOneRow:function(e,t,a){void 0===a&&(a=!0);var n=f(e).find(".m-datatable__row:not(.m-datatable__row-detail):nth-child("+t+")");return a&&(n=n.find(".m-datatable__cell")),n},hasOverflowY:function(e){var t=f(e).find(".m-datatable__row"),a=0;return 0<t.length&&(f(t).each(function(e,t){a+=Math.floor(f(t).innerHeight())}),a>f(e).innerHeight())},sortColumn:function(e,o,i){void 0===o&&(o="asc"),void 0===i&&(i=!1);var l=f(e).index(),t=f(u.tableBody).find(".m-datatable__row"),a=f(e).closest(".m-datatable__lock").index();-1!==a&&(t=f(u.tableBody).find(".m-datatable__lock:nth-child("+(a+1)+")").find(".m-datatable__row"));var n=f(t).parent();f(t).sort(function(e,t){var a=f(e).find("td:nth-child("+l+")").text(),n=f(t).find("td:nth-child("+l+")").text();return i&&(a=parseInt(a),n=parseInt(n)),"asc"===o?n<a?1:a<n?-1:0:a<n?1:n<a?-1:0}).appendTo(n)},sorting:function(){var i={init:function(){m.sortable&&(f(u.tableHead).find(".m-datatable__cell:not(.m-datatable__cell--check)").addClass("m-datatable__cell--sort").off("click").on("click",i.sortClick),i.setIcon())},setIcon:function(){var e=p.getDataSourceParam("sort");if(!f.isEmptyObject(e)){var t=f(u.tableHead).find('.m-datatable__cell[data-field="'+e.field+'"]').attr("data-sort",e.sort),a=f(t).find("span"),n=f(a).find("i"),o=p.getOption("layout.icons.sort");0<f(n).length?f(n).removeAttr("class").addClass(o[e.sort]):f(a).append(f("<i/>").addClass(o[e.sort]))}},sortClick:function(e){var t=p.getDataSourceParam("sort"),a=f(this).data("field"),n=p.getColumnByField(a);if((void 0===n.sortable||!1!==n.sortable)&&(f(u.tableHead).find(".m-datatable__cell > span > i").remove(),m.sortable)){p.spinnerCallback(!0);var o="desc";p.getObject("field",t)===a&&(o=p.getObject("sort",t)),t={field:a,sort:o=void 0===o||"desc"===o?"asc":"desc"},p.setDataSourceParam("sort",t),i.setIcon(),setTimeout(function(){p.dataRender("sort"),f(u).trigger("m-datatable--on-sort",t)},300)}}};i.init()},localDataUpdate:function(){var a=p.getDataSourceParam();void 0===u.originalDataSet&&(u.originalDataSet=u.dataSet);var e=p.getObject("sort.field",a),t=p.getObject("sort.sort",a),n=p.getColumnByField(e);if(void 0!==n&&!0!==p.getOption("data.serverSorting")?"function"==typeof n.sortCallback?u.dataSet=n.sortCallback(u.originalDataSet,t,n):u.dataSet=p.sortCallback(u.originalDataSet,t,n):u.dataSet=u.originalDataSet,"object"==typeof a.query&&!p.getOption("data.serverFiltering")){a.query=a.query||{};var o=f(p.getOption("search.input")).val();void 0!==o&&""!==o&&(o=o.toLowerCase(),u.dataSet=f.grep(u.dataSet,function(e){for(var t in e)if(e.hasOwnProperty(t)&&"string"==typeof e[t]&&-1<e[t].toLowerCase().indexOf(o))return!0;return!1}),delete a.query[p.getGeneralSearchKey()]),f.each(a.query,function(e,t){""===t&&delete a.query[e]}),u.dataSet=p.filterArray(u.dataSet,a.query),u.dataSet=u.dataSet.filter(function(){return!0})}return u.dataSet},filterArray:function(e,o,i){if("object"!=typeof e)return[];if(void 0===i&&(i="AND"),"object"!=typeof o)return e;if(i=i.toUpperCase(),-1===f.inArray(i,["AND","OR","NOT"]))return[];var l=Object.keys(o).length,r=[];return f.each(e,function(e,t){var a=t,n=0;f.each(o,function(e,t){a.hasOwnProperty(e)&&t==a[e].toLowerCase()&&n++}),("AND"==i&&n==l||"OR"==i&&0<n||"NOT"==i&&0==n)&&(r[e]=t)}),e=r},resetScroll:function(){void 0===m.detail&&1===p.getDepth()&&(f(u.table).find(".m-datatable__row").css("left",0),f(u.table).find(".m-datatable__lock").css("top",0),f(u.tableBody).scrollTop(0))},getColumnByField:function(a){var n;if(void 0!==a)return f.each(m.columns,function(e,t){if(a===t.field)return n=t,!1}),n},getDefaultSortColumn:function(){var a;return f.each(m.columns,function(e,t){if(void 0!==t.sortable&&-1!==f.inArray(t.sortable,["asc","desc"]))return!(a={sort:t.sortable,field:t.field})}),a},getHiddenDimensions:function(e,t){var n={position:"absolute",visibility:"hidden",display:"block"},a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},o=f(e).parents().addBack().not(":visible");t="boolean"==typeof t&&t;var i=[];return o.each(function(){var e={};for(var t in n)e[t]=this.style[t],this.style[t]=n[t];i.push(e)}),a.width=f(e).width(),a.outerWidth=f(e).outerWidth(t),a.innerWidth=f(e).innerWidth(),a.height=f(e).height(),a.innerHeight=f(e).innerHeight(),a.outerHeight=f(e).outerHeight(t),o.each(function(e){var t=i[e];for(var a in n)this.style[a]=t[a]}),a},getGeneralSearchKey:function(){var e=f(p.getOption("search.input"));return f(e).prop("name")||f(e).prop("id")},getObject:function(e,t){return e.split(".").reduce(function(e,t){return null!==e&&void 0!==e[t]?e[t]:null},t)},extendObj:function(e,t,n){var o=t.split("."),i=0;return function e(t){var a=o[i++];void 0!==t[a]&&null!==t[a]?"object"!=typeof t[a]&&"function"!=typeof t[a]&&(t[a]={}):t[a]={},i===o.length?t[a]=n:e(t[a])}(e),e},timer:0,redraw:function(){return p.adjustCellsWidth.call(),p.isLocked()&&p.adjustCellsHeight.call(),p.adjustLockContainer.call(),p.initHeight.call(),u},load:function(){return p.reload(),u},reload:function(){return function(e,t){clearTimeout(p.timer),p.timer=setTimeout(e,t)}(function(){m.data.serverFiltering||p.localDataUpdate(),p.dataRender(),f(u).trigger("m-datatable--on-reloaded")},p.getOption("search.delay")),u},getRecord:function(n){return void 0===u.tableBody&&(u.tableBody=f(u.table).children("tbody")),f(u.tableBody).find(".m-datatable__cell:first-child").each(function(e,t){if(n==f(t).text()){var a=f(t).closest(".m-datatable__row").index()+1;return u.API.record=u.API.value=p.getOneRow(u.tableBody,a),u}}),u},getColumn:function(e){return p.setSelectedRecords(),u.API.value=f(u.API.record).find('[data-field="'+e+'"]'),u},destroy:function(){f(u).parent().find(".m-datatable__pager").remove();var e=f(u.initialDatatable).addClass("m-datatable--destroyed").show();return f(u).replaceWith(e),f(u=e).trigger("m-datatable--on-destroy"),p.isInit=!1,e=null},sort:function(e,t){return void 0===t&&(t="asc"),f(u.tableHead).find('.m-datatable__cell[data-field="'+e+'"]').trigger("click"),u},getValue:function(){return f(u.API.value).text()},setActive:function(e){"string"==typeof e&&(e=f(u.tableBody).find('.m-checkbox--single > [type="checkbox"][value="'+e+'"]')),f(e).prop("checked",!0);var t=f(e).closest(".m-datatable__row").addClass("m-datatable__row--active"),a=f(t).index()+1;f(t).closest(".m-datatable__lock").parent().find(".m-datatable__row:nth-child("+a+")").addClass("m-datatable__row--active");var n=[];f(t).each(function(e,t){var a=f(t).find('.m-checkbox--single:not(.m-checkbox--all) > [type="checkbox"]').val();void 0!==a&&n.push(a)}),f(u).trigger("m-datatable--on-check",[n])},setInactive:function(e){"string"==typeof e&&(e=f(u.tableBody).find('.m-checkbox--single > [type="checkbox"][value="'+e+'"]')),f(e).prop("checked",!1);var t=f(e).closest(".m-datatable__row").removeClass("m-datatable__row--active"),a=f(t).index()+1;f(t).closest(".m-datatable__lock").parent().find(".m-datatable__row:nth-child("+a+")").removeClass("m-datatable__row--active");var n=[];f(t).each(function(e,t){var a=f(t).find('.m-checkbox--single:not(.m-checkbox--all) > [type="checkbox"]').val();void 0!==a&&n.push(a)}),f(u).trigger("m-datatable--on-uncheck",[n])},setActiveAll:function(e){var t=f(u.table).find(".m-datatable__body .m-datatable__row").find('.m-datatable__cell .m-checkbox [type="checkbox"]');e?p.setActive(t):p.setInactive(t)},setSelectedRecords:function(){return u.API.record=f(u.tableBody).find(".m-datatable__row--active"),u},getSelectedRecords:function(){return p.setSelectedRecords(),u.API.record=u.rows(".m-datatable__row--active").nodes(),u.API.record},getOption:function(e){return p.getObject(e,m)},setOption:function(e,t){m=p.extendObj(m,e,t)},search:function(n,t){void 0!==t&&(t=f.makeArray(t)),e=function(){var a=p.getDataSourceQuery();if(void 0===t&&void 0!==n){var e=p.getGeneralSearchKey();a[e]=n}"object"==typeof t&&(f.each(t,function(e,t){a[t]=n}),f.each(a,function(e,t){""===t&&delete a[e]})),p.setDataSourceQuery(a),m.data.serverFiltering||p.localDataUpdate(),p.dataRender()},a=p.getOption("search.delay"),clearTimeout(p.timer),p.timer=setTimeout(e,a);var e,a},setDataSourceParam:function(e,t){u.API.params=f.extend({},{pagination:{page:1,perpage:p.getOption("data.pageSize")},sort:p.getDefaultSortColumn(),query:{}},u.API.params,p.stateGet(p.stateId)),u.API.params=p.extendObj(u.API.params,e,t),p.stateKeep(p.stateId,u.API.params)},getDataSourceParam:function(e){return u.API.params=f.extend({},{pagination:{page:1,perpage:p.getOption("data.pageSize")},sort:p.getDefaultSortColumn(),query:{}},u.API.params,p.stateGet(p.stateId)),"string"==typeof e?p.getObject(e,u.API.params):u.API.params},getDataSourceQuery:function(){return p.getDataSourceParam("query")||{}},setDataSourceQuery:function(e){p.setDataSourceParam("query",e)},getCurrentPage:function(){return f(u.table).siblings(".m-datatable__pager").last().find(".m-datatable__pager-nav").find(".m-datatable__pager-link.m-datatable__pager-link--active").data("page")||1},getPageSize:function(){return f(u.table).siblings(".m-datatable__pager").last().find(".m-datatable__pager-size").val()||10},getTotalRows:function(){return u.API.params.pagination.total},getDataSet:function(){return u.originalDataSet},hideColumn:function(a){f.map(m.columns,function(e){return a===e.field&&(e.responsive={hidden:"xl"}),e});var e=f.grep(f(u.table).find(".m-datatable__cell"),function(e,t){return a===f(e).data("field")});f(e).hide()},showColumn:function(a){f.map(m.columns,function(e){return a===e.field&&delete e.responsive,e});var e=f.grep(f(u.table).find(".m-datatable__cell"),function(e,t){return a===f(e).data("field")});f(e).show()},destroyScroller:function(e){void 0===e&&(e=u.tableBody),f(e).each(function(){if(f(this).hasClass("mCustomScrollbar"))try{mApp.destroyScroller(f(this))}catch(e){console.log(e)}})},nodeTr:[],nodeTd:[],nodeCols:[],recentNode:[],table:function(){return u.table},row:function(e){return p.rows(e),p.nodeTr=p.recentNode=f(p.nodeTr).first(),u},rows:function(e){return p.nodeTr=p.recentNode=f(u.tableBody).find(e).filter(".m-datatable__row"),u},column:function(e){return p.nodeCols=p.recentNode=f(u.tableBody).find(".m-datatable__cell:nth-child("+(e+1)+")"),u},columns:function(e){var t=u.table;p.nodeTr===p.recentNode&&(t=p.nodeTr);var a=f(t).find('.m-datatable__cell[data-field="'+e+'"]');return 0<a.length?p.nodeCols=p.recentNode=a:p.nodeCols=p.recentNode=f(t).find(e).filter(".m-datatable__cell"),u},cell:function(e){return p.cells(e),p.nodeTd=p.recentNode=f(p.nodeTd).first(),u},cells:function(e){var t=f(u.tableBody).find(".m-datatable__cell");return void 0!==e&&(t=f(t).filter(e)),p.nodeTd=p.recentNode=t,u},remove:function(){return f(p.nodeTr.length)&&p.nodeTr===p.recentNode&&f(p.nodeTr).remove(),u},visible:function(e){f(p.recentNode.length)&&(e?(p.recentNode===p.nodeCols&&p.setOption("columns."+p.recentNode.index()+".responsive",{}),f(p.recentNode).show()):(p.recentNode===p.nodeCols&&p.setOption("columns."+p.recentNode.index()+".responsive",{hidden:"xl"}),f(p.recentNode).hide()),p.redraw())},nodes:function(){return p.recentNode},dataset:function(){return u}};if(f.each(p,function(e,t){u[e]=t}),void 0!==m)if("string"==typeof m){var e=m;void 0!==(u=f(this).data("mDatatable"))&&(m=u.options,p[e].apply(this,Array.prototype.slice.call(arguments,1)))}else u.data("mDatatable")||f(this).hasClass("m-datatable--loaded")||(u.dataSet=null,u.textAlign={left:"m-datatable__cell--left",center:"m-datatable__cell--center",right:"m-datatable__cell--right"},m=f.extend(!0,{},f.fn.mDatatable.defaults,m),u.options=m,p.init.apply(this,[m]),f(u.wrap).data("mDatatable",u));else void 0===(u=f(this).data("mDatatable"))&&f.error("mDatatable not initialized"),m=u.options;return u},f.fn.mDatatable.defaults={data:{type:"local",source:null,pageSize:10,saveState:{cookie:!1,webstorage:!0},serverPaging:!1,serverFiltering:!1,serverSorting:!1,autoColumns:!1},layout:{theme:"default",class:"m-datatable--brand",scroll:!1,height:null,minHeight:300,footer:!1,header:!0,smoothScroll:{scrollbarShown:!0},spinner:{overlayColor:"#000000",opacity:0,type:"loader",state:"brand",message:!0},icons:{sort:{asc:"la la-arrow-up",desc:"la la-arrow-down"},pagination:{next:"la la-angle-right",prev:"la la-angle-left",first:"la la-angle-double-left",last:"la la-angle-double-right",more:"la la-ellipsis-h"},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},rows:{callback:function(){},beforeTemplate:function(){},afterTemplate:function(){},autoHide:!1},toolbar:{layout:["pagination","info"],placement:["bottom"],items:{pagination:{type:"default",pages:{desktop:{layout:"default",pagesNumber:6},tablet:{layout:"default",pagesNumber:3},mobile:{layout:"compact"}},navigation:{prev:!0,next:!0,first:!0,last:!0},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"},info:"Displaying {{start}} - {{end}} of {{total}} records"}}}},extensions:{}}}(jQuery);var mLayout=function(){var n,o,a,i,l,r;return{init:function(){this.initHeader(),this.initAside()},initHeader:function(){var e,t,a;t=mUtil.get("m_header"),a={offset:{},minimize:{}},"minimize"==mUtil.attr(t,"m-minimize-mobile")?(a.minimize.mobile={},a.minimize.mobile.on="m-header--minimize-on",a.minimize.mobile.off="m-header--minimize-off"):a.minimize.mobile=!1,"minimize"==mUtil.attr(t,"m-minimize")?(a.minimize.desktop={},a.minimize.desktop.on="m-header--minimize-on",a.minimize.desktop.off="m-header--minimize-off"):a.minimize.desktop=!1,(e=mUtil.attr(t,"m-minimize-offset"))&&(a.offset.desktop=e),(e=mUtil.attr(t,"m-minimize-mobile-offset"))&&(a.offset.mobile=e),new mHeader("m_header",a),i=new mOffcanvas("m_header_menu",{overlay:!0,baseClass:"m-aside-header-menu-mobile",closeBy:"m_aside_header_menu_mobile_close_btn",toggleBy:{target:"m_aside_header_menu_mobile_toggle",state:"m-brand__toggler--active"}}),n=new mMenu("m_header_menu",{submenu:{desktop:"dropdown",tablet:"accordion",mobile:"accordion"},accordion:{slideSpeed:200,autoScroll:!0,expandAll:!1}}),$("#m_aside_header_topbar_mobile_toggle").click(function(){$("body").toggleClass("m-topbar--on")}),setInterval(function(){$("#m_topbar_notification_icon .m-nav__link-icon").addClass("m-animate-shake"),$("#m_topbar_notification_icon .m-nav__link-badge").addClass("m-animate-blink")},3e3),setInterval(function(){$("#m_topbar_notification_icon .m-nav__link-icon").removeClass("m-animate-shake"),$("#m_topbar_notification_icon .m-nav__link-badge").removeClass("m-animate-blink")},6e3),0!==$("#m_quicksearch").length&&(r=new mQuicksearch("m_quicksearch",{mode:mUtil.attr("m_quicksearch","m-quicksearch-mode"),minLength:1}),window.LaravelDataTables&&window.LaravelDataTables.dataTableBuilder&&r.on("search",function(n){n.showProgress(),LaravelDataTables.dataTableBuilder.search(n.query,!1,!0).draw(),LaravelDataTables.dataTableBuilder.on("xhr",function(e,t,a){n.hideProgress()})})),new mScrollTop("m_scroll_top",{offset:300,speed:600})},initAside:function(){var e,t;e=mUtil.get("m_aside_left"),t=mUtil.hasClass(e,"m-aside-left--offcanvas-default")?"m-aside-left--offcanvas-default":"m-aside-left",a=new mOffcanvas("m_aside_left",{baseClass:t,overlay:!0,closeBy:"m_aside_left_close_btn",toggleBy:{target:"m_aside_left_offcanvas_toggle",state:"m-brand__toggler--active"}}),function(){var e=$("#m_ver_menu"),t="1"===e.data("m-menu-dropdown")?"dropdown":"accordion";if(o=new mMenu("m_ver_menu",{submenu:{desktop:{default:t,state:{body:"m-aside-left--minimize",mode:"dropdown"}},tablet:"accordion",mobile:"accordion"},accordion:{autoScroll:!0,expandAll:!1}}),"1"===e.data("m-menu-scrollable")){function a(e){if(mUtil.isInResponsiveRange("tablet-and-mobile"))mApp.destroyScroller(e);else{var t=mUtil.getViewPort().height-mUtil.css("m_header","height");mApp.initScroller(e,{height:t})}}a(e),mUtil.addResizeHandler(function(){a(o)})}}(),0!==$("#m_aside_left_minimize_toggle").length&&(l=new mToggle("m_aside_left_minimize_toggle",{target:"body",targetState:"m-brand--minimize m-aside-left--minimize",togglerState:"m-brand__toggler--active"})).on("toggle",function(e){n.pauseDropdownHover(800),o.pauseDropdownHover(800),Cookies.set("sidebar_toggle_state",e.getState())}),this.onLeftSidebarToggle(function(e){var t=$(".m-datatable");$(t).each(function(){$(this).mDatatable("redraw")})})},getAsideMenu:function(){return o},onLeftSidebarToggle:function(e){l&&l.on("toggle",e)},closeMobileAsideMenuOffcanvas:function(){mUtil.isMobileDevice()&&a.hide()},closeMobileHorMenuOffcanvas:function(){mUtil.isMobileDevice()&&i.hide()}}}();$(document).ready(function(){!1===mUtil.isAngularVersion()&&mLayout.init()});var mQuickSidebar=function(){var n=$("#m_quick_sidebar"),o=$("#m_quick_sidebar_tabs"),e=n.find(".m-quick-sidebar__content"),t=function(){!function(){var t=$("#m_quick_sidebar_tabs_messenger");if(0!==t.length){var a=t.find(".m-messenger__messages"),e=function(){var e=n.outerHeight(!0)-o.outerHeight(!0)-t.find(".m-messenger__form").outerHeight(!0)-120;a.css("height",e),mApp.initScroller(a,{})};e(),mUtil.addResizeHandler(e)}}(),function(){var t=$("#m_quick_sidebar_tabs_settings");if(0!==t.length){var e=function(){var e=mUtil.getViewPort().height-o.outerHeight(!0)-60;t.css("height",e),mApp.initScroller(t,{})};e(),mUtil.addResizeHandler(e)}}(),function(){var t=$("#m_quick_sidebar_tabs_logs");if(0!==t.length){var e=function(){var e=mUtil.getViewPort().height-o.outerHeight(!0)-60;t.css("height",e),mApp.initScroller(t,{})};e(),mUtil.addResizeHandler(e)}}()};return{init:function(){0!==n.length&&new mOffcanvas("m_quick_sidebar",{overlay:!0,baseClass:"m-quick-sidebar",closeBy:"m_quick_sidebar_close",toggleBy:"m_quick_sidebar_toggle"}).one("afterShow",function(){mApp.block(n),setTimeout(function(){mApp.unblock(n),e.removeClass("m--hide"),t()},1e3)})}}}();$(document).ready(function(){mQuickSidebar.init()});