PageSourceSearch

https://www.kioti.com/assets/dist/tabbed-section-CDoOgbFq.js

js kioti.com collected 2026-09-24 19:51:09 UTC 3,741 bytes, 1 lines download raw bytes

1import{c as i}from"./cash.esm-wMNabL6l.js";import{M as r}from"./module-factory-CrTLIRup.js";class s{constructor({$container:t}={}){this.$container=t,this.constructElements(),this.constructEvents(),this.constructParameters()}static init(){const t=i(s.selectors.container);t.length&&t.each((e,a)=>{a.TabbedSection=new s({$container:i(a)})})}constructElements(){this.$window=i(window),this.$tabs=this.$container.find(s.selectors.tab),this.$tablist=this.$container.find(s.selectors.tablist),this.$panels=this.$container.find(s.selectors.panel),this.$indicator=this.$container.find(s.selectors.indicator)}constructEvents(){this.$window.on("resize",()=>this.handleResizeWindow()),this.$container.on("click",s.selectors.tab,e=>this.handleClickTrigger({e}));const t=new window.IntersectionObserver(e=>this.constructIndicator());i.each(this.$container,(e,a)=>{t.observe(a)})}constructIndicator(){this.tabCurrent||this.setCurrentTab({$tab:this.$tabs.filter(`.${s.classes.tabCurrent}`)}),this.doTabIndicatorMove({$tab:this.$tabCurrent})}constructParameters(){this.urlParamKey=this.$container.attr("data-tab-url-param-key"),this.containerWidth=this.$tablist[0].offsetWidth,this.urlParamKey&&this.handleUrlParams()}doPanelEnable({$tab:t}){const e=this.$panels.filter(`#${t.attr("aria-controls")}`);this.setCurrentTab({$tab:t}),this.doTabIndicatorMove({$tab:t}),t.addClass(s.classes.tabCurrent).attr("aria-selected",!0),e.addClass(s.classes.panelCurrent).attr("aria-hidden",!1).trigger("panel-show")}doPanelsReset(){this.$tabs.removeClass(s.classes.tabCurrent).attr("aria-selected",!1),this.$panels.removeClass(s.classes.panelCurrent).attr("aria-hidden",!0).trigger("panel-hide")}doPanelsUpdate({$tab:t}){const e=parseInt(t.attr("data-index"));this.setCurrentTab({$tab:t}),e!==this.previousTab.index&&(this.doPanelsReset(),this.doPanelEnable({$tab:t}))}doTabIndicatorMove(){if(this.containerWidth===0){this.$indicator.css({left:"50%",right:"50%"});return}let t=0,e=0;const a=100;this.currentTab.index<this.previousTab.index&&(e=a,this.$indicator.css({transform:"skew(40deg)"})),this.currentTab.index>this.previousTab.index&&(t=a,this.$indicator.css({transform:"skew(-60deg)"})),setTimeout(()=>{this.$indicator.css({left:this.currentTab.offsetLeft})},t),setTimeout(()=>{this.$indicator.css({right:this.currentTab.offsetRight})},e),setTimeout(()=>{this.$indicator.css({transform:"skew(-40deg)"}).addClass(s.classes.indicatorVisible)},a*2),this.previousTab={...this.currentTab}}doScrollToTabs(){this.$container[0].scrollIntoView({behavior:"smooth",block:"start"})}getTabByUrlParamValue({value:t}){return this.$tabs.filter(`[data-tab-url-param-value="${t}"]`)}handleClickTrigger({e:t}){const e=i(t.currentTarget);e.hasClass(s.classes.tabCurrent)||this.doPanelsUpdate({$tab:e})}handleResizeWindow(){this.containerWidth=this.$tablist[0].offsetWidth,this.currentTab&&this.doTabIndicatorMove()}handleUrlParams(){const e=new URLSearchParams(window.location.search).get(this.urlParamKey),a=this.getTabByUrlParamValue({value:e});this.doPanelsUpdate({$tab:a.length?a:this.$tabs.first()}),this.doScrollToTabs()}setCurrentTab({$tab:t}){this.currentTab={$element:t,index:t.attr("data-index"),offsetLeft:t[0].offsetLeft,offsetRight:this.containerWidth-t[0].offsetLeft-t[0].offsetWidth},this.previousTab||(this.previousTab={...this.currentTab})}}s.selectors={container:".js-tabbed-section",tab:".js-tabbed-section-tab",tablist:".js-tabbed-section-tablist",panel:".js-tabbed-section-panel",indicator:".js-tabbed-section-indicator"};s.classes={tabCurrent:"c-tabbed-section__tablist-tab--current",panelCurrent:"c-tabbed-section__tabpanel--current",indicatorVisible:"c-tabbed-section__tablist-indicator--visible"};r.init({Module:s,moduleName:"TabbedSection"});export{s as T};

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.