adminlte.js 102 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069
  1. /*!
  2. * AdminLTE v3.2.0 (https://adminlte.io)
  3. * Copyright 2014-2022 Colorlib <https://colorlib.com>
  4. * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
  8. typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
  9. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.adminlte = {}, global.jQuery));
  10. })(this, (function (exports, $) { 'use strict';
  11. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  12. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  13. /**
  14. * --------------------------------------------
  15. * AdminLTE CardRefresh.js
  16. * License MIT
  17. * --------------------------------------------
  18. */
  19. /**
  20. * Constants
  21. * ====================================================
  22. */
  23. var NAME$e = 'CardRefresh';
  24. var DATA_KEY$e = 'lte.cardrefresh';
  25. var EVENT_KEY$7 = "." + DATA_KEY$e;
  26. var JQUERY_NO_CONFLICT$e = $__default["default"].fn[NAME$e];
  27. var EVENT_LOADED = "loaded" + EVENT_KEY$7;
  28. var EVENT_OVERLAY_ADDED = "overlay.added" + EVENT_KEY$7;
  29. var EVENT_OVERLAY_REMOVED = "overlay.removed" + EVENT_KEY$7;
  30. var CLASS_NAME_CARD$1 = 'card';
  31. var SELECTOR_CARD$1 = "." + CLASS_NAME_CARD$1;
  32. var SELECTOR_DATA_REFRESH = '[data-card-widget="card-refresh"]';
  33. var Default$c = {
  34. source: '',
  35. sourceSelector: '',
  36. params: {},
  37. trigger: SELECTOR_DATA_REFRESH,
  38. content: '.card-body',
  39. loadInContent: true,
  40. loadOnInit: true,
  41. loadErrorTemplate: true,
  42. responseType: '',
  43. overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
  44. errorTemplate: '<span class="text-danger"></span>',
  45. onLoadStart: function onLoadStart() {},
  46. onLoadDone: function onLoadDone(response) {
  47. return response;
  48. },
  49. onLoadFail: function onLoadFail(_jqXHR, _textStatus, _errorThrown) {}
  50. };
  51. var CardRefresh = /*#__PURE__*/function () {
  52. function CardRefresh(element, settings) {
  53. this._element = element;
  54. this._parent = element.parents(SELECTOR_CARD$1).first();
  55. this._settings = $__default["default"].extend({}, Default$c, settings);
  56. this._overlay = $__default["default"](this._settings.overlayTemplate);
  57. if (element.hasClass(CLASS_NAME_CARD$1)) {
  58. this._parent = element;
  59. }
  60. if (this._settings.source === '') {
  61. throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');
  62. }
  63. }
  64. var _proto = CardRefresh.prototype;
  65. _proto.load = function load() {
  66. var _this = this;
  67. this._addOverlay();
  68. this._settings.onLoadStart.call($__default["default"](this));
  69. $__default["default"].get(this._settings.source, this._settings.params, function (response) {
  70. if (_this._settings.loadInContent) {
  71. if (_this._settings.sourceSelector !== '') {
  72. response = $__default["default"](response).find(_this._settings.sourceSelector).html();
  73. }
  74. _this._parent.find(_this._settings.content).html(response);
  75. }
  76. _this._settings.onLoadDone.call($__default["default"](_this), response);
  77. _this._removeOverlay();
  78. }, this._settings.responseType !== '' && this._settings.responseType).fail(function (jqXHR, textStatus, errorThrown) {
  79. _this._removeOverlay();
  80. if (_this._settings.loadErrorTemplate) {
  81. var msg = $__default["default"](_this._settings.errorTemplate).text(errorThrown);
  82. _this._parent.find(_this._settings.content).empty().append(msg);
  83. }
  84. _this._settings.onLoadFail.call($__default["default"](_this), jqXHR, textStatus, errorThrown);
  85. });
  86. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_LOADED));
  87. };
  88. _proto._addOverlay = function _addOverlay() {
  89. this._parent.append(this._overlay);
  90. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_OVERLAY_ADDED));
  91. };
  92. _proto._removeOverlay = function _removeOverlay() {
  93. this._parent.find(this._overlay).remove();
  94. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_OVERLAY_REMOVED));
  95. } // Private
  96. ;
  97. _proto._init = function _init() {
  98. var _this2 = this;
  99. $__default["default"](this).find(this._settings.trigger).on('click', function () {
  100. _this2.load();
  101. });
  102. if (this._settings.loadOnInit) {
  103. this.load();
  104. }
  105. } // Static
  106. ;
  107. CardRefresh._jQueryInterface = function _jQueryInterface(config) {
  108. var data = $__default["default"](this).data(DATA_KEY$e);
  109. var _options = $__default["default"].extend({}, Default$c, $__default["default"](this).data());
  110. if (!data) {
  111. data = new CardRefresh($__default["default"](this), _options);
  112. $__default["default"](this).data(DATA_KEY$e, typeof config === 'string' ? data : config);
  113. }
  114. if (typeof config === 'string' && /load/.test(config)) {
  115. data[config]();
  116. } else {
  117. data._init($__default["default"](this));
  118. }
  119. };
  120. return CardRefresh;
  121. }();
  122. /**
  123. * Data API
  124. * ====================================================
  125. */
  126. $__default["default"](document).on('click', SELECTOR_DATA_REFRESH, function (event) {
  127. if (event) {
  128. event.preventDefault();
  129. }
  130. CardRefresh._jQueryInterface.call($__default["default"](this), 'load');
  131. });
  132. $__default["default"](function () {
  133. $__default["default"](SELECTOR_DATA_REFRESH).each(function () {
  134. CardRefresh._jQueryInterface.call($__default["default"](this));
  135. });
  136. });
  137. /**
  138. * jQuery API
  139. * ====================================================
  140. */
  141. $__default["default"].fn[NAME$e] = CardRefresh._jQueryInterface;
  142. $__default["default"].fn[NAME$e].Constructor = CardRefresh;
  143. $__default["default"].fn[NAME$e].noConflict = function () {
  144. $__default["default"].fn[NAME$e] = JQUERY_NO_CONFLICT$e;
  145. return CardRefresh._jQueryInterface;
  146. };
  147. /**
  148. * --------------------------------------------
  149. * AdminLTE CardWidget.js
  150. * License MIT
  151. * --------------------------------------------
  152. */
  153. /**
  154. * Constants
  155. * ====================================================
  156. */
  157. var NAME$d = 'CardWidget';
  158. var DATA_KEY$d = 'lte.cardwidget';
  159. var EVENT_KEY$6 = "." + DATA_KEY$d;
  160. var JQUERY_NO_CONFLICT$d = $__default["default"].fn[NAME$d];
  161. var EVENT_EXPANDED$3 = "expanded" + EVENT_KEY$6;
  162. var EVENT_COLLAPSED$4 = "collapsed" + EVENT_KEY$6;
  163. var EVENT_MAXIMIZED = "maximized" + EVENT_KEY$6;
  164. var EVENT_MINIMIZED = "minimized" + EVENT_KEY$6;
  165. var EVENT_REMOVED$1 = "removed" + EVENT_KEY$6;
  166. var CLASS_NAME_CARD = 'card';
  167. var CLASS_NAME_COLLAPSED$1 = 'collapsed-card';
  168. var CLASS_NAME_COLLAPSING = 'collapsing-card';
  169. var CLASS_NAME_EXPANDING = 'expanding-card';
  170. var CLASS_NAME_WAS_COLLAPSED = 'was-collapsed';
  171. var CLASS_NAME_MAXIMIZED = 'maximized-card';
  172. var SELECTOR_DATA_REMOVE = '[data-card-widget="remove"]';
  173. var SELECTOR_DATA_COLLAPSE = '[data-card-widget="collapse"]';
  174. var SELECTOR_DATA_MAXIMIZE = '[data-card-widget="maximize"]';
  175. var SELECTOR_CARD = "." + CLASS_NAME_CARD;
  176. var SELECTOR_CARD_HEADER = '.card-header';
  177. var SELECTOR_CARD_BODY = '.card-body';
  178. var SELECTOR_CARD_FOOTER = '.card-footer';
  179. var Default$b = {
  180. animationSpeed: 'normal',
  181. collapseTrigger: SELECTOR_DATA_COLLAPSE,
  182. removeTrigger: SELECTOR_DATA_REMOVE,
  183. maximizeTrigger: SELECTOR_DATA_MAXIMIZE,
  184. collapseIcon: 'fa-minus',
  185. expandIcon: 'fa-plus',
  186. maximizeIcon: 'fa-expand',
  187. minimizeIcon: 'fa-compress'
  188. };
  189. var CardWidget = /*#__PURE__*/function () {
  190. function CardWidget(element, settings) {
  191. this._element = element;
  192. this._parent = element.parents(SELECTOR_CARD).first();
  193. if (element.hasClass(CLASS_NAME_CARD)) {
  194. this._parent = element;
  195. }
  196. this._settings = $__default["default"].extend({}, Default$b, settings);
  197. }
  198. var _proto = CardWidget.prototype;
  199. _proto.collapse = function collapse() {
  200. var _this = this;
  201. this._parent.addClass(CLASS_NAME_COLLAPSING).children(SELECTOR_CARD_BODY + ", " + SELECTOR_CARD_FOOTER).slideUp(this._settings.animationSpeed, function () {
  202. _this._parent.addClass(CLASS_NAME_COLLAPSED$1).removeClass(CLASS_NAME_COLLAPSING);
  203. });
  204. this._parent.find("> " + SELECTOR_CARD_HEADER + " " + this._settings.collapseTrigger + " ." + this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon);
  205. this._element.trigger($__default["default"].Event(EVENT_COLLAPSED$4), this._parent);
  206. };
  207. _proto.expand = function expand() {
  208. var _this2 = this;
  209. this._parent.addClass(CLASS_NAME_EXPANDING).children(SELECTOR_CARD_BODY + ", " + SELECTOR_CARD_FOOTER).slideDown(this._settings.animationSpeed, function () {
  210. _this2._parent.removeClass(CLASS_NAME_COLLAPSED$1).removeClass(CLASS_NAME_EXPANDING);
  211. });
  212. this._parent.find("> " + SELECTOR_CARD_HEADER + " " + this._settings.collapseTrigger + " ." + this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon);
  213. this._element.trigger($__default["default"].Event(EVENT_EXPANDED$3), this._parent);
  214. };
  215. _proto.remove = function remove() {
  216. this._parent.slideUp();
  217. this._element.trigger($__default["default"].Event(EVENT_REMOVED$1), this._parent);
  218. };
  219. _proto.toggle = function toggle() {
  220. if (this._parent.hasClass(CLASS_NAME_COLLAPSED$1)) {
  221. this.expand();
  222. return;
  223. }
  224. this.collapse();
  225. };
  226. _proto.maximize = function maximize() {
  227. this._parent.find(this._settings.maximizeTrigger + " ." + this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon);
  228. this._parent.css({
  229. height: this._parent.height(),
  230. width: this._parent.width(),
  231. transition: 'all .15s'
  232. }).delay(150).queue(function () {
  233. var $element = $__default["default"](this);
  234. $element.addClass(CLASS_NAME_MAXIMIZED);
  235. $__default["default"]('html').addClass(CLASS_NAME_MAXIMIZED);
  236. if ($element.hasClass(CLASS_NAME_COLLAPSED$1)) {
  237. $element.addClass(CLASS_NAME_WAS_COLLAPSED);
  238. }
  239. $element.dequeue();
  240. });
  241. this._element.trigger($__default["default"].Event(EVENT_MAXIMIZED), this._parent);
  242. };
  243. _proto.minimize = function minimize() {
  244. this._parent.find(this._settings.maximizeTrigger + " ." + this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon);
  245. 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 () {
  246. var $element = $__default["default"](this);
  247. $element.removeClass(CLASS_NAME_MAXIMIZED);
  248. $__default["default"]('html').removeClass(CLASS_NAME_MAXIMIZED);
  249. $element.css({
  250. height: 'inherit',
  251. width: 'inherit'
  252. });
  253. if ($element.hasClass(CLASS_NAME_WAS_COLLAPSED)) {
  254. $element.removeClass(CLASS_NAME_WAS_COLLAPSED);
  255. }
  256. $element.dequeue();
  257. });
  258. this._element.trigger($__default["default"].Event(EVENT_MINIMIZED), this._parent);
  259. };
  260. _proto.toggleMaximize = function toggleMaximize() {
  261. if (this._parent.hasClass(CLASS_NAME_MAXIMIZED)) {
  262. this.minimize();
  263. return;
  264. }
  265. this.maximize();
  266. } // Private
  267. ;
  268. _proto._init = function _init(card) {
  269. var _this3 = this;
  270. this._parent = card;
  271. $__default["default"](this).find(this._settings.collapseTrigger).click(function () {
  272. _this3.toggle();
  273. });
  274. $__default["default"](this).find(this._settings.maximizeTrigger).click(function () {
  275. _this3.toggleMaximize();
  276. });
  277. $__default["default"](this).find(this._settings.removeTrigger).click(function () {
  278. _this3.remove();
  279. });
  280. } // Static
  281. ;
  282. CardWidget._jQueryInterface = function _jQueryInterface(config) {
  283. var data = $__default["default"](this).data(DATA_KEY$d);
  284. var _options = $__default["default"].extend({}, Default$b, $__default["default"](this).data());
  285. if (!data) {
  286. data = new CardWidget($__default["default"](this), _options);
  287. $__default["default"](this).data(DATA_KEY$d, typeof config === 'string' ? data : config);
  288. }
  289. if (typeof config === 'string' && /collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/.test(config)) {
  290. data[config]();
  291. } else if (typeof config === 'object') {
  292. data._init($__default["default"](this));
  293. }
  294. };
  295. return CardWidget;
  296. }();
  297. /**
  298. * Data API
  299. * ====================================================
  300. */
  301. $__default["default"](document).on('click', SELECTOR_DATA_COLLAPSE, function (event) {
  302. if (event) {
  303. event.preventDefault();
  304. }
  305. CardWidget._jQueryInterface.call($__default["default"](this), 'toggle');
  306. });
  307. $__default["default"](document).on('click', SELECTOR_DATA_REMOVE, function (event) {
  308. if (event) {
  309. event.preventDefault();
  310. }
  311. CardWidget._jQueryInterface.call($__default["default"](this), 'remove');
  312. });
  313. $__default["default"](document).on('click', SELECTOR_DATA_MAXIMIZE, function (event) {
  314. if (event) {
  315. event.preventDefault();
  316. }
  317. CardWidget._jQueryInterface.call($__default["default"](this), 'toggleMaximize');
  318. });
  319. /**
  320. * jQuery API
  321. * ====================================================
  322. */
  323. $__default["default"].fn[NAME$d] = CardWidget._jQueryInterface;
  324. $__default["default"].fn[NAME$d].Constructor = CardWidget;
  325. $__default["default"].fn[NAME$d].noConflict = function () {
  326. $__default["default"].fn[NAME$d] = JQUERY_NO_CONFLICT$d;
  327. return CardWidget._jQueryInterface;
  328. };
  329. /**
  330. * --------------------------------------------
  331. * AdminLTE ControlSidebar.js
  332. * License MIT
  333. * --------------------------------------------
  334. */
  335. /**
  336. * Constants
  337. * ====================================================
  338. */
  339. var NAME$c = 'ControlSidebar';
  340. var DATA_KEY$c = 'lte.controlsidebar';
  341. var EVENT_KEY$5 = "." + DATA_KEY$c;
  342. var JQUERY_NO_CONFLICT$c = $__default["default"].fn[NAME$c];
  343. var EVENT_COLLAPSED$3 = "collapsed" + EVENT_KEY$5;
  344. var EVENT_COLLAPSED_DONE$1 = "collapsed-done" + EVENT_KEY$5;
  345. var EVENT_EXPANDED$2 = "expanded" + EVENT_KEY$5;
  346. var SELECTOR_CONTROL_SIDEBAR = '.control-sidebar';
  347. var SELECTOR_CONTROL_SIDEBAR_CONTENT$1 = '.control-sidebar-content';
  348. var SELECTOR_DATA_TOGGLE$4 = '[data-widget="control-sidebar"]';
  349. var SELECTOR_HEADER$1 = '.main-header';
  350. var SELECTOR_FOOTER$1 = '.main-footer';
  351. var CLASS_NAME_CONTROL_SIDEBAR_ANIMATE = 'control-sidebar-animate';
  352. var CLASS_NAME_CONTROL_SIDEBAR_OPEN$1 = 'control-sidebar-open';
  353. var CLASS_NAME_CONTROL_SIDEBAR_SLIDE = 'control-sidebar-slide-open';
  354. var CLASS_NAME_LAYOUT_FIXED$1 = 'layout-fixed';
  355. var CLASS_NAME_NAVBAR_FIXED = 'layout-navbar-fixed';
  356. var CLASS_NAME_NAVBAR_SM_FIXED = 'layout-sm-navbar-fixed';
  357. var CLASS_NAME_NAVBAR_MD_FIXED = 'layout-md-navbar-fixed';
  358. var CLASS_NAME_NAVBAR_LG_FIXED = 'layout-lg-navbar-fixed';
  359. var CLASS_NAME_NAVBAR_XL_FIXED = 'layout-xl-navbar-fixed';
  360. var CLASS_NAME_FOOTER_FIXED = 'layout-footer-fixed';
  361. var CLASS_NAME_FOOTER_SM_FIXED = 'layout-sm-footer-fixed';
  362. var CLASS_NAME_FOOTER_MD_FIXED = 'layout-md-footer-fixed';
  363. var CLASS_NAME_FOOTER_LG_FIXED = 'layout-lg-footer-fixed';
  364. var CLASS_NAME_FOOTER_XL_FIXED = 'layout-xl-footer-fixed';
  365. var Default$a = {
  366. controlsidebarSlide: true,
  367. scrollbarTheme: 'os-theme-light',
  368. scrollbarAutoHide: 'l',
  369. target: SELECTOR_CONTROL_SIDEBAR,
  370. animationSpeed: 300
  371. };
  372. /**
  373. * Class Definition
  374. * ====================================================
  375. */
  376. var ControlSidebar = /*#__PURE__*/function () {
  377. function ControlSidebar(element, config) {
  378. this._element = element;
  379. this._config = config;
  380. } // Public
  381. var _proto = ControlSidebar.prototype;
  382. _proto.collapse = function collapse() {
  383. var _this = this;
  384. var $body = $__default["default"]('body');
  385. var $html = $__default["default"]('html'); // Show the control sidebar
  386. if (this._config.controlsidebarSlide) {
  387. $html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE);
  388. $body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
  389. $__default["default"](SELECTOR_CONTROL_SIDEBAR).hide();
  390. $html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE);
  391. $__default["default"](this).dequeue();
  392. });
  393. } else {
  394. $body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1);
  395. }
  396. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_COLLAPSED$3));
  397. setTimeout(function () {
  398. $__default["default"](_this._element).trigger($__default["default"].Event(EVENT_COLLAPSED_DONE$1));
  399. }, this._config.animationSpeed);
  400. };
  401. _proto.show = function show(toggle) {
  402. if (toggle === void 0) {
  403. toggle = false;
  404. }
  405. var $body = $__default["default"]('body');
  406. var $html = $__default["default"]('html');
  407. if (toggle) {
  408. $__default["default"](SELECTOR_CONTROL_SIDEBAR).hide();
  409. } // Collapse the control sidebar
  410. if (this._config.controlsidebarSlide) {
  411. $html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE);
  412. $__default["default"](this._config.target).show().delay(10).queue(function () {
  413. $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
  414. $html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE);
  415. $__default["default"](this).dequeue();
  416. });
  417. $__default["default"](this).dequeue();
  418. });
  419. } else {
  420. $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1);
  421. }
  422. this._fixHeight();
  423. this._fixScrollHeight();
  424. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_EXPANDED$2));
  425. };
  426. _proto.toggle = function toggle() {
  427. var $body = $__default["default"]('body');
  428. var target = this._config.target;
  429. var notVisible = !$__default["default"](target).is(':visible');
  430. var shouldClose = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE);
  431. var shouldToggle = notVisible && ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE));
  432. if (notVisible || shouldToggle) {
  433. // Open the control sidebar
  434. this.show(notVisible);
  435. } else if (shouldClose) {
  436. // Close the control sidebar
  437. this.collapse();
  438. }
  439. } // Private
  440. ;
  441. _proto._init = function _init() {
  442. var _this2 = this;
  443. var $body = $__default["default"]('body');
  444. var shouldNotHideAll = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE);
  445. if (shouldNotHideAll) {
  446. $__default["default"](SELECTOR_CONTROL_SIDEBAR).not(this._config.target).hide();
  447. $__default["default"](this._config.target).css('display', 'block');
  448. } else {
  449. $__default["default"](SELECTOR_CONTROL_SIDEBAR).hide();
  450. }
  451. this._fixHeight();
  452. this._fixScrollHeight();
  453. $__default["default"](window).resize(function () {
  454. _this2._fixHeight();
  455. _this2._fixScrollHeight();
  456. });
  457. $__default["default"](window).scroll(function () {
  458. var $body = $__default["default"]('body');
  459. var shouldFixHeight = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE);
  460. if (shouldFixHeight) {
  461. _this2._fixScrollHeight();
  462. }
  463. });
  464. };
  465. _proto._isNavbarFixed = function _isNavbarFixed() {
  466. var $body = $__default["default"]('body');
  467. return $body.hasClass(CLASS_NAME_NAVBAR_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_SM_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_MD_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_LG_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_XL_FIXED);
  468. };
  469. _proto._isFooterFixed = function _isFooterFixed() {
  470. var $body = $__default["default"]('body');
  471. return $body.hasClass(CLASS_NAME_FOOTER_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_XL_FIXED);
  472. };
  473. _proto._fixScrollHeight = function _fixScrollHeight() {
  474. var $body = $__default["default"]('body');
  475. var $controlSidebar = $__default["default"](this._config.target);
  476. if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED$1)) {
  477. return;
  478. }
  479. var heights = {
  480. scroll: $__default["default"](document).height(),
  481. window: $__default["default"](window).height(),
  482. header: $__default["default"](SELECTOR_HEADER$1).outerHeight(),
  483. footer: $__default["default"](SELECTOR_FOOTER$1).outerHeight()
  484. };
  485. var positions = {
  486. bottom: Math.abs(heights.window + $__default["default"](window).scrollTop() - heights.scroll),
  487. top: $__default["default"](window).scrollTop()
  488. };
  489. var navbarFixed = this._isNavbarFixed() && $__default["default"](SELECTOR_HEADER$1).css('position') === 'fixed';
  490. var footerFixed = this._isFooterFixed() && $__default["default"](SELECTOR_FOOTER$1).css('position') === 'fixed';
  491. var $controlsidebarContent = $__default["default"](this._config.target + ", " + this._config.target + " " + SELECTOR_CONTROL_SIDEBAR_CONTENT$1);
  492. if (positions.top === 0 && positions.bottom === 0) {
  493. $controlSidebar.css({
  494. bottom: heights.footer,
  495. top: heights.header
  496. });
  497. $controlsidebarContent.css('height', heights.window - (heights.header + heights.footer));
  498. } else if (positions.bottom <= heights.footer) {
  499. if (footerFixed === false) {
  500. var top = heights.header - positions.top;
  501. $controlSidebar.css('bottom', heights.footer - positions.bottom).css('top', top >= 0 ? top : 0);
  502. $controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom));
  503. } else {
  504. $controlSidebar.css('bottom', heights.footer);
  505. }
  506. } else if (positions.top <= heights.header) {
  507. if (navbarFixed === false) {
  508. $controlSidebar.css('top', heights.header - positions.top);
  509. $controlsidebarContent.css('height', heights.window - (heights.header - positions.top));
  510. } else {
  511. $controlSidebar.css('top', heights.header);
  512. }
  513. } else if (navbarFixed === false) {
  514. $controlSidebar.css('top', 0);
  515. $controlsidebarContent.css('height', heights.window);
  516. } else {
  517. $controlSidebar.css('top', heights.header);
  518. }
  519. if (footerFixed && navbarFixed) {
  520. $controlsidebarContent.css('height', '100%');
  521. $controlSidebar.css('height', '');
  522. } else if (footerFixed || navbarFixed) {
  523. $controlsidebarContent.css('height', '100%');
  524. $controlsidebarContent.css('height', '');
  525. }
  526. };
  527. _proto._fixHeight = function _fixHeight() {
  528. var $body = $__default["default"]('body');
  529. var $controlSidebar = $__default["default"](this._config.target + " " + SELECTOR_CONTROL_SIDEBAR_CONTENT$1);
  530. if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED$1)) {
  531. $controlSidebar.attr('style', '');
  532. return;
  533. }
  534. var heights = {
  535. window: $__default["default"](window).height(),
  536. header: $__default["default"](SELECTOR_HEADER$1).outerHeight(),
  537. footer: $__default["default"](SELECTOR_FOOTER$1).outerHeight()
  538. };
  539. var sidebarHeight = heights.window - heights.header;
  540. if (this._isFooterFixed() && $__default["default"](SELECTOR_FOOTER$1).css('position') === 'fixed') {
  541. sidebarHeight = heights.window - heights.header - heights.footer;
  542. }
  543. $controlSidebar.css('height', sidebarHeight);
  544. if (typeof $__default["default"].fn.overlayScrollbars !== 'undefined') {
  545. $controlSidebar.overlayScrollbars({
  546. className: this._config.scrollbarTheme,
  547. sizeAutoCapable: true,
  548. scrollbars: {
  549. autoHide: this._config.scrollbarAutoHide,
  550. clickScrolling: true
  551. }
  552. });
  553. }
  554. } // Static
  555. ;
  556. ControlSidebar._jQueryInterface = function _jQueryInterface(operation) {
  557. return this.each(function () {
  558. var data = $__default["default"](this).data(DATA_KEY$c);
  559. var _options = $__default["default"].extend({}, Default$a, $__default["default"](this).data());
  560. if (!data) {
  561. data = new ControlSidebar(this, _options);
  562. $__default["default"](this).data(DATA_KEY$c, data);
  563. }
  564. if (data[operation] === 'undefined') {
  565. throw new Error(operation + " is not a function");
  566. }
  567. data[operation]();
  568. });
  569. };
  570. return ControlSidebar;
  571. }();
  572. /**
  573. *
  574. * Data Api implementation
  575. * ====================================================
  576. */
  577. $__default["default"](document).on('click', SELECTOR_DATA_TOGGLE$4, function (event) {
  578. event.preventDefault();
  579. ControlSidebar._jQueryInterface.call($__default["default"](this), 'toggle');
  580. });
  581. $__default["default"](document).ready(function () {
  582. ControlSidebar._jQueryInterface.call($__default["default"](SELECTOR_DATA_TOGGLE$4), '_init');
  583. });
  584. /**
  585. * jQuery API
  586. * ====================================================
  587. */
  588. $__default["default"].fn[NAME$c] = ControlSidebar._jQueryInterface;
  589. $__default["default"].fn[NAME$c].Constructor = ControlSidebar;
  590. $__default["default"].fn[NAME$c].noConflict = function () {
  591. $__default["default"].fn[NAME$c] = JQUERY_NO_CONFLICT$c;
  592. return ControlSidebar._jQueryInterface;
  593. };
  594. /**
  595. * --------------------------------------------
  596. * AdminLTE DirectChat.js
  597. * License MIT
  598. * --------------------------------------------
  599. */
  600. /**
  601. * Constants
  602. * ====================================================
  603. */
  604. var NAME$b = 'DirectChat';
  605. var DATA_KEY$b = 'lte.directchat';
  606. var EVENT_KEY$4 = "." + DATA_KEY$b;
  607. var JQUERY_NO_CONFLICT$b = $__default["default"].fn[NAME$b];
  608. var EVENT_TOGGLED = "toggled" + EVENT_KEY$4;
  609. var SELECTOR_DATA_TOGGLE$3 = '[data-widget="chat-pane-toggle"]';
  610. var SELECTOR_DIRECT_CHAT = '.direct-chat';
  611. var CLASS_NAME_DIRECT_CHAT_OPEN = 'direct-chat-contacts-open';
  612. /**
  613. * Class Definition
  614. * ====================================================
  615. */
  616. var DirectChat = /*#__PURE__*/function () {
  617. function DirectChat(element) {
  618. this._element = element;
  619. }
  620. var _proto = DirectChat.prototype;
  621. _proto.toggle = function toggle() {
  622. $__default["default"](this._element).parents(SELECTOR_DIRECT_CHAT).first().toggleClass(CLASS_NAME_DIRECT_CHAT_OPEN);
  623. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_TOGGLED));
  624. } // Static
  625. ;
  626. DirectChat._jQueryInterface = function _jQueryInterface(config) {
  627. return this.each(function () {
  628. var data = $__default["default"](this).data(DATA_KEY$b);
  629. if (!data) {
  630. data = new DirectChat($__default["default"](this));
  631. $__default["default"](this).data(DATA_KEY$b, data);
  632. }
  633. data[config]();
  634. });
  635. };
  636. return DirectChat;
  637. }();
  638. /**
  639. *
  640. * Data Api implementation
  641. * ====================================================
  642. */
  643. $__default["default"](document).on('click', SELECTOR_DATA_TOGGLE$3, function (event) {
  644. if (event) {
  645. event.preventDefault();
  646. }
  647. DirectChat._jQueryInterface.call($__default["default"](this), 'toggle');
  648. });
  649. /**
  650. * jQuery API
  651. * ====================================================
  652. */
  653. $__default["default"].fn[NAME$b] = DirectChat._jQueryInterface;
  654. $__default["default"].fn[NAME$b].Constructor = DirectChat;
  655. $__default["default"].fn[NAME$b].noConflict = function () {
  656. $__default["default"].fn[NAME$b] = JQUERY_NO_CONFLICT$b;
  657. return DirectChat._jQueryInterface;
  658. };
  659. /**
  660. * --------------------------------------------
  661. * AdminLTE Dropdown.js
  662. * License MIT
  663. * --------------------------------------------
  664. */
  665. /**
  666. * Constants
  667. * ====================================================
  668. */
  669. var NAME$a = 'Dropdown';
  670. var DATA_KEY$a = 'lte.dropdown';
  671. var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a];
  672. var SELECTOR_NAVBAR = '.navbar';
  673. var SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
  674. var SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show';
  675. var SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]';
  676. var CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right';
  677. var CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu'; // TODO: this is unused; should be removed along with the extend?
  678. var Default$9 = {};
  679. /**
  680. * Class Definition
  681. * ====================================================
  682. */
  683. var Dropdown = /*#__PURE__*/function () {
  684. function Dropdown(element, config) {
  685. this._config = config;
  686. this._element = element;
  687. } // Public
  688. var _proto = Dropdown.prototype;
  689. _proto.toggleSubmenu = function toggleSubmenu() {
  690. this._element.siblings().show().toggleClass('show');
  691. if (!this._element.next().hasClass('show')) {
  692. this._element.parents(SELECTOR_DROPDOWN_MENU).first().find('.show').removeClass('show').hide();
  693. }
  694. this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function () {
  695. $__default["default"]('.dropdown-submenu .show').removeClass('show').hide();
  696. });
  697. };
  698. _proto.fixPosition = function fixPosition() {
  699. var $element = $__default["default"](SELECTOR_DROPDOWN_MENU_ACTIVE);
  700. if ($element.length === 0) {
  701. return;
  702. }
  703. if ($element.hasClass(CLASS_NAME_DROPDOWN_RIGHT)) {
  704. $element.css({
  705. left: 'inherit',
  706. right: 0
  707. });
  708. } else {
  709. $element.css({
  710. left: 0,
  711. right: 'inherit'
  712. });
  713. }
  714. var offset = $element.offset();
  715. var width = $element.width();
  716. var visiblePart = $__default["default"](window).width() - offset.left;
  717. if (offset.left < 0) {
  718. $element.css({
  719. left: 'inherit',
  720. right: offset.left - 5
  721. });
  722. } else if (visiblePart < width) {
  723. $element.css({
  724. left: 'inherit',
  725. right: 0
  726. });
  727. }
  728. } // Static
  729. ;
  730. Dropdown._jQueryInterface = function _jQueryInterface(config) {
  731. return this.each(function () {
  732. var data = $__default["default"](this).data(DATA_KEY$a);
  733. var _config = $__default["default"].extend({}, Default$9, $__default["default"](this).data());
  734. if (!data) {
  735. data = new Dropdown($__default["default"](this), _config);
  736. $__default["default"](this).data(DATA_KEY$a, data);
  737. }
  738. if (config === 'toggleSubmenu' || config === 'fixPosition') {
  739. data[config]();
  740. }
  741. });
  742. };
  743. return Dropdown;
  744. }();
  745. /**
  746. * Data API
  747. * ====================================================
  748. */
  749. $__default["default"](SELECTOR_DROPDOWN_MENU + " " + SELECTOR_DROPDOWN_TOGGLE).on('click', function (event) {
  750. event.preventDefault();
  751. event.stopPropagation();
  752. Dropdown._jQueryInterface.call($__default["default"](this), 'toggleSubmenu');
  753. });
  754. $__default["default"](SELECTOR_NAVBAR + " " + SELECTOR_DROPDOWN_TOGGLE).on('click', function (event) {
  755. event.preventDefault();
  756. if ($__default["default"](event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) {
  757. return;
  758. }
  759. setTimeout(function () {
  760. Dropdown._jQueryInterface.call($__default["default"](this), 'fixPosition');
  761. }, 1);
  762. });
  763. /**
  764. * jQuery API
  765. * ====================================================
  766. */
  767. $__default["default"].fn[NAME$a] = Dropdown._jQueryInterface;
  768. $__default["default"].fn[NAME$a].Constructor = Dropdown;
  769. $__default["default"].fn[NAME$a].noConflict = function () {
  770. $__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
  771. return Dropdown._jQueryInterface;
  772. };
  773. /**
  774. * --------------------------------------------
  775. * AdminLTE ExpandableTable.js
  776. * License MIT
  777. * --------------------------------------------
  778. */
  779. /**
  780. * Constants
  781. * ====================================================
  782. */
  783. var NAME$9 = 'ExpandableTable';
  784. var DATA_KEY$9 = 'lte.expandableTable';
  785. var EVENT_KEY$3 = "." + DATA_KEY$9;
  786. var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9];
  787. var EVENT_EXPANDED$1 = "expanded" + EVENT_KEY$3;
  788. var EVENT_COLLAPSED$2 = "collapsed" + EVENT_KEY$3;
  789. var SELECTOR_TABLE = '.expandable-table';
  790. var SELECTOR_EXPANDABLE_BODY = '.expandable-body';
  791. var SELECTOR_DATA_TOGGLE$2 = '[data-widget="expandable-table"]';
  792. var SELECTOR_ARIA_ATTR = 'aria-expanded';
  793. /**
  794. * Class Definition
  795. * ====================================================
  796. */
  797. var ExpandableTable = /*#__PURE__*/function () {
  798. function ExpandableTable(element, options) {
  799. this._options = options;
  800. this._element = element;
  801. } // Public
  802. var _proto = ExpandableTable.prototype;
  803. _proto.init = function init() {
  804. $__default["default"](SELECTOR_DATA_TOGGLE$2).each(function (_, $header) {
  805. var $type = $__default["default"]($header).attr(SELECTOR_ARIA_ATTR);
  806. var $body = $__default["default"]($header).next(SELECTOR_EXPANDABLE_BODY).children().first().children();
  807. if ($type === 'true') {
  808. $body.show();
  809. } else if ($type === 'false') {
  810. $body.hide();
  811. $body.parent().parent().addClass('d-none');
  812. }
  813. });
  814. };
  815. _proto.toggleRow = function toggleRow() {
  816. var $element = this._element;
  817. if ($element[0].nodeName !== 'TR') {
  818. $element = $element.parent();
  819. if ($element[0].nodeName !== 'TR') {
  820. $element = $element.parent();
  821. }
  822. }
  823. var time = 500;
  824. var $type = $element.attr(SELECTOR_ARIA_ATTR);
  825. var $body = $element.next(SELECTOR_EXPANDABLE_BODY).children().first().children();
  826. $body.stop();
  827. if ($type === 'true') {
  828. $body.slideUp(time, function () {
  829. $element.next(SELECTOR_EXPANDABLE_BODY).addClass('d-none');
  830. });
  831. $element.attr(SELECTOR_ARIA_ATTR, 'false');
  832. $element.trigger($__default["default"].Event(EVENT_COLLAPSED$2));
  833. } else if ($type === 'false') {
  834. $element.next(SELECTOR_EXPANDABLE_BODY).removeClass('d-none');
  835. $body.slideDown(time);
  836. $element.attr(SELECTOR_ARIA_ATTR, 'true');
  837. $element.trigger($__default["default"].Event(EVENT_EXPANDED$1));
  838. }
  839. } // Static
  840. ;
  841. ExpandableTable._jQueryInterface = function _jQueryInterface(operation) {
  842. return this.each(function () {
  843. var data = $__default["default"](this).data(DATA_KEY$9);
  844. if (!data) {
  845. data = new ExpandableTable($__default["default"](this));
  846. $__default["default"](this).data(DATA_KEY$9, data);
  847. }
  848. if (typeof operation === 'string' && /init|toggleRow/.test(operation)) {
  849. data[operation]();
  850. }
  851. });
  852. };
  853. return ExpandableTable;
  854. }();
  855. /**
  856. * Data API
  857. * ====================================================
  858. */
  859. $__default["default"](SELECTOR_TABLE).ready(function () {
  860. ExpandableTable._jQueryInterface.call($__default["default"](this), 'init');
  861. });
  862. $__default["default"](document).on('click', SELECTOR_DATA_TOGGLE$2, function () {
  863. ExpandableTable._jQueryInterface.call($__default["default"](this), 'toggleRow');
  864. });
  865. /**
  866. * jQuery API
  867. * ====================================================
  868. */
  869. $__default["default"].fn[NAME$9] = ExpandableTable._jQueryInterface;
  870. $__default["default"].fn[NAME$9].Constructor = ExpandableTable;
  871. $__default["default"].fn[NAME$9].noConflict = function () {
  872. $__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
  873. return ExpandableTable._jQueryInterface;
  874. };
  875. /**
  876. * --------------------------------------------
  877. * AdminLTE Fullscreen.js
  878. * License MIT
  879. * --------------------------------------------
  880. */
  881. /**
  882. * Constants
  883. * ====================================================
  884. */
  885. var NAME$8 = 'Fullscreen';
  886. var DATA_KEY$8 = 'lte.fullscreen';
  887. var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8];
  888. var SELECTOR_DATA_WIDGET$2 = '[data-widget="fullscreen"]';
  889. var SELECTOR_ICON = SELECTOR_DATA_WIDGET$2 + " i";
  890. var EVENT_FULLSCREEN_CHANGE = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';
  891. var Default$8 = {
  892. minimizeIcon: 'fa-compress-arrows-alt',
  893. maximizeIcon: 'fa-expand-arrows-alt'
  894. };
  895. /**
  896. * Class Definition
  897. * ====================================================
  898. */
  899. var Fullscreen = /*#__PURE__*/function () {
  900. function Fullscreen(_element, _options) {
  901. this.element = _element;
  902. this.options = $__default["default"].extend({}, Default$8, _options);
  903. } // Public
  904. var _proto = Fullscreen.prototype;
  905. _proto.toggle = function toggle() {
  906. if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) {
  907. this.windowed();
  908. } else {
  909. this.fullscreen();
  910. }
  911. };
  912. _proto.toggleIcon = function toggleIcon() {
  913. if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) {
  914. $__default["default"](SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon);
  915. } else {
  916. $__default["default"](SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon);
  917. }
  918. };
  919. _proto.fullscreen = function fullscreen() {
  920. if (document.documentElement.requestFullscreen) {
  921. document.documentElement.requestFullscreen();
  922. } else if (document.documentElement.webkitRequestFullscreen) {
  923. document.documentElement.webkitRequestFullscreen();
  924. } else if (document.documentElement.msRequestFullscreen) {
  925. document.documentElement.msRequestFullscreen();
  926. }
  927. };
  928. _proto.windowed = function windowed() {
  929. if (document.exitFullscreen) {
  930. document.exitFullscreen();
  931. } else if (document.webkitExitFullscreen) {
  932. document.webkitExitFullscreen();
  933. } else if (document.msExitFullscreen) {
  934. document.msExitFullscreen();
  935. }
  936. } // Static
  937. ;
  938. Fullscreen._jQueryInterface = function _jQueryInterface(config) {
  939. var data = $__default["default"](this).data(DATA_KEY$8);
  940. if (!data) {
  941. data = $__default["default"](this).data();
  942. }
  943. var _options = $__default["default"].extend({}, Default$8, typeof config === 'object' ? config : data);
  944. var plugin = new Fullscreen($__default["default"](this), _options);
  945. $__default["default"](this).data(DATA_KEY$8, typeof config === 'object' ? config : data);
  946. if (typeof config === 'string' && /toggle|toggleIcon|fullscreen|windowed/.test(config)) {
  947. plugin[config]();
  948. } else {
  949. plugin.init();
  950. }
  951. };
  952. return Fullscreen;
  953. }();
  954. /**
  955. * Data API
  956. * ====================================================
  957. */
  958. $__default["default"](document).on('click', SELECTOR_DATA_WIDGET$2, function () {
  959. Fullscreen._jQueryInterface.call($__default["default"](this), 'toggle');
  960. });
  961. $__default["default"](document).on(EVENT_FULLSCREEN_CHANGE, function () {
  962. Fullscreen._jQueryInterface.call($__default["default"](SELECTOR_DATA_WIDGET$2), 'toggleIcon');
  963. });
  964. /**
  965. * jQuery API
  966. * ====================================================
  967. */
  968. $__default["default"].fn[NAME$8] = Fullscreen._jQueryInterface;
  969. $__default["default"].fn[NAME$8].Constructor = Fullscreen;
  970. $__default["default"].fn[NAME$8].noConflict = function () {
  971. $__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
  972. return Fullscreen._jQueryInterface;
  973. };
  974. /**
  975. * --------------------------------------------
  976. * AdminLTE IFrame.js
  977. * License MIT
  978. * --------------------------------------------
  979. */
  980. /**
  981. * Constants
  982. * ====================================================
  983. */
  984. var NAME$7 = 'IFrame';
  985. var DATA_KEY$7 = 'lte.iframe';
  986. var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7];
  987. var SELECTOR_DATA_TOGGLE$1 = '[data-widget="iframe"]';
  988. var SELECTOR_DATA_TOGGLE_CLOSE = '[data-widget="iframe-close"]';
  989. var SELECTOR_DATA_TOGGLE_SCROLL_LEFT = '[data-widget="iframe-scrollleft"]';
  990. var SELECTOR_DATA_TOGGLE_SCROLL_RIGHT = '[data-widget="iframe-scrollright"]';
  991. var SELECTOR_DATA_TOGGLE_FULLSCREEN = '[data-widget="iframe-fullscreen"]';
  992. var SELECTOR_CONTENT_WRAPPER = '.content-wrapper';
  993. var SELECTOR_CONTENT_IFRAME = SELECTOR_CONTENT_WRAPPER + " iframe";
  994. var SELECTOR_TAB_NAV = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .nav";
  995. var SELECTOR_TAB_NAVBAR_NAV = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .navbar-nav";
  996. var SELECTOR_TAB_NAVBAR_NAV_ITEM = SELECTOR_TAB_NAVBAR_NAV + " .nav-item";
  997. var SELECTOR_TAB_NAVBAR_NAV_LINK = SELECTOR_TAB_NAVBAR_NAV + " .nav-link";
  998. var SELECTOR_TAB_CONTENT = SELECTOR_CONTENT_WRAPPER + ".iframe-mode .tab-content";
  999. var SELECTOR_TAB_EMPTY = SELECTOR_TAB_CONTENT + " .tab-empty";
  1000. var SELECTOR_TAB_LOADING = SELECTOR_TAB_CONTENT + " .tab-loading";
  1001. var SELECTOR_TAB_PANE = SELECTOR_TAB_CONTENT + " .tab-pane";
  1002. var SELECTOR_SIDEBAR_MENU_ITEM = '.main-sidebar .nav-item > a.nav-link';
  1003. var SELECTOR_SIDEBAR_SEARCH_ITEM = '.sidebar-search-results .list-group-item';
  1004. var SELECTOR_HEADER_MENU_ITEM = '.main-header .nav-item a.nav-link';
  1005. var SELECTOR_HEADER_DROPDOWN_ITEM = '.main-header a.dropdown-item';
  1006. var CLASS_NAME_IFRAME_MODE$1 = 'iframe-mode';
  1007. var CLASS_NAME_FULLSCREEN_MODE = 'iframe-mode-fullscreen';
  1008. var Default$7 = {
  1009. onTabClick: function onTabClick(item) {
  1010. return item;
  1011. },
  1012. onTabChanged: function onTabChanged(item) {
  1013. return item;
  1014. },
  1015. onTabCreated: function onTabCreated(item) {
  1016. return item;
  1017. },
  1018. autoIframeMode: true,
  1019. autoItemActive: true,
  1020. autoShowNewTab: true,
  1021. autoDarkMode: false,
  1022. allowDuplicates: false,
  1023. allowReload: true,
  1024. loadingScreen: true,
  1025. useNavbarItems: true,
  1026. scrollOffset: 40,
  1027. scrollBehaviorSwap: false,
  1028. iconMaximize: 'fa-expand',
  1029. iconMinimize: 'fa-compress'
  1030. };
  1031. /**
  1032. * Class Definition
  1033. * ====================================================
  1034. */
  1035. var IFrame = /*#__PURE__*/function () {
  1036. function IFrame(element, config) {
  1037. this._config = config;
  1038. this._element = element;
  1039. this._init();
  1040. } // Public
  1041. var _proto = IFrame.prototype;
  1042. _proto.onTabClick = function onTabClick(item) {
  1043. this._config.onTabClick(item);
  1044. };
  1045. _proto.onTabChanged = function onTabChanged(item) {
  1046. this._config.onTabChanged(item);
  1047. };
  1048. _proto.onTabCreated = function onTabCreated(item) {
  1049. this._config.onTabCreated(item);
  1050. };
  1051. _proto.createTab = function createTab(title, link, uniqueName, autoOpen) {
  1052. var _this = this;
  1053. var tabId = "panel-" + uniqueName;
  1054. var navId = "tab-" + uniqueName;
  1055. if (this._config.allowDuplicates) {
  1056. tabId += "-" + Math.floor(Math.random() * 1000);
  1057. navId += "-" + Math.floor(Math.random() * 1000);
  1058. }
  1059. var newNavItem = "<li class=\"nav-item\" role=\"presentation\"><a href=\"#\" class=\"btn-iframe-close\" data-widget=\"iframe-close\" data-type=\"only-this\"><i class=\"fas fa-times\"></i></a><a class=\"nav-link\" data-toggle=\"row\" id=\"" + navId + "\" href=\"#" + tabId + "\" role=\"tab\" aria-controls=\"" + tabId + "\" aria-selected=\"false\">" + title + "</a></li>";
  1060. $__default["default"](SELECTOR_TAB_NAVBAR_NAV).append(unescape(escape(newNavItem)));
  1061. var newTabItem = "<div class=\"tab-pane fade\" id=\"" + tabId + "\" role=\"tabpanel\" aria-labelledby=\"" + navId + "\"><iframe src=\"" + link + "\"></iframe></div>";
  1062. $__default["default"](SELECTOR_TAB_CONTENT).append(unescape(escape(newTabItem)));
  1063. if (autoOpen) {
  1064. if (this._config.loadingScreen) {
  1065. var $loadingScreen = $__default["default"](SELECTOR_TAB_LOADING);
  1066. $loadingScreen.fadeIn();
  1067. $__default["default"](tabId + " iframe").ready(function () {
  1068. if (typeof _this._config.loadingScreen === 'number') {
  1069. _this.switchTab("#" + navId);
  1070. setTimeout(function () {
  1071. $loadingScreen.fadeOut();
  1072. }, _this._config.loadingScreen);
  1073. } else {
  1074. _this.switchTab("#" + navId);
  1075. $loadingScreen.fadeOut();
  1076. }
  1077. });
  1078. } else {
  1079. this.switchTab("#" + navId);
  1080. }
  1081. }
  1082. this.onTabCreated($__default["default"]("#" + navId));
  1083. };
  1084. _proto.openTabSidebar = function openTabSidebar(item, autoOpen) {
  1085. if (autoOpen === void 0) {
  1086. autoOpen = this._config.autoShowNewTab;
  1087. }
  1088. var $item = $__default["default"](item).clone();
  1089. if ($item.attr('href') === undefined) {
  1090. $item = $__default["default"](item).parent('a').clone();
  1091. }
  1092. $item.find('.right, .search-path').remove();
  1093. var title = $item.find('p').text();
  1094. if (title === '') {
  1095. title = $item.text();
  1096. }
  1097. var link = $item.attr('href');
  1098. if (link === '#' || link === '' || link === undefined) {
  1099. return;
  1100. }
  1101. var uniqueName = unescape(link).replace('./', '').replace(/["#&'./:=?[\]]/gi, '-').replace(/(--)/gi, '');
  1102. var navId = "tab-" + uniqueName;
  1103. if (!this._config.allowDuplicates && $__default["default"]("#" + navId).length > 0) {
  1104. return this.switchTab("#" + navId, this._config.allowReload);
  1105. }
  1106. if (!this._config.allowDuplicates && $__default["default"]("#" + navId).length === 0 || this._config.allowDuplicates) {
  1107. this.createTab(title, link, uniqueName, autoOpen);
  1108. }
  1109. };
  1110. _proto.switchTab = function switchTab(item, reload) {
  1111. var _this2 = this;
  1112. if (reload === void 0) {
  1113. reload = false;
  1114. }
  1115. var $item = $__default["default"](item);
  1116. var tabId = $item.attr('href');
  1117. $__default["default"](SELECTOR_TAB_EMPTY).hide();
  1118. if (reload) {
  1119. var $loadingScreen = $__default["default"](SELECTOR_TAB_LOADING);
  1120. if (this._config.loadingScreen) {
  1121. $loadingScreen.show(0, function () {
  1122. $__default["default"](tabId + " iframe").attr('src', $__default["default"](tabId + " iframe").attr('src')).ready(function () {
  1123. if (_this2._config.loadingScreen) {
  1124. if (typeof _this2._config.loadingScreen === 'number') {
  1125. setTimeout(function () {
  1126. $loadingScreen.fadeOut();
  1127. }, _this2._config.loadingScreen);
  1128. } else {
  1129. $loadingScreen.fadeOut();
  1130. }
  1131. }
  1132. });
  1133. });
  1134. } else {
  1135. $__default["default"](tabId + " iframe").attr('src', $__default["default"](tabId + " iframe").attr('src'));
  1136. }
  1137. }
  1138. $__default["default"](SELECTOR_TAB_NAVBAR_NAV + " .active").tab('dispose').removeClass('active');
  1139. this._fixHeight();
  1140. $item.tab('show');
  1141. $item.parents('li').addClass('active');
  1142. this.onTabChanged($item);
  1143. if (this._config.autoItemActive) {
  1144. this._setItemActive($__default["default"](tabId + " iframe").attr('src'));
  1145. }
  1146. };
  1147. _proto.removeActiveTab = function removeActiveTab(type, element) {
  1148. if (type == 'all') {
  1149. $__default["default"](SELECTOR_TAB_NAVBAR_NAV_ITEM).remove();
  1150. $__default["default"](SELECTOR_TAB_PANE).remove();
  1151. $__default["default"](SELECTOR_TAB_EMPTY).show();
  1152. } else if (type == 'all-other') {
  1153. $__default["default"](SELECTOR_TAB_NAVBAR_NAV_ITEM + ":not(.active)").remove();
  1154. $__default["default"](SELECTOR_TAB_PANE + ":not(.active)").remove();
  1155. } else if (type == 'only-this') {
  1156. var $navClose = $__default["default"](element);
  1157. var $navItem = $navClose.parent('.nav-item');
  1158. var $navItemParent = $navItem.parent();
  1159. var navItemIndex = $navItem.index();
  1160. var tabId = $navClose.siblings('.nav-link').attr('aria-controls');
  1161. $navItem.remove();
  1162. $__default["default"]("#" + tabId).remove();
  1163. if ($__default["default"](SELECTOR_TAB_CONTENT).children().length == $__default["default"](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).length) {
  1164. $__default["default"](SELECTOR_TAB_EMPTY).show();
  1165. } else {
  1166. var prevNavItemIndex = navItemIndex - 1;
  1167. this.switchTab($navItemParent.children().eq(prevNavItemIndex).find('a.nav-link'));
  1168. }
  1169. } else {
  1170. var _$navItem = $__default["default"](SELECTOR_TAB_NAVBAR_NAV_ITEM + ".active");
  1171. var _$navItemParent = _$navItem.parent();
  1172. var _navItemIndex = _$navItem.index();
  1173. _$navItem.remove();
  1174. $__default["default"](SELECTOR_TAB_PANE + ".active").remove();
  1175. if ($__default["default"](SELECTOR_TAB_CONTENT).children().length == $__default["default"](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).length) {
  1176. $__default["default"](SELECTOR_TAB_EMPTY).show();
  1177. } else {
  1178. var _prevNavItemIndex = _navItemIndex - 1;
  1179. this.switchTab(_$navItemParent.children().eq(_prevNavItemIndex).find('a.nav-link'));
  1180. }
  1181. }
  1182. };
  1183. _proto.toggleFullscreen = function toggleFullscreen() {
  1184. if ($__default["default"]('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
  1185. $__default["default"](SELECTOR_DATA_TOGGLE_FULLSCREEN + " i").removeClass(this._config.iconMinimize).addClass(this._config.iconMaximize);
  1186. $__default["default"]('body').removeClass(CLASS_NAME_FULLSCREEN_MODE);
  1187. $__default["default"](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).height('100%');
  1188. $__default["default"](SELECTOR_CONTENT_WRAPPER).height('100%');
  1189. $__default["default"](SELECTOR_CONTENT_IFRAME).height('100%');
  1190. } else {
  1191. $__default["default"](SELECTOR_DATA_TOGGLE_FULLSCREEN + " i").removeClass(this._config.iconMaximize).addClass(this._config.iconMinimize);
  1192. $__default["default"]('body').addClass(CLASS_NAME_FULLSCREEN_MODE);
  1193. }
  1194. $__default["default"](window).trigger('resize');
  1195. this._fixHeight(true);
  1196. } // Private
  1197. ;
  1198. _proto._init = function _init() {
  1199. var usingDefTab = $__default["default"](SELECTOR_TAB_CONTENT).children().length > 2;
  1200. this._setupListeners();
  1201. this._fixHeight(true);
  1202. if (usingDefTab) {
  1203. var $el = $__default["default"]("" + SELECTOR_TAB_PANE).first(); // eslint-disable-next-line no-console
  1204. console.log($el);
  1205. var uniqueName = $el.attr('id').replace('panel-', '');
  1206. var navId = "#tab-" + uniqueName;
  1207. this.switchTab(navId, true);
  1208. }
  1209. };
  1210. _proto._initFrameElement = function _initFrameElement() {
  1211. if (window.frameElement && this._config.autoIframeMode) {
  1212. var $body = $__default["default"]('body');
  1213. $body.addClass(CLASS_NAME_IFRAME_MODE$1);
  1214. if (this._config.autoDarkMode) {
  1215. $body.addClass('dark-mode');
  1216. }
  1217. }
  1218. };
  1219. _proto._navScroll = function _navScroll(offset) {
  1220. var leftPos = $__default["default"](SELECTOR_TAB_NAVBAR_NAV).scrollLeft();
  1221. $__default["default"](SELECTOR_TAB_NAVBAR_NAV).animate({
  1222. scrollLeft: leftPos + offset
  1223. }, 250, 'linear');
  1224. };
  1225. _proto._setupListeners = function _setupListeners() {
  1226. var _this3 = this;
  1227. $__default["default"](window).on('resize', function () {
  1228. setTimeout(function () {
  1229. _this3._fixHeight();
  1230. }, 1);
  1231. });
  1232. if ($__default["default"](SELECTOR_CONTENT_WRAPPER).hasClass(CLASS_NAME_IFRAME_MODE$1)) {
  1233. $__default["default"](document).on('click', SELECTOR_SIDEBAR_MENU_ITEM + ", " + SELECTOR_SIDEBAR_SEARCH_ITEM, function (e) {
  1234. e.preventDefault();
  1235. _this3.openTabSidebar(e.target);
  1236. });
  1237. if (this._config.useNavbarItems) {
  1238. $__default["default"](document).on('click', SELECTOR_HEADER_MENU_ITEM + ", " + SELECTOR_HEADER_DROPDOWN_ITEM, function (e) {
  1239. e.preventDefault();
  1240. _this3.openTabSidebar(e.target);
  1241. });
  1242. }
  1243. }
  1244. $__default["default"](document).on('click', SELECTOR_TAB_NAVBAR_NAV_LINK, function (e) {
  1245. e.preventDefault();
  1246. _this3.onTabClick(e.target);
  1247. _this3.switchTab(e.target);
  1248. });
  1249. $__default["default"](document).on('click', SELECTOR_TAB_NAVBAR_NAV_LINK, function (e) {
  1250. e.preventDefault();
  1251. _this3.onTabClick(e.target);
  1252. _this3.switchTab(e.target);
  1253. });
  1254. $__default["default"](document).on('click', SELECTOR_DATA_TOGGLE_CLOSE, function (e) {
  1255. e.preventDefault();
  1256. var target = e.target;
  1257. if (target.nodeName == 'I') {
  1258. target = e.target.offsetParent;
  1259. }
  1260. _this3.removeActiveTab(target.attributes['data-type'] ? target.attributes['data-type'].nodeValue : null, target);
  1261. });
  1262. $__default["default"](document).on('click', SELECTOR_DATA_TOGGLE_FULLSCREEN, function (e) {
  1263. e.preventDefault();
  1264. _this3.toggleFullscreen();
  1265. });
  1266. var mousedown = false;
  1267. var mousedownInterval = null;
  1268. $__default["default"](document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_LEFT, function (e) {
  1269. e.preventDefault();
  1270. clearInterval(mousedownInterval);
  1271. var scrollOffset = _this3._config.scrollOffset;
  1272. if (!_this3._config.scrollBehaviorSwap) {
  1273. scrollOffset = -scrollOffset;
  1274. }
  1275. mousedown = true;
  1276. _this3._navScroll(scrollOffset);
  1277. mousedownInterval = setInterval(function () {
  1278. _this3._navScroll(scrollOffset);
  1279. }, 250);
  1280. });
  1281. $__default["default"](document).on('mousedown', SELECTOR_DATA_TOGGLE_SCROLL_RIGHT, function (e) {
  1282. e.preventDefault();
  1283. clearInterval(mousedownInterval);
  1284. var scrollOffset = _this3._config.scrollOffset;
  1285. if (_this3._config.scrollBehaviorSwap) {
  1286. scrollOffset = -scrollOffset;
  1287. }
  1288. mousedown = true;
  1289. _this3._navScroll(scrollOffset);
  1290. mousedownInterval = setInterval(function () {
  1291. _this3._navScroll(scrollOffset);
  1292. }, 250);
  1293. });
  1294. $__default["default"](document).on('mouseup', function () {
  1295. if (mousedown) {
  1296. mousedown = false;
  1297. clearInterval(mousedownInterval);
  1298. mousedownInterval = null;
  1299. }
  1300. });
  1301. };
  1302. _proto._setItemActive = function _setItemActive(href) {
  1303. $__default["default"](SELECTOR_SIDEBAR_MENU_ITEM + ", " + SELECTOR_HEADER_DROPDOWN_ITEM).removeClass('active');
  1304. $__default["default"](SELECTOR_HEADER_MENU_ITEM).parent().removeClass('active');
  1305. var $headerMenuItem = $__default["default"](SELECTOR_HEADER_MENU_ITEM + "[href$=\"" + href + "\"]");
  1306. var $headerDropdownItem = $__default["default"](SELECTOR_HEADER_DROPDOWN_ITEM + "[href$=\"" + href + "\"]");
  1307. var $sidebarMenuItem = $__default["default"](SELECTOR_SIDEBAR_MENU_ITEM + "[href$=\"" + href + "\"]");
  1308. $headerMenuItem.each(function (i, e) {
  1309. $__default["default"](e).parent().addClass('active');
  1310. });
  1311. $headerDropdownItem.each(function (i, e) {
  1312. $__default["default"](e).addClass('active');
  1313. });
  1314. $sidebarMenuItem.each(function (i, e) {
  1315. $__default["default"](e).addClass('active');
  1316. $__default["default"](e).parents('.nav-treeview').prevAll('.nav-link').addClass('active');
  1317. });
  1318. };
  1319. _proto._fixHeight = function _fixHeight(tabEmpty) {
  1320. if (tabEmpty === void 0) {
  1321. tabEmpty = false;
  1322. }
  1323. if ($__default["default"]('body').hasClass(CLASS_NAME_FULLSCREEN_MODE)) {
  1324. var windowHeight = $__default["default"](window).height();
  1325. var navbarHeight = $__default["default"](SELECTOR_TAB_NAV).outerHeight();
  1326. $__default["default"](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING + ", " + SELECTOR_CONTENT_IFRAME).height(windowHeight - navbarHeight);
  1327. $__default["default"](SELECTOR_CONTENT_WRAPPER).height(windowHeight);
  1328. } else {
  1329. var contentWrapperHeight = parseFloat($__default["default"](SELECTOR_CONTENT_WRAPPER).css('height'));
  1330. var _navbarHeight = $__default["default"](SELECTOR_TAB_NAV).outerHeight();
  1331. if (tabEmpty == true) {
  1332. setTimeout(function () {
  1333. $__default["default"](SELECTOR_TAB_EMPTY + ", " + SELECTOR_TAB_LOADING).height(contentWrapperHeight - _navbarHeight);
  1334. }, 50);
  1335. } else {
  1336. $__default["default"](SELECTOR_CONTENT_IFRAME).height(contentWrapperHeight - _navbarHeight);
  1337. }
  1338. }
  1339. } // Static
  1340. ;
  1341. IFrame._jQueryInterface = function _jQueryInterface(config) {
  1342. if ($__default["default"](SELECTOR_DATA_TOGGLE$1).length > 0) {
  1343. var data = $__default["default"](this).data(DATA_KEY$7);
  1344. if (!data) {
  1345. data = $__default["default"](this).data();
  1346. }
  1347. var _options = $__default["default"].extend({}, Default$7, typeof config === 'object' ? config : data);
  1348. localStorage.setItem('AdminLTE:IFrame:Options', JSON.stringify(_options));
  1349. var plugin = new IFrame($__default["default"](this), _options);
  1350. $__default["default"](this).data(DATA_KEY$7, typeof config === 'object' ? config : data);
  1351. if (typeof config === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(config)) {
  1352. plugin[config]();
  1353. }
  1354. } else {
  1355. new IFrame($__default["default"](this), JSON.parse(localStorage.getItem('AdminLTE:IFrame:Options')))._initFrameElement();
  1356. }
  1357. };
  1358. return IFrame;
  1359. }();
  1360. /**
  1361. * Data API
  1362. * ====================================================
  1363. */
  1364. $__default["default"](window).on('load', function () {
  1365. IFrame._jQueryInterface.call($__default["default"](SELECTOR_DATA_TOGGLE$1));
  1366. });
  1367. /**
  1368. * jQuery API
  1369. * ====================================================
  1370. */
  1371. $__default["default"].fn[NAME$7] = IFrame._jQueryInterface;
  1372. $__default["default"].fn[NAME$7].Constructor = IFrame;
  1373. $__default["default"].fn[NAME$7].noConflict = function () {
  1374. $__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
  1375. return IFrame._jQueryInterface;
  1376. };
  1377. /**
  1378. * --------------------------------------------
  1379. * AdminLTE Layout.js
  1380. * License MIT
  1381. * --------------------------------------------
  1382. */
  1383. /**
  1384. * Constants
  1385. * ====================================================
  1386. */
  1387. var NAME$6 = 'Layout';
  1388. var DATA_KEY$6 = 'lte.layout';
  1389. var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6];
  1390. var SELECTOR_HEADER = '.main-header';
  1391. var SELECTOR_MAIN_SIDEBAR = '.main-sidebar';
  1392. var SELECTOR_SIDEBAR$1 = '.main-sidebar .sidebar';
  1393. var SELECTOR_CONTENT = '.content-wrapper';
  1394. var SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content';
  1395. var SELECTOR_CONTROL_SIDEBAR_BTN = '[data-widget="control-sidebar"]';
  1396. var SELECTOR_FOOTER = '.main-footer';
  1397. var SELECTOR_PUSHMENU_BTN = '[data-widget="pushmenu"]';
  1398. var SELECTOR_LOGIN_BOX = '.login-box';
  1399. var SELECTOR_REGISTER_BOX = '.register-box';
  1400. var SELECTOR_PRELOADER = '.preloader';
  1401. var CLASS_NAME_SIDEBAR_COLLAPSED$1 = 'sidebar-collapse';
  1402. var CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused';
  1403. var CLASS_NAME_LAYOUT_FIXED = 'layout-fixed';
  1404. var CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open';
  1405. var CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open';
  1406. var CLASS_NAME_IFRAME_MODE = 'iframe-mode';
  1407. var Default$6 = {
  1408. scrollbarTheme: 'os-theme-light',
  1409. scrollbarAutoHide: 'l',
  1410. panelAutoHeight: true,
  1411. panelAutoHeightMode: 'min-height',
  1412. preloadDuration: 200,
  1413. loginRegisterAutoHeight: true
  1414. };
  1415. /**
  1416. * Class Definition
  1417. * ====================================================
  1418. */
  1419. var Layout = /*#__PURE__*/function () {
  1420. function Layout(element, config) {
  1421. this._config = config;
  1422. this._element = element;
  1423. } // Public
  1424. var _proto = Layout.prototype;
  1425. _proto.fixLayoutHeight = function fixLayoutHeight(extra) {
  1426. if (extra === void 0) {
  1427. extra = null;
  1428. }
  1429. var $body = $__default["default"]('body');
  1430. var controlSidebar = 0;
  1431. if ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) || extra === 'control_sidebar') {
  1432. controlSidebar = $__default["default"](SELECTOR_CONTROL_SIDEBAR_CONTENT).outerHeight();
  1433. }
  1434. var heights = {
  1435. window: $__default["default"](window).height(),
  1436. header: $__default["default"](SELECTOR_HEADER).length > 0 ? $__default["default"](SELECTOR_HEADER).outerHeight() : 0,
  1437. footer: $__default["default"](SELECTOR_FOOTER).length > 0 ? $__default["default"](SELECTOR_FOOTER).outerHeight() : 0,
  1438. sidebar: $__default["default"](SELECTOR_SIDEBAR$1).length > 0 ? $__default["default"](SELECTOR_SIDEBAR$1).height() : 0,
  1439. controlSidebar: controlSidebar
  1440. };
  1441. var max = this._max(heights);
  1442. var offset = this._config.panelAutoHeight;
  1443. if (offset === true) {
  1444. offset = 0;
  1445. }
  1446. var $contentSelector = $__default["default"](SELECTOR_CONTENT);
  1447. if (offset !== false) {
  1448. if (max === heights.controlSidebar) {
  1449. $contentSelector.css(this._config.panelAutoHeightMode, max + offset);
  1450. } else if (max === heights.window) {
  1451. $contentSelector.css(this._config.panelAutoHeightMode, max + offset - heights.header - heights.footer);
  1452. } else {
  1453. $contentSelector.css(this._config.panelAutoHeightMode, max + offset - heights.header);
  1454. }
  1455. if (this._isFooterFixed()) {
  1456. $contentSelector.css(this._config.panelAutoHeightMode, parseFloat($contentSelector.css(this._config.panelAutoHeightMode)) + heights.footer);
  1457. }
  1458. }
  1459. if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) {
  1460. return;
  1461. }
  1462. if (typeof $__default["default"].fn.overlayScrollbars !== 'undefined') {
  1463. $__default["default"](SELECTOR_SIDEBAR$1).overlayScrollbars({
  1464. className: this._config.scrollbarTheme,
  1465. sizeAutoCapable: true,
  1466. scrollbars: {
  1467. autoHide: this._config.scrollbarAutoHide,
  1468. clickScrolling: true
  1469. }
  1470. });
  1471. } else {
  1472. $__default["default"](SELECTOR_SIDEBAR$1).css('overflow-y', 'auto');
  1473. }
  1474. };
  1475. _proto.fixLoginRegisterHeight = function fixLoginRegisterHeight() {
  1476. var $body = $__default["default"]('body');
  1477. var $selector = $__default["default"](SELECTOR_LOGIN_BOX + ", " + SELECTOR_REGISTER_BOX);
  1478. if ($body.hasClass(CLASS_NAME_IFRAME_MODE)) {
  1479. $body.css('height', '100%');
  1480. $__default["default"]('.wrapper').css('height', '100%');
  1481. $__default["default"]('html').css('height', '100%');
  1482. } else if ($selector.length === 0) {
  1483. $body.css('height', 'auto');
  1484. $__default["default"]('html').css('height', 'auto');
  1485. } else {
  1486. var boxHeight = $selector.height();
  1487. if ($body.css(this._config.panelAutoHeightMode) !== boxHeight) {
  1488. $body.css(this._config.panelAutoHeightMode, boxHeight);
  1489. }
  1490. }
  1491. } // Private
  1492. ;
  1493. _proto._init = function _init() {
  1494. var _this = this;
  1495. // Activate layout height watcher
  1496. this.fixLayoutHeight();
  1497. if (this._config.loginRegisterAutoHeight === true) {
  1498. this.fixLoginRegisterHeight();
  1499. } else if (this._config.loginRegisterAutoHeight === parseInt(this._config.loginRegisterAutoHeight, 10)) {
  1500. setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight);
  1501. }
  1502. $__default["default"](SELECTOR_SIDEBAR$1).on('collapsed.lte.treeview expanded.lte.treeview', function () {
  1503. _this.fixLayoutHeight();
  1504. });
  1505. $__default["default"](SELECTOR_MAIN_SIDEBAR).on('mouseenter mouseleave', function () {
  1506. if ($__default["default"]('body').hasClass(CLASS_NAME_SIDEBAR_COLLAPSED$1)) {
  1507. _this.fixLayoutHeight();
  1508. }
  1509. });
  1510. $__default["default"](SELECTOR_PUSHMENU_BTN).on('collapsed.lte.pushmenu shown.lte.pushmenu', function () {
  1511. setTimeout(function () {
  1512. _this.fixLayoutHeight();
  1513. }, 300);
  1514. });
  1515. $__default["default"](SELECTOR_CONTROL_SIDEBAR_BTN).on('collapsed.lte.controlsidebar', function () {
  1516. _this.fixLayoutHeight();
  1517. }).on('expanded.lte.controlsidebar', function () {
  1518. _this.fixLayoutHeight('control_sidebar');
  1519. });
  1520. $__default["default"](window).resize(function () {
  1521. _this.fixLayoutHeight();
  1522. });
  1523. setTimeout(function () {
  1524. $__default["default"]('body.hold-transition').removeClass('hold-transition');
  1525. }, 50);
  1526. setTimeout(function () {
  1527. var $preloader = $__default["default"](SELECTOR_PRELOADER);
  1528. if ($preloader) {
  1529. $preloader.css('height', 0);
  1530. setTimeout(function () {
  1531. $preloader.children().hide();
  1532. }, 200);
  1533. }
  1534. }, this._config.preloadDuration);
  1535. };
  1536. _proto._max = function _max(numbers) {
  1537. // Calculate the maximum number in a list
  1538. var max = 0;
  1539. Object.keys(numbers).forEach(function (key) {
  1540. if (numbers[key] > max) {
  1541. max = numbers[key];
  1542. }
  1543. });
  1544. return max;
  1545. };
  1546. _proto._isFooterFixed = function _isFooterFixed() {
  1547. return $__default["default"](SELECTOR_FOOTER).css('position') === 'fixed';
  1548. } // Static
  1549. ;
  1550. Layout._jQueryInterface = function _jQueryInterface(config) {
  1551. if (config === void 0) {
  1552. config = '';
  1553. }
  1554. return this.each(function () {
  1555. var data = $__default["default"](this).data(DATA_KEY$6);
  1556. var _options = $__default["default"].extend({}, Default$6, $__default["default"](this).data());
  1557. if (!data) {
  1558. data = new Layout($__default["default"](this), _options);
  1559. $__default["default"](this).data(DATA_KEY$6, data);
  1560. }
  1561. if (config === 'init' || config === '') {
  1562. data._init();
  1563. } else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
  1564. data[config]();
  1565. }
  1566. });
  1567. };
  1568. return Layout;
  1569. }();
  1570. /**
  1571. * Data API
  1572. * ====================================================
  1573. */
  1574. $__default["default"](window).on('load', function () {
  1575. Layout._jQueryInterface.call($__default["default"]('body'));
  1576. });
  1577. $__default["default"](SELECTOR_SIDEBAR$1 + " a").on('focusin', function () {
  1578. $__default["default"](SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED);
  1579. }).on('focusout', function () {
  1580. $__default["default"](SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED);
  1581. });
  1582. /**
  1583. * jQuery API
  1584. * ====================================================
  1585. */
  1586. $__default["default"].fn[NAME$6] = Layout._jQueryInterface;
  1587. $__default["default"].fn[NAME$6].Constructor = Layout;
  1588. $__default["default"].fn[NAME$6].noConflict = function () {
  1589. $__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
  1590. return Layout._jQueryInterface;
  1591. };
  1592. /**
  1593. * --------------------------------------------
  1594. * AdminLTE PushMenu.js
  1595. * License MIT
  1596. * --------------------------------------------
  1597. */
  1598. /**
  1599. * Constants
  1600. * ====================================================
  1601. */
  1602. var NAME$5 = 'PushMenu';
  1603. var DATA_KEY$5 = 'lte.pushmenu';
  1604. var EVENT_KEY$2 = "." + DATA_KEY$5;
  1605. var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5];
  1606. var EVENT_COLLAPSED$1 = "collapsed" + EVENT_KEY$2;
  1607. var EVENT_COLLAPSED_DONE = "collapsed-done" + EVENT_KEY$2;
  1608. var EVENT_SHOWN = "shown" + EVENT_KEY$2;
  1609. var SELECTOR_TOGGLE_BUTTON$1 = '[data-widget="pushmenu"]';
  1610. var SELECTOR_BODY = 'body';
  1611. var SELECTOR_OVERLAY = '#sidebar-overlay';
  1612. var SELECTOR_WRAPPER = '.wrapper';
  1613. var CLASS_NAME_COLLAPSED = 'sidebar-collapse';
  1614. var CLASS_NAME_OPEN$3 = 'sidebar-open';
  1615. var CLASS_NAME_IS_OPENING$1 = 'sidebar-is-opening';
  1616. var CLASS_NAME_CLOSED = 'sidebar-closed';
  1617. var Default$5 = {
  1618. autoCollapseSize: 992,
  1619. enableRemember: false,
  1620. noTransitionAfterReload: true,
  1621. animationSpeed: 300
  1622. };
  1623. /**
  1624. * Class Definition
  1625. * ====================================================
  1626. */
  1627. var PushMenu = /*#__PURE__*/function () {
  1628. function PushMenu(element, options) {
  1629. this._element = element;
  1630. this._options = $__default["default"].extend({}, Default$5, options);
  1631. if ($__default["default"](SELECTOR_OVERLAY).length === 0) {
  1632. this._addOverlay();
  1633. }
  1634. this._init();
  1635. } // Public
  1636. var _proto = PushMenu.prototype;
  1637. _proto.expand = function expand() {
  1638. var $bodySelector = $__default["default"](SELECTOR_BODY);
  1639. if (this._options.autoCollapseSize && $__default["default"](window).width() <= this._options.autoCollapseSize) {
  1640. $bodySelector.addClass(CLASS_NAME_OPEN$3);
  1641. }
  1642. $bodySelector.addClass(CLASS_NAME_IS_OPENING$1).removeClass(CLASS_NAME_COLLAPSED + " " + CLASS_NAME_CLOSED).delay(50).queue(function () {
  1643. $bodySelector.removeClass(CLASS_NAME_IS_OPENING$1);
  1644. $__default["default"](this).dequeue();
  1645. });
  1646. if (this._options.enableRemember) {
  1647. localStorage.setItem("remember" + EVENT_KEY$2, CLASS_NAME_OPEN$3);
  1648. }
  1649. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_SHOWN));
  1650. };
  1651. _proto.collapse = function collapse() {
  1652. var _this = this;
  1653. var $bodySelector = $__default["default"](SELECTOR_BODY);
  1654. if (this._options.autoCollapseSize && $__default["default"](window).width() <= this._options.autoCollapseSize) {
  1655. $bodySelector.removeClass(CLASS_NAME_OPEN$3).addClass(CLASS_NAME_CLOSED);
  1656. }
  1657. $bodySelector.addClass(CLASS_NAME_COLLAPSED);
  1658. if (this._options.enableRemember) {
  1659. localStorage.setItem("remember" + EVENT_KEY$2, CLASS_NAME_COLLAPSED);
  1660. }
  1661. $__default["default"](this._element).trigger($__default["default"].Event(EVENT_COLLAPSED$1));
  1662. setTimeout(function () {
  1663. $__default["default"](_this._element).trigger($__default["default"].Event(EVENT_COLLAPSED_DONE));
  1664. }, this._options.animationSpeed);
  1665. };
  1666. _proto.toggle = function toggle() {
  1667. if ($__default["default"](SELECTOR_BODY).hasClass(CLASS_NAME_COLLAPSED)) {
  1668. this.expand();
  1669. } else {
  1670. this.collapse();
  1671. }
  1672. };
  1673. _proto.autoCollapse = function autoCollapse(resize) {
  1674. if (resize === void 0) {
  1675. resize = false;
  1676. }
  1677. if (!this._options.autoCollapseSize) {
  1678. return;
  1679. }
  1680. var $bodySelector = $__default["default"](SELECTOR_BODY);
  1681. if ($__default["default"](window).width() <= this._options.autoCollapseSize) {
  1682. if (!$bodySelector.hasClass(CLASS_NAME_OPEN$3)) {
  1683. this.collapse();
  1684. }
  1685. } else if (resize === true) {
  1686. if ($bodySelector.hasClass(CLASS_NAME_OPEN$3)) {
  1687. $bodySelector.removeClass(CLASS_NAME_OPEN$3);
  1688. } else if ($bodySelector.hasClass(CLASS_NAME_CLOSED)) {
  1689. this.expand();
  1690. }
  1691. }
  1692. };
  1693. _proto.remember = function remember() {
  1694. if (!this._options.enableRemember) {
  1695. return;
  1696. }
  1697. var $body = $__default["default"]('body');
  1698. var toggleState = localStorage.getItem("remember" + EVENT_KEY$2);
  1699. if (toggleState === CLASS_NAME_COLLAPSED) {
  1700. if (this._options.noTransitionAfterReload) {
  1701. $body.addClass('hold-transition').addClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
  1702. $__default["default"](this).removeClass('hold-transition');
  1703. $__default["default"](this).dequeue();
  1704. });
  1705. } else {
  1706. $body.addClass(CLASS_NAME_COLLAPSED);
  1707. }
  1708. } else if (this._options.noTransitionAfterReload) {
  1709. $body.addClass('hold-transition').removeClass(CLASS_NAME_COLLAPSED).delay(50).queue(function () {
  1710. $__default["default"](this).removeClass('hold-transition');
  1711. $__default["default"](this).dequeue();
  1712. });
  1713. } else {
  1714. $body.removeClass(CLASS_NAME_COLLAPSED);
  1715. }
  1716. } // Private
  1717. ;
  1718. _proto._init = function _init() {
  1719. var _this2 = this;
  1720. this.remember();
  1721. this.autoCollapse();
  1722. $__default["default"](window).resize(function () {
  1723. _this2.autoCollapse(true);
  1724. });
  1725. };
  1726. _proto._addOverlay = function _addOverlay() {
  1727. var _this3 = this;
  1728. var overlay = $__default["default"]('<div />', {
  1729. id: 'sidebar-overlay'
  1730. });
  1731. overlay.on('click', function () {
  1732. _this3.collapse();
  1733. });
  1734. $__default["default"](SELECTOR_WRAPPER).append(overlay);
  1735. } // Static
  1736. ;
  1737. PushMenu._jQueryInterface = function _jQueryInterface(operation) {
  1738. return this.each(function () {
  1739. var data = $__default["default"](this).data(DATA_KEY$5);
  1740. var _options = $__default["default"].extend({}, Default$5, $__default["default"](this).data());
  1741. if (!data) {
  1742. data = new PushMenu(this, _options);
  1743. $__default["default"](this).data(DATA_KEY$5, data);
  1744. }
  1745. if (typeof operation === 'string' && /collapse|expand|toggle/.test(operation)) {
  1746. data[operation]();
  1747. }
  1748. });
  1749. };
  1750. return PushMenu;
  1751. }();
  1752. /**
  1753. * Data API
  1754. * ====================================================
  1755. */
  1756. $__default["default"](document).on('click', SELECTOR_TOGGLE_BUTTON$1, function (event) {
  1757. event.preventDefault();
  1758. var button = event.currentTarget;
  1759. if ($__default["default"](button).data('widget') !== 'pushmenu') {
  1760. button = $__default["default"](button).closest(SELECTOR_TOGGLE_BUTTON$1);
  1761. }
  1762. PushMenu._jQueryInterface.call($__default["default"](button), 'toggle');
  1763. });
  1764. $__default["default"](window).on('load', function () {
  1765. PushMenu._jQueryInterface.call($__default["default"](SELECTOR_TOGGLE_BUTTON$1));
  1766. });
  1767. /**
  1768. * jQuery API
  1769. * ====================================================
  1770. */
  1771. $__default["default"].fn[NAME$5] = PushMenu._jQueryInterface;
  1772. $__default["default"].fn[NAME$5].Constructor = PushMenu;
  1773. $__default["default"].fn[NAME$5].noConflict = function () {
  1774. $__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
  1775. return PushMenu._jQueryInterface;
  1776. };
  1777. /**
  1778. * --------------------------------------------
  1779. * AdminLTE SidebarSearch.js
  1780. * License MIT
  1781. * --------------------------------------------
  1782. */
  1783. /**
  1784. * Constants
  1785. * ====================================================
  1786. */
  1787. var NAME$4 = 'SidebarSearch';
  1788. var DATA_KEY$4 = 'lte.sidebar-search';
  1789. var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4];
  1790. var CLASS_NAME_OPEN$2 = 'sidebar-search-open';
  1791. var CLASS_NAME_ICON_SEARCH = 'fa-search';
  1792. var CLASS_NAME_ICON_CLOSE = 'fa-times';
  1793. var CLASS_NAME_HEADER = 'nav-header';
  1794. var CLASS_NAME_SEARCH_RESULTS = 'sidebar-search-results';
  1795. var CLASS_NAME_LIST_GROUP = 'list-group';
  1796. var SELECTOR_DATA_WIDGET$1 = '[data-widget="sidebar-search"]';
  1797. var SELECTOR_SIDEBAR = '.main-sidebar .nav-sidebar';
  1798. var SELECTOR_NAV_LINK = '.nav-link';
  1799. var SELECTOR_NAV_TREEVIEW = '.nav-treeview';
  1800. var SELECTOR_SEARCH_INPUT$1 = SELECTOR_DATA_WIDGET$1 + " .form-control";
  1801. var SELECTOR_SEARCH_BUTTON = SELECTOR_DATA_WIDGET$1 + " .btn";
  1802. var SELECTOR_SEARCH_ICON = SELECTOR_SEARCH_BUTTON + " i";
  1803. var SELECTOR_SEARCH_LIST_GROUP = "." + CLASS_NAME_LIST_GROUP;
  1804. var SELECTOR_SEARCH_RESULTS = "." + CLASS_NAME_SEARCH_RESULTS;
  1805. var SELECTOR_SEARCH_RESULTS_GROUP = SELECTOR_SEARCH_RESULTS + " ." + CLASS_NAME_LIST_GROUP;
  1806. var Default$4 = {
  1807. arrowSign: '->',
  1808. minLength: 3,
  1809. maxResults: 7,
  1810. highlightName: true,
  1811. highlightPath: false,
  1812. highlightClass: 'text-light',
  1813. notFoundText: 'No element found!'
  1814. };
  1815. var SearchItems = [];
  1816. /**
  1817. * Class Definition
  1818. * ====================================================
  1819. */
  1820. var SidebarSearch = /*#__PURE__*/function () {
  1821. function SidebarSearch(_element, _options) {
  1822. this.element = _element;
  1823. this.options = $__default["default"].extend({}, Default$4, _options);
  1824. this.items = [];
  1825. } // Public
  1826. var _proto = SidebarSearch.prototype;
  1827. _proto.init = function init() {
  1828. var _this = this;
  1829. if ($__default["default"](SELECTOR_DATA_WIDGET$1).length === 0) {
  1830. return;
  1831. }
  1832. if ($__default["default"](SELECTOR_DATA_WIDGET$1).next(SELECTOR_SEARCH_RESULTS).length === 0) {
  1833. $__default["default"](SELECTOR_DATA_WIDGET$1).after($__default["default"]('<div />', {
  1834. class: CLASS_NAME_SEARCH_RESULTS
  1835. }));
  1836. }
  1837. if ($__default["default"](SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length === 0) {
  1838. $__default["default"](SELECTOR_SEARCH_RESULTS).append($__default["default"]('<div />', {
  1839. class: CLASS_NAME_LIST_GROUP
  1840. }));
  1841. }
  1842. this._addNotFound();
  1843. $__default["default"](SELECTOR_SIDEBAR).children().each(function (i, child) {
  1844. _this._parseItem(child);
  1845. });
  1846. };
  1847. _proto.search = function search() {
  1848. var _this2 = this;
  1849. var searchValue = $__default["default"](SELECTOR_SEARCH_INPUT$1).val().toLowerCase();
  1850. if (searchValue.length < this.options.minLength) {
  1851. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).empty();
  1852. this._addNotFound();
  1853. this.close();
  1854. return;
  1855. }
  1856. var searchResults = SearchItems.filter(function (item) {
  1857. return item.name.toLowerCase().includes(searchValue);
  1858. });
  1859. var endResults = $__default["default"](searchResults.slice(0, this.options.maxResults));
  1860. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).empty();
  1861. if (endResults.length === 0) {
  1862. this._addNotFound();
  1863. } else {
  1864. endResults.each(function (i, result) {
  1865. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).append(_this2._renderItem(escape(result.name), encodeURI(result.link), result.path));
  1866. });
  1867. }
  1868. this.open();
  1869. };
  1870. _proto.open = function open() {
  1871. $__default["default"](SELECTOR_DATA_WIDGET$1).parent().addClass(CLASS_NAME_OPEN$2);
  1872. $__default["default"](SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_SEARCH).addClass(CLASS_NAME_ICON_CLOSE);
  1873. };
  1874. _proto.close = function close() {
  1875. $__default["default"](SELECTOR_DATA_WIDGET$1).parent().removeClass(CLASS_NAME_OPEN$2);
  1876. $__default["default"](SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_CLOSE).addClass(CLASS_NAME_ICON_SEARCH);
  1877. };
  1878. _proto.toggle = function toggle() {
  1879. if ($__default["default"](SELECTOR_DATA_WIDGET$1).parent().hasClass(CLASS_NAME_OPEN$2)) {
  1880. this.close();
  1881. } else {
  1882. this.open();
  1883. }
  1884. } // Private
  1885. ;
  1886. _proto._parseItem = function _parseItem(item, path) {
  1887. var _this3 = this;
  1888. if (path === void 0) {
  1889. path = [];
  1890. }
  1891. if ($__default["default"](item).hasClass(CLASS_NAME_HEADER)) {
  1892. return;
  1893. }
  1894. var itemObject = {};
  1895. var navLink = $__default["default"](item).clone().find("> " + SELECTOR_NAV_LINK);
  1896. var navTreeview = $__default["default"](item).clone().find("> " + SELECTOR_NAV_TREEVIEW);
  1897. var link = navLink.attr('href');
  1898. var name = navLink.find('p').children().remove().end().text();
  1899. itemObject.name = this._trimText(name);
  1900. itemObject.link = link;
  1901. itemObject.path = path;
  1902. if (navTreeview.length === 0) {
  1903. SearchItems.push(itemObject);
  1904. } else {
  1905. var newPath = itemObject.path.concat([itemObject.name]);
  1906. navTreeview.children().each(function (i, child) {
  1907. _this3._parseItem(child, newPath);
  1908. });
  1909. }
  1910. };
  1911. _proto._trimText = function _trimText(text) {
  1912. return $.trim(text.replace(/(\r\n|\n|\r)/gm, ' '));
  1913. };
  1914. _proto._renderItem = function _renderItem(name, link, path) {
  1915. var _this4 = this;
  1916. path = path.join(" " + this.options.arrowSign + " ");
  1917. name = unescape(name);
  1918. link = decodeURI(link);
  1919. if (this.options.highlightName || this.options.highlightPath) {
  1920. var searchValue = $__default["default"](SELECTOR_SEARCH_INPUT$1).val().toLowerCase();
  1921. var regExp = new RegExp(searchValue, 'gi');
  1922. if (this.options.highlightName) {
  1923. name = name.replace(regExp, function (str) {
  1924. return "<strong class=\"" + _this4.options.highlightClass + "\">" + str + "</strong>";
  1925. });
  1926. }
  1927. if (this.options.highlightPath) {
  1928. path = path.replace(regExp, function (str) {
  1929. return "<strong class=\"" + _this4.options.highlightClass + "\">" + str + "</strong>";
  1930. });
  1931. }
  1932. }
  1933. var groupItemElement = $__default["default"]('<a/>', {
  1934. href: decodeURIComponent(link),
  1935. class: 'list-group-item'
  1936. });
  1937. var searchTitleElement = $__default["default"]('<div/>', {
  1938. class: 'search-title'
  1939. }).html(name);
  1940. var searchPathElement = $__default["default"]('<div/>', {
  1941. class: 'search-path'
  1942. }).html(path);
  1943. groupItemElement.append(searchTitleElement).append(searchPathElement);
  1944. return groupItemElement;
  1945. };
  1946. _proto._addNotFound = function _addNotFound() {
  1947. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(this.options.notFoundText, '#', []));
  1948. } // Static
  1949. ;
  1950. SidebarSearch._jQueryInterface = function _jQueryInterface(config) {
  1951. var data = $__default["default"](this).data(DATA_KEY$4);
  1952. if (!data) {
  1953. data = $__default["default"](this).data();
  1954. }
  1955. var _options = $__default["default"].extend({}, Default$4, typeof config === 'object' ? config : data);
  1956. var plugin = new SidebarSearch($__default["default"](this), _options);
  1957. $__default["default"](this).data(DATA_KEY$4, typeof config === 'object' ? config : data);
  1958. if (typeof config === 'string' && /init|toggle|close|open|search/.test(config)) {
  1959. plugin[config]();
  1960. } else {
  1961. plugin.init();
  1962. }
  1963. };
  1964. return SidebarSearch;
  1965. }();
  1966. /**
  1967. * Data API
  1968. * ====================================================
  1969. */
  1970. $__default["default"](document).on('click', SELECTOR_SEARCH_BUTTON, function (event) {
  1971. event.preventDefault();
  1972. SidebarSearch._jQueryInterface.call($__default["default"](SELECTOR_DATA_WIDGET$1), 'toggle');
  1973. });
  1974. $__default["default"](document).on('keyup', SELECTOR_SEARCH_INPUT$1, function (event) {
  1975. if (event.keyCode == 38) {
  1976. event.preventDefault();
  1977. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).children().last().focus();
  1978. return;
  1979. }
  1980. if (event.keyCode == 40) {
  1981. event.preventDefault();
  1982. $__default["default"](SELECTOR_SEARCH_RESULTS_GROUP).children().first().focus();
  1983. return;
  1984. }
  1985. setTimeout(function () {
  1986. SidebarSearch._jQueryInterface.call($__default["default"](SELECTOR_DATA_WIDGET$1), 'search');
  1987. }, 100);
  1988. });
  1989. $__default["default"](document).on('keydown', SELECTOR_SEARCH_RESULTS_GROUP, function (event) {
  1990. var $focused = $__default["default"](':focus');
  1991. if (event.keyCode == 38) {
  1992. event.preventDefault();
  1993. if ($focused.is(':first-child')) {
  1994. $focused.siblings().last().focus();
  1995. } else {
  1996. $focused.prev().focus();
  1997. }
  1998. }
  1999. if (event.keyCode == 40) {
  2000. event.preventDefault();
  2001. if ($focused.is(':last-child')) {
  2002. $focused.siblings().first().focus();
  2003. } else {
  2004. $focused.next().focus();
  2005. }
  2006. }
  2007. });
  2008. $__default["default"](window).on('load', function () {
  2009. SidebarSearch._jQueryInterface.call($__default["default"](SELECTOR_DATA_WIDGET$1), 'init');
  2010. });
  2011. /**
  2012. * jQuery API
  2013. * ====================================================
  2014. */
  2015. $__default["default"].fn[NAME$4] = SidebarSearch._jQueryInterface;
  2016. $__default["default"].fn[NAME$4].Constructor = SidebarSearch;
  2017. $__default["default"].fn[NAME$4].noConflict = function () {
  2018. $__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
  2019. return SidebarSearch._jQueryInterface;
  2020. };
  2021. /**
  2022. * --------------------------------------------
  2023. * AdminLTE NavbarSearch.js
  2024. * License MIT
  2025. * --------------------------------------------
  2026. */
  2027. /**
  2028. * Constants
  2029. * ====================================================
  2030. */
  2031. var NAME$3 = 'NavbarSearch';
  2032. var DATA_KEY$3 = 'lte.navbar-search';
  2033. var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3];
  2034. var SELECTOR_TOGGLE_BUTTON = '[data-widget="navbar-search"]';
  2035. var SELECTOR_SEARCH_BLOCK = '.navbar-search-block';
  2036. var SELECTOR_SEARCH_INPUT = '.form-control';
  2037. var CLASS_NAME_OPEN$1 = 'navbar-search-open';
  2038. var Default$3 = {
  2039. resetOnClose: true,
  2040. target: SELECTOR_SEARCH_BLOCK
  2041. };
  2042. /**
  2043. * Class Definition
  2044. * ====================================================
  2045. */
  2046. var NavbarSearch = /*#__PURE__*/function () {
  2047. function NavbarSearch(_element, _options) {
  2048. this._element = _element;
  2049. this._config = $__default["default"].extend({}, Default$3, _options);
  2050. } // Public
  2051. var _proto = NavbarSearch.prototype;
  2052. _proto.open = function open() {
  2053. $__default["default"](this._config.target).css('display', 'flex').hide().fadeIn().addClass(CLASS_NAME_OPEN$1);
  2054. $__default["default"](this._config.target + " " + SELECTOR_SEARCH_INPUT).focus();
  2055. };
  2056. _proto.close = function close() {
  2057. $__default["default"](this._config.target).fadeOut().removeClass(CLASS_NAME_OPEN$1);
  2058. if (this._config.resetOnClose) {
  2059. $__default["default"](this._config.target + " " + SELECTOR_SEARCH_INPUT).val('');
  2060. }
  2061. };
  2062. _proto.toggle = function toggle() {
  2063. if ($__default["default"](this._config.target).hasClass(CLASS_NAME_OPEN$1)) {
  2064. this.close();
  2065. } else {
  2066. this.open();
  2067. }
  2068. } // Static
  2069. ;
  2070. NavbarSearch._jQueryInterface = function _jQueryInterface(options) {
  2071. return this.each(function () {
  2072. var data = $__default["default"](this).data(DATA_KEY$3);
  2073. var _options = $__default["default"].extend({}, Default$3, $__default["default"](this).data());
  2074. if (!data) {
  2075. data = new NavbarSearch(this, _options);
  2076. $__default["default"](this).data(DATA_KEY$3, data);
  2077. }
  2078. if (!/toggle|close|open/.test(options)) {
  2079. throw new Error("Undefined method " + options);
  2080. }
  2081. data[options]();
  2082. });
  2083. };
  2084. return NavbarSearch;
  2085. }();
  2086. /**
  2087. * Data API
  2088. * ====================================================
  2089. */
  2090. $__default["default"](document).on('click', SELECTOR_TOGGLE_BUTTON, function (event) {
  2091. event.preventDefault();
  2092. var button = $__default["default"](event.currentTarget);
  2093. if (button.data('widget') !== 'navbar-search') {
  2094. button = button.closest(SELECTOR_TOGGLE_BUTTON);
  2095. }
  2096. NavbarSearch._jQueryInterface.call(button, 'toggle');
  2097. });
  2098. /**
  2099. * jQuery API
  2100. * ====================================================
  2101. */
  2102. $__default["default"].fn[NAME$3] = NavbarSearch._jQueryInterface;
  2103. $__default["default"].fn[NAME$3].Constructor = NavbarSearch;
  2104. $__default["default"].fn[NAME$3].noConflict = function () {
  2105. $__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
  2106. return NavbarSearch._jQueryInterface;
  2107. };
  2108. /**
  2109. * --------------------------------------------
  2110. * AdminLTE Toasts.js
  2111. * License MIT
  2112. * --------------------------------------------
  2113. */
  2114. /**
  2115. * Constants
  2116. * ====================================================
  2117. */
  2118. var NAME$2 = 'Toasts';
  2119. var DATA_KEY$2 = 'lte.toasts';
  2120. var EVENT_KEY$1 = "." + DATA_KEY$2;
  2121. var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2];
  2122. var EVENT_INIT = "init" + EVENT_KEY$1;
  2123. var EVENT_CREATED = "created" + EVENT_KEY$1;
  2124. var EVENT_REMOVED = "removed" + EVENT_KEY$1;
  2125. var SELECTOR_CONTAINER_TOP_RIGHT = '#toastsContainerTopRight';
  2126. var SELECTOR_CONTAINER_TOP_LEFT = '#toastsContainerTopLeft';
  2127. var SELECTOR_CONTAINER_BOTTOM_RIGHT = '#toastsContainerBottomRight';
  2128. var SELECTOR_CONTAINER_BOTTOM_LEFT = '#toastsContainerBottomLeft';
  2129. var CLASS_NAME_TOP_RIGHT = 'toasts-top-right';
  2130. var CLASS_NAME_TOP_LEFT = 'toasts-top-left';
  2131. var CLASS_NAME_BOTTOM_RIGHT = 'toasts-bottom-right';
  2132. var CLASS_NAME_BOTTOM_LEFT = 'toasts-bottom-left';
  2133. var POSITION_TOP_RIGHT = 'topRight';
  2134. var POSITION_TOP_LEFT = 'topLeft';
  2135. var POSITION_BOTTOM_RIGHT = 'bottomRight';
  2136. var POSITION_BOTTOM_LEFT = 'bottomLeft';
  2137. var Default$2 = {
  2138. position: POSITION_TOP_RIGHT,
  2139. fixed: true,
  2140. autohide: false,
  2141. autoremove: true,
  2142. delay: 1000,
  2143. fade: true,
  2144. icon: null,
  2145. image: null,
  2146. imageAlt: null,
  2147. imageHeight: '25px',
  2148. title: null,
  2149. subtitle: null,
  2150. close: true,
  2151. body: null,
  2152. class: null
  2153. };
  2154. /**
  2155. * Class Definition
  2156. * ====================================================
  2157. */
  2158. var Toasts = /*#__PURE__*/function () {
  2159. function Toasts(element, config) {
  2160. this._config = config;
  2161. this._prepareContainer();
  2162. $__default["default"]('body').trigger($__default["default"].Event(EVENT_INIT));
  2163. } // Public
  2164. var _proto = Toasts.prototype;
  2165. _proto.create = function create() {
  2166. var toast = $__default["default"]('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>');
  2167. toast.data('autohide', this._config.autohide);
  2168. toast.data('animation', this._config.fade);
  2169. if (this._config.class) {
  2170. toast.addClass(this._config.class);
  2171. }
  2172. if (this._config.delay && this._config.delay != 500) {
  2173. toast.data('delay', this._config.delay);
  2174. }
  2175. var toastHeader = $__default["default"]('<div class="toast-header">');
  2176. if (this._config.image != null) {
  2177. var toastImage = $__default["default"]('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt);
  2178. if (this._config.imageHeight != null) {
  2179. toastImage.height(this._config.imageHeight).width('auto');
  2180. }
  2181. toastHeader.append(toastImage);
  2182. }
  2183. if (this._config.icon != null) {
  2184. toastHeader.append($__default["default"]('<i />').addClass('mr-2').addClass(this._config.icon));
  2185. }
  2186. if (this._config.title != null) {
  2187. toastHeader.append($__default["default"]('<strong />').addClass('mr-auto').html(this._config.title));
  2188. }
  2189. if (this._config.subtitle != null) {
  2190. toastHeader.append($__default["default"]('<small />').html(this._config.subtitle));
  2191. }
  2192. if (this._config.close == true) {
  2193. var toastClose = $__default["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>');
  2194. if (this._config.title == null) {
  2195. toastClose.toggleClass('ml-2 ml-auto');
  2196. }
  2197. toastHeader.append(toastClose);
  2198. }
  2199. toast.append(toastHeader);
  2200. if (this._config.body != null) {
  2201. toast.append($__default["default"]('<div class="toast-body" />').html(this._config.body));
  2202. }
  2203. $__default["default"](this._getContainerId()).prepend(toast);
  2204. var $body = $__default["default"]('body');
  2205. $body.trigger($__default["default"].Event(EVENT_CREATED));
  2206. toast.toast('show');
  2207. if (this._config.autoremove) {
  2208. toast.on('hidden.bs.toast', function () {
  2209. $__default["default"](this).delay(200).remove();
  2210. $body.trigger($__default["default"].Event(EVENT_REMOVED));
  2211. });
  2212. }
  2213. } // Static
  2214. ;
  2215. _proto._getContainerId = function _getContainerId() {
  2216. if (this._config.position == POSITION_TOP_RIGHT) {
  2217. return SELECTOR_CONTAINER_TOP_RIGHT;
  2218. }
  2219. if (this._config.position == POSITION_TOP_LEFT) {
  2220. return SELECTOR_CONTAINER_TOP_LEFT;
  2221. }
  2222. if (this._config.position == POSITION_BOTTOM_RIGHT) {
  2223. return SELECTOR_CONTAINER_BOTTOM_RIGHT;
  2224. }
  2225. if (this._config.position == POSITION_BOTTOM_LEFT) {
  2226. return SELECTOR_CONTAINER_BOTTOM_LEFT;
  2227. }
  2228. };
  2229. _proto._prepareContainer = function _prepareContainer() {
  2230. if ($__default["default"](this._getContainerId()).length === 0) {
  2231. var container = $__default["default"]('<div />').attr('id', this._getContainerId().replace('#', ''));
  2232. if (this._config.position == POSITION_TOP_RIGHT) {
  2233. container.addClass(CLASS_NAME_TOP_RIGHT);
  2234. } else if (this._config.position == POSITION_TOP_LEFT) {
  2235. container.addClass(CLASS_NAME_TOP_LEFT);
  2236. } else if (this._config.position == POSITION_BOTTOM_RIGHT) {
  2237. container.addClass(CLASS_NAME_BOTTOM_RIGHT);
  2238. } else if (this._config.position == POSITION_BOTTOM_LEFT) {
  2239. container.addClass(CLASS_NAME_BOTTOM_LEFT);
  2240. }
  2241. $__default["default"]('body').append(container);
  2242. }
  2243. if (this._config.fixed) {
  2244. $__default["default"](this._getContainerId()).addClass('fixed');
  2245. } else {
  2246. $__default["default"](this._getContainerId()).removeClass('fixed');
  2247. }
  2248. } // Static
  2249. ;
  2250. Toasts._jQueryInterface = function _jQueryInterface(option, config) {
  2251. return this.each(function () {
  2252. var _options = $__default["default"].extend({}, Default$2, config);
  2253. var toast = new Toasts($__default["default"](this), _options);
  2254. if (option === 'create') {
  2255. toast[option]();
  2256. }
  2257. });
  2258. };
  2259. return Toasts;
  2260. }();
  2261. /**
  2262. * jQuery API
  2263. * ====================================================
  2264. */
  2265. $__default["default"].fn[NAME$2] = Toasts._jQueryInterface;
  2266. $__default["default"].fn[NAME$2].Constructor = Toasts;
  2267. $__default["default"].fn[NAME$2].noConflict = function () {
  2268. $__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
  2269. return Toasts._jQueryInterface;
  2270. };
  2271. /**
  2272. * --------------------------------------------
  2273. * AdminLTE TodoList.js
  2274. * License MIT
  2275. * --------------------------------------------
  2276. */
  2277. /**
  2278. * Constants
  2279. * ====================================================
  2280. */
  2281. var NAME$1 = 'TodoList';
  2282. var DATA_KEY$1 = 'lte.todolist';
  2283. var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1];
  2284. var SELECTOR_DATA_TOGGLE = '[data-widget="todo-list"]';
  2285. var CLASS_NAME_TODO_LIST_DONE = 'done';
  2286. var Default$1 = {
  2287. onCheck: function onCheck(item) {
  2288. return item;
  2289. },
  2290. onUnCheck: function onUnCheck(item) {
  2291. return item;
  2292. }
  2293. };
  2294. /**
  2295. * Class Definition
  2296. * ====================================================
  2297. */
  2298. var TodoList = /*#__PURE__*/function () {
  2299. function TodoList(element, config) {
  2300. this._config = config;
  2301. this._element = element;
  2302. this._init();
  2303. } // Public
  2304. var _proto = TodoList.prototype;
  2305. _proto.toggle = function toggle(item) {
  2306. item.parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE);
  2307. if (!$__default["default"](item).prop('checked')) {
  2308. this.unCheck($__default["default"](item));
  2309. return;
  2310. }
  2311. this.check(item);
  2312. };
  2313. _proto.check = function check(item) {
  2314. this._config.onCheck.call(item);
  2315. };
  2316. _proto.unCheck = function unCheck(item) {
  2317. this._config.onUnCheck.call(item);
  2318. } // Private
  2319. ;
  2320. _proto._init = function _init() {
  2321. var _this = this;
  2322. var $toggleSelector = this._element;
  2323. $toggleSelector.find('input:checkbox:checked').parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE);
  2324. $toggleSelector.on('change', 'input:checkbox', function (event) {
  2325. _this.toggle($__default["default"](event.target));
  2326. });
  2327. } // Static
  2328. ;
  2329. TodoList._jQueryInterface = function _jQueryInterface(config) {
  2330. return this.each(function () {
  2331. var data = $__default["default"](this).data(DATA_KEY$1);
  2332. if (!data) {
  2333. data = $__default["default"](this).data();
  2334. }
  2335. var _options = $__default["default"].extend({}, Default$1, typeof config === 'object' ? config : data);
  2336. var plugin = new TodoList($__default["default"](this), _options);
  2337. $__default["default"](this).data(DATA_KEY$1, typeof config === 'object' ? config : data);
  2338. if (config === 'init') {
  2339. plugin[config]();
  2340. }
  2341. });
  2342. };
  2343. return TodoList;
  2344. }();
  2345. /**
  2346. * Data API
  2347. * ====================================================
  2348. */
  2349. $__default["default"](window).on('load', function () {
  2350. TodoList._jQueryInterface.call($__default["default"](SELECTOR_DATA_TOGGLE));
  2351. });
  2352. /**
  2353. * jQuery API
  2354. * ====================================================
  2355. */
  2356. $__default["default"].fn[NAME$1] = TodoList._jQueryInterface;
  2357. $__default["default"].fn[NAME$1].Constructor = TodoList;
  2358. $__default["default"].fn[NAME$1].noConflict = function () {
  2359. $__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
  2360. return TodoList._jQueryInterface;
  2361. };
  2362. /**
  2363. * --------------------------------------------
  2364. * AdminLTE Treeview.js
  2365. * License MIT
  2366. * --------------------------------------------
  2367. */
  2368. /**
  2369. * Constants
  2370. * ====================================================
  2371. */
  2372. var NAME = 'Treeview';
  2373. var DATA_KEY = 'lte.treeview';
  2374. var EVENT_KEY = "." + DATA_KEY;
  2375. var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
  2376. var EVENT_EXPANDED = "expanded" + EVENT_KEY;
  2377. var EVENT_COLLAPSED = "collapsed" + EVENT_KEY;
  2378. var EVENT_LOAD_DATA_API = "load" + EVENT_KEY;
  2379. var SELECTOR_LI = '.nav-item';
  2380. var SELECTOR_LINK = '.nav-link';
  2381. var SELECTOR_TREEVIEW_MENU = '.nav-treeview';
  2382. var SELECTOR_OPEN = '.menu-open';
  2383. var SELECTOR_DATA_WIDGET = '[data-widget="treeview"]';
  2384. var CLASS_NAME_OPEN = 'menu-open';
  2385. var CLASS_NAME_IS_OPENING = 'menu-is-opening';
  2386. var CLASS_NAME_SIDEBAR_COLLAPSED = 'sidebar-collapse';
  2387. var Default = {
  2388. trigger: SELECTOR_DATA_WIDGET + " " + SELECTOR_LINK,
  2389. animationSpeed: 300,
  2390. accordion: true,
  2391. expandSidebar: false,
  2392. sidebarButtonSelector: '[data-widget="pushmenu"]'
  2393. };
  2394. /**
  2395. * Class Definition
  2396. * ====================================================
  2397. */
  2398. var Treeview = /*#__PURE__*/function () {
  2399. function Treeview(element, config) {
  2400. this._config = config;
  2401. this._element = element;
  2402. } // Public
  2403. var _proto = Treeview.prototype;
  2404. _proto.init = function init() {
  2405. $__default["default"]("" + SELECTOR_LI + SELECTOR_OPEN + " " + SELECTOR_TREEVIEW_MENU + SELECTOR_OPEN).css('display', 'block');
  2406. this._setupListeners();
  2407. };
  2408. _proto.expand = function expand(treeviewMenu, parentLi) {
  2409. var _this = this;
  2410. var expandedEvent = $__default["default"].Event(EVENT_EXPANDED);
  2411. if (this._config.accordion) {
  2412. var openMenuLi = parentLi.siblings(SELECTOR_OPEN).first();
  2413. var openTreeview = openMenuLi.find(SELECTOR_TREEVIEW_MENU).first();
  2414. this.collapse(openTreeview, openMenuLi);
  2415. }
  2416. parentLi.addClass(CLASS_NAME_IS_OPENING);
  2417. treeviewMenu.stop().slideDown(this._config.animationSpeed, function () {
  2418. parentLi.addClass(CLASS_NAME_OPEN);
  2419. $__default["default"](_this._element).trigger(expandedEvent);
  2420. });
  2421. if (this._config.expandSidebar) {
  2422. this._expandSidebar();
  2423. }
  2424. };
  2425. _proto.collapse = function collapse(treeviewMenu, parentLi) {
  2426. var _this2 = this;
  2427. var collapsedEvent = $__default["default"].Event(EVENT_COLLAPSED);
  2428. parentLi.removeClass(CLASS_NAME_IS_OPENING + " " + CLASS_NAME_OPEN);
  2429. treeviewMenu.stop().slideUp(this._config.animationSpeed, function () {
  2430. $__default["default"](_this2._element).trigger(collapsedEvent);
  2431. treeviewMenu.find(SELECTOR_OPEN + " > " + SELECTOR_TREEVIEW_MENU).slideUp();
  2432. treeviewMenu.find(SELECTOR_OPEN).removeClass(CLASS_NAME_IS_OPENING + " " + CLASS_NAME_OPEN);
  2433. });
  2434. };
  2435. _proto.toggle = function toggle(event) {
  2436. var $relativeTarget = $__default["default"](event.currentTarget);
  2437. var $parent = $relativeTarget.parent();
  2438. var treeviewMenu = $parent.find("> " + SELECTOR_TREEVIEW_MENU);
  2439. if (!treeviewMenu.is(SELECTOR_TREEVIEW_MENU)) {
  2440. if (!$parent.is(SELECTOR_LI)) {
  2441. treeviewMenu = $parent.parent().find("> " + SELECTOR_TREEVIEW_MENU);
  2442. }
  2443. if (!treeviewMenu.is(SELECTOR_TREEVIEW_MENU)) {
  2444. return;
  2445. }
  2446. }
  2447. event.preventDefault();
  2448. var parentLi = $relativeTarget.parents(SELECTOR_LI).first();
  2449. var isOpen = parentLi.hasClass(CLASS_NAME_OPEN);
  2450. if (isOpen) {
  2451. this.collapse($__default["default"](treeviewMenu), parentLi);
  2452. } else {
  2453. this.expand($__default["default"](treeviewMenu), parentLi);
  2454. }
  2455. } // Private
  2456. ;
  2457. _proto._setupListeners = function _setupListeners() {
  2458. var _this3 = this;
  2459. var elementId = this._element.attr('id') !== undefined ? "#" + this._element.attr('id') : '';
  2460. $__default["default"](document).on('click', "" + elementId + this._config.trigger, function (event) {
  2461. _this3.toggle(event);
  2462. });
  2463. };
  2464. _proto._expandSidebar = function _expandSidebar() {
  2465. if ($__default["default"]('body').hasClass(CLASS_NAME_SIDEBAR_COLLAPSED)) {
  2466. $__default["default"](this._config.sidebarButtonSelector).PushMenu('expand');
  2467. }
  2468. } // Static
  2469. ;
  2470. Treeview._jQueryInterface = function _jQueryInterface(config) {
  2471. return this.each(function () {
  2472. var data = $__default["default"](this).data(DATA_KEY);
  2473. var _options = $__default["default"].extend({}, Default, $__default["default"](this).data());
  2474. if (!data) {
  2475. data = new Treeview($__default["default"](this), _options);
  2476. $__default["default"](this).data(DATA_KEY, data);
  2477. }
  2478. if (config === 'init') {
  2479. data[config]();
  2480. }
  2481. });
  2482. };
  2483. return Treeview;
  2484. }();
  2485. /**
  2486. * Data API
  2487. * ====================================================
  2488. */
  2489. $__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
  2490. $__default["default"](SELECTOR_DATA_WIDGET).each(function () {
  2491. Treeview._jQueryInterface.call($__default["default"](this), 'init');
  2492. });
  2493. });
  2494. /**
  2495. * jQuery API
  2496. * ====================================================
  2497. */
  2498. $__default["default"].fn[NAME] = Treeview._jQueryInterface;
  2499. $__default["default"].fn[NAME].Constructor = Treeview;
  2500. $__default["default"].fn[NAME].noConflict = function () {
  2501. $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
  2502. return Treeview._jQueryInterface;
  2503. };
  2504. exports.CardRefresh = CardRefresh;
  2505. exports.CardWidget = CardWidget;
  2506. exports.ControlSidebar = ControlSidebar;
  2507. exports.DirectChat = DirectChat;
  2508. exports.Dropdown = Dropdown;
  2509. exports.ExpandableTable = ExpandableTable;
  2510. exports.Fullscreen = Fullscreen;
  2511. exports.IFrame = IFrame;
  2512. exports.Layout = Layout;
  2513. exports.NavbarSearch = NavbarSearch;
  2514. exports.PushMenu = PushMenu;
  2515. exports.SidebarSearch = SidebarSearch;
  2516. exports.Toasts = Toasts;
  2517. exports.TodoList = TodoList;
  2518. exports.Treeview = Treeview;
  2519. Object.defineProperty(exports, '__esModule', { value: true });
  2520. }));
  2521. //# sourceMappingURL=adminlte.js.map