@hybridcore/ui 1.0.2 → 1.1.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.
Files changed (105) hide show
  1. package/dist/ButtonBase-BYmh3G5j.js +967 -0
  2. package/dist/CardContent-C8PxkJz4.js +73 -0
  3. package/dist/Checkbox-DostZSwR.js +673 -0
  4. package/dist/DialogContent-2aPOjKE7.js +2025 -0
  5. package/dist/FormControl-BiAFm76F.js +1491 -0
  6. package/dist/IconButton-CQJ8wZE8.js +183 -0
  7. package/dist/Input-Bf5G3tFN.js +324 -0
  8. package/dist/OutlinedInput-BEVE8VZQ.js +452 -0
  9. package/dist/Paper-CaiWdndQ.js +162 -0
  10. package/dist/Select-DxpxZbJp.js +2526 -0
  11. package/dist/Source-CnCcu5UP.js +4374 -0
  12. package/dist/Text-BT5kPHOo.js +2192 -0
  13. package/dist/Typography-XIiVCSto.js +178 -0
  14. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  15. package/dist/assets/index.css +1 -0
  16. package/dist/assets/index2.css +1 -0
  17. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  18. package/dist/components/access/helpers.js +32 -0
  19. package/dist/components/access/index.js +15 -0
  20. package/dist/components/card/index.js +159 -469
  21. package/dist/components/card/styled.js +75 -7
  22. package/dist/components/conditional-wrapper/index.js +9 -0
  23. package/dist/components/confirm/dialog.js +151 -0
  24. package/dist/components/confirm/index.js +23 -0
  25. package/dist/components/container/index.js +270 -0
  26. package/dist/components/context-menu/index.js +973 -0
  27. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  28. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  29. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  30. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  31. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  32. package/dist/components/data-management/instance-form/index.js +437 -0
  33. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  34. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  35. package/dist/components/date-time-picker/index.js +103 -0
  36. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  37. package/dist/components/geometry-picker/edit/index.js +71 -0
  38. package/dist/components/geometry-picker/geometry/index.js +160 -0
  39. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  40. package/dist/components/geometry-picker/index.js +140 -0
  41. package/dist/components/geometry-picker/kml/index.js +62 -0
  42. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  43. package/dist/components/geometry-picker/logic.js +69 -0
  44. package/dist/components/geometry-picker/map/index.js +42 -0
  45. package/dist/components/geometry-picker/map/logic.js +2360 -0
  46. package/dist/components/geometry-picker/map/style.js +88 -0
  47. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  48. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  49. package/dist/components/geometry-picker/parser/index.js +179 -0
  50. package/dist/components/geometry-picker/parser/logic.js +84 -0
  51. package/dist/components/geometry-picker/parser/styled.js +25 -0
  52. package/dist/components/geometry-picker/styled.js +48 -0
  53. package/dist/components/geometry-picker/wkt/index.js +59 -0
  54. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  55. package/dist/components/icon-button/index.js +18 -0
  56. package/dist/components/icon-button/styled.js +51 -0
  57. package/dist/components/key-protection/index.js +4 -0
  58. package/dist/components/key-protection/menu.js +85 -0
  59. package/dist/components/key-protection/utils.js +10 -0
  60. package/dist/components/loading/index.js +7 -0
  61. package/dist/components/loading/styled.js +16 -0
  62. package/dist/components/map/helpers/kml.js +45 -0
  63. package/dist/components/map/helpers/mapbox.js +48 -0
  64. package/dist/components/map/helpers/ol.js +25 -0
  65. package/dist/components/map/helpers/wkt.js +29 -0
  66. package/dist/components/map/index.js +8 -0
  67. package/dist/components/map/logic.js +140 -0
  68. package/dist/components/map/styled.js +8 -0
  69. package/dist/components/phone-input/index.js +25 -0
  70. package/dist/components/phone-input/styled.js +26 -0
  71. package/dist/components/search-input/index.js +76 -0
  72. package/dist/components/tree-select/index.js +70 -0
  73. package/dist/components/tree-select/styled.js +64 -0
  74. package/dist/components/treeview-filter/index.js +621 -0
  75. package/dist/components/treeview-filter/item/index.js +7 -0
  76. package/dist/components/treeview-filter/item-label/index.js +44 -0
  77. package/dist/createTheme-agWfFD64.js +2392 -0
  78. package/dist/exactProp-CI8dagM-.js +36 -0
  79. package/dist/extends-C3382pL0.js +22 -0
  80. package/dist/has-9_asnBxn.js +688 -0
  81. package/dist/hooks/useMenuLogic.js +21 -0
  82. package/dist/hooks/useToggle.js +23 -0
  83. package/dist/index-Bw_m9ult.js +1105 -0
  84. package/dist/index-IvOfmM1F.js +34 -0
  85. package/dist/index-wW2D1aTG.js +957 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/listItemTextClasses-BvXFz-Oc.js +132 -0
  89. package/dist/main.d.ts +1317 -0
  90. package/dist/main.js +41 -2
  91. package/dist/ol-DXmSLlWv.js +15041 -0
  92. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  93. package/dist/ownerWindow-niciwP7I.js +7 -0
  94. package/dist/styled-C43K9x7T.js +229 -0
  95. package/dist/styled-Iq9jsO4F.js +1033 -0
  96. package/dist/useFormControl-CatNKXAi.js +10 -0
  97. package/dist/useId-BHG98T5I.js +26 -0
  98. package/dist/useTheme-C0Dky5rV.js +17 -0
  99. package/dist/useTheme-CeyGVuQP.js +10 -0
  100. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  101. package/dist/utils/ontology.js +37 -0
  102. package/dist/utils-Bq0ye5vf.js +115 -0
  103. package/dist/utils-DLpkeyhZ.js +365 -0
  104. package/package.json +26 -5
  105. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,2526 @@
