@dotss/tictoccroc 0.0.3 → 0.0.5

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.
Files changed (30) hide show
  1. package/dist/index.mjs +78 -77
  2. package/dist/shared/components/Masonry/Masonry.mjs +111 -103
  3. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +1 -1
  4. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +103 -86
  5. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +1 -1
  6. package/dist/shared/components/MediaDialog/MediaDialog.mjs +121 -118
  7. package/dist/shared/components/Roller/Roller.mjs +131 -7
  8. package/dist/shared/components/Roller/index.mjs +3 -3
  9. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +1 -1
  10. package/dist/shared/components/Swiper/Swiper.mjs +1 -1
  11. package/dist/shared/components/index.mjs +3 -3
  12. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +1 -1
  13. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +1 -1
  14. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.mjs +79 -6
  15. package/dist/teacher/profile/components/LessonNotesSection/index.mjs +3 -3
  16. package/dist/teacher/profile/components/index.mjs +5 -5
  17. package/package.json +2 -2
  18. package/dist/LessonNotesSection-Bg1DHFxg.js +0 -208
  19. package/dist/shared/utils/birthDateToAge/birthDateToAge.test.mjs +0 -11
  20. package/dist/shared/utils/getDateRange/getDateRange.test.mjs +0 -60
  21. package/dist/shared/utils/getImageUrl/getImageUrl.test.mjs +0 -27
  22. package/dist/shared/utils/getTimeRange/getTimeRange.test.mjs +0 -75
  23. package/dist/shared/utils/getVimeoId/getVimeoId.test.mjs +0 -14
  24. package/dist/shared/utils/isAndroid/isAndroid.test.mjs +0 -12
  25. package/dist/shared/utils/isApp/isApp.test.mjs +0 -22
  26. package/dist/shared/utils/isDesktop/isDesktop.test.mjs +0 -10
  27. package/dist/shared/utils/isServer/isServer.test.mjs +0 -12
  28. package/dist/shared/utils/objectToQueryString/objectToQueryString.test.mjs +0 -11
  29. package/dist/shared/utils/parseQueryString/parseQueryString.test.mjs +0 -15
  30. package/dist/shared/utils/share/share.test.mjs +0 -31
@@ -1,104 +1,121 @@
1
- import { jsxs as B, jsx as w } from "react/jsx-runtime";
2
- import { forwardRef as A, useState as p, useRef as H, useImperativeHandle as I, useEffect as h, Children as W, isValidElement as z, cloneElement as F } from "react";
3
- import { Flexbox as k, Skeleton as L } from "@dotss/ui";
1
+ import { jsxs as k, jsx as g } from "react/jsx-runtime";
2
+ import { forwardRef as a, useState as u, useRef as A, useImperativeHandle as B, useEffect as p, Children as W, isValidElement as z, cloneElement as F } from "react";
3
+ import { Flexbox as t, Skeleton as D } from "@dotss/ui";
4
+ import L from "@dotss/ui/core/useTheme";
4
5
  import V from "../../Image/Image.mjs";
5
6
  import { findImageInChildren as $ } from "../Masonry.utils.mjs";
