(()=>{"use strict";var s;(s=jQuery)((function(){if(s(".menu-item.has-submenu .menu-link").on("click",(function(e){e.preventDefault(),s(this).next(".submenu").is(":hidden")&&s(this).parent(".has-submenu").siblings().find(".submenu").slideUp(200),s(this).next(".submenu").slideToggle(200)})),s("[data-trigger]").on("click",(function(e){e.preventDefault(),e.stopPropagation();var i=s(this).attr("data-trigger");s(i).toggleClass("show"),s("body").toggleClass("offcanvas-active"),s(".screen-overlay").toggleClass("show")})),s(".screen-overlay, .btn-close").on("click",(function(e){s(".screen-overlay").removeClass("show"),s(".mobile-offcanvas, .show").removeClass("show"),s("body").removeClass("offcanvas-active")})),s(".btn-aside-minimize").on("click",(function(){window.innerWidth<768?(e("body").removeClass("aside-mini"),s(".screen-overlay").removeClass("show"),s(".navbar-aside").removeClass("show"),s("body").removeClass("offcanvas-active")):s("body").toggleClass("aside-mini")})),s(".select-nice").length&&s(".select-nice").select2(),s("#offcanvas_aside").length){var i=document.querySelector("#offcanvas_aside");new PerfectScrollbar(i)}s(".darkmode").on("click",(function(){s("body").toggleClass("dark")})),s(".custom-select-image").on("click",(function(e){e.preventDefault(),s(this).closest(".image-box").find(".image_input").trigger("click")})),s(".image_input").on("change",(function(){!function(e){if(e.files&&e.files[0]){var i=new FileReader;i.onload=function(i){s(e).closest(".image-box").find(".preview_image").prop("src",i.target.result)},i.readAsDataURL(e.files[0])}}(this)})),s(document).on("click",".btn_remove_image",(function(e){e.preventDefault();var i=s(e.currentTarget).closest(".image-box").find(".preview-image-wrapper .preview_image");i.attr("src",i.data("default-image")),s(e.currentTarget).closest(".image-box").find(".image-data").val("")})),window.noticeMessages&&window.noticeMessages.length&&(window.noticeMessages.map((function(e,s){Botble.showNotice(e.type,e.message,"")})),window.noticeMessages=[])}))})();