File: /home/salamatk/takarzan.ir/wp-content/themes/xts-luman/js/scripts/offCanvasSidebar.min.js
(d=>{XTSThemeModule.$document.on("xtsPjaxComplete xtsPortfolioPjaxComplete",function(){XTSThemeModule.offCanvasSidebar()}),XTSThemeModule.$document.on("xtsPortfolioPjaxStart xtsPjaxStart",function(){XTSThemeModule.hideOffCanvasSidebar()}),XTSThemeModule.offCanvasSidebar=function(){var s,e=d(".xts-close-side"),o=d(".xts-sidebar"),a=XTSThemeModule.$body;o.hasClass("xts-inited")||((o.hasClass("xts-sidebar-hidden-lg")&&XTSThemeModule.isDesktopSize||o.hasClass("xts-sidebar-hidden-md")&&XTSThemeModule.isTabletSize)&&o.addClass("xts-inited"),a.on("click",".xts-sidebar-opener, .xts-navbar-sidebar",function(e){e.preventDefault(),o.hasClass("xts-opened")?XTSThemeModule.hideOffCanvasSidebar():s()}),a.on("click touchstart",".xts-close-side",function(){XTSThemeModule.hideOffCanvasSidebar()}),a.on("click touchstart",".xts-close-button a",function(e){e.preventDefault(),XTSThemeModule.hideOffCanvasSidebar()}),XTSThemeModule.$document.on("keyup",function(e){27===e.keyCode&&XTSThemeModule.hideOffCanvasSidebar()}),s=function(){o.addClass("xts-opened"),e.addClass("xts-opened")})},XTSThemeModule.hideOffCanvasSidebar=function(){d(".xts-sidebar").removeClass("xts-opened"),d(".xts-close-side").removeClass("xts-opened")},d(document).ready(function(){XTSThemeModule.offCanvasSidebar()}),window.onpopstate=function(){XTSThemeModule.offCanvasSidebar()}})(jQuery);