commerce-toolkit 0.5.0 → 0.6.0
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/accordion-trigger-CpTcclGS.cjs +2 -0
- package/dist/accordion-trigger-CpTcclGS.cjs.map +1 -0
- package/dist/accordion-trigger-DFuN29lS.js +455 -0
- package/dist/accordion-trigger-DFuN29lS.js.map +1 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +7 -8
- package/dist/blog-post-card-author-CBXo2FqS.cjs +2 -0
- package/dist/blog-post-card-author-CBXo2FqS.cjs.map +1 -0
- package/dist/{blog-post-card-author-C1GuND4f.js → blog-post-card-author-VkGle9g8.js} +30 -24
- package/dist/blog-post-card-author-VkGle9g8.js.map +1 -0
- package/dist/blog-post-card.cjs +1 -1
- package/dist/blog-post-card.cjs.map +1 -1
- package/dist/blog-post-card.js +28 -34
- package/dist/blog-post-card.js.map +1 -1
- package/dist/carousel-next-C6jpZTlN.js +1480 -0
- package/dist/carousel-next-C6jpZTlN.js.map +1 -0
- package/dist/carousel-next-DEHDO98_.cjs +2 -0
- package/dist/{carousel-next-BGIZglEF.cjs.map → carousel-next-DEHDO98_.cjs.map} +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +1 -1
- package/dist/category-card-link-BXoWFETv.cjs +2 -0
- package/dist/category-card-link-BXoWFETv.cjs.map +1 -0
- package/dist/category-card-link-D85RfMpf.js +186 -0
- package/dist/category-card-link-D85RfMpf.js.map +1 -0
- package/dist/category-card.cjs +1 -1
- package/dist/category-card.cjs.map +1 -1
- package/dist/category-card.js +23 -27
- package/dist/category-card.js.map +1 -1
- package/dist/compare-card.cjs +1 -1
- package/dist/compare-card.js +2 -2
- package/dist/components/accordion/accordion.d.ts +1 -2
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/primitives/accordion-chevron.d.ts.map +1 -1
- package/dist/components/accordion/primitives/accordion-content-area.d.ts.map +1 -1
- package/dist/components/accordion/primitives/accordion-item.d.ts.map +1 -1
- package/dist/components/accordion/primitives/accordion-root.d.ts +2 -10
- package/dist/components/accordion/primitives/accordion-root.d.ts.map +1 -1
- package/dist/components/accordion/primitives/accordion-title.d.ts.map +1 -1
- package/dist/components/accordion/primitives.d.ts +1 -1
- package/dist/components/accordion/primitives.d.ts.map +1 -1
- package/dist/components/blog-post-card/blog-post-card.d.ts +2 -1
- package/dist/components/blog-post-card/blog-post-card.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-root.d.ts +2 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-root.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-skeleton.d.ts +2 -4
- package/dist/components/blog-post-card/primitives/blog-post-card-skeleton.d.ts.map +1 -1
- package/dist/components/blog-post-card/primitives/blog-post-card-thumbnail.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +2 -4
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/carousel/primitives/carousel-controls.d.ts.map +1 -1
- package/dist/components/carousel/primitives/carousel-root.d.ts +1 -3
- package/dist/components/carousel/primitives/carousel-root.d.ts.map +1 -1
- package/dist/components/carousel/primitives/carousel-scrollbar.d.ts.map +1 -1
- package/dist/components/category-card/category-card.d.ts +2 -4
- package/dist/components/category-card/category-card.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-fallback.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-icon.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-image.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-link.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-overlay.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-root.d.ts +2 -14
- package/dist/components/category-card/primitives/category-card-root.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-skeleton.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-thumbnail.d.ts.map +1 -1
- package/dist/components/category-card/primitives/category-card-title.d.ts.map +1 -1
- package/dist/components/category-card/primitives.d.ts +1 -1
- package/dist/components/category-card/primitives.d.ts.map +1 -1
- package/dist/components/price/price.d.ts +1 -1
- package/dist/components/price/price.d.ts.map +1 -1
- package/dist/components/price/primitives/price-root.d.ts +2 -4
- package/dist/components/price/primitives/price-root.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-checkbox.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-fallback.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-image.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-label.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-link.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-price.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-root.d.ts +2 -10
- package/dist/components/product-card/primitives/product-card-root.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-skeleton.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-subtitle.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-thumbnail.d.ts.map +1 -1
- package/dist/components/product-card/primitives/product-card-title.d.ts.map +1 -1
- package/dist/components/product-card/primitives.d.ts +1 -1
- package/dist/components/product-card/primitives.d.ts.map +1 -1
- package/dist/components/product-card/product-card.d.ts +2 -3
- package/dist/components/product-card/product-card.d.ts.map +1 -1
- package/dist/components/range-input/range-input.d.ts +0 -1
- package/dist/components/range-input/range-input.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +415 -476
- package/dist/index.js.map +1 -1
- package/dist/{price-strike-Ciakdz8c.js → price-strike-D9Pzzzkr.js} +9 -18
- package/dist/price-strike-D9Pzzzkr.js.map +1 -0
- package/dist/price-strike-DqOP577f.cjs +2 -0
- package/dist/price-strike-DqOP577f.cjs.map +1 -0
- package/dist/price.cjs +1 -1
- package/dist/price.js +1 -1
- package/dist/product-card-label-CP4yzMhB.js +244 -0
- package/dist/product-card-label-CP4yzMhB.js.map +1 -0
- package/dist/product-card-label-DHKOJFTo.cjs +2 -0
- package/dist/product-card-label-DHKOJFTo.cjs.map +1 -0
- package/dist/product-card-root-BnBOoYFY.js +27 -0
- package/dist/product-card-root-BnBOoYFY.js.map +1 -0
- package/dist/product-card-root-DNqlSx52.cjs +2 -0
- package/dist/product-card-root-DNqlSx52.cjs.map +1 -0
- package/dist/product-card-skeleton-BgN1OCwY.cjs +2 -0
- package/dist/product-card-skeleton-BgN1OCwY.cjs.map +1 -0
- package/dist/product-card-skeleton-C-xXJrKi.js +29 -0
- package/dist/product-card-skeleton-C-xXJrKi.js.map +1 -0
- package/dist/product-card.cjs +1 -1
- package/dist/product-card.js +19 -20
- package/package.json +1 -1
- package/dist/accordion-trigger-Bj1Laf6l.cjs +0 -2
- package/dist/accordion-trigger-Bj1Laf6l.cjs.map +0 -1
- package/dist/accordion-trigger-Cdkd0tWD.js +0 -494
- package/dist/accordion-trigger-Cdkd0tWD.js.map +0 -1
- package/dist/blog-post-card-author-B55DKFff.cjs +0 -2
- package/dist/blog-post-card-author-B55DKFff.cjs.map +0 -1
- package/dist/blog-post-card-author-C1GuND4f.js.map +0 -1
- package/dist/carousel-next-BGIZglEF.cjs +0 -2
- package/dist/carousel-next-BzKOs3K-.js +0 -1495
- package/dist/carousel-next-BzKOs3K-.js.map +0 -1
- package/dist/category-card-link-BSmQDScF.cjs +0 -2
- package/dist/category-card-link-BSmQDScF.cjs.map +0 -1
- package/dist/category-card-link-mgtggmo_.js +0 -211
- package/dist/category-card-link-mgtggmo_.js.map +0 -1
- package/dist/price-strike-BTE4S5Na.cjs +0 -2
- package/dist/price-strike-BTE4S5Na.cjs.map +0 -1
- package/dist/price-strike-Ciakdz8c.js.map +0 -1
- package/dist/product-card-label-BQeJxNcX.cjs +0 -2
- package/dist/product-card-label-BQeJxNcX.cjs.map +0 -1
- package/dist/product-card-label-C6D-fYjj.js +0 -285
- package/dist/product-card-label-C6D-fYjj.js.map +0 -1
- package/dist/product-card-root-BGUa-vQ_.js +0 -43
- package/dist/product-card-root-BGUa-vQ_.js.map +0 -1
- package/dist/product-card-root-Q5lwSPd8.cjs +0 -2
- package/dist/product-card-root-Q5lwSPd8.cjs.map +0 -1
- package/dist/product-card-skeleton-B8DGleVJ.js +0 -33
- package/dist/product-card-skeleton-B8DGleVJ.js.map +0 -1
- package/dist/product-card-skeleton-CCbWpq16.cjs +0 -2
- package/dist/product-card-skeleton-CCbWpq16.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { jsx as m, jsxs as D } from "react/jsx-runtime";
|
|
2
|
-
import { a as Gr, A as Zr, d as Ur, g as Xr, e as Qr, f as Kr, b as Jr, c as to } from "./accordion-trigger-
|
|
3
|
-
import c, { createContext as eo, useContext as ro, useCallback as
|
|
2
|
+
import { a as Gr, A as Zr, d as Ur, g as Xr, e as Qr, f as Kr, b as Jr, c as to } from "./accordion-trigger-DFuN29lS.js";
|
|
3
|
+
import c, { createContext as eo, useContext as ro, useCallback as dt, useRef as Jt, useLayoutEffect as oo, useState as ge, useEffect as lr, useMemo as Se, Fragment as io, forwardRef as no, createElement as Re } from "react";
|
|
4
4
|
import { A as ao, a as so, b as lo, c as co, d as mo, e as po, f as uo } from "./alert-dismiss-EYWAId7r.js";
|
|
5
5
|
import { B as Be } from "./button-W0_PtryU.js";
|
|
6
6
|
import { R as fo, a as ho, b as go, c as bo } from "./reveal-trigger-ScuufoFq.js";
|
|
7
7
|
import { A as $m } from "./reveal-trigger-ScuufoFq.js";
|
|
8
|
-
import { P as yo, a as wo, b as vo, d as ko, c as xo, e as Ae, f as Mo, g as Do, h as Co, i as Oo, j as So, k as No, l as To, m as Wo } from "./product-card-label-
|
|
9
|
-
import { B as Gm, C as Zm, n as Um } from "./product-card-label-
|
|
8
|
+
import { P as yo, a as wo, b as vo, d as ko, c as xo, e as Ae, f as Mo, g as Do, h as Co, i as Oo, j as So, k as No, l as To, m as Wo } from "./product-card-label-CP4yzMhB.js";
|
|
9
|
+
import { B as Gm, C as Zm, n as Um } from "./product-card-label-CP4yzMhB.js";
|
|
10
10
|
import { B as Eo, a as _o, b as Po, c as qo, d as Yo } from "./banner-dismiss-B_j9wqx-.js";
|
|
11
|
-
import { B as Bo, b as Io, c as Fo, a as zo, e as Ro, f as Ao, g as jo, h as Ho, i as Lo, d as $o } from "./blog-post-card-author-
|
|
11
|
+
import { B as Bo, b as Io, c as Fo, a as zo, e as Ro, f as Ao, g as jo, h as Ho, i as Lo, d as $o } from "./blog-post-card-author-VkGle9g8.js";
|
|
12
12
|
import { S as Vo } from "./skeleton-root-BIYF02UE.js";
|
|
13
13
|
import { S as Go } from "./skeleton-box-D0XcgPLs.js";
|
|
14
14
|
import { S as Zo } from "./skeleton-text-BCsnfhcU.js";
|
|
15
15
|
import { S as Uo } from "./skeleton-icon-Cm6f9u-Z.js";
|
|
16
|
-
import { C as Xo, c as Qo, a as Ko, b as Jo, B as _e, d as ti, e as ei, f as ri, g as oi, h as ii, i as ni, j as ai, k as si, l as li, m as ci, n as mi, o as
|
|
17
|
-
import { c as
|
|
16
|
+
import { C as Xo, c as Qo, a as Ko, b as Jo, B as _e, d as ti, e as ei, f as ri, g as oi, h as ii, i as ni, j as ai, k as si, l as li, m as ci, n as mi, o as pi, p as di } from "./compare-card-specs-empty-n4gOqNXU.js";
|
|
17
|
+
import { c as Ft } from "./utils-CRiPKpXj.js";
|
|
18
18
|
import { c as oe, I as ui } from "./createLucideIcon-DU8bVqFn.js";
|
|
19
19
|
import { C as fi, a as hi } from "./card-link-C48N1y5C.js";
|
|
20
|
-
import { C as gi, a as bi, b as yi, c as wi, e as vi, d as ki, f as xi, g as Mi, h as Di } from "./carousel-next-
|
|
20
|
+
import { C as gi, a as bi, b as yi, c as wi, e as vi, d as ki, f as xi, g as Mi, h as Di } from "./carousel-next-C6jpZTlN.js";
|
|
21
21
|
import { A as Pe, a as te, C as Ci, b as Oi, c as je, d as ue } from "./cursor-pagination-link-CWbshIOY.js";
|
|
22
|
-
import { C as Si, a as Ni, b as Ti, c as Wi, d as Ei, e as _i, f as He, g as Pi } from "./category-card-link-
|
|
22
|
+
import { C as Si, a as Ni, b as Ti, c as Wi, d as Ei, e as _i, f as He, g as Pi } from "./category-card-link-D85RfMpf.js";
|
|
23
23
|
import { C as qi, a as Yi } from "./chip-button-BhdyJZ5U.js";
|
|
24
|
-
import { P as Bi } from "./product-card-root-
|
|
24
|
+
import { P as Bi } from "./product-card-root-BnBOoYFY.js";
|
|
25
25
|
import { R as Ii, b as Fi, c as zi, d as Ri } from "./rating-total-C_vpBVPa.js";
|
|
26
26
|
import { D as Ai, a as ji, h as Hi, b as Li, i as $i, e as Vi, m as Gi, S as Zi } from "./dropdown-menu-node-x6qIrxA6.js";
|
|
27
27
|
import "./scroll-area-corner-DfIRArAE.js";
|
|
28
28
|
import { c as Ui, T as Xi, a as Qi, b as Ki } from "./tabs-root-BLHqpIyN.js";
|
|
29
29
|
import Ji from "react-dom";
|
|
30
30
|
import { L as Qm } from "./label-C2HI4Bjj.js";
|
|
31
|
-
import { C as tn, a as en, b as rn, c as on, d as nn, e as an, f as sn, g as ln, h as cn, i as mn, j as
|
|
31
|
+
import { C as tn, a as en, b as rn, c as on, d as nn, e as an, f as sn, g as ln, h as cn, i as mn, j as pn } from "./compare-drawer-remove-DqQAu7qC.js";
|
|
32
32
|
import cr from "./x-CyE7A75y.js";
|
|
33
|
-
import { C as
|
|
33
|
+
import { C as dn, a as un, c as fn, b as hn } from "./counter-input-staB16MG.js";
|
|
34
34
|
import { F as gn, a as bn } from "./favorite-heart-DM8QjcYe.js";
|
|
35
35
|
import { c as yn, h as wn, F as vn, f as kn, d as xn, e as Mn, b as Dn, g as Cn, a as On } from "./field-error-DtlucLPM.js";
|
|
36
36
|
import { L as Sn, a as Nn, c as Tn, b as Wn } from "./logo-skeleton-DSSJAa_5.js";
|
|
37
37
|
import { M as En, a as _n, b as Pn, c as qn, d as Yn, e as Bn } from "./modal-title-DIVsr1XZ.js";
|
|
38
38
|
import { O as In, a as Fn, b as Le, d as zn, c as Rn } from "./offset-pagination-ellipsis-bGa7YpkD.js";
|
|
39
39
|
import { S as An, a as jn, b as Hn, c as Ln, d as $n, f as Vn, g as Gn, h as Zn, e as Un } from "./side-panel-close-CbsiwlUW.js";
|
|
40
|
-
function ym({ className: t,
|
|
41
|
-
return /* @__PURE__ */ m(Gr, { className: t,
|
|
40
|
+
function ym({ className: t, items: e, ...r }) {
|
|
41
|
+
return /* @__PURE__ */ m(Gr, { className: t, ...r, children: e.map(({ content: o, title: i, value: n }) => /* @__PURE__ */ D(Zr, { value: n, children: [
|
|
42
42
|
/* @__PURE__ */ m(Ur, { children: /* @__PURE__ */ D(Xr, { children: [
|
|
43
|
-
/* @__PURE__ */ m(Qr, { children:
|
|
43
|
+
/* @__PURE__ */ m(Qr, { children: i }),
|
|
44
44
|
/* @__PURE__ */ m(Kr, {})
|
|
45
45
|
] }) }),
|
|
46
|
-
/* @__PURE__ */ m(Jr, { children: /* @__PURE__ */ m(to, { children:
|
|
47
|
-
] },
|
|
46
|
+
/* @__PURE__ */ m(Jr, { children: /* @__PURE__ */ m(to, { children: o }) })
|
|
47
|
+
] }, n)) });
|
|
48
48
|
}
|
|
49
49
|
function fe({ className: t, variant: e, message: r, description: o, action: i, dismiss: n }) {
|
|
50
50
|
return /* @__PURE__ */ D(ao, { action: i, className: t, dismiss: n, variant: e, children: [
|
|
@@ -67,10 +67,10 @@ function fe({ className: t, variant: e, message: r, description: o, action: i, d
|
|
|
67
67
|
const mr = [
|
|
68
68
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
69
69
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
70
|
-
],
|
|
70
|
+
], pr = oe("arrow-up-right", mr), Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71
71
|
__proto__: null,
|
|
72
72
|
__iconNode: mr,
|
|
73
|
-
default:
|
|
73
|
+
default: pr
|
|
74
74
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
75
75
|
/**
|
|
76
76
|
* @license lucide-react v0.545.0 - ISC
|
|
@@ -78,9 +78,9 @@ const mr = [
|
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
80
|
*/
|
|
81
|
-
const
|
|
81
|
+
const dr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ur = oe("chevron-left", dr), Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82
82
|
__proto__: null,
|
|
83
|
-
__iconNode:
|
|
83
|
+
__iconNode: dr,
|
|
84
84
|
default: ur
|
|
85
85
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
86
86
|
/**
|
|
@@ -134,22 +134,23 @@ const yr = [
|
|
|
134
134
|
] }) }) });
|
|
135
135
|
function vm({
|
|
136
136
|
author: t,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
aspectRatio: e = "4/3",
|
|
138
|
+
content: r,
|
|
139
|
+
date: o,
|
|
140
|
+
link: i,
|
|
141
|
+
image: n,
|
|
142
|
+
title: l,
|
|
143
|
+
className: s
|
|
143
144
|
}) {
|
|
144
|
-
return /* @__PURE__ */ D(Bo, { className:
|
|
145
|
-
/* @__PURE__ */ m(Io, { children:
|
|
146
|
-
/* @__PURE__ */ m(Ro, { children:
|
|
147
|
-
/* @__PURE__ */ m(Ao, { children:
|
|
145
|
+
return /* @__PURE__ */ D(Bo, { aspectRatio: e, className: s, children: [
|
|
146
|
+
/* @__PURE__ */ m(Io, { children: n ? /* @__PURE__ */ m(Fo, { alt: n.alt, src: n.src }) : /* @__PURE__ */ m(zo, { children: l }) }),
|
|
147
|
+
/* @__PURE__ */ m(Ro, { children: l }),
|
|
148
|
+
/* @__PURE__ */ m(Ao, { children: r }),
|
|
148
149
|
/* @__PURE__ */ D(jo, { children: [
|
|
149
|
-
/* @__PURE__ */ m(Ho, { children:
|
|
150
|
+
/* @__PURE__ */ m(Ho, { children: o }),
|
|
150
151
|
t !== void 0 && /* @__PURE__ */ m(Lo, { children: t })
|
|
151
152
|
] }),
|
|
152
|
-
/* @__PURE__ */ m($o, { "aria-label":
|
|
153
|
+
/* @__PURE__ */ m($o, { "aria-label": i.ariaLabel, href: i.href })
|
|
153
154
|
] });
|
|
154
155
|
}
|
|
155
156
|
const km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -186,18 +187,18 @@ function Ve(t, e) {
|
|
|
186
187
|
const r = +(e[0] || 0), o = +(e[1] || 0), i = +(e[2] || 0) / 60;
|
|
187
188
|
return Kt[t] = r * 60 + o > 0 ? r * 60 + o + i : r * 60 - o - i;
|
|
188
189
|
}
|
|
189
|
-
class
|
|
190
|
+
class Mt extends Date {
|
|
190
191
|
//#region static
|
|
191
192
|
constructor(...e) {
|
|
192
193
|
super(), e.length > 1 && typeof e[e.length - 1] == "string" && (this.timeZone = e.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(zt(this.timeZone, this)) ? this.setTime(NaN) : e.length ? typeof e[0] == "number" && (e.length === 1 || e.length === 2 && typeof e[1] != "number") ? this.setTime(e[0]) : typeof e[0] == "string" ? this.setTime(+new Date(e[0])) : e[0] instanceof Date ? this.setTime(+e[0]) : (this.setTime(+new Date(...e)), vr(this), qe(this)) : this.setTime(Date.now());
|
|
193
194
|
}
|
|
194
195
|
static tz(e, ...r) {
|
|
195
|
-
return r.length ? new
|
|
196
|
+
return r.length ? new Mt(...r, e) : new Mt(Date.now(), e);
|
|
196
197
|
}
|
|
197
198
|
//#endregion
|
|
198
199
|
//#region time zone
|
|
199
200
|
withTimeZone(e) {
|
|
200
|
-
return new
|
|
201
|
+
return new Mt(+this, e);
|
|
201
202
|
}
|
|
202
203
|
getTimezoneOffset() {
|
|
203
204
|
const e = -zt(this.timeZone, this);
|
|
@@ -211,7 +212,7 @@ class Dt extends Date {
|
|
|
211
212
|
//#endregion
|
|
212
213
|
//#region date-fns integration
|
|
213
214
|
[Symbol.for("constructDateFrom")](e) {
|
|
214
|
-
return new
|
|
215
|
+
return new Mt(+new Date(e), this.timeZone);
|
|
215
216
|
}
|
|
216
217
|
//#endregion
|
|
217
218
|
}
|
|
@@ -219,11 +220,11 @@ const Ge = /^(get|set)(?!UTC)/;
|
|
|
219
220
|
Object.getOwnPropertyNames(Date.prototype).forEach((t) => {
|
|
220
221
|
if (!Ge.test(t)) return;
|
|
221
222
|
const e = t.replace(Ge, "$1UTC");
|
|
222
|
-
|
|
223
|
+
Mt.prototype[e] && (t.startsWith("get") ? Mt.prototype[t] = function() {
|
|
223
224
|
return this.internal[e]();
|
|
224
|
-
} : (
|
|
225
|
+
} : (Mt.prototype[t] = function() {
|
|
225
226
|
return Date.prototype[e].apply(this.internal, arguments), oa(this), +this;
|
|
226
|
-
},
|
|
227
|
+
}, Mt.prototype[e] = function() {
|
|
227
228
|
return Date.prototype[e].apply(this, arguments), qe(this), +this;
|
|
228
229
|
}));
|
|
229
230
|
});
|
|
@@ -238,20 +239,20 @@ function vr(t) {
|
|
|
238
239
|
o.setUTCHours(o.getUTCHours() - 1);
|
|
239
240
|
const i = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset(), n = -(/* @__PURE__ */ new Date(+o)).getTimezoneOffset(), l = i - n, s = Date.prototype.getHours.apply(t) !== t.internal.getUTCHours();
|
|
240
241
|
l && s && t.internal.setUTCMinutes(t.internal.getUTCMinutes() + l);
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
const u = i > 0 ?
|
|
242
|
+
const p = i - r;
|
|
243
|
+
p && Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + p);
|
|
244
|
+
const d = /* @__PURE__ */ new Date(+t);
|
|
245
|
+
d.setUTCSeconds(0);
|
|
246
|
+
const u = i > 0 ? d.getSeconds() : (d.getSeconds() - 60) % 60, a = Math.round(-(zt(t.timeZone, t) * 60)) % 60;
|
|
246
247
|
(a || u) && (t.internal.setUTCSeconds(t.internal.getUTCSeconds() + a), Date.prototype.setUTCSeconds.call(t, Date.prototype.getUTCSeconds.call(t) + a + u));
|
|
247
|
-
const f = zt(t.timeZone, t), b = f > 0 ? Math.floor(f) : Math.ceil(f), S = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - b, y = b !== r, h = S -
|
|
248
|
+
const f = zt(t.timeZone, t), b = f > 0 ? Math.floor(f) : Math.ceil(f), S = -(/* @__PURE__ */ new Date(+t)).getTimezoneOffset() - b, y = b !== r, h = S - p;
|
|
248
249
|
if (y && h) {
|
|
249
250
|
Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + h);
|
|
250
251
|
const W = zt(t.timeZone, t), k = W > 0 ? Math.floor(W) : Math.ceil(W), _ = b - k;
|
|
251
252
|
_ && (t.internal.setUTCMinutes(t.internal.getUTCMinutes() + _), Date.prototype.setUTCMinutes.call(t, Date.prototype.getUTCMinutes.call(t) + _));
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
|
-
class nt extends
|
|
255
|
+
class nt extends Mt {
|
|
255
256
|
//#region static
|
|
256
257
|
static tz(e, ...r) {
|
|
257
258
|
return r.length ? new nt(...r, e) : new nt(Date.now(), e);
|
|
@@ -381,8 +382,8 @@ function Cr(t, e, r) {
|
|
|
381
382
|
r?.in,
|
|
382
383
|
t,
|
|
383
384
|
e
|
|
384
|
-
), n = re(o), l = re(i), s = +n - Ue(n),
|
|
385
|
-
return Math.round((s -
|
|
385
|
+
), n = re(o), l = re(i), s = +n - Ue(n), p = +l - Ue(l);
|
|
386
|
+
return Math.round((s - p) / ia);
|
|
386
387
|
}
|
|
387
388
|
function aa(t, e) {
|
|
388
389
|
const r = Dr(t, e), o = U(t, 0);
|
|
@@ -410,7 +411,7 @@ function ma(t, e) {
|
|
|
410
411
|
(!r || r > n || isNaN(+n)) && (r = n);
|
|
411
412
|
}), U(o, r || NaN);
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
+
function pa(t, e, r) {
|
|
414
415
|
const [o, i] = Vt(
|
|
415
416
|
r?.in,
|
|
416
417
|
t,
|
|
@@ -421,7 +422,7 @@ function da(t, e, r) {
|
|
|
421
422
|
function Or(t) {
|
|
422
423
|
return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
|
|
423
424
|
}
|
|
424
|
-
function
|
|
425
|
+
function da(t) {
|
|
425
426
|
return !(!Or(t) && typeof t != "number" || isNaN(+F(t)));
|
|
426
427
|
}
|
|
427
428
|
function ua(t, e, r) {
|
|
@@ -446,10 +447,10 @@ function ha(t, e) {
|
|
|
446
447
|
const n = i ? +r : +o, l = i ? o : r;
|
|
447
448
|
l.setHours(0, 0, 0, 0), l.setDate(1);
|
|
448
449
|
let s = 1;
|
|
449
|
-
const
|
|
450
|
+
const p = [];
|
|
450
451
|
for (; +l <= n; )
|
|
451
|
-
|
|
452
|
-
return i ?
|
|
452
|
+
p.push(U(r, l)), l.setMonth(l.getMonth() + s);
|
|
453
|
+
return i ? p.reverse() : p;
|
|
453
454
|
}
|
|
454
455
|
function ga(t, e) {
|
|
455
456
|
const r = F(t, e?.in);
|
|
@@ -469,10 +470,10 @@ function ya(t, e) {
|
|
|
469
470
|
const n = i ? +r : +o, l = i ? o : r;
|
|
470
471
|
l.setHours(0, 0, 0, 0), l.setMonth(0, 1);
|
|
471
472
|
let s = 1;
|
|
472
|
-
const
|
|
473
|
+
const p = [];
|
|
473
474
|
for (; +l <= n; )
|
|
474
|
-
|
|
475
|
-
return i ?
|
|
475
|
+
p.push(U(r, l)), l.setFullYear(l.getFullYear() + s);
|
|
476
|
+
return i ? p.reverse() : p;
|
|
476
477
|
}
|
|
477
478
|
function Tr(t, e) {
|
|
478
479
|
const r = ie(), o = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, i = F(t, e?.in), n = i.getDay(), l = (n < o ? -7 : 0) + 6 - (n - o);
|
|
@@ -761,17 +762,17 @@ function Qt(t) {
|
|
|
761
762
|
const o = r.width, i = o && t.matchPatterns[o] || t.matchPatterns[t.defaultMatchWidth], n = e.match(i);
|
|
762
763
|
if (!n)
|
|
763
764
|
return null;
|
|
764
|
-
const l = n[0], s = o && t.parsePatterns[o] || t.parsePatterns[t.defaultParseWidth],
|
|
765
|
+
const l = n[0], s = o && t.parsePatterns[o] || t.parsePatterns[t.defaultParseWidth], p = Array.isArray(s) ? Ia(s, (a) => a.test(l)) : (
|
|
765
766
|
// [TODO] -- I challenge you to fix the type
|
|
766
767
|
Ba(s, (a) => a.test(l))
|
|
767
768
|
);
|
|
768
|
-
let
|
|
769
|
-
|
|
769
|
+
let d;
|
|
770
|
+
d = t.valueCallback ? t.valueCallback(p) : p, d = r.valueCallback ? (
|
|
770
771
|
// [TODO] -- I challenge you to fix the type
|
|
771
|
-
r.valueCallback(
|
|
772
|
-
) :
|
|
772
|
+
r.valueCallback(d)
|
|
773
|
+
) : d;
|
|
773
774
|
const u = e.slice(l.length);
|
|
774
|
-
return { value:
|
|
775
|
+
return { value: d, rest: u };
|
|
775
776
|
};
|
|
776
777
|
}
|
|
777
778
|
function Ba(t, e) {
|
|
@@ -923,10 +924,10 @@ function Wr(t, e) {
|
|
|
923
924
|
function Er(t, e) {
|
|
924
925
|
const r = F(t, e?.in), o = r.getFullYear(), i = ie(), n = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, l = U(e?.in || t, 0);
|
|
925
926
|
l.setFullYear(o + 1, 0, n), l.setHours(0, 0, 0, 0);
|
|
926
|
-
const s = $t(l, e),
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
return +r >= +s ? o + 1 : +r >= +
|
|
927
|
+
const s = $t(l, e), p = U(e?.in || t, 0);
|
|
928
|
+
p.setFullYear(o, 0, n), p.setHours(0, 0, 0, 0);
|
|
929
|
+
const d = $t(p, e);
|
|
930
|
+
return +r >= +s ? o + 1 : +r >= +d ? o : o - 1;
|
|
930
931
|
}
|
|
931
932
|
function Ja(t, e) {
|
|
932
933
|
const r = ie(), o = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = Er(t, e), n = U(e?.in || t, 0);
|
|
@@ -940,7 +941,7 @@ function B(t, e) {
|
|
|
940
941
|
const r = t < 0 ? "-" : "", o = Math.abs(t).toString().padStart(e, "0");
|
|
941
942
|
return r + o;
|
|
942
943
|
}
|
|
943
|
-
const
|
|
944
|
+
const Pt = {
|
|
944
945
|
// Year
|
|
945
946
|
y(t, e) {
|
|
946
947
|
const r = t.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
@@ -1026,7 +1027,7 @@ const qt = {
|
|
|
1026
1027
|
const o = t.getFullYear(), i = o > 0 ? o : 1 - o;
|
|
1027
1028
|
return r.ordinalNumber(i, { unit: "year" });
|
|
1028
1029
|
}
|
|
1029
|
-
return
|
|
1030
|
+
return Pt.y(t, e);
|
|
1030
1031
|
},
|
|
1031
1032
|
// Local week-numbering year
|
|
1032
1033
|
Y: function(t, e, r, o) {
|
|
@@ -1129,7 +1130,7 @@ const qt = {
|
|
|
1129
1130
|
switch (e) {
|
|
1130
1131
|
case "M":
|
|
1131
1132
|
case "MM":
|
|
1132
|
-
return
|
|
1133
|
+
return Pt.M(t, e);
|
|
1133
1134
|
// 1st, 2nd, ..., 12th
|
|
1134
1135
|
case "Mo":
|
|
1135
1136
|
return r.ordinalNumber(o + 1, { unit: "month" });
|
|
@@ -1194,7 +1195,7 @@ const qt = {
|
|
|
1194
1195
|
},
|
|
1195
1196
|
// Day of the month
|
|
1196
1197
|
d: function(t, e, r) {
|
|
1197
|
-
return e === "do" ? r.ordinalNumber(t.getDate(), { unit: "date" }) :
|
|
1198
|
+
return e === "do" ? r.ordinalNumber(t.getDate(), { unit: "date" }) : Pt.d(t, e);
|
|
1198
1199
|
},
|
|
1199
1200
|
// Day of year
|
|
1200
1201
|
D: function(t, e, r) {
|
|
@@ -1440,11 +1441,11 @@ const qt = {
|
|
|
1440
1441
|
let o = t.getHours() % 12;
|
|
1441
1442
|
return o === 0 && (o = 12), r.ordinalNumber(o, { unit: "hour" });
|
|
1442
1443
|
}
|
|
1443
|
-
return
|
|
1444
|
+
return Pt.h(t, e);
|
|
1444
1445
|
},
|
|
1445
1446
|
// Hour [0-23]
|
|
1446
1447
|
H: function(t, e, r) {
|
|
1447
|
-
return e === "Ho" ? r.ordinalNumber(t.getHours(), { unit: "hour" }) :
|
|
1448
|
+
return e === "Ho" ? r.ordinalNumber(t.getHours(), { unit: "hour" }) : Pt.H(t, e);
|
|
1448
1449
|
},
|
|
1449
1450
|
// Hour [0-11]
|
|
1450
1451
|
K: function(t, e, r) {
|
|
@@ -1458,15 +1459,15 @@ const qt = {
|
|
|
1458
1459
|
},
|
|
1459
1460
|
// Minute
|
|
1460
1461
|
m: function(t, e, r) {
|
|
1461
|
-
return e === "mo" ? r.ordinalNumber(t.getMinutes(), { unit: "minute" }) :
|
|
1462
|
+
return e === "mo" ? r.ordinalNumber(t.getMinutes(), { unit: "minute" }) : Pt.m(t, e);
|
|
1462
1463
|
},
|
|
1463
1464
|
// Second
|
|
1464
1465
|
s: function(t, e, r) {
|
|
1465
|
-
return e === "so" ? r.ordinalNumber(t.getSeconds(), { unit: "second" }) :
|
|
1466
|
+
return e === "so" ? r.ordinalNumber(t.getSeconds(), { unit: "second" }) : Pt.s(t, e);
|
|
1466
1467
|
},
|
|
1467
1468
|
// Fraction of second
|
|
1468
1469
|
S: function(t, e) {
|
|
1469
|
-
return
|
|
1470
|
+
return Pt.S(t, e);
|
|
1470
1471
|
},
|
|
1471
1472
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1472
1473
|
X: function(t, e, r) {
|
|
@@ -1482,7 +1483,7 @@ const qt = {
|
|
|
1482
1483
|
// so this token always has the same output as `XX`
|
|
1483
1484
|
case "XXXX":
|
|
1484
1485
|
case "XX":
|
|
1485
|
-
return
|
|
1486
|
+
return It(o);
|
|
1486
1487
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1487
1488
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1488
1489
|
// so this token always has the same output as `XXX`
|
|
@@ -1490,7 +1491,7 @@ const qt = {
|
|
|
1490
1491
|
case "XXX":
|
|
1491
1492
|
// Hours and minutes with `:` delimiter
|
|
1492
1493
|
default:
|
|
1493
|
-
return
|
|
1494
|
+
return It(o, ":");
|
|
1494
1495
|
}
|
|
1495
1496
|
},
|
|
1496
1497
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1505,7 +1506,7 @@ const qt = {
|
|
|
1505
1506
|
// so this token always has the same output as `xx`
|
|
1506
1507
|
case "xxxx":
|
|
1507
1508
|
case "xx":
|
|
1508
|
-
return
|
|
1509
|
+
return It(o);
|
|
1509
1510
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1510
1511
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1511
1512
|
// so this token always has the same output as `xxx`
|
|
@@ -1513,7 +1514,7 @@ const qt = {
|
|
|
1513
1514
|
case "xxx":
|
|
1514
1515
|
// Hours and minutes with `:` delimiter
|
|
1515
1516
|
default:
|
|
1516
|
-
return
|
|
1517
|
+
return It(o, ":");
|
|
1517
1518
|
}
|
|
1518
1519
|
},
|
|
1519
1520
|
// Timezone (GMT)
|
|
@@ -1528,7 +1529,7 @@ const qt = {
|
|
|
1528
1529
|
// Long
|
|
1529
1530
|
case "OOOO":
|
|
1530
1531
|
default:
|
|
1531
|
-
return "GMT" +
|
|
1532
|
+
return "GMT" + It(o, ":");
|
|
1532
1533
|
}
|
|
1533
1534
|
},
|
|
1534
1535
|
// Timezone (specific non-location)
|
|
@@ -1543,7 +1544,7 @@ const qt = {
|
|
|
1543
1544
|
// Long
|
|
1544
1545
|
case "zzzz":
|
|
1545
1546
|
default:
|
|
1546
|
-
return "GMT" +
|
|
1547
|
+
return "GMT" + It(o, ":");
|
|
1547
1548
|
}
|
|
1548
1549
|
},
|
|
1549
1550
|
// Seconds timestamp
|
|
@@ -1561,9 +1562,9 @@ function Qe(t, e = "") {
|
|
|
1561
1562
|
return n === 0 ? r + String(i) : r + String(i) + e + B(n, 2);
|
|
1562
1563
|
}
|
|
1563
1564
|
function Ke(t, e) {
|
|
1564
|
-
return t % 60 === 0 ? (t > 0 ? "-" : "+") + B(Math.abs(t) / 60, 2) :
|
|
1565
|
+
return t % 60 === 0 ? (t > 0 ? "-" : "+") + B(Math.abs(t) / 60, 2) : It(t, e);
|
|
1565
1566
|
}
|
|
1566
|
-
function
|
|
1567
|
+
function It(t, e = "") {
|
|
1567
1568
|
const r = t > 0 ? "-" : "+", o = Math.abs(t), i = B(Math.trunc(o / 60), 2), n = B(o % 60, 2);
|
|
1568
1569
|
return r + i + e + n;
|
|
1569
1570
|
}
|
|
@@ -1630,12 +1631,12 @@ function ls(t, e, r) {
|
|
|
1630
1631
|
const o = t[0] === "Y" ? "years" : "days of the month";
|
|
1631
1632
|
return `Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1632
1633
|
}
|
|
1633
|
-
const cs = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ms = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,
|
|
1634
|
+
const cs = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ms = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, ps = /^'([^]*?)'?$/, ds = /''/g, us = /[a-zA-Z]/;
|
|
1634
1635
|
function fs(t, e, r) {
|
|
1635
1636
|
const o = ie(), i = r?.locale ?? o.locale ?? Ie, n = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, l = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0, s = F(t, r?.in);
|
|
1636
|
-
if (!
|
|
1637
|
+
if (!da(s))
|
|
1637
1638
|
throw new RangeError("Invalid time value");
|
|
1638
|
-
let
|
|
1639
|
+
let p = e.match(ms).map((u) => {
|
|
1639
1640
|
const a = u[0];
|
|
1640
1641
|
if (a === "p" || a === "P") {
|
|
1641
1642
|
const f = es[a];
|
|
@@ -1656,23 +1657,23 @@ function fs(t, e, r) {
|
|
|
1656
1657
|
);
|
|
1657
1658
|
return { isToken: !1, value: u };
|
|
1658
1659
|
});
|
|
1659
|
-
i.localize.preprocessor && (
|
|
1660
|
-
const
|
|
1660
|
+
i.localize.preprocessor && (p = i.localize.preprocessor(s, p));
|
|
1661
|
+
const d = {
|
|
1661
1662
|
firstWeekContainsDate: n,
|
|
1662
1663
|
weekStartsOn: l,
|
|
1663
1664
|
locale: i
|
|
1664
1665
|
};
|
|
1665
|
-
return
|
|
1666
|
+
return p.map((u) => {
|
|
1666
1667
|
if (!u.isToken) return u.value;
|
|
1667
1668
|
const a = u.value;
|
|
1668
1669
|
(!r?.useAdditionalWeekYearTokens && as(a) || !r?.useAdditionalDayOfYearTokens && ns(a)) && ss(a, e, String(t));
|
|
1669
1670
|
const f = Xe[a[0]];
|
|
1670
|
-
return f(s, a, i.localize,
|
|
1671
|
+
return f(s, a, i.localize, d);
|
|
1671
1672
|
}).join("");
|
|
1672
1673
|
}
|
|
1673
1674
|
function hs(t) {
|
|
1674
|
-
const e = t.match(
|
|
1675
|
-
return e ? e[1].replace(
|
|
1675
|
+
const e = t.match(ps);
|
|
1676
|
+
return e ? e[1].replace(ds, "'") : t;
|
|
1676
1677
|
}
|
|
1677
1678
|
function gs(t, e) {
|
|
1678
1679
|
const r = F(t, e?.in), o = r.getFullYear(), i = r.getMonth(), n = U(r, 0);
|
|
@@ -1748,7 +1749,7 @@ class ct {
|
|
|
1748
1749
|
}, this.endOfBroadcastWeek = (o) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(o) : Ss(o, this), this.endOfISOWeek = (o) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(o) : wa(o), this.endOfMonth = (o) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(o) : fa(o), this.endOfWeek = (o, i) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(o, i) : Tr(o, this.options), this.endOfYear = (o) => this.overrides?.endOfYear ? this.overrides.endOfYear(o) : ba(o), this.format = (o, i, n) => {
|
|
1749
1750
|
const l = this.overrides?.format ? this.overrides.format(o, i, this.options) : fs(o, i, this.options);
|
|
1750
1751
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(l) : l;
|
|
1751
|
-
}, this.getISOWeek = (o) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(o) : Wr(o), this.getMonth = (o, i) => this.overrides?.getMonth ? this.overrides.getMonth(o, this.options) : bs(o, this.options), this.getYear = (o, i) => this.overrides?.getYear ? this.overrides.getYear(o, this.options) : ys(o, this.options), this.getWeek = (o, i) => this.overrides?.getWeek ? this.overrides.getWeek(o, this.options) : _r(o, this.options), this.isAfter = (o, i) => this.overrides?.isAfter ? this.overrides.isAfter(o, i) : ws(o, i), this.isBefore = (o, i) => this.overrides?.isBefore ? this.overrides.isBefore(o, i) : vs(o, i), this.isDate = (o) => this.overrides?.isDate ? this.overrides.isDate(o) : Or(o), this.isSameDay = (o, i) => this.overrides?.isSameDay ? this.overrides.isSameDay(o, i) :
|
|
1752
|
+
}, this.getISOWeek = (o) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(o) : Wr(o), this.getMonth = (o, i) => this.overrides?.getMonth ? this.overrides.getMonth(o, this.options) : bs(o, this.options), this.getYear = (o, i) => this.overrides?.getYear ? this.overrides.getYear(o, this.options) : ys(o, this.options), this.getWeek = (o, i) => this.overrides?.getWeek ? this.overrides.getWeek(o, this.options) : _r(o, this.options), this.isAfter = (o, i) => this.overrides?.isAfter ? this.overrides.isAfter(o, i) : ws(o, i), this.isBefore = (o, i) => this.overrides?.isBefore ? this.overrides.isBefore(o, i) : vs(o, i), this.isDate = (o) => this.overrides?.isDate ? this.overrides.isDate(o) : Or(o), this.isSameDay = (o, i) => this.overrides?.isSameDay ? this.overrides.isSameDay(o, i) : pa(o, i), this.isSameMonth = (o, i) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(o, i) : ks(o, i), this.isSameYear = (o, i) => this.overrides?.isSameYear ? this.overrides.isSameYear(o, i) : xs(o, i), this.max = (o) => this.overrides?.max ? this.overrides.max(o) : ca(o), this.min = (o) => this.overrides?.min ? this.overrides.min(o) : ma(o), this.setMonth = (o, i) => this.overrides?.setMonth ? this.overrides.setMonth(o, i) : Ms(o, i), this.setYear = (o, i) => this.overrides?.setYear ? this.overrides.setYear(o, i) : Ds(o, i), this.startOfBroadcastWeek = (o, i) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(o, this) : qr(o, this), this.startOfDay = (o) => this.overrides?.startOfDay ? this.overrides.startOfDay(o) : re(o), this.startOfISOWeek = (o) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(o) : ee(o), this.startOfMonth = (o) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(o) : ga(o), this.startOfWeek = (o, i) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(o, this.options) : $t(o, this.options), this.startOfYear = (o) => this.overrides?.startOfYear ? this.overrides.startOfYear(o) : Nr(o), this.options = { locale: Ie, ...e }, this.overrides = r;
|
|
1752
1753
|
}
|
|
1753
1754
|
/**
|
|
1754
1755
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1834,9 +1835,9 @@ ct.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1834
1835
|
"zh-HK",
|
|
1835
1836
|
"zh-TW"
|
|
1836
1837
|
]);
|
|
1837
|
-
const
|
|
1838
|
+
const Dt = new ct();
|
|
1838
1839
|
class Yr {
|
|
1839
|
-
constructor(e, r, o =
|
|
1840
|
+
constructor(e, r, o = Dt) {
|
|
1840
1841
|
this.date = e, this.displayMonth = r, this.outside = !!(r && !o.isSameMonth(e, r)), this.dateLib = o;
|
|
1841
1842
|
}
|
|
1842
1843
|
/**
|
|
@@ -1898,20 +1899,20 @@ var j;
|
|
|
1898
1899
|
(function(t) {
|
|
1899
1900
|
t.disabled = "disabled", t.hidden = "hidden", t.outside = "outside", t.focused = "focused", t.today = "today";
|
|
1900
1901
|
})(j || (j = {}));
|
|
1901
|
-
var
|
|
1902
|
+
var wt;
|
|
1902
1903
|
(function(t) {
|
|
1903
1904
|
t.range_end = "range_end", t.range_middle = "range_middle", t.range_start = "range_start", t.selected = "selected";
|
|
1904
|
-
})(
|
|
1905
|
+
})(wt || (wt = {}));
|
|
1905
1906
|
var lt;
|
|
1906
1907
|
(function(t) {
|
|
1907
1908
|
t.weeks_before_enter = "weeks_before_enter", t.weeks_before_exit = "weeks_before_exit", t.weeks_after_enter = "weeks_after_enter", t.weeks_after_exit = "weeks_after_exit", t.caption_after_enter = "caption_after_enter", t.caption_after_exit = "caption_after_exit", t.caption_before_enter = "caption_before_enter", t.caption_before_exit = "caption_before_exit";
|
|
1908
1909
|
})(lt || (lt = {}));
|
|
1909
1910
|
function Ys(t) {
|
|
1910
|
-
const { options: e, className: r, components: o, classNames: i, ...n } = t, l = [i[v.Dropdown], r].join(" "), s = e?.find(({ value:
|
|
1911
|
+
const { options: e, className: r, components: o, classNames: i, ...n } = t, l = [i[v.Dropdown], r].join(" "), s = e?.find(({ value: p }) => p === n.value);
|
|
1911
1912
|
return c.createElement(
|
|
1912
1913
|
"span",
|
|
1913
1914
|
{ "data-disabled": n.disabled, className: i[v.DropdownRoot] },
|
|
1914
|
-
c.createElement(o.Select, { className: l, ...n }, e?.map(({ value:
|
|
1915
|
+
c.createElement(o.Select, { className: l, ...n }, e?.map(({ value: p, label: d, disabled: u }) => c.createElement(o.Option, { key: p, value: p, disabled: u }, d))),
|
|
1915
1916
|
c.createElement(
|
|
1916
1917
|
"span",
|
|
1917
1918
|
{ className: i[v.CaptionLabel], "aria-hidden": !0 },
|
|
@@ -1952,9 +1953,9 @@ function js(t) {
|
|
|
1952
1953
|
return c.createElement(e.Dropdown, { ...t });
|
|
1953
1954
|
}
|
|
1954
1955
|
function Hs(t) {
|
|
1955
|
-
const { onPreviousClick: e, onNextClick: r, previousMonth: o, nextMonth: i, ...n } = t, { components: l, classNames: s, labels: { labelPrevious:
|
|
1956
|
+
const { onPreviousClick: e, onNextClick: r, previousMonth: o, nextMonth: i, ...n } = t, { components: l, classNames: s, labels: { labelPrevious: p, labelNext: d } } = ne(), u = dt((f) => {
|
|
1956
1957
|
i && r?.(f);
|
|
1957
|
-
}, [i, r]), a =
|
|
1958
|
+
}, [i, r]), a = dt((f) => {
|
|
1958
1959
|
o && e?.(f);
|
|
1959
1960
|
}, [o, e]);
|
|
1960
1961
|
return c.createElement(
|
|
@@ -1962,12 +1963,12 @@ function Hs(t) {
|
|
|
1962
1963
|
{ ...n },
|
|
1963
1964
|
c.createElement(
|
|
1964
1965
|
l.PreviousMonthButton,
|
|
1965
|
-
{ type: "button", className: s[v.PreviousMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label":
|
|
1966
|
+
{ type: "button", className: s[v.PreviousMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": p(o), onClick: a },
|
|
1966
1967
|
c.createElement(l.Chevron, { disabled: o ? void 0 : !0, className: s[v.Chevron], orientation: "left" })
|
|
1967
1968
|
),
|
|
1968
1969
|
c.createElement(
|
|
1969
1970
|
l.NextMonthButton,
|
|
1970
|
-
{ type: "button", className: s[v.NextMonthButton], tabIndex: i ? void 0 : -1, "aria-disabled": i ? void 0 : !0, "aria-label":
|
|
1971
|
+
{ type: "button", className: s[v.NextMonthButton], tabIndex: i ? void 0 : -1, "aria-disabled": i ? void 0 : !0, "aria-label": d(i), onClick: u },
|
|
1971
1972
|
c.createElement(l.Chevron, { disabled: i ? void 0 : !0, orientation: "right", className: s[v.Chevron] })
|
|
1972
1973
|
)
|
|
1973
1974
|
);
|
|
@@ -2047,7 +2048,7 @@ const rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2047
2048
|
Weeks: tl,
|
|
2048
2049
|
YearsDropdown: el
|
|
2049
2050
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2050
|
-
function
|
|
2051
|
+
function Ct(t, e, r = !1, o = Dt) {
|
|
2051
2052
|
let { from: i, to: n } = t;
|
|
2052
2053
|
const { differenceInCalendarDays: l, isSameDay: s } = o;
|
|
2053
2054
|
return i && n ? (l(n, i) < 0 && ([i, n] = [n, i]), l(e, i) >= (r ? 1 : 0) && l(n, e) >= (r ? 1 : 0)) : !r && n ? s(n, e) : !r && i ? s(i, e) : !1;
|
|
@@ -2070,7 +2071,7 @@ function Rr(t) {
|
|
|
2070
2071
|
function Ar(t, e) {
|
|
2071
2072
|
return Array.isArray(t) && t.every(e.isDate);
|
|
2072
2073
|
}
|
|
2073
|
-
function
|
|
2074
|
+
function Ot(t, e, r = Dt) {
|
|
2074
2075
|
const o = Array.isArray(e) ? e : [e], { isSameDay: i, differenceInCalendarDays: n, isAfter: l } = r;
|
|
2075
2076
|
return o.some((s) => {
|
|
2076
2077
|
if (typeof s == "boolean")
|
|
@@ -2080,18 +2081,18 @@ function St(t, e, r = Ct) {
|
|
|
2080
2081
|
if (Ar(s, r))
|
|
2081
2082
|
return s.includes(t);
|
|
2082
2083
|
if (Fe(s))
|
|
2083
|
-
return
|
|
2084
|
+
return Ct(s, t, !1, r);
|
|
2084
2085
|
if (Rr(s))
|
|
2085
2086
|
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(t.getDay()) : s.dayOfWeek === t.getDay();
|
|
2086
2087
|
if (Ir(s)) {
|
|
2087
|
-
const
|
|
2088
|
+
const p = n(s.before, t), d = n(s.after, t), u = p > 0, a = d < 0;
|
|
2088
2089
|
return l(s.before, s.after) ? a && u : u || a;
|
|
2089
2090
|
}
|
|
2090
2091
|
return Fr(s) ? n(t, s.after) > 0 : zr(s) ? n(s.before, t) > 0 : typeof s == "function" ? s(t) : !1;
|
|
2091
2092
|
});
|
|
2092
2093
|
}
|
|
2093
2094
|
function ol(t, e, r, o, i) {
|
|
2094
|
-
const { disabled: n, hidden: l, modifiers: s, showOutsideDays:
|
|
2095
|
+
const { disabled: n, hidden: l, modifiers: s, showOutsideDays: p, broadcastCalendar: d, today: u } = e, { isSameDay: a, isSameMonth: f, startOfMonth: b, isBefore: w, endOfMonth: S, isAfter: y } = i, h = r && b(r), W = o && S(o), k = {
|
|
2095
2096
|
[j.focused]: [],
|
|
2096
2097
|
[j.outside]: [],
|
|
2097
2098
|
[j.disabled]: [],
|
|
@@ -2099,11 +2100,11 @@ function ol(t, e, r, o, i) {
|
|
|
2099
2100
|
[j.today]: []
|
|
2100
2101
|
}, _ = {};
|
|
2101
2102
|
for (const g of t) {
|
|
2102
|
-
const { date: x, displayMonth: M } = g, T = !!(M && !f(x, M)), $ = !!(h && w(x, h)), V = !!(W && y(x, W)), X = !!(n &&
|
|
2103
|
-
!
|
|
2104
|
-
T && k.outside.push(g), X && k.disabled.push(g), J && k.hidden.push(g), tt && k.today.push(g), s && Object.keys(s).forEach((
|
|
2105
|
-
const mt = s?.[
|
|
2106
|
-
mt &&
|
|
2103
|
+
const { date: x, displayMonth: M } = g, T = !!(M && !f(x, M)), $ = !!(h && w(x, h)), V = !!(W && y(x, W)), X = !!(n && Ot(x, n, i)), J = !!(l && Ot(x, l, i)) || $ || V || // Broadcast calendar will show outside days as default
|
|
2104
|
+
!d && !p && T || d && p === !1 && T, tt = a(x, u ?? i.today());
|
|
2105
|
+
T && k.outside.push(g), X && k.disabled.push(g), J && k.hidden.push(g), tt && k.today.push(g), s && Object.keys(s).forEach((ut) => {
|
|
2106
|
+
const mt = s?.[ut];
|
|
2107
|
+
mt && Ot(x, mt, i) && (_[ut] ? _[ut].push(g) : _[ut] = [g]);
|
|
2107
2108
|
});
|
|
2108
2109
|
}
|
|
2109
2110
|
return (g) => {
|
|
@@ -2128,7 +2129,7 @@ function ol(t, e, r, o, i) {
|
|
|
2128
2129
|
};
|
|
2129
2130
|
}
|
|
2130
2131
|
function il(t, e, r = {}) {
|
|
2131
|
-
return Object.entries(t).filter(([, i]) => i === !0).reduce((i, [n]) => (r[n] ? i.push(r[n]) : e[j[n]] ? i.push(e[j[n]]) : e[
|
|
2132
|
+
return Object.entries(t).filter(([, i]) => i === !0).reduce((i, [n]) => (r[n] ? i.push(r[n]) : e[j[n]] ? i.push(e[j[n]]) : e[wt[n]] && i.push(e[wt[n]]), i), [e[v.Day]]);
|
|
2132
2133
|
}
|
|
2133
2134
|
function nl(t) {
|
|
2134
2135
|
return {
|
|
@@ -2155,8 +2156,8 @@ function sl() {
|
|
|
2155
2156
|
t[v[e]] = `rdp-${v[e]}`;
|
|
2156
2157
|
for (const e in j)
|
|
2157
2158
|
t[j[e]] = `rdp-${j[e]}`;
|
|
2158
|
-
for (const e in
|
|
2159
|
-
t[
|
|
2159
|
+
for (const e in wt)
|
|
2160
|
+
t[wt[e]] = `rdp-${wt[e]}`;
|
|
2160
2161
|
for (const e in lt)
|
|
2161
2162
|
t[lt[e]] = `rdp-${lt[e]}`;
|
|
2162
2163
|
return t;
|
|
@@ -2168,19 +2169,19 @@ const ll = jr;
|
|
|
2168
2169
|
function cl(t, e, r) {
|
|
2169
2170
|
return (r ?? new ct(e)).format(t, "d");
|
|
2170
2171
|
}
|
|
2171
|
-
function ml(t, e =
|
|
2172
|
+
function ml(t, e = Dt) {
|
|
2172
2173
|
return e.format(t, "LLLL");
|
|
2173
2174
|
}
|
|
2174
|
-
function
|
|
2175
|
+
function pl(t, e, r) {
|
|
2175
2176
|
return (r ?? new ct(e)).format(t, "cccccc");
|
|
2176
2177
|
}
|
|
2177
|
-
function
|
|
2178
|
+
function dl(t, e = Dt) {
|
|
2178
2179
|
return t < 10 ? e.formatNumber(`0${t.toLocaleString()}`) : e.formatNumber(`${t.toLocaleString()}`);
|
|
2179
2180
|
}
|
|
2180
2181
|
function ul() {
|
|
2181
2182
|
return "";
|
|
2182
2183
|
}
|
|
2183
|
-
function Hr(t, e =
|
|
2184
|
+
function Hr(t, e = Dt) {
|
|
2184
2185
|
return e.format(t, "yyyy");
|
|
2185
2186
|
}
|
|
2186
2187
|
const fl = Hr, hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -2189,9 +2190,9 @@ const fl = Hr, hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
2189
2190
|
formatDay: cl,
|
|
2190
2191
|
formatMonthCaption: ll,
|
|
2191
2192
|
formatMonthDropdown: ml,
|
|
2192
|
-
formatWeekNumber:
|
|
2193
|
+
formatWeekNumber: dl,
|
|
2193
2194
|
formatWeekNumberHeader: ul,
|
|
2194
|
-
formatWeekdayName:
|
|
2195
|
+
formatWeekdayName: pl,
|
|
2195
2196
|
formatYearCaption: fl,
|
|
2196
2197
|
formatYearDropdown: Hr
|
|
2197
2198
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2202,12 +2203,12 @@ function gl(t) {
|
|
|
2202
2203
|
};
|
|
2203
2204
|
}
|
|
2204
2205
|
function bl(t, e, r, o, i) {
|
|
2205
|
-
const { startOfMonth: n, startOfYear: l, endOfYear: s, eachMonthOfInterval:
|
|
2206
|
-
return
|
|
2206
|
+
const { startOfMonth: n, startOfYear: l, endOfYear: s, eachMonthOfInterval: p, getMonth: d } = i;
|
|
2207
|
+
return p({
|
|
2207
2208
|
start: l(t),
|
|
2208
2209
|
end: s(t)
|
|
2209
2210
|
}).map((f) => {
|
|
2210
|
-
const b = o.formatMonthDropdown(f, i), w =
|
|
2211
|
+
const b = o.formatMonthDropdown(f, i), w = d(f), S = e && f < n(e) || r && f > n(r) || !1;
|
|
2211
2212
|
return { value: w, label: b, disabled: S };
|
|
2212
2213
|
});
|
|
2213
2214
|
}
|
|
@@ -2231,11 +2232,11 @@ function wl(t, e, r) {
|
|
|
2231
2232
|
function vl(t, e, r, o, i = !1) {
|
|
2232
2233
|
if (!t || !e)
|
|
2233
2234
|
return;
|
|
2234
|
-
const { startOfYear: n, endOfYear: l, eachYearOfInterval: s, getYear:
|
|
2235
|
+
const { startOfYear: n, endOfYear: l, eachYearOfInterval: s, getYear: p } = o, d = n(t), u = l(e), a = s({ start: d, end: u });
|
|
2235
2236
|
return i && a.reverse(), a.map((f) => {
|
|
2236
2237
|
const b = r.formatYearDropdown(f, o);
|
|
2237
2238
|
return {
|
|
2238
|
-
value:
|
|
2239
|
+
value: p(f),
|
|
2239
2240
|
label: b,
|
|
2240
2241
|
disabled: !1
|
|
2241
2242
|
};
|
|
@@ -2297,14 +2298,14 @@ const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2297
2298
|
...t.querySelectorAll("[data-animated-month]") ?? []
|
|
2298
2299
|
], Pl = (t) => ae(t.querySelector("[data-animated-month]")), We = (t) => ae(t.querySelector("[data-animated-caption]")), Ee = (t) => ae(t.querySelector("[data-animated-weeks]")), ql = (t) => ae(t.querySelector("[data-animated-nav]")), Yl = (t) => ae(t.querySelector("[data-animated-weekdays]"));
|
|
2299
2300
|
function Bl(t, e, { classNames: r, months: o, focused: i, dateLib: n }) {
|
|
2300
|
-
const l = Jt(null), s = Jt(o),
|
|
2301
|
+
const l = Jt(null), s = Jt(o), p = Jt(!1);
|
|
2301
2302
|
oo(() => {
|
|
2302
|
-
const
|
|
2303
|
+
const d = s.current;
|
|
2303
2304
|
if (s.current = o, !e || !t.current || // safety check because the ref can be set to anything by consumers
|
|
2304
2305
|
!(t.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2305
|
-
o.length === 0 ||
|
|
2306
|
+
o.length === 0 || d.length === 0 || o.length !== d.length)
|
|
2306
2307
|
return;
|
|
2307
|
-
const u = n.isSameMonth(o[0].date,
|
|
2308
|
+
const u = n.isSameMonth(o[0].date, d[0].date), a = n.isAfter(o[0].date, d[0].date), f = a ? r[lt.caption_after_enter] : r[lt.caption_before_enter], b = a ? r[lt.weeks_after_enter] : r[lt.weeks_before_enter], w = l.current, S = t.current.cloneNode(!0);
|
|
2308
2309
|
if (S instanceof HTMLElement ? (Te(S).forEach((k) => {
|
|
2309
2310
|
if (!(k instanceof HTMLElement))
|
|
2310
2311
|
return;
|
|
@@ -2314,12 +2315,12 @@ function Bl(t, e, { classNames: r, months: o, focused: i, dateLib: n }) {
|
|
|
2314
2315
|
g && g.classList.remove(f);
|
|
2315
2316
|
const x = Ee(k);
|
|
2316
2317
|
x && x.classList.remove(b);
|
|
2317
|
-
}), l.current = S) : l.current = null,
|
|
2318
|
+
}), l.current = S) : l.current = null, p.current || u || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2318
2319
|
i)
|
|
2319
2320
|
return;
|
|
2320
2321
|
const y = w instanceof HTMLElement ? Te(w) : [], h = Te(t.current);
|
|
2321
2322
|
if (h?.every((W) => W instanceof HTMLElement) && y && y.every((W) => W instanceof HTMLElement)) {
|
|
2322
|
-
|
|
2323
|
+
p.current = !0, t.current.style.isolation = "isolate";
|
|
2323
2324
|
const W = ql(t.current);
|
|
2324
2325
|
W && (W.style.zIndex = "1"), h.forEach((k, _) => {
|
|
2325
2326
|
const g = y[_];
|
|
@@ -2331,7 +2332,7 @@ function Bl(t, e, { classNames: r, months: o, focused: i, dateLib: n }) {
|
|
|
2331
2332
|
const M = Ee(k);
|
|
2332
2333
|
M && M.classList.add(b);
|
|
2333
2334
|
const T = () => {
|
|
2334
|
-
|
|
2335
|
+
p.current = !1, t.current && (t.current.style.isolation = ""), W && (W.style.zIndex = ""), x && x.classList.remove(f), M && M.classList.remove(b), k.style.position = "", k.style.overflow = "", k.contains(g) && k.removeChild(g);
|
|
2335
2336
|
};
|
|
2336
2337
|
g.style.pointerEvents = "none", g.style.position = "absolute", g.style.overflow = "hidden", g.setAttribute("aria-hidden", "true");
|
|
2337
2338
|
const $ = Yl(g);
|
|
@@ -2345,18 +2346,18 @@ function Bl(t, e, { classNames: r, months: o, focused: i, dateLib: n }) {
|
|
|
2345
2346
|
});
|
|
2346
2347
|
}
|
|
2347
2348
|
function Il(t, e, r, o) {
|
|
2348
|
-
const i = t[0], n = t[t.length - 1], { ISOWeek: l, fixedWeeks: s, broadcastCalendar:
|
|
2349
|
+
const i = t[0], n = t[t.length - 1], { ISOWeek: l, fixedWeeks: s, broadcastCalendar: p } = r ?? {}, { addDays: d, differenceInCalendarDays: u, differenceInCalendarMonths: a, endOfBroadcastWeek: f, endOfISOWeek: b, endOfMonth: w, endOfWeek: S, isAfter: y, startOfBroadcastWeek: h, startOfISOWeek: W, startOfWeek: k } = o, _ = p ? h(i, o) : l ? W(i) : k(i), g = p ? f(n) : l ? b(w(n)) : S(w(n)), x = u(g, _), M = a(n, i) + 1, T = [];
|
|
2349
2350
|
for (let X = 0; X <= x; X++) {
|
|
2350
|
-
const J =
|
|
2351
|
+
const J = d(_, X);
|
|
2351
2352
|
if (e && y(J, e))
|
|
2352
2353
|
break;
|
|
2353
2354
|
T.push(J);
|
|
2354
2355
|
}
|
|
2355
|
-
const V = (
|
|
2356
|
+
const V = (p ? 35 : 42) * M;
|
|
2356
2357
|
if (s && T.length < V) {
|
|
2357
2358
|
const X = V - T.length;
|
|
2358
2359
|
for (let J = 0; J < X; J++) {
|
|
2359
|
-
const tt =
|
|
2360
|
+
const tt = d(T[T.length - 1], 1);
|
|
2360
2361
|
T.push(tt);
|
|
2361
2362
|
}
|
|
2362
2363
|
}
|
|
@@ -2381,17 +2382,17 @@ function zl(t, e, r, o) {
|
|
|
2381
2382
|
}
|
|
2382
2383
|
function er(t, e, r, o) {
|
|
2383
2384
|
const { month: i, defaultMonth: n, today: l = o.today(), numberOfMonths: s = 1 } = t;
|
|
2384
|
-
let
|
|
2385
|
-
const { differenceInCalendarMonths:
|
|
2386
|
-
if (r &&
|
|
2385
|
+
let p = i || n || l;
|
|
2386
|
+
const { differenceInCalendarMonths: d, addMonths: u, startOfMonth: a } = o;
|
|
2387
|
+
if (r && d(r, p) < s - 1) {
|
|
2387
2388
|
const f = -1 * (s - 1);
|
|
2388
|
-
|
|
2389
|
+
p = u(r, f);
|
|
2389
2390
|
}
|
|
2390
|
-
return e && p
|
|
2391
|
+
return e && d(p, e) < 0 && (p = e), a(p);
|
|
2391
2392
|
}
|
|
2392
2393
|
function Rl(t, e, r, o) {
|
|
2393
|
-
const { addDays: i, endOfBroadcastWeek: n, endOfISOWeek: l, endOfMonth: s, endOfWeek:
|
|
2394
|
-
const h = r.broadcastCalendar ? a(y, o) : r.ISOWeek ? f(y) : b(y), W = r.broadcastCalendar ? n(y) : r.ISOWeek ? l(s(y)) :
|
|
2394
|
+
const { addDays: i, endOfBroadcastWeek: n, endOfISOWeek: l, endOfMonth: s, endOfWeek: p, getISOWeek: d, getWeek: u, startOfBroadcastWeek: a, startOfISOWeek: f, startOfWeek: b } = o, w = t.reduce((S, y) => {
|
|
2395
|
+
const h = r.broadcastCalendar ? a(y, o) : r.ISOWeek ? f(y) : b(y), W = r.broadcastCalendar ? n(y) : r.ISOWeek ? l(s(y)) : p(s(y)), k = e.filter((M) => M >= h && M <= W), _ = r.broadcastCalendar ? 35 : 42;
|
|
2395
2396
|
if (r.fixedWeeks && k.length < _) {
|
|
2396
2397
|
const M = e.filter((T) => {
|
|
2397
2398
|
const $ = _ - k.length;
|
|
@@ -2400,7 +2401,7 @@ function Rl(t, e, r, o) {
|
|
|
2400
2401
|
k.push(...M);
|
|
2401
2402
|
}
|
|
2402
2403
|
const g = k.reduce((M, T) => {
|
|
2403
|
-
const $ = r.ISOWeek ?
|
|
2404
|
+
const $ = r.ISOWeek ? d(T) : u(T), V = M.find((J) => J.weekNumber === $), X = new Yr(T, y, o);
|
|
2404
2405
|
return V ? V.days.push(X) : M.push(new Ts($, [X])), M;
|
|
2405
2406
|
}, []), x = new Ns(y, g);
|
|
2406
2407
|
return S.push(x), S;
|
|
@@ -2409,10 +2410,10 @@ function Rl(t, e, r, o) {
|
|
|
2409
2410
|
}
|
|
2410
2411
|
function Al(t, e) {
|
|
2411
2412
|
let { startMonth: r, endMonth: o } = t;
|
|
2412
|
-
const { startOfYear: i, startOfDay: n, startOfMonth: l, endOfMonth: s, addYears:
|
|
2413
|
+
const { startOfYear: i, startOfDay: n, startOfMonth: l, endOfMonth: s, addYears: p, endOfYear: d, newDate: u, today: a } = e, { fromYear: f, toYear: b, fromMonth: w, toMonth: S } = t;
|
|
2413
2414
|
!r && w && (r = w), !r && f && (r = e.newDate(f, 0, 1)), !o && S && (o = S), !o && b && (o = u(b, 11, 31));
|
|
2414
2415
|
const y = t.captionLayout === "dropdown" || t.captionLayout === "dropdown-years";
|
|
2415
|
-
return r ? r = l(r) : f ? r = u(f, 0, 1) : !r && y && (r = i(
|
|
2416
|
+
return r ? r = l(r) : f ? r = u(f, 0, 1) : !r && y && (r = i(p(t.today ?? a(), -100))), o ? o = s(o) : b ? o = u(b, 11, 31) : !o && y && (o = d(t.today ?? a())), [
|
|
2416
2417
|
r && n(r),
|
|
2417
2418
|
o && n(o)
|
|
2418
2419
|
];
|
|
@@ -2420,20 +2421,20 @@ function Al(t, e) {
|
|
|
2420
2421
|
function jl(t, e, r, o) {
|
|
2421
2422
|
if (r.disableNavigation)
|
|
2422
2423
|
return;
|
|
2423
|
-
const { pagedNavigation: i, numberOfMonths: n = 1 } = r, { startOfMonth: l, addMonths: s, differenceInCalendarMonths:
|
|
2424
|
+
const { pagedNavigation: i, numberOfMonths: n = 1 } = r, { startOfMonth: l, addMonths: s, differenceInCalendarMonths: p } = o, d = i ? n : 1, u = l(t);
|
|
2424
2425
|
if (!e)
|
|
2425
|
-
return s(u,
|
|
2426
|
-
if (!(
|
|
2427
|
-
return s(u,
|
|
2426
|
+
return s(u, d);
|
|
2427
|
+
if (!(p(e, t) < n))
|
|
2428
|
+
return s(u, d);
|
|
2428
2429
|
}
|
|
2429
2430
|
function Hl(t, e, r, o) {
|
|
2430
2431
|
if (r.disableNavigation)
|
|
2431
2432
|
return;
|
|
2432
|
-
const { pagedNavigation: i, numberOfMonths: n } = r, { startOfMonth: l, addMonths: s, differenceInCalendarMonths:
|
|
2433
|
+
const { pagedNavigation: i, numberOfMonths: n } = r, { startOfMonth: l, addMonths: s, differenceInCalendarMonths: p } = o, d = i ? n ?? 1 : 1, u = l(t);
|
|
2433
2434
|
if (!e)
|
|
2434
|
-
return s(u, -
|
|
2435
|
-
if (!(
|
|
2436
|
-
return s(u, -
|
|
2435
|
+
return s(u, -d);
|
|
2436
|
+
if (!(p(u, e) <= 0))
|
|
2437
|
+
return s(u, -d);
|
|
2437
2438
|
}
|
|
2438
2439
|
function Ll(t) {
|
|
2439
2440
|
const e = [];
|
|
@@ -2444,20 +2445,20 @@ function be(t, e) {
|
|
|
2444
2445
|
return [e === void 0 ? r : e, o];
|
|
2445
2446
|
}
|
|
2446
2447
|
function $l(t, e) {
|
|
2447
|
-
const [r, o] = Al(t, e), { startOfMonth: i, endOfMonth: n } = e, l = er(t, r, o, e), [s,
|
|
2448
|
+
const [r, o] = Al(t, e), { startOfMonth: i, endOfMonth: n } = e, l = er(t, r, o, e), [s, p] = be(
|
|
2448
2449
|
l,
|
|
2449
2450
|
// initialMonth is always computed from props.month if provided
|
|
2450
2451
|
t.month ? l : void 0
|
|
2451
2452
|
);
|
|
2452
2453
|
lr(() => {
|
|
2453
2454
|
const x = er(t, r, o, e);
|
|
2454
|
-
|
|
2455
|
+
p(x);
|
|
2455
2456
|
}, [t.timeZone]);
|
|
2456
|
-
const
|
|
2457
|
+
const d = zl(s, o, t, e), u = Il(d, t.endMonth ? n(t.endMonth) : void 0, t, e), a = Rl(d, u, t, e), f = Ll(a), b = Fl(a), w = Hl(s, r, t, e), S = jl(s, o, t, e), { disableNavigation: y, onMonthChange: h } = t, W = (x) => f.some((M) => M.days.some((T) => T.isEqualTo(x))), k = (x) => {
|
|
2457
2458
|
if (y)
|
|
2458
2459
|
return;
|
|
2459
2460
|
let M = i(x);
|
|
2460
|
-
r && M < i(r) && (M = i(r)), o && M > i(o) && (M = i(o)),
|
|
2461
|
+
r && M < i(r) && (M = i(r)), o && M > i(o) && (M = i(o)), p(M), h?.(M);
|
|
2461
2462
|
};
|
|
2462
2463
|
return {
|
|
2463
2464
|
months: a,
|
|
@@ -2473,10 +2474,10 @@ function $l(t, e) {
|
|
|
2473
2474
|
}
|
|
2474
2475
|
};
|
|
2475
2476
|
}
|
|
2476
|
-
var
|
|
2477
|
+
var xt;
|
|
2477
2478
|
(function(t) {
|
|
2478
2479
|
t[t.Today = 0] = "Today", t[t.Selected = 1] = "Selected", t[t.LastFocused = 2] = "LastFocused", t[t.FocusedModifier = 3] = "FocusedModifier";
|
|
2479
|
-
})(
|
|
2480
|
+
})(xt || (xt = {}));
|
|
2480
2481
|
function rr(t) {
|
|
2481
2482
|
return !t[j.disabled] && !t[j.hidden] && !t[j.outside];
|
|
2482
2483
|
}
|
|
@@ -2484,81 +2485,81 @@ function Vl(t, e, r, o) {
|
|
|
2484
2485
|
let i, n = -1;
|
|
2485
2486
|
for (const l of t) {
|
|
2486
2487
|
const s = e(l);
|
|
2487
|
-
rr(s) && (s[j.focused] && n <
|
|
2488
|
+
rr(s) && (s[j.focused] && n < xt.FocusedModifier ? (i = l, n = xt.FocusedModifier) : o?.isEqualTo(l) && n < xt.LastFocused ? (i = l, n = xt.LastFocused) : r(l.date) && n < xt.Selected ? (i = l, n = xt.Selected) : s[j.today] && n < xt.Today && (i = l, n = xt.Today));
|
|
2488
2489
|
}
|
|
2489
2490
|
return i || (i = t.find((l) => rr(e(l)))), i;
|
|
2490
2491
|
}
|
|
2491
2492
|
function Gl(t, e, r, o, i, n, l) {
|
|
2492
|
-
const { ISOWeek: s, broadcastCalendar:
|
|
2493
|
+
const { ISOWeek: s, broadcastCalendar: p } = n, { addDays: d, addMonths: u, addWeeks: a, addYears: f, endOfBroadcastWeek: b, endOfISOWeek: w, endOfWeek: S, max: y, min: h, startOfBroadcastWeek: W, startOfISOWeek: k, startOfWeek: _ } = l;
|
|
2493
2494
|
let x = {
|
|
2494
|
-
day:
|
|
2495
|
+
day: d,
|
|
2495
2496
|
week: a,
|
|
2496
2497
|
month: u,
|
|
2497
2498
|
year: f,
|
|
2498
|
-
startOfWeek: (M) =>
|
|
2499
|
-
endOfWeek: (M) =>
|
|
2499
|
+
startOfWeek: (M) => p ? W(M, l) : s ? k(M) : _(M),
|
|
2500
|
+
endOfWeek: (M) => p ? b(M) : s ? w(M) : S(M)
|
|
2500
2501
|
}[t](r, e === "after" ? 1 : -1);
|
|
2501
2502
|
return e === "before" && o ? x = y([o, x]) : e === "after" && i && (x = h([i, x])), x;
|
|
2502
2503
|
}
|
|
2503
2504
|
function Vr(t, e, r, o, i, n, l, s = 0) {
|
|
2504
2505
|
if (s > 365)
|
|
2505
2506
|
return;
|
|
2506
|
-
const
|
|
2507
|
-
return !
|
|
2507
|
+
const p = Gl(t, e, r.date, o, i, n, l), d = !!(n.disabled && Ot(p, n.disabled, l)), u = !!(n.hidden && Ot(p, n.hidden, l)), a = p, f = new Yr(p, a, l);
|
|
2508
|
+
return !d && !u ? f : Vr(t, e, f, o, i, n, l, s + 1);
|
|
2508
2509
|
}
|
|
2509
2510
|
function Zl(t, e, r, o, i) {
|
|
2510
|
-
const { autoFocus: n } = t, [l, s] = ge(),
|
|
2511
|
+
const { autoFocus: n } = t, [l, s] = ge(), p = Vl(e.days, r, o || (() => !1), l), [d, u] = ge(n ? p : void 0);
|
|
2511
2512
|
return {
|
|
2512
|
-
isFocusTarget: (S) => !!
|
|
2513
|
+
isFocusTarget: (S) => !!p?.isEqualTo(S),
|
|
2513
2514
|
setFocused: u,
|
|
2514
|
-
focused:
|
|
2515
|
+
focused: d,
|
|
2515
2516
|
blur: () => {
|
|
2516
|
-
s(
|
|
2517
|
+
s(d), u(void 0);
|
|
2517
2518
|
},
|
|
2518
2519
|
moveFocus: (S, y) => {
|
|
2519
|
-
if (!
|
|
2520
|
+
if (!d)
|
|
2520
2521
|
return;
|
|
2521
|
-
const h = Vr(S, y,
|
|
2522
|
+
const h = Vr(S, y, d, e.navStart, e.navEnd, t, i);
|
|
2522
2523
|
h && (t.disableNavigation && !e.days.some((k) => k.isEqualTo(h)) || (e.goToDay(h), u(h)));
|
|
2523
2524
|
}
|
|
2524
2525
|
};
|
|
2525
2526
|
}
|
|
2526
2527
|
function Ul(t, e) {
|
|
2527
|
-
const { selected: r, required: o, onSelect: i } = t, [n, l] = be(r, i ? r : void 0), s = i ? r : n, { isSameDay:
|
|
2528
|
+
const { selected: r, required: o, onSelect: i } = t, [n, l] = be(r, i ? r : void 0), s = i ? r : n, { isSameDay: p } = e, d = (b) => s?.some((w) => p(w, b)) ?? !1, { min: u, max: a } = t;
|
|
2528
2529
|
return {
|
|
2529
2530
|
selected: s,
|
|
2530
2531
|
select: (b, w, S) => {
|
|
2531
2532
|
let y = [...s ?? []];
|
|
2532
|
-
if (
|
|
2533
|
+
if (d(b)) {
|
|
2533
2534
|
if (s?.length === u || o && s?.length === 1)
|
|
2534
2535
|
return;
|
|
2535
|
-
y = s?.filter((h) => !
|
|
2536
|
+
y = s?.filter((h) => !p(h, b));
|
|
2536
2537
|
} else
|
|
2537
2538
|
s?.length === a ? y = [b] : y = [...y, b];
|
|
2538
2539
|
return i || l(y), i?.(y, b, w, S), y;
|
|
2539
2540
|
},
|
|
2540
|
-
isSelected:
|
|
2541
|
+
isSelected: d
|
|
2541
2542
|
};
|
|
2542
2543
|
}
|
|
2543
|
-
function Xl(t, e, r = 0, o = 0, i = !1, n =
|
|
2544
|
-
const { from: l, to: s } = e || {}, { isSameDay:
|
|
2544
|
+
function Xl(t, e, r = 0, o = 0, i = !1, n = Dt) {
|
|
2545
|
+
const { from: l, to: s } = e || {}, { isSameDay: p, isAfter: d, isBefore: u } = n;
|
|
2545
2546
|
let a;
|
|
2546
2547
|
if (!l && !s)
|
|
2547
2548
|
a = { from: t, to: r > 0 ? void 0 : t };
|
|
2548
2549
|
else if (l && !s)
|
|
2549
|
-
|
|
2550
|
+
p(l, t) ? r === 0 ? a = { from: l, to: t } : i ? a = { from: l, to: void 0 } : a = void 0 : u(t, l) ? a = { from: t, to: l } : a = { from: l, to: t };
|
|
2550
2551
|
else if (l && s)
|
|
2551
|
-
if (
|
|
2552
|
+
if (p(l, t) && p(s, t))
|
|
2552
2553
|
i ? a = { from: l, to: s } : a = void 0;
|
|
2553
|
-
else if (
|
|
2554
|
+
else if (p(l, t))
|
|
2554
2555
|
a = { from: l, to: r > 0 ? void 0 : t };
|
|
2555
|
-
else if (
|
|
2556
|
+
else if (p(s, t))
|
|
2556
2557
|
a = { from: t, to: r > 0 ? void 0 : t };
|
|
2557
2558
|
else if (u(t, l))
|
|
2558
2559
|
a = { from: t, to: s };
|
|
2559
|
-
else if (
|
|
2560
|
+
else if (d(t, l))
|
|
2560
2561
|
a = { from: l, to: t };
|
|
2561
|
-
else if (
|
|
2562
|
+
else if (d(t, s))
|
|
2562
2563
|
a = { from: l, to: t };
|
|
2563
2564
|
else
|
|
2564
2565
|
throw new Error("Invalid range");
|
|
@@ -2568,7 +2569,7 @@ function Xl(t, e, r = 0, o = 0, i = !1, n = Ct) {
|
|
|
2568
2569
|
}
|
|
2569
2570
|
return a;
|
|
2570
2571
|
}
|
|
2571
|
-
function Ql(t, e, r =
|
|
2572
|
+
function Ql(t, e, r = Dt) {
|
|
2572
2573
|
const o = Array.isArray(e) ? e : [e];
|
|
2573
2574
|
let i = t.from;
|
|
2574
2575
|
const n = r.differenceInCalendarDays(t.to, t.from), l = Math.min(n, 6);
|
|
@@ -2579,21 +2580,21 @@ function Ql(t, e, r = Ct) {
|
|
|
2579
2580
|
}
|
|
2580
2581
|
return !1;
|
|
2581
2582
|
}
|
|
2582
|
-
function or(t, e, r =
|
|
2583
|
-
return
|
|
2583
|
+
function or(t, e, r = Dt) {
|
|
2584
|
+
return Ct(t, e.from, !1, r) || Ct(t, e.to, !1, r) || Ct(e, t.from, !1, r) || Ct(e, t.to, !1, r);
|
|
2584
2585
|
}
|
|
2585
|
-
function Kl(t, e, r =
|
|
2586
|
+
function Kl(t, e, r = Dt) {
|
|
2586
2587
|
const o = Array.isArray(e) ? e : [e];
|
|
2587
|
-
if (o.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : r.isDate(s) ?
|
|
2588
|
+
if (o.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : r.isDate(s) ? Ct(t, s, !1, r) : Ar(s, r) ? s.some((p) => Ct(t, p, !1, r)) : Fe(s) ? s.from && s.to ? or(t, { from: s.from, to: s.to }, r) : !1 : Rr(s) ? Ql(t, s.dayOfWeek, r) : Ir(s) ? r.isAfter(s.before, s.after) ? or(t, {
|
|
2588
2589
|
from: r.addDays(s.after, 1),
|
|
2589
2590
|
to: r.addDays(s.before, -1)
|
|
2590
|
-
}, r) :
|
|
2591
|
+
}, r) : Ot(t.from, s, r) || Ot(t.to, s, r) : Fr(s) || zr(s) ? Ot(t.from, s, r) || Ot(t.to, s, r) : !1))
|
|
2591
2592
|
return !0;
|
|
2592
2593
|
const l = o.filter((s) => typeof s == "function");
|
|
2593
2594
|
if (l.length) {
|
|
2594
2595
|
let s = t.from;
|
|
2595
|
-
const
|
|
2596
|
-
for (let
|
|
2596
|
+
const p = r.differenceInCalendarDays(t.to, t.from);
|
|
2597
|
+
for (let d = 0; d <= p; d++) {
|
|
2597
2598
|
if (l.some((u) => u(s)))
|
|
2598
2599
|
return !0;
|
|
2599
2600
|
s = r.addDays(s, 1);
|
|
@@ -2602,25 +2603,25 @@ function Kl(t, e, r = Ct) {
|
|
|
2602
2603
|
return !1;
|
|
2603
2604
|
}
|
|
2604
2605
|
function Jl(t, e) {
|
|
2605
|
-
const { disabled: r, excludeDisabled: o, selected: i, required: n, onSelect: l } = t, [s,
|
|
2606
|
+
const { disabled: r, excludeDisabled: o, selected: i, required: n, onSelect: l } = t, [s, p] = be(i, l ? i : void 0), d = l ? i : s;
|
|
2606
2607
|
return {
|
|
2607
|
-
selected:
|
|
2608
|
+
selected: d,
|
|
2608
2609
|
select: (f, b, w) => {
|
|
2609
|
-
const { min: S, max: y } = t, h = f ? Xl(f,
|
|
2610
|
-
return o && r && h?.from && h.to && Kl({ from: h.from, to: h.to }, r, e) && (h.from = f, h.to = void 0), l ||
|
|
2610
|
+
const { min: S, max: y } = t, h = f ? Xl(f, d, S, y, n, e) : void 0;
|
|
2611
|
+
return o && r && h?.from && h.to && Kl({ from: h.from, to: h.to }, r, e) && (h.from = f, h.to = void 0), l || p(h), l?.(h, f, b, w), h;
|
|
2611
2612
|
},
|
|
2612
|
-
isSelected: (f) =>
|
|
2613
|
+
isSelected: (f) => d && Ct(d, f, !1, e)
|
|
2613
2614
|
};
|
|
2614
2615
|
}
|
|
2615
2616
|
function tc(t, e) {
|
|
2616
|
-
const { selected: r, required: o, onSelect: i } = t, [n, l] = be(r, i ? r : void 0), s = i ? r : n, { isSameDay:
|
|
2617
|
+
const { selected: r, required: o, onSelect: i } = t, [n, l] = be(r, i ? r : void 0), s = i ? r : n, { isSameDay: p } = e;
|
|
2617
2618
|
return {
|
|
2618
2619
|
selected: s,
|
|
2619
2620
|
select: (a, f, b) => {
|
|
2620
2621
|
let w = a;
|
|
2621
|
-
return !o && s && s &&
|
|
2622
|
+
return !o && s && s && p(a, s) && (w = void 0), i || l(w), i?.(w, a, f, b), w;
|
|
2622
2623
|
},
|
|
2623
|
-
isSelected: (a) => s ?
|
|
2624
|
+
isSelected: (a) => s ? p(s, a) : !1
|
|
2624
2625
|
};
|
|
2625
2626
|
}
|
|
2626
2627
|
function ec(t, e) {
|
|
@@ -2676,17 +2677,17 @@ function rc(t) {
|
|
|
2676
2677
|
e.formatters,
|
|
2677
2678
|
e.labels,
|
|
2678
2679
|
e.classNames
|
|
2679
|
-
]), { captionLayout:
|
|
2680
|
+
]), { captionLayout: p, mode: d, navLayout: u, numberOfMonths: a = 1, onDayBlur: f, onDayClick: b, onDayFocus: w, onDayKeyDown: S, onDayMouseEnter: y, onDayMouseLeave: h, onNextClick: W, onPrevClick: k, showWeekNumber: _, styles: g } = e, { formatCaption: x, formatDay: M, formatMonthDropdown: T, formatWeekNumber: $, formatWeekNumberHeader: V, formatWeekdayName: X, formatYearDropdown: J } = o, tt = $l(e, n), { days: ut, months: mt, navStart: Y, navEnd: H, previousMonth: G, nextMonth: Q, goToMonth: L } = tt, ft = ol(ut, e, Y, H, n), { isSelected: St, select: E, selected: R } = ec(e, n) ?? {}, { blur: A, focused: at, isFocusTarget: Nt, moveFocus: z, setFocused: ht } = Zl(e, tt, ft, St ?? (() => !1), n), { labelDayButton: Rt, labelGridcell: At, labelGrid: Tt, labelMonthDropdown: ye, labelNav: jt, labelPrevious: we, labelNext: se, labelWeekday: Yt, labelWeekNumber: le, labelWeekNumberHeader: gt, labelYearDropdown: ve } = i, ke = Se(() => wl(n, e.ISOWeek), [n, e.ISOWeek]), ot = d !== void 0 || b !== void 0, vt = dt(() => {
|
|
2680
2681
|
G && (L(G), k?.(G));
|
|
2681
|
-
}, [G, L, k]), Gt =
|
|
2682
|
+
}, [G, L, k]), Gt = dt(() => {
|
|
2682
2683
|
Q && (L(Q), W?.(Q));
|
|
2683
|
-
}, [L, Q, W]), xe =
|
|
2684
|
-
C.preventDefault(), C.stopPropagation(),
|
|
2685
|
-
}, [E, b,
|
|
2686
|
-
|
|
2687
|
-
}, [w,
|
|
2684
|
+
}, [L, Q, W]), xe = dt((N, q) => (C) => {
|
|
2685
|
+
C.preventDefault(), C.stopPropagation(), ht(N), E?.(N.date, q, C), b?.(N.date, q, C);
|
|
2686
|
+
}, [E, b, ht]), Ht = dt((N, q) => (C) => {
|
|
2687
|
+
ht(N), w?.(N.date, q, C);
|
|
2688
|
+
}, [w, ht]), Me = dt((N, q) => (C) => {
|
|
2688
2689
|
A(), f?.(N.date, q, C);
|
|
2689
|
-
}, [A, f]), ce =
|
|
2690
|
+
}, [A, f]), ce = dt((N, q) => (C) => {
|
|
2690
2691
|
const I = {
|
|
2691
2692
|
ArrowLeft: [
|
|
2692
2693
|
C.shiftKey ? "month" : "day",
|
|
@@ -2709,20 +2710,20 @@ function rc(t) {
|
|
|
2709
2710
|
z(it, P);
|
|
2710
2711
|
}
|
|
2711
2712
|
S?.(N.date, q, C);
|
|
2712
|
-
}, [z, S, e.dir]), Zt =
|
|
2713
|
+
}, [z, S, e.dir]), Zt = dt((N, q) => (C) => {
|
|
2713
2714
|
y?.(N.date, q, C);
|
|
2714
|
-
}, [y]),
|
|
2715
|
+
}, [y]), Wt = dt((N, q) => (C) => {
|
|
2715
2716
|
h?.(N.date, q, C);
|
|
2716
|
-
}, [h]), me =
|
|
2717
|
+
}, [h]), me = dt((N) => (q) => {
|
|
2717
2718
|
const C = Number(q.target.value), I = n.setMonth(n.startOfMonth(N), C);
|
|
2718
2719
|
L(I);
|
|
2719
|
-
}, [n, L]),
|
|
2720
|
+
}, [n, L]), Et = dt((N) => (q) => {
|
|
2720
2721
|
const C = Number(q.target.value), I = n.setYear(n.startOfMonth(N), C);
|
|
2721
2722
|
L(I);
|
|
2722
2723
|
}, [n, L]), { className: De, style: Ce } = Se(() => ({
|
|
2723
2724
|
className: [s[v.Root], e.className].filter(Boolean).join(" "),
|
|
2724
2725
|
style: { ...g?.[v.Root], ...e.style }
|
|
2725
|
-
}), [s, e.className, e.style, g]),
|
|
2726
|
+
}), [s, e.className, e.style, g]), pe = al(e), Ut = Jt(null);
|
|
2726
2727
|
Bl(Ut, !!e.animate, {
|
|
2727
2728
|
classNames: s,
|
|
2728
2729
|
months: mt,
|
|
@@ -2733,12 +2734,12 @@ function rc(t) {
|
|
|
2733
2734
|
dayPickerProps: e,
|
|
2734
2735
|
selected: R,
|
|
2735
2736
|
select: E,
|
|
2736
|
-
isSelected:
|
|
2737
|
+
isSelected: St,
|
|
2737
2738
|
months: mt,
|
|
2738
2739
|
nextMonth: Q,
|
|
2739
2740
|
previousMonth: G,
|
|
2740
2741
|
goToMonth: L,
|
|
2741
|
-
getModifiers:
|
|
2742
|
+
getModifiers: ft,
|
|
2742
2743
|
components: r,
|
|
2743
2744
|
classNames: s,
|
|
2744
2745
|
styles: g,
|
|
@@ -2750,11 +2751,11 @@ function rc(t) {
|
|
|
2750
2751
|
{ value: Oe },
|
|
2751
2752
|
c.createElement(
|
|
2752
2753
|
r.Root,
|
|
2753
|
-
{ rootRef: e.animate ? Ut : void 0, className: De, style: Ce, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], "aria-labelledby": e["aria-labelledby"], ...
|
|
2754
|
+
{ rootRef: e.animate ? Ut : void 0, className: De, style: Ce, dir: e.dir, id: e.id, lang: e.lang, nonce: e.nonce, title: e.title, role: e.role, "aria-label": e["aria-label"], "aria-labelledby": e["aria-labelledby"], ...pe },
|
|
2754
2755
|
c.createElement(
|
|
2755
2756
|
r.Months,
|
|
2756
2757
|
{ className: s[v.Months], style: g?.[v.Months] },
|
|
2757
|
-
!e.hideNavigation && !u && c.createElement(r.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[v.Nav], style: g?.[v.Nav], "aria-label": jt(), onPreviousClick:
|
|
2758
|
+
!e.hideNavigation && !u && c.createElement(r.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[v.Nav], style: g?.[v.Nav], "aria-label": jt(), onPreviousClick: vt, onNextClick: Gt, previousMonth: G, nextMonth: Q }),
|
|
2758
2759
|
mt.map((N, q) => c.createElement(
|
|
2759
2760
|
r.Month,
|
|
2760
2761
|
{
|
|
@@ -2768,14 +2769,14 @@ function rc(t) {
|
|
|
2768
2769
|
},
|
|
2769
2770
|
u === "around" && !e.hideNavigation && q === 0 && c.createElement(
|
|
2770
2771
|
r.PreviousMonthButton,
|
|
2771
|
-
{ type: "button", className: s[v.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": we(G), onClick:
|
|
2772
|
+
{ type: "button", className: s[v.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": we(G), onClick: vt, "data-animated-button": e.animate ? "true" : void 0 },
|
|
2772
2773
|
c.createElement(r.Chevron, { disabled: G ? void 0 : !0, className: s[v.Chevron], orientation: e.dir === "rtl" ? "right" : "left" })
|
|
2773
2774
|
),
|
|
2774
|
-
c.createElement(r.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[v.MonthCaption], style: g?.[v.MonthCaption], calendarMonth: N, displayIndex: q },
|
|
2775
|
+
c.createElement(r.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: s[v.MonthCaption], style: g?.[v.MonthCaption], calendarMonth: N, displayIndex: q }, p?.startsWith("dropdown") ? c.createElement(
|
|
2775
2776
|
r.DropdownNav,
|
|
2776
2777
|
{ className: s[v.Dropdowns], style: g?.[v.Dropdowns] },
|
|
2777
2778
|
(() => {
|
|
2778
|
-
const C =
|
|
2779
|
+
const C = p === "dropdown" || p === "dropdown-months" ? c.createElement(r.MonthsDropdown, { key: "month", className: s[v.MonthsDropdown], "aria-label": ye(), classNames: s, components: r, disabled: !!e.disableNavigation, onChange: me(N.date), options: bl(N.date, Y, H, o, n), style: g?.[v.Dropdown], value: n.getMonth(N.date) }) : c.createElement("span", { key: "month" }, T(N.date, n)), I = p === "dropdown" || p === "dropdown-years" ? c.createElement(r.YearsDropdown, { key: "year", className: s[v.YearsDropdown], "aria-label": ve(n.options), classNames: s, components: r, disabled: !!e.disableNavigation, onChange: Et(N.date), options: vl(Y, H, o, n, !!e.reverseYears), style: g?.[v.Dropdown], value: n.getYear(N.date) }) : c.createElement("span", { key: "year" }, J(N.date, n));
|
|
2779
2780
|
return n.getMonthYearOrder() === "year-first" ? [I, C] : [C, I];
|
|
2780
2781
|
})(),
|
|
2781
2782
|
c.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
@@ -2799,15 +2800,15 @@ function rc(t) {
|
|
|
2799
2800
|
{ type: "button", className: s[v.NextMonthButton], tabIndex: Q ? void 0 : -1, "aria-disabled": Q ? void 0 : !0, "aria-label": se(Q), onClick: Gt, "data-animated-button": e.animate ? "true" : void 0 },
|
|
2800
2801
|
c.createElement(r.Chevron, { disabled: Q ? void 0 : !0, className: s[v.Chevron], orientation: e.dir === "rtl" ? "left" : "right" })
|
|
2801
2802
|
),
|
|
2802
|
-
q === a - 1 && u === "after" && !e.hideNavigation && c.createElement(r.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[v.Nav], style: g?.[v.Nav], "aria-label": jt(), onPreviousClick:
|
|
2803
|
+
q === a - 1 && u === "after" && !e.hideNavigation && c.createElement(r.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: s[v.Nav], style: g?.[v.Nav], "aria-label": jt(), onPreviousClick: vt, onNextClick: Gt, previousMonth: G, nextMonth: Q }),
|
|
2803
2804
|
c.createElement(
|
|
2804
2805
|
r.MonthGrid,
|
|
2805
|
-
{ role: "grid", "aria-multiselectable":
|
|
2806
|
+
{ role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": Tt(N.date, n.options, n) || void 0, className: s[v.MonthGrid], style: g?.[v.MonthGrid] },
|
|
2806
2807
|
!e.hideWeekdays && c.createElement(
|
|
2807
2808
|
r.Weekdays,
|
|
2808
2809
|
{ "data-animated-weekdays": e.animate ? "true" : void 0, className: s[v.Weekdays], style: g?.[v.Weekdays] },
|
|
2809
|
-
_ && c.createElement(r.WeekNumberHeader, { "aria-label":
|
|
2810
|
-
ke.map((C) => c.createElement(r.Weekday, { "aria-label":
|
|
2810
|
+
_ && c.createElement(r.WeekNumberHeader, { "aria-label": gt(n.options), className: s[v.WeekNumberHeader], style: g?.[v.WeekNumberHeader], scope: "col" }, V()),
|
|
2811
|
+
ke.map((C) => c.createElement(r.Weekday, { "aria-label": Yt(C, n.options, n), className: s[v.Weekday], key: String(C), style: g?.[v.Weekday], scope: "col" }, X(C, n.options, n)))
|
|
2811
2812
|
),
|
|
2812
2813
|
c.createElement(r.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: s[v.Weeks], style: g?.[v.Weeks] }, N.weeks.map((C) => c.createElement(
|
|
2813
2814
|
r.Week,
|
|
@@ -2817,15 +2818,15 @@ function rc(t) {
|
|
|
2817
2818
|
locale: l
|
|
2818
2819
|
}), className: s[v.WeekNumber], scope: "row", role: "rowheader" }, $(C.weekNumber, n)),
|
|
2819
2820
|
C.days.map((I) => {
|
|
2820
|
-
const { date: it } = I, P =
|
|
2821
|
-
if (P[j.focused] = !P.hidden && !!at?.isEqualTo(I), P[
|
|
2822
|
-
const { from: et, to:
|
|
2823
|
-
P[
|
|
2821
|
+
const { date: it } = I, P = ft(I);
|
|
2822
|
+
if (P[j.focused] = !P.hidden && !!at?.isEqualTo(I), P[wt.selected] = St?.(it) || P.selected, Fe(R)) {
|
|
2823
|
+
const { from: et, to: _t } = R;
|
|
2824
|
+
P[wt.range_start] = !!(et && _t && n.isSameDay(it, et)), P[wt.range_end] = !!(et && _t && n.isSameDay(it, _t)), P[wt.range_middle] = Ct(R, it, !0, n);
|
|
2824
2825
|
}
|
|
2825
2826
|
const O = yl(P, g, e.modifiersStyles), Z = il(P, s, e.modifiersClassNames), K = !ot && !P.hidden ? At(it, P, n.options, n) : void 0;
|
|
2826
2827
|
return (
|
|
2827
2828
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2828
|
-
c.createElement(r.Day, { key: `${n.format(it, "yyyy-MM-dd")}_${n.format(I.displayMonth, "yyyy-MM")}`, day: I, modifiers: P, className: Z.join(" "), style: O, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": K, "data-day": n.format(it, "yyyy-MM-dd"), "data-month": I.outside ? n.format(it, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": I.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && ot ? c.createElement(r.DayButton, { className: s[v.DayButton], style: g?.[v.DayButton], type: "button", day: I, modifiers: P, disabled: P.disabled || void 0, tabIndex:
|
|
2829
|
+
c.createElement(r.Day, { key: `${n.format(it, "yyyy-MM-dd")}_${n.format(I.displayMonth, "yyyy-MM")}`, day: I, modifiers: P, className: Z.join(" "), style: O, role: "gridcell", "aria-selected": P.selected || void 0, "aria-label": K, "data-day": n.format(it, "yyyy-MM-dd"), "data-month": I.outside ? n.format(it, "yyyy-MM") : void 0, "data-selected": P.selected || void 0, "data-disabled": P.disabled || void 0, "data-hidden": P.hidden || void 0, "data-outside": I.outside || void 0, "data-focused": P.focused || void 0, "data-today": P.today || void 0 }, !P.hidden && ot ? c.createElement(r.DayButton, { className: s[v.DayButton], style: g?.[v.DayButton], type: "button", day: I, modifiers: P, disabled: P.disabled || void 0, tabIndex: Nt(I) ? 0 : -1, "aria-label": Rt(it, P, n.options, n), onClick: xe(I, P), onBlur: Me(I, P), onFocus: Ht(I, P), onKeyDown: ce(I, P), onMouseEnter: Zt(I, P), onMouseLeave: Wt(I, P) }, M(it, n.options, n)) : !P.hidden && M(I.date, n.options, n))
|
|
2829
2830
|
);
|
|
2830
2831
|
})
|
|
2831
2832
|
)))
|
|
@@ -2840,40 +2841,23 @@ function rc(t) {
|
|
|
2840
2841
|
const oc = {
|
|
2841
2842
|
Chevron: () => /* @__PURE__ */ m(ur, { className: "h-5 w-5", strokeWidth: 1 })
|
|
2842
2843
|
};
|
|
2843
|
-
function xm({
|
|
2844
|
-
className: t,
|
|
2845
|
-
colorScheme: e = "light",
|
|
2846
|
-
classNames: r,
|
|
2847
|
-
...o
|
|
2848
|
-
}) {
|
|
2844
|
+
function xm({ className: t, classNames: e, ...r }) {
|
|
2849
2845
|
return /* @__PURE__ */ m(
|
|
2850
2846
|
rc,
|
|
2851
2847
|
{
|
|
2852
|
-
className:
|
|
2853
|
-
"box-content w-[280px] rounded-lg border p-3 font-[var(--calendar-font-family,var(--font-family-body))]",
|
|
2854
|
-
{
|
|
2855
|
-
light: "border-[var(--calendar-light-border,hsl(var(--contrast-100)))] bg-[var(--calendar-light-background,hsl(var(--background)))] text-[var(--calendar-light-text,hsl(var(--foreground)))]",
|
|
2856
|
-
dark: "border-[var(--calendar-dark-border,hsl(var(--contrast-500)))] bg-[var(--calendar-dark-background,hsl(var(--foreground)))] text-[var(--calendar-dark-text,hsl(var(--background)))]"
|
|
2857
|
-
}[e],
|
|
2848
|
+
className: Ft(
|
|
2849
|
+
"box-content w-[280px] rounded-lg border border-[var(--calendar-light-border,hsl(var(--contrast-100)))] bg-[var(--calendar-light-background,hsl(var(--background)))] p-3 font-[var(--calendar-font-family,var(--font-family-body))] text-[var(--calendar-light-text,hsl(var(--foreground)))]",
|
|
2858
2850
|
t
|
|
2859
2851
|
),
|
|
2860
2852
|
classNames: {
|
|
2861
2853
|
months: "relative",
|
|
2862
2854
|
month_caption: "flex justify-center w-full font-medium pb-0.5",
|
|
2863
2855
|
nav: "absolute flex justify-between w-full",
|
|
2864
|
-
button_next:
|
|
2865
|
-
"rotate-180 rounded-full focus-visible:outline-none focus-visible:ring-1"
|
|
2866
|
-
{
|
|
2867
|
-
light: "focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))]",
|
|
2868
|
-
dark: "focus-visible:ring-[var(--calendar-dark-focus,hsl(var(--background)))]"
|
|
2869
|
-
}[e]
|
|
2856
|
+
button_next: Ft(
|
|
2857
|
+
"rotate-180 rounded-full focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))]"
|
|
2870
2858
|
),
|
|
2871
|
-
button_previous:
|
|
2872
|
-
"rounded-full focus-visible:outline-none focus-visible:ring-1"
|
|
2873
|
-
{
|
|
2874
|
-
light: "focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))]",
|
|
2875
|
-
dark: "focus-visible:ring-[var(--calendar-dark-focus,hsl(var(--background)))]"
|
|
2876
|
-
}[e]
|
|
2859
|
+
button_previous: Ft(
|
|
2860
|
+
"rounded-full focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))]"
|
|
2877
2861
|
),
|
|
2878
2862
|
month_grid: "flex flex-col gap-0.5",
|
|
2879
2863
|
weeks: "flex flex-col gap-0.5",
|
|
@@ -2881,50 +2865,18 @@ function xm({
|
|
|
2881
2865
|
weekday: "flex h-10 w-10 items-center justify-center text-xs font-medium",
|
|
2882
2866
|
week: "flex",
|
|
2883
2867
|
day: "h-10 w-10 flex text-xs font-medium group p-0",
|
|
2884
|
-
day_button:
|
|
2885
|
-
"flex h-full w-full items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-1 disabled:hover:border-none"
|
|
2886
|
-
{
|
|
2887
|
-
light: "hover:border hover:border-[var(--calendar-light-button-border-hover,hsl(var(--contrast-200)))] focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))] group-data-[selected=true]/middle:bg-[var(--calendar-light-selected-middle-button-background,transparent)] group-data-[selected=true]:bg-[var(--calendar-light-selected-button-background,hsl(var(--primary)))] group-data-[selected=true]:text-[var(--calendar-light-selected-button-text,hsl(var(--foreground)))]",
|
|
2888
|
-
dark: "hover:border hover:border-[var(--calendar-dark-button-border-hover,hsl(var(--contrast-400)))] focus-visible:ring-[var(--calendar-dark-focus,hsl(var(--background)))] group-data-[selected=true]/middle:bg-[var(--calendar-dark-selected-middle-button-background,transparent)] group-data-[selected=true]:bg-[var(--calendar-dark-selected-button-background,hsl(var(--primary)))] group-data-[selected=true]:text-[var(--calendar-dark-selected-button-text,hsl(var(--foreground)))]"
|
|
2889
|
-
}[e]
|
|
2890
|
-
),
|
|
2891
|
-
disabled: ut(
|
|
2892
|
-
{
|
|
2893
|
-
light: "text-[var(--calendar-light-text-disabled,hsl(var(--contrast-300)))]",
|
|
2894
|
-
dark: "text-[var(--calendar-dark-text-disabled,hsl(var(--contrast-300)))]"
|
|
2895
|
-
}[e]
|
|
2868
|
+
day_button: Ft(
|
|
2869
|
+
"flex h-full w-full items-center justify-center rounded-full hover:border hover:border-[var(--calendar-light-button-border-hover,hsl(var(--contrast-200)))] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--calendar-light-focus,hsl(var(--foreground)))] disabled:hover:border-none group-data-[selected=true]/middle:bg-[var(--calendar-light-selected-middle-button-background,transparent)] group-data-[selected=true]:bg-[var(--calendar-light-selected-button-background,hsl(var(--primary)))] group-data-[selected=true]:text-[var(--calendar-light-selected-button-text,hsl(var(--foreground)))]"
|
|
2896
2870
|
),
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
range_start: ut(
|
|
2904
|
-
"bg-gradient-to-l",
|
|
2905
|
-
{
|
|
2906
|
-
light: "from-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2907
|
-
dark: "from-[var(--calendar-dark-range-background,color-mix(in_oklab,hsl(var(--primary)),white_60%))]"
|
|
2908
|
-
}[e]
|
|
2909
|
-
),
|
|
2910
|
-
range_middle: ut(
|
|
2911
|
-
"group/middle",
|
|
2912
|
-
{
|
|
2913
|
-
light: "bg-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2914
|
-
dark: "bg-[var(--calendar-dark-range-background,color-mix(in_oklab,hsl(var(--primary)),white_60%))]"
|
|
2915
|
-
}[e]
|
|
2916
|
-
),
|
|
2917
|
-
range_end: ut(
|
|
2918
|
-
"bg-gradient-to-r",
|
|
2919
|
-
{
|
|
2920
|
-
light: "from-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2921
|
-
dark: "from-[var(--calendar-dark-range-background,color-mix(in_oklab,hsl(var(--primary)),white_60%))]"
|
|
2922
|
-
}[e]
|
|
2923
|
-
),
|
|
2924
|
-
...r
|
|
2871
|
+
disabled: "text-[var(--calendar-light-text-disabled,hsl(var(--contrast-300)))]",
|
|
2872
|
+
outside: "text-[var(--calendar-light-text-disabled,hsl(var(--contrast-300)))]",
|
|
2873
|
+
range_start: "bg-gradient-to-l from-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2874
|
+
range_middle: "group/middle bg-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2875
|
+
range_end: "bg-gradient-to-r from-[var(--calendar-light-range-background,color-mix(in_oklab,hsl(var(--primary)),white_75%))]",
|
|
2876
|
+
...e
|
|
2925
2877
|
},
|
|
2926
2878
|
components: oc,
|
|
2927
|
-
...
|
|
2879
|
+
...r
|
|
2928
2880
|
}
|
|
2929
2881
|
);
|
|
2930
2882
|
}
|
|
@@ -2957,29 +2909,25 @@ function Cm({
|
|
|
2957
2909
|
title: e,
|
|
2958
2910
|
image: r,
|
|
2959
2911
|
link: o,
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
textSize: d = "small",
|
|
2965
|
-
showOverlay: p = !0
|
|
2912
|
+
aspectRatio: i = "5/6",
|
|
2913
|
+
textPosition: n = "outside",
|
|
2914
|
+
textSize: l = "small",
|
|
2915
|
+
showOverlay: s = !0
|
|
2966
2916
|
}) {
|
|
2967
2917
|
return /* @__PURE__ */ D(
|
|
2968
2918
|
Si,
|
|
2969
2919
|
{
|
|
2970
|
-
aspectRatio:
|
|
2920
|
+
aspectRatio: i,
|
|
2971
2921
|
className: t,
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
textColorScheme: i,
|
|
2975
|
-
textSize: d,
|
|
2922
|
+
showOverlay: s,
|
|
2923
|
+
textSize: l,
|
|
2976
2924
|
children: [
|
|
2977
|
-
/* @__PURE__ */ m(Ni, { children: /* @__PURE__ */ m(
|
|
2925
|
+
/* @__PURE__ */ m(Ni, { children: /* @__PURE__ */ m(pr, { absoluteStrokeWidth: !0, strokeWidth: 1.5 }) }),
|
|
2978
2926
|
/* @__PURE__ */ D(Ti, { children: [
|
|
2979
2927
|
r ? /* @__PURE__ */ m(Wi, { alt: r.alt, src: r.src }) : /* @__PURE__ */ m(Ei, { children: e }),
|
|
2980
|
-
|
|
2928
|
+
n === "inside" && /* @__PURE__ */ m(_i, { children: /* @__PURE__ */ m(He, { children: e }) })
|
|
2981
2929
|
] }),
|
|
2982
|
-
|
|
2930
|
+
n === "outside" && /* @__PURE__ */ m(He, { children: e }),
|
|
2983
2931
|
/* @__PURE__ */ m(Pi, { "aria-label": o.ariaLabel, href: o.href })
|
|
2984
2932
|
]
|
|
2985
2933
|
}
|
|
@@ -2993,40 +2941,31 @@ function Om({ className: t, children: e, removeLabel: r = "Remove", ...o }) {
|
|
|
2993
2941
|
}
|
|
2994
2942
|
function ic({
|
|
2995
2943
|
product: { title: t, subtitle: e, badge: r, price: o, image: i, link: n },
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
aspectRatio: d = "5:6",
|
|
2944
|
+
className: l,
|
|
2945
|
+
aspectRatio: s = "5/6",
|
|
2999
2946
|
compareActions: p
|
|
3000
2947
|
}) {
|
|
3001
|
-
return /* @__PURE__ */ D(
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
p && /* @__PURE__ */ D(No, { children: [
|
|
3023
|
-
/* @__PURE__ */ m(To, { ...p }),
|
|
3024
|
-
/* @__PURE__ */ m(Wo, { children: p.label })
|
|
3025
|
-
] })
|
|
3026
|
-
] })
|
|
3027
|
-
]
|
|
3028
|
-
}
|
|
3029
|
-
);
|
|
2948
|
+
return /* @__PURE__ */ D(Bi, { aspectRatio: s, className: l, children: [
|
|
2949
|
+
/* @__PURE__ */ D(yo, { children: [
|
|
2950
|
+
/* @__PURE__ */ D(wo, { children: [
|
|
2951
|
+
i ? /* @__PURE__ */ m(vo, { alt: i.alt, src: i.src }) : /* @__PURE__ */ m(ko, { children: t }),
|
|
2952
|
+
r != null && r !== "" && /* @__PURE__ */ m(xo, { children: r })
|
|
2953
|
+
] }),
|
|
2954
|
+
/* @__PURE__ */ m(Ae, { "aria-label": n.ariaLabel, href: n.href })
|
|
2955
|
+
] }),
|
|
2956
|
+
/* @__PURE__ */ D(Mo, { children: [
|
|
2957
|
+
/* @__PURE__ */ D(Do, { children: [
|
|
2958
|
+
/* @__PURE__ */ m(Co, { children: t }),
|
|
2959
|
+
e != null && e !== "" && /* @__PURE__ */ m(Oo, { children: e }),
|
|
2960
|
+
o && /* @__PURE__ */ m(So, { price: o }),
|
|
2961
|
+
/* @__PURE__ */ m(Ae, { "aria-label": n.ariaLabel, href: n.href })
|
|
2962
|
+
] }),
|
|
2963
|
+
p && /* @__PURE__ */ D(No, { children: [
|
|
2964
|
+
/* @__PURE__ */ m(To, { ...p }),
|
|
2965
|
+
/* @__PURE__ */ m(Wo, { children: p.label })
|
|
2966
|
+
] })
|
|
2967
|
+
] })
|
|
2968
|
+
] });
|
|
3030
2969
|
}
|
|
3031
2970
|
function nc({
|
|
3032
2971
|
showRating: t = !0,
|
|
@@ -3059,8 +2998,8 @@ function Sm({
|
|
|
3059
2998
|
noDescriptionLabel: n = "There is no description available.",
|
|
3060
2999
|
ratingLabel: l = "Rating",
|
|
3061
3000
|
noRatingsLabel: s = "There are no reviews.",
|
|
3062
|
-
otherDetailsLabel:
|
|
3063
|
-
noOtherDetailsLabel:
|
|
3001
|
+
otherDetailsLabel: p = "Other details",
|
|
3002
|
+
noOtherDetailsLabel: d = "There are no other details.",
|
|
3064
3003
|
viewOptionsLabel: u = "View options",
|
|
3065
3004
|
preorderLabel: a = "Preorder",
|
|
3066
3005
|
loading: f = !1
|
|
@@ -3102,14 +3041,14 @@ function Sm({
|
|
|
3102
3041
|
S != null ? /* @__PURE__ */ m(nr, { children: /* @__PURE__ */ m(ni, { children: S }) }) : /* @__PURE__ */ m(ai, { children: n })
|
|
3103
3042
|
] }),
|
|
3104
3043
|
/* @__PURE__ */ D(si, { children: [
|
|
3105
|
-
/* @__PURE__ */ m(li, { children:
|
|
3044
|
+
/* @__PURE__ */ m(li, { children: p }),
|
|
3106
3045
|
y ? /* @__PURE__ */ m(nr, { children: /* @__PURE__ */ m(ci, { children: y.map(({ name: g, value: x }, M) => /* @__PURE__ */ D(io, { children: [
|
|
3107
3046
|
/* @__PURE__ */ D(mi, { children: [
|
|
3108
3047
|
g,
|
|
3109
3048
|
": "
|
|
3110
3049
|
] }),
|
|
3111
|
-
/* @__PURE__ */ m(
|
|
3112
|
-
] }, M)) }) }) : /* @__PURE__ */ m(
|
|
3050
|
+
/* @__PURE__ */ m(pi, { children: x })
|
|
3051
|
+
] }, M)) }) }) : /* @__PURE__ */ m(di, { children: d })
|
|
3113
3052
|
] })
|
|
3114
3053
|
] });
|
|
3115
3054
|
}
|
|
@@ -3128,7 +3067,7 @@ function Nm({
|
|
|
3128
3067
|
/* @__PURE__ */ m(mn, { children: l.title })
|
|
3129
3068
|
] }),
|
|
3130
3069
|
/* @__PURE__ */ m(
|
|
3131
|
-
|
|
3070
|
+
pn,
|
|
3132
3071
|
{
|
|
3133
3072
|
"aria-label": `${i} ${l.title}`,
|
|
3134
3073
|
onClick: () => n?.(l.id),
|
|
@@ -3175,8 +3114,8 @@ function Tm({
|
|
|
3175
3114
|
max: n = 10,
|
|
3176
3115
|
value: l,
|
|
3177
3116
|
defaultValue: s,
|
|
3178
|
-
onChange:
|
|
3179
|
-
...
|
|
3117
|
+
onChange: p,
|
|
3118
|
+
...d
|
|
3180
3119
|
}) {
|
|
3181
3120
|
const u = Jt(null), a = Number(l ?? s ?? i), f = Number(i), b = Number(n), w = () => {
|
|
3182
3121
|
const y = u.current;
|
|
@@ -3185,7 +3124,7 @@ function Tm({
|
|
|
3185
3124
|
const y = u.current;
|
|
3186
3125
|
y != null && (y.stepUp(), y.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
3187
3126
|
};
|
|
3188
|
-
return /* @__PURE__ */ D(
|
|
3127
|
+
return /* @__PURE__ */ D(dn, { className: t, children: [
|
|
3189
3128
|
/* @__PURE__ */ m(
|
|
3190
3129
|
un,
|
|
3191
3130
|
{
|
|
@@ -3207,12 +3146,12 @@ function Tm({
|
|
|
3207
3146
|
fn,
|
|
3208
3147
|
{
|
|
3209
3148
|
ref: u,
|
|
3210
|
-
...
|
|
3149
|
+
...d,
|
|
3211
3150
|
defaultValue: s,
|
|
3212
3151
|
disabled: o,
|
|
3213
3152
|
max: n,
|
|
3214
3153
|
min: i,
|
|
3215
|
-
onChange:
|
|
3154
|
+
onChange: p,
|
|
3216
3155
|
type: "number",
|
|
3217
3156
|
value: l
|
|
3218
3157
|
}
|
|
@@ -3267,9 +3206,9 @@ function Em({
|
|
|
3267
3206
|
sideOffset: i,
|
|
3268
3207
|
children: [
|
|
3269
3208
|
/* @__PURE__ */ m(ji, { asChild: !0, children: r !== void 0 ? r : /* @__PURE__ */ m(Be, { shape: "circle", size: "small", variant: "ghost", children: /* @__PURE__ */ m(hr, { size: 20 }) }) }),
|
|
3270
|
-
/* @__PURE__ */ m(Hi, { children: /* @__PURE__ */ m(Li, { className:
|
|
3209
|
+
/* @__PURE__ */ m(Hi, { children: /* @__PURE__ */ m(Li, { className: Ft(t), children: /* @__PURE__ */ D($i, { children: [
|
|
3271
3210
|
/* @__PURE__ */ m(Vi, { children: n }),
|
|
3272
|
-
e.map((
|
|
3211
|
+
e.map((p, d) => /* @__PURE__ */ m(Gi, { menuKey: d, menuNode: p }, d))
|
|
3273
3212
|
] }) }) })
|
|
3274
3213
|
]
|
|
3275
3214
|
}
|
|
@@ -5269,7 +5208,7 @@ function zm({ className: t, size: e = "sm", ...r }) {
|
|
|
5269
5208
|
"span",
|
|
5270
5209
|
{
|
|
5271
5210
|
"aria-label": "Loading...",
|
|
5272
|
-
className:
|
|
5211
|
+
className: Ft(
|
|
5273
5212
|
"box-border inline-block animate-spin rounded-full border-[var(--spinner-base,hsl(var(--contrast-100)))] [border-bottom-color:var(--spinner-ring,color-mix(in_oklab,hsl(var(--primary)),black_75%))]",
|
|
5274
5213
|
{
|
|
5275
5214
|
xs: "h-5 w-5 border-2",
|
|
@@ -5298,7 +5237,7 @@ function lc(t) {
|
|
|
5298
5237
|
const cc = (t) => {
|
|
5299
5238
|
switch (t) {
|
|
5300
5239
|
case "success":
|
|
5301
|
-
return
|
|
5240
|
+
return dc;
|
|
5302
5241
|
case "info":
|
|
5303
5242
|
return fc;
|
|
5304
5243
|
case "warning":
|
|
@@ -5308,7 +5247,7 @@ const cc = (t) => {
|
|
|
5308
5247
|
default:
|
|
5309
5248
|
return null;
|
|
5310
5249
|
}
|
|
5311
|
-
}, mc = Array(12).fill(0),
|
|
5250
|
+
}, mc = Array(12).fill(0), pc = ({ visible: t, className: e }) => /* @__PURE__ */ c.createElement("div", {
|
|
5312
5251
|
className: [
|
|
5313
5252
|
"sonner-loading-wrapper",
|
|
5314
5253
|
e
|
|
@@ -5319,7 +5258,7 @@ const cc = (t) => {
|
|
|
5319
5258
|
}, mc.map((r, o) => /* @__PURE__ */ c.createElement("div", {
|
|
5320
5259
|
className: "sonner-loading-bar",
|
|
5321
5260
|
key: `spinner-bar-${o}`
|
|
5322
|
-
})))),
|
|
5261
|
+
})))), dc = /* @__PURE__ */ c.createElement("svg", {
|
|
5323
5262
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5324
5263
|
viewBox: "0 0 20 20",
|
|
5325
5264
|
fill: "currentColor",
|
|
@@ -5403,19 +5342,19 @@ class yc {
|
|
|
5403
5342
|
];
|
|
5404
5343
|
}, this.create = (e) => {
|
|
5405
5344
|
var r;
|
|
5406
|
-
const { message: o, ...i } = e, n = typeof e?.id == "number" || ((r = e.id) == null ? void 0 : r.length) > 0 ? e.id : Ye++, l = this.toasts.find((
|
|
5407
|
-
return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), l ? this.toasts = this.toasts.map((
|
|
5408
|
-
...
|
|
5345
|
+
const { message: o, ...i } = e, n = typeof e?.id == "number" || ((r = e.id) == null ? void 0 : r.length) > 0 ? e.id : Ye++, l = this.toasts.find((p) => p.id === n), s = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
5346
|
+
return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), l ? this.toasts = this.toasts.map((p) => p.id === n ? (this.publish({
|
|
5347
|
+
...p,
|
|
5409
5348
|
...e,
|
|
5410
5349
|
id: n,
|
|
5411
5350
|
title: o
|
|
5412
5351
|
}), {
|
|
5413
|
-
...
|
|
5352
|
+
...p,
|
|
5414
5353
|
...e,
|
|
5415
5354
|
id: n,
|
|
5416
5355
|
dismissible: s,
|
|
5417
5356
|
title: o
|
|
5418
|
-
}) :
|
|
5357
|
+
}) : p) : this.addToast({
|
|
5419
5358
|
title: o,
|
|
5420
5359
|
...i,
|
|
5421
5360
|
dismissible: s,
|
|
@@ -5465,19 +5404,19 @@ class yc {
|
|
|
5465
5404
|
}));
|
|
5466
5405
|
const i = Promise.resolve(e instanceof Function ? e() : e);
|
|
5467
5406
|
let n = o !== void 0, l;
|
|
5468
|
-
const s = i.then(async (
|
|
5407
|
+
const s = i.then(async (d) => {
|
|
5469
5408
|
if (l = [
|
|
5470
5409
|
"resolve",
|
|
5471
|
-
|
|
5472
|
-
], c.isValidElement(
|
|
5410
|
+
d
|
|
5411
|
+
], c.isValidElement(d))
|
|
5473
5412
|
n = !1, this.create({
|
|
5474
5413
|
id: o,
|
|
5475
5414
|
type: "default",
|
|
5476
|
-
message:
|
|
5415
|
+
message: d
|
|
5477
5416
|
});
|
|
5478
|
-
else if (vc(
|
|
5417
|
+
else if (vc(d) && !d.ok) {
|
|
5479
5418
|
n = !1;
|
|
5480
|
-
const a = typeof r.error == "function" ? await r.error(`HTTP error! status: ${
|
|
5419
|
+
const a = typeof r.error == "function" ? await r.error(`HTTP error! status: ${d.status}`) : r.error, f = typeof r.description == "function" ? await r.description(`HTTP error! status: ${d.status}`) : r.description, w = typeof a == "object" && !c.isValidElement(a) ? a : {
|
|
5481
5420
|
message: a
|
|
5482
5421
|
};
|
|
5483
5422
|
this.create({
|
|
@@ -5486,9 +5425,9 @@ class yc {
|
|
|
5486
5425
|
description: f,
|
|
5487
5426
|
...w
|
|
5488
5427
|
});
|
|
5489
|
-
} else if (
|
|
5428
|
+
} else if (d instanceof Error) {
|
|
5490
5429
|
n = !1;
|
|
5491
|
-
const a = typeof r.error == "function" ? await r.error(
|
|
5430
|
+
const a = typeof r.error == "function" ? await r.error(d) : r.error, f = typeof r.description == "function" ? await r.description(d) : r.description, w = typeof a == "object" && !c.isValidElement(a) ? a : {
|
|
5492
5431
|
message: a
|
|
5493
5432
|
};
|
|
5494
5433
|
this.create({
|
|
@@ -5499,7 +5438,7 @@ class yc {
|
|
|
5499
5438
|
});
|
|
5500
5439
|
} else if (r.success !== void 0) {
|
|
5501
5440
|
n = !1;
|
|
5502
|
-
const a = typeof r.success == "function" ? await r.success(
|
|
5441
|
+
const a = typeof r.success == "function" ? await r.success(d) : r.success, f = typeof r.description == "function" ? await r.description(d) : r.description, w = typeof a == "object" && !c.isValidElement(a) ? a : {
|
|
5503
5442
|
message: a
|
|
5504
5443
|
};
|
|
5505
5444
|
this.create({
|
|
@@ -5509,13 +5448,13 @@ class yc {
|
|
|
5509
5448
|
...w
|
|
5510
5449
|
});
|
|
5511
5450
|
}
|
|
5512
|
-
}).catch(async (
|
|
5451
|
+
}).catch(async (d) => {
|
|
5513
5452
|
if (l = [
|
|
5514
5453
|
"reject",
|
|
5515
|
-
|
|
5454
|
+
d
|
|
5516
5455
|
], r.error !== void 0) {
|
|
5517
5456
|
n = !1;
|
|
5518
|
-
const u = typeof r.error == "function" ? await r.error(
|
|
5457
|
+
const u = typeof r.error == "function" ? await r.error(d) : r.error, a = typeof r.description == "function" ? await r.description(d) : r.description, b = typeof u == "object" && !c.isValidElement(u) ? u : {
|
|
5519
5458
|
message: u
|
|
5520
5459
|
};
|
|
5521
5460
|
this.create({
|
|
@@ -5527,11 +5466,11 @@ class yc {
|
|
|
5527
5466
|
}
|
|
5528
5467
|
}).finally(() => {
|
|
5529
5468
|
n && (this.dismiss(o), o = void 0), r.finally == null || r.finally.call(r);
|
|
5530
|
-
}),
|
|
5469
|
+
}), p = () => new Promise((d, u) => s.then(() => l[0] === "reject" ? u(l[1]) : d(l[1])).catch(u));
|
|
5531
5470
|
return typeof o != "string" && typeof o != "number" ? {
|
|
5532
|
-
unwrap:
|
|
5471
|
+
unwrap: p
|
|
5533
5472
|
} : Object.assign(o, {
|
|
5534
|
-
unwrap:
|
|
5473
|
+
unwrap: p
|
|
5535
5474
|
});
|
|
5536
5475
|
}, this.custom = (e, r) => {
|
|
5537
5476
|
const o = r?.id || Ye++;
|
|
@@ -5550,7 +5489,7 @@ const st = new yc(), wc = (t, e) => {
|
|
|
5550
5489
|
...e,
|
|
5551
5490
|
id: r
|
|
5552
5491
|
}), r;
|
|
5553
|
-
}, vc = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", kc = wc, xc = () => st.toasts, Mc = () => st.getActiveToasts(),
|
|
5492
|
+
}, vc = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", kc = wc, xc = () => st.toasts, Mc = () => st.getActiveToasts(), qt = Object.assign(kc, {
|
|
5554
5493
|
success: st.success,
|
|
5555
5494
|
info: st.info,
|
|
5556
5495
|
warning: st.warning,
|
|
@@ -5569,7 +5508,7 @@ function he(t) {
|
|
|
5569
5508
|
return t.label !== void 0;
|
|
5570
5509
|
}
|
|
5571
5510
|
const Dc = 3, Cc = "24px", Oc = "16px", ar = 4e3, Sc = 356, Nc = 14, Tc = 45, Wc = 200;
|
|
5572
|
-
function
|
|
5511
|
+
function kt(...t) {
|
|
5573
5512
|
return t.filter(Boolean).join(" ");
|
|
5574
5513
|
}
|
|
5575
5514
|
function Ec(t) {
|
|
@@ -5577,8 +5516,8 @@ function Ec(t) {
|
|
|
5577
5516
|
return e && o.push(e), r && o.push(r), o;
|
|
5578
5517
|
}
|
|
5579
5518
|
const _c = (t) => {
|
|
5580
|
-
var e, r, o, i, n, l, s,
|
|
5581
|
-
const { invert: u, toast: a, unstyled: f, interacting: b, setHeights: w, visibleToasts: S, heights: y, index: h, toasts: W, expanded: k, removeToast: _, defaultRichColors: g, closeButton: x, style: M, cancelButtonStyle: T, actionButtonStyle: $, className: V = "", descriptionClassName: X = "", duration: J, position: tt, gap:
|
|
5519
|
+
var e, r, o, i, n, l, s, p, d;
|
|
5520
|
+
const { invert: u, toast: a, unstyled: f, interacting: b, setHeights: w, visibleToasts: S, heights: y, index: h, toasts: W, expanded: k, removeToast: _, defaultRichColors: g, closeButton: x, style: M, cancelButtonStyle: T, actionButtonStyle: $, className: V = "", descriptionClassName: X = "", duration: J, position: tt, gap: ut, expandByDefault: mt, classNames: Y, icons: H, closeButtonAriaLabel: G = "Close toast" } = t, [Q, L] = c.useState(null), [ft, St] = c.useState(null), [E, R] = c.useState(!1), [A, at] = c.useState(!1), [Nt, z] = c.useState(!1), [ht, Rt] = c.useState(!1), [At, Tt] = c.useState(!1), [ye, jt] = c.useState(0), [we, se] = c.useState(0), Yt = c.useRef(a.duration || J || ar), le = c.useRef(null), gt = c.useRef(null), ve = h === 0, ke = h + 1 <= S, ot = a.type, vt = a.dismissible !== !1, Gt = a.className || "", xe = a.descriptionClassName || "", Ht = c.useMemo(() => y.findIndex((O) => O.toastId === a.id) || 0, [
|
|
5582
5521
|
y,
|
|
5583
5522
|
a.id
|
|
5584
5523
|
]), Me = c.useMemo(() => {
|
|
@@ -5590,21 +5529,21 @@ const _c = (t) => {
|
|
|
5590
5529
|
]), ce = c.useMemo(() => a.duration || J || ar, [
|
|
5591
5530
|
a.duration,
|
|
5592
5531
|
J
|
|
5593
|
-
]), Zt = c.useRef(0),
|
|
5532
|
+
]), Zt = c.useRef(0), Wt = c.useRef(0), me = c.useRef(0), Et = c.useRef(null), [De, Ce] = tt.split("-"), pe = c.useMemo(() => y.reduce((O, Z, K) => K >= Ht ? O : O + Z.height, 0), [
|
|
5594
5533
|
y,
|
|
5595
5534
|
Ht
|
|
5596
5535
|
]), Ut = bc(), Oe = a.invert || u, N = ot === "loading";
|
|
5597
|
-
|
|
5536
|
+
Wt.current = c.useMemo(() => Ht * ut + pe, [
|
|
5598
5537
|
Ht,
|
|
5599
|
-
|
|
5538
|
+
pe
|
|
5600
5539
|
]), c.useEffect(() => {
|
|
5601
|
-
|
|
5540
|
+
Yt.current = ce;
|
|
5602
5541
|
}, [
|
|
5603
5542
|
ce
|
|
5604
5543
|
]), c.useEffect(() => {
|
|
5605
5544
|
R(!0);
|
|
5606
5545
|
}, []), c.useEffect(() => {
|
|
5607
|
-
const O =
|
|
5546
|
+
const O = gt.current;
|
|
5608
5547
|
if (O) {
|
|
5609
5548
|
const Z = O.getBoundingClientRect().height;
|
|
5610
5549
|
return se(Z), w((K) => [
|
|
@@ -5621,7 +5560,7 @@ const _c = (t) => {
|
|
|
5621
5560
|
a.id
|
|
5622
5561
|
]), c.useLayoutEffect(() => {
|
|
5623
5562
|
if (!E) return;
|
|
5624
|
-
const O =
|
|
5563
|
+
const O = gt.current, Z = O.style.height;
|
|
5625
5564
|
O.style.height = "auto";
|
|
5626
5565
|
const K = O.getBoundingClientRect().height;
|
|
5627
5566
|
O.style.height = Z, se(K), w((et) => et.find((rt) => rt.toastId === a.id) ? et.map((rt) => rt.toastId === a.id ? {
|
|
@@ -5646,14 +5585,14 @@ const _c = (t) => {
|
|
|
5646
5585
|
a.cancel
|
|
5647
5586
|
]);
|
|
5648
5587
|
const q = c.useCallback(() => {
|
|
5649
|
-
at(!0), jt(
|
|
5588
|
+
at(!0), jt(Wt.current), w((O) => O.filter((Z) => Z.toastId !== a.id)), setTimeout(() => {
|
|
5650
5589
|
_(a);
|
|
5651
5590
|
}, Wc);
|
|
5652
5591
|
}, [
|
|
5653
5592
|
a,
|
|
5654
5593
|
_,
|
|
5655
5594
|
w,
|
|
5656
|
-
|
|
5595
|
+
Wt
|
|
5657
5596
|
]);
|
|
5658
5597
|
c.useEffect(() => {
|
|
5659
5598
|
if (a.promise && ot === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
|
|
@@ -5661,13 +5600,13 @@ const _c = (t) => {
|
|
|
5661
5600
|
return k || b || Ut ? (() => {
|
|
5662
5601
|
if (me.current < Zt.current) {
|
|
5663
5602
|
const et = (/* @__PURE__ */ new Date()).getTime() - Zt.current;
|
|
5664
|
-
|
|
5603
|
+
Yt.current = Yt.current - et;
|
|
5665
5604
|
}
|
|
5666
5605
|
me.current = (/* @__PURE__ */ new Date()).getTime();
|
|
5667
5606
|
})() : (() => {
|
|
5668
|
-
|
|
5607
|
+
Yt.current !== 1 / 0 && (Zt.current = (/* @__PURE__ */ new Date()).getTime(), O = setTimeout(() => {
|
|
5669
5608
|
a.onAutoClose == null || a.onAutoClose.call(a, a), q();
|
|
5670
|
-
},
|
|
5609
|
+
}, Yt.current));
|
|
5671
5610
|
})(), () => clearTimeout(O);
|
|
5672
5611
|
}, [
|
|
5673
5612
|
k,
|
|
@@ -5687,12 +5626,12 @@ const _c = (t) => {
|
|
|
5687
5626
|
if (H?.loading) {
|
|
5688
5627
|
var Z;
|
|
5689
5628
|
return /* @__PURE__ */ c.createElement("div", {
|
|
5690
|
-
className:
|
|
5629
|
+
className: kt(Y?.loader, a == null || (Z = a.classNames) == null ? void 0 : Z.loader, "sonner-loader"),
|
|
5691
5630
|
"data-visible": ot === "loading"
|
|
5692
5631
|
}, H.loading);
|
|
5693
5632
|
}
|
|
5694
|
-
return /* @__PURE__ */ c.createElement(
|
|
5695
|
-
className:
|
|
5633
|
+
return /* @__PURE__ */ c.createElement(pc, {
|
|
5634
|
+
className: kt(Y?.loader, a == null || (O = a.classNames) == null ? void 0 : O.loader),
|
|
5696
5635
|
visible: ot === "loading"
|
|
5697
5636
|
});
|
|
5698
5637
|
}
|
|
@@ -5700,8 +5639,8 @@ const _c = (t) => {
|
|
|
5700
5639
|
var it, P;
|
|
5701
5640
|
return /* @__PURE__ */ c.createElement("li", {
|
|
5702
5641
|
tabIndex: 0,
|
|
5703
|
-
ref:
|
|
5704
|
-
className:
|
|
5642
|
+
ref: gt,
|
|
5643
|
+
className: kt(V, Gt, Y?.toast, a == null || (e = a.classNames) == null ? void 0 : e.toast, Y?.default, Y?.[ot], a == null || (r = a.classNames) == null ? void 0 : r[ot]),
|
|
5705
5644
|
"data-sonner-toast": "",
|
|
5706
5645
|
"data-rich-colors": (it = a.richColors) != null ? it : g,
|
|
5707
5646
|
"data-styled": !(a.jsx || a.unstyled || f),
|
|
@@ -5714,104 +5653,104 @@ const _c = (t) => {
|
|
|
5714
5653
|
"data-x-position": Ce,
|
|
5715
5654
|
"data-index": h,
|
|
5716
5655
|
"data-front": ve,
|
|
5717
|
-
"data-swiping":
|
|
5718
|
-
"data-dismissible":
|
|
5656
|
+
"data-swiping": Nt,
|
|
5657
|
+
"data-dismissible": vt,
|
|
5719
5658
|
"data-type": ot,
|
|
5720
5659
|
"data-invert": Oe,
|
|
5721
|
-
"data-swipe-out":
|
|
5722
|
-
"data-swipe-direction":
|
|
5660
|
+
"data-swipe-out": ht,
|
|
5661
|
+
"data-swipe-direction": ft,
|
|
5723
5662
|
"data-expanded": !!(k || mt && E),
|
|
5724
5663
|
"data-testid": a.testId,
|
|
5725
5664
|
style: {
|
|
5726
5665
|
"--index": h,
|
|
5727
5666
|
"--toasts-before": h,
|
|
5728
5667
|
"--z-index": W.length - h,
|
|
5729
|
-
"--offset": `${A ? ye :
|
|
5668
|
+
"--offset": `${A ? ye : Wt.current}px`,
|
|
5730
5669
|
"--initial-height": mt ? "auto" : `${we}px`,
|
|
5731
5670
|
...M,
|
|
5732
5671
|
...a.style
|
|
5733
5672
|
},
|
|
5734
5673
|
onDragEnd: () => {
|
|
5735
|
-
z(!1), L(null),
|
|
5674
|
+
z(!1), L(null), Et.current = null;
|
|
5736
5675
|
},
|
|
5737
5676
|
onPointerDown: (O) => {
|
|
5738
|
-
O.button !== 2 && (N || !
|
|
5677
|
+
O.button !== 2 && (N || !vt || (le.current = /* @__PURE__ */ new Date(), jt(Wt.current), O.target.setPointerCapture(O.pointerId), O.target.tagName !== "BUTTON" && (z(!0), Et.current = {
|
|
5739
5678
|
x: O.clientX,
|
|
5740
5679
|
y: O.clientY
|
|
5741
5680
|
})));
|
|
5742
5681
|
},
|
|
5743
5682
|
onPointerUp: () => {
|
|
5744
5683
|
var O, Z, K;
|
|
5745
|
-
if (
|
|
5746
|
-
|
|
5747
|
-
const et = Number(((O =
|
|
5748
|
-
if (Math.abs(
|
|
5749
|
-
jt(
|
|
5684
|
+
if (ht || !vt) return;
|
|
5685
|
+
Et.current = null;
|
|
5686
|
+
const et = Number(((O = gt.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), _t = Number(((Z = gt.current) == null ? void 0 : Z.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), rt = (/* @__PURE__ */ new Date()).getTime() - ((K = le.current) == null ? void 0 : K.getTime()), pt = Q === "x" ? et : _t, de = Math.abs(pt) / rt;
|
|
5687
|
+
if (Math.abs(pt) >= Tc || de > 0.11) {
|
|
5688
|
+
jt(Wt.current), a.onDismiss == null || a.onDismiss.call(a, a), St(Q === "x" ? et > 0 ? "right" : "left" : _t > 0 ? "down" : "up"), q(), Rt(!0);
|
|
5750
5689
|
return;
|
|
5751
5690
|
} else {
|
|
5752
|
-
var
|
|
5753
|
-
(
|
|
5691
|
+
var bt, yt;
|
|
5692
|
+
(bt = gt.current) == null || bt.style.setProperty("--swipe-amount-x", "0px"), (yt = gt.current) == null || yt.style.setProperty("--swipe-amount-y", "0px");
|
|
5754
5693
|
}
|
|
5755
|
-
|
|
5694
|
+
Tt(!1), z(!1), L(null);
|
|
5756
5695
|
},
|
|
5757
5696
|
onPointerMove: (O) => {
|
|
5758
5697
|
var Z, K, et;
|
|
5759
|
-
if (!
|
|
5760
|
-
const rt = O.clientY -
|
|
5761
|
-
var
|
|
5762
|
-
const
|
|
5763
|
-
!Q && (Math.abs(
|
|
5764
|
-
let
|
|
5698
|
+
if (!Et.current || !vt || ((Z = window.getSelection()) == null ? void 0 : Z.toString().length) > 0) return;
|
|
5699
|
+
const rt = O.clientY - Et.current.y, pt = O.clientX - Et.current.x;
|
|
5700
|
+
var de;
|
|
5701
|
+
const bt = (de = t.swipeDirections) != null ? de : Ec(tt);
|
|
5702
|
+
!Q && (Math.abs(pt) > 1 || Math.abs(rt) > 1) && L(Math.abs(pt) > Math.abs(rt) ? "x" : "y");
|
|
5703
|
+
let yt = {
|
|
5765
5704
|
x: 0,
|
|
5766
5705
|
y: 0
|
|
5767
5706
|
};
|
|
5768
|
-
const ze = (
|
|
5707
|
+
const ze = (Bt) => 1 / (1.5 + Math.abs(Bt) / 20);
|
|
5769
5708
|
if (Q === "y") {
|
|
5770
|
-
if (
|
|
5771
|
-
if (
|
|
5772
|
-
|
|
5709
|
+
if (bt.includes("top") || bt.includes("bottom"))
|
|
5710
|
+
if (bt.includes("top") && rt < 0 || bt.includes("bottom") && rt > 0)
|
|
5711
|
+
yt.y = rt;
|
|
5773
5712
|
else {
|
|
5774
|
-
const
|
|
5775
|
-
|
|
5713
|
+
const Bt = rt * ze(rt);
|
|
5714
|
+
yt.y = Math.abs(Bt) < Math.abs(rt) ? Bt : rt;
|
|
5776
5715
|
}
|
|
5777
|
-
} else if (Q === "x" && (
|
|
5778
|
-
if (
|
|
5779
|
-
|
|
5716
|
+
} else if (Q === "x" && (bt.includes("left") || bt.includes("right")))
|
|
5717
|
+
if (bt.includes("left") && pt < 0 || bt.includes("right") && pt > 0)
|
|
5718
|
+
yt.x = pt;
|
|
5780
5719
|
else {
|
|
5781
|
-
const
|
|
5782
|
-
|
|
5720
|
+
const Bt = pt * ze(pt);
|
|
5721
|
+
yt.x = Math.abs(Bt) < Math.abs(pt) ? Bt : pt;
|
|
5783
5722
|
}
|
|
5784
|
-
(Math.abs(
|
|
5723
|
+
(Math.abs(yt.x) > 0 || Math.abs(yt.y) > 0) && Tt(!0), (K = gt.current) == null || K.style.setProperty("--swipe-amount-x", `${yt.x}px`), (et = gt.current) == null || et.style.setProperty("--swipe-amount-y", `${yt.y}px`);
|
|
5785
5724
|
}
|
|
5786
5725
|
}, Me && !a.jsx && ot !== "loading" ? /* @__PURE__ */ c.createElement("button", {
|
|
5787
5726
|
"aria-label": G,
|
|
5788
5727
|
"data-disabled": N,
|
|
5789
5728
|
"data-close-button": !0,
|
|
5790
|
-
onClick: N || !
|
|
5729
|
+
onClick: N || !vt ? () => {
|
|
5791
5730
|
} : () => {
|
|
5792
5731
|
q(), a.onDismiss == null || a.onDismiss.call(a, a);
|
|
5793
5732
|
},
|
|
5794
|
-
className:
|
|
5733
|
+
className: kt(Y?.closeButton, a == null || (o = a.classNames) == null ? void 0 : o.closeButton)
|
|
5795
5734
|
}, (P = H?.close) != null ? P : gc) : null, (ot || a.icon || a.promise) && a.icon !== null && (H?.[ot] !== null || a.icon) ? /* @__PURE__ */ c.createElement("div", {
|
|
5796
5735
|
"data-icon": "",
|
|
5797
|
-
className:
|
|
5736
|
+
className: kt(Y?.icon, a == null || (i = a.classNames) == null ? void 0 : i.icon)
|
|
5798
5737
|
}, a.promise || a.type === "loading" && !a.icon ? a.icon || C() : null, a.type !== "loading" ? I : null) : null, /* @__PURE__ */ c.createElement("div", {
|
|
5799
5738
|
"data-content": "",
|
|
5800
|
-
className:
|
|
5739
|
+
className: kt(Y?.content, a == null || (n = a.classNames) == null ? void 0 : n.content)
|
|
5801
5740
|
}, /* @__PURE__ */ c.createElement("div", {
|
|
5802
5741
|
"data-title": "",
|
|
5803
|
-
className:
|
|
5742
|
+
className: kt(Y?.title, a == null || (l = a.classNames) == null ? void 0 : l.title)
|
|
5804
5743
|
}, a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title), a.description ? /* @__PURE__ */ c.createElement("div", {
|
|
5805
5744
|
"data-description": "",
|
|
5806
|
-
className:
|
|
5745
|
+
className: kt(X, xe, Y?.description, a == null || (s = a.classNames) == null ? void 0 : s.description)
|
|
5807
5746
|
}, typeof a.description == "function" ? a.description() : a.description) : null), /* @__PURE__ */ c.isValidElement(a.cancel) ? a.cancel : a.cancel && he(a.cancel) ? /* @__PURE__ */ c.createElement("button", {
|
|
5808
5747
|
"data-button": !0,
|
|
5809
5748
|
"data-cancel": !0,
|
|
5810
5749
|
style: a.cancelButtonStyle || T,
|
|
5811
5750
|
onClick: (O) => {
|
|
5812
|
-
he(a.cancel) &&
|
|
5751
|
+
he(a.cancel) && vt && (a.cancel.onClick == null || a.cancel.onClick.call(a.cancel, O), q());
|
|
5813
5752
|
},
|
|
5814
|
-
className:
|
|
5753
|
+
className: kt(Y?.cancelButton, a == null || (p = a.classNames) == null ? void 0 : p.cancelButton)
|
|
5815
5754
|
}, a.cancel.label) : null, /* @__PURE__ */ c.isValidElement(a.action) ? a.action : a.action && he(a.action) ? /* @__PURE__ */ c.createElement("button", {
|
|
5816
5755
|
"data-button": !0,
|
|
5817
5756
|
"data-action": !0,
|
|
@@ -5819,7 +5758,7 @@ const _c = (t) => {
|
|
|
5819
5758
|
onClick: (O) => {
|
|
5820
5759
|
he(a.action) && (a.action.onClick == null || a.action.onClick.call(a.action, O), !O.defaultPrevented && q());
|
|
5821
5760
|
},
|
|
5822
|
-
className:
|
|
5761
|
+
className: kt(Y?.actionButton, a == null || (d = a.classNames) == null ? void 0 : d.actionButton)
|
|
5823
5762
|
}, a.action.label) : null);
|
|
5824
5763
|
};
|
|
5825
5764
|
function sr() {
|
|
@@ -5834,31 +5773,31 @@ function Pc(t, e) {
|
|
|
5834
5773
|
e
|
|
5835
5774
|
].forEach((o, i) => {
|
|
5836
5775
|
const n = i === 1, l = n ? "--mobile-offset" : "--offset", s = n ? Oc : Cc;
|
|
5837
|
-
function d
|
|
5776
|
+
function p(d) {
|
|
5838
5777
|
[
|
|
5839
5778
|
"top",
|
|
5840
5779
|
"right",
|
|
5841
5780
|
"bottom",
|
|
5842
5781
|
"left"
|
|
5843
5782
|
].forEach((u) => {
|
|
5844
|
-
r[`${l}-${u}`] = typeof
|
|
5783
|
+
r[`${l}-${u}`] = typeof d == "number" ? `${d}px` : d;
|
|
5845
5784
|
});
|
|
5846
5785
|
}
|
|
5847
|
-
typeof o == "number" || typeof o == "string" ?
|
|
5786
|
+
typeof o == "number" || typeof o == "string" ? p(o) : typeof o == "object" ? [
|
|
5848
5787
|
"top",
|
|
5849
5788
|
"right",
|
|
5850
5789
|
"bottom",
|
|
5851
5790
|
"left"
|
|
5852
|
-
].forEach((
|
|
5853
|
-
o[
|
|
5854
|
-
}) :
|
|
5791
|
+
].forEach((d) => {
|
|
5792
|
+
o[d] === void 0 ? r[`${l}-${d}`] = s : r[`${l}-${d}`] = typeof o[d] == "number" ? `${o[d]}px` : o[d];
|
|
5793
|
+
}) : p(s);
|
|
5855
5794
|
}), r;
|
|
5856
5795
|
}
|
|
5857
5796
|
const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
5858
5797
|
const { id: o, invert: i, position: n = "bottom-right", hotkey: l = [
|
|
5859
5798
|
"altKey",
|
|
5860
5799
|
"KeyT"
|
|
5861
|
-
], expand: s, closeButton:
|
|
5800
|
+
], expand: s, closeButton: p, className: d, offset: u, mobileOffset: a, theme: f = "light", richColors: b, duration: w, style: S, visibleToasts: y = Dc, toastOptions: h, dir: W = sr(), gap: k = Nc, icons: _, containerAriaLabel: g = "Notifications" } = e, [x, M] = c.useState([]), T = c.useMemo(() => o ? x.filter((E) => E.toasterId === o) : x.filter((E) => !E.toasterId), [
|
|
5862
5801
|
x,
|
|
5863
5802
|
o
|
|
5864
5803
|
]), $ = c.useMemo(() => Array.from(new Set([
|
|
@@ -5866,7 +5805,7 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
5866
5805
|
].concat(T.filter((E) => E.position).map((E) => E.position)))), [
|
|
5867
5806
|
T,
|
|
5868
5807
|
n
|
|
5869
|
-
]), [V, X] = c.useState([]), [J, tt] = c.useState(!1), [
|
|
5808
|
+
]), [V, X] = c.useState([]), [J, tt] = c.useState(!1), [ut, mt] = c.useState(!1), [Y, H] = c.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), G = c.useRef(null), Q = l.join("+").replace(/Key/g, "").replace(/Digit/g, ""), L = c.useRef(null), ft = c.useRef(!1), St = c.useCallback((E) => {
|
|
5870
5809
|
M((R) => {
|
|
5871
5810
|
var A;
|
|
5872
5811
|
return (A = R.find((at) => at.id === E.id)) != null && A.delete || st.dismiss(E.id), R.filter(({ id: at }) => at !== E.id);
|
|
@@ -5932,8 +5871,8 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
5932
5871
|
const E = (R) => {
|
|
5933
5872
|
var A;
|
|
5934
5873
|
if (l.every((z) => R[z] || R.code === z)) {
|
|
5935
|
-
var
|
|
5936
|
-
tt(!0), (
|
|
5874
|
+
var Nt;
|
|
5875
|
+
tt(!0), (Nt = G.current) == null || Nt.focus();
|
|
5937
5876
|
}
|
|
5938
5877
|
R.code === "Escape" && (document.activeElement === G.current || (A = G.current) != null && A.contains(document.activeElement)) && tt(!1);
|
|
5939
5878
|
};
|
|
@@ -5945,7 +5884,7 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
5945
5884
|
return () => {
|
|
5946
5885
|
L.current && (L.current.focus({
|
|
5947
5886
|
preventScroll: !0
|
|
5948
|
-
}), L.current = null,
|
|
5887
|
+
}), L.current = null, ft.current = !1);
|
|
5949
5888
|
};
|
|
5950
5889
|
}, [
|
|
5951
5890
|
G.current
|
|
@@ -5960,17 +5899,17 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
5960
5899
|
suppressHydrationWarning: !0
|
|
5961
5900
|
}, $.map((E, R) => {
|
|
5962
5901
|
var A;
|
|
5963
|
-
const [at,
|
|
5902
|
+
const [at, Nt] = E.split("-");
|
|
5964
5903
|
return T.length ? /* @__PURE__ */ c.createElement("ol", {
|
|
5965
5904
|
key: E,
|
|
5966
5905
|
dir: W === "auto" ? sr() : W,
|
|
5967
5906
|
tabIndex: -1,
|
|
5968
5907
|
ref: G,
|
|
5969
|
-
className:
|
|
5908
|
+
className: d,
|
|
5970
5909
|
"data-sonner-toaster": !0,
|
|
5971
5910
|
"data-sonner-theme": Y,
|
|
5972
5911
|
"data-y-position": at,
|
|
5973
|
-
"data-x-position":
|
|
5912
|
+
"data-x-position": Nt,
|
|
5974
5913
|
style: {
|
|
5975
5914
|
"--front-toast-height": `${((A = V[0]) == null ? void 0 : A.height) || 0}px`,
|
|
5976
5915
|
"--width": `${Sc}px`,
|
|
@@ -5979,29 +5918,29 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
5979
5918
|
...Pc(u, a)
|
|
5980
5919
|
},
|
|
5981
5920
|
onBlur: (z) => {
|
|
5982
|
-
|
|
5921
|
+
ft.current && !z.currentTarget.contains(z.relatedTarget) && (ft.current = !1, L.current && (L.current.focus({
|
|
5983
5922
|
preventScroll: !0
|
|
5984
5923
|
}), L.current = null));
|
|
5985
5924
|
},
|
|
5986
5925
|
onFocus: (z) => {
|
|
5987
|
-
z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" ||
|
|
5926
|
+
z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || ft.current || (ft.current = !0, L.current = z.relatedTarget);
|
|
5988
5927
|
},
|
|
5989
5928
|
onMouseEnter: () => tt(!0),
|
|
5990
5929
|
onMouseMove: () => tt(!0),
|
|
5991
5930
|
onMouseLeave: () => {
|
|
5992
|
-
|
|
5931
|
+
ut || tt(!1);
|
|
5993
5932
|
},
|
|
5994
5933
|
onDragEnd: () => tt(!1),
|
|
5995
5934
|
onPointerDown: (z) => {
|
|
5996
5935
|
z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || mt(!0);
|
|
5997
5936
|
},
|
|
5998
5937
|
onPointerUp: () => mt(!1)
|
|
5999
|
-
}, T.filter((z) => !z.position && R === 0 || z.position === E).map((z,
|
|
5938
|
+
}, T.filter((z) => !z.position && R === 0 || z.position === E).map((z, ht) => {
|
|
6000
5939
|
var Rt, At;
|
|
6001
5940
|
return /* @__PURE__ */ c.createElement(_c, {
|
|
6002
5941
|
key: z.id,
|
|
6003
5942
|
icons: _,
|
|
6004
|
-
index:
|
|
5943
|
+
index: ht,
|
|
6005
5944
|
toast: z,
|
|
6006
5945
|
defaultRichColors: b,
|
|
6007
5946
|
duration: (Rt = h?.duration) != null ? Rt : w,
|
|
@@ -6009,8 +5948,8 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6009
5948
|
descriptionClassName: h?.descriptionClassName,
|
|
6010
5949
|
invert: i,
|
|
6011
5950
|
visibleToasts: y,
|
|
6012
|
-
closeButton: (At = h?.closeButton) != null ? At :
|
|
6013
|
-
interacting:
|
|
5951
|
+
closeButton: (At = h?.closeButton) != null ? At : p,
|
|
5952
|
+
interacting: ut,
|
|
6014
5953
|
position: E,
|
|
6015
5954
|
style: h?.style,
|
|
6016
5955
|
unstyled: h?.unstyled,
|
|
@@ -6018,9 +5957,9 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6018
5957
|
cancelButtonStyle: h?.cancelButtonStyle,
|
|
6019
5958
|
actionButtonStyle: h?.actionButtonStyle,
|
|
6020
5959
|
closeButtonAriaLabel: h?.closeButtonAriaLabel,
|
|
6021
|
-
removeToast:
|
|
6022
|
-
toasts: T.filter((
|
|
6023
|
-
heights: V.filter((
|
|
5960
|
+
removeToast: St,
|
|
5961
|
+
toasts: T.filter((Tt) => Tt.position == z.position),
|
|
5962
|
+
heights: V.filter((Tt) => Tt.position == z.position),
|
|
6024
5963
|
setHeights: X,
|
|
6025
5964
|
expandByDefault: s,
|
|
6026
5965
|
gap: k,
|
|
@@ -6032,7 +5971,7 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6032
5971
|
}), Am = ({ className: t, ...e }) => /* @__PURE__ */ m(
|
|
6033
5972
|
qc,
|
|
6034
5973
|
{
|
|
6035
|
-
className:
|
|
5974
|
+
className: Ft("flex w-full flex-col items-end", t),
|
|
6036
5975
|
toastOptions: {
|
|
6037
5976
|
unstyled: !0,
|
|
6038
5977
|
classNames: {
|
|
@@ -6043,13 +5982,13 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6043
5982
|
}
|
|
6044
5983
|
), jm = {
|
|
6045
5984
|
success: (t, e) => {
|
|
6046
|
-
const r = e?.position, o =
|
|
5985
|
+
const r = e?.position, o = qt(
|
|
6047
5986
|
/* @__PURE__ */ m(
|
|
6048
5987
|
fe,
|
|
6049
5988
|
{
|
|
6050
5989
|
dismiss: {
|
|
6051
5990
|
label: e?.dismiss?.label ?? "Dismiss",
|
|
6052
|
-
onClick: () =>
|
|
5991
|
+
onClick: () => qt.dismiss(o)
|
|
6053
5992
|
},
|
|
6054
5993
|
message: t,
|
|
6055
5994
|
variant: "success",
|
|
@@ -6060,13 +5999,13 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6060
5999
|
);
|
|
6061
6000
|
},
|
|
6062
6001
|
error: (t, e) => {
|
|
6063
|
-
const r = e?.position, o =
|
|
6002
|
+
const r = e?.position, o = qt(
|
|
6064
6003
|
/* @__PURE__ */ m(
|
|
6065
6004
|
fe,
|
|
6066
6005
|
{
|
|
6067
6006
|
dismiss: {
|
|
6068
6007
|
label: e?.dismiss?.label ?? "Dismiss",
|
|
6069
|
-
onClick: () =>
|
|
6008
|
+
onClick: () => qt.dismiss(o)
|
|
6070
6009
|
},
|
|
6071
6010
|
message: t,
|
|
6072
6011
|
variant: "error",
|
|
@@ -6077,13 +6016,13 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6077
6016
|
);
|
|
6078
6017
|
},
|
|
6079
6018
|
warning: (t, e) => {
|
|
6080
|
-
const r = e?.position, o =
|
|
6019
|
+
const r = e?.position, o = qt(
|
|
6081
6020
|
/* @__PURE__ */ m(
|
|
6082
6021
|
fe,
|
|
6083
6022
|
{
|
|
6084
6023
|
dismiss: {
|
|
6085
6024
|
label: e?.dismiss?.label ?? "Dismiss",
|
|
6086
|
-
onClick: () =>
|
|
6025
|
+
onClick: () => qt.dismiss(o)
|
|
6087
6026
|
},
|
|
6088
6027
|
message: t,
|
|
6089
6028
|
variant: "warning",
|
|
@@ -6094,13 +6033,13 @@ const qc = /* @__PURE__ */ c.forwardRef(function(e, r) {
|
|
|
6094
6033
|
);
|
|
6095
6034
|
},
|
|
6096
6035
|
info: (t, e) => {
|
|
6097
|
-
const r = e?.position, o =
|
|
6036
|
+
const r = e?.position, o = qt(
|
|
6098
6037
|
/* @__PURE__ */ m(
|
|
6099
6038
|
fe,
|
|
6100
6039
|
{
|
|
6101
6040
|
dismiss: {
|
|
6102
6041
|
label: e?.dismiss?.label ?? "Dismiss",
|
|
6103
|
-
onClick: () => e?.dismiss?.onClick ??
|
|
6042
|
+
onClick: () => e?.dismiss?.onClick ?? qt.dismiss(o)
|
|
6104
6043
|
},
|
|
6105
6044
|
message: t,
|
|
6106
6045
|
variant: "info",
|