PageSourceSearch

https://www.elliptic.co/_nuxt/Bhf5hhZk.js

js elliptic.co collected 2026-09-24 15:18:37 UTC 3,222 bytes, 1 lines download raw bytes

1import{d as U,ah as G,ai as J,u as K,v as Q,aq as W,ar as R,as as X,j as f,I as E,A as N,g as Z,Y as ee,n as M,x as g,o as c,f as w,al as te,i as S,au as ne,F as ae,r as oe,a7 as le,h as I}from"./CHz7KWu6.js";const re=["id"],se={class:"sub-nav-hero__nav-list"},ie=U({name:"sub-nav-hero",__name:"sub-nav-hero-module",props:{module:{}},setup(e){const _=G(),{firstLoadComplete:p}=J(_),t=K(),h=g(),T=g(),C=g();let u=g(null),d=!1,m=null,B=g(void 0),b=null,v=null;const H=`(max-width: ${t.$screen["2xl"]-1}px)`,P=`(min-width: ${t.$screen["2xl"]}px) and (max-width: ${t.$screen["5xl"]-1}px)`,L=`(min-width: ${t.$screen["5xl"]}px)`;function A(){p.value&&(b=t.$gsap.context(()=>{v=t.$gsap.matchMedia(),v.add(H,()=>{V()}),v.add(P,()=>{j()}),v.add(L,()=>{q()})},h.value))}function V(){x(),k()}function j(){x(),k()}function q(){x(),k()}function k(){const r=h.value,o=C.value,a=T.value,n=document.querySelector("main");if(!r||!o||!a||!n)return;const s=o.offsetHeight,l=100,i=l+s+20;B.value=i,t.$ScrollTrigger.create({trigger:o,endTrigger:n,pin:!0,pinSpacing:!1,start:`top ${l}`,end:`bottom ${i}`}),t.$ScrollTrigger.create({trigger:a,endTrigger:n,pin:!0,pinSpacing:!1,start:`bottom ${i}`,end:`bottom ${i}`})}function x(){if(!e.module.nav||!e.module.nav.length)return;const r=[],o=[],a=400;if(e.module.nav.forEach((s,l)=>{const i=s.link?.url;if(!i)return;const $=document.getElementById(i.replace(/^#/,""));if(!$)return;o.push({index:l,el:$});const O=t.$ScrollTrigger.create({trigger:$,start:`top ${a}px`,end:`bottom ${a}px`,onToggle:y=>{if(d)return;if(y.isActive){u.value=l;return}const Y=Math.min(...r.map(z=>z.start));y.scroll()<Y&&(u.value=null)}});r.push(O)}),!o.length)return;const n=o.reduce((s,l)=>l.el.getBoundingClientRect().bottom>s.el.getBoundingClientRect().bottom?l:s);t.$ScrollTrigger.create({trigger:n.el,start:`bottom ${a}px`,end:"max",onEnter:()=>{d||(u.value=null)},onLeaveBack:()=>{d||(u.value=n.index)}})}function D(r){u.value=r,d=!0,m&&clearTimeout(m),m=setTimeout(()=>{d=!1},1200)}function F(){m&&clearTimeout(m)}return Q(p,()=>{R(()=>{A()})}),W(()=>{R(()=>{A()})}),X(()=>{b&&b.revert(),F()}),(r,o)=>(c(),f("section",{class:M(["sub-nav-hero module",[e.module.variant?`sub-nav-hero--${e.module.variant}`:"",{"module--colour-inverted":e.module.colourIsInverted}]]),id:e.module.id,ref_key:"moduleRef",ref:h},[E("div",{class:"sub-nav-hero__background",ref_key:"backgroundRef",ref:T},null,512),N(ee,{class:"sub-nav-hero__container"},{default:Z(()=>[e.module.heading?(c(),w(te,{key:0,class:"sub-nav-hero__heading",heading:e.module.heading},null,8,["heading"])):S("",!0),e.module.textBlock?(c(),w(ne,{key:1,class:"sub-nav-hero__text-block","text-block":e.module.textBlock},null,8,["text-block"])):S("",!0),e.module.nav&&e.module.nav.length?(c(),f("nav",{key:2,class:"sub-nav-hero__nav",ref_key:"navRef",ref:C},[E("ul",se,[(c(!0),f(ae,null,oe(e.module.nav,(a,n)=>(c(),f("li",{class:"sub-nav-hero__nav-item",key:n},[N(le,{class:M(["sub-nav-hero__nav-button",[{active:I(u)===n}]]),type:"sub-nav",link:{...a.link,scrollToMargin:I(B)},text:a.text,onClick:s=>D(n)},null,8,["class","link","text","onClick"])]))),128))])],512)):S("",!0)]),_:1})],10,re))}}),ce=Object.assign(ie,{__name:"SubNavHeroModule"});export{ce 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.