PageSourceSearch

https://img.ly/_astro/SectionTabbed.astro_astro_type_script_index_0_lang.Z2yHJWHX.js

js img.ly collected 2026-10-02 03:03:39 UTC 4,393 bytes, 1 lines download raw bytes

1const x=()=>{document.querySelectorAll(".section-tabbed").forEach(c=>{const b=c.querySelector(".section-segmented-control"),e=c.querySelector(".section-segmented-control-scroll"),d=c.querySelector(".section-tab-panels"),r=c.querySelectorAll("[data-section-tab-panel]");if(!b||!e||!d||r.length===0||b.children.length>0)return;let h="";r.forEach(t=>{t.dataset.visible==="true"&&(h=t.dataset.sectionTabPanel??"")}),h||(h=r[0]?.dataset.sectionTabPanel??"",r[0]&&(r[0].dataset.visible="true")),r.forEach(t=>{const a=t.dataset.sectionTabPanel??"",o=t.dataset.tabLabel??"",i=t.dataset.tabBadge,l=t.dataset.tabBadgeAnimated!==void 0,n=a===h,s=document.createElement("button");if(s.className=["starwind-badge relative inline-flex items-center rounded-full font-semibold whitespace-nowrap","text-card-foreground px-4 py-2 text-xs","cursor-pointer transition-all duration-200","data-[state=active]:bg-card data-[state=active]:shadow-md","data-[state=inactive]:bg-card/50 data-[state=inactive]:text-card-foreground/60 data-[state=inactive]:shadow-none","data-[state=inactive]:hover:bg-card/75 data-[state=inactive]:hover:text-card-foreground/80"].join(" "),s.dataset.sectionTab="",s.dataset.value=a,s.dataset.state=n?"active":"inactive",s.type="button",s.role="tab",s.id=`section-tab-${a}`,s.setAttribute("aria-selected",String(n)),s.setAttribute("aria-controls",`section-tabpanel-${a}`),s.textContent=o,i){const v=document.createElement("span");v.className=["pointer-events-none absolute -top-2 -right-0.5 text-base leading-none",l?"section-tab-badge-float":""].filter(Boolean).join(" "),v.style.color="initial",v.setAttribute("aria-hidden","true"),v.textContent=i,s.appendChild(v)}b.appendChild(s)}),r.forEach(t=>{const a=t.dataset.sectionTabPanel;a&&(t.setAttribute("role","tabpanel"),t.setAttribute("id",`section-tabpanel-${a}`),t.setAttribute("aria-labelledby",`section-tab-${a}`))});const p=c.querySelector('[data-section-tab-panel][data-visible="true"]');p&&(d.style.height=`${p.offsetHeight}px`);const y=()=>{const t=c.querySelector('[data-section-tab-panel][data-visible="true"]');c.querySelectorAll("video[data-tab-video]").forEach(a=>{const o=a;if(t?.contains(o)){const i=o.play();i&&typeof i.catch=="function"&&i.catch(()=>{})}else o.pause()})};y();const L=new ResizeObserver(()=>{const t=c.querySelector('[data-section-tab-panel][data-visible="true"]');t&&(d.style.height=`${t.offsetHeight}px`)});r.forEach(t=>L.observe(t));const m=b.querySelectorAll("[data-section-tab]");m.forEach(t=>{t.addEventListener("click",()=>{const a=t.dataset.value;m.forEach(n=>{const s=n.dataset.value===a;n.dataset.state=s?"active":"inactive",n.setAttribute("aria-selected",String(s))});const o=Array.from(r),i=o.find(n=>n.dataset.visible==="true")??null,l=o.find(n=>n.dataset.sectionTabPanel===a)??null;if(l&&l!==i){const s=i&&o.indexOf(l)>o.indexOf(i)?1:-1;l.style.transition="none",l.style.setProperty("--tab-x",`${s*16}px`),i&&i.style.setProperty("--tab-x",`${-s*16}px`),d.offsetWidth,l.style.transition=""}r.forEach(n=>{n.dataset.visible=String(n.dataset.sectionTabPanel===a)}),y(),l&&(d.style.transition="height 0.25s ease-in-out",d.style.height=`${l.offsetHeight}px`,window.setTimeout(()=>{d.style.transition=""},300)),requestAnimationFrame(()=>{document.dispatchEvent(new CustomEvent("reinit-icon-labels"))}),b.dispatchEvent(new CustomEvent("section-tab-change",{detail:{value:a},bubbles:!0}))})});const g=t=>{const a=t.scrollWidth>t.clientWidth;t.dataset.overflows=String(a),t.dataset.scrollStart=String(t.scrollLeft<=1),t.dataset.scrollEnd=String(t.scrollLeft+t.clientWidth>=t.scrollWidth-1)};g(e),new ResizeObserver(()=>g(e)).observe(e),e.addEventListener("scroll",()=>g(e),{passive:!0});let f=!1,u=!1,E=0,S=0;const w=5;e.addEventListener("mousedown",t=>{t.button===0&&(f=!0,u=!1,E=t.pageX-e.offsetLeft,S=e.scrollLeft,e.style.cursor="grabbing",e.style.userSelect="none")}),e.addEventListener("mouseleave",()=>{f&&(f=!1,u=!1,e.style.cursor="",e.style.userSelect="")}),e.addEventListener("mouseup",()=>{f=!1,e.style.cursor="",e.style.userSelect="",setTimeout(()=>{u=!1},0)}),e.addEventListener("mousemove",t=>{if(!f)return;const o=t.pageX-e.offsetLeft-E;!u&&Math.abs(o)>w&&(u=!0),u&&(t.preventDefault(),e.scrollLeft=S-o)}),e.addEventListener("click",t=>{u&&(t.stopPropagation(),t.preventDefault())},!0)})};document.addEventListener("DOMContentLoaded",x);document.addEventListener("astro:after-swap",x);

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.