squiffy-runtime 6.0.0-beta.0 → 6.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4917,7 +4917,7 @@ const at = typeof window < "u", Be = at ? (
4917
4917
  CSS: 2,
4918
4918
  TRANSFORM: 3,
4919
4919
  CSS_VAR: 4
4920
- }, Z = {
4920
+ }, j = {
4921
4921
  NUMBER: 0,
4922
4922
  UNIT: 1,
4923
4923
  COLOR: 2,
@@ -4930,7 +4930,7 @@ const at = typeof window < "u", Be = at ? (
4930
4930
  replace: 0,
4931
4931
  none: 1,
4932
4932
  blend: 2
4933
- }, Si = Symbol(), dr = Symbol(), pn = Symbol(), gs = Symbol(), ki = Symbol(), oo = Symbol(), te = 1e-11, Ft = 1e12, qe = 1e3, Ur = 120, dt = "", fn = /* @__PURE__ */ (() => {
4933
+ }, Si = Symbol(), dr = Symbol(), pn = Symbol(), gs = Symbol(), ki = Symbol(), oo = Symbol(), se = 1e-11, Ft = 1e12, qe = 1e3, Ur = 120, dt = "", fn = /* @__PURE__ */ (() => {
4934
4934
  const s = /* @__PURE__ */ new Map();
4935
4935
  return s.set("x", "translateX"), s.set("y", "translateY"), s.set("z", "translateZ"), s;
4936
4936
  })(), cs = [
@@ -4951,7 +4951,7 @@ const at = typeof window < "u", Be = at ? (
4951
4951
  "perspective",
4952
4952
  "matrix",
4953
4953
  "matrix3d"
4954
- ], dn = /* @__PURE__ */ cs.reduce((s, e) => ({ ...s, [e]: e + "(" }), {}), W = () => {
4954
+ ], dn = /* @__PURE__ */ cs.reduce((s, e) => ({ ...s, [e]: e + "(" }), {}), G = () => {
4955
4955
  }, dl = /(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i, gl = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i, ml = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, vl = /hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i, yl = /hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i, xi = /[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi, ao = /^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i, _l = /([a-z])([A-Z])/g, bl = /(\w+)(\([^)]+\)+)/g, lo = /(\*=|\+=|-=)/, co = {
4956
4956
  id: null,
4957
4957
  keyframes: null,
@@ -4968,19 +4968,19 @@ const at = typeof window < "u", Be = at ? (
4968
4968
  ease: "out(2)",
4969
4969
  composition: xe.replace,
4970
4970
  modifier: (s) => s,
4971
- onBegin: W,
4972
- onBeforeUpdate: W,
4973
- onUpdate: W,
4974
- onLoop: W,
4975
- onPause: W,
4976
- onComplete: W,
4977
- onRender: W
4971
+ onBegin: G,
4972
+ onBeforeUpdate: G,
4973
+ onUpdate: G,
4974
+ onLoop: G,
4975
+ onPause: G,
4976
+ onComplete: G,
4977
+ onRender: G
4978
4978
  }, ye = {
4979
4979
  /** @type {Scope} */
4980
4980
  current: null,
4981
4981
  /** @type {Document|DOMTarget} */
4982
4982
  root: H
4983
- }, G = {
4983
+ }, X = {
4984
4984
  /** @type {DefaultsParams} */
4985
4985
  defaults: co,
4986
4986
  /** @type {Number} */
@@ -4991,13 +4991,13 @@ const at = typeof window < "u", Be = at ? (
4991
4991
  tickThreshold: 200
4992
4992
  }, uo = { version: "4.1.3", engine: null };
4993
4993
  at && (Be.AnimeJS || (Be.AnimeJS = []), Be.AnimeJS.push(uo));
4994
- const ho = (s) => s.replace(_l, "$1-$2").toLowerCase(), Se = (s, e) => s.indexOf(e) === 0, wt = Date.now, Oe = Array.isArray, be = (s) => s && s.constructor === Object, Ye = (s) => typeof s == "number" && !isNaN(s), Ve = (s) => typeof s == "string", de = (s) => typeof s == "function", I = (s) => typeof s > "u", os = (s) => I(s) || s === null, gn = (s) => at && s instanceof SVGElement, po = (s) => dl.test(s), fo = (s) => Se(s, "rgb"), go = (s) => Se(s, "hsl"), Sl = (s) => po(s) || fo(s) || go(s), zt = (s) => !G.defaults.hasOwnProperty(s), Et = (s) => Ve(s) ? parseFloat(
4994
+ const ho = (s) => s.replace(_l, "$1-$2").toLowerCase(), Se = (s, e) => s.indexOf(e) === 0, wt = Date.now, Oe = Array.isArray, be = (s) => s && s.constructor === Object, Ye = (s) => typeof s == "number" && !isNaN(s), Ve = (s) => typeof s == "string", de = (s) => typeof s == "function", I = (s) => typeof s > "u", os = (s) => I(s) || s === null, gn = (s) => at && s instanceof SVGElement, po = (s) => dl.test(s), fo = (s) => Se(s, "rgb"), go = (s) => Se(s, "hsl"), Sl = (s) => po(s) || fo(s) || go(s), zt = (s) => !X.defaults.hasOwnProperty(s), Et = (s) => Ve(s) ? parseFloat(
4995
4995
  /** @type {String} */
4996
4996
  s
4997
4997
  ) : (
4998
4998
  /** @type {Number} */
4999
4999
  s
5000
- ), qt = Math.pow, xt = Math.sqrt, mn = Math.sin, vn = Math.cos, ot = Math.abs, wi = Math.exp, kl = Math.ceil, us = Math.floor, xl = Math.asin, Wr = Math.max, er = Math.atan2, Wt = Math.PI, Gr = Math.round, F = (s, e, t) => s < e ? e : s > t ? t : s, Ti = {}, N = (s, e) => {
5000
+ ), qt = Math.pow, xt = Math.sqrt, mn = Math.sin, vn = Math.cos, ot = Math.abs, wi = Math.exp, kl = Math.ceil, us = Math.floor, xl = Math.asin, Wr = Math.max, er = Math.atan2, Wt = Math.PI, Gr = Math.round, F = (s, e, t) => s < e ? e : s > t ? t : s, Ti = {}, B = (s, e) => {
5001
5001
  if (e < 0) return s;
5002
5002
  if (!e) return Gr(s);
5003
5003
  let t = Ti[e];
@@ -5010,7 +5010,7 @@ const ho = (s) => s.replace(_l, "$1-$2").toLowerCase(), Se = (s, e) => s.indexOf
5010
5010
  for (; e; )
5011
5011
  n = yn(0, --e), t = s[e], s[e] = s[n], s[n] = t;
5012
5012
  return s;
5013
- }, gr = (s) => s === 1 / 0 ? Ft : s === -1 / 0 ? -1e12 : s, Vt = (s) => s <= te ? te : gr(N(s, 11)), Ie = (s) => Oe(s) ? [...s] : s, hs = (s, e) => {
5013
+ }, gr = (s) => s === 1 / 0 ? Ft : s === -1 / 0 ? -1e12 : s, Vt = (s) => s <= se ? se : gr(B(s, 11)), Ie = (s) => Oe(s) ? [...s] : s, hs = (s, e) => {
5014
5014
  const t = (
5015
5015
  /** @type {T & U} */
5016
5016
  { ...s }
@@ -5046,19 +5046,19 @@ const ho = (s) => s.replace(_l, "$1-$2").toLowerCase(), Se = (s, e) => s.indexOf
5046
5046
  let n, r, o, i;
5047
5047
  e && (n = e.currentIteration, r = e.iterationProgress, o = e.reversed, i = e._alternate, e.revert());
5048
5048
  const l = s(...t);
5049
- return l && !de(l) && l.revert && (e = l), I(r) || (e.currentIteration = n, e.iterationProgress = (i && n % 2 ? !o : o) ? 1 - r : r), l || W;
5049
+ return l && !de(l) && l.revert && (e = l), I(r) || (e.currentIteration = n, e.iterationProgress = (i && n % 2 ? !o : o) ? 1 - r : r), l || G;
5050
5050
  };
5051
5051
  };
5052
5052
  class vo {
5053
5053
  /** @param {Number} [initTime] */
5054
5054
  constructor(e = 0) {
5055
- this.deltaTime = 0, this._currentTime = e, this._elapsedTime = e, this._startTime = e, this._lastTime = e, this._scheduledTime = 0, this._frameDuration = N(qe / Ur, 0), this._fps = Ur, this._speed = 1, this._hasChildren = !1, this._head = null, this._tail = null;
5055
+ this.deltaTime = 0, this._currentTime = e, this._elapsedTime = e, this._startTime = e, this._lastTime = e, this._scheduledTime = 0, this._frameDuration = B(qe / Ur, 0), this._fps = Ur, this._speed = 1, this._hasChildren = !1, this._head = null, this._tail = null;
5056
5056
  }
5057
5057
  get fps() {
5058
5058
  return this._fps;
5059
5059
  }
5060
5060
  set fps(e) {
5061
- const t = this._frameDuration, n = +e, r = n < te ? te : n, o = N(qe / r, 0);
5061
+ const t = this._frameDuration, n = +e, r = n < se ? se : n, o = B(qe / r, 0);
5062
5062
  this._fps = r, this._frameDuration = o, this._scheduledTime += o - t;
5063
5063
  }
5064
5064
  get speed() {
@@ -5066,7 +5066,7 @@ class vo {
5066
5066
  }
5067
5067
  set speed(e) {
5068
5068
  const t = +e;
5069
- this._speed = t < te ? te : t;
5069
+ this._speed = t < se ? se : t;
5070
5070
  }
5071
5071
  /**
5072
5072
  * @param {Number} time
@@ -5088,7 +5088,7 @@ class vo {
5088
5088
  }
5089
5089
  }
5090
5090
  const tr = (s, e, t, n, r) => {
5091
- const o = s.parent, i = s.duration, l = s.completed, c = s.iterationDuration, p = s.iterationCount, f = s._currentIteration, g = s._loopDelay, u = s._reversed, h = s._alternate, a = s._hasChildren, d = s._delay, m = s._currentTime, v = d + c, _ = e - d, S = F(m, -d, i), y = F(_, -d, i), b = _ - m, k = y > 0, x = y >= i, C = i <= te, O = r === Xe.FORCE;
5091
+ const o = s.parent, i = s.duration, l = s.completed, c = s.iterationDuration, p = s.iterationCount, f = s._currentIteration, g = s._loopDelay, u = s._reversed, h = s._alternate, a = s._hasChildren, d = s._delay, m = s._currentTime, v = d + c, _ = e - d, S = F(m, -d, i), y = F(_, -d, i), b = _ - m, k = y > 0, x = y >= i, C = i <= se, O = r === Xe.FORCE;
5092
5092
  let P = 0, w = _, E = 0;
5093
5093
  if (p > 1) {
5094
5094
  const U = ~~(y / (c + (x ? 0 : g)));
@@ -5115,67 +5115,67 @@ const tr = (s, e, t, n, r) => {
5115
5115
  /** @type {CallbackArgument} */
5116
5116
  s
5117
5117
  )), !a) {
5118
- const U = O || ($ ? b * -1 : b) >= G.tickThreshold, z = s._offset + (o ? o._offset : 0) + d + q;
5118
+ const U = O || ($ ? b * -1 : b) >= X.tickThreshold, z = s._offset + (o ? o._offset : 0) + d + q;
5119
5119
  let R = (
5120
5120
  /** @type {Tween} */
5121
5121
  /** @type {JSAnimation} */
5122
5122
  s._head
5123
- ), ae, ee, ke, me, V = 0;
5123
+ ), ae, te, ke, me, V = 0;
5124
5124
  for (; R; ) {
5125
- const j = R._composition, re = R._currentTime, ue = R._changeDuration, rt = R._absoluteStartTime + R._changeDuration, Le = R._nextRep, we = R._prevRep, he = j !== xe.none;
5125
+ const ee = R._composition, re = R._currentTime, ue = R._changeDuration, rt = R._absoluteStartTime + R._changeDuration, Le = R._nextRep, we = R._prevRep, he = ee !== xe.none;
5126
5126
  if ((U || (re !== ue || z <= rt + (Le ? Le._delay : 0)) && (re !== 0 || z >= R._absoluteStartTime)) && (!he || !R._isOverridden && (!R._isOverlapped || z <= rt) && (!Le || Le._isOverridden || z <= Le._absoluteStartTime) && (!we || we._isOverridden || z >= we._absoluteStartTime + we._changeDuration + R._delay))) {
5127
- const se = R._currentTime = F(q - R._startTime, 0, ue), Y = R._ease(se / R._updateDuration), Te = R._modifier, He = R._valueType, Ce = R._tweenType, Ae = Ce === fe.OBJECT, lt = He === Z.NUMBER, Me = lt && Ae || Y === 0 || Y === 1 ? -1 : G.precision;
5127
+ const Z = R._currentTime = F(q - R._startTime, 0, ue), J = R._ease(Z / R._updateDuration), Te = R._modifier, He = R._valueType, Ce = R._tweenType, Ae = Ce === fe.OBJECT, lt = He === j.NUMBER, Me = lt && Ae || J === 0 || J === 1 ? -1 : X.precision;
5128
5128
  let ge, T;
5129
5129
  if (lt)
5130
5130
  ge = T = /** @type {Number} */
5131
- Te(N(ut(R._fromNumber, R._toNumber, Y), Me));
5132
- else if (He === Z.UNIT)
5131
+ Te(B(ut(R._fromNumber, R._toNumber, J), Me));
5132
+ else if (He === j.UNIT)
5133
5133
  T = /** @type {Number} */
5134
- Te(N(ut(R._fromNumber, R._toNumber, Y), Me)), ge = `${T}${R._unit}`;
5135
- else if (He === Z.COLOR) {
5136
- const A = R._fromNumbers, B = R._toNumbers, J = N(F(
5134
+ Te(B(ut(R._fromNumber, R._toNumber, J), Me)), ge = `${T}${R._unit}`;
5135
+ else if (He === j.COLOR) {
5136
+ const A = R._fromNumbers, N = R._toNumbers, Q = B(F(
5137
5137
  /** @type {Number} */
5138
- Te(ut(A[0], B[0], Y)),
5138
+ Te(ut(A[0], N[0], J)),
5139
5139
  0,
5140
5140
  255
5141
- ), 0), Q = N(F(
5141
+ ), 0), W = B(F(
5142
5142
  /** @type {Number} */
5143
- Te(ut(A[1], B[1], Y)),
5143
+ Te(ut(A[1], N[1], J)),
5144
5144
  0,
5145
5145
  255
5146
- ), 0), ve = N(F(
5146
+ ), 0), ve = B(F(
5147
5147
  /** @type {Number} */
5148
- Te(ut(A[2], B[2], Y)),
5148
+ Te(ut(A[2], N[2], J)),
5149
5149
  0,
5150
5150
  255
5151
5151
  ), 0), Pe = F(
5152
5152
  /** @type {Number} */
5153
- Te(N(ut(A[3], B[3], Y), Me)),
5153
+ Te(B(ut(A[3], N[3], J), Me)),
5154
5154
  0,
5155
5155
  1
5156
5156
  );
5157
- if (ge = `rgba(${J},${Q},${ve},${Pe})`, he) {
5157
+ if (ge = `rgba(${Q},${W},${ve},${Pe})`, he) {
5158
5158
  const Ee = R._numbers;
5159
- Ee[0] = J, Ee[1] = Q, Ee[2] = ve, Ee[3] = Pe;
5159
+ Ee[0] = Q, Ee[1] = W, Ee[2] = ve, Ee[3] = Pe;
5160
5160
  }
5161
- } else if (He === Z.COMPLEX) {
5161
+ } else if (He === j.COMPLEX) {
5162
5162
  ge = R._strings[0];
5163
- for (let A = 0, B = R._toNumbers.length; A < B; A++) {
5164
- const J = (
5163
+ for (let A = 0, N = R._toNumbers.length; A < N; A++) {
5164
+ const Q = (
5165
5165
  /** @type {Number} */
5166
- Te(N(ut(R._fromNumbers[A], R._toNumbers[A], Y), Me))
5167
- ), Q = R._strings[A + 1];
5168
- ge += `${Q ? J + Q : J}`, he && (R._numbers[A] = J);
5166
+ Te(B(ut(R._fromNumbers[A], R._toNumbers[A], J), Me))
5167
+ ), W = R._strings[A + 1];
5168
+ ge += `${W ? Q + W : Q}`, he && (R._numbers[A] = Q);
5169
5169
  }
5170
5170
  }
5171
- if (he && (R._number = T), !n && j !== xe.blend) {
5171
+ if (he && (R._number = T), !n && ee !== xe.blend) {
5172
5172
  const A = R.property;
5173
5173
  ae = R.target, Ae ? ae[A] = ge : Ce === fe.ATTRIBUTE ? ae.setAttribute(
5174
5174
  A,
5175
5175
  /** @type {String} */
5176
5176
  ge
5177
- ) : (ee = /** @type {DOMTarget} */
5178
- ae.style, Ce === fe.TRANSFORM ? (ae !== ke && (ke = ae, me = ae[gs]), me[A] = ge, V = 1) : Ce === fe.CSS ? ee[A] = ge : Ce === fe.CSS_VAR && ee.setProperty(
5177
+ ) : (te = /** @type {DOMTarget} */
5178
+ ae.style, Ce === fe.TRANSFORM ? (ae !== ke && (ke = ae, me = ae[gs]), me[A] = ge, V = 1) : Ce === fe.CSS ? te[A] = ge : Ce === fe.CSS_VAR && te.setProperty(
5179
5179
  A,
5180
5180
  /** @type {String} */
5181
5181
  ge
@@ -5184,10 +5184,10 @@ const tr = (s, e, t, n, r) => {
5184
5184
  R._value = ge;
5185
5185
  }
5186
5186
  if (V && R._renderTransforms) {
5187
- let se = dt;
5188
- for (let Y in me)
5189
- se += `${dn[Y]}${me[Y]}) `;
5190
- ee.transform = se, V = 0;
5187
+ let Z = dt;
5188
+ for (let J in me)
5189
+ Z += `${dn[J]}${me[J]}) `;
5190
+ te.transform = Z, V = 0;
5191
5191
  }
5192
5192
  R = R._next;
5193
5193
  }
@@ -5201,7 +5201,7 @@ const tr = (s, e, t, n, r) => {
5201
5201
  s
5202
5202
  );
5203
5203
  }
5204
- return o && C ? !t && (o.began && !$ && _ >= i && !l || $ && _ <= te && l) && (s.onComplete(
5204
+ return o && C ? !t && (o.began && !$ && _ >= i && !l || $ && _ <= se && l) && (s.onComplete(
5205
5205
  /** @type {CallbackArgument} */
5206
5206
  s
5207
5207
  ), s.completed = !$) : k && x ? p === 1 / 0 ? s._startTime += s.duration : s._currentIteration >= p - 1 && (s.paused = !0, !l && !a && (s.completed = !0, !t && !(o && ($ || !o.began)) && (s.onComplete(
@@ -5226,7 +5226,7 @@ const tr = (s, e, t, n, r) => {
5226
5226
  !h.completed && !h.backwards && h._currentTime < h.iterationDuration && tr(h, u, t, 1, Xe.FORCE), h.began = !1, h.completed = !1;
5227
5227
  else {
5228
5228
  const a = h.duration, d = h._offset + h._delay, m = d + a;
5229
- !t && a <= te && (!d || m === u) && h.onComplete(h);
5229
+ !t && a <= se && (!d || m === u) && h.onComplete(h);
5230
5230
  }
5231
5231
  }), t || i.onLoop(
5232
5232
  /** @type {CallbackArgument} */
@@ -5234,7 +5234,7 @@ const tr = (s, e, t, n, r) => {
5234
5234
  );
5235
5235
  }
5236
5236
  ne(i, (u) => {
5237
- const h = N((c - u._offset) * u._speed, 12), a = u._fps < i._fps ? u.requestTick(p) : r;
5237
+ const h = B((c - u._offset) * u._speed, 12), a = u._fps < i._fps ? u.requestTick(p) : r;
5238
5238
  f += tr(u, h, t, n, a), !u.completed && g && (g = !1);
5239
5239
  }, l), !t && f && i.onRender(
5240
5240
  /** @type {CallbackArgument} */
@@ -5249,12 +5249,12 @@ const tr = (s, e, t, n, r) => {
5249
5249
  }
5250
5250
  }, Ut = {
5251
5251
  animation: null,
5252
- update: W
5252
+ update: G
5253
5253
  }, wl = (s) => {
5254
5254
  let e = Ut.animation;
5255
5255
  return e || (e = {
5256
- duration: te,
5257
- computeDeltaTime: W,
5256
+ duration: se,
5257
+ computeDeltaTime: G,
5258
5258
  _offset: 0,
5259
5259
  _delay: 0,
5260
5260
  _head: null,
@@ -5264,7 +5264,7 @@ const tr = (s, e, t, n, r) => {
5264
5264
  for (let n in t) {
5265
5265
  const r = t[n], o = r._head;
5266
5266
  if (o) {
5267
- const i = o._valueType, l = i === Z.COMPLEX || i === Z.COLOR ? Ie(o._fromNumbers) : null;
5267
+ const i = o._valueType, l = i === j.COMPLEX || i === j.COLOR ? Ie(o._fromNumbers) : null;
5268
5268
  let c = o._fromNumber, p = r._tail;
5269
5269
  for (; p && p !== o; ) {
5270
5270
  if (l)
@@ -5321,29 +5321,29 @@ class Cl extends vo {
5321
5321
  }
5322
5322
  // Getter and setter for speed
5323
5323
  get speed() {
5324
- return this._speed * (G.timeScale === 1 ? 1 : qe);
5324
+ return this._speed * (X.timeScale === 1 ? 1 : qe);
5325
5325
  }
5326
5326
  set speed(e) {
5327
- this._speed = e * G.timeScale, ne(this, (t) => t.speed = t._speed);
5327
+ this._speed = e * X.timeScale, ne(this, (t) => t.speed = t._speed);
5328
5328
  }
5329
5329
  // Getter and setter for timeUnit
5330
5330
  get timeUnit() {
5331
- return G.timeScale === 1 ? "ms" : "s";
5331
+ return X.timeScale === 1 ? "ms" : "s";
5332
5332
  }
5333
5333
  set timeUnit(e) {
5334
5334
  const n = e === "s", r = n ? 1e-3 : 1;
5335
- if (G.timeScale !== r) {
5336
- G.timeScale = r, G.tickThreshold = 200 * r;
5335
+ if (X.timeScale !== r) {
5336
+ X.timeScale = r, X.tickThreshold = 200 * r;
5337
5337
  const o = n ? 1e-3 : qe;
5338
5338
  this.defaults.duration *= o, this._speed *= o;
5339
5339
  }
5340
5340
  }
5341
5341
  // Getter and setter for precision
5342
5342
  get precision() {
5343
- return G.precision;
5343
+ return X.precision;
5344
5344
  }
5345
5345
  set precision(e) {
5346
- G.precision = e;
5346
+ X.precision = e;
5347
5347
  }
5348
5348
  }
5349
5349
  const _e = /* @__PURE__ */ (() => {
@@ -5465,7 +5465,7 @@ const bo = (s) => {
5465
5465
  /** @type {SVGGeometryElement} */
5466
5466
  t.getPointAtLength(p * h)
5467
5467
  ), d = n.getPointAtLength(f * h), m = r ? u === 0 ? "M" : "L" : "";
5468
- l += m + N(a.x, 3) + o + a.y + " ", c += m + N(d.x, 3) + o + d.y + " ";
5468
+ l += m + B(a.x, 3) + o + a.y + " ", c += m + B(d.x, 3) + o + d.y + " ";
5469
5469
  }
5470
5470
  }
5471
5471
  return t[ki] = c, [l, c];
@@ -5569,7 +5569,7 @@ const bo = (s) => {
5569
5569
  i = l = c = r;
5570
5570
  else {
5571
5571
  const p = r < 0.5 ? r * (1 + n) : r + n - r * n, f = 2 * r - p;
5572
- i = N(Lr(f, p, t + 1 / 3) * 255, 0), l = N(Lr(f, p, t) * 255, 0), c = N(Lr(f, p, t - 1 / 3) * 255, 0);
5572
+ i = B(Lr(f, p, t + 1 / 3) * 255, 0), l = B(Lr(f, p, t) * 255, 0), c = B(Lr(f, p, t - 1 / 3) * 255, 0);
5573
5573
  }
5574
5574
  return [i, l, c, o];
5575
5575
  }, Fl = (s) => fo(s) ? Dl(s) : po(s) ? ql(s) : go(s) ? Hl(s) : [0, 0, 0, 1], D = (s, e) => I(s) ? e : s, Ge = (s, e, t, n, r) => {
@@ -5628,14 +5628,14 @@ const bo = (s) => {
5628
5628
  );
5629
5629
  }, At = (s, e, t) => t === "-" ? s - e : t === "+" ? s + e : s * e, Sn = () => ({
5630
5630
  /** @type {valueTypes} */
5631
- t: Z.NUMBER,
5631
+ t: j.NUMBER,
5632
5632
  n: 0,
5633
5633
  u: null,
5634
5634
  o: null,
5635
5635
  d: null,
5636
5636
  s: null
5637
5637
  }), Ze = (s, e) => {
5638
- if (e.t = Z.NUMBER, e.n = 0, e.u = null, e.o = null, e.d = null, e.s = null, !s) return e;
5638
+ if (e.t = j.NUMBER, e.n = 0, e.u = null, e.o = null, e.d = null, e.s = null, !s) return e;
5639
5639
  const t = +s;
5640
5640
  if (isNaN(t)) {
5641
5641
  let n = (
@@ -5645,14 +5645,14 @@ const bo = (s) => {
5645
5645
  n[1] === "=" && (e.o = n[0], n = n.slice(2));
5646
5646
  const r = n.includes(" ") ? !1 : ao.exec(n);
5647
5647
  if (r)
5648
- return e.t = Z.UNIT, e.n = +r[1], e.u = r[2], e;
5648
+ return e.t = j.UNIT, e.n = +r[1], e.u = r[2], e;
5649
5649
  if (e.o)
5650
5650
  return e.n = +n, e;
5651
5651
  if (Sl(n))
5652
- return e.t = Z.COLOR, e.d = Fl(n), e;
5652
+ return e.t = j.COLOR, e.d = Fl(n), e;
5653
5653
  {
5654
5654
  const o = n.match(xi);
5655
- return e.t = Z.COMPLEX, e.d = o ? o.map(Number) : [], e.s = n.split(xi) || [], e;
5655
+ return e.t = j.COMPLEX, e.d = o ? o.map(Number) : [], e.s = n.split(xi) || [], e;
5656
5656
  }
5657
5657
  } else
5658
5658
  return e.n = t, e;
@@ -5669,7 +5669,7 @@ const bo = (s) => {
5669
5669
  _tail: null
5670
5670
  };
5671
5671
  }, $l = (s, e) => s._isOverridden || s._absoluteStartTime > e._absoluteStartTime, sr = (s) => {
5672
- s._isOverlapped = 1, s._isOverridden = 1, s._changeDuration = te, s._currentTime = te;
5672
+ s._isOverlapped = 1, s._isOverridden = 1, s._changeDuration = se, s._currentTime = se;
5673
5673
  }, So = (s, e) => {
5674
5674
  const t = s._composition;
5675
5675
  if (t === xe.replace) {
@@ -5691,8 +5691,8 @@ const bo = (s) => {
5691
5691
  }
5692
5692
  const l = n - s._delay;
5693
5693
  if (i > l) {
5694
- const p = r._startTime, f = i - (p + r._updateDuration), g = N(l - f - p, 12);
5695
- r._changeDuration = g, r._currentTime = g, r._isOverlapped = 1, g < te && sr(r);
5694
+ const p = r._startTime, f = i - (p + r._updateDuration), g = B(l - f - p, 12);
5695
+ r._changeDuration = g, r._currentTime = g, r._isOverlapped = 1, g < se && sr(r);
5696
5696
  }
5697
5697
  let c = !0;
5698
5698
  if (ne(o, (p) => {
@@ -5713,7 +5713,7 @@ const bo = (s) => {
5713
5713
  } else if (t === xe.blend) {
5714
5714
  const n = kn(s.target, s.property, "_add"), r = wl(cr._add);
5715
5715
  let o = n._head;
5716
- o || (o = { ...s }, o._composition = xe.replace, o._updateDuration = te, o._startTime = 0, o._numbers = Ie(s._fromNumbers), o._number = 0, o._next = null, o._prev = null, mt(n, o), mt(r, o));
5716
+ o || (o = { ...s }, o._composition = xe.replace, o._updateDuration = se, o._startTime = 0, o._numbers = Ie(s._fromNumbers), o._number = 0, o._next = null, o._prev = null, mt(n, o), mt(r, o));
5717
5717
  const i = s._toNumber;
5718
5718
  if (s._fromNumber = o._fromNumber - i, s._toNumber = 0, s._numbers = Ie(s._fromNumbers), s._number = 0, o._fromNumber = i, s._toNumbers) {
5719
5719
  const l = Ie(s._toNumbers);
@@ -5778,7 +5778,7 @@ class Je extends vo {
5778
5778
  onUpdate: S
5779
5779
  } = e;
5780
5780
  ye.current && ye.current.register(this);
5781
- const y = t ? 0 : _e._elapsedTime, b = t ? t.defaults : G.defaults, k = (
5781
+ const y = t ? 0 : _e._elapsedTime, b = t ? t.defaults : X.defaults, k = (
5782
5782
  /** @type {Number} */
5783
5783
  de(o) || I(o) ? b.delay : +o
5784
5784
  ), x = de(i) || I(i) ? 1 / 0 : +i, C = D(p, b.loop), O = D(f, b.loopDelay), P = C === !0 || C === 1 / 0 || /** @type {Number} */
@@ -5787,7 +5787,7 @@ class Je extends vo {
5787
5787
  C + 1
5788
5788
  );
5789
5789
  let w = 0;
5790
- t ? w = n : (_e.reqId || _e.requestTick(wt()), w = (_e._elapsedTime - _e._startTime) * G.timeScale), this.id = I(r) ? ++zl : r, this.parent = t, this.duration = gr((x + O) * P - O) || te, this.backwards = !1, this.paused = !0, this.began = !1, this.completed = !1, this.onBegin = v || b.onBegin, this.onBeforeUpdate = _ || b.onBeforeUpdate, this.onUpdate = S || b.onUpdate, this.onLoop = d || b.onLoop, this.onPause = m || b.onPause, this.onComplete = a || b.onComplete, this.iterationDuration = x, this.iterationCount = P, this._autoplay = t ? !1 : D(g, b.autoplay), this._offset = w, this._delay = k, this._loopDelay = O, this._iterationTime = 0, this._currentIteration = 0, this._resolve = W, this._running = !1, this._reversed = +D(l, b.reversed), this._reverse = this._reversed, this._cancelled = 0, this._alternate = D(c, b.alternate), this._prev = null, this._next = null, this._elapsedTime = y, this._startTime = y, this._lastTime = y, this._fps = D(u, b.frameRate), this._speed = D(h, b.playbackRate);
5790
+ t ? w = n : (_e.reqId || _e.requestTick(wt()), w = (_e._elapsedTime - _e._startTime) * X.timeScale), this.id = I(r) ? ++zl : r, this.parent = t, this.duration = gr((x + O) * P - O) || se, this.backwards = !1, this.paused = !0, this.began = !1, this.completed = !1, this.onBegin = v || b.onBegin, this.onBeforeUpdate = _ || b.onBeforeUpdate, this.onUpdate = S || b.onUpdate, this.onLoop = d || b.onLoop, this.onPause = m || b.onPause, this.onComplete = a || b.onComplete, this.iterationDuration = x, this.iterationCount = P, this._autoplay = t ? !1 : D(g, b.autoplay), this._offset = w, this._delay = k, this._loopDelay = O, this._iterationTime = 0, this._currentIteration = 0, this._resolve = G, this._running = !1, this._reversed = +D(l, b.reversed), this._reverse = this._reversed, this._cancelled = 0, this._alternate = D(c, b.alternate), this._prev = null, this._next = null, this._elapsedTime = y, this._startTime = y, this._lastTime = y, this._fps = D(u, b.frameRate), this._speed = D(h, b.playbackRate);
5791
5791
  }
5792
5792
  get cancelled() {
5793
5793
  return !!this._cancelled;
@@ -5797,7 +5797,7 @@ class Je extends vo {
5797
5797
  e ? this.cancel() : this.reset(1).play();
5798
5798
  }
5799
5799
  get currentTime() {
5800
- return F(N(this._currentTime, G.precision), -this._delay, this.duration);
5800
+ return F(B(this._currentTime, X.precision), -this._delay, this.duration);
5801
5801
  }
5802
5802
  /** @param {Number} time */
5803
5803
  set currentTime(e) {
@@ -5805,21 +5805,21 @@ class Je extends vo {
5805
5805
  this.pause().seek(+e), t || this.resume();
5806
5806
  }
5807
5807
  get iterationCurrentTime() {
5808
- return N(this._iterationTime, G.precision);
5808
+ return B(this._iterationTime, X.precision);
5809
5809
  }
5810
5810
  /** @param {Number} time */
5811
5811
  set iterationCurrentTime(e) {
5812
5812
  this.currentTime = this.iterationDuration * this._currentIteration + e;
5813
5813
  }
5814
5814
  get progress() {
5815
- return F(N(this._currentTime / this.duration, 10), 0, 1);
5815
+ return F(B(this._currentTime / this.duration, 10), 0, 1);
5816
5816
  }
5817
5817
  /** @param {Number} progress */
5818
5818
  set progress(e) {
5819
5819
  this.currentTime = this.duration * e;
5820
5820
  }
5821
5821
  get iterationProgress() {
5822
- return F(N(this._iterationTime / this.iterationDuration, 10), 0, 1);
5822
+ return F(B(this._iterationTime / this.iterationDuration, 10), 0, 1);
5823
5823
  }
5824
5824
  /** @param {Number} progress */
5825
5825
  set iterationProgress(e) {
@@ -5877,7 +5877,7 @@ class Je extends vo {
5877
5877
  }
5878
5878
  /** @return {this} */
5879
5879
  resume() {
5880
- return this.paused ? (this.paused = !1, this.duration <= te && !this._hasChildren ? Ct(this, te, 0, 0, Xe.FORCE) : (this._running || (mt(_e, this), _e._hasChildren = !0, this._running = !0), this.resetTime(), this._startTime -= 12, _e.wake()), this) : this;
5880
+ return this.paused ? (this.paused = !1, this.duration <= se && !this._hasChildren ? Ct(this, se, 0, 0, Xe.FORCE) : (this._running || (mt(_e, this), _e._hasChildren = !0, this._running = !0), this.resetTime(), this._startTime -= 12, _e.wake()), this) : this;
5881
5881
  }
5882
5882
  /** @return {this} */
5883
5883
  restart() {
@@ -5919,8 +5919,8 @@ class Je extends vo {
5919
5919
  stretch(e) {
5920
5920
  const t = this.duration, n = Vt(e);
5921
5921
  if (t === n) return this;
5922
- const r = e / t, o = e <= te;
5923
- return this.duration = o ? te : n, this.iterationDuration = o ? te : Vt(this.iterationDuration * r), this._offset *= r, this._delay *= r, this._loopDelay *= r, this;
5922
+ const r = e / t, o = e <= se;
5923
+ return this.duration = o ? se : n, this.iterationDuration = o ? se : Vt(this.iterationDuration * r), this._offset *= r, this._delay *= r, this._loopDelay *= r, this;
5924
5924
  }
5925
5925
  /**
5926
5926
  * Cancels the timer by seeking it back to 0 and reverting the attached scroller if necessary
@@ -5945,9 +5945,9 @@ class Je extends vo {
5945
5945
  * @param {Callback<this>} [callback]
5946
5946
  * @return {Promise}
5947
5947
  */
5948
- then(e = W) {
5948
+ then(e = G) {
5949
5949
  const t = this.then, n = () => {
5950
- this.then = null, e(this), this.then = t, this._resolve = W;
5950
+ this.then = null, e(this), this.then = t, this._resolve = G;
5951
5951
  };
5952
5952
  return new Promise((r) => (this._resolve = () => r(n()), this.completed && this._resolve(), this));
5953
5953
  }
@@ -6011,7 +6011,7 @@ const Vl = (s) => new Je(s, null, 0).init(), yt = (s) => s, xo = (s, e, t) => ((
6011
6011
  Back: (s = 1.70158) => (e) => (+s + 1) * e * e * e - +s * e * e,
6012
6012
  /** @type {ElasticEasing} */
6013
6013
  Elastic: (s = 1, e = 0.3) => {
6014
- const t = F(+s, 1, 10), n = F(+e, te, 2), r = n / Li * xl(1 / t), o = Li / n;
6014
+ const t = F(+s, 1, 10), n = F(+e, se, 2), r = n / Li * xl(1 / t), o = Li / n;
6015
6015
  return (i) => i === 0 || i === 1 ? i : -t * qt(2, -10 * (1 - i)) * mn((1 - i - r) * o);
6016
6016
  }
6017
6017
  }, ps = {
@@ -6079,7 +6079,7 @@ const Vl = (s) => new Je(s, null, 0).init(), yt = (s) => s, xo = (s, e, t) => ((
6079
6079
  return s;
6080
6080
  }, Ar = { deg: 1, rad: 180 / Wt, turn: 360 }, Oi = {}, wn = (s, e, t, n = !1) => {
6081
6081
  const r = e.u, o = e.n;
6082
- if (e.t === Z.UNIT && r === t)
6082
+ if (e.t === j.UNIT && r === t)
6083
6083
  return e;
6084
6084
  const i = o + r + t, l = Oi[i];
6085
6085
  if (!I(l) && !n)
@@ -6109,7 +6109,7 @@ const Vl = (s) => new Je(s, null, 0).init(), yt = (s) => s, xo = (s, e, t) => ((
6109
6109
  }
6110
6110
  e.n = c, Oi[i] = c;
6111
6111
  }
6112
- return e.t, Z.UNIT, e.u = t, e;
6112
+ return e.t, j.UNIT, e.u = t, e;
6113
6113
  }, mr = (s) => {
6114
6114
  if (s._hasChildren)
6115
6115
  ne(s, mr, !0);
@@ -6145,7 +6145,7 @@ const Vl = (s) => new Je(s, null, 0).init(), yt = (s) => s, xo = (s, e, t) => ((
6145
6145
  });
6146
6146
  }
6147
6147
  return s;
6148
- }, X = Sn(), K = Sn(), Us = { func: null }, Ws = [null], Dt = [null, null], Gs = { to: null };
6148
+ }, Y = Sn(), K = Sn(), Us = { func: null }, Ws = [null], Dt = [null, null], Gs = { to: null };
6149
6149
  let Ql = 0, _t, nt;
6150
6150
  const Kl = (s, e) => {
6151
6151
  const t = {};
@@ -6173,7 +6173,7 @@ const Kl = (s, e) => {
6173
6173
  } else {
6174
6174
  const n = (
6175
6175
  /** @type {Number} */
6176
- D(e.duration, G.defaults.duration)
6176
+ D(e.duration, X.defaults.duration)
6177
6177
  );
6178
6178
  Object.keys(s).map((o) => ({ o: parseFloat(o) / 100, p: s[o] })).sort((o, i) => o.o - i.o).forEach((o) => {
6179
6179
  const i = o.o, l = o.p;
@@ -6244,7 +6244,7 @@ class vt extends Je {
6244
6244
  modifier: m,
6245
6245
  composition: v,
6246
6246
  onRender: _
6247
- } = g, S = n ? n.defaults : G.defaults, y = D(d, S.playbackEase), b = y ? Ot(y) : null, k = !I(a) && !I(
6247
+ } = g, S = n ? n.defaults : X.defaults, y = D(d, S.playbackEase), b = y ? Ot(y) : null, k = !I(a) && !I(
6248
6248
  /** @type {Spring} */
6249
6249
  a.ease
6250
6250
  ), x = k ? (
@@ -6256,11 +6256,11 @@ class vt extends Je {
6256
6256
  ) : D(h, S.duration), O = D(u, S.delay), P = m || S.modifier, w = I(v) && p >= qe ? xe.none : I(v) ? S.composition : v, E = {}, L = this._offset + (n ? n._offset : 0);
6257
6257
  let M = NaN, q = NaN, $ = 0, U = 0;
6258
6258
  for (let z = 0; z < p; z++) {
6259
- const R = c[z], ae = i || z, ee = l || p;
6259
+ const R = c[z], ae = i || z, te = l || p;
6260
6260
  let ke = NaN, me = NaN;
6261
6261
  for (let V in g)
6262
6262
  if (zt(V)) {
6263
- const j = bn(R, V), re = xn(V, R, j);
6263
+ const ee = bn(R, V), re = xn(V, R, ee);
6264
6264
  let ue = g[V];
6265
6265
  const rt = Oe(ue);
6266
6266
  if (o && !rt && (Dt[0] = ue, Dt[1] = ue, ue = Dt), rt) {
@@ -6276,15 +6276,15 @@ class vt extends Je {
6276
6276
  ue;
6277
6277
  } else
6278
6278
  Ws[0] = ue, _t = Ws;
6279
- let Le = null, we = null, he = NaN, se = 0, Y = 0;
6280
- for (let Te = _t.length; Y < Te; Y++) {
6281
- const He = _t[Y];
6279
+ let Le = null, we = null, he = NaN, Z = 0, J = 0;
6280
+ for (let Te = _t.length; J < Te; J++) {
6281
+ const He = _t[J];
6282
6282
  be(He) ? nt = He : (Gs.to = /** @type {TweenParamValue} */
6283
6283
  He, nt = Gs), Us.func = null;
6284
- const Ce = Ge(nt.to, R, ae, ee, Us);
6284
+ const Ce = Ge(nt.to, R, ae, te, Us);
6285
6285
  let Ae;
6286
6286
  be(Ce) && !I(Ce.to) ? (nt = Ce, Ae = Ce.to) : Ae = Ce;
6287
- const lt = Ge(nt.from, R, ae, ee), Me = nt.ease, ge = !I(Me) && !I(
6287
+ const lt = Ge(nt.from, R, ae, te), Me = nt.ease, ge = !I(Me) && !I(
6288
6288
  /** @type {Spring} */
6289
6289
  Me.ease
6290
6290
  ), T = ge ? (
@@ -6293,10 +6293,10 @@ class vt extends Je {
6293
6293
  ) : Me || x, A = ge ? (
6294
6294
  /** @type {Spring} */
6295
6295
  Me.duration
6296
- ) : Ge(D(nt.duration, Te > 1 ? Ge(C, R, ae, ee) / Te : C), R, ae, ee), B = Ge(D(nt.delay, Y ? 0 : O), R, ae, ee), J = Ge(D(nt.composition, w), R, ae, ee), Q = Ye(J) ? J : xe[J], ve = nt.modifier || P, Pe = !I(lt), Ee = !I(Ae), Qe = Oe(Ae), pe = Qe || Pe && Ee, vr = we ? se + B : B, yr = N(L + vr, 12);
6296
+ ) : Ge(D(nt.duration, Te > 1 ? Ge(C, R, ae, te) / Te : C), R, ae, te), N = Ge(D(nt.delay, J ? 0 : O), R, ae, te), Q = Ge(D(nt.composition, w), R, ae, te), W = Ye(Q) ? Q : xe[Q], ve = nt.modifier || P, Pe = !I(lt), Ee = !I(Ae), Qe = Oe(Ae), pe = Qe || Pe && Ee, vr = we ? Z + N : N, yr = B(L + vr, 12);
6297
6297
  !U && (Pe || Qe) && (U = 1);
6298
6298
  let Ke = we;
6299
- if (Q !== xe.none) {
6299
+ if (W !== xe.none) {
6300
6300
  Le || (Le = kn(R, re));
6301
6301
  let ce = Le._head;
6302
6302
  for (; ce && !ce._isOverridden && ce._absoluteStartTime <= yr; )
@@ -6304,46 +6304,46 @@ class vt extends Je {
6304
6304
  for (; ce; )
6305
6305
  sr(ce), ce = ce._nextRep;
6306
6306
  }
6307
- if (pe ? (Ze(Qe ? Ge(Ae[0], R, ae, ee) : lt, X), Ze(Qe ? Ge(Ae[1], R, ae, ee, Us) : Ae, K), X.t === Z.NUMBER && (Ke ? Ke._valueType === Z.UNIT && (X.t = Z.UNIT, X.u = Ke._unit) : (Ze(
6308
- Pt(R, re, j, E),
6307
+ if (pe ? (Ze(Qe ? Ge(Ae[0], R, ae, te) : lt, Y), Ze(Qe ? Ge(Ae[1], R, ae, te, Us) : Ae, K), Y.t === j.NUMBER && (Ke ? Ke._valueType === j.UNIT && (Y.t = j.UNIT, Y.u = Ke._unit) : (Ze(
6308
+ Pt(R, re, ee, E),
6309
6309
  Ne
6310
- ), Ne.t === Z.UNIT && (X.t = Z.UNIT, X.u = Ne.u)))) : (Ee ? Ze(Ae, K) : we ? Pi(we, K) : Ze(n && Ke && Ke.parent.parent === n ? Ke._value : Pt(R, re, j, E), K), Pe ? Ze(lt, X) : we ? Pi(we, X) : Ze(n && Ke && Ke.parent.parent === n ? Ke._value : (
6310
+ ), Ne.t === j.UNIT && (Y.t = j.UNIT, Y.u = Ne.u)))) : (Ee ? Ze(Ae, K) : we ? Pi(we, K) : Ze(n && Ke && Ke.parent.parent === n ? Ke._value : Pt(R, re, ee, E), K), Pe ? Ze(lt, Y) : we ? Pi(we, Y) : Ze(n && Ke && Ke.parent.parent === n ? Ke._value : (
6311
6311
  // No need to get and parse the original value if the tween is part of a timeline and has a previous sibling part of the same timeline
6312
- Pt(R, re, j, E)
6313
- ), X)), X.o && (X.n = At(
6312
+ Pt(R, re, ee, E)
6313
+ ), Y)), Y.o && (Y.n = At(
6314
6314
  Ke ? Ke._toNumber : Ze(
6315
- Pt(R, re, j, E),
6315
+ Pt(R, re, ee, E),
6316
6316
  Ne
6317
6317
  ).n,
6318
- X.n,
6319
- X.o
6320
- )), K.o && (K.n = At(X.n, K.n, K.o)), X.t !== K.t) {
6321
- if (X.t === Z.COMPLEX || K.t === Z.COMPLEX) {
6322
- const ce = X.t === Z.COMPLEX ? X : K, Re = X.t === Z.COMPLEX ? K : X;
6323
- Re.t = Z.COMPLEX, Re.s = Ie(ce.s), Re.d = ce.d.map(() => Re.n);
6324
- } else if (X.t === Z.UNIT || K.t === Z.UNIT) {
6325
- const ce = X.t === Z.UNIT ? X : K, Re = X.t === Z.UNIT ? K : X;
6326
- Re.t = Z.UNIT, Re.u = ce.u;
6327
- } else if (X.t === Z.COLOR || K.t === Z.COLOR) {
6328
- const ce = X.t === Z.COLOR ? X : K, Re = X.t === Z.COLOR ? K : X;
6329
- Re.t = Z.COLOR, Re.s = ce.s, Re.d = [0, 0, 0, 1];
6318
+ Y.n,
6319
+ Y.o
6320
+ )), K.o && (K.n = At(Y.n, K.n, K.o)), Y.t !== K.t) {
6321
+ if (Y.t === j.COMPLEX || K.t === j.COMPLEX) {
6322
+ const ce = Y.t === j.COMPLEX ? Y : K, Re = Y.t === j.COMPLEX ? K : Y;
6323
+ Re.t = j.COMPLEX, Re.s = Ie(ce.s), Re.d = ce.d.map(() => Re.n);
6324
+ } else if (Y.t === j.UNIT || K.t === j.UNIT) {
6325
+ const ce = Y.t === j.UNIT ? Y : K, Re = Y.t === j.UNIT ? K : Y;
6326
+ Re.t = j.UNIT, Re.u = ce.u;
6327
+ } else if (Y.t === j.COLOR || K.t === j.COLOR) {
6328
+ const ce = Y.t === j.COLOR ? Y : K, Re = Y.t === j.COLOR ? K : Y;
6329
+ Re.t = j.COLOR, Re.s = ce.s, Re.d = [0, 0, 0, 1];
6330
6330
  }
6331
6331
  }
6332
- if (X.u !== K.u) {
6333
- let ce = K.u ? X : K;
6332
+ if (Y.u !== K.u) {
6333
+ let ce = K.u ? Y : K;
6334
6334
  ce = wn(
6335
6335
  /** @type {DOMTarget} */
6336
6336
  R,
6337
6337
  ce,
6338
- K.u ? K.u : X.u,
6338
+ K.u ? K.u : Y.u,
6339
6339
  !1
6340
6340
  );
6341
6341
  }
6342
- if (K.d && X.d && K.d.length !== X.d.length) {
6343
- const ce = X.d.length > K.d.length ? X : K, Re = ce === X ? K : X;
6342
+ if (K.d && Y.d && K.d.length !== Y.d.length) {
6343
+ const ce = Y.d.length > K.d.length ? Y : K, Re = ce === Y ? K : Y;
6344
6344
  Re.d = ce.d.map((Ic, Cn) => I(Re.d[Cn]) ? 0 : Re.d[Cn]), Re.s = Ie(ce.s);
6345
6345
  }
6346
- const _r = N(+A || te, 12), vs = {
6346
+ const _r = B(+A || se, 12), vs = {
6347
6347
  parent: this,
6348
6348
  id: Ql++,
6349
6349
  property: re,
@@ -6351,27 +6351,27 @@ class vt extends Je {
6351
6351
  _value: null,
6352
6352
  _func: Us.func,
6353
6353
  _ease: Ot(T),
6354
- _fromNumbers: Ie(X.d),
6354
+ _fromNumbers: Ie(Y.d),
6355
6355
  _toNumbers: Ie(K.d),
6356
6356
  _strings: Ie(K.s),
6357
- _fromNumber: X.n,
6357
+ _fromNumber: Y.n,
6358
6358
  _toNumber: K.n,
6359
- _numbers: Ie(X.d),
6359
+ _numbers: Ie(Y.d),
6360
6360
  // For additive tween and animatables
6361
- _number: X.n,
6361
+ _number: Y.n,
6362
6362
  // For additive tween and animatables
6363
6363
  _unit: K.u,
6364
6364
  _modifier: ve,
6365
6365
  _currentTime: 0,
6366
6366
  _startTime: vr,
6367
- _delay: +B,
6367
+ _delay: +N,
6368
6368
  _updateDuration: _r,
6369
6369
  _changeDuration: _r,
6370
6370
  _absoluteStartTime: yr,
6371
6371
  // NOTE: Investigate bit packing to stores ENUM / BOOL
6372
- _tweenType: j,
6372
+ _tweenType: ee,
6373
6373
  _valueType: K.t,
6374
- _composition: Q,
6374
+ _composition: W,
6375
6375
  _isOverlapped: 0,
6376
6376
  _isOverridden: 0,
6377
6377
  _renderTransforms: 0,
@@ -6386,22 +6386,22 @@ class vt extends Je {
6386
6386
  _prev: null,
6387
6387
  _next: null
6388
6388
  };
6389
- Q !== xe.none && So(vs, Le), isNaN(he) && (he = vs._startTime), se = N(vr + _r, 12), we = vs, $++, mt(this, vs);
6389
+ W !== xe.none && So(vs, Le), isNaN(he) && (he = vs._startTime), Z = B(vr + _r, 12), we = vs, $++, mt(this, vs);
6390
6390
  }
6391
- (isNaN(q) || he < q) && (q = he), (isNaN(M) || se > M) && (M = se), j === fe.TRANSFORM && (ke = $ - Y, me = $);
6391
+ (isNaN(q) || he < q) && (q = he), (isNaN(M) || Z > M) && (M = Z), ee === fe.TRANSFORM && (ke = $ - J, me = $);
6392
6392
  }
6393
6393
  if (!isNaN(ke)) {
6394
6394
  let V = 0;
6395
- ne(this, (j) => {
6396
- V >= ke && V < me && (j._renderTransforms = 1, j._composition === xe.blend && ne(Ut.animation, (re) => {
6397
- re.id === j.id && (re._renderTransforms = 1);
6395
+ ne(this, (ee) => {
6396
+ V >= ke && V < me && (ee._renderTransforms = 1, ee._composition === xe.blend && ne(Ut.animation, (re) => {
6397
+ re.id === ee.id && (re._renderTransforms = 1);
6398
6398
  })), V++;
6399
6399
  });
6400
6400
  }
6401
6401
  }
6402
6402
  p || console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."), q ? (ne(this, (z) => {
6403
6403
  z._startTime - z._delay || (z._delay -= q), z._startTime -= q;
6404
- }), M -= q) : q = 0, M || (M = te, this.iterationCount = 0), this.targets = c, this.duration = M === te ? te : gr((M + this._loopDelay) * this.iterationCount - this._loopDelay) || te, this.onRender = _ || S.onRender, this._ease = b, this._delay = q, this.iterationDuration = M, this._inlineStyles = E, !this._autoplay && U && this.onRender(this);
6404
+ }), M -= q) : q = 0, M || (M = se, this.iterationCount = 0), this.targets = c, this.duration = M === se ? se : gr((M + this._loopDelay) * this.iterationCount - this._loopDelay) || se, this.onRender = _ || S.onRender, this._ease = b, this._delay = q, this.iterationDuration = M, this._inlineStyles = E, !this._autoplay && U && this.onRender(this);
6405
6405
  }
6406
6406
  /**
6407
6407
  * @param {Number} newDuration
@@ -6555,21 +6555,21 @@ class Po {
6555
6555
  }), Mr = !0));
6556
6556
  const n = ms(e), r = n.length;
6557
6557
  r || console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation.");
6558
- const o = D(t.ease, Or(G.defaults.ease)), i = (
6558
+ const o = D(t.ease, Or(X.defaults.ease)), i = (
6559
6559
  /** @type {Spring} */
6560
6560
  o.ease && o
6561
- ), l = D(t.autoplay, G.defaults.autoplay), c = l && /** @type {ScrollObserver} */
6561
+ ), l = D(t.autoplay, X.defaults.autoplay), c = l && /** @type {ScrollObserver} */
6562
6562
  l.link ? l : !1, p = t.alternate && /** @type {Boolean} */
6563
6563
  t.alternate === !0, f = t.reversed && /** @type {Boolean} */
6564
- t.reversed === !0, g = D(t.loop, G.defaults.loop), u = (
6564
+ t.reversed === !0, g = D(t.loop, X.defaults.loop), u = (
6565
6565
  /** @type {Number} */
6566
6566
  g === !0 || g === 1 / 0 ? 1 / 0 : Ye(g) ? g + 1 : 1
6567
- ), h = p ? f ? "alternate-reverse" : "alternate" : f ? "reverse" : "normal", a = "forwards", d = Or(o), m = G.timeScale === 1 ? 1 : qe;
6568
- this.targets = n, this.animations = [], this.controlAnimation = null, this.onComplete = t.onComplete || W, this.duration = 0, this.muteCallbacks = !1, this.completed = !1, this.paused = !l || c !== !1, this.reversed = f, this.autoplay = l, this._speed = D(t.playbackRate, G.defaults.playbackRate), this._resolve = W, this._completed = 0, this._inlineStyles = n.map((v) => v.getAttribute("style")), n.forEach((v, _) => {
6567
+ ), h = p ? f ? "alternate-reverse" : "alternate" : f ? "reverse" : "normal", a = "forwards", d = Or(o), m = X.timeScale === 1 ? 1 : qe;
6568
+ this.targets = n, this.animations = [], this.controlAnimation = null, this.onComplete = t.onComplete || G, this.duration = 0, this.muteCallbacks = !1, this.completed = !1, this.paused = !l || c !== !1, this.reversed = f, this.autoplay = l, this._speed = D(t.playbackRate, X.defaults.playbackRate), this._resolve = G, this._completed = 0, this._inlineStyles = n.map((v) => v.getAttribute("style")), n.forEach((v, _) => {
6569
6569
  const S = v[gs], y = ec.some((C) => t.hasOwnProperty(C)), b = (i ? (
6570
6570
  /** @type {Spring} */
6571
6571
  i.duration
6572
- ) : Ge(D(t.duration, G.defaults.duration), v, _, r)) * m, k = Ge(D(t.delay, G.defaults.delay), v, _, r) * m, x = (
6572
+ ) : Ge(D(t.duration, X.defaults.duration), v, _, r)) * m, k = Ge(D(t.delay, X.defaults.delay), v, _, r) * m, x = (
6573
6573
  /** @type {CompositeOperation} */
6574
6574
  D(t.composition, "replace")
6575
6575
  );
@@ -6640,12 +6640,12 @@ class Po {
6640
6640
  this._speed = +e, this.forEach((t) => t.playbackRate = e);
6641
6641
  }
6642
6642
  get currentTime() {
6643
- const e = this.controlAnimation, t = G.timeScale;
6643
+ const e = this.controlAnimation, t = X.timeScale;
6644
6644
  return this.completed ? this.duration : e ? +e.currentTime * (t === 1 ? 1 : t) : 0;
6645
6645
  }
6646
6646
  /** @param {Number} time */
6647
6647
  set currentTime(e) {
6648
- const t = e * (G.timeScale === 1 ? 1 : qe);
6648
+ const t = e * (X.timeScale === 1 ? 1 : qe);
6649
6649
  this.forEach((n) => {
6650
6650
  t >= this.duration && n.play(), n.currentTime = t;
6651
6651
  });
@@ -6698,9 +6698,9 @@ class Po {
6698
6698
  * @param {WAAPICallback} [callback]
6699
6699
  * @return {Promise}
6700
6700
  */
6701
- then(e = W) {
6701
+ then(e = G) {
6702
6702
  const t = this.then, n = () => {
6703
- this.then = null, e(this), this.then = t, this._resolve = W;
6703
+ this.then = null, e(this), this.then = t, this._resolve = G;
6704
6704
  };
6705
6705
  return new Promise((r) => (this._resolve = () => r(n()), this.completed && this._resolve(), this));
6706
6706
  }
@@ -6713,7 +6713,7 @@ const tc = {
6713
6713
  */
6714
6714
  animate: (s, e) => new Po(s, e),
6715
6715
  convertEase: rr
6716
- }, Eo = (s = W) => new Je({ duration: 1 * G.timeScale, onComplete: s }, null, 0).resume();
6716
+ }, Eo = (s = G) => new Je({ duration: 1 * X.timeScale, onComplete: s }, null, 0).resume();
6717
6717
  function Lt(s, e, t) {
6718
6718
  const n = ms(s);
6719
6719
  if (!n.length) return;
@@ -6721,7 +6721,7 @@ function Lt(s, e, t) {
6721
6721
  let l = Pt(r, i);
6722
6722
  if (I(t))
6723
6723
  return l;
6724
- if (Ze(l, Ne), Ne.t === Z.NUMBER || Ne.t === Z.UNIT) {
6724
+ if (Ze(l, Ne), Ne.t === j.NUMBER || Ne.t === j.UNIT) {
6725
6725
  if (t === !1)
6726
6726
  return Ne.n;
6727
6727
  {
@@ -6733,13 +6733,13 @@ function Lt(s, e, t) {
6733
6733
  t,
6734
6734
  !1
6735
6735
  );
6736
- return `${N(c.n, G.precision)}${c.u}`;
6736
+ return `${B(c.n, X.precision)}${c.u}`;
6737
6737
  }
6738
6738
  }
6739
6739
  }
6740
6740
  const kt = (s, e) => {
6741
6741
  if (!I(e))
6742
- return e.duration = te, e.composition = D(e.composition, xe.none), new vt(s, e, null, 0, !0).resume();
6742
+ return e.duration = se, e.composition = D(e.composition, xe.none), new vt(s, e, null, 0, !0).resume();
6743
6743
  }, Ni = (s, e, t) => {
6744
6744
  let n = !1;
6745
6745
  return ne(e, (r) => {
@@ -6794,7 +6794,7 @@ const kt = (s, e) => {
6794
6794
  return i && !r._head && (r._hasChildren = !1, /** @type {Renderable} */
6795
6795
  r.cancel && r.cancel()), n;
6796
6796
  }, sc = _n, rc = (s) => s[yn(0, s.length - 1)], nc = (s, e) => (+s).toFixed(e), ic = (s, e, t) => `${s}`.padStart(e, t), oc = (s, e, t) => `${s}`.padEnd(e, t), ac = (s, e, t) => ((s - e) % (t - e) + (t - e)) % (t - e) + e, ss = (s, e, t, n, r) => n + (s - e) / (t - e) * (r - n), lc = (s) => s * Wt / 180, cc = (s) => s * 180 / Wt, Lo = (s, e, t, n) => {
6797
- let r = qe / G.defaults.frameRate;
6797
+ let r = qe / X.defaults.frameRate;
6798
6798
  if (n !== !1) {
6799
6799
  const i = (
6800
6800
  /** @type Renderable */
@@ -6806,7 +6806,7 @@ const kt = (s, e) => {
6806
6806
  return t ? t === 1 ? e : (1 - o) * s + o * e : s;
6807
6807
  }, uc = (s, e = 0) => (...t) => e ? (n) => s(...t, n) : (n) => s(n, ...t), Ao = (s) => (...e) => {
6808
6808
  const t = s(...e);
6809
- return new Proxy(W, {
6809
+ return new Proxy(G, {
6810
6810
  apply: (n, r, [o]) => t(o),
6811
6811
  get: (n, r) => Ao(
6812
6812
  /**@param {...Number|String} nextArgs */
@@ -6834,7 +6834,7 @@ const kt = (s, e) => {
6834
6834
  ),
6835
6835
  round: (
6836
6836
  /** @type {typeof round & ChainedRound} */
6837
- tt(N)
6837
+ tt(B)
6838
6838
  ),
6839
6839
  snap: (
6840
6840
  /** @type {typeof snap & ChainedSnap} */
@@ -6882,7 +6882,7 @@ const kt = (s, e) => {
6882
6882
  }
6883
6883
  }, rs = (s, e) => {
6884
6884
  let t = s.iterationDuration;
6885
- if (t === te && (t = 0), I(e)) return t;
6885
+ if (t === se && (t = 0), I(e)) return t;
6886
6886
  if (Ye(+e)) return +e;
6887
6887
  const n = (
6888
6888
  /** @type {String} */
@@ -6895,11 +6895,11 @@ const kt = (s, e) => {
6895
6895
  return l ? i : o ? I(r[n]) ? t : r[n] : t;
6896
6896
  };
6897
6897
  function pc(s) {
6898
- return gr((s.iterationDuration + s._loopDelay) * s.iterationCount - s._loopDelay) || te;
6898
+ return gr((s.iterationDuration + s._loopDelay) * s.iterationCount - s._loopDelay) || se;
6899
6899
  }
6900
6900
  function Ir(s, e, t, n, r, o) {
6901
6901
  const l = Ye(s.duration) && /** @type {Number} */
6902
- s.duration <= te ? t - te : t;
6902
+ s.duration <= se ? t - se : t;
6903
6903
  Ct(e, l, 1, 1, Xe.AUTO);
6904
6904
  const c = n ? new vt(
6905
6905
  n,
@@ -6932,7 +6932,7 @@ class Oo extends Je {
6932
6932
  null,
6933
6933
  0
6934
6934
  ), this.duration = 0, this.labels = {};
6935
- const t = e.defaults, n = G.defaults;
6935
+ const t = e.defaults, n = X.defaults;
6936
6936
  this.defaults = t ? hs(t, n) : n, this.onRender = e.onRender || n.onRender;
6937
6937
  const r = D(e.playbackEase, n.playbackEase);
6938
6938
  this._ease = r ? Ot(r) : null, this.iterationDuration = 0;
@@ -7036,7 +7036,7 @@ class Oo extends Je {
7036
7036
  * @return {this}
7037
7037
  */
7038
7038
  set(e, t, n) {
7039
- return I(t) ? this : (t.duration = te, t.composition = xe.replace, this.add(e, t, n));
7039
+ return I(t) ? this : (t.duration = se, t.composition = xe.replace, this.add(e, t, n));
7040
7040
  }
7041
7041
  /**
7042
7042
  * @param {Callback<Timer>} callback
@@ -7168,7 +7168,7 @@ class Tn {
7168
7168
  }
7169
7169
  revert() {
7170
7170
  for (let e in this.animations)
7171
- this[e] = W, this.animations[e].revert();
7171
+ this[e] = G, this.animations[e].revert();
7172
7172
  return this.animations = {}, this.targets.length = 0, this.callbacks && this.callbacks.revert(), this;
7173
7173
  }
7174
7174
  }
@@ -7190,12 +7190,12 @@ class Mo {
7190
7190
  return t < 1 ? i = wi(-i * t * n) * (1 * vn(r * i) + o * mn(r * i)) : i = (1 + o * i) * wi(-i * n), 1 - i;
7191
7191
  }
7192
7192
  compute() {
7193
- const { maxRestSteps: e, maxIterations: t, restThreshold: n, timeStep: r, m: o, d: i, s: l, v: c } = this, p = this.w0 = F(xt(l / o), te, qe), f = this.zeta = i / (2 * xt(l * o)), g = this.wd = f < 1 ? p * xt(1 - f * f) : 0;
7193
+ const { maxRestSteps: e, maxIterations: t, restThreshold: n, timeStep: r, m: o, d: i, s: l, v: c } = this, p = this.w0 = F(xt(l / o), se, qe), f = this.zeta = i / (2 * xt(l * o)), g = this.wd = f < 1 ? p * xt(1 - f * f) : 0;
7194
7194
  this.b = f < 1 ? (f * p + -c) / g : -c + p;
7195
7195
  let u = 0, h = 0, a = 0;
7196
7196
  for (; h < e && a < t; )
7197
7197
  ot(1 - this.solve(u)) < n ? h++ : h = 0, this.solverDuration = u, u += r, a++;
7198
- this.duration = N(this.solverDuration * qe, 0) * G.timeScale;
7198
+ this.duration = B(this.solverDuration * qe, 0) * X.timeScale;
7199
7199
  }
7200
7200
  get mass() {
7201
7201
  return this.m;
@@ -7229,8 +7229,8 @@ class gc {
7229
7229
  /** @param {Object} el */
7230
7230
  constructor(e) {
7231
7231
  this.el = e, this.zIndex = 0, this.parentElement = null, this.classList = {
7232
- add: W,
7233
- remove: W
7232
+ add: G,
7233
+ remove: G
7234
7234
  };
7235
7235
  }
7236
7236
  get x() {
@@ -7379,7 +7379,7 @@ class Io {
7379
7379
  mass: D(t.releaseMass, 1),
7380
7380
  stiffness: D(t.releaseStiffness, 80),
7381
7381
  damping: D(t.releaseDamping, 20)
7382
- }), this.releaseEase = c || $t.outQuint, this.hasReleaseSpring = p, this.onGrab = t.onGrab || W, this.onDrag = t.onDrag || W, this.onRelease = t.onRelease || W, this.onUpdate = t.onUpdate || W, this.onSettle = t.onSettle || W, this.onSnap = t.onSnap || W, this.onResize = t.onResize || W, this.onAfterResize = t.onAfterResize || W, this.disabled = [0, 0];
7382
+ }), this.releaseEase = c || $t.outQuint, this.hasReleaseSpring = p, this.onGrab = t.onGrab || G, this.onDrag = t.onDrag || G, this.onRelease = t.onRelease || G, this.onUpdate = t.onUpdate || G, this.onSettle = t.onSettle || G, this.onSnap = t.onSnap || G, this.onResize = t.onResize || G, this.onAfterResize = t.onAfterResize || G, this.disabled = [0, 0];
7383
7383
  const h = {};
7384
7384
  if (i && (h.modifier = i), I(n) || n === !0)
7385
7385
  h[f] = 0;
@@ -7415,7 +7415,7 @@ class Io {
7415
7415
  !this.grabbed && this.released && (this.released = !1), this.manual || (this.deltaX = 0, this.deltaY = 0, this.velocity = 0, this.velocityStack[0] = 0, this.velocityStack[1] = 0, this.velocityStack[2] = 0, this.velocityStackIndex = 0, this.onSettle(this));
7416
7416
  }, this.resizeTicker = new Je({
7417
7417
  autoplay: !1,
7418
- duration: 150 * G.timeScale,
7418
+ duration: 150 * X.timeScale,
7419
7419
  onComplete: () => {
7420
7420
  this.onResize(this), this.refresh(), this.onAfterResize(this);
7421
7421
  }
@@ -7433,7 +7433,7 @@ class Io {
7433
7433
  if (o < 17) return this.velocity;
7434
7434
  this.velocityTime = r;
7435
7435
  const i = this.velocityStack, l = this.velocityMultiplier, c = this.minVelocity, p = this.maxVelocity, f = this.velocityStackIndex;
7436
- i[f] = N(F(xt(e * e + t * t) / o * l, c, p), 5);
7436
+ i[f] = B(F(xt(e * e + t * t) / o * l, c, p), 5);
7437
7437
  const g = Wr(i[0], i[1], i[2]);
7438
7438
  return this.velocity = g, this.velocityStackIndex = (f + 1) % 3, g;
7439
7439
  }
@@ -7444,7 +7444,7 @@ class Io {
7444
7444
  */
7445
7445
  setX(e, t = !1) {
7446
7446
  if (this.disabled[0]) return;
7447
- const n = N(e, 5);
7447
+ const n = B(e, 5);
7448
7448
  return this.overshootTicker.pause(), this.manual = !0, this.updated = !t, this.destX = n, this.snapped[0] = Tt(n, this.snapX), this.animate[this.xProp](n, 0), this.manual = !1, this;
7449
7449
  }
7450
7450
  /**
@@ -7454,24 +7454,24 @@ class Io {
7454
7454
  */
7455
7455
  setY(e, t = !1) {
7456
7456
  if (this.disabled[1]) return;
7457
- const n = N(e, 5);
7457
+ const n = B(e, 5);
7458
7458
  return this.overshootTicker.pause(), this.manual = !0, this.updated = !t, this.destY = n, this.snapped[1] = Tt(n, this.snapY), this.animate[this.yProp](n, 0), this.manual = !1, this;
7459
7459
  }
7460
7460
  get x() {
7461
- return N(
7461
+ return B(
7462
7462
  /** @type {Number} */
7463
7463
  this.animate[this.xProp](),
7464
- G.precision
7464
+ X.precision
7465
7465
  );
7466
7466
  }
7467
7467
  set x(e) {
7468
7468
  this.setX(e, !1);
7469
7469
  }
7470
7470
  get y() {
7471
- return N(
7471
+ return B(
7472
7472
  /** @type {Number} */
7473
7473
  this.animate[this.yProp](),
7474
- G.precision
7474
+ X.precision
7475
7475
  );
7476
7476
  }
7477
7477
  set y(e) {
@@ -7490,7 +7490,7 @@ class Io {
7490
7490
  this.setY(ss(e, 0, 1, this.containerBounds[0], this.containerBounds[2]), !1);
7491
7491
  }
7492
7492
  updateScrollCoords() {
7493
- const e = N(this.useWin ? Be.scrollX : this.$container.scrollLeft, 0), t = N(this.useWin ? Be.scrollY : this.$container.scrollTop, 0), [n, r, o, i] = this.containerPadding, l = this.scrollThreshold;
7493
+ const e = B(this.useWin ? Be.scrollX : this.$container.scrollLeft, 0), t = B(this.useWin ? Be.scrollY : this.$container.scrollTop, 0), [n, r, o, i] = this.containerPadding, l = this.scrollThreshold;
7494
7494
  this.scroll.x = e, this.scroll.y = t, this.scrollBounds[0] = t - this.targetBounds[0] + n - l, this.scrollBounds[1] = e - this.targetBounds[1] - r + l, this.scrollBounds[2] = t - this.targetBounds[2] - o + l, this.scrollBounds[3] = e - this.targetBounds[3] + i - l;
7495
7495
  }
7496
7496
  updateBoundingValues() {
@@ -7501,11 +7501,11 @@ class Io {
7501
7501
  const i = this.window[0] = Be.innerWidth, l = this.window[1] = Be.innerHeight, c = this.useWin, p = e.scrollWidth, f = e.scrollHeight, g = this.fixed, u = e.getBoundingClientRect(), [h, a, d, m] = this.containerPadding;
7502
7502
  this.dragArea[0] = c ? 0 : u.left, this.dragArea[1] = c ? 0 : u.top, this.scrollView[0] = c ? F(p, i, p) : p, this.scrollView[1] = c ? F(f, l, f) : f, this.updateScrollCoords();
7503
7503
  const { width: v, height: _, left: S, top: y, right: b, bottom: k } = e.getBoundingClientRect();
7504
- this.dragArea[2] = N(c ? F(v, i, i) : v, 0), this.dragArea[3] = N(c ? F(_, l, l) : _, 0);
7504
+ this.dragArea[2] = B(c ? F(v, i, i) : v, 0), this.dragArea[3] = B(c ? F(_, l, l) : _, 0);
7505
7505
  const x = Lt(e, "overflow"), C = x === "visible", O = x === "hidden";
7506
7506
  if (this.canScroll = g ? !1 : this.contained && (e === H.body && C || !O && !C) && (p > this.dragArea[2] + m - a || f > this.dragArea[3] + h - d) && (!this.containerArray || this.containerArray && !Oe(this.containerArray)), this.contained) {
7507
7507
  const P = this.scroll.x, w = this.scroll.y, E = this.canScroll, L = this.$target.getBoundingClientRect(), M = E ? c ? 0 : e.scrollLeft : 0, q = E ? c ? 0 : e.scrollTop : 0, $ = E ? this.scrollView[0] - M - v : 0, U = E ? this.scrollView[1] - q - _ : 0;
7508
- this.targetBounds[0] = N(L.top + w - (c ? 0 : y), 0), this.targetBounds[1] = N(L.right + P - (c ? i : b), 0), this.targetBounds[2] = N(L.bottom + w - (c ? l : k), 0), this.targetBounds[3] = N(L.left + P - (c ? 0 : S), 0), this.containerArray ? (this.containerBounds[0] = this.containerArray[0] + h, this.containerBounds[1] = this.containerArray[1] - a, this.containerBounds[2] = this.containerArray[2] - d, this.containerBounds[3] = this.containerArray[3] + m) : (this.containerBounds[0] = -N(L.top - (g ? F(y, 0, l) : y) + q - h, 0), this.containerBounds[1] = -N(L.right - (g ? F(b, 0, i) : b) - $ + a, 0), this.containerBounds[2] = -N(L.bottom - (g ? F(k, 0, l) : k) - U + d, 0), this.containerBounds[3] = -N(L.left - (g ? F(S, 0, i) : S) + M - m, 0));
7508
+ this.targetBounds[0] = B(L.top + w - (c ? 0 : y), 0), this.targetBounds[1] = B(L.right + P - (c ? i : b), 0), this.targetBounds[2] = B(L.bottom + w - (c ? l : k), 0), this.targetBounds[3] = B(L.left + P - (c ? 0 : S), 0), this.containerArray ? (this.containerBounds[0] = this.containerArray[0] + h, this.containerBounds[1] = this.containerArray[1] - a, this.containerBounds[2] = this.containerArray[2] - d, this.containerBounds[3] = this.containerArray[3] + m) : (this.containerBounds[0] = -B(L.top - (g ? F(y, 0, l) : y) + q - h, 0), this.containerBounds[1] = -B(L.right - (g ? F(b, 0, i) : b) - $ + a, 0), this.containerBounds[2] = -B(L.bottom - (g ? F(k, 0, l) : k) - U + d, 0), this.containerBounds[3] = -B(L.left - (g ? F(S, 0, i) : S) + M - m, 0));
7509
7509
  }
7510
7510
  this.transforms.revert(), this.coords[2] = r, this.coords[3] = o, this.setX(t, !0), this.setY(n, !0);
7511
7511
  }
@@ -7544,11 +7544,11 @@ class Io {
7544
7544
  if (this.updateScrollCoords(), this.canScroll) {
7545
7545
  const [_, S, y, b] = this.containerPadding, [k, x] = this.scrollView, C = this.dragArea[2], O = this.dragArea[3], P = this.scroll.x, w = this.scroll.y, E = this.$container.scrollWidth, L = this.$container.scrollHeight, M = this.useWin ? F(E, this.window[0], E) : E, q = this.useWin ? F(L, this.window[1], L) : L, $ = k - M, U = x - q;
7546
7546
  this.dragged && $ > 0 && (this.coords[0] -= $, this.scrollView[0] = M), this.dragged && U > 0 && (this.coords[1] -= U, this.scrollView[1] = q);
7547
- const z = this.scrollSpeed * 10, R = this.scrollThreshold, [ae, ee] = this.coords, [ke, me, V, j] = this.scrollBounds, re = N(F((ee - ke + _) / R, -1, 0) * z, 0), ue = N(F((ae - me - S) / R, 0, 1) * z, 0), rt = N(F((ee - V - y) / R, 0, 1) * z, 0), Le = N(F((ae - j + b) / R, -1, 0) * z, 0);
7547
+ const z = this.scrollSpeed * 10, R = this.scrollThreshold, [ae, te] = this.coords, [ke, me, V, ee] = this.scrollBounds, re = B(F((te - ke + _) / R, -1, 0) * z, 0), ue = B(F((ae - me - S) / R, 0, 1) * z, 0), rt = B(F((te - V - y) / R, 0, 1) * z, 0), Le = B(F((ae - ee + b) / R, -1, 0) * z, 0);
7548
7548
  if (re || rt || Le || ue) {
7549
7549
  const [we, he] = this.disabled;
7550
- let se = P, Y = w;
7551
- we || (se = N(F(P + (Le || ue), 0, k - C), 0), this.coords[0] -= P - se), he || (Y = N(F(w + (re || rt), 0, x - O), 0), this.coords[1] -= w - Y), this.useWin ? this.$scrollContainer.scrollBy(-(P - se), -(w - Y)) : this.$scrollContainer.scrollTo(se, Y);
7550
+ let Z = P, J = w;
7551
+ we || (Z = B(F(P + (Le || ue), 0, k - C), 0), this.coords[0] -= P - Z), he || (J = B(F(w + (re || rt), 0, x - O), 0), this.coords[1] -= w - J), this.useWin ? this.$scrollContainer.scrollBy(-(P - Z), -(w - J)) : this.$scrollContainer.scrollTo(Z, J);
7552
7552
  }
7553
7553
  }
7554
7554
  const [e, t, n, r] = this.containerBounds, [o, i, l, c, p, f] = this.pointer;
@@ -7573,11 +7573,11 @@ class Io {
7573
7573
  this.updateScrollCoords();
7574
7574
  const r = this.destX, o = this.destY, i = this.scroll, l = this.scrollBounds, c = this.canScroll;
7575
7575
  if (!this.containerArray && this.isOutOfBounds(l, r, o)) {
7576
- const [p, f, g, u] = l, h = N(F(o - p, -1e12, 0), 0), a = N(F(r - f, 0, Ft), 0), d = N(F(o - g, 0, Ft), 0), m = N(F(r - u, -1e12, 0), 0);
7576
+ const [p, f, g, u] = l, h = B(F(o - p, -1e12, 0), 0), a = B(F(r - f, 0, Ft), 0), d = B(F(o - g, 0, Ft), 0), m = B(F(r - u, -1e12, 0), 0);
7577
7577
  new vt(i, {
7578
- x: N(i.x + (m ? m - t : a ? a + t : 0), 0),
7579
- y: N(i.y + (h ? h - t : d ? d + t : 0), 0),
7580
- duration: I(e) ? 350 * G.timeScale : e,
7578
+ x: B(i.x + (m ? m - t : a ? a + t : 0), 0),
7579
+ y: B(i.y + (h ? h - t : d ? d + t : 0), 0),
7580
+ duration: I(e) ? 350 * X.timeScale : e,
7581
7581
  ease: n,
7582
7582
  onUpdate: () => {
7583
7583
  this.canScroll = !1, this.$scrollContainer.scrollTo(i.x, i.y);
@@ -7606,7 +7606,7 @@ class Io {
7606
7606
  this.stop(), this.updateBoundingValues();
7607
7607
  const r = this.x, o = this.y, [i, l, c, p] = this.containerPadding, f = this.scroll.y - this.targetBounds[0] + i + t, g = this.scroll.x - this.targetBounds[1] - l - t, u = this.scroll.y - this.targetBounds[2] - c - t, h = this.scroll.x - this.targetBounds[3] + p + t, a = this.isOutOfBounds([f, g, u, h], r, o);
7608
7608
  if (a) {
7609
- const [d, m] = this.disabled, v = F(Tt(r, this.snapX), h, g), _ = F(Tt(o, this.snapY), f, u), S = I(e) ? 350 * G.timeScale : e;
7609
+ const [d, m] = this.disabled, v = F(Tt(r, this.snapX), h, g), _ = F(Tt(o, this.snapY), f, u), S = I(e) ? 350 * X.timeScale : e;
7610
7610
  !d && (a === 1 || a === 3) && this.animate[this.xProp](v, S, n), !m && (a === 2 || a === 3) && this.animate[this.yProp](_, S, n);
7611
7611
  }
7612
7612
  return this;
@@ -7680,19 +7680,19 @@ class Io {
7680
7680
  handleUp() {
7681
7681
  if (!this.grabbed) return;
7682
7682
  this.updateTicker.pause(), this.triggerStyles && (this.triggerStyles.revert(), this.triggerStyles = null), this.bodyStyles && (this.bodyStyles.revert(), this.bodyStyles = null);
7683
- const [e, t] = this.disabled, [n, r, o, i, l, c] = this.pointer, [p, f, g, u] = this.containerBounds, [h, a] = this.snapped, d = this.releaseXSpring, m = this.releaseYSpring, v = this.releaseEase, _ = this.hasReleaseSpring, S = this.overshootCoords, y = this.x, b = this.y, k = this.computeVelocity(n - l, r - c), x = this.angle = er(r - i, n - o), C = k * 150, O = (1 - this.releaseContainerFriction) * this.dragSpeed, P = y + vn(x) * C, w = b + mn(x) * C, E = P > f ? f + (P - f) * O : P < u ? u + (P - u) * O : P, L = w > g ? g + (w - g) * O : w < p ? p + (w - p) * O : w, M = this.destX = F(N(Tt(E, this.snapX), 5), u, f), q = this.destY = F(N(Tt(L, this.snapY), 5), p, g), $ = this.isOutOfBounds(this.containerBounds, P, w);
7684
- let U = 0, z = 0, R = v, ae = v, ee = 0;
7683
+ const [e, t] = this.disabled, [n, r, o, i, l, c] = this.pointer, [p, f, g, u] = this.containerBounds, [h, a] = this.snapped, d = this.releaseXSpring, m = this.releaseYSpring, v = this.releaseEase, _ = this.hasReleaseSpring, S = this.overshootCoords, y = this.x, b = this.y, k = this.computeVelocity(n - l, r - c), x = this.angle = er(r - i, n - o), C = k * 150, O = (1 - this.releaseContainerFriction) * this.dragSpeed, P = y + vn(x) * C, w = b + mn(x) * C, E = P > f ? f + (P - f) * O : P < u ? u + (P - u) * O : P, L = w > g ? g + (w - g) * O : w < p ? p + (w - p) * O : w, M = this.destX = F(B(Tt(E, this.snapX), 5), u, f), q = this.destY = F(B(Tt(L, this.snapY), 5), p, g), $ = this.isOutOfBounds(this.containerBounds, P, w);
7684
+ let U = 0, z = 0, R = v, ae = v, te = 0;
7685
7685
  if (S.x = y, S.y = b, !e) {
7686
- const me = M === f ? y > f ? -1 : 1 : y < u ? -1 : 1, V = N(y - M, 0);
7686
+ const me = M === f ? y > f ? -1 : 1 : y < u ? -1 : 1, V = B(y - M, 0);
7687
7687
  d.velocity = t && _ ? V ? C * me / ot(V) : 0 : k;
7688
- const { ease: j, duration: re, restDuration: ue } = d;
7689
- U = y === M ? 0 : _ ? re : re - ue * G.timeScale, _ && (R = j), U > ee && (ee = U);
7688
+ const { ease: ee, duration: re, restDuration: ue } = d;
7689
+ U = y === M ? 0 : _ ? re : re - ue * X.timeScale, _ && (R = ee), U > te && (te = U);
7690
7690
  }
7691
7691
  if (!t) {
7692
- const me = q === g ? b > g ? -1 : 1 : b < p ? -1 : 1, V = N(b - q, 0);
7692
+ const me = q === g ? b > g ? -1 : 1 : b < p ? -1 : 1, V = B(b - q, 0);
7693
7693
  m.velocity = e && _ ? V ? C * me / ot(V) : 0 : k;
7694
- const { ease: j, duration: re, restDuration: ue } = m;
7695
- z = b === q ? 0 : _ ? re : re - ue * G.timeScale, _ && (ae = j), z > ee && (ee = z);
7694
+ const { ease: ee, duration: re, restDuration: ue } = m;
7695
+ z = b === q ? 0 : _ ? re : re - ue * X.timeScale, _ && (ae = ee), z > te && (te = z);
7696
7696
  }
7697
7697
  if (!_ && $ && O && (U || z)) {
7698
7698
  const me = xe.blend;
@@ -7709,7 +7709,7 @@ class Io {
7709
7709
  }).init(), this.overshootTicker.stretch(Wr(U, z)).restart();
7710
7710
  } else
7711
7711
  e || this.animate[this.xProp](M, U, R), t || this.animate[this.yProp](q, z, ae);
7712
- this.scrollInView(ee, this.scrollThreshold, v);
7712
+ this.scrollInView(te, this.scrollThreshold, v);
7713
7713
  let ke = !1;
7714
7714
  M !== h && (this.snapped[0] = M, this.snapX && (ke = !0)), q !== a && this.snapY && (this.snapped[1] = q, this.snapY && (ke = !0)), ke && this.onSnap(this), this.grabbed = !1, this.dragged = !1, this.updated = !0, this.released = !0, this.onRelease(this), this.$trigger.removeEventListener("touchstart", St), this.$trigger.removeEventListener("touchmove", St), this.$trigger.removeEventListener("touchend", St), H.removeEventListener("touchmove", this), H.removeEventListener("touchend", this), H.removeEventListener("touchcancel", this), H.removeEventListener("mousemove", this), H.removeEventListener("mouseup", this), H.removeEventListener("selectstart", this);
7715
7715
  }
@@ -7787,7 +7787,7 @@ class No {
7787
7787
  /** @type {DOMTargetSelector} */
7788
7788
  t
7789
7789
  )[0] || H);
7790
- const r = e.defaults, o = G.defaults, i = e.mediaQueries;
7790
+ const r = e.defaults, o = X.defaults, i = e.mediaQueries;
7791
7791
  if (this.defaults = r ? hs(r, o) : o, this.root = n, this.constructors = [], this.revertConstructors = [], this.revertibles = [], this.constructorsOnce = [], this.revertConstructorsOnce = [], this.revertiblesOnce = [], this.once = !1, this.onceIndex = 0, this.methods = {}, this.matches = {}, this.mediaQueryLists = {}, this.data = {}, i)
7792
7792
  for (let l in i) {
7793
7793
  const c = Be.matchMedia(i[l]);
@@ -7806,12 +7806,12 @@ class No {
7806
7806
  * @return {T}
7807
7807
  */
7808
7808
  execute(e) {
7809
- let t = ye.current, n = ye.root, r = G.defaults;
7810
- ye.current = this, ye.root = this.root, G.defaults = this.defaults;
7809
+ let t = ye.current, n = ye.root, r = X.defaults;
7810
+ ye.current = this, ye.root = this.root, X.defaults = this.defaults;
7811
7811
  const o = this.mediaQueryLists;
7812
7812
  for (let l in o) this.matches[l] = o[l].matches;
7813
7813
  const i = e(this);
7814
- return ye.current = t, ye.root = n, G.defaults = r, i;
7814
+ return ye.current = t, ye.root = n, X.defaults = r, i;
7815
7815
  }
7816
7816
  /**
7817
7817
  * @return {this}
@@ -7945,17 +7945,17 @@ class bc {
7945
7945
  frameRate: 30,
7946
7946
  onUpdate: (t) => {
7947
7947
  const n = t.deltaTime, r = this.prevScrollX, o = this.prevScrollY, i = this.scrollX, l = this.scrollY, c = r - i, p = o - l;
7948
- this.prevScrollX = i, this.prevScrollY = l, c && (this.backwardX = r > i), p && (this.backwardY = o > l), this.velocity = N(n > 0 ? Math.sqrt(c * c + p * p) / n : 0, 5);
7948
+ this.prevScrollX = i, this.prevScrollY = l, c && (this.backwardX = r > i), p && (this.backwardY = o > l), this.velocity = B(n > 0 ? Math.sqrt(c * c + p * p) / n : 0, 5);
7949
7949
  }
7950
7950
  }).init(), this.resizeTicker = new Je({
7951
7951
  autoplay: !1,
7952
- duration: 250 * G.timeScale,
7952
+ duration: 250 * X.timeScale,
7953
7953
  onComplete: () => {
7954
7954
  this.updateWindowBounds(), this.refreshScrollObservers(), this.handleScroll();
7955
7955
  }
7956
7956
  }).init(), this.wakeTicker = new Je({
7957
7957
  autoplay: !1,
7958
- duration: 500 * G.timeScale,
7958
+ duration: 500 * X.timeScale,
7959
7959
  onBegin: () => {
7960
7960
  this.scrollTicker.resume();
7961
7961
  },
@@ -7966,7 +7966,7 @@ class bc {
7966
7966
  }
7967
7967
  updateScrollCoords() {
7968
7968
  const e = this.useWin, t = this.element;
7969
- this.scrollX = N(e ? Be.scrollX : t.scrollLeft, 0), this.scrollY = N(e ? Be.scrollY : t.scrollTop, 0);
7969
+ this.scrollX = B(e ? Be.scrollX : t.scrollLeft, 0), this.scrollY = B(e ? Be.scrollY : t.scrollTop, 0);
7970
7970
  }
7971
7971
  updateWindowBounds() {
7972
7972
  this.winWidth = Be.innerWidth, this.winHeight = _c();
@@ -8046,7 +8046,7 @@ const Sc = (s) => {
8046
8046
  } else
8047
8047
  o = /** @type {Number} */
8048
8048
  e;
8049
- return N(o, 0);
8049
+ return B(o, 0);
8050
8050
  }, Bi = (s) => {
8051
8051
  let e;
8052
8052
  const t = s.targets;
@@ -8083,7 +8083,7 @@ class Bo {
8083
8083
  this.index = kc++, this.id = I(e.id) ? this.index : e.id, this.container = Sc(e.container), this.target = null, this.linked = null, this.repeat = null, this.horizontal = null, this.enter = null, this.leave = null, this.sync = o || i || !!c, this.syncEase = o ? n : null, this.syncSmooth = i ? t === !0 || r ? 1 : (
8084
8084
  /** @type {Number} */
8085
8085
  t
8086
- ) : null, this.onSyncEnter = c && !p && c[0] ? c[0] : W, this.onSyncLeave = c && !p && c[1] ? c[1] : W, this.onSyncEnterForward = c && p && c[0] ? c[0] : W, this.onSyncLeaveForward = c && p && c[1] ? c[1] : W, this.onSyncEnterBackward = c && p && c[2] ? c[2] : W, this.onSyncLeaveBackward = c && p && c[3] ? c[3] : W, this.onEnter = e.onEnter || W, this.onLeave = e.onLeave || W, this.onEnterForward = e.onEnterForward || W, this.onLeaveForward = e.onLeaveForward || W, this.onEnterBackward = e.onEnterBackward || W, this.onLeaveBackward = e.onLeaveBackward || W, this.onUpdate = e.onUpdate || W, this.onSyncComplete = e.onSyncComplete || W, this.reverted = !1, this.completed = !1, this.began = !1, this.isInView = !1, this.forceEnter = !1, this.hasEntered = !1, this.offset = 0, this.offsetStart = 0, this.offsetEnd = 0, this.distance = 0, this.prevProgress = 0, this.thresholds = ["start", "end", "end", "start"], this.coords = [0, 0, 0, 0], this.debugStyles = null, this.$debug = null, this._params = e, this._debug = D(e.debug, !1), this._next = null, this._prev = null, mt(this.container, this), Eo(() => {
8086
+ ) : null, this.onSyncEnter = c && !p && c[0] ? c[0] : G, this.onSyncLeave = c && !p && c[1] ? c[1] : G, this.onSyncEnterForward = c && p && c[0] ? c[0] : G, this.onSyncLeaveForward = c && p && c[1] ? c[1] : G, this.onSyncEnterBackward = c && p && c[2] ? c[2] : G, this.onSyncLeaveBackward = c && p && c[3] ? c[3] : G, this.onEnter = e.onEnter || G, this.onLeave = e.onLeave || G, this.onEnterForward = e.onEnterForward || G, this.onLeaveForward = e.onLeaveForward || G, this.onEnterBackward = e.onEnterBackward || G, this.onLeaveBackward = e.onLeaveBackward || G, this.onUpdate = e.onUpdate || G, this.onSyncComplete = e.onSyncComplete || G, this.reverted = !1, this.completed = !1, this.began = !1, this.isInView = !1, this.forceEnter = !1, this.hasEntered = !1, this.offset = 0, this.offsetStart = 0, this.offsetEnd = 0, this.distance = 0, this.prevProgress = 0, this.thresholds = ["start", "end", "end", "start"], this.coords = [0, 0, 0, 0], this.debugStyles = null, this.$debug = null, this._params = e, this._debug = D(e.debug, !1), this._next = null, this._prev = null, mt(this.container, this), Eo(() => {
8087
8087
  if (!this.reverted) {
8088
8088
  if (!this.target) {
8089
8089
  const f = (
@@ -8132,7 +8132,7 @@ class Bo {
8132
8132
  }
8133
8133
  get progress() {
8134
8134
  const e = (this.scroll - this.offsetStart) / this.distance;
8135
- return e === 1 / 0 || isNaN(e) ? 0 : N(F(e, 0, 1), 6);
8135
+ return e === 1 / 0 || isNaN(e) ? 0 : B(F(e, 0, 1), 6);
8136
8136
  }
8137
8137
  refresh() {
8138
8138
  this.reverted = !1;
@@ -8160,7 +8160,7 @@ class Bo {
8160
8160
  `);
8161
8161
  const C = [" enter: ", " leave: "];
8162
8162
  this.coords.forEach((P, w) => {
8163
- const E = w > 1, L = (E ? 0 : this.offset) + P, M = w % 2, q = L < S, $ = L > (E ? t ? p : f : t ? g : u) - S, U = (E ? M && !q : !M && !q) || $, z = H.createElement("div"), R = H.createElement("div"), ae = t ? U ? "right" : "left" : U ? "bottom" : "top", ee = U ? (t ? _ : v) + (E ? t ? -1 : $ ? 0 : -2 : t ? -1 : -2) : t ? 1 : 0;
8163
+ const E = w > 1, L = (E ? 0 : this.offset) + P, M = w % 2, q = L < S, $ = L > (E ? t ? p : f : t ? g : u) - S, U = (E ? M && !q : !M && !q) || $, z = H.createElement("div"), R = H.createElement("div"), ae = t ? U ? "right" : "left" : U ? "bottom" : "top", te = U ? (t ? _ : v) + (E ? t ? -1 : $ ? 0 : -2 : t ? -1 : -2) : t ? 1 : 0;
8164
8164
  R.innerHTML = `${this.id}${C[M]}${this.thresholds[w]}`, z.style.cssText = `${x("absolute", 0, 0, _, v)}
8165
8165
  display: flex;
8166
8166
  flex-direction: ${t ? "column" : "row"};
@@ -8187,7 +8187,7 @@ class Bo {
8187
8187
  border-${t ? U ? "top-left" : "top-right" : U ? "top-left" : "bottom-left"}-radius: 5px;
8188
8188
  border-${t ? U ? "bottom-left" : "bottom-right" : U ? "top-right" : "bottom-right"}-radius: 5px;
8189
8189
  `, z.appendChild(R);
8190
- let ke = L - ee + (t ? 1 : 0);
8190
+ let ke = L - te + (t ? 1 : 0);
8191
8191
  z.style[t ? "left" : "top"] = `${ke}px`, (E ? o : i).appendChild(z);
8192
8192
  }), r.appendChild(o), r.appendChild(i), e.element.appendChild(r), n || r.classList.add("animejs-onscroll-debug"), this.$debug = r, Lt(e.element, "position") === "static" && (this.debugStyles = kt(e.element, { position: "relative " }));
8193
8193
  }
@@ -8244,7 +8244,7 @@ class Bo {
8244
8244
  r < 1
8245
8245
  ) {
8246
8246
  const y = _ < v && v === 1 ? 1e-4 : _ > v && !v ? -1e-4 : 0;
8247
- v = N(Lo(_, v, ut(
8247
+ v = B(Lo(_, v, ut(
8248
8248
  0.01,
8249
8249
  0.2,
8250
8250
  /** @type {Number} */
@@ -8517,9 +8517,9 @@ const Lc = (s, e) => new Ho(s, e), nr = {
8517
8517
  if (!f)
8518
8518
  t.push(ot(x - R));
8519
8519
  else {
8520
- const ae = a ? (f[0] - 1) / 2 : x % f[0], ee = a ? (f[1] - 1) / 2 : us(x / f[0]), ke = R % f[0], me = us(R / f[0]), V = ae - ke, j = ee - me;
8521
- let re = xt(V * V + j * j);
8522
- g === "x" && (re = -V), g === "y" && (re = -j), t.push(re);
8520
+ const ae = a ? (f[0] - 1) / 2 : x % f[0], te = a ? (f[1] - 1) / 2 : us(x / f[0]), ke = R % f[0], me = us(R / f[0]), V = ae - ke, ee = te - me;
8521
+ let re = xt(V * V + ee * ee);
8522
+ g === "x" && (re = -V), g === "y" && (re = -ee), t.push(re);
8523
8523
  }
8524
8524
  n = Wr(...t);
8525
8525
  }
@@ -8529,7 +8529,7 @@ const Lc = (s, e) => new Ho(s, e), nr = {
8529
8529
  let z = (w ? rs(w, I(e.start) ? w.iterationDuration : k) : (
8530
8530
  /** @type {Number} */
8531
8531
  k
8532
- )) + ($ * N(t[q], 2) || 0);
8532
+ )) + ($ * B(t[q], 2) || 0);
8533
8533
  return e.modifier && (z = e.modifier(z)), b && (z = `${z}${b[2]}`), z;
8534
8534
  };
8535
8535
  }, Ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -8673,13 +8673,13 @@ const Bc = async (s) => {
8673
8673
  async function f(T) {
8674
8674
  if (p || T.closest(".squiffy-output-section") !== n || T.classList.contains("disabled") || !$o(n))
8675
8675
  return !1;
8676
- const B = T.getAttribute("data-passage"), J = T.getAttribute("data-section");
8677
- if (B !== null)
8678
- return u(T), Y("_turncount", se("_turncount") + 1), await d(T), B && (o = null, await b(B)), l.emit("linkClick", { linkType: "passage" }), !0;
8679
- if (J !== null)
8680
- return await d(T), J && await v(J), l.emit("linkClick", { linkType: "section" }), !0;
8681
- const [Q, ve, Pe] = He.handleLink(T);
8682
- return Q ? (Pe?.disableLink && u(T), C(), l.emit("linkClick", { linkType: ve }), !0) : !1;
8676
+ const N = T.getAttribute("data-passage"), Q = T.getAttribute("data-section");
8677
+ if (N !== null)
8678
+ return u(T), J("_turncount", Z("_turncount") + 1), await d(T), N && (o = null, await b(N)), l.emit("linkClick", { linkType: "passage" }), !0;
8679
+ if (Q !== null)
8680
+ return await d(T), Q && await v(Q), l.emit("linkClick", { linkType: "section" }), !0;
8681
+ const [W, ve, Pe] = He.handleLink(T);
8682
+ return W ? (Pe?.disableLink && u(T), C(), l.emit("linkClick", { linkType: ve }), !0) : !1;
8683
8683
  }
8684
8684
  async function g(T) {
8685
8685
  const A = T.target;
@@ -8698,46 +8698,56 @@ const Bc = async (s) => {
8698
8698
  Me.runLinkAnimation(T), await y();
8699
8699
  const A = T.getAttribute("data-set");
8700
8700
  if (A) {
8701
- const B = JSON.parse(A);
8702
- for (const J of B)
8703
- m(J);
8701
+ const N = JSON.parse(A);
8702
+ for (const Q of N)
8703
+ m(Q);
8704
8704
  }
8705
8705
  }
8706
8706
  function m(T) {
8707
- T = T.replace(/^(\w*\s*):=(.*)$/, (J, Q, ve) => Q + "=" + $.processText(ve, !0));
8708
- const B = /^([\w]*)\s*=\s*(.*)$/.exec(T);
8709
- if (B) {
8710
- const J = B[1];
8711
- let Q = B[2];
8712
- Q === "true" ? Y(J, !0) : Q === "false" ? Y(J, !1) : isNaN(Q) ? (Q.startsWith("@") && (Q = se(Q.substring(1))), Y(J, Q)) : Y(J, parseFloat(Q));
8707
+ T = T.replace(/^(\w*\s*):=(.*)$/, (Q, W, ve) => W + "=" + $.processText(ve, !0));
8708
+ const N = /^([\w]*)\s*=\s*(.*)$/.exec(T);
8709
+ if (N) {
8710
+ const Q = N[1];
8711
+ let W = N[2];
8712
+ W === "true" ? J(Q, !0) : W === "false" ? J(Q, !1) : isNaN(W) ? (W.startsWith("@") && (W = Z(W.substring(1))), J(Q, W)) : J(Q, parseFloat(W));
8713
8713
  } else {
8714
- const Q = /^([\w]*)\s*([+\-*/])=\s*(.*)$/.exec(T);
8715
- if (Q) {
8716
- const ve = Q[1], Pe = Q[2];
8717
- let Ee = Q[3];
8718
- Ee.startsWith("@") && (Ee = se(Ee.substring(1)));
8714
+ const W = /^([\w]*)\s*([+\-*/])=\s*(.*)$/.exec(T);
8715
+ if (W) {
8716
+ const ve = W[1], Pe = W[2];
8717
+ let Ee = W[3];
8718
+ Ee.startsWith("@") && (Ee = Z(Ee.substring(1)));
8719
8719
  const Qe = parseFloat(Ee);
8720
- let pe = se(ve);
8721
- pe === null && (pe = 0), Pe == "+" && (pe += Qe), Pe == "-" && (pe -= Qe), Pe == "*" && (pe *= Qe), Pe == "/" && (pe /= Qe), Y(ve, pe);
8720
+ let pe = Z(ve);
8721
+ pe === null && (pe = 0), Pe == "+" && (pe += Qe), Pe == "-" && (pe -= Qe), Pe == "*" && (pe *= Qe), Pe == "/" && (pe /= Qe), J(ve, pe);
8722
8722
  } else {
8723
8723
  let ve = !0;
8724
- T.startsWith("not ") && (T = T.substring(4), ve = !1), Y(T, ve);
8724
+ T.startsWith("not ") && (T = T.substring(4), ve = !1), J(T, ve);
8725
8725
  }
8726
8726
  }
8727
8727
  }
8728
8728
  async function v(T) {
8729
- const A = ee();
8729
+ const A = te();
8730
8730
  if (t = e.sections[T], !t) return;
8731
- Y("_section", T), he.setSeen(T);
8732
- const B = e.sections[""];
8733
- (B?.clear || t.clear) && M(), w(T), B && await S(B, "[[]]"), await S(t, `[[${T}]]`), Zs(n), se("_section") == T && (Y("_turncount", 0), Le(), C());
8734
- const J = ee();
8735
- J != A && l.emit("canGoBackChanged", { canGoBack: J });
8731
+ J("_section", T), he.setSeen(T);
8732
+ const N = e.sections[""];
8733
+ (N?.clear || t.clear) && M(), w(T);
8734
+ const Q = n;
8735
+ if (N && (await S(N, "[[]]"), Z("_section") !== T)) {
8736
+ Q.remove();
8737
+ return;
8738
+ }
8739
+ if (await S(t, `[[${T}]]`), Z("_section") !== T) {
8740
+ Q.remove();
8741
+ return;
8742
+ }
8743
+ Zs(n), J("_turncount", 0), Le(), C();
8744
+ const W = te();
8745
+ W != A && l.emit("canGoBackChanged", { canGoBack: W });
8736
8746
  }
8737
8747
  function _(T, A = null) {
8738
- const B = {
8739
- get: se,
8740
- set: Y,
8748
+ const N = {
8749
+ get: Z,
8750
+ set: J,
8741
8751
  ui: {
8742
8752
  transition: lt,
8743
8753
  write: $.write,
@@ -8750,10 +8760,15 @@ const Bc = async (s) => {
8750
8760
  import: Oc,
8751
8761
  ...A
8752
8762
  };
8753
- e.js[T](B, se, Y);
8763
+ e.js[T](N, Z, J);
8754
8764
  }
8755
8765
  async function S(T, A) {
8756
- T.attributes && await k(T.attributes), T.jsIndex !== void 0 && _(T.jsIndex), $.write(T.text || "", A), await y();
8766
+ if (T.attributes && await k(T.attributes), T.jsIndex !== void 0) {
8767
+ const N = Z("_section");
8768
+ if (_(T.jsIndex), Z("_section") !== N)
8769
+ return;
8770
+ }
8771
+ $.write(T.text || "", A), await y();
8757
8772
  }
8758
8773
  async function y() {
8759
8774
  p = !0, n.classList.add("links-disabled");
@@ -8762,35 +8777,35 @@ const Bc = async (s) => {
8762
8777
  c.length = 0, p = !1, n.classList.remove("links-disabled");
8763
8778
  }
8764
8779
  async function b(T) {
8765
- const A = ee();
8766
- let B = t.passages && t.passages[T];
8767
- const J = e.sections[""];
8768
- if (!B && J && J.passages && (B = J.passages[T]), !B)
8780
+ const A = te();
8781
+ let N = t.passages && t.passages[T];
8782
+ const Q = e.sections[""];
8783
+ if (!N && Q && Q.passages && (N = Q.passages[T]), !N)
8769
8784
  throw `No passage named ${T} in the current section or master section`;
8770
8785
  he.setSeen(T);
8771
- const Q = [], ve = [];
8772
- if (J && J.passages) {
8773
- const pe = J.passages[""];
8774
- pe && (Q.push(pe), ve.push(() => S(pe, "[[]][]")));
8786
+ const W = [], ve = [];
8787
+ if (Q && Q.passages) {
8788
+ const pe = Q.passages[""];
8789
+ pe && (W.push(pe), ve.push(() => S(pe, "[[]][]")));
8775
8790
  }
8776
8791
  const Pe = t.passages && t.passages[""];
8777
- Pe && (Q.push(Pe), ve.push(() => S(Pe, `[[${se("_section")}]][]`))), Q.push(B), ve.push(() => S(B, `[[${se("_section")}]][${T}]`));
8778
- const Ee = "@" + se("_turncount");
8792
+ Pe && (W.push(Pe), ve.push(() => S(Pe, `[[${Z("_section")}]][]`))), W.push(N), ve.push(() => S(N, `[[${Z("_section")}]][${T}]`));
8793
+ const Ee = "@" + Z("_turncount");
8779
8794
  if (t.passages) {
8780
8795
  if (Ee in t.passages) {
8781
8796
  const pe = t.passages[Ee];
8782
- Q.push(pe), ve.push(() => S(pe, `[[${se("_section")}]][${Ee}]`));
8797
+ W.push(pe), ve.push(() => S(pe, `[[${Z("_section")}]][${Ee}]`));
8783
8798
  }
8784
- if ("@last" in t.passages && se("_turncount") >= (t.passageCount || 0)) {
8799
+ if ("@last" in t.passages && Z("_turncount") >= (t.passageCount || 0)) {
8785
8800
  const pe = t.passages["@last"];
8786
- Q.push(pe), ve.push(() => S(pe, `[[${se("_section")}]][${Ee}]`));
8801
+ W.push(pe), ve.push(() => S(pe, `[[${Z("_section")}]][${Ee}]`));
8787
8802
  }
8788
8803
  }
8789
- Q.some((pe) => pe.clear) && (M(), E()), r = document.createElement("div"), r.classList.add("squiffy-output-passage"), r.setAttribute("data-passage", `${T}`), n.appendChild(r);
8804
+ W.some((pe) => pe.clear) && (M(), E()), r = document.createElement("div"), r.classList.add("squiffy-output-passage"), r.setAttribute("data-passage", `${T}`), n.appendChild(r);
8790
8805
  for (const pe of ve)
8791
8806
  await pe();
8792
8807
  Zs(n), Le(), C();
8793
- const Qe = ee();
8808
+ const Qe = te();
8794
8809
  Qe != A && l.emit("canGoBackChanged", { canGoBack: Qe });
8795
8810
  }
8796
8811
  async function k(T) {
@@ -8798,10 +8813,10 @@ const Bc = async (s) => {
8798
8813
  m(A);
8799
8814
  }
8800
8815
  function x() {
8801
- he.reset(), j.scroll === "element" || j.scroll === "none" ? (V.innerHTML = "", a()) : location.reload();
8816
+ he.reset(), ee.scroll === "element" || ee.scroll === "none" ? (V.innerHTML = "", a()) : location.reload();
8802
8817
  }
8803
8818
  function C() {
8804
- Y("_output", V.innerHTML);
8819
+ J("_output", V.innerHTML);
8805
8820
  }
8806
8821
  function O() {
8807
8822
  const T = () => {
@@ -8810,29 +8825,29 @@ const Bc = async (s) => {
8810
8825
  });
8811
8826
  };
8812
8827
  he.load();
8813
- const A = se("_output");
8814
- return A ? (V.innerHTML = A, z(), R(), o = V.querySelector(".squiffy-output-block:last-child"), t = e.sections[se("_section")], T(), ge.onLoad(), Zs(n), !0) : (T(), !1);
8828
+ const A = Z("_output");
8829
+ return A ? (V.innerHTML = A, z(), R(), o = V.querySelector(".squiffy-output-block:last-child"), t = e.sections[Z("_section")], T(), ge.onLoad(), Zs(n), !0) : (T(), !1);
8815
8830
  }
8816
8831
  function P() {
8817
8832
  o = document.createElement("div"), o.classList.add("squiffy-output-block"), (r || n)?.appendChild(o);
8818
8833
  }
8819
8834
  function w(T) {
8820
8835
  n && (n.querySelectorAll("input").forEach((A) => {
8821
- const B = A.getAttribute("data-attribute") || A.id;
8822
- B && Y(B, A.value), A.disabled = !0;
8836
+ const N = A.getAttribute("data-attribute") || A.id;
8837
+ N && J(N, A.value), A.disabled = !0;
8823
8838
  }), n.querySelectorAll("[contenteditable]").forEach((A) => {
8824
- const B = A.getAttribute("data-attribute") || A.id;
8825
- B && Y(B, A.innerHTML), A.contentEditable = "false";
8839
+ const N = A.getAttribute("data-attribute") || A.id;
8840
+ N && J(N, A.innerHTML), A.contentEditable = "false";
8826
8841
  }), n.querySelectorAll("textarea").forEach((A) => {
8827
- const B = A.getAttribute("data-attribute") || A.id;
8828
- B && Y(B, A.value), A.disabled = !0;
8842
+ const N = A.getAttribute("data-attribute") || A.id;
8843
+ N && J(N, A.value), A.disabled = !0;
8829
8844
  }), n.querySelectorAll("select").forEach((A) => {
8830
- const B = A.getAttribute("data-attribute") || A.id;
8831
- B && Y(B, A.value), A.disabled = !0;
8845
+ const N = A.getAttribute("data-attribute") || A.id;
8846
+ N && J(N, A.value), A.disabled = !0;
8832
8847
  })), r = null, E(T), P();
8833
8848
  }
8834
8849
  function E(T) {
8835
- n = document.createElement("div"), n.classList.add("squiffy-output-section"), n.setAttribute("data-section", T ?? se("_section")), T || n.setAttribute("data-clear", "true"), V.appendChild(n);
8850
+ n = document.createElement("div"), n.classList.add("squiffy-output-section"), n.setAttribute("data-section", T ?? Z("_section")), T || n.setAttribute("data-clear", "true"), V.appendChild(n);
8836
8851
  }
8837
8852
  function L() {
8838
8853
  return V.querySelector(".squiffy-clear-stack");
@@ -8842,38 +8857,38 @@ const Bc = async (s) => {
8842
8857
  T || (T = document.createElement("div"), T.classList.add("squiffy-clear-stack"), T.style.display = "none", V.prepend(T));
8843
8858
  const A = document.createElement("div");
8844
8859
  T.appendChild(A);
8845
- for (const B of [...V.children])
8846
- B !== T && A.appendChild(B);
8860
+ for (const N of [...V.children])
8861
+ N !== T && A.appendChild(N);
8847
8862
  }
8848
8863
  function q() {
8849
8864
  const T = L();
8850
- for (const B of [...V.children])
8851
- B !== T && B.remove();
8865
+ for (const N of [...V.children])
8866
+ N !== T && N.remove();
8852
8867
  const A = T.children[T.children.length - 1];
8853
- for (const B of [...A.children])
8854
- V.appendChild(B);
8868
+ for (const N of [...A.children])
8869
+ V.appendChild(N);
8855
8870
  A.remove();
8856
8871
  }
8857
8872
  const $ = {
8858
8873
  write: (T, A) => {
8859
8874
  i = V.scrollHeight;
8860
- const B = $.processText(T, !1).trim();
8875
+ const N = $.processText(T, !1).trim();
8861
8876
  o || P();
8862
- const J = document.createElement("div");
8863
- A && J.setAttribute("data-source", A), J.innerHTML = B, ge.onWrite(J), o.appendChild(J), Zs(n), $.scrollToEnd();
8877
+ const Q = document.createElement("div");
8878
+ A && Q.setAttribute("data-source", A), Q.innerHTML = N, ge.onWrite(Q), o.appendChild(Q), Zs(n), $.scrollToEnd();
8864
8879
  },
8865
8880
  clearScreen: () => {
8866
8881
  M(), E();
8867
8882
  },
8868
8883
  scrollToEnd: () => {
8869
- if (j.scroll !== "none") if (j.scroll === "element")
8884
+ if (ee.scroll !== "none") if (ee.scroll === "element")
8870
8885
  V.lastElementChild.scrollIntoView({ block: "end", inline: "nearest", behavior: "smooth" });
8871
8886
  else {
8872
8887
  let T = i;
8873
8888
  const A = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
8874
8889
  if (T > A) {
8875
- const B = document.documentElement.scrollHeight - window.innerHeight;
8876
- T > B && (T = B), window.scrollTo({ top: T, behavior: "smooth" });
8890
+ const N = document.documentElement.scrollHeight - window.innerHeight;
8891
+ T > N && (T = N), window.scrollTo({ top: T, behavior: "smooth" });
8877
8892
  }
8878
8893
  }
8879
8894
  },
@@ -8899,52 +8914,52 @@ const Bc = async (s) => {
8899
8914
  const T = L(), A = V.querySelectorAll(".squiffy-output-section").length + V.querySelectorAll(".squiffy-output-passage").length;
8900
8915
  return T ? A + T.children.length : A;
8901
8916
  }
8902
- function ee() {
8917
+ function te() {
8903
8918
  return ae() > 1;
8904
8919
  }
8905
8920
  function ke() {
8906
- if (!ee())
8921
+ if (!te())
8907
8922
  return;
8908
8923
  const T = L();
8909
8924
  if (r) {
8910
8925
  const A = r.getAttribute("data-passage");
8911
8926
  we(r.getAttribute("data-undo")), r.remove();
8912
- let B = !1, J = !1;
8913
- for (const Q of V.children)
8914
- if (Q !== T) {
8915
- if (Q.getAttribute("data-clear") == "true" && Q.children.length == 0) {
8916
- B = !0;
8927
+ let N = !1, Q = !1;
8928
+ for (const W of V.children)
8929
+ if (W !== T) {
8930
+ if (W.getAttribute("data-clear") == "true" && W.children.length == 0) {
8931
+ N = !0;
8917
8932
  continue;
8918
8933
  }
8919
- J = !0;
8934
+ Q = !0;
8920
8935
  break;
8921
8936
  }
8922
- B && !J && (q(), z());
8923
- for (const Q of n.querySelectorAll("a.squiffy-link[data-passage]"))
8924
- Q.getAttribute("data-passage") == A && h(Q);
8937
+ N && !Q && (q(), z());
8938
+ for (const W of n.querySelectorAll("a.squiffy-link[data-passage]"))
8939
+ W.getAttribute("data-passage") == A && h(W);
8925
8940
  R();
8926
8941
  } else {
8927
8942
  we(n.getAttribute("data-undo")), n.remove();
8928
8943
  let A = !1;
8929
- for (const B of [...V.children])
8930
- if (B !== T) {
8944
+ for (const N of [...V.children])
8945
+ if (N !== T) {
8931
8946
  A = !0;
8932
8947
  break;
8933
8948
  }
8934
8949
  A || q(), z(), R();
8935
8950
  }
8936
- ee() || l.emit("canGoBackChanged", { canGoBack: !1 });
8951
+ te() || l.emit("canGoBackChanged", { canGoBack: !1 });
8937
8952
  }
8938
8953
  const me = s.element, V = document.createElement("div");
8939
8954
  me.appendChild(V), e = s.story;
8940
- const j = {
8955
+ const ee = {
8941
8956
  scroll: s.scroll || "body",
8942
8957
  persist: s.persist === void 0 ? !0 : s.persist,
8943
8958
  onSet: s.onSet || (() => {
8944
8959
  })
8945
8960
  };
8946
8961
  let re = "";
8947
- j.persist && (s.storyId !== void 0 ? re = s.storyId : window.location.protocol === "file:" ? re = e.id || "" : re = window.location.pathname, re || (console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."), j.persist = !1)), j.scroll === "element" && (V.style.overflowY = "auto"), V.addEventListener("click", g), V.addEventListener("keypress", async function(T) {
8962
+ ee.persist && (s.storyId !== void 0 ? re = s.storyId : window.location.protocol === "file:" ? re = e.id || "" : re = window.location.pathname, re || (console.warn("Persist is set to true in Squiffy runtime options, but no storage key could be determined. Persist will be disabled."), ee.persist = !1)), ee.scroll === "element" && (V.style.overflowY = "auto"), V.addEventListener("click", g), V.addEventListener("keypress", async function(T) {
8948
8963
  T.key === "Enter" && await g(T);
8949
8964
  });
8950
8965
  let ue = {};
@@ -8956,9 +8971,9 @@ const Bc = async (s) => {
8956
8971
  if (!T) return;
8957
8972
  const A = JSON.parse(T);
8958
8973
  if (A)
8959
- for (const B of Object.keys(A))
8960
- he.setInternal(B, A[B], !1);
8961
- }, he = new il(j.persist, re, j.onSet, l, rt), se = he.get.bind(he), Y = he.set.bind(he), Te = new rl(e, he, () => t), He = new fl(), Ce = (T) => T in e.sections && e.sections[T].text || null, Ae = (T) => t.passages && T in t.passages ? t.passages[T].text || null : "passages" in e.sections[""] && e.sections[""].passages && T in e.sections[""].passages && e.sections[""].passages[T].text || null, lt = (T) => {
8974
+ for (const N of Object.keys(A))
8975
+ he.setInternal(N, A[N], !1);
8976
+ }, he = new il(ee.persist, re, ee.onSet, l, rt), Z = he.get.bind(he), J = he.set.bind(he), Te = new rl(e, he, () => t), He = new fl(), Ce = (T) => T in e.sections && e.sections[T].text || null, Ae = (T) => t.passages && T in t.passages ? t.passages[T].text || null : "passages" in e.sections[""] && e.sections[""].passages && T in e.sections[""].passages && e.sections[""].passages[T].text || null, lt = (T) => {
8962
8977
  c.push(T);
8963
8978
  }, Me = new Rc(), ge = new al(
8964
8979
  V,
@@ -8975,8 +8990,8 @@ const Bc = async (s) => {
8975
8990
  return ge.add(Kt.ReplaceLabel()), ge.add(Kt.RotateSequencePlugin()), ge.add(Kt.RandomPlugin()), ge.add(Kt.LivePlugin()), ge.add(Kt.AnimatePlugin()), {
8976
8991
  begin: a,
8977
8992
  restart: x,
8978
- get: se,
8979
- set: Y,
8993
+ get: Z,
8994
+ set: J,
8980
8995
  clickLink: f,
8981
8996
  update: U,
8982
8997
  goBack: ke,