@pop-ui/core 0.0.41 → 0.0.42
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/README.md +52 -148
- package/dist/core.css +1 -1
- package/dist/core.js +2100 -1158
- package/dist/core.umd.cjs +25 -23
- package/dist/types/index.d.ts +136 -29
- package/package.json +10 -5
- package/src/components/CalendarDatePicker/README.md +409 -0
- package/LICENSE.md +0 -21
package/dist/core.js
CHANGED
|
@@ -1,319 +1,193 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import w from "dayjs";
|
|
1
|
+
import { jsxs as x, jsx as l, Fragment as Ve } from "react/jsx-runtime";
|
|
2
|
+
import { Button as kt, Loader as Ge, Checkbox as Ct, Popover as ke, Input as J, Tooltip as fe, Select as Dt, Modal as xt, Stack as Pt, Group as Mt, Radio as bt, Autocomplete as St, SegmentedControl as Tt, Tabs as ce, Textarea as wt, ActionIcon as It, Switch as Lt, createTheme as Bt, MantineProvider as vt } from "@mantine/core";
|
|
3
|
+
import { useState as L, useMemo as Le, useCallback as Y, useRef as oe, useEffect as X, createContext as Be, useContext as ve } from "react";
|
|
4
|
+
import { DatePicker as Et, DateTimePicker as At, TimeInput as Nt } from "@mantine/dates";
|
|
5
|
+
import { IconChevronRight as Ke, IconChevronLeft as Je, parseDateValue as Ne, formatDateDisplay as Ft, IconCalendar as $t, toValueString as Rt, IconInfoCircle as Ee, IconChevronUp as Ot, IconChevronDown as zt, ColorGray900 as Ht, IconX as Ae, ColorGray600 as Yt, IconXCircle as Wt, ColorAqua500 as Xe, IconDragMenu as Zt, IconPhoto as ue, IconSearch as jt, IconClock as Ut, colors as qe, getCSSVariableName as Vt, getCSSVariableRef as ee, IconMap as Gt, ColorGray800 as Kt, IconMapMarker as Jt } from "@pop-ui/foundation";
|
|
6
|
+
import H from "dayjs";
|
|
8
7
|
import "dayjs/locale/ko";
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
color: Ct,
|
|
66
|
-
cursor: "not-allowed"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
basic: {
|
|
70
|
-
default: {
|
|
71
|
-
backgroundColor: yt,
|
|
72
|
-
color: Te,
|
|
73
|
-
border: `1px solid ${xt}`
|
|
74
|
-
},
|
|
75
|
-
hover: {
|
|
76
|
-
backgroundColor: ft,
|
|
77
|
-
color: ht,
|
|
78
|
-
borderColor: gt
|
|
79
|
-
},
|
|
80
|
-
active: {
|
|
81
|
-
backgroundColor: pt,
|
|
82
|
-
color: mt,
|
|
83
|
-
borderColor: ut
|
|
84
|
-
},
|
|
85
|
-
focus: {
|
|
86
|
-
backgroundColor: _t,
|
|
87
|
-
color: dt,
|
|
88
|
-
borderColor: ct
|
|
89
|
-
},
|
|
90
|
-
disabled: {
|
|
91
|
-
backgroundColor: lt,
|
|
92
|
-
color: it,
|
|
93
|
-
cursor: "not-allowed"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
danger: {
|
|
97
|
-
default: {
|
|
98
|
-
backgroundColor: he,
|
|
99
|
-
color: ge,
|
|
100
|
-
border: "none"
|
|
101
|
-
},
|
|
102
|
-
hover: {
|
|
103
|
-
backgroundColor: pe,
|
|
104
|
-
color: me
|
|
105
|
-
},
|
|
106
|
-
active: {
|
|
107
|
-
backgroundColor: ue,
|
|
108
|
-
color: _e
|
|
109
|
-
},
|
|
110
|
-
focus: {
|
|
111
|
-
backgroundColor: de,
|
|
112
|
-
color: ce
|
|
113
|
-
},
|
|
114
|
-
disabled: {
|
|
115
|
-
backgroundColor: le,
|
|
116
|
-
color: ie,
|
|
117
|
-
cursor: "not-allowed"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
setting: {
|
|
121
|
-
default: {
|
|
122
|
-
backgroundColor: at,
|
|
123
|
-
color: st,
|
|
124
|
-
border: "none"
|
|
125
|
-
},
|
|
126
|
-
hover: {
|
|
127
|
-
backgroundColor: nt,
|
|
128
|
-
color: rt
|
|
129
|
-
},
|
|
130
|
-
active: {
|
|
131
|
-
backgroundColor: ot,
|
|
132
|
-
color: tt
|
|
133
|
-
},
|
|
134
|
-
focus: {
|
|
135
|
-
backgroundColor: et,
|
|
136
|
-
color: Xe
|
|
137
|
-
},
|
|
138
|
-
disabled: {
|
|
139
|
-
backgroundColor: Qe,
|
|
140
|
-
color: qe,
|
|
141
|
-
cursor: "not-allowed"
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
warning: {
|
|
145
|
-
default: {
|
|
146
|
-
backgroundColor: he,
|
|
147
|
-
color: ge,
|
|
148
|
-
border: "none"
|
|
149
|
-
},
|
|
150
|
-
hover: {
|
|
151
|
-
backgroundColor: pe,
|
|
152
|
-
color: me
|
|
153
|
-
},
|
|
154
|
-
active: {
|
|
155
|
-
backgroundColor: ue,
|
|
156
|
-
color: _e
|
|
157
|
-
},
|
|
158
|
-
focus: {
|
|
159
|
-
backgroundColor: de,
|
|
160
|
-
color: ce
|
|
161
|
-
},
|
|
162
|
-
disabled: {
|
|
163
|
-
backgroundColor: le,
|
|
164
|
-
color: ie,
|
|
165
|
-
cursor: "not-allowed"
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}, lo = {
|
|
169
|
-
lg: {
|
|
170
|
-
height: "50px",
|
|
171
|
-
padding: "0 20px",
|
|
172
|
-
fontSize: "18px",
|
|
173
|
-
fontWeight: 700,
|
|
174
|
-
borderRadius: "6px",
|
|
175
|
-
lineHeight: "130%",
|
|
176
|
-
fontFamily: "Pretendard"
|
|
177
|
-
},
|
|
178
|
-
md: {
|
|
179
|
-
height: "40px",
|
|
180
|
-
padding: "0 16px",
|
|
181
|
-
fontSize: "16px",
|
|
182
|
-
fontWeight: 600,
|
|
183
|
-
borderRadius: "6px",
|
|
184
|
-
lineHeight: "130%",
|
|
185
|
-
fontFamily: "Pretendard"
|
|
186
|
-
},
|
|
187
|
-
sm: {
|
|
188
|
-
height: "30px",
|
|
189
|
-
padding: "0 12px",
|
|
190
|
-
fontSize: "14px",
|
|
191
|
-
fontWeight: 600,
|
|
192
|
-
borderRadius: "4px",
|
|
193
|
-
lineHeight: "130%",
|
|
194
|
-
fontFamily: "Pretendard"
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
function co(t, n) {
|
|
198
|
-
const o = io[t];
|
|
199
|
-
return {
|
|
200
|
-
root: {
|
|
201
|
-
...lo[n],
|
|
202
|
-
...o.default,
|
|
203
|
-
"&:hover:not(:disabled)": o.hover,
|
|
204
|
-
"&:active:not(:disabled)": o.active,
|
|
205
|
-
"&:focus:not(:disabled)": o.focus,
|
|
206
|
-
"&:disabled": o.disabled
|
|
207
|
-
}
|
|
8
|
+
import Xt from "dayjs/plugin/customParseFormat";
|
|
9
|
+
import { useSensors as qt, useSensor as Fe, PointerSensor as Qt, KeyboardSensor as er, DndContext as Qe, closestCenter as et } from "@dnd-kit/core";
|
|
10
|
+
import { useSortable as tt, defaultAnimateLayoutChanges as rt, sortableKeyboardCoordinates as tr, SortableContext as nt, rectSortingStrategy as ot } from "@dnd-kit/sortable";
|
|
11
|
+
import { Dropzone as rr, IMAGE_MIME_TYPE as $e } from "@mantine/dropzone";
|
|
12
|
+
import nr from "react-easy-crop";
|
|
13
|
+
import { CSS as at } from "@dnd-kit/utilities";
|
|
14
|
+
import or from "lottie-react";
|
|
15
|
+
import { notifications as he, Notifications as ar } from "@mantine/notifications";
|
|
16
|
+
const sr = {
|
|
17
|
+
sm: 14,
|
|
18
|
+
md: 16,
|
|
19
|
+
lg: 18
|
|
20
|
+
}, ir = "styles-module__Button___7ywU9", lr = "styles-module__Button__Inner___s7vuY", cr = "styles-module__Button__Label___xnZNh", _r = "styles-module__Button__Section___7GPRl", dr = "styles-module__Button__Loader___AZg1v", ur = "styles-module__Button__Disabled___NUWy8", j = {
|
|
21
|
+
Button: ir,
|
|
22
|
+
Button__Inner: lr,
|
|
23
|
+
Button__Label: cr,
|
|
24
|
+
Button__Section: _r,
|
|
25
|
+
Button__Loader: dr,
|
|
26
|
+
"Button--Small": "styles-module__Button--Small___9VzCE",
|
|
27
|
+
"Button--Medium": "styles-module__Button--Medium___35lhd",
|
|
28
|
+
"Button--Large": "styles-module__Button--Large___fbUio",
|
|
29
|
+
"Button--Primary": "styles-module__Button--Primary___1ZKgs",
|
|
30
|
+
Button__Disabled: ur,
|
|
31
|
+
"Button--PrimaryLine": "styles-module__Button--PrimaryLine___76iyF",
|
|
32
|
+
"Button--Basic": "styles-module__Button--Basic___sWKzj",
|
|
33
|
+
"Button--Warning": "styles-module__Button--Warning___8gZ6-",
|
|
34
|
+
"Button--Setting": "styles-module__Button--Setting___KNjZA",
|
|
35
|
+
"Button--Danger": "styles-module__Button--Danger___m9tbm",
|
|
36
|
+
"Button--Ghost": "styles-module__Button--Ghost___-zzS-"
|
|
37
|
+
}, Ce = {
|
|
38
|
+
inner: j.Button__Inner,
|
|
39
|
+
label: j.Button__Label,
|
|
40
|
+
section: j.Button__Section,
|
|
41
|
+
loader: j.Button__Loader
|
|
42
|
+
}, mr = {
|
|
43
|
+
sm: j["Button--Small"],
|
|
44
|
+
md: j["Button--Medium"],
|
|
45
|
+
lg: j["Button--Large"]
|
|
46
|
+
}, pr = {
|
|
47
|
+
primary: j["Button--Primary"],
|
|
48
|
+
primaryLine: j["Button--PrimaryLine"],
|
|
49
|
+
basic: j["Button--Basic"],
|
|
50
|
+
danger: j["Button--Danger"],
|
|
51
|
+
setting: j["Button--Setting"],
|
|
52
|
+
warning: j["Button--Warning"],
|
|
53
|
+
ghost: j["Button--Ghost"]
|
|
54
|
+
}, fr = (...e) => e.filter(Boolean).join(" ") || void 0, hr = (e) => {
|
|
55
|
+
const r = (n, t) => {
|
|
56
|
+
const o = Object.keys(n).reduce((s, a) => {
|
|
57
|
+
const i = a, c = [n[i], t[i]].filter(Boolean).join(" ");
|
|
58
|
+
return c && (s[i] = c), s;
|
|
59
|
+
}, {});
|
|
60
|
+
return Object.keys(t).forEach((s) => {
|
|
61
|
+
const a = s;
|
|
62
|
+
!(a in n) && t[a] && (o[a] = t[a]);
|
|
63
|
+
}), o;
|
|
208
64
|
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
65
|
+
return typeof e == "function" ? (n, t, o) => r(Ce, e(n, t, o)) : typeof e == "object" && e !== null && !Array.isArray(e) ? r(Ce, e) : Ce;
|
|
66
|
+
};
|
|
67
|
+
function me({
|
|
68
|
+
children: e,
|
|
69
|
+
size: r = "md",
|
|
70
|
+
variant: n = "primary",
|
|
71
|
+
type: t = "button",
|
|
72
|
+
isLoading: o = !1,
|
|
73
|
+
hideLabelOnLoading: s = !1,
|
|
74
|
+
disabled: a = !1,
|
|
75
|
+
className: i,
|
|
76
|
+
classNames: c,
|
|
77
|
+
loaderProps: p,
|
|
78
|
+
...m
|
|
217
79
|
}) {
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
), i = ao[o], c = R(() => {
|
|
222
|
-
switch (n) {
|
|
223
|
-
case "lg":
|
|
224
|
-
return 18;
|
|
225
|
-
case "sm":
|
|
226
|
-
return 14;
|
|
227
|
-
case "md":
|
|
228
|
-
default:
|
|
229
|
-
return 16;
|
|
230
|
-
}
|
|
231
|
-
}, [n]);
|
|
232
|
-
return /* @__PURE__ */ l(
|
|
233
|
-
Oe,
|
|
80
|
+
const _ = sr[r], d = o, u = a || d;
|
|
81
|
+
return /* @__PURE__ */ x(
|
|
82
|
+
kt,
|
|
234
83
|
{
|
|
235
|
-
type:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
84
|
+
type: t,
|
|
85
|
+
unstyled: !0,
|
|
86
|
+
className: fr(
|
|
87
|
+
j.Button,
|
|
88
|
+
a ? j.Button__Disabled : "",
|
|
89
|
+
mr[r],
|
|
90
|
+
pr[n],
|
|
91
|
+
i
|
|
92
|
+
),
|
|
93
|
+
classNames: hr(c),
|
|
94
|
+
disabled: u,
|
|
95
|
+
...m,
|
|
96
|
+
children: [
|
|
97
|
+
d && /* @__PURE__ */ l(Ge, { color: "currentColor", size: _, ...p }),
|
|
98
|
+
/* @__PURE__ */ l("span", { className: j.Button__Label, children: d && s ? null : e })
|
|
99
|
+
]
|
|
240
100
|
}
|
|
241
101
|
);
|
|
242
102
|
}
|
|
243
|
-
const
|
|
103
|
+
const De = {
|
|
244
104
|
"Checkbox--Small": "styles-module__Checkbox--Small___VZGlw",
|
|
245
105
|
"Checkbox--Medium": "styles-module__Checkbox--Medium___Vwpa3",
|
|
246
106
|
"Checkbox--Large": "styles-module__Checkbox--Large___ybTGE"
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
107
|
+
}, gr = {
|
|
108
|
+
sm: De["Checkbox--Small"],
|
|
109
|
+
md: De["Checkbox--Medium"],
|
|
110
|
+
lg: De["Checkbox--Large"]
|
|
111
|
+
}, yr = {
|
|
112
|
+
sm: 18,
|
|
113
|
+
md: 24,
|
|
114
|
+
lg: 32
|
|
115
|
+
}, ia = ({ size: e = "md", ...r }) => {
|
|
116
|
+
const n = gr[e], t = yr[e];
|
|
117
|
+
return /* @__PURE__ */ l(
|
|
118
|
+
Ct,
|
|
251
119
|
{
|
|
252
|
-
className:
|
|
120
|
+
className: n,
|
|
121
|
+
size: e,
|
|
253
122
|
styles: {
|
|
254
123
|
inner: {
|
|
255
|
-
width:
|
|
256
|
-
height:
|
|
124
|
+
width: t,
|
|
125
|
+
height: t
|
|
257
126
|
}
|
|
258
127
|
},
|
|
259
|
-
...
|
|
128
|
+
...r
|
|
260
129
|
}
|
|
261
130
|
);
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
131
|
+
}, kr = "styles-module__CalendarDatePicker__Wrapper___n4ux3", Cr = "styles-module__CalendarDatePicker__DayContent___2xr8Q", Dr = "styles-module__CalendarDatePicker__DayLabel___-4E1W", xr = "styles-module__CalendarDatePicker__TodayIndicator___ij6hs", Pr = "styles-module__CalendarDatePicker__Day___eYyiw", Mr = "styles-module__CalendarDatePicker__Header___hGYbK", br = "styles-module__CalendarDatePicker__HeaderLevel___yuhOQ", Sr = "styles-module__CalendarDatePicker__HeaderControl___gz5tC", Tr = "styles-module__CalendarDatePicker__HeaderControlIcon___OVuQp", wr = "styles-module__CalendarDatePicker__Month___8-Nvy", Ir = "styles-module__CalendarDatePicker__MonthRow___PihZV", Lr = "styles-module__CalendarDatePicker__MonthCell___bEPui", Br = "styles-module__CalendarDatePicker__WeekdaysRow___lbdgy", vr = "styles-module__CalendarDatePicker__Weekday___-Seq9", G = {
|
|
132
|
+
CalendarDatePicker__Wrapper: kr,
|
|
133
|
+
CalendarDatePicker__DayContent: Cr,
|
|
134
|
+
CalendarDatePicker__DayLabel: Dr,
|
|
135
|
+
CalendarDatePicker__TodayIndicator: xr,
|
|
136
|
+
CalendarDatePicker__Day: Pr,
|
|
137
|
+
CalendarDatePicker__Header: Mr,
|
|
138
|
+
CalendarDatePicker__HeaderLevel: br,
|
|
139
|
+
CalendarDatePicker__HeaderControl: Sr,
|
|
140
|
+
CalendarDatePicker__HeaderControlIcon: Tr,
|
|
141
|
+
CalendarDatePicker__Month: wr,
|
|
142
|
+
CalendarDatePicker__MonthRow: Ir,
|
|
143
|
+
CalendarDatePicker__MonthCell: Lr,
|
|
144
|
+
CalendarDatePicker__WeekdaysRow: Br,
|
|
145
|
+
CalendarDatePicker__Weekday: vr
|
|
146
|
+
}, Er = ({
|
|
147
|
+
excludedDays: e = [],
|
|
148
|
+
excludedDates: r = []
|
|
275
149
|
}) => {
|
|
276
|
-
const
|
|
277
|
-
for (const
|
|
278
|
-
typeof
|
|
279
|
-
const
|
|
280
|
-
return (
|
|
281
|
-
const i =
|
|
150
|
+
const n = [], t = [];
|
|
151
|
+
for (const a of r)
|
|
152
|
+
typeof a == "string" ? n.push(a) : t.push(a);
|
|
153
|
+
const o = n.map((a) => H(a)).filter((a) => a.isValid()).map((a) => a.format("YYYY-MM-DD")), s = t.map(([a, i]) => [H(a), H(i)]).filter(([a, i]) => a.isValid() && i.isValid());
|
|
154
|
+
return (a) => {
|
|
155
|
+
const i = H(a);
|
|
282
156
|
if (!i.isValid()) return !1;
|
|
283
|
-
if (Array.isArray(
|
|
157
|
+
if (Array.isArray(e) && e.includes(i.day()) || o.includes(i.format("YYYY-MM-DD")))
|
|
284
158
|
return !0;
|
|
285
|
-
for (const [c, p] of
|
|
159
|
+
for (const [c, p] of s)
|
|
286
160
|
if ((i.isSame(c, "day") || i.isAfter(c, "day")) && (i.isSame(p, "day") || i.isBefore(p, "day")))
|
|
287
161
|
return !0;
|
|
288
162
|
return !1;
|
|
289
163
|
};
|
|
290
|
-
},
|
|
291
|
-
const
|
|
292
|
-
for (const
|
|
293
|
-
if (Array.isArray(
|
|
294
|
-
const i =
|
|
164
|
+
}, Ar = (e, r, n, t) => {
|
|
165
|
+
const o = H(e), s = H(r);
|
|
166
|
+
for (const a of n)
|
|
167
|
+
if (Array.isArray(a)) {
|
|
168
|
+
const i = H(a[0]), c = H(a[1]);
|
|
295
169
|
if (!i.isValid() || !c.isValid()) continue;
|
|
296
|
-
if (!(
|
|
170
|
+
if (!(s.isBefore(i, "day") || o.isAfter(c, "day")))
|
|
297
171
|
return !0;
|
|
298
172
|
}
|
|
299
|
-
for (const
|
|
300
|
-
if (typeof
|
|
301
|
-
const i =
|
|
173
|
+
for (const a of n)
|
|
174
|
+
if (typeof a == "string") {
|
|
175
|
+
const i = H(a);
|
|
302
176
|
if (!i.isValid()) continue;
|
|
303
|
-
if ((i.isSame(
|
|
177
|
+
if ((i.isSame(o, "day") || i.isAfter(o, "day")) && (i.isSame(s, "day") || i.isBefore(s, "day")))
|
|
304
178
|
return !0;
|
|
305
179
|
}
|
|
306
|
-
if (
|
|
307
|
-
let
|
|
308
|
-
for (;
|
|
309
|
-
if (
|
|
180
|
+
if (t.length > 0) {
|
|
181
|
+
let a = o;
|
|
182
|
+
for (; a.isBefore(s, "day") || a.isSame(s, "day"); ) {
|
|
183
|
+
if (t.includes(a.day()))
|
|
310
184
|
return !0;
|
|
311
|
-
|
|
185
|
+
a = a.add(1, "day");
|
|
312
186
|
}
|
|
313
187
|
}
|
|
314
188
|
return !1;
|
|
315
|
-
},
|
|
316
|
-
switch (
|
|
189
|
+
}, ne = (e = "default") => {
|
|
190
|
+
switch (e) {
|
|
317
191
|
case "range":
|
|
318
192
|
return [null, null];
|
|
319
193
|
case "multiple":
|
|
@@ -321,131 +195,348 @@ const J = {
|
|
|
321
195
|
default:
|
|
322
196
|
return null;
|
|
323
197
|
}
|
|
324
|
-
},
|
|
325
|
-
type:
|
|
326
|
-
externalValue:
|
|
327
|
-
internalValue:
|
|
328
|
-
}) =>
|
|
329
|
-
const
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
198
|
+
}, Re = (e = "default", r) => r == null ? ne(e) : e === "range" ? Array.isArray(r) ? r : ne("range") : e === "multiple" ? Array.isArray(r) ? r : ne("multiple") : Array.isArray(r) ? r[0] ?? null : r, st = ({
|
|
199
|
+
type: e,
|
|
200
|
+
externalValue: r,
|
|
201
|
+
internalValue: n
|
|
202
|
+
}) => r !== void 0 ? Re(e, r) : n !== void 0 ? Re(e, n) : ne(e), we = (e, r) => {
|
|
203
|
+
const n = (t, o) => {
|
|
204
|
+
const s = Object.keys(t).reduce(
|
|
205
|
+
(a, i) => {
|
|
206
|
+
const c = i, p = t[c], m = o[c], _ = [p, m].filter(Boolean).join(" ");
|
|
207
|
+
return _ && (a[c] = _), a;
|
|
208
|
+
},
|
|
209
|
+
{}
|
|
210
|
+
);
|
|
211
|
+
return Object.keys(o).forEach((a) => {
|
|
212
|
+
const i = a, c = o[i];
|
|
213
|
+
!(i in t) && c && (s[i] = c);
|
|
214
|
+
}), s;
|
|
338
215
|
};
|
|
339
|
-
return typeof
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
216
|
+
return typeof r == "function" ? (t, o, s) => n(e, r(t, o, s)) : typeof r == "object" && r !== null && !Array.isArray(r) ? n(e, r) : e;
|
|
217
|
+
}, Nr = (e) => {
|
|
218
|
+
if (e == null)
|
|
219
|
+
return null;
|
|
220
|
+
if (Array.isArray(e)) {
|
|
221
|
+
for (let r = e.length - 1; r >= 0; r -= 1) {
|
|
222
|
+
const n = e[r];
|
|
223
|
+
if (n instanceof Date)
|
|
224
|
+
return H(n).format("YYYY-MM-DD");
|
|
225
|
+
}
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return e instanceof Date ? H(e).format("YYYY-MM-DD") : null;
|
|
229
|
+
}, Fr = {
|
|
230
|
+
levelsGroup: G.CalendarDatePicker__Wrapper,
|
|
231
|
+
calendarHeader: G.CalendarDatePicker__Header,
|
|
232
|
+
calendarHeaderLevel: G.CalendarDatePicker__HeaderLevel,
|
|
233
|
+
calendarHeaderControl: G.CalendarDatePicker__HeaderControl,
|
|
234
|
+
calendarHeaderControlIcon: G.CalendarDatePicker__HeaderControlIcon,
|
|
235
|
+
month: G.CalendarDatePicker__Month,
|
|
236
|
+
monthCell: G.CalendarDatePicker__MonthCell,
|
|
237
|
+
day: G.CalendarDatePicker__Day,
|
|
238
|
+
monthRow: G.CalendarDatePicker__MonthRow,
|
|
239
|
+
weekdaysRow: G.CalendarDatePicker__WeekdaysRow,
|
|
240
|
+
weekday: G.CalendarDatePicker__Weekday
|
|
241
|
+
}, $r = ({
|
|
242
|
+
excludedDates: e = [],
|
|
243
|
+
excludedDays: r = [],
|
|
244
|
+
type: n = "default",
|
|
245
|
+
value: t,
|
|
246
|
+
onChange: o,
|
|
247
|
+
highlightToday: s = !1,
|
|
248
|
+
...a
|
|
357
249
|
}) => {
|
|
358
|
-
const
|
|
359
|
-
() =>
|
|
360
|
-
), p =
|
|
361
|
-
() =>
|
|
362
|
-
excludedDays:
|
|
363
|
-
excludedDates:
|
|
250
|
+
const { classNames: i, date: c, defaultDate: p, onDateChange: m, getDayProps: _, ...d } = a, [u, f] = L(
|
|
251
|
+
() => t ?? ne(n)
|
|
252
|
+
), [h, y] = L(() => c || p || (Nr(t ?? ne(n)) ?? /* @__PURE__ */ new Date())), g = Le(
|
|
253
|
+
() => Er({
|
|
254
|
+
excludedDays: r,
|
|
255
|
+
excludedDates: e
|
|
364
256
|
}),
|
|
365
|
-
[
|
|
366
|
-
),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
257
|
+
[r, e]
|
|
258
|
+
), k = Y(
|
|
259
|
+
(C) => {
|
|
260
|
+
c === void 0 && y(C), m?.(C);
|
|
261
|
+
},
|
|
262
|
+
[c, m]
|
|
263
|
+
), P = (C) => {
|
|
264
|
+
if (n === "range" && Array.isArray(C) && C.length === 2) {
|
|
265
|
+
const [E, A] = C;
|
|
266
|
+
if (E && A && Ar(E, A, e, r)) {
|
|
267
|
+
const S = ne("range");
|
|
268
|
+
f(S), o?.(S);
|
|
372
269
|
return;
|
|
373
270
|
}
|
|
374
271
|
}
|
|
375
|
-
|
|
376
|
-
},
|
|
377
|
-
type:
|
|
378
|
-
externalValue:
|
|
379
|
-
internalValue:
|
|
380
|
-
}),
|
|
381
|
-
(
|
|
382
|
-
const
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
|
|
385
|
-
|
|
272
|
+
f(C), o?.(C);
|
|
273
|
+
}, O = st({
|
|
274
|
+
type: n,
|
|
275
|
+
externalValue: t,
|
|
276
|
+
internalValue: u
|
|
277
|
+
}), N = Y(
|
|
278
|
+
(C) => {
|
|
279
|
+
const E = H(C).date(), S = H(C).isSame(H(), "day") && s;
|
|
280
|
+
return /* @__PURE__ */ x("span", { className: G.CalendarDatePicker__DayContent, children: [
|
|
281
|
+
/* @__PURE__ */ l("span", { className: G.CalendarDatePicker__DayLabel, children: E }),
|
|
282
|
+
S && /* @__PURE__ */ l("span", { className: G.CalendarDatePicker__TodayIndicator, children: "오늘" })
|
|
386
283
|
] });
|
|
387
284
|
},
|
|
388
|
-
[
|
|
389
|
-
),
|
|
285
|
+
[s]
|
|
286
|
+
), W = we(Fr, i), z = c ?? h, B = H(z ?? /* @__PURE__ */ new Date()).format("YYYY-MM"), M = Y(
|
|
287
|
+
(C) => {
|
|
288
|
+
const E = _?.(C) ?? {}, A = H(C).format("YYYY-MM") !== B;
|
|
289
|
+
return {
|
|
290
|
+
...E,
|
|
291
|
+
onClick: (S) => {
|
|
292
|
+
E.onClick?.(S), A && k(C);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
[B, _, k]
|
|
297
|
+
);
|
|
390
298
|
return /* @__PURE__ */ l(
|
|
391
|
-
|
|
299
|
+
Et,
|
|
392
300
|
{
|
|
393
301
|
locale: "ko",
|
|
394
302
|
firstDayOfWeek: 0,
|
|
395
303
|
monthLabelFormat: "YYYY년 M월",
|
|
396
304
|
maxLevel: "month",
|
|
397
|
-
type:
|
|
398
|
-
previousIcon: /* @__PURE__ */ l(
|
|
399
|
-
nextIcon: /* @__PURE__ */ l(
|
|
400
|
-
...
|
|
305
|
+
type: n,
|
|
306
|
+
previousIcon: /* @__PURE__ */ l(Je, {}),
|
|
307
|
+
nextIcon: /* @__PURE__ */ l(Ke, {}),
|
|
308
|
+
...d,
|
|
401
309
|
size: "lg",
|
|
402
|
-
onChange:
|
|
310
|
+
onChange: P,
|
|
403
311
|
weekendDays: [0],
|
|
404
|
-
highlightToday:
|
|
405
|
-
classNames:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
312
|
+
highlightToday: s,
|
|
313
|
+
classNames: W,
|
|
314
|
+
defaultDate: c === void 0 ? p : void 0,
|
|
315
|
+
date: z,
|
|
316
|
+
onDateChange: k,
|
|
317
|
+
getDayProps: M,
|
|
318
|
+
value: O,
|
|
319
|
+
excludeDate: g,
|
|
320
|
+
renderDay: N
|
|
409
321
|
}
|
|
410
322
|
);
|
|
411
|
-
},
|
|
323
|
+
}, Rr = "styles-module__DatePickerBase___yJlGe", Or = "styles-module__DatePickerRoot___HG6Zb", zr = "styles-module__DatePicker__Wrapper___7X5ke", Hr = "styles-module__DatePicker__Input___sTaqF", Yr = "styles-module__DatePicker__Placeholder___PZnzX", Wr = "styles-module__DatePicker__Section___waCJM", Zr = "styles-module__DatePicker__Icon___fceRx", jr = "styles-module__DatePicker__Dropdown___Iy9KE", Ur = "styles-module__DatePicker__DropdownArrow___zeIIm", Vr = "styles-module__DatePicker__Root___2Q8qm", Gr = "styles-module__DatePicker__LevelsGroup___lrWsl", Kr = "styles-module__DatePicker__CalendarHeader___VI-Of", Jr = "styles-module__DatePicker__CalendarHeaderLevel___F4DtE", Xr = "styles-module__DatePicker__CalendarHeaderControl___72yIl", qr = "styles-module__DatePicker__CalendarHeaderControlIcon___CnQei", Qr = "styles-module__DatePicker__Month___W7LuG", en = "styles-module__DatePicker__WeekdaysRow___4NdYk", tn = "styles-module__DatePicker__Weekday___tL-rR", rn = "styles-module__DatePicker__MonthRow___NSs67", nn = "styles-module__DatePicker__MonthCell___iGYhy", on = "styles-module__DatePicker__Day___7LDrl", an = "styles-module__DatePicker__TimeWrapper___BlHZZ", sn = "styles-module__DatePicker__TimeInput___Acg-L", ln = "styles-module__DatePicker__SubmitButton___6DvfS", b = {
|
|
324
|
+
DatePickerBase: Rr,
|
|
325
|
+
DatePickerRoot: Or,
|
|
412
326
|
"DatePicker--Small": "styles-module__DatePicker--Small___m8asv",
|
|
413
327
|
"DatePicker--Medium": "styles-module__DatePicker--Medium___Po2-B",
|
|
414
|
-
"DatePicker--Large": "styles-module__DatePicker--Large___oQ6EM"
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
328
|
+
"DatePicker--Large": "styles-module__DatePicker--Large___oQ6EM",
|
|
329
|
+
DatePicker__Wrapper: zr,
|
|
330
|
+
DatePicker__Input: Hr,
|
|
331
|
+
DatePicker__Placeholder: Yr,
|
|
332
|
+
DatePicker__Section: Wr,
|
|
333
|
+
DatePicker__Icon: Zr,
|
|
334
|
+
DatePicker__Dropdown: jr,
|
|
335
|
+
DatePicker__DropdownArrow: Ur,
|
|
336
|
+
DatePicker__Root: Vr,
|
|
337
|
+
DatePicker__LevelsGroup: Gr,
|
|
338
|
+
DatePicker__CalendarHeader: Kr,
|
|
339
|
+
DatePicker__CalendarHeaderLevel: Jr,
|
|
340
|
+
DatePicker__CalendarHeaderControl: Xr,
|
|
341
|
+
DatePicker__CalendarHeaderControlIcon: qr,
|
|
342
|
+
DatePicker__Month: Qr,
|
|
343
|
+
DatePicker__WeekdaysRow: en,
|
|
344
|
+
DatePicker__Weekday: tn,
|
|
345
|
+
DatePicker__MonthRow: rn,
|
|
346
|
+
DatePicker__MonthCell: nn,
|
|
347
|
+
DatePicker__Day: on,
|
|
348
|
+
DatePicker__TimeWrapper: an,
|
|
349
|
+
DatePicker__TimeInput: sn,
|
|
350
|
+
DatePicker__SubmitButton: ln
|
|
351
|
+
};
|
|
352
|
+
H.extend(Xt);
|
|
353
|
+
const cn = {
|
|
354
|
+
wrapper: b.DatePicker__Wrapper,
|
|
355
|
+
input: b.DatePicker__Input,
|
|
356
|
+
section: b.DatePicker__Section,
|
|
357
|
+
placeholder: b.DatePicker__Placeholder,
|
|
358
|
+
datePickerRoot: b.DatePicker__Root,
|
|
359
|
+
levelsGroup: b.DatePicker__LevelsGroup,
|
|
360
|
+
calendarHeader: b.DatePicker__CalendarHeader,
|
|
361
|
+
calendarHeaderLevel: b.DatePicker__CalendarHeaderLevel,
|
|
362
|
+
calendarHeaderControl: b.DatePicker__CalendarHeaderControl,
|
|
363
|
+
calendarHeaderControlIcon: b.DatePicker__CalendarHeaderControlIcon,
|
|
364
|
+
month: b.DatePicker__Month,
|
|
365
|
+
weekdaysRow: b.DatePicker__WeekdaysRow,
|
|
366
|
+
weekday: b.DatePicker__Weekday,
|
|
367
|
+
monthRow: b.DatePicker__MonthRow,
|
|
368
|
+
monthCell: b.DatePicker__MonthCell,
|
|
369
|
+
day: b.DatePicker__Day,
|
|
370
|
+
timeWrapper: b.DatePicker__TimeWrapper,
|
|
371
|
+
timeInput: b.DatePicker__TimeInput,
|
|
372
|
+
submitButton: b.DatePicker__SubmitButton
|
|
373
|
+
}, _n = {
|
|
374
|
+
dropdown: b.DatePicker__Dropdown,
|
|
375
|
+
arrow: b.DatePicker__DropdownArrow
|
|
376
|
+
}, Oe = (...e) => e.filter(Boolean).join(" ") || void 0, _e = (e) => {
|
|
377
|
+
if (e == null) return null;
|
|
378
|
+
if (e instanceof Date) return e;
|
|
379
|
+
if (typeof e == "string" && e) {
|
|
380
|
+
const r = e.split("-").map(Number);
|
|
381
|
+
if (r.length === 3 && r[0] && r[1] && r[2])
|
|
382
|
+
return new Date(r[0], r[1] - 1, r[2]);
|
|
383
|
+
}
|
|
384
|
+
return null;
|
|
385
|
+
}, la = ({
|
|
386
|
+
size: e = "md",
|
|
387
|
+
type: r = "default",
|
|
388
|
+
withTime: n,
|
|
389
|
+
className: t,
|
|
390
|
+
popoverProps: o,
|
|
391
|
+
rightSection: s,
|
|
392
|
+
rightSectionWidth: a,
|
|
393
|
+
value: i,
|
|
394
|
+
defaultValue: c,
|
|
395
|
+
onChange: p,
|
|
396
|
+
placeholder: m,
|
|
397
|
+
disabled: _,
|
|
398
|
+
minDate: d,
|
|
399
|
+
maxDate: u,
|
|
400
|
+
displayValueFormat: f = "YYYY년 MM월 DD일",
|
|
401
|
+
valueFormat: h,
|
|
402
|
+
excludedDates: y,
|
|
403
|
+
excludedDays: g,
|
|
404
|
+
highlightToday: k
|
|
420
405
|
}) => {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
406
|
+
const P = h ?? (n ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD"), [O, N] = L(!1), [W, z] = L(
|
|
407
|
+
() => Ne(i ?? c, r, P) ?? ne(r)
|
|
408
|
+
);
|
|
409
|
+
let B = b["DatePicker--Medium"], M = 18, C = 42;
|
|
410
|
+
e === "sm" ? (B = b["DatePicker--Small"], M = 14, C = 34) : e === "lg" && (B = b["DatePicker--Large"], M = 24, C = 50);
|
|
411
|
+
const E = we(
|
|
412
|
+
_n,
|
|
413
|
+
o?.classNames
|
|
414
|
+
), A = s ?? /* @__PURE__ */ l("span", { "aria-hidden": "true", className: b.DatePicker__Icon, children: /* @__PURE__ */ l($t, { size: M }) });
|
|
415
|
+
if (n) {
|
|
416
|
+
const T = (D) => {
|
|
417
|
+
if (!D) return null;
|
|
418
|
+
const F = H(D, P, !0);
|
|
419
|
+
return F.isValid() ? F.toDate() : null;
|
|
420
|
+
}, R = i !== void 0, U = R ? T(i) : null, I = T(c);
|
|
421
|
+
return /* @__PURE__ */ l(
|
|
422
|
+
At,
|
|
423
|
+
{
|
|
424
|
+
className: Oe(
|
|
425
|
+
b.DatePickerBase,
|
|
426
|
+
b.DatePickerRoot,
|
|
427
|
+
B,
|
|
428
|
+
t
|
|
429
|
+
),
|
|
430
|
+
classNames: we(
|
|
431
|
+
cn,
|
|
432
|
+
void 0
|
|
433
|
+
),
|
|
434
|
+
size: e,
|
|
435
|
+
locale: "ko",
|
|
436
|
+
firstDayOfWeek: 0,
|
|
437
|
+
monthLabelFormat: "YYYY년 MM월",
|
|
438
|
+
valueFormat: "YYYY-MM-DD | a hh:mm",
|
|
439
|
+
rightSection: A,
|
|
440
|
+
rightSectionWidth: a ?? C,
|
|
441
|
+
popoverProps: {
|
|
442
|
+
offset: 8,
|
|
443
|
+
position: "bottom-start",
|
|
444
|
+
withArrow: !0,
|
|
445
|
+
arrowSize: 10,
|
|
446
|
+
arrowOffset: 20,
|
|
447
|
+
...o,
|
|
448
|
+
classNames: E
|
|
449
|
+
},
|
|
450
|
+
value: R ? U : void 0,
|
|
451
|
+
defaultValue: R ? void 0 : I,
|
|
452
|
+
onChange: (D) => {
|
|
453
|
+
p?.(D ? H(D).format(P) : null);
|
|
454
|
+
},
|
|
455
|
+
placeholder: m,
|
|
456
|
+
disabled: _,
|
|
457
|
+
minDate: d,
|
|
458
|
+
maxDate: u
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
const S = i != null ? Ne(i, r, P) : void 0, v = st({
|
|
463
|
+
type: r,
|
|
464
|
+
externalValue: S,
|
|
465
|
+
internalValue: W
|
|
466
|
+
}), $ = Ft(
|
|
467
|
+
v,
|
|
468
|
+
r,
|
|
469
|
+
f
|
|
470
|
+
), w = (T) => {
|
|
471
|
+
let R;
|
|
472
|
+
if (r === "range" && Array.isArray(T)) {
|
|
473
|
+
const U = T;
|
|
474
|
+
R = [_e(U[0] ?? null), _e(U[1] ?? null)];
|
|
475
|
+
} else r === "multiple" && Array.isArray(T) ? R = T.map((U) => _e(U)).filter((U) => U !== null) : R = _e(T);
|
|
476
|
+
z(R), p?.(Rt(R, r, P)), r === "default" && R != null && N(!1), r === "range" && Array.isArray(R) && R[0] && R[1] && N(!1);
|
|
477
|
+
};
|
|
478
|
+
return /* @__PURE__ */ l(
|
|
479
|
+
"div",
|
|
436
480
|
{
|
|
437
|
-
className:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
481
|
+
className: Oe(b.DatePickerBase, b.DatePickerRoot, B, t),
|
|
482
|
+
children: /* @__PURE__ */ x(
|
|
483
|
+
ke,
|
|
484
|
+
{
|
|
485
|
+
opened: O,
|
|
486
|
+
onClose: () => N(!1),
|
|
487
|
+
offset: 8,
|
|
488
|
+
position: "bottom-start",
|
|
489
|
+
withArrow: !0,
|
|
490
|
+
arrowSize: 10,
|
|
491
|
+
arrowOffset: 20,
|
|
492
|
+
...o,
|
|
493
|
+
classNames: E,
|
|
494
|
+
children: [
|
|
495
|
+
/* @__PURE__ */ l(ke.Target, { children: /* @__PURE__ */ l(
|
|
496
|
+
"div",
|
|
497
|
+
{
|
|
498
|
+
className: b.DatePicker__Wrapper,
|
|
499
|
+
"data-expanded": O ? !0 : void 0,
|
|
500
|
+
"data-disabled": _ ? !0 : void 0,
|
|
501
|
+
children: /* @__PURE__ */ l(
|
|
502
|
+
J,
|
|
503
|
+
{
|
|
504
|
+
component: "button",
|
|
505
|
+
type: "button",
|
|
506
|
+
classNames: {
|
|
507
|
+
input: b.DatePicker__Input,
|
|
508
|
+
section: b.DatePicker__Section
|
|
509
|
+
},
|
|
510
|
+
onClick: () => !_ && N((T) => !T),
|
|
511
|
+
disabled: _,
|
|
512
|
+
rightSection: A,
|
|
513
|
+
rightSectionWidth: a ?? C,
|
|
514
|
+
"data-expanded": O ? !0 : void 0,
|
|
515
|
+
"data-disabled": _ ? !0 : void 0,
|
|
516
|
+
children: $ ? /* @__PURE__ */ l("span", { children: $ }) : /* @__PURE__ */ l("span", { className: b.DatePicker__Placeholder, children: m })
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
}
|
|
520
|
+
) }),
|
|
521
|
+
/* @__PURE__ */ l(ke.Dropdown, { children: /* @__PURE__ */ l(
|
|
522
|
+
$r,
|
|
523
|
+
{
|
|
524
|
+
type: r,
|
|
525
|
+
value: v,
|
|
526
|
+
onChange: w,
|
|
527
|
+
excludedDates: y,
|
|
528
|
+
excludedDays: g,
|
|
529
|
+
highlightToday: k,
|
|
530
|
+
minDate: d,
|
|
531
|
+
maxDate: u
|
|
532
|
+
}
|
|
533
|
+
) })
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
)
|
|
446
537
|
}
|
|
447
538
|
);
|
|
448
|
-
},
|
|
539
|
+
}, dn = "styles-module__Dropdown__Description___OQ8bF", un = "styles-module__Dropdown__ErrorMsg___xTP0Y", K = {
|
|
449
540
|
"Dropdown--LeftLabel": "styles-module__Dropdown--LeftLabel___SFObq",
|
|
450
541
|
"Dropdown--TopLabel": "styles-module__Dropdown--TopLabel___-lPhr",
|
|
451
542
|
"Dropdown__Label--Small": "styles-module__Dropdown__Label--Small___xbzOR",
|
|
@@ -457,41 +548,41 @@ const J = {
|
|
|
457
548
|
"Dropdown--Small": "styles-module__Dropdown--Small___dRIK7",
|
|
458
549
|
"Dropdown--Medium": "styles-module__Dropdown--Medium___-HZoU",
|
|
459
550
|
"Dropdown--Large": "styles-module__Dropdown--Large___BvV3M",
|
|
460
|
-
Dropdown__Description:
|
|
461
|
-
Dropdown__ErrorMsg:
|
|
462
|
-
},
|
|
463
|
-
label:
|
|
464
|
-
labelPosition:
|
|
465
|
-
size:
|
|
466
|
-
required:
|
|
467
|
-
tooltip:
|
|
468
|
-
tooltipPosition:
|
|
469
|
-
errorMsg:
|
|
551
|
+
Dropdown__Description: dn,
|
|
552
|
+
Dropdown__ErrorMsg: un
|
|
553
|
+
}, ca = ({
|
|
554
|
+
label: e,
|
|
555
|
+
labelPosition: r = "top",
|
|
556
|
+
size: n = "md",
|
|
557
|
+
required: t,
|
|
558
|
+
tooltip: o,
|
|
559
|
+
tooltipPosition: s = "top",
|
|
560
|
+
errorMsg: a,
|
|
470
561
|
description: i,
|
|
471
562
|
...c
|
|
472
563
|
}) => {
|
|
473
|
-
const [p,
|
|
474
|
-
let
|
|
475
|
-
return
|
|
564
|
+
const [p, m] = L(!1);
|
|
565
|
+
let _ = K["Dropdown__Label--Medium"], d = K["Dropdown--Medium"], u = K["Dropdown__Tooltip--Medium"], f = 18;
|
|
566
|
+
return n === "sm" ? (_ = K["Dropdown__Label--Small"], d = K["Dropdown--Small"], u = K["Dropdown__Tooltip--Small"], f = 14) : n === "lg" && (_ = K["Dropdown__Label--Large"], d = K["Dropdown--Large"], u = K["Dropdown__Tooltip--Large"], f = 24), /* @__PURE__ */ x(
|
|
476
567
|
"div",
|
|
477
568
|
{
|
|
478
|
-
className:
|
|
569
|
+
className: r === "top" ? K["Dropdown--TopLabel"] : K["Dropdown--LeftLabel"],
|
|
479
570
|
children: [
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
|
|
482
|
-
|
|
571
|
+
/* @__PURE__ */ x("div", { children: [
|
|
572
|
+
e && /* @__PURE__ */ l(J.Label, { required: t, className: _, children: e }),
|
|
573
|
+
o && /* @__PURE__ */ l(fe, { label: o, position: s, children: /* @__PURE__ */ l("div", { className: u, children: /* @__PURE__ */ l(Ee, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16 }) }) })
|
|
483
574
|
] }),
|
|
484
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ x("div", { children: [
|
|
485
576
|
/* @__PURE__ */ l(
|
|
486
|
-
|
|
577
|
+
Dt,
|
|
487
578
|
{
|
|
488
579
|
...c,
|
|
489
|
-
size:
|
|
490
|
-
error:
|
|
491
|
-
className:
|
|
492
|
-
rightSection: p ? /* @__PURE__ */ l(
|
|
493
|
-
onDropdownOpen: () =>
|
|
494
|
-
onDropdownClose: () =>
|
|
580
|
+
size: n,
|
|
581
|
+
error: a,
|
|
582
|
+
className: d,
|
|
583
|
+
rightSection: p ? /* @__PURE__ */ l(Ot, { size: f }) : /* @__PURE__ */ l(zt, { size: f }),
|
|
584
|
+
onDropdownOpen: () => m(!0),
|
|
585
|
+
onDropdownClose: () => m(!1),
|
|
495
586
|
styles: {
|
|
496
587
|
option: {
|
|
497
588
|
"&[data-selected]": {
|
|
@@ -504,113 +595,994 @@ const J = {
|
|
|
504
595
|
}
|
|
505
596
|
}
|
|
506
597
|
),
|
|
507
|
-
i && /* @__PURE__ */ l(
|
|
508
|
-
|
|
598
|
+
i && /* @__PURE__ */ l(J.Description, { className: K.Dropdown__Description, children: i }),
|
|
599
|
+
a && /* @__PURE__ */ l(J.Error, { className: K.Dropdown__ErrorMsg, children: a })
|
|
509
600
|
] })
|
|
510
601
|
]
|
|
511
602
|
}
|
|
512
603
|
);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
604
|
+
};
|
|
605
|
+
function ge() {
|
|
606
|
+
return crypto.randomUUID();
|
|
607
|
+
}
|
|
608
|
+
function mn(e, r, n) {
|
|
609
|
+
const t = [...e], [o] = t.splice(r, 1);
|
|
610
|
+
return t.splice(n, 0, o), t;
|
|
611
|
+
}
|
|
612
|
+
function pn(e, r, n) {
|
|
613
|
+
return n != null && e.length >= n ? 0 : r != null && e.length < r ? r - e.length : 1;
|
|
614
|
+
}
|
|
615
|
+
function fn(e, r, n) {
|
|
616
|
+
return e.map((t) => {
|
|
617
|
+
const o = t.position;
|
|
618
|
+
return o == null ? t : o === r ? { ...t, position: n } : r < n && o > r && o <= n ? { ...t, position: o - 1 } : r > n && o >= n && o < r ? { ...t, position: o + 1 } : t;
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
function hn(e, r, n) {
|
|
622
|
+
const t = [...r].sort((i, c) => i.name.localeCompare(c.name)), o = n != null ? n - e.length : 1 / 0, a = t.slice(0, o).map((i) => ({
|
|
623
|
+
id: ge(),
|
|
624
|
+
file: i,
|
|
625
|
+
url: URL.createObjectURL(i)
|
|
626
|
+
}));
|
|
627
|
+
return [...e, ...a];
|
|
628
|
+
}
|
|
629
|
+
function gn(e, r) {
|
|
630
|
+
const n = e.find((t) => t.id === r);
|
|
631
|
+
return n?.url?.startsWith("blob:") && URL.revokeObjectURL(n.url), e.filter((t) => t.id !== r);
|
|
632
|
+
}
|
|
633
|
+
function it(e, r, n) {
|
|
634
|
+
return e.map((t) => t.id !== r ? t : (t.url?.startsWith("blob:") && URL.revokeObjectURL(t.url), { ...t, file: n, url: URL.createObjectURL(n) }));
|
|
635
|
+
}
|
|
636
|
+
function yn(e, r, n) {
|
|
637
|
+
return it(e, r, n);
|
|
638
|
+
}
|
|
639
|
+
function kn(e, r, n) {
|
|
640
|
+
const t = {
|
|
641
|
+
id: ge(),
|
|
642
|
+
file: r,
|
|
643
|
+
url: URL.createObjectURL(r),
|
|
644
|
+
position: n
|
|
645
|
+
};
|
|
646
|
+
return [...e, t];
|
|
647
|
+
}
|
|
648
|
+
function Cn(e) {
|
|
649
|
+
for (const r of e)
|
|
650
|
+
r.url?.startsWith("blob:") && URL.revokeObjectURL(r.url);
|
|
651
|
+
}
|
|
652
|
+
const Dn = ({ size: e = "md", width: r, withCloseButton: n = !1, ...t }) => {
|
|
653
|
+
let o = 768;
|
|
654
|
+
return e === "xs" ? o = 360 : e === "sm" ? o = 544 : e === "lg" ? o = 1e3 : e === "xl" && (o = 1200), /* @__PURE__ */ l(
|
|
655
|
+
xt,
|
|
656
|
+
{
|
|
657
|
+
size: r || o,
|
|
658
|
+
styles: {
|
|
659
|
+
content: {
|
|
660
|
+
borderRadius: "12px"
|
|
542
661
|
},
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
662
|
+
title: {
|
|
663
|
+
fontSize: "16px",
|
|
664
|
+
fontWeight: "700",
|
|
665
|
+
lineHeight: "150%",
|
|
666
|
+
color: Ht
|
|
546
667
|
},
|
|
547
|
-
|
|
668
|
+
header: {
|
|
669
|
+
padding: "16px"
|
|
670
|
+
},
|
|
671
|
+
body: {
|
|
672
|
+
paddingLeft: "0px",
|
|
673
|
+
paddingRight: "0px"
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
withCloseButton: n,
|
|
677
|
+
closeButtonProps: {
|
|
678
|
+
icon: /* @__PURE__ */ l(Ae, { size: 18, color: Yt })
|
|
679
|
+
},
|
|
680
|
+
...t
|
|
681
|
+
}
|
|
682
|
+
);
|
|
683
|
+
};
|
|
684
|
+
async function xn(e, r) {
|
|
685
|
+
const n = e.url ?? "";
|
|
686
|
+
if (!n) return null;
|
|
687
|
+
const t = await new Promise((i, c) => {
|
|
688
|
+
const p = new Image();
|
|
689
|
+
p.crossOrigin = "anonymous", p.onload = () => i(p), p.onerror = c, p.src = n;
|
|
690
|
+
}), o = document.createElement("canvas");
|
|
691
|
+
o.width = r.width, o.height = r.height;
|
|
692
|
+
const s = o.getContext("2d");
|
|
693
|
+
if (!s) return null;
|
|
694
|
+
s.drawImage(
|
|
695
|
+
t,
|
|
696
|
+
r.x,
|
|
697
|
+
r.y,
|
|
698
|
+
r.width,
|
|
699
|
+
r.height,
|
|
700
|
+
0,
|
|
701
|
+
0,
|
|
702
|
+
r.width,
|
|
703
|
+
r.height
|
|
704
|
+
);
|
|
705
|
+
const a = e.file?.name ?? e.url?.split("/").pop() ?? "image";
|
|
706
|
+
return new Promise((i, c) => {
|
|
707
|
+
o.toBlob((p) => {
|
|
708
|
+
p ? i(new File([p], `cropped_${a}`, { type: "image/jpeg" })) : c(new Error("Failed to create blob"));
|
|
709
|
+
}, "image/jpeg");
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function Pn({
|
|
713
|
+
item: e,
|
|
714
|
+
isOpen: r,
|
|
715
|
+
aspect: n = 1,
|
|
716
|
+
onClose: t,
|
|
717
|
+
onSubmit: o
|
|
718
|
+
}) {
|
|
719
|
+
const [s, a] = L({ x: 0, y: 0 }), [i, c] = L(1), [p, m] = L(null), [_, d] = L(!1), u = async () => {
|
|
720
|
+
if (!(!p || !e)) {
|
|
721
|
+
d(!0);
|
|
722
|
+
try {
|
|
723
|
+
const f = await xn(e, p);
|
|
724
|
+
f && o(f);
|
|
725
|
+
} finally {
|
|
726
|
+
d(!1);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
return /* @__PURE__ */ l(
|
|
731
|
+
Dn,
|
|
732
|
+
{
|
|
733
|
+
opened: r && !!e,
|
|
734
|
+
onClose: t,
|
|
735
|
+
size: "md",
|
|
736
|
+
title: "이미지 수정",
|
|
737
|
+
withCloseButton: !0,
|
|
738
|
+
children: /* @__PURE__ */ x(Pt, { children: [
|
|
739
|
+
/* @__PURE__ */ l("div", { style: { position: "relative", height: 320, background: "#fff" }, children: /* @__PURE__ */ l(
|
|
740
|
+
nr,
|
|
741
|
+
{
|
|
742
|
+
image: e?.url ?? "",
|
|
743
|
+
crop: s,
|
|
744
|
+
zoom: i,
|
|
745
|
+
aspect: n,
|
|
746
|
+
minZoom: 0.5,
|
|
747
|
+
maxZoom: 10,
|
|
748
|
+
objectFit: "cover",
|
|
749
|
+
onCropChange: a,
|
|
750
|
+
onZoomChange: c,
|
|
751
|
+
onCropComplete: (f, h) => m(h),
|
|
752
|
+
style: { containerStyle: { backgroundColor: "#ffffff" } }
|
|
753
|
+
}
|
|
754
|
+
) }),
|
|
755
|
+
/* @__PURE__ */ x(Mt, { justify: "flex-end", style: { padding: "0 16px" }, children: [
|
|
756
|
+
/* @__PURE__ */ l(me, { variant: "basic", onClick: t, children: "취소" }),
|
|
757
|
+
/* @__PURE__ */ l(me, { variant: "primary", isLoading: _, onClick: u, children: "적용하기" })
|
|
758
|
+
] })
|
|
759
|
+
] })
|
|
760
|
+
},
|
|
761
|
+
e?.id
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
const Mn = "styles-module__Container___ZyeJM", bn = "styles-module__TileImage___6aKmW", Sn = "styles-module__EditButton___1Xyg9", Tn = "styles-module__PlaceholderText___nhLhy", wn = "styles-module__PlaceholderTextError___jYZ8j", ae = {
|
|
765
|
+
Container: Mn,
|
|
766
|
+
TileImage: bn,
|
|
767
|
+
EditButton: Sn,
|
|
768
|
+
PlaceholderText: Tn,
|
|
769
|
+
PlaceholderTextError: wn
|
|
770
|
+
}, In = "styles-module__TileContainer___5-y01", Ln = "styles-module__DeleteButton___0zsXm", Bn = "styles-module__Tile___3Cezo", vn = "styles-module__TileDragOver___e7GXF", En = "styles-module__LoadingOverlay___4CyDQ", An = "styles-module__ActionBar___mJYpe", Nn = "styles-module__DragHandle___lzKhb", Fn = "styles-module__LinkButton___bISyz", $n = "styles-module__DropzoneOuter___BIO2N", Rn = "styles-module__Placeholder___q30Yw", On = "styles-module__PlaceholderError___fCOYe", Q = {
|
|
771
|
+
TileContainer: In,
|
|
772
|
+
DeleteButton: Ln,
|
|
773
|
+
Tile: Bn,
|
|
774
|
+
TileDragOver: vn,
|
|
775
|
+
LoadingOverlay: En,
|
|
776
|
+
ActionBar: An,
|
|
777
|
+
DragHandle: Nn,
|
|
778
|
+
LinkButton: Fn,
|
|
779
|
+
DropzoneOuter: $n,
|
|
780
|
+
Placeholder: Rn,
|
|
781
|
+
PlaceholderError: On
|
|
782
|
+
};
|
|
783
|
+
function pe({
|
|
784
|
+
width: e,
|
|
785
|
+
height: r,
|
|
786
|
+
isError: n,
|
|
787
|
+
isLoading: t,
|
|
788
|
+
accept: o,
|
|
789
|
+
multiple: s,
|
|
790
|
+
onDrop: a,
|
|
791
|
+
children: i
|
|
792
|
+
}) {
|
|
793
|
+
return /* @__PURE__ */ l("div", { className: Q.DropzoneOuter, children: /* @__PURE__ */ l(
|
|
794
|
+
rr,
|
|
795
|
+
{
|
|
796
|
+
onDrop: a,
|
|
797
|
+
accept: o,
|
|
798
|
+
multiple: s,
|
|
799
|
+
disabled: t,
|
|
800
|
+
className: n ? Q.PlaceholderError : Q.Placeholder,
|
|
801
|
+
style: { width: e, height: r },
|
|
802
|
+
children: i
|
|
803
|
+
}
|
|
804
|
+
) });
|
|
805
|
+
}
|
|
806
|
+
const zn = (e) => {
|
|
807
|
+
const { isSorting: r, wasDragging: n } = e;
|
|
808
|
+
return r || n ? !1 : rt(e);
|
|
809
|
+
};
|
|
810
|
+
function lt({ id: e, children: r }) {
|
|
811
|
+
const { setNodeRef: n, transform: t, transition: o, isOver: s } = tt({
|
|
812
|
+
id: e,
|
|
813
|
+
animateLayoutChanges: zn
|
|
814
|
+
});
|
|
815
|
+
return /* @__PURE__ */ l(
|
|
816
|
+
"div",
|
|
817
|
+
{
|
|
818
|
+
ref: n,
|
|
819
|
+
style: {
|
|
820
|
+
transform: at.Transform.toString(t),
|
|
821
|
+
transition: o,
|
|
822
|
+
opacity: s ? 0.7 : 1
|
|
823
|
+
},
|
|
824
|
+
children: r
|
|
825
|
+
}
|
|
826
|
+
);
|
|
827
|
+
}
|
|
828
|
+
function ct({
|
|
829
|
+
id: e,
|
|
830
|
+
totalCount: r,
|
|
831
|
+
width: n,
|
|
832
|
+
height: t,
|
|
833
|
+
readOnly: o,
|
|
834
|
+
isLoading: s,
|
|
835
|
+
itemIsLoading: a,
|
|
836
|
+
canDelete: i,
|
|
837
|
+
hasLink: c,
|
|
838
|
+
linkUrl: p,
|
|
839
|
+
onLinkClick: m,
|
|
840
|
+
onDelete: _,
|
|
841
|
+
deleteAriaLabel: d = "삭제",
|
|
842
|
+
actionBarExtra: u,
|
|
843
|
+
onTileClick: f,
|
|
844
|
+
onFileDrop: h,
|
|
845
|
+
children: y
|
|
846
|
+
}) {
|
|
847
|
+
const [g, k] = L(!1), P = (w) => {
|
|
848
|
+
!h || o || s || a || w.preventDefault();
|
|
849
|
+
}, O = (w) => {
|
|
850
|
+
!h || o || s || a || (w.preventDefault(), k(!0));
|
|
851
|
+
}, N = (w) => {
|
|
852
|
+
w.currentTarget.contains(w.relatedTarget) || k(!1);
|
|
853
|
+
}, W = (w) => {
|
|
854
|
+
if (w.preventDefault(), k(!1), !h || o || s || a) return;
|
|
855
|
+
const T = w.dataTransfer.files[0];
|
|
856
|
+
T && h(T);
|
|
857
|
+
}, z = (w) => {
|
|
858
|
+
const { isSorting: T, wasDragging: R } = w;
|
|
859
|
+
return T || R ? !1 : rt(w);
|
|
860
|
+
}, { attributes: B, listeners: M, setNodeRef: C, transform: E, transition: A, isDragging: S } = tt({
|
|
861
|
+
id: e,
|
|
862
|
+
disabled: o,
|
|
863
|
+
animateLayoutChanges: z
|
|
864
|
+
}), v = !o && r > 1 || c && !!p && !!m || !!u, $ = o || s || a || !f ? "default" : "pointer";
|
|
865
|
+
return /* @__PURE__ */ x(
|
|
866
|
+
"div",
|
|
867
|
+
{
|
|
868
|
+
ref: C,
|
|
869
|
+
className: Q.TileContainer,
|
|
870
|
+
style: {
|
|
871
|
+
transform: at.Transform.toString(E),
|
|
872
|
+
transition: A,
|
|
873
|
+
opacity: S ? 0.4 : 1
|
|
874
|
+
},
|
|
875
|
+
children: [
|
|
876
|
+
!o && i && !s && /* @__PURE__ */ l(
|
|
877
|
+
"button",
|
|
878
|
+
{
|
|
879
|
+
type: "button",
|
|
880
|
+
className: Q.DeleteButton,
|
|
881
|
+
onClick: _,
|
|
882
|
+
"aria-label": d,
|
|
883
|
+
children: /* @__PURE__ */ l(Wt, { size: 24 })
|
|
884
|
+
}
|
|
885
|
+
),
|
|
886
|
+
/* @__PURE__ */ x(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
className: `${Q.Tile}${g ? ` ${Q.TileDragOver}` : ""}`,
|
|
890
|
+
style: { width: n, height: t, cursor: $ },
|
|
891
|
+
onClick: () => !o && !s && !a && f?.(),
|
|
892
|
+
onDragOver: P,
|
|
893
|
+
onDragEnter: O,
|
|
894
|
+
onDragLeave: N,
|
|
895
|
+
onDrop: W,
|
|
896
|
+
children: [
|
|
897
|
+
y,
|
|
898
|
+
(s || a) && /* @__PURE__ */ l("div", { className: Q.LoadingOverlay, children: /* @__PURE__ */ l(Ge, { size: n / 6, color: Xe }) })
|
|
899
|
+
]
|
|
900
|
+
}
|
|
901
|
+
),
|
|
902
|
+
v && /* @__PURE__ */ x("div", { className: Q.ActionBar, children: [
|
|
903
|
+
!o && r > 1 && /* @__PURE__ */ l(
|
|
904
|
+
"button",
|
|
905
|
+
{
|
|
906
|
+
type: "button",
|
|
907
|
+
className: Q.DragHandle,
|
|
908
|
+
...B,
|
|
909
|
+
...M,
|
|
910
|
+
"aria-label": "드래그로 순서 변경",
|
|
911
|
+
children: /* @__PURE__ */ l(Zt, { size: 20, color: "#808080" })
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
c && p && m && /* @__PURE__ */ l("button", { type: "button", className: Q.LinkButton, onClick: m, children: "링크" }),
|
|
915
|
+
u
|
|
916
|
+
] })
|
|
917
|
+
]
|
|
918
|
+
}
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
function Hn({
|
|
922
|
+
items: e,
|
|
923
|
+
onReorder: r
|
|
924
|
+
}) {
|
|
925
|
+
return { sensors: qt(
|
|
926
|
+
Fe(Qt, { activationConstraint: { distance: 8 } }),
|
|
927
|
+
Fe(er, { coordinateGetter: tr })
|
|
928
|
+
), handleDragEnd: (o) => {
|
|
929
|
+
const { active: s, over: a } = o;
|
|
930
|
+
if (!a || s.id === a.id) return;
|
|
931
|
+
const i = e.findIndex((p) => p.id === s.id), c = e.findIndex((p) => p.id === a.id);
|
|
932
|
+
i !== -1 && c !== -1 && r(i, c);
|
|
933
|
+
} };
|
|
934
|
+
}
|
|
935
|
+
const xe = "__slot-";
|
|
936
|
+
function _t({ value: e, length: r, minLength: n, maxLength: t, onChange: o }) {
|
|
937
|
+
const s = r ?? n, a = r ?? t, i = s != null && a != null && s === a, c = i ? 0 : pn(e, s, a), p = i ? Array.from({ length: a }, (y, g) => `${xe}${g}`) : [], m = i ? p : e.map((y) => y.id), { sensors: _, handleDragEnd: d } = Hn({
|
|
938
|
+
items: e,
|
|
939
|
+
onReorder: (y, g) => {
|
|
940
|
+
const k = mn(e, y, g), P = e[y];
|
|
941
|
+
o?.(k, {
|
|
942
|
+
action: "reorder",
|
|
943
|
+
itemId: P.id,
|
|
944
|
+
index: g,
|
|
945
|
+
previousIndex: y,
|
|
946
|
+
nextIndex: g
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
return {
|
|
951
|
+
isPositionMode: i,
|
|
952
|
+
resolvedMinLength: s,
|
|
953
|
+
resolvedMaxLength: a,
|
|
954
|
+
placeholderCount: c,
|
|
955
|
+
slotIds: p,
|
|
956
|
+
sortableItems: m,
|
|
957
|
+
sensors: _,
|
|
958
|
+
handleDragEnd: i ? (y) => {
|
|
959
|
+
const { active: g, over: k } = y;
|
|
960
|
+
if (!k || g.id === k.id) return;
|
|
961
|
+
const P = Number(String(g.id).replace(xe, "")), O = Number(String(k.id).replace(xe, "")), N = e.find((z) => z.position === P);
|
|
962
|
+
if (!N) return;
|
|
963
|
+
const W = fn(e, P, O);
|
|
964
|
+
o?.(W, {
|
|
965
|
+
action: "reorder",
|
|
966
|
+
itemId: N.id,
|
|
967
|
+
index: O,
|
|
968
|
+
previousIndex: P,
|
|
969
|
+
nextIndex: O
|
|
970
|
+
});
|
|
971
|
+
} : d,
|
|
972
|
+
getMetaIndex: (y) => {
|
|
973
|
+
const g = e.find((k) => k.id === y);
|
|
974
|
+
return i && g ? g.position ?? 0 : e.findIndex((k) => k.id === y);
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
function Yn(e) {
|
|
979
|
+
return e ? e.join(",") : "image/*";
|
|
980
|
+
}
|
|
981
|
+
function ze({
|
|
982
|
+
item: e,
|
|
983
|
+
sortableId: r,
|
|
984
|
+
index: n,
|
|
985
|
+
totalCount: t,
|
|
986
|
+
width: o,
|
|
987
|
+
height: s,
|
|
988
|
+
accept: a,
|
|
989
|
+
canDelete: i,
|
|
990
|
+
hasLink: c,
|
|
991
|
+
hasEdit: p,
|
|
992
|
+
readOnly: m,
|
|
993
|
+
isLoading: _,
|
|
994
|
+
onLinkClick: d,
|
|
995
|
+
onDelete: u,
|
|
996
|
+
onReplace: f,
|
|
997
|
+
onEdit: h
|
|
998
|
+
}) {
|
|
999
|
+
const y = oe(null);
|
|
1000
|
+
return /* @__PURE__ */ x(
|
|
1001
|
+
ct,
|
|
1002
|
+
{
|
|
1003
|
+
id: r ?? e.id,
|
|
1004
|
+
totalCount: t,
|
|
1005
|
+
width: o,
|
|
1006
|
+
height: s,
|
|
1007
|
+
readOnly: m,
|
|
1008
|
+
isLoading: _,
|
|
1009
|
+
itemIsLoading: e.isLoading,
|
|
1010
|
+
canDelete: i,
|
|
1011
|
+
hasLink: c,
|
|
1012
|
+
linkUrl: e.url,
|
|
1013
|
+
onLinkClick: d ? () => d(e) : void 0,
|
|
1014
|
+
onDelete: () => u(e.id),
|
|
1015
|
+
deleteAriaLabel: "이미지 삭제",
|
|
1016
|
+
onTileClick: () => y.current?.click(),
|
|
1017
|
+
onFileDrop: (g) => {
|
|
1018
|
+
if (a) {
|
|
1019
|
+
if (!a.includes(g.type)) return;
|
|
1020
|
+
} else if (!g.type.startsWith("image/")) return;
|
|
1021
|
+
f(e.id, g);
|
|
1022
|
+
},
|
|
1023
|
+
actionBarExtra: !m && p ? /* @__PURE__ */ l(
|
|
1024
|
+
me,
|
|
1025
|
+
{
|
|
1026
|
+
variant: "basic",
|
|
1027
|
+
size: "sm",
|
|
1028
|
+
"aria-label": "이미지 편집",
|
|
1029
|
+
className: ae.EditButton,
|
|
1030
|
+
onClick: () => h(e),
|
|
1031
|
+
children: "편집"
|
|
1032
|
+
}
|
|
1033
|
+
) : void 0,
|
|
1034
|
+
children: [
|
|
1035
|
+
/* @__PURE__ */ l(
|
|
1036
|
+
"input",
|
|
1037
|
+
{
|
|
1038
|
+
ref: y,
|
|
1039
|
+
type: "file",
|
|
1040
|
+
accept: Yn(a),
|
|
1041
|
+
style: { display: "none" },
|
|
1042
|
+
onChange: (g) => {
|
|
1043
|
+
const k = g.target.files?.[0];
|
|
1044
|
+
k && f(e.id, k), g.target.value = "";
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
),
|
|
1048
|
+
/* @__PURE__ */ l(
|
|
548
1049
|
"img",
|
|
549
1050
|
{
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
title: `파일명: ${typeof c == "string" ? c : c.name}`
|
|
1051
|
+
src: e.url,
|
|
1052
|
+
alt: e.file?.name ?? `이미지 ${n + 1}`,
|
|
1053
|
+
className: ae.TileImage
|
|
554
1054
|
}
|
|
555
|
-
)
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
1055
|
+
)
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
);
|
|
1059
|
+
}
|
|
1060
|
+
const _a = ({
|
|
1061
|
+
value: e = [],
|
|
1062
|
+
onChange: r,
|
|
1063
|
+
accept: n,
|
|
1064
|
+
length: t,
|
|
1065
|
+
width: o = 160,
|
|
1066
|
+
height: s = 200,
|
|
1067
|
+
placeholder: a = "이미지를 넣어주세요",
|
|
1068
|
+
hasIcon: i = !0,
|
|
1069
|
+
hasLink: c = !1,
|
|
1070
|
+
onLinkClick: p,
|
|
1071
|
+
hasEdit: m = !1,
|
|
1072
|
+
canDelete: _ = !0,
|
|
1073
|
+
minLength: d,
|
|
1074
|
+
maxLength: u,
|
|
1075
|
+
errorMsg: f,
|
|
1076
|
+
isLoading: h,
|
|
1077
|
+
readOnly: y,
|
|
1078
|
+
gap: g = 8
|
|
1079
|
+
}) => {
|
|
1080
|
+
process.env.NODE_ENV !== "production" && t != null && (d != null || u != null) && console.warn(
|
|
1081
|
+
"ImageInput: length와 minLength/maxLength가 동시에 지정되었습니다. length가 우선 적용됩니다."
|
|
1082
|
+
);
|
|
1083
|
+
const {
|
|
1084
|
+
isPositionMode: k,
|
|
1085
|
+
resolvedMaxLength: P,
|
|
1086
|
+
placeholderCount: O,
|
|
1087
|
+
slotIds: N,
|
|
1088
|
+
sortableItems: W,
|
|
1089
|
+
sensors: z,
|
|
1090
|
+
handleDragEnd: B,
|
|
1091
|
+
getMetaIndex: M
|
|
1092
|
+
} = _t({ value: e, length: t, minLength: d, maxLength: u, onChange: r }), C = !!f, [E, A] = L(null), S = oe(e);
|
|
1093
|
+
X(() => {
|
|
1094
|
+
S.current = e;
|
|
1095
|
+
}, [e]), X(() => () => Cn(S.current), []);
|
|
1096
|
+
const v = (I) => {
|
|
1097
|
+
if (y) return;
|
|
1098
|
+
const D = e.length, F = hn(e, I, P);
|
|
1099
|
+
F.length !== D && r?.(F, {
|
|
1100
|
+
action: "create",
|
|
1101
|
+
itemId: F[D].id,
|
|
1102
|
+
index: D
|
|
1103
|
+
});
|
|
1104
|
+
}, $ = (I, D) => {
|
|
1105
|
+
if (y) return;
|
|
1106
|
+
const F = D[0];
|
|
1107
|
+
if (!F) return;
|
|
1108
|
+
const q = kn(e, F, I);
|
|
1109
|
+
r?.(q, {
|
|
1110
|
+
action: "create",
|
|
1111
|
+
itemId: q[q.length - 1].id,
|
|
1112
|
+
index: I
|
|
1113
|
+
});
|
|
1114
|
+
}, w = (I) => {
|
|
1115
|
+
if (y) return;
|
|
1116
|
+
const D = M(I), F = gn(e, I);
|
|
1117
|
+
r?.(F, { action: "delete", itemId: I, index: D });
|
|
1118
|
+
}, T = (I, D) => {
|
|
1119
|
+
if (y) return;
|
|
1120
|
+
const F = M(I), q = it(e, I, D);
|
|
1121
|
+
r?.(q, { action: "replace", itemId: I, index: F });
|
|
1122
|
+
}, R = (I) => {
|
|
1123
|
+
if (!E) return;
|
|
1124
|
+
const D = E.id, F = M(D), q = yn(e, D, I);
|
|
1125
|
+
A(null), r?.(q, { action: "crop", itemId: D, index: F });
|
|
1126
|
+
}, U = (I) => {
|
|
1127
|
+
const D = typeof a == "function" ? a(I) : a;
|
|
1128
|
+
return typeof D != "string" ? D : D.split(`
|
|
1129
|
+
`).map((F, q) => /* @__PURE__ */ l("span", { children: F }, q));
|
|
1130
|
+
};
|
|
1131
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
1132
|
+
/* @__PURE__ */ l(Qe, { sensors: z, collisionDetection: et, onDragEnd: B, children: /* @__PURE__ */ l(nt, { items: W, strategy: ot, children: /* @__PURE__ */ l("div", { className: ae.Container, style: { gap: g }, children: k ? Array.from({ length: P }, (I, D) => {
|
|
1133
|
+
const F = N[D], q = e.find((ye) => ye.position === D);
|
|
1134
|
+
return q ? /* @__PURE__ */ l(
|
|
1135
|
+
ze,
|
|
1136
|
+
{
|
|
1137
|
+
item: q,
|
|
1138
|
+
sortableId: F,
|
|
1139
|
+
index: D,
|
|
1140
|
+
totalCount: P,
|
|
1141
|
+
width: o,
|
|
1142
|
+
height: s,
|
|
1143
|
+
accept: n,
|
|
1144
|
+
canDelete: _,
|
|
1145
|
+
hasLink: c,
|
|
1146
|
+
hasEdit: m,
|
|
1147
|
+
readOnly: y ?? !1,
|
|
1148
|
+
isLoading: h,
|
|
1149
|
+
onLinkClick: p,
|
|
1150
|
+
onDelete: w,
|
|
1151
|
+
onReplace: T,
|
|
1152
|
+
onEdit: A
|
|
1153
|
+
},
|
|
1154
|
+
F
|
|
1155
|
+
) : !y && /* @__PURE__ */ l(lt, { id: F, children: /* @__PURE__ */ x(
|
|
1156
|
+
pe,
|
|
1157
|
+
{
|
|
1158
|
+
onDrop: (ye) => $(D, ye),
|
|
1159
|
+
accept: n ?? $e,
|
|
1160
|
+
multiple: !1,
|
|
1161
|
+
isLoading: h,
|
|
1162
|
+
isError: C,
|
|
1163
|
+
width: o,
|
|
1164
|
+
height: s,
|
|
1165
|
+
children: [
|
|
1166
|
+
i && /* @__PURE__ */ l(ue, { size: 36, color: C ? "#e03131" : "#07a3c6" }),
|
|
1167
|
+
a && /* @__PURE__ */ l(
|
|
1168
|
+
"div",
|
|
1169
|
+
{
|
|
1170
|
+
className: `${ae.PlaceholderText}${C ? ` ${ae.PlaceholderTextError}` : ""}`,
|
|
1171
|
+
children: U(D)
|
|
1172
|
+
}
|
|
1173
|
+
)
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1176
|
+
) }, F);
|
|
1177
|
+
}) : /* @__PURE__ */ x(Ve, { children: [
|
|
1178
|
+
e.map((I, D) => /* @__PURE__ */ l(
|
|
1179
|
+
ze,
|
|
1180
|
+
{
|
|
1181
|
+
item: I,
|
|
1182
|
+
index: D,
|
|
1183
|
+
totalCount: e.length,
|
|
1184
|
+
width: o,
|
|
1185
|
+
height: s,
|
|
1186
|
+
accept: n,
|
|
1187
|
+
canDelete: _,
|
|
1188
|
+
hasLink: c,
|
|
1189
|
+
hasEdit: m,
|
|
1190
|
+
readOnly: y ?? !1,
|
|
1191
|
+
isLoading: h,
|
|
1192
|
+
onLinkClick: p,
|
|
1193
|
+
onDelete: w,
|
|
1194
|
+
onReplace: T,
|
|
1195
|
+
onEdit: A
|
|
1196
|
+
},
|
|
1197
|
+
I.id
|
|
1198
|
+
)),
|
|
1199
|
+
!y && Array.from({ length: O }, (I, D) => /* @__PURE__ */ x(
|
|
1200
|
+
pe,
|
|
1201
|
+
{
|
|
1202
|
+
onDrop: v,
|
|
1203
|
+
accept: n ?? $e,
|
|
1204
|
+
multiple: P !== 1,
|
|
1205
|
+
isLoading: h,
|
|
1206
|
+
isError: C,
|
|
1207
|
+
width: o,
|
|
1208
|
+
height: s,
|
|
1209
|
+
children: [
|
|
1210
|
+
i && /* @__PURE__ */ l(ue, { size: 36, color: C ? "#e03131" : "#07a3c6" }),
|
|
1211
|
+
a && /* @__PURE__ */ l(
|
|
1212
|
+
"div",
|
|
1213
|
+
{
|
|
1214
|
+
className: `${ae.PlaceholderText}${C ? ` ${ae.PlaceholderTextError}` : ""}`,
|
|
1215
|
+
children: U(D)
|
|
1216
|
+
}
|
|
1217
|
+
)
|
|
1218
|
+
]
|
|
1219
|
+
},
|
|
1220
|
+
`placeholder-${D}`
|
|
1221
|
+
))
|
|
1222
|
+
] }) }) }) }),
|
|
1223
|
+
C && /* @__PURE__ */ l(J.Error, { mt: 8, children: f }),
|
|
1224
|
+
m && /* @__PURE__ */ l(
|
|
1225
|
+
Pn,
|
|
1226
|
+
{
|
|
1227
|
+
item: E,
|
|
1228
|
+
isOpen: !!E,
|
|
1229
|
+
onClose: () => A(null),
|
|
1230
|
+
onSubmit: R
|
|
559
1231
|
}
|
|
560
1232
|
)
|
|
561
1233
|
] });
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
1234
|
+
};
|
|
1235
|
+
function dt(e) {
|
|
1236
|
+
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
1237
|
+
const r = e;
|
|
1238
|
+
return "v" in r && "fr" in r && "ip" in r && "op" in r && "w" in r && "h" in r && "layers" in r && Array.isArray(r.layers);
|
|
1239
|
+
}
|
|
1240
|
+
function Ie(e) {
|
|
1241
|
+
return new Promise((r) => {
|
|
1242
|
+
const n = new FileReader();
|
|
1243
|
+
n.onload = (t) => {
|
|
1244
|
+
try {
|
|
1245
|
+
const o = JSON.parse(t.target?.result);
|
|
1246
|
+
r(dt(o) ? o : null);
|
|
1247
|
+
} catch {
|
|
1248
|
+
r(null);
|
|
1249
|
+
}
|
|
1250
|
+
}, n.onerror = () => r(null), n.readAsText(e);
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
function Wn(e, r, n) {
|
|
1254
|
+
const t = [...r].sort((i, c) => i.name.localeCompare(c.name)), o = n != null ? n - e.length : 1 / 0, a = t.slice(0, o).map((i) => ({
|
|
1255
|
+
id: ge(),
|
|
1256
|
+
file: i
|
|
1257
|
+
}));
|
|
1258
|
+
return [...e, ...a];
|
|
1259
|
+
}
|
|
1260
|
+
function Zn(e, r) {
|
|
1261
|
+
return e.filter((n) => n.id !== r);
|
|
1262
|
+
}
|
|
1263
|
+
function jn(e, r, n) {
|
|
1264
|
+
const t = {
|
|
1265
|
+
id: ge(),
|
|
1266
|
+
file: r,
|
|
1267
|
+
position: n
|
|
1268
|
+
};
|
|
1269
|
+
return [...e, t];
|
|
1270
|
+
}
|
|
1271
|
+
const Un = "styles-module__Container___cJqG-", Vn = "styles-module__Empty___gexrS", Gn = "styles-module__PlaceholderText___x2ya0", Kn = "styles-module__PlaceholderTextError___i8VXv", ie = {
|
|
1272
|
+
Container: Un,
|
|
1273
|
+
Empty: Vn,
|
|
1274
|
+
PlaceholderText: Gn,
|
|
1275
|
+
PlaceholderTextError: Kn
|
|
1276
|
+
}, Jn = "styles-module__Toast___ZqZzU", Xn = "styles-module__Toast__Icon___PWXSy", qn = "styles-module__Toast__Body___wezPs", Qn = "styles-module__Toast__Message___NFsgm", de = {
|
|
1277
|
+
Toast: Jn,
|
|
1278
|
+
Toast__Icon: Xn,
|
|
1279
|
+
Toast__Body: qn,
|
|
1280
|
+
Toast__Message: Qn
|
|
1281
|
+
}, ut = (e) => typeof e == "string" ? { message: e } : e, mt = (e, r) => {
|
|
1282
|
+
const { autoClose: n, icon: t, message: o } = ut(e);
|
|
1283
|
+
return {
|
|
1284
|
+
id: r,
|
|
1285
|
+
message: /* @__PURE__ */ l("div", { className: de.Toast__Message, children: o }),
|
|
1286
|
+
icon: t,
|
|
1287
|
+
autoClose: n,
|
|
1288
|
+
classNames: {
|
|
1289
|
+
root: de.Toast,
|
|
1290
|
+
body: de.Toast__Body,
|
|
1291
|
+
icon: de.Toast__Icon
|
|
1292
|
+
},
|
|
1293
|
+
withCloseButton: !1,
|
|
1294
|
+
withBorder: !1
|
|
1295
|
+
};
|
|
1296
|
+
}, se = (e) => {
|
|
1297
|
+
const r = ut(e);
|
|
1298
|
+
he.show(mt(e, r.id));
|
|
1299
|
+
};
|
|
1300
|
+
se.update = (e, r) => {
|
|
1301
|
+
he.update(mt(r, e));
|
|
1302
|
+
};
|
|
1303
|
+
se.hide = (e) => {
|
|
1304
|
+
he.hide(e);
|
|
1305
|
+
};
|
|
1306
|
+
se.clean = () => {
|
|
1307
|
+
he.clean();
|
|
1308
|
+
};
|
|
1309
|
+
const He = { "application/json": [".json"] };
|
|
1310
|
+
function Ye({
|
|
1311
|
+
item: e,
|
|
1312
|
+
sortableId: r,
|
|
1313
|
+
totalCount: n,
|
|
1314
|
+
width: t,
|
|
1315
|
+
height: o,
|
|
1316
|
+
readOnly: s,
|
|
1317
|
+
isLoading: a,
|
|
1318
|
+
canDelete: i,
|
|
1319
|
+
hasLink: c,
|
|
1320
|
+
onLinkClick: p,
|
|
1321
|
+
onDelete: m
|
|
1322
|
+
}) {
|
|
1323
|
+
const d = !e.animationData && !!(e.file || e.url) ? `${e.id}|${e.file ? `${e.file.name}:${e.file.size}` : e.url ?? ""}` : "", [u, f] = L({ key: "", data: null }), h = e.animationData ?? (u.key === d ? u.data : null), y = !!d && u.key !== d;
|
|
1324
|
+
return X(() => {
|
|
1325
|
+
if (!d) return;
|
|
1326
|
+
let g = !1;
|
|
1327
|
+
return (e.file ? Ie(e.file) : fetch(e.url).then((P) => P.json()).then(
|
|
1328
|
+
(P) => dt(P) ? P : null
|
|
1329
|
+
)).then((P) => {
|
|
1330
|
+
g || f({ key: d, data: P });
|
|
1331
|
+
}).catch(() => {
|
|
1332
|
+
g || f({ key: d, data: null });
|
|
1333
|
+
}), () => {
|
|
1334
|
+
g = !0;
|
|
1335
|
+
};
|
|
1336
|
+
}, [d, e.file, e.url]), /* @__PURE__ */ l(
|
|
1337
|
+
ct,
|
|
1338
|
+
{
|
|
1339
|
+
id: r ?? e.id,
|
|
1340
|
+
totalCount: n,
|
|
1341
|
+
width: t,
|
|
1342
|
+
height: o,
|
|
1343
|
+
readOnly: s,
|
|
1344
|
+
isLoading: a,
|
|
1345
|
+
itemIsLoading: e.isLoading || y,
|
|
1346
|
+
canDelete: i,
|
|
1347
|
+
hasLink: c,
|
|
1348
|
+
linkUrl: e.url,
|
|
1349
|
+
onLinkClick: p ? () => p(e) : void 0,
|
|
1350
|
+
onDelete: () => m(e.id),
|
|
1351
|
+
deleteAriaLabel: "Lottie 삭제",
|
|
1352
|
+
children: h ? /* @__PURE__ */ l(
|
|
1353
|
+
or,
|
|
1354
|
+
{
|
|
1355
|
+
animationData: h,
|
|
1356
|
+
loop: !0,
|
|
1357
|
+
autoplay: !0,
|
|
1358
|
+
style: { width: t, height: o, display: "block" }
|
|
1359
|
+
}
|
|
1360
|
+
) : /* @__PURE__ */ l("div", { className: ie.Empty, style: { width: t, height: o } })
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
const da = ({
|
|
1365
|
+
value: e = [],
|
|
1366
|
+
onChange: r,
|
|
1367
|
+
width: n = 160,
|
|
1368
|
+
height: t = 200,
|
|
1369
|
+
placeholder: o = "Lottie JSON 파일을 넣어주세요",
|
|
1370
|
+
hasIcon: s = !0,
|
|
1371
|
+
hasLink: a = !1,
|
|
1372
|
+
onLinkClick: i,
|
|
1373
|
+
length: c,
|
|
1374
|
+
minLength: p,
|
|
1375
|
+
maxLength: m,
|
|
1376
|
+
errorMsg: _,
|
|
1377
|
+
isLoading: d,
|
|
1378
|
+
readOnly: u,
|
|
1379
|
+
gap: f = 8,
|
|
1380
|
+
canDelete: h = !0
|
|
1381
|
+
}) => {
|
|
1382
|
+
process.env.NODE_ENV !== "production" && c != null && (p != null || m != null) && console.warn(
|
|
1383
|
+
"LottieInput: length와 minLength/maxLength가 동시에 지정되었습니다. length가 우선 적용됩니다."
|
|
1384
|
+
);
|
|
1385
|
+
const {
|
|
1386
|
+
isPositionMode: y,
|
|
1387
|
+
resolvedMaxLength: g,
|
|
1388
|
+
placeholderCount: k,
|
|
1389
|
+
slotIds: P,
|
|
1390
|
+
sortableItems: O,
|
|
1391
|
+
sensors: N,
|
|
1392
|
+
handleDragEnd: W,
|
|
1393
|
+
getMetaIndex: z
|
|
1394
|
+
} = _t({ value: e, length: c, minLength: p, maxLength: m, onChange: r }), B = !!_, M = async (S) => {
|
|
1395
|
+
if (u) return;
|
|
1396
|
+
const v = [...S].sort((I, D) => I.name.localeCompare(D.name)), $ = await Promise.all(v.map(Ie));
|
|
1397
|
+
let w = 0;
|
|
1398
|
+
const T = v.filter((I, D) => $[D] !== null ? !0 : (w++, !1));
|
|
1399
|
+
if (w > 0 && se({
|
|
1400
|
+
id: "invalid-lottie-files",
|
|
1401
|
+
message: w === 1 ? "유효하지 않은 Lottie JSON 파일입니다" : `${w}개의 파일이 유효하지 않은 Lottie JSON입니다`
|
|
1402
|
+
}), T.length === 0) return;
|
|
1403
|
+
const R = e.length, U = Wn(e, T, g);
|
|
1404
|
+
U.length !== R && r?.(U, {
|
|
1405
|
+
action: "create",
|
|
1406
|
+
itemId: U[R].id,
|
|
1407
|
+
index: R
|
|
1408
|
+
});
|
|
1409
|
+
}, C = async (S, v) => {
|
|
1410
|
+
if (u) return;
|
|
1411
|
+
const $ = v[0];
|
|
1412
|
+
if (!$) return;
|
|
1413
|
+
if (!await Ie($)) {
|
|
1414
|
+
se({
|
|
1415
|
+
id: "invalid-lottie-files",
|
|
1416
|
+
message: "유효하지 않은 Lottie JSON 파일입니다"
|
|
1417
|
+
});
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1420
|
+
const T = jn(e, $, S);
|
|
1421
|
+
r?.(T, {
|
|
1422
|
+
action: "create",
|
|
1423
|
+
itemId: T[T.length - 1].id,
|
|
1424
|
+
index: S
|
|
1425
|
+
});
|
|
1426
|
+
}, E = (S) => {
|
|
1427
|
+
if (u) return;
|
|
1428
|
+
const v = z(S), $ = Zn(e, S);
|
|
1429
|
+
r?.($, { action: "delete", itemId: S, index: v });
|
|
1430
|
+
}, A = (S) => {
|
|
1431
|
+
const v = typeof o == "function" ? o(S) : o;
|
|
1432
|
+
return typeof v != "string" ? v : v.split(`
|
|
1433
|
+
`).map(($, w) => /* @__PURE__ */ l("span", { children: $ }, w));
|
|
1434
|
+
};
|
|
1435
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
1436
|
+
/* @__PURE__ */ l(Qe, { sensors: N, collisionDetection: et, onDragEnd: W, children: /* @__PURE__ */ l(nt, { items: O, strategy: ot, children: /* @__PURE__ */ l("div", { className: ie.Container, style: { gap: f }, children: y ? Array.from({ length: g }, (S, v) => {
|
|
1437
|
+
const $ = P[v], w = e.find((T) => T.position === v);
|
|
1438
|
+
return w ? /* @__PURE__ */ l(
|
|
1439
|
+
Ye,
|
|
1440
|
+
{
|
|
1441
|
+
item: w,
|
|
1442
|
+
sortableId: $,
|
|
1443
|
+
totalCount: g,
|
|
1444
|
+
width: n,
|
|
1445
|
+
height: t,
|
|
1446
|
+
readOnly: u ?? !1,
|
|
1447
|
+
isLoading: d,
|
|
1448
|
+
canDelete: h,
|
|
1449
|
+
hasLink: a,
|
|
1450
|
+
onLinkClick: i,
|
|
1451
|
+
onDelete: E
|
|
1452
|
+
},
|
|
1453
|
+
$
|
|
1454
|
+
) : !u && /* @__PURE__ */ l(lt, { id: $, children: /* @__PURE__ */ x(
|
|
1455
|
+
pe,
|
|
1456
|
+
{
|
|
1457
|
+
onDrop: (T) => C(v, T),
|
|
1458
|
+
accept: He,
|
|
1459
|
+
multiple: !1,
|
|
1460
|
+
isLoading: d,
|
|
1461
|
+
isError: B,
|
|
1462
|
+
width: n,
|
|
1463
|
+
height: t,
|
|
1464
|
+
children: [
|
|
1465
|
+
s && /* @__PURE__ */ l(ue, { size: 36, color: B ? "#e03131" : "#07a3c6" }),
|
|
1466
|
+
o && /* @__PURE__ */ l(
|
|
1467
|
+
"div",
|
|
1468
|
+
{
|
|
1469
|
+
className: `${ie.PlaceholderText}${B ? ` ${ie.PlaceholderTextError}` : ""}`,
|
|
1470
|
+
children: A(v)
|
|
1471
|
+
}
|
|
1472
|
+
)
|
|
1473
|
+
]
|
|
1474
|
+
}
|
|
1475
|
+
) }, $);
|
|
1476
|
+
}) : /* @__PURE__ */ x(Ve, { children: [
|
|
1477
|
+
e.map((S) => /* @__PURE__ */ l(
|
|
1478
|
+
Ye,
|
|
1479
|
+
{
|
|
1480
|
+
item: S,
|
|
1481
|
+
totalCount: e.length,
|
|
1482
|
+
width: n,
|
|
1483
|
+
height: t,
|
|
1484
|
+
readOnly: u ?? !1,
|
|
1485
|
+
isLoading: d,
|
|
1486
|
+
canDelete: h,
|
|
1487
|
+
hasLink: a,
|
|
1488
|
+
onLinkClick: i,
|
|
1489
|
+
onDelete: E
|
|
1490
|
+
},
|
|
1491
|
+
S.id
|
|
1492
|
+
)),
|
|
1493
|
+
!u && Array.from({ length: k }, (S, v) => /* @__PURE__ */ x(
|
|
1494
|
+
pe,
|
|
1495
|
+
{
|
|
1496
|
+
onDrop: M,
|
|
1497
|
+
accept: He,
|
|
1498
|
+
multiple: g !== 1,
|
|
1499
|
+
isLoading: d,
|
|
1500
|
+
isError: B,
|
|
1501
|
+
width: n,
|
|
1502
|
+
height: t,
|
|
1503
|
+
children: [
|
|
1504
|
+
s && /* @__PURE__ */ l(ue, { size: 36, color: B ? "#e03131" : "#07a3c6" }),
|
|
1505
|
+
o && /* @__PURE__ */ l(
|
|
1506
|
+
"div",
|
|
1507
|
+
{
|
|
1508
|
+
className: `${ie.PlaceholderText}${B ? ` ${ie.PlaceholderTextError}` : ""}`,
|
|
1509
|
+
children: A(v)
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
]
|
|
1513
|
+
},
|
|
1514
|
+
`placeholder-${v}`
|
|
1515
|
+
))
|
|
1516
|
+
] }) }) }) }),
|
|
1517
|
+
B && /* @__PURE__ */ l(J.Error, { mt: 8, children: _ })
|
|
1518
|
+
] });
|
|
1519
|
+
}, eo = "style-module__Pagination___xcR-Q", to = "style-module__Pagination__PageIndex___50SZJ", ro = "style-module__Pagination__Arrow___74vp3", le = {
|
|
1520
|
+
Pagination: eo,
|
|
1521
|
+
Pagination__PageIndex: to,
|
|
568
1522
|
"Pagination__PageIndex--Active": "style-module__Pagination__PageIndex--Active___mSIwS",
|
|
569
|
-
Pagination__Arrow:
|
|
570
|
-
},
|
|
571
|
-
currentPageIdx:
|
|
572
|
-
rowsPerPage:
|
|
573
|
-
totalLength:
|
|
574
|
-
paginationSize:
|
|
575
|
-
onPageChange:
|
|
576
|
-
...
|
|
1523
|
+
Pagination__Arrow: ro
|
|
1524
|
+
}, ua = ({
|
|
1525
|
+
currentPageIdx: e,
|
|
1526
|
+
rowsPerPage: r,
|
|
1527
|
+
totalLength: n,
|
|
1528
|
+
paginationSize: t,
|
|
1529
|
+
onPageChange: o,
|
|
1530
|
+
...s
|
|
577
1531
|
}) => {
|
|
578
|
-
const [
|
|
579
|
-
|
|
580
|
-
i(
|
|
581
|
-
}, [
|
|
582
|
-
const
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
|
|
1532
|
+
const [a, i] = L(e), c = r || 50, p = n || 1, m = t || 5;
|
|
1533
|
+
X(() => {
|
|
1534
|
+
i(e);
|
|
1535
|
+
}, [e]);
|
|
1536
|
+
const _ = () => {
|
|
1537
|
+
o && o(a - (a % m + 1)), i((u) => u - (u % m + 1));
|
|
1538
|
+
}, d = () => {
|
|
1539
|
+
o && o(a + m - a % m), i((u) => u + m - u % m);
|
|
586
1540
|
};
|
|
587
|
-
return /* @__PURE__ */
|
|
588
|
-
|
|
589
|
-
new Array(
|
|
590
|
-
const h = Math.floor(
|
|
1541
|
+
return /* @__PURE__ */ x("div", { ...s, className: le.Pagination, children: [
|
|
1542
|
+
a >= m ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: _, children: /* @__PURE__ */ l(Je, { size: 20 }) }) : null,
|
|
1543
|
+
new Array(m).fill(0).map((u, f) => {
|
|
1544
|
+
const h = Math.floor(a / m) * m + f + 1;
|
|
591
1545
|
if (!(h > Math.ceil(p / c)))
|
|
592
1546
|
return /* @__PURE__ */ l(
|
|
593
1547
|
"button",
|
|
594
1548
|
{
|
|
595
|
-
className:
|
|
1549
|
+
className: a === h - 1 ? le["Pagination__PageIndex--Active"] : le.Pagination__PageIndex,
|
|
596
1550
|
onClick: () => {
|
|
597
|
-
i(h - 1),
|
|
1551
|
+
i(h - 1), o && o(h - 1);
|
|
598
1552
|
},
|
|
599
1553
|
children: h
|
|
600
1554
|
},
|
|
601
|
-
`pagination_${
|
|
1555
|
+
`pagination_${f}`
|
|
602
1556
|
);
|
|
603
1557
|
}),
|
|
604
|
-
Math.floor(
|
|
1558
|
+
Math.floor(a / m) * m + m < Math.ceil(p / c) ? /* @__PURE__ */ l("button", { className: le.Pagination__Arrow, onClick: d, children: /* @__PURE__ */ l(Ke, { size: 20 }) }) : null
|
|
605
1559
|
] });
|
|
606
|
-
},
|
|
1560
|
+
}, Pe = {
|
|
607
1561
|
"Radio--Small": "styles-module__Radio--Small___izWI2",
|
|
608
1562
|
"Radio--Medium": "styles-module__Radio--Medium___dwZfV",
|
|
609
1563
|
"Radio--Large": "styles-module__Radio--Large___1gLra"
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
1564
|
+
}, no = {
|
|
1565
|
+
sm: Pe["Radio--Small"],
|
|
1566
|
+
md: Pe["Radio--Medium"],
|
|
1567
|
+
lg: Pe["Radio--Large"]
|
|
1568
|
+
}, oo = {
|
|
1569
|
+
sm: 18,
|
|
1570
|
+
md: 24,
|
|
1571
|
+
lg: 32
|
|
1572
|
+
}, ma = ({ size: e = "md", ...r }) => {
|
|
1573
|
+
const n = no[e], t = oo[e];
|
|
1574
|
+
return /* @__PURE__ */ l(
|
|
1575
|
+
bt,
|
|
1576
|
+
{
|
|
1577
|
+
className: n,
|
|
1578
|
+
size: e,
|
|
1579
|
+
styles: {
|
|
1580
|
+
inner: { width: t, height: t }
|
|
1581
|
+
},
|
|
1582
|
+
...r
|
|
1583
|
+
}
|
|
1584
|
+
);
|
|
1585
|
+
}, ao = "styles-module__SearchBar__Wrapper___oq49s", so = "styles-module__SearchBar__Description___vucS-", io = "styles-module__SearchBar__ErrorMsg___TOeoy", lo = "styles-module__SearchBar__ClearButton___S-y4P", V = {
|
|
614
1586
|
"SearchBar--LeftLabel": "styles-module__SearchBar--LeftLabel___CeYTM",
|
|
615
1587
|
"SearchBar--TopLabel": "styles-module__SearchBar--TopLabel___spN3I",
|
|
616
1588
|
"SearchBar__Label--Small": "styles-module__SearchBar__Label--Small___zS1L2",
|
|
@@ -619,93 +1591,89 @@ const J = {
|
|
|
619
1591
|
"SearchBar__Tooltip--Small": "styles-module__SearchBar__Tooltip--Small___YhmEr",
|
|
620
1592
|
"SearchBar__Tooltip--Medium": "styles-module__SearchBar__Tooltip--Medium___4JhOv",
|
|
621
1593
|
"SearchBar__Tooltip--Large": "styles-module__SearchBar__Tooltip--Large___IEoPv",
|
|
622
|
-
SearchBar__Wrapper:
|
|
1594
|
+
SearchBar__Wrapper: ao,
|
|
623
1595
|
"SearchBar--Small": "styles-module__SearchBar--Small___SY9CN",
|
|
624
1596
|
"SearchBar--Medium": "styles-module__SearchBar--Medium___vLP08",
|
|
625
1597
|
"SearchBar--Large": "styles-module__SearchBar--Large___JHfHP",
|
|
626
|
-
SearchBar__Description:
|
|
627
|
-
SearchBar__ErrorMsg:
|
|
628
|
-
SearchBar__ClearButton:
|
|
629
|
-
},
|
|
630
|
-
label:
|
|
631
|
-
labelPosition:
|
|
632
|
-
size:
|
|
633
|
-
required:
|
|
634
|
-
tooltip:
|
|
635
|
-
tooltipPosition:
|
|
636
|
-
errorMsg:
|
|
1598
|
+
SearchBar__Description: so,
|
|
1599
|
+
SearchBar__ErrorMsg: io,
|
|
1600
|
+
SearchBar__ClearButton: lo
|
|
1601
|
+
}, pa = ({
|
|
1602
|
+
label: e,
|
|
1603
|
+
labelPosition: r = "top",
|
|
1604
|
+
size: n = "md",
|
|
1605
|
+
required: t,
|
|
1606
|
+
tooltip: o,
|
|
1607
|
+
tooltipPosition: s = "top",
|
|
1608
|
+
errorMsg: a,
|
|
637
1609
|
description: i,
|
|
638
1610
|
onChange: c,
|
|
639
1611
|
onClear: p,
|
|
640
|
-
...
|
|
1612
|
+
...m
|
|
641
1613
|
}) => {
|
|
642
|
-
const [
|
|
643
|
-
let u =
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
(
|
|
647
|
-
c && (
|
|
1614
|
+
const [_, d] = L(0);
|
|
1615
|
+
let u = V["SearchBar__Label--Medium"], f = V["SearchBar--Medium"], h = V["SearchBar__Tooltip--Medium"];
|
|
1616
|
+
n === "sm" ? (u = V["SearchBar__Label--Small"], f = V["SearchBar--Small"], h = V["SearchBar__Tooltip--Small"]) : n === "lg" && (u = V["SearchBar__Label--Large"], f = V["SearchBar--Large"], h = V["SearchBar__Tooltip--Large"]);
|
|
1617
|
+
const y = Y(
|
|
1618
|
+
(g) => {
|
|
1619
|
+
c && (d(g?.length), c(g));
|
|
648
1620
|
},
|
|
649
1621
|
[c]
|
|
650
1622
|
);
|
|
651
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ x(
|
|
652
1624
|
"div",
|
|
653
1625
|
{
|
|
654
|
-
className:
|
|
1626
|
+
className: r === "top" ? V["SearchBar--TopLabel"] : V["SearchBar--LeftLabel"],
|
|
655
1627
|
children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
|
|
658
|
-
|
|
1628
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1629
|
+
e && /* @__PURE__ */ l(J.Label, { required: t, className: u, children: e }),
|
|
1630
|
+
o && /* @__PURE__ */ l(fe, { label: o, position: s, children: /* @__PURE__ */ l("div", { className: h, children: /* @__PURE__ */ l(Ee, { size: n === "sm" ? 14 : n === "lg" ? 20 : 16 }) }) })
|
|
659
1631
|
] }),
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */ l("div", { className:
|
|
662
|
-
|
|
1632
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1633
|
+
/* @__PURE__ */ l("div", { className: V.SearchBar__Wrapper, children: /* @__PURE__ */ l(
|
|
1634
|
+
St,
|
|
663
1635
|
{
|
|
664
|
-
...
|
|
665
|
-
size:
|
|
666
|
-
error:
|
|
667
|
-
className:
|
|
668
|
-
onChange:
|
|
669
|
-
leftSection: /* @__PURE__ */ l(jt, { size:
|
|
670
|
-
rightSection: p &&
|
|
1636
|
+
...m,
|
|
1637
|
+
size: n,
|
|
1638
|
+
error: a,
|
|
1639
|
+
className: f,
|
|
1640
|
+
onChange: y,
|
|
1641
|
+
leftSection: /* @__PURE__ */ l(jt, { size: n === "sm" ? 16 : n === "lg" ? 24 : 20 }),
|
|
1642
|
+
rightSection: p && _ > 0 ? /* @__PURE__ */ l("div", { className: V.SearchBar__ClearButton, onClick: p, children: /* @__PURE__ */ l(Ae, { size: n === "sm" ? 16 : n === "lg" ? 24 : 20 }) }) : void 0
|
|
671
1643
|
}
|
|
672
1644
|
) }),
|
|
673
|
-
i && /* @__PURE__ */ l(
|
|
674
|
-
|
|
1645
|
+
i && /* @__PURE__ */ l(J.Description, { className: V.SearchBar__Description, children: i }),
|
|
1646
|
+
a && /* @__PURE__ */ l(J.Error, { className: V.SearchBar__ErrorMsg, children: a })
|
|
675
1647
|
] })
|
|
676
1648
|
]
|
|
677
1649
|
}
|
|
678
1650
|
);
|
|
679
|
-
},
|
|
1651
|
+
}, Me = {
|
|
680
1652
|
"SegmentButton--Small": "styles-module__SegmentButton--Small___o0Y3t",
|
|
681
1653
|
"SegmentButton--Medium": "styles-module__SegmentButton--Medium___EgCJm",
|
|
682
1654
|
"SegmentButton--Large": "styles-module__SegmentButton--Large___Ym86C"
|
|
683
|
-
},
|
|
684
|
-
let
|
|
685
|
-
return
|
|
686
|
-
|
|
1655
|
+
}, fa = ({ size: e = "md", radius: r = 6, ...n }) => {
|
|
1656
|
+
let t = Me["SegmentButton--Medium"];
|
|
1657
|
+
return e === "sm" ? t = Me["SegmentButton--Small"] : e === "lg" && (t = Me["SegmentButton--Large"]), /* @__PURE__ */ l(
|
|
1658
|
+
Tt,
|
|
687
1659
|
{
|
|
688
|
-
className:
|
|
689
|
-
size:
|
|
690
|
-
radius:
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
borderWidth: "0 !important"
|
|
694
|
-
}
|
|
695
|
-
},
|
|
696
|
-
...o
|
|
1660
|
+
className: t,
|
|
1661
|
+
size: e,
|
|
1662
|
+
radius: r,
|
|
1663
|
+
withItemsBorders: !1,
|
|
1664
|
+
...n
|
|
697
1665
|
}
|
|
698
1666
|
);
|
|
699
|
-
},
|
|
700
|
-
Tab__TitleList:
|
|
701
|
-
Tab__BorderBottom:
|
|
702
|
-
},
|
|
703
|
-
/* @__PURE__ */ l(
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */ l("div", { className:
|
|
706
|
-
] }, `tab_${
|
|
707
|
-
|
|
708
|
-
] }),
|
|
1667
|
+
}, co = "styles-module__Tab__TitleList___urHWH", _o = "styles-module__Tab__BorderBottom___eMTpl", We = {
|
|
1668
|
+
Tab__TitleList: co,
|
|
1669
|
+
Tab__BorderBottom: _o
|
|
1670
|
+
}, ha = ({ tabList: e = [], containerPaddingTop: r, ...n }) => /* @__PURE__ */ x(ce, { ...n, children: [
|
|
1671
|
+
/* @__PURE__ */ l(ce.List, { className: We.Tab__TitleList, children: e?.map((t, o) => /* @__PURE__ */ x(ce.Tab, { value: t.value, leftSection: t.icon, children: [
|
|
1672
|
+
t.title,
|
|
1673
|
+
/* @__PURE__ */ l("div", { className: We.Tab__BorderBottom })
|
|
1674
|
+
] }, `tab_${o}`)) }),
|
|
1675
|
+
e?.map((t, o) => /* @__PURE__ */ l(ce.Panel, { value: t.value, pt: r, children: t.body }, `tab_panel_${o}`))
|
|
1676
|
+
] }), uo = "styles-module__TextField__Wrapper___u6p5Z", mo = "styles-module__TextField__TextCounter___u1jM5", po = "styles-module__TextField__Description___J-kXP", fo = "styles-module__TextField__ErrorMsg___fa6f6", ho = "styles-module__TextField__ClearButton___bB5Ew", Z = {
|
|
709
1677
|
"TextField--LeftLabel": "styles-module__TextField--LeftLabel___hiNn3",
|
|
710
1678
|
"TextField--TopLabel": "styles-module__TextField--TopLabel___V2otc",
|
|
711
1679
|
"TextField__Label--Small": "styles-module__TextField__Label--Small___NkKKA",
|
|
@@ -714,222 +1682,194 @@ const J = {
|
|
|
714
1682
|
"TextField__Tooltip--Small": "styles-module__TextField__Tooltip--Small___GmQHE",
|
|
715
1683
|
"TextField__Tooltip--Medium": "styles-module__TextField__Tooltip--Medium___5P3nA",
|
|
716
1684
|
"TextField__Tooltip--Large": "styles-module__TextField__Tooltip--Large___YSCfu",
|
|
717
|
-
TextField__Wrapper:
|
|
718
|
-
TextField__TextCounter:
|
|
1685
|
+
TextField__Wrapper: uo,
|
|
1686
|
+
TextField__TextCounter: mo,
|
|
719
1687
|
"TextField--Textarea": "styles-module__TextField--Textarea___C2DL5",
|
|
720
1688
|
"TextField--Small": "styles-module__TextField--Small___iuH4t",
|
|
721
1689
|
"TextField--Medium": "styles-module__TextField--Medium___snYod",
|
|
722
1690
|
"TextField--Large": "styles-module__TextField--Large___JoSYk",
|
|
723
|
-
TextField__Description:
|
|
724
|
-
TextField__ErrorMsg:
|
|
725
|
-
TextField__ClearButton:
|
|
726
|
-
},
|
|
1691
|
+
TextField__Description: po,
|
|
1692
|
+
TextField__ErrorMsg: fo,
|
|
1693
|
+
TextField__ClearButton: ho
|
|
1694
|
+
}, go = (e) => typeof e == "string" ? e.length : typeof e == "number" ? String(e).length : Array.isArray(e) ? e.join("").length : 0, ga = (e) => {
|
|
727
1695
|
const {
|
|
728
|
-
label:
|
|
729
|
-
labelPosition:
|
|
730
|
-
size:
|
|
731
|
-
required:
|
|
732
|
-
tooltip:
|
|
733
|
-
tooltipPosition:
|
|
1696
|
+
label: r,
|
|
1697
|
+
labelPosition: n = "top",
|
|
1698
|
+
size: t = "md",
|
|
1699
|
+
required: o,
|
|
1700
|
+
tooltip: s,
|
|
1701
|
+
tooltipPosition: a = "top",
|
|
734
1702
|
errorMsg: i,
|
|
735
1703
|
description: c,
|
|
736
1704
|
textarea: p = !1,
|
|
737
|
-
maxTextCount:
|
|
738
|
-
onChange:
|
|
739
|
-
onClear:
|
|
1705
|
+
maxTextCount: m,
|
|
1706
|
+
onChange: _,
|
|
1707
|
+
onClear: d,
|
|
740
1708
|
...u
|
|
741
|
-
} =
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
1709
|
+
} = e, f = "minRows" in e ? e.minRows : void 0, {
|
|
1710
|
+
value: h,
|
|
1711
|
+
defaultValue: y,
|
|
1712
|
+
...g
|
|
1713
|
+
} = u, k = h !== void 0, [P, O] = L(
|
|
1714
|
+
String(h ?? y ?? "")
|
|
1715
|
+
), N = k ? h : P, W = go(N);
|
|
1716
|
+
let z = Z["TextField__Label--Medium"], B = Z["TextField--Medium"], M = Z["TextField__Tooltip--Medium"];
|
|
1717
|
+
t === "sm" ? (z = Z["TextField__Label--Small"], B = Z["TextField--Small"], M = Z["TextField__Tooltip--Small"]) : t === "lg" && (z = Z["TextField__Label--Large"], B = Z["TextField--Large"], M = Z["TextField__Tooltip--Large"]);
|
|
1718
|
+
const C = Y(
|
|
745
1719
|
(A) => {
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
);
|
|
755
|
-
return /* @__PURE__ */ y(
|
|
1720
|
+
const S = A.currentTarget.value;
|
|
1721
|
+
m && S.length > m || (k || O(S), _ && _(A));
|
|
1722
|
+
},
|
|
1723
|
+
[k, m, _]
|
|
1724
|
+
), E = Y(() => {
|
|
1725
|
+
k || O(""), d?.();
|
|
1726
|
+
}, [k, d]);
|
|
1727
|
+
return /* @__PURE__ */ x(
|
|
756
1728
|
"div",
|
|
757
1729
|
{
|
|
758
|
-
className:
|
|
1730
|
+
className: n === "top" ? Z["TextField--TopLabel"] : Z["TextField--LeftLabel"],
|
|
759
1731
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
|
|
762
|
-
|
|
1732
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1733
|
+
r && /* @__PURE__ */ l(J.Label, { required: o, className: z, children: r }),
|
|
1734
|
+
s && /* @__PURE__ */ l(fe, { label: s, position: a, children: /* @__PURE__ */ l("div", { className: M, children: /* @__PURE__ */ l(Ee, { size: t === "sm" ? 14 : t === "lg" ? 20 : 16 }) }) })
|
|
763
1735
|
] }),
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
1736
|
+
/* @__PURE__ */ x("div", { children: [
|
|
1737
|
+
/* @__PURE__ */ x("div", { className: Z.TextField__Wrapper, children: [
|
|
766
1738
|
p ? /* @__PURE__ */ l(
|
|
767
|
-
|
|
1739
|
+
wt,
|
|
768
1740
|
{
|
|
769
|
-
className:
|
|
770
|
-
size:
|
|
771
|
-
minRows:
|
|
1741
|
+
className: Z["TextField--Textarea"],
|
|
1742
|
+
size: t,
|
|
1743
|
+
minRows: f,
|
|
772
1744
|
error: i,
|
|
773
|
-
onChange:
|
|
774
|
-
|
|
775
|
-
...
|
|
1745
|
+
onChange: C,
|
|
1746
|
+
value: N,
|
|
1747
|
+
...g
|
|
776
1748
|
}
|
|
777
1749
|
) : /* @__PURE__ */ l(
|
|
778
|
-
|
|
1750
|
+
J,
|
|
779
1751
|
{
|
|
780
|
-
className:
|
|
1752
|
+
className: B,
|
|
781
1753
|
error: i,
|
|
782
|
-
onChange:
|
|
783
|
-
|
|
784
|
-
|
|
1754
|
+
onChange: C,
|
|
1755
|
+
value: N,
|
|
1756
|
+
rightSection: d && W > 0 ? /* @__PURE__ */ l(
|
|
1757
|
+
"button",
|
|
1758
|
+
{
|
|
1759
|
+
type: "button",
|
|
1760
|
+
className: Z.TextField__ClearButton,
|
|
1761
|
+
"aria-label": "입력 내용 지우기",
|
|
1762
|
+
onClick: E,
|
|
1763
|
+
children: /* @__PURE__ */ l(Ae, { size: t === "sm" ? 16 : t === "lg" ? 24 : 20 })
|
|
1764
|
+
}
|
|
1765
|
+
) : void 0,
|
|
1766
|
+
...g
|
|
785
1767
|
}
|
|
786
1768
|
),
|
|
787
|
-
|
|
1769
|
+
m && m > 0 && /* @__PURE__ */ l(
|
|
788
1770
|
"span",
|
|
789
1771
|
{
|
|
790
|
-
className:
|
|
791
|
-
children: `${
|
|
1772
|
+
className: Z.TextField__TextCounter,
|
|
1773
|
+
children: `${W}/${m}`
|
|
792
1774
|
}
|
|
793
1775
|
)
|
|
794
1776
|
] }),
|
|
795
|
-
c && /* @__PURE__ */ l(
|
|
796
|
-
i && /* @__PURE__ */ l(
|
|
1777
|
+
c && /* @__PURE__ */ l(J.Description, { className: Z.TextField__Description, children: c }),
|
|
1778
|
+
i && /* @__PURE__ */ l(J.Error, { className: Z.TextField__ErrorMsg, children: i })
|
|
797
1779
|
] })
|
|
798
1780
|
]
|
|
799
1781
|
}
|
|
800
1782
|
);
|
|
801
|
-
},
|
|
1783
|
+
}, be = {
|
|
802
1784
|
"TimePicker--Small": "styles-module__TimePicker--Small___nHQa1",
|
|
803
1785
|
"TimePicker--Medium": "styles-module__TimePicker--Medium___E9-rF",
|
|
804
1786
|
"TimePicker--Large": "styles-module__TimePicker--Large___I0M7V"
|
|
805
|
-
},
|
|
806
|
-
const
|
|
807
|
-
let
|
|
808
|
-
return
|
|
809
|
-
|
|
1787
|
+
}, ya = ({ size: e = "md", ...r }) => {
|
|
1788
|
+
const n = oe(null);
|
|
1789
|
+
let t = be["TimePicker--Medium"], o = 18;
|
|
1790
|
+
return e === "sm" ? (t = be["TimePicker--Small"], o = 14) : e === "lg" && (t = be["TimePicker--Large"], o = 24), /* @__PURE__ */ l(
|
|
1791
|
+
Nt,
|
|
810
1792
|
{
|
|
811
|
-
ref:
|
|
812
|
-
className:
|
|
813
|
-
size:
|
|
814
|
-
...
|
|
1793
|
+
ref: n,
|
|
1794
|
+
className: t,
|
|
1795
|
+
size: e,
|
|
1796
|
+
...r,
|
|
815
1797
|
rightSection: /* @__PURE__ */ l(
|
|
816
|
-
|
|
1798
|
+
It,
|
|
817
1799
|
{
|
|
1800
|
+
bg: "transparent",
|
|
818
1801
|
onClick: () => {
|
|
819
|
-
|
|
1802
|
+
n.current?.showPicker?.();
|
|
820
1803
|
},
|
|
821
|
-
children: /* @__PURE__ */ l(
|
|
1804
|
+
children: /* @__PURE__ */ l(Ut, { size: o })
|
|
822
1805
|
}
|
|
823
1806
|
)
|
|
824
1807
|
}
|
|
825
1808
|
);
|
|
826
|
-
},
|
|
827
|
-
Toast: jo,
|
|
828
|
-
Toast__Icon: Vo,
|
|
829
|
-
Toast__Body: Go,
|
|
830
|
-
Toast__Message: Jo
|
|
831
|
-
}, U = (t) => {
|
|
832
|
-
const n = typeof t == "string" ? { message: t } : t, { message: o, id: e, icon: r, autoClose: a } = n;
|
|
833
|
-
V.show({
|
|
834
|
-
id: e,
|
|
835
|
-
message: /* @__PURE__ */ l("div", { className: N.Toast__Message, children: o }),
|
|
836
|
-
icon: r,
|
|
837
|
-
autoClose: a,
|
|
838
|
-
classNames: {
|
|
839
|
-
root: N.Toast,
|
|
840
|
-
body: N.Toast__Body,
|
|
841
|
-
icon: N.Toast__Icon
|
|
842
|
-
},
|
|
843
|
-
withCloseButton: !1,
|
|
844
|
-
withBorder: !1
|
|
845
|
-
});
|
|
846
|
-
};
|
|
847
|
-
U.update = (t, n) => {
|
|
848
|
-
const o = typeof n == "string" ? { message: n } : n, { message: e, icon: r, autoClose: a } = o;
|
|
849
|
-
V.update({
|
|
850
|
-
id: t,
|
|
851
|
-
message: /* @__PURE__ */ l("div", { className: N.Toast__Message, children: e }),
|
|
852
|
-
icon: r,
|
|
853
|
-
autoClose: a,
|
|
854
|
-
classNames: {
|
|
855
|
-
root: N.Toast,
|
|
856
|
-
body: N.Toast__Body,
|
|
857
|
-
icon: N.Toast__Icon
|
|
858
|
-
},
|
|
859
|
-
withCloseButton: !1,
|
|
860
|
-
withBorder: !1
|
|
861
|
-
});
|
|
862
|
-
};
|
|
863
|
-
U.hide = (t) => {
|
|
864
|
-
V.hide(t);
|
|
865
|
-
};
|
|
866
|
-
U.clean = () => {
|
|
867
|
-
V.clean();
|
|
868
|
-
};
|
|
869
|
-
const ee = {
|
|
1809
|
+
}, Se = {
|
|
870
1810
|
"Toggle--Small": "styles-module__Toggle--Small___sOjUd",
|
|
871
1811
|
"Toggle--Medium": "styles-module__Toggle--Medium___yIb8v",
|
|
872
1812
|
"Toggle--Large": "styles-module__Toggle--Large___ZOJj1"
|
|
873
|
-
},
|
|
874
|
-
size:
|
|
875
|
-
labelPosition:
|
|
876
|
-
disabled:
|
|
877
|
-
onChange:
|
|
878
|
-
...
|
|
1813
|
+
}, ka = ({
|
|
1814
|
+
size: e = "md",
|
|
1815
|
+
labelPosition: r = "right",
|
|
1816
|
+
disabled: n,
|
|
1817
|
+
onChange: t,
|
|
1818
|
+
...o
|
|
879
1819
|
}) => {
|
|
880
|
-
const [
|
|
881
|
-
let i =
|
|
882
|
-
|
|
883
|
-
const p =
|
|
884
|
-
(
|
|
885
|
-
|
|
886
|
-
},
|
|
887
|
-
[
|
|
1820
|
+
const [s, a] = L(o?.checked || !1);
|
|
1821
|
+
let i = Se["Toggle--Medium"], c = 50;
|
|
1822
|
+
e === "sm" ? (i = Se["Toggle--Small"], c = 38) : e === "lg" && (i = Se["Toggle--Large"], c = 67);
|
|
1823
|
+
const p = Y(
|
|
1824
|
+
(m) => {
|
|
1825
|
+
t && t(m), a(m?.target?.checked);
|
|
1826
|
+
},
|
|
1827
|
+
[t]
|
|
888
1828
|
);
|
|
889
1829
|
return /* @__PURE__ */ l(
|
|
890
|
-
|
|
1830
|
+
Lt,
|
|
891
1831
|
{
|
|
892
1832
|
className: i,
|
|
893
|
-
size:
|
|
894
|
-
labelPosition:
|
|
895
|
-
disabled:
|
|
1833
|
+
size: e,
|
|
1834
|
+
labelPosition: r,
|
|
1835
|
+
disabled: n,
|
|
896
1836
|
onChange: p,
|
|
897
1837
|
styles: () => ({
|
|
898
1838
|
track: {
|
|
899
|
-
backgroundColor: !
|
|
900
|
-
borderColor: !
|
|
1839
|
+
backgroundColor: !n && s ? "#0fd3d8 !important" : void 0,
|
|
1840
|
+
borderColor: !n && s ? "#0fd3d8 !important" : void 0,
|
|
901
1841
|
width: c
|
|
902
1842
|
}
|
|
903
1843
|
}),
|
|
904
|
-
...
|
|
1844
|
+
...o
|
|
905
1845
|
}
|
|
906
1846
|
);
|
|
907
|
-
},
|
|
908
|
-
Tooltip__Body:
|
|
909
|
-
Tooltip__Title:
|
|
910
|
-
Tooltip__Content:
|
|
911
|
-
},
|
|
912
|
-
title:
|
|
913
|
-
content:
|
|
914
|
-
maw:
|
|
915
|
-
multiline:
|
|
916
|
-
...
|
|
1847
|
+
}, yo = "styles-module__Tooltip__Body___i1OTG", ko = "styles-module__Tooltip__Title___E0LoV", Co = "styles-module__Tooltip__Content___lU5gr", Te = {
|
|
1848
|
+
Tooltip__Body: yo,
|
|
1849
|
+
Tooltip__Title: ko,
|
|
1850
|
+
Tooltip__Content: Co
|
|
1851
|
+
}, Ca = ({
|
|
1852
|
+
title: e,
|
|
1853
|
+
content: r,
|
|
1854
|
+
maw: n = 280,
|
|
1855
|
+
multiline: t = !0,
|
|
1856
|
+
...o
|
|
917
1857
|
}) => /* @__PURE__ */ l(
|
|
918
|
-
|
|
1858
|
+
fe,
|
|
919
1859
|
{
|
|
920
|
-
...
|
|
921
|
-
maw:
|
|
922
|
-
multiline:
|
|
923
|
-
label: /* @__PURE__ */
|
|
924
|
-
|
|
925
|
-
/* @__PURE__ */ l("span", { className:
|
|
1860
|
+
...o,
|
|
1861
|
+
maw: n,
|
|
1862
|
+
multiline: t,
|
|
1863
|
+
label: /* @__PURE__ */ x("div", { className: Te.Tooltip__Body, children: [
|
|
1864
|
+
e && /* @__PURE__ */ l("span", { className: Te.Tooltip__Title, children: e }),
|
|
1865
|
+
/* @__PURE__ */ l("span", { className: Te.Tooltip__Content, children: r })
|
|
926
1866
|
] })
|
|
927
1867
|
}
|
|
928
|
-
),
|
|
929
|
-
const { name:
|
|
1868
|
+
), Do = (e) => {
|
|
1869
|
+
const { name: r, icon: n } = e;
|
|
930
1870
|
return `
|
|
931
1871
|
<div class="pin-marker">
|
|
932
|
-
${
|
|
1872
|
+
${n ? `<img src="${n}" alt="${r}" width="40" height="40" />` : `
|
|
933
1873
|
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
934
1874
|
<g>
|
|
935
1875
|
<path d="M18.7686 1.26235C11.6407 0.936128 5.75293 6.62941 5.75293 13.6913C5.75293 22.565 11.76 30.0415 15.1594 33.4869C16.8117 35.1766 19.5261 35.1761 21.1779 33.4854C24.318 30.2845 29.8102 23.653 30.5636 15.5539L30.5637 15.5531C31.2237 8.38935 26.1199 1.59187 18.7686 1.26235ZM18.7686 1.26235L18.7229 2.26131L18.7676 1.2623C18.768 1.26232 18.7683 1.26234 18.7686 1.26235Z" fill="#FF6C6C" stroke="white" stroke-width="2" stroke-miterlimit="10"/>
|
|
@@ -937,65 +1877,65 @@ const ee = {
|
|
|
937
1877
|
</g>
|
|
938
1878
|
</svg>
|
|
939
1879
|
`}
|
|
940
|
-
<div class="pin-marker-name">${
|
|
1880
|
+
<div class="pin-marker-name">${r}</div>
|
|
941
1881
|
</div>
|
|
942
1882
|
`;
|
|
943
|
-
},
|
|
944
|
-
const { discountRate:
|
|
1883
|
+
}, xo = (e) => {
|
|
1884
|
+
const { discountRate: r, price: n, originalPrice: t, category: o, active: s, title: a } = e;
|
|
945
1885
|
return `
|
|
946
|
-
<div class="popdeal-marker" active="${!!
|
|
1886
|
+
<div class="popdeal-marker" active="${!!s}">
|
|
947
1887
|
<div class="popdeal-marker-section">
|
|
948
1888
|
<div class="popdeal-marker-section-header">
|
|
949
|
-
<span class="popdeal-marker-title">${
|
|
950
|
-
${
|
|
1889
|
+
<span class="popdeal-marker-title">${a}</span>
|
|
1890
|
+
${o ? `<span class="popdeal-marker-category">${o}</span>` : ""}
|
|
951
1891
|
</div>
|
|
952
1892
|
<div class="popdeal-marker-section-price">
|
|
953
|
-
${
|
|
954
|
-
${
|
|
955
|
-
<span class="popdeal-marker-discounted_price">${
|
|
1893
|
+
${t ? `<span class="popdeal-marker-original_price">${t.toLocaleString()}원</span>` : ""}
|
|
1894
|
+
${r ? `<span class="popdeal-marker-discount_rate">${r}%</span>` : ""}
|
|
1895
|
+
<span class="popdeal-marker-discounted_price">${n.toLocaleString()}원</span>
|
|
956
1896
|
</div>
|
|
957
1897
|
</div>
|
|
958
1898
|
</div>
|
|
959
1899
|
`;
|
|
960
|
-
},
|
|
961
|
-
const { title:
|
|
1900
|
+
}, Po = (e) => {
|
|
1901
|
+
const { title: r, icon: n } = e;
|
|
962
1902
|
return `
|
|
963
1903
|
<div class="pi-marker">
|
|
964
|
-
${
|
|
965
|
-
<span class="pi-marker-text">${
|
|
1904
|
+
${n ? `<img class="pi-marker-icon" src="${n}" alt="" width="32px" height="32px" />` : ""}
|
|
1905
|
+
<span class="pi-marker-text">${r}</span>
|
|
966
1906
|
</div>
|
|
967
1907
|
`;
|
|
968
|
-
},
|
|
969
|
-
const { title:
|
|
1908
|
+
}, Mo = (e) => {
|
|
1909
|
+
const { title: r, icon: n, address: t } = e;
|
|
970
1910
|
return `
|
|
971
1911
|
<div class="pi-expanded-marker">
|
|
972
|
-
${
|
|
1912
|
+
${n ? `<img class="pi-expanded-marker-icon" src="${n}" alt="" width="32px" height="32px" />` : ""}
|
|
973
1913
|
<div class="pi-expanded-marker-content">
|
|
974
|
-
<div class="pi-expanded-marker-title">${
|
|
975
|
-
${
|
|
1914
|
+
<div class="pi-expanded-marker-title">${r}</div>
|
|
1915
|
+
${t ? `<div class="pi-expanded-marker-address">${t}</div>` : ""}
|
|
976
1916
|
</div>
|
|
977
1917
|
</div>
|
|
978
1918
|
`;
|
|
979
|
-
},
|
|
1919
|
+
}, bo = (e) => `
|
|
980
1920
|
<div class="cluster-marker">
|
|
981
|
-
<span class="cluster-marker-text">${
|
|
1921
|
+
<span class="cluster-marker-text">${e.count}</span>
|
|
982
1922
|
</div>
|
|
983
|
-
`,
|
|
984
|
-
switch (
|
|
1923
|
+
`, Ze = (e) => {
|
|
1924
|
+
switch (e.type) {
|
|
985
1925
|
case "pin":
|
|
986
|
-
return
|
|
1926
|
+
return Do(e);
|
|
987
1927
|
case "popdeal":
|
|
988
|
-
return
|
|
1928
|
+
return xo(e);
|
|
989
1929
|
case "pi":
|
|
990
|
-
return
|
|
1930
|
+
return Po(e);
|
|
991
1931
|
case "pi-expanded":
|
|
992
|
-
return
|
|
1932
|
+
return Mo(e);
|
|
993
1933
|
case "cluster":
|
|
994
|
-
return
|
|
1934
|
+
return bo(e);
|
|
995
1935
|
default:
|
|
996
1936
|
return "";
|
|
997
1937
|
}
|
|
998
|
-
},
|
|
1938
|
+
}, So = `
|
|
999
1939
|
/* Common marker styles */
|
|
1000
1940
|
[class$="marker"] {
|
|
1001
1941
|
user-select: none;
|
|
@@ -1270,49 +2210,49 @@ const ee = {
|
|
|
1270
2210
|
background: #00C4C4;
|
|
1271
2211
|
transform: translate(-50%) rotate(45deg);
|
|
1272
2212
|
}
|
|
1273
|
-
`,
|
|
2213
|
+
`, pt = Be(null), je = "naver-map-script", To = (e, r) => new Promise((n, t) => {
|
|
1274
2214
|
if (typeof window < "u" && window.naver?.maps) {
|
|
1275
|
-
|
|
2215
|
+
n();
|
|
1276
2216
|
return;
|
|
1277
2217
|
}
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
1280
|
-
|
|
2218
|
+
const o = document.getElementById(je);
|
|
2219
|
+
if (o) {
|
|
2220
|
+
o.addEventListener("load", () => n()), o.addEventListener(
|
|
1281
2221
|
"error",
|
|
1282
|
-
() =>
|
|
2222
|
+
() => t(new Error("Failed to load Naver Map script"))
|
|
1283
2223
|
);
|
|
1284
2224
|
return;
|
|
1285
2225
|
}
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
},
|
|
1290
|
-
|
|
1291
|
-
}, document.head.appendChild(
|
|
1292
|
-
}),
|
|
1293
|
-
clientId:
|
|
1294
|
-
language:
|
|
1295
|
-
children:
|
|
2226
|
+
const s = document.createElement("script");
|
|
2227
|
+
s.id = je, s.src = `https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${e}&language=${r}`, s.async = !0, s.onload = () => {
|
|
2228
|
+
n();
|
|
2229
|
+
}, s.onerror = () => {
|
|
2230
|
+
t(new Error("Failed to load Naver Map script"));
|
|
2231
|
+
}, document.head.appendChild(s);
|
|
2232
|
+
}), wo = ({
|
|
2233
|
+
clientId: e,
|
|
2234
|
+
language: r = "ko",
|
|
2235
|
+
children: n
|
|
1296
2236
|
}) => {
|
|
1297
|
-
const [
|
|
1298
|
-
|
|
1299
|
-
typeof window > "u" ||
|
|
1300
|
-
window.naver &&
|
|
1301
|
-
}).catch((
|
|
1302
|
-
console.error("Naver Map script loading failed:",
|
|
2237
|
+
const [t, o] = L(null), [s, a] = L({}), [i, c] = L(null);
|
|
2238
|
+
X(() => {
|
|
2239
|
+
typeof window > "u" || To(e, r).then(() => {
|
|
2240
|
+
window.naver && o(window.naver);
|
|
2241
|
+
}).catch((m) => {
|
|
2242
|
+
console.error("Naver Map script loading failed:", m), c(m);
|
|
1303
2243
|
});
|
|
1304
|
-
}, [
|
|
1305
|
-
const p =
|
|
1306
|
-
(
|
|
1307
|
-
const
|
|
1308
|
-
if (!
|
|
2244
|
+
}, [e, r]);
|
|
2245
|
+
const p = Y(
|
|
2246
|
+
(m, _) => {
|
|
2247
|
+
const d = t || (typeof window < "u" ? window.naver : null);
|
|
2248
|
+
if (!d || (!t && window.naver && o(window.naver), !m.current))
|
|
1309
2249
|
return null;
|
|
1310
|
-
const u =
|
|
2250
|
+
const u = m.current;
|
|
1311
2251
|
if (!u.isConnected)
|
|
1312
2252
|
return null;
|
|
1313
2253
|
try {
|
|
1314
|
-
const
|
|
1315
|
-
center: new
|
|
2254
|
+
const f = {
|
|
2255
|
+
center: new d.maps.LatLng(37.5665, 126.978),
|
|
1316
2256
|
// 서울 시청 기본 좌표
|
|
1317
2257
|
zoom: 11,
|
|
1318
2258
|
maxZoom: 20,
|
|
@@ -1322,27 +2262,27 @@ const ee = {
|
|
|
1322
2262
|
logoControl: !1,
|
|
1323
2263
|
mapDataControl: !1,
|
|
1324
2264
|
zoomControl: !1,
|
|
1325
|
-
...
|
|
1326
|
-
}, h = new
|
|
1327
|
-
return
|
|
1328
|
-
const
|
|
1329
|
-
return { ...
|
|
2265
|
+
..._
|
|
2266
|
+
}, h = new d.maps.Map(u, f);
|
|
2267
|
+
return a((y) => {
|
|
2268
|
+
const g = u.getAttribute("id") || "default";
|
|
2269
|
+
return { ...y, [g]: h };
|
|
1330
2270
|
}), h;
|
|
1331
|
-
} catch (
|
|
1332
|
-
return console.error("Map creation error:",
|
|
2271
|
+
} catch (f) {
|
|
2272
|
+
return console.error("Map creation error:", f), null;
|
|
1333
2273
|
}
|
|
1334
2274
|
},
|
|
1335
|
-
[
|
|
2275
|
+
[t]
|
|
1336
2276
|
);
|
|
1337
|
-
return i && console.error("NaverMapProvider error:", i), /* @__PURE__ */ l(
|
|
1338
|
-
},
|
|
1339
|
-
const
|
|
1340
|
-
if (!
|
|
2277
|
+
return i && console.error("NaverMapProvider error:", i), /* @__PURE__ */ l(pt.Provider, { value: { naver: t, createMap: p, maps: s }, children: n });
|
|
2278
|
+
}, ft = () => {
|
|
2279
|
+
const e = ve(pt);
|
|
2280
|
+
if (!e)
|
|
1341
2281
|
throw new Error("useNaverMap must be used within NaverMapProvider");
|
|
1342
|
-
return
|
|
2282
|
+
return e;
|
|
1343
2283
|
};
|
|
1344
|
-
function
|
|
1345
|
-
const
|
|
2284
|
+
function Io(e) {
|
|
2285
|
+
const r = function(t) {
|
|
1346
2286
|
this.DEFAULT_OPTIONS = {
|
|
1347
2287
|
map: null,
|
|
1348
2288
|
markers: [],
|
|
@@ -1355,96 +2295,96 @@ function ir(t) {
|
|
|
1355
2295
|
averageCenter: !1,
|
|
1356
2296
|
stylingFunction: function() {
|
|
1357
2297
|
}
|
|
1358
|
-
}, this._clusters = [], this._mapRelations = null, this._markerRelations = [], this.setOptions(
|
|
2298
|
+
}, this._clusters = [], this._mapRelations = null, this._markerRelations = [], this.setOptions(e.maps.Util.extend({}, this.DEFAULT_OPTIONS, t), !0), this.setMap(t.map || null);
|
|
1359
2299
|
};
|
|
1360
|
-
|
|
2300
|
+
e.maps.Util.ClassExtend(r, e.maps.OverlayView, {
|
|
1361
2301
|
onAdd: function() {
|
|
1362
|
-
const
|
|
1363
|
-
this._mapRelations =
|
|
1364
|
-
|
|
2302
|
+
const t = this.getMap();
|
|
2303
|
+
this._mapRelations = e.maps.Event.addListener(
|
|
2304
|
+
t,
|
|
1365
2305
|
"idle",
|
|
1366
|
-
|
|
2306
|
+
e.maps.Util.bind(this._onIdle, this)
|
|
1367
2307
|
), this.getMarkers().length > 0 && (this._createClusters(), this._updateClusters());
|
|
1368
2308
|
},
|
|
1369
|
-
draw:
|
|
2309
|
+
draw: e.maps.Util.noop,
|
|
1370
2310
|
onRemove: function() {
|
|
1371
|
-
|
|
2311
|
+
e.maps.Event.removeListener(this._mapRelation), this._clearClusters(), this._geoTree = null, this._mapRelation = null;
|
|
1372
2312
|
},
|
|
1373
|
-
setOptions: function(
|
|
1374
|
-
const
|
|
1375
|
-
if (typeof
|
|
1376
|
-
const
|
|
1377
|
-
|
|
2313
|
+
setOptions: function(t) {
|
|
2314
|
+
const o = this;
|
|
2315
|
+
if (typeof t == "string") {
|
|
2316
|
+
const s = t, a = arguments[1];
|
|
2317
|
+
o.set(s, a);
|
|
1378
2318
|
} else {
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
i !== "map" &&
|
|
1382
|
-
}),
|
|
2319
|
+
const s = arguments[1];
|
|
2320
|
+
e.maps.Util.forEach(t, function(a, i) {
|
|
2321
|
+
i !== "map" && o.set(i, a);
|
|
2322
|
+
}), t.map && !s && o.setMap(t.map);
|
|
1383
2323
|
}
|
|
1384
2324
|
},
|
|
1385
|
-
getOptions: function(
|
|
1386
|
-
const
|
|
1387
|
-
return
|
|
1388
|
-
|
|
1389
|
-
}),
|
|
2325
|
+
getOptions: function(t) {
|
|
2326
|
+
const o = this, s = {};
|
|
2327
|
+
return t !== void 0 ? o.get(t) : (e.maps.Util.forEach(o.DEFAULT_OPTIONS, function(a, i) {
|
|
2328
|
+
s[i] = o.get(i);
|
|
2329
|
+
}), s);
|
|
1390
2330
|
},
|
|
1391
2331
|
getMinClusterSize: function() {
|
|
1392
2332
|
return this.getOptions("minClusterSize");
|
|
1393
2333
|
},
|
|
1394
|
-
setMinClusterSize: function(
|
|
1395
|
-
this.setOptions("minClusterSize",
|
|
2334
|
+
setMinClusterSize: function(t) {
|
|
2335
|
+
this.setOptions("minClusterSize", t);
|
|
1396
2336
|
},
|
|
1397
2337
|
getMaxZoom: function() {
|
|
1398
2338
|
return this.getOptions("maxZoom");
|
|
1399
2339
|
},
|
|
1400
|
-
setMaxZoom: function(
|
|
1401
|
-
this.setOptions("maxZoom",
|
|
2340
|
+
setMaxZoom: function(t) {
|
|
2341
|
+
this.setOptions("maxZoom", t);
|
|
1402
2342
|
},
|
|
1403
2343
|
getGridSize: function() {
|
|
1404
2344
|
return this.getOptions("gridSize");
|
|
1405
2345
|
},
|
|
1406
|
-
setGridSize: function(
|
|
1407
|
-
this.setOptions("gridSize",
|
|
2346
|
+
setGridSize: function(t) {
|
|
2347
|
+
this.setOptions("gridSize", t);
|
|
1408
2348
|
},
|
|
1409
2349
|
getIndexGenerator: function() {
|
|
1410
2350
|
return this.getOptions("indexGenerator");
|
|
1411
2351
|
},
|
|
1412
|
-
setIndexGenerator: function(
|
|
1413
|
-
this.setOptions("indexGenerator",
|
|
2352
|
+
setIndexGenerator: function(t) {
|
|
2353
|
+
this.setOptions("indexGenerator", t);
|
|
1414
2354
|
},
|
|
1415
2355
|
getMarkers: function() {
|
|
1416
2356
|
return this.getOptions("markers");
|
|
1417
2357
|
},
|
|
1418
|
-
setMarkers: function(
|
|
1419
|
-
this.setOptions("markers",
|
|
2358
|
+
setMarkers: function(t) {
|
|
2359
|
+
this.setOptions("markers", t);
|
|
1420
2360
|
},
|
|
1421
2361
|
getIcons: function() {
|
|
1422
2362
|
return this.getOptions("icons");
|
|
1423
2363
|
},
|
|
1424
|
-
setIcons: function(
|
|
1425
|
-
this.setOptions("icons",
|
|
2364
|
+
setIcons: function(t) {
|
|
2365
|
+
this.setOptions("icons", t);
|
|
1426
2366
|
},
|
|
1427
2367
|
getStylingFunction: function() {
|
|
1428
2368
|
return this.getOptions("stylingFunction");
|
|
1429
2369
|
},
|
|
1430
|
-
setStylingFunction: function(
|
|
1431
|
-
this.setOptions("stylingFunction",
|
|
2370
|
+
setStylingFunction: function(t) {
|
|
2371
|
+
this.setOptions("stylingFunction", t);
|
|
1432
2372
|
},
|
|
1433
2373
|
getDisableClickZoom: function() {
|
|
1434
2374
|
return this.getOptions("disableClickZoom");
|
|
1435
2375
|
},
|
|
1436
|
-
setDisableClickZoom: function(
|
|
1437
|
-
this.setOptions("disableClickZoom",
|
|
2376
|
+
setDisableClickZoom: function(t) {
|
|
2377
|
+
this.setOptions("disableClickZoom", t);
|
|
1438
2378
|
},
|
|
1439
2379
|
getAverageCenter: function() {
|
|
1440
2380
|
return this.getOptions("averageCenter");
|
|
1441
2381
|
},
|
|
1442
|
-
setAverageCenter: function(
|
|
1443
|
-
this.setOptions("averageCenter",
|
|
2382
|
+
setAverageCenter: function(t) {
|
|
2383
|
+
this.setOptions("averageCenter", t);
|
|
1444
2384
|
},
|
|
1445
|
-
changed: function(
|
|
2385
|
+
changed: function(t, o) {
|
|
1446
2386
|
if (this.getMap())
|
|
1447
|
-
switch (
|
|
2387
|
+
switch (t) {
|
|
1448
2388
|
case "marker":
|
|
1449
2389
|
case "minClusterSize":
|
|
1450
2390
|
case "gridSize":
|
|
@@ -1453,69 +2393,69 @@ function ir(t) {
|
|
|
1453
2393
|
break;
|
|
1454
2394
|
case "indexGenerator":
|
|
1455
2395
|
case "icons":
|
|
1456
|
-
this._clusters.forEach(function(
|
|
1457
|
-
|
|
2396
|
+
this._clusters.forEach(function(a) {
|
|
2397
|
+
a.updateIcon();
|
|
1458
2398
|
});
|
|
1459
2399
|
break;
|
|
1460
2400
|
case "maxZoom":
|
|
1461
|
-
this._clusters.forEach(function(
|
|
1462
|
-
|
|
2401
|
+
this._clusters.forEach(function(a) {
|
|
2402
|
+
a.getCount() > 1 && a.checkByZoomAndMinClusterSize();
|
|
1463
2403
|
});
|
|
1464
2404
|
break;
|
|
1465
2405
|
case "stylingFunction":
|
|
1466
|
-
this._clusters.forEach(function(
|
|
1467
|
-
|
|
2406
|
+
this._clusters.forEach(function(a) {
|
|
2407
|
+
a.updateCount();
|
|
1468
2408
|
});
|
|
1469
2409
|
break;
|
|
1470
2410
|
case "disableClickZoom":
|
|
1471
|
-
let
|
|
1472
|
-
|
|
1473
|
-
s
|
|
2411
|
+
let s = "enableClickZoom";
|
|
2412
|
+
o && (s = "disableClickZoom"), this._clusters.forEach(function(a) {
|
|
2413
|
+
a[s]();
|
|
1474
2414
|
});
|
|
1475
2415
|
break;
|
|
1476
2416
|
}
|
|
1477
2417
|
},
|
|
1478
2418
|
_createClusters: function() {
|
|
1479
|
-
const
|
|
1480
|
-
if (!
|
|
1481
|
-
const
|
|
1482
|
-
for (let
|
|
1483
|
-
const c = a
|
|
1484
|
-
if (!
|
|
2419
|
+
const t = this.getMap();
|
|
2420
|
+
if (!t) return;
|
|
2421
|
+
const o = t.getBounds(), s = this.getMarkers();
|
|
2422
|
+
for (let a = 0, i = s.length; a < i; a++) {
|
|
2423
|
+
const c = s[a], p = c.getPosition();
|
|
2424
|
+
if (!o.hasLatLng(p)) continue;
|
|
1485
2425
|
this._getClosestCluster(p).addMarker(c), this._markerRelations.push(
|
|
1486
|
-
|
|
2426
|
+
e.maps.Event.addListener(
|
|
1487
2427
|
c,
|
|
1488
2428
|
"dragend",
|
|
1489
|
-
|
|
2429
|
+
e.maps.Util.bind(this._onDragEnd, this)
|
|
1490
2430
|
)
|
|
1491
2431
|
);
|
|
1492
2432
|
}
|
|
1493
2433
|
},
|
|
1494
2434
|
_updateClusters: function() {
|
|
1495
|
-
const
|
|
1496
|
-
for (let
|
|
1497
|
-
|
|
2435
|
+
const t = this._clusters;
|
|
2436
|
+
for (let o = 0, s = t.length; o < s; o++)
|
|
2437
|
+
t[o].updateCluster();
|
|
1498
2438
|
},
|
|
1499
2439
|
_clearClusters: function() {
|
|
1500
|
-
const
|
|
1501
|
-
for (let
|
|
1502
|
-
|
|
1503
|
-
|
|
2440
|
+
const t = this._clusters;
|
|
2441
|
+
for (let o = 0, s = t.length; o < s; o++)
|
|
2442
|
+
t[o].destroy();
|
|
2443
|
+
e.maps.Event.removeListener(this._markerRelations), this._markerRelations = [], this._clusters = [];
|
|
1504
2444
|
},
|
|
1505
2445
|
_redraw: function() {
|
|
1506
2446
|
this._clearClusters(), this._createClusters(), this._updateClusters();
|
|
1507
2447
|
},
|
|
1508
|
-
_getClosestCluster: function(
|
|
1509
|
-
const
|
|
1510
|
-
let
|
|
1511
|
-
for (let c = 0, p =
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1514
|
-
const
|
|
1515
|
-
|
|
2448
|
+
_getClosestCluster: function(t) {
|
|
2449
|
+
const o = this.getProjection(), s = this._clusters;
|
|
2450
|
+
let a = null, i = 1 / 0;
|
|
2451
|
+
for (let c = 0, p = s.length; c < p; c++) {
|
|
2452
|
+
const m = s[c], _ = m.getCenter();
|
|
2453
|
+
if (m.isInBounds(t)) {
|
|
2454
|
+
const d = o.getDistance(_, t);
|
|
2455
|
+
d < i && (i = d, a = m);
|
|
1516
2456
|
}
|
|
1517
2457
|
}
|
|
1518
|
-
return
|
|
2458
|
+
return a || (a = new n(this), this._clusters.push(a)), a;
|
|
1519
2459
|
},
|
|
1520
2460
|
_onIdle: function() {
|
|
1521
2461
|
this._redraw();
|
|
@@ -1524,25 +2464,25 @@ function ir(t) {
|
|
|
1524
2464
|
this._redraw();
|
|
1525
2465
|
}
|
|
1526
2466
|
});
|
|
1527
|
-
const
|
|
1528
|
-
this._clusterCenter = null, this._clusterBounds = null, this._clusterMarker = null, this._relation = null, this._clusterMember = [], this._markerClusters =
|
|
2467
|
+
const n = function(t) {
|
|
2468
|
+
this._clusterCenter = null, this._clusterBounds = null, this._clusterMarker = null, this._relation = null, this._clusterMember = [], this._markerClusters = t;
|
|
1529
2469
|
};
|
|
1530
|
-
return
|
|
1531
|
-
constructor:
|
|
1532
|
-
addMarker: function(
|
|
1533
|
-
if (!this._isMember(
|
|
2470
|
+
return n.prototype = {
|
|
2471
|
+
constructor: n,
|
|
2472
|
+
addMarker: function(t) {
|
|
2473
|
+
if (!this._isMember(t)) {
|
|
1534
2474
|
if (!this._clusterCenter) {
|
|
1535
|
-
const
|
|
1536
|
-
this._clusterCenter =
|
|
2475
|
+
const o = t.getPosition();
|
|
2476
|
+
this._clusterCenter = o, this._clusterBounds = this._calcBounds(o);
|
|
1537
2477
|
}
|
|
1538
|
-
this._clusterMember.push(
|
|
2478
|
+
this._clusterMember.push(t);
|
|
1539
2479
|
}
|
|
1540
2480
|
},
|
|
1541
2481
|
destroy: function() {
|
|
1542
|
-
|
|
1543
|
-
const
|
|
1544
|
-
for (let
|
|
1545
|
-
|
|
2482
|
+
e.maps.Event.removeListener(this._relation);
|
|
2483
|
+
const t = this._clusterMember;
|
|
2484
|
+
for (let o = 0, s = t.length; o < s; o++)
|
|
2485
|
+
t[o].setMap(null);
|
|
1546
2486
|
this._clusterMarker.setMap(null), this._clusterMarker = null, this._clusterCenter = null, this._clusterBounds = null, this._relation = null, this._clusterMember = [];
|
|
1547
2487
|
},
|
|
1548
2488
|
getCenter: function() {
|
|
@@ -1557,159 +2497,159 @@ function ir(t) {
|
|
|
1557
2497
|
getClusterMember: function() {
|
|
1558
2498
|
return this._clusterMember;
|
|
1559
2499
|
},
|
|
1560
|
-
isInBounds: function(
|
|
1561
|
-
return this._clusterBounds && this._clusterBounds.hasLatLng(
|
|
2500
|
+
isInBounds: function(t) {
|
|
2501
|
+
return this._clusterBounds && this._clusterBounds.hasLatLng(t);
|
|
1562
2502
|
},
|
|
1563
2503
|
enableClickZoom: function() {
|
|
1564
2504
|
if (this._relation) return;
|
|
1565
|
-
const
|
|
1566
|
-
this._relation =
|
|
2505
|
+
const t = this._markerClusters.getMap();
|
|
2506
|
+
this._relation = e.maps.Event.addListener(
|
|
1567
2507
|
this._clusterMarker,
|
|
1568
2508
|
"click",
|
|
1569
|
-
|
|
1570
|
-
|
|
2509
|
+
e.maps.Util.bind(function(o) {
|
|
2510
|
+
t.morph(o.coord, t.getZoom() + 1);
|
|
1571
2511
|
}, this)
|
|
1572
2512
|
);
|
|
1573
2513
|
},
|
|
1574
2514
|
disableClickZoom: function() {
|
|
1575
|
-
this._relation && (
|
|
2515
|
+
this._relation && (e.maps.Event.removeListener(this._relation), this._relation = null);
|
|
1576
2516
|
},
|
|
1577
2517
|
updateCluster: function() {
|
|
1578
2518
|
if (!this._clusterMarker) {
|
|
1579
|
-
let
|
|
1580
|
-
this._markerClusters.getAverageCenter() ?
|
|
1581
|
-
position:
|
|
2519
|
+
let t;
|
|
2520
|
+
this._markerClusters.getAverageCenter() ? t = this._calcAverageCenter(this._clusterMember) : t = this._clusterCenter, this._clusterMarker = new e.maps.Marker({
|
|
2521
|
+
position: t,
|
|
1582
2522
|
map: this._markerClusters.getMap()
|
|
1583
2523
|
}), this._markerClusters.getDisableClickZoom() || this.enableClickZoom();
|
|
1584
2524
|
}
|
|
1585
2525
|
this.updateIcon(), this.updateCount(), this.checkByZoomAndMinClusterSize();
|
|
1586
2526
|
},
|
|
1587
2527
|
checkByZoomAndMinClusterSize: function() {
|
|
1588
|
-
const
|
|
1589
|
-
this.getCount() <
|
|
2528
|
+
const t = this._markerClusters, o = t.getMinClusterSize(), s = t.getMaxZoom(), a = t.getMap().getZoom();
|
|
2529
|
+
this.getCount() < o ? this._showMember() : (this._hideMember(), s <= a && this._showMember());
|
|
1590
2530
|
},
|
|
1591
2531
|
updateCount: function() {
|
|
1592
|
-
const
|
|
1593
|
-
|
|
2532
|
+
const t = this._markerClusters.getStylingFunction();
|
|
2533
|
+
t && t(this._clusterMarker, this.getCount());
|
|
1594
2534
|
},
|
|
1595
2535
|
updateIcon: function() {
|
|
1596
|
-
const
|
|
1597
|
-
let
|
|
1598
|
-
const
|
|
1599
|
-
|
|
2536
|
+
const t = this.getCount();
|
|
2537
|
+
let o = this._getIndex(t);
|
|
2538
|
+
const s = this._markerClusters.getIcons();
|
|
2539
|
+
o = Math.max(o, 0), o = Math.min(o, s.length - 1), this._clusterMarker.setIcon(s[o]);
|
|
1600
2540
|
},
|
|
1601
2541
|
_showMember: function() {
|
|
1602
|
-
const
|
|
1603
|
-
for (let
|
|
1604
|
-
a
|
|
1605
|
-
|
|
2542
|
+
const t = this._markerClusters.getMap(), o = this._clusterMarker, s = this._clusterMember;
|
|
2543
|
+
for (let a = 0, i = s.length; a < i; a++)
|
|
2544
|
+
s[a].setMap(t);
|
|
2545
|
+
o && o.setMap(null);
|
|
1606
2546
|
},
|
|
1607
2547
|
_hideMember: function() {
|
|
1608
|
-
const
|
|
1609
|
-
for (let
|
|
1610
|
-
a
|
|
1611
|
-
|
|
1612
|
-
},
|
|
1613
|
-
_calcBounds: function(
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
const u = Math.min(c.x,
|
|
1617
|
-
return new
|
|
1618
|
-
},
|
|
1619
|
-
_getIndex: function(
|
|
1620
|
-
const
|
|
1621
|
-
if (
|
|
1622
|
-
return
|
|
1623
|
-
if (
|
|
1624
|
-
let
|
|
1625
|
-
for (let
|
|
1626
|
-
const c =
|
|
1627
|
-
if (
|
|
1628
|
-
|
|
2548
|
+
const t = this._markerClusters.getMap(), o = this._clusterMarker, s = this._clusterMember;
|
|
2549
|
+
for (let a = 0, i = s.length; a < i; a++)
|
|
2550
|
+
s[a].setMap(null);
|
|
2551
|
+
o && !o.getMap() && o.setMap(t);
|
|
2552
|
+
},
|
|
2553
|
+
_calcBounds: function(t) {
|
|
2554
|
+
const o = this._markerClusters.getMap(), s = new e.maps.LatLngBounds(t.clone(), t.clone()), a = o.getBounds(), i = o.getProjection(), c = i.fromCoordToOffset(a.getNE()), p = i.fromCoordToOffset(a.getSW()), m = i.fromCoordToOffset(s.getNE()), _ = i.fromCoordToOffset(s.getSW()), d = this._markerClusters.getGridSize() / 2;
|
|
2555
|
+
m.add(d, -d), _.add(-d, d);
|
|
2556
|
+
const u = Math.min(c.x, m.x), f = Math.max(c.y, m.y), h = Math.max(p.x, _.x), y = Math.min(p.y, _.y), g = i.fromOffsetToCoord(new e.maps.Point(u, f)), k = i.fromOffsetToCoord(new e.maps.Point(h, y));
|
|
2557
|
+
return new e.maps.LatLngBounds(k, g);
|
|
2558
|
+
},
|
|
2559
|
+
_getIndex: function(t) {
|
|
2560
|
+
const o = this._markerClusters.getIndexGenerator();
|
|
2561
|
+
if (e.maps.Util.isFunction(o))
|
|
2562
|
+
return o(t);
|
|
2563
|
+
if (e.maps.Util.isArray(o)) {
|
|
2564
|
+
let s = 0;
|
|
2565
|
+
for (let a = 0, i = o.length; a < i; a++) {
|
|
2566
|
+
const c = o[a];
|
|
2567
|
+
if (t < c) break;
|
|
2568
|
+
s++;
|
|
1629
2569
|
}
|
|
1630
|
-
return
|
|
2570
|
+
return s;
|
|
1631
2571
|
}
|
|
1632
2572
|
return 0;
|
|
1633
2573
|
},
|
|
1634
|
-
_isMember: function(
|
|
1635
|
-
return this._clusterMember.indexOf(
|
|
2574
|
+
_isMember: function(t) {
|
|
2575
|
+
return this._clusterMember.indexOf(t) !== -1;
|
|
1636
2576
|
},
|
|
1637
|
-
_calcAverageCenter: function(
|
|
1638
|
-
const
|
|
1639
|
-
for (let
|
|
1640
|
-
|
|
1641
|
-
return
|
|
2577
|
+
_calcAverageCenter: function(t) {
|
|
2578
|
+
const o = t.length, s = [0, 0];
|
|
2579
|
+
for (let a = 0; a < o; a++)
|
|
2580
|
+
s[0] += t[a].position.x, s[1] += t[a].position.y;
|
|
2581
|
+
return s[0] /= o, s[1] /= o, new e.maps.Point(s[0], s[1]);
|
|
1642
2582
|
}
|
|
1643
|
-
},
|
|
2583
|
+
}, r;
|
|
1644
2584
|
}
|
|
1645
|
-
const
|
|
1646
|
-
const { naver:
|
|
2585
|
+
const Lo = (e) => {
|
|
2586
|
+
const { naver: r } = ft(), [n, t] = L([]), o = oe(
|
|
1647
2587
|
/* @__PURE__ */ new Map()
|
|
1648
|
-
),
|
|
1649
|
-
(
|
|
1650
|
-
if (!
|
|
1651
|
-
const
|
|
1652
|
-
...
|
|
1653
|
-
position: new
|
|
1654
|
-
map:
|
|
2588
|
+
), s = oe(null), a = Y(
|
|
2589
|
+
(_) => {
|
|
2590
|
+
if (!e || !r) return null;
|
|
2591
|
+
const d = Ze(_), u = new r.maps.Marker({
|
|
2592
|
+
..._,
|
|
2593
|
+
position: new r.maps.LatLng(_.position.latitude, _.position.longitude),
|
|
2594
|
+
map: e,
|
|
1655
2595
|
icon: {
|
|
1656
|
-
content:
|
|
2596
|
+
content: d
|
|
1657
2597
|
}
|
|
1658
2598
|
});
|
|
1659
|
-
return
|
|
1660
|
-
|
|
1661
|
-
}),
|
|
2599
|
+
return _.onClick && r.maps.Event.addListener(u, "click", () => {
|
|
2600
|
+
_.onClick(_.id);
|
|
2601
|
+
}), t((f) => [...f, u]), o.current.set(_.id, { marker: u, data: _ }), u;
|
|
1662
2602
|
},
|
|
1663
|
-
[
|
|
1664
|
-
), i =
|
|
1665
|
-
(
|
|
1666
|
-
const u =
|
|
1667
|
-
if (!u || !
|
|
2603
|
+
[e, r]
|
|
2604
|
+
), i = Y(
|
|
2605
|
+
(_, d) => {
|
|
2606
|
+
const u = o.current.get(_);
|
|
2607
|
+
if (!u || !r)
|
|
1668
2608
|
return;
|
|
1669
|
-
const { marker:
|
|
1670
|
-
if (
|
|
1671
|
-
const
|
|
1672
|
-
|
|
2609
|
+
const { marker: f, data: h } = u, y = { ...h, ...d }, g = f.getElement();
|
|
2610
|
+
if (g) {
|
|
2611
|
+
const k = g.querySelector(".popdeal-marker");
|
|
2612
|
+
k && "active" in d && k.setAttribute("active", String(!!d.active));
|
|
1673
2613
|
}
|
|
1674
|
-
|
|
1675
|
-
},
|
|
1676
|
-
[
|
|
1677
|
-
), c =
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
}),
|
|
1681
|
-
}, [
|
|
1682
|
-
(
|
|
1683
|
-
!
|
|
2614
|
+
o.current.set(_, { marker: f, data: y });
|
|
2615
|
+
},
|
|
2616
|
+
[r]
|
|
2617
|
+
), c = Y(() => {
|
|
2618
|
+
n.forEach((_) => {
|
|
2619
|
+
_ && _.setMap(null);
|
|
2620
|
+
}), t([]), o.current.clear(), s.current && (s.current.setMap(null), s.current = null);
|
|
2621
|
+
}, [n]), p = Y(
|
|
2622
|
+
(_) => {
|
|
2623
|
+
!e || !r || e.panTo(new r.maps.LatLng(_.latitude, _.longitude));
|
|
1684
2624
|
},
|
|
1685
|
-
[
|
|
1686
|
-
),
|
|
1687
|
-
(
|
|
1688
|
-
if (!
|
|
1689
|
-
const
|
|
1690
|
-
new
|
|
1691
|
-
new
|
|
2625
|
+
[e, r]
|
|
2626
|
+
), m = Y(
|
|
2627
|
+
(_) => {
|
|
2628
|
+
if (!e || !r || _.length === 0) return;
|
|
2629
|
+
const d = new r.maps.LatLngBounds(
|
|
2630
|
+
new r.maps.LatLng(_[0].latitude, _[0].longitude),
|
|
2631
|
+
new r.maps.LatLng(_[0].latitude, _[0].longitude)
|
|
1692
2632
|
);
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
2633
|
+
_.forEach((u) => {
|
|
2634
|
+
d.extend(new r.maps.LatLng(u.latitude, u.longitude));
|
|
2635
|
+
}), e.fitBounds(d);
|
|
1696
2636
|
},
|
|
1697
|
-
[
|
|
2637
|
+
[e, r]
|
|
1698
2638
|
);
|
|
1699
|
-
return
|
|
1700
|
-
if (!
|
|
1701
|
-
const
|
|
1702
|
-
content:
|
|
2639
|
+
return X(() => {
|
|
2640
|
+
if (!r || !e || n.length === 0) return;
|
|
2641
|
+
const _ = Io(r), u = {
|
|
2642
|
+
content: Ze({
|
|
1703
2643
|
type: "cluster",
|
|
1704
2644
|
count: 0
|
|
1705
2645
|
}),
|
|
1706
|
-
size: new
|
|
1707
|
-
anchor: new
|
|
1708
|
-
},
|
|
2646
|
+
size: new r.maps.Size(96, 96),
|
|
2647
|
+
anchor: new r.maps.Point(20, 20)
|
|
2648
|
+
}, f = new _({
|
|
1709
2649
|
minClusterSize: 2,
|
|
1710
2650
|
maxZoom: 17,
|
|
1711
|
-
map:
|
|
1712
|
-
markers:
|
|
2651
|
+
map: e,
|
|
2652
|
+
markers: n,
|
|
1713
2653
|
disableClickZoom: !1,
|
|
1714
2654
|
gridSize: 120,
|
|
1715
2655
|
icons: [u],
|
|
@@ -1717,48 +2657,48 @@ const lr = (t) => {
|
|
|
1717
2657
|
averageCenter: !1,
|
|
1718
2658
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1719
2659
|
// @ts-ignore
|
|
1720
|
-
stylingFunction: (h,
|
|
2660
|
+
stylingFunction: (h, y) => {
|
|
1721
2661
|
if (h && typeof h.getElement == "function") {
|
|
1722
|
-
const
|
|
1723
|
-
|
|
2662
|
+
const g = h.getElement().querySelector(".cluster-marker-text");
|
|
2663
|
+
g && (g.textContent = String(y));
|
|
1724
2664
|
}
|
|
1725
2665
|
}
|
|
1726
2666
|
});
|
|
1727
|
-
return
|
|
1728
|
-
|
|
2667
|
+
return s.current = f, () => {
|
|
2668
|
+
f.setMap(null);
|
|
1729
2669
|
};
|
|
1730
|
-
}, [
|
|
1731
|
-
},
|
|
1732
|
-
const
|
|
1733
|
-
return
|
|
2670
|
+
}, [r, e, n]), { addMarker: a, updateMarker: i, clearMarkers: c, panTo: p, fitBounds: m };
|
|
2671
|
+
}, ht = ({ options: e, onLoad: r }) => {
|
|
2672
|
+
const n = oe(null), t = oe(null), { createMap: o } = ft(), [s, a] = L(null), i = Lo(s), { width: c = "100%", height: p = "100%", ...m } = e || {}, _ = Le(() => m, [JSON.stringify(m)]);
|
|
2673
|
+
return X(() => {
|
|
1734
2674
|
if (typeof document > "u" || document.getElementById("pop-ui-map-marker-styles")) return;
|
|
1735
2675
|
const u = document.createElement("style");
|
|
1736
|
-
return u.id = "pop-ui-map-marker-styles", u.textContent =
|
|
2676
|
+
return u.id = "pop-ui-map-marker-styles", u.textContent = So, document.head.appendChild(u), t.current = u, () => {
|
|
1737
2677
|
};
|
|
1738
|
-
}, []),
|
|
1739
|
-
let
|
|
1740
|
-
if (
|
|
1741
|
-
const
|
|
1742
|
-
if (!
|
|
2678
|
+
}, []), X(() => {
|
|
2679
|
+
let d = null, u = null;
|
|
2680
|
+
if (s && (s.destroy(), a(null)), n.current && n.current.isConnected) {
|
|
2681
|
+
const f = () => n.current && n.current.isConnected && (d = o(n, _), d) ? (a(d), !0) : !1;
|
|
2682
|
+
if (!f()) {
|
|
1743
2683
|
let h = 0;
|
|
1744
|
-
const
|
|
2684
|
+
const y = 50;
|
|
1745
2685
|
u = setInterval(() => {
|
|
1746
|
-
h++, (
|
|
2686
|
+
h++, (f() || h >= y) && u && (clearInterval(u), u = null);
|
|
1747
2687
|
}, 100);
|
|
1748
2688
|
}
|
|
1749
2689
|
return () => {
|
|
1750
|
-
u && clearInterval(u),
|
|
2690
|
+
u && clearInterval(u), d && (d.destroy(), d = null);
|
|
1751
2691
|
};
|
|
1752
2692
|
}
|
|
1753
2693
|
return () => {
|
|
1754
|
-
u && clearInterval(u),
|
|
2694
|
+
u && clearInterval(u), d && (d.destroy(), d = null);
|
|
1755
2695
|
};
|
|
1756
|
-
}, [
|
|
1757
|
-
|
|
1758
|
-
}, [
|
|
2696
|
+
}, [o, _]), X(() => {
|
|
2697
|
+
s && r && r({ map: s, ...i });
|
|
2698
|
+
}, [s, r, i]), /* @__PURE__ */ l(
|
|
1759
2699
|
"div",
|
|
1760
2700
|
{
|
|
1761
|
-
ref:
|
|
2701
|
+
ref: n,
|
|
1762
2702
|
style: {
|
|
1763
2703
|
width: typeof c == "number" ? `${c}px` : c,
|
|
1764
2704
|
height: typeof p == "number" ? `${p}px` : p
|
|
@@ -1766,196 +2706,196 @@ const lr = (t) => {
|
|
|
1766
2706
|
}
|
|
1767
2707
|
);
|
|
1768
2708
|
};
|
|
1769
|
-
|
|
1770
|
-
const
|
|
1771
|
-
isActive:
|
|
1772
|
-
errorMessage:
|
|
1773
|
-
errorDescription:
|
|
2709
|
+
ht.displayName = "Map";
|
|
2710
|
+
const Bo = "위치 정보를 불러오는 데 실패했어요.", vo = "위치 서비스 권한과 네트워크 상태를 확인해주세요.", Da = ({
|
|
2711
|
+
isActive: e = !1,
|
|
2712
|
+
errorMessage: r = Bo,
|
|
2713
|
+
errorDescription: n = vo
|
|
1774
2714
|
}) => {
|
|
1775
|
-
const [
|
|
1776
|
-
return
|
|
1777
|
-
if (
|
|
2715
|
+
const [t, o] = L(!1), [s, a] = L(!1), [i, c] = L(null), p = oe(!1);
|
|
2716
|
+
return X(() => {
|
|
2717
|
+
if (e && typeof navigator < "u" && "geolocation" in navigator) {
|
|
1778
2718
|
if (p.current) return;
|
|
1779
2719
|
p.current = !0, requestAnimationFrame(() => {
|
|
1780
|
-
|
|
2720
|
+
o(!0);
|
|
1781
2721
|
});
|
|
1782
|
-
const
|
|
2722
|
+
const m = {
|
|
1783
2723
|
enableHighAccuracy: !0,
|
|
1784
2724
|
timeout: 1e4,
|
|
1785
2725
|
maximumAge: 0
|
|
1786
2726
|
};
|
|
1787
2727
|
navigator.geolocation.getCurrentPosition(
|
|
1788
|
-
(
|
|
2728
|
+
(_) => {
|
|
1789
2729
|
c({
|
|
1790
|
-
latitude:
|
|
1791
|
-
longitude:
|
|
1792
|
-
}),
|
|
2730
|
+
latitude: _.coords.latitude,
|
|
2731
|
+
longitude: _.coords.longitude
|
|
2732
|
+
}), o(!1), a(!1), p.current = !1;
|
|
1793
2733
|
},
|
|
1794
|
-
(
|
|
1795
|
-
c(null), console.error("Geolocation error:",
|
|
1796
|
-
message: `${
|
|
1797
|
-
}),
|
|
2734
|
+
(_) => {
|
|
2735
|
+
c(null), console.error("Geolocation error:", _), se({
|
|
2736
|
+
message: `${r} ${n}`
|
|
2737
|
+
}), o(!1), a(!0), p.current = !1;
|
|
1798
2738
|
},
|
|
1799
|
-
|
|
2739
|
+
m
|
|
1800
2740
|
);
|
|
1801
2741
|
}
|
|
1802
|
-
}, [
|
|
1803
|
-
},
|
|
1804
|
-
const
|
|
1805
|
-
return Object.entries(
|
|
1806
|
-
Object.entries(
|
|
1807
|
-
const
|
|
1808
|
-
|
|
2742
|
+
}, [e, r, n]), { position: i, isLoading: t, isError: s };
|
|
2743
|
+
}, Ue = (e = "light") => {
|
|
2744
|
+
const r = [];
|
|
2745
|
+
return Object.entries(qe).forEach(([n, t]) => {
|
|
2746
|
+
Object.entries(t).forEach(([o, s]) => {
|
|
2747
|
+
const a = Vt(n, o);
|
|
2748
|
+
r.push(`${a}: ${s};`);
|
|
1809
2749
|
});
|
|
1810
|
-
}),
|
|
2750
|
+
}), r.join(`
|
|
1811
2751
|
`);
|
|
1812
|
-
},
|
|
1813
|
-
const
|
|
1814
|
-
|
|
1815
|
-
const
|
|
1816
|
-
|
|
2752
|
+
}, Eo = (e = "light") => {
|
|
2753
|
+
const r = document.getElementById("pop-ui-theme-vars");
|
|
2754
|
+
r && r.remove();
|
|
2755
|
+
const n = document.createElement("style");
|
|
2756
|
+
n.id = "pop-ui-theme-vars", n.textContent = `
|
|
1817
2757
|
:root {
|
|
1818
|
-
${
|
|
2758
|
+
${Ue("light")}
|
|
1819
2759
|
}
|
|
1820
2760
|
|
|
1821
2761
|
[data-theme="dark"] {
|
|
1822
|
-
${
|
|
2762
|
+
${Ue("dark")}
|
|
1823
2763
|
}
|
|
1824
|
-
`, document.head.appendChild(
|
|
1825
|
-
},
|
|
1826
|
-
const
|
|
2764
|
+
`, document.head.appendChild(n);
|
|
2765
|
+
}, re = (e) => {
|
|
2766
|
+
const r = qe[e], n = Object.keys(r).sort((o, s) => Number(o) - Number(s));
|
|
1827
2767
|
return [
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
2768
|
+
ee(e, n[0] || n[n.length - 1]),
|
|
2769
|
+
ee(e, n[1] || n[n.length - 1]),
|
|
2770
|
+
ee(e, n[2] || n[n.length - 1]),
|
|
2771
|
+
ee(e, n[3] || n[n.length - 1]),
|
|
2772
|
+
ee(e, n[4] || n[n.length - 1]),
|
|
2773
|
+
ee(e, n[5] || n[n.length - 1]),
|
|
2774
|
+
ee(e, n[6] || n[n.length - 1]),
|
|
2775
|
+
ee(e, n[7] || n[n.length - 1]),
|
|
2776
|
+
ee(e, n[8] || n[n.length - 1]),
|
|
2777
|
+
ee(e, n[9] || n[n.length - 1])
|
|
1838
2778
|
];
|
|
1839
|
-
},
|
|
2779
|
+
}, Ao = Bt({
|
|
1840
2780
|
colors: {
|
|
1841
|
-
gray:
|
|
1842
|
-
aqua:
|
|
1843
|
-
red:
|
|
1844
|
-
orange:
|
|
1845
|
-
yellow:
|
|
1846
|
-
green:
|
|
1847
|
-
blue:
|
|
1848
|
-
purple:
|
|
1849
|
-
grape:
|
|
2781
|
+
gray: re("gray"),
|
|
2782
|
+
aqua: re("aqua"),
|
|
2783
|
+
red: re("red"),
|
|
2784
|
+
orange: re("orange"),
|
|
2785
|
+
yellow: re("yellow"),
|
|
2786
|
+
green: re("green"),
|
|
2787
|
+
blue: re("blue"),
|
|
2788
|
+
purple: re("purple"),
|
|
2789
|
+
grape: re("grape")
|
|
1850
2790
|
},
|
|
1851
2791
|
primaryColor: "aqua",
|
|
1852
2792
|
primaryShade: 5,
|
|
1853
2793
|
fontFamily: 'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
|
|
1854
|
-
}),
|
|
1855
|
-
children:
|
|
1856
|
-
defaultTheme:
|
|
1857
|
-
naverClientId:
|
|
1858
|
-
notificationPosition:
|
|
1859
|
-
notificationLimit:
|
|
1860
|
-
notificationAutoClose:
|
|
1861
|
-
notificationZIndex:
|
|
2794
|
+
}), gt = Be(void 0), yt = Be({}), xa = ({
|
|
2795
|
+
children: e,
|
|
2796
|
+
defaultTheme: r = "light",
|
|
2797
|
+
naverClientId: n,
|
|
2798
|
+
notificationPosition: t = "bottom-center",
|
|
2799
|
+
notificationLimit: o = 5,
|
|
2800
|
+
notificationAutoClose: s,
|
|
2801
|
+
notificationZIndex: a
|
|
1862
2802
|
}) => {
|
|
1863
|
-
const [i, c] =
|
|
1864
|
-
|
|
1865
|
-
|
|
2803
|
+
const [i, c] = L(r);
|
|
2804
|
+
X(() => {
|
|
2805
|
+
Eo(i), document.documentElement.setAttribute("data-theme", i);
|
|
1866
2806
|
}, [i]);
|
|
1867
2807
|
const p = () => {
|
|
1868
|
-
c((
|
|
2808
|
+
c((m) => m === "light" ? "dark" : "light");
|
|
1869
2809
|
};
|
|
1870
|
-
return /* @__PURE__ */ l(
|
|
2810
|
+
return /* @__PURE__ */ l(gt.Provider, { value: { theme: i, setTheme: c, toggleTheme: p }, children: /* @__PURE__ */ l(yt.Provider, { value: { naverClientId: n }, children: /* @__PURE__ */ x(vt, { theme: Ao, children: [
|
|
1871
2811
|
/* @__PURE__ */ l(
|
|
1872
|
-
|
|
2812
|
+
ar,
|
|
1873
2813
|
{
|
|
1874
|
-
position:
|
|
1875
|
-
limit:
|
|
1876
|
-
autoClose:
|
|
1877
|
-
zIndex:
|
|
2814
|
+
position: t,
|
|
2815
|
+
limit: o,
|
|
2816
|
+
autoClose: s,
|
|
2817
|
+
zIndex: a
|
|
1878
2818
|
}
|
|
1879
2819
|
),
|
|
1880
|
-
|
|
2820
|
+
e
|
|
1881
2821
|
] }) }) });
|
|
1882
|
-
},
|
|
1883
|
-
const
|
|
1884
|
-
if (!
|
|
2822
|
+
}, Pa = () => {
|
|
2823
|
+
const e = ve(gt);
|
|
2824
|
+
if (!e)
|
|
1885
2825
|
throw new Error("useTheme must be used within ThemeProvider");
|
|
1886
|
-
return
|
|
1887
|
-
},
|
|
1888
|
-
MapInfo:
|
|
1889
|
-
MapInfo__NoClientId:
|
|
1890
|
-
MapInfo__Preview:
|
|
1891
|
-
MapInfo__ExpandButton:
|
|
1892
|
-
MapInfo__AddressBar:
|
|
1893
|
-
MapInfo__AddressContent:
|
|
1894
|
-
MapInfo__Address:
|
|
1895
|
-
MapInfo__DirectionLink:
|
|
1896
|
-
MapInfo__DirectionButton:
|
|
1897
|
-
},
|
|
1898
|
-
location:
|
|
1899
|
-
marker:
|
|
1900
|
-
direction:
|
|
1901
|
-
toast:
|
|
1902
|
-
naverClientId:
|
|
1903
|
-
onExpandRequest:
|
|
1904
|
-
onClick:
|
|
2826
|
+
return e;
|
|
2827
|
+
}, No = () => ve(yt), Fo = "styles-module__MapInfo___scB-5", $o = "styles-module__MapInfo__NoClientId___YBM4o", Ro = "styles-module__MapInfo__Preview___FJbQN", Oo = "styles-module__MapInfo__ExpandButton___8KySg", zo = "styles-module__MapInfo__AddressBar___mKkK6", Ho = "styles-module__MapInfo__AddressContent___XG1Uz", Yo = "styles-module__MapInfo__Address___iXO6N", Wo = "styles-module__MapInfo__DirectionLink___eGnf-", Zo = "styles-module__MapInfo__DirectionButton___gTWpj", te = {
|
|
2828
|
+
MapInfo: Fo,
|
|
2829
|
+
MapInfo__NoClientId: $o,
|
|
2830
|
+
MapInfo__Preview: Ro,
|
|
2831
|
+
MapInfo__ExpandButton: Oo,
|
|
2832
|
+
MapInfo__AddressBar: zo,
|
|
2833
|
+
MapInfo__AddressContent: Ho,
|
|
2834
|
+
MapInfo__Address: Yo,
|
|
2835
|
+
MapInfo__DirectionLink: Wo,
|
|
2836
|
+
MapInfo__DirectionButton: Zo
|
|
2837
|
+
}, jo = 60, Ma = ({
|
|
2838
|
+
location: e,
|
|
2839
|
+
marker: r,
|
|
2840
|
+
direction: n,
|
|
2841
|
+
toast: t,
|
|
2842
|
+
naverClientId: o,
|
|
2843
|
+
onExpandRequest: s,
|
|
2844
|
+
onClick: a,
|
|
1905
2845
|
height: i = 200
|
|
1906
2846
|
}) => {
|
|
1907
|
-
const c =
|
|
1908
|
-
|
|
1909
|
-
}, []),
|
|
1910
|
-
|
|
1911
|
-
}, [
|
|
1912
|
-
(
|
|
1913
|
-
if (
|
|
2847
|
+
const c = No(), p = o || c.naverClientId, { title: m, address: _, latitude: d, longitude: u } = e, f = n?.label ?? "길찾기", h = t?.addressCopied ?? "주소 복사 완료", [y, g] = L(null), k = i - jo, P = Y((M) => {
|
|
2848
|
+
M && M.map && g(M);
|
|
2849
|
+
}, []), O = Y(() => {
|
|
2850
|
+
s?.();
|
|
2851
|
+
}, [s]), N = Y(
|
|
2852
|
+
(M, C, E) => {
|
|
2853
|
+
if (M && M.map && d && u)
|
|
1914
2854
|
try {
|
|
1915
|
-
|
|
1916
|
-
} catch (
|
|
1917
|
-
console.error("Error creating map marker:",
|
|
2855
|
+
M.addMarker(C), E?.();
|
|
2856
|
+
} catch (A) {
|
|
2857
|
+
console.error("Error creating map marker:", A);
|
|
1918
2858
|
}
|
|
1919
2859
|
},
|
|
1920
|
-
[
|
|
1921
|
-
),
|
|
1922
|
-
(
|
|
1923
|
-
|
|
1924
|
-
|
|
2860
|
+
[d, u]
|
|
2861
|
+
), W = Y(
|
|
2862
|
+
(M, C) => {
|
|
2863
|
+
M && M.map && d && u && (M.clearMarkers(), N(
|
|
2864
|
+
M,
|
|
1925
2865
|
{
|
|
1926
|
-
id: `location-marker-${
|
|
1927
|
-
type:
|
|
1928
|
-
position: { latitude:
|
|
1929
|
-
title:
|
|
1930
|
-
icon:
|
|
1931
|
-
address:
|
|
2866
|
+
id: `location-marker-${m}`,
|
|
2867
|
+
type: C,
|
|
2868
|
+
position: { latitude: d, longitude: u },
|
|
2869
|
+
title: m,
|
|
2870
|
+
icon: r?.imageUrl,
|
|
2871
|
+
address: _
|
|
1932
2872
|
},
|
|
1933
2873
|
() => {
|
|
1934
|
-
|
|
2874
|
+
M.panTo({ latitude: d, longitude: u });
|
|
1935
2875
|
}
|
|
1936
2876
|
));
|
|
1937
2877
|
},
|
|
1938
|
-
[
|
|
2878
|
+
[d, u, m, r?.imageUrl, _, N]
|
|
1939
2879
|
);
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
}, [
|
|
1943
|
-
|
|
2880
|
+
X(() => {
|
|
2881
|
+
d && u && y && W(y, "pi");
|
|
2882
|
+
}, [y, d, u, W]), X(() => () => {
|
|
2883
|
+
g(null);
|
|
1944
2884
|
}, []);
|
|
1945
|
-
const
|
|
1946
|
-
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(
|
|
1947
|
-
}, [
|
|
1948
|
-
return p ? /* @__PURE__ */
|
|
1949
|
-
/* @__PURE__ */ l(
|
|
2885
|
+
const z = Y(() => {
|
|
2886
|
+
typeof navigator < "u" && navigator.clipboard && (navigator.clipboard.writeText(_), se(h));
|
|
2887
|
+
}, [_, h]), B = Le(() => n?.url ? n.url : `https://map.naver.com/p/search/${encodeURIComponent(m)}`, [n?.url, m]);
|
|
2888
|
+
return p ? /* @__PURE__ */ x("div", { className: te.MapInfo, style: { height: i }, onClick: a, children: [
|
|
2889
|
+
/* @__PURE__ */ l(wo, { clientId: p, children: /* @__PURE__ */ x("div", { className: te.MapInfo__Preview, onClick: O, children: [
|
|
1950
2890
|
/* @__PURE__ */ l(
|
|
1951
|
-
|
|
2891
|
+
ht,
|
|
1952
2892
|
{
|
|
1953
|
-
onLoad:
|
|
2893
|
+
onLoad: P,
|
|
1954
2894
|
options: {
|
|
1955
2895
|
width: "100%",
|
|
1956
|
-
height: `${
|
|
2896
|
+
height: `${k}px`,
|
|
1957
2897
|
center: {
|
|
1958
|
-
lat:
|
|
2898
|
+
lat: d,
|
|
1959
2899
|
lng: u
|
|
1960
2900
|
},
|
|
1961
2901
|
zoom: 15,
|
|
@@ -1971,63 +2911,65 @@ const cr = "위치 정보를 불러오는 데 실패했어요.", dr = "위치
|
|
|
1971
2911
|
}
|
|
1972
2912
|
}
|
|
1973
2913
|
),
|
|
1974
|
-
|
|
2914
|
+
s && /* @__PURE__ */ l("div", { className: te.MapInfo__ExpandButton, children: /* @__PURE__ */ l(Gt, { color: Kt, size: 18 }) })
|
|
1975
2915
|
] }) }),
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */ l(
|
|
2916
|
+
/* @__PURE__ */ x("div", { className: te.MapInfo__AddressBar, children: [
|
|
2917
|
+
/* @__PURE__ */ x("div", { className: te.MapInfo__AddressContent, children: [
|
|
2918
|
+
/* @__PURE__ */ l(Jt, { color: Xe, size: 24, variant: "filled" }),
|
|
1979
2919
|
/* @__PURE__ */ l(
|
|
1980
2920
|
"span",
|
|
1981
2921
|
{
|
|
1982
|
-
className:
|
|
1983
|
-
onClick:
|
|
2922
|
+
className: te.MapInfo__Address,
|
|
2923
|
+
onClick: z,
|
|
1984
2924
|
role: "button",
|
|
1985
2925
|
tabIndex: 0,
|
|
1986
|
-
onKeyDown: (
|
|
1987
|
-
children:
|
|
2926
|
+
onKeyDown: (M) => M.key === "Enter" && z(),
|
|
2927
|
+
children: _
|
|
1988
2928
|
}
|
|
1989
2929
|
)
|
|
1990
2930
|
] }),
|
|
1991
2931
|
/* @__PURE__ */ l(
|
|
1992
2932
|
"a",
|
|
1993
2933
|
{
|
|
1994
|
-
className:
|
|
1995
|
-
href:
|
|
2934
|
+
className: te.MapInfo__DirectionLink,
|
|
2935
|
+
href: B,
|
|
1996
2936
|
target: "_blank",
|
|
1997
2937
|
rel: "noreferrer",
|
|
1998
|
-
children: /* @__PURE__ */ l(
|
|
2938
|
+
children: /* @__PURE__ */ l(me, { variant: "basic", size: "sm", className: te.MapInfo__DirectionButton, children: f })
|
|
1999
2939
|
}
|
|
2000
2940
|
)
|
|
2001
2941
|
] })
|
|
2002
|
-
] }) : /* @__PURE__ */ l("div", { className:
|
|
2942
|
+
] }) : /* @__PURE__ */ l("div", { className: te.MapInfo, style: { height: i }, children: /* @__PURE__ */ l("div", { className: te.MapInfo__NoClientId, children: "naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요." }) });
|
|
2003
2943
|
};
|
|
2004
2944
|
export {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2945
|
+
me as Button,
|
|
2946
|
+
$r as CalendarDatePicker,
|
|
2947
|
+
ia as Checkbox,
|
|
2948
|
+
la as DatePicker,
|
|
2949
|
+
ca as Dropdown,
|
|
2950
|
+
_a as ImageInput,
|
|
2951
|
+
da as LottieInput,
|
|
2952
|
+
ht as Map,
|
|
2953
|
+
Ma as MapInfo,
|
|
2954
|
+
Dn as Modal,
|
|
2955
|
+
wo as NaverMapProvider,
|
|
2956
|
+
ua as Pagination,
|
|
2957
|
+
xa as PopUiProvider,
|
|
2958
|
+
ma as Radio,
|
|
2959
|
+
pa as SearchBar,
|
|
2960
|
+
fa as SegmentButton,
|
|
2961
|
+
ha as Tab,
|
|
2962
|
+
ga as TextField,
|
|
2963
|
+
ya as TimePicker,
|
|
2964
|
+
ka as Toggle,
|
|
2965
|
+
Ca as Tooltip,
|
|
2966
|
+
Ze as getMarkerHTML,
|
|
2967
|
+
Io as makeMarkerClustering,
|
|
2968
|
+
So as markerStyles,
|
|
2969
|
+
se as toast,
|
|
2970
|
+
Da as useLocation,
|
|
2971
|
+
Lo as useMap,
|
|
2972
|
+
ft as useNaverMap,
|
|
2973
|
+
No as usePopUIConfig,
|
|
2974
|
+
Pa as useTheme
|
|
2033
2975
|
};
|