everest-npm-features 0.0.16 → 0.0.18

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 (145) hide show
  1. package/dist/CheckCircle-BiltyzEJ.js +8 -0
  2. package/dist/PlayArrow-BYMBg9J8.js +8 -0
  3. package/dist/{Stack-CZu3N-Ba.js → Stack-euVJ1SJW.js} +1 -1
  4. package/dist/assets/index10.css +1 -1
  5. package/dist/assets/index11.css +1 -1
  6. package/dist/assets/index2.css +1 -1
  7. package/dist/assets/index3.css +1 -1
  8. package/dist/assets/index4.css +1 -1
  9. package/dist/assets/index5.css +1 -1
  10. package/dist/assets/index6.css +1 -1
  11. package/dist/assets/index7.css +1 -1
  12. package/dist/assets/index8.css +1 -1
  13. package/dist/assets/index9.css +1 -1
  14. package/dist/assets/styles2.css +1 -1
  15. package/dist/assets/styles3.css +1 -0
  16. package/dist/{auth-PInt5Jrb.js → auth-RJ36qeYb.js} +1 -1
  17. package/dist/{bank-BDnnvwyk.js → bank-Dml7vXW5.js} +10 -10
  18. package/dist/components/RocketRamp/MinimalKyc/form.js +6 -6
  19. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  20. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  21. package/dist/components/RocketRamp/Player/Buy/form.js +5 -5
  22. package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
  23. package/dist/components/RocketRamp/Player/Dashboard/balance.js +1 -1
  24. package/dist/components/RocketRamp/Player/Dashboard/index.js +13 -15
  25. package/dist/components/RocketRamp/Player/Dashboard/transaction.js +1 -1
  26. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  27. package/dist/components/RocketRamp/Player/Sell/form.js +5 -5
  28. package/dist/components/RocketRamp/Player/Sell/index.js +8 -8
  29. package/dist/components/RocketRamp/Player/SignIn/index.js +3 -3
  30. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +3 -3
  31. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +3 -3
  32. package/dist/components/RocketRamp/Player/SignUp/email.js +3 -3
  33. package/dist/components/RocketRamp/Player/SignUp/index.js +4 -4
  34. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +3 -3
  35. package/dist/components/RocketRamp/Player/SignUp/summary.js +1 -1
  36. package/dist/components/RocketRamp/Player/SignUp/validateEmail.js +1 -1
  37. package/dist/components/RocketRamp/ResetPassword/index.js +3 -3
  38. package/dist/components/RocketRamp/Shared/Input/index.js +9 -9
  39. package/dist/components/RocketRamp/Store/Dashboard/balance.js +1 -1
  40. package/dist/components/RocketRamp/Store/Dashboard/stats.js +1 -1
  41. package/dist/components/RocketRamp/Store/Dashboard/transaction.js +1 -1
  42. package/dist/components/RocketRamp/Store/SignUp/index.js +4 -4
  43. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +3 -3
  44. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +3 -3
  45. package/dist/components/RocketRamp/Store/SignUp/summary.js +1 -1
  46. package/dist/components/RocketRamp/Store/SignUp/validateEmail.js +1 -1
  47. package/dist/components/RocketRamp/Transactions/index.js +8 -8
  48. package/dist/components/Shared/HistoryItem/index.js +40 -40
  49. package/dist/components/Shared/MinimalKyc/index.js +3 -3
  50. package/dist/components/Shared/tooltip.js +5 -2108
  51. package/dist/components/Wallet/Account/createIban.js +1 -1
  52. package/dist/components/Wallet/Account/iban.js +5 -5
  53. package/dist/components/Wallet/Account/index.js +17 -17
  54. package/dist/components/Wallet/Account/sendIban.js +16 -16
  55. package/dist/components/Wallet/Buy/confirmTransaction.d.ts +2 -2
  56. package/dist/components/Wallet/Buy/confirmTransaction.js +5 -4
  57. package/dist/components/Wallet/Buy/form.d.ts +2 -2
  58. package/dist/components/Wallet/Buy/form.js +9 -6
  59. package/dist/components/Wallet/Buy/index.d.ts +1 -1
  60. package/dist/components/Wallet/Buy/index.js +7 -7
  61. package/dist/components/Wallet/Deposit/index.d.ts +2 -0
  62. package/dist/components/Wallet/Deposit/index.js +110 -0
  63. package/dist/components/Wallet/EnterpriseKyc/edd.js +93 -81
  64. package/dist/components/Wallet/EnterpriseKyc/index.js +121 -108
  65. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +93 -77
  66. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +3 -3
  67. package/dist/components/Wallet/EnterpriseKyc/types.d.ts +1 -0
  68. package/dist/components/Wallet/EnterpriseKyc/verify.js +3 -3
  69. package/dist/components/Wallet/History/index.js +4 -4
  70. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +33 -33
  71. package/dist/components/Wallet/Portfolio/index.js +171 -138
  72. package/dist/components/Wallet/Profile/documents.js +4 -4
  73. package/dist/components/Wallet/Profile/index.js +4 -4
  74. package/dist/components/Wallet/Receive/index.js +8 -8
  75. package/dist/components/Wallet/Sell/confirmTransaction.d.ts +3 -0
  76. package/dist/components/Wallet/Sell/confirmTransaction.js +18 -0
  77. package/dist/components/Wallet/Sell/form.d.ts +3 -0
  78. package/dist/components/Wallet/Sell/form.js +32 -0
  79. package/dist/components/Wallet/Sell/index.d.ts +6 -0
  80. package/dist/components/Wallet/Sell/index.js +22 -0
  81. package/dist/components/Wallet/Send/index.js +6 -6
  82. package/dist/components/Wallet/Shared/Auth/emailForm.js +1 -1
  83. package/dist/components/Wallet/Shared/Auth/otpForm.js +3 -3
  84. package/dist/components/Wallet/Shared/ConnectWallet/index.js +1 -1
  85. package/dist/components/Wallet/Shared/Container/index.js +1 -1
  86. package/dist/components/Wallet/Shared/Order/types.d.ts +51 -0
  87. package/dist/components/Wallet/Shared/TokenModal/index.d.ts +1 -1
  88. package/dist/components/Wallet/Shared/TokenModal/index.js +5 -5
  89. package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +4 -4
  90. package/dist/components/Wallet/Shared/addBank.js +7 -7
  91. package/dist/components/Wallet/Shared/connectPlaidBank.js +7 -7
  92. package/dist/components/Wallet/Shared/pin.js +1 -1
  93. package/dist/components/Wallet/SignIn/index.js +3 -3
  94. package/dist/components/Wallet/SignUp/index.js +3 -3
  95. package/dist/components/Wallet/Stake/gems/index.js +1 -1
  96. package/dist/components/Wallet/Stake/id/index.js +3 -3
  97. package/dist/components/Wallet/Stake/index.js +7 -7
  98. package/dist/components/Wallet/Swap/index.d.ts +3 -2
  99. package/dist/components/Wallet/Swap/index.js +327 -271
  100. package/dist/components/Wallet/SwapAndUniSwap/index.js +31 -35
  101. package/dist/components/Wallet/{Buy → SwapAndUniSwap}/types.d.ts +4 -13
  102. package/dist/components/Wallet/SwapAndUniSwap/types.js +1 -0
  103. package/dist/components/Wallet/Withdraw/bankSelect.d.ts +4 -0
  104. package/dist/components/Wallet/Withdraw/bankSelect.js +21 -0
  105. package/dist/components/Wallet/Withdraw/confirmTransaction.d.ts +3 -0
  106. package/dist/components/Wallet/Withdraw/confirmTransaction.js +19 -0
  107. package/dist/components/Wallet/Withdraw/form.d.ts +3 -0
  108. package/dist/components/Wallet/Withdraw/form.js +26 -0
  109. package/dist/components/Wallet/Withdraw/index.d.ts +7 -0
  110. package/dist/components/Wallet/Withdraw/index.js +22 -0
  111. package/dist/constants-QcvnheTz.js +5307 -0
  112. package/dist/cryptoAssets-DBfxll21.js +16 -0
  113. package/dist/{documents-b3tR38Qf.js → documents-Bd28UFLu.js} +3 -3
  114. package/dist/{fiatAssets-Di1Dvl51.js → fiatAssets-w5Lh-MSu.js} +1 -1
  115. package/dist/hoc/withThemeProvider.js +163 -164
  116. package/dist/hooks/useDialog/index.js +22 -22
  117. package/dist/hooks/useRrDialog/index.js +1 -1
  118. package/dist/{iban-D3Y3E3cN.js → iban-CKaN4sIM.js} +6 -6
  119. package/dist/index-BEdISdN-.js +709 -0
  120. package/dist/{index-BhJeqQtm.js → index-BNaxzTKI.js} +164 -163
  121. package/dist/index-BvftsxV1.js +677 -0
  122. package/dist/index-DSHZv8ZQ.js +569 -0
  123. package/dist/{index-D2XCPzg3.js → index-_KAhqkWc.js} +144 -143
  124. package/dist/{index-DQaPU81n.js → index-f15o1nhn.js} +3 -3
  125. package/dist/{kyc-8mSMgUlU.js → kyc-V7cIa71M.js} +1 -1
  126. package/dist/main.d.ts +4 -0
  127. package/dist/main.js +47 -39
  128. package/dist/order-6L4LZOBs.js +41 -0
  129. package/dist/{react-redux-B4BZippc.js → react-redux-C7I9-1M6.js} +2 -2
  130. package/dist/{stake-Cf5t27F3.js → stake-r4KUlRcz.js} +1 -1
  131. package/dist/styles.module-BFHktEw2.js +30 -0
  132. package/dist/{styles.module-Ctfaq7f2.js → styles.module-DJk7Pf0F.js} +1 -1
  133. package/dist/tooltip-BVZ66d8C.js +2111 -0
  134. package/dist/util/constants.d.ts +1 -0
  135. package/dist/util/constants.js +84 -83
  136. package/dist/{wallet-Bghw0_Nm.js → wallet-D7MEPP5y.js} +1 -1
  137. package/package.json +2 -2
  138. package/dist/PlayArrow-Dent7shn.js +0 -21
  139. package/dist/assets/index12.css +0 -1
  140. package/dist/assets/index13.css +0 -1
  141. package/dist/constants-A8X7fywY.js +0 -3882
  142. package/dist/index-Bqxs_jIU.js +0 -709
  143. package/dist/order-DTnCUIx0.js +0 -34
  144. /package/dist/assets/{main.css → withThemeProvider.css} +0 -0
  145. /package/dist/components/Wallet/{Buy → Shared/Order}/types.js +0 -0
