"use strict"; (() => { function X(n, t, i) { return Math.max(n, Math.min(t, i)); } var V = class { constructor() { (this.isRunning = !1), (this.value = 0), (this.from = 0), (this.to = 0), (this.currentTime = 0); } advance(t) { var i; if (!this.isRunning) return; let e = !1; if (this.duration && this.easing) { this.currentTime += t; let s = X(0, this.currentTime / this.duration, 1); e = s >= 1; let o = e ? 1 : this.easing(s); this.value = this.from + (this.to - this.from) * o; } else this.lerp ? ((this.value = (function (o, r, l, c) { return (function (S, p, C) { return (1 - C) * S + C * p; })(o, r, 1 - Math.exp(-l * c)); })(this.value, this.to, 60 * this.lerp, t)), Math.round(this.value) === this.to && ((this.value = this.to), (e = !0))) : ((this.value = this.to), (e = !0)); e && this.stop(), (i = this.onUpdate) === null || i === void 0 || i.call(this, this.value, e); } stop() { this.isRunning = !1; } fromTo(t, i, { lerp: e, duration: s, easing: o, onStart: r, onUpdate: l }) { (this.from = this.value = t), (this.to = i), (this.lerp = e), (this.duration = s), (this.easing = o), (this.currentTime = 0), (this.isRunning = !0), r == null || r(), (this.onUpdate = l); } }, A = class { constructor(t, i, { autoResize: e = !0, debounce: s = 250 } = {}) { (this.wrapper = t), (this.content = i), (this.width = 0), (this.height = 0), (this.scrollHeight = 0), (this.scrollWidth = 0), (this.resize = () => { this.onWrapperResize(), this.onContentResize(); }), (this.onWrapperResize = () => { this.wrapper instanceof Window ? ((this.width = window.innerWidth), (this.height = window.innerHeight)) : ((this.width = this.wrapper.clientWidth), (this.height = this.wrapper.clientHeight)); }), (this.onContentResize = () => { this.wrapper instanceof Window ? ((this.scrollHeight = this.content.scrollHeight), (this.scrollWidth = this.content.scrollWidth)) : ((this.scrollHeight = this.wrapper.scrollHeight), (this.scrollWidth = this.wrapper.scrollWidth)); }), e && ((this.debouncedResize = (function (r, l) { let c; return function (...d) { let S = this; clearTimeout(c), (c = setTimeout(() => { (c = void 0), r.apply(S, d); }, l)); }; })(this.resize, s)), this.wrapper instanceof Window ? window.addEventListener("resize", this.debouncedResize, !1) : ((this.wrapperResizeObserver = new ResizeObserver(this.debouncedResize)), this.wrapperResizeObserver.observe(this.wrapper)), (this.contentResizeObserver = new ResizeObserver(this.debouncedResize)), this.contentResizeObserver.observe(this.content)), this.resize(); } destroy() { var t, i; (t = this.wrapperResizeObserver) === null || t === void 0 || t.disconnect(), (i = this.contentResizeObserver) === null || i === void 0 || i.disconnect(), this.wrapper === window && this.debouncedResize && window.removeEventListener("resize", this.debouncedResize, !1); } get limit() { return { x: this.scrollWidth - this.width, y: this.scrollHeight - this.height }; } }, z = class { constructor() { this.events = {}; } emit(t, ...i) { var e; let s = this.events[t] || []; for (let o = 0, r = s.length; o < r; o++) (e = s[o]) === null || e === void 0 || e.call(s, ...i); } on(t, i) { var e; return ( (!((e = this.events[t]) === null || e === void 0) && e.push(i)) || (this.events[t] = [i]), () => { var s; this.events[t] = (s = this.events[t]) === null || s === void 0 ? void 0 : s.filter((o) => i !== o); } ); } off(t, i) { var e; this.events[t] = (e = this.events[t]) === null || e === void 0 ? void 0 : e.filter((s) => i !== s); } destroy() { this.events = {}; } }, P = 100 / 6, L = { passive: !1 }, $ = class { constructor(t, i = { wheelMultiplier: 1, touchMultiplier: 1 }) { (this.element = t), (this.options = i), (this.touchStart = { x: 0, y: 0 }), (this.lastDelta = { x: 0, y: 0 }), (this.window = { width: 0, height: 0 }), (this.emitter = new z()), (this.onTouchStart = (e) => { let { clientX: s, clientY: o } = e.targetTouches ? e.targetTouches[0] : e; (this.touchStart.x = s), (this.touchStart.y = o), (this.lastDelta = { x: 0, y: 0 }), this.emitter.emit("scroll", { deltaX: 0, deltaY: 0, event: e }); }), (this.onTouchMove = (e) => { let { clientX: s, clientY: o } = e.targetTouches ? e.targetTouches[0] : e, r = -(s - this.touchStart.x) * this.options.touchMultiplier, l = -(o - this.touchStart.y) * this.options.touchMultiplier; (this.touchStart.x = s), (this.touchStart.y = o), (this.lastDelta = { x: r, y: l }), this.emitter.emit("scroll", { deltaX: r, deltaY: l, event: e }); }), (this.onTouchEnd = (e) => { this.emitter.emit("scroll", { deltaX: this.lastDelta.x, deltaY: this.lastDelta.y, event: e }); }), (this.onWheel = (e) => { let { deltaX: s, deltaY: o, deltaMode: r } = e; (s *= r === 1 ? P : r === 2 ? this.window.width : 1), (o *= r === 1 ? P : r === 2 ? this.window.height : 1), (s *= this.options.wheelMultiplier), (o *= this.options.wheelMultiplier), this.emitter.emit("scroll", { deltaX: s, deltaY: o, event: e }); }), (this.onWindowResize = () => { this.window = { width: window.innerWidth, height: window.innerHeight }; }), window.addEventListener("resize", this.onWindowResize, !1), this.onWindowResize(), this.element.addEventListener("wheel", this.onWheel, L), this.element.addEventListener("touchstart", this.onTouchStart, L), this.element.addEventListener("touchmove", this.onTouchMove, L), this.element.addEventListener("touchend", this.onTouchEnd, L); } on(t, i) { return this.emitter.on(t, i); } destroy() { this.emitter.destroy(), window.removeEventListener("resize", this.onWindowResize, !1), this.element.removeEventListener("wheel", this.onWheel, L), this.element.removeEventListener("touchstart", this.onTouchStart, L), this.element.removeEventListener("touchmove", this.onTouchMove, L), this.element.removeEventListener("touchend", this.onTouchEnd, L); } }, b = class { constructor({ wrapper: t = window, content: i = document.documentElement, eventsTarget: e = t, smoothWheel: s = !0, syncTouch: o = !1, syncTouchLerp: r = 0.075, touchInertiaMultiplier: l = 35, duration: c, easing: d = (y) => Math.min(1, 1.001 - Math.pow(2, -10 * y)), lerp: S = 0.1, infinite: p = !1, orientation: C = "vertical", gestureOrientation: u = "vertical", touchMultiplier: m = 1, wheelMultiplier: T = 1, autoResize: _ = !0, prevent: H, virtualScroll: N, __experimental__naiveDimensions: B = !1, } = {}) { (this._isScrolling = !1), (this._isStopped = !1), (this._isLocked = !1), (this._preventNextNativeScrollEvent = !1), (this._resetVelocityTimeout = null), (this.time = 0), (this.userData = {}), (this.lastVelocity = 0), (this.velocity = 0), (this.direction = 0), (this.animate = new V()), (this.emitter = new z()), (this.onPointerDown = (y) => { y.button === 1 && this.reset(); }), (this.onVirtualScroll = (y) => { if (typeof this.options.virtualScroll == "function" && this.options.virtualScroll(y) === !1) return; let { deltaX: v, deltaY: g, event: a } = y; if ((this.emitter.emit("virtual-scroll", { deltaX: v, deltaY: g, event: a }), a.ctrlKey)) return; let w = a.type.includes("touch"), h = a.type.includes("wheel"); if ( ((this.isTouching = a.type === "touchstart" || a.type === "touchmove"), this.options.syncTouch && w && a.type === "touchstart" && !this.isStopped && !this.isLocked) ) return void this.reset(); let E = v === 0 && g === 0, U = (this.options.gestureOrientation === "vertical" && g === 0) || (this.options.gestureOrientation === "horizontal" && v === 0); if (E || U) return; let x = a.composedPath(); x = x.slice(0, x.indexOf(this.rootElement)); let R = this.options.prevent; if ( x.find((f) => { var k, W, q, O, D; return ( f instanceof HTMLElement && ((typeof R == "function" && (R == null ? void 0 : R(f))) || ((k = f.hasAttribute) === null || k === void 0 ? void 0 : k.call(f, "data-lenis-prevent")) || (w && ((W = f.hasAttribute) === null || W === void 0 ? void 0 : W.call(f, "data-lenis-prevent-touch"))) || (h && ((q = f.hasAttribute) === null || q === void 0 ? void 0 : q.call(f, "data-lenis-prevent-wheel"))) || (((O = f.classList) === null || O === void 0 ? void 0 : O.contains("lenis")) && !( !((D = f.classList) === null || D === void 0) && D.contains("lenis-stopped") ))) ); }) ) return; if (this.isStopped || this.isLocked) return void a.preventDefault(); if (!((this.options.syncTouch && w) || (this.options.smoothWheel && h))) return (this.isScrolling = "native"), void this.animate.stop(); a.preventDefault(); let M = g; this.options.gestureOrientation === "both" ? (M = Math.abs(g) > Math.abs(v) ? g : v) : this.options.gestureOrientation === "horizontal" && (M = v); let j = w && this.options.syncTouch, I = w && a.type === "touchend" && Math.abs(M) > 5; I && (M = this.velocity * this.options.touchInertiaMultiplier), this.scrollTo( this.targetScroll + M, Object.assign( { programmatic: !1 }, j ? { lerp: I ? this.options.syncTouchLerp : 1 } : { lerp: this.options.lerp, duration: this.options.duration, easing: this.options.easing, } ) ); }), (this.onNativeScroll = () => { if ( (this._resetVelocityTimeout !== null && (clearTimeout(this._resetVelocityTimeout), (this._resetVelocityTimeout = null)), this._preventNextNativeScrollEvent) ) this._preventNextNativeScrollEvent = !1; else if (this.isScrolling === !1 || this.isScrolling === "native") { let y = this.animatedScroll; (this.animatedScroll = this.targetScroll = this.actualScroll), (this.lastVelocity = this.velocity), (this.velocity = this.animatedScroll - y), (this.direction = Math.sign(this.animatedScroll - y)), (this.isScrolling = "native"), this.emit(), this.velocity !== 0 && (this._resetVelocityTimeout = setTimeout(() => { (this.lastVelocity = this.velocity), (this.velocity = 0), (this.isScrolling = !1), this.emit(); }, 400)); } }), (window.lenisVersion = "1.1.13"), (t && t !== document.documentElement && t !== document.body) || (t = window), (this.options = { wrapper: t, content: i, eventsTarget: e, smoothWheel: s, syncTouch: o, syncTouchLerp: r, touchInertiaMultiplier: l, duration: c, easing: d, lerp: S, infinite: p, gestureOrientation: u, orientation: C, touchMultiplier: m, wheelMultiplier: T, autoResize: _, prevent: H, virtualScroll: N, __experimental__naiveDimensions: B, }), (this.dimensions = new A(t, i, { autoResize: _ })), this.updateClassName(), (this.targetScroll = this.animatedScroll = this.actualScroll), this.options.wrapper.addEventListener("scroll", this.onNativeScroll, !1), this.options.wrapper.addEventListener("pointerdown", this.onPointerDown, !1), (this.virtualScroll = new $(e, { touchMultiplier: m, wheelMultiplier: T })), this.virtualScroll.on("scroll", this.onVirtualScroll); } destroy() { this.emitter.destroy(), this.options.wrapper.removeEventListener("scroll", this.onNativeScroll, !1), this.options.wrapper.removeEventListener("pointerdown", this.onPointerDown, !1), this.virtualScroll.destroy(), this.dimensions.destroy(), this.cleanUpClassName(); } on(t, i) { return this.emitter.on(t, i); } off(t, i) { return this.emitter.off(t, i); } setScroll(t) { this.isHorizontal ? (this.rootElement.scrollLeft = t) : (this.rootElement.scrollTop = t); } resize() { this.dimensions.resize(), (this.animatedScroll = this.targetScroll = this.actualScroll), this.emit(); } emit() { this.emitter.emit("scroll", this); } reset() { (this.isLocked = !1), (this.isScrolling = !1), (this.animatedScroll = this.targetScroll = this.actualScroll), (this.lastVelocity = this.velocity = 0), this.animate.stop(); } start() { this.isStopped && ((this.isStopped = !1), this.reset()); } stop() { this.isStopped || ((this.isStopped = !0), this.animate.stop(), this.reset()); } raf(t) { let i = t - (this.time || t); (this.time = t), this.animate.advance(0.001 * i); } scrollTo( t, { offset: i = 0, immediate: e = !1, lock: s = !1, duration: o = this.options.duration, easing: r = this.options.easing, lerp: l = this.options.lerp, onStart: c, onComplete: d, force: S = !1, programmatic: p = !0, userData: C, } = {} ) { if ((!this.isStopped && !this.isLocked) || S) { if (typeof t == "string" && ["top", "left", "start"].includes(t)) t = 0; else if (typeof t == "string" && ["bottom", "right", "end"].includes(t)) t = this.limit; else { let u; if ( (typeof t == "string" ? (u = document.querySelector(t)) : t instanceof HTMLElement && t != null && t.nodeType && (u = t), u) ) { if (this.options.wrapper !== window) { let T = this.rootElement.getBoundingClientRect(); i -= this.isHorizontal ? T.left : T.top; } let m = u.getBoundingClientRect(); t = (this.isHorizontal ? m.left : m.top) + this.animatedScroll; } } if (typeof t == "number") { if ( ((t += i), (t = Math.round(t)), this.options.infinite ? p && (this.targetScroll = this.animatedScroll = this.scroll) : (t = X(0, t, this.limit)), t === this.targetScroll) ) return c == null || c(this), void (d == null || d(this)); if (((this.userData = C != null ? C : {}), e)) return ( (this.animatedScroll = this.targetScroll = t), this.setScroll(this.scroll), this.reset(), this.preventNextNativeScrollEvent(), this.emit(), d == null || d(this), void (this.userData = {}) ); p || (this.targetScroll = t), this.animate.fromTo(this.animatedScroll, t, { duration: o, easing: r, lerp: l, onStart: () => { s && (this.isLocked = !0), (this.isScrolling = "smooth"), c == null || c(this); }, onUpdate: (u, m) => { (this.isScrolling = "smooth"), (this.lastVelocity = this.velocity), (this.velocity = u - this.animatedScroll), (this.direction = Math.sign(this.velocity)), (this.animatedScroll = u), this.setScroll(this.scroll), p && (this.targetScroll = u), m || this.emit(), m && (this.reset(), this.emit(), d == null || d(this), (this.userData = {}), this.preventNextNativeScrollEvent()); }, }); } } } preventNextNativeScrollEvent() { (this._preventNextNativeScrollEvent = !0), requestAnimationFrame(() => { this._preventNextNativeScrollEvent = !1; }); } get rootElement() { return this.options.wrapper === window ? document.documentElement : this.options.wrapper; } get limit() { return this.options.__experimental__naiveDimensions ? this.isHorizontal ? this.rootElement.scrollWidth - this.rootElement.clientWidth : this.rootElement.scrollHeight - this.rootElement.clientHeight : this.dimensions.limit[this.isHorizontal ? "x" : "y"]; } get isHorizontal() { return this.options.orientation === "horizontal"; } get actualScroll() { return this.isHorizontal ? this.rootElement.scrollLeft : this.rootElement.scrollTop; } get scroll() { return this.options.infinite ? (function (i, e) { return ((i % e) + e) % e; })(this.animatedScroll, this.limit) : this.animatedScroll; } get progress() { return this.limit === 0 ? 1 : this.scroll / this.limit; } get isScrolling() { return this._isScrolling; } set isScrolling(t) { this._isScrolling !== t && ((this._isScrolling = t), this.updateClassName()); } get isStopped() { return this._isStopped; } set isStopped(t) { this._isStopped !== t && ((this._isStopped = t), this.updateClassName()); } get isLocked() { return this._isLocked; } set isLocked(t) { this._isLocked !== t && ((this._isLocked = t), this.updateClassName()); } get isSmooth() { return this.isScrolling === "smooth"; } get className() { let t = "lenis"; return ( this.isStopped && (t += " lenis-stopped"), this.isLocked && (t += " lenis-locked"), this.isScrolling && (t += " lenis-scrolling"), this.isScrolling === "smooth" && (t += " lenis-smooth"), t ); } updateClassName() { this.cleanUpClassName(), (this.rootElement.className = `${this.rootElement.className} ${this.className}`.trim()); } cleanUpClassName() { this.rootElement.className = this.rootElement.className.replace(/lenis(-\w+)?/g, "").trim(); } }; var st = new b(); function Y(n, t) { let i = new b({ lerp: 0.1, wheelMultiplier: 0.95, gestureOrientation: "vertical" }); return ( i.on("scroll", (e) => {}), i.on("scroll", n.update), t.ticker.add((e) => { i.raf(e * 1e3); }), t.ticker.lagSmoothing(), i ); } function Z() { return window.innerWidth <= 767; } var F = "https://zbvrubdalcojapjygbcz.supabase.co/functions/v1/metrics_ticker/metric-ticks"; async function K() { try { let n = await fetch(F); if (!n.ok) throw new Error("Network response was not ok"); return (await n.json()).data.map( ( e ) => `
${e.chart_name}
${e.category_name}
${e.latest_value}
` ); } catch (n) { return console.error("Error loading ticker metrics:", n), null; } } var G = "elastic.out(1, 0.9)"; document.addEventListener("DOMContentLoaded", async () => { Y(ScrollTrigger, gsap), ScrollTrigger.refresh(); let n = await K(), t = document.querySelector("body"), i = document.querySelector("#steps-section"), e = document.querySelectorAll('[fl-card="float"]'), s = document.querySelector('[fl-card="static"]'), o = document.querySelector("#scroll-section"), r = document.querySelector("[scroll-container]"), l = [...document.querySelectorAll("[scroll-items]")], c = document.querySelector("#scroll-element"), d = document.querySelector("[cord-img--wrap]"), S = document.querySelector(".tb-sect--tx"), p = document.getElementById("swiper-wrapper"), C = l.length - 1.2, u = o.parentElement, m = new Swiper("#price-slide", { init: !1, loop: !0, slidesPerView: 1.35, spaceBetween: 10, breakpoints: { 991: { slidesPerView: 4.3, spaceBetween: 10 } }, speed: 1e4, autoplay: { delay: 1, disableOnInteraction: !1 }, }); if ( ((() => { (p.innerHTML = ""), (p.innerHTML = `${n == null ? void 0 : n.join("")}`), m.init(); })(), !Z()) ) { let v = function () { let { scrollWidth: a } = r; return -(a - window.innerWidth / 1.5); }; var y = v; let g = gsap.timeline({ paused: !0 }); g .to(r, { x: v, ease: "none" }) .fromTo(u, { background: "#171717" }, { background: "#ffffff", ease: "none" }, 0) .fromTo(S, { color: "#ffffff" }, { color: "#171717", ease: "none" }, 0), ScrollTrigger.create({ trigger: o, start: "top 1%", end: () => `+=${v() * -1}`, pin: !0, pinSpacing: !0, scrub: !0, invalidateOnRefresh: !0, animation: g, }), l.forEach((a, w) => { let h = o.parentElement; ScrollTrigger.create({ trigger: a, start: "left center", end: "right center", containerAnimation: g, onEnter: (E) => { h == null || h.classList.add(`is-active-${w}`); }, onEnterBack: (E) => { h == null || h.classList.add(`is-active-${w}`); }, onLeave: (E) => { h == null || h.classList.remove(`is-active-${w}`); }, onLeaveBack: (E) => { h == null || h.classList.remove(`is-active-${w}`); }, }); }); } gsap.timeline({ scrollTrigger: { trigger: i, start: "top 5%", scrub: !0, pin: !0, pinSpacing: !0, toggleActions: "play none none reverse", }, }) .from(e, { yPercent: 150, stagger: 0.2 }) .to(s, { width: "90%", stagger: 0.2 }, ".3") .from(e, { width: "100%", stagger: 0.2 }, ".5"); let H = document.querySelector("#footer"), N = document.querySelectorAll("[logo-ic]"); gsap.timeline({ scrollTrigger: { trigger: H, start: "top 70%" } }).from(N, { yPercent: 100, duration: 1.5, stagger: 0.05, ease: G, }); }); })();