PageSourceSearch

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

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

1var p=Object.defineProperty;var S=(l,a,t)=>a in l?p(l,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[a]=t;var e=(l,a,t)=>S(l,typeof a!="symbol"?a+"":a,t);import{C as w,g as n}from"./alzchem-B8Vlwgj5.js";import{S as g}from"./ScrollToPlugin-Q-hkYCME.js";import{S as d}from"./ScrollTrigger-D1XJUMov.js";import{S as b}from"./core-class-D0b8q8G0.js";import{N as v}from"./navigation-1y11g9Oa.js";n.registerPlugin(g);n.registerPlugin(d);const i=class i extends w{constructor(){super(...arguments);e(this,"tabList");e(this,"activeTab");e(this,"tabs");e(this,"tabPanels");e(this,"tabIndicator");e(this,"tabFocus",0);e(this,"prevNavigationButton");e(this,"nextNavigationButton");e(this,"swiperContainer");e(this,"swiper")}run(){this.bind(),this.initSwiper(),this.setListeners(),this.updateTabIndicator(),this.initScrollTrigger()}bind(){this.swiperContainer=this.element.querySelector(i.SELECTORS.swiperContainer),this.tabList=this.element.querySelector(i.SELECTORS.tabList),this.tabs=Array.from(this.element.querySelectorAll(i.SELECTORS.tabs)),this.activeTab=this.element.querySelector(i.SELECTORS.activeTab),this.tabPanels=Array.from(this.element.querySelectorAll(i.SELECTORS.tabPanel)),this.tabIndicator=this.element.querySelector(i.SELECTORS.tabIndicator),this.prevNavigationButton=this.element.querySelector(i.SELECTORS.prevNavigationButton),this.nextNavigationButton=this.element.querySelector(i.SELECTORS.nextNavigationButton)}
1setListeners(){this.tabs&&this.tabs.forEach(t=>{t.addEventListener("click",this.changeTab.bind(this)),t.addEventListener("focus",()=>{this.slideIntoView(t)}),this.setActiveTab(t)}),this.tabList&&this.tabList.addEventListener("keydown",this.onKeyDown.bind(this))}initSwiper(){!this.tabs||this.tabs.length<2||this.swiperContainer&&(b.use([v]),this.swiper=new b(this.swiperContainer,{speed:i.SETTINGS.swiperSpeed,slidesPerView:"auto",slideToClickedSlide:!0,navigation:{nextEl:this.nextNavigationButton,prevEl:this.prevNavigationButton}}),this.swiperContainer.Swiper=this.swiper)}changeTab(t){var r,c;if(this.activeTab="target"in t?t.target:t,((r=this.activeTab)==null?void 0:r.getAttribute("aria-selected"))!=="true"&&((c=this.tabList)==null||c.querySelectorAll('[aria-selected="true"]').forEach(o=>o.setAttribute("aria-selected","false")),this.activeTab&&this.activeTab.setAttribute("aria-selected","true"),this.tabPanels&&this.tabPanels.forEach(o=>o.setAttribute("hidden","true")),this.activeTab)){const o=`#${this.activeTab.getAttribute("aria-controls")}`,h=this.element.querySelector(o);h==null||h.removeAttribute("hidden"),n.set(h,{autoAlpha:0,duration:0}),n.to(h,{autoAlpha:1,duration:0}),this.updateTabIndicator(),this.setHistory(null,null,o)}}updateTabIndicator(){this.tabIndicator&&this.activeTab&&n.to(this.tabIndicator,{scaleX:this.activeTab.clientWidth/100,x:this.activeTab.offsetLeft,duration:.2})}initScrollTrigger(){d.create({trigger:this.element,onLeave:this.onViewportLeave.bind(this),onLeaveBack:this.onViewportLeave.bind(this)})}slideIntoView(t){if(this.swiper&&t){const s=[...t.parentElement.children].indexOf(t);this.swiper&&this.swiper.slideTo(s)}}setActiveTab(t){let s=window.location.hash;if(s){s=s.replace("#","");const r=t.getAttribute("aria-controls");s===r&&(this.changeTab(t),this.slideIntoView(t),this.scrollToActiveItem())}}scrollToActiveItem(){const t=this.element.getBoundingClientRect(),s=window.scrollY+t.top;n.to(window,{duration:.5,scrollTo:s,ease:"power1.out",autoKill:!0})}setHistory(t=null,s,r){window.history.replaceState?window.history.replaceState(t,s||"",r):r&&(window.location.hash=r)}onViewportLeave(){const t=window.location.hash.replace("#","");this.element.querySelector(`[aria-controls="${t}"]`)&&this.setHistory(null,document.title,window.location.href.split("#")[0])}onKeyDown(t){this.tabs&&(t.key==="ArrowRight"||t.key==="ArrowLeft")&&(this.tabs[this.tabFocus].setAttribute("tabindex","-1"),t.key==="ArrowRight"?(this.tabFocus++,this.tabFocus>=this.tabs.length&&(this.tabFocus=0)):t.key==="ArrowLeft"&&(this.tabFocus--,this.tabFocus<0&&(this.tabFocus=this.tabs.length-1)),this.tabs[this.tabFocus].setAttribute("tabindex","0"),this.tabs[this.tabFocus].focus())}};e(i,"SELECTORS",{tabList:'[role="tablist"]',tabs:'[role="tab"]',activeTab:'[role="tab"][aria-selected="true"]',tabPanel:'[role="tabpanel"]',tabIndicator:".tabs__tab-bar-indicator",prevNavigationButton:".tabs__tab-bar-nav-btn--prev",nextNavigationButton:".tabs__tab-bar-nav-btn--next",swiperContainer:".swiper-container"}),e(i,"SETTINGS",{swiperSpeed:300});let u=i;export{u 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.