PageSourceSearch

https://www.alzchem.com/static/alzchem/assets/index-Bz3X6qRP.js

js alzchem.com collected 2026-10-02 10:45:20 UTC 4,269 bytes, 1 lines download raw bytes

1var c=Object.defineProperty;var p=(l,n,t)=>n in l?c(l,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[n]=t;var s=(l,n,t)=>p(l,typeof n!="symbol"?n+"":n,t);import{C as d,g as r}from"./alzchem-B8Vlwgj5.js";import{S as m}from"./ScrollToPlugin-Q-hkYCME.js";r.registerPlugin(m);const a=class a extends d{constructor(){super(...arguments);s(this,"target");s(this,"parent");s(this,"hasParent",!1);s(this,"isOpen",!1);s(this,"elements");s(this,"parentToggles");s(this,"parentsChildren");s(this,"parentsContainer");s(this,"preventDefaultBehavior",!1);s(this,"disableHistory",!1);s(this,"containerSelector","");s(this,"containerCollapsedClass","");s(this,"containerElement")}static getParentElement(t){const i=t.dataset.parent;let e=null;if(i){const o=document.querySelectorAll(i);e=o.length?o[0]:null}return e}run(){this.init(),this.bind()}bind(){this.element.addEventListener("click",this.toggleCollapse.bind(this))}init(){const t=this.element.tagName.toLowerCase()==="a",i=t?this.element.href:null;if(this.target=this.element.dataset.target||i,this.preventDefaultBehavior=!!this.element.dataset.preventDefault,this.disableHistory=!!this.element.dataset.disableHistory,t&&i){const e=i.split("#");this.target=e.length?`#${e.length===1?e[0]:e[1]}`:null}this.target&&(this.parent=a.getParentElement(this.element),this.hasParent=!!this.parent,this.parent||(this.parent=document),this.elements=Array.from(this.parent.querySelectorAll(this.target)),this.isOpen=!this.element.classList.contains(a.CLASSES.collapsed),this.hasParent&&(this.parentToggles=Array.from(this.parent.querySelectorAll(a.SELECTORS.collapse)),this.parentsChildren=Array.from(this.parent.querySelectorAll(`${a.SELECTORS.collapseContent}:not(${this.target})`))),this.containerSelector=this.element.dataset.container||"",this.containerCollapsedClass=this.element.dataset.collapsedContainerClass||"",this.findContainerElement(),document.location.hash===this.target?(this.toggleCollapse(),this.scrollToActiveItem()):this.element.dataset.collapsedInitState=="expanded"&&this.toggleCollapse(void 0,!1))}toggleCollapse(t,i=!0){!this.target||!this.parent||!this.elements||!this.elements.length||(this.isOpen=!this.element.classList.contains(a.CLASSES.collapsed),t&&this.preventDefaultBehavior&&t.preventDefault(),this.hasParent&&this.parentToggles&&this.parentsChildren&&(this.parentToggles.forEach(e=>{e.classList.add(a.CLASSES.collapsed),this.setAriaExpanded(e,!1)}),this.parentsChildren.forEach(e=>{this.animateContentElementCollapse(e,!1)}),this.parentsContainer&&this.parentsContainer.forEach(e=>{e.classList.add(this.containerCollapsedClass)})),this.elements.forEach(e=>{this.isOpen?this.animateContentElementCollapse(e,!1):this.animateContentElementCollapse(e,!0)}),this.isOpen?(this.element.classList.add(a.CLASSES.collapsed),this.containerElement&&this.containerElement.classList.add(this.containerCollapsedClass),i&&this.setHistory(null,null,window.location.pathname)):(this.element.classList.remove(a.CLASSES.collapsed),this.containerElement&&this.containerElement.classList.remove(this.containerCollapsedClass),i&&this.setHistory(null,null,this.target)),this.setAriaExpanded(this.element,!this.isOpen))}findContainerElement(){this.containerSelector&&this.containerCollapsedClass&&(this.containerElement=this.element.closest(this.containerSelector),this.hasParent&&this.parent&&(this.parentsContainer=Array.from(this.parent.querySelectorAll(this.containerSelector))))}animateContentElementCollapse(t,i=!1){i?(t.classList.add(a.CLASSES.active),r.set(t,{height:"auto"}),r.from(t,a.SETTINGS.animationDuration,{height:0,ease:"power1.out"})):r.to(t,{height:0,ease:"power1.in",duration:a.SETTINGS.animationDuration,onComplete:()=>{t.classList.remove(a.CLASSES.active)}})}setAriaExpanded(t,i){t.setAttribute("aria-expanded",i?"true":"false")}scrollToActiveItem(){r.to(window,{duration:.5,scrollTo:this.element.offsetTop,ease:"power1.out",autoKill:!0})}setHistory(t=null,i=null,e=""){this.disableHistory||(window.history.pushState?window.history.pushState(t,i||"",e):window.location.hash=e)}};s(a,"SELECTORS",{collapse:'[data-toggle="collapse"]',collapseContent:".collapse"}),s(a,"CLASSES",{active:"collapse--show",collapsed:"collapsed"}),s(a,"SETTINGS",{animationDuration:.33});let h=a;export{h as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.