@moontra/moonui-pro 3.3.27 → 3.3.29
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/cdn/index.global.js +178 -178
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +521 -438
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -212,7 +212,7 @@ var require_core = __commonJS({
|
|
|
212
212
|
const pieces = name.split(".");
|
|
213
213
|
return [
|
|
214
214
|
`${prefix}${pieces.shift()}`,
|
|
215
|
-
...pieces.map((
|
|
215
|
+
...pieces.map((x2, i) => `${x2}${"_".repeat(i + 1)}`)
|
|
216
216
|
].join(" ");
|
|
217
217
|
}
|
|
218
218
|
return `${prefix}${name}`;
|
|
@@ -410,7 +410,7 @@ var require_core = __commonJS({
|
|
|
410
410
|
return concat2("(?:", re, ")?");
|
|
411
411
|
}
|
|
412
412
|
function concat2(...args) {
|
|
413
|
-
const joined = args.map((
|
|
413
|
+
const joined = args.map((x2) => source2(x2)).join("");
|
|
414
414
|
return joined;
|
|
415
415
|
}
|
|
416
416
|
function stripOptionsFromArgs2(args) {
|
|
@@ -424,7 +424,7 @@ var require_core = __commonJS({
|
|
|
424
424
|
}
|
|
425
425
|
function either2(...args) {
|
|
426
426
|
const opts = stripOptionsFromArgs2(args);
|
|
427
|
-
const joined = "(" + (opts.capture ? "" : "?:") + args.map((
|
|
427
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x2) => source2(x2)).join("|") + ")";
|
|
428
428
|
return joined;
|
|
429
429
|
}
|
|
430
430
|
function countMatchGroups(re) {
|
|
@@ -765,7 +765,7 @@ var require_core = __commonJS({
|
|
|
765
765
|
return compiledKeywords;
|
|
766
766
|
function compileList(scopeName2, keywordList) {
|
|
767
767
|
if (caseInsensitive) {
|
|
768
|
-
keywordList = keywordList.map((
|
|
768
|
+
keywordList = keywordList.map((x2) => x2.toLowerCase());
|
|
769
769
|
}
|
|
770
770
|
keywordList.forEach(function(keyword) {
|
|
771
771
|
const pair = keyword.split("|");
|
|
@@ -4626,7 +4626,7 @@ function Calendar({
|
|
|
4626
4626
|
)) }),
|
|
4627
4627
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
4628
4628
|
numberOfMonths > 1 && "flex flex-col sm:flex-row gap-2 sm:gap-4"
|
|
4629
|
-
), children: Array.from({ length: numberOfMonths }).map((
|
|
4629
|
+
), children: Array.from({ length: numberOfMonths }).map((_2, i) => /* @__PURE__ */ jsx("div", { className: "flex-1", children: renderCalendar(i) }, i)) })
|
|
4630
4630
|
] });
|
|
4631
4631
|
}
|
|
4632
4632
|
Calendar.displayName = "Calendar";
|
|
@@ -4825,9 +4825,9 @@ var MoonUICardPro = React71.forwardRef(
|
|
|
4825
4825
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
4826
4826
|
const centerX = rect.left + rect.width / 2;
|
|
4827
4827
|
const centerY = rect.top + rect.height / 2;
|
|
4828
|
-
const
|
|
4828
|
+
const x2 = (e.clientX - centerX) / (rect.width / 2);
|
|
4829
4829
|
const y = (e.clientY - centerY) / (rect.height / 2);
|
|
4830
|
-
setMousePos({ x, y });
|
|
4830
|
+
setMousePos({ x: x2, y });
|
|
4831
4831
|
};
|
|
4832
4832
|
const handleMouseEnter = () => setIsHovered(true);
|
|
4833
4833
|
const handleMouseLeave2 = () => {
|
|
@@ -9950,7 +9950,7 @@ var reducer = (state, action) => {
|
|
|
9950
9950
|
return {
|
|
9951
9951
|
...state,
|
|
9952
9952
|
toasts: state.toasts.map(
|
|
9953
|
-
(
|
|
9953
|
+
(t2) => t2.id === action.toast.id ? { ...t2, ...action.toast } : t2
|
|
9954
9954
|
)
|
|
9955
9955
|
};
|
|
9956
9956
|
case "DISMISS_TOAST": {
|
|
@@ -9965,10 +9965,10 @@ var reducer = (state, action) => {
|
|
|
9965
9965
|
return {
|
|
9966
9966
|
...state,
|
|
9967
9967
|
toasts: state.toasts.map(
|
|
9968
|
-
(
|
|
9969
|
-
...
|
|
9968
|
+
(t2) => t2.id === toastId || toastId === void 0 ? {
|
|
9969
|
+
...t2,
|
|
9970
9970
|
open: false
|
|
9971
|
-
} :
|
|
9971
|
+
} : t2
|
|
9972
9972
|
)
|
|
9973
9973
|
};
|
|
9974
9974
|
}
|
|
@@ -9981,7 +9981,7 @@ var reducer = (state, action) => {
|
|
|
9981
9981
|
}
|
|
9982
9982
|
return {
|
|
9983
9983
|
...state,
|
|
9984
|
-
toasts: state.toasts.filter((
|
|
9984
|
+
toasts: state.toasts.filter((t2) => t2.id !== action.toastId)
|
|
9985
9985
|
};
|
|
9986
9986
|
default:
|
|
9987
9987
|
return state;
|
|
@@ -10455,7 +10455,7 @@ function getPaddingObject(padding) {
|
|
|
10455
10455
|
}
|
|
10456
10456
|
function rectToClientRect(rect) {
|
|
10457
10457
|
const {
|
|
10458
|
-
x,
|
|
10458
|
+
x: x2,
|
|
10459
10459
|
y,
|
|
10460
10460
|
width,
|
|
10461
10461
|
height
|
|
@@ -10464,10 +10464,10 @@ function rectToClientRect(rect) {
|
|
|
10464
10464
|
width,
|
|
10465
10465
|
height,
|
|
10466
10466
|
top: y,
|
|
10467
|
-
left:
|
|
10468
|
-
right:
|
|
10467
|
+
left: x2,
|
|
10468
|
+
right: x2 + width,
|
|
10469
10469
|
bottom: y + height,
|
|
10470
|
-
x,
|
|
10470
|
+
x: x2,
|
|
10471
10471
|
y
|
|
10472
10472
|
};
|
|
10473
10473
|
}
|
|
@@ -10543,7 +10543,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10543
10543
|
strategy
|
|
10544
10544
|
});
|
|
10545
10545
|
let {
|
|
10546
|
-
x,
|
|
10546
|
+
x: x2,
|
|
10547
10547
|
y
|
|
10548
10548
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
10549
10549
|
let statefulPlacement = placement;
|
|
@@ -10560,7 +10560,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10560
10560
|
data,
|
|
10561
10561
|
reset: reset2
|
|
10562
10562
|
} = await fn({
|
|
10563
|
-
x,
|
|
10563
|
+
x: x2,
|
|
10564
10564
|
y,
|
|
10565
10565
|
initialPlacement: placement,
|
|
10566
10566
|
placement: statefulPlacement,
|
|
@@ -10573,7 +10573,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10573
10573
|
floating
|
|
10574
10574
|
}
|
|
10575
10575
|
});
|
|
10576
|
-
|
|
10576
|
+
x2 = nextX != null ? nextX : x2;
|
|
10577
10577
|
y = nextY != null ? nextY : y;
|
|
10578
10578
|
middlewareData = {
|
|
10579
10579
|
...middlewareData,
|
|
@@ -10596,7 +10596,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10596
10596
|
}) : reset2.rects;
|
|
10597
10597
|
}
|
|
10598
10598
|
({
|
|
10599
|
-
x,
|
|
10599
|
+
x: x2,
|
|
10600
10600
|
y
|
|
10601
10601
|
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
10602
10602
|
}
|
|
@@ -10604,7 +10604,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10604
10604
|
}
|
|
10605
10605
|
}
|
|
10606
10606
|
return {
|
|
10607
|
-
x,
|
|
10607
|
+
x: x2,
|
|
10608
10608
|
y,
|
|
10609
10609
|
placement: statefulPlacement,
|
|
10610
10610
|
strategy,
|
|
@@ -10617,7 +10617,7 @@ async function detectOverflow(state, options) {
|
|
|
10617
10617
|
options = {};
|
|
10618
10618
|
}
|
|
10619
10619
|
const {
|
|
10620
|
-
x,
|
|
10620
|
+
x: x2,
|
|
10621
10621
|
y,
|
|
10622
10622
|
platform: platform2,
|
|
10623
10623
|
rects,
|
|
@@ -10641,7 +10641,7 @@ async function detectOverflow(state, options) {
|
|
|
10641
10641
|
strategy
|
|
10642
10642
|
}));
|
|
10643
10643
|
const rect = elementContext === "floating" ? {
|
|
10644
|
-
x,
|
|
10644
|
+
x: x2,
|
|
10645
10645
|
y,
|
|
10646
10646
|
width: rects.floating.width,
|
|
10647
10647
|
height: rects.floating.height
|
|
@@ -10672,7 +10672,7 @@ var arrow = (options) => ({
|
|
|
10672
10672
|
options,
|
|
10673
10673
|
async fn(state) {
|
|
10674
10674
|
const {
|
|
10675
|
-
x,
|
|
10675
|
+
x: x2,
|
|
10676
10676
|
y,
|
|
10677
10677
|
placement,
|
|
10678
10678
|
rects,
|
|
@@ -10689,7 +10689,7 @@ var arrow = (options) => ({
|
|
|
10689
10689
|
}
|
|
10690
10690
|
const paddingObject = getPaddingObject(padding);
|
|
10691
10691
|
const coords = {
|
|
10692
|
-
x,
|
|
10692
|
+
x: x2,
|
|
10693
10693
|
y
|
|
10694
10694
|
};
|
|
10695
10695
|
const axis = getAlignmentAxis(placement);
|
|
@@ -10946,7 +10946,7 @@ var offset = function(options) {
|
|
|
10946
10946
|
async fn(state) {
|
|
10947
10947
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
10948
10948
|
const {
|
|
10949
|
-
x,
|
|
10949
|
+
x: x2,
|
|
10950
10950
|
y,
|
|
10951
10951
|
placement,
|
|
10952
10952
|
middlewareData
|
|
@@ -10956,7 +10956,7 @@ var offset = function(options) {
|
|
|
10956
10956
|
return {};
|
|
10957
10957
|
}
|
|
10958
10958
|
return {
|
|
10959
|
-
x:
|
|
10959
|
+
x: x2 + diffCoords.x,
|
|
10960
10960
|
y: y + diffCoords.y,
|
|
10961
10961
|
data: {
|
|
10962
10962
|
...diffCoords,
|
|
@@ -10975,7 +10975,7 @@ var shift = function(options) {
|
|
|
10975
10975
|
options,
|
|
10976
10976
|
async fn(state) {
|
|
10977
10977
|
const {
|
|
10978
|
-
x,
|
|
10978
|
+
x: x2,
|
|
10979
10979
|
y,
|
|
10980
10980
|
placement
|
|
10981
10981
|
} = state;
|
|
@@ -10985,11 +10985,11 @@ var shift = function(options) {
|
|
|
10985
10985
|
limiter = {
|
|
10986
10986
|
fn: (_ref) => {
|
|
10987
10987
|
let {
|
|
10988
|
-
x:
|
|
10988
|
+
x: x3,
|
|
10989
10989
|
y: y2
|
|
10990
10990
|
} = _ref;
|
|
10991
10991
|
return {
|
|
10992
|
-
x:
|
|
10992
|
+
x: x3,
|
|
10993
10993
|
y: y2
|
|
10994
10994
|
};
|
|
10995
10995
|
}
|
|
@@ -10997,7 +10997,7 @@ var shift = function(options) {
|
|
|
10997
10997
|
...detectOverflowOptions
|
|
10998
10998
|
} = evaluate(options, state);
|
|
10999
10999
|
const coords = {
|
|
11000
|
-
x,
|
|
11000
|
+
x: x2,
|
|
11001
11001
|
y
|
|
11002
11002
|
};
|
|
11003
11003
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
@@ -11027,7 +11027,7 @@ var shift = function(options) {
|
|
|
11027
11027
|
return {
|
|
11028
11028
|
...limitedCoords,
|
|
11029
11029
|
data: {
|
|
11030
|
-
x: limitedCoords.x -
|
|
11030
|
+
x: limitedCoords.x - x2,
|
|
11031
11031
|
y: limitedCoords.y - y,
|
|
11032
11032
|
enabled: {
|
|
11033
11033
|
[mainAxis]: checkMainAxis,
|
|
@@ -11046,7 +11046,7 @@ var limitShift = function(options) {
|
|
|
11046
11046
|
options,
|
|
11047
11047
|
fn(state) {
|
|
11048
11048
|
const {
|
|
11049
|
-
x,
|
|
11049
|
+
x: x2,
|
|
11050
11050
|
y,
|
|
11051
11051
|
placement,
|
|
11052
11052
|
rects,
|
|
@@ -11058,7 +11058,7 @@ var limitShift = function(options) {
|
|
|
11058
11058
|
crossAxis: checkCrossAxis = true
|
|
11059
11059
|
} = evaluate(options, state);
|
|
11060
11060
|
const coords = {
|
|
11061
|
-
x,
|
|
11061
|
+
x: x2,
|
|
11062
11062
|
y
|
|
11063
11063
|
};
|
|
11064
11064
|
const crossAxis = getSideAxis(placement);
|
|
@@ -11369,16 +11369,16 @@ function getScale(element) {
|
|
|
11369
11369
|
height,
|
|
11370
11370
|
$
|
|
11371
11371
|
} = getCssDimensions(domElement);
|
|
11372
|
-
let
|
|
11372
|
+
let x2 = ($ ? round(rect.width) : rect.width) / width;
|
|
11373
11373
|
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
11374
|
-
if (!
|
|
11375
|
-
|
|
11374
|
+
if (!x2 || !Number.isFinite(x2)) {
|
|
11375
|
+
x2 = 1;
|
|
11376
11376
|
}
|
|
11377
11377
|
if (!y || !Number.isFinite(y)) {
|
|
11378
11378
|
y = 1;
|
|
11379
11379
|
}
|
|
11380
11380
|
return {
|
|
11381
|
-
x,
|
|
11381
|
+
x: x2,
|
|
11382
11382
|
y
|
|
11383
11383
|
};
|
|
11384
11384
|
}
|
|
@@ -11422,7 +11422,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11422
11422
|
}
|
|
11423
11423
|
}
|
|
11424
11424
|
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
11425
|
-
let
|
|
11425
|
+
let x2 = (clientRect2.left + visualOffsets.x) / scale.x;
|
|
11426
11426
|
let y = (clientRect2.top + visualOffsets.y) / scale.y;
|
|
11427
11427
|
let width = clientRect2.width / scale.x;
|
|
11428
11428
|
let height = clientRect2.height / scale.y;
|
|
@@ -11437,11 +11437,11 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11437
11437
|
const css2 = getComputedStyle2(currentIFrame);
|
|
11438
11438
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css2.paddingLeft)) * iframeScale.x;
|
|
11439
11439
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css2.paddingTop)) * iframeScale.y;
|
|
11440
|
-
|
|
11440
|
+
x2 *= iframeScale.x;
|
|
11441
11441
|
y *= iframeScale.y;
|
|
11442
11442
|
width *= iframeScale.x;
|
|
11443
11443
|
height *= iframeScale.y;
|
|
11444
|
-
|
|
11444
|
+
x2 += left;
|
|
11445
11445
|
y += top;
|
|
11446
11446
|
currentWin = getWindow(currentIFrame);
|
|
11447
11447
|
currentIFrame = getFrameElement(currentWin);
|
|
@@ -11450,7 +11450,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11450
11450
|
return rectToClientRect({
|
|
11451
11451
|
width,
|
|
11452
11452
|
height,
|
|
11453
|
-
x,
|
|
11453
|
+
x: x2,
|
|
11454
11454
|
y
|
|
11455
11455
|
});
|
|
11456
11456
|
}
|
|
@@ -11463,10 +11463,10 @@ function getWindowScrollBarX(element, rect) {
|
|
|
11463
11463
|
}
|
|
11464
11464
|
function getHTMLOffset(documentElement, scroll) {
|
|
11465
11465
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
11466
|
-
const
|
|
11466
|
+
const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
11467
11467
|
const y = htmlRect.top + scroll.scrollTop;
|
|
11468
11468
|
return {
|
|
11469
|
-
x,
|
|
11469
|
+
x: x2,
|
|
11470
11470
|
y
|
|
11471
11471
|
};
|
|
11472
11472
|
}
|
|
@@ -11518,15 +11518,15 @@ function getDocumentRect(element) {
|
|
|
11518
11518
|
const body = element.ownerDocument.body;
|
|
11519
11519
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
11520
11520
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
11521
|
-
let
|
|
11521
|
+
let x2 = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
11522
11522
|
const y = -scroll.scrollTop;
|
|
11523
11523
|
if (getComputedStyle2(body).direction === "rtl") {
|
|
11524
|
-
|
|
11524
|
+
x2 += max(html.clientWidth, body.clientWidth) - width;
|
|
11525
11525
|
}
|
|
11526
11526
|
return {
|
|
11527
11527
|
width,
|
|
11528
11528
|
height,
|
|
11529
|
-
x,
|
|
11529
|
+
x: x2,
|
|
11530
11530
|
y
|
|
11531
11531
|
};
|
|
11532
11532
|
}
|
|
@@ -11537,14 +11537,14 @@ function getViewportRect(element, strategy) {
|
|
|
11537
11537
|
const visualViewport = win.visualViewport;
|
|
11538
11538
|
let width = html.clientWidth;
|
|
11539
11539
|
let height = html.clientHeight;
|
|
11540
|
-
let
|
|
11540
|
+
let x2 = 0;
|
|
11541
11541
|
let y = 0;
|
|
11542
11542
|
if (visualViewport) {
|
|
11543
11543
|
width = visualViewport.width;
|
|
11544
11544
|
height = visualViewport.height;
|
|
11545
11545
|
const visualViewportBased = isWebKit();
|
|
11546
11546
|
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
11547
|
-
|
|
11547
|
+
x2 = visualViewport.offsetLeft;
|
|
11548
11548
|
y = visualViewport.offsetTop;
|
|
11549
11549
|
}
|
|
11550
11550
|
}
|
|
@@ -11564,7 +11564,7 @@ function getViewportRect(element, strategy) {
|
|
|
11564
11564
|
return {
|
|
11565
11565
|
width,
|
|
11566
11566
|
height,
|
|
11567
|
-
x,
|
|
11567
|
+
x: x2,
|
|
11568
11568
|
y
|
|
11569
11569
|
};
|
|
11570
11570
|
}
|
|
@@ -11576,12 +11576,12 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
11576
11576
|
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
11577
11577
|
const width = element.clientWidth * scale.x;
|
|
11578
11578
|
const height = element.clientHeight * scale.y;
|
|
11579
|
-
const
|
|
11579
|
+
const x2 = left * scale.x;
|
|
11580
11580
|
const y = top * scale.y;
|
|
11581
11581
|
return {
|
|
11582
11582
|
width,
|
|
11583
11583
|
height,
|
|
11584
|
-
x,
|
|
11584
|
+
x: x2,
|
|
11585
11585
|
y
|
|
11586
11586
|
};
|
|
11587
11587
|
}
|
|
@@ -11701,10 +11701,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
11701
11701
|
setLeftRTLScrollbarOffset();
|
|
11702
11702
|
}
|
|
11703
11703
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
11704
|
-
const
|
|
11704
|
+
const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
11705
11705
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
11706
11706
|
return {
|
|
11707
|
-
x,
|
|
11707
|
+
x: x2,
|
|
11708
11708
|
y,
|
|
11709
11709
|
width: rect.width,
|
|
11710
11710
|
height: rect.height
|
|
@@ -12144,12 +12144,12 @@ function useFloating(options) {
|
|
|
12144
12144
|
if (!elements.floating) {
|
|
12145
12145
|
return initialStyles;
|
|
12146
12146
|
}
|
|
12147
|
-
const
|
|
12147
|
+
const x2 = roundByDPR(elements.floating, data.x);
|
|
12148
12148
|
const y = roundByDPR(elements.floating, data.y);
|
|
12149
12149
|
if (transform) {
|
|
12150
12150
|
return {
|
|
12151
12151
|
...initialStyles,
|
|
12152
|
-
transform: "translate(" +
|
|
12152
|
+
transform: "translate(" + x2 + "px, " + y + "px)",
|
|
12153
12153
|
...getDPR(elements.floating) >= 1.5 && {
|
|
12154
12154
|
willChange: "transform"
|
|
12155
12155
|
}
|
|
@@ -12157,7 +12157,7 @@ function useFloating(options) {
|
|
|
12157
12157
|
}
|
|
12158
12158
|
return {
|
|
12159
12159
|
position: strategy,
|
|
12160
|
-
left:
|
|
12160
|
+
left: x2,
|
|
12161
12161
|
top: y
|
|
12162
12162
|
};
|
|
12163
12163
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
@@ -12531,22 +12531,22 @@ var transformOrigin = (options) => ({
|
|
|
12531
12531
|
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
12532
12532
|
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
12533
12533
|
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
12534
|
-
let
|
|
12534
|
+
let x2 = "";
|
|
12535
12535
|
let y = "";
|
|
12536
12536
|
if (placedSide === "bottom") {
|
|
12537
|
-
|
|
12537
|
+
x2 = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
12538
12538
|
y = `${-arrowHeight}px`;
|
|
12539
12539
|
} else if (placedSide === "top") {
|
|
12540
|
-
|
|
12540
|
+
x2 = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
12541
12541
|
y = `${rects.floating.height + arrowHeight}px`;
|
|
12542
12542
|
} else if (placedSide === "right") {
|
|
12543
|
-
|
|
12543
|
+
x2 = `${-arrowHeight}px`;
|
|
12544
12544
|
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
12545
12545
|
} else if (placedSide === "left") {
|
|
12546
|
-
|
|
12546
|
+
x2 = `${rects.floating.width + arrowHeight}px`;
|
|
12547
12547
|
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
12548
12548
|
}
|
|
12549
|
-
return { data: { x, y } };
|
|
12549
|
+
return { data: { x: x2, y } };
|
|
12550
12550
|
}
|
|
12551
12551
|
});
|
|
12552
12552
|
function getSideAndAlignFromPlacement(placement) {
|
|
@@ -14288,9 +14288,9 @@ var MoonUIGestureDrawerProComponent = React71__default.forwardRef(({
|
|
|
14288
14288
|
const isVertical = position === "bottom" || position === "top";
|
|
14289
14289
|
useAnimation();
|
|
14290
14290
|
useAnimation();
|
|
14291
|
-
const
|
|
14291
|
+
const x2 = useMotionValue(0);
|
|
14292
14292
|
const y = useMotionValue(0);
|
|
14293
|
-
const motionValue = isVertical ? y :
|
|
14293
|
+
const motionValue = isVertical ? y : x2;
|
|
14294
14294
|
const [currentSnapPoint, setCurrentSnapPoint] = useState(
|
|
14295
14295
|
defaultSnapPoint || (snapPoints.length > 0 ? snapPoints[0] : 50)
|
|
14296
14296
|
);
|
|
@@ -15137,9 +15137,9 @@ var MagneticButtonInternal = React71.forwardRef(
|
|
|
15137
15137
|
(e) => {
|
|
15138
15138
|
if (enableRipple && buttonRef.current) {
|
|
15139
15139
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
15140
|
-
const
|
|
15140
|
+
const x2 = e.clientX - rect.left;
|
|
15141
15141
|
const y = e.clientY - rect.top;
|
|
15142
|
-
const newRipple = { id: Date.now(), x, y };
|
|
15142
|
+
const newRipple = { id: Date.now(), x: x2, y };
|
|
15143
15143
|
setRipples((prevRipples) => [...prevRipples, newRipple]);
|
|
15144
15144
|
setTimeout(() => {
|
|
15145
15145
|
setRipples((prevRipples) => prevRipples.filter((r2) => r2.id !== newRipple.id));
|
|
@@ -15659,7 +15659,7 @@ var MoonUIMediaGalleryPro = React71.forwardRef(({
|
|
|
15659
15659
|
className
|
|
15660
15660
|
),
|
|
15661
15661
|
style: layout === "masonry" ? { columnGap: "1rem" } : void 0,
|
|
15662
|
-
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((
|
|
15662
|
+
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((_2, i) => /* @__PURE__ */ jsx(React71.Fragment, { children: renderSkeleton() }, i)) }) : sortedItems.length > 0 ? sortedItems.map((item, index2) => renderGalleryItem(item, index2)) : emptyState || /* @__PURE__ */ jsxs("div", { className: "col-span-full flex flex-col items-center justify-center py-12 text-center", children: [
|
|
15663
15663
|
/* @__PURE__ */ jsx(Image$1, { className: "h-12 w-12 text-muted-foreground mb-4" }),
|
|
15664
15664
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No media items found" })
|
|
15665
15665
|
] })
|
|
@@ -16265,16 +16265,16 @@ var GlowCardInternal = forwardRef(
|
|
|
16265
16265
|
if (!cardRef.current)
|
|
16266
16266
|
return;
|
|
16267
16267
|
const rect = cardRef.current.getBoundingClientRect();
|
|
16268
|
-
const
|
|
16268
|
+
const x2 = e.clientX - rect.left;
|
|
16269
16269
|
const y = e.clientY - rect.top;
|
|
16270
16270
|
if (mouseTrack) {
|
|
16271
|
-
setMousePosition({ x, y });
|
|
16271
|
+
setMousePosition({ x: x2, y });
|
|
16272
16272
|
}
|
|
16273
16273
|
if (tilt && !disableAnimations) {
|
|
16274
16274
|
const centerX = rect.width / 2;
|
|
16275
16275
|
const centerY = rect.height / 2;
|
|
16276
16276
|
const rotateX = (y - centerY) / centerY * tiltAngle;
|
|
16277
|
-
const rotateY = (
|
|
16277
|
+
const rotateY = (x2 - centerX) / centerX * -tiltAngle;
|
|
16278
16278
|
setTiltStyle({
|
|
16279
16279
|
transform: `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.02, 1.02, 1.02)`,
|
|
16280
16280
|
transformStyle: "preserve-3d"
|
|
@@ -16477,10 +16477,10 @@ var MoonUIAnimatedButtonProInternal = React71__default.forwardRef(
|
|
|
16477
16477
|
return;
|
|
16478
16478
|
if (ripple) {
|
|
16479
16479
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
16480
|
-
const
|
|
16480
|
+
const x2 = e.clientX - rect.left;
|
|
16481
16481
|
const y = e.clientY - rect.top;
|
|
16482
16482
|
const id = Date.now();
|
|
16483
|
-
setRipples([...ripples, { x, y, id }]);
|
|
16483
|
+
setRipples([...ripples, { x: x2, y, id }]);
|
|
16484
16484
|
setTimeout(() => {
|
|
16485
16485
|
setRipples((prev) => prev.filter((r2) => r2.id !== id));
|
|
16486
16486
|
}, 600);
|
|
@@ -17437,7 +17437,7 @@ var SplashCursorComponent = ({
|
|
|
17437
17437
|
const cleanupSplash = useCallback((splashId) => {
|
|
17438
17438
|
setSplashes((prev) => prev.filter((splash) => splash.id !== splashId));
|
|
17439
17439
|
}, []);
|
|
17440
|
-
const createSplash = useCallback((
|
|
17440
|
+
const createSplash = useCallback((x2, y) => {
|
|
17441
17441
|
const now = Date.now();
|
|
17442
17442
|
if (now - lastSplashTimeRef.current < 16) {
|
|
17443
17443
|
return;
|
|
@@ -17445,7 +17445,7 @@ var SplashCursorComponent = ({
|
|
|
17445
17445
|
lastSplashTimeRef.current = now;
|
|
17446
17446
|
const newSplash = {
|
|
17447
17447
|
id: now + Math.random(),
|
|
17448
|
-
x,
|
|
17448
|
+
x: x2,
|
|
17449
17449
|
y,
|
|
17450
17450
|
timestamp: now
|
|
17451
17451
|
};
|
|
@@ -17474,13 +17474,13 @@ var SplashCursorComponent = ({
|
|
|
17474
17474
|
return;
|
|
17475
17475
|
rafIdRef.current = requestAnimationFrame(() => {
|
|
17476
17476
|
const container = containerRef?.current;
|
|
17477
|
-
let
|
|
17477
|
+
let x2 = e.clientX;
|
|
17478
17478
|
let y = e.clientY;
|
|
17479
17479
|
if (container) {
|
|
17480
17480
|
const rect = container.getBoundingClientRect();
|
|
17481
|
-
|
|
17481
|
+
x2 = e.clientX - rect.left;
|
|
17482
17482
|
y = e.clientY - rect.top;
|
|
17483
|
-
if (
|
|
17483
|
+
if (x2 < 0 || y < 0 || x2 > rect.width || y > rect.height) {
|
|
17484
17484
|
rafIdRef.current = null;
|
|
17485
17485
|
return;
|
|
17486
17486
|
}
|
|
@@ -17491,7 +17491,7 @@ var SplashCursorComponent = ({
|
|
|
17491
17491
|
const distance = calculateDistance(
|
|
17492
17492
|
lastPosRef.current.x,
|
|
17493
17493
|
lastPosRef.current.y,
|
|
17494
|
-
|
|
17494
|
+
x2,
|
|
17495
17495
|
y
|
|
17496
17496
|
);
|
|
17497
17497
|
const speed = distance / timeDiff;
|
|
@@ -17499,37 +17499,37 @@ var SplashCursorComponent = ({
|
|
|
17499
17499
|
if (targetSelector) {
|
|
17500
17500
|
const target = e.target;
|
|
17501
17501
|
if (target?.closest(targetSelector)) {
|
|
17502
|
-
createSplash(
|
|
17502
|
+
createSplash(x2, y);
|
|
17503
17503
|
}
|
|
17504
17504
|
} else {
|
|
17505
|
-
createSplash(
|
|
17505
|
+
createSplash(x2, y);
|
|
17506
17506
|
}
|
|
17507
17507
|
}
|
|
17508
17508
|
}
|
|
17509
|
-
lastPosRef.current = { x, y };
|
|
17509
|
+
lastPosRef.current = { x: x2, y };
|
|
17510
17510
|
lastMoveTimeRef.current = now;
|
|
17511
17511
|
rafIdRef.current = null;
|
|
17512
17512
|
});
|
|
17513
17513
|
}, [threshold, targetSelector, createSplash, containerRef]);
|
|
17514
17514
|
const handleClick2 = useCallback((e) => {
|
|
17515
17515
|
const container = containerRef?.current;
|
|
17516
|
-
let
|
|
17516
|
+
let x2 = e.clientX;
|
|
17517
17517
|
let y = e.clientY;
|
|
17518
17518
|
if (container) {
|
|
17519
17519
|
const rect = container.getBoundingClientRect();
|
|
17520
|
-
|
|
17520
|
+
x2 = e.clientX - rect.left;
|
|
17521
17521
|
y = e.clientY - rect.top;
|
|
17522
|
-
if (
|
|
17522
|
+
if (x2 < 0 || y < 0 || x2 > rect.width || y > rect.height) {
|
|
17523
17523
|
return;
|
|
17524
17524
|
}
|
|
17525
17525
|
}
|
|
17526
17526
|
if (targetSelector) {
|
|
17527
17527
|
const target = e.target;
|
|
17528
17528
|
if (target?.closest(targetSelector)) {
|
|
17529
|
-
createSplash(
|
|
17529
|
+
createSplash(x2, y);
|
|
17530
17530
|
}
|
|
17531
17531
|
} else {
|
|
17532
|
-
createSplash(
|
|
17532
|
+
createSplash(x2, y);
|
|
17533
17533
|
}
|
|
17534
17534
|
}, [targetSelector, createSplash, containerRef]);
|
|
17535
17535
|
useEffect(() => {
|
|
@@ -17588,7 +17588,7 @@ var SplashCursorComponent = ({
|
|
|
17588
17588
|
const particleAngles = useMemo(() => {
|
|
17589
17589
|
if (!showParticles)
|
|
17590
17590
|
return [];
|
|
17591
|
-
return Array.from({ length: particleCount }).map((
|
|
17591
|
+
return Array.from({ length: particleCount }).map((_2, i) => {
|
|
17592
17592
|
const angle = 360 / particleCount * i;
|
|
17593
17593
|
const radian = angle * Math.PI / 180;
|
|
17594
17594
|
return {
|
|
@@ -17815,7 +17815,7 @@ var MarqueeInternal = ({
|
|
|
17815
17815
|
!isPlaying && "animation-paused",
|
|
17816
17816
|
className
|
|
17817
17817
|
),
|
|
17818
|
-
children: Array.from({ length: repeatCount }).map((
|
|
17818
|
+
children: Array.from({ length: repeatCount }).map((_2, i) => /* @__PURE__ */ jsx(
|
|
17819
17819
|
"div",
|
|
17820
17820
|
{
|
|
17821
17821
|
ref: i === 0 ? marqueeRef : void 0,
|
|
@@ -18344,9 +18344,9 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18344
18344
|
const [isFocused, setIsFocused] = useState(false);
|
|
18345
18345
|
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
|
|
18346
18346
|
const rotation = mergedProps.maxRotation || rotationIntensity || 15;
|
|
18347
|
-
const
|
|
18347
|
+
const x2 = useMotionValue(0);
|
|
18348
18348
|
const y = useMotionValue(0);
|
|
18349
|
-
const springX = useSpring(
|
|
18349
|
+
const springX = useSpring(x2, {
|
|
18350
18350
|
...mergedProps.springConfig,
|
|
18351
18351
|
stiffness: mergedProps.springConfig.stiffness * animationSpeed,
|
|
18352
18352
|
damping: mergedProps.springConfig.damping / animationSpeed
|
|
@@ -18384,7 +18384,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18384
18384
|
}
|
|
18385
18385
|
const rotateXValue = (clientY - centerY) / (rect.height / 2);
|
|
18386
18386
|
const rotateYValue = (clientX - centerX) / (rect.width / 2);
|
|
18387
|
-
|
|
18387
|
+
x2.set(rotateYValue);
|
|
18388
18388
|
y.set(rotateXValue);
|
|
18389
18389
|
if (mergedProps.enableShine) {
|
|
18390
18390
|
const normalizedX = (clientX - rect.left) / rect.width;
|
|
@@ -18394,22 +18394,22 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18394
18394
|
if (onRotationChange) {
|
|
18395
18395
|
onRotationChange(rotateX.get(), rotateY.get());
|
|
18396
18396
|
}
|
|
18397
|
-
}, [enableTouch,
|
|
18397
|
+
}, [enableTouch, x2, y, rotateX, rotateY, onRotationChange, mergedProps.enableShine]);
|
|
18398
18398
|
const handleMouseEnter = useCallback(() => {
|
|
18399
18399
|
setIsHovered(true);
|
|
18400
18400
|
onHoverStart?.();
|
|
18401
18401
|
}, [onHoverStart]);
|
|
18402
18402
|
const handleMouseLeave2 = useCallback(() => {
|
|
18403
18403
|
setIsHovered(false);
|
|
18404
|
-
|
|
18404
|
+
x2.set(0);
|
|
18405
18405
|
y.set(0);
|
|
18406
18406
|
onHoverEnd?.();
|
|
18407
|
-
}, [
|
|
18407
|
+
}, [x2, y, onHoverEnd]);
|
|
18408
18408
|
const handleKeyDown3 = useCallback((e) => {
|
|
18409
18409
|
if (!enableKeyboard || !isFocused)
|
|
18410
18410
|
return;
|
|
18411
18411
|
const step = 0.1;
|
|
18412
|
-
let newX =
|
|
18412
|
+
let newX = x2.get();
|
|
18413
18413
|
let newY = y.get();
|
|
18414
18414
|
switch (e.key) {
|
|
18415
18415
|
case "ArrowUp":
|
|
@@ -18424,12 +18424,12 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18424
18424
|
break;
|
|
18425
18425
|
case "ArrowLeft":
|
|
18426
18426
|
newX = Math.max(-0.5, newX - step);
|
|
18427
|
-
|
|
18427
|
+
x2.set(newX);
|
|
18428
18428
|
e.preventDefault();
|
|
18429
18429
|
break;
|
|
18430
18430
|
case "ArrowRight":
|
|
18431
18431
|
newX = Math.min(0.5, newX + step);
|
|
18432
|
-
|
|
18432
|
+
x2.set(newX);
|
|
18433
18433
|
e.preventDefault();
|
|
18434
18434
|
break;
|
|
18435
18435
|
case "Enter":
|
|
@@ -18443,7 +18443,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18443
18443
|
e.preventDefault();
|
|
18444
18444
|
break;
|
|
18445
18445
|
case "Escape":
|
|
18446
|
-
|
|
18446
|
+
x2.set(0);
|
|
18447
18447
|
y.set(0);
|
|
18448
18448
|
setIsHovered(false);
|
|
18449
18449
|
onHoverEnd?.();
|
|
@@ -18453,7 +18453,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18453
18453
|
if (onRotationChange) {
|
|
18454
18454
|
onRotationChange(rotateX.get(), rotateY.get());
|
|
18455
18455
|
}
|
|
18456
|
-
}, [enableKeyboard, isFocused,
|
|
18456
|
+
}, [enableKeyboard, isFocused, x2, y, isHovered, onHoverStart, onHoverEnd, rotateX, rotateY, onRotationChange]);
|
|
18457
18457
|
useEffect(() => {
|
|
18458
18458
|
if (autoFocus && cardRef.current) {
|
|
18459
18459
|
cardRef.current.focus();
|
|
@@ -18708,7 +18708,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18708
18708
|
const [isHovered, setIsHovered] = useState(false);
|
|
18709
18709
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
18710
18710
|
const scale = useMotionValue(initialZoom);
|
|
18711
|
-
const
|
|
18711
|
+
const x2 = useMotionValue(0);
|
|
18712
18712
|
const y = useMotionValue(0);
|
|
18713
18713
|
const constrainedScale = useTransform(scale, (value) => {
|
|
18714
18714
|
return Math.min(Math.max(value, minZoom), maxZoom);
|
|
@@ -18760,15 +18760,15 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18760
18760
|
const centerX = (event.clientX - rect.left) / rect.width - 0.5;
|
|
18761
18761
|
const centerY = (event.clientY - rect.top) / rect.height - 0.5;
|
|
18762
18762
|
const scaleDiff = newScale - currentScale;
|
|
18763
|
-
const currentX =
|
|
18763
|
+
const currentX = x2.get();
|
|
18764
18764
|
const currentY = y.get();
|
|
18765
18765
|
const newX = currentX - centerX * rect.width * scaleDiff;
|
|
18766
18766
|
const newY = currentY - centerY * rect.height * scaleDiff;
|
|
18767
18767
|
if (smoothZoom) {
|
|
18768
|
-
animate(
|
|
18768
|
+
animate(x2, newX, { duration: 0.2 });
|
|
18769
18769
|
animate(y, newY, { duration: 0.2 });
|
|
18770
18770
|
} else {
|
|
18771
|
-
|
|
18771
|
+
x2.set(newX);
|
|
18772
18772
|
y.set(newY);
|
|
18773
18773
|
}
|
|
18774
18774
|
}
|
|
@@ -18782,7 +18782,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18782
18782
|
setShowZoomIndicator(true);
|
|
18783
18783
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
18784
18784
|
}
|
|
18785
|
-
}, [scale,
|
|
18785
|
+
}, [scale, x2, y, minZoom, maxZoom, onZoomChange, wheelScaling, smoothZoom, showIndicator]);
|
|
18786
18786
|
const handleDoubleClick2 = useCallback((event) => {
|
|
18787
18787
|
event.preventDefault();
|
|
18788
18788
|
const currentScale = scale.get();
|
|
@@ -18797,7 +18797,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18797
18797
|
const centerY = (event.clientY - rect.top) / rect.height - 0.5;
|
|
18798
18798
|
const targetX = -centerX * rect.width * (newScale - 1);
|
|
18799
18799
|
const targetY = -centerY * rect.height * (newScale - 1);
|
|
18800
|
-
animate(
|
|
18800
|
+
animate(x2, targetX, {
|
|
18801
18801
|
duration: 0.3,
|
|
18802
18802
|
type: "spring",
|
|
18803
18803
|
stiffness: 300
|
|
@@ -18815,7 +18815,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18815
18815
|
stiffness: 300
|
|
18816
18816
|
});
|
|
18817
18817
|
if (newScale === 1 || doubleTapBehavior === "reset") {
|
|
18818
|
-
animate(
|
|
18818
|
+
animate(x2, 0, { duration: 0.3 });
|
|
18819
18819
|
animate(y, 0, { duration: 0.3 });
|
|
18820
18820
|
}
|
|
18821
18821
|
onZoomChange?.(newScale);
|
|
@@ -18823,7 +18823,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18823
18823
|
setShowZoomIndicator(true);
|
|
18824
18824
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
18825
18825
|
}
|
|
18826
|
-
}, [scale,
|
|
18826
|
+
}, [scale, x2, y, minZoom, maxZoom, initialZoom, onZoomChange, doubleTapBehavior, showIndicator]);
|
|
18827
18827
|
const handleTouchEnd = useCallback((event) => {
|
|
18828
18828
|
const now = Date.now();
|
|
18829
18829
|
const timeSinceLastTap = now - lastTap;
|
|
@@ -18845,7 +18845,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18845
18845
|
type: "spring",
|
|
18846
18846
|
stiffness: 300
|
|
18847
18847
|
});
|
|
18848
|
-
animate(
|
|
18848
|
+
animate(x2, 0, {
|
|
18849
18849
|
duration: 0.3,
|
|
18850
18850
|
type: "spring",
|
|
18851
18851
|
stiffness: 300
|
|
@@ -18856,7 +18856,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18856
18856
|
stiffness: 300
|
|
18857
18857
|
});
|
|
18858
18858
|
onZoomChange?.(initialZoom);
|
|
18859
|
-
}, [scale,
|
|
18859
|
+
}, [scale, x2, y, initialZoom, onZoomChange]);
|
|
18860
18860
|
const zoomIn = useCallback(() => {
|
|
18861
18861
|
const currentScale = scale.get();
|
|
18862
18862
|
const newScale = Math.min(currentScale + zoomStep, maxZoom);
|
|
@@ -18881,10 +18881,10 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18881
18881
|
});
|
|
18882
18882
|
if (newScale < scale.get()) {
|
|
18883
18883
|
const constraints = calculateConstraints();
|
|
18884
|
-
const currentX =
|
|
18884
|
+
const currentX = x2.get();
|
|
18885
18885
|
const currentY = y.get();
|
|
18886
18886
|
if (currentX < constraints.left || currentX > constraints.right) {
|
|
18887
|
-
animate(
|
|
18887
|
+
animate(x2, 0, { duration: 0.3 });
|
|
18888
18888
|
}
|
|
18889
18889
|
if (currentY < constraints.top || currentY > constraints.bottom) {
|
|
18890
18890
|
animate(y, 0, { duration: 0.3 });
|
|
@@ -18895,7 +18895,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18895
18895
|
setShowZoomIndicator(true);
|
|
18896
18896
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
18897
18897
|
}
|
|
18898
|
-
}, [scale, minZoom, zoomStep,
|
|
18898
|
+
}, [scale, minZoom, zoomStep, x2, y, calculateConstraints, onZoomChange, showIndicator]);
|
|
18899
18899
|
useCallback(() => {
|
|
18900
18900
|
resetZoom();
|
|
18901
18901
|
}, [resetZoom]);
|
|
@@ -18957,11 +18957,11 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18957
18957
|
useEffect(() => {
|
|
18958
18958
|
const unsubscribe = scale.onChange(() => {
|
|
18959
18959
|
const constraints = calculateConstraints();
|
|
18960
|
-
const currentX =
|
|
18960
|
+
const currentX = x2.get();
|
|
18961
18961
|
const currentY = y.get();
|
|
18962
18962
|
if (boundaryConstraints) {
|
|
18963
18963
|
if (currentX < constraints.left || currentX > constraints.right) {
|
|
18964
|
-
animate(
|
|
18964
|
+
animate(x2, Math.max(constraints.left, Math.min(constraints.right, currentX)), { duration: 0.2 });
|
|
18965
18965
|
}
|
|
18966
18966
|
if (currentY < constraints.top || currentY > constraints.bottom) {
|
|
18967
18967
|
animate(y, Math.max(constraints.top, Math.min(constraints.bottom, currentY)), { duration: 0.2 });
|
|
@@ -18969,7 +18969,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18969
18969
|
}
|
|
18970
18970
|
});
|
|
18971
18971
|
return unsubscribe;
|
|
18972
|
-
}, [scale,
|
|
18972
|
+
}, [scale, x2, y, calculateConstraints, boundaryConstraints]);
|
|
18973
18973
|
return /* @__PURE__ */ jsxs(
|
|
18974
18974
|
"div",
|
|
18975
18975
|
{
|
|
@@ -18999,7 +18999,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18999
18999
|
onDragEnd: () => setIsDragging(false),
|
|
19000
19000
|
style: {
|
|
19001
19001
|
scale: constrainedScale,
|
|
19002
|
-
x,
|
|
19002
|
+
x: x2,
|
|
19003
19003
|
y
|
|
19004
19004
|
},
|
|
19005
19005
|
className: cn(
|
|
@@ -19240,7 +19240,7 @@ function EventDialog({
|
|
|
19240
19240
|
}
|
|
19241
19241
|
};
|
|
19242
19242
|
const handleTypeChange = (type) => {
|
|
19243
|
-
const selectedType = EVENT_TYPES.find((
|
|
19243
|
+
const selectedType = EVENT_TYPES.find((t2) => t2.value === type);
|
|
19244
19244
|
setFormData((prev) => ({
|
|
19245
19245
|
...prev,
|
|
19246
19246
|
type,
|
|
@@ -19754,7 +19754,7 @@ function CalendarInternal({
|
|
|
19754
19754
|
return dayOfWeek !== 0 && dayOfWeek !== 6;
|
|
19755
19755
|
});
|
|
19756
19756
|
const orderedDaysOfWeek = [...DAYS_OF_WEEK.slice(firstDayOfWeek), ...DAYS_OF_WEEK.slice(0, firstDayOfWeek)];
|
|
19757
|
-
const visibleDaysOfWeek = showWeekends ? orderedDaysOfWeek : orderedDaysOfWeek.filter((
|
|
19757
|
+
const visibleDaysOfWeek = showWeekends ? orderedDaysOfWeek : orderedDaysOfWeek.filter((_2, index2) => {
|
|
19758
19758
|
const actualDay = (index2 + firstDayOfWeek) % 7;
|
|
19759
19759
|
return actualDay !== 0 && actualDay !== 6;
|
|
19760
19760
|
});
|
|
@@ -19796,7 +19796,7 @@ function CalendarInternal({
|
|
|
19796
19796
|
] }),
|
|
19797
19797
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 text-xs", children: [
|
|
19798
19798
|
["S", "M", "T", "W", "T", "F", "S"].map((day, index2) => /* @__PURE__ */ jsx("div", { className: "text-center text-muted-foreground", children: day }, `mini-day-${index2}`)),
|
|
19799
|
-
Array.from({ length: 35 }, (
|
|
19799
|
+
Array.from({ length: 35 }, (_2, i) => {
|
|
19800
19800
|
const date = new Date(miniCalendarDate.getFullYear(), miniCalendarDate.getMonth(), i - new Date(miniCalendarDate.getFullYear(), miniCalendarDate.getMonth(), 1).getDay() + 1);
|
|
19801
19801
|
const isCurrentMonth2 = date.getMonth() === miniCalendarDate.getMonth();
|
|
19802
19802
|
const isToday3 = date.toDateString() === today.toDateString();
|
|
@@ -20041,7 +20041,7 @@ function CalendarInternal({
|
|
|
20041
20041
|
view === "week" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-4", children: [
|
|
20042
20042
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 gap-2", children: [
|
|
20043
20043
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: "Time" }),
|
|
20044
|
-
Array.from({ length: 7 }, (
|
|
20044
|
+
Array.from({ length: 7 }, (_2, i) => {
|
|
20045
20045
|
const date = new Date(currentDate);
|
|
20046
20046
|
date.setDate(date.getDate() - date.getDay() + i);
|
|
20047
20047
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
@@ -20053,9 +20053,9 @@ function CalendarInternal({
|
|
|
20053
20053
|
] }, i);
|
|
20054
20054
|
})
|
|
20055
20055
|
] }),
|
|
20056
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (
|
|
20056
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_2, hour) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 border-b last:border-b-0", children: [
|
|
20057
20057
|
/* @__PURE__ */ jsx("div", { className: "p-2 text-xs text-muted-foreground border-r", children: formatTime2(`${hour.toString().padStart(2, "0")}:00`) }),
|
|
20058
|
-
Array.from({ length: 7 }, (
|
|
20058
|
+
Array.from({ length: 7 }, (_3, dayIndex) => {
|
|
20059
20059
|
const date = new Date(currentDate);
|
|
20060
20060
|
date.setDate(date.getDate() - date.getDay() + dayIndex);
|
|
20061
20061
|
const hourEvents = getEventsForDate(date).filter((event) => {
|
|
@@ -20100,7 +20100,7 @@ function CalendarInternal({
|
|
|
20100
20100
|
month: "long",
|
|
20101
20101
|
day: "numeric"
|
|
20102
20102
|
}) }) }),
|
|
20103
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (
|
|
20103
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_2, hour) => {
|
|
20104
20104
|
const hourEvents = getEventsForDate(currentDate).filter((event) => {
|
|
20105
20105
|
if (!event.startTime)
|
|
20106
20106
|
return false;
|
|
@@ -20163,7 +20163,7 @@ function CalendarInternal({
|
|
|
20163
20163
|
] }, hour);
|
|
20164
20164
|
}) }) })
|
|
20165
20165
|
] }),
|
|
20166
|
-
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (
|
|
20166
|
+
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (_2, i) => {
|
|
20167
20167
|
const date = new Date(currentDate);
|
|
20168
20168
|
date.setDate(date.getDate() + i);
|
|
20169
20169
|
const dayEvents = getEventsForDate(date);
|
|
@@ -21045,7 +21045,7 @@ function AddCardModal({
|
|
|
21045
21045
|
setTagInput("");
|
|
21046
21046
|
}
|
|
21047
21047
|
};
|
|
21048
|
-
[...CARD_TEMPLATES.map((
|
|
21048
|
+
[...CARD_TEMPLATES.map((t2) => ({ ...t2.template, name: t2.name, icon: t2.icon })), ...templates];
|
|
21049
21049
|
return /* @__PURE__ */ jsx(MoonUIDialogPro, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: "max-w-2xl", children: [
|
|
21050
21050
|
/* @__PURE__ */ jsx(MoonUIDialogHeaderPro, { children: /* @__PURE__ */ jsxs(MoonUIDialogTitlePro, { children: [
|
|
21051
21051
|
"Add Card to ",
|
|
@@ -21264,7 +21264,7 @@ function AddCardModal({
|
|
|
21264
21264
|
{
|
|
21265
21265
|
variant: "secondary",
|
|
21266
21266
|
className: "cursor-pointer",
|
|
21267
|
-
onClick: () => setTags(tags.filter((
|
|
21267
|
+
onClick: () => setTags(tags.filter((t2) => t2 !== tag)),
|
|
21268
21268
|
children: [
|
|
21269
21269
|
tag,
|
|
21270
21270
|
/* @__PURE__ */ jsx("span", { className: "ml-1 hover:text-destructive", children: "\xD7" })
|
|
@@ -21522,7 +21522,7 @@ var KanbanCardComponent = ({
|
|
|
21522
21522
|
"dark:shadow-[2px_0_10px_rgba(139,92,246,0.3)]"
|
|
21523
21523
|
),
|
|
21524
21524
|
onPointerDown: (e) => dragControls.start(e),
|
|
21525
|
-
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 flex flex-col justify-center gap-1 opacity-60", children: [...Array(3)].map((
|
|
21525
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 flex flex-col justify-center gap-1 opacity-60", children: [...Array(3)].map((_2, i) => /* @__PURE__ */ jsx("div", { className: "w-0.5 h-0.5 rounded-full bg-primary" }, i)) })
|
|
21526
21526
|
}
|
|
21527
21527
|
),
|
|
21528
21528
|
cardShowCoverImage && card.coverImage && /* @__PURE__ */ jsxs("div", { className: "relative h-32 -mx-px -mt-px rounded-t-lg overflow-hidden", children: [
|
|
@@ -21857,10 +21857,10 @@ function KanbanInternal({
|
|
|
21857
21857
|
if (!container)
|
|
21858
21858
|
return;
|
|
21859
21859
|
const rect = container.getBoundingClientRect();
|
|
21860
|
-
const
|
|
21861
|
-
if (
|
|
21860
|
+
const x2 = e.clientX;
|
|
21861
|
+
if (x2 < rect.left + 100) {
|
|
21862
21862
|
startAutoScroll("left");
|
|
21863
|
-
} else if (
|
|
21863
|
+
} else if (x2 > rect.right - 100) {
|
|
21864
21864
|
startAutoScroll("right");
|
|
21865
21865
|
} else {
|
|
21866
21866
|
stopAutoScroll();
|
|
@@ -23310,7 +23310,7 @@ var Mark = class {
|
|
|
23310
23310
|
*/
|
|
23311
23311
|
toJSON() {
|
|
23312
23312
|
let obj = { type: this.type.name };
|
|
23313
|
-
for (let
|
|
23313
|
+
for (let _2 in this.attrs) {
|
|
23314
23314
|
obj.attrs = this.attrs;
|
|
23315
23315
|
break;
|
|
23316
23316
|
}
|
|
@@ -24258,7 +24258,7 @@ var Node2 = class {
|
|
|
24258
24258
|
*/
|
|
24259
24259
|
toJSON() {
|
|
24260
24260
|
let obj = { type: this.type.name };
|
|
24261
|
-
for (let
|
|
24261
|
+
for (let _2 in this.attrs) {
|
|
24262
24262
|
obj.attrs = this.attrs;
|
|
24263
24263
|
break;
|
|
24264
24264
|
}
|
|
@@ -24987,7 +24987,7 @@ var NodeType = class {
|
|
|
24987
24987
|
throw new RangeError("Schema is missing its top node type ('" + topType + "')");
|
|
24988
24988
|
if (!result.text)
|
|
24989
24989
|
throw new RangeError("Every schema needs a 'text' type");
|
|
24990
|
-
for (let
|
|
24990
|
+
for (let _2 in result.text.attrs)
|
|
24991
24991
|
throw new RangeError("The text node type should not have attributes");
|
|
24992
24992
|
return result;
|
|
24993
24993
|
}
|
|
@@ -28473,7 +28473,7 @@ var Transaction = class extends Transform {
|
|
|
28473
28473
|
and can thus safely be extended.
|
|
28474
28474
|
*/
|
|
28475
28475
|
get isGeneric() {
|
|
28476
|
-
for (let
|
|
28476
|
+
for (let _2 in this.meta)
|
|
28477
28477
|
return false;
|
|
28478
28478
|
return true;
|
|
28479
28479
|
}
|
|
@@ -28914,17 +28914,17 @@ function deepActiveElement(doc3) {
|
|
|
28914
28914
|
elt = elt.shadowRoot.activeElement;
|
|
28915
28915
|
return elt;
|
|
28916
28916
|
}
|
|
28917
|
-
function caretFromPoint(doc3,
|
|
28917
|
+
function caretFromPoint(doc3, x2, y) {
|
|
28918
28918
|
if (doc3.caretPositionFromPoint) {
|
|
28919
28919
|
try {
|
|
28920
|
-
let pos = doc3.caretPositionFromPoint(
|
|
28920
|
+
let pos = doc3.caretPositionFromPoint(x2, y);
|
|
28921
28921
|
if (pos)
|
|
28922
28922
|
return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) };
|
|
28923
|
-
} catch (
|
|
28923
|
+
} catch (_2) {
|
|
28924
28924
|
}
|
|
28925
28925
|
}
|
|
28926
28926
|
if (doc3.caretRangeFromPoint) {
|
|
28927
|
-
let range = doc3.caretRangeFromPoint(
|
|
28927
|
+
let range = doc3.caretRangeFromPoint(x2, y);
|
|
28928
28928
|
if (range)
|
|
28929
28929
|
return { node: range.startContainer, offset: Math.min(nodeSize(range.startContainer), range.startOffset) };
|
|
28930
28930
|
}
|
|
@@ -29023,8 +29023,8 @@ function scrollRectIntoView(view, rect, startDOM) {
|
|
|
29023
29023
|
function storeScrollPos(view) {
|
|
29024
29024
|
let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);
|
|
29025
29025
|
let refDOM, refTop;
|
|
29026
|
-
for (let
|
|
29027
|
-
let dom = view.root.elementFromPoint(
|
|
29026
|
+
for (let x2 = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {
|
|
29027
|
+
let dom = view.root.elementFromPoint(x2, y);
|
|
29028
29028
|
if (!dom || dom == view.dom || !view.dom.contains(dom))
|
|
29029
29029
|
continue;
|
|
29030
29030
|
let localRect = dom.getBoundingClientRect();
|
|
@@ -29320,8 +29320,8 @@ function coordsAtPos(view, pos, side) {
|
|
|
29320
29320
|
function flattenV(rect, left) {
|
|
29321
29321
|
if (rect.width == 0)
|
|
29322
29322
|
return rect;
|
|
29323
|
-
let
|
|
29324
|
-
return { top: rect.top, bottom: rect.bottom, left:
|
|
29323
|
+
let x2 = left ? rect.left : rect.right;
|
|
29324
|
+
return { top: rect.top, bottom: rect.bottom, left: x2, right: x2 };
|
|
29325
29325
|
}
|
|
29326
29326
|
function flattenH(rect, top) {
|
|
29327
29327
|
if (rect.height == 0)
|
|
@@ -29399,7 +29399,7 @@ function endOfTextblockHorizontal(view, state, dir) {
|
|
|
29399
29399
|
sel.collapse(anchorNode, anchorOffset);
|
|
29400
29400
|
if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend)
|
|
29401
29401
|
sel.extend(oldNode, oldOff);
|
|
29402
|
-
} catch (
|
|
29402
|
+
} catch (_2) {
|
|
29403
29403
|
}
|
|
29404
29404
|
if (oldBidiLevel != null)
|
|
29405
29405
|
sel.caretBidiLevel = oldBidiLevel;
|
|
@@ -29740,7 +29740,7 @@ var ViewDesc = class {
|
|
|
29740
29740
|
if (anchor != head)
|
|
29741
29741
|
domSel.extend(headDOM.node, headDOM.offset);
|
|
29742
29742
|
domSelExtended = true;
|
|
29743
|
-
} catch (
|
|
29743
|
+
} catch (_2) {
|
|
29744
29744
|
}
|
|
29745
29745
|
}
|
|
29746
29746
|
if (!domSelExtended) {
|
|
@@ -30942,7 +30942,7 @@ function hasSelection(view) {
|
|
|
30942
30942
|
return false;
|
|
30943
30943
|
try {
|
|
30944
30944
|
return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));
|
|
30945
|
-
} catch (
|
|
30945
|
+
} catch (_2) {
|
|
30946
30946
|
return false;
|
|
30947
30947
|
}
|
|
30948
30948
|
}
|
|
@@ -32119,7 +32119,7 @@ handlers.dragend = (view) => {
|
|
|
32119
32119
|
view.dragging = null;
|
|
32120
32120
|
}, 50);
|
|
32121
32121
|
};
|
|
32122
|
-
editHandlers.dragover = editHandlers.dragenter = (
|
|
32122
|
+
editHandlers.dragover = editHandlers.dragenter = (_2, e) => e.preventDefault();
|
|
32123
32123
|
editHandlers.drop = (view, _event) => {
|
|
32124
32124
|
let event = _event;
|
|
32125
32125
|
let dragging = view.dragging;
|
|
@@ -32263,7 +32263,7 @@ var InlineType = class {
|
|
|
32263
32263
|
let to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset4;
|
|
32264
32264
|
return from2 >= to ? null : new Decoration(from2, to, this);
|
|
32265
32265
|
}
|
|
32266
|
-
valid(
|
|
32266
|
+
valid(_2, span) {
|
|
32267
32267
|
return span.from < span.to;
|
|
32268
32268
|
}
|
|
32269
32269
|
eq(other) {
|
|
@@ -33946,7 +33946,7 @@ function changedNodeViews(a, b) {
|
|
|
33946
33946
|
return true;
|
|
33947
33947
|
nA++;
|
|
33948
33948
|
}
|
|
33949
|
-
for (let
|
|
33949
|
+
for (let _2 in b)
|
|
33950
33950
|
nB++;
|
|
33951
33951
|
return nA != nB;
|
|
33952
33952
|
}
|
|
@@ -35556,7 +35556,7 @@ function removeDuplicates(array, by = JSON.stringify) {
|
|
|
35556
35556
|
function simplifyChangedRanges(changes) {
|
|
35557
35557
|
const uniqueChanges = removeDuplicates(changes);
|
|
35558
35558
|
return uniqueChanges.length === 1 ? uniqueChanges : uniqueChanges.filter((change, index2) => {
|
|
35559
|
-
const rest = uniqueChanges.filter((
|
|
35559
|
+
const rest = uniqueChanges.filter((_2, i) => i !== index2);
|
|
35560
35560
|
return !rest.some((otherChange) => {
|
|
35561
35561
|
return change.oldRange.from >= otherChange.oldRange.from && change.oldRange.to <= otherChange.oldRange.to && change.newRange.from >= otherChange.newRange.from && change.newRange.to <= otherChange.newRange.to;
|
|
35562
35562
|
});
|
|
@@ -38001,7 +38001,7 @@ var Drop = Extension.create({
|
|
|
38001
38001
|
new Plugin({
|
|
38002
38002
|
key: new PluginKey("tiptapDrop"),
|
|
38003
38003
|
props: {
|
|
38004
|
-
handleDrop: (
|
|
38004
|
+
handleDrop: (_2, e, slice2, moved) => {
|
|
38005
38005
|
this.editor.emit("drop", {
|
|
38006
38006
|
editor: this.editor,
|
|
38007
38007
|
event: e,
|
|
@@ -40543,7 +40543,7 @@ function registerGroup(name, groups) {
|
|
|
40543
40543
|
}
|
|
40544
40544
|
return groups[name];
|
|
40545
40545
|
}
|
|
40546
|
-
function addToGroups(
|
|
40546
|
+
function addToGroups(t2, flags, groups) {
|
|
40547
40547
|
if (flags[numeric]) {
|
|
40548
40548
|
flags[asciinumeric] = true;
|
|
40549
40549
|
flags[alphanumeric] = true;
|
|
@@ -40566,15 +40566,15 @@ function addToGroups(t, flags, groups) {
|
|
|
40566
40566
|
}
|
|
40567
40567
|
for (const k in flags) {
|
|
40568
40568
|
const group = registerGroup(k, groups);
|
|
40569
|
-
if (group.indexOf(
|
|
40570
|
-
group.push(
|
|
40569
|
+
if (group.indexOf(t2) < 0) {
|
|
40570
|
+
group.push(t2);
|
|
40571
40571
|
}
|
|
40572
40572
|
}
|
|
40573
40573
|
}
|
|
40574
|
-
function flagsForToken(
|
|
40574
|
+
function flagsForToken(t2, groups) {
|
|
40575
40575
|
const result = {};
|
|
40576
40576
|
for (const c2 in groups) {
|
|
40577
|
-
if (groups[c2].indexOf(
|
|
40577
|
+
if (groups[c2].indexOf(t2) >= 0) {
|
|
40578
40578
|
result[c2] = true;
|
|
40579
40579
|
}
|
|
40580
40580
|
}
|
|
@@ -40712,7 +40712,7 @@ State.prototype = {
|
|
|
40712
40712
|
state.j[input] = next;
|
|
40713
40713
|
return next;
|
|
40714
40714
|
}
|
|
40715
|
-
const
|
|
40715
|
+
const t2 = next;
|
|
40716
40716
|
let nextState, templateState = state.go(input);
|
|
40717
40717
|
if (templateState) {
|
|
40718
40718
|
nextState = new State();
|
|
@@ -40723,16 +40723,16 @@ State.prototype = {
|
|
|
40723
40723
|
} else {
|
|
40724
40724
|
nextState = new State();
|
|
40725
40725
|
}
|
|
40726
|
-
if (
|
|
40726
|
+
if (t2) {
|
|
40727
40727
|
if (groups) {
|
|
40728
40728
|
if (nextState.t && typeof nextState.t === "string") {
|
|
40729
40729
|
const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags);
|
|
40730
|
-
addToGroups(
|
|
40730
|
+
addToGroups(t2, allFlags, groups);
|
|
40731
40731
|
} else if (flags) {
|
|
40732
|
-
addToGroups(
|
|
40732
|
+
addToGroups(t2, flags, groups);
|
|
40733
40733
|
}
|
|
40734
40734
|
}
|
|
40735
|
-
nextState.t =
|
|
40735
|
+
nextState.t = t2;
|
|
40736
40736
|
}
|
|
40737
40737
|
state.j[input] = nextState;
|
|
40738
40738
|
return nextState;
|
|
@@ -41087,7 +41087,7 @@ function stringToArray(str) {
|
|
|
41087
41087
|
}
|
|
41088
41088
|
return result;
|
|
41089
41089
|
}
|
|
41090
|
-
function fastts(state, input,
|
|
41090
|
+
function fastts(state, input, t2, defaultt, jr) {
|
|
41091
41091
|
let next;
|
|
41092
41092
|
const len = input.length;
|
|
41093
41093
|
for (let i = 0; i < len - 1; i++) {
|
|
@@ -41101,7 +41101,7 @@ function fastts(state, input, t, defaultt, jr) {
|
|
|
41101
41101
|
}
|
|
41102
41102
|
state = next;
|
|
41103
41103
|
}
|
|
41104
|
-
next = new State(
|
|
41104
|
+
next = new State(t2);
|
|
41105
41105
|
next.jr = jr.slice();
|
|
41106
41106
|
state.j[input[len - 1]] = next;
|
|
41107
41107
|
return next;
|
|
@@ -41729,7 +41729,7 @@ function autolink(options) {
|
|
|
41729
41729
|
if (!lastWordBeforeSpace) {
|
|
41730
41730
|
return false;
|
|
41731
41731
|
}
|
|
41732
|
-
const linksBeforeSpace = tokenize(lastWordBeforeSpace).map((
|
|
41732
|
+
const linksBeforeSpace = tokenize(lastWordBeforeSpace).map((t2) => t2.toObject(options.defaultProtocol));
|
|
41733
41733
|
if (!isValidLinkStructure(linksBeforeSpace)) {
|
|
41734
41734
|
return false;
|
|
41735
41735
|
}
|
|
@@ -43989,7 +43989,7 @@ var TrailingNode = Extension.create({
|
|
|
43989
43989
|
return [
|
|
43990
43990
|
new Plugin({
|
|
43991
43991
|
key: plugin,
|
|
43992
|
-
appendTransaction: (
|
|
43992
|
+
appendTransaction: (_2, __, state) => {
|
|
43993
43993
|
const { doc: doc3, tr: tr2, schema } = state;
|
|
43994
43994
|
const shouldInsertNodeAtEnd = plugin.getState(state);
|
|
43995
43995
|
const endPosition = doc3.content.size;
|
|
@@ -44000,7 +44000,7 @@ var TrailingNode = Extension.create({
|
|
|
44000
44000
|
return tr2.insert(endPosition, type.create());
|
|
44001
44001
|
},
|
|
44002
44002
|
state: {
|
|
44003
|
-
init: (
|
|
44003
|
+
init: (_2, state) => {
|
|
44004
44004
|
const lastNode = state.tr.doc.lastChild;
|
|
44005
44005
|
return !nodeEqualsType({ node: lastNode, types: disabledNodes });
|
|
44006
44006
|
},
|
|
@@ -46074,7 +46074,7 @@ function handleTripleClick2(view, pos) {
|
|
|
46074
46074
|
view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));
|
|
46075
46075
|
return true;
|
|
46076
46076
|
}
|
|
46077
|
-
function handlePaste(view,
|
|
46077
|
+
function handlePaste(view, _2, slice2) {
|
|
46078
46078
|
if (!isInTable(view.state))
|
|
46079
46079
|
return false;
|
|
46080
46080
|
let cells = pastedCells(slice2);
|
|
@@ -46289,7 +46289,7 @@ function columnResizing({
|
|
|
46289
46289
|
const plugin = new Plugin({
|
|
46290
46290
|
key: columnResizingPluginKey,
|
|
46291
46291
|
state: {
|
|
46292
|
-
init(
|
|
46292
|
+
init(_2, state) {
|
|
46293
46293
|
var _a2, _b;
|
|
46294
46294
|
const nodeViews = (_b = (_a2 = plugin.spec) == null ? void 0 : _a2.props) == null ? void 0 : _b.nodeViews;
|
|
46295
46295
|
const tableName = tableNodeTypes(state.schema).table.name;
|
|
@@ -46607,7 +46607,7 @@ function tableEditing({
|
|
|
46607
46607
|
handleKeyDown: handleKeyDown2,
|
|
46608
46608
|
handlePaste
|
|
46609
46609
|
},
|
|
46610
|
-
appendTransaction(
|
|
46610
|
+
appendTransaction(_2, oldState, state) {
|
|
46611
46611
|
return normalizeSelection(
|
|
46612
46612
|
state,
|
|
46613
46613
|
fixTables(state, oldState),
|
|
@@ -47642,7 +47642,7 @@ function LowlightPlugin({
|
|
|
47642
47642
|
const lowlightPlugin = new Plugin({
|
|
47643
47643
|
key: new PluginKey("lowlight"),
|
|
47644
47644
|
state: {
|
|
47645
|
-
init: (
|
|
47645
|
+
init: (_2, { doc: doc3 }) => getDecorations({
|
|
47646
47646
|
doc: doc3,
|
|
47647
47647
|
name,
|
|
47648
47648
|
lowlight: lowlight2,
|
|
@@ -51643,7 +51643,7 @@ var NUMERIC = {
|
|
|
51643
51643
|
function recurRegex(re, substitution, depth) {
|
|
51644
51644
|
if (depth === -1)
|
|
51645
51645
|
return "";
|
|
51646
|
-
return re.replace(substitution, (
|
|
51646
|
+
return re.replace(substitution, (_2) => {
|
|
51647
51647
|
return recurRegex(re, substitution, depth - 1);
|
|
51648
51648
|
});
|
|
51649
51649
|
}
|
|
@@ -52357,7 +52357,7 @@ function javascript(hljs) {
|
|
|
52357
52357
|
...BUILT_IN_GLOBALS,
|
|
52358
52358
|
"super",
|
|
52359
52359
|
"import"
|
|
52360
|
-
].map((
|
|
52360
|
+
].map((x2) => `${x2}\\s*\\(`)),
|
|
52361
52361
|
IDENT_RE$1,
|
|
52362
52362
|
regex.lookahead(/\s*\(/)
|
|
52363
52363
|
),
|
|
@@ -58576,7 +58576,7 @@ function sql(hljs) {
|
|
|
58576
58576
|
illegal: /[{}]|<\//,
|
|
58577
58577
|
keywords: {
|
|
58578
58578
|
$pattern: /\b[\w\.]+/,
|
|
58579
|
-
keyword: reduceRelevancy(KEYWORDS3, { when: (
|
|
58579
|
+
keyword: reduceRelevancy(KEYWORDS3, { when: (x2) => x2.length < 3 }),
|
|
58580
58580
|
literal: LITERALS3,
|
|
58581
58581
|
type: TYPES3,
|
|
58582
58582
|
built_in: POSSIBLE_WITHOUT_PARENS
|
|
@@ -58611,7 +58611,7 @@ function lookahead(re) {
|
|
|
58611
58611
|
return concat("(?=", re, ")");
|
|
58612
58612
|
}
|
|
58613
58613
|
function concat(...args) {
|
|
58614
|
-
const joined = args.map((
|
|
58614
|
+
const joined = args.map((x2) => source(x2)).join("");
|
|
58615
58615
|
return joined;
|
|
58616
58616
|
}
|
|
58617
58617
|
function stripOptionsFromArgs(args) {
|
|
@@ -58625,7 +58625,7 @@ function stripOptionsFromArgs(args) {
|
|
|
58625
58625
|
}
|
|
58626
58626
|
function either(...args) {
|
|
58627
58627
|
const opts = stripOptionsFromArgs(args);
|
|
58628
|
-
const joined = "(" + (opts.capture ? "" : "?:") + args.map((
|
|
58628
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x2) => source(x2)).join("|") + ")";
|
|
58629
58629
|
return joined;
|
|
58630
58630
|
}
|
|
58631
58631
|
var keywordWrapper = (keyword) => concat(
|
|
@@ -59965,7 +59965,7 @@ function javascript2(hljs) {
|
|
|
59965
59965
|
...BUILT_IN_GLOBALS2,
|
|
59966
59966
|
"super",
|
|
59967
59967
|
"import"
|
|
59968
|
-
].map((
|
|
59968
|
+
].map((x2) => `${x2}\\s*\\(`)),
|
|
59969
59969
|
IDENT_RE$1,
|
|
59970
59970
|
regex.lookahead(/\s*\(/)
|
|
59971
59971
|
),
|
|
@@ -64478,7 +64478,7 @@ function useVirtualList(items, initialConfig = {}) {
|
|
|
64478
64478
|
});
|
|
64479
64479
|
}, []);
|
|
64480
64480
|
const selectAll3 = useCallback(() => {
|
|
64481
|
-
setSelectedItems(new Set(Array.from({ length: items.length }, (
|
|
64481
|
+
setSelectedItems(new Set(Array.from({ length: items.length }, (_2, i) => i)));
|
|
64482
64482
|
}, [items.length]);
|
|
64483
64483
|
const clearSelection = useCallback(() => {
|
|
64484
64484
|
setSelectedItems(/* @__PURE__ */ new Set());
|
|
@@ -64654,10 +64654,10 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64654
64654
|
style: style2,
|
|
64655
64655
|
...props
|
|
64656
64656
|
}, ref) => {
|
|
64657
|
-
const
|
|
64658
|
-
const rotate = useTransform(
|
|
64659
|
-
const likeOpacity = useTransform(
|
|
64660
|
-
const nopeOpacity = useTransform(
|
|
64657
|
+
const x2 = useMotionValue(0);
|
|
64658
|
+
const rotate = useTransform(x2, [-200, 200], [-30, 30]);
|
|
64659
|
+
const likeOpacity = useTransform(x2, [0, threshold], [0, 1]);
|
|
64660
|
+
const nopeOpacity = useTransform(x2, [-threshold, 0], [1, 0]);
|
|
64661
64661
|
const handleDragStart = () => {
|
|
64662
64662
|
if (disabled)
|
|
64663
64663
|
return;
|
|
@@ -64670,14 +64670,14 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64670
64670
|
if (Math.abs(info.offset.x) > threshold) {
|
|
64671
64671
|
const direction = info.offset.x > 0 ? "right" : "left";
|
|
64672
64672
|
const exitX = info.offset.x > 0 ? 400 : -400;
|
|
64673
|
-
animate(
|
|
64673
|
+
animate(x2, exitX, { duration: 0.3 });
|
|
64674
64674
|
if (direction === "right" && onSwipeRight) {
|
|
64675
64675
|
onSwipeRight();
|
|
64676
64676
|
} else if (direction === "left" && onSwipeLeft) {
|
|
64677
64677
|
onSwipeLeft();
|
|
64678
64678
|
}
|
|
64679
64679
|
} else {
|
|
64680
|
-
animate(
|
|
64680
|
+
animate(x2, 0, { type: "spring", stiffness: 300, damping: 20 });
|
|
64681
64681
|
}
|
|
64682
64682
|
};
|
|
64683
64683
|
return /* @__PURE__ */ jsxs(
|
|
@@ -64686,7 +64686,7 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64686
64686
|
ref,
|
|
64687
64687
|
drag: disabled ? false : "x",
|
|
64688
64688
|
dragConstraints: { left: -300, right: 300 },
|
|
64689
|
-
style: { x, rotate, ...style2 },
|
|
64689
|
+
style: { x: x2, rotate, ...style2 },
|
|
64690
64690
|
onDragStart: handleDragStart,
|
|
64691
64691
|
onDragEnd: handleDragEnd,
|
|
64692
64692
|
className: cn(
|
|
@@ -66053,7 +66053,7 @@ var SparklinePreview = ({ data, dataKey, color }) => {
|
|
|
66053
66053
|
}
|
|
66054
66054
|
) });
|
|
66055
66055
|
};
|
|
66056
|
-
var ChartSkeleton = ({ height }) => /* @__PURE__ */ jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsx("div", { className: "flex items-end justify-center h-full gap-2 px-8", children: [...Array(8)].map((
|
|
66056
|
+
var ChartSkeleton = ({ height }) => /* @__PURE__ */ jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsx("div", { className: "flex items-end justify-center h-full gap-2 px-8", children: [...Array(8)].map((_2, i) => /* @__PURE__ */ jsx(
|
|
66057
66057
|
motion.div,
|
|
66058
66058
|
{
|
|
66059
66059
|
initial: { height: 0 },
|
|
@@ -67056,9 +67056,9 @@ function MetricCard({
|
|
|
67056
67056
|
const min2 = Math.min(...data.sparkline);
|
|
67057
67057
|
const range = max2 - min2 || 1;
|
|
67058
67058
|
const points = data.sparkline.map((value, index2) => {
|
|
67059
|
-
const
|
|
67059
|
+
const x2 = index2 / (data.sparkline.length - 1) * 100;
|
|
67060
67060
|
const y = 100 - (value - min2) / range * 100;
|
|
67061
|
-
return `${
|
|
67061
|
+
return `${x2},${y}`;
|
|
67062
67062
|
}).join(" ");
|
|
67063
67063
|
const gradientId = `gradient-${data.id}`;
|
|
67064
67064
|
return /* @__PURE__ */ jsx(
|
|
@@ -67883,7 +67883,7 @@ function ActivityFeed({
|
|
|
67883
67883
|
animate: { opacity: 1 },
|
|
67884
67884
|
exit: { opacity: 0 },
|
|
67885
67885
|
className: "space-y-3",
|
|
67886
|
-
children: [...Array(5)].map((
|
|
67886
|
+
children: [...Array(5)].map((_2, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
67887
67887
|
/* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-muted animate-pulse" }),
|
|
67888
67888
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
67889
67889
|
/* @__PURE__ */ jsx("div", { className: "h-4 bg-muted rounded animate-pulse" }),
|
|
@@ -68895,13 +68895,13 @@ function MapWidget({
|
|
|
68895
68895
|
className: "relative w-full h-full",
|
|
68896
68896
|
style: { transform: `scale(${zoom})` },
|
|
68897
68897
|
children: locations.map((location, index2) => {
|
|
68898
|
-
const
|
|
68898
|
+
const x2 = (location.lng + 180) / 360 * 100;
|
|
68899
68899
|
const y = (90 - location.lat) / 180 * 100;
|
|
68900
68900
|
return /* @__PURE__ */ jsxs(
|
|
68901
68901
|
motion.div,
|
|
68902
68902
|
{
|
|
68903
68903
|
className: "absolute",
|
|
68904
|
-
style: { left: `${
|
|
68904
|
+
style: { left: `${x2}%`, top: `${y}%` },
|
|
68905
68905
|
initial: { scale: 0 },
|
|
68906
68906
|
animate: { scale: 1 },
|
|
68907
68907
|
transition: { delay: index2 * 0.05 },
|
|
@@ -70990,7 +70990,7 @@ var AdvancedFormsInternal = ({
|
|
|
70990
70990
|
[fieldName]: newFiles
|
|
70991
70991
|
};
|
|
70992
70992
|
});
|
|
70993
|
-
setValue(fieldName, uploadedFiles[fieldName]?.filter((
|
|
70993
|
+
setValue(fieldName, uploadedFiles[fieldName]?.filter((_2, i) => i !== index2) || []);
|
|
70994
70994
|
};
|
|
70995
70995
|
const renderField = (field, index2) => {
|
|
70996
70996
|
const error = errors[field.name];
|
|
@@ -72608,7 +72608,7 @@ var GitHubStarsInternal = ({
|
|
|
72608
72608
|
] }),
|
|
72609
72609
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
72610
72610
|
layout === "grid" ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-4"
|
|
72611
|
-
), children: Array.from({ length: maxItems || 6 }).map((
|
|
72611
|
+
), children: Array.from({ length: maxItems || 6 }).map((_2, index2) => /* @__PURE__ */ jsx(MoonUICardPro, { children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
72612
72612
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-5 w-3/4" }),
|
|
72613
72613
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-4 w-full" }),
|
|
72614
72614
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-4 w-2/3" }),
|
|
@@ -75339,7 +75339,7 @@ var MoonUIFileUploadPro = React71__default.forwardRef(
|
|
|
75339
75339
|
return `File type ${file.type} is not supported`;
|
|
75340
75340
|
}
|
|
75341
75341
|
if (accept !== "*") {
|
|
75342
|
-
const acceptTypes = accept.split(",").map((
|
|
75342
|
+
const acceptTypes = accept.split(",").map((t2) => t2.trim());
|
|
75343
75343
|
const isAccepted = acceptTypes.some((acceptType) => {
|
|
75344
75344
|
if (acceptType.includes("*")) {
|
|
75345
75345
|
return file.type.startsWith(acceptType.replace("*", ""));
|
|
@@ -76641,7 +76641,7 @@ function DataTableFilterDrawer({
|
|
|
76641
76641
|
setFilters(newFilters);
|
|
76642
76642
|
};
|
|
76643
76643
|
const removeFilter = (index2) => {
|
|
76644
|
-
setFilters(filters.filter((
|
|
76644
|
+
setFilters(filters.filter((_2, i) => i !== index2));
|
|
76645
76645
|
};
|
|
76646
76646
|
const clearAllFilters = () => {
|
|
76647
76647
|
setFilters([]);
|
|
@@ -79703,10 +79703,17 @@ function NavbarInternal({
|
|
|
79703
79703
|
"absolute h-0.5 bg-muted transition-all",
|
|
79704
79704
|
// progressBarInset kontrolü - border-radius içinde mi dışında mı
|
|
79705
79705
|
progressBarInset ? cn(
|
|
79706
|
-
"bottom-1
|
|
79707
|
-
// İçeriden positioning (mx-2 yerine)
|
|
79708
|
-
"overflow-hidden",
|
|
79706
|
+
"bottom-1 overflow-hidden",
|
|
79709
79707
|
// İçerideki progress bar taşmasın
|
|
79708
|
+
// Variant'a göre positioning - navbar padding ile uyumlu
|
|
79709
|
+
variant === "floating-centered" && "left-6 right-6",
|
|
79710
|
+
// px-6 ile uyumlu
|
|
79711
|
+
variant === "floating" && "left-4 right-4",
|
|
79712
|
+
// mx-4 margin ile uyumlu
|
|
79713
|
+
(!variant || variant === "default") && "left-2 right-2",
|
|
79714
|
+
// minimal padding
|
|
79715
|
+
variant === "minimal" && "left-2 right-2",
|
|
79716
|
+
variant === "transparent" && "left-2 right-2",
|
|
79710
79717
|
// Border-radius uyumu
|
|
79711
79718
|
rounded && "rounded-b-lg",
|
|
79712
79719
|
variant === "floating-centered" && "rounded-b-2xl",
|
|
@@ -80377,7 +80384,7 @@ var FormWizardProgress = ({
|
|
|
80377
80384
|
"flex items-center justify-center space-x-2",
|
|
80378
80385
|
className
|
|
80379
80386
|
),
|
|
80380
|
-
children: steps.map((
|
|
80387
|
+
children: steps.map((_2, index2) => {
|
|
80381
80388
|
const isActive2 = index2 === currentStep;
|
|
80382
80389
|
const isCompleted = isStepCompleted(index2);
|
|
80383
80390
|
return /* @__PURE__ */ jsx(
|
|
@@ -81701,7 +81708,7 @@ var MoonUIQuizFormProInternal = React71__default.forwardRef(({
|
|
|
81701
81708
|
animate: { opacity: 1, y: 0 },
|
|
81702
81709
|
className: "space-y-4",
|
|
81703
81710
|
children: [
|
|
81704
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center gap-2", children: Array.from({ length: maxRating }, (
|
|
81711
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center gap-2", children: Array.from({ length: maxRating }, (_2, i) => i + 1).map((rating) => /* @__PURE__ */ jsx(
|
|
81705
81712
|
"button",
|
|
81706
81713
|
{
|
|
81707
81714
|
onClick: () => saveAnswer(rating),
|
|
@@ -83642,9 +83649,9 @@ function ChartWidget2({
|
|
|
83642
83649
|
const chartWidth = 100 - padding * 2;
|
|
83643
83650
|
const chartHeight = 100 - padding * 2;
|
|
83644
83651
|
const points = values.map((value, index2) => {
|
|
83645
|
-
const
|
|
83652
|
+
const x2 = padding + index2 / (values.length - 1) * chartWidth;
|
|
83646
83653
|
const y = padding + (chartHeight - value / maxValue * chartHeight);
|
|
83647
|
-
return { x, y, value, label: labels[index2] };
|
|
83654
|
+
return { x: x2, y, value, label: labels[index2] };
|
|
83648
83655
|
});
|
|
83649
83656
|
const pathData = points.map((point, index2) => `${index2 === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" ");
|
|
83650
83657
|
return /* @__PURE__ */ jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
@@ -85430,20 +85437,29 @@ var roundedClasses = {
|
|
|
85430
85437
|
};
|
|
85431
85438
|
var BentoGridInternal = ({
|
|
85432
85439
|
children,
|
|
85433
|
-
columns =
|
|
85440
|
+
columns = 3,
|
|
85441
|
+
// Changed from 4 to 3 (more common use case)
|
|
85434
85442
|
gap = "md",
|
|
85435
85443
|
className,
|
|
85436
85444
|
responsive = true,
|
|
85437
85445
|
autoFit = false
|
|
85438
85446
|
}) => {
|
|
85447
|
+
const hasCustomGridCols = className?.includes("grid-cols");
|
|
85439
85448
|
const gridClass = cn(
|
|
85440
85449
|
"grid w-full",
|
|
85441
|
-
!autoFit && columnClasses[columns],
|
|
85450
|
+
!autoFit && !hasCustomGridCols && columnClasses[columns],
|
|
85442
85451
|
gapSizes[gap],
|
|
85443
|
-
|
|
85444
|
-
|
|
85445
|
-
|
|
85446
|
-
|
|
85452
|
+
// Only add responsive classes if:
|
|
85453
|
+
// 1. responsive is true
|
|
85454
|
+
// 2. autoFit is false
|
|
85455
|
+
// 3. user hasn't provided custom grid-cols
|
|
85456
|
+
responsive && !autoFit && !hasCustomGridCols && [
|
|
85457
|
+
"grid-cols-1",
|
|
85458
|
+
// Mobile first
|
|
85459
|
+
"sm:grid-cols-2",
|
|
85460
|
+
// Small screens
|
|
85461
|
+
columns === 3 ? "md:grid-cols-3" : `lg:grid-cols-${columns}`
|
|
85462
|
+
// Medium+ screens
|
|
85447
85463
|
],
|
|
85448
85464
|
autoFit && "grid-cols-[repeat(auto-fit,minmax(250px,1fr))]",
|
|
85449
85465
|
className
|
|
@@ -85690,12 +85706,12 @@ var ConfettiButtonInternal = ({
|
|
|
85690
85706
|
}) => {
|
|
85691
85707
|
const handleClick2 = (e) => {
|
|
85692
85708
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
85693
|
-
const
|
|
85709
|
+
const x2 = (rect.left + rect.width / 2) / window.innerWidth;
|
|
85694
85710
|
const y = (rect.top + rect.height / 2) / window.innerHeight;
|
|
85695
85711
|
confetti2({
|
|
85696
85712
|
particleCount: 100,
|
|
85697
85713
|
spread: 70,
|
|
85698
|
-
origin: { x, y },
|
|
85714
|
+
origin: { x: x2, y },
|
|
85699
85715
|
...confettiOptions
|
|
85700
85716
|
});
|
|
85701
85717
|
onClick?.(e);
|
|
@@ -85920,11 +85936,11 @@ var CursorTrailInternal = ({
|
|
|
85920
85936
|
const [trails, setTrails] = useState([]);
|
|
85921
85937
|
const [isVisible, setIsVisible] = useState(false);
|
|
85922
85938
|
const idRef = useRef(0);
|
|
85923
|
-
const addTrailPoint = useCallback((
|
|
85939
|
+
const addTrailPoint = useCallback((x2, y) => {
|
|
85924
85940
|
if (!enabled)
|
|
85925
85941
|
return;
|
|
85926
85942
|
const newPoint = {
|
|
85927
|
-
x,
|
|
85943
|
+
x: x2,
|
|
85928
85944
|
y,
|
|
85929
85945
|
id: idRef.current++,
|
|
85930
85946
|
timestamp: Date.now()
|
|
@@ -86054,7 +86070,7 @@ CursorTrail.displayName = "CursorTrail";
|
|
|
86054
86070
|
var GridPatternInternal = ({
|
|
86055
86071
|
width = 40,
|
|
86056
86072
|
height = 40,
|
|
86057
|
-
x = -1,
|
|
86073
|
+
x: x2 = -1,
|
|
86058
86074
|
y = -1,
|
|
86059
86075
|
squares = [],
|
|
86060
86076
|
strokeDasharray = "0",
|
|
@@ -86209,7 +86225,7 @@ var GridPatternInternal = ({
|
|
|
86209
86225
|
[hexCenterX - hexRadius, hexCenterY],
|
|
86210
86226
|
[hexCenterX - hexRadius / 2, hexCenterY - hexRadius * Math.sqrt(3) / 2],
|
|
86211
86227
|
[hexCenterX + hexRadius / 2, hexCenterY - hexRadius * Math.sqrt(3) / 2]
|
|
86212
|
-
].map(([
|
|
86228
|
+
].map(([x3, y2]) => `${x3},${y2}`).join(" L ");
|
|
86213
86229
|
return /* @__PURE__ */ jsx("path", { d: `M ${hexPath} Z`, ...baseProps });
|
|
86214
86230
|
case "triangle":
|
|
86215
86231
|
const triSize = Math.min(width, height) / 2;
|
|
@@ -86277,7 +86293,7 @@ var GridPatternInternal = ({
|
|
|
86277
86293
|
"pattern",
|
|
86278
86294
|
{
|
|
86279
86295
|
id: patternId,
|
|
86280
|
-
x,
|
|
86296
|
+
x: x2,
|
|
86281
86297
|
y,
|
|
86282
86298
|
width,
|
|
86283
86299
|
height,
|
|
@@ -86301,7 +86317,7 @@ var GridPatternInternal = ({
|
|
|
86301
86317
|
squares.map(([squareX, squareY], index2) => /* @__PURE__ */ jsx(
|
|
86302
86318
|
"rect",
|
|
86303
86319
|
{
|
|
86304
|
-
x: squareX * width +
|
|
86320
|
+
x: squareX * width + x2,
|
|
86305
86321
|
y: squareY * height + y,
|
|
86306
86322
|
width,
|
|
86307
86323
|
height,
|
|
@@ -86604,7 +86620,7 @@ var MeteorsInternal = ({
|
|
|
86604
86620
|
),
|
|
86605
86621
|
children: [
|
|
86606
86622
|
children && /* @__PURE__ */ jsx("div", { className: "relative z-10", children }),
|
|
86607
|
-
autoPlay && meteors.map((
|
|
86623
|
+
autoPlay && meteors.map((_2, idx) => {
|
|
86608
86624
|
const animationDelay = random(0, 5);
|
|
86609
86625
|
const animationDuration = random(duration.min, duration.max) * speedMultiplier;
|
|
86610
86626
|
const meteorOpacity = random(opacity.min, opacity.max);
|
|
@@ -86737,9 +86753,9 @@ var AuroraBackgroundInternal = ({
|
|
|
86737
86753
|
if (!interactive)
|
|
86738
86754
|
return;
|
|
86739
86755
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
86740
|
-
const
|
|
86756
|
+
const x2 = (e.clientX - rect.left) / rect.width * 100;
|
|
86741
86757
|
const y = (e.clientY - rect.top) / rect.height * 100;
|
|
86742
|
-
setMousePosition({ x, y });
|
|
86758
|
+
setMousePosition({ x: x2, y });
|
|
86743
86759
|
};
|
|
86744
86760
|
const duration = getAnimationDuration();
|
|
86745
86761
|
const variantColors = getVariantColors();
|
|
@@ -86930,19 +86946,19 @@ var ParticlesInternal = ({
|
|
|
86930
86946
|
const outerRadius = particle.size;
|
|
86931
86947
|
const innerRadius = particle.size / 2;
|
|
86932
86948
|
let rot = Math.PI / 2 * 3;
|
|
86933
|
-
let
|
|
86949
|
+
let x2 = 0;
|
|
86934
86950
|
let y = 0;
|
|
86935
86951
|
const step = Math.PI / spikes;
|
|
86936
86952
|
ctx.beginPath();
|
|
86937
86953
|
ctx.moveTo(0, -outerRadius);
|
|
86938
86954
|
for (let i = 0; i < spikes; i++) {
|
|
86939
|
-
|
|
86955
|
+
x2 = Math.cos(rot) * outerRadius;
|
|
86940
86956
|
y = Math.sin(rot) * outerRadius;
|
|
86941
|
-
ctx.lineTo(
|
|
86957
|
+
ctx.lineTo(x2, y);
|
|
86942
86958
|
rot += step;
|
|
86943
|
-
|
|
86959
|
+
x2 = Math.cos(rot) * innerRadius;
|
|
86944
86960
|
y = Math.sin(rot) * innerRadius;
|
|
86945
|
-
ctx.lineTo(
|
|
86961
|
+
ctx.lineTo(x2, y);
|
|
86946
86962
|
rot += step;
|
|
86947
86963
|
}
|
|
86948
86964
|
ctx.lineTo(0, -outerRadius);
|
|
@@ -87286,9 +87302,9 @@ var StarfieldInternal = ({
|
|
|
87286
87302
|
rotationRef.current += spiralSpeed;
|
|
87287
87303
|
const cos = Math.cos(rotationRef.current);
|
|
87288
87304
|
const sin = Math.sin(rotationRef.current);
|
|
87289
|
-
const
|
|
87305
|
+
const x2 = star.x * cos - star.y * sin;
|
|
87290
87306
|
const y = star.x * sin + star.y * cos;
|
|
87291
|
-
star.x =
|
|
87307
|
+
star.x = x2;
|
|
87292
87308
|
star.y = y;
|
|
87293
87309
|
star.z -= speed * (star.velocity || 1);
|
|
87294
87310
|
break;
|
|
@@ -87669,18 +87685,18 @@ var DotPatternInternal = ({
|
|
|
87669
87685
|
case "hex":
|
|
87670
87686
|
for (let row = 0; row < rows; row++) {
|
|
87671
87687
|
for (let col = 0; col < cols; col++) {
|
|
87672
|
-
const
|
|
87688
|
+
const x2 = col * spacing + (row % 2 === 1 ? spacing / 2 : 0);
|
|
87673
87689
|
const y = row * spacing * 0.866;
|
|
87674
|
-
dots.push({ x, y });
|
|
87690
|
+
dots.push({ x: x2, y });
|
|
87675
87691
|
}
|
|
87676
87692
|
}
|
|
87677
87693
|
break;
|
|
87678
87694
|
case "diagonal":
|
|
87679
87695
|
for (let row = 0; row < rows; row++) {
|
|
87680
87696
|
for (let col = 0; col < cols; col++) {
|
|
87681
|
-
const
|
|
87697
|
+
const x2 = col * spacing + row * spacing * 0.5;
|
|
87682
87698
|
const y = row * spacing;
|
|
87683
|
-
dots.push({ x, y });
|
|
87699
|
+
dots.push({ x: x2, y });
|
|
87684
87700
|
}
|
|
87685
87701
|
}
|
|
87686
87702
|
break;
|
|
@@ -87695,9 +87711,9 @@ var DotPatternInternal = ({
|
|
|
87695
87711
|
const dotsInRing = Math.max(1, Math.floor(circumference / spacing));
|
|
87696
87712
|
for (let i = 0; i < dotsInRing; i++) {
|
|
87697
87713
|
const angle = i / dotsInRing * 2 * Math.PI;
|
|
87698
|
-
const
|
|
87714
|
+
const x2 = centerX + radius * Math.cos(angle);
|
|
87699
87715
|
const y = centerY + radius * Math.sin(angle);
|
|
87700
|
-
dots.push({ x, y });
|
|
87716
|
+
dots.push({ x: x2, y });
|
|
87701
87717
|
}
|
|
87702
87718
|
}
|
|
87703
87719
|
break;
|
|
@@ -87725,9 +87741,9 @@ var DotPatternInternal = ({
|
|
|
87725
87741
|
if (patternRef.current) {
|
|
87726
87742
|
const dots = patternRef.current.querySelectorAll("circle");
|
|
87727
87743
|
dots.forEach((dot) => {
|
|
87728
|
-
const
|
|
87744
|
+
const x2 = parseFloat(dot.getAttribute("cx") || "0");
|
|
87729
87745
|
const y = parseFloat(dot.getAttribute("cy") || "0");
|
|
87730
|
-
const dx =
|
|
87746
|
+
const dx = x2 - mouseRef.current.x;
|
|
87731
87747
|
const dy = y - mouseRef.current.y;
|
|
87732
87748
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
87733
87749
|
if (distance < hoverRadius) {
|
|
@@ -88042,12 +88058,12 @@ var GridDistortionInternal = ({
|
|
|
88042
88058
|
for (let row = 0; row <= rows; row++) {
|
|
88043
88059
|
const rowPoints = [];
|
|
88044
88060
|
for (let col = 0; col <= columns; col++) {
|
|
88045
|
-
const
|
|
88061
|
+
const x2 = col / columns;
|
|
88046
88062
|
const y = row / rows;
|
|
88047
88063
|
rowPoints.push({
|
|
88048
|
-
x,
|
|
88064
|
+
x: x2,
|
|
88049
88065
|
y,
|
|
88050
|
-
originalX:
|
|
88066
|
+
originalX: x2,
|
|
88051
88067
|
originalY: y,
|
|
88052
88068
|
offsetX: 0,
|
|
88053
88069
|
offsetY: 0
|
|
@@ -88126,16 +88142,16 @@ var GridDistortionInternal = ({
|
|
|
88126
88142
|
}
|
|
88127
88143
|
}
|
|
88128
88144
|
}, [distortion, distortionType, amplitude, frequency, rows, columns, interactive, mouseRadius, mouseStrength]);
|
|
88129
|
-
const applyPerspective = useCallback((
|
|
88145
|
+
const applyPerspective = useCallback((x2, y, width, height) => {
|
|
88130
88146
|
if (!perspective)
|
|
88131
|
-
return { x, y };
|
|
88147
|
+
return { x: x2, y };
|
|
88132
88148
|
const centerX = width / 2;
|
|
88133
88149
|
const centerY = height / 2;
|
|
88134
88150
|
const cosX = Math.cos(rotateX * Math.PI / 180);
|
|
88135
88151
|
const sinX = Math.sin(rotateX * Math.PI / 180);
|
|
88136
88152
|
const cosY = Math.cos(rotateY * Math.PI / 180);
|
|
88137
88153
|
const sinY = Math.sin(rotateY * Math.PI / 180);
|
|
88138
|
-
let px =
|
|
88154
|
+
let px = x2 - centerX;
|
|
88139
88155
|
let py = y - centerY;
|
|
88140
88156
|
const pz = -px * sinY;
|
|
88141
88157
|
px = px * cosY;
|
|
@@ -88173,9 +88189,9 @@ var GridDistortionInternal = ({
|
|
|
88173
88189
|
for (let row = 0; row <= rows; row++) {
|
|
88174
88190
|
for (let col = 0; col <= columns; col++) {
|
|
88175
88191
|
const point = points[row][col];
|
|
88176
|
-
const
|
|
88192
|
+
const x2 = point.x * width;
|
|
88177
88193
|
const y = point.y * height;
|
|
88178
|
-
const transformed = applyPerspective(
|
|
88194
|
+
const transformed = applyPerspective(x2, y, width, height);
|
|
88179
88195
|
if (col === 0) {
|
|
88180
88196
|
ctx.moveTo(transformed.x, transformed.y);
|
|
88181
88197
|
} else {
|
|
@@ -88186,9 +88202,9 @@ var GridDistortionInternal = ({
|
|
|
88186
88202
|
for (let col = 0; col <= columns; col++) {
|
|
88187
88203
|
for (let row = 0; row <= rows; row++) {
|
|
88188
88204
|
const point = points[row][col];
|
|
88189
|
-
const
|
|
88205
|
+
const x2 = point.x * width;
|
|
88190
88206
|
const y = point.y * height;
|
|
88191
|
-
const transformed = applyPerspective(
|
|
88207
|
+
const transformed = applyPerspective(x2, y, width, height);
|
|
88192
88208
|
if (row === 0) {
|
|
88193
88209
|
ctx.moveTo(transformed.x, transformed.y);
|
|
88194
88210
|
} else {
|
|
@@ -88395,24 +88411,24 @@ var WavesInternal = ({
|
|
|
88395
88411
|
}
|
|
88396
88412
|
waveLayersRef.current = waveLayers;
|
|
88397
88413
|
}, [layers, amplitude, frequency, speed, parallax, parallaxIntensity, colors]);
|
|
88398
|
-
const calculateWavePoint = (
|
|
88414
|
+
const calculateWavePoint = (x2, layer, time, mouseEffect = 0) => {
|
|
88399
88415
|
let y = 0;
|
|
88400
88416
|
switch (waveStyle) {
|
|
88401
88417
|
case "smooth":
|
|
88402
|
-
y = Math.sin((
|
|
88418
|
+
y = Math.sin((x2 * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
88403
88419
|
break;
|
|
88404
88420
|
case "sharp":
|
|
88405
|
-
const wave = (
|
|
88421
|
+
const wave = (x2 * layer.frequency + time * layer.speed + layer.phase) * 0.01;
|
|
88406
88422
|
y = (Math.sin(wave) > 0 ? 1 : -1) * layer.amplitude;
|
|
88407
88423
|
break;
|
|
88408
88424
|
case "turbulent":
|
|
88409
|
-
y = Math.sin((
|
|
88410
|
-
y += Math.sin((
|
|
88411
|
-
y += Math.sin((
|
|
88425
|
+
y = Math.sin((x2 * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
88426
|
+
y += Math.sin((x2 * layer.frequency * 2.3 + time * layer.speed * 1.5) * 0.01) * layer.amplitude * 0.3;
|
|
88427
|
+
y += Math.sin((x2 * layer.frequency * 3.7 + time * layer.speed * 0.7) * 0.01) * layer.amplitude * 0.2;
|
|
88412
88428
|
break;
|
|
88413
88429
|
case "organic":
|
|
88414
|
-
y = Math.sin((
|
|
88415
|
-
y *= 1 + Math.sin(
|
|
88430
|
+
y = Math.sin((x2 * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
88431
|
+
y *= 1 + Math.sin(x2 * 3e-3 + time * 1e-3) * 0.2;
|
|
88416
88432
|
break;
|
|
88417
88433
|
}
|
|
88418
88434
|
if (interactive && mouseEffect > 0) {
|
|
@@ -88475,8 +88491,8 @@ var WavesInternal = ({
|
|
|
88475
88491
|
ctx.moveTo(0, 0);
|
|
88476
88492
|
for (let y = 0; y <= canvas.height; y += 5) {
|
|
88477
88493
|
const mouseEffect = interactive ? getMouseEffect(canvas.width / 2, y) : 0;
|
|
88478
|
-
const
|
|
88479
|
-
ctx.lineTo(
|
|
88494
|
+
const x2 = canvas.width / 2 + calculateWavePoint(y, layer, time, mouseEffect);
|
|
88495
|
+
ctx.lineTo(x2, y);
|
|
88480
88496
|
}
|
|
88481
88497
|
ctx.lineTo(canvas.width, canvas.height);
|
|
88482
88498
|
ctx.lineTo(canvas.width, 0);
|
|
@@ -88484,20 +88500,20 @@ var WavesInternal = ({
|
|
|
88484
88500
|
const diagonal = Math.sqrt(canvas.width * canvas.width + canvas.height * canvas.height);
|
|
88485
88501
|
ctx.moveTo(0, canvas.height);
|
|
88486
88502
|
for (let d = 0; d <= diagonal; d += 5) {
|
|
88487
|
-
const
|
|
88503
|
+
const x2 = d / diagonal * canvas.width;
|
|
88488
88504
|
const baseY = d / diagonal * canvas.height;
|
|
88489
|
-
const mouseEffect = interactive ? getMouseEffect(
|
|
88505
|
+
const mouseEffect = interactive ? getMouseEffect(x2, baseY) : 0;
|
|
88490
88506
|
const waveY = calculateWavePoint(d, layer, time, mouseEffect);
|
|
88491
|
-
ctx.lineTo(
|
|
88507
|
+
ctx.lineTo(x2, canvas.height - baseY + waveY);
|
|
88492
88508
|
}
|
|
88493
88509
|
ctx.lineTo(canvas.width, 0);
|
|
88494
88510
|
ctx.lineTo(canvas.width, canvas.height);
|
|
88495
88511
|
} else {
|
|
88496
88512
|
ctx.moveTo(0, canvas.height);
|
|
88497
|
-
for (let
|
|
88498
|
-
const mouseEffect = interactive ? getMouseEffect(
|
|
88499
|
-
const y = canvas.height / 2 + calculateWavePoint(
|
|
88500
|
-
ctx.lineTo(
|
|
88513
|
+
for (let x2 = 0; x2 <= canvas.width; x2 += 5) {
|
|
88514
|
+
const mouseEffect = interactive ? getMouseEffect(x2, canvas.height / 2) : 0;
|
|
88515
|
+
const y = canvas.height / 2 + calculateWavePoint(x2, layer, time, mouseEffect);
|
|
88516
|
+
ctx.lineTo(x2, y);
|
|
88501
88517
|
}
|
|
88502
88518
|
ctx.lineTo(canvas.width, canvas.height);
|
|
88503
88519
|
}
|
|
@@ -88505,8 +88521,8 @@ var WavesInternal = ({
|
|
|
88505
88521
|
ctx.fill();
|
|
88506
88522
|
ctx.restore();
|
|
88507
88523
|
};
|
|
88508
|
-
const getMouseEffect = (
|
|
88509
|
-
const dx =
|
|
88524
|
+
const getMouseEffect = (x2, y) => {
|
|
88525
|
+
const dx = x2 - mouseRef.current.x;
|
|
88510
88526
|
const dy = y - mouseRef.current.y;
|
|
88511
88527
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
88512
88528
|
if (distance < mouseRadius) {
|
|
@@ -88935,17 +88951,52 @@ var GradientFlow = (props) => {
|
|
|
88935
88951
|
return /* @__PURE__ */ jsx(GradientFlowInternal, { ...props });
|
|
88936
88952
|
};
|
|
88937
88953
|
GradientFlow.displayName = "GradientFlow";
|
|
88954
|
+
var M = (e, i, s, u, m, a, l, h2) => {
|
|
88955
|
+
let d = document.documentElement, w = ["light", "dark"];
|
|
88956
|
+
function p(n) {
|
|
88957
|
+
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
88958
|
+
let k = y === "class", S = k && a ? m.map((f) => a[f] || f) : m;
|
|
88959
|
+
k ? (d.classList.remove(...S), d.classList.add(a && a[n] ? a[n] : n)) : d.setAttribute(y, n);
|
|
88960
|
+
}), R(n);
|
|
88961
|
+
}
|
|
88962
|
+
function R(n) {
|
|
88963
|
+
h2 && w.includes(n) && (d.style.colorScheme = n);
|
|
88964
|
+
}
|
|
88965
|
+
function c2() {
|
|
88966
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
88967
|
+
}
|
|
88968
|
+
if (u)
|
|
88969
|
+
p(u);
|
|
88970
|
+
else
|
|
88971
|
+
try {
|
|
88972
|
+
let n = localStorage.getItem(i) || s, y = l && n === "system" ? c2() : n;
|
|
88973
|
+
p(y);
|
|
88974
|
+
} catch (n) {
|
|
88975
|
+
}
|
|
88976
|
+
};
|
|
88977
|
+
var x = React71.createContext(void 0);
|
|
88978
|
+
var U = { setTheme: (e) => {
|
|
88979
|
+
}, themes: [] };
|
|
88980
|
+
var z = () => {
|
|
88981
|
+
var e;
|
|
88982
|
+
return (e = React71.useContext(x)) != null ? e : U;
|
|
88983
|
+
};
|
|
88984
|
+
React71.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h2, nonce: d, scriptProps: w }) => {
|
|
88985
|
+
let p = JSON.stringify([s, i, a, e, h2, l, u, m]).slice(1, -1);
|
|
88986
|
+
return React71.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
88987
|
+
});
|
|
88938
88988
|
var MeshGradientInternal = ({
|
|
88939
88989
|
children,
|
|
88940
88990
|
className,
|
|
88941
88991
|
containerClassName,
|
|
88942
|
-
colors
|
|
88992
|
+
colors,
|
|
88993
|
+
themeAware = true,
|
|
88943
88994
|
speed = 0.5,
|
|
88944
88995
|
gridSize = 4,
|
|
88945
88996
|
animate: animate4 = true,
|
|
88946
88997
|
animationType = "wave",
|
|
88947
|
-
opacity
|
|
88948
|
-
blur: blur2
|
|
88998
|
+
opacity,
|
|
88999
|
+
blur: blur2,
|
|
88949
89000
|
interactive = false,
|
|
88950
89001
|
mouseRadius = 200,
|
|
88951
89002
|
blendMode = "normal",
|
|
@@ -88957,6 +89008,38 @@ var MeshGradientInternal = ({
|
|
|
88957
89008
|
brightness = 1,
|
|
88958
89009
|
fps = 60
|
|
88959
89010
|
}) => {
|
|
89011
|
+
const { theme, resolvedTheme } = z();
|
|
89012
|
+
const currentTheme = theme === "system" ? resolvedTheme : theme;
|
|
89013
|
+
const defaultLightColors = [
|
|
89014
|
+
"#fce7f3",
|
|
89015
|
+
// Light pink
|
|
89016
|
+
"#e9d5ff",
|
|
89017
|
+
// Light purple
|
|
89018
|
+
"#ddd6fe",
|
|
89019
|
+
// Light violet
|
|
89020
|
+
"#e0e7ff",
|
|
89021
|
+
// Light indigo
|
|
89022
|
+
"#fbcfe8"
|
|
89023
|
+
// Light pink-2
|
|
89024
|
+
];
|
|
89025
|
+
const defaultDarkColors = [
|
|
89026
|
+
"#5b21b6",
|
|
89027
|
+
// Deep purple
|
|
89028
|
+
"#7c3aed",
|
|
89029
|
+
// Purple
|
|
89030
|
+
"#6366f1",
|
|
89031
|
+
// Indigo
|
|
89032
|
+
"#8b5cf6",
|
|
89033
|
+
// Violet
|
|
89034
|
+
"#4c1d95"
|
|
89035
|
+
// Deep purple-dark
|
|
89036
|
+
];
|
|
89037
|
+
const fallbackColors = ["#FF006E", "#FB5607", "#FFBE0B", "#8338EC", "#3A86FF"];
|
|
89038
|
+
const finalColors = colors ? colors : themeAware && currentTheme === "light" ? defaultLightColors : themeAware && currentTheme === "dark" ? defaultDarkColors : fallbackColors;
|
|
89039
|
+
const defaultBlur = themeAware && currentTheme === "light" ? 80 : 60;
|
|
89040
|
+
const defaultOpacity = themeAware && currentTheme === "light" ? 0.25 : 0.35;
|
|
89041
|
+
const finalBlur = blur2 ?? defaultBlur;
|
|
89042
|
+
const finalOpacity = opacity ?? defaultOpacity;
|
|
88960
89043
|
const canvasRef = useRef(null);
|
|
88961
89044
|
const animationRef = useRef(void 0);
|
|
88962
89045
|
const meshPointsRef = useRef([]);
|
|
@@ -88980,13 +89063,13 @@ var MeshGradientInternal = ({
|
|
|
88980
89063
|
y: height / 2 + Math.sin(angle) * distance * height,
|
|
88981
89064
|
vx: (Math.random() - 0.5) * speed,
|
|
88982
89065
|
vy: (Math.random() - 0.5) * speed,
|
|
88983
|
-
color:
|
|
89066
|
+
color: finalColors[i % finalColors.length],
|
|
88984
89067
|
radius: Math.max(100, (width + height) / 4),
|
|
88985
89068
|
phase: i / totalPoints * Math.PI * 2
|
|
88986
89069
|
});
|
|
88987
89070
|
}
|
|
88988
89071
|
meshPointsRef.current = points;
|
|
88989
|
-
}, [
|
|
89072
|
+
}, [finalColors, complexity, speed]);
|
|
88990
89073
|
const adjustColor = useCallback((color, alpha2 = 1) => {
|
|
88991
89074
|
const hex = color.replace("#", "");
|
|
88992
89075
|
const r2 = parseInt(hex.substring(0, 2), 16);
|
|
@@ -89069,19 +89152,19 @@ var MeshGradientInternal = ({
|
|
|
89069
89152
|
const points = meshPointsRef.current;
|
|
89070
89153
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
89071
89154
|
ctx.globalCompositeOperation = blendMode;
|
|
89072
|
-
ctx.globalAlpha =
|
|
89073
|
-
if (
|
|
89074
|
-
ctx.filter = `blur(${
|
|
89155
|
+
ctx.globalAlpha = finalOpacity;
|
|
89156
|
+
if (finalBlur > 0) {
|
|
89157
|
+
ctx.filter = `blur(${finalBlur}px)`;
|
|
89075
89158
|
}
|
|
89076
89159
|
points.forEach((point, i) => {
|
|
89077
|
-
const
|
|
89160
|
+
const x2 = isFinite(point.x) ? point.x : canvas.width / 2;
|
|
89078
89161
|
const y = isFinite(point.y) ? point.y : canvas.height / 2;
|
|
89079
89162
|
const radius = isFinite(point.radius) && point.radius > 0 ? point.radius : 100;
|
|
89080
89163
|
const gradient = ctx.createRadialGradient(
|
|
89081
|
-
|
|
89164
|
+
x2,
|
|
89082
89165
|
y,
|
|
89083
89166
|
0,
|
|
89084
|
-
|
|
89167
|
+
x2,
|
|
89085
89168
|
y,
|
|
89086
89169
|
radius
|
|
89087
89170
|
);
|
|
@@ -89116,7 +89199,7 @@ var MeshGradientInternal = ({
|
|
|
89116
89199
|
ctx.globalCompositeOperation = "overlay";
|
|
89117
89200
|
ctx.putImageData(imageData, 0, 0);
|
|
89118
89201
|
}
|
|
89119
|
-
}, [
|
|
89202
|
+
}, [finalOpacity, finalBlur, blendMode, interpolation, grain, grainOpacity, adjustColor]);
|
|
89120
89203
|
const animateLoop = useCallback((currentTime) => {
|
|
89121
89204
|
const canvas = canvasRef.current;
|
|
89122
89205
|
if (!canvas)
|
|
@@ -90127,12 +90210,12 @@ var FloatingElementsInternal = ({
|
|
|
90127
90210
|
ctx.beginPath();
|
|
90128
90211
|
for (let i = 0; i < 6; i++) {
|
|
90129
90212
|
const angle = Math.PI * 2 / 6 * i;
|
|
90130
|
-
const
|
|
90213
|
+
const x2 = Math.cos(angle) * actualSize / 2;
|
|
90131
90214
|
const y = Math.sin(angle) * actualSize / 2;
|
|
90132
90215
|
if (i === 0)
|
|
90133
|
-
ctx.moveTo(
|
|
90216
|
+
ctx.moveTo(x2, y);
|
|
90134
90217
|
else
|
|
90135
|
-
ctx.lineTo(
|
|
90218
|
+
ctx.lineTo(x2, y);
|
|
90136
90219
|
}
|
|
90137
90220
|
ctx.closePath();
|
|
90138
90221
|
ctx.fill();
|
|
@@ -90142,12 +90225,12 @@ var FloatingElementsInternal = ({
|
|
|
90142
90225
|
for (let i = 0; i < 10; i++) {
|
|
90143
90226
|
const radius = i % 2 === 0 ? actualSize / 2 : actualSize / 4;
|
|
90144
90227
|
const angle = Math.PI * 2 / 10 * i - Math.PI / 2;
|
|
90145
|
-
const
|
|
90228
|
+
const x2 = Math.cos(angle) * radius;
|
|
90146
90229
|
const y = Math.sin(angle) * radius;
|
|
90147
90230
|
if (i === 0)
|
|
90148
|
-
ctx.moveTo(
|
|
90231
|
+
ctx.moveTo(x2, y);
|
|
90149
90232
|
else
|
|
90150
|
-
ctx.lineTo(
|
|
90233
|
+
ctx.lineTo(x2, y);
|
|
90151
90234
|
}
|
|
90152
90235
|
ctx.closePath();
|
|
90153
90236
|
ctx.fill();
|
|
@@ -90993,12 +91076,12 @@ var GeometricPatternsInternal = ({
|
|
|
90993
91076
|
case "hexagons":
|
|
90994
91077
|
for (let i = 0; i < 6; i++) {
|
|
90995
91078
|
const angle = Math.PI * 2 / 6 * i - Math.PI / 2;
|
|
90996
|
-
const
|
|
91079
|
+
const x2 = Math.cos(angle) * size4 / 2;
|
|
90997
91080
|
const y = Math.sin(angle) * size4 / 2;
|
|
90998
91081
|
if (i === 0)
|
|
90999
|
-
path.moveTo(
|
|
91082
|
+
path.moveTo(x2, y);
|
|
91000
91083
|
else
|
|
91001
|
-
path.lineTo(
|
|
91084
|
+
path.lineTo(x2, y);
|
|
91002
91085
|
}
|
|
91003
91086
|
path.closePath();
|
|
91004
91087
|
break;
|
|
@@ -91048,12 +91131,12 @@ var GeometricPatternsInternal = ({
|
|
|
91048
91131
|
if (density < 1 && (row % skipFactor !== 0 || col % skipFactor !== 0)) {
|
|
91049
91132
|
continue;
|
|
91050
91133
|
}
|
|
91051
|
-
let
|
|
91134
|
+
let x2 = col * totalSpacing;
|
|
91052
91135
|
let y = row * totalSpacing;
|
|
91053
91136
|
if (pattern === "hexagons" && row % 2 === 1) {
|
|
91054
|
-
|
|
91137
|
+
x2 += totalSpacing / 2;
|
|
91055
91138
|
}
|
|
91056
|
-
allPositions.push({ x, y });
|
|
91139
|
+
allPositions.push({ x: x2, y });
|
|
91057
91140
|
}
|
|
91058
91141
|
}
|
|
91059
91142
|
for (let i = allPositions.length - 1; i > 0; i--) {
|
|
@@ -91708,7 +91791,7 @@ function CodeSnippets({
|
|
|
91708
91791
|
const allSnippets = useMemo(
|
|
91709
91792
|
() => Array.from(
|
|
91710
91793
|
{ length: multiplier },
|
|
91711
|
-
(
|
|
91794
|
+
(_2, i) => snippets.map((snippet, j) => ({
|
|
91712
91795
|
...snippet,
|
|
91713
91796
|
id: `${i}-${j}-${snippet.language}`
|
|
91714
91797
|
}))
|
|
@@ -91874,7 +91957,7 @@ var BlurFadeInternal = ({
|
|
|
91874
91957
|
return { x: 0, y: 0 };
|
|
91875
91958
|
}
|
|
91876
91959
|
};
|
|
91877
|
-
const { x, y } = getTransformValues();
|
|
91960
|
+
const { x: x2, y } = getTransformValues();
|
|
91878
91961
|
return /* @__PURE__ */ jsxs(
|
|
91879
91962
|
"div",
|
|
91880
91963
|
{
|
|
@@ -91888,7 +91971,7 @@ var BlurFadeInternal = ({
|
|
|
91888
91971
|
["--blur-fade-delay"]: `${delay}ms`,
|
|
91889
91972
|
["--blur-fade-duration"]: `${duration}ms`,
|
|
91890
91973
|
["--blur-fade-blur"]: blur2,
|
|
91891
|
-
["--blur-fade-x"]: `${
|
|
91974
|
+
["--blur-fade-x"]: `${x2}px`,
|
|
91892
91975
|
["--blur-fade-y"]: `${y}px`
|
|
91893
91976
|
},
|
|
91894
91977
|
children: [
|
|
@@ -92220,17 +92303,17 @@ var RippleInternal = (props) => {
|
|
|
92220
92303
|
if (disabled || !containerRef.current)
|
|
92221
92304
|
return;
|
|
92222
92305
|
const rect = containerRef.current.getBoundingClientRect();
|
|
92223
|
-
let
|
|
92306
|
+
let x2, y, force = 1, velocity = 0;
|
|
92224
92307
|
if (customCenter) {
|
|
92225
|
-
|
|
92308
|
+
x2 = customCenter.x;
|
|
92226
92309
|
y = customCenter.y;
|
|
92227
92310
|
} else if (center) {
|
|
92228
|
-
|
|
92311
|
+
x2 = center.x;
|
|
92229
92312
|
y = center.y;
|
|
92230
92313
|
} else if (event) {
|
|
92231
92314
|
if ("touches" in event) {
|
|
92232
92315
|
const touch = event.touches[0];
|
|
92233
|
-
|
|
92316
|
+
x2 = touch.clientX - rect.left;
|
|
92234
92317
|
y = touch.clientY - rect.top;
|
|
92235
92318
|
if (pressureSensitive && "force" in touch) {
|
|
92236
92319
|
force = touch.force || 1;
|
|
@@ -92239,18 +92322,18 @@ var RippleInternal = (props) => {
|
|
|
92239
92322
|
const now = Date.now();
|
|
92240
92323
|
const timeDiff = now - lastTouchTime.current;
|
|
92241
92324
|
const distance = Math.sqrt(
|
|
92242
|
-
Math.pow(
|
|
92325
|
+
Math.pow(x2 - lastTouchPos.current.x, 2) + Math.pow(y - lastTouchPos.current.y, 2)
|
|
92243
92326
|
);
|
|
92244
92327
|
velocity = timeDiff > 0 ? distance / timeDiff : 0;
|
|
92245
92328
|
lastTouchTime.current = now;
|
|
92246
|
-
lastTouchPos.current = { x, y };
|
|
92329
|
+
lastTouchPos.current = { x: x2, y };
|
|
92247
92330
|
}
|
|
92248
92331
|
} else {
|
|
92249
|
-
|
|
92332
|
+
x2 = event.clientX - rect.left;
|
|
92250
92333
|
y = event.clientY - rect.top;
|
|
92251
92334
|
}
|
|
92252
92335
|
} else {
|
|
92253
|
-
|
|
92336
|
+
x2 = rect.width / 2;
|
|
92254
92337
|
y = rect.height / 2;
|
|
92255
92338
|
}
|
|
92256
92339
|
let rippleSize = getRippleSize();
|
|
@@ -92263,7 +92346,7 @@ var RippleInternal = (props) => {
|
|
|
92263
92346
|
}
|
|
92264
92347
|
const baseRipple = {
|
|
92265
92348
|
id: rippleIdRef.current++,
|
|
92266
|
-
x:
|
|
92349
|
+
x: x2 - rippleSize / 2,
|
|
92267
92350
|
y: y - rippleSize / 2,
|
|
92268
92351
|
size: rippleSize,
|
|
92269
92352
|
startTime: Date.now(),
|
|
@@ -92472,7 +92555,7 @@ var SparklesInternal = ({
|
|
|
92472
92555
|
return "0%";
|
|
92473
92556
|
}
|
|
92474
92557
|
};
|
|
92475
|
-
const createSparkle = (
|
|
92558
|
+
const createSparkle = (x2, y) => {
|
|
92476
92559
|
if (!containerRef.current) {
|
|
92477
92560
|
return {
|
|
92478
92561
|
id: sparkleIdRef.current++,
|
|
@@ -92489,7 +92572,7 @@ var SparklesInternal = ({
|
|
|
92489
92572
|
const rect = containerRef.current.getBoundingClientRect();
|
|
92490
92573
|
return {
|
|
92491
92574
|
id: sparkleIdRef.current++,
|
|
92492
|
-
x:
|
|
92575
|
+
x: x2 ?? randomInt(0, rect.width),
|
|
92493
92576
|
y: y ?? randomInt(0, rect.height),
|
|
92494
92577
|
size: random(size4.min, size4.max),
|
|
92495
92578
|
color,
|
|
@@ -92499,10 +92582,10 @@ var SparklesInternal = ({
|
|
|
92499
92582
|
shape: getSparkleShape(shape)
|
|
92500
92583
|
};
|
|
92501
92584
|
};
|
|
92502
|
-
const addSparkle = (
|
|
92585
|
+
const addSparkle = (x2, y) => {
|
|
92503
92586
|
if (!active)
|
|
92504
92587
|
return;
|
|
92505
|
-
const newSparkle = createSparkle(
|
|
92588
|
+
const newSparkle = createSparkle(x2, y);
|
|
92506
92589
|
setSparkles((prev) => {
|
|
92507
92590
|
const updated = [...prev, newSparkle];
|
|
92508
92591
|
if (updated.length > count3) {
|
|
@@ -92542,9 +92625,9 @@ var SparklesInternal = ({
|
|
|
92542
92625
|
if (trigger === "click") {
|
|
92543
92626
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
92544
92627
|
if (rect) {
|
|
92545
|
-
const
|
|
92628
|
+
const x2 = event.clientX - rect.left;
|
|
92546
92629
|
const y = event.clientY - rect.top;
|
|
92547
|
-
addSparkle(
|
|
92630
|
+
addSparkle(x2, y);
|
|
92548
92631
|
}
|
|
92549
92632
|
}
|
|
92550
92633
|
};
|
|
@@ -92552,9 +92635,9 @@ var SparklesInternal = ({
|
|
|
92552
92635
|
if (interactive && trigger === "hover" && isHovered) {
|
|
92553
92636
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
92554
92637
|
if (rect && Math.random() > 0.8) {
|
|
92555
|
-
const
|
|
92638
|
+
const x2 = event.clientX - rect.left;
|
|
92556
92639
|
const y = event.clientY - rect.top;
|
|
92557
|
-
addSparkle(
|
|
92640
|
+
addSparkle(x2, y);
|
|
92558
92641
|
}
|
|
92559
92642
|
}
|
|
92560
92643
|
};
|
|
@@ -92723,9 +92806,9 @@ var SpotlightInternal = ({
|
|
|
92723
92806
|
if (!rect)
|
|
92724
92807
|
return;
|
|
92725
92808
|
const time = Date.now() / autoSpeed;
|
|
92726
|
-
const
|
|
92809
|
+
const x2 = (Math.sin(time) + 1) * 0.5 * rect.width;
|
|
92727
92810
|
const y = (Math.cos(time * 0.7) + 1) * 0.5 * rect.height;
|
|
92728
|
-
setAutoPosition({ x, y });
|
|
92811
|
+
setAutoPosition({ x: x2, y });
|
|
92729
92812
|
autoAnimationRef.current = requestAnimationFrame(animate4);
|
|
92730
92813
|
};
|
|
92731
92814
|
autoAnimationRef.current = requestAnimationFrame(animate4);
|
|
@@ -92825,7 +92908,7 @@ var SpotlightInternal = ({
|
|
|
92825
92908
|
clientX = event.clientX;
|
|
92826
92909
|
clientY = event.clientY;
|
|
92827
92910
|
}
|
|
92828
|
-
let
|
|
92911
|
+
let x2 = clientX - rect.left;
|
|
92829
92912
|
let y = clientY - rect.top;
|
|
92830
92913
|
if (magnetic && magneticElements.length > 0) {
|
|
92831
92914
|
magneticElements.forEach((element) => {
|
|
@@ -92833,28 +92916,28 @@ var SpotlightInternal = ({
|
|
|
92833
92916
|
const elementCenterX = elementRect.left + elementRect.width / 2 - rect.left;
|
|
92834
92917
|
const elementCenterY = elementRect.top + elementRect.height / 2 - rect.top;
|
|
92835
92918
|
const distance = Math.sqrt(
|
|
92836
|
-
Math.pow(
|
|
92919
|
+
Math.pow(x2 - elementCenterX, 2) + Math.pow(y - elementCenterY, 2)
|
|
92837
92920
|
);
|
|
92838
92921
|
if (distance < 100) {
|
|
92839
92922
|
const force = (100 - distance) / 100 * magneticStrength;
|
|
92840
|
-
|
|
92923
|
+
x2 += (elementCenterX - x2) * force;
|
|
92841
92924
|
y += (elementCenterY - y) * force;
|
|
92842
92925
|
}
|
|
92843
92926
|
});
|
|
92844
92927
|
}
|
|
92845
|
-
setMousePosition({ x, y });
|
|
92846
|
-
updatePosition({ x, y });
|
|
92928
|
+
setMousePosition({ x: x2, y });
|
|
92929
|
+
updatePosition({ x: x2, y });
|
|
92847
92930
|
if (spotlights?.some((s) => s.trail) || spotlights?.length === 0 && trailPositions.length > 0) {
|
|
92848
92931
|
const timestamp = Date.now();
|
|
92849
92932
|
setTrailPositions((prev) => {
|
|
92850
|
-
const newTrail = [{ x, y, timestamp }, ...prev];
|
|
92933
|
+
const newTrail = [{ x: x2, y, timestamp }, ...prev];
|
|
92851
92934
|
const maxLength = spotlights?.find((s) => s.trail)?.trail?.length || 10;
|
|
92852
92935
|
return newTrail.slice(0, maxLength);
|
|
92853
92936
|
});
|
|
92854
92937
|
}
|
|
92855
92938
|
if (interactiveZones) {
|
|
92856
92939
|
interactiveZones.forEach((zone, index2) => {
|
|
92857
|
-
const isInZone =
|
|
92940
|
+
const isInZone = x2 >= zone.bounds.x && x2 <= zone.bounds.x + zone.bounds.width && y >= zone.bounds.y && y <= zone.bounds.y + zone.bounds.height;
|
|
92858
92941
|
if (zone.trigger === "proximity" || zone.trigger === "hover") {
|
|
92859
92942
|
setInteractiveState((prev) => ({ ...prev, [index2]: isInZone }));
|
|
92860
92943
|
}
|
|
@@ -92903,13 +92986,13 @@ var SpotlightInternal = ({
|
|
|
92903
92986
|
return autoPosition;
|
|
92904
92987
|
return displayPosition;
|
|
92905
92988
|
};
|
|
92906
|
-
const interpolateHeatMap = (data,
|
|
92989
|
+
const interpolateHeatMap = (data, x2, y) => {
|
|
92907
92990
|
if (!heatMap)
|
|
92908
92991
|
return 0;
|
|
92909
92992
|
let totalWeight = 0;
|
|
92910
92993
|
let weightedIntensity = 0;
|
|
92911
92994
|
data.forEach((point) => {
|
|
92912
|
-
const distance = Math.sqrt(Math.pow(
|
|
92995
|
+
const distance = Math.sqrt(Math.pow(x2 - point.x, 2) + Math.pow(y - point.y, 2));
|
|
92913
92996
|
const weight = 1 / (distance + 1);
|
|
92914
92997
|
totalWeight += weight;
|
|
92915
92998
|
weightedIntensity += point.intensity * weight;
|
|
@@ -92928,20 +93011,20 @@ var SpotlightInternal = ({
|
|
|
92928
93011
|
return shape2;
|
|
92929
93012
|
}
|
|
92930
93013
|
};
|
|
92931
|
-
const createWavePattern = (
|
|
93014
|
+
const createWavePattern = (x2, y) => {
|
|
92932
93015
|
if (!waveAnimation)
|
|
92933
93016
|
return 1;
|
|
92934
93017
|
const { type, frequency, amplitude } = waveAnimation;
|
|
92935
93018
|
const offset4 = waveOffset * 0.01;
|
|
92936
93019
|
switch (type) {
|
|
92937
93020
|
case "ripple":
|
|
92938
|
-
const distance = Math.sqrt(Math.pow(
|
|
93021
|
+
const distance = Math.sqrt(Math.pow(x2 - 400, 2) + Math.pow(y - 300, 2));
|
|
92939
93022
|
return 1 + amplitude * Math.sin(distance * frequency + offset4);
|
|
92940
93023
|
case "sine":
|
|
92941
|
-
return 1 + amplitude * Math.sin(
|
|
93024
|
+
return 1 + amplitude * Math.sin(x2 * frequency + offset4);
|
|
92942
93025
|
case "spiral":
|
|
92943
|
-
const angle = Math.atan2(y - 300,
|
|
92944
|
-
const radius = Math.sqrt(Math.pow(
|
|
93026
|
+
const angle = Math.atan2(y - 300, x2 - 400);
|
|
93027
|
+
const radius = Math.sqrt(Math.pow(x2 - 400, 2) + Math.pow(y - 300, 2));
|
|
92945
93028
|
return 1 + amplitude * Math.sin(radius * frequency + angle * 3 + offset4);
|
|
92946
93029
|
default:
|
|
92947
93030
|
return 1;
|
|
@@ -92949,19 +93032,19 @@ var SpotlightInternal = ({
|
|
|
92949
93032
|
};
|
|
92950
93033
|
const createGradient = (spotlightData, position) => {
|
|
92951
93034
|
const pos = position || getSpotlightPosition();
|
|
92952
|
-
const { x, y } = pos;
|
|
93035
|
+
const { x: x2, y } = pos;
|
|
92953
93036
|
const currentColor = spotlightData?.color || color;
|
|
92954
93037
|
let currentSize = (spotlightData?.size || size4) * pulseScale;
|
|
92955
93038
|
const currentBlur = spotlightData?.blur || blur2;
|
|
92956
93039
|
const currentShape = spotlightData?.shape || shape;
|
|
92957
93040
|
if (waveAnimation) {
|
|
92958
|
-
currentSize *= createWavePattern(
|
|
93041
|
+
currentSize *= createWavePattern(x2, y);
|
|
92959
93042
|
}
|
|
92960
93043
|
if (heatMap) {
|
|
92961
|
-
const heatIntensity = interpolateHeatMap(heatMap.data,
|
|
93044
|
+
const heatIntensity = interpolateHeatMap(heatMap.data, x2, y);
|
|
92962
93045
|
const colorIndex = Math.floor(heatIntensity * (heatMap.colors.length - 1));
|
|
92963
93046
|
const heatColor = heatMap.colors[colorIndex] || currentColor;
|
|
92964
|
-
return `radial-gradient(circle ${currentSize * heatIntensity + currentBlur}px at ${
|
|
93047
|
+
return `radial-gradient(circle ${currentSize * heatIntensity + currentBlur}px at ${x2}px ${y}px, ${heatColor} 0%, transparent 70%)`;
|
|
92965
93048
|
}
|
|
92966
93049
|
const gradientSize = currentSize / 2;
|
|
92967
93050
|
const blurSize = currentBlur;
|
|
@@ -92977,19 +93060,19 @@ var SpotlightInternal = ({
|
|
|
92977
93060
|
(col, idx) => `${col} ${idx / (gradientColors.length - 1) * 70}%`
|
|
92978
93061
|
).join(", ");
|
|
92979
93062
|
if (currentShape === "ellipse") {
|
|
92980
|
-
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${
|
|
93063
|
+
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${x2}px ${y}px, ${colorStops}, transparent 70%)`;
|
|
92981
93064
|
}
|
|
92982
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
93065
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x2}px ${y}px, ${colorStops}, transparent 70%)`;
|
|
92983
93066
|
}
|
|
92984
93067
|
if (direction !== void 0) {
|
|
92985
|
-
return `conic-gradient(from ${direction + rotation}deg at ${
|
|
93068
|
+
return `conic-gradient(from ${direction + rotation}deg at ${x2}px ${y}px, transparent 0deg, ${currentColor} 30deg, transparent 60deg)`;
|
|
92986
93069
|
}
|
|
92987
93070
|
if (currentShape === "ellipse") {
|
|
92988
|
-
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${
|
|
93071
|
+
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${x2}px ${y}px, ${currentColor} 0%, transparent 50%)`;
|
|
92989
93072
|
} else if (["polygon", "star", "heart"].includes(currentShape)) {
|
|
92990
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
93073
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x2}px ${y}px, ${currentColor} 0%, transparent 70%)`;
|
|
92991
93074
|
}
|
|
92992
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
93075
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x2}px ${y}px, ${currentColor} 0%, transparent 70%)`;
|
|
92993
93076
|
};
|
|
92994
93077
|
const createGridOverlay = () => {
|
|
92995
93078
|
if (!gridOverlay)
|
|
@@ -93444,9 +93527,9 @@ var GlowEffectInternal = ({
|
|
|
93444
93527
|
if (!mouseTracking || !containerRef.current)
|
|
93445
93528
|
return;
|
|
93446
93529
|
const rect = containerRef.current.getBoundingClientRect();
|
|
93447
|
-
const
|
|
93530
|
+
const x2 = e.clientX - rect.left;
|
|
93448
93531
|
const y = e.clientY - rect.top;
|
|
93449
|
-
setMousePosition({ x, y });
|
|
93532
|
+
setMousePosition({ x: x2, y });
|
|
93450
93533
|
}, [mouseTracking]);
|
|
93451
93534
|
const getMouseGlow = () => {
|
|
93452
93535
|
if (!mouseTracking || !shouldApplyEffect())
|
|
@@ -94281,30 +94364,30 @@ var NumberTickerInternal = ({
|
|
|
94281
94364
|
const [hasAnimated, setHasAnimated] = useState(false);
|
|
94282
94365
|
const elementRef = useRef(null);
|
|
94283
94366
|
const animationRef = useRef(null);
|
|
94284
|
-
const getEasingFunction = (
|
|
94367
|
+
const getEasingFunction = (t2) => {
|
|
94285
94368
|
switch (easing) {
|
|
94286
94369
|
case "linear":
|
|
94287
|
-
return
|
|
94370
|
+
return t2;
|
|
94288
94371
|
case "ease-in":
|
|
94289
|
-
return
|
|
94372
|
+
return t2 * t2;
|
|
94290
94373
|
case "ease-out":
|
|
94291
|
-
return 1 - Math.pow(1 -
|
|
94374
|
+
return 1 - Math.pow(1 - t2, 2);
|
|
94292
94375
|
case "ease-in-out":
|
|
94293
|
-
return
|
|
94376
|
+
return t2 < 0.5 ? 2 * t2 * t2 : 1 - Math.pow(-2 * t2 + 2, 2) / 2;
|
|
94294
94377
|
case "bounce":
|
|
94295
94378
|
const n1 = 7.5625;
|
|
94296
94379
|
const d1 = 2.75;
|
|
94297
|
-
if (
|
|
94298
|
-
return n1 *
|
|
94299
|
-
} else if (
|
|
94300
|
-
return n1 * (
|
|
94301
|
-
} else if (
|
|
94302
|
-
return n1 * (
|
|
94380
|
+
if (t2 < 1 / d1) {
|
|
94381
|
+
return n1 * t2 * t2;
|
|
94382
|
+
} else if (t2 < 2 / d1) {
|
|
94383
|
+
return n1 * (t2 -= 1.5 / d1) * t2 + 0.75;
|
|
94384
|
+
} else if (t2 < 2.5 / d1) {
|
|
94385
|
+
return n1 * (t2 -= 2.25 / d1) * t2 + 0.9375;
|
|
94303
94386
|
} else {
|
|
94304
|
-
return n1 * (
|
|
94387
|
+
return n1 * (t2 -= 2.625 / d1) * t2 + 0.984375;
|
|
94305
94388
|
}
|
|
94306
94389
|
default:
|
|
94307
|
-
return
|
|
94390
|
+
return t2;
|
|
94308
94391
|
}
|
|
94309
94392
|
};
|
|
94310
94393
|
const formatNumber2 = (num) => {
|
|
@@ -95413,9 +95496,9 @@ var MouseTrailInternal = ({
|
|
|
95413
95496
|
}
|
|
95414
95497
|
particlesRef.current = particles;
|
|
95415
95498
|
}, [length, size4, colors, lifetime]);
|
|
95416
|
-
const drawShape = useCallback((ctx, particle,
|
|
95499
|
+
const drawShape = useCallback((ctx, particle, x2, y) => {
|
|
95417
95500
|
ctx.save();
|
|
95418
|
-
ctx.translate(
|
|
95501
|
+
ctx.translate(x2, y);
|
|
95419
95502
|
if (rotate) {
|
|
95420
95503
|
ctx.rotate(particle.rotation);
|
|
95421
95504
|
}
|
|
@@ -95653,10 +95736,10 @@ var MouseTrailInternal = ({
|
|
|
95653
95736
|
if (!canvas)
|
|
95654
95737
|
return;
|
|
95655
95738
|
const rect = canvas.getBoundingClientRect();
|
|
95656
|
-
const
|
|
95739
|
+
const x2 = e.clientX - rect.left;
|
|
95657
95740
|
const y = e.clientY - rect.top;
|
|
95658
|
-
if (
|
|
95659
|
-
mouseRef.current = { x, y, active: true };
|
|
95741
|
+
if (x2 >= 0 && x2 <= rect.width && y >= 0 && y <= rect.height) {
|
|
95742
|
+
mouseRef.current = { x: x2, y, active: true };
|
|
95660
95743
|
if (!isActive2) {
|
|
95661
95744
|
setIsActive(true);
|
|
95662
95745
|
}
|
|
@@ -95672,10 +95755,10 @@ var MouseTrailInternal = ({
|
|
|
95672
95755
|
return;
|
|
95673
95756
|
const rect = canvas.getBoundingClientRect();
|
|
95674
95757
|
const touch = e.touches[0];
|
|
95675
|
-
const
|
|
95758
|
+
const x2 = touch.clientX - rect.left;
|
|
95676
95759
|
const y = touch.clientY - rect.top;
|
|
95677
|
-
if (
|
|
95678
|
-
mouseRef.current = { x, y, active: true };
|
|
95760
|
+
if (x2 >= 0 && x2 <= rect.width && y >= 0 && y <= rect.height) {
|
|
95761
|
+
mouseRef.current = { x: x2, y, active: true };
|
|
95679
95762
|
if (!isActive2) {
|
|
95680
95763
|
setIsActive(true);
|
|
95681
95764
|
}
|
|
@@ -96458,40 +96541,40 @@ var BounceEffectInternal = ({
|
|
|
96458
96541
|
const [squash, setSquash] = useState({ x: 1, y: 1 });
|
|
96459
96542
|
useRef({ x: 0, y: 0 });
|
|
96460
96543
|
const startTimeRef = useRef(0);
|
|
96461
|
-
const getEasing = (
|
|
96544
|
+
const getEasing = (t2) => {
|
|
96462
96545
|
switch (easing) {
|
|
96463
96546
|
case "linear":
|
|
96464
|
-
return
|
|
96547
|
+
return t2;
|
|
96465
96548
|
case "ease":
|
|
96466
|
-
return
|
|
96549
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
96467
96550
|
case "ease-in":
|
|
96468
|
-
return
|
|
96551
|
+
return t2 * t2;
|
|
96469
96552
|
case "ease-out":
|
|
96470
|
-
return
|
|
96553
|
+
return t2 * (2 - t2);
|
|
96471
96554
|
case "bounce":
|
|
96472
|
-
if (
|
|
96473
|
-
return 7.5625 *
|
|
96474
|
-
} else if (
|
|
96475
|
-
|
|
96476
|
-
return 7.5625 *
|
|
96477
|
-
} else if (
|
|
96478
|
-
|
|
96479
|
-
return 7.5625 *
|
|
96555
|
+
if (t2 < 0.363636) {
|
|
96556
|
+
return 7.5625 * t2 * t2;
|
|
96557
|
+
} else if (t2 < 0.727272) {
|
|
96558
|
+
t2 -= 0.545454;
|
|
96559
|
+
return 7.5625 * t2 * t2 + 0.75;
|
|
96560
|
+
} else if (t2 < 0.90909) {
|
|
96561
|
+
t2 -= 0.818181;
|
|
96562
|
+
return 7.5625 * t2 * t2 + 0.9375;
|
|
96480
96563
|
} else {
|
|
96481
|
-
|
|
96482
|
-
return 7.5625 *
|
|
96564
|
+
t2 -= 0.954545;
|
|
96565
|
+
return 7.5625 * t2 * t2 + 0.984375;
|
|
96483
96566
|
}
|
|
96484
96567
|
case "elastic":
|
|
96485
|
-
return
|
|
96568
|
+
return t2 === 0 || t2 === 1 ? t2 : -Math.pow(2, 10 * (t2 - 1)) * Math.sin((t2 - 1.1) * 5 * Math.PI);
|
|
96486
96569
|
default:
|
|
96487
|
-
return
|
|
96570
|
+
return t2;
|
|
96488
96571
|
}
|
|
96489
96572
|
};
|
|
96490
96573
|
const calculateBounce = useCallback((time) => {
|
|
96491
96574
|
const elapsed = time - startTimeRef.current;
|
|
96492
96575
|
const progress = Math.min(elapsed / duration, 1);
|
|
96493
96576
|
const easedProgress = getEasing(progress);
|
|
96494
|
-
let
|
|
96577
|
+
let x2 = 0, y = 0;
|
|
96495
96578
|
switch (direction) {
|
|
96496
96579
|
case "up":
|
|
96497
96580
|
y = -distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
@@ -96502,22 +96585,22 @@ var BounceEffectInternal = ({
|
|
|
96502
96585
|
y -= gravity * elapsed * elapsed / 1e4;
|
|
96503
96586
|
break;
|
|
96504
96587
|
case "left":
|
|
96505
|
-
|
|
96588
|
+
x2 = -distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
96506
96589
|
break;
|
|
96507
96590
|
case "right":
|
|
96508
|
-
|
|
96591
|
+
x2 = distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
96509
96592
|
break;
|
|
96510
96593
|
case "all":
|
|
96511
96594
|
const angle = elapsed * 0.01;
|
|
96512
|
-
|
|
96595
|
+
x2 = distance * Math.cos(angle) * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
96513
96596
|
y = -Math.abs(distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce));
|
|
96514
96597
|
y += gravity * elapsed * elapsed / 1e4;
|
|
96515
96598
|
break;
|
|
96516
96599
|
}
|
|
96517
|
-
|
|
96600
|
+
x2 *= friction;
|
|
96518
96601
|
y *= friction;
|
|
96519
96602
|
if (shake) {
|
|
96520
|
-
|
|
96603
|
+
x2 += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
96521
96604
|
y += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
96522
96605
|
}
|
|
96523
96606
|
if (rotate) {
|
|
@@ -96535,9 +96618,9 @@ var BounceEffectInternal = ({
|
|
|
96535
96618
|
}
|
|
96536
96619
|
if (jelly) {
|
|
96537
96620
|
const jellyOffset = Math.sin(elapsed * 0.02) * jellyIntensity * distance;
|
|
96538
|
-
|
|
96621
|
+
x2 += jellyOffset;
|
|
96539
96622
|
}
|
|
96540
|
-
setPosition({ x, y });
|
|
96623
|
+
setPosition({ x: x2, y });
|
|
96541
96624
|
if (progress >= 1) {
|
|
96542
96625
|
setCurrentBounce((prev) => prev + 1);
|
|
96543
96626
|
if (currentBounce >= bounces - 1) {
|
|
@@ -96664,7 +96747,7 @@ var BounceEffectInternal = ({
|
|
|
96664
96747
|
onMouseEnter: handleMouseEnter,
|
|
96665
96748
|
onClick: handleClick2,
|
|
96666
96749
|
children: [
|
|
96667
|
-
trail && isAnimating && Array.from({ length: trailCount }).map((
|
|
96750
|
+
trail && isAnimating && Array.from({ length: trailCount }).map((_2, i) => /* @__PURE__ */ jsx(
|
|
96668
96751
|
"div",
|
|
96669
96752
|
{
|
|
96670
96753
|
className: "absolute inset-0 pointer-events-none",
|
|
@@ -97203,46 +97286,46 @@ var ElasticAnimationInternal = ({
|
|
|
97203
97286
|
const [morphIndex, setMorphIndex] = useState(0);
|
|
97204
97287
|
const startTimeRef = useRef(0);
|
|
97205
97288
|
const animationPhaseRef = useRef("main");
|
|
97206
|
-
const getEasingValue = (
|
|
97289
|
+
const getEasingValue = (t2) => {
|
|
97207
97290
|
switch (easing) {
|
|
97208
97291
|
case "linear":
|
|
97209
|
-
return
|
|
97292
|
+
return t2;
|
|
97210
97293
|
case "ease-in":
|
|
97211
|
-
return
|
|
97294
|
+
return t2 * t2;
|
|
97212
97295
|
case "ease-out":
|
|
97213
|
-
return
|
|
97296
|
+
return t2 * (2 - t2);
|
|
97214
97297
|
case "ease-in-out":
|
|
97215
|
-
return
|
|
97298
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
97216
97299
|
case "elastic":
|
|
97217
|
-
if (
|
|
97218
|
-
return
|
|
97300
|
+
if (t2 === 0 || t2 === 1)
|
|
97301
|
+
return t2;
|
|
97219
97302
|
const p = 0.3;
|
|
97220
97303
|
const s = p / 4;
|
|
97221
|
-
return Math.pow(2, -10 *
|
|
97304
|
+
return Math.pow(2, -10 * t2) * Math.sin((t2 - s) * (2 * Math.PI) / p) + 1;
|
|
97222
97305
|
case "bounce":
|
|
97223
|
-
if (
|
|
97224
|
-
return 7.5625 *
|
|
97225
|
-
} else if (
|
|
97226
|
-
|
|
97227
|
-
return 7.5625 *
|
|
97228
|
-
} else if (
|
|
97229
|
-
|
|
97230
|
-
return 7.5625 *
|
|
97306
|
+
if (t2 < 0.363636) {
|
|
97307
|
+
return 7.5625 * t2 * t2;
|
|
97308
|
+
} else if (t2 < 0.727272) {
|
|
97309
|
+
t2 -= 0.545454;
|
|
97310
|
+
return 7.5625 * t2 * t2 + 0.75;
|
|
97311
|
+
} else if (t2 < 0.90909) {
|
|
97312
|
+
t2 -= 0.818181;
|
|
97313
|
+
return 7.5625 * t2 * t2 + 0.9375;
|
|
97231
97314
|
} else {
|
|
97232
|
-
|
|
97233
|
-
return 7.5625 *
|
|
97315
|
+
t2 -= 0.954545;
|
|
97316
|
+
return 7.5625 * t2 * t2 + 0.984375;
|
|
97234
97317
|
}
|
|
97235
97318
|
default:
|
|
97236
|
-
return
|
|
97319
|
+
return t2;
|
|
97237
97320
|
}
|
|
97238
97321
|
};
|
|
97239
97322
|
const calculateElasticMotion = useCallback((progress) => {
|
|
97240
97323
|
const elasticProgress = getEasingValue(progress);
|
|
97241
|
-
let
|
|
97324
|
+
let x2 = 0, y = 0, scale = 1, rotate = 0, skewX = 0, skewY = 0;
|
|
97242
97325
|
if (direction === "horizontal" || direction === "both") {
|
|
97243
|
-
|
|
97326
|
+
x2 = distance * elasticProgress * Math.cos(progress * Math.PI * 2 * oscillationCount);
|
|
97244
97327
|
if (oscillate) {
|
|
97245
|
-
|
|
97328
|
+
x2 *= Math.pow(1 - progress, damping);
|
|
97246
97329
|
}
|
|
97247
97330
|
}
|
|
97248
97331
|
if (direction === "vertical" || direction === "both") {
|
|
@@ -97253,17 +97336,17 @@ var ElasticAnimationInternal = ({
|
|
|
97253
97336
|
}
|
|
97254
97337
|
if (direction === "diagonal") {
|
|
97255
97338
|
const angle = progress * Math.PI * 2 * oscillationCount;
|
|
97256
|
-
|
|
97339
|
+
x2 = distance * elasticProgress * Math.cos(angle);
|
|
97257
97340
|
y = distance * elasticProgress * Math.sin(angle);
|
|
97258
97341
|
if (oscillate) {
|
|
97259
97342
|
const dampingFactor = Math.pow(1 - progress, damping);
|
|
97260
|
-
|
|
97343
|
+
x2 *= dampingFactor;
|
|
97261
97344
|
y *= dampingFactor;
|
|
97262
97345
|
}
|
|
97263
97346
|
}
|
|
97264
97347
|
if (rubberBand) {
|
|
97265
97348
|
const rubberProgress = Math.sin(progress * Math.PI);
|
|
97266
|
-
|
|
97349
|
+
x2 *= 1 + rubberProgress * rubberBandIntensity;
|
|
97267
97350
|
scale = 1 + rubberProgress * 0.1 * rubberBandIntensity;
|
|
97268
97351
|
}
|
|
97269
97352
|
if (jello) {
|
|
@@ -97273,7 +97356,7 @@ var ElasticAnimationInternal = ({
|
|
|
97273
97356
|
}
|
|
97274
97357
|
if (morph && morphTargets.length > 0) {
|
|
97275
97358
|
const target = morphTargets[morphIndex % morphTargets.length];
|
|
97276
|
-
|
|
97359
|
+
x2 += target.x * elasticProgress;
|
|
97277
97360
|
y += target.y * elasticProgress;
|
|
97278
97361
|
if (target.scale)
|
|
97279
97362
|
scale *= target.scale;
|
|
@@ -97288,12 +97371,12 @@ var ElasticAnimationInternal = ({
|
|
|
97288
97371
|
skewX += (stretchX - 1) * 10;
|
|
97289
97372
|
}
|
|
97290
97373
|
if (anticipation && animationPhaseRef.current === "anticipation") {
|
|
97291
|
-
|
|
97374
|
+
x2 -= anticipationDistance * (1 - progress * 4);
|
|
97292
97375
|
scale *= 0.95 + progress * 0.05;
|
|
97293
97376
|
}
|
|
97294
97377
|
if (followThrough && animationPhaseRef.current === "follow-through") {
|
|
97295
97378
|
const overshoot = Math.sin(progress * Math.PI) * followThroughOvershoot;
|
|
97296
|
-
|
|
97379
|
+
x2 *= overshoot;
|
|
97297
97380
|
y *= overshoot;
|
|
97298
97381
|
}
|
|
97299
97382
|
if (arcMotion) {
|
|
@@ -97308,10 +97391,10 @@ var ElasticAnimationInternal = ({
|
|
|
97308
97391
|
scale *= 1 + (pulseScale - 1) * pulseProgress * (1 - progress);
|
|
97309
97392
|
}
|
|
97310
97393
|
if (shake) {
|
|
97311
|
-
|
|
97394
|
+
x2 += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
97312
97395
|
y += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
97313
97396
|
}
|
|
97314
|
-
return { x, y, scale, rotate, skewX, skewY };
|
|
97397
|
+
return { x: x2, y, scale, rotate, skewX, skewY };
|
|
97315
97398
|
}, [
|
|
97316
97399
|
direction,
|
|
97317
97400
|
distance,
|
|
@@ -97605,21 +97688,21 @@ var PathAnimationsInternal = ({
|
|
|
97605
97688
|
svgRef.current.removeChild(tempPath);
|
|
97606
97689
|
}
|
|
97607
97690
|
}, [getPathString]);
|
|
97608
|
-
const getEasingValue = (
|
|
97691
|
+
const getEasingValue = (t2) => {
|
|
97609
97692
|
switch (easing) {
|
|
97610
97693
|
case "linear":
|
|
97611
|
-
return
|
|
97694
|
+
return t2;
|
|
97612
97695
|
case "ease-in":
|
|
97613
|
-
return
|
|
97696
|
+
return t2 * t2;
|
|
97614
97697
|
case "ease-out":
|
|
97615
|
-
return
|
|
97698
|
+
return t2 * (2 - t2);
|
|
97616
97699
|
case "ease-in-out":
|
|
97617
|
-
return
|
|
97700
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
97618
97701
|
case "cubic-bezier":
|
|
97619
97702
|
const [x1, y1, x2, y2] = cubicBezier;
|
|
97620
|
-
return
|
|
97703
|
+
return t2 * (3 * (1 - t2) * (1 - t2) * y1 + 3 * (1 - t2) * t2 * y2 + t2 * t2);
|
|
97621
97704
|
default:
|
|
97622
|
-
return
|
|
97705
|
+
return t2;
|
|
97623
97706
|
}
|
|
97624
97707
|
};
|
|
97625
97708
|
const calculatePathPosition = useCallback((progress) => {
|
|
@@ -98040,21 +98123,21 @@ var SVGAnimationsInternal = ({
|
|
|
98040
98123
|
});
|
|
98041
98124
|
}
|
|
98042
98125
|
}, [type, drawOptions.fadeIn]);
|
|
98043
|
-
const getEasingValue = (
|
|
98126
|
+
const getEasingValue = (t2) => {
|
|
98044
98127
|
switch (easing) {
|
|
98045
98128
|
case "linear":
|
|
98046
|
-
return
|
|
98129
|
+
return t2;
|
|
98047
98130
|
case "ease-in":
|
|
98048
|
-
return
|
|
98131
|
+
return t2 * t2;
|
|
98049
98132
|
case "ease-out":
|
|
98050
|
-
return
|
|
98133
|
+
return t2 * (2 - t2);
|
|
98051
98134
|
case "ease-in-out":
|
|
98052
|
-
return
|
|
98135
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
98053
98136
|
case "cubic-bezier":
|
|
98054
98137
|
const [x1, y1, x2, y2] = cubicBezier;
|
|
98055
|
-
return
|
|
98138
|
+
return t2 * (3 * (1 - t2) * (1 - t2) * y1 + 3 * (1 - t2) * t2 * y2 + t2 * t2);
|
|
98056
98139
|
default:
|
|
98057
|
-
return
|
|
98140
|
+
return t2;
|
|
98058
98141
|
}
|
|
98059
98142
|
};
|
|
98060
98143
|
const animateDraw = useCallback((progress) => {
|
|
@@ -98790,10 +98873,10 @@ var TouchGesturesInternal = ({
|
|
|
98790
98873
|
const getAngle = (p1, p2) => {
|
|
98791
98874
|
return Math.atan2(p2.currentY - p1.currentY, p2.currentX - p1.currentX) * 180 / Math.PI;
|
|
98792
98875
|
};
|
|
98793
|
-
const applyBoundaries = useCallback((
|
|
98876
|
+
const applyBoundaries = useCallback((x2, y) => {
|
|
98794
98877
|
if (!panBoundaries)
|
|
98795
|
-
return { x, y };
|
|
98796
|
-
const bounded = { x, y };
|
|
98878
|
+
return { x: x2, y };
|
|
98879
|
+
const bounded = { x: x2, y };
|
|
98797
98880
|
if (panBoundaries.left !== void 0) {
|
|
98798
98881
|
bounded.x = Math.max(panBoundaries.left, bounded.x);
|
|
98799
98882
|
}
|
|
@@ -98874,7 +98957,7 @@ var TouchGesturesInternal = ({
|
|
|
98874
98957
|
cancelAnimationFrame(momentumAnimationRef.current);
|
|
98875
98958
|
}
|
|
98876
98959
|
if (indicators) {
|
|
98877
|
-
setIndicatorPositions(touchArray.map((
|
|
98960
|
+
setIndicatorPositions(touchArray.map((t2) => ({ x: t2.clientX, y: t2.clientY })));
|
|
98878
98961
|
}
|
|
98879
98962
|
};
|
|
98880
98963
|
const handleTouchMove = (e) => {
|
|
@@ -98932,7 +99015,7 @@ var TouchGesturesInternal = ({
|
|
|
98932
99015
|
clearTimeout(longPressTimerRef.current);
|
|
98933
99016
|
}
|
|
98934
99017
|
if (indicators) {
|
|
98935
|
-
setIndicatorPositions(touchArray.map((
|
|
99018
|
+
setIndicatorPositions(touchArray.map((t2) => ({ x: t2.clientX, y: t2.clientY })));
|
|
98936
99019
|
}
|
|
98937
99020
|
};
|
|
98938
99021
|
const handleTouchEnd = (e) => {
|
|
@@ -99674,22 +99757,22 @@ var ClickAnimationsInternal = ({
|
|
|
99674
99757
|
setLongPressTimeout(null);
|
|
99675
99758
|
}
|
|
99676
99759
|
}, [longPressTimeout]);
|
|
99677
|
-
const getEasingFunction = useCallback((type,
|
|
99760
|
+
const getEasingFunction = useCallback((type, t2) => {
|
|
99678
99761
|
switch (type) {
|
|
99679
99762
|
case "ease":
|
|
99680
|
-
return
|
|
99763
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
99681
99764
|
case "ease-in":
|
|
99682
|
-
return
|
|
99765
|
+
return t2 * t2;
|
|
99683
99766
|
case "ease-out":
|
|
99684
|
-
return
|
|
99767
|
+
return t2 * (2 - t2);
|
|
99685
99768
|
case "ease-in-out":
|
|
99686
|
-
return
|
|
99769
|
+
return t2 < 0.5 ? 2 * t2 * t2 : -1 + (4 - 2 * t2) * t2;
|
|
99687
99770
|
case "bounce":
|
|
99688
|
-
return 1 - Math.pow(1 -
|
|
99771
|
+
return 1 - Math.pow(1 - t2, 3) * Math.cos(t2 * Math.PI * 4);
|
|
99689
99772
|
case "elastic":
|
|
99690
|
-
return
|
|
99773
|
+
return t2 === 0 ? 0 : t2 === 1 ? 1 : -Math.pow(2, 10 * (t2 - 1)) * Math.sin((t2 - 1.1) * 5 * Math.PI);
|
|
99691
99774
|
default:
|
|
99692
|
-
return
|
|
99775
|
+
return t2;
|
|
99693
99776
|
}
|
|
99694
99777
|
}, []);
|
|
99695
99778
|
const getAnimationStyles = useCallback((animation) => {
|