6
- const N = A(
7
+ const P = a(
7
8
  ({
8
- children: g,
9
- spacing: u = 2,
10
- width: e = 0,
11
- height: r = 0,
12
- borderRadius: m,
13
- direction: x = "vertical",
14
- setInnerRef: n,
15
- sourceMetadata: s,
16
- ...t
17
- }, C) => {
18
- var S;
19
- const l = $(g), y = (S = l == null ? void 0 : l.props) == null ? void 0 : S.src, i = s == null ? void 0 : s.find((o) => o.src === y), [d, E] = p((i == null ? void 0 : i.width) ?? e ?? 0), [c, T] = p((i == null ? void 0 : i.height) ?? r ?? 0), [b, v] = p(!y), f = H(null), j = () => v(!0);
20
- return I(C, () => f.current), h(() => {
21
- E((i == null ? void 0 : i.width) ?? e ?? 0), T((i == null ? void 0 : i.height) ?? r ?? 0);
22
- }, [e, r, i == null ? void 0 : i.width, i == null ? void 0 : i.height]), h(() => {
23
- const o = setTimeout(() => {
24
- v(!0);
9
+ children: m,
10
+ width: r = 0,
11
+ height: s = 0,
12
+ spacing: x = 2,
13
+ borderRadius: S,
14
+ direction: v = "vertical",
15
+ setInnerRef: o,
16
+ sourceMetadata: l,
17
+ ...e
18
+ }, T) => {
19
+ var C;
20
+ const { spacing: E } = L(), c = $(m), b = (C = c == null ? void 0 : c.props) == null ? void 0 : C.src, i = l == null ? void 0 : l.find((n) => n.src === b), [d, j] = u((i == null ? void 0 : i.width) ?? r ?? 0), [f, H] = u((i == null ? void 0 : i.height) ?? s ?? 0), [y, w] = u(!b), h = A(null), I = () => w(!0);
21
+ return B(T, () => h.current), p(() => {
22
+ j((i == null ? void 0 : i.width) ?? r ?? 0), H((i == null ? void 0 : i.height) ?? s ?? 0);
23
+ }, [r, s, i == null ? void 0 : i.width, i == null ? void 0 : i.height]), p(() => {
24
+ const n = setTimeout(() => {
25
+ w(!0);
25
26
  }, 300);
26
27
  return () => {
27
- clearTimeout(o);
28
+ clearTimeout(n);
28
29
  };
29
- }, []), h(() => {
30
- n == null || n(f.current);
31
- }, [n]), /* @__PURE__ */ B(
32
- k,
30
+ }, []), p(() => {
31
+ o == null || o(h.current);
32
+ }, [o]), /* @__PURE__ */ k(
33
+ t,
33
34
  {
34
- ref: f,
35
- ...t,
36
- onTransitionEnd: j,
35
+ ref: h,
36
+ flexDirection: "column",
37
+ ...e,
37
38
  inlineCSS: {
38
- position: "relative",
39
- overflow: "hidden",
40
- scrollbarWidth: "none",
41
- transform: "translate3d(0, 0, 0)",
42
- "&::-webkit-scrollbar": {
43
- display: "none"
44
- },
45
- ...t == null ? void 0 : t.inlineCSS
46
- },
47
- style: x === "vertical" ? {
48
- ...t.style,
49
- marginBottom: u,
50
- borderRadius: m,
51
- paddingTop: `calc(${c / d} * 100%)`,
52
- transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s"
53
- } : {
54
- ...t.style,
55
- marginBottom: u,
56
- borderRadius: m,
57
- paddingLeft: d,
58
- paddingTop: c,
59
- transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s, padding-left 0.3s 0.1s"
39
+ breakInside: "avoid",
40
+ ...e == null ? void 0 : e.inlineCSS
60
41
  },
61
42
  children: [
62
- /* @__PURE__ */ w(
63
- k,
43
+ v === "vertical" && /* @__PURE__ */ g(
44
+ t,
64
45
  {
65
46
  inlineCSS: {
66
- position: "absolute",
67
- top: 0,
68
- left: 0,
69
- width: "100%",
70
- height: "100%",
71
- overflow: "hidden",
72
- zIndex: 1
73
- },
74
- children: W.toArray(g).filter(z).map((o) => o.type === V || o.type === "img" ? F(o, {
75
- width: d,
76
- height: c,
77
- draggable: !1,
78
- style: {
79
- overflow: "hidden",
80
- objectFit: "cover",
81
- ...o.props.style
82
- },
83
- ...o.props
84
- }) : o)
47
+ minHeight: E.content(x)
48
+ }
85
49
  }
86
50
  ),
87
- /* @__PURE__ */ w(
88
- L,
51
+ /* @__PURE__ */ k(
52
+ t,
89
53
  {
90
- borderRadius: 0,
54
+ onTransitionEnd: I,
91
55
  inlineCSS: {
92
- position: "absolute",
93
- top: 0,
94
- left: 0,
95
- width: "100%",
96
- height: "100%",
97
- zIndex: 2,
98
- opacity: b ? 0 : 1,
99
- transition: "opacity 0.3s 0.1s",
100
- pointerEvents: b ? "none" : void 0
101
- }
56
+ position: "relative",
57
+ overflow: "hidden",
58
+ scrollbarWidth: "none",
59
+ transform: "translate3d(0, 0, 0)",
60
+ "&::-webkit-scrollbar": {
61
+ display: "none"
62
+ },
63
+ ...e == null ? void 0 : e.inlineCSS
64
+ },
65
+ style: v === "vertical" ? {
66
+ borderRadius: S,
67
+ paddingTop: `calc(${f / d} * 100%)`,
68
+ transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s"
69
+ } : {
70
+ borderRadius: S,
71
+ paddingLeft: d,
72
+ paddingTop: f,
73
+ transition: "transform 0.3s 0.1s, padding-top 0.3s 0.1s, padding-left 0.3s 0.1s"
74
+ },
75
+ children: [
76
+ /* @__PURE__ */ g(
77
+ t,
78
+ {
79
+ inlineCSS: {
80
+ position: "absolute",
81
+ top: 0,
82
+ left: 0,
83
+ width: "100%",
84
+ height: "100%",
85
+ overflow: "hidden",
86
+ zIndex: 1
87
+ },
88
+ children: W.toArray(m).filter(z).map((n) => n.type === V || n.type === "img" ? F(n, {
89
+ width: d,
90
+ height: f,
91
+ draggable: !1,
92
+ style: {
93
+ overflow: "hidden",
94
+ objectFit: "cover",
95
+ ...n.props.style
96
+ },
97
+ ...n.props
98
+ }) : n)
99
+ }
100
+ ),
101
+ /* @__PURE__ */ g(
102
+ D,
103
+ {
104
+ borderRadius: 0,
105
+ inlineCSS: {
106
+ position: "absolute",
107
+ top: 0,
108
+ left: 0,
109
+ width: "100%",
110
+ height: "100%",
111
+ zIndex: 2,
112
+ opacity: y ? 0 : 1,
113
+ transition: "opacity 0.3s 0.1s",
114
+ pointerEvents: y ? "none" : void 0
115
+ }
116
+ }
117
+ )
118
+ ]
102
119
  }
103
120
  )
104
121
  ]
@@ -107,5 +124,5 @@ const N = A(
107
124
  }
108
125
  );
109
126
  export {
110
- N as default
127
+ P as default
111
128
  };
@@ -10,6 +10,7 @@ function j({ children: i, fallback: l, imageProps: t, ...n }) {
10
10
  {
11
11
  ...n,
12
12
  inlineCSS: {
13
+ marginTop: "calc(var(--status-bar-height, 0px) * -1)",
13
14
  "& > div:nth-of-type(1)": {
14
15
  zIndex: 1
15
16
  },
@@ -38,7 +39,6 @@ function j({ children: i, fallback: l, imageProps: t, ...n }) {
38
39
  maxWidth: "100%",
39
40
  objectFit: "contain",
40
41
  transform: "translate3d(0, 0, 0) scale(1)",
41
- marginTop: "calc(var(--status-bar-height, 0px) * -1)",
42
42
  zIndex: 1,
43
43
  ...t == null ? void 0 : t.style,
44
44
  ...e.props.style
@@ -1,34 +1,34 @@
1
- import { jsxs as G, jsx as x } from "react/jsx-runtime";
2
- import { useState as L, useRef as o, Children as et, isValidElement as nt, useEffect as j, cloneElement as bt } from "react";
3
- import { Flexbox as S, Typography as ct, IconButton as St } from "@dotss/ui";
4
- import Yt from "@dotss/ui/core/useTheme";
5
- import $t from "@dotss/ui/Dialog";
1
+ import { jsxs as O, jsx as x } from "react/jsx-runtime";
2
+ import { useState as P, useRef as i, Children as et, isValidElement as nt, useEffect as N, cloneElement as Yt } from "react";
3
+ import { Flexbox as Y, Typography as ct, IconButton as $t } from "@dotss/ui";
4
+ import wt from "@dotss/ui/core/useTheme";
5
+ import Xt from "@dotss/ui/Dialog";
6
6
  import at from "./MediaBlock/MediaBlock.mjs";
7
- import Xt from "../Swiper/Swiper.mjs";
8
- function Wt({
9
- children: O,
10
- open: Y = !1,
11
- onClose: B,
12
- onSwipe: N,
13
- initialPage: V = 0,
14
- title: Z,
7
+ import Rt from "../Swiper/Swiper.mjs";
8
+ function Dt({
9
+ children: B,
10
+ open: $ = !1,
11
+ onClose: V,
12
+ onSwipe: q,
13
+ initialPage: Z = 0,
14
+ title: J,
15
15
  loop: st = !1,
16
16
  fallback: ut,
17
- ...H
17
+ ...v
18
18
  }) {
19
19
  const {
20
- palette: { grey: J, etc: K }
21
- } = Yt(), [ot, Q] = L(!1), [it, lt] = L(V), [ft, mt] = L("100vh"), [_, b] = L(1), i = o(null), e = o(1), k = o(1), U = o(3), y = o(0), C = o(0), P = o(0), v = o(0), n = o(0), c = o(0), l = o(!1), m = o(!1), E = o(null), $ = o(0), M = o(0), ht = et.toArray(O).filter((r) => nt(r)).filter((r) => r.type === at), gt = et.toArray(O).filter((r) => nt(r)).filter((r) => r.type !== at), dt = (r) => (t) => {
22
- l.current && t.stopPropagation(), P.current = t.clientX - n.current, v.current = t.clientY - c.current, m.current = e.current > 1, r == null || r(t);
23
- }, pt = (r) => (t) => {
24
- if (!m.current) return;
25
- n.current = t.clientX - P.current, c.current = t.clientY - v.current;
26
- const u = t.currentTarget, { width: s, height: a } = u.getBoundingClientRect(), d = s / e.current, h = a / e.current, f = Math.max(
20
+ palette: { grey: it, etc: K }
21
+ } = wt(), [ot, Q] = P(!1), [lt, ft] = P(Z), [ht, mt] = P("100vh"), [_, S] = P(1), [gt, b] = P(!1), o = i(null), e = i(1), U = i(1), k = i(3), y = i(0), M = i(0), E = i(0), W = i(0), n = i(0), c = i(0), l = i(!1), h = i(!1), A = i(null), w = i(0), C = i(0), dt = et.toArray(B).filter((r) => nt(r)).filter((r) => r.type === at), pt = et.toArray(B).filter((r) => nt(r)).filter((r) => r.type !== at), xt = (r) => (t) => {
22
+ l.current && t.stopPropagation(), E.current = t.clientX - n.current, W.current = t.clientY - c.current, h.current = e.current > 1, r == null || r(t);
23
+ }, yt = (r) => (t) => {
24
+ if (!h.current) return;
25
+ n.current = t.clientX - E.current, c.current = t.clientY - W.current;
26
+ const u = t.currentTarget, { width: s, height: a } = u.getBoundingClientRect(), d = s / e.current, m = a / e.current, f = Math.max(
27
27
  0,
28
- (d * e.current - i.current.offsetWidth) / 2
28
+ (d * e.current - o.current.offsetWidth) / 2
29
29
  ), g = Math.max(
30
30
  0,
31
- (h * e.current - i.current.offsetHeight) / 2
31
+ (m * e.current - o.current.offsetHeight) / 2
32
32
  );
33
33
  n.current = Math.min(
34
34
  Math.max(n.current, -f),
@@ -38,45 +38,46 @@ function Wt({
38
38
  g
39
39
  ), t.currentTarget.style.cursor = "grabbing", t.currentTarget.style.transition = "none", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`, r == null || r(t);
40
40
  }, tt = (r) => (t) => {
41
- m.current && (t.currentTarget.style.cursor = "grab"), m.current = !1, r == null || r(t);
42
- }, xt = (r) => (t) => {
43
- if (P.current = t.touches[0].clientX - n.current, v.current = t.touches[0].clientY - c.current, l.current = t.touches.length === 2, m.current = t.touches.length === 1 && e.current > 1, l.current) {
41
+ h.current && (t.currentTarget.style.cursor = "grab"), h.current = !1, r == null || r(t);
42
+ }, Mt = (r) => (t) => {
43
+ if (E.current = t.touches[0].clientX - n.current, W.current = t.touches[0].clientY - c.current, l.current = t.touches.length === 2, h.current = t.touches.length === 1 && e.current > 1, l.current) {
44
+ b(!0);
44
45
  const u = t.touches[1].clientX - t.touches[0].clientX, s = t.touches[1].clientY - t.touches[0].clientY;
45
46
  y.current = Math.hypot(u, s);
46
47
  }
47
48
  r == null || r(t);
48
- }, yt = (r) => (t) => {
49
+ }, Ct = (r) => (t) => {
49
50
  const u = t.touches.length === 2, s = t.touches.length === 1;
50
51
  if (l.current && u) {
51
52
  const a = t.touches[1].clientX - t.touches[0].clientX, d = t.touches[1].clientY - t.touches[0].clientY;
52
- C.current = Math.hypot(a, d);
53
- const h = C.current / y.current, f = Math.min(
54
- Math.max(k.current, e.current * h),
55
- U.current
56
- ), g = (t.touches[0].clientX + t.touches[1].clientX) / 2, p = (t.touches[0].clientY + t.touches[1].clientY) / 2, { left: W, top: A, width: X, height: D } = t.currentTarget.getBoundingClientRect(), q = X / e.current, F = D / e.current, I = g - W - X / 2, z = p - A - D / 2, R = f / e.current;
57
- n.current -= I * (R - 1), c.current -= z * (R - 1), e.current = f, b(f);
53
+ M.current = Math.hypot(a, d);
54
+ const m = M.current / y.current, f = Math.min(
55
+ Math.max(U.current, e.current * m),
56
+ k.current
57
+ ), g = (t.touches[0].clientX + t.touches[1].clientX) / 2, p = (t.touches[0].clientY + t.touches[1].clientY) / 2, { left: D, top: F, width: X, height: I } = t.currentTarget.getBoundingClientRect(), G = X / e.current, z = I / e.current, L = g - D - X / 2, j = p - F - I / 2, R = f / e.current;
58
+ n.current -= L * (R - 1), c.current -= j * (R - 1), e.current = f, S(f), b(!0);
58
59
  const T = Math.max(
59
60
  0,
60
- (q * e.current - i.current.offsetWidth) / 2
61
- ), w = Math.max(
61
+ (G * e.current - o.current.offsetWidth) / 2
62
+ ), H = Math.max(
62
63
  0,
63
- (F * e.current - i.current.offsetHeight) / 2
64
+ (z * e.current - o.current.offsetHeight) / 2
64
65
  );
65
66
  n.current = Math.min(
66
67
  Math.max(n.current, -T),
67
68
  T
68
69
  ), c.current = Math.min(
69
- Math.max(c.current, -w),
70
- w
71
- ), y.current = C.current, t.currentTarget.style.transition = "none", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
72
- } else if (m.current && s) {
73
- n.current = t.touches[0].clientX - P.current, c.current = t.touches[0].clientY - v.current;
74
- const { width: a, height: d } = t.currentTarget.getBoundingClientRect(), h = a / e.current, f = d / e.current, g = Math.max(
70
+ Math.max(c.current, -H),
71
+ H
72
+ ), y.current = M.current, t.currentTarget.style.transition = "none", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
73
+ } else if (h.current && s) {
74
+ n.current = t.touches[0].clientX - E.current, c.current = t.touches[0].clientY - W.current;
75
+ const { width: a, height: d } = t.currentTarget.getBoundingClientRect(), m = a / e.current, f = d / e.current, g = Math.max(
75
76
  0,
76
- (h * e.current - i.current.offsetWidth) / 2
77
+ (m * e.current - o.current.offsetWidth) / 2
77
78
  ), p = Math.max(
78
79
  0,
79
- (f * e.current - i.current.offsetHeight) / 2
80
+ (f * e.current - o.current.offsetHeight) / 2
80
81
  );
81
82
  n.current = Math.min(
82
83
  Math.max(n.current, -g),
@@ -91,9 +92,9 @@ function Wt({
91
92
  const u = e.current;
92
93
  if (l.current && u > 1.2) {
93
94
  const s = Math.abs(
94
- (t.currentTarget.offsetWidth * e.current - i.current.offsetWidth) / 2
95
+ (t.currentTarget.offsetWidth * e.current - o.current.offsetWidth) / 2
95
96
  ), a = Math.abs(
96
- (t.currentTarget.offsetHeight * e.current - i.current.offsetHeight) / 2
97
+ (t.currentTarget.offsetHeight * e.current - o.current.offsetHeight) / 2
97
98
  );
98
99
  n.current = Math.min(
99
100
  Math.max(n.current, -s),
@@ -102,94 +103,94 @@ function Wt({
102
103
  Math.max(c.current, -a),
103
104
  a
104
105
  ), t.currentTarget.style.transition = "transform 0.3s", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
105
- } else l.current && u <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, C.current = 0, e.current = 1, b(1), l.current = !1, m.current = !1, t.currentTarget.style.transition = "transform 0.3s", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
106
- m.current = !1, r == null || r(t);
107
- }, Ct = ({ currentPage: r }) => {
106
+ } else l.current && u <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, M.current = 0, e.current = 1, l.current = !1, h.current = !1, S(1), b(!1), t.currentTarget.style.transition = "transform 0.3s", t.currentTarget.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
107
+ h.current = !1, r == null || r(t);
108
+ }, St = ({ currentPage: r }) => {
108
109
  var u;
109
- r !== it ? (n.current = 0, c.current = 0, y.current = 0, e.current = 1, b(1), C.current = 0, l.current = !1, m.current = !1, Array.from(((u = E.current) == null ? void 0 : u.getElementsByTagName("img")) || []).forEach((a) => {
110
+ r !== lt ? (n.current = 0, c.current = 0, y.current = 0, e.current = 1, M.current = 0, l.current = !1, h.current = !1, S(1), Array.from(((u = A.current) == null ? void 0 : u.getElementsByTagName("img")) || []).forEach((a) => {
110
111
  a.style.cursor = "default", a.style.transition = "transform 0.1s 0.1s", a.style.transform = "translate3d(0, 0, 0) scale(1)";
111
- })) : e.current > 1.2 && (l.current = !0), N == null || N(r), lt(r);
112
- }, Mt = () => {
113
- m.current = !1;
112
+ })) : e.current > 1.2 && (l.current = !0), q == null || q(r), ft(r);
113
+ }, bt = () => {
114
+ h.current = !1;
114
115
  };
115
- return j(() => {
116
+ return N(() => {
116
117
  var u;
117
- const r = Array.from(((u = E.current) == null ? void 0 : u.getElementsByTagName("img")) || []), t = (s) => {
118
- s.preventDefault(), l.current = !0;
119
- const a = s.currentTarget, d = s.deltaY > 0 ? -0.1 : 0.1, h = Math.min(
120
- Math.max(k.current, e.current + d),
121
- U.current
122
- ), { left: f, top: g, width: p, height: W } = a.getBoundingClientRect(), A = p / e.current, X = W / e.current, D = s.clientX - f - p / 2, q = s.clientY - g - W / 2, F = h / e.current;
123
- n.current -= D * (F - 1), c.current -= q * (F - 1), e.current = h, b(h);
124
- const I = Math.max(
118
+ const r = Array.from(((u = A.current) == null ? void 0 : u.getElementsByTagName("img")) || []), t = (s) => {
119
+ s.preventDefault(), l.current = !0, b(!0);
120
+ const a = s.currentTarget, d = s.deltaY > 0 ? -0.1 : 0.1, m = Math.min(
121
+ Math.max(U.current, e.current + d),
122
+ k.current
123
+ ), { left: f, top: g, width: p, height: D } = a.getBoundingClientRect(), F = p / e.current, X = D / e.current, I = s.clientX - f - p / 2, G = s.clientY - g - D / 2, z = m / e.current;
124
+ n.current -= I * (z - 1), c.current -= G * (z - 1), e.current = m, S(m);
125
+ const L = Math.max(
125
126
  0,
126
- (A * e.current - i.current.offsetWidth) / 2
127
- ), z = Math.max(
127
+ (F * e.current - o.current.offsetWidth) / 2
128
+ ), j = Math.max(
128
129
  0,
129
- (X * e.current - i.current.offsetHeight) / 2
130
+ (X * e.current - o.current.offsetHeight) / 2
130
131
  );
131
132
  n.current = Math.min(
132
- Math.max(n.current, -I),
133
- I
133
+ Math.max(n.current, -L),
134
+ L
134
135
  ), c.current = Math.min(
135
- Math.max(c.current, -z),
136
- z
137
- ), l.current = !0, a.style.cursor = "grab", a.style.transition = "none", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`, M.current && cancelAnimationFrame(M.current), M.current = requestAnimationFrame(() => {
136
+ Math.max(c.current, -j),
137
+ j
138
+ ), l.current = !0, a.style.cursor = "grab", a.style.transition = "none", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`, C.current && cancelAnimationFrame(C.current), C.current = requestAnimationFrame(() => {
138
139
  const R = e.current;
139
140
  if (R > 1) {
140
141
  const T = Math.max(
141
142
  0,
142
- (A * e.current - i.current.offsetWidth) / 2
143
- ), w = Math.max(
143
+ (F * e.current - o.current.offsetWidth) / 2
144
+ ), H = Math.max(
144
145
  0,
145
- (X * e.current - i.current.offsetHeight) / 2
146
+ (X * e.current - o.current.offsetHeight) / 2
146
147
  );
147
148
  n.current = Math.min(
148
149
  Math.max(n.current, -T),
149
150
  T
150
151
  ), c.current = Math.min(
151
- Math.max(c.current, -w),
152
- w
152
+ Math.max(c.current, -H),
153
+ H
153
154
  ), a.style.cursor = "default", a.style.transition = "transform 0.3s", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`;
154
- } else R <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, C.current = 0, e.current = 1, b(1), l.current = !1, m.current = !1, a.style.cursor = "default", a.style.transition = "transform 0.3s", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
155
+ } else R <= 1.2 && (n.current = 0, c.current = 0, y.current = 0, M.current = 0, e.current = 1, l.current = !1, h.current = !1, S(1), b(!1), a.style.cursor = "default", a.style.transition = "transform 0.3s", a.style.transform = `translate3d(${n.current}px, ${c.current}px, 0) scale(${e.current})`);
155
156
  });
156
157
  };
157
158
  return r.forEach((s) => {
158
159
  s.addEventListener("wheel", t);
159
160
  }), () => {
160
- M.current && cancelAnimationFrame(M.current), r.forEach((s) => {
161
+ C.current && cancelAnimationFrame(C.current), r.forEach((s) => {
161
162
  s.removeEventListener("wheel", t);
162
163
  });
163
164
  };
164
- }, [ot]), j(() => {
165
+ }, [ot]), N(() => {
165
166
  const r = () => {
166
167
  var u;
167
- const t = (u = E.current) == null ? void 0 : u.offsetHeight;
168
+ const t = (u = A.current) == null ? void 0 : u.offsetHeight;
168
169
  t && mt(`${t}px`);
169
170
  };
170
171
  return r(), window.addEventListener("resize", r), () => {
171
172
  window.removeEventListener("resize", r);
172
173
  };
173
- }, []), j(() => (Y ? $.current = requestAnimationFrame(() => {
174
+ }, []), N(() => ($ ? w.current = requestAnimationFrame(() => {
174
175
  Q(!0);
175
176
  }) : Q(!1), () => {
176
- $.current && cancelAnimationFrame($.current);
177
- }), [Y]), j(() => (Y && (e.current = 1, b(1), n.current = 0, c.current = 0, y.current = 0, C.current = 0, l.current = !1, m.current = !1), () => {
178
- M.current && cancelAnimationFrame(M.current), $.current && cancelAnimationFrame($.current);
179
- }), [Y]), /* @__PURE__ */ G(
180
- $t,
177
+ w.current && cancelAnimationFrame(w.current);
178
+ }), [$]), N(() => ($ && (e.current = 1, S(1), b(!1), n.current = 0, c.current = 0, y.current = 0, M.current = 0, l.current = !1, h.current = !1), () => {
179
+ C.current && cancelAnimationFrame(C.current), w.current && cancelAnimationFrame(w.current);
180
+ }), [$]), /* @__PURE__ */ O(
181
+ Xt,
181
182
  {
182
- ref: i,
183
- open: Y,
184
- onClose: B,
183
+ ref: o,
184
+ open: $,
185
+ onClose: V,
185
186
  fullScreen: !0,
186
- statusBarColor: J.black,
187
+ hideStatusBar: !0,
187
188
  hideSystemNavigationBar: !0,
188
189
  "aria-modal": !0,
189
- "aria-labelledby": Z ? "media-dialog-title" : void 0,
190
- ...H,
190
+ "aria-labelledby": J ? "media-dialog-title" : void 0,
191
+ ...v,
191
192
  inlineCSS: {
192
- backgroundColor: J.black,
193
+ backgroundColor: it.black,
193
194
  scrollbarWidth: "none",
194
195
  "&::-webkit-scrollbar": {
195
196
  display: "none"
@@ -200,11 +201,11 @@ function Wt({
200
201
  display: "none"
201
202
  }
202
203
  },
203
- ...H == null ? void 0 : H.inlineCSS
204
+ ...v == null ? void 0 : v.inlineCSS
204
205
  },
205
206
  children: [
206
207
  /* @__PURE__ */ x(
207
- S,
208
+ Y,
208
209
  {
209
210
  "aria-hidden": !0,
210
211
  inlineCSS: {
@@ -219,7 +220,7 @@ function Wt({
219
220
  }
220
221
  ),
221
222
  /* @__PURE__ */ x(
222
- S,
223
+ Y,
223
224
  {
224
225
  tag: "header",
225
226
  inlineCSS: {
@@ -230,8 +231,8 @@ function Wt({
230
231
  backgroundColor: K.dimmed01,
231
232
  zIndex: 2
232
233
  },
233
- children: /* @__PURE__ */ G(
234
- S,
234
+ children: /* @__PURE__ */ O(
235
+ Y,
235
236
  {
236
237
  alignItems: "center",
237
238
  p: 2,
@@ -244,7 +245,7 @@ function Wt({
244
245
  maxHeight: 56
245
246
  },
246
247
  children: [
247
- /* @__PURE__ */ x(S, {}),
248
+ /* @__PURE__ */ x(Y, {}),
248
249
  /* @__PURE__ */ x(
249
250
  ct,
250
251
  {
@@ -257,52 +258,54 @@ function Wt({
257
258
  inlineCSS: {
258
259
  flexGrow: 1
259
260
  },
260
- children: Z
261
+ children: J
261
262
  }
262
263
  ),
263
- /* @__PURE__ */ x(S, { justifyContent: "flex-end", children: /* @__PURE__ */ x(St, { name: "CloseLine", color: "tertiary", onClick: B, "aria-label": "창 닫기" }) })
264
+ /* @__PURE__ */ x(Y, { justifyContent: "flex-end", children: /* @__PURE__ */ x($t, { name: "CloseLine", color: "tertiary", onClick: V, "aria-label": "창 닫기" }) })
264
265
  ]
265
266
  }
266
267
  )
267
268
  }
268
269
  ),
269
270
  /* @__PURE__ */ x(
270
- S,
271
+ Y,
271
272
  {
272
- ref: E,
273
+ ref: A,
273
274
  alignItems: "center",
274
275
  justifyContent: "center",
275
276
  inlineCSS: {
276
277
  position: "relative",
277
278
  width: "100%",
278
279
  height: "100%",
279
- touchAction: "none"
280
+ touchAction: "none",
281
+ overflow: "hidden"
280
282
  },
281
283
  children: /* @__PURE__ */ x(
282
- Xt,
284
+ Rt,
283
285
  {
284
- onSwipe: Ct,
285
- onSwiping: Mt,
286
- initialPage: V,
286
+ onSwipe: St,
287
+ onSwiping: bt,
288
+ initialPage: Z,
287
289
  loop: st,
288
- children: ht.map(
290
+ disableSwipe: gt,
291
+ children: dt.map(
289
292
  (r) => {
290
- var t, u, s, a, d, h, f, g, p;
291
- return bt(r, {
293
+ var t, u, s, a, d, m, f, g, p;
294
+ return Yt(r, {
292
295
  fallback: ut,
293
296
  ...r.props,
294
297
  imageProps: {
295
298
  ...r.props.imageProps,
296
- onMouseDown: dt((t = r.props.imageProps) == null ? void 0 : t.onMouseDown),
297
- onMouseMove: pt((u = r.props.imageProps) == null ? void 0 : u.onMouseMove),
299
+ onMouseDown: xt((t = r.props.imageProps) == null ? void 0 : t.onMouseDown),
300
+ onMouseMove: yt((u = r.props.imageProps) == null ? void 0 : u.onMouseMove),
298
301
  onMouseUp: tt((s = r.props.imageProps) == null ? void 0 : s.onMouseUp),
299
302
  onMouseOut: tt((a = r.props.imageProps) == null ? void 0 : a.onMouseOut),
300
- onTouchStart: xt((d = r.props.imageProps) == null ? void 0 : d.onTouchStart),
301
- onTouchMove: yt((h = r.props.imageProps) == null ? void 0 : h.onTouchMove),
303
+ onTouchStart: Mt((d = r.props.imageProps) == null ? void 0 : d.onTouchStart),
304
+ onTouchMove: Ct((m = r.props.imageProps) == null ? void 0 : m.onTouchMove),
302
305
  onTouchEnd: rt((f = r.props.imageProps) == null ? void 0 : f.onTouchEnd),
303
306
  onTouchCancel: rt((g = r.props.imageProps) == null ? void 0 : g.onTouchCancel),
304
307
  style: {
305
- maxHeight: ft,
308
+ maxHeight: ht,
306
309
  ...(p = r.props.imageProps) == null ? void 0 : p.style
307
310
  }
308
311
  }
@@ -313,8 +316,8 @@ function Wt({
313
316
  )
314
317
  }
315
318
  ),
316
- gt,
317
- /* @__PURE__ */ G(ct, { role: "status", visuallyHidden: !0, children: [
319
+ pt,
320
+ /* @__PURE__ */ O(ct, { role: "status", visuallyHidden: !0, children: [
318
321
  _ > 1 && "이미지가 확대되었어요.",
319
322
  _ <= 1 && "이미지가 원래 크기로 복원되었어요."
320
323
  ] })
@@ -323,5 +326,5 @@ function Wt({
323
326
  );
324
327
  }
325
328
  export {
326
- Wt as default
329
+ Dt as default
327
330
  };