@@ -0,0 +1,16 @@
1
+ import { Q as a, T as s, W as e } from "./constants-QcvnheTz.js";
2
+ const T = (t) => ({
3
+ type: a,
4
+ payload: t
5
+ }), p = (t) => ({
6
+ type: s,
7
+ payload: t
8
+ }), A = (t) => ({
9
+ type: e,
10
+ payload: t
11
+ });
12
+ export {
13
+ p as a,
14
+ A as b,
15
+ T as f
16
+ };
@@ -10,9 +10,9 @@ import { W as ae } from "./react-webcam-B3cXh1XT.js";
10
10
  import { A as se } from "./ArrowBack-BT4ZQvY3.js";
11
11
  import ce from "./components/Shared/transition.js";
12
12
  import { getDocName as le } from "./util/functions.js";
13
- import { u as de, a as me } from "./react-redux-B4BZippc.js";
14
- import { a4 as he, a5 as fe, a6 as ue, a7 as pe, a8 as ge, a9 as _e } from "./constants-A8X7fywY.js";
15
- import { e as xe } from "./index-DQaPU81n.js";
13
+ import { a as de, u as me } from "./react-redux-C7I9-1M6.js";
14
+ import { a9 as he, aa as fe, ab as ue, ac as pe, ad as ge, ae as _e } from "./constants-QcvnheTz.js";
15
+ import { e as xe } from "./index-f15o1nhn.js";
16
16
  import { DELETE_ICON as De } from "./util/constants.js";
