芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cansahcab.gob.mx/media/templates/administrator/atum/js/template.min.js
if(!Joomla)throw new Error("Joomla API is not initialized");const getCookie=()=>document.cookie.length&&document.cookie.split("; ").find((e=>e.startsWith("atumSidebarState="))).split("=")[1],mobile=window.matchMedia("(max-width: 992px)"),small=window.matchMedia("(max-width: 575.98px)"),tablet=window.matchMedia("(min-width: 576px) and (max-width:991.98px)"),menu=document.querySelector(".sidebar-menu"),sidebarNav=[].slice.call(document.querySelectorAll(".sidebar-nav")),subhead=document.querySelector("#subhead-container"),wrapper=document.querySelector(".wrapper"),sidebarWrapper=document.querySelector(".sidebar-wrapper"),logo=document.querySelector(".logo"),isLogin=document.querySelector("body.com_login"),menuToggleIcon=document.getElementById("menu-collapse-icon"),navDropDownIcon=document.querySelectorAll('.nav-item.dropdown span[class*="icon-angle-"]'),headerTitleArea=document.querySelector("#header .header-title"),headerItemsArea=document.querySelector("#header .header-items"),headerExpandedItems=[].slice.call(headerItemsArea.children).filter((e=>e.classList.contains("header-item"))),headerCondensedItemContainer=document.getElementById("header-more-items"),headerCondensedItems=[].slice.call(headerCondensedItemContainer.querySelectorAll(".header-dd-item"));let headerTitleWidth=headerTitleArea.getBoundingClientRect().width;const headerItemWidths=headerExpandedItems.map((e=>e.getBoundingClientRect().width));headerCondensedItemContainer.classList.remove("d-none"),headerCondensedItemContainer.paddingTop;const ellipsisWidth=headerCondensedItemContainer.getBoundingClientRect().width;function changeLogo(e){if(!logo||isLogin)return;if(small.matches)return void logo.classList.add("small");"closed"===(e||getCookie())?logo.classList.add("small"):logo.classList.remove("small"),menuToggleIcon&&(wrapper.classList.contains("closed")?(menuToggleIcon.classList.add("icon-toggle-on"),menuToggleIcon.classList.remove("icon-toggle-off")):(menuToggleIcon.classList.remove("icon-toggle-on"),menuToggleIcon.classList.add("icon-toggle-off")))}function toggleArrowIcon(e){const o=e?"icon-angle-up":"icon-angle-down",a=e?"icon-angle-down":"icon-angle-up";navDropDownIcon&&navDropDownIcon.forEach((e=>{e.classList.remove(o),e.classList.add(a)}))}headerCondensedItemContainer.classList.add("d-none");const getSum=e=>e.reduce(((e,o)=>Number(e)+Number(o)),0);function headerItemsInDropdown(){headerTitleWidth=headerTitleArea.getBoundingClientRect().width;const e=headerTitleWidth+ellipsisWidth,o=50+getSum(headerItemWidths);headerTitleWidth+o
e.classList.remove("d-none"))),headerCondensedItemContainer.classList.add("d-none")):(headerCondensedItemContainer.classList.remove("d-none"),headerCondensedItems.map((e=>e.classList.add("d-none"))),headerCondensedItemContainer.classList.remove("d-none"),headerItemWidths.forEach(((o,a)=>{const s=headerItemWidths.slice(a,headerItemWidths.length);e+getSum(s)
e.classList.add("collapse"))),subhead&&subhead.classList.add("collapse"),sidebarWrapper&&sidebarWrapper.classList.add("collapse")):(sidebarNav.map((e=>e.classList.remove("collapse"))),subhead&&subhead.classList.remove("collapse"),sidebarWrapper&&sidebarWrapper.classList.remove("collapse")),changeLogo("closed")}function setDesktop(){sidebarWrapper?(changeLogo(getCookie()||"open"),sidebarWrapper.classList.remove("collapse")):changeLogo("closed"),sidebarNav.map((e=>e.classList.remove("collapse"))),subhead&&subhead.classList.remove("collapse"),toggleArrowIcon("top")}function reactToResize(){window.addEventListener("resize",(()=>{mobile.matches?setMobile():setDesktop(),headerItemsInDropdown()}))}function subheadScrolling(){subhead&&document.addEventListener("scroll",(()=>{window.scrollY>0?subhead.classList.add("shadow-sm"):subhead.classList.remove("shadow-sm")}))}headerItemsInDropdown(),reactToResize(),subheadScrolling(),mobile.matches&&(changeLogo("closed"),subhead&&(subhead.classList.remove("show"),subhead.classList.add("collapse"))),navigator.cookieEnabled||Joomla.renderMessages({error:[Joomla.Text._("JGLOBAL_WARNCOOKIES")]},void 0,!1,6e3),window.addEventListener("joomla:menu-toggle",(e=>{headerItemsInDropdown(),document.cookie=`atumSidebarState=${e.detail};`,mobile.matches?changeLogo("closed"):changeLogo(e.detail)}));