1
+ import { a as c, _ as q } from "./extends-C3382pL0.js";
2
+ import * as r from "react";
3
+ import { P as e, n as We, c as $e, l as xo, d as uo } from "./createTheme-agWfFD64.js";
4
+ import { g as le, u as Ce, c as re, a as de, b as Ro } from "./chainPropTypes-DtBfUj5o.js";
5
+ import { g as fe, s as U, r as Oe, a as Me, h as So } from "./styled-Iq9jsO4F.js";
6
+ import { l as Qe, c as Ze, L as eo, b as Mo } from "./listItemTextClasses-BvXFz-Oc.js";
7
+ import { jsx as $, jsxs as fo } from "react/jsx-runtime";
8
+ import { B as wo, u as mo, a as me, d as No, r as Fe, e as $o } from "./ButtonBase-BYmh3G5j.js";
9
+ import { d as Fo, M as Do, u as Ne, H as Be } from "./DialogContent-2aPOjKE7.js";
10
+ import { P as ko, i as jo } from "./Paper-CaiWdndQ.js";
11
+ import { o as Ee } from "./ownerDocument-CUrv0DIK.js";
12
+ import { o as oo } from "./ownerWindow-niciwP7I.js";
13
+ import { g as Lo, h as _o, i as Vo, b as Ao, r as Bo, c as Uo, d as Wo, e as zo, f as Ho } from "./FormControl-BiAFm76F.js";
14
+ import { i as Ko } from "./isHostComponent-kiaBvYVo.js";
15
+ import { u as qo } from "./useTheme-CeyGVuQP.js";
16
+ import { T as Go, r as Xo, g as to } from "./utils-DLpkeyhZ.js";
17
+ import { e as Yo } from "./exactProp-CI8dagM-.js";
18
+ import { u as no, c as Jo } from "./Checkbox-DostZSwR.js";
19
+ import { u as Qo } from "./useId-BHG98T5I.js";
20
+ import { u as Zo } from "./useFormControl-CatNKXAi.js";
21
+ import { I as et } from "./Input-Bf5G3tFN.js";
22
+ import { O as ot } from "./OutlinedInput-BEVE8VZQ.js";
23
+ const tt = /* @__PURE__ */ r.createContext();
24
+ process.env.NODE_ENV !== "production" && (e.node, e.bool);
25
+ const nt = () => {
26
+ const o = r.useContext(tt);
27
+ return o ?? !1;
28
+ }, ro = le("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
29
+ function rt(o) {
30
+ return fe("MuiMenuItem", o);
31
+ }
32
+ const he = le("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]), st = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"], it = (o, t) => {
33
+ const {
34
+ ownerState: n
35
+ } = o;
36
+ return [t.root, n.dense && t.dense, n.divider && t.divider, !n.disableGutters && t.gutters];
37
+ }, at = (o) => {
38
+ const {
39
+ disabled: t,
40
+ dense: n,
41
+ divider: l,
42
+ disableGutters: m,
43
+ selected: g,
44
+ classes: p
45
+ } = o, b = de({
46
+ root: ["root", n && "dense", t && "disabled", !m && "gutters", l && "divider", g && "selected"]
47
+ }, rt, p);
48
+ return c({}, p, b);
49
+ }, lt = U(wo, {
50
+ shouldForwardProp: (o) => Oe(o) || o === "classes",
51
+ name: "MuiMenuItem",
52
+ slot: "Root",
53
+ overridesResolver: it
54
+ })(({
55
+ theme: o,
56
+ ownerState: t
57
+ }) => c({}, o.typography.body1, {
58
+ display: "flex",
59
+ justifyContent: "flex-start",
60
+ alignItems: "center",
61
+ position: "relative",
62
+ textDecoration: "none",
63
+ minHeight: 48,
64
+ paddingTop: 6,
65
+ paddingBottom: 6,
66
+ boxSizing: "border-box",
67
+ whiteSpace: "nowrap"
68
+ }, !t.disableGutters && {
69
+ paddingLeft: 16,
70
+ paddingRight: 16
71
+ }, t.divider && {
72
+ borderBottom: `1px solid ${(o.vars || o).palette.divider}`,
73
+ backgroundClip: "padding-box"
74
+ }, {
75
+ "&:hover": {
76
+ textDecoration: "none",
77
+ backgroundColor: (o.vars || o).palette.action.hover,
78
+ // Reset on touch devices, it doesn't add specificity
79
+ "@media (hover: none)": {
80
+ backgroundColor: "transparent"
81
+ }
82
+ },
83
+ [`&.${he.selected}`]: {
84
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : Me(o.palette.primary.main, o.palette.action.selectedOpacity),
85
+ [`&.${he.focusVisible}`]: {
86
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.focusOpacity}))` : Me(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.focusOpacity)
87
+ }
88
+ },
89
+ [`&.${he.selected}:hover`]: {
90
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / calc(${o.vars.palette.action.selectedOpacity} + ${o.vars.palette.action.hoverOpacity}))` : Me(o.palette.primary.main, o.palette.action.selectedOpacity + o.palette.action.hoverOpacity),
91
+ // Reset on touch devices, it doesn't add specificity
92
+ "@media (hover: none)": {
93
+ backgroundColor: o.vars ? `rgba(${o.vars.palette.primary.mainChannel} / ${o.vars.palette.action.selectedOpacity})` : Me(o.palette.primary.main, o.palette.action.selectedOpacity)
94
+ }
95
+ },
96
+ [`&.${he.focusVisible}`]: {
97
+ backgroundColor: (o.vars || o).palette.action.focus
98
+ },
99
+ [`&.${he.disabled}`]: {
100
+ opacity: (o.vars || o).palette.action.disabledOpacity
101
+ },
102
+ [`& + .${ro.root}`]: {
103
+ marginTop: o.spacing(1),
104
+ marginBottom: o.spacing(1)
105
+ },
106
+ [`& + .${ro.inset}`]: {
107
+ marginLeft: 52
108
+ },
109
+ [`& .${Qe.root}`]: {
110
+ marginTop: 0,
111
+ marginBottom: 0
112
+ },
113
+ [`& .${Qe.inset}`]: {
114
+ paddingLeft: 36
115
+ },
116
+ [`& .${Ze.root}`]: {
117
+ minWidth: 36
118
+ }
119
+ }, !t.dense && {
120
+ [o.breakpoints.up("sm")]: {
121
+ minHeight: "auto"
122
+ }
123
+ }, t.dense && c({
124
+ minHeight: 32,
125
+ // https://m2.material.io/components/menus#specs > Dense
126
+ paddingTop: 4,
127
+ paddingBottom: 4
128
+ }, o.typography.body2, {
129
+ [`& .${Ze.root} svg`]: {
130
+ fontSize: "1.25rem"
131
+ }
132
+ }))), ct = /* @__PURE__ */ r.forwardRef(function(t, n) {
133
+ const l = Ce({
134
+ props: t,
135
+ name: "MuiMenuItem"
136
+ }), {
137
+ autoFocus: m = !1,
138
+ component: g = "li",
139
+ dense: p = !1,
140
+ divider: u = !1,
141
+ disableGutters: b = !1,
142
+ focusVisibleClassName: O,
143
+ role: x = "menuitem",
144
+ tabIndex: E,
145
+ className: M
146
+ } = l, I = q(l, st), F = r.useContext(eo), R = r.useMemo(() => ({
147
+ dense: p || F.dense || !1,
148
+ disableGutters: b
149
+ }), [F.dense, p, b]), C = r.useRef(null);
150
+ mo(() => {
151
+ m && (C.current ? C.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."));
152
+ }, [m]);
153
+ const d = c({}, l, {
154
+ dense: R.dense,
155
+ divider: u,
156
+ disableGutters: b
157
+ }), S = at(l), i = me(C, n);
158
+ let a;
159
+ return l.disabled || (a = E !== void 0 ? E : -1), /* @__PURE__ */ $(eo.Provider, {
160
+ value: R,
161
+ children: /* @__PURE__ */ $(lt, c({
162
+ ref: i,
163
+ role: x,
164
+ tabIndex: a,
165
+ component: g,
166
+ focusVisibleClassName: re(S.focusVisible, O),
167
+ className: re(S.root, M)
168
+ }, I, {
169
+ ownerState: d,
170
+ classes: S
171
+ }))
172
+ });
173
+ });
174
+ process.env.NODE_ENV !== "production" && (ct.propTypes = {
175
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
176
+ // │ These PropTypes are generated from the TypeScript type definitions. │
177
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
178
+ // └─────────────────────────────────────────────────────────────────────┘
179
+ /**
180
+ * If `true`, the list item is focused during the first mount.
181
+ * Focus will also be triggered if the value changes from false to true.
182
+ * @default false
183
+ */
184
+ autoFocus: e.bool,
185
+ /**
186
+ * The content of the component.
187
+ */
188
+ children: e.node,
189
+ /**
190
+ * Override or extend the styles applied to the component.
191
+ */
192
+ classes: e.object,
193
+ /**
194
+ * @ignore
195
+ */
196
+ className: e.string,
197
+ /**
198
+ * The component used for the root node.
199
+ * Either a string to use a HTML element or a component.
200
+ */
201
+ component: e.elementType,
202
+ /**
203
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used.
204
+ * The prop defaults to the value inherited from the parent Menu component.
205
+ * @default false
206
+ */
207
+ dense: e.bool,
208
+ /**
209
+ * @ignore
210
+ */
211
+ disabled: e.bool,
212
+ /**
213
+ * If `true`, the left and right padding is removed.
214
+ * @default false
215
+ */
216
+ disableGutters: e.bool,
217
+ /**
218
+ * If `true`, a 1px light border is added to the bottom of the menu item.
219
+ * @default false
220
+ */
221
+ divider: e.bool,
222
+ /**
223
+ * This prop can help identify which element has keyboard focus.
224
+ * The class name will be applied when the element gains the focus through keyboard interaction.
225
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
226
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
227
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
228
+ * if needed.
229
+ */
230
+ focusVisibleClassName: e.string,
231
+ /**
232
+ * @ignore
233
+ */
234
+ role: e.string,
235
+ /**
236
+ * If `true`, the component is selected.
237
+ * @default false
238
+ */
239
+ selected: e.bool,
240
+ /**
241
+ * The system prop that allows defining system overrides as well as additional CSS styles.
242
+ */
243
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
244
+ /**
245
+ * @default 0
246
+ */
247
+ tabIndex: e.number
248
+ });
249
+ const pt = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
250
+ function Ve(o, t, n) {
251
+ return o === t ? o.firstChild : t && t.nextElementSibling ? t.nextElementSibling : n ? null : o.firstChild;
252
+ }
253
+ function so(o, t, n) {
254
+ return o === t ? n ? o.firstChild : o.lastChild : t && t.previousElementSibling ? t.previousElementSibling : n ? null : o.lastChild;
255
+ }
256
+ function bo(o, t) {
257
+ if (t === void 0)
258
+ return !0;
259
+ let n = o.innerText;
260
+ return n === void 0 && (n = o.textContent), n = n.trim().toLowerCase(), n.length === 0 ? !1 : t.repeating ? n[0] === t.keys[0] : n.indexOf(t.keys.join("")) === 0;
261
+ }
262
+ function ye(o, t, n, l, m, g) {
263
+ let p = !1, u = m(o, t, t ? n : !1);
264
+ for (; u; ) {
265
+ if (u === o.firstChild) {
266
+ if (p)
267
+ return !1;
268
+ p = !0;
269
+ }
270
+ const b = l ? !1 : u.disabled || u.getAttribute("aria-disabled") === "true";
271
+ if (!u.hasAttribute("tabindex") || !bo(u, g) || b)
272
+ u = m(o, u, n);
273
+ else
274
+ return u.focus(), !0;
275
+ }
276
+ return !1;
277
+ }
278
+ const go = /* @__PURE__ */ r.forwardRef(function(t, n) {
279
+ const {
280
+ // private
281
+ // eslint-disable-next-line react/prop-types
282
+ actions: l,
283
+ autoFocus: m = !1,
284
+ autoFocusItem: g = !1,
285
+ children: p,
286
+ className: u,
287
+ disabledItemsFocusable: b = !1,
288
+ disableListWrap: O = !1,
289
+ onKeyDown: x,
290
+ variant: E = "selectedMenu"
291
+ } = t, M = q(t, pt), I = r.useRef(null), F = r.useRef({
292
+ keys: [],
293
+ repeating: !0,
294
+ previousKeyMatched: !0,
295
+ lastTime: null
296
+ });
297
+ mo(() => {
298
+ m && I.current.focus();
299
+ }, [m]), r.useImperativeHandle(l, () => ({
300
+ adjustStyleForScrollbar: (i, {
301
+ direction: a
302
+ }) => {
303
+ const h = !I.current.style.width;
304
+ if (i.clientHeight < I.current.clientHeight && h) {
305
+ const T = `${Fo(Ee(i))}px`;
306
+ I.current.style[a === "rtl" ? "paddingLeft" : "paddingRight"] = T, I.current.style.width = `calc(100% + ${T})`;
307
+ }
308
+ return I.current;
309
+ }
310
+ }), []);
311
+ const R = (i) => {
312
+ const a = I.current, h = i.key, T = Ee(a).activeElement;
313
+ if (h === "ArrowDown")
314
+ i.preventDefault(), ye(a, T, O, b, Ve);
315
+ else if (h === "ArrowUp")
316
+ i.preventDefault(), ye(a, T, O, b, so);
317
+ else if (h === "Home")
318
+ i.preventDefault(), ye(a, null, O, b, Ve);
319
+ else if (h === "End")
320
+ i.preventDefault(), ye(a, null, O, b, so);
321
+ else if (h.length === 1) {
322
+ const v = F.current, W = h.toLowerCase(), z = performance.now();
323
+ v.keys.length > 0 && (z - v.lastTime > 500 ? (v.keys = [], v.repeating = !0, v.previousKeyMatched = !0) : v.repeating && W !== v.keys[0] && (v.repeating = !1)), v.lastTime = z, v.keys.push(W);
324
+ const H = T && !v.repeating && bo(T, v);
325
+ v.previousKeyMatched && (H || ye(a, T, !1, b, Ve, v)) ? i.preventDefault() : v.previousKeyMatched = !1;
326
+ }
327
+ x && x(i);
328
+ }, C = me(I, n);
329
+ let d = -1;
330
+ r.Children.forEach(p, (i, a) => {
331
+ if (!/* @__PURE__ */ r.isValidElement(i)) {
332
+ d === a && (d += 1, d >= p.length && (d = -1));
333
+ return;
334
+ }
335
+ process.env.NODE_ENV !== "production" && We.isFragment(i) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
336
+ `)), i.props.disabled || (E === "selectedMenu" && i.props.selected || d === -1) && (d = a), d === a && (i.props.disabled || i.props.muiSkipListHighlight || i.type.muiSkipListHighlight) && (d += 1, d >= p.length && (d = -1));
337
+ });
338
+ const S = r.Children.map(p, (i, a) => {
339
+ if (a === d) {
340
+ const h = {};
341
+ return g && (h.autoFocus = !0), i.props.tabIndex === void 0 && E === "selectedMenu" && (h.tabIndex = 0), /* @__PURE__ */ r.cloneElement(i, h);
342
+ }
343
+ return i;
344
+ });
345
+ return /* @__PURE__ */ $(Mo, c({
346
+ role: "menu",
347
+ ref: C,
348
+ className: u,
349
+ onKeyDown: R,
350
+ tabIndex: m ? 0 : -1
351
+ }, M, {
352
+ children: S
353
+ }));
354
+ });
355
+ process.env.NODE_ENV !== "production" && (go.propTypes = {
356
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
357
+ // │ These PropTypes are generated from the TypeScript type definitions. │
358
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
359
+ // └─────────────────────────────────────────────────────────────────────┘
360
+ /**
361
+ * If `true`, will focus the `[role="menu"]` container and move into tab order.
362
+ * @default false
363
+ */
364
+ autoFocus: e.bool,
365
+ /**
366
+ * If `true`, will focus the first menuitem if `variant="menu"` or selected item
367
+ * if `variant="selectedMenu"`.
368
+ * @default false
369
+ */
370
+ autoFocusItem: e.bool,
371
+ /**
372
+ * MenuList contents, normally `MenuItem`s.
373
+ */
374
+ children: e.node,
375
+ /**
376
+ * @ignore
377
+ */
378
+ className: e.string,
379
+ /**
380
+ * If `true`, will allow focus on disabled items.
381
+ * @default false
382
+ */
383
+ disabledItemsFocusable: e.bool,
384
+ /**
385
+ * If `true`, the menu items will not wrap focus.
386
+ * @default false
387
+ */
388
+ disableListWrap: e.bool,
389
+ /**
390
+ * @ignore
391
+ */
392
+ onKeyDown: e.func,
393
+ /**
394
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
395
+ * and the vertical alignment relative to the anchor element.
396
+ * @default 'selectedMenu'
397
+ */
398
+ variant: e.oneOf(["menu", "selectedMenu"])
399
+ });
400
+ const ut = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
401
+ function Ue(o) {
402
+ return `scale(${o}, ${o ** 2})`;
403
+ }
404
+ const dt = {
405
+ entering: {
406
+ opacity: 1,
407
+ transform: Ue(1)
408
+ },
409
+ entered: {
410
+ opacity: 1,
411
+ transform: "none"
412
+ }
413
+ }, Ae = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), ze = /* @__PURE__ */ r.forwardRef(function(t, n) {
414
+ const {
415
+ addEndListener: l,
416
+ appear: m = !0,
417
+ children: g,
418
+ easing: p,
419
+ in: u,
420
+ onEnter: b,
421
+ onEntered: O,
422
+ onEntering: x,
423
+ onExit: E,
424
+ onExited: M,
425
+ onExiting: I,
426
+ style: F,
427
+ timeout: R = "auto",
428
+ // eslint-disable-next-line react/prop-types
429
+ TransitionComponent: C = Go
430
+ } = t, d = q(t, ut), S = No(), i = r.useRef(), a = qo(), h = r.useRef(null), T = me(h, g.ref, n), v = (P) => (L) => {
431
+ if (P) {
432
+ const k = h.current;
433
+ L === void 0 ? P(k) : P(k, L);
434
+ }
435
+ }, W = v(x), z = v((P, L) => {
436
+ Xo(P);
437
+ const {
438
+ duration: k,
439
+ delay: f,
440
+ easing: j
441
+ } = to({
442
+ style: F,
443
+ timeout: R,
444
+ easing: p
445
+ }, {
446
+ mode: "enter"
447
+ });
448
+ let X;
449
+ R === "auto" ? (X = a.transitions.getAutoHeightDuration(P.clientHeight), i.current = X) : X = k, P.style.transition = [a.transitions.create("opacity", {
450
+ duration: X,
451
+ delay: f
452
+ }), a.transitions.create("transform", {
453
+ duration: Ae ? X : X * 0.666,
454
+ delay: f,
455
+ easing: j
456
+ })].join(","), b && b(P, L);
457
+ }), H = v(O), Y = v(I), V = v((P) => {
458
+ const {
459
+ duration: L,
460
+ delay: k,
461
+ easing: f
462
+ } = to({
463
+ style: F,
464
+ timeout: R,
465
+ easing: p
466
+ }, {
467
+ mode: "exit"
468
+ });
469
+ let j;
470
+ R === "auto" ? (j = a.transitions.getAutoHeightDuration(P.clientHeight), i.current = j) : j = L, P.style.transition = [a.transitions.create("opacity", {
471
+ duration: j,
472
+ delay: k
473
+ }), a.transitions.create("transform", {
474
+ duration: Ae ? j : j * 0.666,
475
+ delay: Ae ? k : k || j * 0.333,
476
+ easing: f
477
+ })].join(","), P.style.opacity = 0, P.style.transform = Ue(0.75), E && E(P);
478
+ }), D = v(M);
479
+ return /* @__PURE__ */ $(C, c({
480
+ appear: m,
481
+ in: u,
482
+ nodeRef: h,
483
+ onEnter: z,
484
+ onEntered: H,
485
+ onEntering: W,
486
+ onExit: V,
487
+ onExited: D,
488
+ onExiting: Y,
489
+ addEndListener: (P) => {
490
+ R === "auto" && S.start(i.current || 0, P), l && l(h.current, P);
491
+ },
492
+ timeout: R === "auto" ? null : R
493
+ }, d, {
494
+ children: (P, L) => /* @__PURE__ */ r.cloneElement(g, c({
495
+ style: c({
496
+ opacity: 0,
497
+ transform: Ue(0.75),
498
+ visibility: P === "exited" && !u ? "hidden" : void 0
499
+ }, dt[P], F, g.props.style),
500
+ ref: T
501
+ }, L))
502
+ }));
503
+ });
504
+ process.env.NODE_ENV !== "production" && (ze.propTypes = {
505
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
506
+ // │ These PropTypes are generated from the TypeScript type definitions. │
507
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
508
+ // └─────────────────────────────────────────────────────────────────────┘
509
+ /**
510
+ * Add a custom transition end trigger. Called with the transitioning DOM
511
+ * node and a done callback. Allows for more fine grained transition end
512
+ * logic. Note: Timeouts are still used as a fallback if provided.
513
+ */
514
+ addEndListener: e.func,
515
+ /**
516
+ * Perform the enter transition when it first mounts if `in` is also `true`.
517
+ * Set this to `false` to disable this behavior.
518
+ * @default true
519
+ */
520
+ appear: e.bool,
521
+ /**
522
+ * A single child content element.
523
+ */
524
+ children: Yo.isRequired,
525
+ /**
526
+ * The transition timing function.
527
+ * You may specify a single easing or a object containing enter and exit values.
528
+ */
529
+ easing: e.oneOfType([e.shape({
530
+ enter: e.string,
531
+ exit: e.string
532
+ }), e.string]),
533
+ /**
534
+ * If `true`, the component will transition in.
535
+ */
536
+ in: e.bool,
537
+ /**
538
+ * @ignore
539
+ */
540
+ onEnter: e.func,
541
+ /**
542
+ * @ignore
543
+ */
544
+ onEntered: e.func,
545
+ /**
546
+ * @ignore
547
+ */
548
+ onEntering: e.func,
549
+ /**
550
+ * @ignore
551
+ */
552
+ onExit: e.func,
553
+ /**
554
+ * @ignore
555
+ */
556
+ onExited: e.func,
557
+ /**
558
+ * @ignore
559
+ */
560
+ onExiting: e.func,
561
+ /**
562
+ * @ignore
563
+ */
564
+ style: e.object,
565
+ /**
566
+ * The duration for the transition, in milliseconds.
567
+ * You may specify a single timeout for all transitions, or individually with an object.
568
+ *
569
+ * Set to 'auto' to automatically calculate transition time based on height.
570
+ * @default 'auto'
571
+ */
572
+ timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
573
+ appear: e.number,
574
+ enter: e.number,
575
+ exit: e.number
576
+ })])
577
+ });
578
+ ze.muiSupportAuto = !0;
579
+ function ft(o) {
580
+ return fe("MuiPopover", o);
581
+ }
582
+ le("MuiPopover", ["root", "paper"]);
583
+ const mt = ["onEntering"], bt = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"], gt = ["slotProps"];
584
+ function io(o, t) {
585
+ let n = 0;
586
+ return typeof t == "number" ? n = t : t === "center" ? n = o.height / 2 : t === "bottom" && (n = o.height), n;
587
+ }
588
+ function ao(o, t) {
589
+ let n = 0;
590
+ return typeof t == "number" ? n = t : t === "center" ? n = o.width / 2 : t === "right" && (n = o.width), n;
591
+ }
592
+ function lo(o) {
593
+ return [o.horizontal, o.vertical].map((t) => typeof t == "number" ? `${t}px` : t).join(" ");
594
+ }
595
+ function we(o) {
596
+ return typeof o == "function" ? o() : o;
597
+ }
598
+ const vt = (o) => {
599
+ const {
600
+ classes: t
601
+ } = o;
602
+ return de({
603
+ root: ["root"],
604
+ paper: ["paper"]
605
+ }, ft, t);
606
+ }, ht = U(Do, {
607
+ name: "MuiPopover",
608
+ slot: "Root",
609
+ overridesResolver: (o, t) => t.root
610
+ })({}), vo = U(ko, {
611
+ name: "MuiPopover",
612
+ slot: "Paper",
613
+ overridesResolver: (o, t) => t.paper
614
+ })({
615
+ position: "absolute",
616
+ overflowY: "auto",
617
+ overflowX: "hidden",
618
+ // So we see the popover when it's empty.
619
+ // It's most likely on issue on userland.
620
+ minWidth: 16,
621
+ minHeight: 16,
622
+ maxWidth: "calc(100% - 32px)",
623
+ maxHeight: "calc(100% - 32px)",
624
+ // We disable the focus ring for mouse, touch and keyboard users.
625
+ outline: 0
626
+ }), ho = /* @__PURE__ */ r.forwardRef(function(t, n) {
627
+ var l, m, g;
628
+ const p = Ce({
629
+ props: t,
630
+ name: "MuiPopover"
631
+ }), {
632
+ action: u,
633
+ anchorEl: b,
634
+ anchorOrigin: O = {
635
+ vertical: "top",
636
+ horizontal: "left"
637
+ },
638
+ anchorPosition: x,
639
+ anchorReference: E = "anchorEl",
640
+ children: M,
641
+ className: I,
642
+ container: F,
643
+ elevation: R = 8,
644
+ marginThreshold: C = 16,
645
+ open: d,
646
+ PaperProps: S = {},
647
+ slots: i,
648
+ slotProps: a,
649
+ transformOrigin: h = {
650
+ vertical: "top",
651
+ horizontal: "left"
652
+ },
653
+ TransitionComponent: T = ze,
654
+ transitionDuration: v = "auto",
655
+ TransitionProps: {
656
+ onEntering: W
657
+ } = {},
658
+ disableScrollLock: z = !1
659
+ } = p, H = q(p.TransitionProps, mt), Y = q(p, bt), V = (l = a == null ? void 0 : a.paper) != null ? l : S, D = r.useRef(), K = me(D, V.ref), P = c({}, p, {
660
+ anchorOrigin: O,
661
+ anchorReference: E,
662
+ elevation: R,
663
+ marginThreshold: C,
664
+ externalPaperSlotProps: V,
665
+ transformOrigin: h,
666
+ TransitionComponent: T,
667
+ transitionDuration: v,
668
+ TransitionProps: H
669
+ }), L = vt(P), k = r.useCallback(() => {
670
+ if (E === "anchorPosition")
671
+ return process.env.NODE_ENV !== "production" && (x || console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')), x;
672
+ const w = we(b), N = w && w.nodeType === 1 ? w : Ee(D.current).body, _ = N.getBoundingClientRect();
673
+ if (process.env.NODE_ENV !== "production") {
674
+ const Q = N.getBoundingClientRect();
675
+ process.env.NODE_ENV !== "test" && Q.top === 0 && Q.left === 0 && Q.right === 0 && Q.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
676
+ `));
677
+ }
678
+ return {
679
+ top: _.top + io(_, O.vertical),
680
+ left: _.left + ao(_, O.horizontal)
681
+ };
682
+ }, [b, O.horizontal, O.vertical, x, E]), f = r.useCallback((w) => ({
683
+ vertical: io(w, h.vertical),
684
+ horizontal: ao(w, h.horizontal)
685
+ }), [h.horizontal, h.vertical]), j = r.useCallback((w) => {
686
+ const N = {
687
+ width: w.offsetWidth,
688
+ height: w.offsetHeight
689
+ }, _ = f(N);
690
+ if (E === "none")
691
+ return {
692
+ top: null,
693
+ left: null,
694
+ transformOrigin: lo(_)
695
+ };
696
+ const Q = k();
697
+ let oe = Q.top - _.vertical, te = Q.left - _.horizontal;
698
+ const se = oe + N.height, Re = te + N.width, Z = oo(we(b)), ne = Z.innerHeight - C, ie = Z.innerWidth - C;
699
+ if (C !== null && oe < C) {
700
+ const B = oe - C;
701
+ oe -= B, _.vertical += B;
702
+ } else if (C !== null && se > ne) {
703
+ const B = se - ne;
704
+ oe -= B, _.vertical += B;
705
+ }
706
+ if (process.env.NODE_ENV !== "production" && N.height > ne && N.height && ne && console.error(["MUI: The popover component is too tall.", `Some part of it can not be seen on the screen (${N.height - ne}px).`, "Please consider adding a `max-height` to improve the user-experience."].join(`
707
+ `)), C !== null && te < C) {
708
+ const B = te - C;
709
+ te -= B, _.horizontal += B;
710
+ } else if (Re > ie) {
711
+ const B = Re - ie;
712
+ te -= B, _.horizontal += B;
713
+ }
714
+ return {
715
+ top: `${Math.round(oe)}px`,
716
+ left: `${Math.round(te)}px`,
717
+ transformOrigin: lo(_)
718
+ };
719
+ }, [b, E, k, f, C]), [X, Ie] = r.useState(d), G = r.useCallback(() => {
720
+ const w = D.current;
721
+ if (!w)
722
+ return;
723
+ const N = j(w);
724
+ N.top !== null && (w.style.top = N.top), N.left !== null && (w.style.left = N.left), w.style.transformOrigin = N.transformOrigin, Ie(!0);
725
+ }, [j]);
726
+ r.useEffect(() => (z && window.addEventListener("scroll", G), () => window.removeEventListener("scroll", G)), [b, z, G]);
727
+ const J = (w, N) => {
728
+ W && W(w, N), G();
729
+ }, ee = () => {
730
+ Ie(!1);
731
+ };
732
+ r.useEffect(() => {
733
+ d && G();
734
+ }), r.useImperativeHandle(u, () => d ? {
735
+ updatePosition: () => {
736
+ G();
737
+ }
738
+ } : null, [d, G]), r.useEffect(() => {
739
+ if (!d)
740
+ return;
741
+ const w = Lo(() => {
742
+ G();
743
+ }), N = oo(b);
744
+ return N.addEventListener("resize", w), () => {
745
+ w.clear(), N.removeEventListener("resize", w);
746
+ };
747
+ }, [b, d, G]);
748
+ let Te = v;
749
+ v === "auto" && !T.muiSupportAuto && (Te = void 0);
750
+ const be = F || (b ? Ee(we(b)).body : void 0), ge = (m = i == null ? void 0 : i.root) != null ? m : ht, ve = (g = i == null ? void 0 : i.paper) != null ? g : vo, De = Ne({
751
+ elementType: ve,
752
+ externalSlotProps: c({}, V, {
753
+ style: X ? V.style : c({}, V.style, {
754
+ opacity: 0
755
+ })
756
+ }),
757
+ additionalProps: {
758
+ elevation: R,
759
+ ref: K
760
+ },
761
+ ownerState: P,
762
+ className: re(L.paper, V == null ? void 0 : V.className)
763
+ }), xe = Ne({
764
+ elementType: ge,
765
+ externalSlotProps: (a == null ? void 0 : a.root) || {},
766
+ externalForwardedProps: Y,
767
+ additionalProps: {
768
+ ref: n,
769
+ slotProps: {
770
+ backdrop: {
771
+ invisible: !0
772
+ }
773
+ },
774
+ container: be,
775
+ open: d
776
+ },
777
+ ownerState: P,
778
+ className: re(L.root, I)
779
+ }), {
780
+ slotProps: ce
781
+ } = xe, pe = q(xe, gt);
782
+ return /* @__PURE__ */ $(ge, c({}, pe, !Ko(ge) && {
783
+ slotProps: ce,
784
+ disableScrollLock: z
785
+ }, {
786
+ children: /* @__PURE__ */ $(T, c({
787
+ appear: !0,
788
+ in: d,
789
+ onEntering: J,
790
+ onExited: ee,
791
+ timeout: Te
792
+ }, H, {
793
+ children: /* @__PURE__ */ $(ve, c({}, De, {
794
+ children: M
795
+ }))
796
+ }))
797
+ }));
798
+ });
799
+ process.env.NODE_ENV !== "production" && (ho.propTypes = {
800
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
801
+ // │ These PropTypes are generated from the TypeScript type definitions. │
802
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
803
+ // └─────────────────────────────────────────────────────────────────────┘
804
+ /**
805
+ * A ref for imperative actions.
806
+ * It currently only supports updatePosition() action.
807
+ */
808
+ action: Fe,
809
+ /**
810
+ * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),
811
+ * or a function that returns either.
812
+ * It's used to set the position of the popover.
813
+ */
814
+ anchorEl: Ro(e.oneOfType([Be, e.func]), (o) => {
815
+ if (o.open && (!o.anchorReference || o.anchorReference === "anchorEl")) {
816
+ const t = we(o.anchorEl);
817
+ if (t && t.nodeType === 1) {
818
+ const n = t.getBoundingClientRect();
819
+ if (process.env.NODE_ENV !== "test" && n.top === 0 && n.left === 0 && n.right === 0 && n.bottom === 0)
820
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
821
+ `));
822
+ } else
823
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", `It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
824
+ `));
825
+ }
826
+ return null;
827
+ }),
828
+ /**
829
+ * This is the point on the anchor where the popover's
830
+ * `anchorEl` will attach to. This is not used when the
831
+ * anchorReference is 'anchorPosition'.
832
+ *
833
+ * Options:
834
+ * vertical: [top, center, bottom];
835
+ * horizontal: [left, center, right].
836
+ * @default {
837
+ * vertical: 'top',
838
+ * horizontal: 'left',
839
+ * }
840
+ */
841
+ anchorOrigin: e.shape({
842
+ horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
843
+ vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
844
+ }),
845
+ /**
846
+ * This is the position that may be used to set the position of the popover.
847
+ * The coordinates are relative to the application's client area.
848
+ */
849
+ anchorPosition: e.shape({
850
+ left: e.number.isRequired,
851
+ top: e.number.isRequired
852
+ }),
853
+ /**
854
+ * This determines which anchor prop to refer to when setting
855
+ * the position of the popover.
856
+ * @default 'anchorEl'
857
+ */
858
+ anchorReference: e.oneOf(["anchorEl", "anchorPosition", "none"]),
859
+ /**
860
+ * The content of the component.
861
+ */
862
+ children: e.node,
863
+ /**
864
+ * Override or extend the styles applied to the component.
865
+ */
866
+ classes: e.object,
867
+ /**
868
+ * @ignore
869
+ */
870
+ className: e.string,
871
+ /**
872
+ * An HTML element, component instance, or function that returns either.
873
+ * The `container` will passed to the Modal component.
874
+ *
875
+ * By default, it uses the body of the anchorEl's top-level document object,
876
+ * so it's simply `document.body` most of the time.
877
+ */
878
+ container: e.oneOfType([Be, e.func]),
879
+ /**
880
+ * Disable the scroll lock behavior.
881
+ * @default false
882
+ */
883
+ disableScrollLock: e.bool,
884
+ /**
885
+ * The elevation of the popover.
886
+ * @default 8
887
+ */
888
+ elevation: jo,
889
+ /**
890
+ * Specifies how close to the edge of the window the popover can appear.
891
+ * If null, the popover will not be constrained by the window.
892
+ * @default 16
893
+ */
894
+ marginThreshold: e.number,
895
+ /**
896
+ * Callback fired when the component requests to be closed.
897
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
898
+ */
899
+ onClose: e.func,
900
+ /**
901
+ * If `true`, the component is shown.
902
+ */
903
+ open: e.bool.isRequired,
904
+ /**
905
+ * Props applied to the [`Paper`](/material-ui/api/paper/) element.
906
+ *
907
+ * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.
908
+ * @deprecated Use `slotProps.paper` instead.
909
+ *
910
+ * @default {}
911
+ */
912
+ PaperProps: e.shape({
913
+ component: $o
914
+ }),
915
+ /**
916
+ * The extra props for the slot components.
917
+ * You can override the existing props or add new ones.
918
+ *
919
+ * @default {}
920
+ */
921
+ slotProps: e.shape({
922
+ paper: e.oneOfType([e.func, e.object]),
923
+ root: e.oneOfType([e.func, e.object])
924
+ }),
925
+ /**
926
+ * The components used for each slot inside.
927
+ *
928
+ * @default {}
929
+ */
930
+ slots: e.shape({
931
+ paper: e.elementType,
932
+ root: e.elementType
933
+ }),
934
+ /**
935
+ * The system prop that allows defining system overrides as well as additional CSS styles.
936
+ */
937
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
938
+ /**
939
+ * This is the point on the popover which
940
+ * will attach to the anchor's origin.
941
+ *
942
+ * Options:
943
+ * vertical: [top, center, bottom, x(px)];
944
+ * horizontal: [left, center, right, x(px)].
945
+ * @default {
946
+ * vertical: 'top',
947
+ * horizontal: 'left',
948
+ * }
949
+ */
950
+ transformOrigin: e.shape({
951
+ horizontal: e.oneOfType([e.oneOf(["center", "left", "right"]), e.number]).isRequired,
952
+ vertical: e.oneOfType([e.oneOf(["bottom", "center", "top"]), e.number]).isRequired
953
+ }),
954
+ /**
955
+ * The component used for the transition.
956
+ * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
957
+ * @default Grow
958
+ */
959
+ TransitionComponent: e.elementType,
960
+ /**
961
+ * Set to 'auto' to automatically calculate transition time based on height.
962
+ * @default 'auto'
963
+ */
964
+ transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
965
+ appear: e.number,
966
+ enter: e.number,
967
+ exit: e.number
968
+ })]),
969
+ /**
970
+ * Props applied to the transition element.
971
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
972
+ * @default {}
973
+ */
974
+ TransitionProps: e.object
975
+ });
976
+ function yt(o) {
977
+ return fe("MuiMenu", o);
978
+ }
979
+ le("MuiMenu", ["root", "paper", "list"]);
980
+ const Pt = ["onEntering"], Et = ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"], Ct = {
981
+ vertical: "top",
982
+ horizontal: "right"
983
+ }, Ot = {
984
+ vertical: "top",
985
+ horizontal: "left"
986
+ }, It = (o) => {
987
+ const {
988
+ classes: t
989
+ } = o;
990
+ return de({
991
+ root: ["root"],
992
+ paper: ["paper"],
993
+ list: ["list"]
994
+ }, yt, t);
995
+ }, Tt = U(ho, {
996
+ shouldForwardProp: (o) => Oe(o) || o === "classes",
997
+ name: "MuiMenu",
998
+ slot: "Root",
999
+ overridesResolver: (o, t) => t.root
1000
+ })({}), xt = U(vo, {
1001
+ name: "MuiMenu",
1002
+ slot: "Paper",
1003
+ overridesResolver: (o, t) => t.paper
1004
+ })({
1005
+ // specZ: The maximum height of a simple menu should be one or more rows less than the view
1006
+ // height. This ensures a tappable area outside of the simple menu with which to dismiss
1007
+ // the menu.
1008
+ maxHeight: "calc(100% - 96px)",
1009
+ // Add iOS momentum scrolling for iOS < 13.0
1010
+ WebkitOverflowScrolling: "touch"
1011
+ }), Rt = U(go, {
1012
+ name: "MuiMenu",
1013
+ slot: "List",
1014
+ overridesResolver: (o, t) => t.list
1015
+ })({
1016
+ // We disable the focus ring for mouse, touch and keyboard users.
1017
+ outline: 0
1018
+ }), yo = /* @__PURE__ */ r.forwardRef(function(t, n) {
1019
+ var l, m;
1020
+ const g = Ce({
1021
+ props: t,
1022
+ name: "MuiMenu"
1023
+ }), {
1024
+ autoFocus: p = !0,
1025
+ children: u,
1026
+ className: b,
1027
+ disableAutoFocusItem: O = !1,
1028
+ MenuListProps: x = {},
1029
+ onClose: E,
1030
+ open: M,
1031
+ PaperProps: I = {},
1032
+ PopoverClasses: F,
1033
+ transitionDuration: R = "auto",
1034
+ TransitionProps: {
1035
+ onEntering: C
1036
+ } = {},
1037
+ variant: d = "selectedMenu",
1038
+ slots: S = {},
1039
+ slotProps: i = {}
1040
+ } = g, a = q(g.TransitionProps, Pt), h = q(g, Et), T = nt(), v = c({}, g, {
1041
+ autoFocus: p,
1042
+ disableAutoFocusItem: O,
1043
+ MenuListProps: x,
1044
+ onEntering: C,
1045
+ PaperProps: I,
1046
+ transitionDuration: R,
1047
+ TransitionProps: a,
1048
+ variant: d
1049
+ }), W = It(v), z = p && !O && M, H = r.useRef(null), Y = (f, j) => {
1050
+ H.current && H.current.adjustStyleForScrollbar(f, {
1051
+ direction: T ? "rtl" : "ltr"
1052
+ }), C && C(f, j);
1053
+ }, V = (f) => {
1054
+ f.key === "Tab" && (f.preventDefault(), E && E(f, "tabKeyDown"));
1055
+ };
1056
+ let D = -1;
1057
+ r.Children.map(u, (f, j) => {
1058
+ /* @__PURE__ */ r.isValidElement(f) && (process.env.NODE_ENV !== "production" && We.isFragment(f) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
1059
+ `)), f.props.disabled || (d === "selectedMenu" && f.props.selected || D === -1) && (D = j));
1060
+ });
1061
+ const K = (l = S.paper) != null ? l : xt, P = (m = i.paper) != null ? m : I, L = Ne({
1062
+ elementType: S.root,
1063
+ externalSlotProps: i.root,
1064
+ ownerState: v,
1065
+ className: [W.root, b]
1066
+ }), k = Ne({
1067
+ elementType: K,
1068
+ externalSlotProps: P,
1069
+ ownerState: v,
1070
+ className: W.paper
1071
+ });
1072
+ return /* @__PURE__ */ $(Tt, c({
1073
+ onClose: E,
1074
+ anchorOrigin: {
1075
+ vertical: "bottom",
1076
+ horizontal: T ? "right" : "left"
1077
+ },
1078
+ transformOrigin: T ? Ct : Ot,
1079
+ slots: {
1080
+ paper: K,
1081
+ root: S.root
1082
+ },
1083
+ slotProps: {
1084
+ root: L,
1085
+ paper: k
1086
+ },
1087
+ open: M,
1088
+ ref: n,
1089
+ transitionDuration: R,
1090
+ TransitionProps: c({
1091
+ onEntering: Y
1092
+ }, a),
1093
+ ownerState: v
1094
+ }, h, {
1095
+ classes: F,
1096
+ children: /* @__PURE__ */ $(Rt, c({
1097
+ onKeyDown: V,
1098
+ actions: H,
1099
+ autoFocus: p && (D === -1 || O),
1100
+ autoFocusItem: z,
1101
+ variant: d
1102
+ }, x, {
1103
+ className: re(W.list, x.className),
1104
+ children: u
1105
+ }))
1106
+ }));
1107
+ });
1108
+ process.env.NODE_ENV !== "production" && (yo.propTypes = {
1109
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1110
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1111
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1112
+ // └─────────────────────────────────────────────────────────────────────┘
1113
+ /**
1114
+ * An HTML element, or a function that returns one.
1115
+ * It's used to set the position of the menu.
1116
+ */
1117
+ anchorEl: e.oneOfType([Be, e.func]),
1118
+ /**
1119
+ * If `true` (Default) will focus the `[role="menu"]` if no focusable child is found. Disabled
1120
+ * children are not focusable. If you set this prop to `false` focus will be placed
1121
+ * on the parent modal container. This has severe accessibility implications
1122
+ * and should only be considered if you manage focus otherwise.
1123
+ * @default true
1124
+ */
1125
+ autoFocus: e.bool,
1126
+ /**
1127
+ * Menu contents, normally `MenuItem`s.
1128
+ */
1129
+ children: e.node,
1130
+ /**
1131
+ * Override or extend the styles applied to the component.
1132
+ */
1133
+ classes: e.object,
1134
+ /**
1135
+ * @ignore
1136
+ */
1137
+ className: e.string,
1138
+ /**
1139
+ * When opening the menu will not focus the active item but the `[role="menu"]`
1140
+ * unless `autoFocus` is also set to `false`. Not using the default means not
1141
+ * following WAI-ARIA authoring practices. Please be considerate about possible
1142
+ * accessibility implications.
1143
+ * @default false
1144
+ */
1145
+ disableAutoFocusItem: e.bool,
1146
+ /**
1147
+ * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.
1148
+ * @default {}
1149
+ */
1150
+ MenuListProps: e.object,
1151
+ /**
1152
+ * Callback fired when the component requests to be closed.
1153
+ *
1154
+ * @param {object} event The event source of the callback.
1155
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`, `"tabKeyDown"`.
1156
+ */
1157
+ onClose: e.func,
1158
+ /**
1159
+ * If `true`, the component is shown.
1160
+ */
1161
+ open: e.bool.isRequired,
1162
+ /**
1163
+ * @ignore
1164
+ */
1165
+ PaperProps: e.object,
1166
+ /**
1167
+ * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.
1168
+ */
1169
+ PopoverClasses: e.object,
1170
+ /**
1171
+ * The extra props for the slot components.
1172
+ * You can override the existing props or add new ones.
1173
+ *
1174
+ * @default {}
1175
+ */
1176
+ slotProps: e.shape({
1177
+ paper: e.oneOfType([e.func, e.object]),
1178
+ root: e.oneOfType([e.func, e.object])
1179
+ }),
1180
+ /**
1181
+ * The components used for each slot inside.
1182
+ *
1183
+ * @default {}
1184
+ */
1185
+ slots: e.shape({
1186
+ paper: e.elementType,
1187
+ root: e.elementType
1188
+ }),
1189
+ /**
1190
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1191
+ */
1192
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1193
+ /**
1194
+ * The length of the transition in `ms`, or 'auto'
1195
+ * @default 'auto'
1196
+ */
1197
+ transitionDuration: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
1198
+ appear: e.number,
1199
+ enter: e.number,
1200
+ exit: e.number
1201
+ })]),
1202
+ /**
1203
+ * Props applied to the transition element.
1204
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
1205
+ * @default {}
1206
+ */
1207
+ TransitionProps: e.object,
1208
+ /**
1209
+ * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.
1210
+ * @default 'selectedMenu'
1211
+ */
1212
+ variant: e.oneOf(["menu", "selectedMenu"])
1213
+ });
1214
+ function St(o) {
1215
+ return fe("MuiNativeSelect", o);
1216
+ }
1217
+ const He = le("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]), Mt = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"], wt = (o) => {
1218
+ const {
1219
+ classes: t,
1220
+ variant: n,
1221
+ disabled: l,
1222
+ multiple: m,
1223
+ open: g,
1224
+ error: p
1225
+ } = o, u = {
1226
+ select: ["select", n, l && "disabled", m && "multiple", p && "error"],
1227
+ icon: ["icon", `icon${$e(n)}`, g && "iconOpen", l && "disabled"]
1228
+ };
1229
+ return de(u, St, t);
1230
+ }, Po = ({
1231
+ ownerState: o,
1232
+ theme: t
1233
+ }) => c({
1234
+ MozAppearance: "none",
1235
+ // Reset
1236
+ WebkitAppearance: "none",
1237
+ // Reset
1238
+ // When interacting quickly, the text can end up selected.
1239
+ // Native select can't be selected either.
1240
+ userSelect: "none",
1241
+ borderRadius: 0,
1242
+ // Reset
1243
+ cursor: "pointer",
1244
+ "&:focus": c({}, t.vars ? {
1245
+ backgroundColor: `rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`
1246
+ } : {
1247
+ backgroundColor: t.palette.mode === "light" ? "rgba(0, 0, 0, 0.05)" : "rgba(255, 255, 255, 0.05)"
1248
+ }, {
1249
+ borderRadius: 0
1250
+ // Reset Chrome style
1251
+ }),
1252
+ // Remove IE11 arrow
1253
+ "&::-ms-expand": {
1254
+ display: "none"
1255
+ },
1256
+ [`&.${He.disabled}`]: {
1257
+ cursor: "default"
1258
+ },
1259
+ "&[multiple]": {
1260
+ height: "auto"
1261
+ },
1262
+ "&:not([multiple]) option, &:not([multiple]) optgroup": {
1263
+ backgroundColor: (t.vars || t).palette.background.paper
1264
+ },
1265
+ // Bump specificity to allow extending custom inputs
1266
+ "&&&": {
1267
+ paddingRight: 24,
1268
+ minWidth: 16
1269
+ // So it doesn't collapse.
1270
+ }
1271
+ }, o.variant === "filled" && {
1272
+ "&&&": {
1273
+ paddingRight: 32
1274
+ }
1275
+ }, o.variant === "outlined" && {
1276
+ borderRadius: (t.vars || t).shape.borderRadius,
1277
+ "&:focus": {
1278
+ borderRadius: (t.vars || t).shape.borderRadius
1279
+ // Reset the reset for Chrome style
1280
+ },
1281
+ "&&&": {
1282
+ paddingRight: 32
1283
+ }
1284
+ }), Nt = U("select", {
1285
+ name: "MuiNativeSelect",
1286
+ slot: "Select",
1287
+ shouldForwardProp: Oe,
1288
+ overridesResolver: (o, t) => {
1289
+ const {
1290
+ ownerState: n
1291
+ } = o;
1292
+ return [t.select, t[n.variant], n.error && t.error, {
1293
+ [`&.${He.multiple}`]: t.multiple
1294
+ }];
1295
+ }
1296
+ })(Po), Eo = ({
1297
+ ownerState: o,
1298
+ theme: t
1299
+ }) => c({
1300
+ // We use a position absolute over a flexbox in order to forward the pointer events
1301
+ // to the input and to support wrapping tags..
1302
+ position: "absolute",
1303
+ right: 0,
1304
+ top: "calc(50% - .5em)",
1305
+ // Center vertically, height is 1em
1306
+ pointerEvents: "none",
1307
+ // Don't block pointer events on the select under the icon.
1308
+ color: (t.vars || t).palette.action.active,
1309
+ [`&.${He.disabled}`]: {
1310
+ color: (t.vars || t).palette.action.disabled
1311
+ }
1312
+ }, o.open && {
1313
+ transform: "rotate(180deg)"
1314
+ }, o.variant === "filled" && {
1315
+ right: 7
1316
+ }, o.variant === "outlined" && {
1317
+ right: 7
1318
+ }), $t = U("svg", {
1319
+ name: "MuiNativeSelect",
1320
+ slot: "Icon",
1321
+ overridesResolver: (o, t) => {
1322
+ const {
1323
+ ownerState: n
1324
+ } = o;
1325
+ return [t.icon, n.variant && t[`icon${$e(n.variant)}`], n.open && t.iconOpen];
1326
+ }
1327
+ })(Eo), Co = /* @__PURE__ */ r.forwardRef(function(t, n) {
1328
+ const {
1329
+ className: l,
1330
+ disabled: m,
1331
+ error: g,
1332
+ IconComponent: p,
1333
+ inputRef: u,
1334
+ variant: b = "standard"
1335
+ } = t, O = q(t, Mt), x = c({}, t, {
1336
+ disabled: m,
1337
+ variant: b,
1338
+ error: g
1339
+ }), E = wt(x);
1340
+ return /* @__PURE__ */ fo(r.Fragment, {
1341
+ children: [/* @__PURE__ */ $(Nt, c({
1342
+ ownerState: x,
1343
+ className: re(E.select, l),
1344
+ disabled: m,
1345
+ ref: u || n
1346
+ }, O)), t.multiple ? null : /* @__PURE__ */ $($t, {
1347
+ as: p,
1348
+ ownerState: x,
1349
+ className: E.icon
1350
+ })]
1351
+ });
1352
+ });
1353
+ process.env.NODE_ENV !== "production" && (Co.propTypes = {
1354
+ /**
1355
+ * The option elements to populate the select with.
1356
+ * Can be some `<option>` elements.
1357
+ */
1358
+ children: e.node,
1359
+ /**
1360
+ * Override or extend the styles applied to the component.
1361
+ */
1362
+ classes: e.object,
1363
+ /**
1364
+ * The CSS class name of the select element.
1365
+ */
1366
+ className: e.string,
1367
+ /**
1368
+ * If `true`, the select is disabled.
1369
+ */
1370
+ disabled: e.bool,
1371
+ /**
1372
+ * If `true`, the `select input` will indicate an error.
1373
+ */
1374
+ error: e.bool,
1375
+ /**
1376
+ * The icon that displays the arrow.
1377
+ */
1378
+ IconComponent: e.elementType.isRequired,
1379
+ /**
1380
+ * Use that prop to pass a ref to the native select element.
1381
+ * @deprecated
1382
+ */
1383
+ inputRef: Fe,
1384
+ /**
1385
+ * @ignore
1386
+ */
1387
+ multiple: e.bool,
1388
+ /**
1389
+ * Name attribute of the `select` or hidden `input` element.
1390
+ */
1391
+ name: e.string,
1392
+ /**
1393
+ * Callback fired when a menu item is selected.
1394
+ *
1395
+ * @param {object} event The event source of the callback.
1396
+ * You can pull out the new value by accessing `event.target.value` (string).
1397
+ */
1398
+ onChange: e.func,
1399
+ /**
1400
+ * The input value.
1401
+ */
1402
+ value: e.any,
1403
+ /**
1404
+ * The variant to use.
1405
+ */
1406
+ variant: e.oneOf(["standard", "outlined", "filled"])
1407
+ });
1408
+ function Ft(o) {
1409
+ return fe("MuiSelect", o);
1410
+ }
1411
+ const Pe = le("MuiSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
1412
+ var co;
1413
+ const Dt = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "error", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"], kt = U("div", {
1414
+ name: "MuiSelect",
1415
+ slot: "Select",
1416
+ overridesResolver: (o, t) => {
1417
+ const {
1418
+ ownerState: n
1419
+ } = o;
1420
+ return [
1421
+ // Win specificity over the input base
1422
+ {
1423
+ [`&.${Pe.select}`]: t.select
1424
+ },
1425
+ {
1426
+ [`&.${Pe.select}`]: t[n.variant]
1427
+ },
1428
+ {
1429
+ [`&.${Pe.error}`]: t.error
1430
+ },
1431
+ {
1432
+ [`&.${Pe.multiple}`]: t.multiple
1433
+ }
1434
+ ];
1435
+ }
1436
+ })(Po, {
1437
+ // Win specificity over the input base
1438
+ [`&.${Pe.select}`]: {
1439
+ height: "auto",
1440
+ // Resets for multiple select with chips
1441
+ minHeight: "1.4375em",
1442
+ // Required for select\text-field height consistency
1443
+ textOverflow: "ellipsis",
1444
+ whiteSpace: "nowrap",
1445
+ overflow: "hidden"
1446
+ }
1447
+ }), jt = U("svg", {
1448
+ name: "MuiSelect",
1449
+ slot: "Icon",
1450
+ overridesResolver: (o, t) => {
1451
+ const {
1452
+ ownerState: n
1453
+ } = o;
1454
+ return [t.icon, n.variant && t[`icon${$e(n.variant)}`], n.open && t.iconOpen];
1455
+ }
1456
+ })(Eo), Lt = U("input", {
1457
+ shouldForwardProp: (o) => So(o) && o !== "classes",
1458
+ name: "MuiSelect",
1459
+ slot: "NativeInput",
1460
+ overridesResolver: (o, t) => t.nativeInput
1461
+ })({
1462
+ bottom: 0,
1463
+ left: 0,
1464
+ position: "absolute",
1465
+ opacity: 0,
1466
+ pointerEvents: "none",
1467
+ width: "100%",
1468
+ boxSizing: "border-box"
1469
+ });
1470
+ function po(o, t) {
1471
+ return typeof t == "object" && t !== null ? o === t : String(o) === String(t);
1472
+ }
1473
+ function _t(o) {
1474
+ return o == null || typeof o == "string" && !o.trim();
1475
+ }
1476
+ const Vt = (o) => {
1477
+ const {
1478
+ classes: t,
1479
+ variant: n,
1480
+ disabled: l,
1481
+ multiple: m,
1482
+ open: g,
1483
+ error: p
1484
+ } = o, u = {
1485
+ select: ["select", n, l && "disabled", m && "multiple", p && "error"],
1486
+ icon: ["icon", `icon${$e(n)}`, g && "iconOpen", l && "disabled"],
1487
+ nativeInput: ["nativeInput"]
1488
+ };
1489
+ return de(u, Ft, t);
1490
+ }, Oo = /* @__PURE__ */ r.forwardRef(function(t, n) {
1491
+ var l;
1492
+ const {
1493
+ "aria-describedby": m,
1494
+ "aria-label": g,
1495
+ autoFocus: p,
1496
+ autoWidth: u,
1497
+ children: b,
1498
+ className: O,
1499
+ defaultOpen: x,
1500
+ defaultValue: E,
1501
+ disabled: M,
1502
+ displayEmpty: I,
1503
+ error: F = !1,
1504
+ IconComponent: R,
1505
+ inputRef: C,
1506
+ labelId: d,
1507
+ MenuProps: S = {},
1508
+ multiple: i,
1509
+ name: a,
1510
+ onBlur: h,
1511
+ onChange: T,
1512
+ onClose: v,
1513
+ onFocus: W,
1514
+ onOpen: z,
1515
+ open: H,
1516
+ readOnly: Y,
1517
+ renderValue: V,
1518
+ SelectDisplayProps: D = {},
1519
+ tabIndex: K,
1520
+ value: P,
1521
+ variant: L = "standard"
1522
+ } = t, k = q(t, Dt), [f, j] = no({
1523
+ controlled: P,
1524
+ default: E,
1525
+ name: "Select"
1526
+ }), [X, Ie] = no({
1527
+ controlled: H,
1528
+ default: x,
1529
+ name: "Select"
1530
+ }), G = r.useRef(null), J = r.useRef(null), [ee, Te] = r.useState(null), {
1531
+ current: be
1532
+ } = r.useRef(H != null), [ge, ve] = r.useState(), De = me(n, C), xe = r.useCallback((s) => {
1533
+ J.current = s, s && Te(s);
1534
+ }, []), ce = ee == null ? void 0 : ee.parentNode;
1535
+ r.useImperativeHandle(De, () => ({
1536
+ focus: () => {
1537
+ J.current.focus();
1538
+ },
1539
+ node: G.current,
1540
+ value: f
1541
+ }), [f]), r.useEffect(() => {
1542
+ x && X && ee && !be && (ve(u ? null : ce.clientWidth), J.current.focus());
1543
+ }, [ee, u]), r.useEffect(() => {
1544
+ p && J.current.focus();
1545
+ }, [p]), r.useEffect(() => {
1546
+ if (!d)
1547
+ return;
1548
+ const s = Ee(J.current).getElementById(d);
1549
+ if (s) {
1550
+ const y = () => {
1551
+ getSelection().isCollapsed && J.current.focus();
1552
+ };
1553
+ return s.addEventListener("click", y), () => {
1554
+ s.removeEventListener("click", y);
1555
+ };
1556
+ }
1557
+ }, [d]);
1558
+ const pe = (s, y) => {
1559
+ s ? z && z(y) : v && v(y), be || (ve(u ? null : ce.clientWidth), Ie(s));
1560
+ }, w = (s) => {
1561
+ s.button === 0 && (s.preventDefault(), J.current.focus(), pe(!0, s));
1562
+ }, N = (s) => {
1563
+ pe(!1, s);
1564
+ }, _ = r.Children.toArray(b), Q = (s) => {
1565
+ const y = _.find((A) => A.props.value === s.target.value);
1566
+ y !== void 0 && (j(y.props.value), T && T(s, y));
1567
+ }, oe = (s) => (y) => {
1568
+ let A;
1569
+ if (y.currentTarget.hasAttribute("tabindex")) {
1570
+ if (i) {
1571
+ A = Array.isArray(f) ? f.slice() : [];
1572
+ const ue = f.indexOf(s.props.value);
1573
+ ue === -1 ? A.push(s.props.value) : A.splice(ue, 1);
1574
+ } else
1575
+ A = s.props.value;
1576
+ if (s.props.onClick && s.props.onClick(y), f !== A && (j(A), T)) {
1577
+ const ue = y.nativeEvent || y, Je = new ue.constructor(ue.type, ue);
1578
+ Object.defineProperty(Je, "target", {
1579
+ writable: !0,
1580
+ value: {
1581
+ value: A,
1582
+ name: a
1583
+ }
1584
+ }), T(Je, s);
1585
+ }
1586
+ i || pe(!1, y);
1587
+ }
1588
+ }, te = (s) => {
1589
+ Y || [
1590
+ " ",
1591
+ "ArrowUp",
1592
+ "ArrowDown",
1593
+ // The native select doesn't respond to enter on macOS, but it's recommended by
1594
+ // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
1595
+ "Enter"
1596
+ ].indexOf(s.key) !== -1 && (s.preventDefault(), pe(!0, s));
1597
+ }, se = ee !== null && X, Re = (s) => {
1598
+ !se && h && (Object.defineProperty(s, "target", {
1599
+ writable: !0,
1600
+ value: {
1601
+ value: f,
1602
+ name: a
1603
+ }
1604
+ }), h(s));
1605
+ };
1606
+ delete k["aria-invalid"];
1607
+ let Z, ne;
1608
+ const ie = [];
1609
+ let B = !1, ke = !1;
1610
+ (_o({
1611
+ value: f
1612
+ }) || I) && (V ? Z = V(f) : B = !0);
1613
+ const To = _.map((s) => {
1614
+ if (!/* @__PURE__ */ r.isValidElement(s))
1615
+ return null;
1616
+ process.env.NODE_ENV !== "production" && We.isFragment(s) && console.error(["MUI: The Select component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
1617
+ `));
1618
+ let y;
1619
+ if (i) {
1620
+ if (!Array.isArray(f))
1621
+ throw new Error(process.env.NODE_ENV !== "production" ? "MUI: The `value` prop must be an array when using the `Select` component with `multiple`." : xo(2));
1622
+ y = f.some((A) => po(A, s.props.value)), y && B && ie.push(s.props.children);
1623
+ } else
1624
+ y = po(f, s.props.value), y && B && (ne = s.props.children);
1625
+ return y && (ke = !0), /* @__PURE__ */ r.cloneElement(s, {
1626
+ "aria-selected": y ? "true" : "false",
1627
+ onClick: oe(s),
1628
+ onKeyUp: (A) => {
1629
+ A.key === " " && A.preventDefault(), s.props.onKeyUp && s.props.onKeyUp(A);
1630
+ },
1631
+ role: "option",
1632
+ selected: y,
1633
+ value: void 0,
1634
+ // The value is most likely not a valid HTML attribute.
1635
+ "data-value": s.props.value
1636
+ // Instead, we provide it as a data attribute.
1637
+ });
1638
+ });
1639
+ process.env.NODE_ENV !== "production" && r.useEffect(() => {
1640
+ if (!ke && !i && f !== "") {
1641
+ const s = _.map((y) => y.props.value);
1642
+ console.warn([`MUI: You have provided an out-of-range value \`${f}\` for the select ${a ? `(name="${a}") ` : ""}component.`, "Consider providing a value that matches one of the available options or ''.", `The available values are ${s.filter((y) => y != null).map((y) => `\`${y}\``).join(", ") || '""'}.`].join(`
1643
+ `));
1644
+ }
1645
+ }, [ke, _, i, a, f]), B && (i ? ie.length === 0 ? Z = null : Z = ie.reduce((s, y, A) => (s.push(y), A < ie.length - 1 && s.push(", "), s), []) : Z = ne);
1646
+ let Ge = ge;
1647
+ !u && be && ee && (Ge = ce.clientWidth);
1648
+ let je;
1649
+ typeof K < "u" ? je = K : je = M ? null : 0;
1650
+ const Xe = D.id || (a ? `mui-component-select-${a}` : void 0), Se = c({}, t, {
1651
+ variant: L,
1652
+ value: f,
1653
+ open: se,
1654
+ error: F
1655
+ }), Le = Vt(Se), _e = c({}, S.PaperProps, (l = S.slotProps) == null ? void 0 : l.paper), Ye = Qo();
1656
+ return /* @__PURE__ */ fo(r.Fragment, {
1657
+ children: [/* @__PURE__ */ $(kt, c({
1658
+ ref: xe,
1659
+ tabIndex: je,
1660
+ role: "combobox",
1661
+ "aria-controls": Ye,
1662
+ "aria-disabled": M ? "true" : void 0,
1663
+ "aria-expanded": se ? "true" : "false",
1664
+ "aria-haspopup": "listbox",
1665
+ "aria-label": g,
1666
+ "aria-labelledby": [d, Xe].filter(Boolean).join(" ") || void 0,
1667
+ "aria-describedby": m,
1668
+ onKeyDown: te,
1669
+ onMouseDown: M || Y ? null : w,
1670
+ onBlur: Re,
1671
+ onFocus: W
1672
+ }, D, {
1673
+ ownerState: Se,
1674
+ className: re(D.className, Le.select, O),
1675
+ id: Xe,
1676
+ children: _t(Z) ? (
1677
+ // notranslate needed while Google Translate will not fix zero-width space issue
1678
+ co || (co = /* @__PURE__ */ $("span", {
1679
+ className: "notranslate",
1680
+ children: "​"
1681
+ }))
1682
+ ) : Z
1683
+ })), /* @__PURE__ */ $(Lt, c({
1684
+ "aria-invalid": F,
1685
+ value: Array.isArray(f) ? f.join(",") : f,
1686
+ name: a,
1687
+ ref: G,
1688
+ "aria-hidden": !0,
1689
+ onChange: Q,
1690
+ tabIndex: -1,
1691
+ disabled: M,
1692
+ className: Le.nativeInput,
1693
+ autoFocus: p,
1694
+ ownerState: Se
1695
+ }, k)), /* @__PURE__ */ $(jt, {
1696
+ as: R,
1697
+ className: Le.icon,
1698
+ ownerState: Se
1699
+ }), /* @__PURE__ */ $(yo, c({
1700
+ id: `menu-${a || ""}`,
1701
+ anchorEl: ce,
1702
+ open: se,
1703
+ onClose: N,
1704
+ anchorOrigin: {
1705
+ vertical: "bottom",
1706
+ horizontal: "center"
1707
+ },
1708
+ transformOrigin: {
1709
+ vertical: "top",
1710
+ horizontal: "center"
1711
+ }
1712
+ }, S, {
1713
+ MenuListProps: c({
1714
+ "aria-labelledby": d,
1715
+ role: "listbox",
1716
+ "aria-multiselectable": i ? "true" : void 0,
1717
+ disableListWrap: !0,
1718
+ id: Ye
1719
+ }, S.MenuListProps),
1720
+ slotProps: c({}, S.slotProps, {
1721
+ paper: c({}, _e, {
1722
+ style: c({
1723
+ minWidth: Ge
1724
+ }, _e != null ? _e.style : null)
1725
+ })
1726
+ }),
1727
+ children: To
1728
+ }))]
1729
+ });
1730
+ });
1731
+ process.env.NODE_ENV !== "production" && (Oo.propTypes = {
1732
+ /**
1733
+ * @ignore
1734
+ */
1735
+ "aria-describedby": e.string,
1736
+ /**
1737
+ * @ignore
1738
+ */
1739
+ "aria-label": e.string,
1740
+ /**
1741
+ * @ignore
1742
+ */
1743
+ autoFocus: e.bool,
1744
+ /**
1745
+ * If `true`, the width of the popover will automatically be set according to the items inside the
1746
+ * menu, otherwise it will be at least the width of the select input.
1747
+ */
1748
+ autoWidth: e.bool,
1749
+ /**
1750
+ * The option elements to populate the select with.
1751
+ * Can be some `<MenuItem>` elements.
1752
+ */
1753
+ children: e.node,
1754
+ /**
1755
+ * Override or extend the styles applied to the component.
1756
+ */
1757
+ classes: e.object,
1758
+ /**
1759
+ * The CSS class name of the select element.
1760
+ */
1761
+ className: e.string,
1762
+ /**
1763
+ * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
1764
+ * You can only use it when the `native` prop is `false` (default).
1765
+ */
1766
+ defaultOpen: e.bool,
1767
+ /**
1768
+ * The default value. Use when the component is not controlled.
1769
+ */
1770
+ defaultValue: e.any,
1771
+ /**
1772
+ * If `true`, the select is disabled.
1773
+ */
1774
+ disabled: e.bool,
1775
+ /**
1776
+ * If `true`, the selected item is displayed even if its value is empty.
1777
+ */
1778
+ displayEmpty: e.bool,
1779
+ /**
1780
+ * If `true`, the `select input` will indicate an error.
1781
+ */
1782
+ error: e.bool,
1783
+ /**
1784
+ * The icon that displays the arrow.
1785
+ */
1786
+ IconComponent: e.elementType.isRequired,
1787
+ /**
1788
+ * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`
1789
+ * Equivalent to `ref`
1790
+ */
1791
+ inputRef: Fe,
1792
+ /**
1793
+ * The ID of an element that acts as an additional label. The Select will
1794
+ * be labelled by the additional label and the selected value.
1795
+ */
1796
+ labelId: e.string,
1797
+ /**
1798
+ * Props applied to the [`Menu`](/material-ui/api/menu/) element.
1799
+ */
1800
+ MenuProps: e.object,
1801
+ /**
1802
+ * If `true`, `value` must be an array and the menu will support multiple selections.
1803
+ */
1804
+ multiple: e.bool,
1805
+ /**
1806
+ * Name attribute of the `select` or hidden `input` element.
1807
+ */
1808
+ name: e.string,
1809
+ /**
1810
+ * @ignore
1811
+ */
1812
+ onBlur: e.func,
1813
+ /**
1814
+ * Callback fired when a menu item is selected.
1815
+ *
1816
+ * @param {object} event The event source of the callback.
1817
+ * You can pull out the new value by accessing `event.target.value` (any).
1818
+ * @param {object} [child] The react element that was selected.
1819
+ */
1820
+ onChange: e.func,
1821
+ /**
1822
+ * Callback fired when the component requests to be closed.
1823
+ * Use in controlled mode (see open).
1824
+ *
1825
+ * @param {object} event The event source of the callback.
1826
+ */
1827
+ onClose: e.func,
1828
+ /**
1829
+ * @ignore
1830
+ */
1831
+ onFocus: e.func,
1832
+ /**
1833
+ * Callback fired when the component requests to be opened.
1834
+ * Use in controlled mode (see open).
1835
+ *
1836
+ * @param {object} event The event source of the callback.
1837
+ */
1838
+ onOpen: e.func,
1839
+ /**
1840
+ * If `true`, the component is shown.
1841
+ */
1842
+ open: e.bool,
1843
+ /**
1844
+ * @ignore
1845
+ */
1846
+ readOnly: e.bool,
1847
+ /**
1848
+ * Render the selected value.
1849
+ *
1850
+ * @param {any} value The `value` provided to the component.
1851
+ * @returns {ReactNode}
1852
+ */
1853
+ renderValue: e.func,
1854
+ /**
1855
+ * Props applied to the clickable div element.
1856
+ */
1857
+ SelectDisplayProps: e.object,
1858
+ /**
1859
+ * @ignore
1860
+ */
1861
+ tabIndex: e.oneOfType([e.number, e.string]),
1862
+ /**
1863
+ * @ignore
1864
+ */
1865
+ type: e.any,
1866
+ /**
1867
+ * The input value.
1868
+ */
1869
+ value: e.any,
1870
+ /**
1871
+ * The variant to use.
1872
+ */
1873
+ variant: e.oneOf(["standard", "outlined", "filled"])
1874
+ });
1875
+ const At = Jo(/* @__PURE__ */ $("path", {
1876
+ d: "M7 10l5 5 5-5z"
1877
+ }), "ArrowDropDown");
1878
+ function Bt(o) {
1879
+ return fe("MuiFilledInput", o);
1880
+ }
1881
+ const ae = c({}, Vo, le("MuiFilledInput", ["root", "underline", "input"])), Ut = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"], Wt = (o) => {
1882
+ const {
1883
+ classes: t,
1884
+ disableUnderline: n
1885
+ } = o, m = de({
1886
+ root: ["root", !n && "underline"],
1887
+ input: ["input"]
1888
+ }, Bt, t);
1889
+ return c({}, t, m);
1890
+ }, zt = U(Ao, {
1891
+ shouldForwardProp: (o) => Oe(o) || o === "classes",
1892
+ name: "MuiFilledInput",
1893
+ slot: "Root",
1894
+ overridesResolver: (o, t) => {
1895
+ const {
1896
+ ownerState: n
1897
+ } = o;
1898
+ return [...Bo(o, t), !n.disableUnderline && t.underline];
1899
+ }
1900
+ })(({
1901
+ theme: o,
1902
+ ownerState: t
1903
+ }) => {
1904
+ var n;
1905
+ const l = o.palette.mode === "light", m = l ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)", g = l ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)", p = l ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)", u = l ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
1906
+ return c({
1907
+ position: "relative",
1908
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : g,
1909
+ borderTopLeftRadius: (o.vars || o).shape.borderRadius,
1910
+ borderTopRightRadius: (o.vars || o).shape.borderRadius,
1911
+ transition: o.transitions.create("background-color", {
1912
+ duration: o.transitions.duration.shorter,
1913
+ easing: o.transitions.easing.easeOut
1914
+ }),
1915
+ "&:hover": {
1916
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.hoverBg : p,
1917
+ // Reset on touch devices, it doesn't add specificity
1918
+ "@media (hover: none)": {
1919
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : g
1920
+ }
1921
+ },
1922
+ [`&.${ae.focused}`]: {
1923
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.bg : g
1924
+ },
1925
+ [`&.${ae.disabled}`]: {
1926
+ backgroundColor: o.vars ? o.vars.palette.FilledInput.disabledBg : u
1927
+ }
1928
+ }, !t.disableUnderline && {
1929
+ "&::after": {
1930
+ borderBottom: `2px solid ${(n = (o.vars || o).palette[t.color || "primary"]) == null ? void 0 : n.main}`,
1931
+ left: 0,
1932
+ bottom: 0,
1933
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1934
+ content: '""',
1935
+ position: "absolute",
1936
+ right: 0,
1937
+ transform: "scaleX(0)",
1938
+ transition: o.transitions.create("transform", {
1939
+ duration: o.transitions.duration.shorter,
1940
+ easing: o.transitions.easing.easeOut
1941
+ }),
1942
+ pointerEvents: "none"
1943
+ // Transparent to the hover style.
1944
+ },
1945
+ [`&.${ae.focused}:after`]: {
1946
+ // translateX(0) is a workaround for Safari transform scale bug
1947
+ // See https://github.com/mui/material-ui/issues/31766
1948
+ transform: "scaleX(1) translateX(0)"
1949
+ },
1950
+ [`&.${ae.error}`]: {
1951
+ "&::before, &::after": {
1952
+ borderBottomColor: (o.vars || o).palette.error.main
1953
+ }
1954
+ },
1955
+ "&::before": {
1956
+ borderBottom: `1px solid ${o.vars ? `rgba(${o.vars.palette.common.onBackgroundChannel} / ${o.vars.opacity.inputUnderline})` : m}`,
1957
+ left: 0,
1958
+ bottom: 0,
1959
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
1960
+ content: '"\\00a0"',
1961
+ position: "absolute",
1962
+ right: 0,
1963
+ transition: o.transitions.create("border-bottom-color", {
1964
+ duration: o.transitions.duration.shorter
1965
+ }),
1966
+ pointerEvents: "none"
1967
+ // Transparent to the hover style.
1968
+ },
1969
+ [`&:hover:not(.${ae.disabled}, .${ae.error}):before`]: {
1970
+ borderBottom: `1px solid ${(o.vars || o).palette.text.primary}`
1971
+ },
1972
+ [`&.${ae.disabled}:before`]: {
1973
+ borderBottomStyle: "dotted"
1974
+ }
1975
+ }, t.startAdornment && {
1976
+ paddingLeft: 12
1977
+ }, t.endAdornment && {
1978
+ paddingRight: 12
1979
+ }, t.multiline && c({
1980
+ padding: "25px 12px 8px"
1981
+ }, t.size === "small" && {
1982
+ paddingTop: 21,
1983
+ paddingBottom: 4
1984
+ }, t.hiddenLabel && {
1985
+ paddingTop: 16,
1986
+ paddingBottom: 17
1987
+ }, t.hiddenLabel && t.size === "small" && {
1988
+ paddingTop: 8,
1989
+ paddingBottom: 9
1990
+ }));
1991
+ }), Ht = U(Uo, {
1992
+ name: "MuiFilledInput",
1993
+ slot: "Input",
1994
+ overridesResolver: Wo
1995
+ })(({
1996
+ theme: o,
1997
+ ownerState: t
1998
+ }) => c({
1999
+ paddingTop: 25,
2000
+ paddingRight: 12,
2001
+ paddingBottom: 8,
2002
+ paddingLeft: 12
2003
+ }, !o.vars && {
2004
+ "&:-webkit-autofill": {
2005
+ WebkitBoxShadow: o.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
2006
+ WebkitTextFillColor: o.palette.mode === "light" ? null : "#fff",
2007
+ caretColor: o.palette.mode === "light" ? null : "#fff",
2008
+ borderTopLeftRadius: "inherit",
2009
+ borderTopRightRadius: "inherit"
2010
+ }
2011
+ }, o.vars && {
2012
+ "&:-webkit-autofill": {
2013
+ borderTopLeftRadius: "inherit",
2014
+ borderTopRightRadius: "inherit"
2015
+ },
2016
+ [o.getColorSchemeSelector("dark")]: {
2017
+ "&:-webkit-autofill": {
2018
+ WebkitBoxShadow: "0 0 0 100px #266798 inset",
2019
+ WebkitTextFillColor: "#fff",
2020
+ caretColor: "#fff"
2021
+ }
2022
+ }
2023
+ }, t.size === "small" && {
2024
+ paddingTop: 21,
2025
+ paddingBottom: 4
2026
+ }, t.hiddenLabel && {
2027
+ paddingTop: 16,
2028
+ paddingBottom: 17
2029
+ }, t.startAdornment && {
2030
+ paddingLeft: 0
2031
+ }, t.endAdornment && {
2032
+ paddingRight: 0
2033
+ }, t.hiddenLabel && t.size === "small" && {
2034
+ paddingTop: 8,
2035
+ paddingBottom: 9
2036
+ }, t.multiline && {
2037
+ paddingTop: 0,
2038
+ paddingBottom: 0,
2039
+ paddingLeft: 0,
2040
+ paddingRight: 0
2041
+ })), Ke = /* @__PURE__ */ r.forwardRef(function(t, n) {
2042
+ var l, m, g, p;
2043
+ const u = Ce({
2044
+ props: t,
2045
+ name: "MuiFilledInput"
2046
+ }), {
2047
+ components: b = {},
2048
+ componentsProps: O,
2049
+ fullWidth: x = !1,
2050
+ // declare here to prevent spreading to DOM
2051
+ inputComponent: E = "input",
2052
+ multiline: M = !1,
2053
+ slotProps: I,
2054
+ slots: F = {},
2055
+ type: R = "text"
2056
+ } = u, C = q(u, Ut), d = c({}, u, {
2057
+ fullWidth: x,
2058
+ inputComponent: E,
2059
+ multiline: M,
2060
+ type: R
2061
+ }), S = Wt(u), i = {
2062
+ root: {
2063
+ ownerState: d
2064
+ },
2065
+ input: {
2066
+ ownerState: d
2067
+ }
2068
+ }, a = I ?? O ? uo(i, I ?? O) : i, h = (l = (m = F.root) != null ? m : b.Root) != null ? l : zt, T = (g = (p = F.input) != null ? p : b.Input) != null ? g : Ht;
2069
+ return /* @__PURE__ */ $(zo, c({
2070
+ slots: {
2071
+ root: h,
2072
+ input: T
2073
+ },
2074
+ componentsProps: a,
2075
+ fullWidth: x,
2076
+ inputComponent: E,
2077
+ multiline: M,
2078
+ ref: n,
2079
+ type: R
2080
+ }, C, {
2081
+ classes: S
2082
+ }));
2083
+ });
2084
+ process.env.NODE_ENV !== "production" && (Ke.propTypes = {
2085
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2086
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2087
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2088
+ // └─────────────────────────────────────────────────────────────────────┘
2089
+ /**
2090
+ * This prop helps users to fill forms faster, especially on mobile devices.
2091
+ * The name can be confusing, as it's more like an autofill.
2092
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
2093
+ */
2094
+ autoComplete: e.string,
2095
+ /**
2096
+ * If `true`, the `input` element is focused during the first mount.
2097
+ */
2098
+ autoFocus: e.bool,
2099
+ /**
2100
+ * Override or extend the styles applied to the component.
2101
+ */
2102
+ classes: e.object,
2103
+ /**
2104
+ * The color of the component.
2105
+ * It supports both default and custom theme colors, which can be added as shown in the
2106
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
2107
+ * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
2108
+ */
2109
+ color: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
2110
+ /**
2111
+ * The components used for each slot inside.
2112
+ *
2113
+ * This prop is an alias for the `slots` prop.
2114
+ * It's recommended to use the `slots` prop instead.
2115
+ *
2116
+ * @default {}
2117
+ */
2118
+ components: e.shape({
2119
+ Input: e.elementType,
2120
+ Root: e.elementType
2121
+ }),
2122
+ /**
2123
+ * The extra props for the slot components.
2124
+ * You can override the existing props or add new ones.
2125
+ *
2126
+ * This prop is an alias for the `slotProps` prop.
2127
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
2128
+ *
2129
+ * @default {}
2130
+ */
2131
+ componentsProps: e.shape({
2132
+ input: e.object,
2133
+ root: e.object
2134
+ }),
2135
+ /**
2136
+ * The default value. Use when the component is not controlled.
2137
+ */
2138
+ defaultValue: e.any,
2139
+ /**
2140
+ * If `true`, the component is disabled.
2141
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2142
+ */
2143
+ disabled: e.bool,
2144
+ /**
2145
+ * If `true`, the input will not have an underline.
2146
+ */
2147
+ disableUnderline: e.bool,
2148
+ /**
2149
+ * End `InputAdornment` for this component.
2150
+ */
2151
+ endAdornment: e.node,
2152
+ /**
2153
+ * If `true`, the `input` will indicate an error.
2154
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2155
+ */
2156
+ error: e.bool,
2157
+ /**
2158
+ * If `true`, the `input` will take up the full width of its container.
2159
+ * @default false
2160
+ */
2161
+ fullWidth: e.bool,
2162
+ /**
2163
+ * If `true`, the label is hidden.
2164
+ * This is used to increase density for a `FilledInput`.
2165
+ * Be sure to add `aria-label` to the `input` element.
2166
+ * @default false
2167
+ */
2168
+ hiddenLabel: e.bool,
2169
+ /**
2170
+ * The id of the `input` element.
2171
+ */
2172
+ id: e.string,
2173
+ /**
2174
+ * The component used for the `input` element.
2175
+ * Either a string to use a HTML element or a component.
2176
+ * @default 'input'
2177
+ */
2178
+ inputComponent: e.elementType,
2179
+ /**
2180
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2181
+ * @default {}
2182
+ */
2183
+ inputProps: e.object,
2184
+ /**
2185
+ * Pass a ref to the `input` element.
2186
+ */
2187
+ inputRef: Fe,
2188
+ /**
2189
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
2190
+ * FormControl.
2191
+ * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.
2192
+ */
2193
+ margin: e.oneOf(["dense", "none"]),
2194
+ /**
2195
+ * Maximum number of rows to display when multiline option is set to true.
2196
+ */
2197
+ maxRows: e.oneOfType([e.number, e.string]),
2198
+ /**
2199
+ * Minimum number of rows to display when multiline option is set to true.
2200
+ */
2201
+ minRows: e.oneOfType([e.number, e.string]),
2202
+ /**
2203
+ * If `true`, a [TextareaAutosize](/material-ui/react-textarea-autosize/) element is rendered.
2204
+ * @default false
2205
+ */
2206
+ multiline: e.bool,
2207
+ /**
2208
+ * Name attribute of the `input` element.
2209
+ */
2210
+ name: e.string,
2211
+ /**
2212
+ * Callback fired when the value is changed.
2213
+ *
2214
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
2215
+ * You can pull out the new value by accessing `event.target.value` (string).
2216
+ */
2217
+ onChange: e.func,
2218
+ /**
2219
+ * The short hint displayed in the `input` before the user enters a value.
2220
+ */
2221
+ placeholder: e.string,
2222
+ /**
2223
+ * It prevents the user from changing the value of the field
2224
+ * (not from interacting with the field).
2225
+ */
2226
+ readOnly: e.bool,
2227
+ /**
2228
+ * If `true`, the `input` element is required.
2229
+ * The prop defaults to the value (`false`) inherited from the parent FormControl component.
2230
+ */
2231
+ required: e.bool,
2232
+ /**
2233
+ * Number of rows to display when multiline option is set to true.
2234
+ */
2235
+ rows: e.oneOfType([e.number, e.string]),
2236
+ /**
2237
+ * The extra props for the slot components.
2238
+ * You can override the existing props or add new ones.
2239
+ *
2240
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
2241
+ *
2242
+ * @default {}
2243
+ */
2244
+ slotProps: e.shape({
2245
+ input: e.object,
2246
+ root: e.object
2247
+ }),
2248
+ /**
2249
+ * The components used for each slot inside.
2250
+ *
2251
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
2252
+ *
2253
+ * @default {}
2254
+ */
2255
+ slots: e.shape({
2256
+ input: e.elementType,
2257
+ root: e.elementType
2258
+ }),
2259
+ /**
2260
+ * Start `InputAdornment` for this component.
2261
+ */
2262
+ startAdornment: e.node,
2263
+ /**
2264
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2265
+ */
2266
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2267
+ /**
2268
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
2269
+ * @default 'text'
2270
+ */
2271
+ type: e.string,
2272
+ /**
2273
+ * The value of the `input` element, required for a controlled component.
2274
+ */
2275
+ value: e.any
2276
+ });
2277
+ Ke.muiName = "Input";
2278
+ const Kt = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"], qt = ["root"], Gt = (o) => {
2279
+ const {
2280
+ classes: t
2281
+ } = o;
2282
+ return t;
2283
+ }, qe = {
2284
+ name: "MuiSelect",
2285
+ overridesResolver: (o, t) => t.root,
2286
+ shouldForwardProp: (o) => Oe(o) && o !== "variant",
2287
+ slot: "Root"
2288
+ }, Xt = U(et, qe)(""), Yt = U(ot, qe)(""), Jt = U(Ke, qe)(""), Io = /* @__PURE__ */ r.forwardRef(function(t, n) {
2289
+ const l = Ce({
2290
+ name: "MuiSelect",
2291
+ props: t
2292
+ }), {
2293
+ autoWidth: m = !1,
2294
+ children: g,
2295
+ classes: p = {},
2296
+ className: u,
2297
+ defaultOpen: b = !1,
2298
+ displayEmpty: O = !1,
2299
+ IconComponent: x = At,
2300
+ id: E,
2301
+ input: M,
2302
+ inputProps: I,
2303
+ label: F,
2304
+ labelId: R,
2305
+ MenuProps: C,
2306
+ multiple: d = !1,
2307
+ native: S = !1,
2308
+ onClose: i,
2309
+ onOpen: a,
2310
+ open: h,
2311
+ renderValue: T,
2312
+ SelectDisplayProps: v,
2313
+ variant: W = "outlined"
2314
+ } = l, z = q(l, Kt), H = S ? Co : Oo, Y = Zo(), V = Ho({
2315
+ props: l,
2316
+ muiFormControl: Y,
2317
+ states: ["variant", "error"]
2318
+ }), D = V.variant || W, K = c({}, l, {
2319
+ variant: D,
2320
+ classes: p
2321
+ }), P = Gt(K), L = q(P, qt), k = M || {
2322
+ standard: /* @__PURE__ */ $(Xt, {
2323
+ ownerState: K
2324
+ }),
2325
+ outlined: /* @__PURE__ */ $(Yt, {
2326
+ label: F,
2327
+ ownerState: K
2328
+ }),
2329
+ filled: /* @__PURE__ */ $(Jt, {
2330
+ ownerState: K
2331
+ })
2332
+ }[D], f = me(n, k.ref);
2333
+ return /* @__PURE__ */ $(r.Fragment, {
2334
+ children: /* @__PURE__ */ r.cloneElement(k, c({
2335
+ // Most of the logic is implemented in `SelectInput`.
2336
+ // The `Select` component is a simple API wrapper to expose something better to play with.
2337
+ inputComponent: H,
2338
+ inputProps: c({
2339
+ children: g,
2340
+ error: V.error,
2341
+ IconComponent: x,
2342
+ variant: D,
2343
+ type: void 0,
2344
+ // We render a select. We can ignore the type provided by the `Input`.
2345
+ multiple: d
2346
+ }, S ? {
2347
+ id: E
2348
+ } : {
2349
+ autoWidth: m,
2350
+ defaultOpen: b,
2351
+ displayEmpty: O,
2352
+ labelId: R,
2353
+ MenuProps: C,
2354
+ onClose: i,
2355
+ onOpen: a,
2356
+ open: h,
2357
+ renderValue: T,
2358
+ SelectDisplayProps: c({
2359
+ id: E
2360
+ }, v)
2361
+ }, I, {
2362
+ classes: I ? uo(L, I.classes) : L
2363
+ }, M ? M.props.inputProps : {})
2364
+ }, (d && S || O) && D === "outlined" ? {
2365
+ notched: !0
2366
+ } : {}, {
2367
+ ref: f,
2368
+ className: re(k.props.className, u, P.root)
2369
+ }, !M && {
2370
+ variant: D
2371
+ }, z))
2372
+ });
2373
+ });
2374
+ process.env.NODE_ENV !== "production" && (Io.propTypes = {
2375
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
2376
+ // │ These PropTypes are generated from the TypeScript type definitions. │
2377
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
2378
+ // └─────────────────────────────────────────────────────────────────────┘
2379
+ /**
2380
+ * If `true`, the width of the popover will automatically be set according to the items inside the
2381
+ * menu, otherwise it will be at least the width of the select input.
2382
+ * @default false
2383
+ */
2384
+ autoWidth: e.bool,
2385
+ /**
2386
+ * The option elements to populate the select with.
2387
+ * Can be some `MenuItem` when `native` is false and `option` when `native` is true.
2388
+ *
2389
+ * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
2390
+ */
2391
+ children: e.node,
2392
+ /**
2393
+ * Override or extend the styles applied to the component.
2394
+ * @default {}
2395
+ */
2396
+ classes: e.object,
2397
+ /**
2398
+ * @ignore
2399
+ */
2400
+ className: e.string,
2401
+ /**
2402
+ * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
2403
+ * You can only use it when the `native` prop is `false` (default).
2404
+ * @default false
2405
+ */
2406
+ defaultOpen: e.bool,
2407
+ /**
2408
+ * The default value. Use when the component is not controlled.
2409
+ */
2410
+ defaultValue: e.any,
2411
+ /**
2412
+ * If `true`, a value is displayed even if no items are selected.
2413
+ *
2414
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
2415
+ * returns the value to be displayed when no items are selected.
2416
+ *
2417
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
2418
+ * The label should either be hidden or forced to a shrunk state.
2419
+ * @default false
2420
+ */
2421
+ displayEmpty: e.bool,
2422
+ /**
2423
+ * The icon that displays the arrow.
2424
+ * @default ArrowDropDownIcon
2425
+ */
2426
+ IconComponent: e.elementType,
2427
+ /**
2428
+ * The `id` of the wrapper element or the `select` element when `native`.
2429
+ */
2430
+ id: e.string,
2431
+ /**
2432
+ * An `Input` element; does not have to be a material-ui specific `Input`.
2433
+ */
2434
+ input: e.element,
2435
+ /**
2436
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
2437
+ * When `native` is `true`, the attributes are applied on the `select` element.
2438
+ */
2439
+ inputProps: e.object,
2440
+ /**
2441
+ * See [OutlinedInput#label](/material-ui/api/outlined-input/#props)
2442
+ */
2443
+ label: e.node,
2444
+ /**
2445
+ * The ID of an element that acts as an additional label. The Select will
2446
+ * be labelled by the additional label and the selected value.
2447
+ */
2448
+ labelId: e.string,
2449
+ /**
2450
+ * Props applied to the [`Menu`](/material-ui/api/menu/) element.
2451
+ */
2452
+ MenuProps: e.object,
2453
+ /**
2454
+ * If `true`, `value` must be an array and the menu will support multiple selections.
2455
+ * @default false
2456
+ */
2457
+ multiple: e.bool,
2458
+ /**
2459
+ * If `true`, the component uses a native `select` element.
2460
+ * @default false
2461
+ */
2462
+ native: e.bool,
2463
+ /**
2464
+ * Callback fired when a menu item is selected.
2465
+ *
2466
+ * @param {SelectChangeEvent<Value>} event The event source of the callback.
2467
+ * You can pull out the new value by accessing `event.target.value` (any).
2468
+ * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
2469
+ * @param {object} [child] The react element that was selected when `native` is `false` (default).
2470
+ */
2471
+ onChange: e.func,
2472
+ /**
2473
+ * Callback fired when the component requests to be closed.
2474
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).
2475
+ *
2476
+ * @param {object} event The event source of the callback.
2477
+ */
2478
+ onClose: e.func,
2479
+ /**
2480
+ * Callback fired when the component requests to be opened.
2481
+ * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
2482
+ *
2483
+ * @param {object} event The event source of the callback.
2484
+ */
2485
+ onOpen: e.func,
2486
+ /**
2487
+ * If `true`, the component is shown.
2488
+ * You can only use it when the `native` prop is `false` (default).
2489
+ */
2490
+ open: e.bool,
2491
+ /**
2492
+ * Render the selected value.
2493
+ * You can only use it when the `native` prop is `false` (default).
2494
+ *
2495
+ * @param {any} value The `value` provided to the component.
2496
+ * @returns {ReactNode}
2497
+ */
2498
+ renderValue: e.func,
2499
+ /**
2500
+ * Props applied to the clickable div element.
2501
+ */
2502
+ SelectDisplayProps: e.object,
2503
+ /**
2504
+ * The system prop that allows defining system overrides as well as additional CSS styles.
2505
+ */
2506
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
2507
+ /**
2508
+ * The `input` value. Providing an empty string will select no options.
2509
+ * Set to an empty string `''` if you don't want any of the available options to be selected.
2510
+ *
2511
+ * If the value is an object it must have reference equality with the option in order to be selected.
2512
+ * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
2513
+ */
2514
+ value: e.oneOfType([e.oneOf([""]), e.any]),
2515
+ /**
2516
+ * The variant to use.
2517
+ * @default 'outlined'
2518
+ */
2519
+ variant: e.oneOf(["filled", "outlined", "standard"])
2520
+ });
2521
+ Io.muiName = "Select";
2522
+ export {
2523
+ Ke as F,
2524
+ ct as M,
2525
+ Io as S
2526
+ };