17
17
  import { useDialog as be } from "./hooks/useDialog/index.js";
18
18
  import { B as Ce } from "./Backdrop-Cwqacwk8.js";
@@ -1,4 +1,4 @@
1
- import { J as t } from "./constants-A8X7fywY.js";
1
+ import { N as t } from "./constants-QcvnheTz.js";
2
2
  const e = (s) => ({
3
3
  type: t,
4
4
  payload: s
@@ -1,17 +1,16 @@
1
- import { jsx as S, jsxs as Oe } from "react/jsx-runtime";
2
- import '../assets/main.css';/* empty css */
1
+ import { jsx as S, jsxs as je } from "react/jsx-runtime";
2
+ import { B as Ie, P as a, D as Le, S as Ae, e as Ke, T as x, c as ve, F as Re, s as We } from "../createTheme-CKy7OHWe.js";
3
3
  import * as d from "react";
4
- import { B as je, P as a, D as Ie, S as Le, e as Ae, T as x, c as Ke, F as Re, s as Fe } from "../createTheme-CKy7OHWe.js";
5
- import { R as He } from "../index-BnKMvdnf.js";
6
- import { u as We } from "../useThemeWithoutDefault-DaojF4V7.js";
4
+ import { R as Fe } from "../index-BnKMvdnf.js";
5
+ import { u as He } from "../useThemeWithoutDefault-DaojF4V7.js";
7
6
  import { e as be } from "../exactProp-C1Lmtwf_.js";
8
7
  import { D as Ge } from "../DefaultPropsProvider-C9ddiClG.js";
9
8
  import { G as Ue } from "../GlobalStyles-yJPIbrEZ.js";
10
- const qe = (e) => {
11
- const t = Ie(e);
12
- class o extends Le {
13
- constructor(f) {
14
- super(f), this.prepend = t.sheet.prepend;
9
+ import '../assets/withThemeProvider.css';const qe = (e) => {
10
+ const t = Le(e);
11
+ class o extends Ae {
12
+ constructor(m) {
13
+ super(m), this.prepend = t.sheet.prepend;
15
14
  }
16
15
  }
17
16
  return t.sheet = new o({
@@ -28,17 +27,17 @@ typeof document == "object" && (Y = qe({
28
27
  key: "css",
29
28
  prepend: !0
30
29
  }));
31
- function B(e) {
30
+ function Me(e) {
32
31
  const {
33
32
  injectFirst: t,
34
33
  children: o
35
34
  } = e;
36
- return t && Y ? /* @__PURE__ */ S(je, {
35
+ return t && Y ? /* @__PURE__ */ S(Ie, {
37
36
  value: Y,
38
37
  children: o
39
38
  }) : o;
40
39
  }
41
- process.env.NODE_ENV !== "production" && (B.propTypes = {
40
+ process.env.NODE_ENV !== "production" && (Me.propTypes = {
42
41
  /**
43
42
  * Your component tree.
44
43
  */
@@ -50,10 +49,10 @@ process.env.NODE_ENV !== "production" && (B.propTypes = {
50
49
  */
51
50
  injectFirst: a.bool
52
51
  });
53
- const z = /* @__PURE__ */ d.createContext(null);
54
- process.env.NODE_ENV !== "production" && (z.displayName = "ThemeContext");
55
- function Q() {
56
- const e = d.useContext(z);
52
+ const B = /* @__PURE__ */ d.createContext(null);
53
+ process.env.NODE_ENV !== "production" && (B.displayName = "ThemeContext");
54
+ function z() {
55
+ const e = d.useContext(B);
57
56
  return process.env.NODE_ENV !== "production" && d.useDebugValue(e), e;
58
57
  }
59
58
  const Ye = typeof Symbol == "function" && Symbol.for, Be = Ye ? Symbol.for("mui.nested") : "__THEME_NESTED__";
@@ -72,17 +71,17 @@ function A(e) {
72
71
  const {
73
72
  children: t,
74
73
  theme: o
75
- } = e, n = Q();
76
- process.env.NODE_ENV !== "production" && n === null && typeof o == "function" && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
74
+ } = e, s = z();
75
+ process.env.NODE_ENV !== "production" && s === null && typeof o == "function" && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
77
76
  `));
78
- const f = d.useMemo(() => {
79
- const m = n === null ? {
77
+ const m = d.useMemo(() => {
78
+ const h = s === null ? {
80
79
  ...o
81
- } : ze(n, o);
82
- return m != null && (m[Be] = n !== null), m;
83
- }, [o, n]);
84
- return /* @__PURE__ */ S(z.Provider, {
85
- value: f,
80
+ } : ze(s, o);
81
+ return h != null && (h[Be] = s !== null), h;
82
+ }, [o, s]);
83
+ return /* @__PURE__ */ S(B.Provider, {
84
+ value: m,
86
85
  children: t
87
86
  });
88
87
  }
@@ -97,16 +96,16 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
97
96
  theme: a.oneOfType([a.object, a.func]).isRequired
98
97
  });
99
98
  process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (A.propTypes = be(A.propTypes));
100
- const Ee = {};
101
- function Te(e, t, o, n = !1) {
99
+ const Ce = {};
100
+ function Ee(e, t, o, s = !1) {
102
101
  return d.useMemo(() => {
103
- const f = e && t[e] || t;
102
+ const m = e && t[e] || t;
104
103
  if (typeof o == "function") {
105
- const m = o(f), r = e ? {
104
+ const h = o(m), r = e ? {
106
105
  ...t,
107
- [e]: m
108
- } : m;
109
- return n ? () => r : r;
106
+ [e]: h
107
+ } : h;
108
+ return s ? () => r : r;
110
109
  }
111
110
  return e ? {
112
111
  ...t,
@@ -115,22 +114,22 @@ function Te(e, t, o, n = !1) {
115
114
  ...t,
116
115
  ...o
117
116
  };
118
- }, [e, t, o, n]);
117
+ }, [e, t, o, s]);
119
118
  }
120
119
  function O(e) {
121
120
  const {
122
121
  children: t,
123
122
  theme: o,
124
- themeId: n
125
- } = e, f = We(Ee), m = Q() || Ee;
126
- process.env.NODE_ENV !== "production" && (f === null && typeof o == "function" || n && f && !f[n] && typeof o == "function") && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
123
+ themeId: s
124
+ } = e, m = He(Ce), h = z() || Ce;
125
+ process.env.NODE_ENV !== "production" && (m === null && typeof o == "function" || s && m && !m[s] && typeof o == "function") && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
127
126
  `));
128
- const r = Te(n, f, o), E = Te(n, m, o, !0), g = r.direction === "rtl";
127
+ const r = Ee(s, m, o), E = Ee(s, h, o, !0), g = r.direction === "rtl";
129
128
  return /* @__PURE__ */ S(A, {
130
129
  theme: E,
131
- children: /* @__PURE__ */ S(Ae.Provider, {
130
+ children: /* @__PURE__ */ S(Ke.Provider, {
132
131
  value: r,
133
- children: /* @__PURE__ */ S(He, {
132
+ children: /* @__PURE__ */ S(Fe, {
134
133
  value: g,
135
134
  children: /* @__PURE__ */ S(Ge, {
136
135
  value: r == null ? void 0 : r.components,
@@ -159,19 +158,19 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
159
158
  themeId: a.string
160
159
  });
161
160
  process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (O.propTypes = be(O.propTypes));
162
- const J = "mode", X = "color-scheme", Qe = "data-color-scheme";
161
+ const Q = "mode", J = "color-scheme", Qe = "data-color-scheme";
163
162
  function Je(e) {
164
163
  const {
165
164
  defaultLightColorScheme: t = "light",
166
165
  defaultDarkColorScheme: o = "dark",
167
- modeStorageKey: n = J,
168
- colorSchemeStorageKey: f = X,
169
- attribute: m = Qe,
166
+ modeStorageKey: s = Q,
167
+ colorSchemeStorageKey: m = J,
168
+ attribute: h = Qe,
170
169
  colorSchemeNode: r = "document.documentElement",
171
170
  nonce: E
172
171
  } = e || {};
173
- let g = "", l = m;
174
- if (m === "class" && (l = ".%s"), m === "data" && (l = "[data-%s]"), l.startsWith(".")) {
172
+ let g = "", l = h;
173
+ if (h === "class" && (l = ".%s"), h === "data" && (l = "[data-%s]"), l.startsWith(".")) {
175
174
  const y = l.substring(1);
176
175
  g += `${r}.classList.remove('${y}'.replace('%s', light), '${y}'.replace('%s', dark));
177
176
  ${r}.classList.add('${y}'.replace('%s', colorScheme));`;
@@ -191,9 +190,9 @@ function Je(e) {
191
190
  __html: `(function() {
192
191
  try {
193
192
  let colorScheme = '';
194
- const mode = localStorage.getItem('${n}') || 'system';
195
- const dark = localStorage.getItem('${f}-dark') || '${o}';
196
- const light = localStorage.getItem('${f}-light') || '${t}';
193
+ const mode = localStorage.getItem('${s}') || 'system';
194
+ const dark = localStorage.getItem('${m}-dark') || '${o}';
195
+ const light = localStorage.getItem('${m}-light') || '${t}';
197
196
  if (mode === 'system') {
198
197
  // handle system mode
199
198
  const mql = window.matchMedia('(prefers-color-scheme: dark)');
@@ -216,18 +215,18 @@ try {
216
215
  }
217
216
  }, "mui-color-scheme-init");
218
217
  }
219
- function ke(e) {
218
+ function Te(e) {
220
219
  if (typeof window < "u" && typeof window.matchMedia == "function" && e === "system")
221
220
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
222
221
  }
223
- function Me(e, t) {
222
+ function Ne(e, t) {
224
223
  if (e.mode === "light" || e.mode === "system" && e.systemMode === "light")
225
224
  return t("light");
226
225
  if (e.mode === "dark" || e.mode === "system" && e.systemMode === "dark")
227
226
  return t("dark");
228
227
  }
229
228
  function Xe(e) {
230
- return Me(e, (t) => {
229
+ return Ne(e, (t) => {
231
230
  if (t === "light")
232
231
  return e.lightColorScheme;
233
232
  if (t === "dark")
@@ -248,16 +247,16 @@ function Ze(e) {
248
247
  const {
249
248
  defaultMode: t = "light",
250
249
  defaultLightColorScheme: o,
251
- defaultDarkColorScheme: n,
252
- supportedColorSchemes: f = [],
253
- modeStorageKey: m = J,
254
- colorSchemeStorageKey: r = X,
250
+ defaultDarkColorScheme: s,
251
+ supportedColorSchemes: m = [],
252
+ modeStorageKey: h = Q,
253
+ colorSchemeStorageKey: r = J,
255
254
  storageWindow: E = typeof window > "u" ? void 0 : window
256
- } = e, g = f.join(","), l = f.length > 1, [T, y] = d.useState(() => {
257
- const s = q(m, t), c = q(`${r}-light`, o), i = q(`${r}-dark`, n);
255
+ } = e, g = m.join(","), l = m.length > 1, [T, y] = d.useState(() => {
256
+ const n = q(h, t), c = q(`${r}-light`, o), i = q(`${r}-dark`, s);
258
257
  return {
259
- mode: s,
260
- systemMode: ke(s),
258
+ mode: n,
259
+ systemMode: Te(n),
261
260
  lightColorScheme: c,
262
261
  darkColorScheme: i
263
262
  };
@@ -265,37 +264,37 @@ function Ze(e) {
265
264
  d.useEffect(() => {
266
265
  l && M(!0), $.current = !0;
267
266
  }, [l]);
268
- const Z = Xe(T), N = d.useCallback((s) => {
267
+ const X = Xe(T), N = d.useCallback((n) => {
269
268
  y((c) => {
270
- if (s === c.mode)
269
+ if (n === c.mode)
271
270
  return c;
272
- const i = s ?? t;
271
+ const i = n ?? t;
273
272
  try {
274
- localStorage.setItem(m, i);
273
+ localStorage.setItem(h, i);
275
274
  } catch {
276
275
  }
277
276
  return {
278
277
  ...c,
279
278
  mode: i,
280
- systemMode: ke(i)
279
+ systemMode: Te(i)
281
280
  };
282
281
  });
283
- }, [m, t]), _ = d.useCallback((s) => {
284
- s ? typeof s == "string" ? s && !g.includes(s) ? console.error(`\`${s}\` does not exist in \`theme.colorSchemes\`.`) : y((c) => {
282
+ }, [h, t]), _ = d.useCallback((n) => {
283
+ n ? typeof n == "string" ? n && !g.includes(n) ? console.error(`\`${n}\` does not exist in \`theme.colorSchemes\`.`) : y((c) => {
285
284
  const i = {
286
285
  ...c
287
286
  };
288
- return Me(c, (p) => {
287
+ return Ne(c, (p) => {
289
288
  try {
290
- localStorage.setItem(`${r}-${p}`, s);
289
+ localStorage.setItem(`${r}-${p}`, n);
291
290
  } catch {
292
291
  }
293
- p === "light" && (i.lightColorScheme = s), p === "dark" && (i.darkColorScheme = s);
292
+ p === "light" && (i.lightColorScheme = n), p === "dark" && (i.darkColorScheme = n);
294
293
  }), i;
295
294
  }) : y((c) => {
296
295
  const i = {
297
296
  ...c
298
- }, p = s.light === null ? o : s.light, C = s.dark === null ? n : s.dark;
297
+ }, p = n.light === null ? o : n.light, C = n.dark === null ? s : n.dark;
299
298
  if (p)
300
299
  if (!g.includes(p))
301
300
  console.error(`\`${p}\` does not exist in \`theme.colorSchemes\`.`);
@@ -319,18 +318,18 @@ function Ze(e) {
319
318
  return i;
320
319
  }) : y((c) => {
321
320
  try {
322
- localStorage.setItem(`${r}-light`, o), localStorage.setItem(`${r}-dark`, n);
321
+ localStorage.setItem(`${r}-light`, o), localStorage.setItem(`${r}-dark`, s);
323
322
  } catch {
324
323
  }
325
324
  return {
326
325
  ...c,
327
326
  lightColorScheme: o,
328
- darkColorScheme: n
327
+ darkColorScheme: s
329
328
  };
330
329
  });
331
- }, [g, r, o, n]), D = d.useCallback((s) => {
330
+ }, [g, r, o, s]), D = d.useCallback((n) => {
332
331
  T.mode === "system" && y((c) => {
333
- const i = s != null && s.matches ? "dark" : "light";
332
+ const i = n != null && n.matches ? "dark" : "light";
334
333
  return c.systemMode === i ? c : {
335
334
  ...c,
336
335
  systemMode: i
@@ -340,29 +339,29 @@ function Ze(e) {
340
339
  return j.current = D, d.useEffect(() => {
341
340
  if (typeof window.matchMedia != "function" || !l)
342
341
  return;
343
- const s = (...i) => j.current(...i), c = window.matchMedia("(prefers-color-scheme: dark)");
344
- return c.addListener(s), s(c), () => {
345
- c.removeListener(s);
342
+ const n = (...i) => j.current(...i), c = window.matchMedia("(prefers-color-scheme: dark)");
343
+ return c.addListener(n), n(c), () => {
344
+ c.removeListener(n);
346
345
  };
347
346
  }, [l]), d.useEffect(() => {
348
347
  if (E && l) {
349
- const s = (c) => {
348
+ const n = (c) => {
350
349
  const i = c.newValue;
351
350
  typeof c.key == "string" && c.key.startsWith(r) && (!i || g.match(i)) && (c.key.endsWith("light") && _({
352
351
  light: i
353
352
  }), c.key.endsWith("dark") && _({
354
353
  dark: i
355
- })), c.key === m && (!i || ["light", "dark", "system"].includes(i)) && N(i || t);
354
+ })), c.key === h && (!i || ["light", "dark", "system"].includes(i)) && N(i || t);
356
355
  };
357
- return E.addEventListener("storage", s), () => {
358
- E.removeEventListener("storage", s);
356
+ return E.addEventListener("storage", n), () => {
357
+ E.removeEventListener("storage", n);
359
358
  };
360
359
  }
361
- }, [_, N, m, r, g, t, E, l]), {
360
+ }, [_, N, h, r, g, t, E, l]), {
362
361
  ...T,
363
362
  mode: $.current || !l ? T.mode : void 0,
364
363
  systemMode: $.current || !l ? T.systemMode : void 0,
365
- colorScheme: $.current || !l ? Z : void 0,
364
+ colorScheme: $.current || !l ? X : void 0,
366
365
  setMode: N,
367
366
  setColorScheme: _
368
367
  };
@@ -378,9 +377,9 @@ function tt(e) {
378
377
  * It should also ideally have a vars object created using `prepareCssVars`.
379
378
  */
380
379
  theme: o = {},
381
- modeStorageKey: n = J,
382
- colorSchemeStorageKey: f = X,
383
- disableTransitionOnChange: m = !1,
380
+ modeStorageKey: s = Q,
381
+ colorSchemeStorageKey: m = J,
382
+ disableTransitionOnChange: h = !1,
384
383
  defaultColorScheme: r,
385
384
  resolveTheme: E
386
385
  } = e, g = {
@@ -398,114 +397,114 @@ function tt(e) {
398
397
  process.env.NODE_ENV !== "production" && (l.displayName = "ColorSchemeContext");
399
398
  const T = () => d.useContext(l) || g;
400
399
  function y(N) {
401
- var fe, Se, pe, ge, ye;
400
+ var ue, fe, pe, Se, ge;
402
401
  const {
403
402
  children: _,
404
403
  theme: D,
405
- modeStorageKey: j = n,
406
- colorSchemeStorageKey: s = f,
407
- disableTransitionOnChange: c = m,
404
+ modeStorageKey: j = s,
405
+ colorSchemeStorageKey: n = m,
406
+ disableTransitionOnChange: c = h,
408
407
  storageWindow: i = typeof window > "u" ? void 0 : window,
409
408
  documentNode: p = typeof document > "u" ? void 0 : document,
410
409
  colorSchemeNode: C = typeof document > "u" ? void 0 : document.documentElement,
411
410
  disableNestedContext: K = !1,
412
- disableStyleSheetGeneration: Ne = !1
413
- } = N, R = d.useRef(!1), F = Q(), H = d.useContext(l), W = !!H && !K, ee = d.useMemo(() => D || (typeof o == "function" ? o() : o), [D]), te = ee[t], {
411
+ disableStyleSheetGeneration: we = !1
412
+ } = N, R = d.useRef(!1), W = z(), F = d.useContext(l), H = !!F && !K, Z = d.useMemo(() => D || (typeof o == "function" ? o() : o), [D]), ee = Z[t], {
414
413
  colorSchemes: w = {},
415
- components: we = {},
416
- cssVarPrefix: oe,
414
+ components: $e = {},
415
+ cssVarPrefix: te,
417
416
  ...b
418
- } = te || ee, re = Object.keys(w).filter((h) => !!w[h]).join(","), P = d.useMemo(() => re.split(","), [re]), ne = typeof r == "string" ? r : r.light, se = typeof r == "string" ? r : r.dark, $e = w[ne] && w[se] ? "system" : ((Se = (fe = w[b.defaultColorScheme]) == null ? void 0 : fe.palette) == null ? void 0 : Se.mode) || ((pe = b.palette) == null ? void 0 : pe.mode), {
419
- mode: _e,
420
- setMode: ce,
421
- systemMode: ie,
422
- lightColorScheme: de,
423
- darkColorScheme: le,
424
- colorScheme: De,
425
- setColorScheme: ae
417
+ } = ee || Z, oe = Object.keys(w).filter((u) => !!w[u]).join(","), P = d.useMemo(() => oe.split(","), [oe]), re = typeof r == "string" ? r : r.light, ne = typeof r == "string" ? r : r.dark, _e = w[re] && w[ne] ? "system" : ((fe = (ue = w[b.defaultColorScheme]) == null ? void 0 : ue.palette) == null ? void 0 : fe.mode) || ((pe = b.palette) == null ? void 0 : pe.mode), {
418
+ mode: De,
419
+ setMode: se,
420
+ systemMode: ce,
421
+ lightColorScheme: ie,
422
+ darkColorScheme: de,
423
+ colorScheme: Pe,
424
+ setColorScheme: le
426
425
  } = Ze({
427
426
  supportedColorSchemes: P,
428
- defaultLightColorScheme: ne,
429
- defaultDarkColorScheme: se,
427
+ defaultLightColorScheme: re,
428
+ defaultDarkColorScheme: ne,
430
429
  modeStorageKey: j,
431
- colorSchemeStorageKey: s,
432
- defaultMode: $e,
430
+ colorSchemeStorageKey: n,
431
+ defaultMode: _e,
433
432
  storageWindow: i
434
433
  });
435
- let G = _e, k = De;
436
- W && (G = H.mode, k = H.colorScheme);
437
- const me = k || b.defaultColorScheme, Pe = ((ge = b.generateThemeVars) == null ? void 0 : ge.call(b)) || b.vars, v = {
434
+ let G = De, k = Pe;
435
+ H && (G = F.mode, k = F.colorScheme);
436
+ const ae = k || b.defaultColorScheme, xe = ((Se = b.generateThemeVars) == null ? void 0 : Se.call(b)) || b.vars, v = {
438
437
  ...b,
439
- components: we,
438
+ components: $e,
440
439
  colorSchemes: w,
441
- cssVarPrefix: oe,
442
- vars: Pe
440
+ cssVarPrefix: te,
441
+ vars: xe
443
442
  };
444
- if (typeof v.generateSpacing == "function" && (v.spacing = v.generateSpacing()), me) {
445
- const h = w[me];
446
- h && typeof h == "object" && Object.keys(h).forEach((u) => {
447
- h[u] && typeof h[u] == "object" ? v[u] = {
448
- ...v[u],
449
- ...h[u]
450
- } : v[u] = h[u];
443
+ if (typeof v.generateSpacing == "function" && (v.spacing = v.generateSpacing()), ae) {
444
+ const u = w[ae];
445
+ u && typeof u == "object" && Object.keys(u).forEach((f) => {
446
+ u[f] && typeof u[f] == "object" ? v[f] = {
447
+ ...v[f],
448
+ ...u[f]
449
+ } : v[f] = u[f];
451
450
  });
452
451
  }
453
452
  const V = b.colorSchemeSelector;
454
453
  d.useEffect(() => {
455
454
  if (k && C && V && V !== "media") {
456
- const h = V;
457
- let u = V;
458
- if (h === "class" && (u = ".%s"), h === "data" && (u = "[data-%s]"), h != null && h.startsWith("data-") && !h.includes("%s") && (u = `[${h}="%s"]`), u.startsWith("."))
459
- C.classList.remove(...P.map((I) => u.substring(1).replace("%s", I))), C.classList.add(u.substring(1).replace("%s", k));
455
+ const u = V;
456
+ let f = V;
457
+ if (u === "class" && (f = ".%s"), u === "data" && (f = "[data-%s]"), u != null && u.startsWith("data-") && !u.includes("%s") && (f = `[${u}="%s"]`), f.startsWith("."))
458
+ C.classList.remove(...P.map((I) => f.substring(1).replace("%s", I))), C.classList.add(f.substring(1).replace("%s", k));
460
459
  else {
461
- const I = u.replace("%s", k).match(/\[([^\]]+)\]/);
460
+ const I = f.replace("%s", k).match(/\[([^\]]+)\]/);
462
461
  if (I) {
463
- const [Ce, U] = I[1].split("=");
464
- U || P.forEach((Ve) => {
465
- C.removeAttribute(Ce.replace(k, Ve));
466
- }), C.setAttribute(Ce, U ? U.replace(/"|'/g, "") : "");
462
+ const [ye, U] = I[1].split("=");
463
+ U || P.forEach((Oe) => {
464
+ C.removeAttribute(ye.replace(k, Oe));
465
+ }), C.setAttribute(ye, U ? U.replace(/"|'/g, "") : "");
467
466
  } else
468
- C.setAttribute(u, k);
467
+ C.setAttribute(f, k);
469
468
  }
470
469
  }
471
470
  }, [k, V, C, P]), d.useEffect(() => {
472
- let h;
471
+ let u;
473
472
  if (c && R.current && p) {
474
- const u = p.createElement("style");
475
- u.appendChild(p.createTextNode(et)), p.head.appendChild(u), window.getComputedStyle(p.body), h = setTimeout(() => {
476
- p.head.removeChild(u);
473
+ const f = p.createElement("style");
474
+ f.appendChild(p.createTextNode(et)), p.head.appendChild(f), window.getComputedStyle(p.body), u = setTimeout(() => {
475
+ p.head.removeChild(f);
477
476
  }, 1);
478
477
  }
479
478
  return () => {
480
- clearTimeout(h);
479
+ clearTimeout(u);
481
480
  };
482
481
  }, [k, c, p]), d.useEffect(() => (R.current = !0, () => {
483
482
  R.current = !1;
484
483
  }), []);
485
- const xe = d.useMemo(() => ({
484
+ const Ve = d.useMemo(() => ({
486
485
  allColorSchemes: P,
487
486
  colorScheme: k,
488
- darkColorScheme: le,
489
- lightColorScheme: de,
487
+ darkColorScheme: de,
488
+ lightColorScheme: ie,
490
489
  mode: G,
491
- setColorScheme: ae,
492
- setMode: ce,
493
- systemMode: ie
494
- }), [P, k, le, de, G, ae, ce, ie]);
495
- let he = !0;
496
- (Ne || b.cssVariables === !1 || W && (F == null ? void 0 : F.cssVarPrefix) === oe) && (he = !1);
497
- const ue = /* @__PURE__ */ Oe(d.Fragment, {
490
+ setColorScheme: le,
491
+ setMode: se,
492
+ systemMode: ce
493
+ }), [P, k, de, ie, G, le, se, ce]);
494
+ let me = !0;
495
+ (we || b.cssVariables === !1 || H && (W == null ? void 0 : W.cssVarPrefix) === te) && (me = !1);
496
+ const he = /* @__PURE__ */ je(d.Fragment, {
498
497
  children: [/* @__PURE__ */ S(O, {
499
- themeId: te ? t : void 0,
498
+ themeId: ee ? t : void 0,
500
499
  theme: E ? E(v) : v,
501
500
  children: _
502
- }), he && /* @__PURE__ */ S(Ue, {
503
- styles: ((ye = v.generateStyleSheets) == null ? void 0 : ye.call(v)) || []
501
+ }), me && /* @__PURE__ */ S(Ue, {
502
+ styles: ((ge = v.generateStyleSheets) == null ? void 0 : ge.call(v)) || []
504
503
  })]
505
504
  });
506
- return W ? ue : /* @__PURE__ */ S(l.Provider, {
507
- value: xe,
508
- children: ue
505
+ return H ? he : /* @__PURE__ */ S(l.Provider, {
506
+ value: Ve,
507
+ children: he
509
508
  });
510
509
  }
511
510
  process.env.NODE_ENV !== "production" && (y.propTypes = {
@@ -558,15 +557,15 @@ function tt(e) {
558
557
  CssVarsProvider: y,
559
558
  useColorScheme: T,
560
559
  getInitColorSchemeScript: (N) => Je({
561
- colorSchemeStorageKey: f,
560
+ colorSchemeStorageKey: m,
562
561
  defaultLightColorScheme: M,
563
562
  defaultDarkColorScheme: $,
564
- modeStorageKey: n,
563
+ modeStorageKey: s,
565
564
  ...N
566
565
  })
567
566
  };
568
567
  }
569
- function ve({
568
+ function ke({
570
569
  theme: e,
571
570
  ...t
572
571
  }) {
@@ -590,7 +589,7 @@ const L = {
590
589
  } = tt({
591
590
  themeId: x,
592
591
  // @ts-ignore ignore module augmentation tests
593
- theme: () => Ke({
592
+ theme: () => ve({
594
593
  cssVariables: !0
595
594
  }),
596
595
  colorSchemeStorageKey: L.colorSchemeStorageKey,
@@ -604,9 +603,9 @@ const L = {
604
603
  ...e,
605
604
  typography: Re(e.palette, e.typography)
606
605
  };
607
- return t.unstable_sx = function(n) {
608
- return Fe({
609
- sx: n,
606
+ return t.unstable_sx = function(s) {
607
+ return We({
608
+ sx: s,
610
609
  theme: this
611
610
  });
612
611
  }, t;
@@ -616,21 +615,21 @@ function nt({
616
615
  theme: e,
617
616
  ...t
618
617
  }) {
619
- return typeof e == "function" ? /* @__PURE__ */ S(ve, {
618
+ return typeof e == "function" ? /* @__PURE__ */ S(ke, {
620
619
  theme: e,
621
620
  ...t
622
621
  }) : "colorSchemes" in (x in e ? e[x] : e) ? /* @__PURE__ */ S(rt, {
623
622
  theme: e,
624
623
  ...t
625
- }) : /* @__PURE__ */ S(ve, {
624
+ }) : /* @__PURE__ */ S(ke, {
626
625
  theme: e,
627
626
  ...t
628
627
  });
629
628
  }
630
- const St = (e) => ({
629
+ const st = ve(), pt = (e) => ({
631
630
  theme: o,
632
- ...n
633
- }) => o ? /* @__PURE__ */ S(B, { injectFirst: !0, children: /* @__PURE__ */ S(nt, { theme: o, children: /* @__PURE__ */ S(e, { ...n }) }) }) : /* @__PURE__ */ S(B, { injectFirst: !0, children: /* @__PURE__ */ S(e, { ...n }) });
631
+ ...s
632
+ }) => /* @__PURE__ */ S(Me, { injectFirst: !0, children: /* @__PURE__ */ S(nt, { theme: o || st, children: /* @__PURE__ */ S(e, { ...s }) }) });
634
633
  export {
635
- St as default
634
+ pt as default
636
635
  };