/*! * Ace Admin Template v4.0.0 * Copyright 2013-2021 * You need a commercial license to use this product * https://bit.ly/35ciMLb */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("bootstrap")):"function"==typeof define&&define.amd?define(["jquery","bootstrap"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).AceApp=t(e.jQuery,e.bootstrap)}(this,function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=n(e),i=n(t);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t.split(/\s/));try{for(o.s();!(i=o.n()).done;){var a=i.value;0!==(a=a.trim()).length&&(n?e.classList.add(a):e.classList.remove(a))}}catch(e){o.e(e)}finally{o.f()}}}else document.querySelectorAll(e).forEach(function(e){s.updateClass(e,t,n)})}},{key:"addClass",value:function(e,t){s.updateClass(e,t,!0)}},{key:"removeClass",value:function(e,t){s.updateClass(e,t,!1)}},{key:"next",value:function(e){var t=1').parent().collapse("hide").one("hidden.bs.collapse.alert-collapse",function(){t(this).remove()})})}},{key:"_handleDropdowns",value:function(){function t(){var e=w.closest(this,".dropdown-menu"),t=e.parentNode,n=t.querySelector("[data-toggle=dropdown]");i(n).dropdown("hide"),e.classList.remove("show"),t.classList.remove("show")}var i=window.jQuery;i(document).on("click","[data-dismiss=dropdown]",function(e){e.preventDefault(),t.call(e.target)}),i(document).on("submit",".dropdown-menu form[data-submit=dismiss]",function(e){e.preventDefault(),t.call(e.target)}),i(document).on("click.dropdown-clickable",".dropdown-clickable",function(e){e.stopImmediatePropagation()}),i(document).on("shown.bs.dropdown",".dropdown.dd-backdrop",function(){"none"!==window.getComputedStyle(this,":before").display&&(0===w.getScrollbarInfo().width&&document.body.classList.add("mob-dropdown-body"),this.classList.add("backdrop-shown"),i(this).one("hidden.bs.dropdown",function(){document.body.classList.remove("mob-dropdown-body"),this.classList.remove("backdrop-shown")}))})}},{key:"_handleNavbar",value:function(){var n=window.jQuery;n(document).on("click",".navbar-backdrop.collapse.show",function(e){e.target===this&&n(this).collapse("hide")}),n(document).on("submit",".navbar-collapse.show form[data-submit=dismiss]",function(e){e.preventDefault(),n(this).closest(".navbar-collapse").collapse("hide")});var i=null;n(document).on("shown.bs.dropdown",".navbar .dropdown",function(){var e=this.querySelector(".autofocus");e&&e.focus()}).on("show.bs.collapse",".navbar-collapse",function(e){var t;e.isDefaultPrevented()||(this.classList.contains("navbar-backdrop")&&0===w.getScrollbarInfo().width&&document.body.classList.add("mob-navbar-body"),t=i,i=e.target,null!==t&&n(".navbar-collapse.show").css("transition-duration","1ms").collapse("hide").css("transition-duration",""))}).on("shown.bs.collapse",".navbar-collapse",function(){var e=this.querySelector(".autofocus");e&&e.focus()}).on("hidden.bs.collapse",function(e){i===e.target&&(document.body.classList.remove("mob-navbar-body"),i=null)});function t(){var e=w.isRTL(),t=this.classList.contains("dropdown-menu-right"),n="margin-"+(t?e?"left":"right":e?"right":"left");this.style.removeProperty(n);var i=0,o=this.getBoundingClientRect();o.left<0?i=parseInt(-1*o.left)+5:(e=document.body.scrollWidth,o.right>e&&(i=parseInt(e-o.right-5))),i<5||(t&&(i*=-1),this.style.setProperty(n,i+"px","important"))}n(document).on("transitionstart.adjust",".navbar .dropdown-mega .dropdown-menu",function(e){e.target===this&&"transform"===e.originalEvent.propertyName&&t.call(this)}).on("shown.bs.dropdown",".navbar .dropdown",function(){!this.classList.contains("dropdown-mega")||null!==(e=this.querySelector('.dropdown-menu[data-display="static"]'))&&t.call(e);var e=w.closest(this,".navbar");e&&(this.classList.contains("backdrop-shown")?e.classList.add("navbar-modal"):e.classList.add("navbar-open"))}).on("hidden.bs.dropdown",".navbar .dropdown",function(){var e=w.closest(this,".navbar");e&&(e.classList.remove("navbar-open"),e.classList.remove("navbar-modal"))})}}]),e}();P._HandleBasics();var R,M,H="aceScroll",F="ace.scroll",e=".".concat(F),t={LOAD_DATA_API:"load".concat(e).concat(".data-api")},q="[ace-scroll]",B="[data-ace-scroll]",W={type:"string",smooth:"boolean",height:"(number|null)",lock:"boolean",ignore:"(string|null)",plugin:"string",options:"(object|null)",color:"(string|null)",autohide:"(boolean|null)"},V={type:"native",smooth:!1,height:null,lock:!1,ignore:null,plugin:"SimpleBar",options:null,color:null,autohide:!0},z=function(){function o(e,t){r(this,o),this._element=e,this._config=this._getConfig(t),this._scrollbarInfo=w.getScrollbarInfo(),this.enableScrollbars()}return l(o,[{key:"enableScrollbars",value:function(){if(null!==this._config.ignore){if("mobile"===this._config.ignore&&0===this._scrollbarInfo.width&&"ontouchstart"in window&&window.matchMedia("(max-width: 840px)").matches)return;if("desktop"===this._config.ignore&&0 .submenu"),e=t.querySelector("* > .nav-link"),n&&e&&((i._collapsed&&i._sidebar.classList.contains("hoverable")||i._sidebar.classList.contains("sidebar-hover"))&&"absolute"===window.getComputedStyle(n).position||n.classList.contains("collapsing")||(t.classList.add("is-toggling"),t.parentNode.querySelectorAll("* > .nav-item.open").forEach(function(e){e!==t&&(e.classList.add("is-toggling"),e.classList.remove("open"),(e=e.querySelector("* > .submenu.show"))&&(o?window.jQuery(e).collapse("hide"):e.classList.remove("show")))}),t.classList.contains("open")?(t.classList.remove("open"),e.classList.add("collapsed"),i._sidebar.classList.remove("has-open"),o?window.jQuery(n).collapse("hide"):n.classList.remove("show")):(i._isSubOpening=!0,t.classList.add("open"),e.classList.remove("collapsed"),i._sidebar.classList.add("has-open"),o?window.jQuery(n).collapse("show"):n.classList.add("show")),o?n.getAttribute("data-sub-event")||(n.setAttribute("data-sub-event","true"),window.jQuery(n).on("shown.bs.collapse.is-toggling hidden.bs.collapse.is-toggling",function(){i._submenuIsToggled()})):i._submenuIsToggled(),t&&t.classList.contains("open")&&i._submenuScroll(n))))})}},{key:"_submenuIsToggled",value:function(){this._isSubOpening=!1,this._sidebar.querySelectorAll(".is-toggling").forEach(function(e){e.classList.remove("is-toggling")}),"MozAppearance"in document.documentElement.style&&null!==this._scroller&&(this._scroller.scrollHeight<=this._scroller.clientHeight?this._scroller.style.overscrollBehavior="auto":this._scroller.style.overscrollBehavior="")}},{key:"_submenuScroll",value:function(e){var t=1 .nav-link > .nav-text.fadeable"),n&&n.classList.remove("submenu-pullup"),t.style.transform="",i&&(i.style.transform=""),o=t.getBoundingClientRect(),s=window.innerHeight,0<(a=parseInt(o.bottom-s))&&(e=i?i.clientHeight:0,s=(s=document.querySelector(".navbar"))?s.clientHeight:0,(s=o.top-e-a-s)<0&&(a+=s),a=parseInt(a)+1,l._collapsed?e&&e/2 .nav-link");try{e.scrollIntoView({behavior:"auto",block:"end"}),this._scroller.scrollTop=this._scroller.scrollTop+30}catch(e){}}}},{key:"_getConfig",value:function(e){return e=u(u({},Z),"object"===d(e)&&e?e:{}),"undefined"!=typeof window.bootstrap&&window.bootstrap.Util.typeCheckConfig(G,e,this.constructor.DefaultType),e}}],[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return Z}},{key:"DefaultType",get:function(){return J}},{key:"getInstance",value:function(e){var t=1t.clientHeight&&document.body.classList.add("modal-scroll"),0===w.getScrollbarInfo().width&&document.body.classList.add("scrollbar-w0"),t.style.display=""),document.body.style.setProperty("--modal-padding",window.innerWidth-document.body.scrollWidth+"px"),n=t.className.match(/modal-off(?:(?:-([a-z]+))|\s|$)/i),((i=t.getAttribute("data-backdrop-bg"))||n)&&setTimeout(function(){var e,t=document.querySelectorAll(".modal-backdrop");0
',alert:!0},me=function(){function e(){r(this,e),this._lastToastId=0,this.element=null,this._jQueryBS="undefined"!=typeof window.jQuery&&"undefined"!=typeof window.bootstrap,this._tempParent=document.createElement("DIV")}return l(e,[{key:"add",value:function(e){var t=this._getConfig(e),n=w.append(this._tempParent,t.template);this._lastToastId++,n.classList.add("ace-toaster-item"),n.id="ace-toaster-item-".concat(this._lastToastId),n.setAttribute("aria-atomic","true"),t.alert?(n.setAttribute("role","alert"),n.setAttribute("aria-live","assertive")):(n.setAttribute("role","status"),n.setAttribute("aria-live","polite"));var i,o,a,s=n.querySelector(".toast-header");return t.title&&s&&(e="function"==typeof t.title?t.title.call(this.element,t):t.title,w.append(s,'
').concat(e,"
"))),t.close&&((i=null===(i=n.querySelector('[data-dismiss="toast"]'))?w.append(s,''):i).className+=" ".concat(t.closeClass||"close")),!t.body||null!==(i=n.querySelector(".toast-body"))&&(w.append(i,"function"==typeof t.body?t.body.call(this.element,t):t.body),t.bodyClass&&(i.className+=" ".concat(t.bodyClass))),!t.image||null!==(o=n.querySelector(".toast-image"))&&w.append(o,'')),!t.icon||null!==(o=n.querySelector(".toast-image"))&&(o=w.append(o,t.icon),!t.image&&t.imageClass&&(o.className+=" ".concat(t.imageClass))),t.image||t.icon||n.querySelectorAll(".toast-image").forEach(function(e){return w.remove(e)}),t.className&&(n.className+=" ".concat(t.className)),t.headerClass&&s&&(s.className+=" ".concat(t.headerClass)),t.delay=30'))).style.transitionDuration="".concat(parseInt(1.015*t.delay),"ms"),a.style.width=t.progressReverse?"calc(100% - 1px)":0,setTimeout(function(){a.style.width=t.progressReverse?0:"calc(100% - 2px)"},0)),this._addToContainer(n,t)}},{key:"addEl",value:function(e,t){t=this._getConfig(t);this.element=e,this.element.classList.add("ace-toaster-item"),this.element.getAttribute("id")||this.element.setAttribute("id","ace-toaster-item-".concat(++this._lastToastId)),this._addToContainer(this.element,t,!1)}},{key:"_addToContainer",value:function(t,n){var i=!(2'))),n.belowNav&&e.classList.add("toaster-below-nav"),w.append(e,t),w.wrap(t,'
');e=document.getElementById("ace-toaster-dummy-toast-1");null===e&&(e=w.append(document.body,'')),this._jQueryBS&&window.jQuery(e).toast("show");e={};return!0!==n.sticky&&!1!==n.autohide||(e.autohide=!1),!1===n.animation&&(e.animation=!1),e.delay=n.delay,n.width&&(t.style.width=isNaN(n.width)?n.width:n.width+"px"),this._jQueryBS&&window.jQuery(t).toast(e).toast("show").one("hidden.bs.toast.1",function(){var e=window.jQuery(t);e.removeClass("hide").parent().addClass("show").collapse("hide").one("hidden.bs.collapse",function(){e.toast("dispose"),e.parent().collapse("dispose"),n.autoremove?e.parent().remove():i||e.unwrap()})}),Q.trigger(document,he.ADDED,{target:t}),t}},{key:"remove",value:function(e){this.hide(e,!0,1'.concat(0',""))}},{key:"stopLoading",value:function(){null!==this.loader&&(w.remove(this.loader),this.loader=null,Q.trigger(this.element,ke.RELOADED))}},{key:"closeFast",value:function(){Q.trigger(this.element,ke.CLOSE).defaultPrevented||(w.remove(this.element),Q.trigger(this.element,ke.CLOSED))}},{key:"close",value:function(){var t,n=this;Q.trigger(this.element,ke.CLOSE).defaultPrevented||this.isTransitioning||(this.isTransitioning=!0,this.isFullscreen()&&w.remove(w.next(this.element,".card-expanded-placeholder")),t=function(){n.isTransitioning=!1,w.remove(n.element),Q.trigger(n.element,ke.CLOSED)},w.isReducedMotion()?t():(this.element.classList.add("fade"),this.element.addEventListener("transitionend",function(e){e.target===n.element&&t()})))}},{key:"toggle",value:function(e){var t,n,i,o=this;!this._config.toggle||null!==(t=this.element.querySelector(".card-body"))&&(n=e&&"string"==typeof e&&e.match(/show|hide/)[0]||(null!==t.offsetParent?"hide":"show"),Q.trigger(this.element,("hide"===n?"hide":"show")+_e).defaultPrevented||this.isTransitioning||(this.isTransitioning=!0,this._toggleIcon(e&&"object"===d(e)&&e instanceof window.HTMLElement?e:null,n),i="hide"===n?"hidden":"shown",this._jQueryBS?("hide"===n&&t.classList.add("show"),window.jQuery(t).collapse(n).one(i+".bs.collapse",function(){o.isTransitioning=!1,Q.trigger(o.element,i+_e)})):("hide"===n?t.classList.remove("show"):t.classList.add("show"),this.isTransitioning=!1,Q.trigger(this.element,i+_e))))}},{key:"hide",value:function(){this.toggle("hide")}},{key:"show",value:function(){this.toggle("show")}},{key:"toggleFast",value:function(e){var t,n;!this._config.toggle||null!==(t=this.element.querySelector(".card-body"))&&(n=e&&"string"==typeof e&&e.match(/show|hide/)[0]||(null!==t.offsetParent?"hide":"show"),Q.trigger(this.element,("hide"===n?"hide":"show")+_e).defaultPrevented||(t.classList.add("collapse"),"hide"===n?t.classList.remove("show"):t.classList.add("show"),this._toggleIcon(e&&"object"===d(e)&&e instanceof window.HTMLElement?e:null,n),Q.trigger(this.element,("hide"===n?"hidden":"shown")+_e)))}},{key:"hideFast",value:function(){this.toggleFast("hide")}},{key:"showFast",value:function(){this.toggleFast("show")}},{key:"_toggleIcon",value:function(e,t){(e=e||this.element.querySelector("a[data-action=toggle]"))&&("show"===t?e.classList.remove("collapsed"):e.classList.add("collapsed"))}},{key:"expand",value:function(e,t){var n=this,i=this.element.querySelector("* > .card-header [data-action=expand]"),o=this.isFullscreen(),e=!0===e||!o;t=!(!1===t||w.isReducedMotion());var a,s,r=["left","top","width","height"];if(e){if(o)return!1;if(Q.trigger(this.element,ke.EXPAND).defaultPrevented||this.isTransitioning)return!1;i&&i.classList.add("active"),t&&(this.isTransitioning=!0,a=this.element.getBoundingClientRect(),r.forEach(function(e){n.element.style[e]=parseInt(a[e])+"px"}),this.element.classList.add("card-expanding"),this.element.addEventListener("transitionend",function e(t){t.target===n.element&&(n.element.removeEventListener("transitionend",e),n.element.classList.remove("card-expanding"),n.isTransitioning=!1,Q.trigger(n.element,ke.EXPANDED))}),w.after(this.element,"
")),w.reflow(this.element),r.forEach(function(e){n.element.style[e]=""})),this.element.classList.add("card-expand"),t||Q.trigger(this.element,ke.EXPANDED)}else{if(!o)return!1;if(Q.trigger(this.element,ke.RESTORE).defaultPrevented||this.isTransitioning)return!1;i&&i.classList.remove("active"),(t=t&&null!==this.element.nextElementSibling&&this.element.nextElementSibling.classList.contains("card-expanded-placeholder"))&&(this.isTransitioning=!0,s=this.element.nextElementSibling.getBoundingClientRect(),this.element.classList.add("card-expanding"),r.forEach(function(e){n.element.style[e]=parseInt(s[e])+"px"}),this.element.addEventListener("transitionend",function e(t){t.target===n.element&&(n.element.removeEventListener("transitionend",e),n.element.classList.remove("card-expanding"),r.forEach(function(e){n.element.style[e]=""}),w.remove(n.element.nextElementSibling),n.isTransitioning=!1,Q.trigger(n.element,ke.RESTORED))})),this.element.classList.remove("card-expand"),t||Q.trigger(this.element,ke.RESTORED)}return!0}},{key:"expandFast",value:function(){return this.expand(!0,!1)}},{key:"restore",value:function(){return this.expand(!1)}},{key:"restoreFast",value:function(){return this.expand(!1,!1)}},{key:"isFullscreen",value:function(){return this.element.classList.contains("card-expand")}},{key:"_getConfig",value:function(e){return e=u(u({},Ee),"object"===d(e)&&e?e:{}),"undefined"!=typeof window.bootstrap&&window.bootstrap.Util.typeCheckConfig(ve,e,this.constructor.DefaultType),e}}],[{key:"VERSION",get:function(){return"4.0.0"}},{key:"DefaultType",get:function(){return Le}},{key:"Default",get:function(){return Ee}},{key:"getInstance",value:function(e){var t=1',iconClass:"mx-2px",reset:"",resetText:"",resetIcon:'',droppable:!1,thumbnail:!1,previewImage:!0,allowExt:null,denyExt:null,allowMime:null,denyMime:null,maxSize:null,previewSize:!1,previewWidth:!1,previewHeight:!1,beforeChange:null,fileIcons:{file:'',image:'',video:'',audio:'',document:'',archive:'',code:''}},Oe={persistent:"boolean",style:"(boolean|string)",btn:"(string|undefined)",container:"(string|undefined)",icon:"(string|undefined)",placeholderText:"(string|undefined)",placeholderIcon:"(string|undefined)",btnChooseText:"(string|undefined)",btnChangeText:"(string|undefined)",reset:"(string|undefined)",resetText:"(string|undefined)",resetIcon:"(string|undefined)",droppable:"boolean",thumbnail:"(boolean|string)",previewImage:"boolean",allowExt:"(string|null)",denyExt:"(string|null)",allowMime:"(string|null)",denyMime:"(string|null)",maxSize:"(number|null)",previewSize:"(boolean|number)",previewWidth:"(boolean|number)",previewHeight:"(boolean|number)",fileIcons:"(object|null)",beforeChange:"(function|null)"},De=1,Ne=2,Qe=3,Pe=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(a,g(Error));var n,i,o=(n=a,i=h(),function(){var e,t=s(n);return m(this,i?(e=s(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))});function a(e,t){return r(this,a),(e=o.call(this,e)).code=t,e}return a}(),Re=function(){function s(e,t){var n=this;r(this,s),this.settings=this._getConfig(t),this.settings.fileIcons=u(u({},je.fileIcons),this.settings.fileIcons||{}),this.fileList=[],this.selectMethod="",this._hasMultiple="multiple"in document.createElement("INPUT"),this._hasFileList="FileList"in window,this._hasFileReader="FileReader"in window,this._hasFile="File"in window,this.element=e,this.disabled=!1,this.canReset=!0,this._hasAcceptAttr=null!==this.element.getAttribute("accept"),Q.off(this.element,"change.aceFileInput"),Q.on(this.element,"change.aceFileInput",function(){if(!n.disabled)return n._handleOnChange()});t=w.closest(this.element,"form");t&&(Q.off(t,"reset.aceFileInput"),Q.on(t,"reset.aceFileInput",function(){n.resetInputData(),n.resetInputUI()}));e=w.closest(this.element,"label"),t="label";e&&(e.classList.add("d-block"),t="span"),this._wrap=w.wrap(this.element,"<".concat(t,' class="ace-file-input" />')),this._applySettings()}return l(s,[{key:"_getConfig",value:function(e){return e=u(u({},je),e),"undefined"!=typeof window.bootstrap&&window.bootstrap.Util.typeCheckConfig(xe,e,this.constructor.DefaultType),e}},{key:"_applySettings",value:function(){var t=this;this._jQueryBS="undefined"!=typeof window.jQuery&&"undefined"!=typeof window.bootstrap,this._isMulti=this.element.getAttribute("multiple")&&this._hasMultiple,this._isDropStyle="drop"===this.settings.style,this._isDropStyle?(this.settings.thumbnail||(this.settings.thumbnail="small"),this._wrap.classList.add("ace-file-multiple")):this._wrap.classList.remove("ace-file-multiple"),this._wrap.querySelectorAll("*:not([type=file])").forEach(function(e){return w.remove(e)});var e='
\n\n ').concat(this.settings.placeholderIcon||"",'\n\n\n ').concat(this.settings.placeholderText,"\n")+(this._isDropStyle?"":'').concat(this.settings.btnChooseText,""))+"
";w.after(this.element,'
').concat(e,"
")),this.container=this.element.nextElementSibling,!1!==this.settings.reset&&(e=0').concat(this.settings.resetIcon,"")),this.settings.resetText&&this._jQueryBS&&window.jQuery.fn.tooltip&&window.jQuery(e).tooltip({container:"body"}),e.addEventListener("click",function(e){e.preventDefault(),t.canReset&&(Q.trigger(t.element,Te.CLEAR).defaultPrevented||t.resetInput())})),this.settings.droppable&&this._hasFileList&&this._enableFileDrop(),this._hasAcceptAttr||this._setAcceptAttr(this.settings.allowExt,this.settings.allowMime)}},{key:"showFileList",value:function(e,a){var s=this,r=e||this.fileList;if(r&&r.length){this.settings.persistent||this.resetInputUI(),this.container.classList.add("selected"),this.container.querySelectorAll(".ace-file-placeholder").forEach(function(e){return e.classList.add("d-none")});for(var t=0;t\n').concat(o,'\n').concat(t,"")+(s._isDropStyle?"":'').concat(s.settings.btnChangeText,""))+""),o=!0===a&&s._hasFile&&r[e]instanceof window.File?r[e].type.trim():"";if(!1!==s.settings.previewImage&&s._hasFileReader&&s.settings.thumbnail&&(0',t=this._wrap.querySelector(".ace-file-overlay");null===t&&(t=w.append(this._wrap,'
'),Q.on(t,"click",function(e){e.stopImmediatePropagation(),e.preventDefault()}),this.element.setAttribute("readonly","true")),t.innerHTML=e}},{key:"stopLoading",value:function(){var e=this._wrap.querySelector(".ace-file-overlay");null!==e?(Q.off(e,"click"),w.remove(e)):this.element.removeAttribute("readonly")}},{key:"_enableFileDrop",value:function(){var o=this,e=this.element.parentNode;Q.off(e,"dragenter"),Q.on(e,"dragenter",function(e){e.preventDefault(),e.stopPropagation()}),Q.off(e,"dragover"),Q.on(e,"dragover",function(e){e.preventDefault(),e.stopPropagation()}),Q.off(e,"drop"),Q.on(e,"drop",function(e){if(e.preventDefault(),e.stopPropagation(),!o.disabled){var t=e.dataTransfer.files;if(!o._isMulti&&1"),a=setTimeout(function(){a=null,s(),c(o)},6e3),s=function(){a&&(clearTimeout(a),a=null),o.removeEventListener("load",n),o.removeEventListener("error",i)};o.addEventListener("load",n),o.addEventListener("error",i),o.src=e}var e,l=function(e,t){var n=s.settings.previewSize;n||(s.settings.previewWidth||s.settings.previewHeight?n={previewWidth:s.settings.previewWidth,previewHeight:s.settings.previewHeight}:(n=50,"large"===s.settings.thumbnail&&(n=150))),"fit"===s.settings.thumbnail?n=r.parentNode.offsetWidth:"number"==typeof n&&(n=parseInt(Math.min(n,r.parentNode.offsetWidth)));var i=/svg/.test(t.type),t=!i&&s._getThumbnail(e,n,t.type);if(null===t)return w.remove(e),void a(new Pe("Thumbnail Failed",Qe));i?"small"===s.settings.thumbnail||e.width>e.height?e.style.width=n+"px":e.style.height=n+"px":(i=t.previewWidth,n=t.previewHeight,"small"===s.settings.thumbnail?i=n=parseInt(Math.max(i,n)):r.classList.add("thumbnail-large"),e.style.background="url(".concat(t.src,") center no-repeat"),e.style.width=i+"px",e.style.height=n+"px",e.setAttribute("data-src",t.src),e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="),e.style.display="",o()},c=function(e){w.remove(e),a(new Pe("Image Load Failed",Ne))};s._hasFile&&n instanceof window.File?((e=new window.FileReader).onload=function(e){t(e.target.result,n)},e.onerror=function(e){a(new Pe("File Load Failed",De))},e.readAsDataURL(n)):n instanceof Object&&Object.prototype.hasOwnProperty.call(n,"path")&&t(n.path,n)})}},{key:"_getThumbnail",value:function(e,t,n){var i,o=e.width,a=e.height,o=0s?("size"in l||(l.size=[]),l.size.push(u)):r.push(d)}else r.push(d)}else"ext"in l||(l.ext=[]),l.ext.push(u)}if(r.length===e.length)return e;var h={ext:0,mime:0,size:0};return"ext"in l&&(h.ext=l.ext.length),"mime"in l&&(h.mime=l.mime.length),"size"in l&&(h.size=l.size.length),Q.trigger(this.element,Te.INVALID,{$_fileErrors:{fileCount:e.length,invalidCount:e.length-r.length,errorList:l,errorCount:h,dropped:t}}).defaultPrevented?-1:r}},{key:"_setAcceptAttr",value:function(){var e=0").css({width:t.outerWidth(),height:t.outerHeight()}).val(t.html()).insertAfter(t),t.addClass("d-none"),c.default(this).addClass("active")),n=!n});e=c.default.extend({},{activeToolbarClass:"active",toolbarSelector:e},this._config.wysiwyg||{});c.default(this._element).wysiwyg(e),this._handleImages()}},{key:"_createToolbarHtml",value:function(){var e,t={font:{values:["Arial","Courier","Comic Sans MS","Helvetica","Open Sans","Tahoma","Verdana"],icon:"fa fa-font text-secondary",title:"Font"},fontSize:{values:{5:"Huge",3:"Normal",1:"Small"},icon:"fa fa-text-height text-secondary",title:"Font Size"},bold:{icon:"fa fa-bold text-secondary",title:"Bold (Ctrl/Cmd+B)"},italic:{icon:"fa fa-italic text-secondary",title:"Italic (Ctrl/Cmd+I)"},strikethrough:{icon:"fa fa-strikethrough text-secondary",title:"Strikethrough"},underline:{icon:"fa fa-underline text-secondary",title:"Underline"},insertunorderedlist:{icon:"fa fa-list-ul text-secondary",title:"Bullet list"},insertorderedlist:{icon:"fa fa-list-ol text-secondary",title:"Number list"},outdent:{icon:"fa fa-outdent text-secondary",title:"Reduce indent (Shift+Tab)"},indent:{icon:"fa fa-indent text-secondary",title:"Indent (Tab)"},justifyleft:{icon:"fa fa-align-left text-secondary",title:"Align Left (Ctrl/Cmd+L)"},justifycenter:{icon:"fa fa-align-center text-secondary",title:"Center (Ctrl/Cmd+E)"},justifyright:{icon:"fa fa-align-right text-secondary",title:"Align Right (Ctrl/Cmd+R)"},justifyfull:{icon:"fa fa-align-justify text-secondary",title:"Justify (Ctrl/Cmd+J)"},createLink:{icon:"fa fa-link text-secondary",title:"Hyperlink",button_text:"Add",placeholder:"URL",button_class:"btn-light-primary"},unlink:{icon:"fa fa-unlink text-secondary",title:"Remove Hyperlink"},insertImage:{icon:"fa fa-image text-secondary",title:"Insert picture",button_text:' Choose an Image …',placeholder:"Remote Image URL",button_insert:"Insert",button_class:"btn-light-success",button_insert_class:"btn-light-primary",choose_file:!0},foreColor:{icon:"fas fa-eye-dropper text-pink-m1",values:this._config.colors,title:"Foreground Color"},backColor:{icon:"fas fa-fill-drip text-secondary",values:this._config.colors,title:"Background Color"},removeFormat:{icon:"fa fa-eraser text-secondary",title:"Remove Format"},undo:{icon:"fa fa-undo text-secondary",title:"Undo (Ctrl/Cmd+Z)"},redo:{icon:"fa fa-redo text-secondary",title:"Redo (Ctrl/Cmd+Y)"},viewSource:{icon:"fa fa-code text-secondary",title:"View Source"}},n=this._config.toolbar,i='
';for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var o=n[e];if(null!==o){if("string"==typeof o&&o in t)(o=t[o]).name=n[e];else{if(!("object"===d(o)&&o.name in t))continue;o=c.default.extend(t[o.name],o)}var a="className"in o?o.className:"btn-sm btn-outline-secondary btn-h-light-dark btn-a-light-dark";switch(o.name){case"font":for(var s in i+=' ').concat(o.iconText||"",' '),i+=' ";break;case"fontSize":for(var r in i+=' ').concat(o.iconText||"",'  '),i+=' ";break;case"createLink":i+='
').concat(o.iconText||""," "),i+='
");break;case"insertImage":i+='
').concat(o.iconText||""," "),i+='
";break;case"foreColor":case"backColor":for(var l in i+='
').concat(o.iconText||""," "),i+='
";break;case"viewSource":i+=' ').concat(o.iconText||""," ");break;default:i+=' ').concat(o.iconText||""," ")}}else i+='
'}return i+="
",i+="
"}},{key:"_handleImages",value:function(){var i=null;c.default(this._element).on("click","img",function(e){i&&c.default(i).popover("dispose"),i=this,c.default(i).data("original-width")||c.default(i).data("original-width",i.width),c.default(i).popover({container:"body",html:!0,placement:function(e){var t=i.getBoundingClientRect(),n=document.scrollTop||document.documentElement.scrollTop||document.body.scrollTop;return c.default(e).addClass("popover-wysiwyg-image shadow brc-secondary-m4").css({"margin-left":t.left+4+"px","margin-top":t.top+n+4+"px"}),"auto"},title:"Image Size & Position",trigger:"manual",content:function(){return c.default("
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
"))}}).popover("show"),c.default(document).on("click.popover-wysiwyg-image",function(e){e.target!==i&&(0