@college-africa/chat-ui 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +157 -163
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ys=Object.defineProperty;var gs=(t,n,i)=>n in t?ys(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;var Pt=(t,n,i)=>gs(t,typeof n!="symbol"?n+"":n,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),ue=require("react"),X=require("@mui/material"),vs=require("sdk"),bs=require("@emotion/styled");require("@emotion/react");function ws(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const jt=ws(ue);let lt=null;async function ta(t,n){if(lt)throw new Error("SDK already initialized. Call disconnectSDK() first to reinitialize.");return lt=new vs.ChatSDK(t),n&&await lt.setAuthToken(n),await lt.connect(),lt}function xt(){if(!lt)throw new Error("SDK not initialized. Call initSDK() first.");return lt}function So(){lt&&(lt.disconnect(),lt=null)}function xs(){return lt!==null}const Ss=()=>B.jsx(X.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",children:B.jsx(X.CircularProgress,{})}),_s=({error:t,retry:n})=>B.jsx(X.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",p:2,children:B.jsxs(X.Alert,{severity:"error",action:B.jsx(
|
|
1
|
+
"use strict";var ys=Object.defineProperty;var gs=(t,n,i)=>n in t?ys(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;var Pt=(t,n,i)=>gs(t,typeof n!="symbol"?n+"":n,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react/jsx-runtime"),ue=require("react"),X=require("@mui/material"),vs=require("sdk"),bs=require("@emotion/styled");require("@emotion/react");function ws(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const jt=ws(ue);let lt=null;async function ta(t,n){if(lt)throw new Error("SDK already initialized. Call disconnectSDK() first to reinitialize.");return lt=new vs.ChatSDK(t),n&&await lt.setAuthToken(n),await lt.connect(),lt}function xt(){if(!lt)throw new Error("SDK not initialized. Call initSDK() first.");return lt}function So(){lt&&(lt.disconnect(),lt=null)}function xs(){return lt!==null}const Ss=()=>B.jsx(X.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",children:B.jsx(X.CircularProgress,{})}),_s=({error:t,retry:n})=>B.jsx(X.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",p:2,children:B.jsxs(X.Alert,{severity:"error",action:B.jsx(X.Button,{onClick:n,children:" Retry"}),children:[B.jsx(X.AlertTitle,{children:"Failed to initialize chat"}),t.message]})}),Cs=({config:t,token:n,getToken:i,children:s,LoadingComponent:c=Ss,ErrorComponent:f=_s})=>{const[h,m]=ue.useState(!1),[T,_]=ue.useState(null),R=ue.useCallback(async()=>{m(!1),_(null);try{So();let A=n??t.authToken;if(i&&!A&&(A=await i()),!A)return;await ta(t,A),m(!0)}catch(A){_(A instanceof Error?A:new Error("Unknown error initializing SDK"))}},[t,n,i]);return ue.useEffect(()=>(R(),()=>{So()}),[t.baseURL,n,i]),!h&&!T?B.jsx(c,{}):T?B.jsx(f,{error:T,retry:R}):B.jsx(B.Fragment,{children:s})},vi=t=>t,Es=()=>{let t=vi;return{configure(n){t=n},generate(n){return t(n)},reset(){t=vi}}},Ts=Es();function Yt(t,...n){const i=new URL(`https://mui.com/production-error/?code=${t}`);return n.forEach(s=>i.searchParams.append("args[]",s)),`Minified MUI error #${t}; visit ${i} for the full message.`}function Gt(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Yt(7));return t.charAt(0).toUpperCase()+t.slice(1)}var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var on={exports:{}},an={exports:{}},Oe={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var $t = (t, n, i) =>
|
|
4
|
-
import { jsx as B, Fragment as
|
|
1
|
+
var _s = Object.defineProperty;
|
|
2
|
+
var Ss = (t, n, i) => n in t ? _s(t, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[n] = i;
|
|
3
|
+
var $t = (t, n, i) => Ss(t, typeof n != "symbol" ? n + "" : n, i);
|
|
4
|
+
import { jsx as B, Fragment as xs, jsxs as We } from "react/jsx-runtime";
|
|
5
5
|
import * as jt from "react";
|
|
6
|
-
import Qt, { useState as Ze, useCallback as Dt, useEffect as xt, useRef as pt, useLayoutEffect as
|
|
7
|
-
import { Box as Me, CircularProgress as Mo, Alert as Nr, AlertTitle as
|
|
6
|
+
import Qt, { useState as Ze, useCallback as Dt, useEffect as xt, useRef as pt, useLayoutEffect as Cs, Component as Es } from "react";
|
|
7
|
+
import { Box as Me, CircularProgress as Mo, Alert as Nr, AlertTitle as Ts, Button as da, ListItem as pa, ListItemButton as ks, ListItemAvatar as ha, Badge as ma, Avatar as jo, ListItemText as ya, Typography as rt, Skeleton as yr, AppBar as ga, Toolbar as va, List as Ei, IconButton as ba, Chip as Os, Paper as As, TextField as Ps } from "@mui/material";
|
|
8
8
|
import { ChatSDK as Rs } from "sdk";
|
|
9
9
|
import Is from "@emotion/styled";
|
|
10
10
|
import "@emotion/react";
|
|
@@ -47,17 +47,10 @@ const Ds = () => /* @__PURE__ */ B(
|
|
|
47
47
|
alignItems: "center",
|
|
48
48
|
height: "100vh",
|
|
49
49
|
p: 2,
|
|
50
|
-
children: /* @__PURE__ */ We(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
action: /* @__PURE__ */ B("button", { onClick: n, style: { cursor: "pointer" }, children: "Retry" }),
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ B(Es, { children: "Failed to initialize chat" }),
|
|
57
|
-
t.message
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
)
|
|
50
|
+
children: /* @__PURE__ */ We(Nr, { severity: "error", action: /* @__PURE__ */ B(da, { onClick: n, children: " Retry" }), children: [
|
|
51
|
+
/* @__PURE__ */ B(Ts, { children: "Failed to initialize chat" }),
|
|
52
|
+
t.message
|
|
53
|
+
] })
|
|
61
54
|
}
|
|
62
55
|
), nf = ({
|
|
63
56
|
config: t,
|
|
@@ -71,8 +64,9 @@ const Ds = () => /* @__PURE__ */ B(
|
|
|
71
64
|
m(!1), C(null);
|
|
72
65
|
try {
|
|
73
66
|
Ti();
|
|
74
|
-
let A = n;
|
|
75
|
-
i && !A && (A = await i()),
|
|
67
|
+
let A = n ?? t.authToken;
|
|
68
|
+
if (i && !A && (A = await i()), !A) return;
|
|
69
|
+
await $s(t, A), m(!0);
|
|
76
70
|
} catch (A) {
|
|
77
71
|
C(
|
|
78
72
|
A instanceof Error ? A : new Error("Unknown error initializing SDK")
|
|
@@ -81,7 +75,7 @@ const Ds = () => /* @__PURE__ */ B(
|
|
|
81
75
|
}, [t, n, i]);
|
|
82
76
|
return xt(() => (R(), () => {
|
|
83
77
|
Ti();
|
|
84
|
-
}), [t.baseURL, n, i]), !h && !T ? /* @__PURE__ */ B(c, {}) : T ? /* @__PURE__ */ B(f, { error: T, retry: R }) : /* @__PURE__ */ B(
|
|
78
|
+
}), [t.baseURL, n, i]), !h && !T ? /* @__PURE__ */ B(c, {}) : T ? /* @__PURE__ */ B(f, { error: T, retry: R }) : /* @__PURE__ */ B(xs, { children: s });
|
|
85
79
|
}, ki = (t) => t, js = () => {
|
|
86
80
|
let t = ki;
|
|
87
81
|
return {
|
|
@@ -106,7 +100,7 @@ function er(t) {
|
|
|
106
100
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
107
101
|
}
|
|
108
102
|
var Ns = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
109
|
-
function
|
|
103
|
+
function wa(t) {
|
|
110
104
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
111
105
|
}
|
|
112
106
|
var pn = { exports: {} }, hn = { exports: {} }, Te = {};
|
|
@@ -277,7 +271,7 @@ function Fs() {
|
|
|
277
271
|
})()), ke;
|
|
278
272
|
}
|
|
279
273
|
var Pi;
|
|
280
|
-
function
|
|
274
|
+
function _a() {
|
|
281
275
|
return Pi || (Pi = 1, process.env.NODE_ENV === "production" ? hn.exports = Ks() : hn.exports = Fs()), hn.exports;
|
|
282
276
|
}
|
|
283
277
|
/*
|
|
@@ -339,7 +333,7 @@ function Bo() {
|
|
|
339
333
|
return _o = t, _o;
|
|
340
334
|
}
|
|
341
335
|
var So, $i;
|
|
342
|
-
function
|
|
336
|
+
function Sa() {
|
|
343
337
|
return $i || ($i = 1, So = Function.call.bind(Object.prototype.hasOwnProperty)), So;
|
|
344
338
|
}
|
|
345
339
|
var xo, Di;
|
|
@@ -349,7 +343,7 @@ function Ls() {
|
|
|
349
343
|
var t = function() {
|
|
350
344
|
};
|
|
351
345
|
if (process.env.NODE_ENV !== "production") {
|
|
352
|
-
var n = /* @__PURE__ */ Bo(), i = {}, s = /* @__PURE__ */
|
|
346
|
+
var n = /* @__PURE__ */ Bo(), i = {}, s = /* @__PURE__ */ Sa();
|
|
353
347
|
t = function(f) {
|
|
354
348
|
var h = "Warning: " + f;
|
|
355
349
|
typeof console < "u" && console.error(h);
|
|
@@ -395,7 +389,7 @@ var Co, Mi;
|
|
|
395
389
|
function Vs() {
|
|
396
390
|
if (Mi) return Co;
|
|
397
391
|
Mi = 1;
|
|
398
|
-
var t =
|
|
392
|
+
var t = _a(), n = qs(), i = /* @__PURE__ */ Bo(), s = /* @__PURE__ */ Sa(), c = /* @__PURE__ */ Ls(), f = function() {
|
|
399
393
|
};
|
|
400
394
|
process.env.NODE_ENV !== "production" && (f = function(m) {
|
|
401
395
|
var T = "Warning: " + m;
|
|
@@ -764,25 +758,25 @@ var Bi;
|
|
|
764
758
|
function Ws() {
|
|
765
759
|
if (Bi) return pn.exports;
|
|
766
760
|
if (Bi = 1, process.env.NODE_ENV !== "production") {
|
|
767
|
-
var t =
|
|
761
|
+
var t = _a(), n = !0;
|
|
768
762
|
pn.exports = /* @__PURE__ */ Vs()(t.isElement, n);
|
|
769
763
|
} else
|
|
770
764
|
pn.exports = /* @__PURE__ */ zs()();
|
|
771
765
|
return pn.exports;
|
|
772
766
|
}
|
|
773
767
|
var Us = /* @__PURE__ */ Ws();
|
|
774
|
-
const Ce = /* @__PURE__ */
|
|
775
|
-
function
|
|
768
|
+
const Ce = /* @__PURE__ */ wa(Us);
|
|
769
|
+
function xa(t) {
|
|
776
770
|
var n, i, s = "";
|
|
777
771
|
if (typeof t == "string" || typeof t == "number") s += t;
|
|
778
772
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
779
773
|
var c = t.length;
|
|
780
|
-
for (n = 0; n < c; n++) t[n] && (i =
|
|
774
|
+
for (n = 0; n < c; n++) t[n] && (i = xa(t[n])) && (s && (s += " "), s += i);
|
|
781
775
|
} else for (i in t) t[i] && (s && (s += " "), s += i);
|
|
782
776
|
return s;
|
|
783
777
|
}
|
|
784
|
-
function
|
|
785
|
-
for (var t, n, i = 0, s = "", c = arguments.length; i < c; i++) (t = arguments[i]) && (n =
|
|
778
|
+
function Ca() {
|
|
779
|
+
for (var t, n, i = 0, s = "", c = arguments.length; i < c; i++) (t = arguments[i]) && (n = xa(t)) && (s && (s += " "), s += n);
|
|
786
780
|
return s;
|
|
787
781
|
}
|
|
788
782
|
function Ys(t, n, i = void 0) {
|
|
@@ -957,12 +951,12 @@ function St(t) {
|
|
|
957
951
|
const n = Object.getPrototypeOf(t);
|
|
958
952
|
return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
|
959
953
|
}
|
|
960
|
-
function
|
|
954
|
+
function Ea(t) {
|
|
961
955
|
if (/* @__PURE__ */ jt.isValidElement(t) || bn.isValidElementType(t) || !St(t))
|
|
962
956
|
return t;
|
|
963
957
|
const n = {};
|
|
964
958
|
return Object.keys(t).forEach((i) => {
|
|
965
|
-
n[i] =
|
|
959
|
+
n[i] = Ea(t[i]);
|
|
966
960
|
}), n;
|
|
967
961
|
}
|
|
968
962
|
function ut(t, n, i = {
|
|
@@ -973,7 +967,7 @@ function ut(t, n, i = {
|
|
|
973
967
|
} : t;
|
|
974
968
|
return St(t) && St(n) && Object.keys(n).forEach((c) => {
|
|
975
969
|
/* @__PURE__ */ jt.isValidElement(n[c]) || bn.isValidElementType(n[c]) ? s[c] = n[c] : St(n[c]) && // Avoid prototype pollution
|
|
976
|
-
Object.prototype.hasOwnProperty.call(t, c) && St(t[c]) ? s[c] = ut(t[c], n[c], i) : i.clone ? s[c] = St(n[c]) ?
|
|
970
|
+
Object.prototype.hasOwnProperty.call(t, c) && St(t[c]) ? s[c] = ut(t[c], n[c], i) : i.clone ? s[c] = St(n[c]) ? Ea(n[c]) : n[c] : s[c] = n[c];
|
|
977
971
|
}), s;
|
|
978
972
|
}
|
|
979
973
|
function jr(t, n) {
|
|
@@ -1183,17 +1177,17 @@ function uu(t, n, i, s) {
|
|
|
1183
1177
|
const c = iu(i), f = su(c, s), h = t[i];
|
|
1184
1178
|
return Ct(t, h, f);
|
|
1185
1179
|
}
|
|
1186
|
-
function
|
|
1180
|
+
function Ta(t, n) {
|
|
1187
1181
|
const i = No(t.theme);
|
|
1188
1182
|
return Object.keys(t).map((s) => uu(t, n, s, i)).reduce(jr, {});
|
|
1189
1183
|
}
|
|
1190
1184
|
function Ve(t) {
|
|
1191
|
-
return
|
|
1185
|
+
return Ta(t, Tn);
|
|
1192
1186
|
}
|
|
1193
1187
|
Ve.propTypes = process.env.NODE_ENV !== "production" ? Tn.reduce((t, n) => (t[n] = Kt, t), {}) : {};
|
|
1194
1188
|
Ve.filterProps = Tn;
|
|
1195
1189
|
function ze(t) {
|
|
1196
|
-
return
|
|
1190
|
+
return Ta(t, kn);
|
|
1197
1191
|
}
|
|
1198
1192
|
ze.propTypes = process.env.NODE_ENV !== "production" ? kn.reduce((t, n) => (t[n] = Kt, t), {}) : {};
|
|
1199
1193
|
ze.filterProps = kn;
|
|
@@ -1805,12 +1799,12 @@ function zu(t) {
|
|
|
1805
1799
|
return n[i] === void 0 && (n[i] = t(i)), n[i];
|
|
1806
1800
|
};
|
|
1807
1801
|
}
|
|
1808
|
-
var Wu = /[A-Z]|^ms/g, Uu = /_EMO_([^_]+?)_([^]*?)_EMO_/g,
|
|
1802
|
+
var Wu = /[A-Z]|^ms/g, Uu = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ka = function(n) {
|
|
1809
1803
|
return n.charCodeAt(1) === 45;
|
|
1810
1804
|
}, Wi = function(n) {
|
|
1811
1805
|
return n != null && typeof n != "boolean";
|
|
1812
1806
|
}, To = /* @__PURE__ */ zu(function(t) {
|
|
1813
|
-
return
|
|
1807
|
+
return ka(t) ? t : t.replace(Wu, "-$&").toLowerCase();
|
|
1814
1808
|
}), Ui = function(n, i) {
|
|
1815
1809
|
switch (n) {
|
|
1816
1810
|
case "animation":
|
|
@@ -1824,7 +1818,7 @@ var Wu = /[A-Z]|^ms/g, Uu = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Ta = function(n) {
|
|
|
1824
1818
|
}, c;
|
|
1825
1819
|
});
|
|
1826
1820
|
}
|
|
1827
|
-
return Vu[n] !== 1 && !
|
|
1821
|
+
return Vu[n] !== 1 && !ka(n) && typeof i == "number" && i !== 0 ? i + "px" : i;
|
|
1828
1822
|
};
|
|
1829
1823
|
function _n(t, n, i) {
|
|
1830
1824
|
if (i == null)
|
|
@@ -2003,7 +1997,7 @@ function Ju(t) {
|
|
|
2003
1997
|
const Zu = {
|
|
2004
1998
|
borderRadius: 4
|
|
2005
1999
|
};
|
|
2006
|
-
function
|
|
2000
|
+
function Oa(t = 8, n = No({
|
|
2007
2001
|
spacing: t
|
|
2008
2002
|
})) {
|
|
2009
2003
|
if (t.mui)
|
|
@@ -2027,14 +2021,14 @@ function ec(t, n) {
|
|
|
2027
2021
|
}
|
|
2028
2022
|
return i.palette.mode === t ? n : {};
|
|
2029
2023
|
}
|
|
2030
|
-
function
|
|
2024
|
+
function Aa(t = {}, ...n) {
|
|
2031
2025
|
const {
|
|
2032
2026
|
breakpoints: i = {},
|
|
2033
2027
|
palette: s = {},
|
|
2034
2028
|
spacing: c,
|
|
2035
2029
|
shape: f = {},
|
|
2036
2030
|
...h
|
|
2037
|
-
} = t, m = Ju(i), T =
|
|
2031
|
+
} = t, m = Ju(i), T = Oa(c);
|
|
2038
2032
|
let C = ut({
|
|
2039
2033
|
breakpoints: m,
|
|
2040
2034
|
direction: "ltr",
|
|
@@ -2084,11 +2078,11 @@ function rc(t, n, i = "Mui") {
|
|
|
2084
2078
|
s[c] = Fo(t, c, i);
|
|
2085
2079
|
}), s;
|
|
2086
2080
|
}
|
|
2087
|
-
function
|
|
2081
|
+
function Pa(t, n = "") {
|
|
2088
2082
|
return t.displayName || t.name || n;
|
|
2089
2083
|
}
|
|
2090
2084
|
function Hi(t, n, i) {
|
|
2091
|
-
const s =
|
|
2085
|
+
const s = Pa(n);
|
|
2092
2086
|
return t.displayName || (s !== "" ? `${i}(${s})` : i);
|
|
2093
2087
|
}
|
|
2094
2088
|
function nc(t) {
|
|
@@ -2096,7 +2090,7 @@ function nc(t) {
|
|
|
2096
2090
|
if (typeof t == "string")
|
|
2097
2091
|
return t;
|
|
2098
2092
|
if (typeof t == "function")
|
|
2099
|
-
return
|
|
2093
|
+
return Pa(t, "Component");
|
|
2100
2094
|
if (typeof t == "object")
|
|
2101
2095
|
switch (t.$$typeof) {
|
|
2102
2096
|
case bn.ForwardRef:
|
|
@@ -2108,7 +2102,7 @@ function nc(t) {
|
|
|
2108
2102
|
}
|
|
2109
2103
|
}
|
|
2110
2104
|
}
|
|
2111
|
-
function
|
|
2105
|
+
function Ra(t) {
|
|
2112
2106
|
const {
|
|
2113
2107
|
variants: n,
|
|
2114
2108
|
...i
|
|
@@ -2121,7 +2115,7 @@ function Pa(t) {
|
|
|
2121
2115
|
typeof c.style != "function" && (c.style = Jt(c.style));
|
|
2122
2116
|
}), s;
|
|
2123
2117
|
}
|
|
2124
|
-
const oc =
|
|
2118
|
+
const oc = Aa();
|
|
2125
2119
|
function ko(t) {
|
|
2126
2120
|
return t !== "ownerState" && t !== "theme" && t !== "sx" && t !== "as";
|
|
2127
2121
|
}
|
|
@@ -2149,11 +2143,11 @@ function gn(t, n, i) {
|
|
|
2149
2143
|
} = s;
|
|
2150
2144
|
c = i ? Xt(Jt(h), i) : h;
|
|
2151
2145
|
}
|
|
2152
|
-
return
|
|
2146
|
+
return Ia(t, s.variants, [c], i);
|
|
2153
2147
|
}
|
|
2154
2148
|
return s != null && s.isProcessed ? i ? Xt(Jt(s.style), i) : s.style : i ? Xt(Jt(s), i) : s;
|
|
2155
2149
|
}
|
|
2156
|
-
function
|
|
2150
|
+
function Ia(t, n, i = [], s = void 0) {
|
|
2157
2151
|
var f;
|
|
2158
2152
|
let c;
|
|
2159
2153
|
e: for (let h = 0; h < n.length; h += 1) {
|
|
@@ -2196,7 +2190,7 @@ function sc(t = {}) {
|
|
|
2196
2190
|
skipSx: $,
|
|
2197
2191
|
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
2198
2192
|
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
2199
|
-
overridesResolver: K = ic(
|
|
2193
|
+
overridesResolver: K = ic($a(R)),
|
|
2200
2194
|
...j
|
|
2201
2195
|
} = T, g = C && C.startsWith("Mui") || R ? "components" : "custom", z = A !== void 0 ? A : (
|
|
2202
2196
|
// TODO v6: remove `Root` in the next major release
|
|
@@ -2217,7 +2211,7 @@ function sc(t = {}) {
|
|
|
2217
2211
|
return gn(Oe, Z, Oe.theme.modularCssLayers ? g : void 0);
|
|
2218
2212
|
};
|
|
2219
2213
|
if (St(Z)) {
|
|
2220
|
-
const fe =
|
|
2214
|
+
const fe = Ra(Z);
|
|
2221
2215
|
return function(Ne) {
|
|
2222
2216
|
return fe.variants ? gn(Ne, fe, Ne.theme.modularCssLayers ? g : void 0) : Ne.theme.modularCssLayers ? Xt(fe.style, g) : fe.style;
|
|
2223
2217
|
};
|
|
@@ -2237,7 +2231,7 @@ function sc(t = {}) {
|
|
|
2237
2231
|
}), C && !z && Ne.push(function(te) {
|
|
2238
2232
|
var he, Fe;
|
|
2239
2233
|
const G = te.theme, ce = (Fe = (he = G == null ? void 0 : G.components) == null ? void 0 : he[C]) == null ? void 0 : Fe.variants;
|
|
2240
|
-
return ce ?
|
|
2234
|
+
return ce ? Ia(te, ce, [], te.theme.modularCssLayers ? "theme" : void 0) : null;
|
|
2241
2235
|
}), X || Ne.push(vr), Array.isArray(Oe[0])) {
|
|
2242
2236
|
const y = Oe.shift(), te = new Array(fe.length).fill(""), G = new Array(Ne.length).fill("");
|
|
2243
2237
|
let ce;
|
|
@@ -2254,7 +2248,7 @@ function uc(t, n, i) {
|
|
|
2254
2248
|
}
|
|
2255
2249
|
function cc(t, n) {
|
|
2256
2250
|
let i;
|
|
2257
|
-
return process.env.NODE_ENV !== "production" && t && (i = `${t}-${
|
|
2251
|
+
return process.env.NODE_ENV !== "production" && t && (i = `${t}-${$a(n || "Root")}`), i;
|
|
2258
2252
|
}
|
|
2259
2253
|
function lc(t) {
|
|
2260
2254
|
for (const n in t)
|
|
@@ -2267,7 +2261,7 @@ function fc(t) {
|
|
|
2267
2261
|
// it's a lowercase character
|
|
2268
2262
|
t.charCodeAt(0) > 96;
|
|
2269
2263
|
}
|
|
2270
|
-
function
|
|
2264
|
+
function $a(t) {
|
|
2271
2265
|
return t && t.charAt(0).toLowerCase() + t.slice(1);
|
|
2272
2266
|
}
|
|
2273
2267
|
function Po(t, n, i = !1) {
|
|
@@ -2298,7 +2292,7 @@ function Po(t, n, i = !1) {
|
|
|
2298
2292
|
s[f][C] = Po(h[C], m[C], i);
|
|
2299
2293
|
}
|
|
2300
2294
|
}
|
|
2301
|
-
} else f === "className" && i && n.className ? s.className =
|
|
2295
|
+
} else f === "className" && i && n.className ? s.className = Ca(t == null ? void 0 : t.className, n == null ? void 0 : n.className) : f === "style" && i && n.style ? s.style = {
|
|
2302
2296
|
...t == null ? void 0 : t.style,
|
|
2303
2297
|
...n == null ? void 0 : n.style
|
|
2304
2298
|
} : s[f] === void 0 && (s[f] = t[f]);
|
|
@@ -2359,7 +2353,7 @@ function Dn(t) {
|
|
|
2359
2353
|
} = t;
|
|
2360
2354
|
return n.includes("rgb") ? s = s.map((c, f) => f < 3 ? parseInt(c, 10) : c) : n.includes("hsl") && (s[1] = `${s[1]}%`, s[2] = `${s[2]}%`), n.includes("color") ? s = `${i} ${s.join(" ")}` : s = `${s.join(", ")}`, `${n}(${s})`;
|
|
2361
2355
|
}
|
|
2362
|
-
function
|
|
2356
|
+
function Da(t) {
|
|
2363
2357
|
t = Bt(t);
|
|
2364
2358
|
const {
|
|
2365
2359
|
values: n
|
|
@@ -2373,19 +2367,19 @@ function $a(t) {
|
|
|
2373
2367
|
}
|
|
2374
2368
|
function Ro(t) {
|
|
2375
2369
|
t = Bt(t);
|
|
2376
|
-
let n = t.type === "hsl" || t.type === "hsla" ? Bt(
|
|
2370
|
+
let n = t.type === "hsl" || t.type === "hsla" ? Bt(Da(t)).values : t.values;
|
|
2377
2371
|
return n = n.map((i) => (t.type !== "color" && (i /= 255), i <= 0.03928 ? i / 12.92 : ((i + 0.055) / 1.055) ** 2.4)), Number((0.2126 * n[0] + 0.7152 * n[1] + 0.0722 * n[2]).toFixed(3));
|
|
2378
2372
|
}
|
|
2379
2373
|
function Qi(t, n) {
|
|
2380
2374
|
const i = Ro(t), s = Ro(n);
|
|
2381
2375
|
return (Math.max(i, s) + 0.05) / (Math.min(i, s) + 0.05);
|
|
2382
2376
|
}
|
|
2383
|
-
function
|
|
2377
|
+
function Ma(t, n) {
|
|
2384
2378
|
return t = Bt(t), n = qo(n), (t.type === "rgb" || t.type === "hsl") && (t.type += "a"), t.type === "color" ? t.values[3] = `/${n}` : t.values[3] = n, Dn(t);
|
|
2385
2379
|
}
|
|
2386
2380
|
function Ht(t, n, i) {
|
|
2387
2381
|
try {
|
|
2388
|
-
return
|
|
2382
|
+
return Ma(t, n);
|
|
2389
2383
|
} catch {
|
|
2390
2384
|
return i && process.env.NODE_ENV !== "production" && console.warn(i), t;
|
|
2391
2385
|
}
|
|
@@ -2466,7 +2460,7 @@ function bc(t) {
|
|
|
2466
2460
|
let n, i;
|
|
2467
2461
|
return function(c) {
|
|
2468
2462
|
let f = n;
|
|
2469
|
-
return (f === void 0 || c.theme !== i) && (Xi.theme = c.theme, f =
|
|
2463
|
+
return (f === void 0 || c.theme !== i) && (Xi.theme = c.theme, f = Ra(t(Xi)), n = f, i = c.theme), f;
|
|
2470
2464
|
};
|
|
2471
2465
|
}
|
|
2472
2466
|
function wc(t = "") {
|
|
@@ -2700,7 +2694,7 @@ const Br = {
|
|
|
2700
2694
|
800: "#2e7d32",
|
|
2701
2695
|
900: "#1b5e20"
|
|
2702
2696
|
};
|
|
2703
|
-
function
|
|
2697
|
+
function ja() {
|
|
2704
2698
|
return {
|
|
2705
2699
|
// The colors used to style the text.
|
|
2706
2700
|
text: {
|
|
@@ -2740,8 +2734,8 @@ function Ma() {
|
|
|
2740
2734
|
}
|
|
2741
2735
|
};
|
|
2742
2736
|
}
|
|
2743
|
-
const
|
|
2744
|
-
function
|
|
2737
|
+
const Ba = ja();
|
|
2738
|
+
function Na() {
|
|
2745
2739
|
return {
|
|
2746
2740
|
text: {
|
|
2747
2741
|
primary: Br.white,
|
|
@@ -2769,7 +2763,7 @@ function Ba() {
|
|
|
2769
2763
|
}
|
|
2770
2764
|
};
|
|
2771
2765
|
}
|
|
2772
|
-
const Io =
|
|
2766
|
+
const Io = Na();
|
|
2773
2767
|
function Zi(t, n, i, s) {
|
|
2774
2768
|
const c = s.light || s, f = s.dark || s * 1.5;
|
|
2775
2769
|
t[n] || (t.hasOwnProperty(i) ? t[n] = t[i] : n === "light" ? t.light = jn(t.main, c) : n === "dark" && (t.dark = Mn(t.main, f)));
|
|
@@ -2859,7 +2853,7 @@ function Lo(t) {
|
|
|
2859
2853
|
function $(z) {
|
|
2860
2854
|
if (c)
|
|
2861
2855
|
return Ic(z);
|
|
2862
|
-
const X = Qi(z, Io.text.primary) >= i ? Io.text.primary :
|
|
2856
|
+
const X = Qi(z, Io.text.primary) >= i ? Io.text.primary : Ba.text.primary;
|
|
2863
2857
|
if (process.env.NODE_ENV !== "production") {
|
|
2864
2858
|
const ie = Qi(z, X);
|
|
2865
2859
|
ie < 3 && console.error([`MUI: The contrast ratio of ${ie}:1 for ${X} on ${z}`, "falls below the WCAG recommended absolute minimum contrast ratio of 3:1.", "https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
@@ -2897,7 +2891,7 @@ const theme2 = createTheme({ palette: {
|
|
|
2897
2891
|
return c ? (ea(c, z, "light", se, s), ea(c, z, "dark", W, s)) : (Zi(z, "light", se, s), Zi(z, "dark", W, s)), z.contrastText || (z.contrastText = $(z.main)), z;
|
|
2898
2892
|
};
|
|
2899
2893
|
let j;
|
|
2900
|
-
return n === "light" ? j =
|
|
2894
|
+
return n === "light" ? j = ja() : n === "dark" && (j = Na()), process.env.NODE_ENV !== "production" && (j || console.error(`MUI: The palette mode \`${n}\` is not supported.`)), ut({
|
|
2901
2895
|
// A collection of common colors.
|
|
2902
2896
|
common: {
|
|
2903
2897
|
...Br
|
|
@@ -3132,7 +3126,7 @@ const Wc = {
|
|
|
3132
3126
|
function Uc(t) {
|
|
3133
3127
|
return St(t) || typeof t > "u" || typeof t == "string" || typeof t == "boolean" || typeof t == "number" || Array.isArray(t);
|
|
3134
3128
|
}
|
|
3135
|
-
function
|
|
3129
|
+
function Ka(t = {}) {
|
|
3136
3130
|
const n = {
|
|
3137
3131
|
...t
|
|
3138
3132
|
};
|
|
@@ -3172,7 +3166,7 @@ function Gc(t) {
|
|
|
3172
3166
|
Object.assign(t, {
|
|
3173
3167
|
alpha(n, i) {
|
|
3174
3168
|
const s = this || t;
|
|
3175
|
-
return s.colorSpace ? `oklch(from ${n} l c h / ${typeof i == "string" ? `calc(${i})` : i})` : s.vars ? `rgba(${n.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g, "var(--$1Channel)")} / ${typeof i == "string" ? `calc(${i})` : i})` :
|
|
3169
|
+
return s.colorSpace ? `oklch(from ${n} l c h / ${typeof i == "string" ? `calc(${i})` : i})` : s.vars ? `rgba(${n.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g, "var(--$1Channel)")} / ${typeof i == "string" ? `calc(${i})` : i})` : Ma(n, Yc(i));
|
|
3176
3170
|
},
|
|
3177
3171
|
lighten(n, i) {
|
|
3178
3172
|
const s = this || t;
|
|
@@ -3203,7 +3197,7 @@ function $o(t = {}, ...n) {
|
|
|
3203
3197
|
const A = Lo({
|
|
3204
3198
|
...f,
|
|
3205
3199
|
colorSpace: C
|
|
3206
|
-
}), $ =
|
|
3200
|
+
}), $ = Aa(t);
|
|
3207
3201
|
let K = ut($, {
|
|
3208
3202
|
mixins: Dc($.breakpoints, s),
|
|
3209
3203
|
palette: A,
|
|
@@ -3247,7 +3241,7 @@ function $o(t = {}, ...n) {
|
|
|
3247
3241
|
sx: g,
|
|
3248
3242
|
theme: this
|
|
3249
3243
|
});
|
|
3250
|
-
}, K.toRuntimeSource =
|
|
3244
|
+
}, K.toRuntimeSource = Ka, Gc(K), K;
|
|
3251
3245
|
}
|
|
3252
3246
|
function Hc(t) {
|
|
3253
3247
|
let n;
|
|
@@ -3259,7 +3253,7 @@ const Qc = [...Array(25)].map((t, n) => {
|
|
|
3259
3253
|
const i = Hc(n);
|
|
3260
3254
|
return `linear-gradient(rgba(255 255 255 / ${i}), rgba(255 255 255 / ${i}))`;
|
|
3261
3255
|
});
|
|
3262
|
-
function
|
|
3256
|
+
function Fa(t) {
|
|
3263
3257
|
return {
|
|
3264
3258
|
inputPlaceholder: t === "dark" ? 0.5 : 0.42,
|
|
3265
3259
|
inputUnderline: t === "dark" ? 0.7 : 0.42,
|
|
@@ -3267,7 +3261,7 @@ function Ka(t) {
|
|
|
3267
3261
|
switchTrack: t === "dark" ? 0.3 : 0.38
|
|
3268
3262
|
};
|
|
3269
3263
|
}
|
|
3270
|
-
function
|
|
3264
|
+
function qa(t) {
|
|
3271
3265
|
return t === "dark" ? Qc : [];
|
|
3272
3266
|
}
|
|
3273
3267
|
function Xc(t) {
|
|
@@ -3287,10 +3281,10 @@ function Xc(t) {
|
|
|
3287
3281
|
return {
|
|
3288
3282
|
palette: h,
|
|
3289
3283
|
opacity: {
|
|
3290
|
-
...
|
|
3284
|
+
...Fa(h.mode),
|
|
3291
3285
|
...i
|
|
3292
3286
|
},
|
|
3293
|
-
overlays: s ||
|
|
3287
|
+
overlays: s || qa(h.mode),
|
|
3294
3288
|
...f
|
|
3295
3289
|
};
|
|
3296
3290
|
}
|
|
@@ -3345,7 +3339,7 @@ function D(t, n, i) {
|
|
|
3345
3339
|
!t[n] && i && (t[n] = i);
|
|
3346
3340
|
}
|
|
3347
3341
|
function Mr(t) {
|
|
3348
|
-
return typeof t != "string" || !t.startsWith("hsl") ? t :
|
|
3342
|
+
return typeof t != "string" || !t.startsWith("hsl") ? t : Da(t);
|
|
3349
3343
|
}
|
|
3350
3344
|
function _t(t, n) {
|
|
3351
3345
|
`${n}Channel` in t || (t[`${n}Channel`] = Dr(Mr(t[n]), `MUI: Can't create \`palette.${n}Channel\` because \`palette.${n}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
@@ -3391,10 +3385,10 @@ function Ao(t, n, i, s, c) {
|
|
|
3391
3385
|
...i,
|
|
3392
3386
|
palette: h,
|
|
3393
3387
|
opacity: {
|
|
3394
|
-
...
|
|
3388
|
+
...Fa(f),
|
|
3395
3389
|
...i == null ? void 0 : i.opacity
|
|
3396
3390
|
},
|
|
3397
|
-
overlays: (i == null ? void 0 : i.overlays) ||
|
|
3391
|
+
overlays: (i == null ? void 0 : i.overlays) || qa(f)
|
|
3398
3392
|
}, m;
|
|
3399
3393
|
}
|
|
3400
3394
|
function ol(t = {}, ...n) {
|
|
@@ -3460,7 +3454,7 @@ function ol(t = {}, ...n) {
|
|
|
3460
3454
|
if (y.mode === "dark") {
|
|
3461
3455
|
D(y.Alert, "errorColor", G(Re, y.error.light, 0.6)), D(y.Alert, "infoColor", G(Re, y.info.light, 0.6)), D(y.Alert, "successColor", G(Re, y.success.light, 0.6)), D(y.Alert, "warningColor", G(Re, y.warning.light, 0.6)), D(y.Alert, "errorFilledBg", te("palette-error-dark")), D(y.Alert, "infoFilledBg", te("palette-info-dark")), D(y.Alert, "successFilledBg", te("palette-success-dark")), D(y.Alert, "warningFilledBg", te("palette-warning-dark")), D(y.Alert, "errorFilledColor", vt(() => y.getContrastText(y.error.dark))), D(y.Alert, "infoFilledColor", vt(() => y.getContrastText(y.info.dark))), D(y.Alert, "successFilledColor", vt(() => y.getContrastText(y.success.dark))), D(y.Alert, "warningFilledColor", vt(() => y.getContrastText(y.warning.dark))), D(y.Alert, "errorStandardBg", G(Pe, y.error.light, 0.9)), D(y.Alert, "infoStandardBg", G(Pe, y.info.light, 0.9)), D(y.Alert, "successStandardBg", G(Pe, y.success.light, 0.9)), D(y.Alert, "warningStandardBg", G(Pe, y.warning.light, 0.9)), D(y.Alert, "errorIconColor", te("palette-error-main")), D(y.Alert, "infoIconColor", te("palette-info-main")), D(y.Alert, "successIconColor", te("palette-success-main")), D(y.Alert, "warningIconColor", te("palette-warning-main")), D(y.AppBar, "defaultBg", te("palette-grey-900")), D(y.AppBar, "darkBg", te("palette-background-paper")), D(y.AppBar, "darkColor", te("palette-text-primary")), D(y.Avatar, "defaultBg", te("palette-grey-600")), D(y.Button, "inheritContainedBg", te("palette-grey-800")), D(y.Button, "inheritContainedHoverBg", te("palette-grey-700")), D(y.Chip, "defaultBorder", te("palette-grey-700")), D(y.Chip, "defaultAvatarColor", te("palette-grey-300")), D(y.Chip, "defaultIconColor", te("palette-grey-300")), D(y.FilledInput, "bg", "rgba(255, 255, 255, 0.09)"), D(y.FilledInput, "hoverBg", "rgba(255, 255, 255, 0.13)"), D(y.FilledInput, "disabledBg", "rgba(255, 255, 255, 0.12)"), D(y.LinearProgress, "primaryBg", G(Pe, y.primary.main, 0.5)), D(y.LinearProgress, "secondaryBg", G(Pe, y.secondary.main, 0.5)), D(y.LinearProgress, "errorBg", G(Pe, y.error.main, 0.5)), D(y.LinearProgress, "infoBg", G(Pe, y.info.main, 0.5)), D(y.LinearProgress, "successBg", G(Pe, y.success.main, 0.5)), D(y.LinearProgress, "warningBg", G(Pe, y.warning.main, 0.5)), D(y.Skeleton, "bg", W ? G(Ht, y.text.primary, 0.13) : `rgba(${te("palette-text-primaryChannel")} / 0.13)`), D(y.Slider, "primaryTrack", G(Pe, y.primary.main, 0.5)), D(y.Slider, "secondaryTrack", G(Pe, y.secondary.main, 0.5)), D(y.Slider, "errorTrack", G(Pe, y.error.main, 0.5)), D(y.Slider, "infoTrack", G(Pe, y.info.main, 0.5)), D(y.Slider, "successTrack", G(Pe, y.success.main, 0.5)), D(y.Slider, "warningTrack", G(Pe, y.warning.main, 0.5));
|
|
3462
3456
|
const ce = W ? G(Re, y.background.default, 0.985) : yn(y.background.default, 0.98);
|
|
3463
|
-
D(y.SnackbarContent, "bg", ce), D(y.SnackbarContent, "color", vt(() => W ?
|
|
3457
|
+
D(y.SnackbarContent, "bg", ce), D(y.SnackbarContent, "color", vt(() => W ? Ba.text.primary : y.getContrastText(ce))), D(y.SpeedDialAction, "fabHoverBg", yn(y.background.paper, 0.15)), D(y.StepConnector, "border", te("palette-grey-600")), D(y.StepContent, "border", te("palette-grey-600")), D(y.Switch, "defaultColor", te("palette-grey-300")), D(y.Switch, "defaultDisabledColor", te("palette-grey-600")), D(y.Switch, "primaryDisabledColor", G(Pe, y.primary.main, 0.55)), D(y.Switch, "secondaryDisabledColor", G(Pe, y.secondary.main, 0.55)), D(y.Switch, "errorDisabledColor", G(Pe, y.error.main, 0.55)), D(y.Switch, "infoDisabledColor", G(Pe, y.info.main, 0.55)), D(y.Switch, "successDisabledColor", G(Pe, y.success.main, 0.55)), D(y.Switch, "warningDisabledColor", G(Pe, y.warning.main, 0.55)), D(y.TableCell, "border", G(Pe, G(Ht, y.divider, 1), 0.68)), D(y.Tooltip, "bg", G(Ht, y.grey[700], 0.92));
|
|
3464
3458
|
}
|
|
3465
3459
|
_t(y.background, "default"), _t(y.background, "paper"), _t(y.common, "background"), _t(y.common, "onBackground"), _t(y, "divider"), Object.keys(y).forEach((ce) => {
|
|
3466
3460
|
const he = y[ce];
|
|
@@ -3481,7 +3475,7 @@ function ol(t = {}, ...n) {
|
|
|
3481
3475
|
return Z.vars = Oe, Object.entries(Z.colorSchemes[Z.defaultColorScheme]).forEach(([Ae, y]) => {
|
|
3482
3476
|
Z[Ae] = y;
|
|
3483
3477
|
}), Z.generateThemeVars = Ne, Z.generateStyleSheets = nt, Z.generateSpacing = function() {
|
|
3484
|
-
return
|
|
3478
|
+
return Oa(R.spacing, No(this));
|
|
3485
3479
|
}, Z.getColorSchemeSelector = Cc(T), Z.spacing = Z.generateSpacing(), Z.shouldSkipGeneratingVar = m, Z.unstable_sxConfig = {
|
|
3486
3480
|
...$n,
|
|
3487
3481
|
...R == null ? void 0 : R.unstable_sxConfig
|
|
@@ -3490,7 +3484,7 @@ function ol(t = {}, ...n) {
|
|
|
3490
3484
|
sx: y,
|
|
3491
3485
|
theme: this
|
|
3492
3486
|
});
|
|
3493
|
-
}, Z.toRuntimeSource =
|
|
3487
|
+
}, Z.toRuntimeSource = Ka, Z;
|
|
3494
3488
|
}
|
|
3495
3489
|
function ia(t, n, i) {
|
|
3496
3490
|
t.colorSchemes && i && (t.colorSchemes[n] = {
|
|
@@ -3502,7 +3496,7 @@ function ia(t, n, i) {
|
|
|
3502
3496
|
// cast type to skip module augmentation test
|
|
3503
3497
|
});
|
|
3504
3498
|
}
|
|
3505
|
-
function
|
|
3499
|
+
function La(t = {}, ...n) {
|
|
3506
3500
|
const {
|
|
3507
3501
|
palette: i,
|
|
3508
3502
|
cssVariables: s = !1,
|
|
@@ -3546,7 +3540,7 @@ function qa(t = {}, ...n) {
|
|
|
3546
3540
|
...typeof s != "boolean" && s
|
|
3547
3541
|
}, ...n);
|
|
3548
3542
|
}
|
|
3549
|
-
const il =
|
|
3543
|
+
const il = La(), al = "$$material";
|
|
3550
3544
|
function sl(t) {
|
|
3551
3545
|
return t !== "ownerState" && t !== "theme" && t !== "sx" && t !== "as";
|
|
3552
3546
|
}
|
|
@@ -3702,7 +3696,7 @@ const pl = (t) => {
|
|
|
3702
3696
|
const X = pl(g);
|
|
3703
3697
|
return /* @__PURE__ */ We(hl, {
|
|
3704
3698
|
as: m,
|
|
3705
|
-
className:
|
|
3699
|
+
className: Ca(X.root, f),
|
|
3706
3700
|
focusable: "false",
|
|
3707
3701
|
color: C,
|
|
3708
3702
|
"aria-hidden": A ? void 0 : !0,
|
|
@@ -3807,9 +3801,9 @@ const ml = Et(/* @__PURE__ */ B("path", {
|
|
|
3807
3801
|
d: "M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"
|
|
3808
3802
|
}), "Done"), gl = Et(/* @__PURE__ */ B("path", {
|
|
3809
3803
|
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
3810
|
-
}), "ErrorOutline"),
|
|
3804
|
+
}), "ErrorOutline"), Va = Et(/* @__PURE__ */ B("path", {
|
|
3811
3805
|
d: "M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"
|
|
3812
|
-
}), "Group"),
|
|
3806
|
+
}), "Group"), za = Et(/* @__PURE__ */ B("path", {
|
|
3813
3807
|
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
|
|
3814
3808
|
}), "Person"), vl = Et(/* @__PURE__ */ B("path", {
|
|
3815
3809
|
d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"
|
|
@@ -3832,8 +3826,8 @@ function Sl(t) {
|
|
|
3832
3826
|
const xl = Qt.memo(
|
|
3833
3827
|
({ conversation: t, displayName: n, selected: i, onClick: s }) => {
|
|
3834
3828
|
const c = !!t.group, f = t.unread_count;
|
|
3835
|
-
return /* @__PURE__ */ B(
|
|
3836
|
-
|
|
3829
|
+
return /* @__PURE__ */ B(pa, { disablePadding: !0, children: /* @__PURE__ */ We(
|
|
3830
|
+
ks,
|
|
3837
3831
|
{
|
|
3838
3832
|
selected: i,
|
|
3839
3833
|
onClick: s,
|
|
@@ -3846,8 +3840,8 @@ const xl = Qt.memo(
|
|
|
3846
3840
|
}
|
|
3847
3841
|
},
|
|
3848
3842
|
children: [
|
|
3849
|
-
/* @__PURE__ */ B(
|
|
3850
|
-
|
|
3843
|
+
/* @__PURE__ */ B(ha, { children: /* @__PURE__ */ B(
|
|
3844
|
+
ma,
|
|
3851
3845
|
{
|
|
3852
3846
|
badgeContent: f,
|
|
3853
3847
|
color: "primary",
|
|
@@ -3859,13 +3853,13 @@ const xl = Qt.memo(
|
|
|
3859
3853
|
sx: {
|
|
3860
3854
|
bgcolor: c ? "primary.main" : "secondary.main"
|
|
3861
3855
|
},
|
|
3862
|
-
children: c ? /* @__PURE__ */ B(
|
|
3856
|
+
children: c ? /* @__PURE__ */ B(Va, {}) : /* @__PURE__ */ B(za, {})
|
|
3863
3857
|
}
|
|
3864
3858
|
)
|
|
3865
3859
|
}
|
|
3866
3860
|
) }),
|
|
3867
3861
|
/* @__PURE__ */ B(
|
|
3868
|
-
|
|
3862
|
+
ya,
|
|
3869
3863
|
{
|
|
3870
3864
|
primary: /* @__PURE__ */ We(
|
|
3871
3865
|
Me,
|
|
@@ -3918,10 +3912,10 @@ const xl = Qt.memo(
|
|
|
3918
3912
|
}
|
|
3919
3913
|
) });
|
|
3920
3914
|
}
|
|
3921
|
-
), Cl = () => /* @__PURE__ */ We(
|
|
3922
|
-
/* @__PURE__ */ B(
|
|
3915
|
+
), Cl = () => /* @__PURE__ */ We(pa, { children: [
|
|
3916
|
+
/* @__PURE__ */ B(ha, { children: /* @__PURE__ */ B(yr, { variant: "circular", width: 40, height: 40 }) }),
|
|
3923
3917
|
/* @__PURE__ */ B(
|
|
3924
|
-
|
|
3918
|
+
ya,
|
|
3925
3919
|
{
|
|
3926
3920
|
primary: /* @__PURE__ */ We(Me, { display: "flex", justifyContent: "space-between", children: [
|
|
3927
3921
|
/* @__PURE__ */ B(yr, { variant: "text", width: "60%" }),
|
|
@@ -4132,26 +4126,26 @@ function Tl() {
|
|
|
4132
4126
|
e.apply(this, arguments), r.apply(this, arguments);
|
|
4133
4127
|
};
|
|
4134
4128
|
}
|
|
4135
|
-
function
|
|
4129
|
+
function Ua(e, r) {
|
|
4136
4130
|
return e === q ? r : function() {
|
|
4137
4131
|
var o = e.apply(this, arguments), a = (o !== void 0 && (arguments[0] = o), this.onsuccess), u = this.onerror, l = (this.onsuccess = null, this.onerror = null, r.apply(this, arguments));
|
|
4138
4132
|
return a && (this.onsuccess = this.onsuccess ? ht(a, this.onsuccess) : a), u && (this.onerror = this.onerror ? ht(u, this.onerror) : u), l !== void 0 ? l : o;
|
|
4139
4133
|
};
|
|
4140
4134
|
}
|
|
4141
|
-
function
|
|
4135
|
+
function Ya(e, r) {
|
|
4142
4136
|
return e === q ? r : function() {
|
|
4143
4137
|
e.apply(this, arguments);
|
|
4144
4138
|
var o = this.onsuccess, a = this.onerror;
|
|
4145
4139
|
this.onsuccess = this.onerror = null, r.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? ht(o, this.onsuccess) : o), a && (this.onerror = this.onerror ? ht(a, this.onerror) : a);
|
|
4146
4140
|
};
|
|
4147
4141
|
}
|
|
4148
|
-
function
|
|
4142
|
+
function Ga(e, r) {
|
|
4149
4143
|
return e === q ? r : function(u) {
|
|
4150
4144
|
var a = e.apply(this, arguments), u = (T(u, a), this.onsuccess), l = this.onerror, d = (this.onsuccess = null, this.onerror = null, r.apply(this, arguments));
|
|
4151
4145
|
return u && (this.onsuccess = this.onsuccess ? ht(u, this.onsuccess) : u), l && (this.onerror = this.onerror ? ht(l, this.onerror) : l), a === void 0 ? d === void 0 ? void 0 : d : T(a, d);
|
|
4152
4146
|
};
|
|
4153
4147
|
}
|
|
4154
|
-
function
|
|
4148
|
+
function Ha(e, r) {
|
|
4155
4149
|
return e === q ? r : function() {
|
|
4156
4150
|
return r.apply(this, arguments) !== !1 && e.apply(this, arguments);
|
|
4157
4151
|
};
|
|
@@ -4174,7 +4168,7 @@ function Tl() {
|
|
|
4174
4168
|
mt = e;
|
|
4175
4169
|
}
|
|
4176
4170
|
var wr = {}, Wo = 100, _r = typeof Promise > "u" ? [] : (it = Promise.resolve(), typeof crypto < "u" && crypto.subtle ? [_r = crypto.subtle.digest("SHA-512", new Uint8Array([0])), C(_r), it] : [it, C(it), it]), it = _r[0], cr = _r[1], cr = cr && cr.then, Ft = it && it.constructor, Kn = !!_r[2], Sr = function(e, r) {
|
|
4177
|
-
xr.push([e, r]), qr && (queueMicrotask(
|
|
4171
|
+
xr.push([e, r]), qr && (queueMicrotask(Xa), qr = !1);
|
|
4178
4172
|
}, Fn = !0, qr = !0, qt = [], Lr = [], qn = et, Tt = { id: "global", global: !0, ref: 0, unhandleds: [], onunhandled: q, pgp: !1, env: {}, finalize: q }, ae = Tt, xr = [], Lt = 0, Vr = [];
|
|
4179
4173
|
function J(e) {
|
|
4180
4174
|
if (typeof this != "object") throw new TypeError("Promises must be constructed via new");
|
|
@@ -4236,10 +4230,10 @@ function Tl() {
|
|
|
4236
4230
|
else {
|
|
4237
4231
|
var o = e._state ? r.onFulfilled : r.onRejected;
|
|
4238
4232
|
if (o === null) return (e._state ? r.resolve : r.reject)(e._value);
|
|
4239
|
-
++r.psd.ref, ++Lt, Sr(
|
|
4233
|
+
++r.psd.ref, ++Lt, Sr(Qa, [o, e, r]);
|
|
4240
4234
|
}
|
|
4241
4235
|
}
|
|
4242
|
-
function
|
|
4236
|
+
function Qa(e, r, o) {
|
|
4243
4237
|
try {
|
|
4244
4238
|
var a, u = r._value;
|
|
4245
4239
|
!r._state && Lr.length && (Lr = []), a = mt && r._consoleTask ? r._consoleTask.run(function() {
|
|
@@ -4253,7 +4247,7 @@ function Tl() {
|
|
|
4253
4247
|
--Lt == 0 && Wn(), --o.psd.ref || o.psd.finalize();
|
|
4254
4248
|
}
|
|
4255
4249
|
}
|
|
4256
|
-
function
|
|
4250
|
+
function Xa() {
|
|
4257
4251
|
Vt(Tt, function() {
|
|
4258
4252
|
rr() && nr();
|
|
4259
4253
|
});
|
|
@@ -4401,15 +4395,15 @@ function Tl() {
|
|
|
4401
4395
|
});
|
|
4402
4396
|
});
|
|
4403
4397
|
}), Ft.withResolvers) && (J.withResolvers = Ft.withResolvers);
|
|
4404
|
-
var He = { awaits: 0, echoes: 0, id: 0 },
|
|
4398
|
+
var He = { awaits: 0, echoes: 0, id: 0 }, Ja = 0, Wr = [], Ur = 0, Yr = 0, Za = 0;
|
|
4405
4399
|
function kt(e, d, o, a) {
|
|
4406
|
-
var u = ae, l = Object.create(u), d = (l.parent = u, l.ref = 0, l.global = !1, l.id = ++
|
|
4400
|
+
var u = ae, l = Object.create(u), d = (l.parent = u, l.ref = 0, l.global = !1, l.id = ++Za, Tt.env, l.env = Kn ? { Promise: J, PromiseProp: { value: J, configurable: !0, writable: !0 }, all: J.all, race: J.race, allSettled: J.allSettled, any: J.any, resolve: J.resolve, reject: J.reject } : {}, d && T(l, d), ++u.ref, l.finalize = function() {
|
|
4407
4401
|
--this.parent.ref || this.parent.finalize();
|
|
4408
4402
|
}, Vt(l, e, o, a));
|
|
4409
4403
|
return l.ref === 0 && l.finalize(), d;
|
|
4410
4404
|
}
|
|
4411
4405
|
function or() {
|
|
4412
|
-
return He.id || (He.id = ++
|
|
4406
|
+
return He.id || (He.id = ++Ja), ++He.awaits, He.echoes += Wo, He.id;
|
|
4413
4407
|
}
|
|
4414
4408
|
function Ot() {
|
|
4415
4409
|
return !!He.awaits && (--He.awaits == 0 && (He.id = 0), He.echoes = He.awaits * Wo, !0);
|
|
@@ -4421,7 +4415,7 @@ function Tl() {
|
|
|
4421
4415
|
return Ot(), Ue(r);
|
|
4422
4416
|
})) : e;
|
|
4423
4417
|
}
|
|
4424
|
-
function
|
|
4418
|
+
function es() {
|
|
4425
4419
|
var e = Wr[Wr.length - 1];
|
|
4426
4420
|
Wr.pop(), At(e, !1);
|
|
4427
4421
|
}
|
|
@@ -4429,7 +4423,7 @@ function Tl() {
|
|
|
4429
4423
|
var o, a, u = ae;
|
|
4430
4424
|
(r ? !He.echoes || Ur++ && e === ae : !Ur || --Ur && e === ae) || queueMicrotask(r ? (function(l) {
|
|
4431
4425
|
++Yr, He.echoes && --He.echoes != 0 || (He.echoes = He.awaits = He.id = 0), Wr.push(ae), At(l, !0);
|
|
4432
|
-
}).bind(null, e) :
|
|
4426
|
+
}).bind(null, e) : es), e !== ae && (ae = e, u === Tt && (Tt.env = Go()), Kn) && (o = Tt.env.Promise, a = e.env, u.global || e.global) && (Object.defineProperty(f, "Promise", a.PromiseProp), o.all = a.all, o.race = a.race, o.resolve = a.resolve, o.reject = a.reject, a.allSettled && (o.allSettled = a.allSettled), a.any) && (o.any = a.any);
|
|
4433
4427
|
}
|
|
4434
4428
|
function Go() {
|
|
4435
4429
|
var e = f.Promise;
|
|
@@ -4846,7 +4840,7 @@ function Tl() {
|
|
|
4846
4840
|
return r;
|
|
4847
4841
|
function l(d, p, w) {
|
|
4848
4842
|
var O, _;
|
|
4849
|
-
if (typeof d != "object") return p = p ||
|
|
4843
|
+
if (typeof d != "object") return p = p || Ha, _ = { subscribers: [], fire: w = w || q, subscribe: function(v) {
|
|
4850
4844
|
_.subscribers.indexOf(v) === -1 && (_.subscribers.push(v), _.fire = p(_.fire, v));
|
|
4851
4845
|
}, unsubscribe: function(v) {
|
|
4852
4846
|
_.subscribers = _.subscribers.filter(function(x) {
|
|
@@ -5140,16 +5134,16 @@ function Tl() {
|
|
|
5140
5134
|
});
|
|
5141
5135
|
});
|
|
5142
5136
|
};
|
|
5143
|
-
var
|
|
5137
|
+
var ts = Se;
|
|
5144
5138
|
function Se() {
|
|
5145
5139
|
}
|
|
5146
5140
|
var ai = function(e, r) {
|
|
5147
5141
|
return r.value = null;
|
|
5148
5142
|
};
|
|
5149
|
-
function
|
|
5143
|
+
function rs(e, r) {
|
|
5150
5144
|
return e < r ? -1 : e === r ? 0 : 1;
|
|
5151
5145
|
}
|
|
5152
|
-
function
|
|
5146
|
+
function ns(e, r) {
|
|
5153
5147
|
return r < e ? -1 : e === r ? 0 : 1;
|
|
5154
5148
|
}
|
|
5155
5149
|
function at(e, r, o) {
|
|
@@ -5174,7 +5168,7 @@ function Tl() {
|
|
|
5174
5168
|
return I.toLowerCase();
|
|
5175
5169
|
} : function(I) {
|
|
5176
5170
|
return I.toUpperCase();
|
|
5177
|
-
}, d = b === "next" ?
|
|
5171
|
+
}, d = b === "next" ? rs : ns;
|
|
5178
5172
|
var P = o.map(function(I) {
|
|
5179
5173
|
return { lower: l(I), upper: u(I) };
|
|
5180
5174
|
}).sort(function(I, k) {
|
|
@@ -5367,7 +5361,7 @@ function Tl() {
|
|
|
5367
5361
|
function kr(e) {
|
|
5368
5362
|
e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
|
|
5369
5363
|
}
|
|
5370
|
-
var Or = "storagemutated", Xn = "x-storagemutated-1", Rt = Er(null, Or),
|
|
5364
|
+
var Or = "storagemutated", Xn = "x-storagemutated-1", Rt = Er(null, Or), os = (gt.prototype._lock = function() {
|
|
5371
5365
|
return W(!ae.global), ++this._reculock, this._reculock !== 1 || ae.global || (ae.lockOwnerFor = this), this;
|
|
5372
5366
|
}, gt.prototype._unlock = function() {
|
|
5373
5367
|
if (W(!ae.global), --this._reculock == 0) for (ae.global || (ae.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked(); ) {
|
|
@@ -5489,11 +5483,11 @@ function Tl() {
|
|
|
5489
5483
|
function li(e) {
|
|
5490
5484
|
return [].slice.call(e);
|
|
5491
5485
|
}
|
|
5492
|
-
var
|
|
5486
|
+
var is = 0;
|
|
5493
5487
|
function Pr(e) {
|
|
5494
5488
|
return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
|
|
5495
5489
|
}
|
|
5496
|
-
function
|
|
5490
|
+
function as(e, r, w) {
|
|
5497
5491
|
function a(S) {
|
|
5498
5492
|
if (S.type === 3) return null;
|
|
5499
5493
|
if (S.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
|
|
@@ -5571,7 +5565,7 @@ function Tl() {
|
|
|
5571
5565
|
var L = P.index, H = P.range, Q = S.objectStore(x), Q = L.isPrimaryKey ? Q : Q.index(L.name), L = I ? k ? "prevunique" : "prev" : k ? "nextunique" : "next", re = !b && "openKeyCursor" in Q ? Q.openKeyCursor(a(H), L) : Q.openCursor(a(H), L);
|
|
5572
5566
|
re.onerror = yt(N), re.onsuccess = je(function(ee) {
|
|
5573
5567
|
var U, oe, _e, xe, ue = re.result;
|
|
5574
|
-
ue ? (ue.___id = ++
|
|
5568
|
+
ue ? (ue.___id = ++is, ue.done = !1, U = ue.continue.bind(ue), oe = (oe = ue.continuePrimaryKey) && oe.bind(ue), _e = ue.advance.bind(ue), xe = function() {
|
|
5575
5569
|
throw new Error("Cursor not stopped");
|
|
5576
5570
|
}, ue.trans = S, ue.stop = ue.continue = ue.continuePrimaryKey = ue.advance = function() {
|
|
5577
5571
|
throw new Error("Cursor not started");
|
|
@@ -5635,13 +5629,13 @@ function Tl() {
|
|
|
5635
5629
|
throw new Error("Table '".concat(_, "' not found"));
|
|
5636
5630
|
}, MIN_KEY: -1 / 0, MAX_KEY: Ar(r), schema: d };
|
|
5637
5631
|
}
|
|
5638
|
-
function
|
|
5639
|
-
return o = o.IDBKeyRange, r =
|
|
5632
|
+
function ss(e, r, o, a) {
|
|
5633
|
+
return o = o.IDBKeyRange, r = as(r, o, a), { dbcore: e.dbcore.reduce(function(u, l) {
|
|
5640
5634
|
return l = l.create, s(s({}, u), l(u));
|
|
5641
5635
|
}, r) };
|
|
5642
5636
|
}
|
|
5643
5637
|
function tn(e, r) {
|
|
5644
|
-
var o = r.db, o =
|
|
5638
|
+
var o = r.db, o = ss(e._middlewares, o, e._deps, r);
|
|
5645
5639
|
e.core = o.dbcore, e.tables.forEach(function(a) {
|
|
5646
5640
|
var u = a.name;
|
|
5647
5641
|
e.core.schema.tables.some(function(l) {
|
|
@@ -5669,10 +5663,10 @@ function Tl() {
|
|
|
5669
5663
|
for (var a in o) o[a] instanceof e.Table && delete o[a];
|
|
5670
5664
|
});
|
|
5671
5665
|
}
|
|
5672
|
-
function
|
|
5666
|
+
function us(e, r) {
|
|
5673
5667
|
return e._cfg.version - r._cfg.version;
|
|
5674
5668
|
}
|
|
5675
|
-
function
|
|
5669
|
+
function cs(e, r, o, a) {
|
|
5676
5670
|
var u = e._dbSchema, l = (o.objectStoreNames.contains("$meta") && !u.$meta && (u.$meta = Zn("$meta", di("")[0], []), e._storeNames.push("$meta")), e._createTransaction("readwrite", e._storeNames, u)), d = (l.create(o), l._completion.catch(a), l._reject.bind(l)), p = ae.transless || ae;
|
|
5677
5671
|
kt(function() {
|
|
5678
5672
|
if (ae.trans = l, ae.transless = p, r !== 0) return tn(e, o), O = r, ((w = l).storeNames.includes("$meta") ? w.table("$meta").get("version").then(function(_) {
|
|
@@ -5728,7 +5722,7 @@ function Tl() {
|
|
|
5728
5722
|
}).catch(d);
|
|
5729
5723
|
});
|
|
5730
5724
|
}
|
|
5731
|
-
function
|
|
5725
|
+
function ls(e, r) {
|
|
5732
5726
|
fi(e._dbSchema, r), r.db.version % 10 != 0 || r.objectStoreNames.contains("$meta") || r.db.createObjectStore("$meta").add(Math.ceil(r.db.version / 10 - 1), "version");
|
|
5733
5727
|
var o = on(0, e.idbdb, r);
|
|
5734
5728
|
an(e, e._dbSchema, r);
|
|
@@ -5826,7 +5820,7 @@ function Tl() {
|
|
|
5826
5820
|
}, ur.prototype.upgrade = function(e) {
|
|
5827
5821
|
return this._cfg.contentUpgrade = Nn(this._cfg.contentUpgrade || q, e), this;
|
|
5828
5822
|
};
|
|
5829
|
-
var
|
|
5823
|
+
var fs = ur;
|
|
5830
5824
|
function ur() {
|
|
5831
5825
|
}
|
|
5832
5826
|
function oo(e, r) {
|
|
@@ -5964,7 +5958,7 @@ function Tl() {
|
|
|
5964
5958
|
e.queries.query[w] = O;
|
|
5965
5959
|
}
|
|
5966
5960
|
}
|
|
5967
|
-
function
|
|
5961
|
+
function ds(e) {
|
|
5968
5962
|
var r = e._state, o = e._deps.indexedDB;
|
|
5969
5963
|
if (r.isBeingOpened || e.idbdb) return r.dbReadyPromise.then(function() {
|
|
5970
5964
|
return r.dbOpenError ? Ue(r.dbOpenError) : e;
|
|
@@ -5983,7 +5977,7 @@ function Tl() {
|
|
|
5983
5977
|
var I;
|
|
5984
5978
|
_ = b.transaction, r.autoSchema && !e._options.allowEmptyDB ? (b.onerror = kr, _.abort(), b.result.close(), (I = o.deleteDatabase(S)).onsuccess = I.onerror = je(function() {
|
|
5985
5979
|
E(new Y.NoSuchDatabase("Database ".concat(S, " doesnt exist")));
|
|
5986
|
-
})) : (_.onerror = yt(E), I = P.oldVersion > Math.pow(2, 62) ? 0 : P.oldVersion, v = I < 1, e.idbdb = b.result, l &&
|
|
5980
|
+
})) : (_.onerror = yt(E), I = P.oldVersion > Math.pow(2, 62) ? 0 : P.oldVersion, v = I < 1, e.idbdb = b.result, l && ls(e, _), cs(e, I / 10, _, E));
|
|
5987
5981
|
}, E), b.onsuccess = je(function() {
|
|
5988
5982
|
_ = null;
|
|
5989
5983
|
var P, I, k, M, N, H, Q = e.idbdb = b.result, L = ie(Q.objectStoreNames);
|
|
@@ -6069,7 +6063,7 @@ function Tl() {
|
|
|
6069
6063
|
for (var a = m(e) ? e.slice() : [e], u = 0; u < o; ++u) a.push(r);
|
|
6070
6064
|
return a;
|
|
6071
6065
|
}
|
|
6072
|
-
var
|
|
6066
|
+
var ps = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
|
|
6073
6067
|
return s(s({}, e), { table: function(a) {
|
|
6074
6068
|
var o = e.table(a), a = o.schema, u = {}, l = [];
|
|
6075
6069
|
function d(x, E, S) {
|
|
@@ -6127,7 +6121,7 @@ function Tl() {
|
|
|
6127
6121
|
function mo(e, r) {
|
|
6128
6122
|
return r.type === "delete" ? r.keys : r.keys || r.values.map(e.extractKey);
|
|
6129
6123
|
}
|
|
6130
|
-
var
|
|
6124
|
+
var hs = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
|
|
6131
6125
|
return s(s({}, e), { table: function(r) {
|
|
6132
6126
|
var o = e.table(r), a = o.schema.primaryKey;
|
|
6133
6127
|
return s(s({}, o), { mutate: function(u) {
|
|
@@ -6197,7 +6191,7 @@ function Tl() {
|
|
|
6197
6191
|
return null;
|
|
6198
6192
|
}
|
|
6199
6193
|
}
|
|
6200
|
-
var
|
|
6194
|
+
var ms = { stack: "dbcore", level: -1, create: function(e) {
|
|
6201
6195
|
return { table: function(r) {
|
|
6202
6196
|
var o = e.table(r);
|
|
6203
6197
|
return s(s({}, o), { getMany: function(a) {
|
|
@@ -6224,7 +6218,7 @@ function Tl() {
|
|
|
6224
6218
|
return !1;
|
|
6225
6219
|
}
|
|
6226
6220
|
}
|
|
6227
|
-
var
|
|
6221
|
+
var ys = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
|
|
6228
6222
|
var r = e.schema.name, o = new tt(e.MIN_KEY, e.MAX_KEY);
|
|
6229
6223
|
return s(s({}, e), { transaction: function(a, u, l) {
|
|
6230
6224
|
if (ae.subscr && u !== "readonly") throw new Y.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ae.querier));
|
|
@@ -6374,7 +6368,7 @@ function Tl() {
|
|
|
6374
6368
|
function Si(e, r) {
|
|
6375
6369
|
return we(e.lower, r.lower) === 0 && we(e.upper, r.upper) === 0 && !!e.lowerOpen == !!r.lowerOpen && !!e.upperOpen == !!r.upperOpen;
|
|
6376
6370
|
}
|
|
6377
|
-
function
|
|
6371
|
+
function gs(e, r) {
|
|
6378
6372
|
return ((o, a, u, l) => {
|
|
6379
6373
|
if (o === void 0) return a !== void 0 ? -1 : 0;
|
|
6380
6374
|
if (a === void 0) return 1;
|
|
@@ -6395,7 +6389,7 @@ function Tl() {
|
|
|
6395
6389
|
return o;
|
|
6396
6390
|
})(e.upper, r.upper, e.upperOpen, r.upperOpen);
|
|
6397
6391
|
}
|
|
6398
|
-
function
|
|
6392
|
+
function vs(e, r, o, a) {
|
|
6399
6393
|
e.subscribers.add(o), a.addEventListener("abort", function() {
|
|
6400
6394
|
var u, l;
|
|
6401
6395
|
e.subscribers.delete(o), e.subscribers.size === 0 && (u = e, l = r, setTimeout(function() {
|
|
@@ -6403,7 +6397,7 @@ function Tl() {
|
|
|
6403
6397
|
}, 3e3));
|
|
6404
6398
|
});
|
|
6405
6399
|
}
|
|
6406
|
-
var
|
|
6400
|
+
var bs = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
|
|
6407
6401
|
var r = e.schema.name;
|
|
6408
6402
|
return s(s({}, e), { transaction: function(o, a, u) {
|
|
6409
6403
|
var l, d, p = e.transaction(o, a, u);
|
|
@@ -6470,7 +6464,7 @@ function Tl() {
|
|
|
6470
6464
|
return N.req.limit === P.limit && N.req.values === P.values && Si(N.req.query.range, P.query.range);
|
|
6471
6465
|
});
|
|
6472
6466
|
return M ? [M, !0, I, k] : [k.find(function(N) {
|
|
6473
|
-
return ("limit" in N.req ? N.req.limit : 1 / 0) >= P.limit && (!P.values || N.req.values) &&
|
|
6467
|
+
return ("limit" in N.req ? N.req.limit : 1 / 0) >= P.limit && (!P.values || N.req.values) && gs(N.req.query.range, P.query.range);
|
|
6474
6468
|
}), !1, I, k];
|
|
6475
6469
|
case "count":
|
|
6476
6470
|
return M = k.find(function(N) {
|
|
@@ -6486,7 +6480,7 @@ function Tl() {
|
|
|
6486
6480
|
return E;
|
|
6487
6481
|
}).catch(function(E) {
|
|
6488
6482
|
return _ && x && qe(_, x), Promise.reject(E);
|
|
6489
|
-
}), x = { obsSet: l.obsSet, promise: v, subscribers: /* @__PURE__ */ new Set(), type: "query", req: l, dirty: !1 }, _ ? _.push(x) : (_ = [x], (O = O || (Ut["idb://".concat(r, "/").concat(o)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[l.query.index.name || ""] = _)),
|
|
6483
|
+
}), x = { obsSet: l.obsSet, promise: v, subscribers: /* @__PURE__ */ new Set(), type: "query", req: l, dirty: !1 }, _ ? _.push(x) : (_ = [x], (O = O || (Ut["idb://".concat(r, "/").concat(o)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[l.query.index.name || ""] = _)), vs(x, _, p, w), x.promise.then(function(E) {
|
|
6490
6484
|
return { result: _i(E.result, l, O == null ? void 0 : O.optimisticOps, a, x, d) };
|
|
6491
6485
|
})) : a.query(l);
|
|
6492
6486
|
} });
|
|
@@ -6504,7 +6498,7 @@ function Tl() {
|
|
|
6504
6498
|
var r = this._versions, o = r.filter(function(a) {
|
|
6505
6499
|
return a._cfg.version === e;
|
|
6506
6500
|
})[0];
|
|
6507
|
-
return o || (o = new this.Version(e), r.push(o), r.sort(
|
|
6501
|
+
return o || (o = new this.Version(e), r.push(o), r.sort(us), o.stores({}), this._state.autoSchema = !1), o;
|
|
6508
6502
|
}, Ye.prototype._whenReady = function(e) {
|
|
6509
6503
|
var r = this;
|
|
6510
6504
|
return this.idbdb && (this._state.openComplete || ae.letThrough || this._vip) ? e() : new J(function(o, a) {
|
|
@@ -6528,7 +6522,7 @@ function Tl() {
|
|
|
6528
6522
|
}, Ye.prototype.open = function() {
|
|
6529
6523
|
var e = this;
|
|
6530
6524
|
return Vt(Tt, function() {
|
|
6531
|
-
return
|
|
6525
|
+
return ds(e);
|
|
6532
6526
|
});
|
|
6533
6527
|
}, Ye.prototype._close = function() {
|
|
6534
6528
|
this.on.close.fire(new CustomEvent("close"));
|
|
@@ -6671,7 +6665,7 @@ function Tl() {
|
|
|
6671
6665
|
}));
|
|
6672
6666
|
});
|
|
6673
6667
|
};
|
|
6674
|
-
}), this.Collection = (o = this, Tr(
|
|
6668
|
+
}), this.Collection = (o = this, Tr(ts.prototype, function(P, b) {
|
|
6675
6669
|
this.db = o;
|
|
6676
6670
|
var E = Xo, S = null;
|
|
6677
6671
|
if (b) try {
|
|
@@ -6682,8 +6676,8 @@ function Tl() {
|
|
|
6682
6676
|
var b = P._ctx, P = b.table, I = P.hook.reading.fire;
|
|
6683
6677
|
this._ctx = { table: P, index: b.index, isPrimKey: !b.index || P.schema.primKey.keyPath && b.index === P.schema.primKey.name, range: E, keysOnly: !1, dir: "next", unique: "", algorithm: null, filter: null, replayFilter: null, justLimit: !0, isMatch: null, offset: 0, limit: 1 / 0, error: S, or: b.or, valueMapper: I !== et ? I : null };
|
|
6684
6678
|
})), this.Table = (a = this, Tr(ni.prototype, function(v, x, E) {
|
|
6685
|
-
this.db = a, this._tx = E, this.name = v, this.schema = x, this.hook = a._allTables[v] ? a._allTables[v].hook : Er(null, { creating: [
|
|
6686
|
-
})), this.Transaction = (u = this, Tr(
|
|
6679
|
+
this.db = a, this._tx = E, this.name = v, this.schema = x, this.hook = a._allTables[v] ? a._allTables[v].hook : Er(null, { creating: [Ua, q], reading: [tr, et], updating: [Ga, q], deleting: [Ya, q] });
|
|
6680
|
+
})), this.Transaction = (u = this, Tr(os.prototype, function(v, x, E, S, b) {
|
|
6687
6681
|
var P = this;
|
|
6688
6682
|
v !== "readonly" && x.forEach(function(I) {
|
|
6689
6683
|
I = (I = E[I]) == null ? void 0 : I.yProps, I && (x = x.concat(I.map(function(k) {
|
|
@@ -6697,7 +6691,7 @@ function Tl() {
|
|
|
6697
6691
|
var k = P.active;
|
|
6698
6692
|
return P.active = !1, P.on.error.fire(I), P.parent ? P.parent._reject(I) : k && P.idbtrans && P.idbtrans.abort(), Ue(I);
|
|
6699
6693
|
});
|
|
6700
|
-
})), this.Version = (l = this, Tr(
|
|
6694
|
+
})), this.Version = (l = this, Tr(fs.prototype, function(v) {
|
|
6701
6695
|
this.db = l, this._cfg = { version: v, storesSource: null, dbschema: {}, tables: {}, contentUpgrade: null };
|
|
6702
6696
|
})), this.WhereClause = (d = this, Tr(ui.prototype, function(v, x, E) {
|
|
6703
6697
|
if (this.db = d, this._ctx = { table: v, index: x === ":id" ? null : x, or: E }, this._cmp = this._ascending = we, this._descending = function(S, b) {
|
|
@@ -6719,7 +6713,7 @@ function Tl() {
|
|
|
6719
6713
|
}).map(function(x) {
|
|
6720
6714
|
return x.on("versionchange").fire(v);
|
|
6721
6715
|
});
|
|
6722
|
-
}, this.use(
|
|
6716
|
+
}, this.use(ms), this.use(bs), this.use(ys), this.use(ps), this.use(hs), new Proxy(this, { get: function(v, x, E) {
|
|
6723
6717
|
var S;
|
|
6724
6718
|
return x === "_vip" || (x === "table" ? function(b) {
|
|
6725
6719
|
return fn(p.table(b), _);
|
|
@@ -6733,7 +6727,7 @@ function Tl() {
|
|
|
6733
6727
|
return v(p);
|
|
6734
6728
|
});
|
|
6735
6729
|
}
|
|
6736
|
-
var dn, cr = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable",
|
|
6730
|
+
var dn, cr = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", ws = (go.prototype.subscribe = function(e, r, o) {
|
|
6737
6731
|
return this._subscribe(e && typeof e != "function" ? e : { next: e, error: r, complete: o });
|
|
6738
6732
|
}, go.prototype[cr] = function() {
|
|
6739
6733
|
return this;
|
|
@@ -6747,7 +6741,7 @@ function Tl() {
|
|
|
6747
6741
|
dn = { indexedDB: null, IDBKeyRange: null };
|
|
6748
6742
|
}
|
|
6749
6743
|
function xi(e) {
|
|
6750
|
-
var r, o = !1, a = new
|
|
6744
|
+
var r, o = !1, a = new ws(function(u) {
|
|
6751
6745
|
var l = ne(e), d, p = !1, w = {}, O = {}, _ = { get closed() {
|
|
6752
6746
|
return p;
|
|
6753
6747
|
}, unsubscribe: function() {
|
|
@@ -6891,7 +6885,7 @@ function Tl() {
|
|
|
6891
6885
|
})(vn)), vn.exports;
|
|
6892
6886
|
}
|
|
6893
6887
|
var kl = Tl();
|
|
6894
|
-
const Do = /* @__PURE__ */
|
|
6888
|
+
const Do = /* @__PURE__ */ wa(kl), sa = Symbol.for("Dexie"), br = globalThis[sa] || (globalThis[sa] = Do);
|
|
6895
6889
|
if (Do.semVer !== br.semVer)
|
|
6896
6890
|
throw new Error(`Two different versions of Dexie loaded in the same app: ${Do.semVer} and ${br.semVer}`);
|
|
6897
6891
|
const {
|
|
@@ -7055,7 +7049,7 @@ const Dl = ({
|
|
|
7055
7049
|
};
|
|
7056
7050
|
return /* @__PURE__ */ We(Me, { display: "flex", flexDirection: "column", height: "100%", children: [
|
|
7057
7051
|
/* @__PURE__ */ B(
|
|
7058
|
-
|
|
7052
|
+
ga,
|
|
7059
7053
|
{
|
|
7060
7054
|
position: "static",
|
|
7061
7055
|
elevation: 0,
|
|
@@ -7063,7 +7057,7 @@ const Dl = ({
|
|
|
7063
7057
|
backgroundColor: "background.default",
|
|
7064
7058
|
color: "text.primary"
|
|
7065
7059
|
},
|
|
7066
|
-
children: /* @__PURE__ */ B(
|
|
7060
|
+
children: /* @__PURE__ */ B(va, { children: /* @__PURE__ */ B(rt, { variant: "h6", component: "div", children: "Messages" }) })
|
|
7067
7061
|
}
|
|
7068
7062
|
),
|
|
7069
7063
|
/* @__PURE__ */ B(Me, { flex: 1, overflow: "auto", children: s && !m.length ? /* @__PURE__ */ B(Ei, { disablePadding: !0, children: [1, 2, 3, 4, 5].map((g) => /* @__PURE__ */ B(Cl, {}, g)) }) : f ? /* @__PURE__ */ B(Me, { p: 2, children: /* @__PURE__ */ We(Nr, { severity: "error", children: [
|
|
@@ -7116,7 +7110,7 @@ const Dl = ({
|
|
|
7116
7110
|
}) => {
|
|
7117
7111
|
const f = n === "group";
|
|
7118
7112
|
return /* @__PURE__ */ B(
|
|
7119
|
-
|
|
7113
|
+
ga,
|
|
7120
7114
|
{
|
|
7121
7115
|
position: "static",
|
|
7122
7116
|
elevation: 0,
|
|
@@ -7124,9 +7118,9 @@ const Dl = ({
|
|
|
7124
7118
|
backgroundColor: "background.default",
|
|
7125
7119
|
color: "text.primary"
|
|
7126
7120
|
},
|
|
7127
|
-
children: /* @__PURE__ */ We(
|
|
7121
|
+
children: /* @__PURE__ */ We(va, { children: [
|
|
7128
7122
|
c && /* @__PURE__ */ B(
|
|
7129
|
-
|
|
7123
|
+
ba,
|
|
7130
7124
|
{
|
|
7131
7125
|
edge: "start",
|
|
7132
7126
|
color: "inherit",
|
|
@@ -7145,7 +7139,7 @@ const Dl = ({
|
|
|
7145
7139
|
bgcolor: f ? "primary.main" : "secondary.main",
|
|
7146
7140
|
mr: 2
|
|
7147
7141
|
},
|
|
7148
|
-
children: f ? /* @__PURE__ */ B(
|
|
7142
|
+
children: f ? /* @__PURE__ */ B(Va, {}) : /* @__PURE__ */ B(za, {})
|
|
7149
7143
|
}
|
|
7150
7144
|
),
|
|
7151
7145
|
/* @__PURE__ */ We(Me, { flex: 1, children: [
|
|
@@ -7161,7 +7155,7 @@ const Dl = ({
|
|
|
7161
7155
|
)
|
|
7162
7156
|
] }),
|
|
7163
7157
|
!s && /* @__PURE__ */ B(
|
|
7164
|
-
|
|
7158
|
+
Os,
|
|
7165
7159
|
{
|
|
7166
7160
|
icon: /* @__PURE__ */ B(_l, {}),
|
|
7167
7161
|
label: "Disconnected",
|
|
@@ -7181,8 +7175,8 @@ function jl(t) {
|
|
|
7181
7175
|
hour12: !0
|
|
7182
7176
|
});
|
|
7183
7177
|
}
|
|
7184
|
-
const
|
|
7185
|
-
function yf(t, n =
|
|
7178
|
+
const Wa = 300 * 1e3;
|
|
7179
|
+
function yf(t, n = Wa) {
|
|
7186
7180
|
if (t.length === 0) return [];
|
|
7187
7181
|
const i = [];
|
|
7188
7182
|
let s = null;
|
|
@@ -7207,7 +7201,7 @@ function yf(t, n = za) {
|
|
|
7207
7201
|
}
|
|
7208
7202
|
return s && i.push(s), i;
|
|
7209
7203
|
}
|
|
7210
|
-
function ua(t, n, i =
|
|
7204
|
+
function ua(t, n, i = Wa) {
|
|
7211
7205
|
if (t.sender !== n.sender) return !1;
|
|
7212
7206
|
const s = new Date(t.created_at).getTime(), c = new Date(n.created_at).getTime();
|
|
7213
7207
|
return Math.abs(c - s) <= i;
|
|
@@ -7273,7 +7267,7 @@ const ca = async (t, n = {}) => {
|
|
|
7273
7267
|
children: [
|
|
7274
7268
|
!n && C,
|
|
7275
7269
|
/* @__PURE__ */ We(
|
|
7276
|
-
|
|
7270
|
+
As,
|
|
7277
7271
|
{
|
|
7278
7272
|
elevation: 1,
|
|
7279
7273
|
sx: {
|
|
@@ -7451,7 +7445,7 @@ const Vl = ({
|
|
|
7451
7445
|
t.length > 0 && T.current && (T.current.scrollIntoView({ behavior: "auto" }), A.current = !0);
|
|
7452
7446
|
}, []), xt(() => {
|
|
7453
7447
|
!h || !t.length || (C.current && (R.current = C.current.scrollHeight), K(!1));
|
|
7454
|
-
}, [h]),
|
|
7448
|
+
}, [h]), Cs(() => {
|
|
7455
7449
|
if (t.length) {
|
|
7456
7450
|
if ($ && T.current && A.current)
|
|
7457
7451
|
T.current.scrollIntoView({ behavior: "smooth" });
|
|
@@ -7536,7 +7530,7 @@ const Vl = ({
|
|
|
7536
7530
|
};
|
|
7537
7531
|
return /* @__PURE__ */ We(Me, { display: "flex", gap: 1, p: 2, borderTop: 1, borderColor: "divider", children: [
|
|
7538
7532
|
/* @__PURE__ */ B(
|
|
7539
|
-
|
|
7533
|
+
Ps,
|
|
7540
7534
|
{
|
|
7541
7535
|
ref: h,
|
|
7542
7536
|
fullWidth: !0,
|
|
@@ -7554,7 +7548,7 @@ const Vl = ({
|
|
|
7554
7548
|
}
|
|
7555
7549
|
),
|
|
7556
7550
|
/* @__PURE__ */ B(
|
|
7557
|
-
|
|
7551
|
+
ba,
|
|
7558
7552
|
{
|
|
7559
7553
|
color: "primary",
|
|
7560
7554
|
onClick: m,
|
|
@@ -7669,7 +7663,7 @@ const Ul = ({
|
|
|
7669
7663
|
)
|
|
7670
7664
|
] });
|
|
7671
7665
|
};
|
|
7672
|
-
class la extends
|
|
7666
|
+
class la extends Es {
|
|
7673
7667
|
constructor(i) {
|
|
7674
7668
|
super(i);
|
|
7675
7669
|
$t(this, "handleReset", () => {
|
|
@@ -7701,7 +7695,7 @@ class la extends Cs {
|
|
|
7701
7695
|
/* @__PURE__ */ B(rt, { variant: "body2", color: "text.secondary", children: ((i = this.state.error) == null ? void 0 : i.message) || "An unexpected error occurred" })
|
|
7702
7696
|
] }),
|
|
7703
7697
|
/* @__PURE__ */ B(
|
|
7704
|
-
|
|
7698
|
+
da,
|
|
7705
7699
|
{
|
|
7706
7700
|
variant: "contained",
|
|
7707
7701
|
startIcon: /* @__PURE__ */ B(vl, {}),
|
|
@@ -7868,7 +7862,7 @@ const gf = ({
|
|
|
7868
7862
|
children: n,
|
|
7869
7863
|
max: i = 99
|
|
7870
7864
|
}) => /* @__PURE__ */ B(
|
|
7871
|
-
|
|
7865
|
+
ma,
|
|
7872
7866
|
{
|
|
7873
7867
|
badgeContent: t,
|
|
7874
7868
|
color: "error",
|
|
@@ -7900,7 +7894,7 @@ const gf = ({
|
|
|
7900
7894
|
primary: "#eee",
|
|
7901
7895
|
secondary: "#aaa"
|
|
7902
7896
|
}
|
|
7903
|
-
}, wf =
|
|
7897
|
+
}, wf = La({
|
|
7904
7898
|
palette: {
|
|
7905
7899
|
mode: "light",
|
|
7906
7900
|
primary: {
|