@qwanyx/stack 0.2.40 → 0.2.41
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.cjs.js +13 -13
- package/dist/index.esm.js +98 -101
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -4234,8 +4234,8 @@ function pu() {
|
|
|
4234
4234
|
}
|
|
4235
4235
|
var ge = !1, Me;
|
|
4236
4236
|
{
|
|
4237
|
-
var
|
|
4238
|
-
Me = new
|
|
4237
|
+
var ct = typeof WeakMap == "function" ? WeakMap : Map;
|
|
4238
|
+
Me = new ct();
|
|
4239
4239
|
}
|
|
4240
4240
|
function Ct(b, P) {
|
|
4241
4241
|
if (!b || ge)
|
|
@@ -4294,9 +4294,9 @@ function pu() {
|
|
|
4294
4294
|
if (Ne !== 1 || je !== 1)
|
|
4295
4295
|
do
|
|
4296
4296
|
if (Ne--, je--, je < 0 || se[Ne] !== Ke[je]) {
|
|
4297
|
-
var
|
|
4297
|
+
var at = `
|
|
4298
4298
|
` + se[Ne].replace(" at new ", " at ");
|
|
4299
|
-
return b.displayName &&
|
|
4299
|
+
return b.displayName && at.includes("<anonymous>") && (at = at.replace("<anonymous>", b.displayName)), typeof b == "function" && Me.set(b, at), at;
|
|
4300
4300
|
}
|
|
4301
4301
|
while (Ne >= 1 && je >= 0);
|
|
4302
4302
|
break;
|
|
@@ -4344,7 +4344,7 @@ function pu() {
|
|
|
4344
4344
|
}
|
|
4345
4345
|
return "";
|
|
4346
4346
|
}
|
|
4347
|
-
var
|
|
4347
|
+
var dt = Object.prototype.hasOwnProperty, Ut = {}, Wt = C.ReactDebugCurrentFrame;
|
|
4348
4348
|
function Dt(b) {
|
|
4349
4349
|
if (b) {
|
|
4350
4350
|
var P = b._owner, G = ot(b.type, b._source, P ? P.type : null);
|
|
@@ -4352,9 +4352,9 @@ function pu() {
|
|
|
4352
4352
|
} else
|
|
4353
4353
|
Wt.setExtraStackFrame(null);
|
|
4354
4354
|
}
|
|
4355
|
-
function
|
|
4355
|
+
function ft(b, P, G, Z, he) {
|
|
4356
4356
|
{
|
|
4357
|
-
var be = Function.call.bind(
|
|
4357
|
+
var be = Function.call.bind(dt);
|
|
4358
4358
|
for (var le in b)
|
|
4359
4359
|
if (be(b, le)) {
|
|
4360
4360
|
var se = void 0;
|
|
@@ -4371,9 +4371,9 @@ function pu() {
|
|
|
4371
4371
|
}
|
|
4372
4372
|
}
|
|
4373
4373
|
}
|
|
4374
|
-
var
|
|
4374
|
+
var ht = Array.isArray;
|
|
4375
4375
|
function At(b) {
|
|
4376
|
-
return
|
|
4376
|
+
return ht(b);
|
|
4377
4377
|
}
|
|
4378
4378
|
function W(b) {
|
|
4379
4379
|
{
|
|
@@ -4402,7 +4402,7 @@ function pu() {
|
|
|
4402
4402
|
__source: !0
|
|
4403
4403
|
}, J, S;
|
|
4404
4404
|
function I(b) {
|
|
4405
|
-
if (
|
|
4405
|
+
if (dt.call(b, "ref")) {
|
|
4406
4406
|
var P = Object.getOwnPropertyDescriptor(b, "ref").get;
|
|
4407
4407
|
if (P && P.isReactWarning)
|
|
4408
4408
|
return !1;
|
|
@@ -4410,7 +4410,7 @@ function pu() {
|
|
|
4410
4410
|
return b.ref !== void 0;
|
|
4411
4411
|
}
|
|
4412
4412
|
function K(b) {
|
|
4413
|
-
if (
|
|
4413
|
+
if (dt.call(b, "key")) {
|
|
4414
4414
|
var P = Object.getOwnPropertyDescriptor(b, "key").get;
|
|
4415
4415
|
if (P && P.isReactWarning)
|
|
4416
4416
|
return !1;
|
|
@@ -4476,7 +4476,7 @@ function pu() {
|
|
|
4476
4476
|
var be, le = {}, se = null, Ke = null;
|
|
4477
4477
|
G !== void 0 && (q(G), se = "" + G), K(P) && (q(P.key), se = "" + P.key), I(P) && (Ke = P.ref, Q(P, he));
|
|
4478
4478
|
for (be in P)
|
|
4479
|
-
|
|
4479
|
+
dt.call(P, be) && !X.hasOwnProperty(be) && (le[be] = P[be]);
|
|
4480
4480
|
if (b && b.defaultProps) {
|
|
4481
4481
|
var Ne = b.defaultProps;
|
|
4482
4482
|
for (be in Ne)
|
|
@@ -4514,7 +4514,7 @@ Check the render method of \`` + b + "`.";
|
|
|
4514
4514
|
return "";
|
|
4515
4515
|
}
|
|
4516
4516
|
}
|
|
4517
|
-
function
|
|
4517
|
+
function lt(b) {
|
|
4518
4518
|
return "";
|
|
4519
4519
|
}
|
|
4520
4520
|
var Et = {};
|
|
@@ -4578,7 +4578,7 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4578
4578
|
return;
|
|
4579
4579
|
if (G) {
|
|
4580
4580
|
var Z = L(P);
|
|
4581
|
-
|
|
4581
|
+
ft(G, b.props, "prop", Z, b);
|
|
4582
4582
|
} else if (P.PropTypes !== void 0 && !fe) {
|
|
4583
4583
|
fe = !0;
|
|
4584
4584
|
var he = L(P);
|
|
@@ -4606,7 +4606,7 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4606
4606
|
if (!le) {
|
|
4607
4607
|
var se = "";
|
|
4608
4608
|
(b === void 0 || typeof b == "object" && b !== null && Object.keys(b).length === 0) && (se += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
4609
|
-
var Ke =
|
|
4609
|
+
var Ke = lt();
|
|
4610
4610
|
Ke ? se += Ke : se += Ue();
|
|
4611
4611
|
var Ne;
|
|
4612
4612
|
b === null ? Ne = "null" : At(b) ? Ne = "array" : b !== void 0 && b.$$typeof === e ? (Ne = "<" + (L(b.type) || "Unknown") + " />", se = " Did you accidentally export a JSX literal instead of a component?") : Ne = typeof b, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ne, se);
|
|
@@ -4615,19 +4615,19 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4615
4615
|
if (je == null)
|
|
4616
4616
|
return je;
|
|
4617
4617
|
if (le) {
|
|
4618
|
-
var
|
|
4619
|
-
if (
|
|
4618
|
+
var at = P.children;
|
|
4619
|
+
if (at !== void 0)
|
|
4620
4620
|
if (Z)
|
|
4621
|
-
if (At(
|
|
4622
|
-
for (var br = 0; br <
|
|
4623
|
-
yr(
|
|
4624
|
-
Object.freeze && Object.freeze(
|
|
4621
|
+
if (At(at)) {
|
|
4622
|
+
for (var br = 0; br < at.length; br++)
|
|
4623
|
+
yr(at[br], b);
|
|
4624
|
+
Object.freeze && Object.freeze(at);
|
|
4625
4625
|
} else
|
|
4626
4626
|
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
4627
4627
|
else
|
|
4628
|
-
yr(
|
|
4628
|
+
yr(at, b);
|
|
4629
4629
|
}
|
|
4630
|
-
if (
|
|
4630
|
+
if (dt.call(P, "key")) {
|
|
4631
4631
|
var rr = L(b), Ze = Object.keys(P).filter(function(Ra) {
|
|
4632
4632
|
return Ra !== "key";
|
|
4633
4633
|
}), Ds = Ze.length > 0 ? "{key: someKey, " + Ze.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
@@ -5283,7 +5283,7 @@ function Af({
|
|
|
5283
5283
|
De(() => {
|
|
5284
5284
|
k([]), R(/* @__PURE__ */ new Set()), oe(null), L(null), a === void 0 && ke(""), d && Me();
|
|
5285
5285
|
}, [s, d]);
|
|
5286
|
-
const
|
|
5286
|
+
const ct = re(async (S) => {
|
|
5287
5287
|
if (ge) {
|
|
5288
5288
|
oe(S), pe(null), Se(!0);
|
|
5289
5289
|
try {
|
|
@@ -5295,10 +5295,10 @@ function Af({
|
|
|
5295
5295
|
Se(!1);
|
|
5296
5296
|
}
|
|
5297
5297
|
}, [ge, t, s]), Ct = re((S) => {
|
|
5298
|
-
f == null || f(S), i &&
|
|
5299
|
-
}, [f, i,
|
|
5298
|
+
f == null || f(S), i && ct(S);
|
|
5299
|
+
}, [f, i, ct]), qt = re((S, I, K) => {
|
|
5300
5300
|
if (!o) {
|
|
5301
|
-
f == null || f(S), i &&
|
|
5301
|
+
f == null || f(S), i && ct(S);
|
|
5302
5302
|
return;
|
|
5303
5303
|
}
|
|
5304
5304
|
const Q = S.uid;
|
|
@@ -5344,7 +5344,7 @@ function Af({
|
|
|
5344
5344
|
const K = I instanceof Error ? I : new Error("Archive failed");
|
|
5345
5345
|
console.error("Archive error:", K), L(K.message), m == null || m(K);
|
|
5346
5346
|
}
|
|
5347
|
-
}, [ge, t, j, s, g, m]),
|
|
5347
|
+
}, [ge, t, j, s, g, m]), dt = re(() => {
|
|
5348
5348
|
if (j.size === D.length)
|
|
5349
5349
|
R(/* @__PURE__ */ new Set()), h == null || h([]);
|
|
5350
5350
|
else {
|
|
@@ -5357,13 +5357,13 @@ function Af({
|
|
|
5357
5357
|
delete: it,
|
|
5358
5358
|
archive: ot,
|
|
5359
5359
|
refresh: Me,
|
|
5360
|
-
selectAll:
|
|
5360
|
+
selectAll: dt,
|
|
5361
5361
|
clearSelection: Ut
|
|
5362
5362
|
}, Dt = (S) => {
|
|
5363
5363
|
if (!S) return "";
|
|
5364
5364
|
const I = new Date(S), K = /* @__PURE__ */ new Date();
|
|
5365
5365
|
return I.toDateString() === K.toDateString() ? I.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : I.toLocaleDateString([], { month: "short", day: "numeric" });
|
|
5366
|
-
},
|
|
5366
|
+
}, ft = (S, I) => /* @__PURE__ */ p.jsx("div", { style: {
|
|
5367
5367
|
padding: "12px 16px",
|
|
5368
5368
|
background: I ? _.selectedBackground : S.seen ? _.cardBackground : _.unreadBackground,
|
|
5369
5369
|
borderBottom: `1px solid ${_.border}`,
|
|
@@ -5394,7 +5394,7 @@ function Af({
|
|
|
5394
5394
|
color: _.textSecondary,
|
|
5395
5395
|
flexShrink: 0
|
|
5396
5396
|
}, children: Dt(S.date) })
|
|
5397
|
-
] }) }),
|
|
5397
|
+
] }) }), ht = (S) => /* @__PURE__ */ p.jsxs("div", { style: { padding: "24px" }, children: [
|
|
5398
5398
|
/* @__PURE__ */ p.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: _.text }, children: _r(S.subject) || "(No subject)" }),
|
|
5399
5399
|
/* @__PURE__ */ p.jsxs("div", { style: { fontSize: "14px", color: _.textSecondary, marginBottom: "16px" }, children: [
|
|
5400
5400
|
"From: ",
|
|
@@ -5508,7 +5508,7 @@ function Af({
|
|
|
5508
5508
|
padding: "48px",
|
|
5509
5509
|
textAlign: "center",
|
|
5510
5510
|
color: _.textSecondary
|
|
5511
|
-
}, children: "Loading..." }), Xe = C ||
|
|
5511
|
+
}, children: "Loading..." }), Xe = C || ft, q = x || ht, T = A || At, X = w || W, J = E || Ce;
|
|
5512
5512
|
return M && D.length === 0 ? /* @__PURE__ */ p.jsx("div", { style: { background: _.background, width: "100%", height: "100%" }, children: J() }) : /* @__PURE__ */ p.jsxs("div", { style: { display: "flex", background: _.background, width: "100%", height: "100%" }, children: [
|
|
5513
5513
|
/* @__PURE__ */ p.jsxs("div", { style: {
|
|
5514
5514
|
flex: i && ie ? "0 0 50%" : "1",
|
|
@@ -5753,7 +5753,7 @@ function Ns(r, e, t) {
|
|
|
5753
5753
|
return s && (r === s || n && r.previousSibling === s) || n && ds(r, t) !== void 0;
|
|
5754
5754
|
}
|
|
5755
5755
|
function Xu(r, e, t) {
|
|
5756
|
-
const n =
|
|
5756
|
+
const n = ut(t._window);
|
|
5757
5757
|
let s = null, o = null;
|
|
5758
5758
|
n !== null && n.anchorNode === r && (s = n.anchorOffset, o = n.focusOffset);
|
|
5759
5759
|
const i = r.nodeValue;
|
|
@@ -6087,7 +6087,7 @@ function Il(r) {
|
|
|
6087
6087
|
return r.nodeType === Zt ? r.nodeValue : null;
|
|
6088
6088
|
}
|
|
6089
6089
|
function ki(r, e, t) {
|
|
6090
|
-
const n =
|
|
6090
|
+
const n = ut(e._window);
|
|
6091
6091
|
if (n === null) return;
|
|
6092
6092
|
const s = n.anchorNode;
|
|
6093
6093
|
let { anchorOffset: o, focusOffset: i } = n;
|
|
@@ -6303,7 +6303,7 @@ function ac(r, e, t) {
|
|
|
6303
6303
|
}
|
|
6304
6304
|
n !== null && Ni(n, r, e);
|
|
6305
6305
|
}
|
|
6306
|
-
function
|
|
6306
|
+
function ut(r) {
|
|
6307
6307
|
return wt ? (r || window).getSelection() : null;
|
|
6308
6308
|
}
|
|
6309
6309
|
function uc(r) {
|
|
@@ -6739,7 +6739,7 @@ const Rt = Object.freeze({}), ei = 30, ti = [["keydown", function(r, e) {
|
|
|
6739
6739
|
const t = V(), n = r.data, s = Xl(r);
|
|
6740
6740
|
if (n != null && O(t) && Yl(t, s, n, r.timeStamp, !1)) {
|
|
6741
6741
|
Gr && (Ps(e, n), Gr = !1);
|
|
6742
|
-
const o = t.anchor.getNode(), i =
|
|
6742
|
+
const o = t.anchor.getNode(), i = ut(e._window);
|
|
6743
6743
|
if (i === null) return;
|
|
6744
6744
|
const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, u = l ? t.focus.offset : t.anchor.offset;
|
|
6745
6745
|
zn && !t.isCollapsed() && z(o) && i.anchorNode !== null && o.getTextContent().slice(0, a) + n + o.getTextContent().slice(a + u) === Il(i.anchorNode) || U(e, Sr, n);
|
|
@@ -6751,7 +6751,7 @@ const Rt = Object.freeze({}), ei = 30, ti = [["keydown", function(r, e) {
|
|
|
6751
6751
|
}), Cr = null;
|
|
6752
6752
|
}], ["click", function(r, e) {
|
|
6753
6753
|
nt(e, () => {
|
|
6754
|
-
const t = V(), n =
|
|
6754
|
+
const t = V(), n = ut(e._window), s = wn();
|
|
6755
6755
|
if (n) {
|
|
6756
6756
|
if (O(t)) {
|
|
6757
6757
|
const o = t.anchor, i = o.getNode();
|
|
@@ -6881,7 +6881,7 @@ let rn = 0, Hl = null, Jl = 0, Cr = null;
|
|
|
6881
6881
|
const Zn = /* @__PURE__ */ new WeakMap();
|
|
6882
6882
|
let ri = !1, ni = !1, nn = !1, Gr = !1, Ql = [0, "", 0, "root", 0];
|
|
6883
6883
|
function Yl(r, e, t, n, s) {
|
|
6884
|
-
const o = r.anchor, i = r.focus, l = o.getNode(), a = Be(), u =
|
|
6884
|
+
const o = r.anchor, i = r.focus, l = o.getNode(), a = Be(), u = ut(a._window), c = u !== null ? u.anchorNode : null, d = o.key, f = a.getElementByKey(d), h = t.length;
|
|
6885
6885
|
return d !== i.key || !z(l) || (!s && (!zn || Jl < n + 50) || l.isDirty() && h < 2 || Ol(t)) && o.offset !== i.offset && !l.isComposing() || sr(l) || l.isDirty() && h > 1 || (s || !zn) && f !== null && !l.isComposing() && c !== Gn(f) || u !== null && e !== null && (!e.collapsed || e.startContainer !== u.anchorNode || e.startOffset !== u.anchorOffset) || l.getFormat() !== r.format || l.getStyle() !== r.style || ic(r, l);
|
|
6886
6886
|
}
|
|
6887
6887
|
function ho(r, e) {
|
|
@@ -6946,7 +6946,7 @@ function Zl(r) {
|
|
|
6946
6946
|
}
|
|
6947
6947
|
const kr = /* @__PURE__ */ new Map();
|
|
6948
6948
|
function ea(r) {
|
|
6949
|
-
const e = r.target, t =
|
|
6949
|
+
const e = r.target, t = ut(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
|
|
6950
6950
|
if (t === null) return;
|
|
6951
6951
|
const n = Fl(t.anchorNode);
|
|
6952
6952
|
if (n === null) return;
|
|
@@ -8268,7 +8268,7 @@ class er {
|
|
|
8268
8268
|
return N(f) ? (m = f.__key, g = t ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), m = h.__key, t || g++), s.set(m, g, "element"), void (i && o.set(m, g, "element"));
|
|
8269
8269
|
}
|
|
8270
8270
|
}
|
|
8271
|
-
const a = Be(), u =
|
|
8271
|
+
const a = Be(), u = ut(a._window);
|
|
8272
8272
|
if (!u) return;
|
|
8273
8273
|
const c = a._blockCursorElement, d = a._rootElement;
|
|
8274
8274
|
if (d === null || c === null || !N(l) || l.isInline() || l.canBeEmpty() || Ni(c, a, d), function(f, h, g, m) {
|
|
@@ -8758,7 +8758,7 @@ function Jt(r, e) {
|
|
|
8758
8758
|
let B;
|
|
8759
8759
|
for (B in k) M.has(B) || (k === D && (k = Pl(v)), delete k[B]);
|
|
8760
8760
|
}(r, t);
|
|
8761
|
-
const w = s ? null :
|
|
8761
|
+
const w = s ? null : ut(r._window);
|
|
8762
8762
|
if (r._editable && w !== null && (a || l === null || l.dirty)) {
|
|
8763
8763
|
$e = r, Ie = t;
|
|
8764
8764
|
try {
|
|
@@ -8864,7 +8864,7 @@ function da(r, e, t) {
|
|
|
8864
8864
|
Ie = a, tt = !1, r._updating = !0, $e = r;
|
|
8865
8865
|
try {
|
|
8866
8866
|
u && (r._headless ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(C) {
|
|
8867
|
-
const x = C.getEditorState()._selection, A =
|
|
8867
|
+
const x = C.getEditorState()._selection, A = ut(C._window);
|
|
8868
8868
|
return O(x) || x == null ? Pi(x, A, C, null) : x.clone();
|
|
8869
8869
|
}(r));
|
|
8870
8870
|
const m = r._compositionKey;
|
|
@@ -9804,7 +9804,7 @@ class xs {
|
|
|
9804
9804
|
blur() {
|
|
9805
9805
|
const e = this._rootElement;
|
|
9806
9806
|
e !== null && e.blur();
|
|
9807
|
-
const t =
|
|
9807
|
+
const t = ut(this._window);
|
|
9808
9808
|
t !== null && t.removeAllRanges();
|
|
9809
9809
|
}
|
|
9810
9810
|
isEditable() {
|
|
@@ -10282,7 +10282,7 @@ async function $o(r, e, t) {
|
|
|
10282
10282
|
a(zo(r, e, t));
|
|
10283
10283
|
});
|
|
10284
10284
|
});
|
|
10285
|
-
const n = r.getRootElement(), s = r._window == null ? window.document : r._window.document, o =
|
|
10285
|
+
const n = r.getRootElement(), s = r._window == null ? window.document : r._window.document, o = ut(r._window);
|
|
10286
10286
|
if (n === null || o === null) return !1;
|
|
10287
10287
|
const i = s.createElement("span");
|
|
10288
10288
|
i.style.cssText = "position: fixed; top: -1000px;", i.append(s.createTextNode("#")), n.append(i);
|
|
@@ -10296,7 +10296,7 @@ async function $o(r, e, t) {
|
|
|
10296
10296
|
}
|
|
10297
10297
|
function zo(r, e, t) {
|
|
10298
10298
|
if (t === void 0) {
|
|
10299
|
-
const s =
|
|
10299
|
+
const s = ut(r._window);
|
|
10300
10300
|
if (!s) return !1;
|
|
10301
10301
|
const o = s.anchorNode, i = s.focusNode;
|
|
10302
10302
|
if (o !== null && i !== null && !yn(r, o, i)) return !1;
|
|
@@ -12365,16 +12365,16 @@ function Sf({
|
|
|
12365
12365
|
}, [l, t]);
|
|
12366
12366
|
const ze = (W) => {
|
|
12367
12367
|
Y(W), we(!1), i == null || i(W);
|
|
12368
|
-
}, ge = xe(null), [Me,
|
|
12368
|
+
}, ge = xe(null), [Me, ct] = H(!1), Ct = (W) => {
|
|
12369
12369
|
const Ce = W.target.files;
|
|
12370
12370
|
Ce && ie((Xe) => [...Xe, ...Array.from(Ce)]), ge.current && (ge.current.value = "");
|
|
12371
12371
|
}, qt = (W) => {
|
|
12372
|
-
W.preventDefault(), W.stopPropagation(),
|
|
12372
|
+
W.preventDefault(), W.stopPropagation(), ct(!0);
|
|
12373
12373
|
}, it = (W) => {
|
|
12374
|
-
W.preventDefault(), W.stopPropagation(),
|
|
12374
|
+
W.preventDefault(), W.stopPropagation(), ct(!1);
|
|
12375
12375
|
}, ot = (W) => {
|
|
12376
|
-
W.preventDefault(), W.stopPropagation(),
|
|
12377
|
-
},
|
|
12376
|
+
W.preventDefault(), W.stopPropagation(), ct(!1), W.dataTransfer.files && ie((Ce) => [...Ce, ...Array.from(W.dataTransfer.files)]);
|
|
12377
|
+
}, dt = (W) => W.type.startsWith("image/") ? "image" : W.type === "application/pdf" ? "picture_as_pdf" : W.type.includes("spreadsheet") || W.type.includes("excel") ? "table_chart" : W.type.includes("document") || W.type.includes("word") ? "description" : "attach_file", Ut = (W) => {
|
|
12378
12378
|
ie((Ce) => Ce.filter((Xe, q) => q !== W));
|
|
12379
12379
|
}, Wt = (W) => W < 1024 ? `${W} B` : W < 1024 * 1024 ? `${(W / 1024).toFixed(1)} KB` : `${(W / (1024 * 1024)).toFixed(1)} MB`, Dt = async () => {
|
|
12380
12380
|
if (!_.trim()) {
|
|
@@ -12414,7 +12414,7 @@ function Sf({
|
|
|
12414
12414
|
} finally {
|
|
12415
12415
|
_e(!1);
|
|
12416
12416
|
}
|
|
12417
|
-
},
|
|
12417
|
+
}, ft = {
|
|
12418
12418
|
width: "100%",
|
|
12419
12419
|
padding: "8px 12px",
|
|
12420
12420
|
fontSize: "14px",
|
|
@@ -12423,7 +12423,7 @@ function Sf({
|
|
|
12423
12423
|
background: v.inputBackground,
|
|
12424
12424
|
color: v.text,
|
|
12425
12425
|
outline: "none"
|
|
12426
|
-
},
|
|
12426
|
+
}, ht = {
|
|
12427
12427
|
display: "block",
|
|
12428
12428
|
fontSize: "12px",
|
|
12429
12429
|
fontWeight: 500,
|
|
@@ -12471,7 +12471,7 @@ function Sf({
|
|
|
12471
12471
|
}
|
|
12472
12472
|
),
|
|
12473
12473
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
12474
|
-
/* @__PURE__ */ p.jsx("label", { style:
|
|
12474
|
+
/* @__PURE__ */ p.jsx("label", { style: ht, children: "To" }),
|
|
12475
12475
|
/* @__PURE__ */ p.jsx(
|
|
12476
12476
|
"input",
|
|
12477
12477
|
{
|
|
@@ -12480,7 +12480,7 @@ function Sf({
|
|
|
12480
12480
|
onChange: (W) => D(W.target.value),
|
|
12481
12481
|
placeholder: "recipient@example.com",
|
|
12482
12482
|
disabled: d || oe,
|
|
12483
|
-
style:
|
|
12483
|
+
style: ft
|
|
12484
12484
|
}
|
|
12485
12485
|
)
|
|
12486
12486
|
] }),
|
|
@@ -12504,7 +12504,7 @@ function Sf({
|
|
|
12504
12504
|
),
|
|
12505
12505
|
Se && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
12506
12506
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
12507
|
-
/* @__PURE__ */ p.jsx("label", { style:
|
|
12507
|
+
/* @__PURE__ */ p.jsx("label", { style: ht, children: "CC" }),
|
|
12508
12508
|
/* @__PURE__ */ p.jsx(
|
|
12509
12509
|
"input",
|
|
12510
12510
|
{
|
|
@@ -12513,12 +12513,12 @@ function Sf({
|
|
|
12513
12513
|
onChange: (W) => M(W.target.value),
|
|
12514
12514
|
placeholder: "cc@example.com",
|
|
12515
12515
|
disabled: d || oe,
|
|
12516
|
-
style:
|
|
12516
|
+
style: ft
|
|
12517
12517
|
}
|
|
12518
12518
|
)
|
|
12519
12519
|
] }),
|
|
12520
12520
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
12521
|
-
/* @__PURE__ */ p.jsx("label", { style:
|
|
12521
|
+
/* @__PURE__ */ p.jsx("label", { style: ht, children: "BCC" }),
|
|
12522
12522
|
/* @__PURE__ */ p.jsx(
|
|
12523
12523
|
"input",
|
|
12524
12524
|
{
|
|
@@ -12527,13 +12527,13 @@ function Sf({
|
|
|
12527
12527
|
onChange: (W) => F(W.target.value),
|
|
12528
12528
|
placeholder: "bcc@example.com",
|
|
12529
12529
|
disabled: d || oe,
|
|
12530
|
-
style:
|
|
12530
|
+
style: ft
|
|
12531
12531
|
}
|
|
12532
12532
|
)
|
|
12533
12533
|
] })
|
|
12534
12534
|
] }),
|
|
12535
12535
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
12536
|
-
/* @__PURE__ */ p.jsx("label", { style:
|
|
12536
|
+
/* @__PURE__ */ p.jsx("label", { style: ht, children: "Subject" }),
|
|
12537
12537
|
/* @__PURE__ */ p.jsx(
|
|
12538
12538
|
"input",
|
|
12539
12539
|
{
|
|
@@ -12542,34 +12542,31 @@ function Sf({
|
|
|
12542
12542
|
onChange: (W) => j(W.target.value),
|
|
12543
12543
|
placeholder: "Email subject",
|
|
12544
12544
|
disabled: d || oe,
|
|
12545
|
-
style:
|
|
12545
|
+
style: ft
|
|
12546
12546
|
}
|
|
12547
12547
|
)
|
|
12548
12548
|
] }),
|
|
12549
|
-
/* @__PURE__ */ p.
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
}
|
|
12569
|
-
) })
|
|
12570
|
-
] }),
|
|
12549
|
+
/* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ p.jsx(
|
|
12550
|
+
af,
|
|
12551
|
+
{
|
|
12552
|
+
value: R,
|
|
12553
|
+
onChange: ze,
|
|
12554
|
+
placeholder: h,
|
|
12555
|
+
replyTo: n,
|
|
12556
|
+
theme: v,
|
|
12557
|
+
disabled: d || oe,
|
|
12558
|
+
minHeight: m,
|
|
12559
|
+
externalUpdate: ke ? l : void 0,
|
|
12560
|
+
insertText: a,
|
|
12561
|
+
insertTextTrigger: u,
|
|
12562
|
+
onAiRestructure: x,
|
|
12563
|
+
onAiProofread: A,
|
|
12564
|
+
onAiRewrite: w,
|
|
12565
|
+
renderAboveToolbar: E
|
|
12566
|
+
}
|
|
12567
|
+
) }) }),
|
|
12571
12568
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
12572
|
-
/* @__PURE__ */ p.jsx("label", { style: { ...
|
|
12569
|
+
/* @__PURE__ */ p.jsx("label", { style: { ...ht, marginBottom: "8px" }, children: "Attachments" }),
|
|
12573
12570
|
/* @__PURE__ */ p.jsx(
|
|
12574
12571
|
"input",
|
|
12575
12572
|
{
|
|
@@ -12624,7 +12621,7 @@ function Sf({
|
|
|
12624
12621
|
borderRadius: "8px"
|
|
12625
12622
|
},
|
|
12626
12623
|
children: [
|
|
12627
|
-
/* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: v.textSecondary }, children:
|
|
12624
|
+
/* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: v.textSecondary }, children: dt(W) }),
|
|
12628
12625
|
/* @__PURE__ */ p.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
12629
12626
|
/* @__PURE__ */ p.jsx("div", { style: { fontSize: "14px", fontWeight: 500, color: v.text, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: W.name }),
|
|
12630
12627
|
/* @__PURE__ */ p.jsx("div", { style: { fontSize: "12px", color: v.textSecondary }, children: Wt(W.size) })
|
|
@@ -13322,7 +13319,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13322
13319
|
ne.setInt16(Fe, Ue, !0), Fe += 2;
|
|
13323
13320
|
}
|
|
13324
13321
|
return new Blob([ae], { type: "audio/wav" });
|
|
13325
|
-
},
|
|
13322
|
+
}, ct = async (q, T, X, J) => {
|
|
13326
13323
|
const S = new AudioContext(), I = q.sampleRate, K = Math.max(q.numberOfChannels, T.numberOfChannels), Q = Math.min(X, q.length), ee = Math.max(0, q.length - X), ae = J === "insert" ? Q + T.length + ee : Q + T.length, ne = S.createBuffer(K, ae, I);
|
|
13327
13324
|
for (let te = 0; te < K; te++) {
|
|
13328
13325
|
const Ae = ne.getChannelData(te), Fe = te < q.numberOfChannels ? q.getChannelData(te) : q.getChannelData(0);
|
|
@@ -13355,18 +13352,18 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13355
13352
|
if (I.length > 0)
|
|
13356
13353
|
if (l === "recording")
|
|
13357
13354
|
for (let Ue = 0; Ue < I.length; Ue++) {
|
|
13358
|
-
const
|
|
13355
|
+
const lt = I.length - 1 - Ue, Et = ye - lt * 4;
|
|
13359
13356
|
if (Et < -3 || Et > J) continue;
|
|
13360
13357
|
const pt = I[Ue] * (S / 2 - 12), Pt = S / 2 - pt;
|
|
13361
13358
|
T.fillStyle = "#10b981", T.fillRect(Et, Pt, 3, pt * 2);
|
|
13362
13359
|
}
|
|
13363
13360
|
else {
|
|
13364
13361
|
const Ue = K > 0 ? Q / K * I.length : 0;
|
|
13365
|
-
for (let
|
|
13366
|
-
const Et = Ue -
|
|
13362
|
+
for (let lt = 0; lt < I.length; lt++) {
|
|
13363
|
+
const Et = Ue - lt, pt = ye - Et * 4;
|
|
13367
13364
|
if (pt < -3 || pt > J) continue;
|
|
13368
|
-
const Pt = I[
|
|
13369
|
-
T.fillStyle =
|
|
13365
|
+
const Pt = I[lt] * (S / 2 - 12), yr = S / 2 - Pt;
|
|
13366
|
+
T.fillStyle = lt <= Ue ? "#10b981" : "#4b5563", T.fillRect(pt, yr, 3, Pt * 2);
|
|
13370
13367
|
}
|
|
13371
13368
|
}
|
|
13372
13369
|
T.strokeStyle = "#ef4444", T.lineWidth = 1, T.beginPath(), T.moveTo(ye, 0), T.lineTo(ye, S), T.stroke(), T.fillStyle = "#fff", T.font = "bold 18px monospace", T.textAlign = "center", T.fillText(ze(Q), ye, S - 6), l === "recording" && (T.fillStyle = "#ef4444", T.beginPath(), T.arc(20, 20, 8, 0, Math.PI * 2), T.fill(), T.fillStyle = "#fff", T.font = "10px sans-serif", T.textAlign = "left", T.fillText("REC", 34, 24)), T.textAlign = "left";
|
|
@@ -13404,7 +13401,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13404
13401
|
let K, Q;
|
|
13405
13402
|
if (oe.current !== null && _e.current)
|
|
13406
13403
|
try {
|
|
13407
|
-
const ne = await ge(I), te = _e.current.sampleRate, Ae = Math.floor(oe.current * te), Fe = await
|
|
13404
|
+
const ne = await ge(I), te = _e.current.sampleRate, Ae = Math.floor(oe.current * te), Fe = await ct(
|
|
13408
13405
|
_e.current,
|
|
13409
13406
|
ne,
|
|
13410
13407
|
Ae,
|
|
@@ -13437,7 +13434,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13437
13434
|
}
|
|
13438
13435
|
}, ot = () => {
|
|
13439
13436
|
de.current = !1, w(!1), v(null), j.current && (cancelAnimationFrame(j.current), j.current = null), L.current && (clearInterval(L.current), L.current = null), D.current && D.current.state !== "inactive" && D.current.stop();
|
|
13440
|
-
},
|
|
13437
|
+
}, dt = (q) => {
|
|
13441
13438
|
const T = _.current;
|
|
13442
13439
|
if (!T) return;
|
|
13443
13440
|
const X = d || u;
|
|
@@ -13455,7 +13452,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13455
13452
|
const q = R.current;
|
|
13456
13453
|
q && (h ? (q.pause(), y(q.currentTime), g(!1)) : (q.currentTime = m, q.play().catch(() => {
|
|
13457
13454
|
}), g(!0)));
|
|
13458
|
-
},
|
|
13455
|
+
}, ft = async (q) => {
|
|
13459
13456
|
if (!Y.current) {
|
|
13460
13457
|
it();
|
|
13461
13458
|
return;
|
|
@@ -13469,7 +13466,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13469
13466
|
} catch {
|
|
13470
13467
|
x("Failed to prepare recording. Please try again.");
|
|
13471
13468
|
}
|
|
13472
|
-
},
|
|
13469
|
+
}, ht = () => {
|
|
13473
13470
|
R.current && (R.current.pause(), R.current = null), Y.current = null, _e.current = null, oe.current = null, pe.current = [], g(!1), y(0), f(0), c(0), it();
|
|
13474
13471
|
}, At = () => {
|
|
13475
13472
|
Y.current ? r(Y.current, d || u) : alert("No audio recorded yet!");
|
|
@@ -13527,12 +13524,12 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13527
13524
|
fe.addColorStop(0, Ae), fe.addColorStop(1, "transparent"), S.fillStyle = fe, S.fillRect(0, 0, te, Q);
|
|
13528
13525
|
const qe = S.createLinearGradient(K - te, 0, K, 0);
|
|
13529
13526
|
qe.addColorStop(0, "transparent"), qe.addColorStop(1, Ae), S.fillStyle = qe, S.fillRect(K - te, 0, te, Q), S.strokeStyle = "#5a6b62", S.lineWidth = 1, S.beginPath(), S.moveTo(0, Q / 2), S.lineTo(K, Q / 2), S.stroke();
|
|
13530
|
-
const Ue = K / 2,
|
|
13527
|
+
const Ue = K / 2, lt = 3, Et = 4, pt = ae > 0 ? ne / ae * ee.length : 0;
|
|
13531
13528
|
for (let tr = 0; tr < ee.length; tr++) {
|
|
13532
13529
|
const ws = pt - tr, xr = Ue - ws * Et;
|
|
13533
|
-
if (xr < -
|
|
13530
|
+
if (xr < -lt || xr > K) continue;
|
|
13534
13531
|
const Mr = ee[tr] * (Q / 2 - 12), Cs = Q / 2 - Mr;
|
|
13535
|
-
S.fillStyle = tr <= pt ? "#10b981" : "#4b5563", S.fillRect(xr, Cs,
|
|
13532
|
+
S.fillStyle = tr <= pt ? "#10b981" : "#4b5563", S.fillRect(xr, Cs, lt, Mr * 2);
|
|
13536
13533
|
}
|
|
13537
13534
|
S.strokeStyle = "#ef4444", S.lineWidth = 1, S.beginPath(), S.moveTo(Ue, 0), S.lineTo(Ue, Q), S.stroke(), S.fillStyle = "#fff", S.font = "bold 18px monospace", S.textAlign = "center";
|
|
13538
13535
|
const Pt = Math.floor(ne / 60), yr = Math.floor(ne % 60);
|
|
@@ -13585,7 +13582,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13585
13582
|
if (l === "editing") {
|
|
13586
13583
|
Oe.current = !0, we.current = q.clientX, Ge.current = m;
|
|
13587
13584
|
const T = (J) => {
|
|
13588
|
-
Oe.current &&
|
|
13585
|
+
Oe.current && dt(J.clientX);
|
|
13589
13586
|
}, X = () => {
|
|
13590
13587
|
Oe.current = !1, window.removeEventListener("mousemove", T), window.removeEventListener("mouseup", X);
|
|
13591
13588
|
};
|
|
@@ -13650,7 +13647,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13650
13647
|
"button",
|
|
13651
13648
|
{
|
|
13652
13649
|
onClick: () => {
|
|
13653
|
-
E === "insert" ? ot() : l === "idle" ? (v("insert"), it()) : l === "editing" && (v("insert"),
|
|
13650
|
+
E === "insert" ? ot() : l === "idle" ? (v("insert"), it()) : l === "editing" && (v("insert"), ft("insert"));
|
|
13654
13651
|
},
|
|
13655
13652
|
disabled: l === "recording" && E !== "insert" || h,
|
|
13656
13653
|
style: l === "recording" && E !== "insert" || h ? Ce : W,
|
|
@@ -13662,7 +13659,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13662
13659
|
"button",
|
|
13663
13660
|
{
|
|
13664
13661
|
onClick: () => {
|
|
13665
|
-
E === "mic" ? ot() : l === "idle" ? (v("mic"), it()) : l === "editing" && (v("mic"),
|
|
13662
|
+
E === "mic" ? ot() : l === "idle" ? (v("mic"), it()) : l === "editing" && (v("mic"), ft("replace"));
|
|
13666
13663
|
},
|
|
13667
13664
|
disabled: l === "recording" && E !== "mic" || h,
|
|
13668
13665
|
style: l === "recording" && E !== "mic" || h ? Ce : W,
|
|
@@ -13674,7 +13671,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13674
13671
|
"button",
|
|
13675
13672
|
{
|
|
13676
13673
|
onClick: () => {
|
|
13677
|
-
E === "startover" ? ot() : l === "editing" && (v("startover"),
|
|
13674
|
+
E === "startover" ? ot() : l === "editing" && (v("startover"), ht());
|
|
13678
13675
|
},
|
|
13679
13676
|
disabled: l === "idle" || l === "recording" && E !== "startover" || h,
|
|
13680
13677
|
style: l === "idle" || l === "recording" && E !== "startover" || h ? Ce : W,
|
package/package.json
CHANGED