@loopr-ai/craft 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ButtonBase-83dd7164.js → ButtonBase-262628d1.js} +3 -3
- package/dist/{TransitionGroupContext-adf68f00.js → TransitionGroupContext-fe9a562f.js} +1 -1
- package/dist/components/cell/AvatarGroup/index.js +3 -3
- package/dist/components/cell/Button/index.js +3 -3
- package/dist/components/cell/Chip/index.js +5 -5
- package/dist/components/cell/ProgressBar/index.js +3 -3
- package/dist/components/cell/Search/index.js +2884 -23115
- package/dist/components/cell/Typography/index.js +76 -100
- package/dist/components/organ/ZoomControlWithDrag/index.d.ts +9 -3
- package/dist/components/organ/ZoomControlWithDrag/index.js +2975 -925
- package/dist/createSvgIcon-4ecd3248.js +20405 -0
- package/dist/{createSvgIcon-bd01dddd.js → createSvgIcon-5f0c7512.js} +2 -2
- package/dist/{createTheme-f511f0cd.js → createTheme-a4db2989.js} +6 -6
- package/dist/{exactProp-ed2da606.js → exactProp-d79ccada.js} +1 -1
- package/dist/extendSxProp-db8b9da5.js +29 -0
- package/dist/global/theme.js +1 -1
- package/dist/providers/CraftThemeProvider.js +2 -2
- package/dist/{styled-9f5c49f8.js → styled-d4863b7f.js} +5 -4
- package/dist/{useTheme-6e15807e.js → useTheme-3e8a77bb.js} +1 -1
- package/package.json +2 -2
- package/dist/createSvgIcon-3bff5571.js +0 -157
|
@@ -1,157 +1,184 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import Dt, { jsx as N, jsxs as Ie, Fragment as Zr } from "react/jsx-runtime";
|
|
2
|
+
import { o as Do, P as Ur, H as St, u as qr, j as Kr, k as Qr, G as No, n as mt, e as Gr, l as Nt, m as Mt } from "../../../createSvgIcon-4ecd3248.js";
|
|
3
|
+
import * as E from "react";
|
|
4
|
+
import Ne, { useRef as Ot, useImperativeHandle as Jr, useEffect as _t, useContext as eo, useState as Ir } from "react";
|
|
5
|
+
import { s as en, _ as Se, a as T, P as l, h as tn, c as se, g as rt, e as et, f as on, C as rn } from "../../../createTheme-a4db2989.js";
|
|
6
|
+
import { i as nn, u as an, c as Pe, j as sn, k as ln, b as nt, g as Wt, s as Oe, a as it } from "../../../styled-d4863b7f.js";
|
|
7
|
+
import { c as un, T as pn } from "../../../useThemeWithoutDefault-188598a8.js";
|
|
8
|
+
import { e as dn } from "../../../extendSxProp-db8b9da5.js";
|
|
9
|
+
import { u as fn } from "../../../useTheme-3e8a77bb.js";
|
|
10
|
+
import { c as Jo } from "../../../chainPropTypes-004bf492.js";
|
|
11
|
+
import { r as Io, u as Kt, c as Mo, b as cn, a as vn } from "../../../TransitionGroupContext-fe9a562f.js";
|
|
12
|
+
import { B as mn } from "../../../ButtonBase-262628d1.js";
|
|
13
|
+
const hn = ["className", "component"];
|
|
14
|
+
function gn(e = {}) {
|
|
15
|
+
const {
|
|
16
|
+
themeId: o,
|
|
17
|
+
defaultTheme: t,
|
|
18
|
+
defaultClassName: r = "MuiBox-root",
|
|
19
|
+
generateClassName: n
|
|
20
|
+
} = e, i = nn("div", {
|
|
21
|
+
shouldForwardProp: (s) => s !== "theme" && s !== "sx" && s !== "as"
|
|
22
|
+
})(en);
|
|
23
|
+
return /* @__PURE__ */ E.forwardRef(function(u, d) {
|
|
24
|
+
const p = an(t), f = dn(u), {
|
|
25
|
+
className: c,
|
|
26
|
+
component: v = "div"
|
|
27
|
+
} = f, h = Se(f, hn);
|
|
28
|
+
return /* @__PURE__ */ N(i, T({
|
|
29
|
+
as: v,
|
|
30
|
+
ref: d,
|
|
31
|
+
className: Pe(c, n ? n(r) : r),
|
|
32
|
+
theme: o && p[o] || p
|
|
33
|
+
}, h));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const bn = sn(), yn = bn, wn = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"], Pn = tn(), Tn = yn("div", {
|
|
10
37
|
name: "MuiContainer",
|
|
11
38
|
slot: "Root",
|
|
12
|
-
overridesResolver: (
|
|
39
|
+
overridesResolver: (e, o) => {
|
|
13
40
|
const {
|
|
14
|
-
ownerState:
|
|
15
|
-
} =
|
|
16
|
-
return [o.root, o[`maxWidth${
|
|
41
|
+
ownerState: t
|
|
42
|
+
} = e;
|
|
43
|
+
return [o.root, o[`maxWidth${se(String(t.maxWidth))}`], t.fixed && o.fixed, t.disableGutters && o.disableGutters];
|
|
17
44
|
}
|
|
18
|
-
}),
|
|
19
|
-
props:
|
|
45
|
+
}), Cn = (e) => ln({
|
|
46
|
+
props: e,
|
|
20
47
|
name: "MuiContainer",
|
|
21
|
-
defaultTheme:
|
|
22
|
-
}),
|
|
23
|
-
const
|
|
48
|
+
defaultTheme: Pn
|
|
49
|
+
}), Sn = (e, o) => {
|
|
50
|
+
const t = (u) => rt(o, u), {
|
|
24
51
|
classes: r,
|
|
25
52
|
fixed: n,
|
|
26
|
-
disableGutters:
|
|
27
|
-
maxWidth:
|
|
28
|
-
} =
|
|
29
|
-
root: ["root",
|
|
53
|
+
disableGutters: i,
|
|
54
|
+
maxWidth: a
|
|
55
|
+
} = e, s = {
|
|
56
|
+
root: ["root", a && `maxWidth${se(String(a))}`, n && "fixed", i && "disableGutters"]
|
|
30
57
|
};
|
|
31
|
-
return
|
|
58
|
+
return nt(s, t, r);
|
|
32
59
|
};
|
|
33
|
-
function
|
|
60
|
+
function On(e = {}) {
|
|
34
61
|
const {
|
|
35
62
|
// This will allow adding custom styled fn (for example for custom sx style function)
|
|
36
|
-
createStyledComponent: o =
|
|
37
|
-
useThemeProps:
|
|
63
|
+
createStyledComponent: o = Tn,
|
|
64
|
+
useThemeProps: t = Cn,
|
|
38
65
|
componentName: r = "MuiContainer"
|
|
39
|
-
} =
|
|
40
|
-
theme:
|
|
66
|
+
} = e, n = o(({
|
|
67
|
+
theme: a,
|
|
41
68
|
ownerState: s
|
|
42
|
-
}) =>
|
|
69
|
+
}) => T({
|
|
43
70
|
width: "100%",
|
|
44
71
|
marginLeft: "auto",
|
|
45
72
|
boxSizing: "border-box",
|
|
46
73
|
marginRight: "auto",
|
|
47
74
|
display: "block"
|
|
48
75
|
}, !s.disableGutters && {
|
|
49
|
-
paddingLeft:
|
|
50
|
-
paddingRight:
|
|
76
|
+
paddingLeft: a.spacing(2),
|
|
77
|
+
paddingRight: a.spacing(2),
|
|
51
78
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
52
|
-
[
|
|
53
|
-
paddingLeft:
|
|
54
|
-
paddingRight:
|
|
79
|
+
[a.breakpoints.up("sm")]: {
|
|
80
|
+
paddingLeft: a.spacing(3),
|
|
81
|
+
paddingRight: a.spacing(3)
|
|
55
82
|
}
|
|
56
83
|
}), ({
|
|
57
|
-
theme:
|
|
84
|
+
theme: a,
|
|
58
85
|
ownerState: s
|
|
59
|
-
}) => s.fixed && Object.keys(
|
|
60
|
-
const
|
|
61
|
-
return f !== 0 && (
|
|
62
|
-
maxWidth: `${f}${
|
|
63
|
-
}),
|
|
86
|
+
}) => s.fixed && Object.keys(a.breakpoints.values).reduce((u, d) => {
|
|
87
|
+
const p = d, f = a.breakpoints.values[p];
|
|
88
|
+
return f !== 0 && (u[a.breakpoints.up(p)] = {
|
|
89
|
+
maxWidth: `${f}${a.breakpoints.unit}`
|
|
90
|
+
}), u;
|
|
64
91
|
}, {}), ({
|
|
65
|
-
theme:
|
|
92
|
+
theme: a,
|
|
66
93
|
ownerState: s
|
|
67
|
-
}) =>
|
|
94
|
+
}) => T({}, s.maxWidth === "xs" && {
|
|
68
95
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
69
|
-
[
|
|
96
|
+
[a.breakpoints.up("xs")]: {
|
|
70
97
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
71
|
-
maxWidth: Math.max(
|
|
98
|
+
maxWidth: Math.max(a.breakpoints.values.xs, 444)
|
|
72
99
|
}
|
|
73
100
|
}, s.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
|
|
74
101
|
s.maxWidth !== "xs" && {
|
|
75
102
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
76
|
-
[
|
|
103
|
+
[a.breakpoints.up(s.maxWidth)]: {
|
|
77
104
|
// @ts-ignore module augmentation fails if custom breakpoints are used
|
|
78
|
-
maxWidth: `${
|
|
105
|
+
maxWidth: `${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`
|
|
79
106
|
}
|
|
80
|
-
})),
|
|
81
|
-
const d =
|
|
82
|
-
className:
|
|
107
|
+
})), i = /* @__PURE__ */ E.forwardRef(function(s, u) {
|
|
108
|
+
const d = t(s), {
|
|
109
|
+
className: p,
|
|
83
110
|
component: f = "div",
|
|
84
|
-
disableGutters:
|
|
85
|
-
fixed:
|
|
86
|
-
maxWidth:
|
|
87
|
-
} = d,
|
|
111
|
+
disableGutters: c = !1,
|
|
112
|
+
fixed: v = !1,
|
|
113
|
+
maxWidth: h = "lg"
|
|
114
|
+
} = d, m = Se(d, wn), g = T({}, d, {
|
|
88
115
|
component: f,
|
|
89
|
-
disableGutters:
|
|
90
|
-
fixed:
|
|
91
|
-
maxWidth:
|
|
92
|
-
}),
|
|
116
|
+
disableGutters: c,
|
|
117
|
+
fixed: v,
|
|
118
|
+
maxWidth: h
|
|
119
|
+
}), w = Sn(g, r);
|
|
93
120
|
return (
|
|
94
121
|
// @ts-ignore theme is injected by the styled util
|
|
95
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ N(n, T({
|
|
96
123
|
as: f,
|
|
97
124
|
ownerState: g,
|
|
98
|
-
className:
|
|
99
|
-
ref:
|
|
100
|
-
},
|
|
125
|
+
className: Pe(w.root, p),
|
|
126
|
+
ref: u
|
|
127
|
+
}, m))
|
|
101
128
|
);
|
|
102
129
|
});
|
|
103
|
-
return process.env.NODE_ENV !== "production" && (
|
|
104
|
-
children:
|
|
105
|
-
classes:
|
|
106
|
-
className:
|
|
107
|
-
component:
|
|
108
|
-
disableGutters:
|
|
109
|
-
fixed:
|
|
110
|
-
maxWidth:
|
|
111
|
-
sx:
|
|
112
|
-
}),
|
|
113
|
-
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
116
|
-
}
|
|
117
|
-
const
|
|
130
|
+
return process.env.NODE_ENV !== "production" && (i.propTypes = {
|
|
131
|
+
children: l.node,
|
|
132
|
+
classes: l.object,
|
|
133
|
+
className: l.string,
|
|
134
|
+
component: l.elementType,
|
|
135
|
+
disableGutters: l.bool,
|
|
136
|
+
fixed: l.bool,
|
|
137
|
+
maxWidth: l.oneOfType([l.oneOf(["xs", "sm", "md", "lg", "xl", !1]), l.string]),
|
|
138
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object])
|
|
139
|
+
}), i;
|
|
140
|
+
}
|
|
141
|
+
function En(e) {
|
|
142
|
+
return rt("MuiIconButton", e);
|
|
143
|
+
}
|
|
144
|
+
const xn = Wt("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), Rn = xn, An = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], Dn = (e) => {
|
|
118
145
|
const {
|
|
119
146
|
classes: o,
|
|
120
|
-
disabled:
|
|
147
|
+
disabled: t,
|
|
121
148
|
color: r,
|
|
122
149
|
edge: n,
|
|
123
|
-
size:
|
|
124
|
-
} =
|
|
125
|
-
root: ["root",
|
|
150
|
+
size: i
|
|
151
|
+
} = e, a = {
|
|
152
|
+
root: ["root", t && "disabled", r !== "default" && `color${se(r)}`, n && `edge${se(n)}`, `size${se(i)}`]
|
|
126
153
|
};
|
|
127
|
-
return
|
|
128
|
-
},
|
|
154
|
+
return nt(a, En, o);
|
|
155
|
+
}, Nn = Oe(mn, {
|
|
129
156
|
name: "MuiIconButton",
|
|
130
157
|
slot: "Root",
|
|
131
|
-
overridesResolver: (
|
|
158
|
+
overridesResolver: (e, o) => {
|
|
132
159
|
const {
|
|
133
|
-
ownerState:
|
|
134
|
-
} =
|
|
135
|
-
return [o.root,
|
|
160
|
+
ownerState: t
|
|
161
|
+
} = e;
|
|
162
|
+
return [o.root, t.color !== "default" && o[`color${se(t.color)}`], t.edge && o[`edge${se(t.edge)}`], o[`size${se(t.size)}`]];
|
|
136
163
|
}
|
|
137
164
|
})(({
|
|
138
|
-
theme:
|
|
165
|
+
theme: e,
|
|
139
166
|
ownerState: o
|
|
140
|
-
}) =>
|
|
167
|
+
}) => T({
|
|
141
168
|
textAlign: "center",
|
|
142
169
|
flex: "0 0 auto",
|
|
143
|
-
fontSize:
|
|
170
|
+
fontSize: e.typography.pxToRem(24),
|
|
144
171
|
padding: 8,
|
|
145
172
|
borderRadius: "50%",
|
|
146
173
|
overflow: "visible",
|
|
147
174
|
// Explicitly set the default value to solve a bug on IE11.
|
|
148
|
-
color: (
|
|
149
|
-
transition:
|
|
150
|
-
duration:
|
|
175
|
+
color: (e.vars || e).palette.action.active,
|
|
176
|
+
transition: e.transitions.create("background-color", {
|
|
177
|
+
duration: e.transitions.duration.shortest
|
|
151
178
|
})
|
|
152
179
|
}, !o.disableRipple && {
|
|
153
180
|
"&:hover": {
|
|
154
|
-
backgroundColor:
|
|
181
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : et(e.palette.action.active, e.palette.action.hoverOpacity),
|
|
155
182
|
// Reset on touch devices, it doesn't add specificity
|
|
156
183
|
"@media (hover: none)": {
|
|
157
184
|
backgroundColor: "transparent"
|
|
@@ -162,18 +189,18 @@ const Re = ji("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimar
|
|
|
162
189
|
}, o.edge === "end" && {
|
|
163
190
|
marginRight: o.size === "small" ? -3 : -12
|
|
164
191
|
}), ({
|
|
165
|
-
theme:
|
|
192
|
+
theme: e,
|
|
166
193
|
ownerState: o
|
|
167
194
|
}) => {
|
|
168
|
-
var
|
|
169
|
-
const r = (
|
|
170
|
-
return
|
|
195
|
+
var t;
|
|
196
|
+
const r = (t = (e.vars || e).palette) == null ? void 0 : t[o.color];
|
|
197
|
+
return T({}, o.color === "inherit" && {
|
|
171
198
|
color: "inherit"
|
|
172
|
-
}, o.color !== "inherit" && o.color !== "default" &&
|
|
199
|
+
}, o.color !== "inherit" && o.color !== "default" && T({
|
|
173
200
|
color: r == null ? void 0 : r.main
|
|
174
201
|
}, !o.disableRipple && {
|
|
175
|
-
"&:hover":
|
|
176
|
-
backgroundColor:
|
|
202
|
+
"&:hover": T({}, r && {
|
|
203
|
+
backgroundColor: e.vars ? `rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})` : et(r.main, e.palette.action.hoverOpacity)
|
|
177
204
|
}, {
|
|
178
205
|
// Reset on touch devices, it doesn't add specificity
|
|
179
206
|
"@media (hover: none)": {
|
|
@@ -182,125 +209,1535 @@ const Re = ji("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimar
|
|
|
182
209
|
})
|
|
183
210
|
}), o.size === "small" && {
|
|
184
211
|
padding: 5,
|
|
185
|
-
fontSize:
|
|
212
|
+
fontSize: e.typography.pxToRem(18)
|
|
186
213
|
}, o.size === "large" && {
|
|
187
214
|
padding: 12,
|
|
188
|
-
fontSize:
|
|
215
|
+
fontSize: e.typography.pxToRem(28)
|
|
189
216
|
}, {
|
|
190
|
-
[`&.${
|
|
217
|
+
[`&.${Rn.disabled}`]: {
|
|
191
218
|
backgroundColor: "transparent",
|
|
192
|
-
color: (
|
|
219
|
+
color: (e.vars || e).palette.action.disabled
|
|
193
220
|
}
|
|
194
221
|
});
|
|
195
|
-
}),
|
|
196
|
-
const r =
|
|
222
|
+
}), er = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
223
|
+
const r = it({
|
|
197
224
|
props: o,
|
|
198
225
|
name: "MuiIconButton"
|
|
199
226
|
}), {
|
|
200
227
|
edge: n = !1,
|
|
201
|
-
children:
|
|
202
|
-
className:
|
|
228
|
+
children: i,
|
|
229
|
+
className: a,
|
|
203
230
|
color: s = "default",
|
|
204
|
-
disabled:
|
|
231
|
+
disabled: u = !1,
|
|
205
232
|
disableFocusRipple: d = !1,
|
|
206
|
-
size:
|
|
207
|
-
} = r, f =
|
|
233
|
+
size: p = "medium"
|
|
234
|
+
} = r, f = Se(r, An), c = T({}, r, {
|
|
208
235
|
edge: n,
|
|
209
236
|
color: s,
|
|
210
|
-
disabled:
|
|
237
|
+
disabled: u,
|
|
211
238
|
disableFocusRipple: d,
|
|
212
|
-
size:
|
|
213
|
-
}),
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
className:
|
|
239
|
+
size: p
|
|
240
|
+
}), v = Dn(c);
|
|
241
|
+
return /* @__PURE__ */ N(Nn, T({
|
|
242
|
+
className: Pe(v.root, a),
|
|
216
243
|
centerRipple: !0,
|
|
217
244
|
focusRipple: !d,
|
|
218
|
-
disabled:
|
|
219
|
-
ref:
|
|
220
|
-
ownerState:
|
|
245
|
+
disabled: u,
|
|
246
|
+
ref: t,
|
|
247
|
+
ownerState: c
|
|
221
248
|
}, f, {
|
|
222
|
-
children:
|
|
249
|
+
children: i
|
|
223
250
|
}));
|
|
224
251
|
});
|
|
225
|
-
process.env.NODE_ENV !== "production" && (
|
|
252
|
+
process.env.NODE_ENV !== "production" && (er.propTypes = {
|
|
226
253
|
// ----------------------------- Warning --------------------------------
|
|
227
254
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
228
255
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
229
256
|
// ----------------------------------------------------------------------
|
|
230
257
|
/**
|
|
231
|
-
* The icon to display.
|
|
258
|
+
* The icon to display.
|
|
259
|
+
*/
|
|
260
|
+
children: Jo(l.node, (e) => E.Children.toArray(e.children).some((t) => /* @__PURE__ */ E.isValidElement(t) && t.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
261
|
+
`)) : null),
|
|
262
|
+
/**
|
|
263
|
+
* Override or extend the styles applied to the component.
|
|
264
|
+
*/
|
|
265
|
+
classes: l.object,
|
|
266
|
+
/**
|
|
267
|
+
* @ignore
|
|
268
|
+
*/
|
|
269
|
+
className: l.string,
|
|
270
|
+
/**
|
|
271
|
+
* The color of the component.
|
|
272
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
273
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
274
|
+
* @default 'default'
|
|
275
|
+
*/
|
|
276
|
+
color: l.oneOfType([l.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), l.string]),
|
|
277
|
+
/**
|
|
278
|
+
* If `true`, the component is disabled.
|
|
279
|
+
* @default false
|
|
280
|
+
*/
|
|
281
|
+
disabled: l.bool,
|
|
282
|
+
/**
|
|
283
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
284
|
+
* @default false
|
|
285
|
+
*/
|
|
286
|
+
disableFocusRipple: l.bool,
|
|
287
|
+
/**
|
|
288
|
+
* If `true`, the ripple effect is disabled.
|
|
289
|
+
*
|
|
290
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
291
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
292
|
+
* @default false
|
|
293
|
+
*/
|
|
294
|
+
disableRipple: l.bool,
|
|
295
|
+
/**
|
|
296
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
297
|
+
* side (this is often helpful for aligning the left or right
|
|
298
|
+
* side of the icon with content above or below, without ruining the border
|
|
299
|
+
* size and shape).
|
|
300
|
+
* @default false
|
|
301
|
+
*/
|
|
302
|
+
edge: l.oneOf(["end", "start", !1]),
|
|
303
|
+
/**
|
|
304
|
+
* The size of the component.
|
|
305
|
+
* `small` is equivalent to the dense button styling.
|
|
306
|
+
* @default 'medium'
|
|
307
|
+
*/
|
|
308
|
+
size: l.oneOfType([l.oneOf(["small", "medium", "large"]), l.string]),
|
|
309
|
+
/**
|
|
310
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
311
|
+
*/
|
|
312
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object])
|
|
313
|
+
});
|
|
314
|
+
const ht = er, Mn = {
|
|
315
|
+
disableDefaultClasses: !1
|
|
316
|
+
}, _n = /* @__PURE__ */ E.createContext(Mn);
|
|
317
|
+
function Wn(e) {
|
|
318
|
+
const {
|
|
319
|
+
disableDefaultClasses: o
|
|
320
|
+
} = E.useContext(_n);
|
|
321
|
+
return (t) => o ? "" : e(t);
|
|
322
|
+
}
|
|
323
|
+
var H = "top", re = "bottom", ne = "right", F = "left", to = "auto", at = [H, re, ne, F], Be = "start", tt = "end", Yn = "clippingParents", tr = "viewport", qe = "popper", $n = "reference", _o = /* @__PURE__ */ at.reduce(function(e, o) {
|
|
324
|
+
return e.concat([o + "-" + Be, o + "-" + tt]);
|
|
325
|
+
}, []), or = /* @__PURE__ */ [].concat(at, [to]).reduce(function(e, o) {
|
|
326
|
+
return e.concat([o, o + "-" + Be, o + "-" + tt]);
|
|
327
|
+
}, []), Bn = "beforeRead", kn = "read", zn = "afterRead", Xn = "beforeMain", jn = "main", Ln = "afterMain", Vn = "beforeWrite", Hn = "write", Fn = "afterWrite", Zn = [Bn, kn, zn, Xn, jn, Ln, Vn, Hn, Fn];
|
|
328
|
+
function ve(e) {
|
|
329
|
+
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
330
|
+
}
|
|
331
|
+
function J(e) {
|
|
332
|
+
if (e == null)
|
|
333
|
+
return window;
|
|
334
|
+
if (e.toString() !== "[object Window]") {
|
|
335
|
+
var o = e.ownerDocument;
|
|
336
|
+
return o && o.defaultView || window;
|
|
337
|
+
}
|
|
338
|
+
return e;
|
|
339
|
+
}
|
|
340
|
+
function Me(e) {
|
|
341
|
+
var o = J(e).Element;
|
|
342
|
+
return e instanceof o || e instanceof Element;
|
|
343
|
+
}
|
|
344
|
+
function oe(e) {
|
|
345
|
+
var o = J(e).HTMLElement;
|
|
346
|
+
return e instanceof o || e instanceof HTMLElement;
|
|
347
|
+
}
|
|
348
|
+
function oo(e) {
|
|
349
|
+
if (typeof ShadowRoot > "u")
|
|
350
|
+
return !1;
|
|
351
|
+
var o = J(e).ShadowRoot;
|
|
352
|
+
return e instanceof o || e instanceof ShadowRoot;
|
|
353
|
+
}
|
|
354
|
+
function Un(e) {
|
|
355
|
+
var o = e.state;
|
|
356
|
+
Object.keys(o.elements).forEach(function(t) {
|
|
357
|
+
var r = o.styles[t] || {}, n = o.attributes[t] || {}, i = o.elements[t];
|
|
358
|
+
!oe(i) || !ve(i) || (Object.assign(i.style, r), Object.keys(n).forEach(function(a) {
|
|
359
|
+
var s = n[a];
|
|
360
|
+
s === !1 ? i.removeAttribute(a) : i.setAttribute(a, s === !0 ? "" : s);
|
|
361
|
+
}));
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
function qn(e) {
|
|
365
|
+
var o = e.state, t = {
|
|
366
|
+
popper: {
|
|
367
|
+
position: o.options.strategy,
|
|
368
|
+
left: "0",
|
|
369
|
+
top: "0",
|
|
370
|
+
margin: "0"
|
|
371
|
+
},
|
|
372
|
+
arrow: {
|
|
373
|
+
position: "absolute"
|
|
374
|
+
},
|
|
375
|
+
reference: {}
|
|
376
|
+
};
|
|
377
|
+
return Object.assign(o.elements.popper.style, t.popper), o.styles = t, o.elements.arrow && Object.assign(o.elements.arrow.style, t.arrow), function() {
|
|
378
|
+
Object.keys(o.elements).forEach(function(r) {
|
|
379
|
+
var n = o.elements[r], i = o.attributes[r] || {}, a = Object.keys(o.styles.hasOwnProperty(r) ? o.styles[r] : t[r]), s = a.reduce(function(u, d) {
|
|
380
|
+
return u[d] = "", u;
|
|
381
|
+
}, {});
|
|
382
|
+
!oe(n) || !ve(n) || (Object.assign(n.style, s), Object.keys(i).forEach(function(u) {
|
|
383
|
+
n.removeAttribute(u);
|
|
384
|
+
}));
|
|
385
|
+
});
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
const Kn = {
|
|
389
|
+
name: "applyStyles",
|
|
390
|
+
enabled: !0,
|
|
391
|
+
phase: "write",
|
|
392
|
+
fn: Un,
|
|
393
|
+
effect: qn,
|
|
394
|
+
requires: ["computeStyles"]
|
|
395
|
+
};
|
|
396
|
+
function ce(e) {
|
|
397
|
+
return e.split("-")[0];
|
|
398
|
+
}
|
|
399
|
+
var De = Math.max, Et = Math.min, ke = Math.round;
|
|
400
|
+
function Qt() {
|
|
401
|
+
var e = navigator.userAgentData;
|
|
402
|
+
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(o) {
|
|
403
|
+
return o.brand + "/" + o.version;
|
|
404
|
+
}).join(" ") : navigator.userAgent;
|
|
405
|
+
}
|
|
406
|
+
function rr() {
|
|
407
|
+
return !/^((?!chrome|android).)*safari/i.test(Qt());
|
|
408
|
+
}
|
|
409
|
+
function ze(e, o, t) {
|
|
410
|
+
o === void 0 && (o = !1), t === void 0 && (t = !1);
|
|
411
|
+
var r = e.getBoundingClientRect(), n = 1, i = 1;
|
|
412
|
+
o && oe(e) && (n = e.offsetWidth > 0 && ke(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && ke(r.height) / e.offsetHeight || 1);
|
|
413
|
+
var a = Me(e) ? J(e) : window, s = a.visualViewport, u = !rr() && t, d = (r.left + (u && s ? s.offsetLeft : 0)) / n, p = (r.top + (u && s ? s.offsetTop : 0)) / i, f = r.width / n, c = r.height / i;
|
|
414
|
+
return {
|
|
415
|
+
width: f,
|
|
416
|
+
height: c,
|
|
417
|
+
top: p,
|
|
418
|
+
right: d + f,
|
|
419
|
+
bottom: p + c,
|
|
420
|
+
left: d,
|
|
421
|
+
x: d,
|
|
422
|
+
y: p
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function ro(e) {
|
|
426
|
+
var o = ze(e), t = e.offsetWidth, r = e.offsetHeight;
|
|
427
|
+
return Math.abs(o.width - t) <= 1 && (t = o.width), Math.abs(o.height - r) <= 1 && (r = o.height), {
|
|
428
|
+
x: e.offsetLeft,
|
|
429
|
+
y: e.offsetTop,
|
|
430
|
+
width: t,
|
|
431
|
+
height: r
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function nr(e, o) {
|
|
435
|
+
var t = o.getRootNode && o.getRootNode();
|
|
436
|
+
if (e.contains(o))
|
|
437
|
+
return !0;
|
|
438
|
+
if (t && oo(t)) {
|
|
439
|
+
var r = o;
|
|
440
|
+
do {
|
|
441
|
+
if (r && e.isSameNode(r))
|
|
442
|
+
return !0;
|
|
443
|
+
r = r.parentNode || r.host;
|
|
444
|
+
} while (r);
|
|
445
|
+
}
|
|
446
|
+
return !1;
|
|
447
|
+
}
|
|
448
|
+
function be(e) {
|
|
449
|
+
return J(e).getComputedStyle(e);
|
|
450
|
+
}
|
|
451
|
+
function Qn(e) {
|
|
452
|
+
return ["table", "td", "th"].indexOf(ve(e)) >= 0;
|
|
453
|
+
}
|
|
454
|
+
function Ee(e) {
|
|
455
|
+
return ((Me(e) ? e.ownerDocument : (
|
|
456
|
+
// $FlowFixMe[prop-missing]
|
|
457
|
+
e.document
|
|
458
|
+
)) || window.document).documentElement;
|
|
459
|
+
}
|
|
460
|
+
function Yt(e) {
|
|
461
|
+
return ve(e) === "html" ? e : (
|
|
462
|
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
463
|
+
// $FlowFixMe[incompatible-return]
|
|
464
|
+
// $FlowFixMe[prop-missing]
|
|
465
|
+
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
466
|
+
e.parentNode || // DOM Element detected
|
|
467
|
+
(oo(e) ? e.host : null) || // ShadowRoot detected
|
|
468
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
469
|
+
Ee(e)
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
function Wo(e) {
|
|
473
|
+
return !oe(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
474
|
+
be(e).position === "fixed" ? null : e.offsetParent;
|
|
475
|
+
}
|
|
476
|
+
function Gn(e) {
|
|
477
|
+
var o = /firefox/i.test(Qt()), t = /Trident/i.test(Qt());
|
|
478
|
+
if (t && oe(e)) {
|
|
479
|
+
var r = be(e);
|
|
480
|
+
if (r.position === "fixed")
|
|
481
|
+
return null;
|
|
482
|
+
}
|
|
483
|
+
var n = Yt(e);
|
|
484
|
+
for (oo(n) && (n = n.host); oe(n) && ["html", "body"].indexOf(ve(n)) < 0; ) {
|
|
485
|
+
var i = be(n);
|
|
486
|
+
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || o && i.willChange === "filter" || o && i.filter && i.filter !== "none")
|
|
487
|
+
return n;
|
|
488
|
+
n = n.parentNode;
|
|
489
|
+
}
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
function st(e) {
|
|
493
|
+
for (var o = J(e), t = Wo(e); t && Qn(t) && be(t).position === "static"; )
|
|
494
|
+
t = Wo(t);
|
|
495
|
+
return t && (ve(t) === "html" || ve(t) === "body" && be(t).position === "static") ? o : t || Gn(e) || o;
|
|
496
|
+
}
|
|
497
|
+
function no(e) {
|
|
498
|
+
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
499
|
+
}
|
|
500
|
+
function Ge(e, o, t) {
|
|
501
|
+
return De(e, Et(o, t));
|
|
502
|
+
}
|
|
503
|
+
function Jn(e, o, t) {
|
|
504
|
+
var r = Ge(e, o, t);
|
|
505
|
+
return r > t ? t : r;
|
|
506
|
+
}
|
|
507
|
+
function ir() {
|
|
508
|
+
return {
|
|
509
|
+
top: 0,
|
|
510
|
+
right: 0,
|
|
511
|
+
bottom: 0,
|
|
512
|
+
left: 0
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
function ar(e) {
|
|
516
|
+
return Object.assign({}, ir(), e);
|
|
517
|
+
}
|
|
518
|
+
function sr(e, o) {
|
|
519
|
+
return o.reduce(function(t, r) {
|
|
520
|
+
return t[r] = e, t;
|
|
521
|
+
}, {});
|
|
522
|
+
}
|
|
523
|
+
var In = function(o, t) {
|
|
524
|
+
return o = typeof o == "function" ? o(Object.assign({}, t.rects, {
|
|
525
|
+
placement: t.placement
|
|
526
|
+
})) : o, ar(typeof o != "number" ? o : sr(o, at));
|
|
527
|
+
};
|
|
528
|
+
function ei(e) {
|
|
529
|
+
var o, t = e.state, r = e.name, n = e.options, i = t.elements.arrow, a = t.modifiersData.popperOffsets, s = ce(t.placement), u = no(s), d = [F, ne].indexOf(s) >= 0, p = d ? "height" : "width";
|
|
530
|
+
if (!(!i || !a)) {
|
|
531
|
+
var f = In(n.padding, t), c = ro(i), v = u === "y" ? H : F, h = u === "y" ? re : ne, m = t.rects.reference[p] + t.rects.reference[u] - a[u] - t.rects.popper[p], g = a[u] - t.rects.reference[u], w = st(i), S = w ? u === "y" ? w.clientHeight || 0 : w.clientWidth || 0 : 0, y = m / 2 - g / 2, b = f[v], P = S - c[p] - f[h], C = S / 2 - c[p] / 2 + y, O = Ge(b, C, P), D = u;
|
|
532
|
+
t.modifiersData[r] = (o = {}, o[D] = O, o.centerOffset = O - C, o);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function ti(e) {
|
|
536
|
+
var o = e.state, t = e.options, r = t.element, n = r === void 0 ? "[data-popper-arrow]" : r;
|
|
537
|
+
n != null && (typeof n == "string" && (n = o.elements.popper.querySelector(n), !n) || nr(o.elements.popper, n) && (o.elements.arrow = n));
|
|
538
|
+
}
|
|
539
|
+
const oi = {
|
|
540
|
+
name: "arrow",
|
|
541
|
+
enabled: !0,
|
|
542
|
+
phase: "main",
|
|
543
|
+
fn: ei,
|
|
544
|
+
effect: ti,
|
|
545
|
+
requires: ["popperOffsets"],
|
|
546
|
+
requiresIfExists: ["preventOverflow"]
|
|
547
|
+
};
|
|
548
|
+
function Xe(e) {
|
|
549
|
+
return e.split("-")[1];
|
|
550
|
+
}
|
|
551
|
+
var ri = {
|
|
552
|
+
top: "auto",
|
|
553
|
+
right: "auto",
|
|
554
|
+
bottom: "auto",
|
|
555
|
+
left: "auto"
|
|
556
|
+
};
|
|
557
|
+
function ni(e, o) {
|
|
558
|
+
var t = e.x, r = e.y, n = o.devicePixelRatio || 1;
|
|
559
|
+
return {
|
|
560
|
+
x: ke(t * n) / n || 0,
|
|
561
|
+
y: ke(r * n) / n || 0
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
function Yo(e) {
|
|
565
|
+
var o, t = e.popper, r = e.popperRect, n = e.placement, i = e.variation, a = e.offsets, s = e.position, u = e.gpuAcceleration, d = e.adaptive, p = e.roundOffsets, f = e.isFixed, c = a.x, v = c === void 0 ? 0 : c, h = a.y, m = h === void 0 ? 0 : h, g = typeof p == "function" ? p({
|
|
566
|
+
x: v,
|
|
567
|
+
y: m
|
|
568
|
+
}) : {
|
|
569
|
+
x: v,
|
|
570
|
+
y: m
|
|
571
|
+
};
|
|
572
|
+
v = g.x, m = g.y;
|
|
573
|
+
var w = a.hasOwnProperty("x"), S = a.hasOwnProperty("y"), y = F, b = H, P = window;
|
|
574
|
+
if (d) {
|
|
575
|
+
var C = st(t), O = "clientHeight", D = "clientWidth";
|
|
576
|
+
if (C === J(t) && (C = Ee(t), be(C).position !== "static" && s === "absolute" && (O = "scrollHeight", D = "scrollWidth")), C = C, n === H || (n === F || n === ne) && i === tt) {
|
|
577
|
+
b = re;
|
|
578
|
+
var x = f && C === P && P.visualViewport ? P.visualViewport.height : (
|
|
579
|
+
// $FlowFixMe[prop-missing]
|
|
580
|
+
C[O]
|
|
581
|
+
);
|
|
582
|
+
m -= x - r.height, m *= u ? 1 : -1;
|
|
583
|
+
}
|
|
584
|
+
if (n === F || (n === H || n === re) && i === tt) {
|
|
585
|
+
y = ne;
|
|
586
|
+
var R = f && C === P && P.visualViewport ? P.visualViewport.width : (
|
|
587
|
+
// $FlowFixMe[prop-missing]
|
|
588
|
+
C[D]
|
|
589
|
+
);
|
|
590
|
+
v -= R - r.width, v *= u ? 1 : -1;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
var M = Object.assign({
|
|
594
|
+
position: s
|
|
595
|
+
}, d && ri), B = p === !0 ? ni({
|
|
596
|
+
x: v,
|
|
597
|
+
y: m
|
|
598
|
+
}, J(t)) : {
|
|
599
|
+
x: v,
|
|
600
|
+
y: m
|
|
601
|
+
};
|
|
602
|
+
if (v = B.x, m = B.y, u) {
|
|
603
|
+
var W;
|
|
604
|
+
return Object.assign({}, M, (W = {}, W[b] = S ? "0" : "", W[y] = w ? "0" : "", W.transform = (P.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + m + "px)" : "translate3d(" + v + "px, " + m + "px, 0)", W));
|
|
605
|
+
}
|
|
606
|
+
return Object.assign({}, M, (o = {}, o[b] = S ? m + "px" : "", o[y] = w ? v + "px" : "", o.transform = "", o));
|
|
607
|
+
}
|
|
608
|
+
function ii(e) {
|
|
609
|
+
var o = e.state, t = e.options, r = t.gpuAcceleration, n = r === void 0 ? !0 : r, i = t.adaptive, a = i === void 0 ? !0 : i, s = t.roundOffsets, u = s === void 0 ? !0 : s, d = {
|
|
610
|
+
placement: ce(o.placement),
|
|
611
|
+
variation: Xe(o.placement),
|
|
612
|
+
popper: o.elements.popper,
|
|
613
|
+
popperRect: o.rects.popper,
|
|
614
|
+
gpuAcceleration: n,
|
|
615
|
+
isFixed: o.options.strategy === "fixed"
|
|
616
|
+
};
|
|
617
|
+
o.modifiersData.popperOffsets != null && (o.styles.popper = Object.assign({}, o.styles.popper, Yo(Object.assign({}, d, {
|
|
618
|
+
offsets: o.modifiersData.popperOffsets,
|
|
619
|
+
position: o.options.strategy,
|
|
620
|
+
adaptive: a,
|
|
621
|
+
roundOffsets: u
|
|
622
|
+
})))), o.modifiersData.arrow != null && (o.styles.arrow = Object.assign({}, o.styles.arrow, Yo(Object.assign({}, d, {
|
|
623
|
+
offsets: o.modifiersData.arrow,
|
|
624
|
+
position: "absolute",
|
|
625
|
+
adaptive: !1,
|
|
626
|
+
roundOffsets: u
|
|
627
|
+
})))), o.attributes.popper = Object.assign({}, o.attributes.popper, {
|
|
628
|
+
"data-popper-placement": o.placement
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
const ai = {
|
|
632
|
+
name: "computeStyles",
|
|
633
|
+
enabled: !0,
|
|
634
|
+
phase: "beforeWrite",
|
|
635
|
+
fn: ii,
|
|
636
|
+
data: {}
|
|
637
|
+
};
|
|
638
|
+
var gt = {
|
|
639
|
+
passive: !0
|
|
640
|
+
};
|
|
641
|
+
function si(e) {
|
|
642
|
+
var o = e.state, t = e.instance, r = e.options, n = r.scroll, i = n === void 0 ? !0 : n, a = r.resize, s = a === void 0 ? !0 : a, u = J(o.elements.popper), d = [].concat(o.scrollParents.reference, o.scrollParents.popper);
|
|
643
|
+
return i && d.forEach(function(p) {
|
|
644
|
+
p.addEventListener("scroll", t.update, gt);
|
|
645
|
+
}), s && u.addEventListener("resize", t.update, gt), function() {
|
|
646
|
+
i && d.forEach(function(p) {
|
|
647
|
+
p.removeEventListener("scroll", t.update, gt);
|
|
648
|
+
}), s && u.removeEventListener("resize", t.update, gt);
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
const li = {
|
|
652
|
+
name: "eventListeners",
|
|
653
|
+
enabled: !0,
|
|
654
|
+
phase: "write",
|
|
655
|
+
fn: function() {
|
|
656
|
+
},
|
|
657
|
+
effect: si,
|
|
658
|
+
data: {}
|
|
659
|
+
};
|
|
660
|
+
var ui = {
|
|
661
|
+
left: "right",
|
|
662
|
+
right: "left",
|
|
663
|
+
bottom: "top",
|
|
664
|
+
top: "bottom"
|
|
665
|
+
};
|
|
666
|
+
function Ct(e) {
|
|
667
|
+
return e.replace(/left|right|bottom|top/g, function(o) {
|
|
668
|
+
return ui[o];
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
var pi = {
|
|
672
|
+
start: "end",
|
|
673
|
+
end: "start"
|
|
674
|
+
};
|
|
675
|
+
function $o(e) {
|
|
676
|
+
return e.replace(/start|end/g, function(o) {
|
|
677
|
+
return pi[o];
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
function io(e) {
|
|
681
|
+
var o = J(e), t = o.pageXOffset, r = o.pageYOffset;
|
|
682
|
+
return {
|
|
683
|
+
scrollLeft: t,
|
|
684
|
+
scrollTop: r
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
function ao(e) {
|
|
688
|
+
return ze(Ee(e)).left + io(e).scrollLeft;
|
|
689
|
+
}
|
|
690
|
+
function di(e, o) {
|
|
691
|
+
var t = J(e), r = Ee(e), n = t.visualViewport, i = r.clientWidth, a = r.clientHeight, s = 0, u = 0;
|
|
692
|
+
if (n) {
|
|
693
|
+
i = n.width, a = n.height;
|
|
694
|
+
var d = rr();
|
|
695
|
+
(d || !d && o === "fixed") && (s = n.offsetLeft, u = n.offsetTop);
|
|
696
|
+
}
|
|
697
|
+
return {
|
|
698
|
+
width: i,
|
|
699
|
+
height: a,
|
|
700
|
+
x: s + ao(e),
|
|
701
|
+
y: u
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
function fi(e) {
|
|
705
|
+
var o, t = Ee(e), r = io(e), n = (o = e.ownerDocument) == null ? void 0 : o.body, i = De(t.scrollWidth, t.clientWidth, n ? n.scrollWidth : 0, n ? n.clientWidth : 0), a = De(t.scrollHeight, t.clientHeight, n ? n.scrollHeight : 0, n ? n.clientHeight : 0), s = -r.scrollLeft + ao(e), u = -r.scrollTop;
|
|
706
|
+
return be(n || t).direction === "rtl" && (s += De(t.clientWidth, n ? n.clientWidth : 0) - i), {
|
|
707
|
+
width: i,
|
|
708
|
+
height: a,
|
|
709
|
+
x: s,
|
|
710
|
+
y: u
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
function so(e) {
|
|
714
|
+
var o = be(e), t = o.overflow, r = o.overflowX, n = o.overflowY;
|
|
715
|
+
return /auto|scroll|overlay|hidden/.test(t + n + r);
|
|
716
|
+
}
|
|
717
|
+
function lr(e) {
|
|
718
|
+
return ["html", "body", "#document"].indexOf(ve(e)) >= 0 ? e.ownerDocument.body : oe(e) && so(e) ? e : lr(Yt(e));
|
|
719
|
+
}
|
|
720
|
+
function Je(e, o) {
|
|
721
|
+
var t;
|
|
722
|
+
o === void 0 && (o = []);
|
|
723
|
+
var r = lr(e), n = r === ((t = e.ownerDocument) == null ? void 0 : t.body), i = J(r), a = n ? [i].concat(i.visualViewport || [], so(r) ? r : []) : r, s = o.concat(a);
|
|
724
|
+
return n ? s : (
|
|
725
|
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
726
|
+
s.concat(Je(Yt(a)))
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
function Gt(e) {
|
|
730
|
+
return Object.assign({}, e, {
|
|
731
|
+
left: e.x,
|
|
732
|
+
top: e.y,
|
|
733
|
+
right: e.x + e.width,
|
|
734
|
+
bottom: e.y + e.height
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
function ci(e, o) {
|
|
738
|
+
var t = ze(e, !1, o === "fixed");
|
|
739
|
+
return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
|
|
740
|
+
}
|
|
741
|
+
function Bo(e, o, t) {
|
|
742
|
+
return o === tr ? Gt(di(e, t)) : Me(o) ? ci(o, t) : Gt(fi(Ee(e)));
|
|
743
|
+
}
|
|
744
|
+
function vi(e) {
|
|
745
|
+
var o = Je(Yt(e)), t = ["absolute", "fixed"].indexOf(be(e).position) >= 0, r = t && oe(e) ? st(e) : e;
|
|
746
|
+
return Me(r) ? o.filter(function(n) {
|
|
747
|
+
return Me(n) && nr(n, r) && ve(n) !== "body";
|
|
748
|
+
}) : [];
|
|
749
|
+
}
|
|
750
|
+
function mi(e, o, t, r) {
|
|
751
|
+
var n = o === "clippingParents" ? vi(e) : [].concat(o), i = [].concat(n, [t]), a = i[0], s = i.reduce(function(u, d) {
|
|
752
|
+
var p = Bo(e, d, r);
|
|
753
|
+
return u.top = De(p.top, u.top), u.right = Et(p.right, u.right), u.bottom = Et(p.bottom, u.bottom), u.left = De(p.left, u.left), u;
|
|
754
|
+
}, Bo(e, a, r));
|
|
755
|
+
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
756
|
+
}
|
|
757
|
+
function ur(e) {
|
|
758
|
+
var o = e.reference, t = e.element, r = e.placement, n = r ? ce(r) : null, i = r ? Xe(r) : null, a = o.x + o.width / 2 - t.width / 2, s = o.y + o.height / 2 - t.height / 2, u;
|
|
759
|
+
switch (n) {
|
|
760
|
+
case H:
|
|
761
|
+
u = {
|
|
762
|
+
x: a,
|
|
763
|
+
y: o.y - t.height
|
|
764
|
+
};
|
|
765
|
+
break;
|
|
766
|
+
case re:
|
|
767
|
+
u = {
|
|
768
|
+
x: a,
|
|
769
|
+
y: o.y + o.height
|
|
770
|
+
};
|
|
771
|
+
break;
|
|
772
|
+
case ne:
|
|
773
|
+
u = {
|
|
774
|
+
x: o.x + o.width,
|
|
775
|
+
y: s
|
|
776
|
+
};
|
|
777
|
+
break;
|
|
778
|
+
case F:
|
|
779
|
+
u = {
|
|
780
|
+
x: o.x - t.width,
|
|
781
|
+
y: s
|
|
782
|
+
};
|
|
783
|
+
break;
|
|
784
|
+
default:
|
|
785
|
+
u = {
|
|
786
|
+
x: o.x,
|
|
787
|
+
y: o.y
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
var d = n ? no(n) : null;
|
|
791
|
+
if (d != null) {
|
|
792
|
+
var p = d === "y" ? "height" : "width";
|
|
793
|
+
switch (i) {
|
|
794
|
+
case Be:
|
|
795
|
+
u[d] = u[d] - (o[p] / 2 - t[p] / 2);
|
|
796
|
+
break;
|
|
797
|
+
case tt:
|
|
798
|
+
u[d] = u[d] + (o[p] / 2 - t[p] / 2);
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return u;
|
|
803
|
+
}
|
|
804
|
+
function ot(e, o) {
|
|
805
|
+
o === void 0 && (o = {});
|
|
806
|
+
var t = o, r = t.placement, n = r === void 0 ? e.placement : r, i = t.strategy, a = i === void 0 ? e.strategy : i, s = t.boundary, u = s === void 0 ? Yn : s, d = t.rootBoundary, p = d === void 0 ? tr : d, f = t.elementContext, c = f === void 0 ? qe : f, v = t.altBoundary, h = v === void 0 ? !1 : v, m = t.padding, g = m === void 0 ? 0 : m, w = ar(typeof g != "number" ? g : sr(g, at)), S = c === qe ? $n : qe, y = e.rects.popper, b = e.elements[h ? S : c], P = mi(Me(b) ? b : b.contextElement || Ee(e.elements.popper), u, p, a), C = ze(e.elements.reference), O = ur({
|
|
807
|
+
reference: C,
|
|
808
|
+
element: y,
|
|
809
|
+
strategy: "absolute",
|
|
810
|
+
placement: n
|
|
811
|
+
}), D = Gt(Object.assign({}, y, O)), x = c === qe ? D : C, R = {
|
|
812
|
+
top: P.top - x.top + w.top,
|
|
813
|
+
bottom: x.bottom - P.bottom + w.bottom,
|
|
814
|
+
left: P.left - x.left + w.left,
|
|
815
|
+
right: x.right - P.right + w.right
|
|
816
|
+
}, M = e.modifiersData.offset;
|
|
817
|
+
if (c === qe && M) {
|
|
818
|
+
var B = M[n];
|
|
819
|
+
Object.keys(R).forEach(function(W) {
|
|
820
|
+
var Z = [ne, re].indexOf(W) >= 0 ? 1 : -1, U = [H, re].indexOf(W) >= 0 ? "y" : "x";
|
|
821
|
+
R[W] += B[U] * Z;
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
return R;
|
|
825
|
+
}
|
|
826
|
+
function hi(e, o) {
|
|
827
|
+
o === void 0 && (o = {});
|
|
828
|
+
var t = o, r = t.placement, n = t.boundary, i = t.rootBoundary, a = t.padding, s = t.flipVariations, u = t.allowedAutoPlacements, d = u === void 0 ? or : u, p = Xe(r), f = p ? s ? _o : _o.filter(function(h) {
|
|
829
|
+
return Xe(h) === p;
|
|
830
|
+
}) : at, c = f.filter(function(h) {
|
|
831
|
+
return d.indexOf(h) >= 0;
|
|
832
|
+
});
|
|
833
|
+
c.length === 0 && (c = f);
|
|
834
|
+
var v = c.reduce(function(h, m) {
|
|
835
|
+
return h[m] = ot(e, {
|
|
836
|
+
placement: m,
|
|
837
|
+
boundary: n,
|
|
838
|
+
rootBoundary: i,
|
|
839
|
+
padding: a
|
|
840
|
+
})[ce(m)], h;
|
|
841
|
+
}, {});
|
|
842
|
+
return Object.keys(v).sort(function(h, m) {
|
|
843
|
+
return v[h] - v[m];
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
function gi(e) {
|
|
847
|
+
if (ce(e) === to)
|
|
848
|
+
return [];
|
|
849
|
+
var o = Ct(e);
|
|
850
|
+
return [$o(e), o, $o(o)];
|
|
851
|
+
}
|
|
852
|
+
function bi(e) {
|
|
853
|
+
var o = e.state, t = e.options, r = e.name;
|
|
854
|
+
if (!o.modifiersData[r]._skip) {
|
|
855
|
+
for (var n = t.mainAxis, i = n === void 0 ? !0 : n, a = t.altAxis, s = a === void 0 ? !0 : a, u = t.fallbackPlacements, d = t.padding, p = t.boundary, f = t.rootBoundary, c = t.altBoundary, v = t.flipVariations, h = v === void 0 ? !0 : v, m = t.allowedAutoPlacements, g = o.options.placement, w = ce(g), S = w === g, y = u || (S || !h ? [Ct(g)] : gi(g)), b = [g].concat(y).reduce(function(K, Q) {
|
|
856
|
+
return K.concat(ce(Q) === to ? hi(o, {
|
|
857
|
+
placement: Q,
|
|
858
|
+
boundary: p,
|
|
859
|
+
rootBoundary: f,
|
|
860
|
+
padding: d,
|
|
861
|
+
flipVariations: h,
|
|
862
|
+
allowedAutoPlacements: m
|
|
863
|
+
}) : Q);
|
|
864
|
+
}, []), P = o.rects.reference, C = o.rects.popper, O = /* @__PURE__ */ new Map(), D = !0, x = b[0], R = 0; R < b.length; R++) {
|
|
865
|
+
var M = b[R], B = ce(M), W = Xe(M) === Be, Z = [H, re].indexOf(B) >= 0, U = Z ? "width" : "height", Y = ot(o, {
|
|
866
|
+
placement: M,
|
|
867
|
+
boundary: p,
|
|
868
|
+
rootBoundary: f,
|
|
869
|
+
altBoundary: c,
|
|
870
|
+
padding: d
|
|
871
|
+
}), k = Z ? W ? ne : F : W ? re : H;
|
|
872
|
+
P[U] > C[U] && (k = Ct(k));
|
|
873
|
+
var z = Ct(k), q = [];
|
|
874
|
+
if (i && q.push(Y[B] <= 0), s && q.push(Y[k] <= 0, Y[z] <= 0), q.every(function(K) {
|
|
875
|
+
return K;
|
|
876
|
+
})) {
|
|
877
|
+
x = M, D = !1;
|
|
878
|
+
break;
|
|
879
|
+
}
|
|
880
|
+
O.set(M, q);
|
|
881
|
+
}
|
|
882
|
+
if (D)
|
|
883
|
+
for (var ye = h ? 3 : 1, le = function(Q) {
|
|
884
|
+
var ue = b.find(function(pe) {
|
|
885
|
+
var X = O.get(pe);
|
|
886
|
+
if (X)
|
|
887
|
+
return X.slice(0, Q).every(function(L) {
|
|
888
|
+
return L;
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
if (ue)
|
|
892
|
+
return x = ue, "break";
|
|
893
|
+
}, me = ye; me > 0; me--) {
|
|
894
|
+
var ie = le(me);
|
|
895
|
+
if (ie === "break")
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
o.placement !== x && (o.modifiersData[r]._skip = !0, o.placement = x, o.reset = !0);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
const yi = {
|
|
902
|
+
name: "flip",
|
|
903
|
+
enabled: !0,
|
|
904
|
+
phase: "main",
|
|
905
|
+
fn: bi,
|
|
906
|
+
requiresIfExists: ["offset"],
|
|
907
|
+
data: {
|
|
908
|
+
_skip: !1
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
function ko(e, o, t) {
|
|
912
|
+
return t === void 0 && (t = {
|
|
913
|
+
x: 0,
|
|
914
|
+
y: 0
|
|
915
|
+
}), {
|
|
916
|
+
top: e.top - o.height - t.y,
|
|
917
|
+
right: e.right - o.width + t.x,
|
|
918
|
+
bottom: e.bottom - o.height + t.y,
|
|
919
|
+
left: e.left - o.width - t.x
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function zo(e) {
|
|
923
|
+
return [H, ne, re, F].some(function(o) {
|
|
924
|
+
return e[o] >= 0;
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
function wi(e) {
|
|
928
|
+
var o = e.state, t = e.name, r = o.rects.reference, n = o.rects.popper, i = o.modifiersData.preventOverflow, a = ot(o, {
|
|
929
|
+
elementContext: "reference"
|
|
930
|
+
}), s = ot(o, {
|
|
931
|
+
altBoundary: !0
|
|
932
|
+
}), u = ko(a, r), d = ko(s, n, i), p = zo(u), f = zo(d);
|
|
933
|
+
o.modifiersData[t] = {
|
|
934
|
+
referenceClippingOffsets: u,
|
|
935
|
+
popperEscapeOffsets: d,
|
|
936
|
+
isReferenceHidden: p,
|
|
937
|
+
hasPopperEscaped: f
|
|
938
|
+
}, o.attributes.popper = Object.assign({}, o.attributes.popper, {
|
|
939
|
+
"data-popper-reference-hidden": p,
|
|
940
|
+
"data-popper-escaped": f
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
const Pi = {
|
|
944
|
+
name: "hide",
|
|
945
|
+
enabled: !0,
|
|
946
|
+
phase: "main",
|
|
947
|
+
requiresIfExists: ["preventOverflow"],
|
|
948
|
+
fn: wi
|
|
949
|
+
};
|
|
950
|
+
function Ti(e, o, t) {
|
|
951
|
+
var r = ce(e), n = [F, H].indexOf(r) >= 0 ? -1 : 1, i = typeof t == "function" ? t(Object.assign({}, o, {
|
|
952
|
+
placement: e
|
|
953
|
+
})) : t, a = i[0], s = i[1];
|
|
954
|
+
return a = a || 0, s = (s || 0) * n, [F, ne].indexOf(r) >= 0 ? {
|
|
955
|
+
x: s,
|
|
956
|
+
y: a
|
|
957
|
+
} : {
|
|
958
|
+
x: a,
|
|
959
|
+
y: s
|
|
960
|
+
};
|
|
961
|
+
}
|
|
962
|
+
function Ci(e) {
|
|
963
|
+
var o = e.state, t = e.options, r = e.name, n = t.offset, i = n === void 0 ? [0, 0] : n, a = or.reduce(function(p, f) {
|
|
964
|
+
return p[f] = Ti(f, o.rects, i), p;
|
|
965
|
+
}, {}), s = a[o.placement], u = s.x, d = s.y;
|
|
966
|
+
o.modifiersData.popperOffsets != null && (o.modifiersData.popperOffsets.x += u, o.modifiersData.popperOffsets.y += d), o.modifiersData[r] = a;
|
|
967
|
+
}
|
|
968
|
+
const Si = {
|
|
969
|
+
name: "offset",
|
|
970
|
+
enabled: !0,
|
|
971
|
+
phase: "main",
|
|
972
|
+
requires: ["popperOffsets"],
|
|
973
|
+
fn: Ci
|
|
974
|
+
};
|
|
975
|
+
function Oi(e) {
|
|
976
|
+
var o = e.state, t = e.name;
|
|
977
|
+
o.modifiersData[t] = ur({
|
|
978
|
+
reference: o.rects.reference,
|
|
979
|
+
element: o.rects.popper,
|
|
980
|
+
strategy: "absolute",
|
|
981
|
+
placement: o.placement
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
const Ei = {
|
|
985
|
+
name: "popperOffsets",
|
|
986
|
+
enabled: !0,
|
|
987
|
+
phase: "read",
|
|
988
|
+
fn: Oi,
|
|
989
|
+
data: {}
|
|
990
|
+
};
|
|
991
|
+
function xi(e) {
|
|
992
|
+
return e === "x" ? "y" : "x";
|
|
993
|
+
}
|
|
994
|
+
function Ri(e) {
|
|
995
|
+
var o = e.state, t = e.options, r = e.name, n = t.mainAxis, i = n === void 0 ? !0 : n, a = t.altAxis, s = a === void 0 ? !1 : a, u = t.boundary, d = t.rootBoundary, p = t.altBoundary, f = t.padding, c = t.tether, v = c === void 0 ? !0 : c, h = t.tetherOffset, m = h === void 0 ? 0 : h, g = ot(o, {
|
|
996
|
+
boundary: u,
|
|
997
|
+
rootBoundary: d,
|
|
998
|
+
padding: f,
|
|
999
|
+
altBoundary: p
|
|
1000
|
+
}), w = ce(o.placement), S = Xe(o.placement), y = !S, b = no(w), P = xi(b), C = o.modifiersData.popperOffsets, O = o.rects.reference, D = o.rects.popper, x = typeof m == "function" ? m(Object.assign({}, o.rects, {
|
|
1001
|
+
placement: o.placement
|
|
1002
|
+
})) : m, R = typeof x == "number" ? {
|
|
1003
|
+
mainAxis: x,
|
|
1004
|
+
altAxis: x
|
|
1005
|
+
} : Object.assign({
|
|
1006
|
+
mainAxis: 0,
|
|
1007
|
+
altAxis: 0
|
|
1008
|
+
}, x), M = o.modifiersData.offset ? o.modifiersData.offset[o.placement] : null, B = {
|
|
1009
|
+
x: 0,
|
|
1010
|
+
y: 0
|
|
1011
|
+
};
|
|
1012
|
+
if (C) {
|
|
1013
|
+
if (i) {
|
|
1014
|
+
var W, Z = b === "y" ? H : F, U = b === "y" ? re : ne, Y = b === "y" ? "height" : "width", k = C[b], z = k + g[Z], q = k - g[U], ye = v ? -D[Y] / 2 : 0, le = S === Be ? O[Y] : D[Y], me = S === Be ? -D[Y] : -O[Y], ie = o.elements.arrow, K = v && ie ? ro(ie) : {
|
|
1015
|
+
width: 0,
|
|
1016
|
+
height: 0
|
|
1017
|
+
}, Q = o.modifiersData["arrow#persistent"] ? o.modifiersData["arrow#persistent"].padding : ir(), ue = Q[Z], pe = Q[U], X = Ge(0, O[Y], K[Y]), L = y ? O[Y] / 2 - ye - X - ue - R.mainAxis : le - X - ue - R.mainAxis, he = y ? -O[Y] / 2 + ye + X + pe + R.mainAxis : me + X + pe + R.mainAxis, j = o.elements.arrow && st(o.elements.arrow), Le = j ? b === "y" ? j.clientTop || 0 : j.clientLeft || 0 : 0, _e = (W = M == null ? void 0 : M[b]) != null ? W : 0, ut = k + L - _e - Le, I = k + he - _e, We = Ge(v ? Et(z, ut) : z, k, v ? De(q, I) : q);
|
|
1018
|
+
C[b] = We, B[b] = We - k;
|
|
1019
|
+
}
|
|
1020
|
+
if (s) {
|
|
1021
|
+
var pt, V = b === "x" ? H : F, dt = b === "x" ? re : ne, ae = C[P], Ye = P === "y" ? "height" : "width", Re = ae + g[V], $e = ae - g[dt], we = [H, F].indexOf(w) !== -1, Ae = (pt = M == null ? void 0 : M[P]) != null ? pt : 0, de = we ? Re : ae - O[Ye] - D[Ye] - Ae + R.altAxis, Ve = we ? ae + O[Ye] + D[Ye] - Ae - R.altAxis : $e, ft = v && we ? Jn(de, ae, Ve) : Ge(v ? de : Re, ae, v ? Ve : $e);
|
|
1022
|
+
C[P] = ft, B[P] = ft - ae;
|
|
1023
|
+
}
|
|
1024
|
+
o.modifiersData[r] = B;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
const Ai = {
|
|
1028
|
+
name: "preventOverflow",
|
|
1029
|
+
enabled: !0,
|
|
1030
|
+
phase: "main",
|
|
1031
|
+
fn: Ri,
|
|
1032
|
+
requiresIfExists: ["offset"]
|
|
1033
|
+
};
|
|
1034
|
+
function Di(e) {
|
|
1035
|
+
return {
|
|
1036
|
+
scrollLeft: e.scrollLeft,
|
|
1037
|
+
scrollTop: e.scrollTop
|
|
1038
|
+
};
|
|
1039
|
+
}
|
|
1040
|
+
function Ni(e) {
|
|
1041
|
+
return e === J(e) || !oe(e) ? io(e) : Di(e);
|
|
1042
|
+
}
|
|
1043
|
+
function Mi(e) {
|
|
1044
|
+
var o = e.getBoundingClientRect(), t = ke(o.width) / e.offsetWidth || 1, r = ke(o.height) / e.offsetHeight || 1;
|
|
1045
|
+
return t !== 1 || r !== 1;
|
|
1046
|
+
}
|
|
1047
|
+
function _i(e, o, t) {
|
|
1048
|
+
t === void 0 && (t = !1);
|
|
1049
|
+
var r = oe(o), n = oe(o) && Mi(o), i = Ee(o), a = ze(e, n, t), s = {
|
|
1050
|
+
scrollLeft: 0,
|
|
1051
|
+
scrollTop: 0
|
|
1052
|
+
}, u = {
|
|
1053
|
+
x: 0,
|
|
1054
|
+
y: 0
|
|
1055
|
+
};
|
|
1056
|
+
return (r || !r && !t) && ((ve(o) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1057
|
+
so(i)) && (s = Ni(o)), oe(o) ? (u = ze(o, !0), u.x += o.clientLeft, u.y += o.clientTop) : i && (u.x = ao(i))), {
|
|
1058
|
+
x: a.left + s.scrollLeft - u.x,
|
|
1059
|
+
y: a.top + s.scrollTop - u.y,
|
|
1060
|
+
width: a.width,
|
|
1061
|
+
height: a.height
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
function Wi(e) {
|
|
1065
|
+
var o = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = [];
|
|
1066
|
+
e.forEach(function(i) {
|
|
1067
|
+
o.set(i.name, i);
|
|
1068
|
+
});
|
|
1069
|
+
function n(i) {
|
|
1070
|
+
t.add(i.name);
|
|
1071
|
+
var a = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1072
|
+
a.forEach(function(s) {
|
|
1073
|
+
if (!t.has(s)) {
|
|
1074
|
+
var u = o.get(s);
|
|
1075
|
+
u && n(u);
|
|
1076
|
+
}
|
|
1077
|
+
}), r.push(i);
|
|
1078
|
+
}
|
|
1079
|
+
return e.forEach(function(i) {
|
|
1080
|
+
t.has(i.name) || n(i);
|
|
1081
|
+
}), r;
|
|
1082
|
+
}
|
|
1083
|
+
function Yi(e) {
|
|
1084
|
+
var o = Wi(e);
|
|
1085
|
+
return Zn.reduce(function(t, r) {
|
|
1086
|
+
return t.concat(o.filter(function(n) {
|
|
1087
|
+
return n.phase === r;
|
|
1088
|
+
}));
|
|
1089
|
+
}, []);
|
|
1090
|
+
}
|
|
1091
|
+
function $i(e) {
|
|
1092
|
+
var o;
|
|
1093
|
+
return function() {
|
|
1094
|
+
return o || (o = new Promise(function(t) {
|
|
1095
|
+
Promise.resolve().then(function() {
|
|
1096
|
+
o = void 0, t(e());
|
|
1097
|
+
});
|
|
1098
|
+
})), o;
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
function Bi(e) {
|
|
1102
|
+
var o = e.reduce(function(t, r) {
|
|
1103
|
+
var n = t[r.name];
|
|
1104
|
+
return t[r.name] = n ? Object.assign({}, n, r, {
|
|
1105
|
+
options: Object.assign({}, n.options, r.options),
|
|
1106
|
+
data: Object.assign({}, n.data, r.data)
|
|
1107
|
+
}) : r, t;
|
|
1108
|
+
}, {});
|
|
1109
|
+
return Object.keys(o).map(function(t) {
|
|
1110
|
+
return o[t];
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
var Xo = {
|
|
1114
|
+
placement: "bottom",
|
|
1115
|
+
modifiers: [],
|
|
1116
|
+
strategy: "absolute"
|
|
1117
|
+
};
|
|
1118
|
+
function jo() {
|
|
1119
|
+
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
1120
|
+
o[t] = arguments[t];
|
|
1121
|
+
return !o.some(function(r) {
|
|
1122
|
+
return !(r && typeof r.getBoundingClientRect == "function");
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
function ki(e) {
|
|
1126
|
+
e === void 0 && (e = {});
|
|
1127
|
+
var o = e, t = o.defaultModifiers, r = t === void 0 ? [] : t, n = o.defaultOptions, i = n === void 0 ? Xo : n;
|
|
1128
|
+
return function(s, u, d) {
|
|
1129
|
+
d === void 0 && (d = i);
|
|
1130
|
+
var p = {
|
|
1131
|
+
placement: "bottom",
|
|
1132
|
+
orderedModifiers: [],
|
|
1133
|
+
options: Object.assign({}, Xo, i),
|
|
1134
|
+
modifiersData: {},
|
|
1135
|
+
elements: {
|
|
1136
|
+
reference: s,
|
|
1137
|
+
popper: u
|
|
1138
|
+
},
|
|
1139
|
+
attributes: {},
|
|
1140
|
+
styles: {}
|
|
1141
|
+
}, f = [], c = !1, v = {
|
|
1142
|
+
state: p,
|
|
1143
|
+
setOptions: function(w) {
|
|
1144
|
+
var S = typeof w == "function" ? w(p.options) : w;
|
|
1145
|
+
m(), p.options = Object.assign({}, i, p.options, S), p.scrollParents = {
|
|
1146
|
+
reference: Me(s) ? Je(s) : s.contextElement ? Je(s.contextElement) : [],
|
|
1147
|
+
popper: Je(u)
|
|
1148
|
+
};
|
|
1149
|
+
var y = Yi(Bi([].concat(r, p.options.modifiers)));
|
|
1150
|
+
return p.orderedModifiers = y.filter(function(b) {
|
|
1151
|
+
return b.enabled;
|
|
1152
|
+
}), h(), v.update();
|
|
1153
|
+
},
|
|
1154
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
1155
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
1156
|
+
// logic.
|
|
1157
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1158
|
+
// prefer the async Popper#update method
|
|
1159
|
+
forceUpdate: function() {
|
|
1160
|
+
if (!c) {
|
|
1161
|
+
var w = p.elements, S = w.reference, y = w.popper;
|
|
1162
|
+
if (jo(S, y)) {
|
|
1163
|
+
p.rects = {
|
|
1164
|
+
reference: _i(S, st(y), p.options.strategy === "fixed"),
|
|
1165
|
+
popper: ro(y)
|
|
1166
|
+
}, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(R) {
|
|
1167
|
+
return p.modifiersData[R.name] = Object.assign({}, R.data);
|
|
1168
|
+
});
|
|
1169
|
+
for (var b = 0; b < p.orderedModifiers.length; b++) {
|
|
1170
|
+
if (p.reset === !0) {
|
|
1171
|
+
p.reset = !1, b = -1;
|
|
1172
|
+
continue;
|
|
1173
|
+
}
|
|
1174
|
+
var P = p.orderedModifiers[b], C = P.fn, O = P.options, D = O === void 0 ? {} : O, x = P.name;
|
|
1175
|
+
typeof C == "function" && (p = C({
|
|
1176
|
+
state: p,
|
|
1177
|
+
options: D,
|
|
1178
|
+
name: x,
|
|
1179
|
+
instance: v
|
|
1180
|
+
}) || p);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
1186
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
1187
|
+
update: $i(function() {
|
|
1188
|
+
return new Promise(function(g) {
|
|
1189
|
+
v.forceUpdate(), g(p);
|
|
1190
|
+
});
|
|
1191
|
+
}),
|
|
1192
|
+
destroy: function() {
|
|
1193
|
+
m(), c = !0;
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
if (!jo(s, u))
|
|
1197
|
+
return v;
|
|
1198
|
+
v.setOptions(d).then(function(g) {
|
|
1199
|
+
!c && d.onFirstUpdate && d.onFirstUpdate(g);
|
|
1200
|
+
});
|
|
1201
|
+
function h() {
|
|
1202
|
+
p.orderedModifiers.forEach(function(g) {
|
|
1203
|
+
var w = g.name, S = g.options, y = S === void 0 ? {} : S, b = g.effect;
|
|
1204
|
+
if (typeof b == "function") {
|
|
1205
|
+
var P = b({
|
|
1206
|
+
state: p,
|
|
1207
|
+
name: w,
|
|
1208
|
+
instance: v,
|
|
1209
|
+
options: y
|
|
1210
|
+
}), C = function() {
|
|
1211
|
+
};
|
|
1212
|
+
f.push(P || C);
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1216
|
+
function m() {
|
|
1217
|
+
f.forEach(function(g) {
|
|
1218
|
+
return g();
|
|
1219
|
+
}), f = [];
|
|
1220
|
+
}
|
|
1221
|
+
return v;
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
var zi = [li, Ei, ai, Kn, Si, yi, Ai, oi, Pi], Xi = /* @__PURE__ */ ki({
|
|
1225
|
+
defaultModifiers: zi
|
|
1226
|
+
});
|
|
1227
|
+
function ji(e) {
|
|
1228
|
+
return rt("MuiPopper", e);
|
|
1229
|
+
}
|
|
1230
|
+
Wt("MuiPopper", ["root"]);
|
|
1231
|
+
const Li = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], Vi = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
|
|
1232
|
+
function Hi(e, o) {
|
|
1233
|
+
if (o === "ltr")
|
|
1234
|
+
return e;
|
|
1235
|
+
switch (e) {
|
|
1236
|
+
case "bottom-end":
|
|
1237
|
+
return "bottom-start";
|
|
1238
|
+
case "bottom-start":
|
|
1239
|
+
return "bottom-end";
|
|
1240
|
+
case "top-end":
|
|
1241
|
+
return "top-start";
|
|
1242
|
+
case "top-start":
|
|
1243
|
+
return "top-end";
|
|
1244
|
+
default:
|
|
1245
|
+
return e;
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
function xt(e) {
|
|
1249
|
+
return typeof e == "function" ? e() : e;
|
|
1250
|
+
}
|
|
1251
|
+
function $t(e) {
|
|
1252
|
+
return e.nodeType !== void 0;
|
|
1253
|
+
}
|
|
1254
|
+
function Fi(e) {
|
|
1255
|
+
return !$t(e);
|
|
1256
|
+
}
|
|
1257
|
+
const Zi = () => nt({
|
|
1258
|
+
root: ["root"]
|
|
1259
|
+
}, Wn(ji)), Ui = {}, qi = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
1260
|
+
var r;
|
|
1261
|
+
const {
|
|
1262
|
+
anchorEl: n,
|
|
1263
|
+
children: i,
|
|
1264
|
+
direction: a,
|
|
1265
|
+
disablePortal: s,
|
|
1266
|
+
modifiers: u,
|
|
1267
|
+
open: d,
|
|
1268
|
+
placement: p,
|
|
1269
|
+
popperOptions: f,
|
|
1270
|
+
popperRef: c,
|
|
1271
|
+
slotProps: v = {},
|
|
1272
|
+
slots: h = {},
|
|
1273
|
+
TransitionProps: m
|
|
1274
|
+
// @ts-ignore internal logic
|
|
1275
|
+
// prevent from spreading to DOM, it can come from the parent component e.g. Select.
|
|
1276
|
+
} = o, g = Se(o, Li), w = E.useRef(null), S = Kt(w, t), y = E.useRef(null), b = Kt(y, c), P = E.useRef(b);
|
|
1277
|
+
Mo(() => {
|
|
1278
|
+
P.current = b;
|
|
1279
|
+
}, [b]), E.useImperativeHandle(c, () => y.current, []);
|
|
1280
|
+
const C = Hi(p, a), [O, D] = E.useState(C), [x, R] = E.useState(xt(n));
|
|
1281
|
+
E.useEffect(() => {
|
|
1282
|
+
y.current && y.current.forceUpdate();
|
|
1283
|
+
}), E.useEffect(() => {
|
|
1284
|
+
n && R(xt(n));
|
|
1285
|
+
}, [n]), Mo(() => {
|
|
1286
|
+
if (!x || !d)
|
|
1287
|
+
return;
|
|
1288
|
+
const U = (z) => {
|
|
1289
|
+
D(z.placement);
|
|
1290
|
+
};
|
|
1291
|
+
if (process.env.NODE_ENV !== "production" && x && $t(x) && x.nodeType === 1) {
|
|
1292
|
+
const z = x.getBoundingClientRect();
|
|
1293
|
+
process.env.NODE_ENV !== "test" && z.top === 0 && z.left === 0 && z.right === 0 && z.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
|
|
1294
|
+
`));
|
|
1295
|
+
}
|
|
1296
|
+
let Y = [{
|
|
1297
|
+
name: "preventOverflow",
|
|
1298
|
+
options: {
|
|
1299
|
+
altBoundary: s
|
|
1300
|
+
}
|
|
1301
|
+
}, {
|
|
1302
|
+
name: "flip",
|
|
1303
|
+
options: {
|
|
1304
|
+
altBoundary: s
|
|
1305
|
+
}
|
|
1306
|
+
}, {
|
|
1307
|
+
name: "onUpdate",
|
|
1308
|
+
enabled: !0,
|
|
1309
|
+
phase: "afterWrite",
|
|
1310
|
+
fn: ({
|
|
1311
|
+
state: z
|
|
1312
|
+
}) => {
|
|
1313
|
+
U(z);
|
|
1314
|
+
}
|
|
1315
|
+
}];
|
|
1316
|
+
u != null && (Y = Y.concat(u)), f && f.modifiers != null && (Y = Y.concat(f.modifiers));
|
|
1317
|
+
const k = Xi(x, w.current, T({
|
|
1318
|
+
placement: C
|
|
1319
|
+
}, f, {
|
|
1320
|
+
modifiers: Y
|
|
1321
|
+
}));
|
|
1322
|
+
return P.current(k), () => {
|
|
1323
|
+
k.destroy(), P.current(null);
|
|
1324
|
+
};
|
|
1325
|
+
}, [x, s, u, d, f, C]);
|
|
1326
|
+
const M = {
|
|
1327
|
+
placement: O
|
|
1328
|
+
};
|
|
1329
|
+
m !== null && (M.TransitionProps = m);
|
|
1330
|
+
const B = Zi(), W = (r = h.root) != null ? r : "div", Z = qr({
|
|
1331
|
+
elementType: W,
|
|
1332
|
+
externalSlotProps: v.root,
|
|
1333
|
+
externalForwardedProps: g,
|
|
1334
|
+
additionalProps: {
|
|
1335
|
+
role: "tooltip",
|
|
1336
|
+
ref: S
|
|
1337
|
+
},
|
|
1338
|
+
ownerState: o,
|
|
1339
|
+
className: B.root
|
|
1340
|
+
});
|
|
1341
|
+
return /* @__PURE__ */ N(W, T({}, Z, {
|
|
1342
|
+
children: typeof i == "function" ? i(M) : i
|
|
1343
|
+
}));
|
|
1344
|
+
}), pr = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
1345
|
+
const {
|
|
1346
|
+
anchorEl: r,
|
|
1347
|
+
children: n,
|
|
1348
|
+
container: i,
|
|
1349
|
+
direction: a = "ltr",
|
|
1350
|
+
disablePortal: s = !1,
|
|
1351
|
+
keepMounted: u = !1,
|
|
1352
|
+
modifiers: d,
|
|
1353
|
+
open: p,
|
|
1354
|
+
placement: f = "bottom",
|
|
1355
|
+
popperOptions: c = Ui,
|
|
1356
|
+
popperRef: v,
|
|
1357
|
+
style: h,
|
|
1358
|
+
transition: m = !1,
|
|
1359
|
+
slotProps: g = {},
|
|
1360
|
+
slots: w = {}
|
|
1361
|
+
} = o, S = Se(o, Vi), [y, b] = E.useState(!0), P = () => {
|
|
1362
|
+
b(!1);
|
|
1363
|
+
}, C = () => {
|
|
1364
|
+
b(!0);
|
|
1365
|
+
};
|
|
1366
|
+
if (!u && !p && (!m || y))
|
|
1367
|
+
return null;
|
|
1368
|
+
let O;
|
|
1369
|
+
if (i)
|
|
1370
|
+
O = i;
|
|
1371
|
+
else if (r) {
|
|
1372
|
+
const R = xt(r);
|
|
1373
|
+
O = R && $t(R) ? Do(R).body : Do(null).body;
|
|
1374
|
+
}
|
|
1375
|
+
const D = !p && u && (!m || y) ? "none" : void 0, x = m ? {
|
|
1376
|
+
in: p,
|
|
1377
|
+
onEnter: P,
|
|
1378
|
+
onExited: C
|
|
1379
|
+
} : void 0;
|
|
1380
|
+
return /* @__PURE__ */ N(Ur, {
|
|
1381
|
+
disablePortal: s,
|
|
1382
|
+
container: O,
|
|
1383
|
+
children: /* @__PURE__ */ N(qi, T({
|
|
1384
|
+
anchorEl: r,
|
|
1385
|
+
direction: a,
|
|
1386
|
+
disablePortal: s,
|
|
1387
|
+
modifiers: d,
|
|
1388
|
+
ref: t,
|
|
1389
|
+
open: m ? !y : p,
|
|
1390
|
+
placement: f,
|
|
1391
|
+
popperOptions: c,
|
|
1392
|
+
popperRef: v,
|
|
1393
|
+
slotProps: g,
|
|
1394
|
+
slots: w
|
|
1395
|
+
}, S, {
|
|
1396
|
+
style: T({
|
|
1397
|
+
// Prevents scroll issue, waiting for Popper.js to add this style once initiated.
|
|
1398
|
+
position: "fixed",
|
|
1399
|
+
// Fix Popper.js display issue
|
|
1400
|
+
top: 0,
|
|
1401
|
+
left: 0,
|
|
1402
|
+
display: D
|
|
1403
|
+
}, h),
|
|
1404
|
+
TransitionProps: x,
|
|
1405
|
+
children: n
|
|
1406
|
+
}))
|
|
1407
|
+
});
|
|
1408
|
+
});
|
|
1409
|
+
process.env.NODE_ENV !== "production" && (pr.propTypes = {
|
|
1410
|
+
// ----------------------------- Warning --------------------------------
|
|
1411
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1412
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
1413
|
+
// ----------------------------------------------------------------------
|
|
1414
|
+
/**
|
|
1415
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1416
|
+
* or a function that returns either.
|
|
1417
|
+
* It's used to set the position of the popper.
|
|
1418
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1419
|
+
*/
|
|
1420
|
+
anchorEl: Jo(l.oneOfType([St, l.object, l.func]), (e) => {
|
|
1421
|
+
if (e.open) {
|
|
1422
|
+
const o = xt(e.anchorEl);
|
|
1423
|
+
if (o && $t(o) && o.nodeType === 1) {
|
|
1424
|
+
const t = o.getBoundingClientRect();
|
|
1425
|
+
if (process.env.NODE_ENV !== "test" && t.top === 0 && t.left === 0 && t.right === 0 && t.bottom === 0)
|
|
1426
|
+
return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
|
|
1427
|
+
`));
|
|
1428
|
+
} else if (!o || typeof o.getBoundingClientRect != "function" || Fi(o) && o.contextElement != null && o.contextElement.nodeType !== 1)
|
|
1429
|
+
return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
|
|
1430
|
+
`));
|
|
1431
|
+
}
|
|
1432
|
+
return null;
|
|
1433
|
+
}),
|
|
1434
|
+
/**
|
|
1435
|
+
* Popper render function or node.
|
|
1436
|
+
*/
|
|
1437
|
+
children: l.oneOfType([l.node, l.func]),
|
|
1438
|
+
/**
|
|
1439
|
+
* An HTML element or function that returns one.
|
|
1440
|
+
* The `container` will have the portal children appended to it.
|
|
1441
|
+
*
|
|
1442
|
+
* By default, it uses the body of the top-level document object,
|
|
1443
|
+
* so it's simply `document.body` most of the time.
|
|
1444
|
+
*/
|
|
1445
|
+
container: l.oneOfType([St, l.func]),
|
|
1446
|
+
/**
|
|
1447
|
+
* Direction of the text.
|
|
1448
|
+
* @default 'ltr'
|
|
1449
|
+
*/
|
|
1450
|
+
direction: l.oneOf(["ltr", "rtl"]),
|
|
1451
|
+
/**
|
|
1452
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1453
|
+
* @default false
|
|
1454
|
+
*/
|
|
1455
|
+
disablePortal: l.bool,
|
|
1456
|
+
/**
|
|
1457
|
+
* Always keep the children in the DOM.
|
|
1458
|
+
* This prop can be useful in SEO situation or
|
|
1459
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1460
|
+
* @default false
|
|
1461
|
+
*/
|
|
1462
|
+
keepMounted: l.bool,
|
|
1463
|
+
/**
|
|
1464
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1465
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1466
|
+
*
|
|
1467
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1468
|
+
* compute the position of the popper.
|
|
1469
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1470
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
1471
|
+
*/
|
|
1472
|
+
modifiers: l.arrayOf(l.shape({
|
|
1473
|
+
data: l.object,
|
|
1474
|
+
effect: l.func,
|
|
1475
|
+
enabled: l.bool,
|
|
1476
|
+
fn: l.func,
|
|
1477
|
+
name: l.any,
|
|
1478
|
+
options: l.object,
|
|
1479
|
+
phase: l.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1480
|
+
requires: l.arrayOf(l.string),
|
|
1481
|
+
requiresIfExists: l.arrayOf(l.string)
|
|
1482
|
+
})),
|
|
1483
|
+
/**
|
|
1484
|
+
* If `true`, the component is shown.
|
|
1485
|
+
*/
|
|
1486
|
+
open: l.bool.isRequired,
|
|
1487
|
+
/**
|
|
1488
|
+
* Popper placement.
|
|
1489
|
+
* @default 'bottom'
|
|
1490
|
+
*/
|
|
1491
|
+
placement: l.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1492
|
+
/**
|
|
1493
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1494
|
+
* @default {}
|
|
1495
|
+
*/
|
|
1496
|
+
popperOptions: l.shape({
|
|
1497
|
+
modifiers: l.array,
|
|
1498
|
+
onFirstUpdate: l.func,
|
|
1499
|
+
placement: l.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1500
|
+
strategy: l.oneOf(["absolute", "fixed"])
|
|
1501
|
+
}),
|
|
1502
|
+
/**
|
|
1503
|
+
* A ref that points to the used popper instance.
|
|
1504
|
+
*/
|
|
1505
|
+
popperRef: Io,
|
|
1506
|
+
/**
|
|
1507
|
+
* The props used for each slot inside the Popper.
|
|
1508
|
+
* @default {}
|
|
1509
|
+
*/
|
|
1510
|
+
slotProps: l.shape({
|
|
1511
|
+
root: l.oneOfType([l.func, l.object])
|
|
1512
|
+
}),
|
|
1513
|
+
/**
|
|
1514
|
+
* The components used for each slot inside the Popper.
|
|
1515
|
+
* Either a string to use a HTML element or a component.
|
|
1516
|
+
* @default {}
|
|
1517
|
+
*/
|
|
1518
|
+
slots: l.shape({
|
|
1519
|
+
root: l.elementType
|
|
1520
|
+
}),
|
|
1521
|
+
/**
|
|
1522
|
+
* Help supporting a react-transition-group/Transition component.
|
|
1523
|
+
* @default false
|
|
1524
|
+
*/
|
|
1525
|
+
transition: l.bool
|
|
1526
|
+
});
|
|
1527
|
+
const Ki = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], Qi = Oe(pr, {
|
|
1528
|
+
name: "MuiPopper",
|
|
1529
|
+
slot: "Root",
|
|
1530
|
+
overridesResolver: (e, o) => o.root
|
|
1531
|
+
})({}), dr = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
1532
|
+
var r;
|
|
1533
|
+
const n = un(), i = it({
|
|
1534
|
+
props: o,
|
|
1535
|
+
name: "MuiPopper"
|
|
1536
|
+
}), {
|
|
1537
|
+
anchorEl: a,
|
|
1538
|
+
component: s,
|
|
1539
|
+
components: u,
|
|
1540
|
+
componentsProps: d,
|
|
1541
|
+
container: p,
|
|
1542
|
+
disablePortal: f,
|
|
1543
|
+
keepMounted: c,
|
|
1544
|
+
modifiers: v,
|
|
1545
|
+
open: h,
|
|
1546
|
+
placement: m,
|
|
1547
|
+
popperOptions: g,
|
|
1548
|
+
popperRef: w,
|
|
1549
|
+
transition: S,
|
|
1550
|
+
slots: y,
|
|
1551
|
+
slotProps: b
|
|
1552
|
+
} = i, P = Se(i, Ki), C = (r = y == null ? void 0 : y.root) != null ? r : u == null ? void 0 : u.Root, O = T({
|
|
1553
|
+
anchorEl: a,
|
|
1554
|
+
container: p,
|
|
1555
|
+
disablePortal: f,
|
|
1556
|
+
keepMounted: c,
|
|
1557
|
+
modifiers: v,
|
|
1558
|
+
open: h,
|
|
1559
|
+
placement: m,
|
|
1560
|
+
popperOptions: g,
|
|
1561
|
+
popperRef: w,
|
|
1562
|
+
transition: S
|
|
1563
|
+
}, P);
|
|
1564
|
+
return /* @__PURE__ */ N(Qi, T({
|
|
1565
|
+
as: s,
|
|
1566
|
+
direction: n == null ? void 0 : n.direction,
|
|
1567
|
+
slots: {
|
|
1568
|
+
root: C
|
|
1569
|
+
},
|
|
1570
|
+
slotProps: b ?? d
|
|
1571
|
+
}, O, {
|
|
1572
|
+
ref: t
|
|
1573
|
+
}));
|
|
1574
|
+
});
|
|
1575
|
+
process.env.NODE_ENV !== "production" && (dr.propTypes = {
|
|
1576
|
+
// ----------------------------- Warning --------------------------------
|
|
1577
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1578
|
+
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
1579
|
+
// ----------------------------------------------------------------------
|
|
1580
|
+
/**
|
|
1581
|
+
* An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
|
|
1582
|
+
* or a function that returns either.
|
|
1583
|
+
* It's used to set the position of the popper.
|
|
1584
|
+
* The return value will passed as the reference object of the Popper instance.
|
|
1585
|
+
*/
|
|
1586
|
+
anchorEl: l.oneOfType([St, l.object, l.func]),
|
|
1587
|
+
/**
|
|
1588
|
+
* Popper render function or node.
|
|
1589
|
+
*/
|
|
1590
|
+
children: l.oneOfType([l.node, l.func]),
|
|
1591
|
+
/**
|
|
1592
|
+
* The component used for the root node.
|
|
1593
|
+
* Either a string to use a HTML element or a component.
|
|
1594
|
+
*/
|
|
1595
|
+
component: l.elementType,
|
|
1596
|
+
/**
|
|
1597
|
+
* The components used for each slot inside the Popper.
|
|
1598
|
+
* Either a string to use a HTML element or a component.
|
|
1599
|
+
* @default {}
|
|
1600
|
+
*/
|
|
1601
|
+
components: l.shape({
|
|
1602
|
+
Root: l.elementType
|
|
1603
|
+
}),
|
|
1604
|
+
/**
|
|
1605
|
+
* The props used for each slot inside the Popper.
|
|
1606
|
+
* @default {}
|
|
1607
|
+
*/
|
|
1608
|
+
componentsProps: l.shape({
|
|
1609
|
+
root: l.oneOfType([l.func, l.object])
|
|
1610
|
+
}),
|
|
1611
|
+
/**
|
|
1612
|
+
* An HTML element or function that returns one.
|
|
1613
|
+
* The `container` will have the portal children appended to it.
|
|
1614
|
+
*
|
|
1615
|
+
* By default, it uses the body of the top-level document object,
|
|
1616
|
+
* so it's simply `document.body` most of the time.
|
|
1617
|
+
*/
|
|
1618
|
+
container: l.oneOfType([St, l.func]),
|
|
1619
|
+
/**
|
|
1620
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
1621
|
+
* @default false
|
|
1622
|
+
*/
|
|
1623
|
+
disablePortal: l.bool,
|
|
1624
|
+
/**
|
|
1625
|
+
* Always keep the children in the DOM.
|
|
1626
|
+
* This prop can be useful in SEO situation or
|
|
1627
|
+
* when you want to maximize the responsiveness of the Popper.
|
|
1628
|
+
* @default false
|
|
1629
|
+
*/
|
|
1630
|
+
keepMounted: l.bool,
|
|
1631
|
+
/**
|
|
1632
|
+
* Popper.js is based on a "plugin-like" architecture,
|
|
1633
|
+
* most of its features are fully encapsulated "modifiers".
|
|
1634
|
+
*
|
|
1635
|
+
* A modifier is a function that is called each time Popper.js needs to
|
|
1636
|
+
* compute the position of the popper.
|
|
1637
|
+
* For this reason, modifiers should be very performant to avoid bottlenecks.
|
|
1638
|
+
* To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
|
|
232
1639
|
*/
|
|
233
|
-
|
|
234
|
-
|
|
1640
|
+
modifiers: l.arrayOf(l.shape({
|
|
1641
|
+
data: l.object,
|
|
1642
|
+
effect: l.func,
|
|
1643
|
+
enabled: l.bool,
|
|
1644
|
+
fn: l.func,
|
|
1645
|
+
name: l.any,
|
|
1646
|
+
options: l.object,
|
|
1647
|
+
phase: l.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
|
|
1648
|
+
requires: l.arrayOf(l.string),
|
|
1649
|
+
requiresIfExists: l.arrayOf(l.string)
|
|
1650
|
+
})),
|
|
235
1651
|
/**
|
|
236
|
-
*
|
|
1652
|
+
* If `true`, the component is shown.
|
|
237
1653
|
*/
|
|
238
|
-
|
|
1654
|
+
open: l.bool.isRequired,
|
|
239
1655
|
/**
|
|
240
|
-
*
|
|
1656
|
+
* Popper placement.
|
|
1657
|
+
* @default 'bottom'
|
|
241
1658
|
*/
|
|
242
|
-
|
|
1659
|
+
placement: l.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
243
1660
|
/**
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
247
|
-
* @default 'default'
|
|
1661
|
+
* Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
|
|
1662
|
+
* @default {}
|
|
248
1663
|
*/
|
|
249
|
-
|
|
1664
|
+
popperOptions: l.shape({
|
|
1665
|
+
modifiers: l.array,
|
|
1666
|
+
onFirstUpdate: l.func,
|
|
1667
|
+
placement: l.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
1668
|
+
strategy: l.oneOf(["absolute", "fixed"])
|
|
1669
|
+
}),
|
|
250
1670
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @default false
|
|
1671
|
+
* A ref that points to the used popper instance.
|
|
253
1672
|
*/
|
|
254
|
-
|
|
1673
|
+
popperRef: Io,
|
|
255
1674
|
/**
|
|
256
|
-
*
|
|
257
|
-
* @default
|
|
1675
|
+
* The props used for each slot inside the Popper.
|
|
1676
|
+
* @default {}
|
|
258
1677
|
*/
|
|
259
|
-
|
|
1678
|
+
slotProps: l.shape({
|
|
1679
|
+
root: l.oneOfType([l.func, l.object])
|
|
1680
|
+
}),
|
|
260
1681
|
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
265
|
-
* @default false
|
|
1682
|
+
* The components used for each slot inside the Popper.
|
|
1683
|
+
* Either a string to use a HTML element or a component.
|
|
1684
|
+
* @default {}
|
|
266
1685
|
*/
|
|
267
|
-
|
|
1686
|
+
slots: l.shape({
|
|
1687
|
+
root: l.elementType
|
|
1688
|
+
}),
|
|
268
1689
|
/**
|
|
269
|
-
*
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
1690
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1691
|
+
*/
|
|
1692
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object]),
|
|
1693
|
+
/**
|
|
1694
|
+
* Help supporting a react-transition-group/Transition component.
|
|
273
1695
|
* @default false
|
|
274
1696
|
*/
|
|
275
|
-
|
|
1697
|
+
transition: l.bool
|
|
1698
|
+
});
|
|
1699
|
+
const fr = dr, Gi = on(), cr = gn({
|
|
1700
|
+
themeId: pn,
|
|
1701
|
+
defaultTheme: Gi,
|
|
1702
|
+
defaultClassName: "MuiBox-root",
|
|
1703
|
+
generateClassName: rn.generate
|
|
1704
|
+
});
|
|
1705
|
+
process.env.NODE_ENV !== "production" && (cr.propTypes = {
|
|
1706
|
+
// ----------------------------- Warning --------------------------------
|
|
1707
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1708
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
1709
|
+
// ----------------------------------------------------------------------
|
|
1710
|
+
/**
|
|
1711
|
+
* @ignore
|
|
1712
|
+
*/
|
|
1713
|
+
children: l.node,
|
|
276
1714
|
/**
|
|
277
|
-
* The
|
|
278
|
-
*
|
|
279
|
-
* @default 'medium'
|
|
1715
|
+
* The component used for the root node.
|
|
1716
|
+
* Either a string to use a HTML element or a component.
|
|
280
1717
|
*/
|
|
281
|
-
|
|
1718
|
+
component: l.elementType,
|
|
282
1719
|
/**
|
|
283
1720
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
284
1721
|
*/
|
|
285
|
-
sx:
|
|
1722
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object])
|
|
286
1723
|
});
|
|
287
|
-
const
|
|
288
|
-
createStyledComponent:
|
|
1724
|
+
const Ji = cr, vr = On({
|
|
1725
|
+
createStyledComponent: Oe("div", {
|
|
289
1726
|
name: "MuiContainer",
|
|
290
1727
|
slot: "Root",
|
|
291
|
-
overridesResolver: (
|
|
1728
|
+
overridesResolver: (e, o) => {
|
|
292
1729
|
const {
|
|
293
|
-
ownerState:
|
|
294
|
-
} =
|
|
295
|
-
return [o.root, o[`maxWidth${
|
|
1730
|
+
ownerState: t
|
|
1731
|
+
} = e;
|
|
1732
|
+
return [o.root, o[`maxWidth${se(String(t.maxWidth))}`], t.fixed && o.fixed, t.disableGutters && o.disableGutters];
|
|
296
1733
|
}
|
|
297
1734
|
}),
|
|
298
|
-
useThemeProps: (
|
|
299
|
-
props:
|
|
1735
|
+
useThemeProps: (e) => it({
|
|
1736
|
+
props: e,
|
|
300
1737
|
name: "MuiContainer"
|
|
301
1738
|
})
|
|
302
1739
|
});
|
|
303
|
-
process.env.NODE_ENV !== "production" && (
|
|
1740
|
+
process.env.NODE_ENV !== "production" && (vr.propTypes = {
|
|
304
1741
|
// ----------------------------- Warning --------------------------------
|
|
305
1742
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
306
1743
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -308,21 +1745,21 @@ process.env.NODE_ENV !== "production" && (Hi.propTypes = {
|
|
|
308
1745
|
/**
|
|
309
1746
|
* @ignore
|
|
310
1747
|
*/
|
|
311
|
-
children:
|
|
1748
|
+
children: l.node,
|
|
312
1749
|
/**
|
|
313
1750
|
* Override or extend the styles applied to the component.
|
|
314
1751
|
*/
|
|
315
|
-
classes:
|
|
1752
|
+
classes: l.object,
|
|
316
1753
|
/**
|
|
317
1754
|
* The component used for the root node.
|
|
318
1755
|
* Either a string to use a HTML element or a component.
|
|
319
1756
|
*/
|
|
320
|
-
component:
|
|
1757
|
+
component: l.elementType,
|
|
321
1758
|
/**
|
|
322
1759
|
* If `true`, the left and right padding is removed.
|
|
323
1760
|
* @default false
|
|
324
1761
|
*/
|
|
325
|
-
disableGutters:
|
|
1762
|
+
disableGutters: l.bool,
|
|
326
1763
|
/**
|
|
327
1764
|
* Set the max-width to match the min-width of the current breakpoint.
|
|
328
1765
|
* This is useful if you'd prefer to design for a fixed set of sizes
|
|
@@ -330,58 +1767,58 @@ process.env.NODE_ENV !== "production" && (Hi.propTypes = {
|
|
|
330
1767
|
* It's fluid by default.
|
|
331
1768
|
* @default false
|
|
332
1769
|
*/
|
|
333
|
-
fixed:
|
|
1770
|
+
fixed: l.bool,
|
|
334
1771
|
/**
|
|
335
1772
|
* Determine the max-width of the container.
|
|
336
1773
|
* The container width grows with the size of the screen.
|
|
337
1774
|
* Set to `false` to disable `maxWidth`.
|
|
338
1775
|
* @default 'lg'
|
|
339
1776
|
*/
|
|
340
|
-
maxWidth:
|
|
1777
|
+
maxWidth: l.oneOfType([l.oneOf(["xs", "sm", "md", "lg", "xl", !1]), l.string]),
|
|
341
1778
|
/**
|
|
342
1779
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
343
1780
|
*/
|
|
344
|
-
sx:
|
|
1781
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object])
|
|
345
1782
|
});
|
|
346
|
-
const
|
|
347
|
-
function
|
|
348
|
-
return
|
|
1783
|
+
const mr = vr;
|
|
1784
|
+
function Ii(e) {
|
|
1785
|
+
return rt("MuiDivider", e);
|
|
349
1786
|
}
|
|
350
|
-
|
|
351
|
-
const
|
|
1787
|
+
Wt("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
1788
|
+
const ea = ["absolute", "children", "className", "component", "flexItem", "light", "orientation", "role", "textAlign", "variant"], ta = (e) => {
|
|
352
1789
|
const {
|
|
353
1790
|
absolute: o,
|
|
354
|
-
children:
|
|
1791
|
+
children: t,
|
|
355
1792
|
classes: r,
|
|
356
1793
|
flexItem: n,
|
|
357
|
-
light:
|
|
358
|
-
orientation:
|
|
1794
|
+
light: i,
|
|
1795
|
+
orientation: a,
|
|
359
1796
|
textAlign: s,
|
|
360
|
-
variant:
|
|
361
|
-
} =
|
|
362
|
-
return
|
|
363
|
-
root: ["root", o && "absolute",
|
|
364
|
-
wrapper: ["wrapper",
|
|
365
|
-
},
|
|
366
|
-
},
|
|
1797
|
+
variant: u
|
|
1798
|
+
} = e;
|
|
1799
|
+
return nt({
|
|
1800
|
+
root: ["root", o && "absolute", u, i && "light", a === "vertical" && "vertical", n && "flexItem", t && "withChildren", t && a === "vertical" && "withChildrenVertical", s === "right" && a !== "vertical" && "textAlignRight", s === "left" && a !== "vertical" && "textAlignLeft"],
|
|
1801
|
+
wrapper: ["wrapper", a === "vertical" && "wrapperVertical"]
|
|
1802
|
+
}, Ii, r);
|
|
1803
|
+
}, oa = Oe("div", {
|
|
367
1804
|
name: "MuiDivider",
|
|
368
1805
|
slot: "Root",
|
|
369
|
-
overridesResolver: (
|
|
1806
|
+
overridesResolver: (e, o) => {
|
|
370
1807
|
const {
|
|
371
|
-
ownerState:
|
|
372
|
-
} =
|
|
373
|
-
return [o.root,
|
|
1808
|
+
ownerState: t
|
|
1809
|
+
} = e;
|
|
1810
|
+
return [o.root, t.absolute && o.absolute, o[t.variant], t.light && o.light, t.orientation === "vertical" && o.vertical, t.flexItem && o.flexItem, t.children && o.withChildren, t.children && t.orientation === "vertical" && o.withChildrenVertical, t.textAlign === "right" && t.orientation !== "vertical" && o.textAlignRight, t.textAlign === "left" && t.orientation !== "vertical" && o.textAlignLeft];
|
|
374
1811
|
}
|
|
375
1812
|
})(({
|
|
376
|
-
theme:
|
|
1813
|
+
theme: e,
|
|
377
1814
|
ownerState: o
|
|
378
|
-
}) =>
|
|
1815
|
+
}) => T({
|
|
379
1816
|
margin: 0,
|
|
380
1817
|
// Reset browser default style.
|
|
381
1818
|
flexShrink: 0,
|
|
382
1819
|
borderWidth: 0,
|
|
383
1820
|
borderStyle: "solid",
|
|
384
|
-
borderColor: (
|
|
1821
|
+
borderColor: (e.vars || e).palette.divider,
|
|
385
1822
|
borderBottomWidth: "thin"
|
|
386
1823
|
}, o.absolute && {
|
|
387
1824
|
position: "absolute",
|
|
@@ -389,15 +1826,15 @@ const Le = ["absolute", "children", "className", "component", "flexItem", "light
|
|
|
389
1826
|
left: 0,
|
|
390
1827
|
width: "100%"
|
|
391
1828
|
}, o.light && {
|
|
392
|
-
borderColor:
|
|
1829
|
+
borderColor: e.vars ? `rgba(${e.vars.palette.dividerChannel} / 0.08)` : et(e.palette.divider, 0.08)
|
|
393
1830
|
}, o.variant === "inset" && {
|
|
394
1831
|
marginLeft: 72
|
|
395
1832
|
}, o.variant === "middle" && o.orientation === "horizontal" && {
|
|
396
|
-
marginLeft:
|
|
397
|
-
marginRight:
|
|
1833
|
+
marginLeft: e.spacing(2),
|
|
1834
|
+
marginRight: e.spacing(2)
|
|
398
1835
|
}, o.variant === "middle" && o.orientation === "vertical" && {
|
|
399
|
-
marginTop:
|
|
400
|
-
marginBottom:
|
|
1836
|
+
marginTop: e.spacing(1),
|
|
1837
|
+
marginBottom: e.spacing(1)
|
|
401
1838
|
}, o.orientation === "vertical" && {
|
|
402
1839
|
height: "100%",
|
|
403
1840
|
borderBottomWidth: 0,
|
|
@@ -406,8 +1843,8 @@ const Le = ["absolute", "children", "className", "component", "flexItem", "light
|
|
|
406
1843
|
alignSelf: "stretch",
|
|
407
1844
|
height: "auto"
|
|
408
1845
|
}), ({
|
|
409
|
-
ownerState:
|
|
410
|
-
}) =>
|
|
1846
|
+
ownerState: e
|
|
1847
|
+
}) => T({}, e.children && {
|
|
411
1848
|
display: "flex",
|
|
412
1849
|
whiteSpace: "nowrap",
|
|
413
1850
|
textAlign: "center",
|
|
@@ -417,98 +1854,98 @@ const Le = ["absolute", "children", "className", "component", "flexItem", "light
|
|
|
417
1854
|
alignSelf: "center"
|
|
418
1855
|
}
|
|
419
1856
|
}), ({
|
|
420
|
-
theme:
|
|
1857
|
+
theme: e,
|
|
421
1858
|
ownerState: o
|
|
422
|
-
}) =>
|
|
1859
|
+
}) => T({}, o.children && o.orientation !== "vertical" && {
|
|
423
1860
|
"&::before, &::after": {
|
|
424
1861
|
width: "100%",
|
|
425
|
-
borderTop: `thin solid ${(
|
|
1862
|
+
borderTop: `thin solid ${(e.vars || e).palette.divider}`
|
|
426
1863
|
}
|
|
427
1864
|
}), ({
|
|
428
|
-
theme:
|
|
1865
|
+
theme: e,
|
|
429
1866
|
ownerState: o
|
|
430
|
-
}) =>
|
|
1867
|
+
}) => T({}, o.children && o.orientation === "vertical" && {
|
|
431
1868
|
flexDirection: "column",
|
|
432
1869
|
"&::before, &::after": {
|
|
433
1870
|
height: "100%",
|
|
434
|
-
borderLeft: `thin solid ${(
|
|
1871
|
+
borderLeft: `thin solid ${(e.vars || e).palette.divider}`
|
|
435
1872
|
}
|
|
436
1873
|
}), ({
|
|
437
|
-
ownerState:
|
|
438
|
-
}) =>
|
|
1874
|
+
ownerState: e
|
|
1875
|
+
}) => T({}, e.textAlign === "right" && e.orientation !== "vertical" && {
|
|
439
1876
|
"&::before": {
|
|
440
1877
|
width: "90%"
|
|
441
1878
|
},
|
|
442
1879
|
"&::after": {
|
|
443
1880
|
width: "10%"
|
|
444
1881
|
}
|
|
445
|
-
},
|
|
1882
|
+
}, e.textAlign === "left" && e.orientation !== "vertical" && {
|
|
446
1883
|
"&::before": {
|
|
447
1884
|
width: "10%"
|
|
448
1885
|
},
|
|
449
1886
|
"&::after": {
|
|
450
1887
|
width: "90%"
|
|
451
1888
|
}
|
|
452
|
-
})),
|
|
1889
|
+
})), ra = Oe("span", {
|
|
453
1890
|
name: "MuiDivider",
|
|
454
1891
|
slot: "Wrapper",
|
|
455
|
-
overridesResolver: (
|
|
1892
|
+
overridesResolver: (e, o) => {
|
|
456
1893
|
const {
|
|
457
|
-
ownerState:
|
|
458
|
-
} =
|
|
459
|
-
return [o.wrapper,
|
|
1894
|
+
ownerState: t
|
|
1895
|
+
} = e;
|
|
1896
|
+
return [o.wrapper, t.orientation === "vertical" && o.wrapperVertical];
|
|
460
1897
|
}
|
|
461
1898
|
})(({
|
|
462
|
-
theme:
|
|
1899
|
+
theme: e,
|
|
463
1900
|
ownerState: o
|
|
464
|
-
}) =>
|
|
1901
|
+
}) => T({
|
|
465
1902
|
display: "inline-block",
|
|
466
|
-
paddingLeft: `calc(${
|
|
467
|
-
paddingRight: `calc(${
|
|
1903
|
+
paddingLeft: `calc(${e.spacing(1)} * 1.2)`,
|
|
1904
|
+
paddingRight: `calc(${e.spacing(1)} * 1.2)`
|
|
468
1905
|
}, o.orientation === "vertical" && {
|
|
469
|
-
paddingTop: `calc(${
|
|
470
|
-
paddingBottom: `calc(${
|
|
471
|
-
})),
|
|
472
|
-
const r =
|
|
1906
|
+
paddingTop: `calc(${e.spacing(1)} * 1.2)`,
|
|
1907
|
+
paddingBottom: `calc(${e.spacing(1)} * 1.2)`
|
|
1908
|
+
})), lo = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
1909
|
+
const r = it({
|
|
473
1910
|
props: o,
|
|
474
1911
|
name: "MuiDivider"
|
|
475
1912
|
}), {
|
|
476
1913
|
absolute: n = !1,
|
|
477
|
-
children:
|
|
478
|
-
className:
|
|
479
|
-
component: s =
|
|
480
|
-
flexItem:
|
|
1914
|
+
children: i,
|
|
1915
|
+
className: a,
|
|
1916
|
+
component: s = i ? "div" : "hr",
|
|
1917
|
+
flexItem: u = !1,
|
|
481
1918
|
light: d = !1,
|
|
482
|
-
orientation:
|
|
1919
|
+
orientation: p = "horizontal",
|
|
483
1920
|
role: f = s !== "hr" ? "separator" : void 0,
|
|
484
|
-
textAlign:
|
|
485
|
-
variant:
|
|
486
|
-
} = r,
|
|
1921
|
+
textAlign: c = "center",
|
|
1922
|
+
variant: v = "fullWidth"
|
|
1923
|
+
} = r, h = Se(r, ea), m = T({}, r, {
|
|
487
1924
|
absolute: n,
|
|
488
1925
|
component: s,
|
|
489
|
-
flexItem:
|
|
1926
|
+
flexItem: u,
|
|
490
1927
|
light: d,
|
|
491
|
-
orientation:
|
|
1928
|
+
orientation: p,
|
|
492
1929
|
role: f,
|
|
493
|
-
textAlign:
|
|
494
|
-
variant:
|
|
495
|
-
}), g =
|
|
496
|
-
return /* @__PURE__ */
|
|
1930
|
+
textAlign: c,
|
|
1931
|
+
variant: v
|
|
1932
|
+
}), g = ta(m);
|
|
1933
|
+
return /* @__PURE__ */ N(oa, T({
|
|
497
1934
|
as: s,
|
|
498
|
-
className:
|
|
1935
|
+
className: Pe(g.root, a),
|
|
499
1936
|
role: f,
|
|
500
|
-
ref:
|
|
501
|
-
ownerState:
|
|
502
|
-
},
|
|
503
|
-
children:
|
|
1937
|
+
ref: t,
|
|
1938
|
+
ownerState: m
|
|
1939
|
+
}, h, {
|
|
1940
|
+
children: i ? /* @__PURE__ */ N(ra, {
|
|
504
1941
|
className: g.wrapper,
|
|
505
|
-
ownerState:
|
|
506
|
-
children:
|
|
1942
|
+
ownerState: m,
|
|
1943
|
+
children: i
|
|
507
1944
|
}) : null
|
|
508
1945
|
}));
|
|
509
1946
|
});
|
|
510
|
-
|
|
511
|
-
process.env.NODE_ENV !== "production" && (
|
|
1947
|
+
lo.muiSkipListHighlight = !0;
|
|
1948
|
+
process.env.NODE_ENV !== "production" && (lo.propTypes = {
|
|
512
1949
|
// ----------------------------- Warning --------------------------------
|
|
513
1950
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
514
1951
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -517,340 +1954,940 @@ process.env.NODE_ENV !== "production" && (Si.propTypes = {
|
|
|
517
1954
|
* Absolutely position the element.
|
|
518
1955
|
* @default false
|
|
519
1956
|
*/
|
|
520
|
-
absolute:
|
|
1957
|
+
absolute: l.bool,
|
|
521
1958
|
/**
|
|
522
1959
|
* The content of the component.
|
|
523
1960
|
*/
|
|
524
|
-
children:
|
|
1961
|
+
children: l.node,
|
|
525
1962
|
/**
|
|
526
1963
|
* Override or extend the styles applied to the component.
|
|
527
1964
|
*/
|
|
528
|
-
classes:
|
|
1965
|
+
classes: l.object,
|
|
529
1966
|
/**
|
|
530
1967
|
* @ignore
|
|
531
1968
|
*/
|
|
532
|
-
className:
|
|
1969
|
+
className: l.string,
|
|
533
1970
|
/**
|
|
534
1971
|
* The component used for the root node.
|
|
535
1972
|
* Either a string to use a HTML element or a component.
|
|
536
1973
|
*/
|
|
537
|
-
component:
|
|
1974
|
+
component: l.elementType,
|
|
538
1975
|
/**
|
|
539
1976
|
* If `true`, a vertical divider will have the correct height when used in flex container.
|
|
540
1977
|
* (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)
|
|
541
1978
|
* @default false
|
|
542
1979
|
*/
|
|
543
|
-
flexItem:
|
|
1980
|
+
flexItem: l.bool,
|
|
544
1981
|
/**
|
|
545
1982
|
* If `true`, the divider will have a lighter color.
|
|
546
1983
|
* @default false
|
|
547
1984
|
*/
|
|
548
|
-
light:
|
|
1985
|
+
light: l.bool,
|
|
549
1986
|
/**
|
|
550
1987
|
* The component orientation.
|
|
551
1988
|
* @default 'horizontal'
|
|
552
1989
|
*/
|
|
553
|
-
orientation:
|
|
1990
|
+
orientation: l.oneOf(["horizontal", "vertical"]),
|
|
554
1991
|
/**
|
|
555
1992
|
* @ignore
|
|
556
1993
|
*/
|
|
557
|
-
role:
|
|
1994
|
+
role: l.string,
|
|
558
1995
|
/**
|
|
559
1996
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
560
1997
|
*/
|
|
561
|
-
sx:
|
|
1998
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object]),
|
|
562
1999
|
/**
|
|
563
2000
|
* The text alignment.
|
|
564
2001
|
* @default 'center'
|
|
565
2002
|
*/
|
|
566
|
-
textAlign:
|
|
2003
|
+
textAlign: l.oneOf(["center", "left", "right"]),
|
|
567
2004
|
/**
|
|
568
2005
|
* The variant to use.
|
|
569
2006
|
* @default 'fullWidth'
|
|
570
2007
|
*/
|
|
571
|
-
variant:
|
|
2008
|
+
variant: l.oneOfType([l.oneOf(["fullWidth", "inset", "middle"]), l.string])
|
|
2009
|
+
});
|
|
2010
|
+
const Lo = lo;
|
|
2011
|
+
function na(e) {
|
|
2012
|
+
return rt("MuiTooltip", e);
|
|
2013
|
+
}
|
|
2014
|
+
const ia = Wt("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), Te = ia, aa = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
|
|
2015
|
+
function sa(e) {
|
|
2016
|
+
return Math.round(e * 1e5) / 1e5;
|
|
2017
|
+
}
|
|
2018
|
+
const la = (e) => {
|
|
2019
|
+
const {
|
|
2020
|
+
classes: o,
|
|
2021
|
+
disableInteractive: t,
|
|
2022
|
+
arrow: r,
|
|
2023
|
+
touch: n,
|
|
2024
|
+
placement: i
|
|
2025
|
+
} = e, a = {
|
|
2026
|
+
popper: ["popper", !t && "popperInteractive", r && "popperArrow"],
|
|
2027
|
+
tooltip: ["tooltip", r && "tooltipArrow", n && "touch", `tooltipPlacement${se(i.split("-")[0])}`],
|
|
2028
|
+
arrow: ["arrow"]
|
|
2029
|
+
};
|
|
2030
|
+
return nt(a, na, o);
|
|
2031
|
+
}, ua = Oe(fr, {
|
|
2032
|
+
name: "MuiTooltip",
|
|
2033
|
+
slot: "Popper",
|
|
2034
|
+
overridesResolver: (e, o) => {
|
|
2035
|
+
const {
|
|
2036
|
+
ownerState: t
|
|
2037
|
+
} = e;
|
|
2038
|
+
return [o.popper, !t.disableInteractive && o.popperInteractive, t.arrow && o.popperArrow, !t.open && o.popperClose];
|
|
2039
|
+
}
|
|
2040
|
+
})(({
|
|
2041
|
+
theme: e,
|
|
2042
|
+
ownerState: o,
|
|
2043
|
+
open: t
|
|
2044
|
+
}) => T({
|
|
2045
|
+
zIndex: (e.vars || e).zIndex.tooltip,
|
|
2046
|
+
pointerEvents: "none"
|
|
2047
|
+
}, !o.disableInteractive && {
|
|
2048
|
+
pointerEvents: "auto"
|
|
2049
|
+
}, !t && {
|
|
2050
|
+
pointerEvents: "none"
|
|
2051
|
+
}, o.arrow && {
|
|
2052
|
+
[`&[data-popper-placement*="bottom"] .${Te.arrow}`]: {
|
|
2053
|
+
top: 0,
|
|
2054
|
+
marginTop: "-0.71em",
|
|
2055
|
+
"&::before": {
|
|
2056
|
+
transformOrigin: "0 100%"
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
[`&[data-popper-placement*="top"] .${Te.arrow}`]: {
|
|
2060
|
+
bottom: 0,
|
|
2061
|
+
marginBottom: "-0.71em",
|
|
2062
|
+
"&::before": {
|
|
2063
|
+
transformOrigin: "100% 0"
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
[`&[data-popper-placement*="right"] .${Te.arrow}`]: T({}, o.isRtl ? {
|
|
2067
|
+
right: 0,
|
|
2068
|
+
marginRight: "-0.71em"
|
|
2069
|
+
} : {
|
|
2070
|
+
left: 0,
|
|
2071
|
+
marginLeft: "-0.71em"
|
|
2072
|
+
}, {
|
|
2073
|
+
height: "1em",
|
|
2074
|
+
width: "0.71em",
|
|
2075
|
+
"&::before": {
|
|
2076
|
+
transformOrigin: "100% 100%"
|
|
2077
|
+
}
|
|
2078
|
+
}),
|
|
2079
|
+
[`&[data-popper-placement*="left"] .${Te.arrow}`]: T({}, o.isRtl ? {
|
|
2080
|
+
left: 0,
|
|
2081
|
+
marginLeft: "-0.71em"
|
|
2082
|
+
} : {
|
|
2083
|
+
right: 0,
|
|
2084
|
+
marginRight: "-0.71em"
|
|
2085
|
+
}, {
|
|
2086
|
+
height: "1em",
|
|
2087
|
+
width: "0.71em",
|
|
2088
|
+
"&::before": {
|
|
2089
|
+
transformOrigin: "0 0"
|
|
2090
|
+
}
|
|
2091
|
+
})
|
|
2092
|
+
})), pa = Oe("div", {
|
|
2093
|
+
name: "MuiTooltip",
|
|
2094
|
+
slot: "Tooltip",
|
|
2095
|
+
overridesResolver: (e, o) => {
|
|
2096
|
+
const {
|
|
2097
|
+
ownerState: t
|
|
2098
|
+
} = e;
|
|
2099
|
+
return [o.tooltip, t.touch && o.touch, t.arrow && o.tooltipArrow, o[`tooltipPlacement${se(t.placement.split("-")[0])}`]];
|
|
2100
|
+
}
|
|
2101
|
+
})(({
|
|
2102
|
+
theme: e,
|
|
2103
|
+
ownerState: o
|
|
2104
|
+
}) => T({
|
|
2105
|
+
backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : et(e.palette.grey[700], 0.92),
|
|
2106
|
+
borderRadius: (e.vars || e).shape.borderRadius,
|
|
2107
|
+
color: (e.vars || e).palette.common.white,
|
|
2108
|
+
fontFamily: e.typography.fontFamily,
|
|
2109
|
+
padding: "4px 8px",
|
|
2110
|
+
fontSize: e.typography.pxToRem(11),
|
|
2111
|
+
maxWidth: 300,
|
|
2112
|
+
margin: 2,
|
|
2113
|
+
wordWrap: "break-word",
|
|
2114
|
+
fontWeight: e.typography.fontWeightMedium
|
|
2115
|
+
}, o.arrow && {
|
|
2116
|
+
position: "relative",
|
|
2117
|
+
margin: 0
|
|
2118
|
+
}, o.touch && {
|
|
2119
|
+
padding: "8px 16px",
|
|
2120
|
+
fontSize: e.typography.pxToRem(14),
|
|
2121
|
+
lineHeight: `${sa(16 / 14)}em`,
|
|
2122
|
+
fontWeight: e.typography.fontWeightRegular
|
|
2123
|
+
}, {
|
|
2124
|
+
[`.${Te.popper}[data-popper-placement*="left"] &`]: T({
|
|
2125
|
+
transformOrigin: "right center"
|
|
2126
|
+
}, o.isRtl ? T({
|
|
2127
|
+
marginLeft: "14px"
|
|
2128
|
+
}, o.touch && {
|
|
2129
|
+
marginLeft: "24px"
|
|
2130
|
+
}) : T({
|
|
2131
|
+
marginRight: "14px"
|
|
2132
|
+
}, o.touch && {
|
|
2133
|
+
marginRight: "24px"
|
|
2134
|
+
})),
|
|
2135
|
+
[`.${Te.popper}[data-popper-placement*="right"] &`]: T({
|
|
2136
|
+
transformOrigin: "left center"
|
|
2137
|
+
}, o.isRtl ? T({
|
|
2138
|
+
marginRight: "14px"
|
|
2139
|
+
}, o.touch && {
|
|
2140
|
+
marginRight: "24px"
|
|
2141
|
+
}) : T({
|
|
2142
|
+
marginLeft: "14px"
|
|
2143
|
+
}, o.touch && {
|
|
2144
|
+
marginLeft: "24px"
|
|
2145
|
+
})),
|
|
2146
|
+
[`.${Te.popper}[data-popper-placement*="top"] &`]: T({
|
|
2147
|
+
transformOrigin: "center bottom",
|
|
2148
|
+
marginBottom: "14px"
|
|
2149
|
+
}, o.touch && {
|
|
2150
|
+
marginBottom: "24px"
|
|
2151
|
+
}),
|
|
2152
|
+
[`.${Te.popper}[data-popper-placement*="bottom"] &`]: T({
|
|
2153
|
+
transformOrigin: "center top",
|
|
2154
|
+
marginTop: "14px"
|
|
2155
|
+
}, o.touch && {
|
|
2156
|
+
marginTop: "24px"
|
|
2157
|
+
})
|
|
2158
|
+
})), da = Oe("span", {
|
|
2159
|
+
name: "MuiTooltip",
|
|
2160
|
+
slot: "Arrow",
|
|
2161
|
+
overridesResolver: (e, o) => o.arrow
|
|
2162
|
+
})(({
|
|
2163
|
+
theme: e
|
|
2164
|
+
}) => ({
|
|
2165
|
+
overflow: "hidden",
|
|
2166
|
+
position: "absolute",
|
|
2167
|
+
width: "1em",
|
|
2168
|
+
height: "0.71em",
|
|
2169
|
+
boxSizing: "border-box",
|
|
2170
|
+
color: e.vars ? e.vars.palette.Tooltip.bg : et(e.palette.grey[700], 0.9),
|
|
2171
|
+
"&::before": {
|
|
2172
|
+
content: '""',
|
|
2173
|
+
margin: "auto",
|
|
2174
|
+
display: "block",
|
|
2175
|
+
width: "100%",
|
|
2176
|
+
height: "100%",
|
|
2177
|
+
backgroundColor: "currentColor",
|
|
2178
|
+
transform: "rotate(45deg)"
|
|
2179
|
+
}
|
|
2180
|
+
}));
|
|
2181
|
+
let bt = !1, Zt = null, Ke = {
|
|
2182
|
+
x: 0,
|
|
2183
|
+
y: 0
|
|
2184
|
+
};
|
|
2185
|
+
function yt(e, o) {
|
|
2186
|
+
return (t) => {
|
|
2187
|
+
o && o(t), e(t);
|
|
2188
|
+
};
|
|
2189
|
+
}
|
|
2190
|
+
const hr = /* @__PURE__ */ E.forwardRef(function(o, t) {
|
|
2191
|
+
var r, n, i, a, s, u, d, p, f, c, v, h, m, g, w, S, y, b, P;
|
|
2192
|
+
const C = it({
|
|
2193
|
+
props: o,
|
|
2194
|
+
name: "MuiTooltip"
|
|
2195
|
+
}), {
|
|
2196
|
+
arrow: O = !1,
|
|
2197
|
+
children: D,
|
|
2198
|
+
components: x = {},
|
|
2199
|
+
componentsProps: R = {},
|
|
2200
|
+
describeChild: M = !1,
|
|
2201
|
+
disableFocusListener: B = !1,
|
|
2202
|
+
disableHoverListener: W = !1,
|
|
2203
|
+
disableInteractive: Z = !1,
|
|
2204
|
+
disableTouchListener: U = !1,
|
|
2205
|
+
enterDelay: Y = 100,
|
|
2206
|
+
enterNextDelay: k = 0,
|
|
2207
|
+
enterTouchDelay: z = 700,
|
|
2208
|
+
followCursor: q = !1,
|
|
2209
|
+
id: ye,
|
|
2210
|
+
leaveDelay: le = 0,
|
|
2211
|
+
leaveTouchDelay: me = 1500,
|
|
2212
|
+
onClose: ie,
|
|
2213
|
+
onOpen: K,
|
|
2214
|
+
open: Q,
|
|
2215
|
+
placement: ue = "bottom",
|
|
2216
|
+
PopperComponent: pe,
|
|
2217
|
+
PopperProps: X = {},
|
|
2218
|
+
slotProps: L = {},
|
|
2219
|
+
slots: he = {},
|
|
2220
|
+
title: j,
|
|
2221
|
+
TransitionComponent: Le = No,
|
|
2222
|
+
TransitionProps: _e
|
|
2223
|
+
} = C, ut = Se(C, aa), I = /* @__PURE__ */ E.isValidElement(D) ? D : /* @__PURE__ */ N("span", {
|
|
2224
|
+
children: D
|
|
2225
|
+
}), We = fn(), pt = We.direction === "rtl", [V, dt] = E.useState(), [ae, Ye] = E.useState(null), Re = E.useRef(!1), $e = Z || q, we = E.useRef(), Ae = E.useRef(), de = E.useRef(), Ve = E.useRef(), [ft, ho] = Kr({
|
|
2226
|
+
controlled: Q,
|
|
2227
|
+
default: !1,
|
|
2228
|
+
name: "Tooltip",
|
|
2229
|
+
state: "open"
|
|
2230
|
+
});
|
|
2231
|
+
let ge = ft;
|
|
2232
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2233
|
+
const {
|
|
2234
|
+
current: A
|
|
2235
|
+
} = E.useRef(Q !== void 0);
|
|
2236
|
+
E.useEffect(() => {
|
|
2237
|
+
V && V.disabled && !A && j !== "" && V.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(`
|
|
2238
|
+
`));
|
|
2239
|
+
}, [j, V, A]);
|
|
2240
|
+
}
|
|
2241
|
+
const jt = Qr(ye), He = E.useRef(), ct = E.useCallback(() => {
|
|
2242
|
+
He.current !== void 0 && (document.body.style.WebkitUserSelect = He.current, He.current = void 0), clearTimeout(Ve.current);
|
|
2243
|
+
}, []);
|
|
2244
|
+
E.useEffect(() => () => {
|
|
2245
|
+
clearTimeout(we.current), clearTimeout(Ae.current), clearTimeout(de.current), ct();
|
|
2246
|
+
}, [ct]);
|
|
2247
|
+
const go = (A) => {
|
|
2248
|
+
clearTimeout(Zt), bt = !0, ho(!0), K && !ge && K(A);
|
|
2249
|
+
}, vt = cn(
|
|
2250
|
+
/**
|
|
2251
|
+
* @param {React.SyntheticEvent | Event} event
|
|
2252
|
+
*/
|
|
2253
|
+
(A) => {
|
|
2254
|
+
clearTimeout(Zt), Zt = setTimeout(() => {
|
|
2255
|
+
bt = !1;
|
|
2256
|
+
}, 800 + le), ho(!1), ie && ge && ie(A), clearTimeout(we.current), we.current = setTimeout(() => {
|
|
2257
|
+
Re.current = !1;
|
|
2258
|
+
}, We.transitions.duration.shortest);
|
|
2259
|
+
}
|
|
2260
|
+
), Lt = (A) => {
|
|
2261
|
+
Re.current && A.type !== "touchstart" || (V && V.removeAttribute("title"), clearTimeout(Ae.current), clearTimeout(de.current), Y || bt && k ? Ae.current = setTimeout(() => {
|
|
2262
|
+
go(A);
|
|
2263
|
+
}, bt ? k : Y) : go(A));
|
|
2264
|
+
}, bo = (A) => {
|
|
2265
|
+
clearTimeout(Ae.current), clearTimeout(de.current), de.current = setTimeout(() => {
|
|
2266
|
+
vt(A);
|
|
2267
|
+
}, le);
|
|
2268
|
+
}, {
|
|
2269
|
+
isFocusVisibleRef: yo,
|
|
2270
|
+
onBlur: Wr,
|
|
2271
|
+
onFocus: Yr,
|
|
2272
|
+
ref: $r
|
|
2273
|
+
} = vn(), [, wo] = E.useState(!1), Po = (A) => {
|
|
2274
|
+
Wr(A), yo.current === !1 && (wo(!1), bo(A));
|
|
2275
|
+
}, To = (A) => {
|
|
2276
|
+
V || dt(A.currentTarget), Yr(A), yo.current === !0 && (wo(!0), Lt(A));
|
|
2277
|
+
}, Co = (A) => {
|
|
2278
|
+
Re.current = !0;
|
|
2279
|
+
const G = I.props;
|
|
2280
|
+
G.onTouchStart && G.onTouchStart(A);
|
|
2281
|
+
}, So = Lt, Oo = bo, Br = (A) => {
|
|
2282
|
+
Co(A), clearTimeout(de.current), clearTimeout(we.current), ct(), He.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", Ve.current = setTimeout(() => {
|
|
2283
|
+
document.body.style.WebkitUserSelect = He.current, Lt(A);
|
|
2284
|
+
}, z);
|
|
2285
|
+
}, kr = (A) => {
|
|
2286
|
+
I.props.onTouchEnd && I.props.onTouchEnd(A), ct(), clearTimeout(de.current), de.current = setTimeout(() => {
|
|
2287
|
+
vt(A);
|
|
2288
|
+
}, me);
|
|
2289
|
+
};
|
|
2290
|
+
E.useEffect(() => {
|
|
2291
|
+
if (!ge)
|
|
2292
|
+
return;
|
|
2293
|
+
function A(G) {
|
|
2294
|
+
(G.key === "Escape" || G.key === "Esc") && vt(G);
|
|
2295
|
+
}
|
|
2296
|
+
return document.addEventListener("keydown", A), () => {
|
|
2297
|
+
document.removeEventListener("keydown", A);
|
|
2298
|
+
};
|
|
2299
|
+
}, [vt, ge]);
|
|
2300
|
+
const zr = Kt(I.ref, $r, dt, t);
|
|
2301
|
+
!j && j !== 0 && (ge = !1);
|
|
2302
|
+
const Vt = E.useRef(), Xr = (A) => {
|
|
2303
|
+
const G = I.props;
|
|
2304
|
+
G.onMouseMove && G.onMouseMove(A), Ke = {
|
|
2305
|
+
x: A.clientX,
|
|
2306
|
+
y: A.clientY
|
|
2307
|
+
}, Vt.current && Vt.current.update();
|
|
2308
|
+
}, Fe = {}, Ht = typeof j == "string";
|
|
2309
|
+
M ? (Fe.title = !ge && Ht && !W ? j : null, Fe["aria-describedby"] = ge ? jt : null) : (Fe["aria-label"] = Ht ? j : null, Fe["aria-labelledby"] = ge && !Ht ? jt : null);
|
|
2310
|
+
const ee = T({}, Fe, ut, I.props, {
|
|
2311
|
+
className: Pe(ut.className, I.props.className),
|
|
2312
|
+
onTouchStart: Co,
|
|
2313
|
+
ref: zr
|
|
2314
|
+
}, q ? {
|
|
2315
|
+
onMouseMove: Xr
|
|
2316
|
+
} : {});
|
|
2317
|
+
process.env.NODE_ENV !== "production" && (ee["data-mui-internal-clone-element"] = !0, E.useEffect(() => {
|
|
2318
|
+
V && !V.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
2319
|
+
`));
|
|
2320
|
+
}, [V]));
|
|
2321
|
+
const Ze = {};
|
|
2322
|
+
U || (ee.onTouchStart = Br, ee.onTouchEnd = kr), W || (ee.onMouseOver = yt(So, ee.onMouseOver), ee.onMouseLeave = yt(Oo, ee.onMouseLeave), $e || (Ze.onMouseOver = So, Ze.onMouseLeave = Oo)), B || (ee.onFocus = yt(To, ee.onFocus), ee.onBlur = yt(Po, ee.onBlur), $e || (Ze.onFocus = To, Ze.onBlur = Po)), process.env.NODE_ENV !== "production" && I.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${I.props.title}\` or the Tooltip component.`].join(`
|
|
2323
|
+
`));
|
|
2324
|
+
const jr = E.useMemo(() => {
|
|
2325
|
+
var A;
|
|
2326
|
+
let G = [{
|
|
2327
|
+
name: "arrow",
|
|
2328
|
+
enabled: !!ae,
|
|
2329
|
+
options: {
|
|
2330
|
+
element: ae,
|
|
2331
|
+
padding: 4
|
|
2332
|
+
}
|
|
2333
|
+
}];
|
|
2334
|
+
return (A = X.popperOptions) != null && A.modifiers && (G = G.concat(X.popperOptions.modifiers)), T({}, X.popperOptions, {
|
|
2335
|
+
modifiers: G
|
|
2336
|
+
});
|
|
2337
|
+
}, [ae, X]), Ue = T({}, C, {
|
|
2338
|
+
isRtl: pt,
|
|
2339
|
+
arrow: O,
|
|
2340
|
+
disableInteractive: $e,
|
|
2341
|
+
placement: ue,
|
|
2342
|
+
PopperComponentProp: pe,
|
|
2343
|
+
touch: Re.current
|
|
2344
|
+
}), Ft = la(Ue), Eo = (r = (n = he.popper) != null ? n : x.Popper) != null ? r : ua, xo = (i = (a = (s = he.transition) != null ? s : x.Transition) != null ? a : Le) != null ? i : No, Ro = (u = (d = he.tooltip) != null ? d : x.Tooltip) != null ? u : pa, Ao = (p = (f = he.arrow) != null ? f : x.Arrow) != null ? p : da, Lr = mt(Eo, T({}, X, (c = L.popper) != null ? c : R.popper, {
|
|
2345
|
+
className: Pe(Ft.popper, X == null ? void 0 : X.className, (v = (h = L.popper) != null ? h : R.popper) == null ? void 0 : v.className)
|
|
2346
|
+
}), Ue), Vr = mt(xo, T({}, _e, (m = L.transition) != null ? m : R.transition), Ue), Hr = mt(Ro, T({}, (g = L.tooltip) != null ? g : R.tooltip, {
|
|
2347
|
+
className: Pe(Ft.tooltip, (w = (S = L.tooltip) != null ? S : R.tooltip) == null ? void 0 : w.className)
|
|
2348
|
+
}), Ue), Fr = mt(Ao, T({}, (y = L.arrow) != null ? y : R.arrow, {
|
|
2349
|
+
className: Pe(Ft.arrow, (b = (P = L.arrow) != null ? P : R.arrow) == null ? void 0 : b.className)
|
|
2350
|
+
}), Ue);
|
|
2351
|
+
return /* @__PURE__ */ Ie(E.Fragment, {
|
|
2352
|
+
children: [/* @__PURE__ */ E.cloneElement(I, ee), /* @__PURE__ */ N(Eo, T({
|
|
2353
|
+
as: pe ?? fr,
|
|
2354
|
+
placement: ue,
|
|
2355
|
+
anchorEl: q ? {
|
|
2356
|
+
getBoundingClientRect: () => ({
|
|
2357
|
+
top: Ke.y,
|
|
2358
|
+
left: Ke.x,
|
|
2359
|
+
right: Ke.x,
|
|
2360
|
+
bottom: Ke.y,
|
|
2361
|
+
width: 0,
|
|
2362
|
+
height: 0
|
|
2363
|
+
})
|
|
2364
|
+
} : V,
|
|
2365
|
+
popperRef: Vt,
|
|
2366
|
+
open: V ? ge : !1,
|
|
2367
|
+
id: jt,
|
|
2368
|
+
transition: !0
|
|
2369
|
+
}, Ze, Lr, {
|
|
2370
|
+
popperOptions: jr,
|
|
2371
|
+
children: ({
|
|
2372
|
+
TransitionProps: A
|
|
2373
|
+
}) => /* @__PURE__ */ N(xo, T({
|
|
2374
|
+
timeout: We.transitions.duration.shorter
|
|
2375
|
+
}, A, Vr, {
|
|
2376
|
+
children: /* @__PURE__ */ Ie(Ro, T({}, Hr, {
|
|
2377
|
+
children: [j, O ? /* @__PURE__ */ N(Ao, T({}, Fr, {
|
|
2378
|
+
ref: Ye
|
|
2379
|
+
})) : null]
|
|
2380
|
+
}))
|
|
2381
|
+
}))
|
|
2382
|
+
}))]
|
|
2383
|
+
});
|
|
2384
|
+
});
|
|
2385
|
+
process.env.NODE_ENV !== "production" && (hr.propTypes = {
|
|
2386
|
+
// ----------------------------- Warning --------------------------------
|
|
2387
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2388
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
2389
|
+
// ----------------------------------------------------------------------
|
|
2390
|
+
/**
|
|
2391
|
+
* If `true`, adds an arrow to the tooltip.
|
|
2392
|
+
* @default false
|
|
2393
|
+
*/
|
|
2394
|
+
arrow: l.bool,
|
|
2395
|
+
/**
|
|
2396
|
+
* Tooltip reference element.
|
|
2397
|
+
*/
|
|
2398
|
+
children: Gr.isRequired,
|
|
2399
|
+
/**
|
|
2400
|
+
* Override or extend the styles applied to the component.
|
|
2401
|
+
*/
|
|
2402
|
+
classes: l.object,
|
|
2403
|
+
/**
|
|
2404
|
+
* @ignore
|
|
2405
|
+
*/
|
|
2406
|
+
className: l.string,
|
|
2407
|
+
/**
|
|
2408
|
+
* The components used for each slot inside.
|
|
2409
|
+
*
|
|
2410
|
+
* This prop is an alias for the `slots` prop.
|
|
2411
|
+
* It's recommended to use the `slots` prop instead.
|
|
2412
|
+
*
|
|
2413
|
+
* @default {}
|
|
2414
|
+
*/
|
|
2415
|
+
components: l.shape({
|
|
2416
|
+
Arrow: l.elementType,
|
|
2417
|
+
Popper: l.elementType,
|
|
2418
|
+
Tooltip: l.elementType,
|
|
2419
|
+
Transition: l.elementType
|
|
2420
|
+
}),
|
|
2421
|
+
/**
|
|
2422
|
+
* The extra props for the slot components.
|
|
2423
|
+
* You can override the existing props or add new ones.
|
|
2424
|
+
*
|
|
2425
|
+
* This prop is an alias for the `slotProps` prop.
|
|
2426
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
2427
|
+
*
|
|
2428
|
+
* @default {}
|
|
2429
|
+
*/
|
|
2430
|
+
componentsProps: l.shape({
|
|
2431
|
+
arrow: l.object,
|
|
2432
|
+
popper: l.object,
|
|
2433
|
+
tooltip: l.object,
|
|
2434
|
+
transition: l.object
|
|
2435
|
+
}),
|
|
2436
|
+
/**
|
|
2437
|
+
* Set to `true` if the `title` acts as an accessible description.
|
|
2438
|
+
* By default the `title` acts as an accessible label for the child.
|
|
2439
|
+
* @default false
|
|
2440
|
+
*/
|
|
2441
|
+
describeChild: l.bool,
|
|
2442
|
+
/**
|
|
2443
|
+
* Do not respond to focus-visible events.
|
|
2444
|
+
* @default false
|
|
2445
|
+
*/
|
|
2446
|
+
disableFocusListener: l.bool,
|
|
2447
|
+
/**
|
|
2448
|
+
* Do not respond to hover events.
|
|
2449
|
+
* @default false
|
|
2450
|
+
*/
|
|
2451
|
+
disableHoverListener: l.bool,
|
|
2452
|
+
/**
|
|
2453
|
+
* Makes a tooltip not interactive, i.e. it will close when the user
|
|
2454
|
+
* hovers over the tooltip before the `leaveDelay` is expired.
|
|
2455
|
+
* @default false
|
|
2456
|
+
*/
|
|
2457
|
+
disableInteractive: l.bool,
|
|
2458
|
+
/**
|
|
2459
|
+
* Do not respond to long press touch events.
|
|
2460
|
+
* @default false
|
|
2461
|
+
*/
|
|
2462
|
+
disableTouchListener: l.bool,
|
|
2463
|
+
/**
|
|
2464
|
+
* The number of milliseconds to wait before showing the tooltip.
|
|
2465
|
+
* This prop won't impact the enter touch delay (`enterTouchDelay`).
|
|
2466
|
+
* @default 100
|
|
2467
|
+
*/
|
|
2468
|
+
enterDelay: l.number,
|
|
2469
|
+
/**
|
|
2470
|
+
* The number of milliseconds to wait before showing the tooltip when one was already recently opened.
|
|
2471
|
+
* @default 0
|
|
2472
|
+
*/
|
|
2473
|
+
enterNextDelay: l.number,
|
|
2474
|
+
/**
|
|
2475
|
+
* The number of milliseconds a user must touch the element before showing the tooltip.
|
|
2476
|
+
* @default 700
|
|
2477
|
+
*/
|
|
2478
|
+
enterTouchDelay: l.number,
|
|
2479
|
+
/**
|
|
2480
|
+
* If `true`, the tooltip follow the cursor over the wrapped element.
|
|
2481
|
+
* @default false
|
|
2482
|
+
*/
|
|
2483
|
+
followCursor: l.bool,
|
|
2484
|
+
/**
|
|
2485
|
+
* This prop is used to help implement the accessibility logic.
|
|
2486
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
2487
|
+
*/
|
|
2488
|
+
id: l.string,
|
|
2489
|
+
/**
|
|
2490
|
+
* The number of milliseconds to wait before hiding the tooltip.
|
|
2491
|
+
* This prop won't impact the leave touch delay (`leaveTouchDelay`).
|
|
2492
|
+
* @default 0
|
|
2493
|
+
*/
|
|
2494
|
+
leaveDelay: l.number,
|
|
2495
|
+
/**
|
|
2496
|
+
* The number of milliseconds after the user stops touching an element before hiding the tooltip.
|
|
2497
|
+
* @default 1500
|
|
2498
|
+
*/
|
|
2499
|
+
leaveTouchDelay: l.number,
|
|
2500
|
+
/**
|
|
2501
|
+
* Callback fired when the component requests to be closed.
|
|
2502
|
+
*
|
|
2503
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
2504
|
+
*/
|
|
2505
|
+
onClose: l.func,
|
|
2506
|
+
/**
|
|
2507
|
+
* Callback fired when the component requests to be open.
|
|
2508
|
+
*
|
|
2509
|
+
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
2510
|
+
*/
|
|
2511
|
+
onOpen: l.func,
|
|
2512
|
+
/**
|
|
2513
|
+
* If `true`, the component is shown.
|
|
2514
|
+
*/
|
|
2515
|
+
open: l.bool,
|
|
2516
|
+
/**
|
|
2517
|
+
* Tooltip placement.
|
|
2518
|
+
* @default 'bottom'
|
|
2519
|
+
*/
|
|
2520
|
+
placement: l.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
|
2521
|
+
/**
|
|
2522
|
+
* The component used for the popper.
|
|
2523
|
+
* @default Popper
|
|
2524
|
+
*/
|
|
2525
|
+
PopperComponent: l.elementType,
|
|
2526
|
+
/**
|
|
2527
|
+
* Props applied to the [`Popper`](/material-ui/api/popper/) element.
|
|
2528
|
+
* @default {}
|
|
2529
|
+
*/
|
|
2530
|
+
PopperProps: l.object,
|
|
2531
|
+
/**
|
|
2532
|
+
* The extra props for the slot components.
|
|
2533
|
+
* You can override the existing props or add new ones.
|
|
2534
|
+
*
|
|
2535
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
2536
|
+
*
|
|
2537
|
+
* @default {}
|
|
2538
|
+
*/
|
|
2539
|
+
slotProps: l.shape({
|
|
2540
|
+
arrow: l.object,
|
|
2541
|
+
popper: l.object,
|
|
2542
|
+
tooltip: l.object,
|
|
2543
|
+
transition: l.object
|
|
2544
|
+
}),
|
|
2545
|
+
/**
|
|
2546
|
+
* The components used for each slot inside.
|
|
2547
|
+
*
|
|
2548
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
2549
|
+
*
|
|
2550
|
+
* @default {}
|
|
2551
|
+
*/
|
|
2552
|
+
slots: l.shape({
|
|
2553
|
+
arrow: l.elementType,
|
|
2554
|
+
popper: l.elementType,
|
|
2555
|
+
tooltip: l.elementType,
|
|
2556
|
+
transition: l.elementType
|
|
2557
|
+
}),
|
|
2558
|
+
/**
|
|
2559
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
2560
|
+
*/
|
|
2561
|
+
sx: l.oneOfType([l.arrayOf(l.oneOfType([l.func, l.object, l.bool])), l.func, l.object]),
|
|
2562
|
+
/**
|
|
2563
|
+
* Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
|
|
2564
|
+
*/
|
|
2565
|
+
title: l.node,
|
|
2566
|
+
/**
|
|
2567
|
+
* The component used for the transition.
|
|
2568
|
+
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
2569
|
+
* @default Grow
|
|
2570
|
+
*/
|
|
2571
|
+
TransitionComponent: l.elementType,
|
|
2572
|
+
/**
|
|
2573
|
+
* Props applied to the transition element.
|
|
2574
|
+
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
2575
|
+
*/
|
|
2576
|
+
TransitionProps: l.object
|
|
2577
|
+
});
|
|
2578
|
+
const wt = hr;
|
|
2579
|
+
var uo = {}, fa = Mt;
|
|
2580
|
+
Object.defineProperty(uo, "__esModule", {
|
|
2581
|
+
value: !0
|
|
2582
|
+
});
|
|
2583
|
+
var gr = uo.default = void 0, ca = fa(Nt()), va = Dt, ma = (0, ca.default)(/* @__PURE__ */ (0, va.jsx)("path", {
|
|
2584
|
+
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
2585
|
+
}), "Add");
|
|
2586
|
+
gr = uo.default = ma;
|
|
2587
|
+
var po = {}, ha = Mt;
|
|
2588
|
+
Object.defineProperty(po, "__esModule", {
|
|
2589
|
+
value: !0
|
|
2590
|
+
});
|
|
2591
|
+
var br = po.default = void 0, ga = ha(Nt()), ba = Dt, ya = (0, ga.default)(/* @__PURE__ */ (0, ba.jsx)("path", {
|
|
2592
|
+
d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
|
|
2593
|
+
}), "Refresh");
|
|
2594
|
+
br = po.default = ya;
|
|
2595
|
+
var fo = {}, wa = Mt;
|
|
2596
|
+
Object.defineProperty(fo, "__esModule", {
|
|
2597
|
+
value: !0
|
|
2598
|
+
});
|
|
2599
|
+
var yr = fo.default = void 0, Pa = wa(Nt()), Ta = Dt, Ca = (0, Pa.default)(/* @__PURE__ */ (0, Ta.jsx)("path", {
|
|
2600
|
+
d: "M19 13H5v-2h14v2z"
|
|
2601
|
+
}), "Remove");
|
|
2602
|
+
yr = fo.default = Ca;
|
|
2603
|
+
var co = {}, Sa = Mt;
|
|
2604
|
+
Object.defineProperty(co, "__esModule", {
|
|
2605
|
+
value: !0
|
|
572
2606
|
});
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
2607
|
+
var wr = co.default = void 0, Oa = Sa(Nt()), Ea = Dt, xa = (0, Oa.default)(/* @__PURE__ */ (0, Ea.jsx)("path", {
|
|
2608
|
+
d: "m4 7.59 5-5c.78-.78 2.05-.78 2.83 0L20.24 11h-2.83L10.4 4 5.41 9H8v2H2V5h2v2.59zM20 19h2v-6h-6v2h2.59l-4.99 5-7.01-7H3.76l8.41 8.41c.78.78 2.05.78 2.83 0l5-5V19z"
|
|
2609
|
+
}), "ScreenRotationAlt");
|
|
2610
|
+
wr = co.default = xa;
|
|
2611
|
+
var te = function(e, o) {
|
|
2612
|
+
return Number(e.toFixed(o));
|
|
2613
|
+
}, Ra = function(e, o) {
|
|
2614
|
+
return typeof e == "number" ? e : o;
|
|
2615
|
+
}, $ = function(e, o, t) {
|
|
2616
|
+
t && typeof t == "function" && t(e, o);
|
|
2617
|
+
}, Aa = function(e) {
|
|
2618
|
+
return -Math.cos(e * Math.PI) / 2 + 0.5;
|
|
2619
|
+
}, Da = function(e) {
|
|
2620
|
+
return e;
|
|
2621
|
+
}, Na = function(e) {
|
|
2622
|
+
return e * e;
|
|
2623
|
+
}, Ma = function(e) {
|
|
2624
|
+
return e * (2 - e);
|
|
2625
|
+
}, _a = function(e) {
|
|
2626
|
+
return e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e;
|
|
2627
|
+
}, Wa = function(e) {
|
|
2628
|
+
return e * e * e;
|
|
2629
|
+
}, Ya = function(e) {
|
|
2630
|
+
return --e * e * e + 1;
|
|
2631
|
+
}, $a = function(e) {
|
|
2632
|
+
return e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1;
|
|
2633
|
+
}, Ba = function(e) {
|
|
2634
|
+
return e * e * e * e;
|
|
2635
|
+
}, ka = function(e) {
|
|
2636
|
+
return 1 - --e * e * e * e;
|
|
2637
|
+
}, za = function(e) {
|
|
2638
|
+
return e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e;
|
|
2639
|
+
}, Xa = function(e) {
|
|
2640
|
+
return e * e * e * e * e;
|
|
2641
|
+
}, ja = function(e) {
|
|
2642
|
+
return 1 + --e * e * e * e * e;
|
|
2643
|
+
}, La = function(e) {
|
|
2644
|
+
return e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e;
|
|
2645
|
+
}, Pr = {
|
|
2646
|
+
easeOut: Aa,
|
|
2647
|
+
linear: Da,
|
|
2648
|
+
easeInQuad: Na,
|
|
2649
|
+
easeOutQuad: Ma,
|
|
2650
|
+
easeInOutQuad: _a,
|
|
2651
|
+
easeInCubic: Wa,
|
|
2652
|
+
easeOutCubic: Ya,
|
|
2653
|
+
easeInOutCubic: $a,
|
|
2654
|
+
easeInQuart: Ba,
|
|
2655
|
+
easeOutQuart: ka,
|
|
2656
|
+
easeInOutQuart: za,
|
|
2657
|
+
easeInQuint: Xa,
|
|
2658
|
+
easeOutQuint: ja,
|
|
2659
|
+
easeInOutQuint: La
|
|
2660
|
+
}, Tr = function(e) {
|
|
2661
|
+
typeof e == "number" && cancelAnimationFrame(e);
|
|
2662
|
+
}, fe = function(e) {
|
|
2663
|
+
e.mounted && (Tr(e.animation), e.animate = !1, e.animation = null, e.velocity = null);
|
|
627
2664
|
};
|
|
628
|
-
function
|
|
629
|
-
if (
|
|
630
|
-
var n = (/* @__PURE__ */ new Date()).getTime(),
|
|
631
|
-
|
|
632
|
-
if (!
|
|
633
|
-
return
|
|
634
|
-
var
|
|
635
|
-
|
|
636
|
-
}, requestAnimationFrame(
|
|
2665
|
+
function Cr(e, o, t, r) {
|
|
2666
|
+
if (e.mounted) {
|
|
2667
|
+
var n = (/* @__PURE__ */ new Date()).getTime(), i = 1;
|
|
2668
|
+
fe(e), e.animation = function() {
|
|
2669
|
+
if (!e.mounted)
|
|
2670
|
+
return Tr(e.animation);
|
|
2671
|
+
var a = (/* @__PURE__ */ new Date()).getTime() - n, s = a / t, u = Pr[o], d = u(s);
|
|
2672
|
+
a >= t ? (r(i), e.animation = null) : e.animation && (r(d), requestAnimationFrame(e.animation));
|
|
2673
|
+
}, requestAnimationFrame(e.animation);
|
|
637
2674
|
}
|
|
638
2675
|
}
|
|
639
|
-
function
|
|
640
|
-
var o =
|
|
641
|
-
return !(Number.isNaN(o) || Number.isNaN(
|
|
642
|
-
}
|
|
643
|
-
function
|
|
644
|
-
var n =
|
|
645
|
-
if (!(!
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
var
|
|
649
|
-
|
|
2676
|
+
function Va(e) {
|
|
2677
|
+
var o = e.scale, t = e.positionX, r = e.positionY;
|
|
2678
|
+
return !(Number.isNaN(o) || Number.isNaN(t) || Number.isNaN(r));
|
|
2679
|
+
}
|
|
2680
|
+
function xe(e, o, t, r) {
|
|
2681
|
+
var n = Va(o);
|
|
2682
|
+
if (!(!e.mounted || !n)) {
|
|
2683
|
+
var i = e.setTransformState, a = e.transformState, s = a.scale, u = a.positionX, d = a.positionY, p = o.scale - s, f = o.positionX - u, c = o.positionY - d;
|
|
2684
|
+
t === 0 ? i(o.scale, o.positionX, o.positionY) : Cr(e, r, t, function(v) {
|
|
2685
|
+
var h = s + p * v, m = u + f * v, g = d + c * v;
|
|
2686
|
+
i(h, m, g);
|
|
650
2687
|
});
|
|
651
2688
|
}
|
|
652
2689
|
}
|
|
653
|
-
function
|
|
654
|
-
var r =
|
|
2690
|
+
function Ha(e, o, t) {
|
|
2691
|
+
var r = e.offsetWidth, n = e.offsetHeight, i = o.offsetWidth, a = o.offsetHeight, s = i * t, u = a * t, d = r - s, p = n - u;
|
|
655
2692
|
return {
|
|
656
2693
|
wrapperWidth: r,
|
|
657
2694
|
wrapperHeight: n,
|
|
658
2695
|
newContentWidth: s,
|
|
659
2696
|
newDiffWidth: d,
|
|
660
|
-
newContentHeight:
|
|
661
|
-
newDiffHeight:
|
|
2697
|
+
newContentHeight: u,
|
|
2698
|
+
newDiffHeight: p
|
|
662
2699
|
};
|
|
663
2700
|
}
|
|
664
|
-
var
|
|
665
|
-
var s =
|
|
666
|
-
return { minPositionX: d, maxPositionX:
|
|
667
|
-
},
|
|
668
|
-
var
|
|
669
|
-
if (!
|
|
2701
|
+
var Fa = function(e, o, t, r, n, i, a) {
|
|
2702
|
+
var s = e > o ? t * (a ? 1 : 0.5) : 0, u = r > n ? i * (a ? 1 : 0.5) : 0, d = e - o - s, p = s, f = r - n - u, c = u;
|
|
2703
|
+
return { minPositionX: d, maxPositionX: p, minPositionY: f, maxPositionY: c };
|
|
2704
|
+
}, vo = function(e, o) {
|
|
2705
|
+
var t = e.wrapperComponent, r = e.contentComponent, n = e.setup.centerZoomedOut;
|
|
2706
|
+
if (!t || !r)
|
|
670
2707
|
throw new Error("Components are not mounted");
|
|
671
|
-
var
|
|
672
|
-
return
|
|
673
|
-
},
|
|
674
|
-
return r ?
|
|
675
|
-
},
|
|
676
|
-
var
|
|
677
|
-
return
|
|
2708
|
+
var i = Ha(t, r, o), a = i.wrapperWidth, s = i.wrapperHeight, u = i.newContentWidth, d = i.newDiffWidth, p = i.newContentHeight, f = i.newDiffHeight, c = Fa(a, u, d, s, p, f, !!n);
|
|
2709
|
+
return c;
|
|
2710
|
+
}, Jt = function(e, o, t, r) {
|
|
2711
|
+
return r ? e < o ? te(o, 2) : e > t ? te(t, 2) : te(e, 2) : te(e, 2);
|
|
2712
|
+
}, je = function(e, o) {
|
|
2713
|
+
var t = vo(e, o);
|
|
2714
|
+
return e.bounds = t, t;
|
|
678
2715
|
};
|
|
679
|
-
function
|
|
680
|
-
var s =
|
|
681
|
-
|
|
682
|
-
var
|
|
683
|
-
return { x:
|
|
684
|
-
}
|
|
685
|
-
function
|
|
686
|
-
var
|
|
687
|
-
if (typeof o != "number" || typeof
|
|
688
|
-
return console.error("Mouse X and Y position were not provided!"), { x:
|
|
689
|
-
var f =
|
|
690
|
-
return
|
|
691
|
-
}
|
|
692
|
-
function
|
|
693
|
-
var
|
|
694
|
-
return !Number.isNaN(
|
|
695
|
-
}
|
|
696
|
-
var
|
|
697
|
-
var
|
|
2716
|
+
function Bt(e, o, t, r, n, i, a) {
|
|
2717
|
+
var s = t.minPositionX, u = t.minPositionY, d = t.maxPositionX, p = t.maxPositionY, f = 0, c = 0;
|
|
2718
|
+
a && (f = n, c = i);
|
|
2719
|
+
var v = Jt(e, s - f, d + f, r), h = Jt(o, u - c, p + c, r);
|
|
2720
|
+
return { x: v, y: h };
|
|
2721
|
+
}
|
|
2722
|
+
function kt(e, o, t, r, n, i) {
|
|
2723
|
+
var a = e.transformState, s = a.scale, u = a.positionX, d = a.positionY, p = r - s;
|
|
2724
|
+
if (typeof o != "number" || typeof t != "number")
|
|
2725
|
+
return console.error("Mouse X and Y position were not provided!"), { x: u, y: d };
|
|
2726
|
+
var f = u - o * p, c = d - t * p, v = Bt(f, c, n, i, 0, 0, null);
|
|
2727
|
+
return v;
|
|
2728
|
+
}
|
|
2729
|
+
function lt(e, o, t, r, n) {
|
|
2730
|
+
var i = n ? r : 0, a = o - i;
|
|
2731
|
+
return !Number.isNaN(t) && e >= t ? t : !Number.isNaN(o) && e <= a ? a : e;
|
|
2732
|
+
}
|
|
2733
|
+
var Vo = function(e, o) {
|
|
2734
|
+
var t = e.setup.panning.excluded, r = e.isInitialized, n = e.wrapperComponent, i = o.target, a = n == null ? void 0 : n.contains(i), s = r && i && a;
|
|
698
2735
|
if (!s)
|
|
699
2736
|
return !1;
|
|
700
|
-
var
|
|
701
|
-
return !
|
|
702
|
-
},
|
|
703
|
-
var o =
|
|
704
|
-
return !!
|
|
705
|
-
},
|
|
706
|
-
var
|
|
707
|
-
|
|
708
|
-
var
|
|
709
|
-
|
|
710
|
-
},
|
|
711
|
-
var
|
|
712
|
-
|
|
713
|
-
var
|
|
714
|
-
if (
|
|
715
|
-
var s =
|
|
716
|
-
|
|
2737
|
+
var u = zt(i, t);
|
|
2738
|
+
return !u;
|
|
2739
|
+
}, Ho = function(e) {
|
|
2740
|
+
var o = e.isInitialized, t = e.isPanning, r = e.setup, n = r.panning.disabled, i = o && t && !n;
|
|
2741
|
+
return !!i;
|
|
2742
|
+
}, Za = function(e, o) {
|
|
2743
|
+
var t = e.transformState, r = t.positionX, n = t.positionY;
|
|
2744
|
+
e.isPanning = !0;
|
|
2745
|
+
var i = o.clientX, a = o.clientY;
|
|
2746
|
+
e.startCoords = { x: i - r, y: a - n };
|
|
2747
|
+
}, Ua = function(e, o) {
|
|
2748
|
+
var t = o.touches, r = e.transformState, n = r.positionX, i = r.positionY;
|
|
2749
|
+
e.isPanning = !0;
|
|
2750
|
+
var a = t.length === 1;
|
|
2751
|
+
if (a) {
|
|
2752
|
+
var s = t[0].clientX, u = t[0].clientY;
|
|
2753
|
+
e.startCoords = { x: s - n, y: u - i };
|
|
717
2754
|
}
|
|
718
2755
|
};
|
|
719
|
-
function
|
|
720
|
-
var o =
|
|
721
|
-
if (!(
|
|
722
|
-
var
|
|
2756
|
+
function qa(e) {
|
|
2757
|
+
var o = e.transformState, t = o.positionX, r = o.positionY, n = o.scale, i = e.setup, a = i.disabled, s = i.limitToBounds, u = i.centerZoomedOut, d = e.wrapperComponent;
|
|
2758
|
+
if (!(a || !d || !e.bounds)) {
|
|
2759
|
+
var p = e.bounds, f = p.maxPositionX, c = p.minPositionX, v = p.maxPositionY, h = p.minPositionY, m = t > f || t < c, g = r > v || r < h, w = t > f ? d.offsetWidth : e.setup.minPositionX || 0, S = r > v ? d.offsetHeight : e.setup.minPositionY || 0, y = kt(e, w, S, n, e.bounds, s || u), b = y.x, P = y.y;
|
|
723
2760
|
return {
|
|
724
2761
|
scale: n,
|
|
725
|
-
positionX:
|
|
726
|
-
positionY: g ?
|
|
2762
|
+
positionX: m ? b : t,
|
|
2763
|
+
positionY: g ? P : r
|
|
727
2764
|
};
|
|
728
2765
|
}
|
|
729
2766
|
}
|
|
730
|
-
function
|
|
731
|
-
var
|
|
732
|
-
if (!(
|
|
733
|
-
var
|
|
734
|
-
|
|
2767
|
+
function Ka(e, o, t, r, n) {
|
|
2768
|
+
var i = e.setup.limitToBounds, a = e.wrapperComponent, s = e.bounds, u = e.transformState, d = u.scale, p = u.positionX, f = u.positionY;
|
|
2769
|
+
if (!(a === null || s === null || o === p && t === f)) {
|
|
2770
|
+
var c = Bt(o, t, s, i, r, n, a), v = c.x, h = c.y;
|
|
2771
|
+
e.setTransformState(d, v, h);
|
|
735
2772
|
}
|
|
736
2773
|
}
|
|
737
|
-
var
|
|
738
|
-
var r =
|
|
2774
|
+
var Qa = function(e, o, t) {
|
|
2775
|
+
var r = e.startCoords, n = e.transformState, i = e.setup.panning, a = i.lockAxisX, s = i.lockAxisY, u = n.positionX, d = n.positionY;
|
|
739
2776
|
if (!r)
|
|
740
|
-
return { x:
|
|
741
|
-
var
|
|
742
|
-
return { x:
|
|
743
|
-
},
|
|
744
|
-
var
|
|
745
|
-
return o > 0 && n >=
|
|
746
|
-
},
|
|
747
|
-
var o =
|
|
2777
|
+
return { x: u, y: d };
|
|
2778
|
+
var p = o - r.x, f = t - r.y, c = a ? u : p, v = s ? d : f;
|
|
2779
|
+
return { x: c, y: v };
|
|
2780
|
+
}, Rt = function(e, o) {
|
|
2781
|
+
var t = e.setup, r = e.transformState, n = r.scale, i = t.minScale, a = t.disablePadding;
|
|
2782
|
+
return o > 0 && n >= i && !a ? o : 0;
|
|
2783
|
+
}, Ga = function(e) {
|
|
2784
|
+
var o = e.mounted, t = e.setup, r = t.disabled, n = t.velocityAnimation, i = e.transformState.scale, a = n.disabled, s = !a || i > 1 || !r || o;
|
|
748
2785
|
return !!s;
|
|
749
|
-
},
|
|
750
|
-
var o =
|
|
751
|
-
return !(!d || !
|
|
2786
|
+
}, Ja = function(e) {
|
|
2787
|
+
var o = e.mounted, t = e.velocity, r = e.bounds, n = e.setup, i = n.disabled, a = n.velocityAnimation, s = e.transformState.scale, u = a.disabled, d = !u || s > 1 || !i || o;
|
|
2788
|
+
return !(!d || !t || !r);
|
|
752
2789
|
};
|
|
753
|
-
function
|
|
754
|
-
var
|
|
755
|
-
return r ? n * o *
|
|
2790
|
+
function Ia(e, o) {
|
|
2791
|
+
var t = e.setup.velocityAnimation, r = t.equalToMove, n = t.animationTime, i = t.sensitivity;
|
|
2792
|
+
return r ? n * o * i : n;
|
|
756
2793
|
}
|
|
757
|
-
function
|
|
2794
|
+
function Fo(e, o, t, r, n, i, a, s, u, d) {
|
|
758
2795
|
if (n) {
|
|
759
|
-
if (o >
|
|
760
|
-
var
|
|
761
|
-
return
|
|
2796
|
+
if (o > a && t > a) {
|
|
2797
|
+
var p = a + (e - a) * d;
|
|
2798
|
+
return p > u ? u : p < a ? a : p;
|
|
762
2799
|
}
|
|
763
|
-
if (o <
|
|
764
|
-
var
|
|
765
|
-
return
|
|
2800
|
+
if (o < i && t < i) {
|
|
2801
|
+
var p = i + (e - i) * d;
|
|
2802
|
+
return p < s ? s : p > i ? i : p;
|
|
766
2803
|
}
|
|
767
2804
|
}
|
|
768
|
-
return r ? o :
|
|
769
|
-
}
|
|
770
|
-
function
|
|
771
|
-
var
|
|
772
|
-
return o ? Math.min(
|
|
773
|
-
}
|
|
774
|
-
function
|
|
775
|
-
var
|
|
776
|
-
if (
|
|
777
|
-
var r =
|
|
778
|
-
if (r && n &&
|
|
779
|
-
var d =
|
|
780
|
-
|
|
2805
|
+
return r ? o : Jt(e, i, a, n);
|
|
2806
|
+
}
|
|
2807
|
+
function es(e, o) {
|
|
2808
|
+
var t = 1;
|
|
2809
|
+
return o ? Math.min(t, e.offsetWidth / window.innerWidth) : t;
|
|
2810
|
+
}
|
|
2811
|
+
function ts(e, o) {
|
|
2812
|
+
var t = Ga(e);
|
|
2813
|
+
if (t) {
|
|
2814
|
+
var r = e.lastMousePosition, n = e.velocityTime, i = e.setup, a = e.wrapperComponent, s = i.velocityAnimation.equalToMove, u = Date.now();
|
|
2815
|
+
if (r && n && a) {
|
|
2816
|
+
var d = es(a, s), p = o.x - r.x, f = o.y - r.y, c = p / d, v = f / d, h = u - n, m = p * p + f * f, g = Math.sqrt(m) / h;
|
|
2817
|
+
e.velocity = { velocityX: c, velocityY: v, total: g };
|
|
781
2818
|
}
|
|
782
|
-
|
|
2819
|
+
e.lastMousePosition = o, e.velocityTime = u;
|
|
783
2820
|
}
|
|
784
2821
|
}
|
|
785
|
-
function
|
|
786
|
-
var o =
|
|
787
|
-
if (!(!
|
|
788
|
-
var
|
|
789
|
-
|
|
790
|
-
var
|
|
791
|
-
(
|
|
2822
|
+
function os(e) {
|
|
2823
|
+
var o = e.velocity, t = e.bounds, r = e.setup, n = e.wrapperComponent, i = Ja(e);
|
|
2824
|
+
if (!(!i || !o || !t || !n)) {
|
|
2825
|
+
var a = o.velocityX, s = o.velocityY, u = o.total, d = t.maxPositionX, p = t.minPositionX, f = t.maxPositionY, c = t.minPositionY, v = r.limitToBounds, h = r.alignmentAnimation, m = r.zoomAnimation, g = r.panning, w = g.lockAxisY, S = g.lockAxisX, y = m.animationType, b = h.sizeX, P = h.sizeY, C = h.velocityAlignmentTime, O = C, D = Ia(e, u), x = Math.max(D, O), R = Rt(e, b), M = Rt(e, P), B = R * n.offsetWidth / 100, W = M * n.offsetHeight / 100, Z = d + B, U = p - B, Y = f + W, k = c - W, z = e.transformState, q = (/* @__PURE__ */ new Date()).getTime();
|
|
2826
|
+
Cr(e, y, x, function(ye) {
|
|
2827
|
+
var le = e.transformState, me = le.scale, ie = le.positionX, K = le.positionY, Q = (/* @__PURE__ */ new Date()).getTime() - q, ue = Q / O, pe = Pr[h.animationType], X = 1 - pe(Math.min(1, ue)), L = 1 - ye, he = ie + a * L, j = K + s * L, Le = Fo(he, z.positionX, ie, S, v, p, d, U, Z, X), _e = Fo(j, z.positionY, K, w, v, c, f, k, Y, X);
|
|
2828
|
+
(ie !== he || K !== j) && e.setTransformState(me, Le, _e);
|
|
792
2829
|
});
|
|
793
2830
|
}
|
|
794
2831
|
}
|
|
795
|
-
function
|
|
796
|
-
var
|
|
797
|
-
|
|
2832
|
+
function Zo(e, o) {
|
|
2833
|
+
var t = e.transformState.scale;
|
|
2834
|
+
fe(e), je(e, t), window.TouchEvent !== void 0 && o instanceof TouchEvent ? Ua(e, o) : Za(e, o);
|
|
798
2835
|
}
|
|
799
|
-
function
|
|
800
|
-
var o =
|
|
801
|
-
if (!
|
|
802
|
-
var f =
|
|
803
|
-
f &&
|
|
2836
|
+
function Sr(e) {
|
|
2837
|
+
var o = e.transformState.scale, t = e.setup, r = t.minScale, n = t.alignmentAnimation, i = n.disabled, a = n.sizeX, s = n.sizeY, u = n.animationTime, d = n.animationType, p = i || o < r || !a && !s;
|
|
2838
|
+
if (!p) {
|
|
2839
|
+
var f = qa(e);
|
|
2840
|
+
f && xe(e, f, u, d);
|
|
804
2841
|
}
|
|
805
2842
|
}
|
|
806
|
-
function
|
|
807
|
-
var r =
|
|
2843
|
+
function Uo(e, o, t) {
|
|
2844
|
+
var r = e.startCoords, n = e.setup, i = n.alignmentAnimation, a = i.sizeX, s = i.sizeY;
|
|
808
2845
|
if (r) {
|
|
809
|
-
var
|
|
810
|
-
|
|
2846
|
+
var u = Qa(e, o, t), d = u.x, p = u.y, f = Rt(e, a), c = Rt(e, s);
|
|
2847
|
+
ts(e, { x: d, y: p }), Ka(e, d, p, f, c);
|
|
811
2848
|
}
|
|
812
2849
|
}
|
|
813
|
-
function
|
|
814
|
-
if (
|
|
815
|
-
var o =
|
|
816
|
-
|
|
817
|
-
var
|
|
818
|
-
|
|
2850
|
+
function rs(e) {
|
|
2851
|
+
if (e.isPanning) {
|
|
2852
|
+
var o = e.setup.panning.velocityDisabled, t = e.velocity, r = e.wrapperComponent, n = e.contentComponent;
|
|
2853
|
+
e.isPanning = !1, e.animate = !1, e.animation = null;
|
|
2854
|
+
var i = r == null ? void 0 : r.getBoundingClientRect(), a = n == null ? void 0 : n.getBoundingClientRect(), s = (i == null ? void 0 : i.width) || 0, u = (i == null ? void 0 : i.height) || 0, d = (a == null ? void 0 : a.width) || 0, p = (a == null ? void 0 : a.height) || 0, f = s < d || u < p, c = !o && t && (t == null ? void 0 : t.total) > 0.1 && f;
|
|
2855
|
+
c ? os(e) : Sr(e);
|
|
819
2856
|
}
|
|
820
2857
|
}
|
|
821
|
-
function
|
|
822
|
-
var n =
|
|
823
|
-
return { scale:
|
|
2858
|
+
function mo(e, o, t, r) {
|
|
2859
|
+
var n = e.setup, i = n.minScale, a = n.maxScale, s = n.limitToBounds, u = lt(te(o, 2), i, a, 0, !1), d = je(e, u), p = kt(e, t, r, u, d, s), f = p.x, c = p.y;
|
|
2860
|
+
return { scale: u, positionX: f, positionY: c };
|
|
824
2861
|
}
|
|
825
|
-
function
|
|
826
|
-
var r =
|
|
827
|
-
if ((r >= 1 || s) &&
|
|
828
|
-
var
|
|
829
|
-
|
|
2862
|
+
function Or(e, o, t) {
|
|
2863
|
+
var r = e.transformState.scale, n = e.wrapperComponent, i = e.setup, a = i.minScale, s = i.limitToBounds, u = i.zoomAnimation, d = u.disabled, p = u.animationTime, f = u.animationType, c = d || r >= a;
|
|
2864
|
+
if ((r >= 1 || s) && Sr(e), !(c || !n || !e.mounted)) {
|
|
2865
|
+
var v = o || n.offsetWidth / 2, h = t || n.offsetHeight / 2, m = mo(e, a, v, h);
|
|
2866
|
+
m && xe(e, m, p, f);
|
|
830
2867
|
}
|
|
831
2868
|
}
|
|
832
|
-
var
|
|
833
|
-
return
|
|
834
|
-
for (var
|
|
835
|
-
|
|
836
|
-
for (var
|
|
837
|
-
Object.prototype.hasOwnProperty.call(
|
|
2869
|
+
var Ce = function() {
|
|
2870
|
+
return Ce = Object.assign || function(o) {
|
|
2871
|
+
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
2872
|
+
t = arguments[r];
|
|
2873
|
+
for (var i in t)
|
|
2874
|
+
Object.prototype.hasOwnProperty.call(t, i) && (o[i] = t[i]);
|
|
838
2875
|
}
|
|
839
2876
|
return o;
|
|
840
|
-
},
|
|
2877
|
+
}, Ce.apply(this, arguments);
|
|
841
2878
|
};
|
|
842
|
-
function
|
|
843
|
-
if (
|
|
844
|
-
for (var r = 0, n = o.length,
|
|
845
|
-
(
|
|
846
|
-
return
|
|
2879
|
+
function qo(e, o, t) {
|
|
2880
|
+
if (t || arguments.length === 2)
|
|
2881
|
+
for (var r = 0, n = o.length, i; r < n; r++)
|
|
2882
|
+
(i || !(r in o)) && (i || (i = Array.prototype.slice.call(o, 0, r)), i[r] = o[r]);
|
|
2883
|
+
return e.concat(i || Array.prototype.slice.call(o));
|
|
847
2884
|
}
|
|
848
|
-
var
|
|
2885
|
+
var Pt = {
|
|
849
2886
|
previousScale: 1,
|
|
850
2887
|
scale: 1,
|
|
851
2888
|
positionX: 0,
|
|
852
2889
|
positionY: 0
|
|
853
|
-
},
|
|
2890
|
+
}, Qe = {
|
|
854
2891
|
disabled: !1,
|
|
855
2892
|
minPositionX: null,
|
|
856
2893
|
maxPositionX: null,
|
|
@@ -914,495 +2951,495 @@ var H = {
|
|
|
914
2951
|
animationType: "easeOut",
|
|
915
2952
|
equalToMove: !0
|
|
916
2953
|
}
|
|
917
|
-
},
|
|
918
|
-
var o,
|
|
2954
|
+
}, Er = function(e) {
|
|
2955
|
+
var o, t, r, n;
|
|
919
2956
|
return {
|
|
920
|
-
previousScale: (o =
|
|
921
|
-
scale: (
|
|
922
|
-
positionX: (r =
|
|
923
|
-
positionY: (n =
|
|
2957
|
+
previousScale: (o = e.initialScale) !== null && o !== void 0 ? o : Pt.scale,
|
|
2958
|
+
scale: (t = e.initialScale) !== null && t !== void 0 ? t : Pt.scale,
|
|
2959
|
+
positionX: (r = e.initialPositionX) !== null && r !== void 0 ? r : Pt.positionX,
|
|
2960
|
+
positionY: (n = e.initialPositionY) !== null && n !== void 0 ? n : Pt.positionY
|
|
924
2961
|
};
|
|
925
|
-
},
|
|
926
|
-
var o =
|
|
927
|
-
return Object.keys(
|
|
928
|
-
var r = typeof
|
|
2962
|
+
}, Ko = function(e) {
|
|
2963
|
+
var o = Ce({}, Qe);
|
|
2964
|
+
return Object.keys(e).forEach(function(t) {
|
|
2965
|
+
var r = typeof e[t] < "u", n = typeof Qe[t] < "u";
|
|
929
2966
|
if (n && r) {
|
|
930
|
-
var
|
|
931
|
-
|
|
2967
|
+
var i = Object.prototype.toString.call(Qe[t]), a = i === "[object Object]", s = i === "[object Array]";
|
|
2968
|
+
a ? o[t] = Ce(Ce({}, Qe[t]), e[t]) : s ? o[t] = qo(qo([], Qe[t], !0), e[t], !0) : o[t] = e[t];
|
|
932
2969
|
}
|
|
933
2970
|
}), o;
|
|
934
|
-
},
|
|
935
|
-
var r =
|
|
2971
|
+
}, xr = function(e, o, t) {
|
|
2972
|
+
var r = e.transformState.scale, n = e.wrapperComponent, i = e.setup, a = i.maxScale, s = i.minScale, u = i.zoomAnimation, d = i.smooth, p = u.size;
|
|
936
2973
|
if (!n)
|
|
937
2974
|
throw new Error("Wrapper is not mounted");
|
|
938
|
-
var f = d ? r * Math.exp(o *
|
|
939
|
-
return
|
|
2975
|
+
var f = d ? r * Math.exp(o * t) : r + o * t, c = lt(te(f, 3), s, a, p, !1);
|
|
2976
|
+
return c;
|
|
940
2977
|
};
|
|
941
|
-
function
|
|
942
|
-
var
|
|
943
|
-
if (!
|
|
2978
|
+
function Rr(e, o, t, r, n) {
|
|
2979
|
+
var i = e.wrapperComponent, a = e.transformState, s = a.scale, u = a.positionX, d = a.positionY;
|
|
2980
|
+
if (!i)
|
|
944
2981
|
return console.error("No WrapperComponent found");
|
|
945
|
-
var
|
|
946
|
-
if (!
|
|
2982
|
+
var p = i.offsetWidth, f = i.offsetHeight, c = (p / 2 - u) / s, v = (f / 2 - d) / s, h = xr(e, o, t), m = mo(e, h, c, v);
|
|
2983
|
+
if (!m)
|
|
947
2984
|
return console.error("Error during zoom event. New transformation state was not calculated.");
|
|
948
|
-
|
|
2985
|
+
xe(e, m, r, n);
|
|
949
2986
|
}
|
|
950
|
-
function
|
|
951
|
-
var n =
|
|
952
|
-
if (
|
|
953
|
-
var
|
|
2987
|
+
function Ar(e, o, t, r) {
|
|
2988
|
+
var n = e.setup, i = e.wrapperComponent, a = n.limitToBounds, s = Er(e.props), u = e.transformState, d = u.scale, p = u.positionX, f = u.positionY;
|
|
2989
|
+
if (i) {
|
|
2990
|
+
var c = vo(e, s.scale), v = Bt(s.positionX, s.positionY, c, a, 0, 0, i), h = {
|
|
954
2991
|
scale: s.scale,
|
|
955
|
-
positionX:
|
|
956
|
-
positionY:
|
|
2992
|
+
positionX: v.x,
|
|
2993
|
+
positionY: v.y
|
|
957
2994
|
};
|
|
958
|
-
d === s.scale &&
|
|
2995
|
+
d === s.scale && p === s.positionX && f === s.positionY || (r == null || r(), xe(e, h, o, t));
|
|
959
2996
|
}
|
|
960
2997
|
}
|
|
961
|
-
function
|
|
962
|
-
var n =
|
|
2998
|
+
function ns(e, o, t, r) {
|
|
2999
|
+
var n = e.getBoundingClientRect(), i = o.getBoundingClientRect(), a = t.getBoundingClientRect(), s = i.x * r.scale, u = i.y * r.scale;
|
|
963
3000
|
return {
|
|
964
|
-
x: (n.x -
|
|
965
|
-
y: (n.y -
|
|
3001
|
+
x: (n.x - a.x + s) / r.scale,
|
|
3002
|
+
y: (n.y - a.y + u) / r.scale
|
|
966
3003
|
};
|
|
967
3004
|
}
|
|
968
|
-
function
|
|
969
|
-
var r =
|
|
3005
|
+
function is(e, o, t) {
|
|
3006
|
+
var r = e.wrapperComponent, n = e.contentComponent, i = e.transformState, a = e.setup, s = a.limitToBounds, u = a.minScale, d = a.maxScale;
|
|
970
3007
|
if (!r || !n)
|
|
971
|
-
return
|
|
972
|
-
var
|
|
973
|
-
return { positionX: R, positionY:
|
|
3008
|
+
return i;
|
|
3009
|
+
var p = r.getBoundingClientRect(), f = o.getBoundingClientRect(), c = ns(o, r, n, i), v = c.x, h = c.y, m = f.width / i.scale, g = f.height / i.scale, w = r.offsetWidth / m, S = r.offsetHeight / g, y = lt(t || Math.min(w, S), u, d, 0, !1), b = (p.width - m * y) / 2, P = (p.height - g * y) / 2, C = (p.left - v) * y + b, O = (p.top - h) * y + P, D = vo(e, y), x = Bt(C, O, D, s, 0, 0, r), R = x.x, M = x.y;
|
|
3010
|
+
return { positionX: R, positionY: M, scale: y };
|
|
974
3011
|
}
|
|
975
|
-
var
|
|
976
|
-
return function(o,
|
|
977
|
-
o === void 0 && (o = 0.5),
|
|
3012
|
+
var as = function(e) {
|
|
3013
|
+
return function(o, t, r) {
|
|
3014
|
+
o === void 0 && (o = 0.5), t === void 0 && (t = 300), r === void 0 && (r = "easeOut"), Rr(e, 1, o, t, r);
|
|
978
3015
|
};
|
|
979
|
-
},
|
|
980
|
-
return function(o,
|
|
981
|
-
o === void 0 && (o = 0.5),
|
|
3016
|
+
}, ss = function(e) {
|
|
3017
|
+
return function(o, t, r) {
|
|
3018
|
+
o === void 0 && (o = 0.5), t === void 0 && (t = 300), r === void 0 && (r = "easeOut"), Rr(e, -1, o, t, r);
|
|
982
3019
|
};
|
|
983
|
-
},
|
|
984
|
-
return function(o,
|
|
985
|
-
n === void 0 && (n = 300),
|
|
986
|
-
var
|
|
987
|
-
if (!(
|
|
988
|
-
var
|
|
3020
|
+
}, ls = function(e) {
|
|
3021
|
+
return function(o, t, r, n, i) {
|
|
3022
|
+
n === void 0 && (n = 300), i === void 0 && (i = "easeOut");
|
|
3023
|
+
var a = e.transformState, s = a.positionX, u = a.positionY, d = a.scale, p = e.wrapperComponent, f = e.contentComponent, c = e.setup.disabled;
|
|
3024
|
+
if (!(c || !p || !f)) {
|
|
3025
|
+
var v = {
|
|
989
3026
|
positionX: Number.isNaN(o) ? s : o,
|
|
990
|
-
positionY: Number.isNaN(
|
|
3027
|
+
positionY: Number.isNaN(t) ? u : t,
|
|
991
3028
|
scale: Number.isNaN(r) ? d : r
|
|
992
3029
|
};
|
|
993
|
-
|
|
3030
|
+
xe(e, v, n, i);
|
|
994
3031
|
}
|
|
995
3032
|
};
|
|
996
|
-
},
|
|
997
|
-
return function(o,
|
|
998
|
-
o === void 0 && (o = 200),
|
|
3033
|
+
}, us = function(e) {
|
|
3034
|
+
return function(o, t) {
|
|
3035
|
+
o === void 0 && (o = 200), t === void 0 && (t = "easeOut"), Ar(e, o, t);
|
|
999
3036
|
};
|
|
1000
|
-
},
|
|
1001
|
-
return function(o,
|
|
1002
|
-
|
|
1003
|
-
var n =
|
|
1004
|
-
if (
|
|
1005
|
-
var s =
|
|
1006
|
-
|
|
3037
|
+
}, ps = function(e) {
|
|
3038
|
+
return function(o, t, r) {
|
|
3039
|
+
t === void 0 && (t = 200), r === void 0 && (r = "easeOut");
|
|
3040
|
+
var n = e.transformState, i = e.wrapperComponent, a = e.contentComponent;
|
|
3041
|
+
if (i && a) {
|
|
3042
|
+
var s = Dr(o || n.scale, i, a);
|
|
3043
|
+
xe(e, s, t, r);
|
|
1007
3044
|
}
|
|
1008
3045
|
};
|
|
1009
|
-
},
|
|
1010
|
-
return function(o,
|
|
1011
|
-
r === void 0 && (r = 600), n === void 0 && (n = "easeOut"),
|
|
1012
|
-
var
|
|
1013
|
-
if (
|
|
1014
|
-
var s =
|
|
1015
|
-
|
|
3046
|
+
}, ds = function(e) {
|
|
3047
|
+
return function(o, t, r, n) {
|
|
3048
|
+
r === void 0 && (r = 600), n === void 0 && (n = "easeOut"), fe(e);
|
|
3049
|
+
var i = e.wrapperComponent, a = typeof o == "string" ? document.getElementById(o) : o;
|
|
3050
|
+
if (i && a && i.contains(a)) {
|
|
3051
|
+
var s = is(e, a, t);
|
|
3052
|
+
xe(e, s, r, n);
|
|
1016
3053
|
}
|
|
1017
3054
|
};
|
|
1018
|
-
},
|
|
3055
|
+
}, At = function(e) {
|
|
1019
3056
|
return {
|
|
1020
|
-
instance:
|
|
1021
|
-
zoomIn:
|
|
1022
|
-
zoomOut:
|
|
1023
|
-
setTransform:
|
|
1024
|
-
resetTransform:
|
|
1025
|
-
centerView:
|
|
1026
|
-
zoomToElement:
|
|
3057
|
+
instance: e,
|
|
3058
|
+
zoomIn: as(e),
|
|
3059
|
+
zoomOut: ss(e),
|
|
3060
|
+
setTransform: ls(e),
|
|
3061
|
+
resetTransform: us(e),
|
|
3062
|
+
centerView: ps(e),
|
|
3063
|
+
zoomToElement: ds(e)
|
|
1027
3064
|
};
|
|
1028
|
-
},
|
|
3065
|
+
}, fs = function(e) {
|
|
1029
3066
|
return {
|
|
1030
|
-
instance:
|
|
1031
|
-
state:
|
|
3067
|
+
instance: e,
|
|
3068
|
+
state: e.transformState
|
|
1032
3069
|
};
|
|
1033
|
-
},
|
|
3070
|
+
}, _ = function(e) {
|
|
1034
3071
|
var o = {};
|
|
1035
|
-
return Object.assign(o,
|
|
1036
|
-
},
|
|
1037
|
-
function
|
|
3072
|
+
return Object.assign(o, fs(e)), Object.assign(o, At(e)), o;
|
|
3073
|
+
}, Ut = !1;
|
|
3074
|
+
function qt() {
|
|
1038
3075
|
try {
|
|
1039
|
-
var
|
|
3076
|
+
var e = {
|
|
1040
3077
|
get passive() {
|
|
1041
|
-
return
|
|
3078
|
+
return Ut = !0, !1;
|
|
1042
3079
|
}
|
|
1043
3080
|
};
|
|
1044
|
-
return
|
|
3081
|
+
return e;
|
|
1045
3082
|
} catch {
|
|
1046
|
-
return
|
|
3083
|
+
return Ut = !1, Ut;
|
|
1047
3084
|
}
|
|
1048
3085
|
}
|
|
1049
|
-
var
|
|
1050
|
-
var
|
|
1051
|
-
return
|
|
3086
|
+
var zt = function(e, o) {
|
|
3087
|
+
var t = e.tagName.toUpperCase(), r = o.find(function(i) {
|
|
3088
|
+
return i.toUpperCase() === t;
|
|
1052
3089
|
});
|
|
1053
3090
|
if (r)
|
|
1054
3091
|
return !0;
|
|
1055
|
-
var n = o.find(function(
|
|
1056
|
-
return
|
|
3092
|
+
var n = o.find(function(i) {
|
|
3093
|
+
return e.classList.contains(i);
|
|
1057
3094
|
});
|
|
1058
3095
|
return !!n;
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1061
|
-
},
|
|
1062
|
-
return "translate(".concat(
|
|
1063
|
-
},
|
|
1064
|
-
var r =
|
|
3096
|
+
}, It = function(e) {
|
|
3097
|
+
e && clearTimeout(e);
|
|
3098
|
+
}, cs = function(e, o, t) {
|
|
3099
|
+
return "translate(".concat(e, "px, ").concat(o, "px) scale(").concat(t, ")");
|
|
3100
|
+
}, Dr = function(e, o, t) {
|
|
3101
|
+
var r = t.offsetWidth * e, n = t.offsetHeight * e, i = (o.offsetWidth - r) / 2, a = (o.offsetHeight - n) / 2;
|
|
1065
3102
|
return {
|
|
1066
|
-
scale:
|
|
1067
|
-
positionX:
|
|
1068
|
-
positionY:
|
|
3103
|
+
scale: e,
|
|
3104
|
+
positionX: i,
|
|
3105
|
+
positionY: a
|
|
1069
3106
|
};
|
|
1070
3107
|
};
|
|
1071
|
-
function
|
|
3108
|
+
function vs(e) {
|
|
1072
3109
|
return function(o) {
|
|
1073
|
-
|
|
1074
|
-
typeof
|
|
3110
|
+
e.forEach(function(t) {
|
|
3111
|
+
typeof t == "function" ? t(o) : t != null && (t.current = o);
|
|
1075
3112
|
});
|
|
1076
3113
|
};
|
|
1077
3114
|
}
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1080
|
-
if (!
|
|
3115
|
+
var ms = function(e, o) {
|
|
3116
|
+
var t = e.setup.wheel, r = t.disabled, n = t.wheelDisabled, i = t.touchPadDisabled, a = t.excluded, s = e.isInitialized, u = e.isPanning, d = o.target, p = s && !u && !r && d;
|
|
3117
|
+
if (!p || n && !o.ctrlKey || i && o.ctrlKey)
|
|
1081
3118
|
return !1;
|
|
1082
|
-
var f =
|
|
3119
|
+
var f = zt(d, a);
|
|
1083
3120
|
return !f;
|
|
1084
|
-
},
|
|
1085
|
-
return
|
|
3121
|
+
}, hs = function(e) {
|
|
3122
|
+
return e ? e.deltaY < 0 ? 1 : -1 : 0;
|
|
1086
3123
|
};
|
|
1087
|
-
function
|
|
1088
|
-
var
|
|
3124
|
+
function gs(e, o) {
|
|
3125
|
+
var t = hs(e), r = Ra(o, t);
|
|
1089
3126
|
return r;
|
|
1090
3127
|
}
|
|
1091
|
-
function
|
|
1092
|
-
var r = o.getBoundingClientRect(), n = 0,
|
|
1093
|
-
if ("clientX" in
|
|
1094
|
-
n = (
|
|
3128
|
+
function Nr(e, o, t) {
|
|
3129
|
+
var r = o.getBoundingClientRect(), n = 0, i = 0;
|
|
3130
|
+
if ("clientX" in e)
|
|
3131
|
+
n = (e.clientX - r.left) / t, i = (e.clientY - r.top) / t;
|
|
1095
3132
|
else {
|
|
1096
|
-
var
|
|
1097
|
-
n = (
|
|
3133
|
+
var a = e.touches[0];
|
|
3134
|
+
n = (a.clientX - r.left) / t, i = (a.clientY - r.top) / t;
|
|
1098
3135
|
}
|
|
1099
|
-
return (Number.isNaN(n) || Number.isNaN(
|
|
3136
|
+
return (Number.isNaN(n) || Number.isNaN(i)) && console.error("No mouse or touch offset found"), {
|
|
1100
3137
|
x: n,
|
|
1101
|
-
y:
|
|
3138
|
+
y: i
|
|
1102
3139
|
};
|
|
1103
3140
|
}
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1106
|
-
if (!
|
|
3141
|
+
var bs = function(e, o, t, r, n) {
|
|
3142
|
+
var i = e.transformState.scale, a = e.wrapperComponent, s = e.setup, u = s.maxScale, d = s.minScale, p = s.zoomAnimation, f = s.disablePadding, c = p.size, v = p.disabled;
|
|
3143
|
+
if (!a)
|
|
1107
3144
|
throw new Error("Wrapper is not mounted");
|
|
1108
|
-
var
|
|
3145
|
+
var h = i + o * t;
|
|
1109
3146
|
if (n)
|
|
1110
|
-
return
|
|
1111
|
-
var
|
|
3147
|
+
return h;
|
|
3148
|
+
var m = r ? !1 : !v, g = lt(te(h, 3), d, u, c, m && !f);
|
|
1112
3149
|
return g;
|
|
1113
|
-
},
|
|
1114
|
-
var
|
|
1115
|
-
return
|
|
1116
|
-
},
|
|
1117
|
-
var
|
|
3150
|
+
}, ys = function(e, o) {
|
|
3151
|
+
var t = e.previousWheelEvent, r = e.transformState.scale, n = e.setup, i = n.maxScale, a = n.minScale;
|
|
3152
|
+
return t ? r < i || r > a || Math.sign(t.deltaY) !== Math.sign(o.deltaY) || t.deltaY > 0 && t.deltaY < o.deltaY || t.deltaY < 0 && t.deltaY > o.deltaY || Math.sign(t.deltaY) !== Math.sign(o.deltaY) : !1;
|
|
3153
|
+
}, ws = function(e, o) {
|
|
3154
|
+
var t = e.setup.pinch, r = t.disabled, n = t.excluded, i = e.isInitialized, a = o.target, s = i && !r && a;
|
|
1118
3155
|
if (!s)
|
|
1119
3156
|
return !1;
|
|
1120
|
-
var
|
|
1121
|
-
return !
|
|
1122
|
-
},
|
|
1123
|
-
var o =
|
|
3157
|
+
var u = zt(a, n);
|
|
3158
|
+
return !u;
|
|
3159
|
+
}, Ps = function(e) {
|
|
3160
|
+
var o = e.setup.pinch.disabled, t = e.isInitialized, r = e.pinchStartDistance, n = t && !o && r;
|
|
1124
3161
|
return !!n;
|
|
1125
|
-
},
|
|
1126
|
-
var r =
|
|
3162
|
+
}, Ts = function(e, o, t) {
|
|
3163
|
+
var r = t.getBoundingClientRect(), n = e.touches, i = te(n[0].clientX - r.left, 5), a = te(n[0].clientY - r.top, 5), s = te(n[1].clientX - r.left, 5), u = te(n[1].clientY - r.top, 5);
|
|
1127
3164
|
return {
|
|
1128
|
-
x: (
|
|
1129
|
-
y: (
|
|
3165
|
+
x: (i + s) / 2 / o,
|
|
3166
|
+
y: (a + u) / 2 / o
|
|
1130
3167
|
};
|
|
1131
|
-
},
|
|
1132
|
-
return Math.sqrt(Math.pow(
|
|
1133
|
-
},
|
|
1134
|
-
var
|
|
1135
|
-
if (!
|
|
3168
|
+
}, Mr = function(e) {
|
|
3169
|
+
return Math.sqrt(Math.pow(e.touches[0].pageX - e.touches[1].pageX, 2) + Math.pow(e.touches[0].pageY - e.touches[1].pageY, 2));
|
|
3170
|
+
}, Cs = function(e, o) {
|
|
3171
|
+
var t = e.pinchStartScale, r = e.pinchStartDistance, n = e.setup, i = n.maxScale, a = n.minScale, s = n.zoomAnimation, u = n.disablePadding, d = s.size, p = s.disabled;
|
|
3172
|
+
if (!t || r === null || !o)
|
|
1136
3173
|
throw new Error("Pinch touches distance was not provided");
|
|
1137
3174
|
if (o < 0)
|
|
1138
|
-
return
|
|
1139
|
-
var f = o / r,
|
|
1140
|
-
return
|
|
1141
|
-
},
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
},
|
|
1145
|
-
var
|
|
1146
|
-
if (!
|
|
3175
|
+
return e.transformState.scale;
|
|
3176
|
+
var f = o / r, c = f * t;
|
|
3177
|
+
return lt(te(c, 2), a, i, d, !p && !u);
|
|
3178
|
+
}, Ss = 160, Os = 100, Es = function(e, o) {
|
|
3179
|
+
var t = e.props, r = t.onWheelStart, n = t.onZoomStart;
|
|
3180
|
+
e.wheelStopEventTimer || (fe(e), $(_(e), o, r), $(_(e), o, n));
|
|
3181
|
+
}, xs = function(e, o) {
|
|
3182
|
+
var t = e.props, r = t.onWheel, n = t.onZoom, i = e.contentComponent, a = e.setup, s = e.transformState, u = s.scale, d = a.limitToBounds, p = a.centerZoomedOut, f = a.zoomAnimation, c = a.wheel, v = a.disablePadding, h = a.smooth, m = f.size, g = f.disabled, w = c.step, S = c.smoothStep;
|
|
3183
|
+
if (!i)
|
|
1147
3184
|
throw new Error("Component not mounted");
|
|
1148
3185
|
o.preventDefault(), o.stopPropagation();
|
|
1149
|
-
var
|
|
1150
|
-
if (
|
|
1151
|
-
var
|
|
1152
|
-
|
|
3186
|
+
var y = gs(o, null), b = h ? S * Math.abs(o.deltaY) : w, P = bs(e, y, b, !o.ctrlKey);
|
|
3187
|
+
if (u !== P) {
|
|
3188
|
+
var C = je(e, P), O = Nr(o, i, u), D = g || m === 0 || p || v, x = d && D, R = kt(e, O.x, O.y, P, C, x), M = R.x, B = R.y;
|
|
3189
|
+
e.previousWheelEvent = o, e.setTransformState(P, M, B), $(_(e), o, r), $(_(e), o, n);
|
|
1153
3190
|
}
|
|
1154
|
-
},
|
|
1155
|
-
var
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
},
|
|
1159
|
-
var
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
},
|
|
1163
|
-
},
|
|
1164
|
-
var
|
|
1165
|
-
|
|
1166
|
-
},
|
|
1167
|
-
var
|
|
1168
|
-
if (!(r === null || !
|
|
1169
|
-
var f =
|
|
3191
|
+
}, Rs = function(e, o) {
|
|
3192
|
+
var t = e.props, r = t.onWheelStop, n = t.onZoomStop;
|
|
3193
|
+
It(e.wheelAnimationTimer), e.wheelAnimationTimer = setTimeout(function() {
|
|
3194
|
+
e.mounted && (Or(e, o.x, o.y), e.wheelAnimationTimer = null);
|
|
3195
|
+
}, Os);
|
|
3196
|
+
var i = ys(e, o);
|
|
3197
|
+
i && (It(e.wheelStopEventTimer), e.wheelStopEventTimer = setTimeout(function() {
|
|
3198
|
+
e.mounted && (e.wheelStopEventTimer = null, $(_(e), o, r), $(_(e), o, n));
|
|
3199
|
+
}, Ss));
|
|
3200
|
+
}, As = function(e, o) {
|
|
3201
|
+
var t = Mr(o);
|
|
3202
|
+
e.pinchStartDistance = t, e.lastDistance = t, e.pinchStartScale = e.transformState.scale, e.isPanning = !1, fe(e);
|
|
3203
|
+
}, Ds = function(e, o) {
|
|
3204
|
+
var t = e.contentComponent, r = e.pinchStartDistance, n = e.transformState.scale, i = e.setup, a = i.limitToBounds, s = i.centerZoomedOut, u = i.zoomAnimation, d = u.disabled, p = u.size;
|
|
3205
|
+
if (!(r === null || !t)) {
|
|
3206
|
+
var f = Ts(o, n, t);
|
|
1170
3207
|
if (!(!Number.isFinite(f.x) || !Number.isFinite(f.y))) {
|
|
1171
|
-
var
|
|
1172
|
-
if (
|
|
1173
|
-
var
|
|
1174
|
-
|
|
3208
|
+
var c = Mr(o), v = Cs(e, c);
|
|
3209
|
+
if (v !== n) {
|
|
3210
|
+
var h = je(e, v), m = d || p === 0 || s, g = a && m, w = kt(e, f.x, f.y, v, h, g), S = w.x, y = w.y;
|
|
3211
|
+
e.pinchMidpoint = f, e.lastDistance = c, e.setTransformState(v, S, y);
|
|
1175
3212
|
}
|
|
1176
3213
|
}
|
|
1177
3214
|
}
|
|
1178
|
-
},
|
|
1179
|
-
var o =
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1182
|
-
var
|
|
1183
|
-
|
|
1184
|
-
|
|
3215
|
+
}, Ns = function(e) {
|
|
3216
|
+
var o = e.pinchMidpoint;
|
|
3217
|
+
e.velocity = null, e.lastDistance = null, e.pinchMidpoint = null, e.pinchStartScale = null, e.pinchStartDistance = null, Or(e, o == null ? void 0 : o.x, o == null ? void 0 : o.y);
|
|
3218
|
+
}, _r = function(e, o) {
|
|
3219
|
+
var t = e.props.onZoomStop, r = e.setup.doubleClick.animationTime;
|
|
3220
|
+
It(e.doubleClickStopEventTimer), e.doubleClickStopEventTimer = setTimeout(function() {
|
|
3221
|
+
e.doubleClickStopEventTimer = null, $(_(e), o, t);
|
|
1185
3222
|
}, r);
|
|
1186
|
-
},
|
|
1187
|
-
var
|
|
1188
|
-
|
|
1189
|
-
return
|
|
1190
|
-
}),
|
|
3223
|
+
}, Ms = function(e, o) {
|
|
3224
|
+
var t = e.props, r = t.onZoomStart, n = t.onZoom, i = e.setup.doubleClick, a = i.animationTime, s = i.animationType;
|
|
3225
|
+
$(_(e), o, r), Ar(e, a, s, function() {
|
|
3226
|
+
return $(_(e), o, n);
|
|
3227
|
+
}), _r(e, o);
|
|
1191
3228
|
};
|
|
1192
|
-
function
|
|
1193
|
-
var
|
|
3229
|
+
function _s(e, o) {
|
|
3230
|
+
var t = e.setup, r = e.doubleClickStopEventTimer, n = e.transformState, i = e.contentComponent, a = n.scale, s = e.props, u = s.onZoomStart, d = s.onZoom, p = t.doubleClick, f = p.disabled, c = p.mode, v = p.step, h = p.animationTime, m = p.animationType;
|
|
1194
3231
|
if (!f && !r) {
|
|
1195
|
-
if (
|
|
1196
|
-
return
|
|
1197
|
-
if (!
|
|
3232
|
+
if (c === "reset")
|
|
3233
|
+
return Ms(e, o);
|
|
3234
|
+
if (!i)
|
|
1198
3235
|
return console.error("No ContentComponent found");
|
|
1199
|
-
var g =
|
|
1200
|
-
if (
|
|
1201
|
-
|
|
1202
|
-
var
|
|
1203
|
-
if (!
|
|
3236
|
+
var g = c === "zoomOut" ? -1 : 1, w = xr(e, g, v);
|
|
3237
|
+
if (a !== w) {
|
|
3238
|
+
$(_(e), o, u);
|
|
3239
|
+
var S = Nr(o, i, a), y = mo(e, w, S.x, S.y);
|
|
3240
|
+
if (!y)
|
|
1204
3241
|
return console.error("Error during zoom event. New transformation state was not calculated.");
|
|
1205
|
-
|
|
3242
|
+
$(_(e), o, d), xe(e, y, h, m), _r(e, o);
|
|
1206
3243
|
}
|
|
1207
3244
|
}
|
|
1208
3245
|
}
|
|
1209
|
-
var
|
|
1210
|
-
var
|
|
1211
|
-
if (!
|
|
3246
|
+
var Ws = function(e, o) {
|
|
3247
|
+
var t = e.isInitialized, r = e.setup, n = e.wrapperComponent, i = r.doubleClick, a = i.disabled, s = i.excluded, u = o.target, d = n == null ? void 0 : n.contains(u), p = t && u && d && !a;
|
|
3248
|
+
if (!p)
|
|
1212
3249
|
return !1;
|
|
1213
|
-
var f =
|
|
3250
|
+
var f = zt(u, s);
|
|
1214
3251
|
return !f;
|
|
1215
|
-
},
|
|
3252
|
+
}, Ys = (
|
|
1216
3253
|
/** @class */
|
|
1217
3254
|
function() {
|
|
1218
|
-
function
|
|
1219
|
-
var
|
|
3255
|
+
function e(o) {
|
|
3256
|
+
var t = this;
|
|
1220
3257
|
this.mounted = !0, this.onChangeCallbacks = /* @__PURE__ */ new Set(), this.onInitCallbacks = /* @__PURE__ */ new Set(), this.wrapperComponent = null, this.contentComponent = null, this.isInitialized = !1, this.bounds = null, this.previousWheelEvent = null, this.wheelStopEventTimer = null, this.wheelAnimationTimer = null, this.isPanning = !1, this.startCoords = null, this.lastTouch = null, this.distance = null, this.lastDistance = null, this.pinchStartDistance = null, this.pinchStartScale = null, this.pinchMidpoint = null, this.doubleClickStopEventTimer = null, this.velocity = null, this.velocityTime = null, this.lastMousePosition = null, this.animate = !1, this.animation = null, this.maxBounds = null, this.pressedKeys = {}, this.mount = function() {
|
|
1221
|
-
|
|
3258
|
+
t.initializeWindowEvents();
|
|
1222
3259
|
}, this.unmount = function() {
|
|
1223
|
-
|
|
3260
|
+
t.cleanupWindowEvents();
|
|
1224
3261
|
}, this.update = function(r) {
|
|
1225
|
-
|
|
3262
|
+
je(t, t.transformState.scale), t.setup = Ko(r);
|
|
1226
3263
|
}, this.initializeWindowEvents = function() {
|
|
1227
|
-
var r, n =
|
|
1228
|
-
|
|
3264
|
+
var r, n = qt(), i = (r = t.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, a = i == null ? void 0 : i.defaultView;
|
|
3265
|
+
a == null || a.addEventListener("mousedown", t.onPanningStart, n), a == null || a.addEventListener("mousemove", t.onPanning, n), a == null || a.addEventListener("mouseup", t.onPanningStop, n), i == null || i.addEventListener("mouseleave", t.clearPanning, n), a == null || a.addEventListener("keyup", t.setKeyUnPressed, n), a == null || a.addEventListener("keydown", t.setKeyPressed, n);
|
|
1229
3266
|
}, this.cleanupWindowEvents = function() {
|
|
1230
|
-
var r, n,
|
|
1231
|
-
s == null || s.removeEventListener("mousedown",
|
|
3267
|
+
var r, n, i = qt(), a = (r = t.wrapperComponent) === null || r === void 0 ? void 0 : r.ownerDocument, s = a == null ? void 0 : a.defaultView;
|
|
3268
|
+
s == null || s.removeEventListener("mousedown", t.onPanningStart, i), s == null || s.removeEventListener("mousemove", t.onPanning, i), s == null || s.removeEventListener("mouseup", t.onPanningStop, i), a == null || a.removeEventListener("mouseleave", t.clearPanning, i), s == null || s.removeEventListener("keyup", t.setKeyUnPressed, i), s == null || s.removeEventListener("keydown", t.setKeyPressed, i), document.removeEventListener("mouseleave", t.clearPanning, i), fe(t), (n = t.observer) === null || n === void 0 || n.disconnect();
|
|
1232
3269
|
}, this.handleInitializeWrapperEvents = function(r) {
|
|
1233
|
-
var n =
|
|
1234
|
-
r.addEventListener("wheel",
|
|
3270
|
+
var n = qt();
|
|
3271
|
+
r.addEventListener("wheel", t.onWheelZoom, n), r.addEventListener("dblclick", t.onDoubleClick, n), r.addEventListener("touchstart", t.onTouchPanningStart, n), r.addEventListener("touchmove", t.onTouchPanning, n), r.addEventListener("touchend", t.onTouchPanningStop, n);
|
|
1235
3272
|
}, this.handleInitialize = function(r) {
|
|
1236
|
-
var n =
|
|
1237
|
-
|
|
1238
|
-
return
|
|
1239
|
-
}), n && (
|
|
1240
|
-
var
|
|
1241
|
-
|
|
1242
|
-
return
|
|
1243
|
-
}),
|
|
1244
|
-
}),
|
|
3273
|
+
var n = t.setup.centerOnInit;
|
|
3274
|
+
t.applyTransformation(), t.onInitCallbacks.forEach(function(i) {
|
|
3275
|
+
return i(_(t));
|
|
3276
|
+
}), n && (t.setCenter(), t.observer = new ResizeObserver(function() {
|
|
3277
|
+
var i;
|
|
3278
|
+
t.onInitCallbacks.forEach(function(a) {
|
|
3279
|
+
return a(_(t));
|
|
3280
|
+
}), t.setCenter(), (i = t.observer) === null || i === void 0 || i.disconnect();
|
|
3281
|
+
}), t.observer.observe(r));
|
|
1245
3282
|
}, this.onWheelZoom = function(r) {
|
|
1246
|
-
var n =
|
|
3283
|
+
var n = t.setup.disabled;
|
|
1247
3284
|
if (!n) {
|
|
1248
|
-
var
|
|
1249
|
-
if (
|
|
1250
|
-
var
|
|
1251
|
-
|
|
3285
|
+
var i = ms(t, r);
|
|
3286
|
+
if (i) {
|
|
3287
|
+
var a = t.isPressingKeys(t.setup.wheel.activationKeys);
|
|
3288
|
+
a && (Es(t, r), xs(t, r), Rs(t, r));
|
|
1252
3289
|
}
|
|
1253
3290
|
}
|
|
1254
3291
|
}, this.onPanningStart = function(r) {
|
|
1255
|
-
var n =
|
|
3292
|
+
var n = t.setup.disabled, i = t.props.onPanningStart;
|
|
1256
3293
|
if (!n) {
|
|
1257
|
-
var
|
|
1258
|
-
if (
|
|
1259
|
-
var s =
|
|
1260
|
-
s && (r.preventDefault(), r.stopPropagation(),
|
|
3294
|
+
var a = Vo(t, r);
|
|
3295
|
+
if (a) {
|
|
3296
|
+
var s = t.isPressingKeys(t.setup.panning.activationKeys);
|
|
3297
|
+
s && (r.preventDefault(), r.stopPropagation(), fe(t), Zo(t, r), $(_(t), r, i));
|
|
1261
3298
|
}
|
|
1262
3299
|
}
|
|
1263
3300
|
}, this.onPanning = function(r) {
|
|
1264
|
-
var n =
|
|
3301
|
+
var n = t.setup.disabled, i = t.props.onPanning;
|
|
1265
3302
|
if (!n) {
|
|
1266
|
-
var
|
|
1267
|
-
if (
|
|
1268
|
-
var s =
|
|
1269
|
-
s && (r.preventDefault(), r.stopPropagation(),
|
|
3303
|
+
var a = Ho(t);
|
|
3304
|
+
if (a) {
|
|
3305
|
+
var s = t.isPressingKeys(t.setup.panning.activationKeys);
|
|
3306
|
+
s && (r.preventDefault(), r.stopPropagation(), Uo(t, r.clientX, r.clientY), $(_(t), r, i));
|
|
1270
3307
|
}
|
|
1271
3308
|
}
|
|
1272
3309
|
}, this.onPanningStop = function(r) {
|
|
1273
|
-
var n =
|
|
1274
|
-
|
|
3310
|
+
var n = t.props.onPanningStop;
|
|
3311
|
+
t.isPanning && (rs(t), $(_(t), r, n));
|
|
1275
3312
|
}, this.onPinchStart = function(r) {
|
|
1276
|
-
var n =
|
|
3313
|
+
var n = t.setup.disabled, i = t.props, a = i.onPinchingStart, s = i.onZoomStart;
|
|
1277
3314
|
if (!n) {
|
|
1278
|
-
var
|
|
1279
|
-
|
|
3315
|
+
var u = ws(t, r);
|
|
3316
|
+
u && (As(t, r), fe(t), $(_(t), r, a), $(_(t), r, s));
|
|
1280
3317
|
}
|
|
1281
3318
|
}, this.onPinch = function(r) {
|
|
1282
|
-
var n =
|
|
3319
|
+
var n = t.setup.disabled, i = t.props, a = i.onPinching, s = i.onZoom;
|
|
1283
3320
|
if (!n) {
|
|
1284
|
-
var
|
|
1285
|
-
|
|
3321
|
+
var u = Ps(t);
|
|
3322
|
+
u && (r.preventDefault(), r.stopPropagation(), Ds(t, r), $(_(t), r, a), $(_(t), r, s));
|
|
1286
3323
|
}
|
|
1287
3324
|
}, this.onPinchStop = function(r) {
|
|
1288
|
-
var n =
|
|
1289
|
-
|
|
3325
|
+
var n = t.props, i = n.onPinchingStop, a = n.onZoomStop;
|
|
3326
|
+
t.pinchStartScale && (Ns(t), $(_(t), r, i), $(_(t), r, a));
|
|
1290
3327
|
}, this.onTouchPanningStart = function(r) {
|
|
1291
|
-
var n =
|
|
3328
|
+
var n = t.setup.disabled, i = t.props.onPanningStart;
|
|
1292
3329
|
if (!n) {
|
|
1293
|
-
var
|
|
1294
|
-
if (
|
|
1295
|
-
var s =
|
|
3330
|
+
var a = Vo(t, r);
|
|
3331
|
+
if (a) {
|
|
3332
|
+
var s = t.lastTouch && +/* @__PURE__ */ new Date() - t.lastTouch < 200;
|
|
1296
3333
|
if (s && r.touches.length === 1)
|
|
1297
|
-
|
|
3334
|
+
t.onDoubleClick(r);
|
|
1298
3335
|
else {
|
|
1299
|
-
|
|
1300
|
-
var
|
|
1301
|
-
d && (
|
|
3336
|
+
t.lastTouch = +/* @__PURE__ */ new Date(), fe(t);
|
|
3337
|
+
var u = r.touches, d = u.length === 1, p = u.length === 2;
|
|
3338
|
+
d && (fe(t), Zo(t, r), $(_(t), r, i)), p && t.onPinchStart(r);
|
|
1302
3339
|
}
|
|
1303
3340
|
}
|
|
1304
3341
|
}
|
|
1305
3342
|
}, this.onTouchPanning = function(r) {
|
|
1306
|
-
var n =
|
|
1307
|
-
if (
|
|
3343
|
+
var n = t.setup.disabled, i = t.props.onPanning;
|
|
3344
|
+
if (t.isPanning && r.touches.length === 1) {
|
|
1308
3345
|
if (n)
|
|
1309
3346
|
return;
|
|
1310
|
-
var
|
|
1311
|
-
if (!
|
|
3347
|
+
var a = Ho(t);
|
|
3348
|
+
if (!a)
|
|
1312
3349
|
return;
|
|
1313
3350
|
r.preventDefault(), r.stopPropagation();
|
|
1314
3351
|
var s = r.touches[0];
|
|
1315
|
-
|
|
3352
|
+
Uo(t, s.clientX, s.clientY), $(_(t), r, i);
|
|
1316
3353
|
} else
|
|
1317
|
-
r.touches.length > 1 &&
|
|
3354
|
+
r.touches.length > 1 && t.onPinch(r);
|
|
1318
3355
|
}, this.onTouchPanningStop = function(r) {
|
|
1319
|
-
|
|
3356
|
+
t.onPanningStop(r), t.onPinchStop(r);
|
|
1320
3357
|
}, this.onDoubleClick = function(r) {
|
|
1321
|
-
var n =
|
|
3358
|
+
var n = t.setup.disabled;
|
|
1322
3359
|
if (!n) {
|
|
1323
|
-
var
|
|
1324
|
-
|
|
3360
|
+
var i = Ws(t, r);
|
|
3361
|
+
i && _s(t, r);
|
|
1325
3362
|
}
|
|
1326
3363
|
}, this.clearPanning = function(r) {
|
|
1327
|
-
|
|
3364
|
+
t.isPanning && t.onPanningStop(r);
|
|
1328
3365
|
}, this.setKeyPressed = function(r) {
|
|
1329
|
-
|
|
3366
|
+
t.pressedKeys[r.key] = !0;
|
|
1330
3367
|
}, this.setKeyUnPressed = function(r) {
|
|
1331
|
-
|
|
3368
|
+
t.pressedKeys[r.key] = !1;
|
|
1332
3369
|
}, this.isPressingKeys = function(r) {
|
|
1333
3370
|
return r.length ? !!r.find(function(n) {
|
|
1334
|
-
return
|
|
3371
|
+
return t.pressedKeys[n];
|
|
1335
3372
|
}) : !0;
|
|
1336
|
-
}, this.setTransformState = function(r, n,
|
|
1337
|
-
var
|
|
1338
|
-
if (!Number.isNaN(r) && !Number.isNaN(n) && !Number.isNaN(
|
|
1339
|
-
r !==
|
|
1340
|
-
var s =
|
|
1341
|
-
|
|
1342
|
-
return
|
|
1343
|
-
}),
|
|
3373
|
+
}, this.setTransformState = function(r, n, i) {
|
|
3374
|
+
var a = t.props.onTransformed;
|
|
3375
|
+
if (!Number.isNaN(r) && !Number.isNaN(n) && !Number.isNaN(i)) {
|
|
3376
|
+
r !== t.transformState.scale && (t.transformState.previousScale = t.transformState.scale, t.transformState.scale = r), t.transformState.positionX = n, t.transformState.positionY = i, t.applyTransformation();
|
|
3377
|
+
var s = _(t);
|
|
3378
|
+
t.onChangeCallbacks.forEach(function(u) {
|
|
3379
|
+
return u(s);
|
|
3380
|
+
}), $(s, { scale: r, positionX: n, positionY: i }, a);
|
|
1344
3381
|
} else
|
|
1345
3382
|
console.error("Detected NaN set state values");
|
|
1346
3383
|
}, this.setCenter = function() {
|
|
1347
|
-
if (
|
|
1348
|
-
var r =
|
|
1349
|
-
|
|
3384
|
+
if (t.wrapperComponent && t.contentComponent) {
|
|
3385
|
+
var r = Dr(t.transformState.scale, t.wrapperComponent, t.contentComponent);
|
|
3386
|
+
t.setTransformState(r.scale, r.positionX, r.positionY);
|
|
1350
3387
|
}
|
|
1351
|
-
}, this.handleTransformStyles = function(r, n,
|
|
1352
|
-
return
|
|
3388
|
+
}, this.handleTransformStyles = function(r, n, i) {
|
|
3389
|
+
return t.props.customTransform ? t.props.customTransform(r, n, i) : cs(r, n, i);
|
|
1353
3390
|
}, this.applyTransformation = function() {
|
|
1354
|
-
if (!(!
|
|
1355
|
-
var r =
|
|
1356
|
-
|
|
3391
|
+
if (!(!t.mounted || !t.contentComponent)) {
|
|
3392
|
+
var r = t.transformState, n = r.scale, i = r.positionX, a = r.positionY, s = t.handleTransformStyles(i, a, n);
|
|
3393
|
+
t.contentComponent.style.transform = s;
|
|
1357
3394
|
}
|
|
1358
3395
|
}, this.getContext = function() {
|
|
1359
|
-
return
|
|
3396
|
+
return _(t);
|
|
1360
3397
|
}, this.onChange = function(r) {
|
|
1361
|
-
return
|
|
1362
|
-
|
|
3398
|
+
return t.onChangeCallbacks.has(r) || t.onChangeCallbacks.add(r), function() {
|
|
3399
|
+
t.onChangeCallbacks.delete(r);
|
|
1363
3400
|
};
|
|
1364
3401
|
}, this.onInit = function(r) {
|
|
1365
|
-
return
|
|
1366
|
-
|
|
3402
|
+
return t.onInitCallbacks.has(r) || t.onInitCallbacks.add(r), function() {
|
|
3403
|
+
t.onInitCallbacks.delete(r);
|
|
1367
3404
|
};
|
|
1368
3405
|
}, this.init = function(r, n) {
|
|
1369
|
-
|
|
1370
|
-
var
|
|
1371
|
-
|
|
1372
|
-
}, this.props = o, this.setup =
|
|
3406
|
+
t.cleanupWindowEvents(), t.wrapperComponent = r, t.contentComponent = n, je(t, t.transformState.scale), t.handleInitializeWrapperEvents(r), t.handleInitialize(n), t.initializeWindowEvents(), t.isInitialized = !0;
|
|
3407
|
+
var i = _(t);
|
|
3408
|
+
$(i, void 0, t.props.onInit);
|
|
3409
|
+
}, this.props = o, this.setup = Ko(this.props), this.transformState = Er(this.props);
|
|
1373
3410
|
}
|
|
1374
|
-
return
|
|
3411
|
+
return e;
|
|
1375
3412
|
}()
|
|
1376
|
-
),
|
|
1377
|
-
return typeof
|
|
1378
|
-
},
|
|
1379
|
-
var
|
|
1380
|
-
return
|
|
1381
|
-
return
|
|
1382
|
-
}, [
|
|
1383
|
-
|
|
1384
|
-
}, [
|
|
3413
|
+
), Xt = Ne.createContext(null), $s = function(e, o) {
|
|
3414
|
+
return typeof e == "function" ? e(o) : e;
|
|
3415
|
+
}, Bs = Ne.forwardRef(function(e, o) {
|
|
3416
|
+
var t = Ot(new Ys(e)).current, r = $s(e.children, At(t));
|
|
3417
|
+
return Jr(o, function() {
|
|
3418
|
+
return At(t);
|
|
3419
|
+
}, [t]), _t(function() {
|
|
3420
|
+
t.update(e);
|
|
3421
|
+
}, [t, e]), Ne.createElement(Xt.Provider, { value: t }, r);
|
|
1385
3422
|
});
|
|
1386
|
-
|
|
1387
|
-
var
|
|
1388
|
-
return
|
|
3423
|
+
Ne.forwardRef(function(e, o) {
|
|
3424
|
+
var t = Ot(null), r = eo(Xt);
|
|
3425
|
+
return _t(function() {
|
|
1389
3426
|
return r.onChange(function(n) {
|
|
1390
|
-
if (
|
|
1391
|
-
var
|
|
1392
|
-
|
|
3427
|
+
if (t.current) {
|
|
3428
|
+
var i = 0, a = 0;
|
|
3429
|
+
t.current.style.transform = r.handleTransformStyles(i, a, 1 / n.instance.transformState.scale);
|
|
1393
3430
|
}
|
|
1394
3431
|
});
|
|
1395
|
-
}, [r]),
|
|
3432
|
+
}, [r]), Ne.createElement("div", Ce({}, e, { ref: vs([t, o]) }));
|
|
1396
3433
|
});
|
|
1397
|
-
function
|
|
3434
|
+
function ks(e, o) {
|
|
1398
3435
|
o === void 0 && (o = {});
|
|
1399
|
-
var
|
|
1400
|
-
if (!(!
|
|
3436
|
+
var t = o.insertAt;
|
|
3437
|
+
if (!(!e || typeof document > "u")) {
|
|
1401
3438
|
var r = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1402
|
-
n.type = "text/css",
|
|
3439
|
+
n.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(n, r.firstChild) : r.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1403
3440
|
}
|
|
1404
3441
|
}
|
|
1405
|
-
var
|
|
3442
|
+
var zs = `.transform-component-module_wrapper__SPB86 {
|
|
1406
3443
|
position: relative;
|
|
1407
3444
|
width: -moz-fit-content;
|
|
1408
3445
|
width: fit-content;
|
|
@@ -1432,55 +3469,32 @@ var ro = `.transform-component-module_wrapper__SPB86 {
|
|
|
1432
3469
|
.transform-component-module_content__FBWxo img {
|
|
1433
3470
|
pointer-events: none;
|
|
1434
3471
|
}
|
|
1435
|
-
`,
|
|
1436
|
-
|
|
1437
|
-
var
|
|
1438
|
-
var o =
|
|
1439
|
-
return
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1442
|
-
}, []),
|
|
3472
|
+
`, Qo = { wrapper: "transform-component-module_wrapper__SPB86", content: "transform-component-module_content__FBWxo" };
|
|
3473
|
+
ks(zs);
|
|
3474
|
+
var Xs = function(e) {
|
|
3475
|
+
var o = e.children, t = e.wrapperClass, r = t === void 0 ? "" : t, n = e.contentClass, i = n === void 0 ? "" : n, a = e.wrapperStyle, s = e.contentStyle, u = e.wrapperProps, d = u === void 0 ? {} : u, p = e.contentProps, f = p === void 0 ? {} : p, c = eo(Xt).init, v = Ot(null), h = Ot(null);
|
|
3476
|
+
return _t(function() {
|
|
3477
|
+
var m = v.current, g = h.current;
|
|
3478
|
+
m !== null && g !== null && c && c(m, g);
|
|
3479
|
+
}, []), Ne.createElement(
|
|
1443
3480
|
"div",
|
|
1444
|
-
|
|
1445
|
-
|
|
3481
|
+
Ce({}, d, { ref: v, className: "react-transform-wrapper ".concat(Qo.wrapper, " ").concat(r), style: a }),
|
|
3482
|
+
Ne.createElement("div", Ce({}, f, { ref: h, className: "react-transform-component ".concat(Qo.content, " ").concat(i), style: s }), o)
|
|
1446
3483
|
);
|
|
1447
|
-
},
|
|
1448
|
-
var
|
|
1449
|
-
if (!
|
|
3484
|
+
}, js = function() {
|
|
3485
|
+
var e = eo(Xt);
|
|
3486
|
+
if (!e)
|
|
1450
3487
|
throw new Error("Transform context must be placed inside TransformWrapper");
|
|
1451
|
-
return
|
|
1452
|
-
},
|
|
1453
|
-
var
|
|
1454
|
-
return
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
value: !0
|
|
1458
|
-
});
|
|
1459
|
-
var ae = yi.default = void 0, so = to(pi()), lo = ui, uo = (0, so.default)(/* @__PURE__ */ (0, lo.jsx)("path", {
|
|
1460
|
-
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
|
1461
|
-
}), "Add");
|
|
1462
|
-
ae = yi.default = uo;
|
|
1463
|
-
var Pi = {}, fo = vi;
|
|
1464
|
-
Object.defineProperty(Pi, "__esModule", {
|
|
1465
|
-
value: !0
|
|
1466
|
-
});
|
|
1467
|
-
var te = Pi.default = void 0, po = fo(pi()), vo = ui, mo = (0, po.default)(/* @__PURE__ */ (0, vo.jsx)("path", {
|
|
1468
|
-
d: "M19 13H5v-2h14v2z"
|
|
1469
|
-
}), "Remove");
|
|
1470
|
-
te = Pi.default = mo;
|
|
1471
|
-
var Ti = {}, co = vi;
|
|
1472
|
-
Object.defineProperty(Ti, "__esModule", {
|
|
1473
|
-
value: !0
|
|
1474
|
-
});
|
|
1475
|
-
var se = Ti.default = void 0, ho = co(pi()), go = ui, bo = (0, ho.default)(/* @__PURE__ */ (0, go.jsx)("path", {
|
|
1476
|
-
d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
|
|
1477
|
-
}), "Refresh");
|
|
1478
|
-
se = Ti.default = bo;
|
|
1479
|
-
const So = {
|
|
3488
|
+
return e;
|
|
3489
|
+
}, Ls = function() {
|
|
3490
|
+
var e = js();
|
|
3491
|
+
return At(e);
|
|
3492
|
+
};
|
|
3493
|
+
const Vs = {
|
|
1480
3494
|
position: "relative",
|
|
1481
3495
|
borderRadius: "1rem",
|
|
1482
3496
|
overflow: "hidden"
|
|
1483
|
-
},
|
|
3497
|
+
}, Hs = {
|
|
1484
3498
|
position: "absolute",
|
|
1485
3499
|
zIndex: 1,
|
|
1486
3500
|
right: "2rem",
|
|
@@ -1491,108 +3505,144 @@ const So = {
|
|
|
1491
3505
|
justifyContent: "flex-end",
|
|
1492
3506
|
backgroundColor: "#0F0E0E4D",
|
|
1493
3507
|
borderRadius: "5rem"
|
|
1494
|
-
},
|
|
3508
|
+
}, Tt = {
|
|
1495
3509
|
color: "white",
|
|
1496
3510
|
"&:focus": {
|
|
1497
3511
|
outline: "none"
|
|
1498
3512
|
}
|
|
1499
|
-
},
|
|
3513
|
+
}, Go = {
|
|
1500
3514
|
backgroundColor: "#0000000D",
|
|
1501
3515
|
height: "0.0625rem"
|
|
1502
|
-
},
|
|
1503
|
-
controllerContainerProps:
|
|
3516
|
+
}, Fs = ({
|
|
3517
|
+
controllerContainerProps: e,
|
|
1504
3518
|
zoomInButtonProps: o,
|
|
1505
|
-
zoomOutButtonProps:
|
|
3519
|
+
zoomOutButtonProps: t,
|
|
1506
3520
|
resetTransformButtonProps: r,
|
|
1507
|
-
dividerProps: n
|
|
3521
|
+
dividerProps: n,
|
|
3522
|
+
rotate: i,
|
|
3523
|
+
handleRotate: a,
|
|
3524
|
+
rotateButtonProps: s
|
|
1508
3525
|
}) => {
|
|
1509
|
-
const { zoomIn:
|
|
1510
|
-
function
|
|
1511
|
-
|
|
3526
|
+
const { zoomIn: u, zoomOut: d, resetTransform: p } = Ls();
|
|
3527
|
+
function f() {
|
|
3528
|
+
u();
|
|
1512
3529
|
}
|
|
1513
|
-
function
|
|
1514
|
-
|
|
3530
|
+
function c() {
|
|
3531
|
+
d();
|
|
1515
3532
|
}
|
|
3533
|
+
function v() {
|
|
3534
|
+
p();
|
|
3535
|
+
}
|
|
3536
|
+
const h = {
|
|
3537
|
+
...Tt,
|
|
3538
|
+
position: "absolute",
|
|
3539
|
+
zIndex: 1,
|
|
3540
|
+
right: "2rem",
|
|
3541
|
+
bottom: "10rem",
|
|
3542
|
+
background: i ? "white" : "#0F0E0E4D",
|
|
3543
|
+
color: i ? "black" : "white",
|
|
3544
|
+
padding: "0.55rem"
|
|
3545
|
+
};
|
|
3546
|
+
return /* @__PURE__ */ Ie(Zr, { children: [
|
|
3547
|
+
/* @__PURE__ */ N(wt, { title: "Rotate", placement: "left", children: /* @__PURE__ */ N(
|
|
3548
|
+
ht,
|
|
3549
|
+
{
|
|
3550
|
+
disableRipple: !0,
|
|
3551
|
+
disableFocusRipple: !0,
|
|
3552
|
+
"aria-label": "Rotate",
|
|
3553
|
+
onClick: a,
|
|
3554
|
+
sx: h,
|
|
3555
|
+
...s,
|
|
3556
|
+
children: /* @__PURE__ */ N(wr, {})
|
|
3557
|
+
}
|
|
3558
|
+
) }),
|
|
3559
|
+
/* @__PURE__ */ Ie(
|
|
3560
|
+
mr,
|
|
3561
|
+
{
|
|
3562
|
+
disableGutters: !0,
|
|
3563
|
+
sx: Hs,
|
|
3564
|
+
...e,
|
|
3565
|
+
children: [
|
|
3566
|
+
/* @__PURE__ */ N(wt, { title: "Zoom In", placement: "left", children: /* @__PURE__ */ N(
|
|
3567
|
+
ht,
|
|
3568
|
+
{
|
|
3569
|
+
disableRipple: !0,
|
|
3570
|
+
disableFocusRipple: !0,
|
|
3571
|
+
"aria-label": "Zoom In",
|
|
3572
|
+
onClick: f,
|
|
3573
|
+
sx: Tt,
|
|
3574
|
+
...o,
|
|
3575
|
+
children: /* @__PURE__ */ N(gr, {})
|
|
3576
|
+
}
|
|
3577
|
+
) }),
|
|
3578
|
+
/* @__PURE__ */ N(Lo, { sx: Go, ...n }),
|
|
3579
|
+
/* @__PURE__ */ N(wt, { title: "Zoom Out", placement: "left", children: /* @__PURE__ */ N(
|
|
3580
|
+
ht,
|
|
3581
|
+
{
|
|
3582
|
+
disableFocusRipple: !0,
|
|
3583
|
+
disableRipple: !0,
|
|
3584
|
+
"aria-label": "Zoom Out",
|
|
3585
|
+
onClick: c,
|
|
3586
|
+
sx: Tt,
|
|
3587
|
+
...t,
|
|
3588
|
+
children: /* @__PURE__ */ N(yr, {})
|
|
3589
|
+
}
|
|
3590
|
+
) }),
|
|
3591
|
+
/* @__PURE__ */ N(Lo, { sx: Go, ...n }),
|
|
3592
|
+
/* @__PURE__ */ N(wt, { title: "Reset", placement: "left", children: /* @__PURE__ */ N(
|
|
3593
|
+
ht,
|
|
3594
|
+
{
|
|
3595
|
+
disableFocusRipple: !0,
|
|
3596
|
+
disableRipple: !0,
|
|
3597
|
+
"aria-label": "Reset",
|
|
3598
|
+
onClick: v,
|
|
3599
|
+
sx: Tt,
|
|
3600
|
+
...r,
|
|
3601
|
+
children: /* @__PURE__ */ N(br, {})
|
|
3602
|
+
}
|
|
3603
|
+
) })
|
|
3604
|
+
]
|
|
3605
|
+
}
|
|
3606
|
+
)
|
|
3607
|
+
] });
|
|
3608
|
+
}, rl = ({
|
|
3609
|
+
children: e,
|
|
3610
|
+
parentContainerProps: o,
|
|
3611
|
+
zoomControllerProps: t,
|
|
3612
|
+
isRotatedByDefault: r,
|
|
3613
|
+
onRotate: n,
|
|
3614
|
+
...i
|
|
3615
|
+
}) => {
|
|
3616
|
+
const [a, s] = Ir(r ?? !1);
|
|
1516
3617
|
function u() {
|
|
1517
|
-
s();
|
|
3618
|
+
s((p) => !p);
|
|
1518
3619
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
3620
|
+
_t(() => {
|
|
3621
|
+
n == null || n(a);
|
|
3622
|
+
}, [a]);
|
|
3623
|
+
const d = {
|
|
3624
|
+
transform: a ? "rotate(90deg)" : "rotate(0deg)"
|
|
3625
|
+
};
|
|
3626
|
+
return /* @__PURE__ */ N(
|
|
3627
|
+
mr,
|
|
1521
3628
|
{
|
|
1522
3629
|
disableGutters: !0,
|
|
1523
|
-
sx:
|
|
1524
|
-
...
|
|
1525
|
-
children: [
|
|
1526
|
-
/* @__PURE__ */
|
|
1527
|
-
|
|
1528
|
-
{
|
|
1529
|
-
disableRipple: !0,
|
|
1530
|
-
disableFocusRipple: !0,
|
|
1531
|
-
"aria-label": "Zoom In",
|
|
1532
|
-
onClick: l,
|
|
1533
|
-
sx: ai,
|
|
1534
|
-
...o,
|
|
1535
|
-
children: /* @__PURE__ */ P(ae, {})
|
|
1536
|
-
}
|
|
1537
|
-
),
|
|
1538
|
-
/* @__PURE__ */ P(Wi, { sx: $i, ...n }),
|
|
1539
|
-
/* @__PURE__ */ P(
|
|
1540
|
-
ri,
|
|
3630
|
+
sx: Vs,
|
|
3631
|
+
...o,
|
|
3632
|
+
children: /* @__PURE__ */ Ie(Bs, { ...i, children: [
|
|
3633
|
+
/* @__PURE__ */ N(
|
|
3634
|
+
Fs,
|
|
1541
3635
|
{
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
onClick: d,
|
|
1546
|
-
sx: ai,
|
|
1547
|
-
...e,
|
|
1548
|
-
children: /* @__PURE__ */ P(te, {})
|
|
3636
|
+
rotate: a,
|
|
3637
|
+
handleRotate: u,
|
|
3638
|
+
...t
|
|
1549
3639
|
}
|
|
1550
3640
|
),
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
|
|
1553
|
-
ri,
|
|
1554
|
-
{
|
|
1555
|
-
disableFocusRipple: !0,
|
|
1556
|
-
disableRipple: !0,
|
|
1557
|
-
"aria-label": "Reset",
|
|
1558
|
-
onClick: u,
|
|
1559
|
-
sx: ai,
|
|
1560
|
-
...r,
|
|
1561
|
-
children: /* @__PURE__ */ P(se, {})
|
|
1562
|
-
}
|
|
1563
|
-
)
|
|
1564
|
-
]
|
|
3641
|
+
/* @__PURE__ */ N(Xs, { children: /* @__PURE__ */ N(Ji, { sx: d, children: e }) })
|
|
3642
|
+
] })
|
|
1565
3643
|
}
|
|
1566
3644
|
);
|
|
1567
|
-
}
|
|
1568
|
-
children: i,
|
|
1569
|
-
parentContainerProps: o,
|
|
1570
|
-
controllerContainerProps: e,
|
|
1571
|
-
zoomInButtonProps: r,
|
|
1572
|
-
zoomOutButtonProps: n,
|
|
1573
|
-
resetTransformButtonProps: a,
|
|
1574
|
-
dividerProps: t
|
|
1575
|
-
}) => /* @__PURE__ */ P(
|
|
1576
|
-
Ki,
|
|
1577
|
-
{
|
|
1578
|
-
disableGutters: !0,
|
|
1579
|
-
sx: So,
|
|
1580
|
-
...o,
|
|
1581
|
-
children: /* @__PURE__ */ Li(io, { children: [
|
|
1582
|
-
/* @__PURE__ */ P(
|
|
1583
|
-
wo,
|
|
1584
|
-
{
|
|
1585
|
-
controllerContainerProps: e,
|
|
1586
|
-
zoomInButtonProps: r,
|
|
1587
|
-
zoomOutButtonProps: n,
|
|
1588
|
-
resetTransformButtonProps: a,
|
|
1589
|
-
dividerProps: t
|
|
1590
|
-
}
|
|
1591
|
-
),
|
|
1592
|
-
/* @__PURE__ */ P(oo, { children: i })
|
|
1593
|
-
] })
|
|
1594
|
-
}
|
|
1595
|
-
);
|
|
3645
|
+
};
|
|
1596
3646
|
export {
|
|
1597
|
-
|
|
3647
|
+
rl as default
|
|
1598
3648
|
};
|