@ukpc-lib/react 0.1.9 → 0.1.10
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.
- package/dist/components/GlobalMenu/components/MenuItem.d.ts +3 -2
- package/dist/components/GlobalMenu/index.d.ts +2 -2
- package/dist/components/index.cjs +4 -4
- package/dist/components/index.js +338 -337
- package/package.json +1 -1
- package/web-components-bundle/global-menu/index.cjs +4 -4
- package/web-components-bundle/global-menu/index.js +299 -297
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as B, Fragment as Fi, jsx as w } from "react/jsx-runtime";
|
|
2
2
|
import * as D from "react";
|
|
3
|
-
import zi, { useState as
|
|
3
|
+
import zi, { useState as K, useRef as Et, useEffect as Xt, createContext as Dt, useLayoutEffect as Wi, useContext as W, useInsertionEffect as kr, useCallback as Cr, useMemo as be, forwardRef as Vr, createElement as _i, useId as Er } from "react";
|
|
4
4
|
import { C as Mr, g as Or, R as Dr, Q as Lr, p as Rr, l as Br } from "../interceptor.const-3d8c3adc.js";
|
|
5
5
|
import { a as lh, b as ch } from "../interceptor.const-3d8c3adc.js";
|
|
6
6
|
import { Link as Nr, useLocation as jr } from "react-router-dom";
|
|
@@ -154,7 +154,7 @@ function nh({
|
|
|
154
154
|
...i,
|
|
155
155
|
color: (o == null ? void 0 : o.color) || "black",
|
|
156
156
|
backgroundColor: (o == null ? void 0 : o.bgColor) || "black"
|
|
157
|
-
}, [l, c] =
|
|
157
|
+
}, [l, c] = K(!1), u = () => {
|
|
158
158
|
window.location.href = `${n}/authentication/logout?callbackUrl=${window.location.href}`;
|
|
159
159
|
};
|
|
160
160
|
return /* @__PURE__ */ B(Hi, { styles: [Gr], style: { zIndex: 1202 }, children: [
|
|
@@ -204,7 +204,7 @@ function Yr({
|
|
|
204
204
|
setShowConfirmModal: e,
|
|
205
205
|
primaryColor: n = "#009d4f"
|
|
206
206
|
}) {
|
|
207
|
-
const [i, s] =
|
|
207
|
+
const [i, s] = K(!1), o = Et(null), r = Et(null), [a, l] = K(!1), [c, u] = K(!1), h = {
|
|
208
208
|
backgroundColor: a ? n : "transparent"
|
|
209
209
|
}, d = {
|
|
210
210
|
backgroundColor: c ? n : "transparent"
|
|
@@ -333,19 +333,19 @@ function oe(t, e, n) {
|
|
|
333
333
|
throw new TypeError(xo);
|
|
334
334
|
e = Mn(e) || 0, ue(n) && (u = !!n.leading, h = "maxWait" in n, o = h ? wo(Mn(n.maxWait) || 0, e) : o, d = "trailing" in n ? !!n.trailing : d);
|
|
335
335
|
function f(T) {
|
|
336
|
-
var k = i,
|
|
337
|
-
return i = s = void 0, c = T, r = t.apply(
|
|
336
|
+
var k = i, A = s;
|
|
337
|
+
return i = s = void 0, c = T, r = t.apply(A, k), r;
|
|
338
338
|
}
|
|
339
339
|
function p(T) {
|
|
340
340
|
return c = T, a = setTimeout(y, e), u ? f(T) : r;
|
|
341
341
|
}
|
|
342
342
|
function m(T) {
|
|
343
|
-
var k = T - l,
|
|
344
|
-
return h ? So(C, o -
|
|
343
|
+
var k = T - l, A = T - c, C = e - k;
|
|
344
|
+
return h ? So(C, o - A) : C;
|
|
345
345
|
}
|
|
346
346
|
function v(T) {
|
|
347
|
-
var k = T - l,
|
|
348
|
-
return l === void 0 || k >= e || k < 0 || h &&
|
|
347
|
+
var k = T - l, A = T - c;
|
|
348
|
+
return l === void 0 || k >= e || k < 0 || h && A >= o;
|
|
349
349
|
}
|
|
350
350
|
function y() {
|
|
351
351
|
var T = Ve();
|
|
@@ -462,7 +462,7 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
462
462
|
addClasses: Qi,
|
|
463
463
|
removeClasses: Zi,
|
|
464
464
|
classNamesToQuery: Ji
|
|
465
|
-
}),
|
|
465
|
+
}), st = qi, Ee = Ki, Vo = $i, rt = Qi, ot = Zi, z = Ji, te = (
|
|
466
466
|
/** @class */
|
|
467
467
|
function() {
|
|
468
468
|
function t(e, n) {
|
|
@@ -473,18 +473,18 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
473
473
|
}, this.onStopScrolling = function() {
|
|
474
474
|
}, this.onMouseEntered = function() {
|
|
475
475
|
}, this.onScroll = function() {
|
|
476
|
-
var s =
|
|
477
|
-
i.scrollXTicking || (s.requestAnimationFrame(i.scrollX), i.scrollXTicking = !0), i.scrollYTicking || (s.requestAnimationFrame(i.scrollY), i.scrollYTicking = !0), i.isScrolling || (i.isScrolling = !0,
|
|
476
|
+
var s = st(i.el);
|
|
477
|
+
i.scrollXTicking || (s.requestAnimationFrame(i.scrollX), i.scrollXTicking = !0), i.scrollYTicking || (s.requestAnimationFrame(i.scrollY), i.scrollYTicking = !0), i.isScrolling || (i.isScrolling = !0, rt(i.el, i.classNames.scrolling)), i.showScrollbar("x"), i.showScrollbar("y"), i.onStopScrolling();
|
|
478
478
|
}, this.scrollX = function() {
|
|
479
479
|
i.axis.x.isOverflowing && i.positionScrollbar("x"), i.scrollXTicking = !1;
|
|
480
480
|
}, this.scrollY = function() {
|
|
481
481
|
i.axis.y.isOverflowing && i.positionScrollbar("y"), i.scrollYTicking = !1;
|
|
482
482
|
}, this._onStopScrolling = function() {
|
|
483
|
-
|
|
483
|
+
ot(i.el, i.classNames.scrolling), i.options.autoHide && (i.hideScrollbar("x"), i.hideScrollbar("y")), i.isScrolling = !1;
|
|
484
484
|
}, this.onMouseEnter = function() {
|
|
485
|
-
i.isMouseEntering || (
|
|
485
|
+
i.isMouseEntering || (rt(i.el, i.classNames.mouseEntered), i.showScrollbar("x"), i.showScrollbar("y"), i.isMouseEntering = !0), i.onMouseEntered();
|
|
486
486
|
}, this._onMouseEntered = function() {
|
|
487
|
-
|
|
487
|
+
ot(i.el, i.classNames.mouseEntered), i.options.autoHide && (i.hideScrollbar("x"), i.hideScrollbar("y")), i.isMouseEntering = !1;
|
|
488
488
|
}, this._onMouseMove = function(s) {
|
|
489
489
|
i.mouseX = s.clientX, i.mouseY = s.clientY, (i.axis.x.isOverflowing || i.axis.x.forceVisible) && i.onMouseMoveForAxis("x"), (i.axis.y.isOverflowing || i.axis.y.forceVisible) && i.onMouseMoveForAxis("y");
|
|
490
490
|
}, this.onMouseLeave = function() {
|
|
@@ -503,12 +503,12 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
503
503
|
s.preventDefault(), s.stopPropagation(), i.draggedAxis === "y" ? v = s.pageY : v = s.pageX;
|
|
504
504
|
var T = v - ((d = (h = y.rect) === null || h === void 0 ? void 0 : h[i.axis[i.draggedAxis].offsetAttr]) !== null && d !== void 0 ? d : 0) - i.axis[i.draggedAxis].dragOffset;
|
|
505
505
|
T = i.draggedAxis === "x" && i.isRtl ? ((p = (f = y.rect) === null || f === void 0 ? void 0 : f[i.axis[i.draggedAxis].sizeAttr]) !== null && p !== void 0 ? p : 0) - g.size - T : T;
|
|
506
|
-
var k = T / (b - g.size),
|
|
507
|
-
i.draggedAxis === "x" && i.isRtl && (
|
|
506
|
+
var k = T / (b - g.size), A = k * (x - S);
|
|
507
|
+
i.draggedAxis === "x" && i.isRtl && (A = !((m = t.getRtlHelpers()) === null || m === void 0) && m.isScrollingToNegative ? -A : A), i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr] = A;
|
|
508
508
|
}
|
|
509
509
|
}, this.onEndDrag = function(s) {
|
|
510
|
-
var o = Ee(i.el), r =
|
|
511
|
-
s.preventDefault(), s.stopPropagation(),
|
|
510
|
+
var o = Ee(i.el), r = st(i.el);
|
|
511
|
+
s.preventDefault(), s.stopPropagation(), ot(i.el, i.classNames.dragging), o.removeEventListener("mousemove", i.drag, !0), o.removeEventListener("mouseup", i.onEndDrag, !0), i.removePreventClickId = r.setTimeout(function() {
|
|
512
512
|
o.removeEventListener("click", i.preventClick, !0), o.removeEventListener("dblclick", i.preventClick, !0), i.removePreventClickId = null;
|
|
513
513
|
});
|
|
514
514
|
}, this.preventClick = function(s) {
|
|
@@ -569,7 +569,7 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
569
569
|
return Dn();
|
|
570
570
|
}
|
|
571
571
|
}, t.getOffset = function(e) {
|
|
572
|
-
var n = e.getBoundingClientRect(), i = Ee(e), s =
|
|
572
|
+
var n = e.getBoundingClientRect(), i = Ee(e), s = st(e);
|
|
573
573
|
return {
|
|
574
574
|
top: n.top + (s.pageYOffset || i.documentElement.scrollTop),
|
|
575
575
|
left: n.left + (s.pageXOffset || i.documentElement.scrollLeft)
|
|
@@ -578,9 +578,9 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
578
578
|
Xi && (this.initDOM(), this.rtlHelpers = t.getRtlHelpers(), this.scrollbarWidth = this.getScrollbarWidth(), this.recalculate(), this.initListeners());
|
|
579
579
|
}, t.prototype.initDOM = function() {
|
|
580
580
|
var e, n;
|
|
581
|
-
this.wrapperEl = this.el.querySelector(
|
|
581
|
+
this.wrapperEl = this.el.querySelector(z(this.classNames.wrapper)), this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(z(this.classNames.contentWrapper)), this.contentEl = this.options.contentNode || this.el.querySelector(z(this.classNames.contentEl)), this.offsetEl = this.el.querySelector(z(this.classNames.offset)), this.maskEl = this.el.querySelector(z(this.classNames.mask)), this.placeholderEl = this.findChild(this.wrapperEl, z(this.classNames.placeholder)), this.heightAutoObserverWrapperEl = this.el.querySelector(z(this.classNames.heightAutoObserverWrapperEl)), this.heightAutoObserverEl = this.el.querySelector(z(this.classNames.heightAutoObserverEl)), this.axis.x.track.el = this.findChild(this.el, "".concat(z(this.classNames.track)).concat(z(this.classNames.horizontal))), this.axis.y.track.el = this.findChild(this.el, "".concat(z(this.classNames.track)).concat(z(this.classNames.vertical))), this.axis.x.scrollbar.el = ((e = this.axis.x.track.el) === null || e === void 0 ? void 0 : e.querySelector(z(this.classNames.scrollbar))) || null, this.axis.y.scrollbar.el = ((n = this.axis.y.track.el) === null || n === void 0 ? void 0 : n.querySelector(z(this.classNames.scrollbar))) || null, this.options.autoHide || (rt(this.axis.x.scrollbar.el, this.classNames.visible), rt(this.axis.y.scrollbar.el, this.classNames.visible));
|
|
582
582
|
}, t.prototype.initListeners = function() {
|
|
583
|
-
var e = this, n, i =
|
|
583
|
+
var e = this, n, i = st(this.el);
|
|
584
584
|
if (this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("pointerdown", this.onPointerEvent, !0), this.el.addEventListener("mousemove", this.onMouseMove), this.el.addEventListener("mouseleave", this.onMouseLeave), (n = this.contentWrapperEl) === null || n === void 0 || n.addEventListener("scroll", this.onScroll), i.addEventListener("resize", this.onWindowResize), !!this.contentEl) {
|
|
585
585
|
if (window.ResizeObserver) {
|
|
586
586
|
var s = !1, o = i.ResizeObserver || ResizeObserver;
|
|
@@ -604,7 +604,7 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
604
604
|
}
|
|
605
605
|
}, t.prototype.recalculate = function() {
|
|
606
606
|
if (!(!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)) {
|
|
607
|
-
var e =
|
|
607
|
+
var e = st(this.el);
|
|
608
608
|
this.elStyles = e.getComputedStyle(this.el), this.isRtl = this.elStyles.direction === "rtl";
|
|
609
609
|
var n = this.contentEl.offsetWidth, i = this.heightAutoObserverEl.offsetHeight <= 1, s = this.heightAutoObserverEl.offsetWidth <= 1 || n > 0, o = this.contentWrapperEl.offsetWidth, r = this.elStyles.overflowX, a = this.elStyles.overflowY;
|
|
610
610
|
this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft), this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
|
|
@@ -636,29 +636,29 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
636
636
|
var n = this.axis[e].track.el, i = this.axis[e].scrollbar.el;
|
|
637
637
|
!n || !i || !this.contentWrapperEl || (this.axis[e].isOverflowing || this.axis[e].forceVisible ? (n.style.visibility = "visible", this.contentWrapperEl.style[this.axis[e].overflowAttr] = "scroll", this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(e))) : (n.style.visibility = "hidden", this.contentWrapperEl.style[this.axis[e].overflowAttr] = "hidden", this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(e))), this.axis[e].isOverflowing ? i.style.display = "block" : i.style.display = "none");
|
|
638
638
|
}, t.prototype.showScrollbar = function(e) {
|
|
639
|
-
e === void 0 && (e = "y"), this.axis[e].isOverflowing && !this.axis[e].scrollbar.isVisible && (
|
|
639
|
+
e === void 0 && (e = "y"), this.axis[e].isOverflowing && !this.axis[e].scrollbar.isVisible && (rt(this.axis[e].scrollbar.el, this.classNames.visible), this.axis[e].scrollbar.isVisible = !0);
|
|
640
640
|
}, t.prototype.hideScrollbar = function(e) {
|
|
641
|
-
e === void 0 && (e = "y"), this.axis[e].isOverflowing && this.axis[e].scrollbar.isVisible && (
|
|
641
|
+
e === void 0 && (e = "y"), this.axis[e].isOverflowing && this.axis[e].scrollbar.isVisible && (ot(this.axis[e].scrollbar.el, this.classNames.visible), this.axis[e].scrollbar.isVisible = !1);
|
|
642
642
|
}, t.prototype.hideNativeScrollbar = function() {
|
|
643
643
|
this.offsetEl && (this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px", this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px");
|
|
644
644
|
}, t.prototype.onMouseMoveForAxis = function(e) {
|
|
645
645
|
e === void 0 && (e = "y");
|
|
646
646
|
var n = this.axis[e];
|
|
647
|
-
!n.track.el || !n.scrollbar.el || (n.track.rect = n.track.el.getBoundingClientRect(), n.scrollbar.rect = n.scrollbar.el.getBoundingClientRect(), this.isWithinBounds(n.track.rect) ? (this.showScrollbar(e),
|
|
647
|
+
!n.track.el || !n.scrollbar.el || (n.track.rect = n.track.el.getBoundingClientRect(), n.scrollbar.rect = n.scrollbar.el.getBoundingClientRect(), this.isWithinBounds(n.track.rect) ? (this.showScrollbar(e), rt(n.track.el, this.classNames.hover), this.isWithinBounds(n.scrollbar.rect) ? rt(n.scrollbar.el, this.classNames.hover) : ot(n.scrollbar.el, this.classNames.hover)) : (ot(n.track.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(e)));
|
|
648
648
|
}, t.prototype.onMouseLeaveForAxis = function(e) {
|
|
649
|
-
e === void 0 && (e = "y"),
|
|
649
|
+
e === void 0 && (e = "y"), ot(this.axis[e].track.el, this.classNames.hover), ot(this.axis[e].scrollbar.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(e);
|
|
650
650
|
}, t.prototype.onDragStart = function(e, n) {
|
|
651
651
|
var i;
|
|
652
652
|
n === void 0 && (n = "y");
|
|
653
|
-
var s = Ee(this.el), o =
|
|
654
|
-
this.axis[n].dragOffset = a - (((i = r.rect) === null || i === void 0 ? void 0 : i[this.axis[n].offsetAttr]) || 0), this.draggedAxis = n,
|
|
653
|
+
var s = Ee(this.el), o = st(this.el), r = this.axis[n].scrollbar, a = n === "y" ? e.pageY : e.pageX;
|
|
654
|
+
this.axis[n].dragOffset = a - (((i = r.rect) === null || i === void 0 ? void 0 : i[this.axis[n].offsetAttr]) || 0), this.draggedAxis = n, rt(this.el, this.classNames.dragging), s.addEventListener("mousemove", this.drag, !0), s.addEventListener("mouseup", this.onEndDrag, !0), this.removePreventClickId === null ? (s.addEventListener("click", this.preventClick, !0), s.addEventListener("dblclick", this.preventClick, !0)) : (o.clearTimeout(this.removePreventClickId), this.removePreventClickId = null);
|
|
655
655
|
}, t.prototype.onTrackClick = function(e, n) {
|
|
656
656
|
var i = this, s, o, r, a;
|
|
657
657
|
n === void 0 && (n = "y");
|
|
658
658
|
var l = this.axis[n];
|
|
659
659
|
if (!(!this.options.clickOnTrack || !l.scrollbar.el || !this.contentWrapperEl)) {
|
|
660
660
|
e.preventDefault();
|
|
661
|
-
var c =
|
|
661
|
+
var c = st(this.el);
|
|
662
662
|
this.axis[n].scrollbar.rect = l.scrollbar.el.getBoundingClientRect();
|
|
663
663
|
var u = this.axis[n].scrollbar, h = (o = (s = u.rect) === null || s === void 0 ? void 0 : s[this.axis[n].offsetAttr]) !== null && o !== void 0 ? o : 0, d = parseInt((a = (r = this.elStyles) === null || r === void 0 ? void 0 : r[this.axis[n].sizeAttr]) !== null && a !== void 0 ? a : "0px", 10), f = this.contentWrapperEl[this.axis[n].scrollOffsetAttr], p = n === "y" ? this.mouseY - h : this.mouseX - h, m = p < 0 ? -1 : 1, v = m === -1 ? f - d : f + d, y = 40, b = function() {
|
|
664
664
|
i.contentWrapperEl && (m === -1 ? f > v && (f -= y, i.contentWrapperEl[i.axis[n].scrollOffsetAttr] = f, c.requestAnimationFrame(b)) : f < v && (f += y, i.contentWrapperEl[i.axis[n].scrollOffsetAttr] = f, c.requestAnimationFrame(b)));
|
|
@@ -670,7 +670,7 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
670
670
|
}, t.prototype.getScrollElement = function() {
|
|
671
671
|
return this.contentWrapperEl;
|
|
672
672
|
}, t.prototype.removeListeners = function() {
|
|
673
|
-
var e =
|
|
673
|
+
var e = st(this.el);
|
|
674
674
|
this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("pointerdown", this.onPointerEvent, !0), this.el.removeEventListener("mousemove", this.onMouseMove), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.contentWrapperEl && this.contentWrapperEl.removeEventListener("scroll", this.onScroll), e.removeEventListener("resize", this.onWindowResize), this.mutationObserver && this.mutationObserver.disconnect(), this.resizeObserver && this.resizeObserver.disconnect(), this.onMouseMove.cancel(), this.onWindowResize.cancel(), this.onStopScrolling.cancel(), this.onMouseEntered.cancel();
|
|
675
675
|
}, t.prototype.unMount = function() {
|
|
676
676
|
this.removeListeners();
|
|
@@ -712,15 +712,15 @@ var Co = /* @__PURE__ */ Object.freeze({
|
|
|
712
712
|
autoHide: !0
|
|
713
713
|
}, t.getOptions = Vo, t.helpers = Co, t;
|
|
714
714
|
}()
|
|
715
|
-
),
|
|
716
|
-
return
|
|
715
|
+
), U = function() {
|
|
716
|
+
return U = Object.assign || function(e) {
|
|
717
717
|
for (var n, i = 1, s = arguments.length; i < s; i++) {
|
|
718
718
|
n = arguments[i];
|
|
719
719
|
for (var o in n)
|
|
720
720
|
Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
721
721
|
}
|
|
722
722
|
return e;
|
|
723
|
-
},
|
|
723
|
+
}, U.apply(this, arguments);
|
|
724
724
|
};
|
|
725
725
|
function Eo(t, e) {
|
|
726
726
|
var n = {};
|
|
@@ -736,10 +736,10 @@ var ts = D.forwardRef(function(t, e) {
|
|
|
736
736
|
Object.keys(o).forEach(function(f) {
|
|
737
737
|
Object.prototype.hasOwnProperty.call(te.defaultOptions, f) ? c[f] = o[f] : u[f] = o[f];
|
|
738
738
|
});
|
|
739
|
-
var h =
|
|
739
|
+
var h = U(U({}, te.defaultOptions.classNames), c.classNames), d = U(U({}, s), { className: "".concat(h.contentWrapper).concat(s.className ? " ".concat(s.className) : ""), tabIndex: 0, role: "region", "aria-label": c.ariaLabel || te.defaultOptions.ariaLabel });
|
|
740
740
|
return D.useEffect(function() {
|
|
741
741
|
var f;
|
|
742
|
-
return a.current = d.ref ? d.ref.current : a.current, r.current && (f = new te(r.current,
|
|
742
|
+
return a.current = d.ref ? d.ref.current : a.current, r.current && (f = new te(r.current, U(U(U({}, c), a.current && {
|
|
743
743
|
scrollableNode: a.current
|
|
744
744
|
}), l.current && {
|
|
745
745
|
contentNode: l.current
|
|
@@ -748,7 +748,7 @@ var ts = D.forwardRef(function(t, e) {
|
|
|
748
748
|
};
|
|
749
749
|
}, []), D.createElement(
|
|
750
750
|
"div",
|
|
751
|
-
|
|
751
|
+
U({ "data-simplebar": "init", ref: r }, u),
|
|
752
752
|
D.createElement(
|
|
753
753
|
"div",
|
|
754
754
|
{ className: h.wrapper },
|
|
@@ -762,7 +762,7 @@ var ts = D.forwardRef(function(t, e) {
|
|
|
762
762
|
{ className: h.mask },
|
|
763
763
|
D.createElement("div", { className: h.offset }, typeof n == "function" ? n({
|
|
764
764
|
scrollableNodeRef: a,
|
|
765
|
-
scrollableNodeProps:
|
|
765
|
+
scrollableNodeProps: U(U({}, d), { ref: a }),
|
|
766
766
|
contentNodeRef: l,
|
|
767
767
|
contentNodeProps: {
|
|
768
768
|
className: h.contentEl,
|
|
@@ -770,7 +770,7 @@ var ts = D.forwardRef(function(t, e) {
|
|
|
770
770
|
}
|
|
771
771
|
}) : D.createElement(
|
|
772
772
|
"div",
|
|
773
|
-
|
|
773
|
+
U({}, d),
|
|
774
774
|
D.createElement("div", { className: h.contentEl }, n)
|
|
775
775
|
))
|
|
776
776
|
),
|
|
@@ -795,7 +795,7 @@ const es = Dt({
|
|
|
795
795
|
reducedMotion: "never"
|
|
796
796
|
}), xe = Dt({}), en = Dt(null), we = typeof document < "u", Mo = we ? Wi : Xt, ns = Dt({ strict: !1 }), nn = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), Oo = "framerAppearId", is = "data-" + nn(Oo);
|
|
797
797
|
function Do(t, e, n, i) {
|
|
798
|
-
const { visualElement: s } =
|
|
798
|
+
const { visualElement: s } = W(xe), o = W(ns), r = W(en), a = W(es).reducedMotion, l = Et();
|
|
799
799
|
i = i || o.renderer, !l.current && i && (l.current = i(t, {
|
|
800
800
|
visualState: e,
|
|
801
801
|
parent: s,
|
|
@@ -863,7 +863,7 @@ function Ro(t, e) {
|
|
|
863
863
|
return t.inherit !== !1 ? e : {};
|
|
864
864
|
}
|
|
865
865
|
function Bo(t) {
|
|
866
|
-
const { initial: e, animate: n } = Ro(t,
|
|
866
|
+
const { initial: e, animate: n } = Ro(t, W(xe));
|
|
867
867
|
return be(() => ({ initial: e, animate: n }), [Ln(e), Ln(n)]);
|
|
868
868
|
}
|
|
869
869
|
function Ln(t) {
|
|
@@ -906,13 +906,13 @@ function Io({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
906
906
|
function o(a, l) {
|
|
907
907
|
let c;
|
|
908
908
|
const u = {
|
|
909
|
-
...
|
|
909
|
+
...W(es),
|
|
910
910
|
...a,
|
|
911
911
|
layoutId: Fo(a)
|
|
912
912
|
}, { isStatic: h } = u, d = Bo(a), f = i(a, h);
|
|
913
913
|
if (!h && we) {
|
|
914
914
|
d.visualElement = Do(s, f, u, e);
|
|
915
|
-
const p =
|
|
915
|
+
const p = W(os), m = W(ns).strict;
|
|
916
916
|
d.visualElement && (c = d.visualElement.loadFeatures(
|
|
917
917
|
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
918
918
|
u,
|
|
@@ -932,7 +932,7 @@ function Io({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
932
932
|
return r[jo] = s, r;
|
|
933
933
|
}
|
|
934
934
|
function Fo({ layoutId: t }) {
|
|
935
|
-
const e =
|
|
935
|
+
const e = W(rs).id;
|
|
936
936
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
937
937
|
}
|
|
938
938
|
function zo(t) {
|
|
@@ -1020,11 +1020,11 @@ const qt = [
|
|
|
1020
1020
|
"skew",
|
|
1021
1021
|
"skewX",
|
|
1022
1022
|
"skewY"
|
|
1023
|
-
],
|
|
1023
|
+
], bt = new Set(qt);
|
|
1024
1024
|
function as(t, { layout: e, layoutId: n }) {
|
|
1025
|
-
return
|
|
1025
|
+
return bt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!he[t] || t === "opacity");
|
|
1026
1026
|
}
|
|
1027
|
-
const
|
|
1027
|
+
const _ = (t) => !!(t && t.getVelocity), Uo = {
|
|
1028
1028
|
x: "translateX",
|
|
1029
1029
|
y: "translateY",
|
|
1030
1030
|
z: "translateZ",
|
|
@@ -1041,15 +1041,15 @@ function Go(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0
|
|
|
1041
1041
|
}
|
|
1042
1042
|
return e && !t.z && (o += "translateZ(0)"), o = o.trim(), s ? o = s(t, i ? "" : o) : n && i && (o = "none"), o;
|
|
1043
1043
|
}
|
|
1044
|
-
const ls = (t) => (e) => typeof e == "string" && e.startsWith(t), cs = ls("--"), _e = ls("var(--"), Yo = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g, Xo = (t, e) => e && typeof t == "number" ? e.transform(t) : t,
|
|
1044
|
+
const ls = (t) => (e) => typeof e == "string" && e.startsWith(t), cs = ls("--"), _e = ls("var(--"), Yo = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g, Xo = (t, e) => e && typeof t == "number" ? e.transform(t) : t, ht = (t, e, n) => Math.min(Math.max(n, t), e), xt = {
|
|
1045
1045
|
test: (t) => typeof t == "number",
|
|
1046
1046
|
parse: parseFloat,
|
|
1047
1047
|
transform: (t) => t
|
|
1048
1048
|
}, zt = {
|
|
1049
|
-
...
|
|
1050
|
-
transform: (t) =>
|
|
1049
|
+
...xt,
|
|
1050
|
+
transform: (t) => ht(0, 1, t)
|
|
1051
1051
|
}, ee = {
|
|
1052
|
-
...
|
|
1052
|
+
...xt,
|
|
1053
1053
|
default: 1
|
|
1054
1054
|
}, Wt = (t) => Math.round(t * 1e5) / 1e5, Ae = /(-)?([\d]*\.?[\d])+/g, us = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, qo = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
1055
1055
|
function Kt(t) {
|
|
@@ -1059,72 +1059,72 @@ const $t = (t) => ({
|
|
|
1059
1059
|
test: (e) => Kt(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1060
1060
|
parse: parseFloat,
|
|
1061
1061
|
transform: (e) => `${e}${t}`
|
|
1062
|
-
}),
|
|
1063
|
-
...
|
|
1064
|
-
parse: (t) =>
|
|
1065
|
-
transform: (t) =>
|
|
1062
|
+
}), at = $t("deg"), Q = $t("%"), P = $t("px"), Ko = $t("vh"), $o = $t("vw"), Bn = {
|
|
1063
|
+
...Q,
|
|
1064
|
+
parse: (t) => Q.parse(t) / 100,
|
|
1065
|
+
transform: (t) => Q.transform(t * 100)
|
|
1066
1066
|
}, Nn = {
|
|
1067
|
-
...
|
|
1067
|
+
...xt,
|
|
1068
1068
|
transform: Math.round
|
|
1069
1069
|
}, hs = {
|
|
1070
1070
|
// Border props
|
|
1071
|
-
borderWidth:
|
|
1072
|
-
borderTopWidth:
|
|
1073
|
-
borderRightWidth:
|
|
1074
|
-
borderBottomWidth:
|
|
1075
|
-
borderLeftWidth:
|
|
1076
|
-
borderRadius:
|
|
1077
|
-
radius:
|
|
1078
|
-
borderTopLeftRadius:
|
|
1079
|
-
borderTopRightRadius:
|
|
1080
|
-
borderBottomRightRadius:
|
|
1081
|
-
borderBottomLeftRadius:
|
|
1071
|
+
borderWidth: P,
|
|
1072
|
+
borderTopWidth: P,
|
|
1073
|
+
borderRightWidth: P,
|
|
1074
|
+
borderBottomWidth: P,
|
|
1075
|
+
borderLeftWidth: P,
|
|
1076
|
+
borderRadius: P,
|
|
1077
|
+
radius: P,
|
|
1078
|
+
borderTopLeftRadius: P,
|
|
1079
|
+
borderTopRightRadius: P,
|
|
1080
|
+
borderBottomRightRadius: P,
|
|
1081
|
+
borderBottomLeftRadius: P,
|
|
1082
1082
|
// Positioning props
|
|
1083
|
-
width:
|
|
1084
|
-
maxWidth:
|
|
1085
|
-
height:
|
|
1086
|
-
maxHeight:
|
|
1087
|
-
size:
|
|
1088
|
-
top:
|
|
1089
|
-
right:
|
|
1090
|
-
bottom:
|
|
1091
|
-
left:
|
|
1083
|
+
width: P,
|
|
1084
|
+
maxWidth: P,
|
|
1085
|
+
height: P,
|
|
1086
|
+
maxHeight: P,
|
|
1087
|
+
size: P,
|
|
1088
|
+
top: P,
|
|
1089
|
+
right: P,
|
|
1090
|
+
bottom: P,
|
|
1091
|
+
left: P,
|
|
1092
1092
|
// Spacing props
|
|
1093
|
-
padding:
|
|
1094
|
-
paddingTop:
|
|
1095
|
-
paddingRight:
|
|
1096
|
-
paddingBottom:
|
|
1097
|
-
paddingLeft:
|
|
1098
|
-
margin:
|
|
1099
|
-
marginTop:
|
|
1100
|
-
marginRight:
|
|
1101
|
-
marginBottom:
|
|
1102
|
-
marginLeft:
|
|
1093
|
+
padding: P,
|
|
1094
|
+
paddingTop: P,
|
|
1095
|
+
paddingRight: P,
|
|
1096
|
+
paddingBottom: P,
|
|
1097
|
+
paddingLeft: P,
|
|
1098
|
+
margin: P,
|
|
1099
|
+
marginTop: P,
|
|
1100
|
+
marginRight: P,
|
|
1101
|
+
marginBottom: P,
|
|
1102
|
+
marginLeft: P,
|
|
1103
1103
|
// Transform props
|
|
1104
|
-
rotate:
|
|
1105
|
-
rotateX:
|
|
1106
|
-
rotateY:
|
|
1107
|
-
rotateZ:
|
|
1104
|
+
rotate: at,
|
|
1105
|
+
rotateX: at,
|
|
1106
|
+
rotateY: at,
|
|
1107
|
+
rotateZ: at,
|
|
1108
1108
|
scale: ee,
|
|
1109
1109
|
scaleX: ee,
|
|
1110
1110
|
scaleY: ee,
|
|
1111
1111
|
scaleZ: ee,
|
|
1112
|
-
skew:
|
|
1113
|
-
skewX:
|
|
1114
|
-
skewY:
|
|
1115
|
-
distance:
|
|
1116
|
-
translateX:
|
|
1117
|
-
translateY:
|
|
1118
|
-
translateZ:
|
|
1119
|
-
x:
|
|
1120
|
-
y:
|
|
1121
|
-
z:
|
|
1122
|
-
perspective:
|
|
1123
|
-
transformPerspective:
|
|
1112
|
+
skew: at,
|
|
1113
|
+
skewX: at,
|
|
1114
|
+
skewY: at,
|
|
1115
|
+
distance: P,
|
|
1116
|
+
translateX: P,
|
|
1117
|
+
translateY: P,
|
|
1118
|
+
translateZ: P,
|
|
1119
|
+
x: P,
|
|
1120
|
+
y: P,
|
|
1121
|
+
z: P,
|
|
1122
|
+
perspective: P,
|
|
1123
|
+
transformPerspective: P,
|
|
1124
1124
|
opacity: zt,
|
|
1125
1125
|
originX: Bn,
|
|
1126
1126
|
originY: Bn,
|
|
1127
|
-
originZ:
|
|
1127
|
+
originZ: P,
|
|
1128
1128
|
// Misc
|
|
1129
1129
|
zIndex: Nn,
|
|
1130
1130
|
// SVG
|
|
@@ -1142,7 +1142,7 @@ function an(t, e, n, i) {
|
|
|
1142
1142
|
continue;
|
|
1143
1143
|
}
|
|
1144
1144
|
const f = hs[h], p = Xo(d, f);
|
|
1145
|
-
if (
|
|
1145
|
+
if (bt.has(h)) {
|
|
1146
1146
|
if (l = !0, r[h] = p, !u)
|
|
1147
1147
|
continue;
|
|
1148
1148
|
d !== (f.default || 0) && (u = !1);
|
|
@@ -1162,7 +1162,7 @@ const ln = () => ({
|
|
|
1162
1162
|
});
|
|
1163
1163
|
function ds(t, e, n) {
|
|
1164
1164
|
for (const i in e)
|
|
1165
|
-
!
|
|
1165
|
+
!_(e[i]) && !as(i, n) && (t[i] = e[i]);
|
|
1166
1166
|
}
|
|
1167
1167
|
function Qo({ transformTemplate: t }, e, n) {
|
|
1168
1168
|
return be(() => {
|
|
@@ -1230,7 +1230,7 @@ function na(t, e, n) {
|
|
|
1230
1230
|
return i;
|
|
1231
1231
|
}
|
|
1232
1232
|
function jn(t, e, n) {
|
|
1233
|
-
return typeof t == "string" ? t :
|
|
1233
|
+
return typeof t == "string" ? t : P.transform(e + n * t);
|
|
1234
1234
|
}
|
|
1235
1235
|
function ia(t, e, n) {
|
|
1236
1236
|
const i = jn(e, t.x, t.width), s = jn(n, t.y, t.height);
|
|
@@ -1246,8 +1246,8 @@ const sa = {
|
|
|
1246
1246
|
function oa(t, e, n = 1, i = 0, s = !0) {
|
|
1247
1247
|
t.pathLength = 1;
|
|
1248
1248
|
const o = s ? sa : ra;
|
|
1249
|
-
t[o.offset] =
|
|
1250
|
-
const r =
|
|
1249
|
+
t[o.offset] = P.transform(-i);
|
|
1250
|
+
const r = P.transform(e), a = P.transform(n);
|
|
1251
1251
|
t[o.array] = `${r} ${a}`;
|
|
1252
1252
|
}
|
|
1253
1253
|
function cn(t, {
|
|
@@ -1294,7 +1294,7 @@ function la(t = !1) {
|
|
|
1294
1294
|
...na(i, typeof n == "string", t),
|
|
1295
1295
|
...l,
|
|
1296
1296
|
ref: s
|
|
1297
|
-
}, { children: h } = i, d = be(() =>
|
|
1297
|
+
}, { children: h } = i, d = be(() => _(h) ? h.get() : h, [h]);
|
|
1298
1298
|
return _i(n, {
|
|
1299
1299
|
...u,
|
|
1300
1300
|
children: d
|
|
@@ -1339,13 +1339,13 @@ function vs(t, e, n, i) {
|
|
|
1339
1339
|
function hn(t, e) {
|
|
1340
1340
|
const { style: n } = t, i = {};
|
|
1341
1341
|
for (const s in n)
|
|
1342
|
-
(
|
|
1342
|
+
(_(n[s]) || e.style && _(e.style[s]) || as(s, t)) && (i[s] = n[s]);
|
|
1343
1343
|
return i;
|
|
1344
1344
|
}
|
|
1345
1345
|
function ys(t, e) {
|
|
1346
1346
|
const n = hn(t, e);
|
|
1347
1347
|
for (const i in t)
|
|
1348
|
-
if (
|
|
1348
|
+
if (_(t[i]) || _(e[i])) {
|
|
1349
1349
|
const s = qt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
1350
1350
|
n[s] = t[i];
|
|
1351
1351
|
}
|
|
@@ -1360,7 +1360,7 @@ function ca(t) {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
const fe = (t) => Array.isArray(t), ua = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), ha = (t) => fe(t) ? t[t.length - 1] || 0 : t;
|
|
1362
1362
|
function ae(t) {
|
|
1363
|
-
const e =
|
|
1363
|
+
const e = _(t) ? t.get() : t;
|
|
1364
1364
|
return ua(e) ? e.toValue() : e;
|
|
1365
1365
|
}
|
|
1366
1366
|
function da({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, i, s, o) {
|
|
@@ -1371,7 +1371,7 @@ function da({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }
|
|
|
1371
1371
|
return n && (r.mount = (a) => n(i, a, r)), r;
|
|
1372
1372
|
}
|
|
1373
1373
|
const bs = (t) => (e, n) => {
|
|
1374
|
-
const i =
|
|
1374
|
+
const i = W(xe), s = W(en), o = () => da(t, e, i, s);
|
|
1375
1375
|
return n ? o() : ca(o);
|
|
1376
1376
|
};
|
|
1377
1377
|
function fa(t, e, n, i) {
|
|
@@ -1529,7 +1529,7 @@ const xa = (t) => (e) => xs(e) && t(e, Pe(e));
|
|
|
1529
1529
|
function J(t, e, n, i) {
|
|
1530
1530
|
return Z(t, e, xa(n), i);
|
|
1531
1531
|
}
|
|
1532
|
-
const wa = (t, e) => (n) => e(t(n)),
|
|
1532
|
+
const wa = (t, e) => (n) => e(t(n)), ct = (...t) => t.reduce(wa);
|
|
1533
1533
|
function ws(t) {
|
|
1534
1534
|
let e = null;
|
|
1535
1535
|
return () => {
|
|
@@ -1558,7 +1558,7 @@ function Ts() {
|
|
|
1558
1558
|
const t = Ss(!0);
|
|
1559
1559
|
return t ? (t(), !1) : !0;
|
|
1560
1560
|
}
|
|
1561
|
-
class
|
|
1561
|
+
class ft {
|
|
1562
1562
|
constructor(e) {
|
|
1563
1563
|
this.isMounted = !1, this.node = e;
|
|
1564
1564
|
}
|
|
@@ -1576,14 +1576,14 @@ function Wn(t, e) {
|
|
|
1576
1576
|
passive: !t.getProps()[i]
|
|
1577
1577
|
});
|
|
1578
1578
|
}
|
|
1579
|
-
class Sa extends
|
|
1579
|
+
class Sa extends ft {
|
|
1580
1580
|
mount() {
|
|
1581
|
-
this.unmount =
|
|
1581
|
+
this.unmount = ct(Wn(this.node, !0), Wn(this.node, !1));
|
|
1582
1582
|
}
|
|
1583
1583
|
unmount() {
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
class Ta extends
|
|
1586
|
+
class Ta extends ft {
|
|
1587
1587
|
constructor() {
|
|
1588
1588
|
super(...arguments), this.isActive = !1;
|
|
1589
1589
|
}
|
|
@@ -1600,7 +1600,7 @@ class Ta extends dt {
|
|
|
1600
1600
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
1601
1601
|
}
|
|
1602
1602
|
mount() {
|
|
1603
|
-
this.unmount =
|
|
1603
|
+
this.unmount = ct(Z(this.node.current, "focus", () => this.onFocus()), Z(this.node.current, "blur", () => this.onBlur()));
|
|
1604
1604
|
}
|
|
1605
1605
|
unmount() {
|
|
1606
1606
|
}
|
|
@@ -1612,7 +1612,7 @@ function Oe(t, e) {
|
|
|
1612
1612
|
const n = new PointerEvent("pointer" + t);
|
|
1613
1613
|
e(n, Pe(n));
|
|
1614
1614
|
}
|
|
1615
|
-
class Aa extends
|
|
1615
|
+
class Aa extends ft {
|
|
1616
1616
|
constructor() {
|
|
1617
1617
|
super(...arguments), this.removeStartListeners = O, this.removeEndListeners = O, this.removeAccessibleListeners = O, this.startPointerPress = (e, n) => {
|
|
1618
1618
|
if (this.isPressing)
|
|
@@ -1626,7 +1626,7 @@ class Aa extends dt {
|
|
|
1626
1626
|
!h && !As(this.node.current, a.target) ? u && u(a, l) : c && c(a, l);
|
|
1627
1627
|
});
|
|
1628
1628
|
}, { passive: !(i.onTap || i.onPointerUp) }), r = J(window, "pointercancel", (a, l) => this.cancelPress(a, l), { passive: !(i.onTapCancel || i.onPointerCancel) });
|
|
1629
|
-
this.removeEndListeners =
|
|
1629
|
+
this.removeEndListeners = ct(o, r), this.startPress(e, n);
|
|
1630
1630
|
}, this.startAccessiblePress = () => {
|
|
1631
1631
|
const e = (o) => {
|
|
1632
1632
|
if (o.key !== "Enter" || this.isPressing)
|
|
@@ -1643,7 +1643,7 @@ class Aa extends dt {
|
|
|
1643
1643
|
}, n = Z(this.node.current, "keydown", e), i = () => {
|
|
1644
1644
|
this.isPressing && Oe("cancel", (o, r) => this.cancelPress(o, r));
|
|
1645
1645
|
}, s = Z(this.node.current, "blur", i);
|
|
1646
|
-
this.removeAccessibleListeners =
|
|
1646
|
+
this.removeAccessibleListeners = ct(n, s);
|
|
1647
1647
|
};
|
|
1648
1648
|
}
|
|
1649
1649
|
startPress(e, n) {
|
|
@@ -1662,7 +1662,7 @@ class Aa extends dt {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
mount() {
|
|
1664
1664
|
const e = this.node.getProps(), n = J(e.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, { passive: !(e.onTapStart || e.onPointerStart) }), i = Z(this.node.current, "focus", this.startAccessiblePress);
|
|
1665
|
-
this.removeStartListeners =
|
|
1665
|
+
this.removeStartListeners = ct(n, i);
|
|
1666
1666
|
}
|
|
1667
1667
|
unmount() {
|
|
1668
1668
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
@@ -1690,7 +1690,7 @@ const Ea = {
|
|
|
1690
1690
|
some: 0,
|
|
1691
1691
|
all: 1
|
|
1692
1692
|
};
|
|
1693
|
-
class Ma extends
|
|
1693
|
+
class Ma extends ft {
|
|
1694
1694
|
constructor() {
|
|
1695
1695
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1696
1696
|
}
|
|
@@ -1762,14 +1762,14 @@ function ke(t, e, n) {
|
|
|
1762
1762
|
const i = t.getProps();
|
|
1763
1763
|
return dn(i, e, n !== void 0 ? n : i.custom, La(t), Ra(t));
|
|
1764
1764
|
}
|
|
1765
|
-
let Qt = O,
|
|
1765
|
+
let Qt = O, $ = O;
|
|
1766
1766
|
process.env.NODE_ENV !== "production" && (Qt = (t, e) => {
|
|
1767
1767
|
!t && typeof console < "u" && console.warn(e);
|
|
1768
|
-
},
|
|
1768
|
+
}, $ = (t, e) => {
|
|
1769
1769
|
if (!t)
|
|
1770
1770
|
throw new Error(e);
|
|
1771
1771
|
});
|
|
1772
|
-
const
|
|
1772
|
+
const ut = (t) => t * 1e3, tt = (t) => t / 1e3, Ba = {
|
|
1773
1773
|
current: !1
|
|
1774
1774
|
}, ks = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
1775
1775
|
function Cs(t) {
|
|
@@ -1835,11 +1835,11 @@ const Wa = Zt(0.42, 0, 1, 1), _a = Zt(0, 0, 0.58, 1), Os = Zt(0.42, 0, 0.58, 1),
|
|
|
1835
1835
|
anticipate: Ya
|
|
1836
1836
|
}, Un = (t) => {
|
|
1837
1837
|
if (Array.isArray(t)) {
|
|
1838
|
-
|
|
1838
|
+
$(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1839
1839
|
const [e, n, i, s] = t;
|
|
1840
1840
|
return Zt(e, n, i, s);
|
|
1841
1841
|
} else if (typeof t == "string")
|
|
1842
|
-
return
|
|
1842
|
+
return $(_n[t] !== void 0, `Invalid easing type '${t}'`), _n[t];
|
|
1843
1843
|
return t;
|
|
1844
1844
|
}, mn = (t, e) => (n) => !!(Kt(n) && qo.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), Ns = (t, e, n) => (i) => {
|
|
1845
1845
|
if (!Kt(i))
|
|
@@ -1851,10 +1851,10 @@ const Wa = Zt(0.42, 0, 1, 1), _a = Zt(0, 0, 0.58, 1), Os = Zt(0.42, 0, 0.58, 1),
|
|
|
1851
1851
|
[n]: parseFloat(r),
|
|
1852
1852
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1853
1853
|
};
|
|
1854
|
-
}, Xa = (t) =>
|
|
1855
|
-
...
|
|
1854
|
+
}, Xa = (t) => ht(0, 255, t), Le = {
|
|
1855
|
+
...xt,
|
|
1856
1856
|
transform: (t) => Math.round(Xa(t))
|
|
1857
|
-
},
|
|
1857
|
+
}, yt = {
|
|
1858
1858
|
test: mn("rgb", "red"),
|
|
1859
1859
|
parse: Ns("red", "green", "blue"),
|
|
1860
1860
|
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + Le.transform(t) + ", " + Le.transform(e) + ", " + Le.transform(n) + ", " + Wt(zt.transform(i)) + ")"
|
|
@@ -1871,15 +1871,15 @@ function qa(t) {
|
|
|
1871
1871
|
const He = {
|
|
1872
1872
|
test: mn("#"),
|
|
1873
1873
|
parse: qa,
|
|
1874
|
-
transform:
|
|
1874
|
+
transform: yt.transform
|
|
1875
1875
|
}, kt = {
|
|
1876
1876
|
test: mn("hsl", "hue"),
|
|
1877
1877
|
parse: Ns("hue", "saturation", "lightness"),
|
|
1878
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " +
|
|
1878
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + Q.transform(Wt(e)) + ", " + Q.transform(Wt(n)) + ", " + Wt(zt.transform(i)) + ")"
|
|
1879
1879
|
}, I = {
|
|
1880
|
-
test: (t) =>
|
|
1881
|
-
parse: (t) =>
|
|
1882
|
-
transform: (t) => Kt(t) ? t : t.hasOwnProperty("red") ?
|
|
1880
|
+
test: (t) => yt.test(t) || He.test(t) || kt.test(t),
|
|
1881
|
+
parse: (t) => yt.test(t) ? yt.parse(t) : kt.test(t) ? kt.parse(t) : He.parse(t),
|
|
1882
|
+
transform: (t) => Kt(t) ? t : t.hasOwnProperty("red") ? yt.transform(t) : kt.transform(t)
|
|
1883
1883
|
}, M = (t, e, n) => -n * t + n * e + t;
|
|
1884
1884
|
function Re(t, e, n) {
|
|
1885
1885
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
@@ -1903,16 +1903,16 @@ function Ka({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
|
1903
1903
|
const Be = (t, e, n) => {
|
|
1904
1904
|
const i = t * t;
|
|
1905
1905
|
return Math.sqrt(Math.max(0, n * (e * e - i) + i));
|
|
1906
|
-
}, $a = [He,
|
|
1906
|
+
}, $a = [He, yt, kt], Qa = (t) => $a.find((e) => e.test(t));
|
|
1907
1907
|
function Hn(t) {
|
|
1908
1908
|
const e = Qa(t);
|
|
1909
|
-
|
|
1909
|
+
$(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1910
1910
|
let n = e.parse(t);
|
|
1911
1911
|
return e === kt && (n = Ka(n)), n;
|
|
1912
1912
|
}
|
|
1913
1913
|
const js = (t, e) => {
|
|
1914
1914
|
const n = Hn(t), i = Hn(e), s = { ...n };
|
|
1915
|
-
return (o) => (s.red = Be(n.red, i.red, o), s.green = Be(n.green, i.green, o), s.blue = Be(n.blue, i.blue, o), s.alpha = M(n.alpha, i.alpha, o),
|
|
1915
|
+
return (o) => (s.red = Be(n.red, i.red, o), s.green = Be(n.green, i.green, o), s.blue = Be(n.blue, i.blue, o), s.alpha = M(n.alpha, i.alpha, o), yt.transform(s));
|
|
1916
1916
|
};
|
|
1917
1917
|
function Za(t) {
|
|
1918
1918
|
var e, n;
|
|
@@ -1932,7 +1932,7 @@ const Is = {
|
|
|
1932
1932
|
regex: Ae,
|
|
1933
1933
|
countKey: "Numbers",
|
|
1934
1934
|
token: "${n}",
|
|
1935
|
-
parse:
|
|
1935
|
+
parse: xt.parse
|
|
1936
1936
|
};
|
|
1937
1937
|
function Ne(t, { regex: e, countKey: n, token: i, parse: s }) {
|
|
1938
1938
|
const o = t.tokenised.match(e);
|
|
@@ -1966,7 +1966,7 @@ function tl(t) {
|
|
|
1966
1966
|
const e = Ws(t);
|
|
1967
1967
|
return _s(t)(e.map(Ja));
|
|
1968
1968
|
}
|
|
1969
|
-
const
|
|
1969
|
+
const dt = {
|
|
1970
1970
|
test: Za,
|
|
1971
1971
|
parse: Ws,
|
|
1972
1972
|
createTransformer: _s,
|
|
@@ -1992,8 +1992,8 @@ const Gs = (t, e) => {
|
|
|
1992
1992
|
return n;
|
|
1993
1993
|
};
|
|
1994
1994
|
}, Ys = (t, e) => {
|
|
1995
|
-
const n =
|
|
1996
|
-
return i.numVars === s.numVars && i.numColors === s.numColors && i.numNumbers >= s.numNumbers ?
|
|
1995
|
+
const n = dt.createTransformer(e), i = pe(t), s = pe(e);
|
|
1996
|
+
return i.numVars === s.numVars && i.numColors === s.numColors && i.numNumbers >= s.numNumbers ? ct(Gs(i.values, s.values), n) : (Qt(!0, `Complex values '${t}' and '${e}' 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.`), Us(t, e));
|
|
1997
1997
|
}, Yt = (t, e, n) => {
|
|
1998
1998
|
const i = e - t;
|
|
1999
1999
|
return i === 0 ? 1 : (n - t) / i;
|
|
@@ -2007,7 +2007,7 @@ function il(t, e, n) {
|
|
|
2007
2007
|
let a = s(t[r], t[r + 1]);
|
|
2008
2008
|
if (e) {
|
|
2009
2009
|
const l = Array.isArray(e) ? e[r] || O : e;
|
|
2010
|
-
a =
|
|
2010
|
+
a = ct(l, a);
|
|
2011
2011
|
}
|
|
2012
2012
|
i.push(a);
|
|
2013
2013
|
}
|
|
@@ -2015,7 +2015,7 @@ function il(t, e, n) {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
function Xs(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
2017
2017
|
const o = t.length;
|
|
2018
|
-
if (
|
|
2018
|
+
if ($(o === e.length, "Both input and output ranges must be the same length"), o === 1)
|
|
2019
2019
|
return () => e[0];
|
|
2020
2020
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2021
2021
|
const r = il(e, i, s), a = r.length, l = (c) => {
|
|
@@ -2026,7 +2026,7 @@ function Xs(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
2026
2026
|
const h = Yt(t[u], t[u + 1], c);
|
|
2027
2027
|
return r[u](h);
|
|
2028
2028
|
};
|
|
2029
|
-
return n ? (c) => l(
|
|
2029
|
+
return n ? (c) => l(ht(t[0], t[o - 1], c)) : l;
|
|
2030
2030
|
}
|
|
2031
2031
|
function sl(t, e) {
|
|
2032
2032
|
const n = t[t.length - 1];
|
|
@@ -2073,9 +2073,9 @@ function Ks(t, e, n) {
|
|
|
2073
2073
|
const je = 1e-3, cl = 0.01, Yn = 10, ul = 0.05, hl = 1;
|
|
2074
2074
|
function dl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2075
2075
|
let s, o;
|
|
2076
|
-
Qt(t <=
|
|
2076
|
+
Qt(t <= ut(Yn), "Spring duration must be 10 seconds or less");
|
|
2077
2077
|
let r = 1 - e;
|
|
2078
|
-
r =
|
|
2078
|
+
r = ht(ul, hl, r), t = ht(cl, Yn, tt(t)), r < 1 ? (s = (c) => {
|
|
2079
2079
|
const u = c * r, h = u * t, d = u - n, f = Ge(c, r), p = Math.exp(-h);
|
|
2080
2080
|
return je - d / f * p;
|
|
2081
2081
|
}, o = (c) => {
|
|
@@ -2089,7 +2089,7 @@ function dl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2089
2089
|
return u * h;
|
|
2090
2090
|
});
|
|
2091
2091
|
const a = 5 / t, l = pl(s, o, a);
|
|
2092
|
-
if (t =
|
|
2092
|
+
if (t = ut(t), isNaN(l))
|
|
2093
2093
|
return {
|
|
2094
2094
|
stiffness: 100,
|
|
2095
2095
|
damping: 10,
|
|
@@ -2179,19 +2179,19 @@ function qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2179
2179
|
const h = t[0], d = {
|
|
2180
2180
|
done: !1,
|
|
2181
2181
|
value: h
|
|
2182
|
-
}, f = (
|
|
2182
|
+
}, f = (A) => a !== void 0 && A < a || l !== void 0 && A > l, p = (A) => a === void 0 ? l : l === void 0 || Math.abs(a - A) < Math.abs(l - A) ? a : l;
|
|
2183
2183
|
let m = n * e;
|
|
2184
2184
|
const v = h + m, y = r === void 0 ? v : r(v);
|
|
2185
2185
|
y !== v && (m = y - h);
|
|
2186
|
-
const b = (
|
|
2187
|
-
const C = b(
|
|
2188
|
-
d.done = Math.abs(C) <= c, d.value = d.done ? y :
|
|
2186
|
+
const b = (A) => -m * Math.exp(-A / i), g = (A) => y + b(A), x = (A) => {
|
|
2187
|
+
const C = b(A), q = g(A);
|
|
2188
|
+
d.done = Math.abs(C) <= c, d.value = d.done ? y : q;
|
|
2189
2189
|
};
|
|
2190
2190
|
let S, T;
|
|
2191
|
-
const k = (
|
|
2192
|
-
f(d.value) && (S =
|
|
2191
|
+
const k = (A) => {
|
|
2192
|
+
f(d.value) && (S = A, T = $s({
|
|
2193
2193
|
keyframes: [d.value, p(d.value)],
|
|
2194
|
-
velocity: Ks(g,
|
|
2194
|
+
velocity: Ks(g, A, d.value),
|
|
2195
2195
|
damping: s,
|
|
2196
2196
|
stiffness: o,
|
|
2197
2197
|
restDelta: c,
|
|
@@ -2200,9 +2200,9 @@ function qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2200
2200
|
};
|
|
2201
2201
|
return k(0), {
|
|
2202
2202
|
calculatedDuration: null,
|
|
2203
|
-
next: (
|
|
2203
|
+
next: (A) => {
|
|
2204
2204
|
let C = !1;
|
|
2205
|
-
return !T && S === void 0 && (C = !0, x(
|
|
2205
|
+
return !T && S === void 0 && (C = !0, x(A), k(A)), S !== void 0 && A > S ? T.next(A - S) : (!C && x(A), d);
|
|
2206
2206
|
}
|
|
2207
2207
|
};
|
|
2208
2208
|
}
|
|
@@ -2244,7 +2244,7 @@ function ge({ autoplay: t = !0, delay: e = 0, driver: n = yl, keyframes: i, type
|
|
|
2244
2244
|
let b;
|
|
2245
2245
|
const g = bl[s] || me;
|
|
2246
2246
|
let x;
|
|
2247
|
-
g !== me && typeof i[0] != "number" && (process.env.NODE_ENV !== "production" &&
|
|
2247
|
+
g !== me && typeof i[0] != "number" && (process.env.NODE_ENV !== "production" && $(i.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`), x = Xs([0, 100], i, {
|
|
2248
2248
|
clamp: !1
|
|
2249
2249
|
}), i = [0, 100]);
|
|
2250
2250
|
const S = g({ ...d, keyframes: i });
|
|
@@ -2254,34 +2254,34 @@ function ge({ autoplay: t = !0, delay: e = 0, driver: n = yl, keyframes: i, type
|
|
|
2254
2254
|
keyframes: [...i].reverse(),
|
|
2255
2255
|
velocity: -(d.velocity || 0)
|
|
2256
2256
|
}));
|
|
2257
|
-
let k = "idle",
|
|
2257
|
+
let k = "idle", A = null, C = null, q = null;
|
|
2258
2258
|
S.calculatedDuration === null && o && (S.calculatedDuration = $n(S));
|
|
2259
|
-
const { calculatedDuration:
|
|
2260
|
-
let
|
|
2261
|
-
|
|
2259
|
+
const { calculatedDuration: nt } = S;
|
|
2260
|
+
let F = 1 / 0, G = 1 / 0;
|
|
2261
|
+
nt !== null && (F = nt + r, G = F * (o + 1) - r);
|
|
2262
2262
|
let j = 0;
|
|
2263
2263
|
const wt = (E) => {
|
|
2264
2264
|
if (C === null)
|
|
2265
2265
|
return;
|
|
2266
|
-
f > 0 && (C = Math.min(C, E)), f < 0 && (C = Math.min(E -
|
|
2267
|
-
const Rt = j - e * (f >= 0 ? 1 : -1), An = f >= 0 ? Rt < 0 : Rt >
|
|
2268
|
-
j = Math.max(Rt, 0), k === "finished" &&
|
|
2266
|
+
f > 0 && (C = Math.min(C, E)), f < 0 && (C = Math.min(E - G / f, C)), A !== null ? j = A : j = Math.round(E - C) * f;
|
|
2267
|
+
const Rt = j - e * (f >= 0 ? 1 : -1), An = f >= 0 ? Rt < 0 : Rt > G;
|
|
2268
|
+
j = Math.max(Rt, 0), k === "finished" && A === null && (j = G);
|
|
2269
2269
|
let Pn = j, kn = S;
|
|
2270
2270
|
if (o) {
|
|
2271
|
-
const Ce = Math.min(j,
|
|
2272
|
-
let Jt = Math.floor(Ce),
|
|
2273
|
-
!
|
|
2271
|
+
const Ce = Math.min(j, G) / F;
|
|
2272
|
+
let Jt = Math.floor(Ce), pt = Ce % 1;
|
|
2273
|
+
!pt && Ce >= 1 && (pt = 1), pt === 1 && Jt--, Jt = Math.min(Jt, o + 1), !!(Jt % 2) && (a === "reverse" ? (pt = 1 - pt, r && (pt -= r / F)) : a === "mirror" && (kn = T)), Pn = ht(0, 1, pt) * F;
|
|
2274
2274
|
}
|
|
2275
2275
|
const Bt = An ? { done: !1, value: i[0] } : kn.next(Pn);
|
|
2276
2276
|
x && (Bt.value = x(Bt.value));
|
|
2277
2277
|
let { done: Cn } = Bt;
|
|
2278
|
-
!An &&
|
|
2279
|
-
const Pr =
|
|
2278
|
+
!An && nt !== null && (Cn = f >= 0 ? j >= G : j <= 0);
|
|
2279
|
+
const Pr = A === null && (k === "finished" || k === "running" && Cn);
|
|
2280
2280
|
return h && h(Bt.value), Pr && Lt(), Bt;
|
|
2281
2281
|
}, R = () => {
|
|
2282
2282
|
b && b.stop(), b = void 0;
|
|
2283
|
-
},
|
|
2284
|
-
k = "idle", R(), m(), y(), C =
|
|
2283
|
+
}, it = () => {
|
|
2284
|
+
k = "idle", R(), m(), y(), C = q = null;
|
|
2285
2285
|
}, Lt = () => {
|
|
2286
2286
|
k = "finished", u && u(), R(), m();
|
|
2287
2287
|
}, St = () => {
|
|
@@ -2289,7 +2289,7 @@ function ge({ autoplay: t = !0, delay: e = 0, driver: n = yl, keyframes: i, type
|
|
|
2289
2289
|
return;
|
|
2290
2290
|
b || (b = n(wt));
|
|
2291
2291
|
const E = b.now();
|
|
2292
|
-
l && l(),
|
|
2292
|
+
l && l(), A !== null ? C = E - A : (!C || k === "finished") && (C = E), k === "finished" && y(), q = C, A = null, k = "running", b.start();
|
|
2293
2293
|
};
|
|
2294
2294
|
t && St();
|
|
2295
2295
|
const Tn = {
|
|
@@ -2300,7 +2300,7 @@ function ge({ autoplay: t = !0, delay: e = 0, driver: n = yl, keyframes: i, type
|
|
|
2300
2300
|
return tt(j);
|
|
2301
2301
|
},
|
|
2302
2302
|
set time(E) {
|
|
2303
|
-
E =
|
|
2303
|
+
E = ut(E), j = E, A !== null || !b || f === 0 ? A = E : C = b.now() - E / f;
|
|
2304
2304
|
},
|
|
2305
2305
|
get duration() {
|
|
2306
2306
|
const E = S.calculatedDuration === null ? $n(S) : S.calculatedDuration;
|
|
@@ -2317,13 +2317,13 @@ function ge({ autoplay: t = !0, delay: e = 0, driver: n = yl, keyframes: i, type
|
|
|
2317
2317
|
},
|
|
2318
2318
|
play: St,
|
|
2319
2319
|
pause: () => {
|
|
2320
|
-
k = "paused",
|
|
2320
|
+
k = "paused", A = j;
|
|
2321
2321
|
},
|
|
2322
2322
|
stop: () => {
|
|
2323
|
-
p = !0, k !== "idle" && (k = "idle", c && c(),
|
|
2323
|
+
p = !0, k !== "idle" && (k = "idle", c && c(), it());
|
|
2324
2324
|
},
|
|
2325
2325
|
cancel: () => {
|
|
2326
|
-
|
|
2326
|
+
q !== null && wt(q), it();
|
|
2327
2327
|
},
|
|
2328
2328
|
complete: () => {
|
|
2329
2329
|
k = "finished";
|
|
@@ -2398,7 +2398,7 @@ function Pl(t, e, { onUpdate: n, onComplete: i, ...s }) {
|
|
|
2398
2398
|
return tt(m.currentTime || 0);
|
|
2399
2399
|
},
|
|
2400
2400
|
set time(g) {
|
|
2401
|
-
m.currentTime =
|
|
2401
|
+
m.currentTime = ut(g);
|
|
2402
2402
|
},
|
|
2403
2403
|
get speed() {
|
|
2404
2404
|
return m.playbackRate;
|
|
@@ -2468,8 +2468,8 @@ const Cl = {
|
|
|
2468
2468
|
type: "keyframes",
|
|
2469
2469
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2470
2470
|
duration: 0.3
|
|
2471
|
-
}, Ol = (t, { keyframes: e }) => e.length > 2 ? El :
|
|
2472
|
-
(
|
|
2471
|
+
}, Ol = (t, { keyframes: e }) => e.length > 2 ? El : bt.has(t) ? t.startsWith("scale") ? Vl(e[1]) : Cl : Ml, Ye = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
2472
|
+
(dt.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
2473
2473
|
!e.startsWith("url(")), Dl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2474
2474
|
function Ll(t) {
|
|
2475
2475
|
const [e, n] = t.slice(0, -1).split("(");
|
|
@@ -2483,7 +2483,7 @@ function Ll(t) {
|
|
|
2483
2483
|
return i !== n && (o *= 100), e + "(" + o + s + ")";
|
|
2484
2484
|
}
|
|
2485
2485
|
const Rl = /([a-z-]*)\(.*?\)/g, Xe = {
|
|
2486
|
-
...
|
|
2486
|
+
...dt,
|
|
2487
2487
|
getAnimatableNone: (t) => {
|
|
2488
2488
|
const e = t.match(Rl);
|
|
2489
2489
|
return e ? e.map(Ll).join(" ") : t;
|
|
@@ -2507,7 +2507,7 @@ const Rl = /([a-z-]*)\(.*?\)/g, Xe = {
|
|
|
2507
2507
|
}, gn = (t) => Bl[t];
|
|
2508
2508
|
function Qs(t, e) {
|
|
2509
2509
|
let n = gn(t);
|
|
2510
|
-
return n !== Xe && (n =
|
|
2510
|
+
return n !== Xe && (n = dt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2511
2511
|
}
|
|
2512
2512
|
const Zs = (t) => /^0[^.\s]+$/.test(t);
|
|
2513
2513
|
function Nl(t) {
|
|
@@ -2543,7 +2543,7 @@ const Fl = {
|
|
|
2543
2543
|
}, yn = (t, e, n, i = {}) => (s) => {
|
|
2544
2544
|
const o = vn(i, t) || {}, r = o.delay || i.delay || 0;
|
|
2545
2545
|
let { elapsed: a = 0 } = i;
|
|
2546
|
-
a = a -
|
|
2546
|
+
a = a - ut(r);
|
|
2547
2547
|
const l = jl(e, t, n, o), c = l[0], u = l[l.length - 1], h = Ye(t, c), d = Ye(t, u);
|
|
2548
2548
|
Qt(h === d, `You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);
|
|
2549
2549
|
let f = {
|
|
@@ -2562,7 +2562,7 @@ const Fl = {
|
|
|
2562
2562
|
if (Il(o) || (f = {
|
|
2563
2563
|
...f,
|
|
2564
2564
|
...Ol(t, f)
|
|
2565
|
-
}), f.duration && (f.duration =
|
|
2565
|
+
}), f.duration && (f.duration = ut(f.duration)), f.repeatDelay && (f.repeatDelay = ut(f.repeatDelay)), !h || !d || Ba.current || o.type === !1 || Fl.skipAnimations)
|
|
2566
2566
|
return kl(f);
|
|
2567
2567
|
if (
|
|
2568
2568
|
/**
|
|
@@ -2583,7 +2583,7 @@ const Fl = {
|
|
|
2583
2583
|
return ge(f);
|
|
2584
2584
|
};
|
|
2585
2585
|
function ve(t) {
|
|
2586
|
-
return !!(
|
|
2586
|
+
return !!(_(t) && t.add);
|
|
2587
2587
|
}
|
|
2588
2588
|
const Js = (t) => /^\-?\d*\.?\d+$/.test(t);
|
|
2589
2589
|
function bn(t, e) {
|
|
@@ -2819,7 +2819,7 @@ function Mt(t, e) {
|
|
|
2819
2819
|
const tr = (t) => (e) => e.test(t), _l = {
|
|
2820
2820
|
test: (t) => t === "auto",
|
|
2821
2821
|
parse: (t) => t
|
|
2822
|
-
}, er = [
|
|
2822
|
+
}, er = [xt, P, Q, at, $o, Ko, _l], jt = (t) => er.find(tr(t)), Ul = [...er, I, dt], Hl = (t) => Ul.find(tr(t));
|
|
2823
2823
|
function Gl(t, e, n) {
|
|
2824
2824
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Mt(n));
|
|
2825
2825
|
}
|
|
@@ -2839,7 +2839,7 @@ function Xl(t, e, n) {
|
|
|
2839
2839
|
for (let a = 0; a < r; a++) {
|
|
2840
2840
|
const l = o[a], c = e[l];
|
|
2841
2841
|
let u = null;
|
|
2842
|
-
Array.isArray(c) && (u = c[0]), u === null && (u = (s = (i = n[l]) !== null && i !== void 0 ? i : t.readValue(l)) !== null && s !== void 0 ? s : e[l]), u != null && (typeof u == "string" && (Js(u) || Zs(u)) ? u = parseFloat(u) : !Hl(u) &&
|
|
2842
|
+
Array.isArray(c) && (u = c[0]), u === null && (u = (s = (i = n[l]) !== null && i !== void 0 ? i : t.readValue(l)) !== null && s !== void 0 ? s : e[l]), u != null && (typeof u == "string" && (Js(u) || Zs(u)) ? u = parseFloat(u) : !Hl(u) && dt.test(c) && (u = Qs(l, c)), t.addValue(l, Mt(u, { owner: t })), n[l] === void 0 && (n[l] = u), u !== null && t.setBaseTarget(l, u));
|
|
2843
2843
|
}
|
|
2844
2844
|
}
|
|
2845
2845
|
function ql(t, e) {
|
|
@@ -2895,7 +2895,7 @@ function nr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
2895
2895
|
let m = !p.isHandoff && !Ql(d, f);
|
|
2896
2896
|
if (p.type === "spring" && (d.getVelocity() || p.velocity) && (m = !1), d.animation && (m = !1), m)
|
|
2897
2897
|
continue;
|
|
2898
|
-
d.start(yn(h, d, f, t.shouldReduceMotion &&
|
|
2898
|
+
d.start(yn(h, d, f, t.shouldReduceMotion && bt.has(h) ? { type: !1 } : p));
|
|
2899
2899
|
const v = d.animation;
|
|
2900
2900
|
ve(l) && (l.add(h), v.then(() => l.remove(h))), c.push(v);
|
|
2901
2901
|
}
|
|
@@ -2976,24 +2976,24 @@ function sc(t) {
|
|
|
2976
2976
|
continue;
|
|
2977
2977
|
let C = rc(g.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
2978
2978
|
b === c && g.isActive && !k && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
2979
|
-
y > m && S,
|
|
2980
|
-
const
|
|
2981
|
-
let
|
|
2982
|
-
T === !1 && (
|
|
2983
|
-
const { prevResolvedValues:
|
|
2984
|
-
...
|
|
2985
|
-
...
|
|
2979
|
+
y > m && S, q = !1;
|
|
2980
|
+
const nt = Array.isArray(x) ? x : [x];
|
|
2981
|
+
let F = nt.reduce(s, {});
|
|
2982
|
+
T === !1 && (F = {});
|
|
2983
|
+
const { prevResolvedValues: G = {} } = g, j = {
|
|
2984
|
+
...G,
|
|
2985
|
+
...F
|
|
2986
2986
|
}, wt = (R) => {
|
|
2987
|
-
C = !0, f.has(R) && (
|
|
2987
|
+
C = !0, f.has(R) && (q = !0, f.delete(R)), g.needsAnimating[R] = !0;
|
|
2988
2988
|
};
|
|
2989
2989
|
for (const R in j) {
|
|
2990
|
-
const
|
|
2990
|
+
const it = F[R], Lt = G[R];
|
|
2991
2991
|
if (p.hasOwnProperty(R))
|
|
2992
2992
|
continue;
|
|
2993
2993
|
let St = !1;
|
|
2994
|
-
fe(
|
|
2994
|
+
fe(it) && fe(Lt) ? St = !Ps(it, Lt) : St = it !== Lt, St ? it !== void 0 ? wt(R) : f.add(R) : it !== void 0 && f.has(R) ? wt(R) : g.protectedKeys[R] = !0;
|
|
2995
2995
|
}
|
|
2996
|
-
g.prevProp = x, g.prevResolvedValues =
|
|
2996
|
+
g.prevProp = x, g.prevResolvedValues = F, g.isActive && (p = { ...p, ...F }), i && t.blockInitialAnimation && (C = !1), C && (!k || q) && d.push(...nt.map((R) => ({
|
|
2997
2997
|
animation: R,
|
|
2998
2998
|
options: { type: b, ...l }
|
|
2999
2999
|
})));
|
|
@@ -3031,7 +3031,7 @@ function sc(t) {
|
|
|
3031
3031
|
function rc(t, e) {
|
|
3032
3032
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Ps(e, t) : !1;
|
|
3033
3033
|
}
|
|
3034
|
-
function
|
|
3034
|
+
function mt(t = !1) {
|
|
3035
3035
|
return {
|
|
3036
3036
|
isActive: t,
|
|
3037
3037
|
protectedKeys: {},
|
|
@@ -3041,16 +3041,16 @@ function pt(t = !1) {
|
|
|
3041
3041
|
}
|
|
3042
3042
|
function oc() {
|
|
3043
3043
|
return {
|
|
3044
|
-
animate:
|
|
3045
|
-
whileInView:
|
|
3046
|
-
whileHover:
|
|
3047
|
-
whileTap:
|
|
3048
|
-
whileDrag:
|
|
3049
|
-
whileFocus:
|
|
3050
|
-
exit:
|
|
3044
|
+
animate: mt(!0),
|
|
3045
|
+
whileInView: mt(),
|
|
3046
|
+
whileHover: mt(),
|
|
3047
|
+
whileTap: mt(),
|
|
3048
|
+
whileDrag: mt(),
|
|
3049
|
+
whileFocus: mt(),
|
|
3050
|
+
exit: mt()
|
|
3051
3051
|
};
|
|
3052
3052
|
}
|
|
3053
|
-
class ac extends
|
|
3053
|
+
class ac extends ft {
|
|
3054
3054
|
/**
|
|
3055
3055
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3056
3056
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -3077,7 +3077,7 @@ class ac extends dt {
|
|
|
3077
3077
|
}
|
|
3078
3078
|
}
|
|
3079
3079
|
let lc = 0;
|
|
3080
|
-
class cc extends
|
|
3080
|
+
class cc extends ft {
|
|
3081
3081
|
constructor() {
|
|
3082
3082
|
super(...arguments), this.id = lc++;
|
|
3083
3083
|
}
|
|
@@ -3136,7 +3136,7 @@ class ir {
|
|
|
3136
3136
|
const r = Pe(e), a = Ie(r, this.transformPagePoint), { point: l } = a, { timestamp: c } = N;
|
|
3137
3137
|
this.history = [{ ...l, timestamp: c }];
|
|
3138
3138
|
const { onSessionStart: u } = n;
|
|
3139
|
-
u && u(e, Fe(a, this.history)), this.removeListeners =
|
|
3139
|
+
u && u(e, Fe(a, this.history)), this.removeListeners = ct(J(this.contextWindow, "pointermove", this.handlePointerMove), J(this.contextWindow, "pointerup", this.handlePointerUp), J(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3140
3140
|
}
|
|
3141
3141
|
updateHandlers(e) {
|
|
3142
3142
|
this.handlers = e;
|
|
@@ -3170,7 +3170,7 @@ function fc(t, e) {
|
|
|
3170
3170
|
return { x: 0, y: 0 };
|
|
3171
3171
|
let n = t.length - 1, i = null;
|
|
3172
3172
|
const s = sr(t);
|
|
3173
|
-
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp >
|
|
3173
|
+
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > ut(e))); )
|
|
3174
3174
|
n--;
|
|
3175
3175
|
if (!i)
|
|
3176
3176
|
return { x: 0, y: 0 };
|
|
@@ -3183,26 +3183,26 @@ function fc(t, e) {
|
|
|
3183
3183
|
};
|
|
3184
3184
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function H(t) {
|
|
3187
3187
|
return t.max - t.min;
|
|
3188
3188
|
}
|
|
3189
3189
|
function Ke(t, e = 0, n = 0.01) {
|
|
3190
3190
|
return Math.abs(t - e) <= n;
|
|
3191
3191
|
}
|
|
3192
3192
|
function ti(t, e, n, i = 0.5) {
|
|
3193
|
-
t.origin = i, t.originPoint = M(e.min, e.max, t.origin), t.scale =
|
|
3193
|
+
t.origin = i, t.originPoint = M(e.min, e.max, t.origin), t.scale = H(n) / H(e), (Ke(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = M(n.min, n.max, t.origin) - t.originPoint, (Ke(t.translate) || isNaN(t.translate)) && (t.translate = 0);
|
|
3194
3194
|
}
|
|
3195
3195
|
function _t(t, e, n, i) {
|
|
3196
3196
|
ti(t.x, e.x, n.x, i ? i.originX : void 0), ti(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3197
3197
|
}
|
|
3198
3198
|
function ei(t, e, n) {
|
|
3199
|
-
t.min = n.min + e.min, t.max = t.min +
|
|
3199
|
+
t.min = n.min + e.min, t.max = t.min + H(e);
|
|
3200
3200
|
}
|
|
3201
3201
|
function pc(t, e, n) {
|
|
3202
3202
|
ei(t.x, e.x, n.x), ei(t.y, e.y, n.y);
|
|
3203
3203
|
}
|
|
3204
3204
|
function ni(t, e, n) {
|
|
3205
|
-
t.min = e.min - n.min, t.max = t.min +
|
|
3205
|
+
t.min = e.min - n.min, t.max = t.min + H(e);
|
|
3206
3206
|
}
|
|
3207
3207
|
function Ut(t, e, n) {
|
|
3208
3208
|
ni(t.x, e.x, n.x), ni(t.y, e.y, n.y);
|
|
@@ -3234,8 +3234,8 @@ function vc(t, e) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
function yc(t, e) {
|
|
3236
3236
|
let n = 0.5;
|
|
3237
|
-
const i =
|
|
3238
|
-
return s > i ? n = Yt(e.min, e.max - i, t.min) : i > s && (n = Yt(t.min, t.max - s, e.min)),
|
|
3237
|
+
const i = H(t), s = H(e);
|
|
3238
|
+
return s > i ? n = Yt(e.min, e.max - i, t.min) : i > s && (n = Yt(t.min, t.max - s, e.min)), ht(0, 1, n);
|
|
3239
3239
|
}
|
|
3240
3240
|
function bc(t, e) {
|
|
3241
3241
|
const n = {};
|
|
@@ -3269,7 +3269,7 @@ const ai = () => ({
|
|
|
3269
3269
|
x: li(),
|
|
3270
3270
|
y: li()
|
|
3271
3271
|
});
|
|
3272
|
-
function
|
|
3272
|
+
function X(t) {
|
|
3273
3273
|
return [t("x"), t("y")];
|
|
3274
3274
|
}
|
|
3275
3275
|
function rr({ top: t, left: e, right: n, bottom: i }) {
|
|
@@ -3298,7 +3298,7 @@ function ze(t) {
|
|
|
3298
3298
|
function Qe({ scale: t, scaleX: e, scaleY: n }) {
|
|
3299
3299
|
return !ze(t) || !ze(e) || !ze(n);
|
|
3300
3300
|
}
|
|
3301
|
-
function
|
|
3301
|
+
function gt(t) {
|
|
3302
3302
|
return Qe(t) || or(t) || t.z || t.rotate || t.rotateX || t.rotateY;
|
|
3303
3303
|
}
|
|
3304
3304
|
function or(t) {
|
|
@@ -3332,14 +3332,14 @@ function Tc(t, e, n, i = !1) {
|
|
|
3332
3332
|
l && l.style && l.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && Vt(t, {
|
|
3333
3333
|
x: -o.scroll.offset.x,
|
|
3334
3334
|
y: -o.scroll.offset.y
|
|
3335
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, ar(t, r)), i &&
|
|
3335
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, ar(t, r)), i && gt(o.latestValues) && Vt(t, o.latestValues));
|
|
3336
3336
|
}
|
|
3337
3337
|
e.x = hi(e.x), e.y = hi(e.y);
|
|
3338
3338
|
}
|
|
3339
3339
|
function hi(t) {
|
|
3340
3340
|
return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1;
|
|
3341
3341
|
}
|
|
3342
|
-
function
|
|
3342
|
+
function lt(t, e) {
|
|
3343
3343
|
t.min = t.min + e, t.max = t.max + e;
|
|
3344
3344
|
}
|
|
3345
3345
|
function di(t, e, [n, i, s]) {
|
|
@@ -3355,7 +3355,7 @@ function lr(t, e) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
function kc(t, e, n) {
|
|
3357
3357
|
const i = lr(t, n), { scroll: s } = e;
|
|
3358
|
-
return s && (
|
|
3358
|
+
return s && (lt(i.x, s.offset.x), lt(i.y, s.offset.y)), i;
|
|
3359
3359
|
}
|
|
3360
3360
|
const cr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Cc = /* @__PURE__ */ new WeakMap();
|
|
3361
3361
|
class Vc {
|
|
@@ -3373,13 +3373,13 @@ class Vc {
|
|
|
3373
3373
|
const { drag: d, dragPropagation: f, onDragStart: p } = this.getProps();
|
|
3374
3374
|
if (d && !f && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Ss(d), !this.openGlobalLock))
|
|
3375
3375
|
return;
|
|
3376
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
3376
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), X((v) => {
|
|
3377
3377
|
let y = this.getAxisMotionValue(v).get() || 0;
|
|
3378
|
-
if (
|
|
3378
|
+
if (Q.test(y)) {
|
|
3379
3379
|
const { projection: b } = this.visualElement;
|
|
3380
3380
|
if (b && b.layout) {
|
|
3381
3381
|
const g = b.layout.layoutBox[v];
|
|
3382
|
-
g && (y =
|
|
3382
|
+
g && (y = H(g) * (parseFloat(y) / 100));
|
|
3383
3383
|
}
|
|
3384
3384
|
}
|
|
3385
3385
|
this.originPoint[v] = y;
|
|
@@ -3396,7 +3396,7 @@ class Vc {
|
|
|
3396
3396
|
return;
|
|
3397
3397
|
}
|
|
3398
3398
|
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(), m && m(u, h);
|
|
3399
|
-
}, a = (u, h) => this.stop(u, h), l = () =>
|
|
3399
|
+
}, a = (u, h) => this.stop(u, h), l = () => X((u) => {
|
|
3400
3400
|
var h;
|
|
3401
3401
|
return this.getAnimationState(u) === "paused" && ((h = this.getAxisMotionValue(u).animation) === null || h === void 0 ? void 0 : h.play());
|
|
3402
3402
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
@@ -3439,7 +3439,7 @@ class Vc {
|
|
|
3439
3439
|
resolveConstraints() {
|
|
3440
3440
|
var e;
|
|
3441
3441
|
const { dragConstraints: n, dragElastic: i } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
|
|
3442
|
-
n && Pt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = gc(s.layoutBox, n) : this.constraints = !1, this.elastic = xc(i), o !== this.constraints && s && this.constraints && !this.hasMutatedConstraints &&
|
|
3442
|
+
n && Pt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = gc(s.layoutBox, n) : this.constraints = !1, this.elastic = xc(i), o !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && X((r) => {
|
|
3443
3443
|
this.getAxisMotionValue(r) && (this.constraints[r] = bc(s.layoutBox[r], this.constraints[r]));
|
|
3444
3444
|
});
|
|
3445
3445
|
}
|
|
@@ -3448,7 +3448,7 @@ class Vc {
|
|
|
3448
3448
|
if (!e || !Pt(e))
|
|
3449
3449
|
return !1;
|
|
3450
3450
|
const i = e.current;
|
|
3451
|
-
|
|
3451
|
+
$(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
3452
3452
|
const { projection: s } = this.visualElement;
|
|
3453
3453
|
if (!s || !s.layout)
|
|
3454
3454
|
return !1;
|
|
@@ -3461,7 +3461,7 @@ class Vc {
|
|
|
3461
3461
|
return r;
|
|
3462
3462
|
}
|
|
3463
3463
|
startAnimation(e) {
|
|
3464
|
-
const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c =
|
|
3464
|
+
const { drag: n, dragMomentum: i, dragElastic: s, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = X((u) => {
|
|
3465
3465
|
if (!se(u, n, this.currentDirection))
|
|
3466
3466
|
return;
|
|
3467
3467
|
let h = l && l[u] || {};
|
|
@@ -3486,10 +3486,10 @@ class Vc {
|
|
|
3486
3486
|
return i.start(yn(e, i, 0, n));
|
|
3487
3487
|
}
|
|
3488
3488
|
stopAnimation() {
|
|
3489
|
-
|
|
3489
|
+
X((e) => this.getAxisMotionValue(e).stop());
|
|
3490
3490
|
}
|
|
3491
3491
|
pauseAnimation() {
|
|
3492
|
-
|
|
3492
|
+
X((e) => {
|
|
3493
3493
|
var n;
|
|
3494
3494
|
return (n = this.getAxisMotionValue(e).animation) === null || n === void 0 ? void 0 : n.pause();
|
|
3495
3495
|
});
|
|
@@ -3509,7 +3509,7 @@ class Vc {
|
|
|
3509
3509
|
return s || this.visualElement.getValue(e, (i.initial ? i.initial[e] : void 0) || 0);
|
|
3510
3510
|
}
|
|
3511
3511
|
snapToCursor(e) {
|
|
3512
|
-
|
|
3512
|
+
X((n) => {
|
|
3513
3513
|
const { drag: i } = this.getProps();
|
|
3514
3514
|
if (!se(n, i, this.currentDirection))
|
|
3515
3515
|
return;
|
|
@@ -3533,7 +3533,7 @@ class Vc {
|
|
|
3533
3533
|
return;
|
|
3534
3534
|
this.stopAnimation();
|
|
3535
3535
|
const s = { x: 0, y: 0 };
|
|
3536
|
-
|
|
3536
|
+
X((r) => {
|
|
3537
3537
|
const a = this.getAxisMotionValue(r);
|
|
3538
3538
|
if (a) {
|
|
3539
3539
|
const l = a.get();
|
|
@@ -3541,7 +3541,7 @@ class Vc {
|
|
|
3541
3541
|
}
|
|
3542
3542
|
});
|
|
3543
3543
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
3544
|
-
this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(),
|
|
3544
|
+
this.visualElement.current.style.transform = o ? o({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.resolveConstraints(), X((r) => {
|
|
3545
3545
|
if (!se(r, e, null))
|
|
3546
3546
|
return;
|
|
3547
3547
|
const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
|
|
@@ -3561,7 +3561,7 @@ class Vc {
|
|
|
3561
3561
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
|
|
3562
3562
|
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), i();
|
|
3563
3563
|
const r = Z(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
3564
|
-
this.isDragging && c && (
|
|
3564
|
+
this.isDragging && c && (X((u) => {
|
|
3565
3565
|
const h = this.getAxisMotionValue(u);
|
|
3566
3566
|
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
3567
3567
|
}), this.visualElement.render());
|
|
@@ -3590,7 +3590,7 @@ function Ec(t, e = 10) {
|
|
|
3590
3590
|
let n = null;
|
|
3591
3591
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3592
3592
|
}
|
|
3593
|
-
class Mc extends
|
|
3593
|
+
class Mc extends ft {
|
|
3594
3594
|
constructor(e) {
|
|
3595
3595
|
super(e), this.removeGroupControls = O, this.removeListeners = O, this.controls = new Vc(e);
|
|
3596
3596
|
}
|
|
@@ -3605,7 +3605,7 @@ class Mc extends dt {
|
|
|
3605
3605
|
const fi = (t) => (e, n) => {
|
|
3606
3606
|
t && V.update(() => t(e, n));
|
|
3607
3607
|
};
|
|
3608
|
-
class Oc extends
|
|
3608
|
+
class Oc extends ft {
|
|
3609
3609
|
constructor() {
|
|
3610
3610
|
super(...arguments), this.removePointerDownListener = O;
|
|
3611
3611
|
}
|
|
@@ -3637,7 +3637,7 @@ class Oc extends dt {
|
|
|
3637
3637
|
}
|
|
3638
3638
|
}
|
|
3639
3639
|
function Dc() {
|
|
3640
|
-
const t =
|
|
3640
|
+
const t = W(en);
|
|
3641
3641
|
if (t === null)
|
|
3642
3642
|
return [!0, null];
|
|
3643
3643
|
const { isPresent: e, onExitComplete: n, register: i } = t, s = Er();
|
|
@@ -3663,7 +3663,7 @@ const It = {
|
|
|
3663
3663
|
if (!e.target)
|
|
3664
3664
|
return t;
|
|
3665
3665
|
if (typeof t == "string")
|
|
3666
|
-
if (
|
|
3666
|
+
if (P.test(t))
|
|
3667
3667
|
t = parseFloat(t);
|
|
3668
3668
|
else
|
|
3669
3669
|
return t;
|
|
@@ -3672,10 +3672,10 @@ const It = {
|
|
|
3672
3672
|
}
|
|
3673
3673
|
}, Lc = {
|
|
3674
3674
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3675
|
-
const i = t, s =
|
|
3675
|
+
const i = t, s = dt.parse(t);
|
|
3676
3676
|
if (s.length > 5)
|
|
3677
3677
|
return i;
|
|
3678
|
-
const o =
|
|
3678
|
+
const o = dt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3679
3679
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
3680
3680
|
const c = M(a, l, 0.5);
|
|
3681
3681
|
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
@@ -3722,8 +3722,8 @@ class Rc extends zi.Component {
|
|
|
3722
3722
|
}
|
|
3723
3723
|
}
|
|
3724
3724
|
function ur(t) {
|
|
3725
|
-
const [e, n] = Dc(), i =
|
|
3726
|
-
return zi.createElement(Rc, { ...t, layoutGroup: i, switchLayoutGroup:
|
|
3725
|
+
const [e, n] = Dc(), i = W(rs);
|
|
3726
|
+
return zi.createElement(Rc, { ...t, layoutGroup: i, switchLayoutGroup: W(os), isPresent: e, safeToRemove: n });
|
|
3727
3727
|
}
|
|
3728
3728
|
const Bc = {
|
|
3729
3729
|
borderRadius: {
|
|
@@ -3740,7 +3740,7 @@ const Bc = {
|
|
|
3740
3740
|
borderBottomLeftRadius: It,
|
|
3741
3741
|
borderBottomRightRadius: It,
|
|
3742
3742
|
boxShadow: Lc
|
|
3743
|
-
}, hr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Nc = hr.length, mi = (t) => typeof t == "string" ? parseFloat(t) : t, gi = (t) => typeof t == "number" ||
|
|
3743
|
+
}, hr = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Nc = hr.length, mi = (t) => typeof t == "string" ? parseFloat(t) : t, gi = (t) => typeof t == "number" || P.test(t);
|
|
3744
3744
|
function jc(t, e, n, i, s, o) {
|
|
3745
3745
|
s ? (t.opacity = M(
|
|
3746
3746
|
0,
|
|
@@ -3753,7 +3753,7 @@ function jc(t, e, n, i, s, o) {
|
|
|
3753
3753
|
let l = vi(e, a), c = vi(n, a);
|
|
3754
3754
|
if (l === void 0 && c === void 0)
|
|
3755
3755
|
continue;
|
|
3756
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 || gi(l) === gi(c) ? (t[a] = Math.max(M(mi(l), mi(c), i), 0), (
|
|
3756
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || gi(l) === gi(c) ? (t[a] = Math.max(M(mi(l), mi(c), i), 0), (Q.test(c) || Q.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
3757
3757
|
}
|
|
3758
3758
|
(e.rotate || n.rotate) && (t.rotate = M(e.rotate || 0, n.rotate || 0, i));
|
|
3759
3759
|
}
|
|
@@ -3767,14 +3767,14 @@ function dr(t, e, n) {
|
|
|
3767
3767
|
function yi(t, e) {
|
|
3768
3768
|
t.min = e.min, t.max = e.max;
|
|
3769
3769
|
}
|
|
3770
|
-
function
|
|
3770
|
+
function Y(t, e) {
|
|
3771
3771
|
yi(t.x, e.x), yi(t.y, e.y);
|
|
3772
3772
|
}
|
|
3773
3773
|
function bi(t, e, n, i, s) {
|
|
3774
3774
|
return t -= e, t = ye(t, 1 / n, i), s !== void 0 && (t = ye(t, 1 / s, i)), t;
|
|
3775
3775
|
}
|
|
3776
3776
|
function zc(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
3777
|
-
if (
|
|
3777
|
+
if (Q.test(e) && (e = parseFloat(e), e = M(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
3778
3778
|
return;
|
|
3779
3779
|
let a = M(o.min, o.max, i);
|
|
3780
3780
|
t === o && (a -= e), t.min = bi(t.min, e, n, a, s), t.max = bi(t.max, e, n, a, s);
|
|
@@ -3799,7 +3799,7 @@ function pr(t, e) {
|
|
|
3799
3799
|
return Math.round(t.x.min) === Math.round(e.x.min) && Math.round(t.x.max) === Math.round(e.x.max) && Math.round(t.y.min) === Math.round(e.y.min) && Math.round(t.y.max) === Math.round(e.y.max);
|
|
3800
3800
|
}
|
|
3801
3801
|
function Ti(t) {
|
|
3802
|
-
return
|
|
3802
|
+
return H(t.x) / H(t.y);
|
|
3803
3803
|
}
|
|
3804
3804
|
class Hc {
|
|
3805
3805
|
constructor() {
|
|
@@ -3894,12 +3894,12 @@ function Kc(t) {
|
|
|
3894
3894
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
3895
3895
|
}
|
|
3896
3896
|
function $c(t, e, n) {
|
|
3897
|
-
const i =
|
|
3897
|
+
const i = _(t) ? t : Mt(t);
|
|
3898
3898
|
return i.start(yn("", i, e, n)), i.animation;
|
|
3899
3899
|
}
|
|
3900
3900
|
const Pi = ["", "X", "Y", "Z"], Qc = { visibility: "hidden" }, ki = 1e3;
|
|
3901
3901
|
let Zc = 0;
|
|
3902
|
-
const
|
|
3902
|
+
const vt = {
|
|
3903
3903
|
type: "projectionFrame",
|
|
3904
3904
|
totalNodes: 0,
|
|
3905
3905
|
resolvedTargetDeltas: 0,
|
|
@@ -3911,7 +3911,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3911
3911
|
this.id = Zc++, this.animationId = 0, this.children = /* @__PURE__ */ 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.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3912
3912
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3913
3913
|
}, this.updateProjection = () => {
|
|
3914
|
-
this.projectionUpdateScheduled = !1,
|
|
3914
|
+
this.projectionUpdateScheduled = !1, vt.totalNodes = vt.resolvedTargetDeltas = vt.recalculatedProjection = 0, this.nodes.forEach(eu), this.nodes.forEach(ou), this.nodes.forEach(au), this.nodes.forEach(nu), qc(vt);
|
|
3915
3915
|
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3916
3916
|
for (let l = 0; l < this.path.length; l++)
|
|
3917
3917
|
this.path[l].shouldResetTransform = !0;
|
|
@@ -4012,7 +4012,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4012
4012
|
}
|
|
4013
4013
|
this.isUpdating || this.nodes.forEach(su), this.isUpdating = !1, this.nodes.forEach(ru), this.nodes.forEach(Jc), this.nodes.forEach(tu), this.clearAllSnapshots();
|
|
4014
4014
|
const a = performance.now();
|
|
4015
|
-
N.delta =
|
|
4015
|
+
N.delta = ht(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Me.update.process(N), Me.preRender.process(N), Me.render.process(N), N.isProcessing = !1;
|
|
4016
4016
|
}
|
|
4017
4017
|
didUpdate() {
|
|
4018
4018
|
this.updateScheduled || (this.updateScheduled = !0, queueMicrotask(() => this.update()));
|
|
@@ -4058,7 +4058,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4058
4058
|
if (!s)
|
|
4059
4059
|
return;
|
|
4060
4060
|
const r = this.isLayoutDirty || this.shouldResetTransform, a = this.projectionDelta && !fr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4061
|
-
r && (a ||
|
|
4061
|
+
r && (a || gt(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4062
4062
|
}
|
|
4063
4063
|
measure(r = !0) {
|
|
4064
4064
|
const a = this.measurePageBox();
|
|
@@ -4076,48 +4076,48 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4076
4076
|
if (!r)
|
|
4077
4077
|
return L();
|
|
4078
4078
|
const a = r.measureViewportBox(), { scroll: l } = this.root;
|
|
4079
|
-
return l && (
|
|
4079
|
+
return l && (lt(a.x, l.offset.x), lt(a.y, l.offset.y)), a;
|
|
4080
4080
|
}
|
|
4081
4081
|
removeElementScroll(r) {
|
|
4082
4082
|
const a = L();
|
|
4083
|
-
|
|
4083
|
+
Y(a, r);
|
|
4084
4084
|
for (let l = 0; l < this.path.length; l++) {
|
|
4085
4085
|
const c = this.path[l], { scroll: u, options: h } = c;
|
|
4086
4086
|
if (c !== this.root && u && h.layoutScroll) {
|
|
4087
4087
|
if (u.isRoot) {
|
|
4088
|
-
|
|
4088
|
+
Y(a, r);
|
|
4089
4089
|
const { scroll: d } = this.root;
|
|
4090
|
-
d && (
|
|
4090
|
+
d && (lt(a.x, -d.offset.x), lt(a.y, -d.offset.y));
|
|
4091
4091
|
}
|
|
4092
|
-
|
|
4092
|
+
lt(a.x, u.offset.x), lt(a.y, u.offset.y);
|
|
4093
4093
|
}
|
|
4094
4094
|
}
|
|
4095
4095
|
return a;
|
|
4096
4096
|
}
|
|
4097
4097
|
applyTransform(r, a = !1) {
|
|
4098
4098
|
const l = L();
|
|
4099
|
-
|
|
4099
|
+
Y(l, r);
|
|
4100
4100
|
for (let c = 0; c < this.path.length; c++) {
|
|
4101
4101
|
const u = this.path[c];
|
|
4102
4102
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && Vt(l, {
|
|
4103
4103
|
x: -u.scroll.offset.x,
|
|
4104
4104
|
y: -u.scroll.offset.y
|
|
4105
|
-
}),
|
|
4105
|
+
}), gt(u.latestValues) && Vt(l, u.latestValues);
|
|
4106
4106
|
}
|
|
4107
|
-
return
|
|
4107
|
+
return gt(this.latestValues) && Vt(l, this.latestValues), l;
|
|
4108
4108
|
}
|
|
4109
4109
|
removeTransform(r) {
|
|
4110
4110
|
const a = L();
|
|
4111
|
-
|
|
4111
|
+
Y(a, r);
|
|
4112
4112
|
for (let l = 0; l < this.path.length; l++) {
|
|
4113
4113
|
const c = this.path[l];
|
|
4114
|
-
if (!c.instance || !
|
|
4114
|
+
if (!c.instance || !gt(c.latestValues))
|
|
4115
4115
|
continue;
|
|
4116
4116
|
Qe(c.latestValues) && c.updateSnapshot();
|
|
4117
4117
|
const u = L(), h = c.measurePageBox();
|
|
4118
|
-
|
|
4118
|
+
Y(u, h), wi(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4119
4119
|
}
|
|
4120
|
-
return
|
|
4120
|
+
return gt(this.latestValues) && wi(a, this.latestValues), a;
|
|
4121
4121
|
}
|
|
4122
4122
|
setTargetDelta(r) {
|
|
4123
4123
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4146,15 +4146,15 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4146
4146
|
if (!(!this.layout || !(h || d))) {
|
|
4147
4147
|
if (this.resolvedRelativeTargetAt = N.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4148
4148
|
const f = this.getClosestProjectingParent();
|
|
4149
|
-
f && f.layout && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), Ut(this.relativeTargetOrigin, this.layout.layoutBox, f.layout.layoutBox),
|
|
4149
|
+
f && f.layout && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), Ut(this.relativeTargetOrigin, this.layout.layoutBox, f.layout.layoutBox), Y(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4150
4150
|
}
|
|
4151
4151
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4152
|
-
if (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), pc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) :
|
|
4152
|
+
if (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), pc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Y(this.target, this.layout.layoutBox), ar(this.target, this.targetDelta)) : Y(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4153
4153
|
this.attemptToResolveRelativeTarget = !1;
|
|
4154
4154
|
const f = this.getClosestProjectingParent();
|
|
4155
|
-
f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), Ut(this.relativeTargetOrigin, this.target, f.target),
|
|
4155
|
+
f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? (this.relativeParent = f, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), Ut(this.relativeTargetOrigin, this.target, f.target), Y(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4156
4156
|
}
|
|
4157
|
-
|
|
4157
|
+
vt.resolvedTargetDeltas++;
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
4160
|
}
|
|
@@ -4174,7 +4174,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4174
4174
|
const { layout: u, layoutId: h } = this.options;
|
|
4175
4175
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || h))
|
|
4176
4176
|
return;
|
|
4177
|
-
|
|
4177
|
+
Y(this.layoutCorrected, this.layout.layoutBox);
|
|
4178
4178
|
const d = this.treeScale.x, f = this.treeScale.y;
|
|
4179
4179
|
Tc(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox);
|
|
4180
4180
|
const { target: p } = a;
|
|
@@ -4184,7 +4184,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4184
4184
|
}
|
|
4185
4185
|
this.projectionDelta || (this.projectionDelta = Ct(), this.projectionDeltaWithTransform = Ct());
|
|
4186
4186
|
const m = this.projectionTransform;
|
|
4187
|
-
_t(this.projectionDelta, this.layoutCorrected, p, this.latestValues), this.projectionTransform = Ai(this.projectionDelta, this.treeScale), (this.projectionTransform !== m || this.treeScale.x !== d || this.treeScale.y !== f) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p)),
|
|
4187
|
+
_t(this.projectionDelta, this.layoutCorrected, p, this.latestValues), this.projectionTransform = Ai(this.projectionDelta, this.treeScale), (this.projectionTransform !== m || this.treeScale.x !== d || this.treeScale.y !== f) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p)), vt.recalculatedProjection++;
|
|
4188
4188
|
}
|
|
4189
4189
|
hide() {
|
|
4190
4190
|
this.isVisible = !1;
|
|
@@ -4207,7 +4207,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4207
4207
|
let g;
|
|
4208
4208
|
this.mixTargetDelta = (x) => {
|
|
4209
4209
|
const S = x / 1e3;
|
|
4210
|
-
Ei(h.x, r.x, S), Ei(h.y, r.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ut(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), uu(this.relativeTarget, this.relativeTargetOrigin, d, S), g && Uc(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = L()),
|
|
4210
|
+
Ei(h.x, r.x, S), Ei(h.y, r.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ut(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), uu(this.relativeTarget, this.relativeTargetOrigin, d, S), g && Uc(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = L()), Y(g, this.relativeTarget)), m && (this.animationValues = u, jc(u, c, this.latestValues, S, b, y)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
|
|
4211
4211
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4212
4212
|
}
|
|
4213
4213
|
startAnimation(r) {
|
|
@@ -4237,12 +4237,12 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4237
4237
|
if (!(!a || !l || !c)) {
|
|
4238
4238
|
if (this !== r && this.layout && c && gr(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4239
4239
|
l = this.target || L();
|
|
4240
|
-
const h =
|
|
4240
|
+
const h = H(this.layout.layoutBox.x);
|
|
4241
4241
|
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
4242
|
-
const d =
|
|
4242
|
+
const d = H(this.layout.layoutBox.y);
|
|
4243
4243
|
l.y.min = r.target.y.min, l.y.max = l.y.min + d;
|
|
4244
4244
|
}
|
|
4245
|
-
|
|
4245
|
+
Y(a, l), Vt(a, u), _t(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4246
4246
|
}
|
|
4247
4247
|
}
|
|
4248
4248
|
registerSharedNode(r, a) {
|
|
@@ -4312,7 +4312,7 @@ function mr({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4312
4312
|
const h = this.getLead();
|
|
4313
4313
|
if (!this.projectionDelta || !this.layout || !h.target) {
|
|
4314
4314
|
const m = {};
|
|
4315
|
-
return this.options.layoutId && (m.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, m.pointerEvents = ae(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !
|
|
4315
|
+
return this.options.layoutId && (m.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, m.pointerEvents = ae(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !gt(this.latestValues) && (m.transform = u ? u({}, "") : "none", this.hasProjected = !1), m;
|
|
4316
4316
|
}
|
|
4317
4317
|
const d = h.animationValues || h.latestValues;
|
|
4318
4318
|
this.applyTransformsToTarget(), c.transform = Ai(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
|
|
@@ -4351,11 +4351,11 @@ function tu(t) {
|
|
|
4351
4351
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4352
4352
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4353
4353
|
const { layoutBox: i, measuredBox: s } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
|
|
4354
|
-
o === "size" ?
|
|
4355
|
-
const d = r ? n.measuredBox[h] : n.layoutBox[h], f =
|
|
4354
|
+
o === "size" ? X((h) => {
|
|
4355
|
+
const d = r ? n.measuredBox[h] : n.layoutBox[h], f = H(d);
|
|
4356
4356
|
d.min = i[h].min, d.max = d.min + f;
|
|
4357
|
-
}) : gr(o, n.layoutBox, i) &&
|
|
4358
|
-
const d = r ? n.measuredBox[h] : n.layoutBox[h], f =
|
|
4357
|
+
}) : gr(o, n.layoutBox, i) && X((h) => {
|
|
4358
|
+
const d = r ? n.measuredBox[h] : n.layoutBox[h], f = H(i[h]);
|
|
4359
4359
|
d.max = d.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + f);
|
|
4360
4360
|
});
|
|
4361
4361
|
const a = Ct();
|
|
@@ -4391,7 +4391,7 @@ function tu(t) {
|
|
|
4391
4391
|
t.options.transition = void 0;
|
|
4392
4392
|
}
|
|
4393
4393
|
function eu(t) {
|
|
4394
|
-
|
|
4394
|
+
vt.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4395
4395
|
}
|
|
4396
4396
|
function nu(t) {
|
|
4397
4397
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
@@ -4493,7 +4493,7 @@ function vu(t) {
|
|
|
4493
4493
|
}
|
|
4494
4494
|
const yu = 4;
|
|
4495
4495
|
function Je(t, e, n = 1) {
|
|
4496
|
-
|
|
4496
|
+
$(n <= yu, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
4497
4497
|
const [i, s] = vu(t);
|
|
4498
4498
|
if (!i)
|
|
4499
4499
|
return;
|
|
@@ -4535,7 +4535,7 @@ const xu = /* @__PURE__ */ new Set([
|
|
|
4535
4535
|
"y",
|
|
4536
4536
|
"translateX",
|
|
4537
4537
|
"translateY"
|
|
4538
|
-
]), yr = (t) => xu.has(t), wu = (t) => Object.keys(t).some(yr), re = (t) => t ===
|
|
4538
|
+
]), yr = (t) => xu.has(t), wu = (t) => Object.keys(t).some(yr), re = (t) => t === xt || t === P, Ri = (t, e) => parseFloat(t.split(", ")[e]), Bi = (t, e) => (n, { transform: i }) => {
|
|
4539
4539
|
if (i === "none" || !i)
|
|
4540
4540
|
return 0;
|
|
4541
4541
|
const s = i.match(/^matrix3d\((.+)\)$/);
|
|
@@ -4593,13 +4593,13 @@ const Pu = (t, e, n) => {
|
|
|
4593
4593
|
const p = d.length, m = d[0] === null ? 1 : 0;
|
|
4594
4594
|
u = d[m], h = jt(u);
|
|
4595
4595
|
for (let v = m; v < p && d[v] !== null; v++)
|
|
4596
|
-
f ?
|
|
4596
|
+
f ? $(jt(d[v]) === f, "All keyframes must be of the same type") : (f = jt(d[v]), $(f === h || re(h) && re(f), "Keyframes must be of the same dimension as the current value"));
|
|
4597
4597
|
} else
|
|
4598
4598
|
f = jt(d);
|
|
4599
4599
|
if (h !== f)
|
|
4600
4600
|
if (re(h) && re(f)) {
|
|
4601
4601
|
const p = c.get();
|
|
4602
|
-
typeof p == "string" && c.set(parseFloat(p)), typeof d == "string" ? e[l] = parseFloat(d) : Array.isArray(d) && f ===
|
|
4602
|
+
typeof p == "string" && c.set(parseFloat(p)), typeof d == "string" ? e[l] = parseFloat(d) : Array.isArray(d) && f === P && (e[l] = d.map(parseFloat));
|
|
4603
4603
|
} else
|
|
4604
4604
|
h != null && h.transform && (f != null && f.transform) && (u === 0 || d === 0) ? u === 0 ? c.set(f.transform(u)) : e[l] = h.transform(d) : (r || (o = Au(t), r = !0), a.push(l), i[l] = i[l] !== void 0 ? i[l] : e[l], c.jump(d));
|
|
4605
4605
|
}), a.length) {
|
|
@@ -4629,9 +4629,9 @@ function Mu(t, e, n) {
|
|
|
4629
4629
|
const { willChange: i } = e;
|
|
4630
4630
|
for (const s in e) {
|
|
4631
4631
|
const o = e[s], r = n[s];
|
|
4632
|
-
if (
|
|
4632
|
+
if (_(o))
|
|
4633
4633
|
t.addValue(s, o), ve(i) && i.add(s), process.env.NODE_ENV === "development" && Sn(o.version === "10.18.0", `Attempting to mix Framer Motion versions ${o.version} with 10.18.0 may not work as expected.`);
|
|
4634
|
-
else if (
|
|
4634
|
+
else if (_(r))
|
|
4635
4635
|
t.addValue(s, Mt(o, { owner: t })), ve(i) && i.remove(s);
|
|
4636
4636
|
else if (r !== o)
|
|
4637
4637
|
if (t.hasValue(s)) {
|
|
@@ -4665,7 +4665,7 @@ class Lu {
|
|
|
4665
4665
|
const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {});
|
|
4666
4666
|
for (const h in u) {
|
|
4667
4667
|
const d = u[h];
|
|
4668
|
-
a[h] !== void 0 &&
|
|
4668
|
+
a[h] !== void 0 && _(d) && (d.set(a[h], !1), ve(c) && c.add(h));
|
|
4669
4669
|
}
|
|
4670
4670
|
}
|
|
4671
4671
|
/**
|
|
@@ -4690,7 +4690,7 @@ class Lu {
|
|
|
4690
4690
|
this.current = null;
|
|
4691
4691
|
}
|
|
4692
4692
|
bindToMotionValue(e, n) {
|
|
4693
|
-
const i =
|
|
4693
|
+
const i = bt.has(e), s = n.on("change", (r) => {
|
|
4694
4694
|
this.latestValues[e] = r, this.props.onUpdate && V.update(this.notifyUpdate, !1, !0), i && this.projection && (this.projection.isTransformDirty = !0);
|
|
4695
4695
|
}), o = n.on("renderRequest", this.scheduleRender);
|
|
4696
4696
|
this.valueSubscriptions.set(e, () => {
|
|
@@ -4704,7 +4704,7 @@ class Lu {
|
|
|
4704
4704
|
let r, a;
|
|
4705
4705
|
if (process.env.NODE_ENV !== "production" && s && i) {
|
|
4706
4706
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4707
|
-
n.ignoreStrict ? Qt(!1, l) :
|
|
4707
|
+
n.ignoreStrict ? Qt(!1, l) : $(!1, l);
|
|
4708
4708
|
}
|
|
4709
4709
|
for (let l = 0; l < Ou; l++) {
|
|
4710
4710
|
const c = xr[l], { isEnabled: u, Feature: h, ProjectionNode: d, MeasureLayout: f } = Gt[c];
|
|
@@ -4876,7 +4876,7 @@ class Lu {
|
|
|
4876
4876
|
if (i && s !== void 0)
|
|
4877
4877
|
return s;
|
|
4878
4878
|
const o = this.getBaseTargetFromProps(this.props, e);
|
|
4879
|
-
return o !== void 0 && !
|
|
4879
|
+
return o !== void 0 && !_(o) ? o : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
4880
4880
|
}
|
|
4881
4881
|
on(e, n) {
|
|
4882
4882
|
return this.events[e] || (this.events[e] = new wn()), this.events[e].add(n);
|
|
@@ -4917,7 +4917,7 @@ class Bu extends wr {
|
|
|
4917
4917
|
super(...arguments), this.type = "html";
|
|
4918
4918
|
}
|
|
4919
4919
|
readValueFromInstance(e, n) {
|
|
4920
|
-
if (
|
|
4920
|
+
if (bt.has(n)) {
|
|
4921
4921
|
const i = gn(n);
|
|
4922
4922
|
return i && i.default || 0;
|
|
4923
4923
|
} else {
|
|
@@ -4937,7 +4937,7 @@ class Bu extends wr {
|
|
|
4937
4937
|
handleChildMotionValue() {
|
|
4938
4938
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
4939
4939
|
const { children: e } = this.props;
|
|
4940
|
-
|
|
4940
|
+
_(e) && (this.childSubscription = e.on("change", (n) => {
|
|
4941
4941
|
this.current && (this.current.textContent = `${n}`);
|
|
4942
4942
|
}));
|
|
4943
4943
|
}
|
|
@@ -4953,7 +4953,7 @@ class Nu extends wr {
|
|
|
4953
4953
|
return e[n];
|
|
4954
4954
|
}
|
|
4955
4955
|
readValueFromInstance(e, n) {
|
|
4956
|
-
if (
|
|
4956
|
+
if (bt.has(n)) {
|
|
4957
4957
|
const i = gn(n);
|
|
4958
4958
|
return i && i.default || 0;
|
|
4959
4959
|
}
|
|
@@ -4987,7 +4987,27 @@ const ju = (t, e) => on(t) ? new Nu(e, { enableHardwareAcceleration: !1 }) : new
|
|
|
4987
4987
|
...Iu
|
|
4988
4988
|
}, Sr = /* @__PURE__ */ zo((t, e) => ba(t, e, Fu, ju));
|
|
4989
4989
|
function zu(t) {
|
|
4990
|
-
|
|
4990
|
+
return /* @__PURE__ */ w(
|
|
4991
|
+
"svg",
|
|
4992
|
+
{
|
|
4993
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4994
|
+
width: "16",
|
|
4995
|
+
height: "16",
|
|
4996
|
+
fill: "currentColor",
|
|
4997
|
+
viewBox: "0 0 16 16",
|
|
4998
|
+
...t,
|
|
4999
|
+
children: /* @__PURE__ */ w(
|
|
5000
|
+
"path",
|
|
5001
|
+
{
|
|
5002
|
+
fill: "currenColor",
|
|
5003
|
+
d: "M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"
|
|
5004
|
+
}
|
|
5005
|
+
)
|
|
5006
|
+
}
|
|
5007
|
+
);
|
|
5008
|
+
}
|
|
5009
|
+
function Wu(t) {
|
|
5010
|
+
const { children: e, parentRef: n, onlyChild: i } = t, [s, o] = K({ top: 0, left: 0 });
|
|
4991
5011
|
return Wi(() => {
|
|
4992
5012
|
if (n.current) {
|
|
4993
5013
|
const r = n.current.getBoundingClientRect();
|
|
@@ -5012,54 +5032,34 @@ function zu(t) {
|
|
|
5012
5032
|
n.current
|
|
5013
5033
|
);
|
|
5014
5034
|
}
|
|
5015
|
-
function Wu(t) {
|
|
5016
|
-
return /* @__PURE__ */ w(
|
|
5017
|
-
"svg",
|
|
5018
|
-
{
|
|
5019
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5020
|
-
width: "16",
|
|
5021
|
-
height: "16",
|
|
5022
|
-
fill: "currentColor",
|
|
5023
|
-
viewBox: "0 0 16 16",
|
|
5024
|
-
...t,
|
|
5025
|
-
children: /* @__PURE__ */ w(
|
|
5026
|
-
"path",
|
|
5027
|
-
{
|
|
5028
|
-
fill: "currenColor",
|
|
5029
|
-
d: "M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"
|
|
5030
|
-
}
|
|
5031
|
-
)
|
|
5032
|
-
}
|
|
5033
|
-
);
|
|
5034
|
-
}
|
|
5035
5035
|
function Tr({ item: t, level: e = 0, ...n }) {
|
|
5036
|
-
var
|
|
5037
|
-
const { isActive: i, isCollapsed: s, expanded: o, toggleExpand: r } = n, a = `level-${e}`, l = s ? "collapsed" : "expanded", c = i(t.id) ? "active" : "", u = (
|
|
5038
|
-
function m(
|
|
5039
|
-
var
|
|
5040
|
-
const { level:
|
|
5041
|
-
return !h || s &&
|
|
5042
|
-
|
|
5036
|
+
var k;
|
|
5037
|
+
const { isActive: i, isCollapsed: s, expanded: o, toggleExpand: r } = n, a = `level-${e}`, l = s ? "collapsed" : "expanded", c = i(t.id) ? "active" : "", u = (A, C = a) => `${A} ${C} ${l} ${c}`, h = !!((k = t.children) != null && k.length), [d, f] = K(!1), p = Et();
|
|
5038
|
+
function m(A) {
|
|
5039
|
+
var F;
|
|
5040
|
+
const { level: C, hovered: q, parentRef: nt } = A;
|
|
5041
|
+
return !h || s && C >= 2 && !q ? null : /* @__PURE__ */ w(
|
|
5042
|
+
Wu,
|
|
5043
5043
|
{
|
|
5044
|
-
parentRef:
|
|
5045
|
-
onlyChild: !s || s &&
|
|
5044
|
+
parentRef: nt,
|
|
5045
|
+
onlyChild: !s || s && C < 2,
|
|
5046
5046
|
children: /* @__PURE__ */ w(
|
|
5047
5047
|
Sr.div,
|
|
5048
5048
|
{
|
|
5049
|
-
className: u("menu-item__dropdown", `level-${
|
|
5049
|
+
className: u("menu-item__dropdown", `level-${C}`),
|
|
5050
5050
|
initial: { height: s ? "auto" : 0 },
|
|
5051
5051
|
animate: {
|
|
5052
5052
|
height: s || o(t.id) ? "auto" : 0
|
|
5053
5053
|
},
|
|
5054
5054
|
transition: { duration: 0.2 },
|
|
5055
|
-
children: (
|
|
5055
|
+
children: (F = t.children) == null ? void 0 : F.map((G) => /* @__PURE__ */ _i(Tr, { ...n, key: G.id, item: G, level: C }))
|
|
5056
5056
|
},
|
|
5057
5057
|
+s
|
|
5058
5058
|
)
|
|
5059
5059
|
}
|
|
5060
5060
|
);
|
|
5061
5061
|
}
|
|
5062
|
-
const v = t.path &&
|
|
5062
|
+
const v = window.location.origin, y = t.path && t.path.includes("http") ? new URL(t.path) : { origin: "", pathname: "" }, b = window.location.pathname.split("/")[1], g = y.pathname.split("/")[1], x = n.ssr || !v.includes("local") && v !== y.origin || g !== b, S = h ? "div" : x ? "a" : Nr, T = t.path && n.replacePath ? n.replacePath(t.path) : t.path || "#";
|
|
5063
5063
|
return /* @__PURE__ */ B(
|
|
5064
5064
|
"div",
|
|
5065
5065
|
{
|
|
@@ -5069,21 +5069,22 @@ function Tr({ item: t, level: e = 0, ...n }) {
|
|
|
5069
5069
|
onMouseLeave: () => s && f(!1),
|
|
5070
5070
|
children: [
|
|
5071
5071
|
/* @__PURE__ */ B(
|
|
5072
|
-
|
|
5072
|
+
S,
|
|
5073
5073
|
{
|
|
5074
|
-
|
|
5074
|
+
to: T,
|
|
5075
|
+
href: T,
|
|
5075
5076
|
style: {
|
|
5076
5077
|
paddingLeft: `${s ? "0.5rem" : `${e * 1}rem`}`
|
|
5077
5078
|
},
|
|
5078
5079
|
className: u("menu-item__link"),
|
|
5079
|
-
onClick: (
|
|
5080
|
-
h && (
|
|
5080
|
+
onClick: (A) => {
|
|
5081
|
+
h && (A.preventDefault(), s || r(t.id));
|
|
5081
5082
|
},
|
|
5082
5083
|
children: [
|
|
5083
5084
|
e !== 0 && /* @__PURE__ */ w(_u, { cls: u, item: t }),
|
|
5084
5085
|
/* @__PURE__ */ w("span", { className: u("menu-item__label"), children: t.name }),
|
|
5085
5086
|
h && /* @__PURE__ */ w("div", { className: u("menu-item__icon-arrow__wrapper"), children: /* @__PURE__ */ w(
|
|
5086
|
-
|
|
5087
|
+
zu,
|
|
5087
5088
|
{
|
|
5088
5089
|
className: u(
|
|
5089
5090
|
`menu-item__icon-arrow__icon ${o(t.id) ? "open" : "close"}`
|
|
@@ -5101,7 +5102,7 @@ function Tr({ item: t, level: e = 0, ...n }) {
|
|
|
5101
5102
|
}
|
|
5102
5103
|
function _u({ item: t, cls: e }) {
|
|
5103
5104
|
var r, a;
|
|
5104
|
-
const [n, i] =
|
|
5105
|
+
const [n, i] = K(!1), s = () => {
|
|
5105
5106
|
i(!0);
|
|
5106
5107
|
}, o = (r = t.icon) == null ? void 0 : r.endsWith(".svg");
|
|
5107
5108
|
return /* @__PURE__ */ w("div", { className: e("menu-item__icon"), children: n ? /* @__PURE__ */ w(
|
|
@@ -5227,7 +5228,7 @@ function rh(t) {
|
|
|
5227
5228
|
return /* @__PURE__ */ w(Hi, { styles: [Hu, Xu], style: { zIndex: 1200 }, children: /* @__PURE__ */ w(qu, { ...t }) });
|
|
5228
5229
|
}
|
|
5229
5230
|
function qu(t) {
|
|
5230
|
-
const { baseUrl: e, menuPath: n } = t, i = jr(), [s, o] =
|
|
5231
|
+
const { baseUrl: e, menuPath: n } = t, i = jr(), [s, o] = K([]), [r, a] = K(!1), l = (Ar(s, i.pathname) || []).filter((y) => y.parentKey !== 0), [c, u] = K({}), h = (y) => {
|
|
5231
5232
|
u({
|
|
5232
5233
|
...c,
|
|
5233
5234
|
[y]: !c[y]
|
|
@@ -5250,7 +5251,7 @@ function qu(t) {
|
|
|
5250
5251
|
}), u(x), o(g.map((S) => ({ ...S, parentKey: 0 })));
|
|
5251
5252
|
})();
|
|
5252
5253
|
}, [e, n]);
|
|
5253
|
-
const [f, p] =
|
|
5254
|
+
const [f, p] = K(!1), m = r ? "collapsed" : "expanded", v = (y) => `${y} ${m}`;
|
|
5254
5255
|
return /* @__PURE__ */ B("div", { className: v("side-bar"), children: [
|
|
5255
5256
|
/* @__PURE__ */ w("div", { className: v("side-bar__wrapper-toggle-btn"), children: /* @__PURE__ */ w(
|
|
5256
5257
|
"button",
|