PageSourceSearch

https://quitwithjones.com/cdn/shop/t/199/assets/DependencyQuiz.071…?v=159403448569586563971783958583

js quitwithjones.com collected 2026-10-02 14:40:18 UTC 2,697 bytes, 2 lines download raw bytes

1const t = window.gsap;const l = window.ScrollToPlugin;gsap.registerPlugin(ScrollToPlugin);class h extends HTMLElement{constructor(){super(),this.currentStep=0,this.steps=[...this.querySelectorAll("[data-step]")],this.resultEl=this.querySelector(".results"),this.startBtn=this.querySelector("button"),this.bundleSlider=document.querySelector("bundle-selector"),t.registerPlugin(l),this.startBtn.addEventListener("click",this.changeStep.bind(this,1)),document.addEventListener("click",e=>{!this.contains(e.target)&&this.currentStep!==0&&(this.changeStep(0),t.to(this,{height:this.startBtn.offsetHeight,duration:.3}))});const e=this.startBtn.offsetHeight;t.set(this,{height:e}),this.initialize()}initialize(){t.set(this.steps,{autoAlpha:0}),t.set(this.resultEl,{autoAlpha:0}),this.score=0}changeStep(e,i){if(this.currentStep=e,e==0)this.initialize(),t.set(this.startBtn,{autoAlpha:1});else{const s=this.steps[this.currentStep-1],r=s.querySelectorAll("button");if(s.bound||r.forEach(o=>{o.addEventListener("click",n=>this.changeStep(this.currentStep+1,n))}),s.bound=!0,e==1&&(t.to(this.startBtn,{autoAlpha:0}),t.to(window,{scrollTo:{y:this,offsetY:100},duration:.2})),this.currentStep>1){const o=parseInt(i.target.value);this.score+=o}t.set(this.steps,{autoAlpha:0}),this.currentStep<this.steps.length?(t.set(s,{autoAlpha:1}),console.log({sectionBtns:r}),t.fromTo(r,{autoAlpha:0,y:-10},{autoAlpha:1,y:0,stagger:.15,ease:"back.inOut"})):this.showResult(),t.to(this,{height:s.offsetHeight,duration:.3})}}showResult(){console.log(this.score);let e,i;this.score<3?(e="low",i={index:1,name:"Low & Slow Bundle",duration:"6 days",url:"/products/new-low-slow"}):this.score===3||this.score===4?(e="low to moderate",i={index:2,name:"Habit Kicker Bundle",duration:"12 days",url:"/products/new-habit-kicker"}):this.score==5||this.score==6?(e="moderate",i={index:3,name:"Habit Kicker Bundle",duration:"18 days",url:"/products/new-habit-kicker"}):this.score>6&&(e="high",i={index:4,name:"Heavy Hitter Bundle",duration:"48 days",url:"/products/new-heavy-hitter"});const s=document.createElement("h2"),r=document.createElement("p");s.innerHTML=`Looks like you're a ${e} dependence nicotine user`,s.className="h2",r.className="body",this.resultEl.prepend(s,r),t.to(this.resultEl,{autoAlpha:1}),this.resultEl.querySelector("button").addEventListener("click",this.viewBundle.bind(this,i))}viewBundle(e){e.url?window.location.href=e.url:console.error("No URL defined for bundle",e),this.changeStep(0),t.to(this.resultEl,{autoAlpha:0}),this.resultEl.querySelector("h2").remove(),this.resultEl.querySelector("p").remove()}}customElements.define("dependency-quiz",h);
2//# sourceMappingURL=DependencyQuiz.07107775.min.js.map

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.