AdminLTE/dist/js/adminlte.min.js
Ryan ba9cf441cb Fix for Info Box when on IE11
Fixes info box displaying incorrectly when using IE11 (not sure for older versions) and also change text for the shadow info box so it will appear better for smaller screens (without having to use text-wrap).
2020-09-22 11:30:19 +08:00

7 lines
35 KiB
JavaScript

/*!
* AdminLTE v3.1.0-pre (https://adminlte.io)
* Copyright 2014-2020 Colorlib <https://colorlib.com>
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).adminlte={},e.jQuery)}(this,(function(e,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),n="CardRefresh",s=i.default.fn[n],o={source:"",sourceSelector:"",params:{},trigger:'[data-card-widget="card-refresh"]',content:".card-body",loadInContent:!0,loadOnInit:!0,responseType:"",overlayTemplate:'<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',onLoadStart:function(){},onLoadDone:function(e){return e}},l=function(){function e(e,t){if(this._element=e,this._parent=e.parents(".card").first(),this._settings=i.default.extend({},o,t),this._overlay=i.default(this._settings.overlayTemplate),e.hasClass("card")&&(this._parent=e),""===this._settings.source)throw new Error("Source url was not defined. Please specify a url in your CardRefresh source option.")}var t=e.prototype;return t.load=function(){var e=this;this._addOverlay(),this._settings.onLoadStart.call(i.default(this)),i.default.get(this._settings.source,this._settings.params,(function(t){e._settings.loadInContent&&(""!==e._settings.sourceSelector&&(t=i.default(t).find(e._settings.sourceSelector).html()),e._parent.find(e._settings.content).html(t)),e._settings.onLoadDone.call(i.default(e),t),e._removeOverlay()}),""!==this._settings.responseType&&this._settings.responseType),i.default(this._element).trigger(i.default.Event("loaded.lte.cardrefresh"))},t._addOverlay=function(){this._parent.append(this._overlay),i.default(this._element).trigger(i.default.Event("overlay.added.lte.cardrefresh"))},t._removeOverlay=function(){this._parent.find(this._overlay).remove(),i.default(this._element).trigger(i.default.Event("overlay.removed.lte.cardrefresh"))},t._init=function(){var e=this;i.default(this).find(this._settings.trigger).on("click",(function(){e.load()})),this._settings.loadOnInit&&this.load()},e._jQueryInterface=function(t){var a=i.default(this).data("lte.cardrefresh"),n=i.default.extend({},o,i.default(this).data());a||(a=new e(i.default(this),n),i.default(this).data("lte.cardrefresh","string"==typeof t?a:t)),"string"==typeof t&&t.match(/load/)?a[t]():a._init(i.default(this))},e}();i.default(document).on("click",'[data-card-widget="card-refresh"]',(function(e){e&&e.preventDefault(),l._jQueryInterface.call(i.default(this),"load")})),i.default((function(){i.default('[data-card-widget="card-refresh"]').each((function(){l._jQueryInterface.call(i.default(this))}))})),i.default.fn[n]=l._jQueryInterface,i.default.fn[n].Constructor=l,i.default.fn[n].noConflict=function(){return i.default.fn[n]=s,l._jQueryInterface};var r="CardWidget",d=i.default.fn[r],u={animationSpeed:"normal",collapseTrigger:'[data-card-widget="collapse"]',removeTrigger:'[data-card-widget="remove"]',maximizeTrigger:'[data-card-widget="maximize"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",maximizeIcon:"fa-expand",minimizeIcon:"fa-compress"},f=function(){function e(e,t){this._element=e,this._parent=e.parents(".card").first(),e.hasClass("card")&&(this._parent=e),this._settings=i.default.extend({},u,t)}var t=e.prototype;return t.collapse=function(){var e=this;this._parent.addClass("collapsing-card").children(".card-body, .card-footer").slideUp(this._settings.animationSpeed,(function(){e._parent.addClass("collapsed-card").removeClass("collapsing-card")})),this._parent.find("> .card-header "+this._settings.collapseTrigger+" ."+this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon),this._element.trigger(i.default.Event("collapsed.lte.cardwidget"),this._parent)},t.expand=function(){var e=this;this._parent.addClass("expanding-card").children(".card-body, .card-footer").slideDown(this._settings.animationSpeed,(function(){e._parent.removeClass("collapsed-card").removeClass("expanding-card")})),this._parent.find("> .card-header "+this._settings.collapseTrigger+" ."+this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon),this._element.trigger(i.default.Event("expanded.lte.cardwidget"),this._parent)},t.remove=function(){this._parent.slideUp(),this._element.trigger(i.default.Event("removed.lte.cardwidget"),this._parent)},t.toggle=function(){this._parent.hasClass("collapsed-card")?this.expand():this.collapse()},t.maximize=function(){this._parent.find(this._settings.maximizeTrigger+" ."+this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon),this._parent.css({height:this._parent.height(),width:this._parent.width(),transition:"all .15s"}).delay(150).queue((function(){var e=i.default(this);e.addClass("maximized-card"),i.default("html").addClass("maximized-card"),e.hasClass("collapsed-card")&&e.addClass("was-collapsed"),e.dequeue()})),this._element.trigger(i.default.Event("maximized.lte.cardwidget"),this._parent)},t.minimize=function(){this._parent.find(this._settings.maximizeTrigger+" ."+this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon),this._parent.css("cssText","height: "+this._parent[0].style.height+" !important; width: "+this._parent[0].style.width+" !important; transition: all .15s;").delay(10).queue((function(){var e=i.default(this);e.removeClass("maximized-card"),i.default("html").removeClass("maximized-card"),e.css({height:"inherit",width:"inherit"}),e.hasClass("was-collapsed")&&e.removeClass("was-collapsed"),e.dequeue()})),this._element.trigger(i.default.Event("minimized.lte.cardwidget"),this._parent)},t.toggleMaximize=function(){this._parent.hasClass("maximized-card")?this.minimize():this.maximize()},t._init=function(e){var t=this;this._parent=e,i.default(this).find(this._settings.collapseTrigger).click((function(){t.toggle()})),i.default(this).find(this._settings.maximizeTrigger).click((function(){t.toggleMaximize()})),i.default(this).find(this._settings.removeTrigger).click((function(){t.remove()}))},e._jQueryInterface=function(t){var a=i.default(this).data("lte.cardwidget"),n=i.default.extend({},u,i.default(this).data());a||(a=new e(i.default(this),n),i.default(this).data("lte.cardwidget","string"==typeof t?a:t)),"string"==typeof t&&t.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)?a[t]():"object"==typeof t&&a._init(i.default(this))},e}();i.default(document).on("click",'[data-card-widget="collapse"]',(function(e){e&&e.preventDefault(),f._jQueryInterface.call(i.default(this),"toggle")})),i.default(document).on("click",'[data-card-widget="remove"]',(function(e){e&&e.preventDefault(),f._jQueryInterface.call(i.default(this),"remove")})),i.default(document).on("click",'[data-card-widget="maximize"]',(function(e){e&&e.preventDefault(),f._jQueryInterface.call(i.default(this),"toggleMaximize")})),i.default.fn[r]=f._jQueryInterface,i.default.fn[r].Constructor=f,i.default.fn[r].noConflict=function(){return i.default.fn[r]=d,f._jQueryInterface};var c="ControlSidebar",h=i.default.fn[c],g={controlsidebarSlide:!0,scrollbarTheme:"os-theme-light",scrollbarAutoHide:"l"},p=function(){function e(e,t){this._element=e,this._config=t,this._init()}var t=e.prototype;return t.collapse=function(){var e=i.default("body"),t=i.default("html");this._config.controlsidebarSlide?(t.addClass("control-sidebar-animate"),e.removeClass("control-sidebar-slide-open").delay(300).queue((function(){i.default(".control-sidebar").hide(),t.removeClass("control-sidebar-animate"),i.default(this).dequeue()}))):e.removeClass("control-sidebar-open"),i.default(this._element).trigger(i.default.Event("collapsed.lte.controlsidebar"))},t.show=function(){var e=i.default("body"),t=i.default("html");this._config.controlsidebarSlide?(t.addClass("control-sidebar-animate"),i.default(".control-sidebar").show().delay(10).queue((function(){e.addClass("control-sidebar-slide-open").delay(300).queue((function(){t.removeClass("control-sidebar-animate"),i.default(this).dequeue()})),i.default(this).dequeue()}))):e.addClass("control-sidebar-open"),this._fixHeight(),this._fixScrollHeight(),i.default(this._element).trigger(i.default.Event("expanded.lte.controlsidebar"))},t.toggle=function(){var e=i.default("body");e.hasClass("control-sidebar-open")||e.hasClass("control-sidebar-slide-open")?this.collapse():this.show()},t._init=function(){var e=this;this._fixHeight(),this._fixScrollHeight(),i.default(window).resize((function(){e._fixHeight(),e._fixScrollHeight()})),i.default(window).scroll((function(){var t=i.default("body");(t.hasClass("control-sidebar-open")||t.hasClass("control-sidebar-slide-open"))&&e._fixScrollHeight()}))},t._fixScrollHeight=function(){var e=i.default("body");if(e.hasClass("layout-fixed")){var t={scroll:i.default(document).height(),window:i.default(window).height(),header:i.default(".main-header").outerHeight(),footer:i.default(".main-footer").outerHeight()},a=Math.abs(t.window+i.default(window).scrollTop()-t.scroll),n=i.default(window).scrollTop(),s=(e.hasClass("layout-navbar-fixed")||e.hasClass("layout-sm-navbar-fixed")||e.hasClass("layout-md-navbar-fixed")||e.hasClass("layout-lg-navbar-fixed")||e.hasClass("layout-xl-navbar-fixed"))&&"fixed"===i.default(".main-header").css("position"),o=(e.hasClass("layout-footer-fixed")||e.hasClass("layout-sm-footer-fixed")||e.hasClass("layout-md-footer-fixed")||e.hasClass("layout-lg-footer-fixed")||e.hasClass("layout-xl-footer-fixed"))&&"fixed"===i.default(".main-footer").css("position"),l=i.default(".control-sidebar"),r=i.default(".control-sidebar, .control-sidebar .control-sidebar-content");if(0===n&&0===a)l.css({bottom:t.footer,top:t.header}),r.css("height",t.window-(t.header+t.footer));else if(a<=t.footer)if(!1===o){var d=t.header-n;l.css("bottom",t.footer-a).css("top",d>=0?d:0),r.css("height",t.window-(t.footer-a))}else l.css("bottom",t.footer);else n<=t.header?!1===s?(l.css("top",t.header-n),r.css("height",t.window-(t.header-n))):l.css("top",t.header):!1===s?(l.css("top",0),r.css("height",t.window)):l.css("top",t.header)}},t._fixHeight=function(){var e=i.default("body");if(e.hasClass("layout-fixed")){var t=i.default(window).height(),a=i.default(".main-header").outerHeight(),n=i.default(".main-footer").outerHeight(),s=t-a;(e.hasClass("layout-footer-fixed")||e.hasClass("layout-sm-footer-fixed")||e.hasClass("layout-md-footer-fixed")||e.hasClass("layout-lg-footer-fixed")||e.hasClass("layout-xl-footer-fixed"))&&"fixed"===i.default(".main-footer").css("position")&&(s=t-a-n);var o=i.default(".control-sidebar .control-sidebar-content");o.css("height",s),"undefined"!=typeof i.default.fn.overlayScrollbars&&o.overlayScrollbars({className:this._config.scrollbarTheme,sizeAutoCapable:!0,scrollbars:{autoHide:this._config.scrollbarAutoHide,clickScrolling:!0}})}},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.controlsidebar"),n=i.default.extend({},g,i.default(this).data());if(a||(a=new e(this,n),i.default(this).data("lte.controlsidebar",a)),"undefined"===a[t])throw new Error(t+" is not a function");a[t]()}))},e}();i.default(document).on("click",'[data-widget="control-sidebar"]',(function(e){e.preventDefault(),p._jQueryInterface.call(i.default(this),"toggle")})),i.default.fn[c]=p._jQueryInterface,i.default.fn[c].Constructor=p,i.default.fn[c].noConflict=function(){return i.default.fn[c]=h,p._jQueryInterface};var m="DirectChat",_=i.default.fn[m],v=function(){function e(e){this._element=e}return e.prototype.toggle=function(){i.default(this._element).parents(".direct-chat").first().toggleClass("direct-chat-contacts-open"),i.default(this._element).trigger(i.default.Event("toggled.lte.directchat"))},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.directchat");a||(a=new e(i.default(this)),i.default(this).data("lte.directchat",a)),a[t]()}))},e}();i.default(document).on("click",'[data-widget="chat-pane-toggle"]',(function(e){e&&e.preventDefault(),v._jQueryInterface.call(i.default(this),"toggle")})),i.default.fn[m]=v._jQueryInterface,i.default.fn[m].Constructor=v,i.default.fn[m].noConflict=function(){return i.default.fn[m]=_,v._jQueryInterface};var b="Dropdown",y=i.default.fn[b],C={},w=function(){function e(e,t){this._config=t,this._element=e}var t=e.prototype;return t.toggleSubmenu=function(){this._element.siblings().show().toggleClass("show"),this._element.next().hasClass("show")||this._element.parents(".dropdown-menu").first().find(".show").removeClass("show").hide(),this._element.parents("li.nav-item.dropdown.show").on("hidden.bs.dropdown",(function(){i.default(".dropdown-submenu .show").removeClass("show").hide()}))},t.fixPosition=function(){var e=i.default(".dropdown-menu.show");if(0!==e.length){e.hasClass("dropdown-menu-right")?e.css({left:"inherit",right:0}):e.css({left:0,right:"inherit"});var t=e.offset(),a=e.width(),n=i.default(window).width()-t.left;t.left<0?e.css({left:"inherit",right:t.left-5}):n<a&&e.css({left:"inherit",right:0})}},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.dropdown"),n=i.default.extend({},C,i.default(this).data());a||(a=new e(i.default(this),n),i.default(this).data("lte.dropdown",a)),"toggleSubmenu"!==t&&"fixPosition"!==t||a[t]()}))},e}();i.default('.dropdown-menu [data-toggle="dropdown"]').on("click",(function(e){e.preventDefault(),e.stopPropagation(),w._jQueryInterface.call(i.default(this),"toggleSubmenu")})),i.default('.navbar [data-toggle="dropdown"]').on("click",(function(e){e.preventDefault(),i.default(e.target).parent().hasClass("dropdown-submenu")||setTimeout((function(){w._jQueryInterface.call(i.default(this),"fixPosition")}),1)})),i.default.fn[b]=w._jQueryInterface,i.default.fn[b].Constructor=w,i.default.fn[b].noConflict=function(){return i.default.fn[b]=y,w._jQueryInterface};var x="ExpandableTable",I=i.default.fn[x],j=function(){function e(e,t){this._options=t,this._element=e}var t=e.prototype;return t.init=function(){i.default('[data-widget="expandable-table"]').each((function(e,t){var a=i.default(t).attr("aria-expanded"),n=i.default(t).next().children().first().children();"true"===a?n.show():"false"===a&&(n.hide(),n.parent().parent().addClass("d-none"))}))},t.toggleRow=function(){var e=this._element,t=e.attr("aria-expanded"),a=e.next().children().first().children();a.stop(),"true"===t?(a.slideUp(500,(function(){e.next().addClass("d-none")})),e.attr("aria-expanded","false"),e.trigger(i.default.Event("collapsed.lte.expandableTable"))):"false"===t&&(e.next().removeClass("d-none"),a.slideDown(500),e.attr("aria-expanded","true"),e.trigger(i.default.Event("expanded.lte.expandableTable")))},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.expandableTable");a||(a=new e(i.default(this)),i.default(this).data("lte.expandableTable",a)),"string"==typeof t&&t.match(/init|toggleRow/)&&a[t]()}))},e}();i.default(".expandable-table").ready((function(){j._jQueryInterface.call(i.default(this),"init")})),i.default(document).on("click",'[data-widget="expandable-table"]',(function(){j._jQueryInterface.call(i.default(this),"toggleRow")})),i.default.fn[x]=j._jQueryInterface,i.default.fn[x].Constructor=j,i.default.fn[x].noConflict=function(){return i.default.fn[x]=I,j._jQueryInterface};var Q="Fullscreen",S=i.default.fn[Q],T={minimizeIcon:"fa-compress-arrows-alt",maximizeIcon:"fa-expand-arrows-alt"},z=function(){function e(e,t){this.element=e,this.options=i.default.extend({},T,t)}var t=e.prototype;return t.toggle=function(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?this.windowed():this.fullscreen()},t.fullscreen=function(){document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.webkitRequestFullscreen?document.documentElement.webkitRequestFullscreen():document.documentElement.msRequestFullscreen&&document.documentElement.msRequestFullscreen(),i.default('[data-widget="fullscreen"] i').removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon)},t.windowed=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),i.default('[data-widget="fullscreen"] i').removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon)},e._jQueryInterface=function(t){var a=i.default(this).data("lte.fullscreen");a||(a=i.default(this).data());var n=i.default.extend({},T,"object"==typeof t?t:a),s=new e(i.default(this),n);i.default(this).data("lte.fullscreen","object"==typeof t?t:a),"string"==typeof t&&t.match(/toggle|fullscreen|windowed/)?s[t]():s.init()},e}();i.default(document).on("click",'[data-widget="fullscreen"]',(function(){z._jQueryInterface.call(i.default(this),"toggle")})),i.default.fn[Q]=z._jQueryInterface,i.default.fn[Q].Constructor=z,i.default.fn[Q].noConflict=function(){return i.default.fn[Q]=S,z._jQueryInterface};var k=i.default.fn.Layout,H=".main-sidebar .sidebar",E={scrollbarTheme:"os-theme-light",scrollbarAutoHide:"l",panelAutoHeight:!0,loginRegisterAutoHeight:!0},L=function(){function e(e,t){this._config=t,this._element=e,this._init()}var t=e.prototype;return t.fixLayoutHeight=function(e){void 0===e&&(e=null);var t=i.default("body"),a=0;(t.hasClass("control-sidebar-slide-open")||t.hasClass("control-sidebar-open")||"control_sidebar"===e)&&(a=i.default(".control-sidebar-content").height());var n={window:i.default(window).height(),header:0!==i.default(".main-header").length?i.default(".main-header").outerHeight():0,footer:0!==i.default(".main-footer").length?i.default(".main-footer").outerHeight():0,sidebar:0!==i.default(H).length?i.default(H).height():0,controlSidebar:a},s=this._max(n),o=this._config.panelAutoHeight;!0===o&&(o=0);var l=i.default(".content-wrapper");!1!==o&&(s===n.controlSidebar?l.css("min-height",s+o):s===n.window?l.css("min-height",s+o-n.header-n.footer):l.css("min-height",s+o-n.header),this._isFooterFixed()&&l.css("min-height",parseFloat(l.css("min-height"))+n.footer)),t.hasClass("layout-fixed")&&(!1!==o&&l.css("min-height",s+o-n.header-n.footer),"undefined"!=typeof i.default.fn.overlayScrollbars&&i.default(H).overlayScrollbars({className:this._config.scrollbarTheme,sizeAutoCapable:!0,scrollbars:{autoHide:this._config.scrollbarAutoHide,clickScrolling:!0}}))},t.fixLoginRegisterHeight=function(){var e=i.default("body"),t=i.default(".login-box, .register-box");if(0===t.length)e.css("height","auto"),i.default("html").css("height","auto");else{var a=t.height();e.css("min-height")!==a&&e.css("min-height",a)}},t._init=function(){var e=this;this.fixLayoutHeight(),!0===this._config.loginRegisterAutoHeight?this.fixLoginRegisterHeight():this._config.loginRegisterAutoHeight===parseInt(this._config.loginRegisterAutoHeight,10)&&setInterval(this.fixLoginRegisterHeight,this._config.loginRegisterAutoHeight),i.default(H).on("collapsed.lte.treeview expanded.lte.treeview",(function(){e.fixLayoutHeight()})),i.default('[data-widget="pushmenu"]').on("collapsed.lte.pushmenu shown.lte.pushmenu",(function(){e.fixLayoutHeight()})),i.default('[data-widget="control-sidebar"]').on("collapsed.lte.controlsidebar",(function(){e.fixLayoutHeight()})).on("expanded.lte.controlsidebar",(function(){e.fixLayoutHeight("control_sidebar")})),i.default(window).resize((function(){e.fixLayoutHeight()})),setTimeout((function(){i.default("body.hold-transition").removeClass("hold-transition")}),50)},t._max=function(e){var t=0;return Object.keys(e).forEach((function(a){e[a]>t&&(t=e[a])})),t},t._isFooterFixed=function(){return"fixed"===i.default(".main-footer").css("position")},e._jQueryInterface=function(t){return void 0===t&&(t=""),this.each((function(){var a=i.default(this).data("lte.layout"),n=i.default.extend({},E,i.default(this).data());a||(a=new e(i.default(this),n),i.default(this).data("lte.layout",a)),"init"===t||""===t?a._init():"fixLayoutHeight"!==t&&"fixLoginRegisterHeight"!==t||a[t]()}))},e}();i.default(window).on("load",(function(){L._jQueryInterface.call(i.default("body"))})),i.default(H+" a").on("focusin",(function(){i.default(".main-sidebar").addClass("sidebar-focused")})),i.default(H+" a").on("focusout",(function(){i.default(".main-sidebar").removeClass("sidebar-focused")})),i.default.fn.Layout=L._jQueryInterface,i.default.fn.Layout.Constructor=L,i.default.fn.Layout.noConflict=function(){return i.default.fn.Layout=k,L._jQueryInterface};var R="PushMenu",F=i.default.fn[R],q={autoCollapseSize:992,enableRemember:!1,noTransitionAfterReload:!0},D=function(){function e(e,t){this._element=e,this._options=i.default.extend({},q,t),0===i.default("#sidebar-overlay").length&&this._addOverlay(),this._init()}var t=e.prototype;return t.expand=function(){var e=i.default("body");this._options.autoCollapseSize&&i.default(window).width()<=this._options.autoCollapseSize&&e.addClass("sidebar-open"),e.addClass("sidebar-is-opening").removeClass("sidebar-collapse sidebar-closed").delay(50).queue((function(){e.removeClass("sidebar-is-opening"),i.default(this).dequeue()})),this._options.enableRemember&&localStorage.setItem("remember.lte.pushmenu","sidebar-open"),i.default(this._element).trigger(i.default.Event("shown.lte.pushmenu"))},t.collapse=function(){var e=i.default("body");this._options.autoCollapseSize&&i.default(window).width()<=this._options.autoCollapseSize&&e.removeClass("sidebar-open").addClass("sidebar-closed"),e.addClass("sidebar-collapse"),this._options.enableRemember&&localStorage.setItem("remember.lte.pushmenu","sidebar-collapse"),i.default(this._element).trigger(i.default.Event("collapsed.lte.pushmenu"))},t.toggle=function(){i.default("body").hasClass("sidebar-collapse")?this.expand():this.collapse()},t.autoCollapse=function(e){if(void 0===e&&(e=!1),this._options.autoCollapseSize){var t=i.default("body");i.default(window).width()<=this._options.autoCollapseSize?t.hasClass("sidebar-open")||this.collapse():!0===e&&(t.hasClass("sidebar-open")?t.removeClass("sidebar-open"):t.hasClass("sidebar-closed")&&this.expand())}},t.remember=function(){if(this._options.enableRemember){var e=i.default("body");"sidebar-collapse"===localStorage.getItem("remember.lte.pushmenu")?this._options.noTransitionAfterReload?e.addClass("hold-transition").addClass("sidebar-collapse").delay(50).queue((function(){i.default(this).removeClass("hold-transition"),i.default(this).dequeue()})):e.addClass("sidebar-collapse"):this._options.noTransitionAfterReload?e.addClass("hold-transition").removeClass("sidebar-collapse").delay(50).queue((function(){i.default(this).removeClass("hold-transition"),i.default(this).dequeue()})):e.removeClass("sidebar-collapse")}},t._init=function(){var e=this;this.remember(),this.autoCollapse(),i.default(window).resize((function(){e.autoCollapse(!0)}))},t._addOverlay=function(){var e=this,t=i.default("<div />",{id:"sidebar-overlay"});t.on("click",(function(){e.collapse()})),i.default(".wrapper").append(t)},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.pushmenu"),n=i.default.extend({},q,i.default(this).data());a||(a=new e(this,n),i.default(this).data("lte.pushmenu",a)),"string"==typeof t&&t.match(/collapse|expand|toggle/)&&a[t]()}))},e}();i.default(document).on("click",'[data-widget="pushmenu"]',(function(e){e.preventDefault();var t=e.currentTarget;"pushmenu"!==i.default(t).data("widget")&&(t=i.default(t).closest('[data-widget="pushmenu"]')),D._jQueryInterface.call(i.default(t),"toggle")})),i.default(window).on("load",(function(){D._jQueryInterface.call(i.default('[data-widget="pushmenu"]'))})),i.default.fn[R]=D._jQueryInterface,i.default.fn[R].Constructor=D,i.default.fn[R].noConflict=function(){return i.default.fn[R]=F,D._jQueryInterface};var A="SidebarSearch",P=i.default.fn[A],N='[data-widget="sidebar-search"]',O=N+" .form-control",M={arrowSign:"->",minLength:3,maxResults:7,highlightName:!0,highlightPath:!1,highlightClass:"text-light",notFoundText:"No element found!"},U=[],B=function(){function e(e,t){this.element=e,this.options=i.default.extend({},M,t),this.items=[]}var a=e.prototype;return a.init=function(){var e=this;0!=i.default(N).length&&(0==i.default(N).next(".sidebar-search-results").length&&i.default(N).after(i.default("<div />",{class:"sidebar-search-results"})),0==i.default(".sidebar-search-results").children(".list-group").length&&i.default(".sidebar-search-results").append(i.default("<div />",{class:"list-group"})),this._addNotFound(),i.default(".main-sidebar .nav-sidebar").children().each((function(t,a){e._parseItem(a)})))},a.search=function(){var e=this,t=i.default(O).val().toLowerCase();if(t.length<this.options.minLength)return i.default(".sidebar-search-results .list-group").empty(),this._addNotFound(),void this.close();var a=U.filter((function(e){return e.name.toLowerCase().includes(t)})),n=i.default(a.slice(0,this.options.maxResults));i.default(".sidebar-search-results .list-group").empty(),0===n.length?this._addNotFound():n.each((function(t,a){i.default(".sidebar-search-results .list-group").append(e._renderItem(a.name,a.link,a.path))})),this.open()},a.open=function(){i.default(N).parent().addClass("sidebar-search-open"),i.default('[data-widget="sidebar-search"] .btn i').removeClass("fa-search").addClass("fa-times")},a.close=function(){i.default(N).parent().removeClass("sidebar-search-open"),i.default('[data-widget="sidebar-search"] .btn i').removeClass("fa-times").addClass("fa-search")},a.toggle=function(){i.default(N).parent().hasClass("sidebar-search-open")?this.close():this.open()},a._parseItem=function(e,t){var a=this;if(void 0===t&&(t=[]),!i.default(e).hasClass("nav-header")){var n={},s=i.default(e).clone().find("> .nav-link"),o=i.default(e).clone().find("> .nav-treeview"),l=s.attr("href"),r=s.find("p").children().remove().end().text();if(n.name=this._trimText(r),n.link=l,n.path=t,0===o.length)U.push(n);else{var d=n.path.concat([n.name]);o.children().each((function(e,t){a._parseItem(t,d)}))}}},a._trimText=function(e){return t.trim(e.replace(/(\r\n|\n|\r)/gm," "))},a._renderItem=function(e,t,a){var n=this;if(a=a.join(" "+this.options.arrowSign+" "),this.options.highlightName||this.options.highlightPath){var s=i.default(O).val().toLowerCase(),o=new RegExp(s,"gi");this.options.highlightName&&(e=e.replace(o,(function(e){return'<b class="'+n.options.highlightClass+'">'+e+"</b>"}))),this.options.highlightPath&&(a=a.replace(o,(function(e){return'<b class="'+n.options.highlightClass+'">'+e+"</b>"})))}return'<a href="'+t+'" class="list-group-item">\n <div class="search-title">\n '+e+'\n </div>\n <div class="search-path">\n '+a+"\n </div>\n </a>"},a._addNotFound=function(){i.default(".sidebar-search-results .list-group").append(this._renderItem(this.options.notFoundText,"#",[]))},e._jQueryInterface=function(t){var a=i.default(this).data("lte.sidebar-search");a||(a=i.default(this).data());var n=i.default.extend({},M,"object"==typeof t?t:a),s=new e(i.default(this),n);i.default(this).data("lte.sidebar-search","object"==typeof t?t:a),"string"==typeof t&&t.match(/init|toggle|close|open|search/)?s[t]():s.init()},e}();i.default(document).on("click",'[data-widget="sidebar-search"] .btn',(function(e){e.preventDefault(),B._jQueryInterface.call(i.default(N),"toggle")})),i.default(document).on("keyup",O,(function(e){if(38==e.keyCode)return e.preventDefault(),void i.default(".sidebar-search-results .list-group").children().last().focus();if(40==e.keyCode)return e.preventDefault(),void i.default(".sidebar-search-results .list-group").children().first().focus();var t=0;clearTimeout(t),t=setTimeout((function(){B._jQueryInterface.call(i.default(N),"search")}),100)})),i.default(document).on("keydown",".sidebar-search-results .list-group",(function(e){var t=i.default(":focus");38==e.keyCode&&(e.preventDefault(),t.is(":first-child")?t.siblings().last().focus():t.prev().focus()),40==e.keyCode&&(e.preventDefault(),t.is(":last-child")?t.siblings().first().focus():t.next().focus())})),i.default(window).on("load",(function(){B._jQueryInterface.call(i.default(N),"init")})),i.default.fn[A]=B._jQueryInterface,i.default.fn[A].Constructor=B,i.default.fn[A].noConflict=function(){return i.default.fn[A]=P,B._jQueryInterface};var W=i.default.fn.Toasts,G={position:"topRight",fixed:!0,autohide:!1,autoremove:!0,delay:1e3,fade:!0,icon:null,image:null,imageAlt:null,imageHeight:"25px",title:null,subtitle:null,close:!0,body:null,class:null},J=function(){function e(e,t){this._config=t,this._prepareContainer(),i.default("body").trigger(i.default.Event("init.lte.toasts"))}var t=e.prototype;return t.create=function(){var e=i.default('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>');e.data("autohide",this._config.autohide),e.data("animation",this._config.fade),this._config.class&&e.addClass(this._config.class),this._config.delay&&500!=this._config.delay&&e.data("delay",this._config.delay);var t=i.default('<div class="toast-header">');if(null!=this._config.image){var a=i.default("<img />").addClass("rounded mr-2").attr("src",this._config.image).attr("alt",this._config.imageAlt);null!=this._config.imageHeight&&a.height(this._config.imageHeight).width("auto"),t.append(a)}if(null!=this._config.icon&&t.append(i.default("<i />").addClass("mr-2").addClass(this._config.icon)),null!=this._config.title&&t.append(i.default("<strong />").addClass("mr-auto").html(this._config.title)),null!=this._config.subtitle&&t.append(i.default("<small />").html(this._config.subtitle)),1==this._config.close){var n=i.default('<button data-dismiss="toast" />').attr("type","button").addClass("ml-2 mb-1 close").attr("aria-label","Close").append('<span aria-hidden="true">&times;</span>');null==this._config.title&&n.toggleClass("ml-2 ml-auto"),t.append(n)}e.append(t),null!=this._config.body&&e.append(i.default('<div class="toast-body" />').html(this._config.body)),i.default(this._getContainerId()).prepend(e);var s=i.default("body");s.trigger(i.default.Event("created.lte.toasts")),e.toast("show"),this._config.autoremove&&e.on("hidden.bs.toast",(function(){i.default(this).delay(200).remove(),s.trigger(i.default.Event("removed.lte.toasts"))}))},t._getContainerId=function(){return"topRight"==this._config.position?"#toastsContainerTopRight":"topLeft"==this._config.position?"#toastsContainerTopLeft":"bottomRight"==this._config.position?"#toastsContainerBottomRight":"bottomLeft"==this._config.position?"#toastsContainerBottomLeft":void 0},t._prepareContainer=function(){if(0===i.default(this._getContainerId()).length){var e=i.default("<div />").attr("id",this._getContainerId().replace("#",""));"topRight"==this._config.position?e.addClass("toasts-top-right"):"topLeft"==this._config.position?e.addClass("toasts-top-left"):"bottomRight"==this._config.position?e.addClass("toasts-bottom-right"):"bottomLeft"==this._config.position&&e.addClass("toasts-bottom-left"),i.default("body").append(e)}this._config.fixed?i.default(this._getContainerId()).addClass("fixed"):i.default(this._getContainerId()).removeClass("fixed")},e._jQueryInterface=function(t,a){return this.each((function(){var n=i.default.extend({},G,a),s=new e(i.default(this),n);"create"===t&&s[t]()}))},e}();i.default.fn.Toasts=J._jQueryInterface,i.default.fn.Toasts.Constructor=J,i.default.fn.Toasts.noConflict=function(){return i.default.fn.Toasts=W,J._jQueryInterface};var K="TodoList",V=i.default.fn[K],X={onCheck:function(e){return e},onUnCheck:function(e){return e}},Y=function(){function e(e,t){this._config=t,this._element=e,this._init()}var t=e.prototype;return t.toggle=function(e){e.parents("li").toggleClass("done"),i.default(e).prop("checked")?this.check(e):this.unCheck(i.default(e))},t.check=function(e){this._config.onCheck.call(e)},t.unCheck=function(e){this._config.onUnCheck.call(e)},t._init=function(){var e=this,t=this._element;t.find("input:checkbox:checked").parents("li").toggleClass("done"),t.on("change","input:checkbox",(function(t){e.toggle(i.default(t.target))}))},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.todolist");a||(a=i.default(this).data());var n=i.default.extend({},X,"object"==typeof t?t:a),s=new e(i.default(this),n);i.default(this).data("lte.todolist","object"==typeof t?t:a),"init"===t&&s[t]()}))},e}();i.default(window).on("load",(function(){Y._jQueryInterface.call(i.default('[data-widget="todo-list"]'))})),i.default.fn[K]=Y._jQueryInterface,i.default.fn[K].Constructor=Y,i.default.fn[K].noConflict=function(){return i.default.fn[K]=V,Y._jQueryInterface};var Z="Treeview",$=i.default.fn[Z],ee={trigger:'[data-widget="treeview"] .nav-link',animationSpeed:300,accordion:!0,expandSidebar:!1,sidebarButtonSelector:'[data-widget="pushmenu"]'},te=function(){function e(e,t){this._config=t,this._element=e}var t=e.prototype;return t.init=function(){i.default(".nav-item.menu-open .nav-treeview").css("display","block"),this._setupListeners()},t.expand=function(e,t){var a=this,n=i.default.Event("expanded.lte.treeview");if(this._config.accordion){var s=t.siblings(".menu-open").first(),o=s.find(".nav-treeview").first();this.collapse(o,s)}t.addClass("menu-is-opening"),e.stop().slideDown(this._config.animationSpeed,(function(){t.addClass("menu-open"),i.default(a._element).trigger(n)})),this._config.expandSidebar&&this._expandSidebar()},t.collapse=function(e,t){var a=this,n=i.default.Event("collapsed.lte.treeview");t.removeClass("menu-is-opening menu-open"),e.stop().slideUp(this._config.animationSpeed,(function(){i.default(a._element).trigger(n),e.find(".menu-open > .nav-treeview").slideUp(),e.find(".menu-open").removeClass("menu-open")}))},t.toggle=function(e){var t=i.default(e.currentTarget),a=t.parent(),n=a.find("> .nav-treeview");if(n.is(".nav-treeview")||(a.is(".nav-item")||(n=a.parent().find("> .nav-treeview")),n.is(".nav-treeview"))){e.preventDefault();var s=t.parents(".nav-item").first();s.hasClass("menu-open")?this.collapse(i.default(n),s):this.expand(i.default(n),s)}},t._setupListeners=function(){var e=this,t=void 0!==this._element.attr("id")?"#"+this._element.attr("id"):"";i.default(document).on("click",""+t+this._config.trigger,(function(t){e.toggle(t)}))},t._expandSidebar=function(){i.default("body").hasClass("sidebar-collapse")&&i.default(this._config.sidebarButtonSelector).PushMenu("expand")},e._jQueryInterface=function(t){return this.each((function(){var a=i.default(this).data("lte.treeview"),n=i.default.extend({},ee,i.default(this).data());a||(a=new e(i.default(this),n),i.default(this).data("lte.treeview",a)),"init"===t&&a[t]()}))},e}();i.default(window).on("load.lte.treeview",(function(){i.default('[data-widget="treeview"]').each((function(){te._jQueryInterface.call(i.default(this),"init")}))})),i.default.fn[Z]=te._jQueryInterface,i.default.fn[Z].Constructor=te,i.default.fn[Z].noConflict=function(){return i.default.fn[Z]=$,te._jQueryInterface},e.CardRefresh=l,e.CardWidget=f,e.ControlSidebar=p,e.DirectChat=v,e.Dropdown=w,e.ExpandableTable=j,e.Fullscreen=z,e.Layout=L,e.PushMenu=D,e.SidebarSearch=B,e.Toasts=J,e.TodoList=Y,e.Treeview=te,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=adminlte.min.js.map