@genai-fi/base 3.0.2 → 4.0.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/Button-CGKw9sMz.js +656 -0
- package/dist/CircularProgress-C6sMwjDC.js +1275 -0
- package/dist/{DefaultPropsProvider-C0Ib4Mye.js → DefaultPropsProvider-D2IJ8Qbs.js} +5 -1
- package/dist/{DialogQR-DVWhImXI.js → DialogQR-CyZcX7ul.js} +9 -5
- package/dist/{FlashWifi-CaAOKd3g.js → FlashWifi-CYp0UP0B.js} +1 -1
- package/dist/Portal-BqkDy0Wc.js +613 -0
- package/dist/SvgLayer-CA0elY7q.js +36 -0
- package/dist/assets/IconButtonDot.css +1 -0
- package/dist/assets/LangSelect.css +1 -0
- package/dist/assets/Loading.css +1 -0
- package/dist/assets/PercentageBar.css +1 -0
- package/dist/assets/PieScore.css +1 -0
- package/dist/assets/SvgLayer.css +1 -0
- package/dist/assets/Widget.css +1 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style2.css +1 -0
- package/dist/colours.module.css +4 -0
- package/dist/components/AlertPara/AlertPara.js +1 -1
- package/dist/components/Application/Application.d.ts +10 -0
- package/dist/components/Application/Application.js +1610 -0
- package/dist/components/BusyButton/BusyButton.js +7 -6
- package/dist/components/Button/Button.js +12 -4
- package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +1 -5
- package/dist/components/ConnectionStatus/ConnectionStatus.js +48 -47
- package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
- package/dist/components/ContentLoader/ContentError.js +1 -1
- package/dist/components/ContentLoader/ContentLoader.js +5 -1
- package/dist/components/ContentLoader/ContentProgress.js +1 -1
- package/dist/components/IconButtonDot/IconButtonDot.d.ts +7 -0
- package/dist/components/IconButtonDot/IconButtonDot.js +22 -0
- package/dist/components/IconMenu/IconMenu.d.ts +12 -0
- package/dist/components/IconMenu/IconMenu.js +26 -0
- package/dist/components/IconMenu/IconMenuInline.d.ts +6 -0
- package/dist/components/IconMenu/IconMenuInline.js +12 -0
- package/dist/components/IconMenu/Item.d.ts +9 -0
- package/dist/components/IconMenu/Item.js +34 -0
- package/dist/components/IconMenu/Spacer.d.ts +1 -0
- package/dist/components/IconMenu/Spacer.js +11 -0
- package/dist/components/IconMenu/context.d.ts +1 -0
- package/dist/components/IconMenu/context.js +5 -0
- package/dist/components/IconMenu/index.d.ts +4 -0
- package/dist/components/IconMenu/index.js +10 -0
- package/dist/components/LangSelect/LangSelect.d.ts +12 -0
- package/dist/components/LangSelect/LangSelect.js +46 -0
- package/dist/components/Loading/Loading.d.ts +7 -0
- package/dist/components/Loading/Loading.js +15 -0
- package/dist/components/Motd/Motd.js +1 -1
- package/dist/components/PercentageBar/PercentageBar.d.ts +7 -0
- package/dist/components/PercentageBar/PercentageBar.js +37 -0
- package/dist/components/PieScore/PieScore.d.ts +6 -0
- package/dist/components/PieScore/PieScore.js +10676 -0
- package/dist/components/QRCode/DialogQR.js +8 -4
- package/dist/components/QRCode/QRCode.js +1 -1
- package/dist/components/Webcam/Webcam.js +3 -3
- package/dist/components/WorkflowLayout/Layout.d.ts +7 -0
- package/dist/components/WorkflowLayout/Layout.js +43 -0
- package/dist/components/WorkflowLayout/SvgLayer.d.ts +14 -0
- package/dist/components/WorkflowLayout/SvgLayer.js +5 -0
- package/dist/components/WorkflowLayout/Widget.d.ts +18 -0
- package/dist/components/WorkflowLayout/Widget.js +7413 -0
- package/dist/components/WorkflowLayout/index.d.ts +3 -0
- package/dist/components/WorkflowLayout/index.js +6 -0
- package/dist/components/WorkflowLayout/lines.d.ts +17 -0
- package/dist/components/WorkflowLayout/lines.js +37 -0
- package/dist/{createSvgIcon-BfF8yuCp.js → createSvgIcon-DmrVEdN7.js} +2 -2
- package/dist/{createTheme-BIcG8YPQ.js → createTheme-a85zdZWm.js} +4 -0
- package/dist/hooks/peer.d.ts +25 -2
- package/dist/hooks/peer.js +196 -54
- package/dist/main.d.ts +6 -0
- package/dist/main.js +53 -33
- package/dist/react-D_xU5dL6.js +112 -0
- package/dist/state/webrtcState.js +5 -4
- package/dist/style/theme.js +1 -1
- package/dist/style.module-BAnhZ_KJ.js +9 -0
- package/dist/style.module-BDpZJv9y.js +26 -0
- package/dist/util/Observer.d.ts +7 -0
- package/dist/util/Observer.js +9 -0
- package/dist/{webrtcState-D0nJpE9Z.js → vanilla-BJxibF1U.js} +83 -85
- package/package.json +8 -2
- package/dist/Button-DQwRVw4a.js +0 -1918
- package/dist/react-D-b-Xrzv.js +0 -98
- package/dist/style.module-DSFm2eLD.js +0 -9
|
@@ -0,0 +1,1275 @@
|
|
|
1
|
+
var Xe = Object.defineProperty;
|
|
2
|
+
var qe = (e, t, n) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var W = (e, t, n) => qe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import * as c from "react";
|
|
5
|
+
import H, { isValidElement as Q, cloneElement as ee, Children as We } from "react";
|
|
6
|
+
import { P as r, g as Te, a as ne } from "./createTheme-a85zdZWm.js";
|
|
7
|
+
import { c as E, g as ce, u as pe, s as z, a as Ce, m as Ee } from "./DefaultPropsProvider-D2IJ8Qbs.js";
|
|
8
|
+
import { jsx as D, jsxs as He } from "react/jsx-runtime";
|
|
9
|
+
import { keyframes as G, css as xe } from "@emotion/react";
|
|
10
|
+
const Ge = typeof window < "u" ? c.useLayoutEffect : c.useEffect;
|
|
11
|
+
let be = 0;
|
|
12
|
+
function Ze(e) {
|
|
13
|
+
const [t, n] = c.useState(e), o = e || t;
|
|
14
|
+
return c.useEffect(() => {
|
|
15
|
+
t == null && (be += 1, n(`mui-${be}`));
|
|
16
|
+
}, [t]), o;
|
|
17
|
+
}
|
|
18
|
+
const Je = {
|
|
19
|
+
...c
|
|
20
|
+
}, ge = Je.useId;
|
|
21
|
+
function Yt(e) {
|
|
22
|
+
if (ge !== void 0) {
|
|
23
|
+
const t = ge();
|
|
24
|
+
return e ?? t;
|
|
25
|
+
}
|
|
26
|
+
return Ze(e);
|
|
27
|
+
}
|
|
28
|
+
function te(e) {
|
|
29
|
+
const t = c.useRef(e);
|
|
30
|
+
return Ge(() => {
|
|
31
|
+
t.current = e;
|
|
32
|
+
}), c.useRef((...n) => (
|
|
33
|
+
// @ts-expect-error hide `this`
|
|
34
|
+
(0, t.current)(...n)
|
|
35
|
+
)).current;
|
|
36
|
+
}
|
|
37
|
+
function ye(...e) {
|
|
38
|
+
const t = c.useRef(void 0), n = c.useCallback((o) => {
|
|
39
|
+
const s = e.map((i) => {
|
|
40
|
+
if (i == null)
|
|
41
|
+
return null;
|
|
42
|
+
if (typeof i == "function") {
|
|
43
|
+
const a = i, l = a(o);
|
|
44
|
+
return typeof l == "function" ? l : () => {
|
|
45
|
+
a(null);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return i.current = o, () => {
|
|
49
|
+
i.current = null;
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return () => {
|
|
53
|
+
s.forEach((i) => i == null ? void 0 : i());
|
|
54
|
+
};
|
|
55
|
+
}, e);
|
|
56
|
+
return c.useMemo(() => e.every((o) => o == null) ? null : (o) => {
|
|
57
|
+
t.current && (t.current(), t.current = void 0), o != null && (t.current = n(o));
|
|
58
|
+
}, e);
|
|
59
|
+
}
|
|
60
|
+
const Qe = r.oneOfType([r.func, r.object]);
|
|
61
|
+
function Pe(e, t) {
|
|
62
|
+
return process.env.NODE_ENV === "production" ? () => null : function(...o) {
|
|
63
|
+
return e(...o) || t(...o);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function et(e) {
|
|
67
|
+
const {
|
|
68
|
+
prototype: t = {}
|
|
69
|
+
} = e;
|
|
70
|
+
return !!t.isReactComponent;
|
|
71
|
+
}
|
|
72
|
+
function tt(e, t, n, o, s) {
|
|
73
|
+
const i = e[t], a = s || t;
|
|
74
|
+
if (i == null || // When server-side rendering React doesn't warn either.
|
|
75
|
+
// This is not an accurate check for SSR.
|
|
76
|
+
// This is only in place for emotion compat.
|
|
77
|
+
// TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
|
|
78
|
+
typeof window > "u")
|
|
79
|
+
return null;
|
|
80
|
+
let l;
|
|
81
|
+
return typeof i == "function" && !et(i) && (l = "Did you accidentally provide a plain function component instead?"), l !== void 0 ? new Error(`Invalid ${o} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
|
|
82
|
+
}
|
|
83
|
+
const nt = Pe(r.elementType, tt);
|
|
84
|
+
function Me(e) {
|
|
85
|
+
try {
|
|
86
|
+
return e.matches(":focus-visible");
|
|
87
|
+
} catch {
|
|
88
|
+
process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
|
|
89
|
+
`));
|
|
90
|
+
}
|
|
91
|
+
return !1;
|
|
92
|
+
}
|
|
93
|
+
const Re = {};
|
|
94
|
+
function we(e, t) {
|
|
95
|
+
const n = c.useRef(Re);
|
|
96
|
+
return n.current === Re && (n.current = e(t)), n;
|
|
97
|
+
}
|
|
98
|
+
class re {
|
|
99
|
+
constructor() {
|
|
100
|
+
W(this, "mountEffect", () => {
|
|
101
|
+
this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
|
|
102
|
+
});
|
|
103
|
+
this.ref = {
|
|
104
|
+
current: null
|
|
105
|
+
}, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
|
|
106
|
+
}
|
|
107
|
+
/** React ref to the ripple instance */
|
|
108
|
+
/** If the ripple component should be mounted */
|
|
109
|
+
/** Promise that resolves when the ripple component is mounted */
|
|
110
|
+
/** If the ripple component has been mounted */
|
|
111
|
+
/** React state hook setter */
|
|
112
|
+
static create() {
|
|
113
|
+
return new re();
|
|
114
|
+
}
|
|
115
|
+
static use() {
|
|
116
|
+
const t = we(re.create).current, [n, o] = c.useState(!1);
|
|
117
|
+
return t.shouldMount = n, t.setShouldMount = o, c.useEffect(t.mountEffect, [n]), t;
|
|
118
|
+
}
|
|
119
|
+
mount() {
|
|
120
|
+
return this.mounted || (this.mounted = ot(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
|
|
121
|
+
}
|
|
122
|
+
/* Ripple API */
|
|
123
|
+
start(...t) {
|
|
124
|
+
this.mount().then(() => {
|
|
125
|
+
var n;
|
|
126
|
+
return (n = this.ref.current) == null ? void 0 : n.start(...t);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
stop(...t) {
|
|
130
|
+
this.mount().then(() => {
|
|
131
|
+
var n;
|
|
132
|
+
return (n = this.ref.current) == null ? void 0 : n.stop(...t);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
pulsate(...t) {
|
|
136
|
+
this.mount().then(() => {
|
|
137
|
+
var n;
|
|
138
|
+
return (n = this.ref.current) == null ? void 0 : n.pulsate(...t);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function rt() {
|
|
143
|
+
return re.use();
|
|
144
|
+
}
|
|
145
|
+
function ot() {
|
|
146
|
+
let e, t;
|
|
147
|
+
const n = new Promise((o, s) => {
|
|
148
|
+
e = o, t = s;
|
|
149
|
+
});
|
|
150
|
+
return n.resolve = e, n.reject = t, n;
|
|
151
|
+
}
|
|
152
|
+
function ie() {
|
|
153
|
+
return ie = Object.assign ? Object.assign.bind() : function(e) {
|
|
154
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
155
|
+
var n = arguments[t];
|
|
156
|
+
for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
157
|
+
}
|
|
158
|
+
return e;
|
|
159
|
+
}, ie.apply(null, arguments);
|
|
160
|
+
}
|
|
161
|
+
function it(e, t) {
|
|
162
|
+
if (e == null) return {};
|
|
163
|
+
var n = {};
|
|
164
|
+
for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
|
|
165
|
+
if (t.indexOf(o) !== -1) continue;
|
|
166
|
+
n[o] = e[o];
|
|
167
|
+
}
|
|
168
|
+
return n;
|
|
169
|
+
}
|
|
170
|
+
function se(e, t) {
|
|
171
|
+
return se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
172
|
+
return n.__proto__ = o, n;
|
|
173
|
+
}, se(e, t);
|
|
174
|
+
}
|
|
175
|
+
function st(e, t) {
|
|
176
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, se(e, t);
|
|
177
|
+
}
|
|
178
|
+
const ve = H.createContext(null);
|
|
179
|
+
function at(e) {
|
|
180
|
+
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
181
|
+
return e;
|
|
182
|
+
}
|
|
183
|
+
function fe(e, t) {
|
|
184
|
+
var n = function(i) {
|
|
185
|
+
return t && Q(i) ? t(i) : i;
|
|
186
|
+
}, o = /* @__PURE__ */ Object.create(null);
|
|
187
|
+
return e && We.map(e, function(s) {
|
|
188
|
+
return s;
|
|
189
|
+
}).forEach(function(s) {
|
|
190
|
+
o[s.key] = n(s);
|
|
191
|
+
}), o;
|
|
192
|
+
}
|
|
193
|
+
function ut(e, t) {
|
|
194
|
+
e = e || {}, t = t || {};
|
|
195
|
+
function n(h) {
|
|
196
|
+
return h in t ? t[h] : e[h];
|
|
197
|
+
}
|
|
198
|
+
var o = /* @__PURE__ */ Object.create(null), s = [];
|
|
199
|
+
for (var i in e)
|
|
200
|
+
i in t ? s.length && (o[i] = s, s = []) : s.push(i);
|
|
201
|
+
var a, l = {};
|
|
202
|
+
for (var p in t) {
|
|
203
|
+
if (o[p])
|
|
204
|
+
for (a = 0; a < o[p].length; a++) {
|
|
205
|
+
var f = o[p][a];
|
|
206
|
+
l[o[p][a]] = n(f);
|
|
207
|
+
}
|
|
208
|
+
l[p] = n(p);
|
|
209
|
+
}
|
|
210
|
+
for (a = 0; a < s.length; a++)
|
|
211
|
+
l[s[a]] = n(s[a]);
|
|
212
|
+
return l;
|
|
213
|
+
}
|
|
214
|
+
function F(e, t, n) {
|
|
215
|
+
return n[t] != null ? n[t] : e.props[t];
|
|
216
|
+
}
|
|
217
|
+
function lt(e, t) {
|
|
218
|
+
return fe(e.children, function(n) {
|
|
219
|
+
return ee(n, {
|
|
220
|
+
onExited: t.bind(null, n),
|
|
221
|
+
in: !0,
|
|
222
|
+
appear: F(n, "appear", e),
|
|
223
|
+
enter: F(n, "enter", e),
|
|
224
|
+
exit: F(n, "exit", e)
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function ct(e, t, n) {
|
|
229
|
+
var o = fe(e.children), s = ut(t, o);
|
|
230
|
+
return Object.keys(s).forEach(function(i) {
|
|
231
|
+
var a = s[i];
|
|
232
|
+
if (Q(a)) {
|
|
233
|
+
var l = i in t, p = i in o, f = t[i], h = Q(f) && !f.props.in;
|
|
234
|
+
p && (!l || h) ? s[i] = ee(a, {
|
|
235
|
+
onExited: n.bind(null, a),
|
|
236
|
+
in: !0,
|
|
237
|
+
exit: F(a, "exit", e),
|
|
238
|
+
enter: F(a, "enter", e)
|
|
239
|
+
}) : !p && l && !h ? s[i] = ee(a, {
|
|
240
|
+
in: !1
|
|
241
|
+
}) : p && l && Q(f) && (s[i] = ee(a, {
|
|
242
|
+
onExited: n.bind(null, a),
|
|
243
|
+
in: f.props.in,
|
|
244
|
+
exit: F(a, "exit", e),
|
|
245
|
+
enter: F(a, "enter", e)
|
|
246
|
+
}));
|
|
247
|
+
}
|
|
248
|
+
}), s;
|
|
249
|
+
}
|
|
250
|
+
var pt = Object.values || function(e) {
|
|
251
|
+
return Object.keys(e).map(function(t) {
|
|
252
|
+
return e[t];
|
|
253
|
+
});
|
|
254
|
+
}, ft = {
|
|
255
|
+
component: "div",
|
|
256
|
+
childFactory: function(t) {
|
|
257
|
+
return t;
|
|
258
|
+
}
|
|
259
|
+
}, de = /* @__PURE__ */ function(e) {
|
|
260
|
+
st(t, e);
|
|
261
|
+
function t(o, s) {
|
|
262
|
+
var i;
|
|
263
|
+
i = e.call(this, o, s) || this;
|
|
264
|
+
var a = i.handleExited.bind(at(i));
|
|
265
|
+
return i.state = {
|
|
266
|
+
contextValue: {
|
|
267
|
+
isMounting: !0
|
|
268
|
+
},
|
|
269
|
+
handleExited: a,
|
|
270
|
+
firstRender: !0
|
|
271
|
+
}, i;
|
|
272
|
+
}
|
|
273
|
+
var n = t.prototype;
|
|
274
|
+
return n.componentDidMount = function() {
|
|
275
|
+
this.mounted = !0, this.setState({
|
|
276
|
+
contextValue: {
|
|
277
|
+
isMounting: !1
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
}, n.componentWillUnmount = function() {
|
|
281
|
+
this.mounted = !1;
|
|
282
|
+
}, t.getDerivedStateFromProps = function(s, i) {
|
|
283
|
+
var a = i.children, l = i.handleExited, p = i.firstRender;
|
|
284
|
+
return {
|
|
285
|
+
children: p ? lt(s, l) : ct(s, a, l),
|
|
286
|
+
firstRender: !1
|
|
287
|
+
};
|
|
288
|
+
}, n.handleExited = function(s, i) {
|
|
289
|
+
var a = fe(this.props.children);
|
|
290
|
+
s.key in a || (s.props.onExited && s.props.onExited(i), this.mounted && this.setState(function(l) {
|
|
291
|
+
var p = ie({}, l.children);
|
|
292
|
+
return delete p[s.key], {
|
|
293
|
+
children: p
|
|
294
|
+
};
|
|
295
|
+
}));
|
|
296
|
+
}, n.render = function() {
|
|
297
|
+
var s = this.props, i = s.component, a = s.childFactory, l = it(s, ["component", "childFactory"]), p = this.state.contextValue, f = pt(this.state.children).map(a);
|
|
298
|
+
return delete l.appear, delete l.enter, delete l.exit, i === null ? /* @__PURE__ */ H.createElement(ve.Provider, {
|
|
299
|
+
value: p
|
|
300
|
+
}, f) : /* @__PURE__ */ H.createElement(ve.Provider, {
|
|
301
|
+
value: p
|
|
302
|
+
}, /* @__PURE__ */ H.createElement(i, l, f));
|
|
303
|
+
}, t;
|
|
304
|
+
}(H.Component);
|
|
305
|
+
de.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
306
|
+
/**
|
|
307
|
+
* `<TransitionGroup>` renders a `<div>` by default. You can change this
|
|
308
|
+
* behavior by providing a `component` prop.
|
|
309
|
+
* If you use React v16+ and would like to avoid a wrapping `<div>` element
|
|
310
|
+
* you can pass in `component={null}`. This is useful if the wrapping div
|
|
311
|
+
* borks your css styles.
|
|
312
|
+
*/
|
|
313
|
+
component: r.any,
|
|
314
|
+
/**
|
|
315
|
+
* A set of `<Transition>` components, that are toggled `in` and out as they
|
|
316
|
+
* leave. the `<TransitionGroup>` will inject specific transition props, so
|
|
317
|
+
* remember to spread them through if you are wrapping the `<Transition>` as
|
|
318
|
+
* with our `<Fade>` example.
|
|
319
|
+
*
|
|
320
|
+
* While this component is meant for multiple `Transition` or `CSSTransition`
|
|
321
|
+
* children, sometimes you may want to have a single transition child with
|
|
322
|
+
* content that you want to be transitioned out and in when you change it
|
|
323
|
+
* (e.g. routes, images etc.) In that case you can change the `key` prop of
|
|
324
|
+
* the transition child as you change its content, this will cause
|
|
325
|
+
* `TransitionGroup` to transition the child out and back in.
|
|
326
|
+
*/
|
|
327
|
+
children: r.node,
|
|
328
|
+
/**
|
|
329
|
+
* A convenience prop that enables or disables appear animations
|
|
330
|
+
* for all children. Note that specifying this will override any defaults set
|
|
331
|
+
* on individual children Transitions.
|
|
332
|
+
*/
|
|
333
|
+
appear: r.bool,
|
|
334
|
+
/**
|
|
335
|
+
* A convenience prop that enables or disables enter animations
|
|
336
|
+
* for all children. Note that specifying this will override any defaults set
|
|
337
|
+
* on individual children Transitions.
|
|
338
|
+
*/
|
|
339
|
+
enter: r.bool,
|
|
340
|
+
/**
|
|
341
|
+
* A convenience prop that enables or disables exit animations
|
|
342
|
+
* for all children. Note that specifying this will override any defaults set
|
|
343
|
+
* on individual children Transitions.
|
|
344
|
+
*/
|
|
345
|
+
exit: r.bool,
|
|
346
|
+
/**
|
|
347
|
+
* You may need to apply reactive updates to a child as it is exiting.
|
|
348
|
+
* This is generally done by using `cloneElement` however in the case of an exiting
|
|
349
|
+
* child the element has already been removed and not accessible to the consumer.
|
|
350
|
+
*
|
|
351
|
+
* If you do need to update a child as it leaves you can provide a `childFactory`
|
|
352
|
+
* to wrap every child, even the ones that are leaving.
|
|
353
|
+
*
|
|
354
|
+
* @type Function(child: ReactElement) -> ReactElement
|
|
355
|
+
*/
|
|
356
|
+
childFactory: r.func
|
|
357
|
+
} : {};
|
|
358
|
+
de.defaultProps = ft;
|
|
359
|
+
const dt = [];
|
|
360
|
+
function ht(e) {
|
|
361
|
+
c.useEffect(e, dt);
|
|
362
|
+
}
|
|
363
|
+
class he {
|
|
364
|
+
constructor() {
|
|
365
|
+
W(this, "currentId", null);
|
|
366
|
+
W(this, "clear", () => {
|
|
367
|
+
this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
|
|
368
|
+
});
|
|
369
|
+
W(this, "disposeEffect", () => this.clear);
|
|
370
|
+
}
|
|
371
|
+
static create() {
|
|
372
|
+
return new he();
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Executes `fn` after `delay`, clearing any previously scheduled call.
|
|
376
|
+
*/
|
|
377
|
+
start(t, n) {
|
|
378
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
379
|
+
this.currentId = null, n();
|
|
380
|
+
}, t);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
function mt() {
|
|
384
|
+
const e = we(he.create).current;
|
|
385
|
+
return ht(e.disposeEffect), e;
|
|
386
|
+
}
|
|
387
|
+
function Se(e) {
|
|
388
|
+
const {
|
|
389
|
+
className: t,
|
|
390
|
+
classes: n,
|
|
391
|
+
pulsate: o = !1,
|
|
392
|
+
rippleX: s,
|
|
393
|
+
rippleY: i,
|
|
394
|
+
rippleSize: a,
|
|
395
|
+
in: l,
|
|
396
|
+
onExited: p,
|
|
397
|
+
timeout: f
|
|
398
|
+
} = e, [h, m] = c.useState(!1), y = E(t, n.ripple, n.rippleVisible, o && n.ripplePulsate), M = {
|
|
399
|
+
width: a,
|
|
400
|
+
height: a,
|
|
401
|
+
top: -(a / 2) + i,
|
|
402
|
+
left: -(a / 2) + s
|
|
403
|
+
}, b = E(n.child, h && n.childLeaving, o && n.childPulsate);
|
|
404
|
+
return !l && !h && m(!0), c.useEffect(() => {
|
|
405
|
+
if (!l && p != null) {
|
|
406
|
+
const T = setTimeout(p, f);
|
|
407
|
+
return () => {
|
|
408
|
+
clearTimeout(T);
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
}, [p, l, f]), /* @__PURE__ */ D("span", {
|
|
412
|
+
className: y,
|
|
413
|
+
style: M,
|
|
414
|
+
children: /* @__PURE__ */ D("span", {
|
|
415
|
+
className: b
|
|
416
|
+
})
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
420
|
+
/**
|
|
421
|
+
* Override or extend the styles applied to the component.
|
|
422
|
+
*/
|
|
423
|
+
classes: r.object.isRequired,
|
|
424
|
+
className: r.string,
|
|
425
|
+
/**
|
|
426
|
+
* @ignore - injected from TransitionGroup
|
|
427
|
+
*/
|
|
428
|
+
in: r.bool,
|
|
429
|
+
/**
|
|
430
|
+
* @ignore - injected from TransitionGroup
|
|
431
|
+
*/
|
|
432
|
+
onExited: r.func,
|
|
433
|
+
/**
|
|
434
|
+
* If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
|
|
435
|
+
*/
|
|
436
|
+
pulsate: r.bool,
|
|
437
|
+
/**
|
|
438
|
+
* Diameter of the ripple.
|
|
439
|
+
*/
|
|
440
|
+
rippleSize: r.number,
|
|
441
|
+
/**
|
|
442
|
+
* Horizontal position of the ripple center.
|
|
443
|
+
*/
|
|
444
|
+
rippleX: r.number,
|
|
445
|
+
/**
|
|
446
|
+
* Vertical position of the ripple center.
|
|
447
|
+
*/
|
|
448
|
+
rippleY: r.number,
|
|
449
|
+
/**
|
|
450
|
+
* exit delay
|
|
451
|
+
*/
|
|
452
|
+
timeout: r.number.isRequired
|
|
453
|
+
});
|
|
454
|
+
const v = ce("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), ae = 550, bt = 80, gt = G`
|
|
455
|
+
0% {
|
|
456
|
+
transform: scale(0);
|
|
457
|
+
opacity: 0.1;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
100% {
|
|
461
|
+
transform: scale(1);
|
|
462
|
+
opacity: 0.3;
|
|
463
|
+
}
|
|
464
|
+
`, yt = G`
|
|
465
|
+
0% {
|
|
466
|
+
opacity: 1;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
100% {
|
|
470
|
+
opacity: 0;
|
|
471
|
+
}
|
|
472
|
+
`, Mt = G`
|
|
473
|
+
0% {
|
|
474
|
+
transform: scale(1);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
50% {
|
|
478
|
+
transform: scale(0.92);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
100% {
|
|
482
|
+
transform: scale(1);
|
|
483
|
+
}
|
|
484
|
+
`, Rt = z("span", {
|
|
485
|
+
name: "MuiTouchRipple",
|
|
486
|
+
slot: "Root"
|
|
487
|
+
})({
|
|
488
|
+
overflow: "hidden",
|
|
489
|
+
pointerEvents: "none",
|
|
490
|
+
position: "absolute",
|
|
491
|
+
zIndex: 0,
|
|
492
|
+
top: 0,
|
|
493
|
+
right: 0,
|
|
494
|
+
bottom: 0,
|
|
495
|
+
left: 0,
|
|
496
|
+
borderRadius: "inherit"
|
|
497
|
+
}), vt = z(Se, {
|
|
498
|
+
name: "MuiTouchRipple",
|
|
499
|
+
slot: "Ripple"
|
|
500
|
+
})`
|
|
501
|
+
opacity: 0;
|
|
502
|
+
position: absolute;
|
|
503
|
+
|
|
504
|
+
&.${v.rippleVisible} {
|
|
505
|
+
opacity: 0.3;
|
|
506
|
+
transform: scale(1);
|
|
507
|
+
animation-name: ${gt};
|
|
508
|
+
animation-duration: ${ae}ms;
|
|
509
|
+
animation-timing-function: ${({
|
|
510
|
+
theme: e
|
|
511
|
+
}) => e.transitions.easing.easeInOut};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
&.${v.ripplePulsate} {
|
|
515
|
+
animation-duration: ${({
|
|
516
|
+
theme: e
|
|
517
|
+
}) => e.transitions.duration.shorter}ms;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
& .${v.child} {
|
|
521
|
+
opacity: 1;
|
|
522
|
+
display: block;
|
|
523
|
+
width: 100%;
|
|
524
|
+
height: 100%;
|
|
525
|
+
border-radius: 50%;
|
|
526
|
+
background-color: currentColor;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
& .${v.childLeaving} {
|
|
530
|
+
opacity: 0;
|
|
531
|
+
animation-name: ${yt};
|
|
532
|
+
animation-duration: ${ae}ms;
|
|
533
|
+
animation-timing-function: ${({
|
|
534
|
+
theme: e
|
|
535
|
+
}) => e.transitions.easing.easeInOut};
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
& .${v.childPulsate} {
|
|
539
|
+
position: absolute;
|
|
540
|
+
/* @noflip */
|
|
541
|
+
left: 0px;
|
|
542
|
+
top: 0;
|
|
543
|
+
animation-name: ${Mt};
|
|
544
|
+
animation-duration: 2500ms;
|
|
545
|
+
animation-timing-function: ${({
|
|
546
|
+
theme: e
|
|
547
|
+
}) => e.transitions.easing.easeInOut};
|
|
548
|
+
animation-iteration-count: infinite;
|
|
549
|
+
animation-delay: 200ms;
|
|
550
|
+
}
|
|
551
|
+
`, ke = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
552
|
+
const o = pe({
|
|
553
|
+
props: t,
|
|
554
|
+
name: "MuiTouchRipple"
|
|
555
|
+
}), {
|
|
556
|
+
center: s = !1,
|
|
557
|
+
classes: i = {},
|
|
558
|
+
className: a,
|
|
559
|
+
...l
|
|
560
|
+
} = o, [p, f] = c.useState([]), h = c.useRef(0), m = c.useRef(null);
|
|
561
|
+
c.useEffect(() => {
|
|
562
|
+
m.current && (m.current(), m.current = null);
|
|
563
|
+
}, [p]);
|
|
564
|
+
const y = c.useRef(!1), M = mt(), b = c.useRef(null), T = c.useRef(null), R = c.useCallback((d) => {
|
|
565
|
+
const {
|
|
566
|
+
pulsate: x,
|
|
567
|
+
rippleX: C,
|
|
568
|
+
rippleY: _,
|
|
569
|
+
rippleSize: j,
|
|
570
|
+
cb: A
|
|
571
|
+
} = d;
|
|
572
|
+
f((P) => [...P, /* @__PURE__ */ D(vt, {
|
|
573
|
+
classes: {
|
|
574
|
+
ripple: E(i.ripple, v.ripple),
|
|
575
|
+
rippleVisible: E(i.rippleVisible, v.rippleVisible),
|
|
576
|
+
ripplePulsate: E(i.ripplePulsate, v.ripplePulsate),
|
|
577
|
+
child: E(i.child, v.child),
|
|
578
|
+
childLeaving: E(i.childLeaving, v.childLeaving),
|
|
579
|
+
childPulsate: E(i.childPulsate, v.childPulsate)
|
|
580
|
+
},
|
|
581
|
+
timeout: ae,
|
|
582
|
+
pulsate: x,
|
|
583
|
+
rippleX: C,
|
|
584
|
+
rippleY: _,
|
|
585
|
+
rippleSize: j
|
|
586
|
+
}, h.current)]), h.current += 1, m.current = A;
|
|
587
|
+
}, [i]), w = c.useCallback((d = {}, x = {}, C = () => {
|
|
588
|
+
}) => {
|
|
589
|
+
const {
|
|
590
|
+
pulsate: _ = !1,
|
|
591
|
+
center: j = s || x.pulsate,
|
|
592
|
+
fakeElement: A = !1
|
|
593
|
+
// For test purposes
|
|
594
|
+
} = x;
|
|
595
|
+
if ((d == null ? void 0 : d.type) === "mousedown" && y.current) {
|
|
596
|
+
y.current = !1;
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
(d == null ? void 0 : d.type) === "touchstart" && (y.current = !0);
|
|
600
|
+
const P = A ? null : T.current, N = P ? P.getBoundingClientRect() : {
|
|
601
|
+
width: 0,
|
|
602
|
+
height: 0,
|
|
603
|
+
left: 0,
|
|
604
|
+
top: 0
|
|
605
|
+
};
|
|
606
|
+
let O, S, I;
|
|
607
|
+
if (j || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
|
|
608
|
+
O = Math.round(N.width / 2), S = Math.round(N.height / 2);
|
|
609
|
+
else {
|
|
610
|
+
const {
|
|
611
|
+
clientX: Y,
|
|
612
|
+
clientY: B
|
|
613
|
+
} = d.touches && d.touches.length > 0 ? d.touches[0] : d;
|
|
614
|
+
O = Math.round(Y - N.left), S = Math.round(B - N.top);
|
|
615
|
+
}
|
|
616
|
+
if (j)
|
|
617
|
+
I = Math.sqrt((2 * N.width ** 2 + N.height ** 2) / 3), I % 2 === 0 && (I += 1);
|
|
618
|
+
else {
|
|
619
|
+
const Y = Math.max(Math.abs((P ? P.clientWidth : 0) - O), O) * 2 + 2, B = Math.max(Math.abs((P ? P.clientHeight : 0) - S), S) * 2 + 2;
|
|
620
|
+
I = Math.sqrt(Y ** 2 + B ** 2);
|
|
621
|
+
}
|
|
622
|
+
d != null && d.touches ? b.current === null && (b.current = () => {
|
|
623
|
+
R({
|
|
624
|
+
pulsate: _,
|
|
625
|
+
rippleX: O,
|
|
626
|
+
rippleY: S,
|
|
627
|
+
rippleSize: I,
|
|
628
|
+
cb: C
|
|
629
|
+
});
|
|
630
|
+
}, M.start(bt, () => {
|
|
631
|
+
b.current && (b.current(), b.current = null);
|
|
632
|
+
})) : R({
|
|
633
|
+
pulsate: _,
|
|
634
|
+
rippleX: O,
|
|
635
|
+
rippleY: S,
|
|
636
|
+
rippleSize: I,
|
|
637
|
+
cb: C
|
|
638
|
+
});
|
|
639
|
+
}, [s, R, M]), V = c.useCallback(() => {
|
|
640
|
+
w({}, {
|
|
641
|
+
pulsate: !0
|
|
642
|
+
});
|
|
643
|
+
}, [w]), U = c.useCallback((d, x) => {
|
|
644
|
+
if (M.clear(), (d == null ? void 0 : d.type) === "touchend" && b.current) {
|
|
645
|
+
b.current(), b.current = null, M.start(0, () => {
|
|
646
|
+
U(d, x);
|
|
647
|
+
});
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
b.current = null, f((C) => C.length > 0 ? C.slice(1) : C), m.current = x;
|
|
651
|
+
}, [M]);
|
|
652
|
+
return c.useImperativeHandle(n, () => ({
|
|
653
|
+
pulsate: V,
|
|
654
|
+
start: w,
|
|
655
|
+
stop: U
|
|
656
|
+
}), [V, w, U]), /* @__PURE__ */ D(Rt, {
|
|
657
|
+
className: E(v.root, i.root, a),
|
|
658
|
+
ref: T,
|
|
659
|
+
...l,
|
|
660
|
+
children: /* @__PURE__ */ D(de, {
|
|
661
|
+
component: null,
|
|
662
|
+
exit: !0,
|
|
663
|
+
children: p
|
|
664
|
+
})
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
process.env.NODE_ENV !== "production" && (ke.propTypes = {
|
|
668
|
+
/**
|
|
669
|
+
* If `true`, the ripple starts at the center of the component
|
|
670
|
+
* rather than at the point of interaction.
|
|
671
|
+
*/
|
|
672
|
+
center: r.bool,
|
|
673
|
+
/**
|
|
674
|
+
* Override or extend the styles applied to the component.
|
|
675
|
+
*/
|
|
676
|
+
classes: r.object,
|
|
677
|
+
/**
|
|
678
|
+
* @ignore
|
|
679
|
+
*/
|
|
680
|
+
className: r.string
|
|
681
|
+
});
|
|
682
|
+
function Tt(e) {
|
|
683
|
+
return Te("MuiButtonBase", e);
|
|
684
|
+
}
|
|
685
|
+
const Ct = ce("MuiButtonBase", ["root", "disabled", "focusVisible"]), Et = (e) => {
|
|
686
|
+
const {
|
|
687
|
+
disabled: t,
|
|
688
|
+
focusVisible: n,
|
|
689
|
+
focusVisibleClassName: o,
|
|
690
|
+
classes: s
|
|
691
|
+
} = e, a = Ce({
|
|
692
|
+
root: ["root", t && "disabled", n && "focusVisible"]
|
|
693
|
+
}, Tt, s);
|
|
694
|
+
return n && o && (a.root += ` ${o}`), a;
|
|
695
|
+
}, xt = z("button", {
|
|
696
|
+
name: "MuiButtonBase",
|
|
697
|
+
slot: "Root"
|
|
698
|
+
})({
|
|
699
|
+
display: "inline-flex",
|
|
700
|
+
alignItems: "center",
|
|
701
|
+
justifyContent: "center",
|
|
702
|
+
position: "relative",
|
|
703
|
+
boxSizing: "border-box",
|
|
704
|
+
WebkitTapHighlightColor: "transparent",
|
|
705
|
+
backgroundColor: "transparent",
|
|
706
|
+
// Reset default value
|
|
707
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
708
|
+
outline: 0,
|
|
709
|
+
border: 0,
|
|
710
|
+
margin: 0,
|
|
711
|
+
// Remove the margin in Safari
|
|
712
|
+
borderRadius: 0,
|
|
713
|
+
padding: 0,
|
|
714
|
+
// Remove the padding in Firefox
|
|
715
|
+
cursor: "pointer",
|
|
716
|
+
userSelect: "none",
|
|
717
|
+
verticalAlign: "middle",
|
|
718
|
+
MozAppearance: "none",
|
|
719
|
+
// Reset
|
|
720
|
+
WebkitAppearance: "none",
|
|
721
|
+
// Reset
|
|
722
|
+
textDecoration: "none",
|
|
723
|
+
// So we take precedent over the style of a native <a /> element.
|
|
724
|
+
color: "inherit",
|
|
725
|
+
"&::-moz-focus-inner": {
|
|
726
|
+
borderStyle: "none"
|
|
727
|
+
// Remove Firefox dotted outline.
|
|
728
|
+
},
|
|
729
|
+
[`&.${Ct.disabled}`]: {
|
|
730
|
+
pointerEvents: "none",
|
|
731
|
+
// Disable link interactions
|
|
732
|
+
cursor: "default"
|
|
733
|
+
},
|
|
734
|
+
"@media print": {
|
|
735
|
+
colorAdjust: "exact"
|
|
736
|
+
}
|
|
737
|
+
}), Pt = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
738
|
+
const o = pe({
|
|
739
|
+
props: t,
|
|
740
|
+
name: "MuiButtonBase"
|
|
741
|
+
}), {
|
|
742
|
+
action: s,
|
|
743
|
+
centerRipple: i = !1,
|
|
744
|
+
children: a,
|
|
745
|
+
className: l,
|
|
746
|
+
component: p = "button",
|
|
747
|
+
disabled: f = !1,
|
|
748
|
+
disableRipple: h = !1,
|
|
749
|
+
disableTouchRipple: m = !1,
|
|
750
|
+
focusRipple: y = !1,
|
|
751
|
+
focusVisibleClassName: M,
|
|
752
|
+
LinkComponent: b = "a",
|
|
753
|
+
onBlur: T,
|
|
754
|
+
onClick: R,
|
|
755
|
+
onContextMenu: w,
|
|
756
|
+
onDragLeave: V,
|
|
757
|
+
onFocus: U,
|
|
758
|
+
onFocusVisible: d,
|
|
759
|
+
onKeyDown: x,
|
|
760
|
+
onKeyUp: C,
|
|
761
|
+
onMouseDown: _,
|
|
762
|
+
onMouseLeave: j,
|
|
763
|
+
onMouseUp: A,
|
|
764
|
+
onTouchEnd: P,
|
|
765
|
+
onTouchMove: N,
|
|
766
|
+
onTouchStart: O,
|
|
767
|
+
tabIndex: S = 0,
|
|
768
|
+
TouchRippleProps: I,
|
|
769
|
+
touchRippleRef: Y,
|
|
770
|
+
type: B,
|
|
771
|
+
...K
|
|
772
|
+
} = o, X = c.useRef(null), g = rt(), De = ye(g.ref, Y), [L, Z] = c.useState(!1);
|
|
773
|
+
f && L && Z(!1), c.useImperativeHandle(s, () => ({
|
|
774
|
+
focusVisible: () => {
|
|
775
|
+
Z(!0), X.current.focus();
|
|
776
|
+
}
|
|
777
|
+
}), []);
|
|
778
|
+
const Ne = g.shouldMount && !h && !f;
|
|
779
|
+
c.useEffect(() => {
|
|
780
|
+
L && y && !h && g.pulsate();
|
|
781
|
+
}, [h, y, L, g]);
|
|
782
|
+
const Oe = k(g, "start", _, m), Ie = k(g, "stop", w, m), $e = k(g, "stop", V, m), Ve = k(g, "stop", A, m), je = k(g, "stop", (u) => {
|
|
783
|
+
L && u.preventDefault(), j && j(u);
|
|
784
|
+
}, m), Be = k(g, "start", O, m), Le = k(g, "stop", P, m), Fe = k(g, "stop", N, m), Ue = k(g, "stop", (u) => {
|
|
785
|
+
Me(u.target) || Z(!1), T && T(u);
|
|
786
|
+
}, !1), _e = te((u) => {
|
|
787
|
+
X.current || (X.current = u.currentTarget), Me(u.target) && (Z(!0), d && d(u)), U && U(u);
|
|
788
|
+
}), oe = () => {
|
|
789
|
+
const u = X.current;
|
|
790
|
+
return p && p !== "button" && !(u.tagName === "A" && u.href);
|
|
791
|
+
}, ze = te((u) => {
|
|
792
|
+
y && !u.repeat && L && u.key === " " && g.stop(u, () => {
|
|
793
|
+
g.start(u);
|
|
794
|
+
}), u.target === u.currentTarget && oe() && u.key === " " && u.preventDefault(), x && x(u), u.target === u.currentTarget && oe() && u.key === "Enter" && !f && (u.preventDefault(), R && R(u));
|
|
795
|
+
}), Ae = te((u) => {
|
|
796
|
+
y && u.key === " " && L && !u.defaultPrevented && g.stop(u, () => {
|
|
797
|
+
g.pulsate(u);
|
|
798
|
+
}), C && C(u), R && u.target === u.currentTarget && oe() && u.key === " " && !u.defaultPrevented && R(u);
|
|
799
|
+
});
|
|
800
|
+
let J = p;
|
|
801
|
+
J === "button" && (K.href || K.to) && (J = b);
|
|
802
|
+
const q = {};
|
|
803
|
+
J === "button" ? (q.type = B === void 0 ? "button" : B, q.disabled = f) : (!K.href && !K.to && (q.role = "button"), f && (q["aria-disabled"] = f));
|
|
804
|
+
const Ye = ye(n, X), me = {
|
|
805
|
+
...o,
|
|
806
|
+
centerRipple: i,
|
|
807
|
+
component: p,
|
|
808
|
+
disabled: f,
|
|
809
|
+
disableRipple: h,
|
|
810
|
+
disableTouchRipple: m,
|
|
811
|
+
focusRipple: y,
|
|
812
|
+
tabIndex: S,
|
|
813
|
+
focusVisible: L
|
|
814
|
+
}, Ke = Et(me);
|
|
815
|
+
return /* @__PURE__ */ He(xt, {
|
|
816
|
+
as: J,
|
|
817
|
+
className: E(Ke.root, l),
|
|
818
|
+
ownerState: me,
|
|
819
|
+
onBlur: Ue,
|
|
820
|
+
onClick: R,
|
|
821
|
+
onContextMenu: Ie,
|
|
822
|
+
onFocus: _e,
|
|
823
|
+
onKeyDown: ze,
|
|
824
|
+
onKeyUp: Ae,
|
|
825
|
+
onMouseDown: Oe,
|
|
826
|
+
onMouseLeave: je,
|
|
827
|
+
onMouseUp: Ve,
|
|
828
|
+
onDragLeave: $e,
|
|
829
|
+
onTouchEnd: Le,
|
|
830
|
+
onTouchMove: Fe,
|
|
831
|
+
onTouchStart: Be,
|
|
832
|
+
ref: Ye,
|
|
833
|
+
tabIndex: f ? -1 : S,
|
|
834
|
+
type: B,
|
|
835
|
+
...q,
|
|
836
|
+
...K,
|
|
837
|
+
children: [a, Ne ? /* @__PURE__ */ D(ke, {
|
|
838
|
+
ref: De,
|
|
839
|
+
center: i,
|
|
840
|
+
...I
|
|
841
|
+
}) : null]
|
|
842
|
+
});
|
|
843
|
+
});
|
|
844
|
+
function k(e, t, n, o = !1) {
|
|
845
|
+
return te((s) => (n && n(s), o || e[t](s), !0));
|
|
846
|
+
}
|
|
847
|
+
process.env.NODE_ENV !== "production" && (Pt.propTypes = {
|
|
848
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
849
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
850
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
851
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
852
|
+
/**
|
|
853
|
+
* A ref for imperative actions.
|
|
854
|
+
* It currently only supports `focusVisible()` action.
|
|
855
|
+
*/
|
|
856
|
+
action: Qe,
|
|
857
|
+
/**
|
|
858
|
+
* If `true`, the ripples are centered.
|
|
859
|
+
* They won't start at the cursor interaction position.
|
|
860
|
+
* @default false
|
|
861
|
+
*/
|
|
862
|
+
centerRipple: r.bool,
|
|
863
|
+
/**
|
|
864
|
+
* The content of the component.
|
|
865
|
+
*/
|
|
866
|
+
children: r.node,
|
|
867
|
+
/**
|
|
868
|
+
* Override or extend the styles applied to the component.
|
|
869
|
+
*/
|
|
870
|
+
classes: r.object,
|
|
871
|
+
/**
|
|
872
|
+
* @ignore
|
|
873
|
+
*/
|
|
874
|
+
className: r.string,
|
|
875
|
+
/**
|
|
876
|
+
* The component used for the root node.
|
|
877
|
+
* Either a string to use a HTML element or a component.
|
|
878
|
+
*/
|
|
879
|
+
component: nt,
|
|
880
|
+
/**
|
|
881
|
+
* If `true`, the component is disabled.
|
|
882
|
+
* @default false
|
|
883
|
+
*/
|
|
884
|
+
disabled: r.bool,
|
|
885
|
+
/**
|
|
886
|
+
* If `true`, the ripple effect is disabled.
|
|
887
|
+
*
|
|
888
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
889
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
890
|
+
* @default false
|
|
891
|
+
*/
|
|
892
|
+
disableRipple: r.bool,
|
|
893
|
+
/**
|
|
894
|
+
* If `true`, the touch ripple effect is disabled.
|
|
895
|
+
* @default false
|
|
896
|
+
*/
|
|
897
|
+
disableTouchRipple: r.bool,
|
|
898
|
+
/**
|
|
899
|
+
* If `true`, the base button will have a keyboard focus ripple.
|
|
900
|
+
* @default false
|
|
901
|
+
*/
|
|
902
|
+
focusRipple: r.bool,
|
|
903
|
+
/**
|
|
904
|
+
* This prop can help identify which element has keyboard focus.
|
|
905
|
+
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
906
|
+
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
907
|
+
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
908
|
+
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
909
|
+
* if needed.
|
|
910
|
+
*/
|
|
911
|
+
focusVisibleClassName: r.string,
|
|
912
|
+
/**
|
|
913
|
+
* @ignore
|
|
914
|
+
*/
|
|
915
|
+
href: r.any,
|
|
916
|
+
/**
|
|
917
|
+
* The component used to render a link when the `href` prop is provided.
|
|
918
|
+
* @default 'a'
|
|
919
|
+
*/
|
|
920
|
+
LinkComponent: r.elementType,
|
|
921
|
+
/**
|
|
922
|
+
* @ignore
|
|
923
|
+
*/
|
|
924
|
+
onBlur: r.func,
|
|
925
|
+
/**
|
|
926
|
+
* @ignore
|
|
927
|
+
*/
|
|
928
|
+
onClick: r.func,
|
|
929
|
+
/**
|
|
930
|
+
* @ignore
|
|
931
|
+
*/
|
|
932
|
+
onContextMenu: r.func,
|
|
933
|
+
/**
|
|
934
|
+
* @ignore
|
|
935
|
+
*/
|
|
936
|
+
onDragLeave: r.func,
|
|
937
|
+
/**
|
|
938
|
+
* @ignore
|
|
939
|
+
*/
|
|
940
|
+
onFocus: r.func,
|
|
941
|
+
/**
|
|
942
|
+
* Callback fired when the component is focused with a keyboard.
|
|
943
|
+
* We trigger a `onFocus` callback too.
|
|
944
|
+
*/
|
|
945
|
+
onFocusVisible: r.func,
|
|
946
|
+
/**
|
|
947
|
+
* @ignore
|
|
948
|
+
*/
|
|
949
|
+
onKeyDown: r.func,
|
|
950
|
+
/**
|
|
951
|
+
* @ignore
|
|
952
|
+
*/
|
|
953
|
+
onKeyUp: r.func,
|
|
954
|
+
/**
|
|
955
|
+
* @ignore
|
|
956
|
+
*/
|
|
957
|
+
onMouseDown: r.func,
|
|
958
|
+
/**
|
|
959
|
+
* @ignore
|
|
960
|
+
*/
|
|
961
|
+
onMouseLeave: r.func,
|
|
962
|
+
/**
|
|
963
|
+
* @ignore
|
|
964
|
+
*/
|
|
965
|
+
onMouseUp: r.func,
|
|
966
|
+
/**
|
|
967
|
+
* @ignore
|
|
968
|
+
*/
|
|
969
|
+
onTouchEnd: r.func,
|
|
970
|
+
/**
|
|
971
|
+
* @ignore
|
|
972
|
+
*/
|
|
973
|
+
onTouchMove: r.func,
|
|
974
|
+
/**
|
|
975
|
+
* @ignore
|
|
976
|
+
*/
|
|
977
|
+
onTouchStart: r.func,
|
|
978
|
+
/**
|
|
979
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
980
|
+
*/
|
|
981
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
982
|
+
/**
|
|
983
|
+
* @default 0
|
|
984
|
+
*/
|
|
985
|
+
tabIndex: r.number,
|
|
986
|
+
/**
|
|
987
|
+
* Props applied to the `TouchRipple` element.
|
|
988
|
+
*/
|
|
989
|
+
TouchRippleProps: r.object,
|
|
990
|
+
/**
|
|
991
|
+
* A ref that points to the `TouchRipple` element.
|
|
992
|
+
*/
|
|
993
|
+
touchRippleRef: r.oneOfType([r.func, r.shape({
|
|
994
|
+
current: r.shape({
|
|
995
|
+
pulsate: r.func.isRequired,
|
|
996
|
+
start: r.func.isRequired,
|
|
997
|
+
stop: r.func.isRequired
|
|
998
|
+
})
|
|
999
|
+
})]),
|
|
1000
|
+
/**
|
|
1001
|
+
* @ignore
|
|
1002
|
+
*/
|
|
1003
|
+
type: r.oneOfType([r.oneOf(["button", "reset", "submit"]), r.string])
|
|
1004
|
+
});
|
|
1005
|
+
function wt(e) {
|
|
1006
|
+
return typeof e.main == "string";
|
|
1007
|
+
}
|
|
1008
|
+
function St(e, t = []) {
|
|
1009
|
+
if (!wt(e))
|
|
1010
|
+
return !1;
|
|
1011
|
+
for (const n of t)
|
|
1012
|
+
if (!e.hasOwnProperty(n) || typeof e[n] != "string")
|
|
1013
|
+
return !1;
|
|
1014
|
+
return !0;
|
|
1015
|
+
}
|
|
1016
|
+
function kt(e = []) {
|
|
1017
|
+
return ([, t]) => t && St(t, e);
|
|
1018
|
+
}
|
|
1019
|
+
function Dt(e) {
|
|
1020
|
+
return Te("MuiCircularProgress", e);
|
|
1021
|
+
}
|
|
1022
|
+
ce("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
|
|
1023
|
+
const $ = 44, ue = G`
|
|
1024
|
+
0% {
|
|
1025
|
+
transform: rotate(0deg);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
100% {
|
|
1029
|
+
transform: rotate(360deg);
|
|
1030
|
+
}
|
|
1031
|
+
`, le = G`
|
|
1032
|
+
0% {
|
|
1033
|
+
stroke-dasharray: 1px, 200px;
|
|
1034
|
+
stroke-dashoffset: 0;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
50% {
|
|
1038
|
+
stroke-dasharray: 100px, 200px;
|
|
1039
|
+
stroke-dashoffset: -15px;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
100% {
|
|
1043
|
+
stroke-dasharray: 1px, 200px;
|
|
1044
|
+
stroke-dashoffset: -126px;
|
|
1045
|
+
}
|
|
1046
|
+
`, Nt = typeof ue != "string" ? xe`
|
|
1047
|
+
animation: ${ue} 1.4s linear infinite;
|
|
1048
|
+
` : null, Ot = typeof le != "string" ? xe`
|
|
1049
|
+
animation: ${le} 1.4s ease-in-out infinite;
|
|
1050
|
+
` : null, It = (e) => {
|
|
1051
|
+
const {
|
|
1052
|
+
classes: t,
|
|
1053
|
+
variant: n,
|
|
1054
|
+
color: o,
|
|
1055
|
+
disableShrink: s
|
|
1056
|
+
} = e, i = {
|
|
1057
|
+
root: ["root", n, `color${ne(o)}`],
|
|
1058
|
+
svg: ["svg"],
|
|
1059
|
+
circle: ["circle", `circle${ne(n)}`, s && "circleDisableShrink"]
|
|
1060
|
+
};
|
|
1061
|
+
return Ce(i, Dt, t);
|
|
1062
|
+
}, $t = z("span", {
|
|
1063
|
+
name: "MuiCircularProgress",
|
|
1064
|
+
slot: "Root",
|
|
1065
|
+
overridesResolver: (e, t) => {
|
|
1066
|
+
const {
|
|
1067
|
+
ownerState: n
|
|
1068
|
+
} = e;
|
|
1069
|
+
return [t.root, t[n.variant], t[`color${ne(n.color)}`]];
|
|
1070
|
+
}
|
|
1071
|
+
})(Ee(({
|
|
1072
|
+
theme: e
|
|
1073
|
+
}) => ({
|
|
1074
|
+
display: "inline-block",
|
|
1075
|
+
variants: [{
|
|
1076
|
+
props: {
|
|
1077
|
+
variant: "determinate"
|
|
1078
|
+
},
|
|
1079
|
+
style: {
|
|
1080
|
+
transition: e.transitions.create("transform")
|
|
1081
|
+
}
|
|
1082
|
+
}, {
|
|
1083
|
+
props: {
|
|
1084
|
+
variant: "indeterminate"
|
|
1085
|
+
},
|
|
1086
|
+
style: Nt || {
|
|
1087
|
+
animation: `${ue} 1.4s linear infinite`
|
|
1088
|
+
}
|
|
1089
|
+
}, ...Object.entries(e.palette).filter(kt()).map(([t]) => ({
|
|
1090
|
+
props: {
|
|
1091
|
+
color: t
|
|
1092
|
+
},
|
|
1093
|
+
style: {
|
|
1094
|
+
color: (e.vars || e).palette[t].main
|
|
1095
|
+
}
|
|
1096
|
+
}))]
|
|
1097
|
+
}))), Vt = z("svg", {
|
|
1098
|
+
name: "MuiCircularProgress",
|
|
1099
|
+
slot: "Svg"
|
|
1100
|
+
})({
|
|
1101
|
+
display: "block"
|
|
1102
|
+
// Keeps the progress centered
|
|
1103
|
+
}), jt = z("circle", {
|
|
1104
|
+
name: "MuiCircularProgress",
|
|
1105
|
+
slot: "Circle",
|
|
1106
|
+
overridesResolver: (e, t) => {
|
|
1107
|
+
const {
|
|
1108
|
+
ownerState: n
|
|
1109
|
+
} = e;
|
|
1110
|
+
return [t.circle, t[`circle${ne(n.variant)}`], n.disableShrink && t.circleDisableShrink];
|
|
1111
|
+
}
|
|
1112
|
+
})(Ee(({
|
|
1113
|
+
theme: e
|
|
1114
|
+
}) => ({
|
|
1115
|
+
stroke: "currentColor",
|
|
1116
|
+
variants: [{
|
|
1117
|
+
props: {
|
|
1118
|
+
variant: "determinate"
|
|
1119
|
+
},
|
|
1120
|
+
style: {
|
|
1121
|
+
transition: e.transitions.create("stroke-dashoffset")
|
|
1122
|
+
}
|
|
1123
|
+
}, {
|
|
1124
|
+
props: {
|
|
1125
|
+
variant: "indeterminate"
|
|
1126
|
+
},
|
|
1127
|
+
style: {
|
|
1128
|
+
// Some default value that looks fine waiting for the animation to kicks in.
|
|
1129
|
+
strokeDasharray: "80px, 200px",
|
|
1130
|
+
strokeDashoffset: 0
|
|
1131
|
+
// Add the unit to fix a Edge 16 and below bug.
|
|
1132
|
+
}
|
|
1133
|
+
}, {
|
|
1134
|
+
props: ({
|
|
1135
|
+
ownerState: t
|
|
1136
|
+
}) => t.variant === "indeterminate" && !t.disableShrink,
|
|
1137
|
+
style: Ot || {
|
|
1138
|
+
// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
|
|
1139
|
+
animation: `${le} 1.4s ease-in-out infinite`
|
|
1140
|
+
}
|
|
1141
|
+
}]
|
|
1142
|
+
}))), Bt = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
1143
|
+
const o = pe({
|
|
1144
|
+
props: t,
|
|
1145
|
+
name: "MuiCircularProgress"
|
|
1146
|
+
}), {
|
|
1147
|
+
className: s,
|
|
1148
|
+
color: i = "primary",
|
|
1149
|
+
disableShrink: a = !1,
|
|
1150
|
+
size: l = 40,
|
|
1151
|
+
style: p,
|
|
1152
|
+
thickness: f = 3.6,
|
|
1153
|
+
value: h = 0,
|
|
1154
|
+
variant: m = "indeterminate",
|
|
1155
|
+
...y
|
|
1156
|
+
} = o, M = {
|
|
1157
|
+
...o,
|
|
1158
|
+
color: i,
|
|
1159
|
+
disableShrink: a,
|
|
1160
|
+
size: l,
|
|
1161
|
+
thickness: f,
|
|
1162
|
+
value: h,
|
|
1163
|
+
variant: m
|
|
1164
|
+
}, b = It(M), T = {}, R = {}, w = {};
|
|
1165
|
+
if (m === "determinate") {
|
|
1166
|
+
const V = 2 * Math.PI * (($ - f) / 2);
|
|
1167
|
+
T.strokeDasharray = V.toFixed(3), w["aria-valuenow"] = Math.round(h), T.strokeDashoffset = `${((100 - h) / 100 * V).toFixed(3)}px`, R.transform = "rotate(-90deg)";
|
|
1168
|
+
}
|
|
1169
|
+
return /* @__PURE__ */ D($t, {
|
|
1170
|
+
className: E(b.root, s),
|
|
1171
|
+
style: {
|
|
1172
|
+
width: l,
|
|
1173
|
+
height: l,
|
|
1174
|
+
...R,
|
|
1175
|
+
...p
|
|
1176
|
+
},
|
|
1177
|
+
ownerState: M,
|
|
1178
|
+
ref: n,
|
|
1179
|
+
role: "progressbar",
|
|
1180
|
+
...w,
|
|
1181
|
+
...y,
|
|
1182
|
+
children: /* @__PURE__ */ D(Vt, {
|
|
1183
|
+
className: b.svg,
|
|
1184
|
+
ownerState: M,
|
|
1185
|
+
viewBox: `${$ / 2} ${$ / 2} ${$} ${$}`,
|
|
1186
|
+
children: /* @__PURE__ */ D(jt, {
|
|
1187
|
+
className: b.circle,
|
|
1188
|
+
style: T,
|
|
1189
|
+
ownerState: M,
|
|
1190
|
+
cx: $,
|
|
1191
|
+
cy: $,
|
|
1192
|
+
r: ($ - f) / 2,
|
|
1193
|
+
fill: "none",
|
|
1194
|
+
strokeWidth: f
|
|
1195
|
+
})
|
|
1196
|
+
})
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
process.env.NODE_ENV !== "production" && (Bt.propTypes = {
|
|
1200
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
1201
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
1202
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
1203
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
1204
|
+
/**
|
|
1205
|
+
* Override or extend the styles applied to the component.
|
|
1206
|
+
*/
|
|
1207
|
+
classes: r.object,
|
|
1208
|
+
/**
|
|
1209
|
+
* @ignore
|
|
1210
|
+
*/
|
|
1211
|
+
className: r.string,
|
|
1212
|
+
/**
|
|
1213
|
+
* The color of the component.
|
|
1214
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
1215
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
1216
|
+
* @default 'primary'
|
|
1217
|
+
*/
|
|
1218
|
+
color: r.oneOfType([r.oneOf(["inherit", "primary", "secondary", "error", "info", "success", "warning"]), r.string]),
|
|
1219
|
+
/**
|
|
1220
|
+
* If `true`, the shrink animation is disabled.
|
|
1221
|
+
* This only works if variant is `indeterminate`.
|
|
1222
|
+
* @default false
|
|
1223
|
+
*/
|
|
1224
|
+
disableShrink: Pe(r.bool, (e) => e.disableShrink && e.variant && e.variant !== "indeterminate" ? new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect.") : null),
|
|
1225
|
+
/**
|
|
1226
|
+
* The size of the component.
|
|
1227
|
+
* If using a number, the pixel unit is assumed.
|
|
1228
|
+
* If using a string, you need to provide the CSS unit, for example '3rem'.
|
|
1229
|
+
* @default 40
|
|
1230
|
+
*/
|
|
1231
|
+
size: r.oneOfType([r.number, r.string]),
|
|
1232
|
+
/**
|
|
1233
|
+
* @ignore
|
|
1234
|
+
*/
|
|
1235
|
+
style: r.object,
|
|
1236
|
+
/**
|
|
1237
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1238
|
+
*/
|
|
1239
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
1240
|
+
/**
|
|
1241
|
+
* The thickness of the circle.
|
|
1242
|
+
* @default 3.6
|
|
1243
|
+
*/
|
|
1244
|
+
thickness: r.number,
|
|
1245
|
+
/**
|
|
1246
|
+
* The value of the progress indicator for the determinate variant.
|
|
1247
|
+
* Value between 0 and 100.
|
|
1248
|
+
* @default 0
|
|
1249
|
+
*/
|
|
1250
|
+
value: r.number,
|
|
1251
|
+
/**
|
|
1252
|
+
* The variant to use.
|
|
1253
|
+
* Use indeterminate when there is no progress value.
|
|
1254
|
+
* @default 'indeterminate'
|
|
1255
|
+
*/
|
|
1256
|
+
variant: r.oneOf(["determinate", "indeterminate"])
|
|
1257
|
+
});
|
|
1258
|
+
export {
|
|
1259
|
+
Pt as B,
|
|
1260
|
+
Bt as C,
|
|
1261
|
+
ve as T,
|
|
1262
|
+
st as _,
|
|
1263
|
+
Pe as a,
|
|
1264
|
+
ye as b,
|
|
1265
|
+
kt as c,
|
|
1266
|
+
Ge as d,
|
|
1267
|
+
it as e,
|
|
1268
|
+
te as f,
|
|
1269
|
+
nt as g,
|
|
1270
|
+
mt as h,
|
|
1271
|
+
ie as i,
|
|
1272
|
+
we as j,
|
|
1273
|
+
Qe as r,
|
|
1274
|
+
Yt as u
|
|
1275
|
+
};
|