@popmenu/common-ui 0.16.0 → 0.18.2
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/build/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/build/components/AudioPlayer/AudioPlayerProps.d.ts +4 -0
- package/build/components/AudioPlayer/index.d.ts +2 -0
- package/build/components/AudioPlayer/util/audioPlayerReducer.d.ts +11 -0
- package/build/components/AudioPlayer/util/formatTime.d.ts +1 -0
- package/build/components/AudioPlayer/util/index.d.ts +5 -0
- package/build/components/AudioPlayer/util/setupAudioRef.d.ts +8 -0
- package/build/components/AudioPlayer/util/types.d.ts +77 -0
- package/build/components/AudioPlayer/util/useVolumeIcon.d.ts +2 -0
- package/build/components/Box/index.d.ts +7 -2
- package/build/components/Table/TableProps.d.ts +2 -0
- package/build/components/index.d.ts +1 -0
- package/build/index.es.js +664 -1547
- package/build/index.es.js.map +1 -1
- package/build/index.js +667 -1544
- package/build/index.js.map +1 -1
- package/package.json +3 -2
package/build/index.js
CHANGED
|
@@ -6,8 +6,10 @@ var Alert = require('@material-ui/lab/Alert');
|
|
|
6
6
|
var core = require('@material-ui/core');
|
|
7
7
|
var AppBar = require('@material-ui/core/AppBar');
|
|
8
8
|
var React = require('react');
|
|
9
|
-
var
|
|
9
|
+
var MuiIconButton = require('@material-ui/core/IconButton');
|
|
10
|
+
var MuiTypography = require('@material-ui/core/Typography');
|
|
10
11
|
var styles = require('@material-ui/core/styles');
|
|
12
|
+
var MuiAvatar = require('@material-ui/core/Avatar');
|
|
11
13
|
var Badge = require('@material-ui/core/Badge');
|
|
12
14
|
var MuiButton = require('@material-ui/core/Button');
|
|
13
15
|
var CircularProgress = require('@material-ui/core/CircularProgress');
|
|
@@ -22,7 +24,6 @@ var MuiCheckbox = require('@material-ui/core/Checkbox');
|
|
|
22
24
|
var FormControlLabel = require('@material-ui/core/FormControlLabel');
|
|
23
25
|
var Chip = require('@material-ui/core/Chip');
|
|
24
26
|
var Collapse = require('@material-ui/core/Collapse');
|
|
25
|
-
var MuiTypography = require('@material-ui/core/Typography');
|
|
26
27
|
var Dialog = require('@material-ui/core/Dialog');
|
|
27
28
|
var DialogActions = require('@material-ui/core/DialogActions');
|
|
28
29
|
var DialogContent = require('@material-ui/core/DialogContent');
|
|
@@ -30,7 +31,6 @@ var DialogTitle = require('@material-ui/core/DialogTitle');
|
|
|
30
31
|
var Drawer = require('@material-ui/core/Drawer');
|
|
31
32
|
var FormControl = require('@material-ui/core/FormControl');
|
|
32
33
|
var Grid = require('@material-ui/core/Grid');
|
|
33
|
-
var MuiIconButton = require('@material-ui/core/IconButton');
|
|
34
34
|
var InputAdornment = require('@material-ui/core/InputAdornment');
|
|
35
35
|
var LinearProgress = require('@material-ui/core/LinearProgress');
|
|
36
36
|
var MuiLink = require('@material-ui/core/Link');
|
|
@@ -76,8 +76,10 @@ function _interopNamespace(e) {
|
|
|
76
76
|
|
|
77
77
|
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
78
78
|
var AppBar__default = /*#__PURE__*/_interopDefaultLegacy(AppBar);
|
|
79
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
80
79
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
80
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
81
|
+
var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
82
|
+
var MuiTypography__default = /*#__PURE__*/_interopDefaultLegacy(MuiTypography);
|
|
81
83
|
var MuiAvatar__default = /*#__PURE__*/_interopDefaultLegacy(MuiAvatar);
|
|
82
84
|
var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
|
|
83
85
|
var MuiButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiButton);
|
|
@@ -93,7 +95,6 @@ var MuiCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(MuiCheckbox);
|
|
|
93
95
|
var FormControlLabel__default = /*#__PURE__*/_interopDefaultLegacy(FormControlLabel);
|
|
94
96
|
var Chip__default = /*#__PURE__*/_interopDefaultLegacy(Chip);
|
|
95
97
|
var Collapse__default = /*#__PURE__*/_interopDefaultLegacy(Collapse);
|
|
96
|
-
var MuiTypography__default = /*#__PURE__*/_interopDefaultLegacy(MuiTypography);
|
|
97
98
|
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
|
98
99
|
var DialogActions__default = /*#__PURE__*/_interopDefaultLegacy(DialogActions);
|
|
99
100
|
var DialogContent__default = /*#__PURE__*/_interopDefaultLegacy(DialogContent);
|
|
@@ -101,7 +102,6 @@ var DialogTitle__default = /*#__PURE__*/_interopDefaultLegacy(DialogTitle);
|
|
|
101
102
|
var Drawer__default = /*#__PURE__*/_interopDefaultLegacy(Drawer);
|
|
102
103
|
var FormControl__default = /*#__PURE__*/_interopDefaultLegacy(FormControl);
|
|
103
104
|
var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
|
|
104
|
-
var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
105
105
|
var InputAdornment__default = /*#__PURE__*/_interopDefaultLegacy(InputAdornment);
|
|
106
106
|
var LinearProgress__default = /*#__PURE__*/_interopDefaultLegacy(LinearProgress);
|
|
107
107
|
var MuiLink__default = /*#__PURE__*/_interopDefaultLegacy(MuiLink);
|
|
@@ -170,1436 +170,710 @@ function __spreadArray(to, from, pack) {
|
|
|
170
170
|
return to.concat(ar || from);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
var
|
|
174
|
-
(function (LoadingStatus) {
|
|
175
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
176
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
177
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
178
|
-
})(LoadingStatus || (LoadingStatus = {}));
|
|
179
|
-
/**
|
|
180
|
-
* Hook returns [imgProps, loaded]
|
|
181
|
-
* ref: Merged default and provided imgProp object. Includes load and error events for img tag. To be passed to MuiAvatar.
|
|
182
|
-
* loaded: Indicates whether the src supplied to an img within Avatar results in loaded or error
|
|
183
|
-
*/
|
|
184
|
-
var useImgProps = function (avatarProps) {
|
|
185
|
-
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
186
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onError: function (event) {
|
|
187
|
-
var _a, _b;
|
|
188
|
-
setLoaded(LoadingStatus.ERROR);
|
|
189
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
190
|
-
}, onLoad: function (event) {
|
|
191
|
-
var _a, _b;
|
|
192
|
-
setLoaded(LoadingStatus.LOADED);
|
|
193
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
194
|
-
} });
|
|
195
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
196
|
-
};
|
|
173
|
+
var _path$3K;
|
|
197
174
|
|
|
198
|
-
|
|
199
|
-
var factors = {
|
|
200
|
-
'extra-small': 3,
|
|
201
|
-
small: 4,
|
|
202
|
-
medium: 5,
|
|
203
|
-
large: 6,
|
|
204
|
-
'extra-large': 12.5,
|
|
205
|
-
};
|
|
206
|
-
var sizeFactor = factors[props.size || 'medium'];
|
|
207
|
-
return theme.spacing(sizeFactor);
|
|
208
|
-
};
|
|
209
|
-
var getAvatarFontSize = function (props) {
|
|
210
|
-
var fontSizes = {
|
|
211
|
-
'extra-small': '0.75rem',
|
|
212
|
-
small: '1rem',
|
|
213
|
-
medium: '1rem',
|
|
214
|
-
large: '1.25rem',
|
|
215
|
-
'extra-large': '3.5rem',
|
|
216
|
-
};
|
|
217
|
-
return fontSizes[props.size || 'medium'];
|
|
218
|
-
};
|
|
219
|
-
var getAvatarBackground = function (props) {
|
|
220
|
-
var src = props.src, loaded = props.loaded;
|
|
221
|
-
var background = props.background;
|
|
222
|
-
if (src && loaded === LoadingStatus.LOADED) {
|
|
223
|
-
background = 'transparent';
|
|
224
|
-
}
|
|
225
|
-
return background;
|
|
226
|
-
};
|
|
227
|
-
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
228
|
-
root: {
|
|
229
|
-
width: function (props) { return getAvatarDimensions(theme, props); },
|
|
230
|
-
height: function (props) { return getAvatarDimensions(theme, props); },
|
|
231
|
-
fontSize: function (props) { return getAvatarFontSize(props); },
|
|
232
|
-
backgroundColor: function (props) { return getAvatarBackground(props); },
|
|
233
|
-
color: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
234
|
-
objectFit: function (props) { return props.fit; },
|
|
235
|
-
},
|
|
236
|
-
silhouette: {
|
|
237
|
-
'& path': {
|
|
238
|
-
fill: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
}); });
|
|
175
|
+
function _extends$3$() { _extends$3$ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3$.apply(this, arguments); }
|
|
242
176
|
|
|
243
|
-
|
|
177
|
+
function SvgMore(props) {
|
|
178
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3$({
|
|
179
|
+
viewBox: "0 0 16 16",
|
|
180
|
+
strokeLinecap: "round",
|
|
181
|
+
strokeLinejoin: "round",
|
|
182
|
+
stroke: "currentColor",
|
|
183
|
+
width: "1em",
|
|
184
|
+
height: "1em",
|
|
185
|
+
fill: "none"
|
|
186
|
+
}, props), _path$3K || (_path$3K = /*#__PURE__*/React__namespace.createElement("path", {
|
|
187
|
+
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
|
|
188
|
+
})));
|
|
189
|
+
}
|
|
244
190
|
|
|
245
|
-
|
|
191
|
+
var _path$2X;
|
|
246
192
|
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
193
|
+
function _extends$3b() { _extends$3b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3b.apply(this, arguments); }
|
|
194
|
+
|
|
195
|
+
function SvgChevronDown(props) {
|
|
196
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3b({
|
|
197
|
+
viewBox: "0 0 16 16",
|
|
198
|
+
strokeLinecap: "round",
|
|
199
|
+
strokeLinejoin: "round",
|
|
200
|
+
stroke: "currentColor",
|
|
201
|
+
width: "1em",
|
|
202
|
+
height: "1em",
|
|
203
|
+
fill: "none"
|
|
204
|
+
}, props), _path$2X || (_path$2X = /*#__PURE__*/React__namespace.createElement("path", {
|
|
205
|
+
d: "M4 6l4 4 4-4"
|
|
255
206
|
})));
|
|
256
207
|
}
|
|
257
208
|
|
|
258
|
-
var _path$
|
|
209
|
+
var _path$2W;
|
|
259
210
|
|
|
260
|
-
function _extends$
|
|
211
|
+
function _extends$3a() { _extends$3a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3a.apply(this, arguments); }
|
|
261
212
|
|
|
262
|
-
function
|
|
263
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
264
|
-
viewBox: "0 0
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
213
|
+
function SvgChevronUp(props) {
|
|
214
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3a({
|
|
215
|
+
viewBox: "0 0 16 16",
|
|
216
|
+
strokeLinecap: "round",
|
|
217
|
+
strokeLinejoin: "round",
|
|
218
|
+
stroke: "currentColor",
|
|
219
|
+
width: "1em",
|
|
220
|
+
height: "1em",
|
|
221
|
+
fill: "none"
|
|
222
|
+
}, props), _path$2W || (_path$2W = /*#__PURE__*/React__namespace.createElement("path", {
|
|
223
|
+
d: "M12 10L8 6l-4 4"
|
|
270
224
|
})));
|
|
271
225
|
}
|
|
272
226
|
|
|
273
|
-
var _path;
|
|
227
|
+
var _path$1f;
|
|
274
228
|
|
|
275
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
229
|
+
function _extends$1p() { _extends$1p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1p.apply(this, arguments); }
|
|
276
230
|
|
|
277
|
-
function
|
|
278
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
279
|
-
viewBox: "0 0
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
231
|
+
function SvgPause(props) {
|
|
232
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1p({
|
|
233
|
+
viewBox: "0 0 16 16",
|
|
234
|
+
strokeLinecap: "round",
|
|
235
|
+
strokeLinejoin: "round",
|
|
236
|
+
stroke: "currentColor",
|
|
237
|
+
width: "1em",
|
|
238
|
+
height: "1em",
|
|
239
|
+
fill: "none"
|
|
240
|
+
}, props), _path$1f || (_path$1f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
241
|
+
d: "M6.667 2.667H4v10.666h2.667V2.667zm5.333 0H9.333v10.666H12V2.667z"
|
|
287
242
|
})));
|
|
288
243
|
}
|
|
289
244
|
|
|
290
|
-
var
|
|
291
|
-
female: SvgSilhouetteFemale,
|
|
292
|
-
male: SvgSilhouetteMale,
|
|
293
|
-
neutral: SvgSilhouetteNeutral,
|
|
294
|
-
};
|
|
295
|
-
var Avatar = React.forwardRef(function (props, ref) {
|
|
296
|
-
var children = props.children, _a = props.silhouette, silhouette = _a === void 0 ? 'neutral' : _a, muiProps = __rest(props, ["children", "silhouette"]);
|
|
297
|
-
var _b = useImgProps(props), imgProps = _b.imgProps, loaded = _b.loaded;
|
|
298
|
-
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
299
|
-
var Silhouette = silhouettes[silhouette];
|
|
300
|
-
var fallback = muiProps.src || silhouette === 'none' ? '' : React__default['default'].createElement(Silhouette, { className: classes.silhouette });
|
|
301
|
-
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root } }, muiProps, imgProps), children || fallback));
|
|
302
|
-
});
|
|
303
|
-
Avatar.defaultProps = {
|
|
304
|
-
size: 'medium',
|
|
305
|
-
fit: 'cover',
|
|
306
|
-
background: '#E0E0E0',
|
|
307
|
-
silhouette: 'neutral',
|
|
308
|
-
};
|
|
309
|
-
Avatar.displayName = 'Avatar';
|
|
310
|
-
|
|
311
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
245
|
+
var _path$1d;
|
|
312
246
|
|
|
313
|
-
var
|
|
247
|
+
function _extends$1n() { _extends$1n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1n.apply(this, arguments); }
|
|
314
248
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
249
|
+
function SvgPlay(props) {
|
|
250
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1n({
|
|
251
|
+
viewBox: "0 0 16 16",
|
|
252
|
+
strokeLinecap: "round",
|
|
253
|
+
strokeLinejoin: "round",
|
|
254
|
+
stroke: "currentColor",
|
|
255
|
+
width: "1em",
|
|
256
|
+
height: "1em",
|
|
257
|
+
fill: "none"
|
|
258
|
+
}, props), _path$1d || (_path$1d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
259
|
+
d: "M3.333 2l9.334 6-9.334 6V2z"
|
|
260
|
+
})));
|
|
261
|
+
}
|
|
320
262
|
|
|
321
|
-
|
|
322
|
-
/* global define */
|
|
263
|
+
var _path$10;
|
|
323
264
|
|
|
324
|
-
(function () {
|
|
265
|
+
function _extends$1a() { _extends$1a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1a.apply(this, arguments); }
|
|
325
266
|
|
|
326
|
-
|
|
267
|
+
function SvgVolumeDown(props) {
|
|
268
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1a({
|
|
269
|
+
viewBox: "0 0 16 16",
|
|
270
|
+
strokeLinecap: "round",
|
|
271
|
+
strokeLinejoin: "round",
|
|
272
|
+
stroke: "currentColor",
|
|
273
|
+
width: "1em",
|
|
274
|
+
height: "1em",
|
|
275
|
+
fill: "none"
|
|
276
|
+
}, props), _path$10 || (_path$10 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
277
|
+
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.713"
|
|
278
|
+
})));
|
|
279
|
+
}
|
|
327
280
|
|
|
328
|
-
|
|
329
|
-
var classes = [];
|
|
281
|
+
var _path$$;
|
|
330
282
|
|
|
331
|
-
|
|
332
|
-
var arg = arguments[i];
|
|
333
|
-
if (!arg) continue;
|
|
283
|
+
function _extends$19() { _extends$19 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$19.apply(this, arguments); }
|
|
334
284
|
|
|
335
|
-
|
|
285
|
+
function SvgVolumeMute(props) {
|
|
286
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$19({
|
|
287
|
+
viewBox: "0 0 16 16",
|
|
288
|
+
strokeLinecap: "round",
|
|
289
|
+
strokeLinejoin: "round",
|
|
290
|
+
stroke: "currentColor",
|
|
291
|
+
width: "1em",
|
|
292
|
+
height: "1em",
|
|
293
|
+
fill: "none"
|
|
294
|
+
}, props), _path$$ || (_path$$ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
295
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z"
|
|
296
|
+
})));
|
|
297
|
+
}
|
|
336
298
|
|
|
337
|
-
|
|
338
|
-
classes.push(arg);
|
|
339
|
-
} else if (Array.isArray(arg)) {
|
|
340
|
-
if (arg.length) {
|
|
341
|
-
var inner = classNames.apply(null, arg);
|
|
342
|
-
if (inner) {
|
|
343
|
-
classes.push(inner);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
} else if (argType === 'object') {
|
|
347
|
-
if (arg.toString === Object.prototype.toString) {
|
|
348
|
-
for (var key in arg) {
|
|
349
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
350
|
-
classes.push(key);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
} else {
|
|
354
|
-
classes.push(arg.toString());
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
299
|
+
var _path$_;
|
|
358
300
|
|
|
359
|
-
|
|
360
|
-
}
|
|
301
|
+
function _extends$18() { _extends$18 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
|
|
361
302
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
if (key in obj) {
|
|
375
|
-
Object.defineProperty(obj, key, {
|
|
376
|
-
value: value,
|
|
377
|
-
enumerable: true,
|
|
378
|
-
configurable: true,
|
|
379
|
-
writable: true
|
|
380
|
-
});
|
|
381
|
-
} else {
|
|
382
|
-
obj[key] = value;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return obj;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
var propTypes = {exports: {}};
|
|
389
|
-
|
|
390
|
-
var reactIs = {exports: {}};
|
|
391
|
-
|
|
392
|
-
var reactIs_production_min = {};
|
|
393
|
-
|
|
394
|
-
/** @license React v16.13.1
|
|
395
|
-
* react-is.production.min.js
|
|
396
|
-
*
|
|
397
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
398
|
-
*
|
|
399
|
-
* This source code is licensed under the MIT license found in the
|
|
400
|
-
* LICENSE file in the root directory of this source tree.
|
|
401
|
-
*/
|
|
402
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
403
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
404
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
405
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
406
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
407
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
408
|
-
|
|
409
|
-
var reactIs_development = {};
|
|
410
|
-
|
|
411
|
-
/** @license React v16.13.1
|
|
412
|
-
* react-is.development.js
|
|
413
|
-
*
|
|
414
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
415
|
-
*
|
|
416
|
-
* This source code is licensed under the MIT license found in the
|
|
417
|
-
* LICENSE file in the root directory of this source tree.
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (process.env.NODE_ENV !== "production") {
|
|
423
|
-
(function() {
|
|
424
|
-
|
|
425
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
426
|
-
// nor polyfill, then a plain number is used for performance.
|
|
427
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
428
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
429
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
430
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
431
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
432
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
433
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
434
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
435
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
436
|
-
|
|
437
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
438
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
439
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
440
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
441
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
442
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
443
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
444
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
445
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
446
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
447
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
448
|
-
|
|
449
|
-
function isValidElementType(type) {
|
|
450
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
451
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
303
|
+
function SvgVolumeOff(props) {
|
|
304
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$18({
|
|
305
|
+
viewBox: "0 0 16 16",
|
|
306
|
+
strokeLinecap: "round",
|
|
307
|
+
strokeLinejoin: "round",
|
|
308
|
+
stroke: "currentColor",
|
|
309
|
+
width: "1em",
|
|
310
|
+
height: "1em",
|
|
311
|
+
fill: "none"
|
|
312
|
+
}, props), _path$_ || (_path$_ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
313
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4"
|
|
314
|
+
})));
|
|
452
315
|
}
|
|
453
316
|
|
|
454
|
-
|
|
455
|
-
if (typeof object === 'object' && object !== null) {
|
|
456
|
-
var $$typeof = object.$$typeof;
|
|
457
|
-
|
|
458
|
-
switch ($$typeof) {
|
|
459
|
-
case REACT_ELEMENT_TYPE:
|
|
460
|
-
var type = object.type;
|
|
461
|
-
|
|
462
|
-
switch (type) {
|
|
463
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
464
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
465
|
-
case REACT_FRAGMENT_TYPE:
|
|
466
|
-
case REACT_PROFILER_TYPE:
|
|
467
|
-
case REACT_STRICT_MODE_TYPE:
|
|
468
|
-
case REACT_SUSPENSE_TYPE:
|
|
469
|
-
return type;
|
|
470
|
-
|
|
471
|
-
default:
|
|
472
|
-
var $$typeofType = type && type.$$typeof;
|
|
473
|
-
|
|
474
|
-
switch ($$typeofType) {
|
|
475
|
-
case REACT_CONTEXT_TYPE:
|
|
476
|
-
case REACT_FORWARD_REF_TYPE:
|
|
477
|
-
case REACT_LAZY_TYPE:
|
|
478
|
-
case REACT_MEMO_TYPE:
|
|
479
|
-
case REACT_PROVIDER_TYPE:
|
|
480
|
-
return $$typeofType;
|
|
481
|
-
|
|
482
|
-
default:
|
|
483
|
-
return $$typeof;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
case REACT_PORTAL_TYPE:
|
|
489
|
-
return $$typeof;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
return undefined;
|
|
494
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
495
|
-
|
|
496
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
497
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
498
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
499
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
500
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
501
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
502
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
503
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
504
|
-
var Memo = REACT_MEMO_TYPE;
|
|
505
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
506
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
507
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
508
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
509
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
510
|
-
|
|
511
|
-
function isAsyncMode(object) {
|
|
512
|
-
{
|
|
513
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
514
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
515
|
-
|
|
516
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
521
|
-
}
|
|
522
|
-
function isConcurrentMode(object) {
|
|
523
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
524
|
-
}
|
|
525
|
-
function isContextConsumer(object) {
|
|
526
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
527
|
-
}
|
|
528
|
-
function isContextProvider(object) {
|
|
529
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
530
|
-
}
|
|
531
|
-
function isElement(object) {
|
|
532
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
533
|
-
}
|
|
534
|
-
function isForwardRef(object) {
|
|
535
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
536
|
-
}
|
|
537
|
-
function isFragment(object) {
|
|
538
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
539
|
-
}
|
|
540
|
-
function isLazy(object) {
|
|
541
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
542
|
-
}
|
|
543
|
-
function isMemo(object) {
|
|
544
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
545
|
-
}
|
|
546
|
-
function isPortal(object) {
|
|
547
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
548
|
-
}
|
|
549
|
-
function isProfiler(object) {
|
|
550
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
551
|
-
}
|
|
552
|
-
function isStrictMode(object) {
|
|
553
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
554
|
-
}
|
|
555
|
-
function isSuspense(object) {
|
|
556
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
557
|
-
}
|
|
317
|
+
var _path$Z;
|
|
558
318
|
|
|
559
|
-
|
|
560
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
561
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
562
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
563
|
-
reactIs_development.Element = Element;
|
|
564
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
565
|
-
reactIs_development.Fragment = Fragment;
|
|
566
|
-
reactIs_development.Lazy = Lazy;
|
|
567
|
-
reactIs_development.Memo = Memo;
|
|
568
|
-
reactIs_development.Portal = Portal;
|
|
569
|
-
reactIs_development.Profiler = Profiler;
|
|
570
|
-
reactIs_development.StrictMode = StrictMode;
|
|
571
|
-
reactIs_development.Suspense = Suspense;
|
|
572
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
573
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
574
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
575
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
576
|
-
reactIs_development.isElement = isElement;
|
|
577
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
578
|
-
reactIs_development.isFragment = isFragment;
|
|
579
|
-
reactIs_development.isLazy = isLazy;
|
|
580
|
-
reactIs_development.isMemo = isMemo;
|
|
581
|
-
reactIs_development.isPortal = isPortal;
|
|
582
|
-
reactIs_development.isProfiler = isProfiler;
|
|
583
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
584
|
-
reactIs_development.isSuspense = isSuspense;
|
|
585
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
586
|
-
reactIs_development.typeOf = typeOf;
|
|
587
|
-
})();
|
|
588
|
-
}
|
|
319
|
+
function _extends$17() { _extends$17 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
|
|
589
320
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
321
|
+
function SvgVolumeUp(props) {
|
|
322
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$17({
|
|
323
|
+
viewBox: "0 0 16 16",
|
|
324
|
+
strokeLinecap: "round",
|
|
325
|
+
strokeLinejoin: "round",
|
|
326
|
+
stroke: "currentColor",
|
|
327
|
+
width: "1em",
|
|
328
|
+
height: "1em",
|
|
329
|
+
fill: "none"
|
|
330
|
+
}, props), _path$Z || (_path$Z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
331
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm5.38-.046a6.667 6.667 0 010 9.426M10.36 5.64a3.333 3.333 0 010 4.713"
|
|
332
|
+
})));
|
|
594
333
|
}
|
|
595
334
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
(
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
335
|
+
var useIconStyles = core.makeStyles(function (_a) {
|
|
336
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
337
|
+
var getFontSize = function (_a) {
|
|
338
|
+
var size = _a.size;
|
|
339
|
+
var sizes = {
|
|
340
|
+
inherit: 'inherit',
|
|
341
|
+
small: spacing(1.5),
|
|
342
|
+
medium: spacing(2),
|
|
343
|
+
large: spacing(2.5),
|
|
344
|
+
'extra-large': spacing(3),
|
|
345
|
+
};
|
|
346
|
+
return size ? sizes[size] : 'inherit';
|
|
347
|
+
};
|
|
348
|
+
var getColor = function (props) {
|
|
349
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
350
|
+
var value = 'inherit';
|
|
351
|
+
if (props.color) {
|
|
352
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
353
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
354
|
+
value = palette[color][variant];
|
|
355
|
+
}
|
|
356
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
357
|
+
value = props.color;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return value;
|
|
361
|
+
};
|
|
362
|
+
return {
|
|
363
|
+
root: {
|
|
364
|
+
color: getColor,
|
|
365
|
+
fontSize: getFontSize,
|
|
366
|
+
strokeWidth: '1.3px',
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
});
|
|
613
370
|
|
|
614
|
-
|
|
615
|
-
try {
|
|
616
|
-
if (!Object.assign) {
|
|
617
|
-
return false;
|
|
618
|
-
}
|
|
371
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
619
372
|
|
|
620
|
-
|
|
373
|
+
var classnames = {exports: {}};
|
|
621
374
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
375
|
+
/*!
|
|
376
|
+
Copyright (c) 2018 Jed Watson.
|
|
377
|
+
Licensed under the MIT License (MIT), see
|
|
378
|
+
http://jedwatson.github.io/classnames
|
|
379
|
+
*/
|
|
628
380
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
for (var i = 0; i < 10; i++) {
|
|
632
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
633
|
-
}
|
|
634
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
635
|
-
return test2[n];
|
|
636
|
-
});
|
|
637
|
-
if (order2.join('') !== '0123456789') {
|
|
638
|
-
return false;
|
|
639
|
-
}
|
|
381
|
+
(function (module) {
|
|
382
|
+
/* global define */
|
|
640
383
|
|
|
641
|
-
|
|
642
|
-
var test3 = {};
|
|
643
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
644
|
-
test3[letter] = letter;
|
|
645
|
-
});
|
|
646
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
647
|
-
'abcdefghijklmnopqrst') {
|
|
648
|
-
return false;
|
|
649
|
-
}
|
|
384
|
+
(function () {
|
|
650
385
|
|
|
651
|
-
|
|
652
|
-
} catch (err) {
|
|
653
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
654
|
-
return false;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
386
|
+
var hasOwn = {}.hasOwnProperty;
|
|
657
387
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
var to = toObject(target);
|
|
661
|
-
var symbols;
|
|
388
|
+
function classNames() {
|
|
389
|
+
var classes = [];
|
|
662
390
|
|
|
663
|
-
|
|
664
|
-
|
|
391
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
392
|
+
var arg = arguments[i];
|
|
393
|
+
if (!arg) continue;
|
|
665
394
|
|
|
666
|
-
|
|
667
|
-
if (hasOwnProperty.call(from, key)) {
|
|
668
|
-
to[key] = from[key];
|
|
669
|
-
}
|
|
670
|
-
}
|
|
395
|
+
var argType = typeof arg;
|
|
671
396
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (
|
|
676
|
-
|
|
397
|
+
if (argType === 'string' || argType === 'number') {
|
|
398
|
+
classes.push(arg);
|
|
399
|
+
} else if (Array.isArray(arg)) {
|
|
400
|
+
if (arg.length) {
|
|
401
|
+
var inner = classNames.apply(null, arg);
|
|
402
|
+
if (inner) {
|
|
403
|
+
classes.push(inner);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
} else if (argType === 'object') {
|
|
407
|
+
if (arg.toString === Object.prototype.toString) {
|
|
408
|
+
for (var key in arg) {
|
|
409
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
410
|
+
classes.push(key);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
} else {
|
|
414
|
+
classes.push(arg.toString());
|
|
677
415
|
}
|
|
678
416
|
}
|
|
679
417
|
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
return to;
|
|
683
|
-
};
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
687
|
-
*
|
|
688
|
-
* This source code is licensed under the MIT license found in the
|
|
689
|
-
* LICENSE file in the root directory of this source tree.
|
|
690
|
-
*/
|
|
691
|
-
|
|
692
|
-
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
693
|
-
|
|
694
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
695
418
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
*
|
|
699
|
-
* This source code is licensed under the MIT license found in the
|
|
700
|
-
* LICENSE file in the root directory of this source tree.
|
|
701
|
-
*/
|
|
702
|
-
|
|
703
|
-
var printWarning$1 = function() {};
|
|
704
|
-
|
|
705
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
706
|
-
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
707
|
-
var loggedTypeFailures = {};
|
|
708
|
-
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
709
|
-
|
|
710
|
-
printWarning$1 = function(text) {
|
|
711
|
-
var message = 'Warning: ' + text;
|
|
712
|
-
if (typeof console !== 'undefined') {
|
|
713
|
-
console.error(message);
|
|
714
|
-
}
|
|
715
|
-
try {
|
|
716
|
-
// --- Welcome to debugging React ---
|
|
717
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
718
|
-
// to find the callsite that caused this warning to fire.
|
|
719
|
-
throw new Error(message);
|
|
720
|
-
} catch (x) {}
|
|
721
|
-
};
|
|
722
|
-
}
|
|
419
|
+
return classes.join(' ');
|
|
420
|
+
}
|
|
723
421
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
* @param {?Function} getStack Returns the component stack.
|
|
733
|
-
* @private
|
|
734
|
-
*/
|
|
735
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
736
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
737
|
-
for (var typeSpecName in typeSpecs) {
|
|
738
|
-
if (has$1(typeSpecs, typeSpecName)) {
|
|
739
|
-
var error;
|
|
740
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
741
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
742
|
-
// After these have been cleaned up, we'll let them throw.
|
|
743
|
-
try {
|
|
744
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
745
|
-
// behavior as without this statement except with a better message.
|
|
746
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
747
|
-
var err = Error(
|
|
748
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
749
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
750
|
-
);
|
|
751
|
-
err.name = 'Invariant Violation';
|
|
752
|
-
throw err;
|
|
753
|
-
}
|
|
754
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
755
|
-
} catch (ex) {
|
|
756
|
-
error = ex;
|
|
757
|
-
}
|
|
758
|
-
if (error && !(error instanceof Error)) {
|
|
759
|
-
printWarning$1(
|
|
760
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
761
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
762
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
763
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
764
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
765
|
-
'shape all require an argument).'
|
|
766
|
-
);
|
|
767
|
-
}
|
|
768
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
769
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
770
|
-
// same error.
|
|
771
|
-
loggedTypeFailures[error.message] = true;
|
|
422
|
+
if (module.exports) {
|
|
423
|
+
classNames.default = classNames;
|
|
424
|
+
module.exports = classNames;
|
|
425
|
+
} else {
|
|
426
|
+
window.classNames = classNames;
|
|
427
|
+
}
|
|
428
|
+
}());
|
|
429
|
+
}(classnames));
|
|
772
430
|
|
|
773
|
-
|
|
431
|
+
var classNames = classnames.exports;
|
|
774
432
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
}
|
|
433
|
+
var iconStaticClassName = 'pop-icon';
|
|
434
|
+
var Icon = function (props) {
|
|
435
|
+
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
436
|
+
var classes = useIconStyles(props);
|
|
437
|
+
var isValid = true;
|
|
438
|
+
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
439
|
+
isValid = false;
|
|
440
|
+
}
|
|
441
|
+
return isValid
|
|
442
|
+
? React.createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
|
|
443
|
+
: null;
|
|
444
|
+
};
|
|
445
|
+
Icon.defaultProps = {
|
|
446
|
+
size: 'inherit',
|
|
447
|
+
color: 'inherit',
|
|
448
|
+
};
|
|
449
|
+
Icon.displayName = 'Icon';
|
|
783
450
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
791
|
-
loggedTypeFailures = {};
|
|
792
|
-
}
|
|
451
|
+
var IconButton = React.forwardRef(function (props, ref) {
|
|
452
|
+
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
453
|
+
});
|
|
454
|
+
IconButton.displayName = 'IconButton';
|
|
455
|
+
IconButton.defaultProps = {
|
|
456
|
+
color: 'secondary',
|
|
793
457
|
};
|
|
794
458
|
|
|
795
|
-
var
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
printWarning = function(text) {
|
|
815
|
-
var message = 'Warning: ' + text;
|
|
816
|
-
if (typeof console !== 'undefined') {
|
|
817
|
-
console.error(message);
|
|
818
|
-
}
|
|
819
|
-
try {
|
|
820
|
-
// --- Welcome to debugging React ---
|
|
821
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
822
|
-
// to find the callsite that caused this warning to fire.
|
|
823
|
-
throw new Error(message);
|
|
824
|
-
} catch (x) {}
|
|
825
|
-
};
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
function emptyFunctionThatReturnsNull() {
|
|
829
|
-
return null;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
833
|
-
/* global Symbol */
|
|
834
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
835
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
836
|
-
|
|
837
|
-
/**
|
|
838
|
-
* Returns the iterator method function contained on the iterable object.
|
|
839
|
-
*
|
|
840
|
-
* Be sure to invoke the function with the iterable as context:
|
|
841
|
-
*
|
|
842
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
843
|
-
* if (iteratorFn) {
|
|
844
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
845
|
-
* ...
|
|
846
|
-
* }
|
|
847
|
-
*
|
|
848
|
-
* @param {?object} maybeIterable
|
|
849
|
-
* @return {?function}
|
|
850
|
-
*/
|
|
851
|
-
function getIteratorFn(maybeIterable) {
|
|
852
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
853
|
-
if (typeof iteratorFn === 'function') {
|
|
854
|
-
return iteratorFn;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
860
|
-
* supplied to React components. Example usage:
|
|
861
|
-
*
|
|
862
|
-
* var Props = require('ReactPropTypes');
|
|
863
|
-
* var MyArticle = React.createClass({
|
|
864
|
-
* propTypes: {
|
|
865
|
-
* // An optional string prop named "description".
|
|
866
|
-
* description: Props.string,
|
|
867
|
-
*
|
|
868
|
-
* // A required enum prop named "category".
|
|
869
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
870
|
-
*
|
|
871
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
872
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
873
|
-
* },
|
|
874
|
-
* render: function() { ... }
|
|
875
|
-
* });
|
|
876
|
-
*
|
|
877
|
-
* A more formal specification of how these methods are used:
|
|
878
|
-
*
|
|
879
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
880
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
881
|
-
*
|
|
882
|
-
* Each and every declaration produces a function with the same signature. This
|
|
883
|
-
* allows the creation of custom validation functions. For example:
|
|
884
|
-
*
|
|
885
|
-
* var MyLink = React.createClass({
|
|
886
|
-
* propTypes: {
|
|
887
|
-
* // An optional string or URI prop named "href".
|
|
888
|
-
* href: function(props, propName, componentName) {
|
|
889
|
-
* var propValue = props[propName];
|
|
890
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
891
|
-
* !(propValue instanceof URI)) {
|
|
892
|
-
* return new Error(
|
|
893
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
894
|
-
* componentName
|
|
895
|
-
* );
|
|
896
|
-
* }
|
|
897
|
-
* }
|
|
898
|
-
* },
|
|
899
|
-
* render: function() {...}
|
|
900
|
-
* });
|
|
901
|
-
*
|
|
902
|
-
* @internal
|
|
903
|
-
*/
|
|
904
|
-
|
|
905
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
906
|
-
|
|
907
|
-
// Important!
|
|
908
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
909
|
-
var ReactPropTypes = {
|
|
910
|
-
array: createPrimitiveTypeChecker('array'),
|
|
911
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
912
|
-
func: createPrimitiveTypeChecker('function'),
|
|
913
|
-
number: createPrimitiveTypeChecker('number'),
|
|
914
|
-
object: createPrimitiveTypeChecker('object'),
|
|
915
|
-
string: createPrimitiveTypeChecker('string'),
|
|
916
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
917
|
-
|
|
918
|
-
any: createAnyTypeChecker(),
|
|
919
|
-
arrayOf: createArrayOfTypeChecker,
|
|
920
|
-
element: createElementTypeChecker(),
|
|
921
|
-
elementType: createElementTypeTypeChecker(),
|
|
922
|
-
instanceOf: createInstanceTypeChecker,
|
|
923
|
-
node: createNodeChecker(),
|
|
924
|
-
objectOf: createObjectOfTypeChecker,
|
|
925
|
-
oneOf: createEnumTypeChecker,
|
|
926
|
-
oneOfType: createUnionTypeChecker,
|
|
927
|
-
shape: createShapeTypeChecker,
|
|
928
|
-
exact: createStrictShapeTypeChecker,
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
933
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
934
|
-
*/
|
|
935
|
-
/*eslint-disable no-self-compare*/
|
|
936
|
-
function is(x, y) {
|
|
937
|
-
// SameValue algorithm
|
|
938
|
-
if (x === y) {
|
|
939
|
-
// Steps 1-5, 7-10
|
|
940
|
-
// Steps 6.b-6.e: +0 != -0
|
|
941
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
942
|
-
} else {
|
|
943
|
-
// Step 6.a: NaN == NaN
|
|
944
|
-
return x !== x && y !== y;
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
/*eslint-enable no-self-compare*/
|
|
948
|
-
|
|
949
|
-
/**
|
|
950
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
951
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
952
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
953
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
954
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
955
|
-
*/
|
|
956
|
-
function PropTypeError(message) {
|
|
957
|
-
this.message = message;
|
|
958
|
-
this.stack = '';
|
|
959
|
-
}
|
|
960
|
-
// Make `instanceof Error` still work for returned errors.
|
|
961
|
-
PropTypeError.prototype = Error.prototype;
|
|
962
|
-
|
|
963
|
-
function createChainableTypeChecker(validate) {
|
|
964
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
965
|
-
var manualPropTypeCallCache = {};
|
|
966
|
-
var manualPropTypeWarningCount = 0;
|
|
967
|
-
}
|
|
968
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
969
|
-
componentName = componentName || ANONYMOUS;
|
|
970
|
-
propFullName = propFullName || propName;
|
|
971
|
-
|
|
972
|
-
if (secret !== ReactPropTypesSecret$1) {
|
|
973
|
-
if (throwOnDirectAccess) {
|
|
974
|
-
// New behavior only for users of `prop-types` package
|
|
975
|
-
var err = new Error(
|
|
976
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
977
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
978
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
979
|
-
);
|
|
980
|
-
err.name = 'Invariant Violation';
|
|
981
|
-
throw err;
|
|
982
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
983
|
-
// Old behavior for people using React.PropTypes
|
|
984
|
-
var cacheKey = componentName + ':' + propName;
|
|
985
|
-
if (
|
|
986
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
987
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
988
|
-
manualPropTypeWarningCount < 3
|
|
989
|
-
) {
|
|
990
|
-
printWarning(
|
|
991
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
992
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
993
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
994
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
995
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
996
|
-
);
|
|
997
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
998
|
-
manualPropTypeWarningCount++;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
if (props[propName] == null) {
|
|
1003
|
-
if (isRequired) {
|
|
1004
|
-
if (props[propName] === null) {
|
|
1005
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1006
|
-
}
|
|
1007
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1008
|
-
}
|
|
1009
|
-
return null;
|
|
1010
|
-
} else {
|
|
1011
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
1016
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1017
|
-
|
|
1018
|
-
return chainedCheckType;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
1022
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1023
|
-
var propValue = props[propName];
|
|
1024
|
-
var propType = getPropType(propValue);
|
|
1025
|
-
if (propType !== expectedType) {
|
|
1026
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1027
|
-
// check, but we can offer a more precise error message here rather than
|
|
1028
|
-
// 'of type `object`'.
|
|
1029
|
-
var preciseType = getPreciseType(propValue);
|
|
1030
|
-
|
|
1031
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
1032
|
-
}
|
|
1033
|
-
return null;
|
|
1034
|
-
}
|
|
1035
|
-
return createChainableTypeChecker(validate);
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
function createAnyTypeChecker() {
|
|
1039
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
1043
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1044
|
-
if (typeof typeChecker !== 'function') {
|
|
1045
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1046
|
-
}
|
|
1047
|
-
var propValue = props[propName];
|
|
1048
|
-
if (!Array.isArray(propValue)) {
|
|
1049
|
-
var propType = getPropType(propValue);
|
|
1050
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1051
|
-
}
|
|
1052
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
1053
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
|
|
1054
|
-
if (error instanceof Error) {
|
|
1055
|
-
return error;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
return null;
|
|
1059
|
-
}
|
|
1060
|
-
return createChainableTypeChecker(validate);
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
function createElementTypeChecker() {
|
|
1064
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1065
|
-
var propValue = props[propName];
|
|
1066
|
-
if (!isValidElement(propValue)) {
|
|
1067
|
-
var propType = getPropType(propValue);
|
|
1068
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1069
|
-
}
|
|
1070
|
-
return null;
|
|
1071
|
-
}
|
|
1072
|
-
return createChainableTypeChecker(validate);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
function createElementTypeTypeChecker() {
|
|
1076
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1077
|
-
var propValue = props[propName];
|
|
1078
|
-
if (!ReactIs$1.isValidElementType(propValue)) {
|
|
1079
|
-
var propType = getPropType(propValue);
|
|
1080
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1081
|
-
}
|
|
1082
|
-
return null;
|
|
1083
|
-
}
|
|
1084
|
-
return createChainableTypeChecker(validate);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1088
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1089
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1090
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1091
|
-
var actualClassName = getClassName(props[propName]);
|
|
1092
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1093
|
-
}
|
|
1094
|
-
return null;
|
|
1095
|
-
}
|
|
1096
|
-
return createChainableTypeChecker(validate);
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1100
|
-
if (!Array.isArray(expectedValues)) {
|
|
1101
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1102
|
-
if (arguments.length > 1) {
|
|
1103
|
-
printWarning(
|
|
1104
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1105
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1106
|
-
);
|
|
1107
|
-
} else {
|
|
1108
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
return emptyFunctionThatReturnsNull;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1115
|
-
var propValue = props[propName];
|
|
1116
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1117
|
-
if (is(propValue, expectedValues[i])) {
|
|
1118
|
-
return null;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1123
|
-
var type = getPreciseType(value);
|
|
1124
|
-
if (type === 'symbol') {
|
|
1125
|
-
return String(value);
|
|
1126
|
-
}
|
|
1127
|
-
return value;
|
|
1128
|
-
});
|
|
1129
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1130
|
-
}
|
|
1131
|
-
return createChainableTypeChecker(validate);
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1135
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1136
|
-
if (typeof typeChecker !== 'function') {
|
|
1137
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1138
|
-
}
|
|
1139
|
-
var propValue = props[propName];
|
|
1140
|
-
var propType = getPropType(propValue);
|
|
1141
|
-
if (propType !== 'object') {
|
|
1142
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1143
|
-
}
|
|
1144
|
-
for (var key in propValue) {
|
|
1145
|
-
if (has(propValue, key)) {
|
|
1146
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1147
|
-
if (error instanceof Error) {
|
|
1148
|
-
return error;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
return null;
|
|
1153
|
-
}
|
|
1154
|
-
return createChainableTypeChecker(validate);
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1158
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1159
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1160
|
-
return emptyFunctionThatReturnsNull;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1164
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1165
|
-
if (typeof checker !== 'function') {
|
|
1166
|
-
printWarning(
|
|
1167
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1168
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1169
|
-
);
|
|
1170
|
-
return emptyFunctionThatReturnsNull;
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1175
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1176
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1177
|
-
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1) == null) {
|
|
1178
|
-
return null;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1183
|
-
}
|
|
1184
|
-
return createChainableTypeChecker(validate);
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
function createNodeChecker() {
|
|
1188
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1189
|
-
if (!isNode(props[propName])) {
|
|
1190
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1191
|
-
}
|
|
1192
|
-
return null;
|
|
1193
|
-
}
|
|
1194
|
-
return createChainableTypeChecker(validate);
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1198
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1199
|
-
var propValue = props[propName];
|
|
1200
|
-
var propType = getPropType(propValue);
|
|
1201
|
-
if (propType !== 'object') {
|
|
1202
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1203
|
-
}
|
|
1204
|
-
for (var key in shapeTypes) {
|
|
1205
|
-
var checker = shapeTypes[key];
|
|
1206
|
-
if (!checker) {
|
|
1207
|
-
continue;
|
|
1208
|
-
}
|
|
1209
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1210
|
-
if (error) {
|
|
1211
|
-
return error;
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
return null;
|
|
1215
|
-
}
|
|
1216
|
-
return createChainableTypeChecker(validate);
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1220
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1221
|
-
var propValue = props[propName];
|
|
1222
|
-
var propType = getPropType(propValue);
|
|
1223
|
-
if (propType !== 'object') {
|
|
1224
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1225
|
-
}
|
|
1226
|
-
// We need to check all keys in case some are required but missing from
|
|
1227
|
-
// props.
|
|
1228
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1229
|
-
for (var key in allKeys) {
|
|
1230
|
-
var checker = shapeTypes[key];
|
|
1231
|
-
if (!checker) {
|
|
1232
|
-
return new PropTypeError(
|
|
1233
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1234
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1235
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1236
|
-
);
|
|
1237
|
-
}
|
|
1238
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1239
|
-
if (error) {
|
|
1240
|
-
return error;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
return null;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
return createChainableTypeChecker(validate);
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function isNode(propValue) {
|
|
1250
|
-
switch (typeof propValue) {
|
|
1251
|
-
case 'number':
|
|
1252
|
-
case 'string':
|
|
1253
|
-
case 'undefined':
|
|
1254
|
-
return true;
|
|
1255
|
-
case 'boolean':
|
|
1256
|
-
return !propValue;
|
|
1257
|
-
case 'object':
|
|
1258
|
-
if (Array.isArray(propValue)) {
|
|
1259
|
-
return propValue.every(isNode);
|
|
1260
|
-
}
|
|
1261
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1262
|
-
return true;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1266
|
-
if (iteratorFn) {
|
|
1267
|
-
var iterator = iteratorFn.call(propValue);
|
|
1268
|
-
var step;
|
|
1269
|
-
if (iteratorFn !== propValue.entries) {
|
|
1270
|
-
while (!(step = iterator.next()).done) {
|
|
1271
|
-
if (!isNode(step.value)) {
|
|
1272
|
-
return false;
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
} else {
|
|
1276
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1277
|
-
while (!(step = iterator.next()).done) {
|
|
1278
|
-
var entry = step.value;
|
|
1279
|
-
if (entry) {
|
|
1280
|
-
if (!isNode(entry[1])) {
|
|
1281
|
-
return false;
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
} else {
|
|
1287
|
-
return false;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
return true;
|
|
1291
|
-
default:
|
|
1292
|
-
return false;
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
function isSymbol(propType, propValue) {
|
|
1297
|
-
// Native Symbol.
|
|
1298
|
-
if (propType === 'symbol') {
|
|
1299
|
-
return true;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
// falsy value can't be a Symbol
|
|
1303
|
-
if (!propValue) {
|
|
1304
|
-
return false;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1308
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1309
|
-
return true;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1313
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1314
|
-
return true;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
return false;
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1321
|
-
function getPropType(propValue) {
|
|
1322
|
-
var propType = typeof propValue;
|
|
1323
|
-
if (Array.isArray(propValue)) {
|
|
1324
|
-
return 'array';
|
|
1325
|
-
}
|
|
1326
|
-
if (propValue instanceof RegExp) {
|
|
1327
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1328
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1329
|
-
// passes PropTypes.object.
|
|
1330
|
-
return 'object';
|
|
1331
|
-
}
|
|
1332
|
-
if (isSymbol(propType, propValue)) {
|
|
1333
|
-
return 'symbol';
|
|
1334
|
-
}
|
|
1335
|
-
return propType;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1339
|
-
// See `createPrimitiveTypeChecker`.
|
|
1340
|
-
function getPreciseType(propValue) {
|
|
1341
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1342
|
-
return '' + propValue;
|
|
1343
|
-
}
|
|
1344
|
-
var propType = getPropType(propValue);
|
|
1345
|
-
if (propType === 'object') {
|
|
1346
|
-
if (propValue instanceof Date) {
|
|
1347
|
-
return 'date';
|
|
1348
|
-
} else if (propValue instanceof RegExp) {
|
|
1349
|
-
return 'regexp';
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
return propType;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1356
|
-
// For example, "undefined" or "of type array"
|
|
1357
|
-
function getPostfixForTypeWarning(value) {
|
|
1358
|
-
var type = getPreciseType(value);
|
|
1359
|
-
switch (type) {
|
|
1360
|
-
case 'array':
|
|
1361
|
-
case 'object':
|
|
1362
|
-
return 'an ' + type;
|
|
1363
|
-
case 'boolean':
|
|
1364
|
-
case 'date':
|
|
1365
|
-
case 'regexp':
|
|
1366
|
-
return 'a ' + type;
|
|
1367
|
-
default:
|
|
1368
|
-
return type;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
// Returns class name of the object, if any.
|
|
1373
|
-
function getClassName(propValue) {
|
|
1374
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1375
|
-
return ANONYMOUS;
|
|
1376
|
-
}
|
|
1377
|
-
return propValue.constructor.name;
|
|
1378
|
-
}
|
|
459
|
+
var useTypographyStyles = styles.makeStyles(function () {
|
|
460
|
+
var _a;
|
|
461
|
+
return ({
|
|
462
|
+
root: (_a = {},
|
|
463
|
+
_a["& ." + iconStaticClassName] = {
|
|
464
|
+
position: 'relative',
|
|
465
|
+
top: '0.125em',
|
|
466
|
+
padding: '0 0.125em',
|
|
467
|
+
boxSizing: 'content-box',
|
|
468
|
+
},
|
|
469
|
+
_a),
|
|
470
|
+
caption: {
|
|
471
|
+
display: 'inline',
|
|
472
|
+
},
|
|
473
|
+
overline: {
|
|
474
|
+
display: 'inline',
|
|
475
|
+
},
|
|
476
|
+
});
|
|
477
|
+
});
|
|
1379
478
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
479
|
+
var Typography = React.forwardRef(function (props, ref) {
|
|
480
|
+
var classes = useTypographyStyles(props);
|
|
481
|
+
return React__default['default'].createElement(MuiTypography__default['default'], __assign({ ref: ref, classes: classes }, props));
|
|
482
|
+
});
|
|
483
|
+
Typography.displayName = 'Typography';
|
|
1383
484
|
|
|
1384
|
-
|
|
485
|
+
var useStyles$1 = core.makeStyles(function (_a) {
|
|
486
|
+
var spacing = _a.spacing;
|
|
487
|
+
return ({
|
|
488
|
+
root: {
|
|
489
|
+
'&:last-child': {
|
|
490
|
+
marginBottom: 0,
|
|
491
|
+
},
|
|
492
|
+
marginBottom: spacing(4),
|
|
493
|
+
padding: spacing(4),
|
|
494
|
+
},
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
var Paper = React.forwardRef(function (props, ref) {
|
|
498
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
499
|
+
var classes = useStyles$1(props);
|
|
500
|
+
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
501
|
+
});
|
|
502
|
+
Paper.displayName = 'Paper';
|
|
503
|
+
Paper.defaultProps = {
|
|
504
|
+
legacyStyles: false,
|
|
1385
505
|
};
|
|
1386
506
|
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
507
|
+
var AUDIO_PLAYER_EVENT_TYPES;
|
|
508
|
+
(function (AUDIO_PLAYER_EVENT_TYPES) {
|
|
509
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
|
|
510
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
|
|
511
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
|
|
512
|
+
AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
|
|
513
|
+
AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
|
|
514
|
+
AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
|
|
515
|
+
AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
|
|
516
|
+
AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
|
|
517
|
+
AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
|
|
518
|
+
})(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
|
|
519
|
+
var PLAYBACK_STATES;
|
|
520
|
+
(function (PLAYBACK_STATES) {
|
|
521
|
+
PLAYBACK_STATES["NONE"] = "NONE";
|
|
522
|
+
PLAYBACK_STATES["PAUSED"] = "PAUSED";
|
|
523
|
+
PLAYBACK_STATES["PLAYING"] = "PLAYING";
|
|
524
|
+
})(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
|
|
525
|
+
var CONTROL_LABELS;
|
|
526
|
+
(function (CONTROL_LABELS) {
|
|
527
|
+
CONTROL_LABELS["PAUSE"] = "PAUSE";
|
|
528
|
+
CONTROL_LABELS["PLAY"] = "PLAY";
|
|
529
|
+
CONTROL_LABELS["MUTE"] = "MUTE";
|
|
530
|
+
CONTROL_LABELS["UNMUTE"] = "UNMUTE";
|
|
531
|
+
})(CONTROL_LABELS || (CONTROL_LABELS = {}));
|
|
532
|
+
var VOLUME_CONTROL_STATES;
|
|
533
|
+
(function (VOLUME_CONTROL_STATES) {
|
|
534
|
+
VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
|
|
535
|
+
VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
|
|
536
|
+
})(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
|
|
537
|
+
|
|
538
|
+
var initialAudioPlayerState = {
|
|
539
|
+
playback: PLAYBACK_STATES.NONE,
|
|
540
|
+
volumeControls: VOLUME_CONTROL_STATES.HIDE,
|
|
541
|
+
context: {
|
|
542
|
+
volume: 100,
|
|
543
|
+
playbackButtonLabel: CONTROL_LABELS.PLAY,
|
|
544
|
+
volumeButtonLabel: CONTROL_LABELS.MUTE,
|
|
545
|
+
},
|
|
546
|
+
};
|
|
547
|
+
var getPlayback = function (_a) {
|
|
548
|
+
var audio = _a.current;
|
|
549
|
+
var playback = PLAYBACK_STATES.NONE;
|
|
550
|
+
if (audio) {
|
|
551
|
+
var paused = audio.paused, readyState = audio.readyState;
|
|
552
|
+
if (readyState === 0) {
|
|
553
|
+
playback = PLAYBACK_STATES.NONE;
|
|
554
|
+
}
|
|
555
|
+
else if (paused) {
|
|
556
|
+
playback = PLAYBACK_STATES.PAUSED;
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
playback = PLAYBACK_STATES.PLAYING;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return playback;
|
|
563
|
+
};
|
|
564
|
+
var audioPlayerReducer = function (state, event) {
|
|
565
|
+
var _a, _b;
|
|
566
|
+
var audioRef = state.context.audioRef;
|
|
567
|
+
var nextState = __assign({}, state);
|
|
568
|
+
switch (state.playback) {
|
|
569
|
+
case PLAYBACK_STATES.NONE:
|
|
570
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY) {
|
|
571
|
+
nextState.playback = getPlayback(audioRef);
|
|
572
|
+
return nextState;
|
|
573
|
+
}
|
|
574
|
+
break;
|
|
575
|
+
case PLAYBACK_STATES.PAUSED:
|
|
576
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
577
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
|
578
|
+
nextState.playback = getPlayback(audioRef);
|
|
579
|
+
nextState.context.playbackButtonLabel = CONTROL_LABELS.PAUSE;
|
|
580
|
+
return nextState;
|
|
581
|
+
}
|
|
582
|
+
break;
|
|
583
|
+
case PLAYBACK_STATES.PLAYING:
|
|
584
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
585
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.pause();
|
|
586
|
+
nextState.playback = getPlayback(audioRef);
|
|
587
|
+
nextState.context.playbackButtonLabel = CONTROL_LABELS.PLAY;
|
|
588
|
+
return nextState;
|
|
589
|
+
}
|
|
590
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE) {
|
|
591
|
+
return nextState;
|
|
592
|
+
}
|
|
593
|
+
break;
|
|
594
|
+
}
|
|
595
|
+
switch (state.volumeControls) {
|
|
596
|
+
case VOLUME_CONTROL_STATES.SHOW:
|
|
597
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
598
|
+
nextState.volumeControls = VOLUME_CONTROL_STATES.HIDE;
|
|
599
|
+
return nextState;
|
|
600
|
+
}
|
|
601
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE) {
|
|
602
|
+
if (nextState.context.volume !== event.context.volume) {
|
|
603
|
+
nextState.context.volume = event.context.volume;
|
|
604
|
+
if (audioRef.current) {
|
|
605
|
+
audioRef.current.volume = event.context.volume;
|
|
606
|
+
}
|
|
607
|
+
return nextState;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
break;
|
|
611
|
+
case VOLUME_CONTROL_STATES.HIDE:
|
|
612
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
613
|
+
nextState.volumeControls = VOLUME_CONTROL_STATES.SHOW;
|
|
614
|
+
return nextState;
|
|
615
|
+
}
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
switch (event.type) {
|
|
619
|
+
case AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE:
|
|
620
|
+
if (audioRef.current) {
|
|
621
|
+
audioRef.current.muted = !audioRef.current.muted;
|
|
622
|
+
return nextState;
|
|
623
|
+
}
|
|
624
|
+
break;
|
|
625
|
+
case AUDIO_PLAYER_EVENT_TYPES.SET_TIME:
|
|
626
|
+
if (audioRef.current) {
|
|
627
|
+
audioRef.current.currentTime = event.context.time;
|
|
628
|
+
return nextState;
|
|
629
|
+
}
|
|
630
|
+
break;
|
|
631
|
+
case AUDIO_PLAYER_EVENT_TYPES.RESET:
|
|
632
|
+
if (audioRef.current) {
|
|
633
|
+
audioRef.current.currentTime = 0;
|
|
634
|
+
nextState.playback = getPlayback(audioRef);
|
|
635
|
+
return nextState;
|
|
636
|
+
}
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
return state;
|
|
1446
640
|
};
|
|
1447
641
|
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
propTypes.exports = factoryWithThrowingShims();
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
var PropTypes = propTypes.exports;
|
|
1469
|
-
|
|
1470
|
-
var responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
1471
|
-
|
|
1472
|
-
function _typeof(obj) {
|
|
1473
|
-
"@babel/helpers - typeof";
|
|
1474
|
-
|
|
1475
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
1476
|
-
_typeof = function _typeof(obj) {
|
|
1477
|
-
return typeof obj;
|
|
1478
|
-
};
|
|
1479
|
-
} else {
|
|
1480
|
-
_typeof = function _typeof(obj) {
|
|
1481
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1482
|
-
};
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
return _typeof(obj);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
// For instance with the first breakpoint xs: [xs, sm[.
|
|
1489
|
-
|
|
1490
|
-
var values = {
|
|
1491
|
-
xs: 0,
|
|
1492
|
-
sm: 600,
|
|
1493
|
-
md: 960,
|
|
1494
|
-
lg: 1280,
|
|
1495
|
-
xl: 1920
|
|
642
|
+
var useVolumeIcon = function (state) {
|
|
643
|
+
var volumeIcon = SvgVolumeUp;
|
|
644
|
+
if (state.context.volume >= 0.5) {
|
|
645
|
+
volumeIcon = SvgVolumeUp;
|
|
646
|
+
}
|
|
647
|
+
else if (state.context.volume < 0.5 && state.context.volume > 0) {
|
|
648
|
+
volumeIcon = SvgVolumeDown;
|
|
649
|
+
}
|
|
650
|
+
else if (state.context.volume === 0) {
|
|
651
|
+
volumeIcon = SvgVolumeMute;
|
|
652
|
+
}
|
|
653
|
+
if (state.context.audioRef.current) {
|
|
654
|
+
if (state.context.audioRef.current.muted) {
|
|
655
|
+
volumeIcon = SvgVolumeOff;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
return volumeIcon;
|
|
1496
659
|
};
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
660
|
+
|
|
661
|
+
var appendZero = function (num) { return (num < 10 ? "0" + num : num); };
|
|
662
|
+
var formatTime = function (time, remaning) {
|
|
663
|
+
if (remaning === void 0) { remaning = false; }
|
|
664
|
+
var dateTime = new Date(0, 0, 0, 0, 0, time, 0);
|
|
665
|
+
var dateTimeH = appendZero(dateTime.getHours());
|
|
666
|
+
var dateTimeM = appendZero(dateTime.getMinutes());
|
|
667
|
+
var dateTimeS = appendZero(dateTime.getSeconds());
|
|
668
|
+
var minus = remaning ? '-' : '';
|
|
669
|
+
return dateTimeH > 0 ? "" + minus + dateTimeH + ":" + dateTimeM + ":" + dateTimeS : "" + minus + dateTimeM + ":" + dateTimeS;
|
|
1504
670
|
};
|
|
1505
|
-
function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
1506
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1507
|
-
if (!props.theme) {
|
|
1508
|
-
console.error('Material-UI: You are calling a style function without a theme value.');
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
671
|
|
|
1512
|
-
|
|
1513
|
-
var
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
672
|
+
var setupAudioRef = function (config) { return function () {
|
|
673
|
+
var _a, _b, _c, _d;
|
|
674
|
+
var audioRef = config.audioRef, send = config.send;
|
|
675
|
+
var handleDurationChange = function (event) {
|
|
676
|
+
var duration = event.target.duration;
|
|
677
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.DURATION_CHANGE, context: { duration: duration } });
|
|
678
|
+
};
|
|
679
|
+
var handleTimeUpdate = function (event) {
|
|
680
|
+
var currentTime = event.target.currentTime;
|
|
681
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE, context: { currentTime: currentTime } });
|
|
682
|
+
};
|
|
683
|
+
var handleCanPlay = function () {
|
|
684
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY });
|
|
685
|
+
};
|
|
686
|
+
var handleEnded = function () {
|
|
687
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.RESET });
|
|
688
|
+
};
|
|
689
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('durationchange', handleDurationChange);
|
|
690
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('timeupdate', handleTimeUpdate);
|
|
691
|
+
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('canplay', handleCanPlay);
|
|
692
|
+
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('ended', handleEnded);
|
|
693
|
+
return function () {
|
|
694
|
+
var _a, _b, _c, _d;
|
|
695
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('durationchange', handleDurationChange);
|
|
696
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('timeupdate', handleTimeUpdate);
|
|
697
|
+
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('canplay', handleCanPlay);
|
|
698
|
+
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('ended', handleEnded);
|
|
699
|
+
};
|
|
700
|
+
}; };
|
|
701
|
+
|
|
702
|
+
var AudioPlayer = function (props) {
|
|
703
|
+
var _a, _b, _c, _d, _f;
|
|
704
|
+
var src = props.src;
|
|
705
|
+
var volumeRef = React.useRef(null);
|
|
706
|
+
var audioRef = React.useRef(null);
|
|
707
|
+
var spacing = core.useTheme().spacing;
|
|
708
|
+
var _g = React.useState(false), disableRipple = _g[0], setDisableRipple = _g[1];
|
|
709
|
+
var _h = React.useReducer(audioPlayerReducer, __assign(__assign({}, initialAudioPlayerState), { context: __assign(__assign({}, initialAudioPlayerState.context), { audioRef: audioRef }) })), state = _h[0], send = _h[1];
|
|
710
|
+
React.useEffect(setupAudioRef({ audioRef: audioRef, send: send }), [audioRef]);
|
|
711
|
+
var PlaybackIcon = state.playback !== PLAYBACK_STATES.PAUSED ? SvgPause : SvgPlay;
|
|
712
|
+
var VolumeIcon = React.useMemo(function () { return useVolumeIcon(state); }, [state.context.volume, (_a = state.context.audioRef.current) === null || _a === void 0 ? void 0 : _a.muted]);
|
|
713
|
+
var togglePlayback = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK }); };
|
|
714
|
+
var toggleVolumeControl = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL }); };
|
|
715
|
+
var toggleMute = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE }); };
|
|
716
|
+
var setTime = function (_e, time) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.SET_TIME, context: { time: time } }); };
|
|
717
|
+
var setVolume = function (_e, volume) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE, context: { volume: volume } }); };
|
|
718
|
+
return (React__default['default'].createElement(core.Box, { display: "flex", alignItems: "center", gridGap: spacing(1) },
|
|
719
|
+
React__default['default'].createElement("audio", { ref: audioRef, src: src }),
|
|
720
|
+
React__default['default'].createElement(core.Box, null,
|
|
721
|
+
React__default['default'].createElement(IconButton, { "aria-label": state.context.playbackButtonLabel, disabled: state.playback === PLAYBACK_STATES.NONE, onClick: togglePlayback },
|
|
722
|
+
React__default['default'].createElement(Icon, { icon: PlaybackIcon })),
|
|
723
|
+
React__default['default'].createElement(IconButton, { "aria-label": state.context.volumeButtonLabel, ref: volumeRef, onClick: toggleMute, onMouseEnter: toggleVolumeControl, onMouseLeave: toggleVolumeControl, disableRipple: disableRipple },
|
|
724
|
+
React__default['default'].createElement(Icon, { icon: VolumeIcon }),
|
|
725
|
+
React__default['default'].createElement(core.Popper, { onClick: function (e) { return e.stopPropagation(); }, onMouseEnter: function () { return setDisableRipple(true); }, onMouseLeave: function () { return setDisableRipple(false); }, open: state.volumeControls === VOLUME_CONTROL_STATES.SHOW, anchorEl: function () { return volumeRef.current; }, transition: true, placement: "top" }, function (_a) {
|
|
726
|
+
var TransitionProps = _a.TransitionProps;
|
|
727
|
+
return (React__default['default'].createElement(core.Grow, __assign({}, TransitionProps),
|
|
728
|
+
React__default['default'].createElement(Paper, { elevation: 1 },
|
|
729
|
+
React__default['default'].createElement(core.Box, { py: 1, height: 80 },
|
|
730
|
+
React__default['default'].createElement(core.Slider, { color: "secondary", orientation: "vertical", value: state.context.volume, onChange: setVolume, max: 1, step: 0.01 })))));
|
|
731
|
+
}))),
|
|
732
|
+
React__default['default'].createElement(core.Box, { display: "flex", flexGrow: 1, alignItems: "center", gridGap: spacing(1) },
|
|
733
|
+
React__default['default'].createElement(core.Box, { flexBasis: 60, flexShrink: 0 },
|
|
734
|
+
React__default['default'].createElement(Typography, null, formatTime(((_b = state.context.audioRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0))),
|
|
735
|
+
React__default['default'].createElement(core.Slider, { color: "secondary", value: ((_c = state.context.audioRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) || 0, max: ((_d = state.context.audioRef.current) === null || _d === void 0 ? void 0 : _d.duration) || 1, onChange: setTime, disabled: state.playback === PLAYBACK_STATES.NONE }),
|
|
736
|
+
React__default['default'].createElement(core.Box, { flexBasis: 60, flexShrink: 0, textAlign: "end" },
|
|
737
|
+
React__default['default'].createElement(Typography, null, formatTime(((_f = state.context.audioRef.current) === null || _f === void 0 ? void 0 : _f.duration) || 0))))));
|
|
738
|
+
};
|
|
1519
739
|
|
|
1520
|
-
|
|
1521
|
-
|
|
740
|
+
var LoadingStatus;
|
|
741
|
+
(function (LoadingStatus) {
|
|
742
|
+
LoadingStatus["ERROR"] = "ERROR";
|
|
743
|
+
LoadingStatus["LOADED"] = "LOADED";
|
|
744
|
+
LoadingStatus["PENDING"] = "PENDING";
|
|
745
|
+
})(LoadingStatus || (LoadingStatus = {}));
|
|
746
|
+
/**
|
|
747
|
+
* Hook returns [imgProps, loaded]
|
|
748
|
+
* ref: Merged default and provided imgProp object. Includes load and error events for img tag. To be passed to MuiAvatar.
|
|
749
|
+
* loaded: Indicates whether the src supplied to an img within Avatar results in loaded or error
|
|
750
|
+
*/
|
|
751
|
+
var useImgProps = function (avatarProps) {
|
|
752
|
+
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
753
|
+
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onError: function (event) {
|
|
754
|
+
var _a, _b;
|
|
755
|
+
setLoaded(LoadingStatus.ERROR);
|
|
756
|
+
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
757
|
+
}, onLoad: function (event) {
|
|
758
|
+
var _a, _b;
|
|
759
|
+
setLoaded(LoadingStatus.LOADED);
|
|
760
|
+
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
761
|
+
} });
|
|
762
|
+
return { imgProps: imgProps, loaded: loaded };
|
|
763
|
+
};
|
|
1522
764
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
765
|
+
var getAvatarDimensions = function (theme, props) {
|
|
766
|
+
var factors = {
|
|
767
|
+
'extra-small': 3,
|
|
768
|
+
small: 4,
|
|
769
|
+
medium: 5,
|
|
770
|
+
large: 6,
|
|
771
|
+
'extra-large': 12.5,
|
|
772
|
+
};
|
|
773
|
+
var sizeFactor = factors[props.size || 'medium'];
|
|
774
|
+
return theme.spacing(sizeFactor);
|
|
775
|
+
};
|
|
776
|
+
var getAvatarFontSize = function (props) {
|
|
777
|
+
var fontSizes = {
|
|
778
|
+
'extra-small': '0.75rem',
|
|
779
|
+
small: '1rem',
|
|
780
|
+
medium: '1rem',
|
|
781
|
+
large: '1.25rem',
|
|
782
|
+
'extra-large': '3.5rem',
|
|
783
|
+
};
|
|
784
|
+
return fontSizes[props.size || 'medium'];
|
|
785
|
+
};
|
|
786
|
+
var getAvatarBackground = function (props) {
|
|
787
|
+
var src = props.src, loaded = props.loaded;
|
|
788
|
+
var background = props.background;
|
|
789
|
+
if (src && loaded === LoadingStatus.LOADED) {
|
|
790
|
+
background = 'transparent';
|
|
791
|
+
}
|
|
792
|
+
return background;
|
|
793
|
+
};
|
|
794
|
+
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
795
|
+
root: {
|
|
796
|
+
width: function (props) { return getAvatarDimensions(theme, props); },
|
|
797
|
+
height: function (props) { return getAvatarDimensions(theme, props); },
|
|
798
|
+
fontSize: function (props) { return getAvatarFontSize(props); },
|
|
799
|
+
backgroundColor: function (props) { return getAvatarBackground(props); },
|
|
800
|
+
color: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
801
|
+
objectFit: function (props) { return props.fit; },
|
|
802
|
+
},
|
|
803
|
+
silhouette: {
|
|
804
|
+
'& path': {
|
|
805
|
+
fill: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
}); });
|
|
1528
809
|
|
|
1529
|
-
|
|
1530
|
-
return output;
|
|
1531
|
-
}
|
|
810
|
+
var _path$2;
|
|
1532
811
|
|
|
1533
|
-
function
|
|
1534
|
-
if (!path || typeof path !== 'string') {
|
|
1535
|
-
return null;
|
|
1536
|
-
}
|
|
812
|
+
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
1537
813
|
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
814
|
+
function SvgSilhouetteFemale(props) {
|
|
815
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
816
|
+
viewBox: "0 0 300 300",
|
|
817
|
+
fill: "none",
|
|
818
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
819
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
820
|
+
d: "M179.417 182.917a3.362 3.362 0 00-2.951 1.076 3.461 3.461 0 00-.875 3.021c1.916 10.069 8.368 23.889 28.173 32.493 2.347 1.014 5.972 1.805 10.57 2.799 17.208 3.722 45.986 9.958 53.055 36.333a3.488 3.488 0 001.622 2.11 3.491 3.491 0 002.639.345 3.488 3.488 0 002.109-1.622 3.473 3.473 0 00.345-2.639c-8.173-30.465-40.777-37.527-58.298-41.319-4.056-.882-7.563-1.639-9.278-2.389-11.903-5.167-19.59-12.833-22.924-22.819 33.07 2.458 48.042-10.716 48.702-11.313a3.469 3.469 0 001.121-2.951 3.478 3.478 0 00-1.732-2.639c-19.084-10.903-19.084-48.577-19.084-62.764 0-39.674-26.722-71.125-60.979-71.618-.326-.011-.652-.018-.979-.021h-.007c-34.757.194-63.035 31.68-63.035 70.194 0 14.188 0 51.868-19.083 62.764a3.5 3.5 0 00-1.73 2.769 3.494 3.494 0 001.313 2.988c.959.743 22.14 16.952 48.202 12.028-3.486 9.569-11.07 16.931-22.625 21.951-1.674.73-5.007 1.528-8.868 2.445-17.64 4.194-50.48 12.007-58.702 42.687a3.481 3.481 0 00.348 2.638 3.475 3.475 0 006.368-.839c7.145-26.694 36.229-33.604 53.597-37.743 4.354-1.035 7.791-1.854 10.028-2.82 19.805-8.604 26.25-22.423 28.173-32.493a3.45 3.45 0 00-1.104-3.243 3.457 3.457 0 00-3.347-.722c-18.799 5.917-36.167-2.222-43.757-6.736 18.132-15.181 18.132-50.118 18.132-65.674 0-34.7 25.18-63.076 56.389-63.263l.736.041c30.778.438 53.986 28.236 53.986 64.667 0 15.562 0 50.576 18.208 65.757-6.271 3.583-20.569 9.382-44.458 6.521z",
|
|
821
|
+
fill: "#2E3042"
|
|
822
|
+
})));
|
|
1541
823
|
}
|
|
1542
824
|
|
|
1543
|
-
|
|
1544
|
-
var prop = options.prop,
|
|
1545
|
-
_options$cssProperty = options.cssProperty,
|
|
1546
|
-
cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,
|
|
1547
|
-
themeKey = options.themeKey,
|
|
1548
|
-
transform = options.transform;
|
|
1549
|
-
|
|
1550
|
-
var fn = function fn(props) {
|
|
1551
|
-
if (props[prop] == null) {
|
|
1552
|
-
return null;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
var propValue = props[prop];
|
|
1556
|
-
var theme = props.theme;
|
|
1557
|
-
var themeMapping = getPath(theme, themeKey) || {};
|
|
1558
|
-
|
|
1559
|
-
var styleFromPropValue = function styleFromPropValue(propValueFinal) {
|
|
1560
|
-
var value;
|
|
1561
|
-
|
|
1562
|
-
if (typeof themeMapping === 'function') {
|
|
1563
|
-
value = themeMapping(propValueFinal);
|
|
1564
|
-
} else if (Array.isArray(themeMapping)) {
|
|
1565
|
-
value = themeMapping[propValueFinal] || propValueFinal;
|
|
1566
|
-
} else {
|
|
1567
|
-
value = getPath(themeMapping, propValueFinal) || propValueFinal;
|
|
825
|
+
var _path$1;
|
|
1568
826
|
|
|
1569
|
-
|
|
1570
|
-
value = transform(value);
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
827
|
+
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
1573
828
|
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
829
|
+
function SvgSilhouetteMale(props) {
|
|
830
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
831
|
+
viewBox: "0 0 300 300",
|
|
832
|
+
fill: "none",
|
|
833
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
834
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
835
|
+
d: "M27.594 261.886a3.513 3.513 0 004.281-2.478c7.204-26.904 36.484-33.877 53.984-38.05 4.386-1.043 7.848-1.869 10.1-2.842 19.935-8.66 26.433-22.592 28.377-32.757a3.493 3.493 0 00-.133-1.81 3.492 3.492 0 00-1.021-1.501c-10.38-8.968-19.137-22.431-24.663-37.917a3.447 3.447 0 00-.72-1.197c-7.31-7.953-11.506-16.361-11.506-23.06 0-3.914 1.475-6.539 4.798-8.52a3.5 3.5 0 001.7-2.857c1.545-35.662 26.922-63.735 58.047-63.917l.749.049c31.279.434 56.495 29.11 57.397 65.275a3.487 3.487 0 001.245 2.584c2.189 1.855 3.211 4.207 3.211 7.4 0 5.607-2.987 12.503-8.401 19.406a3.633 3.633 0 00-.587 1.106c-5.596 17.754-15.64 33.429-27.545 43.02a3.517 3.517 0 00-1.245 3.381c1.945 10.159 8.442 24.083 28.377 32.757 2.357 1.022 6.015 1.821 10.653 2.822 17.325 3.752 46.318 10.046 53.431 36.628a3.503 3.503 0 002.926 2.562 3.494 3.494 0 003.922-3.019 3.52 3.52 0 00-.091-1.363c-8.219-30.713-41.065-37.833-58.705-41.655-4.092-.889-7.625-1.652-9.345-2.408-13.01-5.657-21.026-14.275-23.859-25.658 12.08-10.383 22.187-26.401 27.965-44.365 6.134-7.981 9.505-16.2 9.505-23.221 0-4.684-1.511-8.59-4.504-11.643-1.665-39.232-29.636-70.127-64.35-70.624L150.545 38c-34.085.182-62.175 30.264-64.63 68.818-4.379 3.22-6.603 7.736-6.603 13.47 0 8.282 4.68 18.188 12.87 27.275 5.659 15.563 14.43 29.235 24.873 38.805-2.819 11.426-10.842 20.072-23.88 25.735-1.685.735-5.043 1.541-8.932 2.465-17.773 4.228-50.843 12.104-59.125 43.034a3.501 3.501 0 002.476 4.284z",
|
|
836
|
+
fill: "#2E3042"
|
|
837
|
+
})));
|
|
838
|
+
}
|
|
1577
839
|
|
|
1578
|
-
|
|
1579
|
-
};
|
|
840
|
+
var _path;
|
|
1580
841
|
|
|
1581
|
-
|
|
1582
|
-
};
|
|
842
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1583
843
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
844
|
+
function SvgSilhouetteNeutral(props) {
|
|
845
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
846
|
+
viewBox: "0 0 300 300",
|
|
847
|
+
fill: "none",
|
|
848
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
849
|
+
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
850
|
+
fillRule: "evenodd",
|
|
851
|
+
clipRule: "evenodd",
|
|
852
|
+
d: "M209 121c0 32.585-26.415 59-59 59s-59-26.415-59-59 26.415-59 59-59 59 26.415 59 59zm8 0c0 37.003-29.997 67-67 67s-67-29.997-67-67 29.997-67 67-67 67 29.997 67 67zm35 137.333V284h8v-25.667c0-13.614-5.821-26.671-16.182-36.298C233.456 212.408 219.403 207 204.75 207H94.25c-14.653 0-28.706 5.408-39.068 15.035C44.821 231.662 39 244.719 39 258.333V284h8v-25.667c0-11.295 4.824-22.257 13.628-30.437C69.45 219.698 81.537 215 94.25 215h110.5c12.714 0 24.799 4.698 33.622 12.896 8.804 8.18 13.628 19.142 13.628 30.437z",
|
|
853
|
+
fill: "#2E3042"
|
|
854
|
+
})));
|
|
1587
855
|
}
|
|
1588
856
|
|
|
1589
|
-
var
|
|
1590
|
-
|
|
1591
|
-
|
|
857
|
+
var silhouettes = {
|
|
858
|
+
female: SvgSilhouetteFemale,
|
|
859
|
+
male: SvgSilhouetteMale,
|
|
860
|
+
neutral: SvgSilhouetteNeutral,
|
|
861
|
+
};
|
|
862
|
+
var Avatar = React.forwardRef(function (props, ref) {
|
|
863
|
+
var children = props.children, _a = props.silhouette, silhouette = _a === void 0 ? 'neutral' : _a, muiProps = __rest(props, ["children", "silhouette"]);
|
|
864
|
+
var _b = useImgProps(props), imgProps = _b.imgProps, loaded = _b.loaded;
|
|
865
|
+
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
866
|
+
var Silhouette = silhouettes[silhouette];
|
|
867
|
+
var fallback = muiProps.src || silhouette === 'none' ? '' : React__default['default'].createElement(Silhouette, { className: classes.silhouette });
|
|
868
|
+
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root } }, muiProps, imgProps), children || fallback));
|
|
1592
869
|
});
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
var className = props.className; props.gap; var restProps = __rest(props, ["className", "gap"]);
|
|
1599
|
-
var root = useBoxStyles(props).root;
|
|
1600
|
-
return React__default['default'].createElement(core.Box, __assign({ className: classNames(root, className) }, restProps));
|
|
870
|
+
Avatar.defaultProps = {
|
|
871
|
+
size: 'medium',
|
|
872
|
+
fit: 'cover',
|
|
873
|
+
background: '#E0E0E0',
|
|
874
|
+
silhouette: 'neutral',
|
|
1601
875
|
};
|
|
1602
|
-
|
|
876
|
+
Avatar.displayName = 'Avatar';
|
|
1603
877
|
|
|
1604
878
|
var useButtonStyles = styles.makeStyles(function () { return ({
|
|
1605
879
|
root: {
|
|
@@ -1633,86 +907,6 @@ var Checkbox = React.forwardRef(function (props, ref) {
|
|
|
1633
907
|
});
|
|
1634
908
|
Checkbox.displayName = 'Checkbox';
|
|
1635
909
|
|
|
1636
|
-
var useIconStyles = core.makeStyles(function (_a) {
|
|
1637
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
1638
|
-
var getFontSize = function (_a) {
|
|
1639
|
-
var size = _a.size;
|
|
1640
|
-
var sizes = {
|
|
1641
|
-
inherit: 'inherit',
|
|
1642
|
-
small: spacing(1.5),
|
|
1643
|
-
medium: spacing(2),
|
|
1644
|
-
large: spacing(2.5),
|
|
1645
|
-
'extra-large': spacing(3),
|
|
1646
|
-
};
|
|
1647
|
-
return size ? sizes[size] : 'inherit';
|
|
1648
|
-
};
|
|
1649
|
-
var getColor = function (props) {
|
|
1650
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
1651
|
-
var value = 'inherit';
|
|
1652
|
-
if (props.color) {
|
|
1653
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
1654
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
1655
|
-
value = palette[color][variant];
|
|
1656
|
-
}
|
|
1657
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
1658
|
-
value = props.color;
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
return value;
|
|
1662
|
-
};
|
|
1663
|
-
return {
|
|
1664
|
-
root: {
|
|
1665
|
-
color: getColor,
|
|
1666
|
-
fontSize: getFontSize,
|
|
1667
|
-
strokeWidth: '1.3px',
|
|
1668
|
-
},
|
|
1669
|
-
};
|
|
1670
|
-
});
|
|
1671
|
-
|
|
1672
|
-
var iconStaticClassName = 'pop-icon';
|
|
1673
|
-
var Icon = function (props) {
|
|
1674
|
-
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
1675
|
-
var classes = useIconStyles(props);
|
|
1676
|
-
var isValid = true;
|
|
1677
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
1678
|
-
isValid = false;
|
|
1679
|
-
}
|
|
1680
|
-
return isValid
|
|
1681
|
-
? React.createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
|
|
1682
|
-
: null;
|
|
1683
|
-
};
|
|
1684
|
-
Icon.defaultProps = {
|
|
1685
|
-
size: 'inherit',
|
|
1686
|
-
color: 'inherit',
|
|
1687
|
-
};
|
|
1688
|
-
Icon.displayName = 'Icon';
|
|
1689
|
-
|
|
1690
|
-
var useTypographyStyles = styles.makeStyles(function () {
|
|
1691
|
-
var _a;
|
|
1692
|
-
return ({
|
|
1693
|
-
root: (_a = {},
|
|
1694
|
-
_a["& ." + iconStaticClassName] = {
|
|
1695
|
-
position: 'relative',
|
|
1696
|
-
top: '0.125em',
|
|
1697
|
-
padding: '0 0.125em',
|
|
1698
|
-
boxSizing: 'content-box',
|
|
1699
|
-
},
|
|
1700
|
-
_a),
|
|
1701
|
-
caption: {
|
|
1702
|
-
display: 'inline',
|
|
1703
|
-
},
|
|
1704
|
-
overline: {
|
|
1705
|
-
display: 'inline',
|
|
1706
|
-
},
|
|
1707
|
-
});
|
|
1708
|
-
});
|
|
1709
|
-
|
|
1710
|
-
var Typography = React.forwardRef(function (props, ref) {
|
|
1711
|
-
var classes = useTypographyStyles(props);
|
|
1712
|
-
return React__default['default'].createElement(MuiTypography__default['default'], __assign({ ref: ref, classes: classes }, props));
|
|
1713
|
-
});
|
|
1714
|
-
Typography.displayName = 'Typography';
|
|
1715
|
-
|
|
1716
910
|
var getFadeStop = function (_a, typographyVariant) {
|
|
1717
911
|
var typography = _a.typography;
|
|
1718
912
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -1750,10 +944,10 @@ var CollapsibleText = function (props) {
|
|
|
1750
944
|
};
|
|
1751
945
|
}, []);
|
|
1752
946
|
return (React__default['default'].createElement(React.Fragment, null,
|
|
1753
|
-
React__default['default'].createElement(Box, { position: "relative", overflow: "hidden" },
|
|
947
|
+
React__default['default'].createElement(core.Box, { position: "relative", overflow: "hidden" },
|
|
1754
948
|
React__default['default'].createElement(Collapse__default['default'], { in: open, collapsedSize: collapsedSize + 'rem' },
|
|
1755
949
|
React__default['default'].createElement(Typography, { ref: typographyRef, variant: typographyVariant }, text)),
|
|
1756
|
-
collapsible && !open && React__default['default'].createElement(Box, { className: classes.overlay }))));
|
|
950
|
+
collapsible && !open && React__default['default'].createElement(core.Box, { className: classes.overlay }))));
|
|
1757
951
|
};
|
|
1758
952
|
CollapsibleText.defaultProps = {
|
|
1759
953
|
previewLines: 2,
|
|
@@ -1769,7 +963,7 @@ var SemanticColors;
|
|
|
1769
963
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
1770
964
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
1771
965
|
})(SemanticColors || (SemanticColors = {}));
|
|
1772
|
-
var useStyles
|
|
966
|
+
var useStyles = core.makeStyles(function (theme) { return ({
|
|
1773
967
|
dividerRoot: {
|
|
1774
968
|
gap: theme.spacing(2),
|
|
1775
969
|
},
|
|
@@ -1807,27 +1001,19 @@ var useStyles$1 = core.makeStyles(function (theme) { return ({
|
|
|
1807
1001
|
}); });
|
|
1808
1002
|
var Divider = function (props) {
|
|
1809
1003
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
1810
|
-
var classes = useStyles
|
|
1004
|
+
var classes = useStyles(props);
|
|
1811
1005
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
1812
|
-
return (React__default['default'].createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
1813
|
-
React__default['default'].createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
1006
|
+
return (React__default['default'].createElement(core.Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
1007
|
+
React__default['default'].createElement(core.Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
1814
1008
|
text && (React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
1815
1009
|
React__default['default'].createElement(Typography, __assign({ className: classes.textRoot }, TypographyProps), text),
|
|
1816
|
-
React__default['default'].createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset })))));
|
|
1010
|
+
React__default['default'].createElement(core.Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset })))));
|
|
1817
1011
|
};
|
|
1818
1012
|
Divider.displayName = 'Divider';
|
|
1819
1013
|
Divider.defaultProps = {
|
|
1820
1014
|
textTransform: 'lowercase',
|
|
1821
1015
|
};
|
|
1822
1016
|
|
|
1823
|
-
var IconButton = React.forwardRef(function (props, ref) {
|
|
1824
|
-
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
1825
|
-
});
|
|
1826
|
-
IconButton.displayName = 'IconButton';
|
|
1827
|
-
IconButton.defaultProps = {
|
|
1828
|
-
color: 'secondary',
|
|
1829
|
-
};
|
|
1830
|
-
|
|
1831
1017
|
var getLinkColor = function (_a, _b) {
|
|
1832
1018
|
var palette = _a.palette;
|
|
1833
1019
|
var _c = _b.color, color = _c === void 0 ? 'info' : _c;
|
|
@@ -1868,31 +1054,9 @@ Link.defaultProps = {
|
|
|
1868
1054
|
};
|
|
1869
1055
|
Link.displayName = 'Link';
|
|
1870
1056
|
|
|
1871
|
-
var useStyles = core.makeStyles(function (_a) {
|
|
1872
|
-
var spacing = _a.spacing;
|
|
1873
|
-
return ({
|
|
1874
|
-
root: {
|
|
1875
|
-
'&:last-child': {
|
|
1876
|
-
marginBottom: 0,
|
|
1877
|
-
},
|
|
1878
|
-
marginBottom: spacing(4),
|
|
1879
|
-
padding: spacing(4),
|
|
1880
|
-
},
|
|
1881
|
-
});
|
|
1882
|
-
});
|
|
1883
|
-
var Paper = React.forwardRef(function (props, ref) {
|
|
1884
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
1885
|
-
var classes = useStyles(props);
|
|
1886
|
-
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
1887
|
-
});
|
|
1888
|
-
Paper.displayName = 'Paper';
|
|
1889
|
-
Paper.defaultProps = {
|
|
1890
|
-
legacyStyles: false,
|
|
1891
|
-
};
|
|
1892
|
-
|
|
1893
1057
|
var PaperContent = function (props) {
|
|
1894
1058
|
var children = props.children;
|
|
1895
|
-
return React__default['default'].createElement(Box, { padding: 4 }, children);
|
|
1059
|
+
return React__default['default'].createElement(core.Box, { padding: 4 }, children);
|
|
1896
1060
|
};
|
|
1897
1061
|
|
|
1898
1062
|
var Radio = React.forwardRef(function (props, ref) {
|
|
@@ -1930,7 +1094,7 @@ var useSplitInputStyles = styles.makeStyles(function () { return ({
|
|
|
1930
1094
|
var SplitInput = function (props) {
|
|
1931
1095
|
var TextFieldProps = props.TextFieldProps, ButtonProps = props.ButtonProps, color = props.color, onChange = props.onChange, onClick = props.onClick;
|
|
1932
1096
|
var classes = useSplitInputStyles(props);
|
|
1933
|
-
return (React__default['default'].createElement(Box, { display: "flex" },
|
|
1097
|
+
return (React__default['default'].createElement(core.Box, { display: "flex" },
|
|
1934
1098
|
React__default['default'].createElement(TextField__default['default'], __assign({ classes: { root: classes.textfield }, InputProps: { classes: { root: classes.input, focused: classes.focused } }, color: color, variant: "outlined", onChange: onChange }, TextFieldProps)),
|
|
1935
1099
|
React__default['default'].createElement(Button, __assign({ classes: { root: classes.button }, disableElevation: true, color: color, variant: "contained", onClick: onClick }, ButtonProps), "Submit")));
|
|
1936
1100
|
};
|
|
@@ -6547,7 +5711,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
6547
5711
|
}
|
|
6548
5712
|
|
|
6549
5713
|
var TableFooter = function (props) {
|
|
6550
|
-
return (React__default['default'].createElement(Box, { display: "flex", justifyContent: "center", alignItems: "end", paddingTop: 3, paddingBottom: 4, flexGrow: 1 }, props.children));
|
|
5714
|
+
return (React__default['default'].createElement(core.Box, { display: "flex", justifyContent: "center", alignItems: "end", paddingTop: 3, paddingBottom: 4, flexGrow: 1 }, props.children));
|
|
6551
5715
|
};
|
|
6552
5716
|
|
|
6553
5717
|
var TableHeader = function (props) {
|
|
@@ -6587,69 +5751,15 @@ var useTableHeaderCellStyles = core.makeStyles(function (theme) { return ({
|
|
|
6587
5751
|
},
|
|
6588
5752
|
}); });
|
|
6589
5753
|
|
|
6590
|
-
var _path$3K;
|
|
6591
|
-
|
|
6592
|
-
function _extends$3$() { _extends$3$ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3$.apply(this, arguments); }
|
|
6593
|
-
|
|
6594
|
-
function SvgMore(props) {
|
|
6595
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3$({
|
|
6596
|
-
viewBox: "0 0 16 16",
|
|
6597
|
-
strokeLinecap: "round",
|
|
6598
|
-
strokeLinejoin: "round",
|
|
6599
|
-
stroke: "currentColor",
|
|
6600
|
-
width: "1em",
|
|
6601
|
-
height: "1em",
|
|
6602
|
-
fill: "none"
|
|
6603
|
-
}, props), _path$3K || (_path$3K = /*#__PURE__*/React__namespace.createElement("path", {
|
|
6604
|
-
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
|
|
6605
|
-
})));
|
|
6606
|
-
}
|
|
6607
|
-
|
|
6608
|
-
var _path$2X;
|
|
6609
|
-
|
|
6610
|
-
function _extends$3b() { _extends$3b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3b.apply(this, arguments); }
|
|
6611
|
-
|
|
6612
|
-
function SvgChevronDown(props) {
|
|
6613
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3b({
|
|
6614
|
-
viewBox: "0 0 16 16",
|
|
6615
|
-
strokeLinecap: "round",
|
|
6616
|
-
strokeLinejoin: "round",
|
|
6617
|
-
stroke: "currentColor",
|
|
6618
|
-
width: "1em",
|
|
6619
|
-
height: "1em",
|
|
6620
|
-
fill: "none"
|
|
6621
|
-
}, props), _path$2X || (_path$2X = /*#__PURE__*/React__namespace.createElement("path", {
|
|
6622
|
-
d: "M4 6l4 4 4-4"
|
|
6623
|
-
})));
|
|
6624
|
-
}
|
|
6625
|
-
|
|
6626
|
-
var _path$2W;
|
|
6627
|
-
|
|
6628
|
-
function _extends$3a() { _extends$3a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3a.apply(this, arguments); }
|
|
6629
|
-
|
|
6630
|
-
function SvgChevronUp(props) {
|
|
6631
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3a({
|
|
6632
|
-
viewBox: "0 0 16 16",
|
|
6633
|
-
strokeLinecap: "round",
|
|
6634
|
-
strokeLinejoin: "round",
|
|
6635
|
-
stroke: "currentColor",
|
|
6636
|
-
width: "1em",
|
|
6637
|
-
height: "1em",
|
|
6638
|
-
fill: "none"
|
|
6639
|
-
}, props), _path$2W || (_path$2W = /*#__PURE__*/React__namespace.createElement("path", {
|
|
6640
|
-
d: "M12 10L8 6l-4 4"
|
|
6641
|
-
})));
|
|
6642
|
-
}
|
|
6643
|
-
|
|
6644
5754
|
var TableHeaderCell = function (props) {
|
|
6645
5755
|
var children = props.children, column = props.column; props.tableProps; var restProps = __rest(props, ["children", "column", "tableProps"]);
|
|
6646
5756
|
var root = useTableHeaderCellStyles(props).root;
|
|
6647
|
-
var
|
|
5757
|
+
var _a = core.useTheme(), palette = _a.palette, spacing = _a.spacing;
|
|
6648
5758
|
//@ts-expect-error @types/react-table issue
|
|
6649
5759
|
var canSort = column.canSort, isSorted = column.isSorted, isSortedDesc = column.isSortedDesc, isActionColumn = column.isActionColumn;
|
|
6650
5760
|
var showSortIndicator = canSort && !isActionColumn;
|
|
6651
5761
|
return (React__default['default'].createElement("th", __assign({ className: root }, restProps),
|
|
6652
|
-
React__default['default'].createElement(Box, { display: "flex", alignItems: "center",
|
|
5762
|
+
React__default['default'].createElement(core.Box, { display: "flex", alignItems: "center", gridGap: spacing(1) },
|
|
6653
5763
|
children,
|
|
6654
5764
|
showSortIndicator && (React__default['default'].createElement(Icon, { icon: isSortedDesc ? SvgChevronDown : SvgChevronUp, color: isSorted ? palette.text.primary : palette.text.disabled, size: "large" })))));
|
|
6655
5765
|
};
|
|
@@ -6706,14 +5816,16 @@ var useTableStyles = core.makeStyles(function (_a) {
|
|
|
6706
5816
|
},
|
|
6707
5817
|
tableWrap: function () { return ({
|
|
6708
5818
|
maxWidth: '100%',
|
|
6709
|
-
overflowX: '
|
|
5819
|
+
overflowX: 'auto',
|
|
6710
5820
|
overflowY: 'hidden',
|
|
6711
5821
|
}); },
|
|
6712
5822
|
});
|
|
6713
5823
|
});
|
|
6714
5824
|
|
|
6715
5825
|
var TableActionsCell = function (props) {
|
|
6716
|
-
var _a = props.actions, primary = _a.primary, secondary = _a.secondary,
|
|
5826
|
+
var _a = props.actions, primary = _a.primary, secondary = _a.secondary, intermediate = __rest(_a, ["primary", "secondary"]);
|
|
5827
|
+
var tertiary = intermediate.tertiary, restActions = __rest(intermediate, ["tertiary"]);
|
|
5828
|
+
var overflow = Object.keys(props.actions).length > 3;
|
|
6717
5829
|
var _b = React__default['default'].useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
6718
5830
|
var openMenu = function (event) {
|
|
6719
5831
|
setAnchorEl(event.currentTarget);
|
|
@@ -6725,15 +5837,19 @@ var TableActionsCell = function (props) {
|
|
|
6725
5837
|
action(props.cell);
|
|
6726
5838
|
closeMenu();
|
|
6727
5839
|
};
|
|
6728
|
-
return (React__default['default'].createElement(Box, { display: "flex" },
|
|
5840
|
+
return (React__default['default'].createElement(core.Box, { display: "flex" },
|
|
6729
5841
|
primary && primary.icon && (React__default['default'].createElement(IconButton, { size: "small", onClick: function () { return primary.action(props.cell); } },
|
|
6730
5842
|
React__default['default'].createElement(Icon, { icon: primary.icon }))),
|
|
6731
5843
|
secondary && secondary.icon && (React__default['default'].createElement(IconButton, { size: "small", onClick: function () { return secondary.action(props.cell); } },
|
|
6732
5844
|
React__default['default'].createElement(Icon, { icon: secondary.icon }))),
|
|
6733
|
-
|
|
5845
|
+
!overflow && tertiary && tertiary.icon && (React__default['default'].createElement(IconButton, { size: "small", onClick: function () { return tertiary.action(props.cell); } },
|
|
5846
|
+
React__default['default'].createElement(Icon, { icon: tertiary.icon }))),
|
|
5847
|
+
overflow && restActions && (React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
6734
5848
|
React__default['default'].createElement(IconButton, { size: "small", onClick: openMenu },
|
|
6735
5849
|
React__default['default'].createElement(Icon, { icon: SvgMore })),
|
|
6736
|
-
React__default['default'].createElement(Menu__default['default'], { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: closeMenu }, Object.values(
|
|
5850
|
+
React__default['default'].createElement(Menu__default['default'], { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: closeMenu }, Object.values(__assign({ tertiary: tertiary }, restActions))
|
|
5851
|
+
.filter(function (value) { return value; })
|
|
5852
|
+
.map(function (_a, i) {
|
|
6737
5853
|
var label = _a.label, action = _a.action;
|
|
6738
5854
|
return (React__default['default'].createElement(MenuItem__default['default'], { key: i, onClick: function () { return handleItemClick(action); } }, label));
|
|
6739
5855
|
}))))));
|
|
@@ -6758,7 +5874,7 @@ var makeColumns = function (config) {
|
|
|
6758
5874
|
/* eslint-disable react/jsx-key */
|
|
6759
5875
|
var Table = function (props) {
|
|
6760
5876
|
var actionColumnId = 'table-actions-column';
|
|
6761
|
-
var rawColumns = props.columns, data = props.data, actions = props.actions, sortable = props.sortable, emptyMessage = props.emptyMessage, EmptyImage = props.EmptyImage, isLoading = props.loading;
|
|
5877
|
+
var rawColumns = props.columns, data = props.data, actions = props.actions, sortable = props.sortable, emptyMessage = props.emptyMessage, EmptyImage = props.EmptyImage, isLoading = props.loading, enableMinHeight = props.enableMinHeight;
|
|
6762
5878
|
var classes = useTableStyles(props);
|
|
6763
5879
|
var columns = React.useMemo(function () { return makeColumns({ columns: rawColumns, actions: actions, actionColumnId: actionColumnId }); }, [rawColumns, actions]);
|
|
6764
5880
|
// @ts-expect-error @types/react-table issue
|
|
@@ -6770,8 +5886,8 @@ var Table = function (props) {
|
|
|
6770
5886
|
var handlePagination = function (_e, pageNumber) {
|
|
6771
5887
|
gotoPage(pageNumber - 1);
|
|
6772
5888
|
};
|
|
6773
|
-
return (React__default['default'].createElement(Box, { className: classes.root, minHeight:
|
|
6774
|
-
React__default['default'].createElement(Box, { className: classes.tableWrap },
|
|
5889
|
+
return (React__default['default'].createElement(core.Box, { className: classes.root, minHeight: (isLoading || isEmpty) && enableMinHeight ? 618 : 'unset' },
|
|
5890
|
+
React__default['default'].createElement(core.Box, { className: classes.tableWrap, minHeight: page.length > 0 && !isLoading && enableMinHeight ? 618 : 'unset' },
|
|
6775
5891
|
React__default['default'].createElement("table", __assign({ className: classes.table }, getTableProps()),
|
|
6776
5892
|
React__default['default'].createElement(TableHeader, null, headerGroups.map(function (headerGroup) { return (React__default['default'].createElement(TableHeaderRow, __assign({}, headerGroup.getHeaderGroupProps()), headerGroup.headers.map(function (column) { return (React__default['default'].createElement(TableHeaderCell
|
|
6777
5893
|
// @ts-expect-error @types/react-table issue
|
|
@@ -6780,16 +5896,17 @@ var Table = function (props) {
|
|
|
6780
5896
|
prepareRow(row);
|
|
6781
5897
|
return (React__default['default'].createElement(TableRow, __assign({}, row.getRowProps()), row.cells.map(function (cell) { return (React__default['default'].createElement(TableCell, __assign({}, cell.getCellProps()), cell.render('Cell'))); })));
|
|
6782
5898
|
}))))),
|
|
6783
|
-
isEmpty && (React__default['default'].createElement(Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
|
|
5899
|
+
isEmpty && (React__default['default'].createElement(core.Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
|
|
6784
5900
|
EmptyImage && EmptyImage(),
|
|
6785
5901
|
React__default['default'].createElement(Typography, null, emptyMessage))),
|
|
6786
|
-
isLoading && (React__default['default'].createElement(Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
|
|
5902
|
+
isLoading && (React__default['default'].createElement(core.Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", p: 2, flexGrow: 1 },
|
|
6787
5903
|
React__default['default'].createElement(CircularProgress__default['default'], { size: 80, color: "inherit" }))),
|
|
6788
5904
|
isPaginated && !isLoading && (React__default['default'].createElement(TableFooter, null,
|
|
6789
5905
|
React__default['default'].createElement(lab.Pagination, { count: pageCount, page: state.pageIndex + 1, onChange: handlePagination })))));
|
|
6790
5906
|
};
|
|
6791
5907
|
Table.defaultProps = {
|
|
6792
5908
|
emptyMessage: 'No results.',
|
|
5909
|
+
enableMinHeight: true,
|
|
6793
5910
|
};
|
|
6794
5911
|
|
|
6795
5912
|
var useToggleButtonStyles = styles.makeStyles(function (theme) { return ({
|
|
@@ -6900,6 +6017,12 @@ Object.defineProperty(exports, 'AccordionSummary', {
|
|
|
6900
6017
|
return core.AccordionSummary;
|
|
6901
6018
|
}
|
|
6902
6019
|
});
|
|
6020
|
+
Object.defineProperty(exports, 'Box', {
|
|
6021
|
+
enumerable: true,
|
|
6022
|
+
get: function () {
|
|
6023
|
+
return core.Box;
|
|
6024
|
+
}
|
|
6025
|
+
});
|
|
6903
6026
|
Object.defineProperty(exports, 'Breadcrumbs', {
|
|
6904
6027
|
enumerable: true,
|
|
6905
6028
|
get: function () {
|
|
@@ -7266,8 +6389,8 @@ Object.defineProperty(exports, 'Tabs', {
|
|
|
7266
6389
|
return Tabs__default['default'];
|
|
7267
6390
|
}
|
|
7268
6391
|
});
|
|
6392
|
+
exports.AudioPlayer = AudioPlayer;
|
|
7269
6393
|
exports.Avatar = Avatar;
|
|
7270
|
-
exports.Box = Box;
|
|
7271
6394
|
exports.Button = Button;
|
|
7272
6395
|
exports.Checkbox = Checkbox;
|
|
7273
6396
|
exports.CollapsibleText = CollapsibleText;
|