document.addEventListener("DOMContentLoaded",()=>{let t=0;const n=4,f=Array.from(document.querySelectorAll(".slide")),s=Array.from(document.querySelectorAll(".progress-dot")),c=document.getElementById("prevButton"),r=document.getElementById("nextButton");function a(e){f.forEach((o,l)=>{o.classList.remove("active","prev"),l===e?o.classList.add("active"):l<e&&o.classList.add("prev")}),s.forEach((o,l)=>{o.classList.toggle("active",l===e)}),c&&(c.disabled=e===0),r&&(e===n-1?r.innerHTML='Start Using! <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="5,3 19,12 5,21"/></svg>':r.innerHTML='Next <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9,18 15,12 9,6"/></svg>')}function i(e){e>=0&&e<n&&(t=e,a(t))}function d(){try{chrome.storage.local.get(["originalTabUrl"]).then(e=>{const o=e?.originalTabUrl||"";o&&!o.includes("chrome-extension://")?(window.location.href=o,chrome.storage.local.remove(["originalTabUrl"]).catch(()=>{})):window.close()}).catch(()=>{window.close()})}catch{window.close()}}c&&c.addEventListener("click",()=>{t>0&&i(t-1)}),r&&r.addEventListener("click",()=>{t<n-1?i(t+1):d()}),s.forEach((e,o)=>{e.addEventListener("click",()=>{i(o)})}),document.addEventListener("keydown",e=>{e.key==="ArrowLeft"&&t>0?i(t-1):e.key==="ArrowRight"&&t<n-1?i(t+1):e.key==="Enter"&&t===n-1&&d()}),a(0)});
//# sourceMappingURL=quickGuide.js.map
