import { __esmMin as e } from "rolldown-runtime.BAw5_7tg.mjs"; import { B as t, I as n, J as r, Y as i, ae as a, fe as o, ie as s, init_jsx_runtime as c, init_npm_react_18_2 as l, init_ssg_sandbox_shims as u, j as d, l as f, navigator as p, p as m, pe as h, q as g, re as _, se as v, te as y, u as b, ue as x, window as S, x as C, ye as w, z as T } from "react.CEOW7m7F.mjs"; var ee, te, ne, re, ie, ae, oe, se, ce, le, ue, de, fe, pe, me, he, ge, _e, ve, ye, be, xe, Se, Ce, we, Te, Ee, De, Oe = e(() => { (ee = Object.create), (te = Object.defineProperty), (ne = Object.getOwnPropertyDescriptor), (re = Object.getOwnPropertyNames), (ie = Object.getPrototypeOf), (ae = Object.prototype.hasOwnProperty), (oe = (e, t) => ((t = Symbol[e]) ? t : Symbol.for(`Symbol.` + e))), (se = (e) => { throw TypeError(e); }), (ce = (e, t, n) => t in e ? te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : (e[t] = n)), (le = (e, t) => te(e, `name`, { value: t, configurable: !0 })), (ue = (e, t) => function () { return t || (0, e[re(e)[0]])((t = { exports: {} }).exports, t), t.exports; }), (de = (e, t) => { for (var n in t) te(e, n, { get: t[n], enumerable: !0 }); }), (fe = (e, t, n, r) => { if ((t && typeof t == `object`) || typeof t == `function`) for (let i of re(t)) !ae.call(e, i) && i !== n && te(e, i, { get: () => t[i], enumerable: !(r = ne(t, i)) || r.enumerable }); return e; }), (pe = (e, t, n) => ( (n = e == null ? {} : ee(ie(e))), fe(t || !e || !e.__esModule ? te(n, `default`, { value: e, enumerable: !0 }) : n, e) )), (me = (e) => [, , , ee(e?.[oe(`metadata`)] ?? null)]), (he = [`class`, `method`, `getter`, `setter`, `accessor`, `field`, `value`, `get`, `set`]), (ge = (e) => (e !== void 0 && typeof e != `function` ? se(`Function expected`) : e)), (_e = (e, t, n, r, i) => ({ kind: he[e], name: t, metadata: r, addInitializer: (e) => (n._ ? se(`Already initialized`) : i.push(ge(e || null))) })), (ve = (e, t) => ce(t, oe(`metadata`), e[3])), (ye = (e, t, n, r) => { for (var i = 0, a = e[t >> 1], o = a && a.length; i < o; i++) t & 1 ? a[i].call(n) : (r = a[i].call(n, r)); return r; }), (be = (e, t, n, r, i, a) => { var o, s, c, l, u, d = t & 7, f = !!(t & 8), p = !!(t & 16), m = d > 3 ? e.length + 1 : d ? (f ? 1 : 2) : 0, h = he[d + 5], g = d > 3 && (e[m - 1] = []), _ = e[m] || (e[m] = []), v = d && (!p && !f && (i = i.prototype), d < 5 && (d > 3 || !p) && ne( d < 4 ? i : { get [n]() { return we(this, a); }, set [n](e) { return Ee(this, a, e); } }, n )); d ? p && d < 4 && le(a, (d > 2 ? `set ` : d > 1 ? `get ` : ``) + n) : le(i, n); for (var y = r.length - 1; y >= 0; y--) (l = _e(d, n, (c = {}), e[3], _)), d && ((l.static = f), (l.private = p), (u = l.access = { has: p ? (e) => Ce(i, e) : (e) => n in e }), d ^ 3 && (u.get = p ? (e) => (d ^ 1 ? we : De)(e, i, d ^ 4 ? a : v.get) : (e) => e[n]), d > 2 && (u.set = p ? (e, t) => Ee(e, i, t, d ^ 4 ? a : v.set) : (e, t) => (e[n] = t))), (s = (0, r[y])(d ? (d < 4 ? (p ? a : v[h]) : d > 4 ? void 0 : { get: v.get, set: v.set }) : i, l)), (c._ = 1), d ^ 4 || s === void 0 ? ge(s) && (d > 4 ? g.unshift(s) : d ? (p ? (a = s) : (v[h] = s)) : (i = s)) : typeof s != `object` || !s ? se(`Object expected`) : (ge((o = s.get)) && (v.get = o), ge((o = s.set)) && (v.set = o), ge((o = s.init)) && g.unshift(o)); return d || ve(e, i), v && te(i, n, v), p ? (d ^ 4 ? a : v) : i; }), (xe = (e, t, n) => ce(e, typeof t == `symbol` ? t : t + ``, n)), (Se = (e, t, n) => t.has(e) || se(`Cannot ` + n)), (Ce = (e, t) => (Object(t) === t ? e.has(t) : se(`Cannot use the "in" operator on this value`))), (we = (e, t, n) => (Se(e, t, `read from private field`), n ? n.call(e) : t.get(e))), (Te = (e, t, n) => t.has(e) ? se(`Cannot add the same private member more than once`) : t instanceof WeakSet ? t.add(e) : t.set(e, n)), (Ee = (e, t, n, r) => (Se(e, t, `write to private field`), r ? r.call(e, n) : t.set(e, n), n)), (De = (e, t, n) => (Se(e, t, `access private method`), n)); }); function ke(e, t) { e.indexOf(t) === -1 && e.push(t); } function Ae(e, t) { let n = e.indexOf(t); n > -1 && e.splice(n, 1); } function je([...e], t, n) { let r = t < 0 ? e.length + t : t; if (r >= 0 && r < e.length) { let r = n < 0 ? e.length + n : n, [i] = e.splice(t, 1); e.splice(r, 0, i); } return e; } function Me(e) { return typeof e == `object` && !!e; } function Ne(e) { let t; return () => (t === void 0 && (t = e()), t); } function Pe(e, t) { return t ? e * (1e3 / t) : 0; } function Fe(e, t, n, r, i) { let a, o, s = 0; do (o = t + (n - t) / 2), (a = hs(o, r, i) - e), a > 0 ? (n = o) : (t = o); while (Math.abs(a) > gs && ++s < _s); return o; } function Ie(e, t, n, r) { if (e === t && n === r) return P; let i = (t) => Fe(t, 0, 1, e, n); return (e) => (e === 0 || e === 1 ? e : hs(i(e), t, r)); } function Le(e, t) { return As(e) ? e[ms(0, e.length, t)] : e; } function Re(e, t) { let n = new Set(), r = new Set(), i = !1, a = !1, o = new WeakSet(), s = { delta: 0, timestamp: 0, isProcessing: !1 }, c = 0; function l(t) { o.has(t) && (u.schedule(t), e()), c++, t(s); } let u = { schedule: (e, t = !1, a = !1) => { let s = a && i, c = s ? n : r; return t && o.add(e), c.has(e) || c.add(e), e; }, cancel: (e) => { r.delete(e), o.delete(e); }, process: (e) => { if (((s = e), i)) { a = !0; return; } (i = !0), ([n, r] = [r, n]), n.forEach(l), t && L.value && L.value.frameloop[t].push(c), (c = 0), n.clear(), (i = !1), a && ((a = !1), u.process(e)); } }; return u; } function ze(e, t) { let n = !1, r = !0, i = { delta: 0, timestamp: 0, isProcessing: !1 }, a = () => (n = !0), o = Fs.reduce((e, n) => ((e[n] = Re(a, t ? n : void 0)), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => { let a = N.useManualTiming ? i.timestamp : performance.now(); (n = !1), N.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(a - i.timestamp, Is), 1)), (i.timestamp = a), (i.isProcessing = !0), s.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), p.process(i), m.process(i), (i.isProcessing = !1), n && t && ((r = !1), e(h)); }, g = () => { (n = !0), (r = !0), i.isProcessing || e(h); }, _ = Fs.reduce((e, t) => { let r = o[t]; return (e[t] = (e, t = !1, i = !1) => (n || g(), r.schedule(e, t, i))), e; }, {}), v = (e) => { for (let t = 0; t < Fs.length; t++) o[Fs[t]].cancel(e); }; return { schedule: _, cancel: v, state: i, steps: o }; } function Be() { Rs = void 0; } function Ve(e) { return e == null; } function He(e) { let t = ``, n = ``, r = ``, i = ``; return ( e.length > 5 ? ((t = e.substring(1, 3)), (n = e.substring(3, 5)), (r = e.substring(5, 7)), (i = e.substring(7, 9))) : ((t = e.substring(1, 2)), (n = e.substring(2, 3)), (r = e.substring(3, 4)), (i = e.substring(4, 5)), (t += t), (n += n), (r += r), (i += i)), { red: parseInt(t, 16), green: parseInt(n, 16), blue: parseInt(r, 16), alpha: i ? parseInt(i, 16) / 255 : 1 } ); } function Ue(e) { var t, n; return isNaN(e) && typeof e == `string` && ((t = e.match(Ys))?.length || 0) + ((n = e.match(cc))?.length || 0) > 0; } function We(e) { let t = e.toString(), n = [], r = { color: [], number: [], var: [] }, i = [], a = 0, o = t.replace( mc, (e) => ( G.test(e) ? (r.color.push(a), i.push(uc), n.push(G.parse(e))) : e.startsWith(fc) ? (r.var.push(a), i.push(dc), n.push(e)) : (r.number.push(a), i.push(lc), n.push(parseFloat(e))), ++a, pc ) ), s = o.split(pc); return { values: n, split: s, indexes: r, types: i }; } function Ge(e) { return We(e).values; } function Ke(e) { let { split: t, types: n } = We(e), r = t.length; return (e) => { let i = ``; for (let a = 0; a < r; a++) if (((i += t[a]), e[a] !== void 0)) { let t = n[a]; t === lc ? (i += Js(e[a])) : t === uc ? (i += G.transform(e[a])) : (i += e[a]); } return i; }; } function qe(e) { let t = Ge(e), n = Ke(e); return n(t.map(hc)); } function Je(e, t, n) { return ( n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e ); } function Ye({ hue: e, saturation: t, lightness: n, alpha: r }) { (e /= 360), (t /= 100), (n /= 100); let i = 0, a = 0, o = 0; if (!t) i = a = o = n; else { let r = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r; (i = Je(s, r, e + 1 / 3)), (a = Je(s, r, e)), (o = Je(s, r, e - 1 / 3)); } return { red: Math.round(i * 255), green: Math.round(a * 255), blue: Math.round(o * 255), alpha: r }; } function Xe(e, t) { return (n) => (n > 0 ? t : e); } function Ze(e) { let t = vc(e); if ((ss(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)) return !1; let n = t.parse(e); return t === sc && (n = Ye(n)), n; } function Qe(e, t) { return bc.has(e) ? (n) => (n <= 0 ? e : t) : (n) => (n >= 1 ? t : e); } function $e(e, t) { return (n) => q(e, t, n); } function et(e) { return typeof e == `number` ? $e : typeof e == `string` ? Us(e) ? Xe : G.test(e) ? yc : xc : Array.isArray(e) ? tt : typeof e == `object` ? G.test(e) ? yc : nt : Xe; } function tt(e, t) { let n = [...e], r = n.length, i = e.map((e, n) => et(e)(e, t[n])); return (e) => { for (let t = 0; t < r; t++) n[t] = i[t](e); return n; }; } function nt(e, t) { let n = { ...e, ...t }, r = {}; for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = et(e[i])(e[i], t[i])); return (e) => { for (let t in r) n[t] = r[t](e); return n; }; } function rt(e, t) { let n = [], r = { color: 0, var: 0, number: 0 }; for (let i = 0; i < t.values.length; i++) { let a = t.types[i], o = e.indexes[a][r[a]], s = e.values[o] ?? 0; (n[i] = s), r[a]++; } return n; } function it(e, t, n) { if (typeof e == `number` && typeof t == `number` && typeof n == `number`) return q(e, t, n); let r = et(e); return r(e, t); } function at(e) { let t = 0, n = e.next(t); for (; !n.done && t < Cc; ) (t += 50), (n = e.next(t)); return t >= Cc ? 1 / 0 : t; } function ot(e, t = 100, n) { let r = n({ ...e, keyframes: [0, t] }), i = Math.min(at(r), Cc); return { type: `keyframes`, ease: (e) => r.next(i * e).value / t, duration: I(i) }; } function st(e, t, n) { let r = Math.max(t - wc, 0); return Pe(n - e(r), t - r); } function ct({ duration: e = J.duration, bounce: t = J.bounce, velocity: n = J.velocity, mass: r = J.mass }) { let i, a; ss(e <= F(J.maxDuration), `Spring duration must be 10 seconds or less`); let o = 1 - t; (o = j(J.minDamping, J.maxDamping, o)), (e = j(J.minDuration, J.maxDuration, I(e))), o < 1 ? ((i = (t) => { let r = t * o, i = r * e, a = r - n, s = ut(t, o), c = Math.exp(-i); return Tc - (a / s) * c; }), (a = (t) => { let r = t * o, a = r * e, s = a * n + n, c = o ** 2 * t ** 2 * e, l = Math.exp(-a), u = ut(t ** 2, o), d = -i(t) + Tc > 0 ? -1 : 1; return (d * ((s - c) * l)) / u; })) : ((i = (t) => { let r = Math.exp(-t * e), i = (t - n) * e + 1; return -Tc + r * i; }), (a = (t) => { let r = Math.exp(-t * e), i = (n - t) * (e * e); return r * i; })); let s = 5 / e, c = lt(i, a, s); if (((e = F(e)), isNaN(c))) return { stiffness: J.stiffness, damping: J.damping, duration: e }; { let t = c ** 2 * r; return { stiffness: t, damping: o * 2 * Math.sqrt(r * t), duration: e }; } } function lt(e, t, n) { let r = n; for (let n = 1; n < Ec; n++) r -= e(r) / t(r); return r; } function ut(e, t) { return e * Math.sqrt(1 - t * t); } function dt(e, t) { return t.some((t) => e[t] !== void 0); } function ft(e) { let t = { velocity: J.velocity, stiffness: J.stiffness, damping: J.damping, mass: J.mass, isResolvedFromDuration: !1, ...e }; if (!dt(e, Oc) && dt(e, Dc)) if (e.visualDuration) { let n = e.visualDuration, r = (2 * Math.PI) / (n * 1.2), i = r * r, a = 2 * j(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i); t = { ...t, mass: J.mass, stiffness: i, damping: a }; } else { let n = ct(e); (t = { ...t, ...n, mass: J.mass }), (t.isResolvedFromDuration = !0); } return t; } function pt(e = J.visualDuration, t = J.bounce) { let n = typeof e == `object` ? e : { visualDuration: e, keyframes: [0, 1], bounce: t }, { restSpeed: r, restDelta: i } = n, a = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], s = { done: !1, value: a }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: p } = ft({ ...n, velocity: -I(n.velocity || 0) }), m = f || 0, h = l / (2 * Math.sqrt(c * u)), g = o - a, _ = I(Math.sqrt(c / u)), v = Math.abs(g) < 5; (r ||= v ? J.restSpeed.granular : J.restSpeed.default), (i ||= v ? J.restDelta.granular : J.restDelta.default); let y; if (h < 1) { let e = ut(_, h); y = (t) => { let n = Math.exp(-h * _ * t); return o - n * (((m + h * _ * g) / e) * Math.sin(e * t) + g * Math.cos(e * t)); }; } else if (h === 1) y = (e) => o - Math.exp(-_ * e) * (g + (m + _ * g) * e); else { let e = _ * Math.sqrt(h * h - 1); y = (t) => { let n = Math.exp(-h * _ * t), r = Math.min(e * t, 300); return o - (n * ((m + h * _ * g) * Math.sinh(r) + e * g * Math.cosh(r))) / e; }; } let b = { calculatedDuration: (p && d) || null, next: (e) => { let t = y(e); if (p) s.done = e >= d; else { let n = e === 0 ? m : 0; h < 1 && (n = e === 0 ? F(m) : st(y, e, t)); let a = Math.abs(n) <= r, c = Math.abs(o - t) <= i; s.done = a && c; } return (s.value = s.done ? o : t), s; }, toString: () => { let e = Math.min(at(b), Cc), t = Sc((t) => b.next(e * t).value, e, 30); return e + `ms ` + t; }, toTransition: () => {} }; return b; } function mt({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = 0.5, restSpeed: u }) { let d = e[0], f = { done: !1, value: d }, p = (e) => (s !== void 0 && e < s) || (c !== void 0 && e > c), m = (e) => (s === void 0 ? c : c === void 0 || Math.abs(s - e) < Math.abs(c - e) ? s : c), h = n * t, g = d + h, _ = o === void 0 ? g : o(g); _ !== g && (h = _ - d); let v = (e) => -h * Math.exp(-e / r), y = (e) => _ + v(e), b = (e) => { let t = v(e), n = y(e); (f.done = Math.abs(t) <= l), (f.value = f.done ? _ : n); }, x, S, C = (e) => { p(f.value) && ((x = e), (S = pt({ keyframes: [f.value, m(f.value)], velocity: st(y, e, f.value), damping: i, stiffness: a, restDelta: l, restSpeed: u }))); }; return ( C(0), { calculatedDuration: null, next: (e) => { let t = !1; return !S && x === void 0 && ((t = !0), b(e), C(e)), x !== void 0 && e >= x ? S.next(e - x) : (!t && b(e), f); } } ); } function ht(e, t, n) { let r = [], i = n || N.mix || it, a = e.length - 1; for (let n = 0; n < a; n++) { let a = i(e[n], e[n + 1]); if (t) { let e = Array.isArray(t) ? t[n] || P : t; a = ds(e, a); } r.push(a); } return r; } function gt(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) { let a = e.length; if ((M(a === t.length, `Both input and output ranges must be the same length`), a === 1)) return () => t[0]; if (a === 2 && t[0] === t[1]) return () => t[1]; let o = e[0] === e[1]; e[0] > e[a - 1] && ((e = [...e].reverse()), (t = [...t].reverse())); let s = ht(t, r, i), c = s.length, l = (n) => { if (o && n < e[0]) return t[0]; let r = 0; if (c > 1) for (; r < e.length - 2 && !(n < e[r + 1]); r++); let i = fs(e[r], e[r + 1], n); return s[r](i); }; return n ? (t) => l(j(e[0], e[a - 1], t)) : l; } function _t(e, t) { let n = e[e.length - 1]; for (let r = 1; r <= t; r++) { let i = fs(0, t, r); e.push(q(n, 1, i)); } } function vt(e) { let t = [0]; return _t(t, e.length - 1), t; } function yt(e, t) { return e.map((e) => e * t); } function bt(e, t) { return e.map(() => t || ks).splice(0, e.length - 1); } function xt({ duration: e = 300, keyframes: t, times: n, ease: r = `easeInOut` }) { let i = As(r) ? r.map(Ps) : Ps(r), a = { done: !1, value: t[0] }, o = yt(n && n.length === t.length ? n : vt(t), e), s = gt(o, t, { ease: Array.isArray(i) ? i : bt(t, i) }); return { calculatedDuration: e, next: (t) => ((a.value = s(t)), (a.done = t >= e), a) }; } function St(e, { repeat: t, repeatType: n = `loop` }, r, i = 1) { let a = e.filter(Ac), o = i < 0 || (t && n !== `loop` && t % 2 == 1), s = o ? 0 : a.length - 1; return !s || r === void 0 ? a[s] : r; } function Ct(e) { typeof e.type == `string` && (e.type = jc[e.type]); } function wt(e) { return new Pc(e); } function Tt(e) { for (let t = 1; t < e.length; t++) e[t] ?? (e[t] = e[t - 1]); } function Et(e) { return e.includes(`scale`) ? 1 : 0; } function Dt(e, t) { if (!e || e === `none`) return Et(t); let n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u), r, i; if (n) (r = Hc), (i = n); else { let t = e.match(/^matrix\(([-\d.e\s,]+)\)$/u); (r = Lc), (i = t); } if (!i) return Et(t); let a = r[t], o = i[1].split(`,`).map(Ot); return typeof a == `function` ? a(o) : o[a]; } function Ot(e) { return parseFloat(e.trim()); } function kt(e) { let t = []; return ( Jc.forEach((n) => { let r = e.getValue(n); r !== void 0 && (t.push([n, r.get()]), r.set(n.startsWith(`scale`) ? 1 : 0)); }), t ); } function At() { if (Qc) { let e = Array.from(Xc).filter((e) => e.needsMeasurement), t = new Set(e.map((e) => e.element)), n = new Map(); t.forEach((e) => { let t = kt(e); t.length && (n.set(e, t), e.render()); }), e.forEach((e) => e.measureInitialState()), t.forEach((e) => { e.render(); let t = n.get(e); t && t.forEach(([t, n]) => { var r; (r = e.getValue(t)) == null || r.set(n); }); }), e.forEach((e) => e.measureEndState()), e.forEach((e) => { e.suspendedScrollY !== void 0 && S.scrollTo(0, e.suspendedScrollY); }); } (Qc = !1), (Zc = !1), Xc.forEach((e) => e.complete($c)), Xc.clear(); } function jt() { Xc.forEach((e) => { e.readKeyframes(), e.needsMeasurement && (Qc = !0); }); } function Mt() { ($c = !0), jt(), At(), ($c = !1); } function Nt(e, t, n) { tl(t) ? e.style.setProperty(t, n) : (e.style[t] = n); } function Pt(e, t) { let n = Ne(e); return () => rl[t] ?? n(); } function Ft(e, t) { if (e) return typeof e == `function` ? il() ? Sc(e, t) : `ease-out` : js(e) ? al(e) : Array.isArray(e) ? e.map((e) => Ft(e, t) || ol.easeOut) : ol[e]; } function It( e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = `loop`, ease: s = `easeOut`, times: c } = {}, l = void 0 ) { let u = { [t]: n }; c && (u.offset = c); let d = Ft(s, i); Array.isArray(d) && (u.easing = d), L.value && zs.waapi++; let f = { delay: r, duration: i, easing: Array.isArray(d) ? `linear` : d, fill: `both`, iterations: a + 1, direction: o === `reverse` ? `alternate` : `normal` }; l && (f.pseudoElement = l); let p = e.animate(u, f); return ( L.value && p.finished.finally(() => { zs.waapi--; }), p ); } function Lt(e) { return typeof e == `function` && `applyToOptions` in e; } function Rt({ type: e, ...t }) { return Lt(e) && il() ? e.applyToOptions(t) : ((t.duration ??= 300), (t.ease ??= `easeOut`), t); } function zt(e) { return e in cl; } function Bt(e) { typeof e.ease == `string` && zt(e.ease) && (e.ease = cl[e.ease]); } function Vt(e) { return Me(e) && `offsetHeight` in e; } function Ht(e) { var t; let { motionValue: n, name: r, repeatDelay: i, repeatType: a, damping: o, type: s } = e; if (!Vt((t = n?.owner)?.current)) return !1; let { onUpdate: c, transformTemplate: l } = n.owner.getProps(); return ( fl() && r && dl.has(r) && (r !== `transform` || !l) && !c && !i && a !== `mirror` && o !== 0 && s !== `inertia` ); } function Ut(e) { let t = e[0]; if (e.length === 1) return !0; for (let n = 0; n < e.length; n++) if (e[n] !== t) return !0; } function Wt(e, t, n, r) { let i = e[0]; if (i === null) return !1; if (t === `display` || t === `visibility`) return !0; let a = e[e.length - 1], o = pl(i, t), s = pl(a, t); return ( ss( o === s, `You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.` ), !o || !s ? !1 : Ut(e) || ((n === `spring` || Lt(n)) && r) ); } function Gt(e) { let t = vl.exec(e); if (!t) return [,]; let [, n, r, i] = t; return [`--${n ?? r}`, i]; } function Kt(e, t, n = 1) { M( n <= yl, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.` ); let [r, i] = Gt(e); if (!r) return; let a = S.getComputedStyle(t).getPropertyValue(r); if (a) { let e = a.trim(); return cs(e) ? parseFloat(e) : e; } return Us(i) ? Kt(i, t, n + 1) : i; } function qt(e, t) { return e?.[t] ?? e?.default ?? e; } function Jt(e) { let [t, n] = e.slice(0, -1).split(`(`); if (t === `drop-shadow`) return e; let [r] = n.match(Ys) || []; if (!r) return e; let i = n.replace(r, ``), a = Ol.has(t) ? 1 : 0; return r !== n && (a *= 100), t + `(` + a + i + `)`; } function Yt(e, t) { let n = Ml(e); return n !== Al && (n = K), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0; } function Xt(e) { return typeof e == `number` ? e === 0 : e === null ? !0 : e === `none` || e === `0` || ls(e); } function Zt(e, t, n) { let r = 0, i; for (; r < e.length && !i; ) { let t = e[r]; typeof t == `string` && !Nl.has(t) && We(t).values.length && (i = e[r]), r++; } if (i && n) for (let r of t) e[r] = Yt(n, i); } function Qt(e, t, n) { if (e instanceof EventTarget) return [e]; if (typeof e == `string`) { let r = document; t && (r = t.current); let i = n?.[e] ?? r.querySelectorAll(e); return i ? Array.from(i) : []; } return Array.from(e); } function E(e, t) { return new Bl(e, t); } function $t() { return Y.x || Y.y; } function en(e) { return e === `x` || e === `y` ? Y[e] ? null : ((Y[e] = !0), () => { Y[e] = !1; }) : Y.x || Y.y ? null : ((Y.x = Y.y = !0), () => { Y.x = Y.y = !1; }); } function tn(e, t) { let n = Qt(e), r = new AbortController(), i = { passive: !0, ...t, signal: r.signal }, a = () => r.abort(); return [n, i, a]; } function nn(e) { return !(e.pointerType === `touch` || $t()); } function rn(e, t, n = {}) { let [r, i, a] = tn(e, n), o = (e) => { if (!nn(e)) return; let { target: n } = e, r = t(n, e); if (typeof r != `function` || !n) return; let a = (e) => { nn(e) && (r(e), n.removeEventListener(`pointerleave`, a)); }; n.addEventListener(`pointerleave`, a, i); }; return ( r.forEach((e) => { e.addEventListener(`pointerenter`, o, i); }), a ); } function an(e) { return Kl.has(e.tagName) || e.tabIndex !== -1; } function on(e) { return (t) => { t.key === `Enter` && e(t); }; } function sn(e, t) { e.dispatchEvent(new PointerEvent(`pointer` + t, { isPrimary: !0, bubbles: !0 })); } function cn(e) { return Gl(e) && !$t(); } function ln(e, t, n = {}) { let [r, i, a] = tn(e, n), o = (e) => { let r = e.currentTarget; if (!cn(e)) return; ql.add(r); let a = t(r, e), o = (e, t) => { S.removeEventListener(`pointerup`, s), S.removeEventListener(`pointercancel`, c), ql.has(r) && ql.delete(r), cn(e) && typeof a == `function` && a(e, { success: t }); }, s = (e) => { o(e, r === S || r === document || n.useGlobalTarget || Wl(r, e.target)); }, c = (e) => { o(e, !1); }; S.addEventListener(`pointerup`, s, i), S.addEventListener(`pointercancel`, c, i); }; return ( r.forEach((e) => { let t = n.useGlobalTarget ? S : e; t.addEventListener(`pointerdown`, o, i), Vt(e) && (e.addEventListener(`focus`, (e) => Jl(e, i)), !an(e) && !e.hasAttribute(`tabindex`) && (e.tabIndex = 0)); }), a ); } function un(e) { return Me(e) && `ownerSVGElement` in e; } function dn({ target: e, borderBoxSize: t }) { var n; (n = Yl.get(e)) == null || n.forEach((n) => { n(e, { get width() { return Ql(e, t); }, get height() { return $l(e, t); } }); }); } function fn(e) { e.forEach(dn); } function pn() { typeof ResizeObserver > `u` || (Xl = new ResizeObserver(fn)); } function mn(e, t) { Xl || pn(); let n = Qt(e); return ( n.forEach((e) => { let n = Yl.get(e); n || ((n = new Set()), Yl.set(e, n)), n.add(t), Xl?.observe(e); }), () => { n.forEach((e) => { let n = Yl.get(e); n?.delete(t), n?.size || Xl?.unobserve(e); }); } ); } function hn() { (tu = () => { let e = { get width() { return S.innerWidth; }, get height() { return S.innerHeight; } }; eu.forEach((t) => t(e)); }), S.addEventListener(`resize`, tu); } function gn(e) { return ( eu.add(e), tu || hn(), () => { eu.delete(e), !eu.size && typeof tu == `function` && (S.removeEventListener(`resize`, tu), (tu = void 0)); } ); } function _n(e, t) { return typeof e == `function` ? gn(e) : mn(e, t); } function vn(e, t) { let n, r = () => { let { currentTime: r } = t, i = r === null ? 0 : r.value, a = i / 100; n !== a && e(a), (n = a); }; return R.preUpdate(r, !0), () => z(r); } function yn(e) { return un(e) && e.tagName === `svg`; } function bn(...e) { let t = !Array.isArray(e[0]), n = t ? 0 : -1, r = e[0 + n], i = e[1 + n], a = e[2 + n], o = e[3 + n], s = gt(i, a, o); return t ? s(r) : s; } function xn(e, t, n) { let r = e.get(), i = null, a = r, o, s = typeof r == `string` ? r.replace(/[\d.-]/g, ``) : void 0, c = () => { i &&= (i.stop(), null); }, l = () => { c(), (i = new Pc({ keyframes: [Cn(e.get()), Cn(a)], velocity: e.getVelocity(), type: `spring`, restDelta: 0.001, restSpeed: 0.01, ...n, onUpdate: o })); }; e.attach((t, n) => ((a = t), (o = (e) => n(Sn(e, s))), R.postRender(l), e.get()), c); let u; return X(t) && ((u = t.on(`change`, (t) => e.set(Sn(t, s)))), e.on(`destroy`, u)), u; } function Sn(e, t) { return t ? e + t : e; } function Cn(e) { return typeof e == `number` ? e : parseFloat(e); } function wn(e = !0) { let t = _(os); if (t === null) return [!0, null]; let { isPresent: n, onExitComplete: r, register: i } = t, o = a(); x(() => { if (e) return i(o); }, [e]); let s = y(() => e && r && r(o), [o, r, e]); return !n && r ? [!1, s] : [!0]; } function D(e) { let t = h(null); return t.current === null && (t.current = e()), t.current; } function Tn({ children: e, isPresent: t, anchorX: n }) { let r = a(), i = h(null), o = h({ width: 0, height: 0, top: 0, left: 0, right: 0 }), { nonce: c } = _(Z); return ( s(() => { let { width: e, height: a, top: s, left: l, right: u } = o.current; if (t || !i.current || !e || !a) return; let d = n === `left` ? `left: ${l}` : `right: ${u}`; i.current.dataset.motionPopId = r; let f = document.createElement(`style`); return ( c && (f.nonce = c), document.head.appendChild(f), f.sheet && f.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${e}px !important; height: ${a}px !important; ${d}px !important; top: ${s}px !important; } `), () => { document.head.contains(f) && document.head.removeChild(f); } ); }, [t]), m(au, { isPresent: t, childRef: i, sizeRef: o, children: g(e, { ref: i }) }) ); } function En() { return new Map(); } function Dn(e) { let t = []; return ( d.forEach(e, (e) => { r(e) && t.push(e); }), t ); } function On() { let e = h(!1); return ( rs( () => ( (e.current = !0), () => { e.current = !1; } ), [] ), e ); } function kn() { let e = On(), [t, n] = w(0), r = y(() => { e.current && n(t + 1); }, [t]), i = y(() => R.postRender(r), [r]); return [i, t]; } function An() { let e = new Set(), t = new WeakMap(), n = () => e.forEach(uu); return { add: (r) => { e.add(r), t.set(r, r.addEventListener(`willUpdate`, n)); }, remove: (r) => { e.delete(r); let i = t.get(r); i && (i(), t.delete(r)), n(); }, dirty: n }; } function jn(e) { for (let t in e) gu[t] = { ...gu[t], ...e[t] }; } function Mn(e) { return ( e.startsWith(`while`) || (e.startsWith(`drag`) && e !== `draggable`) || e.startsWith(`layout`) || e.startsWith(`onTap`) || e.startsWith(`onPan`) || e.startsWith(`onLayout`) || _u.has(e) ); } function Nn(e) { e && (vu = (t) => (t.startsWith(`on`) ? !Mn(t) : e(t))); } function Pn(e, t, n) { let r = {}; for (let i in e) { if (i === `values` && typeof e.values == `object`) continue; (vu(i) || (n === !0 && Mn(i)) || (!t && !Mn(i)) || (e.draggable && i.startsWith(`onDrag`))) && (r[i] = e[i]); } return r; } function Fn({ children: e, isValidProp: t, ...n }) { t && Nn(t), (n = { ..._(Z), ...n }), (n.isStatic = D(() => n.isStatic)); let r = v(() => n, [JSON.stringify(n.transition), n.transformPagePoint, n.reducedMotion]); return m(Z.Provider, { value: r, children: e }); } function In(e) { return typeof e == `object` && !!e && typeof e.start == `function`; } function Ln(e) { return typeof e == `string` || Array.isArray(e); } function Rn(e) { return In(e.animate) || Tu.some((t) => Ln(e[t])); } function zn(e) { return !!(Rn(e) || e.variants); } function Bn(e, t) { if (Rn(e)) { let { initial: t, animate: n } = e; return { initial: t === !1 || Ln(t) ? t : void 0, animate: Ln(n) ? n : void 0 }; } return e.inherit === !1 ? {} : t; } function Vn(e) { let { initial: t, animate: n } = Bn(e, _(yu)); return v(() => ({ initial: t, animate: n }), [Hn(t), Hn(n)]); } function Hn(e) { return Array.isArray(e) ? e.join(` `) : e; } function Un(e) { return e && typeof e == `object` && Object.prototype.hasOwnProperty.call(e, `current`); } function Wn(e, t, n) { return y( (r) => { r && e.onMount && e.onMount(r), t && (r ? t.mount(r) : t.unmount()), n && (typeof n == `function` ? n(r) : Un(n) && (n.current = r)); }, [t] ); } function Gn(e, t, n, r, i) { var a, o; let { visualElement: c } = _(yu), l = _(mu), u = _(os), d = _(Z).reducedMotion, f = h(null); (r ||= l.renderer), !f.current && r && (f.current = r(e, { visualState: t, parent: c, props: n, presenceContext: u, blockInitialAnimation: u ? u.initial === !1 : !1, reducedMotionConfig: d })); let p = f.current, m = _(Cu); p && !p.projection && i && (p.type === `html` || p.type === `svg`) && Kn(f.current, n, i, m); let g = h(!1); s(() => { p && g.current && p.update(n, u); }); let v = n[Su], y = h(!!v && !(a = S.MotionHandoffIsComplete)?.call(S, v) && (o = S.MotionHasOptimisedAnimation)?.call(S, v)); return ( rs(() => { p && ((g.current = !0), (S.MotionIsMounted = !0), p.updateFeatures(), Hl.render(p.render), y.current && p.animationState && p.animationState.animateChanges()); }), x(() => { p && (!y.current && p.animationState && p.animationState.animateChanges(), (y.current &&= (queueMicrotask(() => { var e; (e = S.MotionHandoffMarkAsComplete) == null || e.call(S, v); }), !1))); }), p ); } function Kn(e, t, n, r) { let { layoutId: i, layout: a, drag: o, dragConstraints: s, layoutScroll: c, layoutRoot: l, layoutCrossfade: u } = t; (e.projection = new n(e.latestValues, t[`data-framer-portal-id`] ? void 0 : qn(e.parent))), e.projection.setOptions({ layoutId: i, layout: a, alwaysMeasureLayout: !!o || (s && Un(s)), visualElement: e, animationType: typeof a == `string` ? a : `both`, initialPromotionConfig: r, crossfade: u, layoutScroll: c, layoutRoot: l }); } function qn(e) { if (e) return e.options.allowProjection === !1 ? qn(e.parent) : e.projection; } function Jn({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component: a }) { e && jn(e); function o(i, o) { let s, c = { ..._(Z), ...i, layoutId: Yn(i) }, { isStatic: l } = c, u = Vn(i), d = r(i, l); if (!l && ns) { Xn(c, e); let n = Zn(c); (s = n.MeasureLayout), (u.visualElement = Gn(a, d, c, t, n.ProjectionNode)); } return b(yu.Provider, { value: u, children: [ s && u.visualElement ? m(s, { visualElement: u.visualElement, ...c }) : null, n(a, i, Wn(d, u.visualElement, o), d, l, u.visualElement) ] }); } o.displayName = `motion.${typeof a == `string` ? a : `create(${a.displayName ?? a.name ?? ``})`}`; let s = i(o); return (s[Eu] = a), s; } function Yn({ layoutId: e }) { let t = _(ts).id; return t && e !== void 0 ? t + `-` + e : e; } function Xn(e, t) { _(mu).strict; } function Zn(e) { let { drag: t, layout: n } = gu; if (!t && !n) return {}; let r = { ...t, ...n }; return { MeasureLayout: t?.isEnabled(e) || n?.isEnabled(e) ? r.MeasureLayout : void 0, ProjectionNode: r.ProjectionNode }; } function Qn(e) { for (let t in e) (Du[t] = e[t]), Vs(t) && (Du[t].isCSSVariable = !0); } function $n(e, t, n) { let r = ``, i = !0; for (let a = 0; a < ku; a++) { let o = Wc[a], s = e[o]; if (s === void 0) continue; let c = !0; if (((c = typeof s == `number` ? s === (o.startsWith(`scale`) ? 1 : 0) : parseFloat(s) === 0), !c || n)) { let e = Il(s, Dl[o]); if (!c) { i = !1; let t = Ou[o] || o; r += `${t}(${e}) `; } n && (t[o] = e); } } return (r = r.trim()), n ? (r = n(t, i ? `` : r)) : i && (r = `none`), r; } function er(e) { return X(e) ? e.get() : e; } function tr(e) { let t = [{}, {}]; return ( e?.values.forEach((e, n) => { (t[0][n] = e.get()), (t[1][n] = e.getVelocity()); }), t ); } function nr(e, t, n, r) { if (typeof t == `function`) { let [i, a] = tr(r); t = t(n === void 0 ? e.custom : n, i, a); } if ((typeof t == `string` && (t = e.variants && e.variants[t]), typeof t == `function`)) { let [i, a] = tr(r); t = t(n === void 0 ? e.custom : n, i, a); } return t; } function rr({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) { let a = { latestValues: ir(n, r, i, e), renderState: t() }; return a; } function ir(e, t, n, r) { let i = {}, a = r(e, {}); for (let e in a) i[e] = er(a[e]); let { initial: o, animate: s } = e, c = Rn(e), l = zn(e); t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), s === void 0 && (s = t.animate)); let u = n ? n.initial === !1 : !1; u ||= o === !1; let d = u ? s : o; if (d && typeof d != `boolean` && !In(d)) { let t = Array.isArray(d) ? d : [d]; for (let n = 0; n < t.length; n++) { let r = nr(e, t[n]); if (r) { let { transitionEnd: e, transition: t, ...n } = r; for (let e in n) { let t = n[e]; if (Array.isArray(t)) { let e = u ? t.length - 1 : 0; t = t[e]; } t !== null && (i[e] = t); } for (let t in e) i[t] = e[t]; } } } return i; } function ar(e) { if (typeof Proxy > `u`) return e; let t = new Map(), n = (...t) => e(...t); return new Proxy(n, { get: (n, r) => (r === `create` ? e : (t.has(r) || t.set(r, e(r)), t.get(r))) }); } function or(e, { layout: t, layoutId: n }) { return Gc.has(e) || e.startsWith(`origin`) || ((t || n !== void 0) && (!!Du[e] || e === `opacity`)); } function sr(e, t, n) { let { style: r, vars: i, transformOrigin: a } = e, o = !1, s = !1; for (let e in t) { let n = t[e]; if (Gc.has(e)) { o = !0; continue; } else if (Vs(e)) { i[e] = n; continue; } else { let t = Il(n, Dl[e]); e.startsWith(`origin`) ? ((s = !0), (a[e] = t)) : (r[e] = t); } } if ((t.transform || (o || n ? (r.transform = $n(t, e.transform, n)) : (r.transform &&= `none`)), s)) { let { originX: e = `50%`, originY: t = `50%`, originZ: n = 0 } = a; r.transformOrigin = `${e} ${t} ${n}`; } } function cr(e, t, n) { for (let r in t) !X(t[r]) && !or(r, n) && (e[r] = t[r]); } function lr({ transformTemplate: e }, t) { return v(() => { let n = ju(); return sr(n, t, e), Object.assign({}, n.vars, n.style); }, [t]); } function ur(e, t) { let n = e.style || {}, r = {}; return cr(r, n, e), Object.assign(r, lr(e, t)), r; } function dr(e, t) { let n = {}, r = ur(e, t); return ( e.drag && e.dragListener !== !1 && ((n.draggable = !1), (r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = `none`), (r.touchAction = e.drag === !0 ? `none` : `pan-${e.drag === `x` ? `y` : `x`}`)), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), (n.style = r), n ); } function fr(e, t, n = 1, r = 0, i = !0) { e.pathLength = 1; let a = i ? Mu : Nu; e[a.offset] = W.transform(-r); let o = W.transform(t), s = W.transform(n); e[a.array] = `${o} ${s}`; } function pr( e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u ) { if ((sr(e, s, l), c)) { e.style.viewBox && (e.attrs.viewBox = e.style.viewBox); return; } (e.attrs = e.style), (e.style = {}); let { attrs: d, style: f } = e; d.transform && ((f.transform = d.transform), delete d.transform), (f.transform || d.transformOrigin) && ((f.transformOrigin = d.transformOrigin ?? `50% 50%`), delete d.transformOrigin), f.transform && ((f.transformBox = u?.transformBox ?? `fill-box`), delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && fr(d, i, a, o, !1); } function mr(e, t, n, r) { let i = v(() => { let n = Pu(); return pr(n, t, Fu(r), e.transformTemplate, e.style), { ...n.attrs, style: { ...n.style } }; }, [t]); if (e.style) { let t = {}; cr(t, e.style, e), (i.style = { ...t, ...i.style }); } return i; } function hr(e) { return typeof e != `string` || e.includes(`-`) ? !1 : !!(Iu.indexOf(e) > -1 || /[A-Z]/u.test(e)); } function gr(e = !1) { let n = (n, r, i, { latestValues: a }, o) => { let s = hr(n) ? mr : dr, c = s(r, a, o, n), l = Pn(r, typeof n == `string`, e), u = n === C ? {} : { ...l, ...c, ref: i }, { children: d } = r, f = v(() => (X(d) ? d.get() : d), [d]); return t(n, { ...u, children: f }); }; return n; } function _r(e, t, n) { var r; let { style: i } = e, a = {}; for (let o in i) (X(i[o]) || (t.style && X(t.style[o])) || or(o, e) || (r = n?.getValue(o))?.liveStyle !== void 0) && (a[o] = i[o]); return a; } function vr(e, t, n) { let r = _r(e, t, n); for (let n in e) if (X(e[n]) || X(t[n])) { let t = Wc.indexOf(n) === -1 ? n : `attr` + n.charAt(0).toUpperCase() + n.substring(1); r[t] = e[n]; } return r; } function yr(e, t) { return function (n, { forwardMotionProps: r } = { forwardMotionProps: !1 }) { let i = hr(n) ? Ru : Lu, a = { ...i, preloadedFeatures: e, useRender: gr(r), createVisualElement: t, Component: n }; return Jn(a); }; } function br(e, t, n) { let r = e.getProps(); return nr(r, t, n === void 0 ? r.custom : n, e); } function xr(e, t, n) { e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, E(n)); } function Sr(e) { return zu(e) ? e[e.length - 1] || 0 : e; } function Cr(e, t) { let n = br(e, t), { transitionEnd: r = {}, transition: i = {}, ...a } = n || {}; for (let t in ((a = { ...a, ...r }), a)) { let n = Sr(a[t]); xr(e, t, n); } } function wr(e) { return !!(X(e) && e.add); } function Tr(e, t) { let n = e.getValue(`willChange`); if (wr(n)) return n.add(t); if (!n && N.WillChange) { let n = new N.WillChange(`auto`); e.addValue(`willChange`, n), n.add(t); } } function Er(e) { return e.props[Su]; } function Dr(e, { repeat: t, repeatType: n = `loop` }, r) { let i = e.filter(Bu), a = t && n !== `loop` && t % 2 == 1 ? 0 : i.length - 1; return !a || r === void 0 ? i[a] : r; } function Or({ when: e, delay: t, delayChildren: n, staggerChildren: r, staggerDirection: i, repeat: a, repeatType: o, repeatDelay: s, from: c, elapsed: l, ...u }) { return !!Object.keys(u).length; } function kr({ protectedKeys: e, needsAnimating: t }, n) { let r = e.hasOwnProperty(n) && t[n] !== !0; return (t[n] = !1), r; } function Ar(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) { let { transition: a = e.getDefaultTransition(), transitionEnd: o, ...s } = t; r && (a = r); let c = [], l = i && e.animationState && e.animationState.getState()[i]; for (let t in s) { let r = e.getValue(t, e.latestValues[t] ?? null), i = s[t]; if (i === void 0 || (l && kr(l, t))) continue; let o = { delay: n, ...qt(a || {}, t) }, u = r.get(); if (u !== void 0 && !r.isAnimating && !Array.isArray(i) && i === u && !o.velocity) continue; let d = !1; if (S.MotionHandoffAnimation) { let n = Er(e); if (n) { let e = S.MotionHandoffAnimation(n, t, R); e !== null && ((o.startTime = e), (d = !0)); } } Tr(e, t), r.start(Ku(t, r, i, e.shouldReduceMotion && bl.has(t) ? { type: !1 } : o, e, d)); let f = r.animation; f && c.push(f); } return ( o && Promise.all(c).then(() => { R.update(() => { o && Cr(e, o); }); }), c ); } function jr(e, t, n = {}) { var r; let i = br(e, t, n.type === `exit` ? (r = e.presenceContext)?.custom : void 0), { transition: a = e.getDefaultTransition() || {} } = i || {}; n.transitionOverride && (a = n.transitionOverride); let o = i ? () => Promise.all(Ar(e, i, n)) : () => Promise.resolve(), s = e.variantChildren && e.variantChildren.size ? (r = 0) => { let { delayChildren: i = 0, staggerChildren: o, staggerDirection: s } = a; return Mr(e, t, i + r, o, s, n); } : () => Promise.resolve(), { when: c } = a; if (c) { let [e, t] = c === `beforeChildren` ? [o, s] : [s, o]; return e().then(() => t()); } else return Promise.all([o(), s(n.delay)]); } function Mr(e, t, n = 0, r = 0, i = 1, a) { let o = [], s = (e.variantChildren.size - 1) * r, c = i === 1 ? (e = 0) => e * r : (e = 0) => s - e * r; return ( Array.from(e.variantChildren) .sort(Nr) .forEach((e, r) => { e.notify(`AnimationStart`, t), o.push(jr(e, t, { ...a, delay: n + c(r) }).then(() => e.notify(`AnimationComplete`, t))); }), Promise.all(o) ); } function Nr(e, t) { return e.sortNodePosition(t); } function Pr(e, t, n = {}) { e.notify(`AnimationStart`, t); let r; if (Array.isArray(t)) { let i = t.map((t) => jr(e, t, n)); r = Promise.all(i); } else if (typeof t == `string`) r = jr(e, t, n); else { let i = typeof t == `function` ? br(e, t, n.custom) : t; r = Promise.all(Ar(e, i, n)); } return r.then(() => { e.notify(`AnimationComplete`, t); }); } function Fr(e, t) { if (!Array.isArray(t)) return !1; let n = t.length; if (n !== e.length) return !1; for (let r = 0; r < n; r++) if (t[r] !== e[r]) return !1; return !0; } function Ir(e) { if (!e) return; if (!e.isControllingVariants) { let t = (e.parent && Ir(e.parent)) || {}; return e.props.initial !== void 0 && (t.initial = e.props.initial), t; } let t = {}; for (let n = 0; n < qu; n++) { let r = Tu[n], i = e.props[r]; (Ln(i) || i === !1) && (t[r] = i); } return t; } function Lr(e) { return (t) => Promise.all(t.map(({ animation: t, options: n }) => Pr(e, t, n))); } function Rr(e) { let t = Lr(e), n = Vr(), r = !0, i = (t) => (n, r) => { var i; let a = br(e, r, t === `exit` ? (i = e.presenceContext)?.custom : void 0); if (a) { let { transition: e, transitionEnd: t, ...r } = a; n = { ...n, ...r, ...t }; } return n; }; function a(n) { t = n(e); } function o(a) { let { props: o } = e, s = Ir(e.parent) || {}, c = [], l = new Set(), u = {}, d = 1 / 0; for (let t = 0; t < Yu; t++) { let f = Ju[t], p = n[f], m = o[f] === void 0 ? s[f] : o[f], h = Ln(m), g = f === a ? p.isActive : null; g === !1 && (d = t); let _ = m === s[f] && m !== o[f] && h; if ( (_ && r && e.manuallyAnimateOnMount && (_ = !1), (p.protectedKeys = { ...u }), (!p.isActive && g === null) || (!m && !p.prevProp) || In(m) || typeof m == `boolean`) ) continue; let v = zr(p.prevProp, m), y = v || (f === a && p.isActive && !_ && h) || (t > d && h), b = !1, x = Array.isArray(m) ? m : [m], S = x.reduce(i(f), {}); g === !1 && (S = {}); let { prevResolvedValues: C = {} } = p, w = { ...C, ...S }, T = (t) => { (y = !0), l.has(t) && ((b = !0), l.delete(t)), (p.needsAnimating[t] = !0); let n = e.getValue(t); n && (n.liveStyle = !1); }; for (let e in w) { let t = S[e], n = C[e]; if (u.hasOwnProperty(e)) continue; let r = !1; (r = zu(t) && zu(n) ? !Fr(t, n) : t !== n), r ? (t == null ? l.add(e) : T(e)) : t !== void 0 && l.has(e) ? T(e) : (p.protectedKeys[e] = !0); } (p.prevProp = m), (p.prevResolvedValues = S), p.isActive && (u = { ...u, ...S }), r && e.blockInitialAnimation && (y = !1); let ee = _ && v, te = !ee || b; y && te && c.push(...x.map((e) => ({ animation: e, options: { type: f } }))); } if (l.size) { let t = {}; if (typeof o.initial != `boolean`) { let n = br(e, Array.isArray(o.initial) ? o.initial[0] : o.initial); n && n.transition && (t.transition = n.transition); } l.forEach((n) => { let r = e.getBaseTarget(n), i = e.getValue(n); i && (i.liveStyle = !0), (t[n] = r ?? null); }), c.push({ animation: t }); } let f = !!c.length; return ( r && (o.initial === !1 || o.initial === o.animate) && !e.manuallyAnimateOnMount && (f = !1), (r = !1), f ? t(c) : Promise.resolve() ); } function s(t, r) { var i; if (n[t].isActive === r) return Promise.resolve(); (i = e.variantChildren) == null || i.forEach((e) => { var n; return (n = e.animationState)?.setActive(t, r); }), (n[t].isActive = r); let a = o(t); for (let e in n) n[e].protectedKeys = {}; return a; } return { animateChanges: o, setActive: s, setAnimateFunction: a, getState: () => n, reset: () => { (n = Vr()), (r = !0); } }; } function zr(e, t) { return typeof t == `string` ? t !== e : Array.isArray(t) ? !Fr(t, e) : !1; } function Br(e = !1) { return { isActive: e, protectedKeys: {}, needsAnimating: {}, prevResolvedValues: {} }; } function Vr() { return { animate: Br(!0), whileInView: Br(), whileHover: Br(), whileTap: Br(), whileDrag: Br(), whileFocus: Br(), exit: Br() }; } function Hr(e) { return { point: { x: e.pageX, y: e.pageY } }; } function Ur(e, t, n, r = { passive: !0 }) { return e.addEventListener(t, n, r), () => e.removeEventListener(t, n); } function Wr(e, t, n, r) { return Ur(e, t, ed(n), r); } function O(e) { return e.max - e.min; } function Gr(e, t, n) { return Math.abs(e - t) <= n; } function Kr(e, t, n, r = 0.5) { (e.origin = r), (e.originPoint = q(t.min, t.max, e.origin)), (e.scale = O(n) / O(t)), (e.translate = q(n.min, n.max, e.origin) - e.originPoint), ((e.scale >= nd && e.scale <= rd) || isNaN(e.scale)) && (e.scale = 1), ((e.translate >= ad && e.translate <= od) || isNaN(e.translate)) && (e.translate = 0); } function qr(e, t, n, r) { Kr(e.x, t.x, n.x, r ? r.originX : void 0), Kr(e.y, t.y, n.y, r ? r.originY : void 0); } function Jr(e, t, n) { (e.min = n.min + t.min), (e.max = e.min + O(t)); } function Yr(e, t, n) { Jr(e.x, t.x, n.x), Jr(e.y, t.y, n.y); } function Xr(e, t, n) { (e.min = t.min - n.min), (e.max = e.min + O(t)); } function Zr(e, t, n) { Xr(e.x, t.x, n.x), Xr(e.y, t.y, n.y); } function Qr(e, t) { let n = ud(e.x, t.x), r = ud(e.y, t.y); return Math.sqrt(n ** 2 + r ** 2); } function $r(e, t) { let n = V.now(), r = ({ timestamp: i }) => { let a = i - n; a >= t && (z(r), e(a - t)); }; return R.setup(r, !0), () => z(r); } function ei() { if (((hd.current = !0), ns)) if (S.matchMedia) { let e = S.matchMedia(`(prefers-reduced-motion)`), t = () => (md.current = e.matches); e.addListener(t), t(); } else md.current = !1; } function ti(e, t, n) { for (let r in t) { let i = t[r], a = n[r]; if (X(i)) e.addValue(r, i); else if (X(a)) e.addValue(r, E(i, { owner: e })); else if (a !== i) if (e.hasValue(r)) { let t = e.getValue(r); t.liveStyle === !0 ? t.jump(i) : t.hasAnimated || t.set(i); } else { let t = e.getStaticValue(r); e.addValue(r, E(t === void 0 ? i : t, { owner: e })); } } for (let r in n) t[r] === void 0 && e.removeValue(r); return t; } function ni({ top: e, left: t, right: n, bottom: r }) { return { x: { min: t, max: n }, y: { min: e, max: r } }; } function ri({ x: e, y: t }) { return { top: t.min, right: e.max, bottom: t.max, left: e.min }; } function ii(e, t) { if (!t) return e; let n = t({ x: e.left, y: e.top }), r = t({ x: e.right, y: e.bottom }); return { top: n.y, left: n.x, bottom: r.y, right: r.x }; } function k(e) { return [e(`x`), e(`y`)]; } function ai(e) { return e === void 0 || e === 1; } function oi({ scale: e, scaleX: t, scaleY: n }) { return !ai(e) || !ai(t) || !ai(n); } function si(e) { return oi(e) || ci(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY; } function ci(e) { return li(e.x) || li(e.y); } function li(e) { return e && e !== `0%`; } function ui(e, t, n) { let r = e - n, i = t * r; return n + i; } function di(e, t, n, r, i) { return i !== void 0 && (e = ui(e, i, r)), ui(e, n, r) + t; } function fi(e, t = 0, n = 1, r, i) { (e.min = di(e.min, t, n, r, i)), (e.max = di(e.max, t, n, r, i)); } function pi(e, { x: t, y: n }) { fi(e.x, t.translate, t.scale, t.originPoint), fi(e.y, n.translate, n.scale, n.originPoint); } function mi(e, t, n, r = !1) { let i = n.length; if (!i) return; t.x = t.y = 1; let a, o; for (let s = 0; s < i; s++) { (a = n[s]), (o = a.projectionDelta); let { visualElement: i } = a.options; (i && i.props.style && i.props.style.display === `contents`) || (r && a.options.layoutScroll && a.scroll && a !== a.root && _i(e, { x: -a.scroll.offset.x, y: -a.scroll.offset.y }), o && ((t.x *= o.x.scale), (t.y *= o.y.scale), pi(e, o)), r && si(a.latestValues) && _i(e, a.latestValues)); } t.x < yd && t.x > vd && (t.x = 1), t.y < yd && t.y > vd && (t.y = 1); } function hi(e, t) { (e.min += t), (e.max += t); } function gi(e, t, n, r, i = 0.5) { let a = q(e.min, e.max, i); fi(e, t, n, a, r); } function _i(e, t) { gi(e.x, t.x, t.scaleX, t.scale, t.originX), gi(e.y, t.y, t.scaleY, t.scale, t.originY); } function vi(e, t) { return ni(ii(e.getBoundingClientRect(), t)); } function yi(e, t, n) { let r = vi(e, n), { scroll: i } = t; return i && (hi(r.x, i.offset.x), hi(r.y, i.offset.y)), r; } function bi(e, t) { return t ? { point: t(e.point) } : e; } function xi(e, t) { return { x: e.x - t.x, y: e.y - t.y }; } function Si({ point: e }, t) { return { point: e, delta: xi(e, wi(t)), offset: xi(e, Ci(t)), velocity: Ti(t, 0.1) }; } function Ci(e) { return e[0]; } function wi(e) { return e[e.length - 1]; } function Ti(e, t) { if (e.length < 2) return { x: 0, y: 0 }; let n = e.length - 1, r = null, i = wi(e); for (; n >= 0 && ((r = e[n]), !(i.timestamp - r.timestamp > F(t))); ) n--; if (!r) return { x: 0, y: 0 }; let a = I(i.timestamp - r.timestamp); if (a === 0) return { x: 0, y: 0 }; let o = { x: (i.x - r.x) / a, y: (i.y - r.y) / a }; return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o; } function Ei(e, { min: t, max: n }, r) { return ( t !== void 0 && e < t ? (e = r ? q(t, e, r.min) : Math.max(e, t)) : n !== void 0 && e > n && (e = r ? q(n, e, r.max) : Math.min(e, n)), e ); } function Di(e, t, n) { return { min: t === void 0 ? void 0 : e.min + t, max: n === void 0 ? void 0 : e.max + n - (e.max - e.min) }; } function Oi(e, { top: t, left: n, bottom: r, right: i }) { return { x: Di(e.x, n, i), y: Di(e.y, t, r) }; } function ki(e, t) { let n = t.min - e.min, r = t.max - e.max; return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), { min: n, max: r }; } function Ai(e, t) { return { x: ki(e.x, t.x), y: ki(e.y, t.y) }; } function ji(e, t) { let n = 0.5, r = O(e), i = O(t); return i > r ? (n = fs(t.min, t.max - r, e.min)) : r > i && (n = fs(e.min, e.max - i, t.min)), j(0, 1, n); } function Mi(e, t) { let n = {}; return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n; } function Ni(e = Sd) { return e === !1 ? (e = 0) : e === !0 && (e = Sd), { x: Pi(e, `left`, `right`), y: Pi(e, `top`, `bottom`) }; } function Pi(e, t, n) { return { min: Fi(e, t), max: Fi(e, n) }; } function Fi(e, t) { return typeof e == `number` ? e : e[t] || 0; } function Ii(e, t, n) { return (t === !0 || t === e) && (n === null || n === e); } function Li(e, t = 10) { let n = null; return Math.abs(e.y) > t ? (n = `y`) : Math.abs(e.x) > t && (n = `x`), n; } function Ri(e, t) { return t.max === t.min ? 0 : (e / (t.max - t.min)) * 100; } function zi(e) { let [t, n] = wn(), r = _(ts); return m(jd, { ...e, layoutGroup: r, switchLayoutGroup: _(Cu), isPresent: t, safeToRemove: n }); } function Bi(e, t, n) { let r = X(e) ? e : E(e); return r.start(Ku(``, r, t, n)), r.animation; } function Vi(e, t, n, r, i, a) { i ? ((e.opacity = q(0, n.opacity ?? 1, Ld(r))), (e.opacityExit = q(t.opacity ?? 1, 0, Rd(r)))) : a && (e.opacity = q(t.opacity ?? 1, n.opacity ?? 1, r)); for (let i = 0; i < Pd; i++) { let a = `border${Nd[i]}Radius`, o = Hi(t, a), s = Hi(n, a); if (o === void 0 && s === void 0) continue; (o ||= 0), (s ||= 0); let c = o === 0 || s === 0 || Id(o) === Id(s); c ? ((e[a] = Math.max(q(Fd(o), Fd(s), r), 0)), (U.test(s) || U.test(o)) && (e[a] += `%`)) : (e[a] = s); } (t.rotate || n.rotate) && (e.rotate = q(t.rotate || 0, n.rotate || 0, r)); } function Hi(e, t) { return e[t] === void 0 ? e.borderRadius : e[t]; } function Ui(e, t, n) { return (r) => (r < e ? 0 : r > t ? 1 : n(fs(e, t, r))); } function Wi(e, t) { (e.min = t.min), (e.max = t.max); } function A(e, t) { Wi(e.x, t.x), Wi(e.y, t.y); } function Gi(e, t) { (e.translate = t.translate), (e.scale = t.scale), (e.originPoint = t.originPoint), (e.origin = t.origin); } function Ki(e, t, n, r, i) { return (e -= t), (e = ui(e, 1 / n, r)), i !== void 0 && (e = ui(e, 1 / i, r)), e; } function qi(e, t = 0, n = 1, r = 0.5, i, a = e, o = e) { if (U.test(t)) { t = parseFloat(t); let e = q(o.min, o.max, t / 100); t = e - o.min; } if (typeof t != `number`) return; let s = q(a.min, a.max, r); e === a && (s -= t), (e.min = Ki(e.min, t, n, s, i)), (e.max = Ki(e.max, t, n, s, i)); } function Ji(e, t, [n, r, i], a, o) { qi(e, t[n], t[r], t[i], t.scale, a, o); } function Yi(e, t, n, r) { Ji(e.x, t, zd, n ? n.x : void 0, r ? r.x : void 0), Ji(e.y, t, Bd, n ? n.y : void 0, r ? r.y : void 0); } function Xi(e) { return e.translate === 0 && e.scale === 1; } function Zi(e) { return Xi(e.x) && Xi(e.y); } function Qi(e, t) { return e.min === t.min && e.max === t.max; } function $i(e, t) { return Qi(e.x, t.x) && Qi(e.y, t.y); } function ea(e, t) { return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max); } function ta(e, t) { return ea(e.x, t.x) && ea(e.y, t.y); } function na(e) { return O(e.x) / O(e.y); } function ra(e, t) { return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint; } function ia(e, t, n) { let r = ``, i = e.x.translate / t.x, a = e.y.translate / t.y, o = n?.z || 0; if ( ((i || a || o) && (r = `translate3d(${i}px, ${a}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) ) { let { transformPerspective: e, rotate: t, rotateX: i, rotateY: a, skewX: o, skewY: s } = n; e && (r = `perspective(${e}px) ${r}`), t && (r += `rotate(${t}deg) `), i && (r += `rotateX(${i}deg) `), a && (r += `rotateY(${a}deg) `), o && (r += `skewX(${o}deg) `), s && (r += `skewY(${s}deg) `); } let s = e.x.scale * t.x, c = e.y.scale * t.y; return (s !== 1 || c !== 1) && (r += `scale(${s}, ${c})`), r || `none`; } function aa(e, t, n, r) { let { latestValues: i } = t; i[e] && ((n[e] = i[e]), t.setStaticValue(e, 0), r && (r[e] = 0)); } function oa(e) { if (((e.hasCheckedOptimisedAppear = !0), e.root === e)) return; let { visualElement: t } = e.options; if (!t) return; let n = Er(t); if (S.MotionHasOptimisedAnimation(n, `transform`)) { let { layout: t, layoutId: r } = e.options; S.MotionCancelOptimisedAnimation(n, `transform`, R, !(t || r)); } let { parent: r } = e; r && !r.hasCheckedOptimisedAppear && oa(r); } function sa({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) { return class { constructor(e = {}, n = t?.()) { (this.id = Kd++), (this.animationId = 0), (this.children = new Set()), (this.options = {}), (this.isTreeAnimating = !1), (this.isAnimationBlocked = !1), (this.isLayoutDirty = !1), (this.isProjectionDirty = !1), (this.isSharedProjectionDirty = !1), (this.isTransformDirty = !1), (this.updateManuallyBlocked = !1), (this.updateBlockedByResize = !1), (this.isUpdating = !1), (this.isSVG = !1), (this.needsReset = !1), (this.shouldResetTransform = !1), (this.hasCheckedOptimisedAppear = !1), (this.treeScale = { x: 1, y: 1 }), (this.eventHandlers = new Map()), (this.hasTreeAnimated = !1), (this.updateScheduled = !1), (this.scheduleUpdate = () => this.update()), (this.projectionUpdateScheduled = !1), (this.checkUpdateFailed = () => { this.isUpdating && ((this.isUpdating = !1), this.clearAllSnapshots()); }), (this.updateProjection = () => { (this.projectionUpdateScheduled = !1), L.value && (Hd.nodes = Hd.calculatedTargetDeltas = Hd.calculatedProjections = 0), this.nodes.forEach(ua), this.nodes.forEach(_a), this.nodes.forEach(va), this.nodes.forEach(da), L.addProjectionMetrics && L.addProjectionMetrics(Hd); }), (this.resolvedRelativeTargetAt = 0), (this.hasProjected = !1), (this.isVisible = !0), (this.animationProgress = 0), (this.sharedNodes = new Map()), (this.latestValues = e), (this.root = n ? n.root || n : this), (this.path = n ? [...n.path, n] : []), (this.parent = n), (this.depth = n ? n.depth + 1 : 0); for (let e = 0; e < this.path.length; e++) this.path[e].shouldResetTransform = !0; this.root === this && (this.nodes = new fd()); } addEventListener(e, t) { return this.eventHandlers.has(e) || this.eventHandlers.set(e, new ps()), this.eventHandlers.get(e).add(t); } notifyListeners(e, ...t) { let n = this.eventHandlers.get(e); n && n.notify(...t); } hasListeners(e) { return this.eventHandlers.has(e); } mount(t) { if (this.instance) return; (this.isSVG = un(t) && !yn(t)), (this.instance = t); let { layoutId: n, layout: r, visualElement: i } = this.options; if ( (i && !i.current && i.mount(t), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (r || n) && (this.isLayoutDirty = !0), e) ) { let n, r = () => (this.root.updateBlockedByResize = !1); e(t, () => { (this.root.updateBlockedByResize = !0), n && n(), (n = $r(r, 250)), Od.hasAnimatedSinceResize && ((Od.hasAnimatedSinceResize = !1), this.nodes.forEach(ga)); }); } n && this.root.registerSharedNode(n, this), this.options.animate !== !1 && i && (n || r) && this.addEventListener( `didUpdate`, ({ delta: e, hasLayoutChanged: t, hasRelativeLayoutChanged: n, layout: r }) => { if (this.isTreeAnimationBlocked()) { (this.target = void 0), (this.relativeTarget = void 0); return; } let a = this.options.transition || i.getDefaultTransition() || qd, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = i.getProps(), c = !this.targetLayout || !ta(this.targetLayout, r), l = !t && n; if (this.options.layoutRoot || this.resumeFrom || l || (t && (c || !this.currentAnimation))) { this.resumeFrom && ((this.resumingFrom = this.resumeFrom), (this.resumingFrom.resumingFrom = void 0)); let t = { ...qt(a, `layout`), onPlay: o, onComplete: s }; (i.shouldReduceMotion || this.options.layoutRoot) && ((t.delay = 0), (t.type = !1)), this.startAnimation(t), this.setAnimationOrigin(e, l); } else t || ga(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete(); this.targetLayout = r; } ); } unmount() { this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this); let e = this.getStack(); e && e.remove(this), this.parent && this.parent.children.delete(this), (this.instance = void 0), this.eventHandlers.clear(), z(this.updateProjection); } blockUpdate() { this.updateManuallyBlocked = !0; } unblockUpdate() { this.updateManuallyBlocked = !1; } isUpdateBlocked() { return this.updateManuallyBlocked || this.updateBlockedByResize; } isTreeAnimationBlocked() { return this.isAnimationBlocked || (this.parent && this.parent.isTreeAnimationBlocked()) || !1; } startUpdate() { this.isUpdateBlocked() || ((this.isUpdating = !0), this.nodes && this.nodes.forEach(ya), this.animationId++); } getTransformTemplate() { let { visualElement: e } = this.options; return e && e.getProps().transformTemplate; } willUpdate(e = !0) { if (((this.root.hasTreeAnimated = !0), this.root.isUpdateBlocked())) { this.options.onExitComplete && this.options.onExitComplete(); return; } if ( (S.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && oa(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) ) return; this.isLayoutDirty = !0; for (let e = 0; e < this.path.length; e++) { let t = this.path[e]; (t.shouldResetTransform = !0), t.updateScroll(`snapshot`), t.options.layoutRoot && t.willUpdate(!1); } let { layoutId: t, layout: n } = this.options; if (t === void 0 && !n) return; let r = this.getTransformTemplate(); (this.prevTransformTemplateValue = r ? r(this.latestValues, ``) : void 0), this.updateSnapshot(), e && this.notifyListeners(`willUpdate`); } update() { this.updateScheduled = !1; let e = this.isUpdateBlocked(); if (e) { this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(pa); return; } this.isUpdating || this.nodes.forEach(ma), (this.isUpdating = !1), this.nodes.forEach(ha), this.nodes.forEach(ca), this.nodes.forEach(la), this.clearAllSnapshots(); let t = V.now(); (B.delta = j(0, 1e3 / 60, t - B.timestamp)), (B.timestamp = t), (B.isProcessing = !0), Ls.update.process(B), Ls.preRender.process(B), Ls.render.process(B), (B.isProcessing = !1); } didUpdate() { this.updateScheduled || ((this.updateScheduled = !0), Hl.read(this.scheduleUpdate)); } clearAllSnapshots() { this.nodes.forEach(fa), this.sharedNodes.forEach(ba); } scheduleUpdateProjection() { this.projectionUpdateScheduled || ((this.projectionUpdateScheduled = !0), R.preRender(this.updateProjection, !1, !0)); } scheduleCheckAfterUnmount() { R.postRender(() => { this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed(); }); } updateSnapshot() { this.snapshot || !this.instance || ((this.snapshot = this.measure()), this.snapshot && !O(this.snapshot.measuredBox.x) && !O(this.snapshot.measuredBox.y) && (this.snapshot = void 0)); } updateLayout() { if ( !this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) ) return; if (this.resumeFrom && !this.resumeFrom.instance) for (let e = 0; e < this.path.length; e++) { let t = this.path[e]; t.updateScroll(); } let e = this.layout; (this.layout = this.measure(!1)), (this.layoutCorrected = $()), (this.isLayoutDirty = !1), (this.projectionDelta = void 0), this.notifyListeners(`measure`, this.layout.layoutBox); let { visualElement: t } = this.options; t && t.notify(`LayoutMeasure`, this.layout.layoutBox, e ? e.layoutBox : void 0); } updateScroll(e = `measure`) { let t = !!(this.options.layoutScroll && this.instance); if ( (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === e && (t = !1), t && this.instance) ) { let t = r(this.instance); this.scroll = { animationId: this.root.animationId, phase: e, isRoot: t, offset: n(this.instance), wasRoot: this.scroll ? this.scroll.isRoot : t }; } } resetTransform() { if (!i) return; let e = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, t = this.projectionDelta && !Zi(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, ``) : void 0, a = r !== this.prevTransformTemplateValue; e && this.instance && (t || si(this.latestValues) || a) && (i(this.instance, r), (this.shouldResetTransform = !1), this.scheduleRender()); } measure(e = !0) { let t = this.measurePageBox(), n = this.removeElementScroll(t); return ( e && (n = this.removeTransform(n)), Ea(n), { animationId: this.root.animationId, measuredBox: t, layoutBox: n, latestValues: {}, source: this.id } ); } measurePageBox() { var e; let { visualElement: t } = this.options; if (!t) return $(); let n = t.measureViewportBox(), r = (e = this.scroll)?.wasRoot || this.path.some(Oa); if (!r) { let { scroll: e } = this.root; e && (hi(n.x, e.offset.x), hi(n.y, e.offset.y)); } return n; } removeElementScroll(e) { var t; let n = $(); if ((A(n, e), (t = this.scroll)?.wasRoot)) return n; for (let t = 0; t < this.path.length; t++) { let r = this.path[t], { scroll: i, options: a } = r; r !== this.root && i && a.layoutScroll && (i.wasRoot && A(n, e), hi(n.x, i.offset.x), hi(n.y, i.offset.y)); } return n; } applyTransform(e, t = !1) { let n = $(); A(n, e); for (let e = 0; e < this.path.length; e++) { let r = this.path[e]; !t && r.options.layoutScroll && r.scroll && r !== r.root && _i(n, { x: -r.scroll.offset.x, y: -r.scroll.offset.y }), si(r.latestValues) && _i(n, r.latestValues); } return si(this.latestValues) && _i(n, this.latestValues), n; } removeTransform(e) { let t = $(); A(t, e); for (let e = 0; e < this.path.length; e++) { let n = this.path[e]; if (!n.instance || !si(n.latestValues)) continue; oi(n.latestValues) && n.updateSnapshot(); let r = $(), i = n.measurePageBox(); A(r, i), Yi(t, n.latestValues, n.snapshot ? n.snapshot.layoutBox : void 0, r); } return si(this.latestValues) && Yi(t, this.latestValues), t; } setTargetDelta(e) { (this.targetDelta = e), this.root.scheduleUpdateProjection(), (this.isProjectionDirty = !0); } setOptions(e) { this.options = { ...this.options, ...e, crossfade: e.crossfade === void 0 ? !0 : e.crossfade }; } clearMeasurements() { (this.scroll = void 0), (this.layout = void 0), (this.snapshot = void 0), (this.prevTransformTemplateValue = void 0), (this.targetDelta = void 0), (this.target = void 0), (this.isLayoutDirty = !1); } forceRelativeParentToResolveTarget() { this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== B.timestamp && this.relativeParent.resolveTargetDelta(!0); } resolveTargetDelta(e = !1) { var t; let n = this.getLead(); (this.isProjectionDirty ||= n.isProjectionDirty), (this.isTransformDirty ||= n.isTransformDirty), (this.isSharedProjectionDirty ||= n.isSharedProjectionDirty); let r = !!this.resumingFrom || this !== n, i = !( e || (r && this.isSharedProjectionDirty) || this.isProjectionDirty || (t = this.parent)?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize ); if (i) return; let { layout: a, layoutId: o } = this.options; if (!(!this.layout || !(a || o))) { if (((this.resolvedRelativeTargetAt = B.timestamp), !this.targetDelta && !this.relativeTarget)) { let e = this.getClosestProjectingParent(); e && e.layout && this.animationProgress !== 1 ? ((this.relativeParent = e), this.forceRelativeParentToResolveTarget(), (this.relativeTarget = $()), (this.relativeTargetOrigin = $()), Zr(this.relativeTargetOrigin, this.layout.layoutBox, e.layout.layoutBox), A(this.relativeTarget, this.relativeTargetOrigin)) : (this.relativeParent = this.relativeTarget = void 0); } if (!(!this.relativeTarget && !this.targetDelta)) { if ( (this.target || ((this.target = $()), (this.targetWithTransforms = $())), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Yr(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? (this.target = this.applyTransform(this.layout.layoutBox)) : A(this.target, this.layout.layoutBox), pi(this.target, this.targetDelta)) : A(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) ) { this.attemptToResolveRelativeTarget = !1; let e = this.getClosestProjectingParent(); e && !!e.resumingFrom == !!this.resumingFrom && !e.options.layoutScroll && e.target && this.animationProgress !== 1 ? ((this.relativeParent = e), this.forceRelativeParentToResolveTarget(), (this.relativeTarget = $()), (this.relativeTargetOrigin = $()), Zr(this.relativeTargetOrigin, this.target, e.target), A(this.relativeTarget, this.relativeTargetOrigin)) : (this.relativeParent = this.relativeTarget = void 0); } L.value && Hd.calculatedTargetDeltas++; } } } getClosestProjectingParent() { if (!(!this.parent || oi(this.parent.latestValues) || ci(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent(); } isProjecting() { return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout); } calcProjection() { var e; let t = this.getLead(), n = !!this.resumingFrom || this !== t, r = !0; if ( ((this.isProjectionDirty || (e = this.parent)?.isProjectionDirty) && (r = !1), n && (this.isSharedProjectionDirty || this.isTransformDirty) && (r = !1), this.resolvedRelativeTargetAt === B.timestamp && (r = !1), r) ) return; let { layout: i, layoutId: a } = this.options; if ( ((this.isTreeAnimating = !!( (this.parent && this.parent.isTreeAnimating) || this.currentAnimation || this.pendingAnimation )), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(i || a)) ) return; A(this.layoutCorrected, this.layout.layoutBox); let o = this.treeScale.x, s = this.treeScale.y; mi(this.layoutCorrected, this.treeScale, this.path, n), t.layout && !t.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && ((t.target = t.layout.layoutBox), (t.targetWithTransforms = $())); let { target: c } = t; if (!c) { this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender()); return; } !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Gi(this.prevProjectionDelta.x, this.projectionDelta.x), Gi(this.prevProjectionDelta.y, this.projectionDelta.y)), qr(this.projectionDelta, this.layoutCorrected, c, this.latestValues), (this.treeScale.x !== o || this.treeScale.y !== s || !ra(this.projectionDelta.x, this.prevProjectionDelta.x) || !ra(this.projectionDelta.y, this.prevProjectionDelta.y)) && ((this.hasProjected = !0), this.scheduleRender(), this.notifyListeners(`projectionUpdate`, c)), L.value && Hd.calculatedProjections++; } hide() { this.isVisible = !1; } show() { this.isVisible = !0; } scheduleRender(e = !0) { var t; if (((t = this.options.visualElement) == null || t.scheduleRender(), e)) { let e = this.getStack(); e && e.scheduleRender(); } this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0); } createProjectionDeltas() { (this.prevProjectionDelta = cd()), (this.projectionDelta = cd()), (this.projectionDeltaWithTransform = cd()); } setAnimationOrigin(e, t = !1) { let n = this.snapshot, r = n ? n.latestValues : {}, i = { ...this.latestValues }, a = cd(); (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), (this.attemptToResolveRelativeTarget = !t); let o = $(), s = n ? n.source : void 0, c = this.layout ? this.layout.source : void 0, l = s !== c, u = this.getStack(), d = !u || u.members.length <= 1, f = !!(l && !d && this.options.crossfade === !0 && !this.path.some(wa)); this.animationProgress = 0; let p; (this.mixTargetDelta = (t) => { let n = t / 1e3; xa(a.x, e.x, n), xa(a.y, e.y, n), this.setTargetDelta(a), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zr(o, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Ca(this.relativeTarget, this.relativeTargetOrigin, o, n), p && $i(this.relativeTarget, p) && (this.isProjectionDirty = !1), (p ||= $()), A(p, this.relativeTarget)), l && ((this.animationValues = i), Vi(i, r, this.latestValues, n, f, d)), this.root.scheduleUpdateProjection(), this.scheduleRender(), (this.animationProgress = n); }), this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0); } startAnimation(e) { var t, n, r; this.notifyListeners(`animationStart`), (t = this.currentAnimation) == null || t.stop(), (r = (n = this.resumingFrom)?.currentAnimation) == null || r.stop(), (this.pendingAnimation &&= (z(this.pendingAnimation), void 0)), (this.pendingAnimation = R.update(() => { (Od.hasAnimatedSinceResize = !0), zs.layout++, (this.motionValue ||= E(0)), (this.currentAnimation = Bi(this.motionValue, [0, 1e3], { ...e, velocity: 0, isSync: !0, onUpdate: (t) => { this.mixTargetDelta(t), e.onUpdate && e.onUpdate(t); }, onStop: () => { zs.layout--; }, onComplete: () => { zs.layout--, e.onComplete && e.onComplete(), this.completeAnimation(); } })), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), (this.pendingAnimation = void 0); })); } completeAnimation() { this.resumingFrom && ((this.resumingFrom.currentAnimation = void 0), (this.resumingFrom.preserveOpacity = void 0)); let e = this.getStack(); e && e.exitAnimationComplete(), (this.resumingFrom = this.currentAnimation = this.animationValues = void 0), this.notifyListeners(`animationComplete`); } finishAnimation() { this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Gd), this.currentAnimation.stop()), this.completeAnimation(); } applyTransformsToTarget() { let e = this.getLead(), { targetWithTransforms: t, target: n, layout: r, latestValues: i } = e; if (!(!t || !n || !r)) { if (this !== e && this.layout && r && Da(this.options.animationType, this.layout.layoutBox, r.layoutBox)) { n = this.target || $(); let t = O(this.layout.layoutBox.x); (n.x.min = e.target.x.min), (n.x.max = n.x.min + t); let r = O(this.layout.layoutBox.y); (n.y.min = e.target.y.min), (n.y.max = n.y.min + r); } A(t, n), _i(t, i), qr(this.projectionDeltaWithTransform, this.layoutCorrected, t, i); } } registerSharedNode(e, t) { this.sharedNodes.has(e) || this.sharedNodes.set(e, new Vd()); let n = this.sharedNodes.get(e); n.add(t); let r = t.options.initialPromotionConfig; t.promote({ transition: r ? r.transition : void 0, preserveFollowOpacity: r && r.shouldPreserveFollowOpacity ? r.shouldPreserveFollowOpacity(t) : void 0 }); } isLead() { let e = this.getStack(); return e ? e.lead === this : !0; } getLead() { var e; let { layoutId: t } = this.options; return (t && (e = this.getStack())?.lead) || this; } getPrevLead() { var e; let { layoutId: t } = this.options; return t ? (e = this.getStack())?.prevLead : void 0; } getStack() { let { layoutId: e } = this.options; if (e) return this.root.sharedNodes.get(e); } promote({ needsReset: e, transition: t, preserveFollowOpacity: n } = {}) { let r = this.getStack(); r && r.promote(this, n), e && ((this.projectionDelta = void 0), (this.needsReset = !0)), t && this.setOptions({ transition: t }); } relegate() { let e = this.getStack(); return e ? e.relegate(this) : !1; } resetSkewAndRotation() { let { visualElement: e } = this.options; if (!e) return; let t = !1, { latestValues: n } = e; if (((n.z || n.rotate || n.rotateX || n.rotateY || n.rotateZ || n.skewX || n.skewY) && (t = !0), !t)) return; let r = {}; n.z && aa(`z`, e, r, this.animationValues); for (let t = 0; t < Ud.length; t++) aa(`rotate${Ud[t]}`, e, r, this.animationValues), aa(`skew${Ud[t]}`, e, r, this.animationValues); for (let t in (e.render(), r)) e.setStaticValue(t, r[t]), this.animationValues && (this.animationValues[t] = r[t]); e.scheduleRender(); } getProjectionStyles(e) { if (!this.instance || this.isSVG) return; if (!this.isVisible) return Wd; let t = { visibility: `` }, n = this.getTransformTemplate(); if (this.needsReset) return ( (this.needsReset = !1), (t.opacity = ``), (t.pointerEvents = er(e?.pointerEvents) || ``), (t.transform = n ? n(this.latestValues, ``) : `none`), t ); let r = this.getLead(); if (!this.projectionDelta || !this.layout || !r.target) { let t = {}; return ( this.options.layoutId && ((t.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity), (t.pointerEvents = er(e?.pointerEvents) || ``)), this.hasProjected && !si(this.latestValues) && ((t.transform = n ? n({}, ``) : `none`), (this.hasProjected = !1)), t ); } let i = r.animationValues || r.latestValues; this.applyTransformsToTarget(), (t.transform = ia(this.projectionDeltaWithTransform, this.treeScale, i)), n && (t.transform = n(i, t.transform)); let { x: a, y: o } = this.projectionDelta; for (let e in ((t.transformOrigin = `${a.origin * 100}% ${o.origin * 100}% 0`), r.animationValues ? (t.opacity = r === this ? i.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : i.opacityExit) : (t.opacity = r === this ? (i.opacity === void 0 ? `` : i.opacity) : i.opacityExit === void 0 ? 0 : i.opacityExit), Du)) { if (i[e] === void 0) continue; let { correct: n, applyTo: a, isCSSVariable: o } = Du[e], s = t.transform === `none` ? i[e] : n(i[e], r); if (a) { let e = a.length; for (let n = 0; n < e; n++) t[a[n]] = s; } else o ? (this.options.visualElement.renderState.vars[e] = s) : (t[e] = s); } return this.options.layoutId && (t.pointerEvents = r === this ? er(e?.pointerEvents) || `` : `none`), t; } clearSnapshot() { this.resumeFrom = this.snapshot = void 0; } resetTree() { this.root.nodes.forEach((e) => { var t; return (t = e.currentAnimation)?.stop(); }), this.root.nodes.forEach(pa), this.root.sharedNodes.clear(); } }; } function ca(e) { e.updateLayout(); } function la(e) { var t; let n = (t = e.resumeFrom)?.snapshot || e.snapshot; if (e.isLead() && e.layout && n && e.hasListeners(`didUpdate`)) { let { layoutBox: t, measuredBox: r } = e.layout, { animationType: i } = e.options, a = n.source !== e.layout.source; i === `size` ? k((e) => { let r = a ? n.measuredBox[e] : n.layoutBox[e], i = O(r); (r.min = t[e].min), (r.max = r.min + i); }) : Da(i, n.layoutBox, t) && k((r) => { let i = a ? n.measuredBox[r] : n.layoutBox[r], o = O(t[r]); (i.max = i.min + o), e.relativeTarget && !e.currentAnimation && ((e.isProjectionDirty = !0), (e.relativeTarget[r].max = e.relativeTarget[r].min + o)); }); let o = cd(); qr(o, t, n.layoutBox); let s = cd(); a ? qr(s, e.applyTransform(r, !0), n.measuredBox) : qr(s, t, n.layoutBox); let c = !Zi(o), l = !1; if (!e.resumeFrom) { let r = e.getClosestProjectingParent(); if (r && !r.resumeFrom) { let { snapshot: i, layout: a } = r; if (i && a) { let o = $(); Zr(o, n.layoutBox, i.layoutBox); let s = $(); Zr(s, t, a.layoutBox), ta(o, s) || (l = !0), r.options.layoutRoot && ((e.relativeTarget = s), (e.relativeTargetOrigin = o), (e.relativeParent = r)); } } } e.notifyListeners(`didUpdate`, { layout: t, snapshot: n, delta: s, layoutDelta: o, hasLayoutChanged: c, hasRelativeLayoutChanged: l }); } else if (e.isLead()) { let { onExitComplete: t } = e.options; t && t(); } e.options.transition = void 0; } function ua(e) { L.value && Hd.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), (e.isSharedProjectionDirty ||= !!( e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty )), (e.isTransformDirty ||= e.parent.isTransformDirty)); } function da(e) { e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1; } function fa(e) { e.clearSnapshot(); } function pa(e) { e.clearMeasurements(); } function ma(e) { e.isLayoutDirty = !1; } function ha(e) { let { visualElement: t } = e.options; t && t.getProps().onBeforeLayoutMeasure && t.notify(`BeforeLayoutMeasure`), e.resetTransform(); } function ga(e) { e.finishAnimation(), (e.targetDelta = e.relativeTarget = e.target = void 0), (e.isProjectionDirty = !0); } function _a(e) { e.resolveTargetDelta(); } function va(e) { e.calcProjection(); } function ya(e) { e.resetSkewAndRotation(); } function ba(e) { e.removeLeadSnapshot(); } function xa(e, t, n) { (e.translate = q(t.translate, 0, n)), (e.scale = q(t.scale, 1, n)), (e.origin = t.origin), (e.originPoint = t.originPoint); } function Sa(e, t, n, r) { (e.min = q(t.min, n.min, r)), (e.max = q(t.max, n.max, r)); } function Ca(e, t, n, r) { Sa(e.x, t.x, n.x, r), Sa(e.y, t.y, n.y, r); } function wa(e) { return e.animationValues && e.animationValues.opacityExit !== void 0; } function Ta(e) { (e.min = Yd(e.min)), (e.max = Yd(e.max)); } function Ea(e) { Ta(e.x), Ta(e.y); } function Da(e, t, n) { return e === `position` || (e === `preserve-aspect` && !Gr(na(t), na(n), 0.2)); } function Oa(e) { var t; return e !== e.root && (t = e.scroll)?.wasRoot; } function ka(e, t, n) { let { props: r } = e; e.animationState && r.whileHover && e.animationState.setActive(`whileHover`, n === `Start`); let i = `onHover` + n, a = r[i]; a && R.postRender(() => a(t, Hr(t))); } function Aa(e, t, n) { let { props: r } = e; if (e.current instanceof HTMLButtonElement && e.current.disabled) return; e.animationState && r.whileTap && e.animationState.setActive(`whileTap`, n === `Start`); let i = `onTap` + (n === `End` ? `` : n), a = r[i]; a && R.postRender(() => a(t, Hr(t))); } function ja({ root: e, ...t }) { let n = e || document; af.has(n) || af.set(n, {}); let r = af.get(n), i = JSON.stringify(t); return r[i] || (r[i] = new IntersectionObserver(cf, { root: e, ...t })), r[i]; } function Ma(e, t, n) { let r = ja(t); return ( rf.set(e, n), r.observe(e), () => { rf.delete(e), r.unobserve(e); } ); } function Na({ viewport: e = {} }, { viewport: t = {} } = {}) { return (n) => e[n] !== t[n]; } function Pa(e, { style: t, vars: n }, r, i) { for (let a in (Object.assign(e.style, t, i && i.getProjectionStyles(r)), n)) e.style.setProperty(a, n[a]); } function Fa(e) { return S.getComputedStyle(e); } function Ia(e, t, n, r) { for (let n in (Pa(e, t, void 0, r), t.attrs)) e.setAttribute(hf.has(n) ? n : bu(n), t.attrs[n]); } function La(e, t, n, r) { let i = n[t], { length: a, position: o } = Ef[t], s = i.current, c = n.time; (i.current = e[`scroll${o}`]), (i.scrollLength = e[`scroll${a}`] - e[`client${a}`]), (i.offset.length = 0), (i.offset[0] = 0), (i.offset[1] = i.scrollLength), (i.progress = fs(0, i.scrollLength, i.current)); let l = r - c; i.velocity = l > Cf ? 0 : Pe(i.current - s, l); } function Ra(e, t, n) { La(e, `x`, t, n), La(e, `y`, t, n), (t.time = n); } function za(e, t) { let n = { x: 0, y: 0 }, r = e; for (; r && r !== t; ) if (Vt(r)) (n.x += r.offsetLeft), (n.y += r.offsetTop), (r = r.offsetParent); else if (r.tagName === `svg`) { let e = r.getBoundingClientRect(); r = r.parentElement; let t = r.getBoundingClientRect(); (n.x += e.left - t.left), (n.y += e.top - t.top); } else if (r instanceof SVGGraphicsElement) { let { x: e, y: t } = r.getBBox(); (n.x += e), (n.y += t); let i = null, a = r.parentNode; for (; !i; ) a.tagName === `svg` && (i = a), (a = r.parentNode); r = i; } else break; return n; } function Ba(e, t, n = 0) { let r = 0; if ((e in Df && (e = Df[e]), typeof e == `string`)) { let t = parseFloat(e); e.endsWith(`px`) ? (r = t) : e.endsWith(`%`) ? (e = t / 100) : e.endsWith(`vw`) ? (r = (t / 100) * document.documentElement.clientWidth) : e.endsWith(`vh`) ? (r = (t / 100) * document.documentElement.clientHeight) : (e = t); } return typeof e == `number` && (r = t * e), n + r; } function Va(e, t, n, r) { let i = Array.isArray(e) ? e : Of, a = 0, o = 0; return ( typeof e == `number` ? (i = [e, e]) : typeof e == `string` && ((e = e.trim()), (i = e.includes(` `) ? e.split(` `) : [e, Df[e] ? e : `0`])), (a = Ba(i[0], n, r)), (o = Ba(i[1], t)), a - o ); } function Ha(e) { return `getBBox` in e && e.tagName !== `svg` ? e.getBBox() : { width: e.clientWidth, height: e.clientHeight }; } function Ua(e, t, n) { let { offset: r = kf.All } = n, { target: i = e, axis: a = `y` } = n, o = a === `y` ? `height` : `width`, s = i === e ? Af : za(i, e), c = i === e ? { width: e.scrollWidth, height: e.scrollHeight } : Ha(i), l = { width: e.clientWidth, height: e.clientHeight }; t[a].offset.length = 0; let u = !t[a].interpolate, d = r.length; for (let e = 0; e < d; e++) { let n = Va(r[e], l[o], c[o], s[a]); !u && n !== t[a].interpolatorOffsets[e] && (u = !0), (t[a].offset[e] = n); } u && ((t[a].interpolate = gt(t[a].offset, vt(r), { clamp: !1 })), (t[a].interpolatorOffsets = [...t[a].offset])), (t[a].progress = j(0, 1, t[a].interpolate(t[a].current))); } function Wa(e, t = e, n) { if (((n.x.targetOffset = 0), (n.y.targetOffset = 0), t !== e)) { let r = t; for (; r && r !== e; ) (n.x.targetOffset += r.offsetLeft), (n.y.targetOffset += r.offsetTop), (r = r.offsetParent); } (n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth), (n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight), (n.x.containerLength = e.clientWidth), (n.y.containerLength = e.clientHeight); } function Ga(e, t, n, r = {}) { return { measure: (t) => { Wa(e, r.target, n), Ra(e, n, t), (r.offset || r.target) && Ua(e, n, r); }, notify: () => t(n) }; } function Ka(e, { container: t = document.scrollingElement, ...n } = {}) { if (!t) return P; let r = Nf.get(t); r || ((r = new Set()), Nf.set(t, r)); let i = Tf(), a = Ga(t, e, i, n); if ((r.add(a), !jf.has(t))) { let e = () => { for (let e of r) e.measure(B.timestamp); R.preUpdate(n); }, n = () => { for (let e of r) e.notify(); }, i = () => R.read(e); jf.set(t, i); let a = Pf(t); S.addEventListener(`resize`, i, { passive: !0 }), t !== document.documentElement && Mf.set(t, _n(t, i)), a.addEventListener(`scroll`, i, { passive: !0 }), i(); } let o = jf.get(t); return ( R.read(o, !1, !0), () => { var e; z(o); let n = Nf.get(t); if (!n || (n.delete(a), n.size)) return; let r = jf.get(t); jf.delete(t), r && (Pf(t).removeEventListener(`scroll`, r), (e = Mf.get(t)) == null || e(), S.removeEventListener(`resize`, r)); } ); } function qa(e) { let t = { value: 0 }, n = Ka((n) => { t.value = n[e.axis].progress * 100; }, e); return { currentTime: t, cancel: n }; } function Ja({ source: e, container: t, ...n }) { let { axis: r } = n; e && (t = e); let i = Ff.get(t) ?? new Map(); Ff.set(t, i); let a = n.target ?? `self`, o = i.get(a) ?? {}, s = r + (n.offset ?? []).join(`,`); return ( o[s] || (o[s] = !n.target && nl() ? new ScrollTimeline({ source: t, axis: r }) : qa({ container: t, ...n })), o[s] ); } function Ya(e, t) { let n = Ja(t); return e.attachTimeline({ timeline: t.target ? void 0 : n, observe: (e) => ( e.pause(), vn((t) => { e.time = e.duration * t; }, n) ) }); } function Xa(e) { return e.length === 2; } function Za(e, t) { return Xa(e) ? Ka((n) => { e(n[t.axis].progress, n); }, t) : vn(e, Ja(t)); } function Qa(e, { axis: t = `y`, container: n = document.scrollingElement, ...r } = {}) { if (!n) return P; let i = { axis: t, container: n, ...r }; return typeof e == `function` ? Za(e, i) : Ya(e, i); } function $a(e, t) { ss( !!(!t || t.current), `You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.` ); } function eo({ container: e, target: t, layoutEffect: n = !0, ...r } = {}) { let i = D(If), a = n ? rs : x; return ( a( () => ( $a(`target`, t), $a(`container`, e), Qa( (e, { x: t, y: n }) => { i.scrollX.set(t.current), i.scrollXProgress.set(t.progress), i.scrollY.set(n.current), i.scrollYProgress.set(n.progress); }, { ...r, container: e?.current || void 0, target: t?.current || void 0 } ) ), [e, t, JSON.stringify(r.offset)] ), i ); } function to(e) { let t = D(() => E(e)), { isStatic: n } = _(Z); if (n) { let [, n] = w(e); x(() => t.on(`change`, n), []); } return t; } function no(e, t) { let n = to(t()), r = () => n.set(t()); return ( r(), rs(() => { let t = () => R.preRender(r, !1, !0), n = e.map((e) => e.on(`change`, t)); return () => { n.forEach((e) => e()), z(r); }; }), n ); } function ro(e) { (zl.current = []), e(); let t = no(zl.current, e); return (zl.current = void 0), t; } function io(e, t, n, r) { if (typeof e == `function`) return ro(e); let i = typeof t == `function` ? t : bn(t, n, r); return Array.isArray(e) ? ao(e, i) : ao([e], ([e]) => i(e)); } function ao(e, t) { let n = D(() => []); return no(e, () => { n.length = 0; let r = e.length; for (let t = 0; t < r; t++) n[t] = e[t].get(); return t(n); }); } function oo(e, t = {}) { let { isStatic: n } = _(Z), r = () => (X(e) ? e.get() : e); if (n) return io(r); let i = to(r()); return s(() => xn(i, e, t), [i, JSON.stringify(t)]), i; } function so(e) { let t = h(0), { isStatic: n } = _(Z); x(() => { if (n) return; let r = ({ timestamp: n, delta: r }) => { (t.current ||= n), e(n - t.current, r); }; return R.update(r, !0), () => z(r); }, [e]); } function co() { !hd.current && ei(); let [e] = w(md.current); return e; } function lo() { let e = co(), { reducedMotion: t } = _(Z); return t === `never` ? !1 : t === `always` ? !0 : e; } function uo(e) { e.values.forEach((e) => e.stop()); } function fo(e, t) { let n = [...t].reverse(); n.forEach((n) => { let r = e.getVariant(n); r && Cr(e, r), e.variantChildren && e.variantChildren.forEach((e) => { fo(e, t); }); }); } function po(e, t) { if (Array.isArray(t)) return fo(e, t); if (typeof t == `string`) return fo(e, [t]); Cr(e, t); } function mo() { let e = !1, t = new Set(), n = { subscribe(e) { return t.add(e), () => void t.delete(e); }, start(n, r) { M( e, `controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.` ); let i = []; return ( t.forEach((e) => { i.push(Pr(e, n, { transitionOverride: r })); }), Promise.all(i) ); }, set(n) { return ( M( e, `controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.` ), t.forEach((e) => { po(e, n); }) ); }, stop() { t.forEach((e) => { uo(e); }); }, mount() { return ( (e = !0), () => { (e = !1), n.stop(); } ); } }; return n; } function ho(e) { return typeof e == `object` && !Array.isArray(e); } function go(e, t, n, r) { return typeof e == `string` && ho(t) ? Qt(e, n, r) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e]; } function _o(e, t, n) { return e * (t + 1); } function vo(e, t, n, r) { return typeof t == `number` ? t : t.startsWith(`-`) || t.startsWith(`+`) ? Math.max(0, e + parseFloat(t)) : t === `<` ? n : r.get(t) ?? e; } function yo(e, t, n) { for (let r = 0; r < e.length; r++) { let i = e[r]; i.at > t && i.at < n && (Ae(e, i), r--); } } function bo(e, t, n, r, i, a) { yo(e, i, a); for (let o = 0; o < t.length; o++) e.push({ value: t[o], at: q(i, a, r[o]), easing: Le(n, o) }); } function xo(e, t) { for (let n = 0; n < e.length; n++) e[n] = e[n] / (t + 1); } function So(e, t) { return e.at === t.at ? (e.value === null ? 1 : t.value === null ? -1 : 0) : e.at - t.at; } function Co(e, { defaultTransition: t = {}, ...n } = {}, r, i) { let a = t.duration || 0.3, o = new Map(), s = new Map(), c = {}, l = new Map(), u = 0, d = 0, f = 0; for (let n = 0; n < e.length; n++) { let o = e[n]; if (typeof o == `string`) { l.set(o, d); continue; } else if (!Array.isArray(o)) { l.set(o.name, vo(d, o.at, u, l)); continue; } let [p, m, h = {}] = o; h.at !== void 0 && (d = vo(d, h.at, u, l)); let g = 0, _ = (e, n, r, o = 0, s = 0) => { let c = Eo(e), { delay: l = 0, times: u = vt(c), type: p = `keyframes`, repeat: m, repeatType: h, repeatDelay: _ = 0, ...v } = n, { ease: y = t.ease || `easeOut`, duration: b } = n, x = typeof l == `function` ? l(o, s) : l, S = c.length, C = Lt(p) ? p : i?.[p]; if (S <= 2 && C) { let e = 100; if (S === 2 && Vf(c)) { let t = c[1] - c[0]; e = Math.abs(t); } let t = { ...v }; b !== void 0 && (t.duration = F(b)); let n = ot(t, e, C); (y = n.ease), (b = n.duration); } b ??= a; let w = d + x; u.length === 1 && u[0] === 0 && (u[1] = 1); let T = u.length - c.length; if ((T > 0 && _t(u, T), c.length === 1 && c.unshift(null), m)) { M(m < zf, `Repeat count too high, must be less than 20`), (b = _o(b, m)); let e = [...c], t = [...u]; y = Array.isArray(y) ? [...y] : [y]; let n = [...y]; for (let r = 0; r < m; r++) { c.push(...e); for (let i = 0; i < e.length; i++) u.push(t[i] + (r + 1)), y.push(i === 0 ? `linear` : Le(n, i - 1)); } xo(u, m); } let ee = w + b; bo(r, c, y, u, w, ee), (g = Math.max(x + b, g)), (f = Math.max(ee, f)); }; if (X(p)) { let e = wo(p, s); _(m, h, To(`default`, e)); } else { let e = go(p, m, r, c), t = e.length; for (let n = 0; n < t; n++) { (m = m), (h = h); let r = e[n], i = wo(r, s); for (let e in m) _(m[e], Do(h, e), To(e, i), n, t); } } (u = d), (d += g); } return ( s.forEach((e, r) => { for (let i in e) { let a = e[i]; a.sort(So); let s = [], c = [], l = []; for (let e = 0; e < a.length; e++) { let { at: t, value: n, easing: r } = a[e]; s.push(n), c.push(fs(0, f, t)), l.push(r || `easeOut`); } c[0] !== 0 && (c.unshift(0), s.unshift(s[0]), l.unshift(Rf)), c[c.length - 1] !== 1 && (c.push(1), s.push(null)), o.has(r) || o.set(r, { keyframes: {}, transition: {} }); let u = o.get(r); (u.keyframes[i] = s), (u.transition[i] = { ...t, duration: f, ease: l, times: c, ...n }); } }), o ); } function wo(e, t) { return !t.has(e) && t.set(e, {}), t.get(e); } function To(e, t) { return t[e] || (t[e] = []), t[e]; } function Eo(e) { return Array.isArray(e) ? e : [e]; } function Do(e, t) { return e && e[t] ? { ...e, ...e[t] } : { ...e }; } function Oo(e, t) { return e in t; } function ko(e) { let t = { presenceContext: null, props: {}, visualState: { renderState: { transform: {}, transformOrigin: {}, style: {}, vars: {}, attrs: {} }, latestValues: {} } }, n = un(e) && !yn(e) ? new gf(t) : new mf(t); n.mount(e), pd.set(e, n); } function Ao(e) { let t = { presenceContext: null, props: {}, visualState: { renderState: { output: {} }, latestValues: {} } }, n = new Hf(t); n.mount(e), pd.set(e, n); } function jo(e, t) { return X(e) || typeof e == `number` || (typeof e == `string` && !ho(t)); } function Mo(e, t, n, r) { let i = []; if (jo(e, t)) i.push(Bi(e, (ho(t) && t.default) || t, n && (n.default || n))); else { let a = go(e, t, r), o = a.length; M(!!o, `No valid elements provided.`); for (let e = 0; e < o; e++) { let r = a[e], s = r instanceof Element ? ko : Ao; pd.has(r) || s(r); let c = pd.get(r), l = { ...n }; `delay` in l && typeof l.delay == `function` && (l.delay = l.delay(e, o)), i.push(...Ar(c, { ...t, transition: l }, {})); } } return i; } function No(e, t, n) { let r = [], i = Co(e, t, n, { spring: pt }); return ( i.forEach(({ keyframes: e, transition: t }, n) => { r.push(...Mo(n, e, t)); }), r ); } function Po(e) { return Array.isArray(e) && e.some(Array.isArray); } function Fo(e) { function t(t, n, r) { let i = []; i = Po(t) ? No(t, n, e) : Mo(t, n, r, e); let a = new _l(i); return e && e.animations.push(a), a; } return t; } function Io() { let e = D(mo); return rs(e.mount, []), e; } function Lo(e) { return typeof e == `object` && !!e && Eu in e; } function Ro(e) { if (Lo(e)) return e[Eu]; } function zo() { return Bo; } function Bo(e) { Zd.current && ((Zd.current.isUpdating = !1), Zd.current.blockUpdate(), e && e()); } function Vo() { let e = y(() => { let e = Zd.current; e && e.resetTree(); }, []); return e; } function Ho(e, t, { root: n, margin: r, amount: i = `some` } = {}) { let a = Qt(e), o = new WeakMap(), s = (e) => { e.forEach((e) => { let n = o.get(e.target); if (e.isIntersecting !== !!n) if (e.isIntersecting) { let n = t(e.target, e); typeof n == `function` ? o.set(e.target, n) : c.unobserve(e.target); } else typeof n == `function` && (n(e), o.delete(e.target)); }); }, c = new IntersectionObserver(s, { root: n, rootMargin: r, threshold: typeof i == `number` ? i : Gf[i] }); return a.forEach((e) => c.observe(e)), () => c.disconnect(); } function Uo(e, { root: t, margin: n, amount: r, once: i = !1, initial: a = !1 } = {}) { let [o, s] = w(a); return ( x(() => { if (!e.current || (i && o)) return; let a = () => (s(!0), i ? void 0 : () => s(!1)), c = { root: (t && t.current) || void 0, margin: n, amount: r }; return Ho(e.current, a, c); }, [t, e, n, i, r]), o ); } function Wo() { let [e, t] = kn(), n = zo(), r = h(-1); return ( x(() => { R.postRender(() => R.postRender(() => { t === r.current && (N.instantAnimations = !1); }) ); }, [t]), (i) => { n(() => { (N.instantAnimations = !0), e(), i(), (r.current = t + 1); }); } ); } function Go(e, t, n, r) { if (!r) return e; let i = e.findIndex((e) => e.value === t); if (i === -1) return e; let a = r > 0 ? 1 : -1, o = e[i + a]; if (!o) return e; let s = e[i], c = o.layout, l = q(c.min, c.max, 0.5); return (a === 1 && s.layout.max + n > l) || (a === -1 && s.layout.min + n < l) ? je(e, i, i + a) : e; } function Ko({ children: e, as: t = `ul`, axis: n = `y`, onReorder: r, values: i, ...a }, o) { let s = D(() => yf[t]), c = [], l = h(!1); M(!!i, `Reorder.Group must be provided a values prop`); let u = { axis: n, registerItem: (e, t) => { let r = c.findIndex((t) => e === t.value); r === -1 ? c.push({ value: e, layout: t[n] }) : (c[r].layout = t[n]), c.sort(Jo); }, updateOrder: (e, t, n) => { if (l.current) return; let a = Go(c, e, t, n); c !== a && ((l.current = !0), r(a.map(qo).filter((e) => i.indexOf(e) !== -1))); } }; return ( x(() => { l.current = !1; }), m(s, { ...a, ref: o, ignoreStrict: !0, children: m(Yf.Provider, { value: u, children: e }) }) ); } function qo(e) { return e.value; } function Jo(e, t) { return e.layout.min - t.layout.min; } function Yo(e, t = 0) { return X(e) ? e : to(t); } function Xo({ children: e, style: t = {}, value: n, as: r = `li`, onDrag: i, layout: a = !0, ...o }, s) { let c = D(() => yf[r]), l = _(Yf), u = { x: Yo(t.x), y: Yo(t.y) }, d = io([u.x, u.y], ([e, t]) => (e || t ? 1 : `unset`)); M(!!l, `Reorder.Item must be a child of Reorder.Group`); let { axis: f, registerItem: p, updateOrder: h } = l; return m(c, { drag: f, ...o, dragSnapToOrigin: !0, style: { ...t, x: u.x, y: u.y, zIndex: d }, layout: a, onDrag: (e, t) => { let { velocity: r } = t; r[f] && h(n, u[f].get(), r[f]), i && i(e, t); }, onLayoutMeasure: (e) => p(n, e), ref: s, ignoreStrict: !0, children: e }); } function Zo(e, t) { if (e === `first`) return 0; { let n = t - 1; return e === `last` ? n : n / 2; } } function Qo(e = 0.1, { startDelay: t = 0, from: n = 0, ease: r } = {}) { return (i, a) => { let o = typeof n == `number` ? n : Zo(n, a), s = Math.abs(o - i), c = e * s; if (r) { let t = a * e, n = Ps(r); c = n(c / t) * t; } return t + c; }; } var $o, es, ts, ns, rs, os, j, ss, M, N, cs, ls, P, us, ds, fs, ps, F, I, ms, hs, gs, _s, vs, ys, bs, xs, Ss, Cs, ws, Ts, Es, Ds, Os, ks, As, js, Ms, Ns, Ps, L, Fs, Is, R, z, B, Ls, Rs, V, zs, Bs, Vs, Hs, Us, Ws, Gs, Ks, qs, Js, Ys, Xs, Zs, Qs, $s, ec, tc, nc, rc, H, U, W, ic, ac, oc, sc, G, cc, lc, uc, dc, fc, pc, mc, hc, K, q, gc, _c, vc, yc, bc, xc, Sc, Cc, wc, J, Tc, Ec, Dc, Oc, kc, Ac, jc, Mc, Nc, Pc, Fc, Ic, Lc, Rc, zc, Bc, Vc, Hc, Uc, Wc, Gc, Kc, qc, Jc, Yc, Xc, Zc, Qc, $c, el, tl, nl, rl, il, al, ol, sl, cl, ll, ul, dl, fl, pl, ml, hl, gl, _l, vl, yl, bl, xl, Sl, Cl, wl, Tl, El, Dl, Ol, kl, Al, jl, Ml, Nl, Pl, Fl, Il, Ll, Rl, zl, Bl, Vl, Hl, Ul, Y, Wl, Gl, Kl, ql, Jl, Yl, Xl, Zl, Ql, $l, eu, tu, X, nu, ru, iu, Z, au, ou, su, cu, lu, uu, du, fu, pu, mu, hu, gu, _u, vu, yu, bu, xu, Su, Cu, wu, Tu, Eu, Du, Ou, ku, Au, ju, Mu, Nu, Pu, Fu, Iu, Lu, Ru, zu, Bu, Vu, Hu, Uu, Wu, Gu, Ku, qu, Ju, Yu, Q, Xu, Zu, Qu, $u, ed, td, nd, rd, id, ad, od, sd, cd, ld, $, ud, dd, fd, pd, md, hd, gd, _d, vd, yd, bd, xd, Sd, Cd, wd, Td, Ed, Dd, Od, kd, Ad, jd, Md, Nd, Pd, Fd, Id, Ld, Rd, zd, Bd, Vd, Hd, Ud, Wd, Gd, Kd, qd, Jd, Yd, Xd, Zd, Qd, $d, ef, tf, nf, rf, af, sf, cf, lf, uf, df, ff, pf, mf, hf, gf, _f, vf, yf, bf, xf, Sf, Cf, wf, Tf, Ef, Df, Of, kf, Af, jf, Mf, Nf, Pf, Ff, If, Lf, Rf, zf, Bf, Vf, Hf, Uf, Wf, Gf, Kf, qf, Jf, Yf, Xf, Zf, Qf = e(() => { for (let e in (u(), Oe(), l(), c(), ($o = ue({ "../../../node_modules/@emotion/memoize/dist/memoize.browser.cjs.js"(exports) { Object.defineProperty(exports, `__esModule`, { value: !0 }); function t(e) { var t = {}; return function (n) { return t[n] === void 0 && (t[n] = e(n)), t[n]; }; } exports.default = t; } })), (es = ue({ "../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.cjs.js"(exports) { Object.defineProperty(exports, `__esModule`, { value: !0 }); function t(e) { return e && typeof e == `object` && `default` in e ? e.default : e; } var n = t($o()), r = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, i = n(function (e) { return r.test(e) || (e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91); }); exports.default = i; } })), (ts = T({})), (ns = S !== void 0), (rs = ns ? o : x), (os = T(null)), (j = (e, t, n) => (n > t ? t : n < e ? e : n)), (ss = () => {}), (M = () => {}), (N = {}), (cs = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)), (ls = (e) => /^0[^.\s]+$/u.test(e)), (P = (e) => e), (us = (e, t) => (n) => t(e(n))), (ds = (...e) => e.reduce(us)), (fs = (e, t, n) => { let r = t - e; return r === 0 ? 1 : (n - e) / r; }), (ps = class { constructor() { this.subscriptions = []; } add(e) { return ke(this.subscriptions, e), () => Ae(this.subscriptions, e); } notify(e, t, n) { let r = this.subscriptions.length; if (r) if (r === 1) this.subscriptions[0](e, t, n); else for (let i = 0; i < r; i++) { let r = this.subscriptions[i]; r && r(e, t, n); } } getSize() { return this.subscriptions.length; } clear() { this.subscriptions.length = 0; } }), (F = (e) => e * 1e3), (I = (e) => e / 1e3), (ms = (e, t, n) => { let r = t - e; return ((((n - e) % r) + r) % r) + e; }), (hs = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e), (gs = 1e-7), (_s = 12), (vs = (e) => (t) => (t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2)), (ys = (e) => (t) => 1 - e(1 - t)), (bs = Ie(0.33, 1.53, 0.69, 0.99)), (xs = ys(bs)), (Ss = vs(xs)), (Cs = (e) => ((e *= 2) < 1 ? 0.5 * xs(e) : 0.5 * (2 - 2 ** (-10 * (e - 1))))), (ws = (e) => 1 - Math.sin(Math.acos(e))), (Ts = ys(ws)), (Es = vs(ws)), (Ds = Ie(0.42, 0, 1, 1)), (Os = Ie(0, 0, 0.58, 1)), (ks = Ie(0.42, 0, 0.58, 1)), (As = (e) => Array.isArray(e) && typeof e[0] != `number`), (js = (e) => Array.isArray(e) && typeof e[0] == `number`), (Ms = { linear: P, easeIn: Ds, easeInOut: ks, easeOut: Os, circIn: ws, circInOut: Es, circOut: Ts, backIn: xs, backInOut: Ss, backOut: bs, anticipate: Cs }), (Ns = (e) => typeof e == `string`), (Ps = (e) => { if (js(e)) { M(e.length === 4, `Cubic bezier arrays must contain four numerical values.`); let [t, n, r, i] = e; return Ie(t, n, r, i); } else if (Ns(e)) return M(Ms[e] !== void 0, `Invalid easing type '${e}'`), Ms[e]; return e; }), (L = { value: null, addProjectionMetrics: null }), (Fs = [`setup`, `read`, `resolveKeyframes`, `preUpdate`, `update`, `preRender`, `render`, `postRender`]), (Is = 40), ({ schedule: R, cancel: z, state: B, steps: Ls } = ze(typeof requestAnimationFrame < `u` ? requestAnimationFrame : P, !0)), (V = { now: () => (Rs === void 0 && V.set(B.isProcessing || N.useManualTiming ? B.timestamp : performance.now()), Rs), set: (e) => { (Rs = e), queueMicrotask(Be); } }), (zs = { layout: 0, mainThread: 0, waapi: 0 }), (Bs = (e) => (t) => typeof t == `string` && t.startsWith(e)), (Vs = Bs(`--`)), (Hs = Bs(`var(--`)), (Us = (e) => { let t = Hs(e); return t ? Ws.test(e.split(`/*`)[0].trim()) : !1; }), (Ws = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu), (Gs = { test: (e) => typeof e == `number`, parse: parseFloat, transform: (e) => e }), (Ks = { ...Gs, transform: (e) => j(0, 1, e) }), (qs = { ...Gs, default: 1 }), (Js = (e) => Math.round(e * 1e5) / 1e5), (Ys = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu), (Xs = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu), (Zs = (e, t) => (n) => !!( (typeof n == `string` && Xs.test(n) && n.startsWith(e)) || (t && !Ve(n) && Object.prototype.hasOwnProperty.call(n, t)) )), (Qs = (e, t, n) => (r) => { if (typeof r != `string`) return r; let [i, a, o, s] = r.match(Ys); return { [e]: parseFloat(i), [t]: parseFloat(a), [n]: parseFloat(o), alpha: s === void 0 ? 1 : parseFloat(s) }; }), ($s = (e) => j(0, 255, e)), (ec = { ...Gs, transform: (e) => Math.round($s(e)) }), (tc = { test: Zs(`rgb`, `red`), parse: Qs(`red`, `green`, `blue`), transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => `rgba(` + ec.transform(e) + `, ` + ec.transform(t) + `, ` + ec.transform(n) + `, ` + Js(Ks.transform(r)) + `)` }), (nc = { test: Zs(`#`), parse: He, transform: tc.transform }), (rc = (e) => ({ test: (t) => typeof t == `string` && t.endsWith(e) && t.split(` `).length === 1, parse: parseFloat, transform: (t) => `${t}${e}` })), (H = rc(`deg`)), (U = rc(`%`)), (W = rc(`px`)), (ic = rc(`vh`)), (ac = rc(`vw`)), (oc = (() => ({ ...U, parse: (e) => U.parse(e) / 100, transform: (e) => U.transform(e * 100) }))()), (sc = { test: Zs(`hsl`, `hue`), parse: Qs(`hue`, `saturation`, `lightness`), transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => `hsla(` + Math.round(e) + `, ` + U.transform(Js(t)) + `, ` + U.transform(Js(n)) + `, ` + Js(Ks.transform(r)) + `)` }), (G = { test: (e) => tc.test(e) || nc.test(e) || sc.test(e), parse: (e) => (tc.test(e) ? tc.parse(e) : sc.test(e) ? sc.parse(e) : nc.parse(e)), transform: (e) => (typeof e == `string` ? e : e.hasOwnProperty(`red`) ? tc.transform(e) : sc.transform(e)) }), (cc = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu), (lc = `number`), (uc = `color`), (dc = `var`), (fc = `var(`), (pc = "${}"), (mc = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu), (hc = (e) => (typeof e == `number` ? 0 : e)), (K = { test: Ue, parse: Ge, createTransformer: Ke, getAnimatableNone: qe }), (q = (e, t, n) => e + (t - e) * n), (gc = (e, t, n) => { let r = e * e, i = n * (t * t - r) + r; return i < 0 ? 0 : Math.sqrt(i); }), (_c = [nc, tc, sc]), (vc = (e) => _c.find((t) => t.test(e))), (yc = (e, t) => { let n = Ze(e), r = Ze(t); if (!n || !r) return Xe(e, t); let i = { ...n }; return (e) => ( (i.red = gc(n.red, r.red, e)), (i.green = gc(n.green, r.green, e)), (i.blue = gc(n.blue, r.blue, e)), (i.alpha = q(n.alpha, r.alpha, e)), tc.transform(i) ); }), (bc = new Set([`none`, `hidden`])), (xc = (e, t) => { let n = K.createTransformer(t), r = We(e), i = We(t), a = r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length; return a ? (bc.has(e) && !i.values.length) || (bc.has(t) && !r.values.length) ? Qe(e, t) : ds(tt(rt(r, i), i.values), n) : (ss( !0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.` ), Xe(e, t)); }), (Sc = (e, t, n = 10) => { let r = ``, i = Math.max(Math.round(t / n), 2); for (let t = 0; t < i; t++) r += e(t / (i - 1)) + `, `; return `linear(${r.substring(0, r.length - 2)})`; }), (Cc = 2e4), (wc = 5), (J = { stiffness: 100, damping: 10, mass: 1, velocity: 0, duration: 800, bounce: 0.3, visualDuration: 0.3, restSpeed: { granular: 0.01, default: 2 }, restDelta: { granular: 0.005, default: 0.5 }, minDuration: 0.01, maxDuration: 10, minDamping: 0.05, maxDamping: 1 }), (Tc = 0.001), (Ec = 12), (Dc = [`duration`, `bounce`]), (Oc = [`stiffness`, `damping`, `mass`]), (pt.applyToOptions = (e) => { let t = ot(e, 100, pt); return (e.ease = t.ease), (e.duration = F(t.duration)), (e.type = `keyframes`), e; }), (kc = (e) => { let t = ({ timestamp: t }) => e(t); return { start: (e = !0) => R.update(t, e), stop: () => z(t), now: () => (B.isProcessing ? B.timestamp : V.now()) }; }), (Ac = (e) => e !== null), (jc = { decay: mt, inertia: mt, tween: xt, keyframes: xt, spring: pt }), (Mc = class { constructor() { this.updateFinished(); } get finished() { return this._finished; } updateFinished() { this._finished = new Promise((e) => { this.resolve = e; }); } notifyFinished() { this.resolve(); } then(e, t) { return this.finished.then(e, t); } }), (Nc = (e) => e / 100), (Pc = class extends Mc { constructor(e) { super(), (this.state = `idle`), (this.startTime = null), (this.isStopped = !1), (this.currentTime = 0), (this.holdTime = null), (this.playbackSpeed = 1), (this.stop = () => { var e, t; let { motionValue: n } = this.options; n && n.updatedAt !== V.now() && this.tick(V.now()), (this.isStopped = !0), this.state !== `idle` && (this.teardown(), (t = (e = this.options).onStop) == null || t.call(e)); }), zs.mainThread++, (this.options = e), this.initAnimation(), this.play(), e.autoplay === !1 && this.pause(); } initAnimation() { let { options: e } = this; Ct(e); let { type: t = xt, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || xt; s !== xt && typeof o[0] != `number` && ((this.mixKeyframes = ds(Nc, it(o[0], o[1]))), (o = [0, 100])); let c = s({ ...e, keyframes: o }); i === `mirror` && (this.mirroredGenerator = s({ ...e, keyframes: [...o].reverse(), velocity: -a })), c.calculatedDuration === null && (c.calculatedDuration = at(c)); let { calculatedDuration: l } = c; (this.calculatedDuration = l), (this.resolvedDuration = l + r), (this.totalDuration = this.resolvedDuration * (n + 1) - r), (this.generator = c); } updateTime(e) { let t = Math.round(e - this.startTime) * this.playbackSpeed; this.holdTime === null ? (this.currentTime = t) : (this.currentTime = this.holdTime); } tick(e, t = !1) { let { generator: n, totalDuration: r, mixKeyframes: i, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: s } = this; if (this.startTime === null) return n.next(0); let { delay: c = 0, keyframes: l, repeat: u, repeatType: d, repeatDelay: f, type: p, onUpdate: m, finalKeyframe: h } = this.options; this.speed > 0 ? (this.startTime = Math.min(this.startTime, e)) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? (this.currentTime = e) : this.updateTime(e); let g = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), _ = this.playbackSpeed >= 0 ? g < 0 : g > r; (this.currentTime = Math.max(g, 0)), this.state === `finished` && this.holdTime === null && (this.currentTime = r); let v = this.currentTime, y = n; if (u) { let e = Math.min(this.currentTime, r) / o, t = Math.floor(e), n = e % 1; !n && e >= 1 && (n = 1), n === 1 && t--, (t = Math.min(t, u + 1)); let i = !!(t % 2); i && (d === `reverse` ? ((n = 1 - n), f && (n -= f / o)) : d === `mirror` && (y = a)), (v = j(0, 1, n) * o); } let b = _ ? { done: !1, value: l[0] } : y.next(v); i && (b.value = i(b.value)); let { done: x } = b; !_ && s !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0); let S = this.holdTime === null && (this.state === `finished` || (this.state === `running` && x)); return S && p !== mt && (b.value = St(l, this.options, h, this.speed)), m && m(b.value), S && this.finish(), b; } then(e, t) { return this.finished.then(e, t); } get duration() { return I(this.calculatedDuration); } get time() { return I(this.currentTime); } set time(e) { var t; (e = F(e)), (this.currentTime = e), this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? (this.holdTime = e) : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), (t = this.driver) == null || t.start(!1); } get speed() { return this.playbackSpeed; } set speed(e) { this.updateTime(V.now()); let t = this.playbackSpeed !== e; (this.playbackSpeed = e), t && (this.time = I(this.currentTime)); } play() { var e, t; if (this.isStopped) return; let { driver: n = kc, startTime: r } = this.options; (this.driver ||= n((e) => this.tick(e))), (t = (e = this.options).onPlay) == null || t.call(e); let i = this.driver.now(); this.state === `finished` ? (this.updateFinished(), (this.startTime = i)) : this.holdTime === null ? (this.startTime ||= r ?? i) : (this.startTime = i - this.holdTime), this.state === `finished` && this.speed < 0 && (this.startTime += this.calculatedDuration), (this.holdTime = null), (this.state = `running`), this.driver.start(); } pause() { (this.state = `paused`), this.updateTime(V.now()), (this.holdTime = this.currentTime); } complete() { this.state !== `running` && this.play(), (this.state = `finished`), (this.holdTime = null); } finish() { var e, t; this.notifyFinished(), this.teardown(), (this.state = `finished`), (t = (e = this.options).onComplete) == null || t.call(e); } cancel() { var e, t; (this.holdTime = null), (this.startTime = 0), this.tick(0), this.teardown(), (t = (e = this.options).onCancel) == null || t.call(e); } teardown() { (this.state = `idle`), this.stopDriver(), (this.startTime = this.holdTime = null), zs.mainThread--; } stopDriver() { this.driver &&= (this.driver.stop(), void 0); } sample(e) { return (this.startTime = 0), this.tick(e, !0); } attachTimeline(e) { var t; return ( this.options.allowFlatten && ((this.options.type = `keyframes`), (this.options.ease = `linear`), this.initAnimation()), (t = this.driver) == null || t.stop(), e.observe(this) ); } }), (Fc = (e) => (e * 180) / Math.PI), (Ic = (e) => { let t = Fc(Math.atan2(e[1], e[0])); return Rc(t); }), (Lc = { x: 4, y: 5, translateX: 4, translateY: 5, scaleX: 0, scaleY: 3, scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2, rotate: Ic, rotateZ: Ic, skewX: (e) => Fc(Math.atan(e[1])), skewY: (e) => Fc(Math.atan(e[2])), skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2 }), (Rc = (e) => ((e %= 360), e < 0 && (e += 360), e)), (zc = Ic), (Bc = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1])), (Vc = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5])), (Hc = { x: 12, y: 13, z: 14, translateX: 12, translateY: 13, translateZ: 14, scaleX: Bc, scaleY: Vc, scale: (e) => (Bc(e) + Vc(e)) / 2, rotateX: (e) => Rc(Fc(Math.atan2(e[6], e[5]))), rotateY: (e) => Rc(Fc(Math.atan2(-e[2], e[0]))), rotateZ: zc, rotate: zc, skewX: (e) => Fc(Math.atan(e[4])), skewY: (e) => Fc(Math.atan(e[1])), skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2 }), (Uc = (e, t) => { let { transform: n = `none` } = getComputedStyle(e); return Dt(n, t); }), (Wc = [ `transformPerspective`, `x`, `y`, `z`, `translateX`, `translateY`, `translateZ`, `scale`, `scaleX`, `scaleY`, `rotate`, `rotateX`, `rotateY`, `rotateZ`, `skew`, `skewX`, `skewY` ]), (Gc = (() => new Set(Wc))()), (Kc = (e) => e === Gs || e === W), (qc = new Set([`x`, `y`, `z`])), (Jc = Wc.filter((e) => !qc.has(e))), (Yc = { width: ({ x: e }, { paddingLeft: t = `0`, paddingRight: n = `0` }) => e.max - e.min - parseFloat(t) - parseFloat(n), height: ({ y: e }, { paddingTop: t = `0`, paddingBottom: n = `0` }) => e.max - e.min - parseFloat(t) - parseFloat(n), top: (e, { top: t }) => parseFloat(t), left: (e, { left: t }) => parseFloat(t), bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min), right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min), x: (e, { transform: t }) => Dt(t, `x`), y: (e, { transform: t }) => Dt(t, `y`) }), (Yc.translateX = Yc.x), (Yc.translateY = Yc.y), (Xc = new Set()), (Zc = !1), (Qc = !1), ($c = !1), (el = class { constructor(e, t, n, r, i, a = !1) { (this.state = `pending`), (this.isAsync = !1), (this.needsMeasurement = !1), (this.unresolvedKeyframes = [...e]), (this.onComplete = t), (this.name = n), (this.motionValue = r), (this.element = i), (this.isAsync = a); } scheduleResolve() { (this.state = `scheduled`), this.isAsync ? (Xc.add(this), Zc || ((Zc = !0), R.read(jt), R.resolveKeyframes(At))) : (this.readKeyframes(), this.complete()); } readKeyframes() { let { unresolvedKeyframes: e, name: t, element: n, motionValue: r } = this; if (e[0] === null) { let i = r?.get(), a = e[e.length - 1]; if (i !== void 0) e[0] = i; else if (n && t) { let r = n.readValue(t, a); r != null && (e[0] = r); } e[0] === void 0 && (e[0] = a), r && i === void 0 && r.set(e[0]); } Tt(e); } setFinalKeyframe() {} measureInitialState() {} renderEndStyles() {} measureEndState() {} complete(e = !1) { (this.state = `complete`), this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), Xc.delete(this); } cancel() { this.state === `scheduled` && (Xc.delete(this), (this.state = `pending`)); } resume() { this.state === `pending` && this.scheduleResolve(); } }), (tl = (e) => e.startsWith(`--`)), (nl = Ne(() => S.ScrollTimeline !== void 0)), (rl = {}), (il = Pt(() => { try { document.createElement(`div`).animate({ opacity: 0 }, { easing: `linear(0, 1)` }); } catch { return !1; } return !0; }, `linearEasing`)), (al = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`), (ol = { linear: `linear`, ease: `ease`, easeIn: `ease-in`, easeOut: `ease-out`, easeInOut: `ease-in-out`, circIn: al([0, 0.65, 0.55, 1]), circOut: al([0.55, 0, 1, 0.45]), backIn: al([0.31, 0.01, 0.66, -0.59]), backOut: al([0.33, 1.53, 0.69, 0.99]) }), (sl = class extends Mc { constructor(e) { if ((super(), (this.finishedTime = null), (this.isStopped = !1), !e)) return; let { element: t, name: n, keyframes: r, pseudoElement: i, allowFlatten: a = !1, finalKeyframe: o, onComplete: s } = e; (this.isPseudoElement = !!i), (this.allowFlatten = a), (this.options = e), M( typeof e.type != `string`, `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?` ); let c = Rt(e); (this.animation = It(t, n, r, c, i)), c.autoplay === !1 && this.animation.pause(), (this.animation.onfinish = () => { if (((this.finishedTime = this.time), !i)) { let e = St(r, this.options, o, this.speed); this.updateMotionValue ? this.updateMotionValue(e) : Nt(t, n, e), this.animation.cancel(); } s?.(), this.notifyFinished(); }); } play() { this.isStopped || (this.animation.play(), this.state === `finished` && this.updateFinished()); } pause() { this.animation.pause(); } complete() { var e, t; (t = (e = this.animation).finish) == null || t.call(e); } cancel() { try { this.animation.cancel(); } catch {} } stop() { if (this.isStopped) return; this.isStopped = !0; let { state: e } = this; e === `idle` || e === `finished` || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel()); } commitStyles() { var e, t; this.isPseudoElement || (t = (e = this.animation).commitStyles) == null || t.call(e); } get duration() { var e, t; let n = (t = (e = this.animation.effect)?.getComputedTiming)?.call(e).duration || 0; return I(Number(n)); } get time() { return I(Number(this.animation.currentTime) || 0); } set time(e) { (this.finishedTime = null), (this.animation.currentTime = F(e)); } get speed() { return this.animation.playbackRate; } set speed(e) { e < 0 && (this.finishedTime = null), (this.animation.playbackRate = e); } get state() { return this.finishedTime === null ? this.animation.playState : `finished`; } get startTime() { return Number(this.animation.startTime); } set startTime(e) { this.animation.startTime = e; } attachTimeline({ timeline: e, observe: t }) { var n; return ( this.allowFlatten && ((n = this.animation.effect) == null || n.updateTiming({ easing: `linear` })), (this.animation.onfinish = null), e && nl() ? ((this.animation.timeline = e), P) : t(this) ); } }), (cl = { anticipate: Cs, backInOut: Ss, circInOut: Es }), (ll = 10), (ul = class extends sl { constructor(e) { Bt(e), Ct(e), super(e), e.startTime && (this.startTime = e.startTime), (this.options = e); } updateMotionValue(e) { let { motionValue: t, onUpdate: n, onComplete: r, element: i, ...a } = this.options; if (!t) return; if (e !== void 0) { t.set(e); return; } let o = new Pc({ ...a, autoplay: !1 }), s = F(this.finishedTime ?? this.time); t.setWithVelocity(o.sample(s - ll).value, o.sample(s).value, ll), o.stop(); } }), (dl = new Set([`opacity`, `clipPath`, `filter`, `transform`])), (fl = Ne(() => Object.hasOwnProperty.call(Element.prototype, `animate`))), (pl = (e, t) => t === `zIndex` ? !1 : !!( typeof e == `number` || Array.isArray(e) || (typeof e == `string` && (K.test(e) || e === `0`) && !e.startsWith(`url(`)) )), (ml = 40), (hl = class extends Mc { constructor({ autoplay: e = !0, delay: t = 0, type: n = `keyframes`, repeat: r = 0, repeatDelay: i = 0, repeatType: a = `loop`, keyframes: o, name: s, motionValue: c, element: l, ...u }) { var d; super(), (this.stop = () => { var e, t; this._animation && (this._animation.stop(), (e = this.stopTimeline) == null || e.call(this)), (t = this.keyframeResolver) == null || t.cancel(); }), (this.createdAt = V.now()); let f = { autoplay: e, delay: t, type: n, repeat: r, repeatDelay: i, repeatType: a, name: s, motionValue: c, element: l, ...u }, p = l?.KeyframeResolver || el; (this.keyframeResolver = new p(o, (e, t, n) => this.onKeyframesResolved(e, t, f, !n), s, c, l)), (d = this.keyframeResolver) == null || d.scheduleResolve(); } onKeyframesResolved(e, t, n, r) { this.keyframeResolver = void 0; let { name: i, type: a, velocity: o, delay: s, isHandoff: c, onUpdate: l } = n; (this.resolvedAt = V.now()), Wt(e, i, a, o) || ((N.instantAnimations || !s) && l?.(St(e, n, t)), (e[0] = e[e.length - 1]), (n.duration = 0), (n.repeat = 0)); let u = r ? this.resolvedAt && this.resolvedAt - this.createdAt > ml ? this.resolvedAt : this.createdAt : void 0, d = { startTime: u, finalKeyframe: t, ...n, keyframes: e }, f = !c && Ht(d) ? new ul({ ...d, element: d.motionValue.owner.current }) : new Pc(d); f.finished.then(() => this.notifyFinished()).catch(P), (this.pendingTimeline &&= ((this.stopTimeline = f.attachTimeline(this.pendingTimeline)), void 0)), (this._animation = f); } get finished() { return this._animation ? this.animation.finished : this._finished; } then(e, t) { return this.finished.finally(e).then(() => {}); } get animation() { var e; return this._animation || ((e = this.keyframeResolver) == null || e.resume(), Mt()), this._animation; } get duration() { return this.animation.duration; } get time() { return this.animation.time; } set time(e) { this.animation.time = e; } get speed() { return this.animation.speed; } get state() { return this.animation.state; } set speed(e) { this.animation.speed = e; } get startTime() { return this.animation.startTime; } attachTimeline(e) { return ( this._animation ? (this.stopTimeline = this.animation.attachTimeline(e)) : (this.pendingTimeline = e), () => this.stop() ); } play() { this.animation.play(); } pause() { this.animation.pause(); } complete() { this.animation.complete(); } cancel() { var e; this._animation && this.animation.cancel(), (e = this.keyframeResolver) == null || e.cancel(); } }), (gl = class { constructor(e) { (this.stop = () => this.runAll(`stop`)), (this.animations = e.filter(Boolean)); } get finished() { return Promise.all(this.animations.map((e) => e.finished)); } getAll(e) { return this.animations[0][e]; } setAll(e, t) { for (let n = 0; n < this.animations.length; n++) this.animations[n][e] = t; } attachTimeline(e) { let t = this.animations.map((t) => t.attachTimeline(e)); return () => { t.forEach((e, t) => { e && e(), this.animations[t].stop(); }); }; } get time() { return this.getAll(`time`); } set time(e) { this.setAll(`time`, e); } get speed() { return this.getAll(`speed`); } set speed(e) { this.setAll(`speed`, e); } get state() { return this.getAll(`state`); } get startTime() { return this.getAll(`startTime`); } get duration() { let e = 0; for (let t = 0; t < this.animations.length; t++) e = Math.max(e, this.animations[t].duration); return e; } runAll(e) { this.animations.forEach((t) => t[e]()); } play() { this.runAll(`play`); } pause() { this.runAll(`pause`); } cancel() { this.runAll(`cancel`); } complete() { this.runAll(`complete`); } }), (_l = class extends gl { then(e, t) { return this.finished.finally(e).then(() => {}); } }), (vl = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u), (yl = 4), (bl = new Set([`width`, `height`, `top`, `left`, `right`, `bottom`, ...Wc])), (xl = (e) => (t) => t.test(e)), (Sl = { test: (e) => e === `auto`, parse: (e) => e }), (Cl = [Gs, W, U, H, ac, ic, Sl]), (wl = (e) => Cl.find(xl(e))), (Tl = { rotate: H, rotateX: H, rotateY: H, rotateZ: H, scale: qs, scaleX: qs, scaleY: qs, scaleZ: qs, skew: H, skewX: H, skewY: H, distance: W, translateX: W, translateY: W, translateZ: W, x: W, y: W, z: W, perspective: W, transformPerspective: W, opacity: Ks, originX: oc, originY: oc, originZ: W }), (El = { ...Gs, transform: Math.round }), (Dl = { borderWidth: W, borderTopWidth: W, borderRightWidth: W, borderBottomWidth: W, borderLeftWidth: W, borderRadius: W, radius: W, borderTopLeftRadius: W, borderTopRightRadius: W, borderBottomRightRadius: W, borderBottomLeftRadius: W, width: W, maxWidth: W, height: W, maxHeight: W, top: W, right: W, bottom: W, left: W, padding: W, paddingTop: W, paddingRight: W, paddingBottom: W, paddingLeft: W, margin: W, marginTop: W, marginRight: W, marginBottom: W, marginLeft: W, backgroundPositionX: W, backgroundPositionY: W, ...Tl, zIndex: El, fillOpacity: Ks, strokeOpacity: Ks, numOctaves: El }), (Ol = new Set([`brightness`, `contrast`, `saturate`, `opacity`])), (kl = /\b([a-z-]*)\(.*?\)/gu), (Al = { ...K, getAnimatableNone: (e) => { let t = e.match(kl); return t ? t.map(Jt).join(` `) : e; } }), (jl = { ...Dl, color: G, backgroundColor: G, outlineColor: G, fill: G, stroke: G, borderColor: G, borderTopColor: G, borderRightColor: G, borderBottomColor: G, borderLeftColor: G, filter: Al, WebkitFilter: Al }), (Ml = (e) => jl[e]), (Nl = new Set([`auto`, `none`, `0`])), (Pl = class extends el { constructor(e, t, n, r, i) { super(e, t, n, r, i, !0); } readKeyframes() { let { unresolvedKeyframes: e, element: t, name: n } = this; if (!t || !t.current) return; super.readKeyframes(); for (let n = 0; n < e.length; n++) { let r = e[n]; if (typeof r == `string` && ((r = r.trim()), Us(r))) { let i = Kt(r, t.current); i !== void 0 && (e[n] = i), n === e.length - 1 && (this.finalKeyframe = r); } } if ((this.resolveNoneKeyframes(), !bl.has(n) || e.length !== 2)) return; let [r, i] = e, a = wl(r), o = wl(i); if (a !== o) if (Kc(a) && Kc(o)) for (let t = 0; t < e.length; t++) { let n = e[t]; typeof n == `string` && (e[t] = parseFloat(n)); } else Yc[n] && (this.needsMeasurement = !0); } resolveNoneKeyframes() { let { unresolvedKeyframes: e, name: t } = this, n = []; for (let t = 0; t < e.length; t++) (e[t] === null || Xt(e[t])) && n.push(t); n.length && Zt(e, n, t); } measureInitialState() { let { element: e, unresolvedKeyframes: t, name: n } = this; if (!e || !e.current) return; n === `height` && (this.suspendedScrollY = S.pageYOffset), (this.measuredOrigin = Yc[n](e.measureViewportBox(), S.getComputedStyle(e.current))), (t[0] = this.measuredOrigin); let r = t[t.length - 1]; r !== void 0 && e.getValue(n, r).jump(r, !1); } measureEndState() { var e; let { element: t, name: n, unresolvedKeyframes: r } = this; if (!t || !t.current) return; let i = t.getValue(n); i && i.jump(this.measuredOrigin, !1); let a = r.length - 1, o = r[a]; (r[a] = Yc[n](t.measureViewportBox(), S.getComputedStyle(t.current))), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (e = this.removedTransforms)?.length && this.removedTransforms.forEach(([e, n]) => { t.getValue(e).set(n); }), this.resolveNoneKeyframes(); } }), (Fl = new Set([`opacity`, `clipPath`, `filter`, `transform`])), (Il = (e, t) => (t && typeof e == `number` ? t.transform(e) : e)), (Ll = 30), (Rl = (e) => !isNaN(parseFloat(e))), (zl = { current: void 0 }), (Bl = class { constructor(e, t = {}) { (this.canTrackVelocity = null), (this.events = {}), (this.updateAndNotify = (e, t = !0) => { var n, r; let i = V.now(); if ( (this.updatedAt !== i && this.setPrevFrameValue(), (this.prev = this.current), this.setCurrent(e), this.current !== this.prev && ((n = this.events.change) == null || n.notify(this.current), this.dependents)) ) for (let e of this.dependents) e.dirty(); t && ((r = this.events.renderRequest) == null || r.notify(this.current)); }), (this.hasAnimated = !1), this.setCurrent(e), (this.owner = t.owner); } setCurrent(e) { (this.current = e), (this.updatedAt = V.now()), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Rl(this.current)); } setPrevFrameValue(e = this.current) { (this.prevFrameValue = e), (this.prevUpdatedAt = this.updatedAt); } onChange(e) { return this.on(`change`, e); } on(e, t) { this.events[e] || (this.events[e] = new ps()); let n = this.events[e].add(t); return e === `change` ? () => { n(), R.read(() => { this.events.change.getSize() || this.stop(); }); } : n; } clearListeners() { for (let e in this.events) this.events[e].clear(); } attach(e, t) { (this.passiveEffect = e), (this.stopPassiveEffect = t); } set(e, t = !0) { !t || !this.passiveEffect ? this.updateAndNotify(e, t) : this.passiveEffect(e, this.updateAndNotify); } setWithVelocity(e, t, n) { this.set(t), (this.prev = void 0), (this.prevFrameValue = e), (this.prevUpdatedAt = this.updatedAt - n); } jump(e, t = !0) { this.updateAndNotify(e), (this.prev = e), (this.prevUpdatedAt = this.prevFrameValue = void 0), t && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect(); } dirty() { var e; (e = this.events.change) == null || e.notify(this.current); } addDependent(e) { (this.dependents ||= new Set()), this.dependents.add(e); } removeDependent(e) { this.dependents && this.dependents.delete(e); } get() { return zl.current && zl.current.push(this), this.current; } getPrevious() { return this.prev; } getVelocity() { let e = V.now(); if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Ll) return 0; let t = Math.min(this.updatedAt - this.prevUpdatedAt, Ll); return Pe(parseFloat(this.current) - parseFloat(this.prevFrameValue), t); } start(e) { return ( this.stop(), new Promise((t) => { (this.hasAnimated = !0), (this.animation = e(t)), this.events.animationStart && this.events.animationStart.notify(); }).then(() => { this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation(); }) ); } stop() { this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation(); } isAnimating() { return !!this.animation; } clearAnimation() { delete this.animation; } destroy() { var e, t; (e = this.dependents) == null || e.clear(), (t = this.events.destroy) == null || t.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect(); } }), (Vl = W.transform), ({ schedule: Hl, cancel: Ul } = ze(queueMicrotask, !1)), (Y = { x: !1, y: !1 }), (Wl = (e, t) => (t ? (e === t ? !0 : Wl(e, t.parentElement)) : !1)), (Gl = (e) => (e.pointerType === `mouse` ? typeof e.button != `number` || e.button <= 0 : e.isPrimary !== !1)), (Kl = new Set([`BUTTON`, `INPUT`, `SELECT`, `TEXTAREA`, `A`])), (ql = new WeakSet()), (Jl = (e, t) => { let n = e.currentTarget; if (!n) return; let r = on(() => { if (ql.has(n)) return; sn(n, `down`); let e = on(() => { sn(n, `up`); }), r = () => sn(n, `cancel`); n.addEventListener(`keyup`, e, t), n.addEventListener(`blur`, r, t); }); n.addEventListener(`keydown`, r, t), n.addEventListener(`blur`, () => n.removeEventListener(`keydown`, r), t); }), (Yl = new WeakMap()), (Zl = (e, t, n) => (r, i) => (i && i[0] ? i[0][e + `Size`] : un(r) && `getBBox` in r ? r.getBBox()[t] : r[n])), (Ql = Zl(`inline`, `width`, `offsetWidth`)), ($l = Zl(`block`, `height`, `offsetHeight`)), (eu = new Set()), (X = (e) => !!(e && e.getVelocity)), (nu = [...Cl, G, K]), (ru = (e) => nu.find(xl(e))), (iu = Fs.reduce((e, t) => ((e[t] = (e) => z(e)), e), {})), (Z = T({ transformPagePoint: (e) => e, isStatic: !1, reducedMotion: `never` })), (au = class extends n { getSnapshotBeforeUpdate(e) { let t = this.props.childRef.current; if (t && e.isPresent && !this.props.isPresent) { let e = t.offsetParent, n = (Vt(e) && e.offsetWidth) || 0, r = this.props.sizeRef.current; (r.height = t.offsetHeight || 0), (r.width = t.offsetWidth || 0), (r.top = t.offsetTop), (r.left = t.offsetLeft), (r.right = n - r.width - r.left); } return null; } componentDidUpdate() {} render() { return this.props.children; } }), (ou = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: o, mode: s, anchorX: c }) => { let l = D(En), u = a(), d = !0, f = v( () => ( (d = !1), { id: u, initial: t, isPresent: n, custom: i, onExitComplete: (e) => { l.set(e, !0); for (let e of l.values()) if (!e) return; r && r(); }, register: (e) => (l.set(e, !1), () => l.delete(e)) } ), [n, l, r] ); return ( o && d && (f = { ...f }), v(() => { l.forEach((e, t) => l.set(t, !1)); }, [n]), x(() => { !n && !l.size && r && r(); }, [n]), s === `popLayout` && (e = m(Tn, { isPresent: n, anchorX: c, children: e })), m(os.Provider, { value: f, children: e }) ); }), (su = (e) => e.key || ``), (cu = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = `sync`, propagate: o = !1, anchorX: s = `left` }) => { let [c, l] = wn(o), u = v(() => Dn(e), [e]), d = o && !c ? [] : u.map(su), p = h(!0), g = h(u), y = D(() => new Map()), [b, x] = w(u), [S, C] = w(u); rs(() => { (p.current = !1), (g.current = u); for (let e = 0; e < S.length; e++) { let t = su(S[e]); d.includes(t) ? y.delete(t) : y.get(t) !== !0 && y.set(t, !1); } }, [S, d.length, d.join(`-`)]); let T = []; if (u !== b) { let e = [...u]; for (let t = 0; t < S.length; t++) { let n = S[t], r = su(n); d.includes(r) || (e.splice(t, 0, n), T.push(n)); } return a === `wait` && T.length && (e = T), C(Dn(e)), x(u), null; } let { forceRender: ee } = _(ts); return m(f, { children: S.map((e) => { let f = su(e), h = o && !c ? !1 : u === S || d.includes(f), _ = () => { if (y.has(f)) y.set(f, !0); else return; let e = !0; y.forEach((t) => { t || (e = !1); }), e && (ee?.(), C(g.current), o && l?.(), r && r()); }; return m( ou, { isPresent: h, initial: !p.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: i, mode: a, onExitComplete: h ? void 0 : _, anchorX: s, children: e }, f ); }) }); }), (lu = T(null)), (uu = (e) => !e.isLayoutDirty && e.willUpdate(!1)), (du = (e) => e === !0), (fu = (e) => du(e === !0) || e === `id`), (pu = ({ children: e, id: t, inherit: n = !0 }) => { let r = _(ts), i = _(lu), [a, o] = kn(), s = h(null), c = r.id || i; s.current === null && (fu(n) && c && (t = t ? c + `-` + t : c), (s.current = { id: t, group: (du(n) && r.group) || An() })); let l = v(() => ({ ...s.current, forceRender: a }), [o]); return m(ts.Provider, { value: l, children: e }); }), (mu = T({ strict: !1 })), (hu = { animation: [`animate`, `variants`, `whileHover`, `whileTap`, `exit`, `whileInView`, `whileFocus`, `whileDrag`], exit: [`exit`], drag: [`drag`, `dragControls`], focus: [`whileFocus`], hover: [`whileHover`, `onHoverStart`, `onHoverEnd`], tap: [`whileTap`, `onTap`, `onTapStart`, `onTapCancel`], pan: [`onPan`, `onPanStart`, `onPanSessionStart`, `onPanEnd`], inView: [`whileInView`, `onViewportEnter`, `onViewportLeave`], layout: [`layout`, `layoutId`] }), (gu = {}), hu)) gu[e] = { isEnabled: (t) => hu[e].some((e) => !!t[e]) }; (_u = new Set( `animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split( `.` ) )), (vu = (e) => !Mn(e)); try { Nn(es().default); } catch {} (yu = T({})), (bu = (e) => e.replace(/([a-z])([A-Z])/gu, `$1-$2`).toLowerCase()), (xu = `framerAppearId`), (Su = `data-` + bu(xu)), (Cu = T({})), (wu = [`animate`, `whileInView`, `whileFocus`, `whileHover`, `whileTap`, `whileDrag`, `exit`]), (Tu = [`initial`, ...wu]), (Eu = Symbol.for(`motionComponentSymbol`)), (Du = {}), (Ou = { x: `translateX`, y: `translateY`, z: `translateZ`, transformPerspective: `perspective` }), (ku = Wc.length), (Au = (e) => (t, n) => { let r = _(yu), i = _(os), a = () => rr(e, t, r, i); return n ? a() : D(a); }), (ju = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {} })), (Mu = { offset: `stroke-dashoffset`, array: `stroke-dasharray` }), (Nu = { offset: `strokeDashoffset`, array: `strokeDasharray` }), (Pu = () => ({ ...ju(), attrs: {} })), (Fu = (e) => typeof e == `string` && e.toLowerCase() === `svg`), (Iu = [ `animate`, `circle`, `defs`, `desc`, `ellipse`, `g`, `image`, `line`, `filter`, `marker`, `mask`, `metadata`, `path`, `pattern`, `polygon`, `polyline`, `rect`, `stop`, `switch`, `symbol`, `svg`, `text`, `tspan`, `use`, `view` ]), (Lu = { useVisualState: Au({ scrapeMotionValuesFromProps: _r, createRenderState: ju }) }), (Ru = { useVisualState: Au({ scrapeMotionValuesFromProps: vr, createRenderState: Pu }) }), (zu = (e) => Array.isArray(e)), (Bu = (e) => e !== null), (Vu = { type: `spring`, stiffness: 500, damping: 25, restSpeed: 10 }), (Hu = (e) => ({ type: `spring`, stiffness: 550, damping: e === 0 ? 2 * Math.sqrt(550) : 30, restSpeed: 10 })), (Uu = { type: `keyframes`, duration: 0.8 }), (Wu = { type: `keyframes`, ease: [0.25, 0.1, 0.35, 1], duration: 0.3 }), (Gu = (e, { keyframes: t }) => (t.length > 2 ? Uu : Gc.has(e) ? (e.startsWith(`scale`) ? Hu(t[1]) : Vu) : Wu)), (Ku = (e, t, n, r = {}, i, a) => (o) => { let s = qt(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r; l -= F(c); let u = { keyframes: Array.isArray(n) ? n : [null, n], ease: `easeOut`, velocity: t.getVelocity(), ...s, delay: -l, onUpdate: (e) => { t.set(e), s.onUpdate && s.onUpdate(e); }, onComplete: () => { o(), s.onComplete && s.onComplete(); }, name: e, motionValue: t, element: a ? void 0 : i }; Or(s) || Object.assign(u, Gu(e, u)), (u.duration &&= F(u.duration)), (u.repeatDelay &&= F(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from); let d = !1; if ( ((u.type === !1 || (u.duration === 0 && !u.repeatDelay)) && ((u.duration = 0), u.delay === 0 && (d = !0)), (N.instantAnimations || N.skipAnimations) && ((d = !0), (u.duration = 0), (u.delay = 0)), (u.allowFlatten = !s.type && !s.ease), d && !a && t.get() !== void 0) ) { let e = Dr(u.keyframes, s); if (e !== void 0) { R.update(() => { u.onUpdate(e), u.onComplete(); }); return; } } return s.isSync ? new Pc(u) : new hl(u); }), (qu = Tu.length), (Ju = [...wu].reverse()), (Yu = wu.length), (Q = class { constructor(e) { (this.isMounted = !1), (this.node = e); } update() {} }), (Xu = class extends Q { constructor(e) { super(e), (e.animationState ||= Rr(e)); } updateAnimationControlsSubscription() { let { animate: e } = this.node.getProps(); In(e) && (this.unmountControls = e.subscribe(this.node)); } mount() { this.updateAnimationControlsSubscription(); } update() { let { animate: e } = this.node.getProps(), { animate: t } = this.node.prevProps || {}; e !== t && this.updateAnimationControlsSubscription(); } unmount() { var e; this.node.animationState.reset(), (e = this.unmountControls) == null || e.call(this); } }), (Zu = 0), (Qu = class extends Q { constructor() { super(...arguments), (this.id = Zu++); } update() { if (!this.node.presenceContext) return; let { isPresent: e, onExitComplete: t } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {}; if (!this.node.animationState || e === n) return; let r = this.node.animationState.setActive(`exit`, !e); t && !e && r.then(() => { t(this.id); }); } mount() { let { register: e, onExitComplete: t } = this.node.presenceContext || {}; t && t(this.id), e && (this.unmount = e(this.id)); } unmount() {} }), ($u = { animation: { Feature: Xu }, exit: { Feature: Qu } }), (ed = (e) => (t) => Gl(t) && e(t, Hr(t))), (td = 1e-4), (nd = 1 - td), (rd = 1 + td), (id = 0.01), (ad = 0 - id), (od = 0 + id), (sd = () => ({ translate: 0, scale: 1, origin: 0, originPoint: 0 })), (cd = () => ({ x: sd(), y: sd() })), (ld = () => ({ min: 0, max: 0 })), ($ = () => ({ x: ld(), y: ld() })), (ud = (e, t) => Math.abs(e - t)), (dd = (e, t) => e.depth - t.depth), (fd = class { constructor() { (this.children = []), (this.isDirty = !1); } add(e) { ke(this.children, e), (this.isDirty = !0); } remove(e) { Ae(this.children, e), (this.isDirty = !0); } forEach(e) { this.isDirty && this.children.sort(dd), (this.isDirty = !1), this.children.forEach(e); } }), (pd = new WeakMap()), (md = { current: null }), (hd = { current: !1 }), (gd = [ `AnimationStart`, `AnimationComplete`, `Update`, `BeforeLayoutMeasure`, `LayoutMeasure`, `LayoutAnimationStart`, `LayoutAnimationComplete` ]), (_d = class { scrapeMotionValuesFromProps(e, t, n) { return {}; } constructor( { parent: e, props: t, presenceContext: n, reducedMotionConfig: r, blockInitialAnimation: i, visualState: a }, o = {} ) { (this.current = null), (this.children = new Set()), (this.isVariantNode = !1), (this.isControllingVariants = !1), (this.shouldReduceMotion = null), (this.values = new Map()), (this.KeyframeResolver = el), (this.features = {}), (this.valueSubscriptions = new Map()), (this.prevMotionValues = {}), (this.events = {}), (this.propEventSubscriptions = {}), (this.notifyUpdate = () => this.notify(`Update`, this.latestValues)), (this.render = () => { this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection)); }), (this.renderScheduledAt = 0), (this.scheduleRender = () => { let e = V.now(); this.renderScheduledAt < e && ((this.renderScheduledAt = e), R.render(this.render, !1, !0)); }); let { latestValues: s, renderState: c } = a; (this.latestValues = s), (this.baseTarget = { ...s }), (this.initialValues = t.initial ? { ...s } : {}), (this.renderState = c), (this.parent = e), (this.props = t), (this.presenceContext = n), (this.depth = e ? e.depth + 1 : 0), (this.reducedMotionConfig = r), (this.options = o), (this.blockInitialAnimation = !!i), (this.isControllingVariants = Rn(t)), (this.isVariantNode = zn(t)), this.isVariantNode && (this.variantChildren = new Set()), (this.manuallyAnimateOnMount = !!(e && e.current)); let { willChange: l, ...u } = this.scrapeMotionValuesFromProps(t, {}, this); for (let e in u) { let t = u[e]; s[e] !== void 0 && X(t) && t.set(s[e], !1); } } mount(e) { (this.current = e), pd.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, t) => this.bindToMotionValue(t, e)), hd.current || ei(), (this.shouldReduceMotion = this.reducedMotionConfig === `never` ? !1 : this.reducedMotionConfig === `always` ? !0 : md.current), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext); } unmount() { for (let e in (this.projection && this.projection.unmount(), z(this.notifyUpdate), z(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this), this.events)) this.events[e].clear(); for (let e in this.features) { let t = this.features[e]; t && (t.unmount(), (t.isMounted = !1)); } this.current = null; } bindToMotionValue(e, t) { this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(); let n = Gc.has(e); n && this.onBindTransform && this.onBindTransform(); let r = t.on(`change`, (t) => { (this.latestValues[e] = t), this.props.onUpdate && R.preRender(this.notifyUpdate), n && this.projection && (this.projection.isTransformDirty = !0); }), i = t.on(`renderRequest`, this.scheduleRender), a; S.MotionCheckAppearSync && (a = S.MotionCheckAppearSync(this, e, t)), this.valueSubscriptions.set(e, () => { r(), i(), a && a(), t.owner && t.stop(); }); } sortNodePosition(e) { return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current); } updateFeatures() { let e = `animation`; for (e in gu) { let t = gu[e]; if (!t) continue; let { isEnabled: n, Feature: r } = t; if ((!this.features[e] && r && n(this.props) && (this.features[e] = new r(this)), this.features[e])) { let t = this.features[e]; t.isMounted ? t.update() : (t.mount(), (t.isMounted = !0)); } } } triggerBuild() { this.build(this.renderState, this.latestValues, this.props); } measureViewportBox() { return this.current ? this.measureInstanceViewportBox(this.current, this.props) : $(); } getStaticValue(e) { return this.latestValues[e]; } setStaticValue(e, t) { this.latestValues[e] = t; } update(e, t) { (e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), (this.prevProps = this.props), (this.props = e), (this.prevPresenceContext = this.presenceContext), (this.presenceContext = t); for (let t = 0; t < gd.length; t++) { let n = gd[t]; this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]); let r = `on` + n, i = e[r]; i && (this.propEventSubscriptions[n] = this.on(n, i)); } (this.prevMotionValues = ti( this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues )), this.handleChildMotionValue && this.handleChildMotionValue(); } getProps() { return this.props; } getVariant(e) { return this.props.variants ? this.props.variants[e] : void 0; } getDefaultTransition() { return this.props.transition; } getTransformPagePoint() { return this.props.transformPagePoint; } getClosestVariantNode() { return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0; } addVariantChild(e) { let t = this.getClosestVariantNode(); if (t) return t.variantChildren && t.variantChildren.add(e), () => t.variantChildren.delete(e); } addValue(e, t) { let n = this.values.get(e); t !== n && (n && this.removeValue(e), this.bindToMotionValue(e, t), this.values.set(e, t), (this.latestValues[e] = t.get())); } removeValue(e) { this.values.delete(e); let t = this.valueSubscriptions.get(e); t && (t(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState); } hasValue(e) { return this.values.has(e); } getValue(e, t) { if (this.props.values && this.props.values[e]) return this.props.values[e]; let n = this.values.get(e); return ( n === void 0 && t !== void 0 && ((n = E(t === null ? void 0 : t, { owner: this })), this.addValue(e, n)), n ); } readValue(e, t) { let n = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options); return ( n != null && (typeof n == `string` && (cs(n) || ls(n)) ? (n = parseFloat(n)) : !ru(n) && K.test(t) && (n = Yt(e, t)), this.setBaseTarget(e, X(n) ? n.get() : n)), X(n) ? n.get() : n ); } setBaseTarget(e, t) { this.baseTarget[e] = t; } getBaseTarget(e) { var t; let { initial: n } = this.props, r; if (typeof n == `string` || typeof n == `object`) { let i = nr(this.props, n, (t = this.presenceContext)?.custom); i && (r = i[e]); } if (n && r !== void 0) return r; let i = this.getBaseTargetFromProps(this.props, e); return i !== void 0 && !X(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e]; } on(e, t) { return this.events[e] || (this.events[e] = new ps()), this.events[e].add(t); } notify(e, ...t) { this.events[e] && this.events[e].notify(...t); } }), (vd = 0.999999999999), (yd = 1.0000000000001), (bd = ({ current: e }) => (e ? e.ownerDocument.defaultView : null)), (xd = class { constructor(e, t, { transformPagePoint: n, contextWindow: r, dragSnapToOrigin: i = !1 } = {}) { if ( ((this.startEvent = null), (this.lastMoveEvent = null), (this.lastMoveEventInfo = null), (this.handlers = {}), (this.contextWindow = S), (this.updatePoint = () => { if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return; let e = Si(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = Qr(e.offset, { x: 0, y: 0 }) >= 3; if (!t && !n) return; let { point: r } = e, { timestamp: i } = B; this.history.push({ ...r, timestamp: i }); let { onStart: a, onMove: o } = this.handlers; t || (a && a(this.lastMoveEvent, e), (this.startEvent = this.lastMoveEvent)), o && o(this.lastMoveEvent, e); }), (this.handlePointerMove = (e, t) => { (this.lastMoveEvent = e), (this.lastMoveEventInfo = bi(t, this.transformPagePoint)), R.update(this.updatePoint, !0); }), (this.handlePointerUp = (e, t) => { this.end(); let { onEnd: n, onSessionEnd: r, resumeAnimation: i } = this.handlers; if ((this.dragSnapToOrigin && i && i(), !(this.lastMoveEvent && this.lastMoveEventInfo))) return; let a = Si( e.type === `pointercancel` ? this.lastMoveEventInfo : bi(t, this.transformPagePoint), this.history ); this.startEvent && n && n(e, a), r && r(e, a); }), !Gl(e)) ) return; (this.dragSnapToOrigin = i), (this.handlers = t), (this.transformPagePoint = n), (this.contextWindow = r || S); let a = Hr(e), o = bi(a, this.transformPagePoint), { point: s } = o, { timestamp: c } = B; this.history = [{ ...s, timestamp: c }]; let { onSessionStart: l } = t; l && l(e, Si(o, this.history)), (this.removeListeners = ds( Wr(this.contextWindow, `pointermove`, this.handlePointerMove), Wr(this.contextWindow, `pointerup`, this.handlePointerUp), Wr(this.contextWindow, `pointercancel`, this.handlePointerUp) )); } updateHandlers(e) { this.handlers = e; } end() { this.removeListeners && this.removeListeners(), z(this.updatePoint); } }), (Sd = 0.35), (Cd = new WeakMap()), (wd = class { constructor(e) { (this.openDragLock = null), (this.isDragging = !1), (this.currentDirection = null), (this.originPoint = { x: 0, y: 0 }), (this.constraints = !1), (this.hasMutatedConstraints = !1), (this.elastic = $()), (this.visualElement = e); } start(e, { snapToCursor: t = !1 } = {}) { let { presenceContext: n } = this.visualElement; if (n && n.isPresent === !1) return; let r = (e) => { let { dragSnapToOrigin: n } = this.getProps(); n ? this.pauseAnimation() : this.stopAnimation(), t && this.snapToCursor(Hr(e).point); }, i = (e, t) => { let { drag: n, dragPropagation: r, onDragStart: i } = this.getProps(); if ( n && !r && (this.openDragLock && this.openDragLock(), (this.openDragLock = en(n)), !this.openDragLock) ) return; (this.isDragging = !0), (this.currentDirection = null), this.resolveConstraints(), this.visualElement.projection && ((this.visualElement.projection.isAnimationBlocked = !0), (this.visualElement.projection.target = void 0)), k((e) => { let t = this.getAxisMotionValue(e).get() || 0; if (U.test(t)) { let { projection: n } = this.visualElement; if (n && n.layout) { let r = n.layout.layoutBox[e]; if (r) { let e = O(r); t = e * (parseFloat(t) / 100); } } } this.originPoint[e] = t; }), i && R.postRender(() => i(e, t)), Tr(this.visualElement, `transform`); let { animationState: a } = this.visualElement; a && a.setActive(`whileDrag`, !0); }, a = (e, t) => { let { dragPropagation: n, dragDirectionLock: r, onDirectionLock: i, onDrag: a } = this.getProps(); if (!n && !this.openDragLock) return; let { offset: o } = t; if (r && this.currentDirection === null) { (this.currentDirection = Li(o)), this.currentDirection !== null && i && i(this.currentDirection); return; } this.updateAxis(`x`, t.point, o), this.updateAxis(`y`, t.point, o), this.visualElement.render(), a && a(e, t); }, o = (e, t) => this.stop(e, t), s = () => k((e) => { var t; return this.getAnimationState(e) === `paused` && (t = this.getAxisMotionValue(e).animation)?.play(); }), { dragSnapToOrigin: c } = this.getProps(); this.panSession = new xd( e, { onSessionStart: r, onStart: i, onMove: a, onSessionEnd: o, resumeAnimation: s }, { transformPagePoint: this.visualElement.getTransformPagePoint(), dragSnapToOrigin: c, contextWindow: bd(this.visualElement) } ); } stop(e, t) { let n = this.isDragging; if ((this.cancel(), !n)) return; let { velocity: r } = t; this.startAnimation(r); let { onDragEnd: i } = this.getProps(); i && R.postRender(() => i(e, t)); } cancel() { this.isDragging = !1; let { projection: e, animationState: t } = this.visualElement; e && (e.isAnimationBlocked = !1), this.panSession && this.panSession.end(), (this.panSession = void 0); let { dragPropagation: n } = this.getProps(); !n && this.openDragLock && (this.openDragLock(), (this.openDragLock = null)), t && t.setActive(`whileDrag`, !1); } updateAxis(e, t, n) { let { drag: r } = this.getProps(); if (!n || !Ii(e, r, this.currentDirection)) return; let i = this.getAxisMotionValue(e), a = this.originPoint[e] + n[e]; this.constraints && this.constraints[e] && (a = Ei(a, this.constraints[e], this.elastic[e])), i.set(a); } resolveConstraints() { var e; let { dragConstraints: t, dragElastic: n } = this.getProps(), r = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection)?.layout, i = this.constraints; t && Un(t) ? (this.constraints ||= this.resolveRefConstraints()) : t && r ? (this.constraints = Oi(r.layoutBox, t)) : (this.constraints = !1), (this.elastic = Ni(n)), i !== this.constraints && r && this.constraints && !this.hasMutatedConstraints && k((e) => { this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = Mi(r.layoutBox[e], this.constraints[e])); }); } resolveRefConstraints() { let { dragConstraints: e, onMeasureDragConstraints: t } = this.getProps(); if (!e || !Un(e)) return !1; let n = e.current; M( n !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop." ); let { projection: r } = this.visualElement; if (!r || !r.layout) return !1; let i = yi(n, r.root, this.visualElement.getTransformPagePoint()), a = Ai(r.layout.layoutBox, i); if (t) { let e = t(ri(a)); (this.hasMutatedConstraints = !!e), e && (a = ni(e)); } return a; } startAnimation(e) { let { drag: t, dragMomentum: n, dragElastic: r, dragTransition: i, dragSnapToOrigin: a, onDragTransitionEnd: o } = this.getProps(), s = this.constraints || {}, c = k((o) => { if (!Ii(o, t, this.currentDirection)) return; let c = (s && s[o]) || {}; a && (c = { min: 0, max: 0 }); let l = r ? 200 : 1e6, u = r ? 40 : 1e7, d = { type: `inertia`, velocity: n ? e[o] : 0, bounceStiffness: l, bounceDamping: u, timeConstant: 750, restDelta: 1, restSpeed: 10, ...i, ...c }; return this.startAxisValueAnimation(o, d); }); return Promise.all(c).then(o); } startAxisValueAnimation(e, t) { let n = this.getAxisMotionValue(e); return Tr(this.visualElement, e), n.start(Ku(e, n, 0, t, this.visualElement, !1)); } stopAnimation() { k((e) => this.getAxisMotionValue(e).stop()); } pauseAnimation() { k((e) => { var t; return (t = this.getAxisMotionValue(e).animation)?.pause(); }); } getAnimationState(e) { var t; return (t = this.getAxisMotionValue(e).animation)?.state; } getAxisMotionValue(e) { let t = `_drag${e.toUpperCase()}`, n = this.visualElement.getProps(), r = n[t]; return r || this.visualElement.getValue(e, (n.initial ? n.initial[e] : void 0) || 0); } snapToCursor(e) { k((t) => { let { drag: n } = this.getProps(); if (!Ii(t, n, this.currentDirection)) return; let { projection: r } = this.visualElement, i = this.getAxisMotionValue(t); if (r && r.layout) { let { min: n, max: a } = r.layout.layoutBox[t]; i.set(e[t] - q(n, a, 0.5)); } }); } scalePositionWithinConstraints() { if (!this.visualElement.current) return; let { drag: e, dragConstraints: t } = this.getProps(), { projection: n } = this.visualElement; if (!Un(t) || !n || !this.constraints) return; this.stopAnimation(); let r = { x: 0, y: 0 }; k((e) => { let t = this.getAxisMotionValue(e); if (t && this.constraints !== !1) { let n = t.get(); r[e] = ji({ min: n, max: n }, this.constraints[e]); } }); let { transformTemplate: i } = this.visualElement.getProps(); (this.visualElement.current.style.transform = i ? i({}, ``) : `none`), n.root && n.root.updateScroll(), n.updateLayout(), this.resolveConstraints(), k((t) => { if (!Ii(t, e, null)) return; let n = this.getAxisMotionValue(t), { min: i, max: a } = this.constraints[t]; n.set(q(i, a, r[t])); }); } addListeners() { if (!this.visualElement.current) return; Cd.set(this.visualElement, this); let e = this.visualElement.current, t = Wr(e, `pointerdown`, (e) => { let { drag: t, dragListener: n = !0 } = this.getProps(); t && n && this.start(e); }), n = () => { let { dragConstraints: e } = this.getProps(); Un(e) && e.current && (this.constraints = this.resolveRefConstraints()); }, { projection: r } = this.visualElement, i = r.addEventListener(`measure`, n); r && !r.layout && (r.root && r.root.updateScroll(), r.updateLayout()), R.read(n); let a = Ur(S, `resize`, () => this.scalePositionWithinConstraints()), o = r.addEventListener(`didUpdate`, ({ delta: e, hasLayoutChanged: t }) => { this.isDragging && t && (k((t) => { let n = this.getAxisMotionValue(t); n && ((this.originPoint[t] += e[t].translate), n.set(n.get() + e[t].translate)); }), this.visualElement.render()); }); return () => { a(), t(), i(), o && o(); }; } getProps() { let e = this.visualElement.getProps(), { drag: t = !1, dragDirectionLock: n = !1, dragPropagation: r = !1, dragConstraints: i = !1, dragElastic: a = Sd, dragMomentum: o = !0 } = e; return { ...e, drag: t, dragDirectionLock: n, dragPropagation: r, dragConstraints: i, dragElastic: a, dragMomentum: o }; } }), (Td = class extends Q { constructor(e) { super(e), (this.removeGroupControls = P), (this.removeListeners = P), (this.controls = new wd(e)); } mount() { let { dragControls: e } = this.node.getProps(); e && (this.removeGroupControls = e.subscribe(this.controls)), (this.removeListeners = this.controls.addListeners() || P); } unmount() { this.removeGroupControls(), this.removeListeners(); } }), (Ed = (e) => (t, n) => { e && R.postRender(() => e(t, n)); }), (Dd = class extends Q { constructor() { super(...arguments), (this.removePointerDownListener = P); } onPointerDown(e) { this.session = new xd(e, this.createPanHandlers(), { transformPagePoint: this.node.getTransformPagePoint(), contextWindow: bd(this.node) }); } createPanHandlers() { let { onPanSessionStart: e, onPanStart: t, onPan: n, onPanEnd: r } = this.node.getProps(); return { onSessionStart: Ed(e), onStart: Ed(t), onMove: n, onEnd: (e, t) => { delete this.session, r && R.postRender(() => r(e, t)); } }; } mount() { this.removePointerDownListener = Wr(this.node.current, `pointerdown`, (e) => this.onPointerDown(e)); } update() { this.session && this.session.updateHandlers(this.createPanHandlers()); } unmount() { this.removePointerDownListener(), this.session && this.session.end(); } }), (Od = { hasAnimatedSinceResize: !0, hasEverUpdated: !1 }), (kd = { correct: (e, t) => { if (!t.target) return e; if (typeof e == `string`) if (W.test(e)) e = parseFloat(e); else return e; let n = Ri(e, t.target.x), r = Ri(e, t.target.y); return `${n}% ${r}%`; } }), (Ad = { correct: (e, { treeScale: t, projectionDelta: n }) => { let r = e, i = K.parse(e); if (i.length > 5) return r; let a = K.createTransformer(e), o = typeof i[0] == `number` ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y; (i[0 + o] /= s), (i[1 + o] /= c); let l = q(s, c, 0.5); return typeof i[2 + o] == `number` && (i[2 + o] /= l), typeof i[3 + o] == `number` && (i[3 + o] /= l), a(i); } }), (jd = class extends n { componentDidMount() { let { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: r } = this.props, { projection: i } = e; Qn(Md), i && (t.group && t.group.add(i), n && n.register && r && n.register(i), i.root.didUpdate(), i.addEventListener(`animationComplete`, () => { this.safeToRemove(); }), i.setOptions({ ...i.options, onExitComplete: () => this.safeToRemove() })), (Od.hasEverUpdated = !0); } getSnapshotBeforeUpdate(e) { let { layoutDependency: t, visualElement: n, drag: r, isPresent: i } = this.props, { projection: a } = n; return a ? ((a.isPresent = i), r || e.layoutDependency !== t || t === void 0 || e.isPresent !== i ? a.willUpdate() : this.safeToRemove(), e.isPresent !== i && (i ? a.promote() : a.relegate() || R.postRender(() => { let e = a.getStack(); (!e || !e.members.length) && this.safeToRemove(); })), null) : null; } componentDidUpdate() { let { projection: e } = this.props.visualElement; e && (e.root.didUpdate(), Hl.postRender(() => { !e.currentAnimation && e.isLead() && this.safeToRemove(); })); } componentWillUnmount() { let { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: r } = e; r && (r.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(r), n && n.deregister && n.deregister(r)); } safeToRemove() { let { safeToRemove: e } = this.props; e && e(); } render() { return null; } }), (Md = { borderRadius: { ...kd, applyTo: [`borderTopLeftRadius`, `borderTopRightRadius`, `borderBottomLeftRadius`, `borderBottomRightRadius`] }, borderTopLeftRadius: kd, borderTopRightRadius: kd, borderBottomLeftRadius: kd, borderBottomRightRadius: kd, boxShadow: Ad }), (Nd = [`TopLeft`, `TopRight`, `BottomLeft`, `BottomRight`]), (Pd = Nd.length), (Fd = (e) => (typeof e == `string` ? parseFloat(e) : e)), (Id = (e) => typeof e == `number` || W.test(e)), (Ld = Ui(0, 0.5, Ts)), (Rd = Ui(0.5, 0.95, P)), (zd = [`x`, `scaleX`, `originX`]), (Bd = [`y`, `scaleY`, `originY`]), (Vd = class { constructor() { this.members = []; } add(e) { ke(this.members, e), e.scheduleRender(); } remove(e) { if ((Ae(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead)) { let e = this.members[this.members.length - 1]; e && this.promote(e); } } relegate(e) { let t = this.members.findIndex((t) => e === t); if (t === 0) return !1; let n; for (let e = t; e >= 0; e--) { let t = this.members[e]; if (t.isPresent !== !1) { n = t; break; } } return n ? (this.promote(n), !0) : !1; } promote(e, t) { let n = this.lead; if (e !== n && ((this.prevLead = n), (this.lead = e), e.show(), n)) { n.instance && n.scheduleRender(), e.scheduleRender(), (e.resumeFrom = n), t && (e.resumeFrom.preserveOpacity = !0), n.snapshot && ((e.snapshot = n.snapshot), (e.snapshot.latestValues = n.animationValues || n.latestValues)), e.root && e.root.isUpdating && (e.isLayoutDirty = !0); let { crossfade: r } = e.options; r === !1 && n.hide(); } } exitAnimationComplete() { this.members.forEach((e) => { let { options: t, resumingFrom: n } = e; t.onExitComplete && t.onExitComplete(), n && n.options.onExitComplete && n.options.onExitComplete(); }); } scheduleRender() { this.members.forEach((e) => { e.instance && e.scheduleRender(!1); }); } removeLeadSnapshot() { this.lead && this.lead.snapshot && (this.lead.snapshot = void 0); } }), (Hd = { nodes: 0, calculatedTargetDeltas: 0, calculatedProjections: 0 }), (Ud = [``, `X`, `Y`, `Z`]), (Wd = { visibility: `hidden` }), (Gd = 1e3), (Kd = 0), (qd = { duration: 0.45, ease: [0.4, 0, 0.1, 1] }), (Jd = (e) => p !== void 0 && p.userAgent && p.userAgent.toLowerCase().includes(e)), (Yd = Jd(`applewebkit/`) && !Jd(`chrome/`) ? Math.round : P), (Xd = sa({ attachResizeListener: (e, t) => Ur(e, `resize`, t), measureScroll: () => ({ x: document.documentElement.scrollLeft || document.body.scrollLeft, y: document.documentElement.scrollTop || document.body.scrollTop }), checkIsScrollRoot: () => !0 })), (Zd = { current: void 0 }), (Qd = sa({ measureScroll: (e) => ({ x: e.scrollLeft, y: e.scrollTop }), defaultParent: () => { if (!Zd.current) { let e = new Xd({}); e.mount(S), e.setOptions({ layoutScroll: !0 }), (Zd.current = e); } return Zd.current; }, resetTransform: (e, t) => { e.style.transform = t === void 0 ? `none` : t; }, checkIsScrollRoot: (e) => S.getComputedStyle(e).position === `fixed` })), ($d = { pan: { Feature: Dd }, drag: { Feature: Td, ProjectionNode: Qd, MeasureLayout: zi } }), (ef = class extends Q { mount() { let { current: e } = this.node; e && (this.unmount = rn(e, (e, t) => (ka(this.node, t, `Start`), (e) => ka(this.node, e, `End`)))); } unmount() {} }), (tf = class extends Q { constructor() { super(...arguments), (this.isActive = !1); } onFocus() { let e = !1; try { e = this.node.current.matches(`:focus-visible`); } catch { e = !0; } !e || !this.node.animationState || (this.node.animationState.setActive(`whileFocus`, !0), (this.isActive = !0)); } onBlur() { !this.isActive || !this.node.animationState || (this.node.animationState.setActive(`whileFocus`, !1), (this.isActive = !1)); } mount() { this.unmount = ds( Ur(this.node.current, `focus`, () => this.onFocus()), Ur(this.node.current, `blur`, () => this.onBlur()) ); } unmount() {} }), (nf = class extends Q { mount() { let { current: e } = this.node; e && (this.unmount = ln( e, (e, t) => (Aa(this.node, t, `Start`), (e, { success: t }) => Aa(this.node, e, t ? `End` : `Cancel`)), { useGlobalTarget: this.node.props.globalTapTarget } )); } unmount() {} }), (rf = new WeakMap()), (af = new WeakMap()), (sf = (e) => { let t = rf.get(e.target); t && t(e); }), (cf = (e) => { e.forEach(sf); }), (lf = { some: 0, all: 1 }), (uf = class extends Q { constructor() { super(...arguments), (this.hasEnteredView = !1), (this.isInView = !1); } startObserver() { this.unmount(); let { viewport: e = {} } = this.node.getProps(), { root: t, margin: n, amount: r = `some`, once: i } = e, a = { root: t ? t.current : void 0, rootMargin: n, threshold: typeof r == `number` ? r : lf[r] }, o = (e) => { let { isIntersecting: t } = e; if (this.isInView === t || ((this.isInView = t), i && !t && this.hasEnteredView)) return; t && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive(`whileInView`, t); let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), a = t ? n : r; a && a(e); }; return Ma(this.node.current, a, o); } mount() { this.startObserver(); } update() { if (typeof IntersectionObserver > `u`) return; let { props: e, prevProps: t } = this.node, n = [`amount`, `margin`, `root`].some(Na(e, t)); n && this.startObserver(); } unmount() {} }), (df = { inView: { Feature: uf }, tap: { Feature: nf }, focus: { Feature: tf }, hover: { Feature: ef } }), (ff = { layout: { ProjectionNode: Qd, MeasureLayout: zi } }), (pf = class extends _d { constructor() { super(...arguments), (this.KeyframeResolver = Pl); } sortInstanceNodePosition(e, t) { return e.compareDocumentPosition(t) & 2 ? 1 : -1; } getBaseTargetFromProps(e, t) { return e.style ? e.style[t] : void 0; } removeValueFromRenderState(e, { vars: t, style: n }) { delete t[e], delete n[e]; } handleChildMotionValue() { this.childSubscription && (this.childSubscription(), delete this.childSubscription); let { children: e } = this.props; X(e) && (this.childSubscription = e.on(`change`, (e) => { this.current && (this.current.textContent = `${e}`); })); } }), (mf = class extends pf { constructor() { super(...arguments), (this.type = `html`), (this.renderInstance = Pa); } readValueFromInstance(e, t) { var n; if (Gc.has(t)) return (n = this.projection)?.isProjecting ? Et(t) : Uc(e, t); { let n = Fa(e), r = (Vs(t) ? n.getPropertyValue(t) : n[t]) || 0; return typeof r == `string` ? r.trim() : r; } } measureInstanceViewportBox(e, { transformPagePoint: t }) { return vi(e, t); } build(e, t, n) { sr(e, t, n.transformTemplate); } scrapeMotionValuesFromProps(e, t, n) { return _r(e, t, n); } }), (hf = new Set([ `baseFrequency`, `diffuseConstant`, `kernelMatrix`, `kernelUnitLength`, `keySplines`, `keyTimes`, `limitingConeAngle`, `markerHeight`, `markerWidth`, `numOctaves`, `targetX`, `targetY`, `surfaceScale`, `specularConstant`, `specularExponent`, `stdDeviation`, `tableValues`, `viewBox`, `gradientTransform`, `pathLength`, `startOffset`, `textLength`, `lengthAdjust` ])), (gf = class extends pf { constructor() { super(...arguments), (this.type = `svg`), (this.isSVGTag = !1), (this.measureInstanceViewportBox = $); } getBaseTargetFromProps(e, t) { return e[t]; } readValueFromInstance(e, t) { if (Gc.has(t)) { let e = Ml(t); return (e && e.default) || 0; } return (t = hf.has(t) ? t : bu(t)), e.getAttribute(t); } scrapeMotionValuesFromProps(e, t, n) { return vr(e, t, n); } build(e, t, n) { pr(e, t, this.isSVGTag, n.transformTemplate, n.style); } renderInstance(e, t, n, r) { Ia(e, t, n, r); } mount(e) { (this.isSVGTag = Fu(e.tagName)), super.mount(e); } }), (_f = (e, t) => (hr(e) ? new gf(t) : new mf(t, { allowProjection: e !== C }))), (vf = yr({ ...$u, ...df, ...$d, ...ff }, _f)), (yf = ar(vf)), (bf = { renderer: _f, ...$u, ...df }), (xf = { ...bf, ...$d, ...ff }), (Sf = { renderer: _f, ...$u }), (Cf = 50), (wf = () => ({ current: 0, offset: [], progress: 0, scrollLength: 0, targetOffset: 0, targetLength: 0, containerLength: 0, velocity: 0 })), (Tf = () => ({ time: 0, x: wf(), y: wf() })), (Ef = { x: { length: `Width`, position: `Left` }, y: { length: `Height`, position: `Top` } }), (Df = { start: 0, center: 0.5, end: 1 }), (Of = [0, 0]), (kf = { Enter: [ [0, 1], [1, 1] ], Exit: [ [0, 0], [1, 0] ], Any: [ [1, 0], [0, 1] ], All: [ [0, 0], [1, 1] ] }), (Af = { x: 0, y: 0 }), (jf = new WeakMap()), (Mf = new WeakMap()), (Nf = new WeakMap()), (Pf = (e) => (e === document.scrollingElement ? S : e)), (Ff = new Map()), (If = () => ({ scrollX: E(0), scrollY: E(0), scrollXProgress: E(0), scrollYProgress: E(0) })), (Lf = class extends Bl { constructor() { super(...arguments), (this.isEnabled = !1); } add(e) { (Gc.has(e) || Fl.has(e)) && ((this.isEnabled = !0), this.update()); } update() { this.set(this.isEnabled ? `transform` : `auto`); } }), (Rf = `easeInOut`), (zf = 20), (Bf = (e) => typeof e == `number`), (Vf = (e) => e.every(Bf)), (Hf = class extends _d { constructor() { super(...arguments), (this.type = `object`); } readValueFromInstance(e, t) { if (Oo(t, e)) { let n = e[t]; if (typeof n == `string` || typeof n == `number`) return n; } } getBaseTargetFromProps() {} removeValueFromRenderState(e, t) { delete t.output[e]; } measureInstanceViewportBox() { return $(); } build(e, t) { Object.assign(e.output, t); } renderInstance(e, { output: t }) { Object.assign(e, t); } sortInstanceNodePosition() { return 0; } }), (Uf = Fo()), (Wf = Io), (Gf = { some: 0, all: 1 }), (Kf = () => ({})), (qf = Au({ scrapeMotionValuesFromProps: Kf, createRenderState: Kf })), (Jf = {}), de(Jf, { Group: () => Xf, Item: () => Zf }), (Yf = T(null)), (Xf = i(Ko)), (Zf = i(Xo)); }), $f = e(() => { Qf(); }); export { cu as AnimatePresence, pu as LayoutGroup, Fn as MotionConfig, Z as MotionConfigContext, N as MotionGlobalConfig, Bl as MotionValue, os as PresenceContext, Cu as SwitchLayoutGroupContext, Lf as WillChangeMotionValue, ue as __commonJS, be as __decorateElement, ve as __decoratorMetadata, me as __decoratorStart, Te as __privateAdd, we as __privateGet, De as __privateMethod, Ee as __privateSet, xe as __publicField, ye as __runInitializers, pe as __toESM, Qn as addScaleCorrector, Uf as animate, wt as animateValue, z as cancelFrame, R as frame, Ho as inView, Qf as init_chunk_BLFSVU7M, Oe as init_chunk_YNHG2PI6, $f as init_framer_motion_5EXT2AMG, gt as interpolate, Lo as isMotionComponent, X as isMotionValue, Mn as isValidMotionProp, yf as motion, E as motionValue, Su as optimizedAppearDataAttribute, er as resolveMotionValue, Qa as scroll, pt as spring, Qo as stagger, bn as transform, Ro as unwrapMotionComponent, Wf as useAnimation, so as useAnimationFrame, Uo as useInView, zo as useInstantLayoutTransition, Wo as useInstantTransition, to as useMotionValue, wn as usePresence, co as useReducedMotion, lo as useReducedMotionConfig, Vo as useResetProjection, eo as useScroll, oo as useSpring, io as useTransform, pd as visualElementStore, ms as wrap }; //# sourceMappingURL=motion.QyqgvDba.mjs.map