@qwanyx/stack 0.2.41 → 0.2.42
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 +17 -17
- package/dist/index.esm.js +420 -420
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3630,10 +3630,10 @@ class uu {
|
|
|
3630
3630
|
for (const h of c.messages)
|
|
3631
3631
|
h.uid && d.set(h.uid, h);
|
|
3632
3632
|
const f = a.map((h) => {
|
|
3633
|
-
var A, w, E, v,
|
|
3633
|
+
var A, w, E, v, b;
|
|
3634
3634
|
const g = d.get(h);
|
|
3635
3635
|
if (!g) return null;
|
|
3636
|
-
const m = ((A = g.flags) == null ? void 0 : A.some((D) => D.includes("Seen"))) || !1, y = ((E = (w = g.envelope) == null ? void 0 : w.from) == null ? void 0 : E.email) || "Unknown", C = ((v = g.envelope) == null ? void 0 : v.subject) || "(No subject)", x = ((
|
|
3636
|
+
const m = ((A = g.flags) == null ? void 0 : A.some((D) => D.includes("Seen"))) || !1, y = ((E = (w = g.envelope) == null ? void 0 : w.from) == null ? void 0 : E.email) || "Unknown", C = ((v = g.envelope) == null ? void 0 : v.subject) || "(No subject)", x = ((b = g.envelope) == null ? void 0 : b.date) || "";
|
|
3637
3637
|
return { uid: h, from: y, subject: C, date: x, seen: m };
|
|
3638
3638
|
}).filter(Boolean);
|
|
3639
3639
|
return {
|
|
@@ -3697,8 +3697,8 @@ class uu {
|
|
|
3697
3697
|
const c = /* @__PURE__ */ new Map();
|
|
3698
3698
|
for (const w of u.attachments || [])
|
|
3699
3699
|
if (w.contentId) {
|
|
3700
|
-
const E = this.contentToBase64(w.content), v = `data:${w.mimeType};base64,${E}`,
|
|
3701
|
-
c.set(
|
|
3700
|
+
const E = this.contentToBase64(w.content), v = `data:${w.mimeType};base64,${E}`, b = w.contentId.replace(/^<|>$/g, "");
|
|
3701
|
+
c.set(b, v), c.set(`<${b}>`, v);
|
|
3702
3702
|
}
|
|
3703
3703
|
let d = u.html || "";
|
|
3704
3704
|
d && c.size > 0 && (d = d.replace(/src=["']cid:([^"']+)["']/gi, (w, E) => {
|
|
@@ -4068,57 +4068,57 @@ var Ji;
|
|
|
4068
4068
|
function pu() {
|
|
4069
4069
|
return Ji || (Ji = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4070
4070
|
var r = He, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, m = "@@iterator";
|
|
4071
|
-
function y(
|
|
4072
|
-
if (
|
|
4071
|
+
function y(_) {
|
|
4072
|
+
if (_ === null || typeof _ != "object")
|
|
4073
4073
|
return null;
|
|
4074
|
-
var P = g &&
|
|
4074
|
+
var P = g && _[g] || _[m];
|
|
4075
4075
|
return typeof P == "function" ? P : null;
|
|
4076
4076
|
}
|
|
4077
4077
|
var C = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
4078
|
-
function x(
|
|
4078
|
+
function x(_) {
|
|
4079
4079
|
{
|
|
4080
4080
|
for (var P = arguments.length, G = new Array(P > 1 ? P - 1 : 0), Z = 1; Z < P; Z++)
|
|
4081
4081
|
G[Z - 1] = arguments[Z];
|
|
4082
|
-
A("error",
|
|
4082
|
+
A("error", _, G);
|
|
4083
4083
|
}
|
|
4084
4084
|
}
|
|
4085
|
-
function A(
|
|
4085
|
+
function A(_, P, G) {
|
|
4086
4086
|
{
|
|
4087
4087
|
var Z = C.ReactDebugCurrentFrame, he = Z.getStackAddendum();
|
|
4088
4088
|
he !== "" && (P += "%s", G = G.concat([he]));
|
|
4089
|
-
var
|
|
4089
|
+
var _e = G.map(function(le) {
|
|
4090
4090
|
return String(le);
|
|
4091
4091
|
});
|
|
4092
|
-
|
|
4092
|
+
_e.unshift("Warning: " + P), Function.prototype.apply.call(console[_], console, _e);
|
|
4093
4093
|
}
|
|
4094
4094
|
}
|
|
4095
|
-
var w = !1, E = !1, v = !1,
|
|
4095
|
+
var w = !1, E = !1, v = !1, b = !1, D = !1, k;
|
|
4096
4096
|
k = Symbol.for("react.module.reference");
|
|
4097
|
-
function M(
|
|
4098
|
-
return !!(typeof
|
|
4097
|
+
function M(_) {
|
|
4098
|
+
return !!(typeof _ == "string" || typeof _ == "function" || _ === n || _ === o || D || _ === s || _ === u || _ === c || b || _ === h || w || E || v || typeof _ == "object" && _ !== null && (_.$$typeof === f || _.$$typeof === d || _.$$typeof === i || _.$$typeof === l || _.$$typeof === a || // This needs to include all possible module reference object
|
|
4099
4099
|
// types supported by any Flight configuration anywhere since
|
|
4100
4100
|
// we don't know which Flight build this will end up being used
|
|
4101
4101
|
// with.
|
|
4102
|
-
|
|
4102
|
+
_.$$typeof === k || _.getModuleId !== void 0));
|
|
4103
4103
|
}
|
|
4104
|
-
function B(
|
|
4105
|
-
var Z =
|
|
4104
|
+
function B(_, P, G) {
|
|
4105
|
+
var Z = _.displayName;
|
|
4106
4106
|
if (Z)
|
|
4107
4107
|
return Z;
|
|
4108
4108
|
var he = P.displayName || P.name || "";
|
|
4109
4109
|
return he !== "" ? G + "(" + he + ")" : G;
|
|
4110
4110
|
}
|
|
4111
|
-
function F(
|
|
4112
|
-
return
|
|
4111
|
+
function F(_) {
|
|
4112
|
+
return _.displayName || "Context";
|
|
4113
4113
|
}
|
|
4114
|
-
function L(
|
|
4115
|
-
if (
|
|
4114
|
+
function L(_) {
|
|
4115
|
+
if (_ == null)
|
|
4116
4116
|
return null;
|
|
4117
|
-
if (typeof
|
|
4118
|
-
return
|
|
4119
|
-
if (typeof
|
|
4120
|
-
return
|
|
4121
|
-
switch (
|
|
4117
|
+
if (typeof _.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof _ == "function")
|
|
4118
|
+
return _.displayName || _.name || null;
|
|
4119
|
+
if (typeof _ == "string")
|
|
4120
|
+
return _;
|
|
4121
|
+
switch (_) {
|
|
4122
4122
|
case n:
|
|
4123
4123
|
return "Fragment";
|
|
4124
4124
|
case t:
|
|
@@ -4132,23 +4132,23 @@ function pu() {
|
|
|
4132
4132
|
case c:
|
|
4133
4133
|
return "SuspenseList";
|
|
4134
4134
|
}
|
|
4135
|
-
if (typeof
|
|
4136
|
-
switch (
|
|
4135
|
+
if (typeof _ == "object")
|
|
4136
|
+
switch (_.$$typeof) {
|
|
4137
4137
|
case l:
|
|
4138
|
-
var P =
|
|
4138
|
+
var P = _;
|
|
4139
4139
|
return F(P) + ".Consumer";
|
|
4140
4140
|
case i:
|
|
4141
|
-
var G =
|
|
4141
|
+
var G = _;
|
|
4142
4142
|
return F(G._context) + ".Provider";
|
|
4143
4143
|
case a:
|
|
4144
|
-
return B(
|
|
4144
|
+
return B(_, _.render, "ForwardRef");
|
|
4145
4145
|
case d:
|
|
4146
|
-
var Z =
|
|
4147
|
-
return Z !== null ? Z : L(
|
|
4146
|
+
var Z = _.displayName || null;
|
|
4147
|
+
return Z !== null ? Z : L(_.type) || "Memo";
|
|
4148
4148
|
case f: {
|
|
4149
|
-
var he =
|
|
4149
|
+
var he = _, _e = he._payload, le = he._init;
|
|
4150
4150
|
try {
|
|
4151
|
-
return L(le(
|
|
4151
|
+
return L(le(_e));
|
|
4152
4152
|
} catch {
|
|
4153
4153
|
return null;
|
|
4154
4154
|
}
|
|
@@ -4156,28 +4156,28 @@ function pu() {
|
|
|
4156
4156
|
}
|
|
4157
4157
|
return null;
|
|
4158
4158
|
}
|
|
4159
|
-
var j = Object.assign, R = 0, Y, de, ie, oe,
|
|
4159
|
+
var j = Object.assign, R = 0, Y, de, ie, oe, ve, pe, we;
|
|
4160
4160
|
function Se() {
|
|
4161
4161
|
}
|
|
4162
4162
|
Se.__reactDisabledLog = !0;
|
|
4163
4163
|
function Oe() {
|
|
4164
4164
|
{
|
|
4165
4165
|
if (R === 0) {
|
|
4166
|
-
Y = console.log, de = console.info, ie = console.warn, oe = console.error,
|
|
4167
|
-
var
|
|
4166
|
+
Y = console.log, de = console.info, ie = console.warn, oe = console.error, ve = console.group, pe = console.groupCollapsed, we = console.groupEnd;
|
|
4167
|
+
var _ = {
|
|
4168
4168
|
configurable: !0,
|
|
4169
4169
|
enumerable: !0,
|
|
4170
4170
|
value: Se,
|
|
4171
4171
|
writable: !0
|
|
4172
4172
|
};
|
|
4173
4173
|
Object.defineProperties(console, {
|
|
4174
|
-
info:
|
|
4175
|
-
log:
|
|
4176
|
-
warn:
|
|
4177
|
-
error:
|
|
4178
|
-
group:
|
|
4179
|
-
groupCollapsed:
|
|
4180
|
-
groupEnd:
|
|
4174
|
+
info: _,
|
|
4175
|
+
log: _,
|
|
4176
|
+
warn: _,
|
|
4177
|
+
error: _,
|
|
4178
|
+
group: _,
|
|
4179
|
+
groupCollapsed: _,
|
|
4180
|
+
groupEnd: _
|
|
4181
4181
|
});
|
|
4182
4182
|
}
|
|
4183
4183
|
R++;
|
|
@@ -4186,40 +4186,40 @@ function pu() {
|
|
|
4186
4186
|
function ke() {
|
|
4187
4187
|
{
|
|
4188
4188
|
if (R--, R === 0) {
|
|
4189
|
-
var
|
|
4189
|
+
var _ = {
|
|
4190
4190
|
configurable: !0,
|
|
4191
4191
|
enumerable: !0,
|
|
4192
4192
|
writable: !0
|
|
4193
4193
|
};
|
|
4194
4194
|
Object.defineProperties(console, {
|
|
4195
|
-
log: j({},
|
|
4195
|
+
log: j({}, _, {
|
|
4196
4196
|
value: Y
|
|
4197
4197
|
}),
|
|
4198
|
-
info: j({},
|
|
4198
|
+
info: j({}, _, {
|
|
4199
4199
|
value: de
|
|
4200
4200
|
}),
|
|
4201
|
-
warn: j({},
|
|
4201
|
+
warn: j({}, _, {
|
|
4202
4202
|
value: ie
|
|
4203
4203
|
}),
|
|
4204
|
-
error: j({},
|
|
4204
|
+
error: j({}, _, {
|
|
4205
4205
|
value: oe
|
|
4206
4206
|
}),
|
|
4207
|
-
group: j({},
|
|
4208
|
-
value:
|
|
4207
|
+
group: j({}, _, {
|
|
4208
|
+
value: ve
|
|
4209
4209
|
}),
|
|
4210
|
-
groupCollapsed: j({},
|
|
4210
|
+
groupCollapsed: j({}, _, {
|
|
4211
4211
|
value: pe
|
|
4212
4212
|
}),
|
|
4213
|
-
groupEnd: j({},
|
|
4214
|
-
value:
|
|
4213
|
+
groupEnd: j({}, _, {
|
|
4214
|
+
value: we
|
|
4215
4215
|
})
|
|
4216
4216
|
});
|
|
4217
4217
|
}
|
|
4218
4218
|
R < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
4221
|
-
var
|
|
4222
|
-
function ze(
|
|
4221
|
+
var Ce = C.ReactCurrentDispatcher, Ge;
|
|
4222
|
+
function ze(_, P, G) {
|
|
4223
4223
|
{
|
|
4224
4224
|
if (Ge === void 0)
|
|
4225
4225
|
try {
|
|
@@ -4229,7 +4229,7 @@ function pu() {
|
|
|
4229
4229
|
Ge = Z && Z[1] || "";
|
|
4230
4230
|
}
|
|
4231
4231
|
return `
|
|
4232
|
-
` + Ge +
|
|
4232
|
+
` + Ge + _;
|
|
4233
4233
|
}
|
|
4234
4234
|
}
|
|
4235
4235
|
var ge = !1, Me;
|
|
@@ -4237,11 +4237,11 @@ function pu() {
|
|
|
4237
4237
|
var ct = typeof WeakMap == "function" ? WeakMap : Map;
|
|
4238
4238
|
Me = new ct();
|
|
4239
4239
|
}
|
|
4240
|
-
function Ct(
|
|
4241
|
-
if (!
|
|
4240
|
+
function Ct(_, P) {
|
|
4241
|
+
if (!_ || ge)
|
|
4242
4242
|
return "";
|
|
4243
4243
|
{
|
|
4244
|
-
var G = Me.get(
|
|
4244
|
+
var G = Me.get(_);
|
|
4245
4245
|
if (G !== void 0)
|
|
4246
4246
|
return G;
|
|
4247
4247
|
}
|
|
@@ -4249,8 +4249,8 @@ function pu() {
|
|
|
4249
4249
|
ge = !0;
|
|
4250
4250
|
var he = Error.prepareStackTrace;
|
|
4251
4251
|
Error.prepareStackTrace = void 0;
|
|
4252
|
-
var
|
|
4253
|
-
|
|
4252
|
+
var _e;
|
|
4253
|
+
_e = Ce.current, Ce.current = null, Oe();
|
|
4254
4254
|
try {
|
|
4255
4255
|
if (P) {
|
|
4256
4256
|
var le = function() {
|
|
@@ -4266,14 +4266,14 @@ function pu() {
|
|
|
4266
4266
|
} catch (Ze) {
|
|
4267
4267
|
Z = Ze;
|
|
4268
4268
|
}
|
|
4269
|
-
Reflect.construct(
|
|
4269
|
+
Reflect.construct(_, [], le);
|
|
4270
4270
|
} else {
|
|
4271
4271
|
try {
|
|
4272
4272
|
le.call();
|
|
4273
4273
|
} catch (Ze) {
|
|
4274
4274
|
Z = Ze;
|
|
4275
4275
|
}
|
|
4276
|
-
|
|
4276
|
+
_.call(le.prototype);
|
|
4277
4277
|
}
|
|
4278
4278
|
} else {
|
|
4279
4279
|
try {
|
|
@@ -4281,7 +4281,7 @@ function pu() {
|
|
|
4281
4281
|
} catch (Ze) {
|
|
4282
4282
|
Z = Ze;
|
|
4283
4283
|
}
|
|
4284
|
-
|
|
4284
|
+
_();
|
|
4285
4285
|
}
|
|
4286
4286
|
} catch (Ze) {
|
|
4287
4287
|
if (Ze && Z && typeof Ze.stack == "string") {
|
|
@@ -4296,48 +4296,48 @@ function pu() {
|
|
|
4296
4296
|
if (Ne--, je--, je < 0 || se[Ne] !== Ke[je]) {
|
|
4297
4297
|
var at = `
|
|
4298
4298
|
` + se[Ne].replace(" at new ", " at ");
|
|
4299
|
-
return
|
|
4299
|
+
return _.displayName && at.includes("<anonymous>") && (at = at.replace("<anonymous>", _.displayName)), typeof _ == "function" && Me.set(_, at), at;
|
|
4300
4300
|
}
|
|
4301
4301
|
while (Ne >= 1 && je >= 0);
|
|
4302
4302
|
break;
|
|
4303
4303
|
}
|
|
4304
4304
|
}
|
|
4305
4305
|
} finally {
|
|
4306
|
-
ge = !1,
|
|
4306
|
+
ge = !1, Ce.current = _e, ke(), Error.prepareStackTrace = he;
|
|
4307
4307
|
}
|
|
4308
|
-
var br =
|
|
4309
|
-
return typeof
|
|
4308
|
+
var br = _ ? _.displayName || _.name : "", rr = br ? ze(br) : "";
|
|
4309
|
+
return typeof _ == "function" && Me.set(_, rr), rr;
|
|
4310
4310
|
}
|
|
4311
|
-
function qt(
|
|
4312
|
-
return Ct(
|
|
4311
|
+
function qt(_, P, G) {
|
|
4312
|
+
return Ct(_, !1);
|
|
4313
4313
|
}
|
|
4314
|
-
function it(
|
|
4315
|
-
var P =
|
|
4314
|
+
function it(_) {
|
|
4315
|
+
var P = _.prototype;
|
|
4316
4316
|
return !!(P && P.isReactComponent);
|
|
4317
4317
|
}
|
|
4318
|
-
function ot(
|
|
4319
|
-
if (
|
|
4318
|
+
function ot(_, P, G) {
|
|
4319
|
+
if (_ == null)
|
|
4320
4320
|
return "";
|
|
4321
|
-
if (typeof
|
|
4322
|
-
return Ct(
|
|
4323
|
-
if (typeof
|
|
4324
|
-
return ze(
|
|
4325
|
-
switch (
|
|
4321
|
+
if (typeof _ == "function")
|
|
4322
|
+
return Ct(_, it(_));
|
|
4323
|
+
if (typeof _ == "string")
|
|
4324
|
+
return ze(_);
|
|
4325
|
+
switch (_) {
|
|
4326
4326
|
case u:
|
|
4327
4327
|
return ze("Suspense");
|
|
4328
4328
|
case c:
|
|
4329
4329
|
return ze("SuspenseList");
|
|
4330
4330
|
}
|
|
4331
|
-
if (typeof
|
|
4332
|
-
switch (
|
|
4331
|
+
if (typeof _ == "object")
|
|
4332
|
+
switch (_.$$typeof) {
|
|
4333
4333
|
case a:
|
|
4334
|
-
return qt(
|
|
4334
|
+
return qt(_.render);
|
|
4335
4335
|
case d:
|
|
4336
|
-
return ot(
|
|
4336
|
+
return ot(_.type, P, G);
|
|
4337
4337
|
case f: {
|
|
4338
|
-
var Z =
|
|
4338
|
+
var Z = _, he = Z._payload, _e = Z._init;
|
|
4339
4339
|
try {
|
|
4340
|
-
return ot(
|
|
4340
|
+
return ot(_e(he), P, G);
|
|
4341
4341
|
} catch {
|
|
4342
4342
|
}
|
|
4343
4343
|
}
|
|
@@ -4345,25 +4345,25 @@ function pu() {
|
|
|
4345
4345
|
return "";
|
|
4346
4346
|
}
|
|
4347
4347
|
var dt = Object.prototype.hasOwnProperty, Ut = {}, Wt = C.ReactDebugCurrentFrame;
|
|
4348
|
-
function Dt(
|
|
4349
|
-
if (
|
|
4350
|
-
var P =
|
|
4348
|
+
function Dt(_) {
|
|
4349
|
+
if (_) {
|
|
4350
|
+
var P = _._owner, G = ot(_.type, _._source, P ? P.type : null);
|
|
4351
4351
|
Wt.setExtraStackFrame(G);
|
|
4352
4352
|
} else
|
|
4353
4353
|
Wt.setExtraStackFrame(null);
|
|
4354
4354
|
}
|
|
4355
|
-
function ft(
|
|
4355
|
+
function ft(_, P, G, Z, he) {
|
|
4356
4356
|
{
|
|
4357
|
-
var
|
|
4358
|
-
for (var le in
|
|
4359
|
-
if (
|
|
4357
|
+
var _e = Function.call.bind(dt);
|
|
4358
|
+
for (var le in _)
|
|
4359
|
+
if (_e(_, le)) {
|
|
4360
4360
|
var se = void 0;
|
|
4361
4361
|
try {
|
|
4362
|
-
if (typeof
|
|
4363
|
-
var Ke = Error((Z || "React class") + ": " + G + " type `" + le + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
4362
|
+
if (typeof _[le] != "function") {
|
|
4363
|
+
var Ke = Error((Z || "React class") + ": " + G + " type `" + le + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof _[le] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
4364
4364
|
throw Ke.name = "Invariant Violation", Ke;
|
|
4365
4365
|
}
|
|
4366
|
-
se =
|
|
4366
|
+
se = _[le](P, le, Z, G, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
4367
4367
|
} catch (Ne) {
|
|
4368
4368
|
se = Ne;
|
|
4369
4369
|
}
|
|
@@ -4372,28 +4372,28 @@ function pu() {
|
|
|
4372
4372
|
}
|
|
4373
4373
|
}
|
|
4374
4374
|
var ht = Array.isArray;
|
|
4375
|
-
function At(
|
|
4376
|
-
return ht(
|
|
4375
|
+
function At(_) {
|
|
4376
|
+
return ht(_);
|
|
4377
4377
|
}
|
|
4378
|
-
function W(
|
|
4378
|
+
function W(_) {
|
|
4379
4379
|
{
|
|
4380
|
-
var P = typeof Symbol == "function" && Symbol.toStringTag, G = P &&
|
|
4380
|
+
var P = typeof Symbol == "function" && Symbol.toStringTag, G = P && _[Symbol.toStringTag] || _.constructor.name || "Object";
|
|
4381
4381
|
return G;
|
|
4382
4382
|
}
|
|
4383
4383
|
}
|
|
4384
|
-
function
|
|
4384
|
+
function be(_) {
|
|
4385
4385
|
try {
|
|
4386
|
-
return Xe(
|
|
4386
|
+
return Xe(_), !1;
|
|
4387
4387
|
} catch {
|
|
4388
4388
|
return !0;
|
|
4389
4389
|
}
|
|
4390
4390
|
}
|
|
4391
|
-
function Xe(
|
|
4392
|
-
return "" +
|
|
4391
|
+
function Xe(_) {
|
|
4392
|
+
return "" + _;
|
|
4393
4393
|
}
|
|
4394
|
-
function q(
|
|
4395
|
-
if (
|
|
4396
|
-
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", W(
|
|
4394
|
+
function q(_) {
|
|
4395
|
+
if (be(_))
|
|
4396
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", W(_)), Xe(_);
|
|
4397
4397
|
}
|
|
4398
4398
|
var T = C.ReactCurrentOwner, X = {
|
|
4399
4399
|
key: !0,
|
|
@@ -4401,58 +4401,58 @@ function pu() {
|
|
|
4401
4401
|
__self: !0,
|
|
4402
4402
|
__source: !0
|
|
4403
4403
|
}, J, S;
|
|
4404
|
-
function I(
|
|
4405
|
-
if (dt.call(
|
|
4406
|
-
var P = Object.getOwnPropertyDescriptor(
|
|
4404
|
+
function I(_) {
|
|
4405
|
+
if (dt.call(_, "ref")) {
|
|
4406
|
+
var P = Object.getOwnPropertyDescriptor(_, "ref").get;
|
|
4407
4407
|
if (P && P.isReactWarning)
|
|
4408
4408
|
return !1;
|
|
4409
4409
|
}
|
|
4410
|
-
return
|
|
4410
|
+
return _.ref !== void 0;
|
|
4411
4411
|
}
|
|
4412
|
-
function K(
|
|
4413
|
-
if (dt.call(
|
|
4414
|
-
var P = Object.getOwnPropertyDescriptor(
|
|
4412
|
+
function K(_) {
|
|
4413
|
+
if (dt.call(_, "key")) {
|
|
4414
|
+
var P = Object.getOwnPropertyDescriptor(_, "key").get;
|
|
4415
4415
|
if (P && P.isReactWarning)
|
|
4416
4416
|
return !1;
|
|
4417
4417
|
}
|
|
4418
|
-
return
|
|
4418
|
+
return _.key !== void 0;
|
|
4419
4419
|
}
|
|
4420
|
-
function Q(
|
|
4421
|
-
typeof
|
|
4420
|
+
function Q(_, P) {
|
|
4421
|
+
typeof _.ref == "string" && T.current;
|
|
4422
4422
|
}
|
|
4423
|
-
function ee(
|
|
4423
|
+
function ee(_, P) {
|
|
4424
4424
|
{
|
|
4425
4425
|
var G = function() {
|
|
4426
4426
|
J || (J = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", P));
|
|
4427
4427
|
};
|
|
4428
|
-
G.isReactWarning = !0, Object.defineProperty(
|
|
4428
|
+
G.isReactWarning = !0, Object.defineProperty(_, "key", {
|
|
4429
4429
|
get: G,
|
|
4430
4430
|
configurable: !0
|
|
4431
4431
|
});
|
|
4432
4432
|
}
|
|
4433
4433
|
}
|
|
4434
|
-
function ae(
|
|
4434
|
+
function ae(_, P) {
|
|
4435
4435
|
{
|
|
4436
4436
|
var G = function() {
|
|
4437
4437
|
S || (S = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", P));
|
|
4438
4438
|
};
|
|
4439
|
-
G.isReactWarning = !0, Object.defineProperty(
|
|
4439
|
+
G.isReactWarning = !0, Object.defineProperty(_, "ref", {
|
|
4440
4440
|
get: G,
|
|
4441
4441
|
configurable: !0
|
|
4442
4442
|
});
|
|
4443
4443
|
}
|
|
4444
4444
|
}
|
|
4445
|
-
var ne = function(
|
|
4445
|
+
var ne = function(_, P, G, Z, he, _e, le) {
|
|
4446
4446
|
var se = {
|
|
4447
4447
|
// This tag allows us to uniquely identify this as a React Element
|
|
4448
4448
|
$$typeof: e,
|
|
4449
4449
|
// Built-in properties that belong on the element
|
|
4450
|
-
type:
|
|
4450
|
+
type: _,
|
|
4451
4451
|
key: P,
|
|
4452
4452
|
ref: G,
|
|
4453
4453
|
props: le,
|
|
4454
4454
|
// Record the component responsible for creating this element.
|
|
4455
|
-
_owner:
|
|
4455
|
+
_owner: _e
|
|
4456
4456
|
};
|
|
4457
4457
|
return se._store = {}, Object.defineProperty(se._store, "validated", {
|
|
4458
4458
|
configurable: !1,
|
|
@@ -4471,58 +4471,58 @@ function pu() {
|
|
|
4471
4471
|
value: he
|
|
4472
4472
|
}), Object.freeze && (Object.freeze(se.props), Object.freeze(se)), se;
|
|
4473
4473
|
};
|
|
4474
|
-
function te(
|
|
4474
|
+
function te(_, P, G, Z, he) {
|
|
4475
4475
|
{
|
|
4476
|
-
var
|
|
4476
|
+
var _e, 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
|
-
for (
|
|
4479
|
-
dt.call(P,
|
|
4480
|
-
if (
|
|
4481
|
-
var Ne =
|
|
4482
|
-
for (
|
|
4483
|
-
le[
|
|
4478
|
+
for (_e in P)
|
|
4479
|
+
dt.call(P, _e) && !X.hasOwnProperty(_e) && (le[_e] = P[_e]);
|
|
4480
|
+
if (_ && _.defaultProps) {
|
|
4481
|
+
var Ne = _.defaultProps;
|
|
4482
|
+
for (_e in Ne)
|
|
4483
|
+
le[_e] === void 0 && (le[_e] = Ne[_e]);
|
|
4484
4484
|
}
|
|
4485
4485
|
if (se || Ke) {
|
|
4486
|
-
var je = typeof
|
|
4486
|
+
var je = typeof _ == "function" ? _.displayName || _.name || "Unknown" : _;
|
|
4487
4487
|
se && ee(le, je), Ke && ae(le, je);
|
|
4488
4488
|
}
|
|
4489
|
-
return ne(
|
|
4489
|
+
return ne(_, se, Ke, he, Z, T.current, le);
|
|
4490
4490
|
}
|
|
4491
4491
|
}
|
|
4492
4492
|
var Ae = C.ReactCurrentOwner, Fe = C.ReactDebugCurrentFrame;
|
|
4493
|
-
function ye(
|
|
4494
|
-
if (
|
|
4495
|
-
var P =
|
|
4493
|
+
function ye(_) {
|
|
4494
|
+
if (_) {
|
|
4495
|
+
var P = _._owner, G = ot(_.type, _._source, P ? P.type : null);
|
|
4496
4496
|
Fe.setExtraStackFrame(G);
|
|
4497
4497
|
} else
|
|
4498
4498
|
Fe.setExtraStackFrame(null);
|
|
4499
4499
|
}
|
|
4500
4500
|
var fe;
|
|
4501
4501
|
fe = !1;
|
|
4502
|
-
function qe(
|
|
4503
|
-
return typeof
|
|
4502
|
+
function qe(_) {
|
|
4503
|
+
return typeof _ == "object" && _ !== null && _.$$typeof === e;
|
|
4504
4504
|
}
|
|
4505
4505
|
function Ue() {
|
|
4506
4506
|
{
|
|
4507
4507
|
if (Ae.current) {
|
|
4508
|
-
var
|
|
4509
|
-
if (
|
|
4508
|
+
var _ = L(Ae.current.type);
|
|
4509
|
+
if (_)
|
|
4510
4510
|
return `
|
|
4511
4511
|
|
|
4512
|
-
Check the render method of \`` +
|
|
4512
|
+
Check the render method of \`` + _ + "`.";
|
|
4513
4513
|
}
|
|
4514
4514
|
return "";
|
|
4515
4515
|
}
|
|
4516
4516
|
}
|
|
4517
|
-
function lt(
|
|
4517
|
+
function lt(_) {
|
|
4518
4518
|
return "";
|
|
4519
4519
|
}
|
|
4520
4520
|
var Et = {};
|
|
4521
|
-
function pt(
|
|
4521
|
+
function pt(_) {
|
|
4522
4522
|
{
|
|
4523
4523
|
var P = Ue();
|
|
4524
4524
|
if (!P) {
|
|
4525
|
-
var G = typeof
|
|
4525
|
+
var G = typeof _ == "string" ? _ : _.displayName || _.name;
|
|
4526
4526
|
G && (P = `
|
|
4527
4527
|
|
|
4528
4528
|
Check the top-level render call using <` + G + ">.");
|
|
@@ -4530,41 +4530,41 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4530
4530
|
return P;
|
|
4531
4531
|
}
|
|
4532
4532
|
}
|
|
4533
|
-
function Pt(
|
|
4533
|
+
function Pt(_, P) {
|
|
4534
4534
|
{
|
|
4535
|
-
if (!
|
|
4535
|
+
if (!_._store || _._store.validated || _.key != null)
|
|
4536
4536
|
return;
|
|
4537
|
-
|
|
4537
|
+
_._store.validated = !0;
|
|
4538
4538
|
var G = pt(P);
|
|
4539
4539
|
if (Et[G])
|
|
4540
4540
|
return;
|
|
4541
4541
|
Et[G] = !0;
|
|
4542
4542
|
var Z = "";
|
|
4543
|
-
|
|
4543
|
+
_ && _._owner && _._owner !== Ae.current && (Z = " It was passed a child from " + L(_._owner.type) + "."), ye(_), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', G, Z), ye(null);
|
|
4544
4544
|
}
|
|
4545
4545
|
}
|
|
4546
|
-
function yr(
|
|
4546
|
+
function yr(_, P) {
|
|
4547
4547
|
{
|
|
4548
|
-
if (typeof
|
|
4548
|
+
if (typeof _ != "object")
|
|
4549
4549
|
return;
|
|
4550
|
-
if (At(
|
|
4551
|
-
for (var G = 0; G <
|
|
4552
|
-
var Z =
|
|
4550
|
+
if (At(_))
|
|
4551
|
+
for (var G = 0; G < _.length; G++) {
|
|
4552
|
+
var Z = _[G];
|
|
4553
4553
|
qe(Z) && Pt(Z, P);
|
|
4554
4554
|
}
|
|
4555
|
-
else if (qe(
|
|
4556
|
-
|
|
4557
|
-
else if (
|
|
4558
|
-
var he = y(
|
|
4559
|
-
if (typeof he == "function" && he !==
|
|
4560
|
-
for (var
|
|
4555
|
+
else if (qe(_))
|
|
4556
|
+
_._store && (_._store.validated = !0);
|
|
4557
|
+
else if (_) {
|
|
4558
|
+
var he = y(_);
|
|
4559
|
+
if (typeof he == "function" && he !== _.entries)
|
|
4560
|
+
for (var _e = he.call(_), le; !(le = _e.next()).done; )
|
|
4561
4561
|
qe(le.value) && Pt(le.value, P);
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
4564
|
}
|
|
4565
|
-
function tr(
|
|
4565
|
+
function tr(_) {
|
|
4566
4566
|
{
|
|
4567
|
-
var P =
|
|
4567
|
+
var P = _.type;
|
|
4568
4568
|
if (P == null || typeof P == "string")
|
|
4569
4569
|
return;
|
|
4570
4570
|
var G;
|
|
@@ -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
|
-
ft(G,
|
|
4581
|
+
ft(G, _.props, "prop", Z, _);
|
|
4582
4582
|
} else if (P.PropTypes !== void 0 && !fe) {
|
|
4583
4583
|
fe = !0;
|
|
4584
4584
|
var he = L(P);
|
|
@@ -4587,31 +4587,31 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4587
4587
|
typeof P.getDefaultProps == "function" && !P.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
4588
4588
|
}
|
|
4589
4589
|
}
|
|
4590
|
-
function ws(
|
|
4590
|
+
function ws(_) {
|
|
4591
4591
|
{
|
|
4592
|
-
for (var P = Object.keys(
|
|
4592
|
+
for (var P = Object.keys(_.props), G = 0; G < P.length; G++) {
|
|
4593
4593
|
var Z = P[G];
|
|
4594
4594
|
if (Z !== "children" && Z !== "key") {
|
|
4595
|
-
ye(
|
|
4595
|
+
ye(_), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Z), ye(null);
|
|
4596
4596
|
break;
|
|
4597
4597
|
}
|
|
4598
4598
|
}
|
|
4599
|
-
|
|
4599
|
+
_.ref !== null && (ye(_), x("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
|
4600
4600
|
}
|
|
4601
4601
|
}
|
|
4602
4602
|
var xr = {};
|
|
4603
|
-
function Mr(
|
|
4603
|
+
function Mr(_, P, G, Z, he, _e) {
|
|
4604
4604
|
{
|
|
4605
|
-
var le = M(
|
|
4605
|
+
var le = M(_);
|
|
4606
4606
|
if (!le) {
|
|
4607
4607
|
var se = "";
|
|
4608
|
-
(
|
|
4608
|
+
(_ === void 0 || typeof _ == "object" && _ !== null && Object.keys(_).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
4609
|
var Ke = lt();
|
|
4610
4610
|
Ke ? se += Ke : se += Ue();
|
|
4611
4611
|
var Ne;
|
|
4612
|
-
|
|
4612
|
+
_ === null ? Ne = "null" : At(_) ? Ne = "array" : _ !== void 0 && _.$$typeof === e ? (Ne = "<" + (L(_.type) || "Unknown") + " />", se = " Did you accidentally export a JSX literal instead of a component?") : Ne = typeof _, 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);
|
|
4613
4613
|
}
|
|
4614
|
-
var je = te(
|
|
4614
|
+
var je = te(_, P, G, he, _e);
|
|
4615
4615
|
if (je == null)
|
|
4616
4616
|
return je;
|
|
4617
4617
|
if (le) {
|
|
@@ -4620,15 +4620,15 @@ Check the top-level render call using <` + G + ">.");
|
|
|
4620
4620
|
if (Z)
|
|
4621
4621
|
if (At(at)) {
|
|
4622
4622
|
for (var br = 0; br < at.length; br++)
|
|
4623
|
-
yr(at[br],
|
|
4623
|
+
yr(at[br], _);
|
|
4624
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(at,
|
|
4628
|
+
yr(at, _);
|
|
4629
4629
|
}
|
|
4630
4630
|
if (dt.call(P, "key")) {
|
|
4631
|
-
var rr = L(
|
|
4631
|
+
var rr = L(_), Ze = Object.keys(P).filter(function(Ra) {
|
|
4632
4632
|
return Ra !== "key";
|
|
4633
4633
|
}), Ds = Ze.length > 0 ? "{key: someKey, " + Ze.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
4634
4634
|
if (!xr[rr + Ds]) {
|
|
@@ -4641,14 +4641,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4641
4641
|
<%s key={someKey} {...props} />`, Ds, rr, Pa, rr), xr[rr + Ds] = !0;
|
|
4642
4642
|
}
|
|
4643
4643
|
}
|
|
4644
|
-
return
|
|
4644
|
+
return _ === n ? ws(je) : tr(je), je;
|
|
4645
4645
|
}
|
|
4646
4646
|
}
|
|
4647
|
-
function Cs(
|
|
4648
|
-
return Mr(
|
|
4647
|
+
function Cs(_, P, G) {
|
|
4648
|
+
return Mr(_, P, G, !0);
|
|
4649
4649
|
}
|
|
4650
|
-
function Fa(
|
|
4651
|
-
return Mr(
|
|
4650
|
+
function Fa(_, P, G) {
|
|
4651
|
+
return Mr(_, P, G, !1);
|
|
4652
4652
|
}
|
|
4653
4653
|
var ja = Fa, La = Cs;
|
|
4654
4654
|
zr.Fragment = n, zr.jsx = ja, zr.jsxs = La;
|
|
@@ -4758,11 +4758,11 @@ function vf({
|
|
|
4758
4758
|
onRefresh: h,
|
|
4759
4759
|
theme: g = {}
|
|
4760
4760
|
}) {
|
|
4761
|
-
const { data: m, loading: y, error: C, refetch: x } = fu(r, e), [A, w] = H(""), [E, v] = H({}), [
|
|
4761
|
+
const { data: m, loading: y, error: C, refetch: x } = fu(r, e), [A, w] = H(""), [E, v] = H({}), [b, D] = H(1), k = bt(() => {
|
|
4762
4762
|
if (!m) return { data: [], total: 0, totalPages: 0 };
|
|
4763
4763
|
let j = m;
|
|
4764
|
-
return l && A && a.length > 0 && (j = Bs.search(j, A, a)), Object.keys(E).length > 0 && (j = Bs.filterByFields(j, E)), Bs.paginate(j,
|
|
4765
|
-
}, [m, A, E,
|
|
4764
|
+
return l && A && a.length > 0 && (j = Bs.search(j, A, a)), Object.keys(E).length > 0 && (j = Bs.filterByFields(j, E)), Bs.paginate(j, b, d);
|
|
4765
|
+
}, [m, A, E, b, d, l, a]);
|
|
4766
4766
|
De(() => {
|
|
4767
4767
|
D(1);
|
|
4768
4768
|
}, [A, E]);
|
|
@@ -4906,7 +4906,7 @@ function vf({
|
|
|
4906
4906
|
}, children: [
|
|
4907
4907
|
/* @__PURE__ */ p.jsxs("div", { style: { fontSize: "13px", color: B.textSecondary }, children: [
|
|
4908
4908
|
"Page ",
|
|
4909
|
-
|
|
4909
|
+
b,
|
|
4910
4910
|
" of ",
|
|
4911
4911
|
k.totalPages
|
|
4912
4912
|
] }),
|
|
@@ -4915,14 +4915,14 @@ function vf({
|
|
|
4915
4915
|
"button",
|
|
4916
4916
|
{
|
|
4917
4917
|
onClick: () => D((j) => Math.max(1, j - 1)),
|
|
4918
|
-
disabled:
|
|
4918
|
+
disabled: b === 1,
|
|
4919
4919
|
style: {
|
|
4920
4920
|
padding: "6px 12px",
|
|
4921
4921
|
border: `1px solid ${B.border}`,
|
|
4922
4922
|
borderRadius: "6px",
|
|
4923
4923
|
background: "white",
|
|
4924
|
-
cursor:
|
|
4925
|
-
opacity:
|
|
4924
|
+
cursor: b === 1 ? "not-allowed" : "pointer",
|
|
4925
|
+
opacity: b === 1 ? 0.5 : 1
|
|
4926
4926
|
},
|
|
4927
4927
|
children: "Previous"
|
|
4928
4928
|
}
|
|
@@ -4931,14 +4931,14 @@ function vf({
|
|
|
4931
4931
|
"button",
|
|
4932
4932
|
{
|
|
4933
4933
|
onClick: () => D((j) => Math.min(k.totalPages, j + 1)),
|
|
4934
|
-
disabled:
|
|
4934
|
+
disabled: b === k.totalPages,
|
|
4935
4935
|
style: {
|
|
4936
4936
|
padding: "6px 12px",
|
|
4937
4937
|
border: `1px solid ${B.border}`,
|
|
4938
4938
|
borderRadius: "6px",
|
|
4939
4939
|
background: "white",
|
|
4940
|
-
cursor:
|
|
4941
|
-
opacity:
|
|
4940
|
+
cursor: b === k.totalPages ? "not-allowed" : "pointer",
|
|
4941
|
+
opacity: b === k.totalPages ? 0.5 : 1
|
|
4942
4942
|
},
|
|
4943
4943
|
children: "Next"
|
|
4944
4944
|
}
|
|
@@ -5050,17 +5050,17 @@ function Df({
|
|
|
5050
5050
|
className: i = ""
|
|
5051
5051
|
}) {
|
|
5052
5052
|
const l = Math.min(Math.max(e, 1), 5), [a, u] = H([]), [c, d] = H([]), [f, h] = H(Array(l).fill(!1)), [g, m] = H(Array(l).fill(!1)), y = xe([]), C = re((v) => {
|
|
5053
|
-
const
|
|
5054
|
-
if (
|
|
5055
|
-
const D = Math.floor(Math.random() *
|
|
5056
|
-
return
|
|
5053
|
+
const b = r.filter((k) => !v.includes(k._id));
|
|
5054
|
+
if (b.length === 0) return null;
|
|
5055
|
+
const D = Math.floor(Math.random() * b.length);
|
|
5056
|
+
return b[D];
|
|
5057
5057
|
}, [r]), x = re(() => Math.random() * (n - t) + t, [t, n]);
|
|
5058
5058
|
De(() => {
|
|
5059
5059
|
if (r.length === 0) {
|
|
5060
5060
|
u([]), d([]);
|
|
5061
5061
|
return;
|
|
5062
5062
|
}
|
|
5063
|
-
const v = [],
|
|
5063
|
+
const v = [], b = [], D = [];
|
|
5064
5064
|
for (let k = 0; k < l && k < r.length; k++) {
|
|
5065
5065
|
const M = C(D);
|
|
5066
5066
|
M && (v.push(M), D.push(M._id));
|
|
@@ -5070,12 +5070,12 @@ function Df({
|
|
|
5070
5070
|
v[k]._id,
|
|
5071
5071
|
...v.filter((F, L) => L !== k).map((F) => F._id)
|
|
5072
5072
|
], B = C(M);
|
|
5073
|
-
B ?
|
|
5073
|
+
B ? b.push(B) : b.push(v[k]);
|
|
5074
5074
|
}
|
|
5075
|
-
u(v), d(
|
|
5075
|
+
u(v), d(b);
|
|
5076
5076
|
}, [r, l, C]);
|
|
5077
5077
|
const A = re((v) => {
|
|
5078
|
-
const
|
|
5078
|
+
const b = x(), D = setTimeout(() => {
|
|
5079
5079
|
h((k) => {
|
|
5080
5080
|
const M = [...k];
|
|
5081
5081
|
return M[v] = !M[v], M;
|
|
@@ -5100,7 +5100,7 @@ function Df({
|
|
|
5100
5100
|
}, 150);
|
|
5101
5101
|
}, 200);
|
|
5102
5102
|
}, 150);
|
|
5103
|
-
},
|
|
5103
|
+
}, b);
|
|
5104
5104
|
y.current[v] = D;
|
|
5105
5105
|
}, [x, C, a, c, g]), w = xe(!1);
|
|
5106
5106
|
De(() => {
|
|
@@ -5116,8 +5116,8 @@ function Df({
|
|
|
5116
5116
|
const E = (v) => {
|
|
5117
5117
|
s && s(v);
|
|
5118
5118
|
};
|
|
5119
|
-
return r.length === 0 ? /* @__PURE__ */ p.jsx("div", { className: `flex items-center justify-center p-8 ${i}`, children: /* @__PURE__ */ p.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : a.length === 0 ? /* @__PURE__ */ p.jsx("div", { className: `flex items-center justify-center p-8 ${i}`, children: /* @__PURE__ */ p.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ p.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${i}`, children: a.map((v,
|
|
5120
|
-
const D = c[
|
|
5119
|
+
return r.length === 0 ? /* @__PURE__ */ p.jsx("div", { className: `flex items-center justify-center p-8 ${i}`, children: /* @__PURE__ */ p.jsx("p", { className: "text-gray-500", children: "No nodes available" }) }) : a.length === 0 ? /* @__PURE__ */ p.jsx("div", { className: `flex items-center justify-center p-8 ${i}`, children: /* @__PURE__ */ p.jsx("p", { className: "text-gray-500", children: "Loading..." }) }) : /* @__PURE__ */ p.jsx("div", { className: `flex gap-4 justify-center items-center flex-wrap ${i}`, children: a.map((v, b) => {
|
|
5120
|
+
const D = c[b], k = g[b];
|
|
5121
5121
|
return /* @__PURE__ */ p.jsx(
|
|
5122
5122
|
"div",
|
|
5123
5123
|
{
|
|
@@ -5129,7 +5129,7 @@ function Df({
|
|
|
5129
5129
|
{
|
|
5130
5130
|
className: "w-full h-full rounded-lg shadow-lg overflow-hidden cursor-pointer hover:shadow-xl",
|
|
5131
5131
|
style: {
|
|
5132
|
-
transform: `rotateY(${f[
|
|
5132
|
+
transform: `rotateY(${f[b] ? 180 : 0}deg)`,
|
|
5133
5133
|
transition: "transform 0.5s",
|
|
5134
5134
|
transformStyle: "preserve-3d"
|
|
5135
5135
|
},
|
|
@@ -5145,7 +5145,7 @@ function Df({
|
|
|
5145
5145
|
"div",
|
|
5146
5146
|
{
|
|
5147
5147
|
style: {
|
|
5148
|
-
transform: f[
|
|
5148
|
+
transform: f[b] ? "scaleX(-1)" : "scaleX(1)",
|
|
5149
5149
|
width: "100%",
|
|
5150
5150
|
height: "100%"
|
|
5151
5151
|
},
|
|
@@ -5175,7 +5175,7 @@ function Df({
|
|
|
5175
5175
|
"div",
|
|
5176
5176
|
{
|
|
5177
5177
|
style: {
|
|
5178
|
-
transform: f[
|
|
5178
|
+
transform: f[b] ? "scaleX(-1)" : "scaleX(1)",
|
|
5179
5179
|
width: "100%",
|
|
5180
5180
|
height: "100%"
|
|
5181
5181
|
},
|
|
@@ -5198,7 +5198,7 @@ function Df({
|
|
|
5198
5198
|
}
|
|
5199
5199
|
)
|
|
5200
5200
|
},
|
|
5201
|
-
`slot-${
|
|
5201
|
+
`slot-${b}`
|
|
5202
5202
|
);
|
|
5203
5203
|
}) });
|
|
5204
5204
|
}
|
|
@@ -5259,15 +5259,15 @@ function Af({
|
|
|
5259
5259
|
renderLoading: E,
|
|
5260
5260
|
theme: v = {}
|
|
5261
5261
|
}) {
|
|
5262
|
-
const
|
|
5262
|
+
const b = { ...mu, ...v }, [D, k] = H([]), [M, B] = H(!1), [F, L] = H(null), [j, R] = H(/* @__PURE__ */ new Set()), [Y, de] = H(null), [ie, oe] = H(null), [ve, pe] = H(null), [we, Se] = H(!1), [Oe, ke] = H(""), Ce = a !== void 0 ? a : Oe, Ge = (S) => {
|
|
5263
5263
|
u ? u(S) : ke(S);
|
|
5264
5264
|
}, ze = bt(() => {
|
|
5265
|
-
if (!
|
|
5266
|
-
const S =
|
|
5265
|
+
if (!Ce.trim()) return D;
|
|
5266
|
+
const S = Ce.toLowerCase();
|
|
5267
5267
|
return D.filter(
|
|
5268
5268
|
(I) => _r(I.from).toLowerCase().includes(S) || _r(I.subject).toLowerCase().includes(S)
|
|
5269
5269
|
);
|
|
5270
|
-
}, [D,
|
|
5270
|
+
}, [D, Ce]), ge = bt(() => e ? new uu({ baseUrl: r, system_id: e }) : null, [r, e]), Me = re(async () => {
|
|
5271
5271
|
if (ge) {
|
|
5272
5272
|
B(!0), L(null);
|
|
5273
5273
|
try {
|
|
@@ -5365,8 +5365,8 @@ function Af({
|
|
|
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
|
-
background: I ?
|
|
5369
|
-
borderBottom: `1px solid ${
|
|
5368
|
+
background: I ? b.selectedBackground : S.seen ? b.cardBackground : b.unreadBackground,
|
|
5369
|
+
borderBottom: `1px solid ${b.border}`,
|
|
5370
5370
|
cursor: "pointer",
|
|
5371
5371
|
transition: "background 0.15s ease"
|
|
5372
5372
|
}, children: /* @__PURE__ */ p.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "12px" }, children: [
|
|
@@ -5374,7 +5374,7 @@ function Af({
|
|
|
5374
5374
|
/* @__PURE__ */ p.jsx("div", { style: {
|
|
5375
5375
|
fontSize: "14px",
|
|
5376
5376
|
fontWeight: S.seen ? 400 : 600,
|
|
5377
|
-
color:
|
|
5377
|
+
color: b.text,
|
|
5378
5378
|
whiteSpace: "nowrap",
|
|
5379
5379
|
overflow: "hidden",
|
|
5380
5380
|
textOverflow: "ellipsis"
|
|
@@ -5382,7 +5382,7 @@ function Af({
|
|
|
5382
5382
|
/* @__PURE__ */ p.jsx("div", { style: {
|
|
5383
5383
|
fontSize: "14px",
|
|
5384
5384
|
fontWeight: S.seen ? 400 : 500,
|
|
5385
|
-
color: S.seen ?
|
|
5385
|
+
color: S.seen ? b.textSecondary : b.text,
|
|
5386
5386
|
marginTop: "2px",
|
|
5387
5387
|
whiteSpace: "nowrap",
|
|
5388
5388
|
overflow: "hidden",
|
|
@@ -5391,31 +5391,31 @@ function Af({
|
|
|
5391
5391
|
] }),
|
|
5392
5392
|
/* @__PURE__ */ p.jsx("div", { style: {
|
|
5393
5393
|
fontSize: "12px",
|
|
5394
|
-
color:
|
|
5394
|
+
color: b.textSecondary,
|
|
5395
5395
|
flexShrink: 0
|
|
5396
5396
|
}, children: Dt(S.date) })
|
|
5397
5397
|
] }) }), ht = (S) => /* @__PURE__ */ p.jsxs("div", { style: { padding: "24px" }, children: [
|
|
5398
|
-
/* @__PURE__ */ p.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color:
|
|
5399
|
-
/* @__PURE__ */ p.jsxs("div", { style: { fontSize: "14px", color:
|
|
5398
|
+
/* @__PURE__ */ p.jsx("h2", { style: { margin: "0 0 8px", fontSize: "20px", color: b.text }, children: _r(S.subject) || "(No subject)" }),
|
|
5399
|
+
/* @__PURE__ */ p.jsxs("div", { style: { fontSize: "14px", color: b.textSecondary, marginBottom: "16px" }, children: [
|
|
5400
5400
|
"From: ",
|
|
5401
5401
|
_r(S.from),
|
|
5402
5402
|
" • ",
|
|
5403
5403
|
new Date(S.date).toLocaleString()
|
|
5404
5404
|
] }),
|
|
5405
|
-
|
|
5405
|
+
we ? /* @__PURE__ */ p.jsx("div", { style: { fontSize: "14px", color: b.textSecondary }, children: "Loading..." }) : ve ? /* @__PURE__ */ p.jsx(
|
|
5406
5406
|
"div",
|
|
5407
5407
|
{
|
|
5408
|
-
style: { fontSize: "14px", color:
|
|
5409
|
-
dangerouslySetInnerHTML: { __html:
|
|
5408
|
+
style: { fontSize: "14px", color: b.text },
|
|
5409
|
+
dangerouslySetInnerHTML: { __html: ve }
|
|
5410
5410
|
}
|
|
5411
|
-
) : /* @__PURE__ */ p.jsx("div", { style: { fontSize: "14px", color:
|
|
5411
|
+
) : /* @__PURE__ */ p.jsx("div", { style: { fontSize: "14px", color: b.textSecondary }, children: "No content available" })
|
|
5412
5412
|
] }), At = (S, I) => /* @__PURE__ */ p.jsxs("div", { style: {
|
|
5413
5413
|
display: "flex",
|
|
5414
5414
|
alignItems: "center",
|
|
5415
5415
|
gap: "8px",
|
|
5416
5416
|
padding: "8px 16px",
|
|
5417
|
-
background:
|
|
5418
|
-
borderBottom: `1px solid ${
|
|
5417
|
+
background: b.cardBackground,
|
|
5418
|
+
borderBottom: `1px solid ${b.border}`
|
|
5419
5419
|
}, children: [
|
|
5420
5420
|
/* @__PURE__ */ p.jsx(
|
|
5421
5421
|
"button",
|
|
@@ -5424,17 +5424,17 @@ function Af({
|
|
|
5424
5424
|
style: {
|
|
5425
5425
|
padding: "6px 12px",
|
|
5426
5426
|
background: "transparent",
|
|
5427
|
-
border: `1px solid ${
|
|
5427
|
+
border: `1px solid ${b.border}`,
|
|
5428
5428
|
borderRadius: "6px",
|
|
5429
5429
|
fontSize: "13px",
|
|
5430
5430
|
cursor: "pointer",
|
|
5431
|
-
color:
|
|
5431
|
+
color: b.text
|
|
5432
5432
|
},
|
|
5433
5433
|
children: S.length === D.length ? "Deselect All" : "Select All"
|
|
5434
5434
|
}
|
|
5435
5435
|
),
|
|
5436
5436
|
S.length > 0 && /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
5437
|
-
/* @__PURE__ */ p.jsxs("span", { style: { fontSize: "13px", color:
|
|
5437
|
+
/* @__PURE__ */ p.jsxs("span", { style: { fontSize: "13px", color: b.textSecondary }, children: [
|
|
5438
5438
|
S.length,
|
|
5439
5439
|
" selected"
|
|
5440
5440
|
] }),
|
|
@@ -5450,10 +5450,10 @@ function Af({
|
|
|
5450
5450
|
width: "32px",
|
|
5451
5451
|
height: "32px",
|
|
5452
5452
|
background: "transparent",
|
|
5453
|
-
border: `1px solid ${
|
|
5453
|
+
border: `1px solid ${b.border}`,
|
|
5454
5454
|
borderRadius: "6px",
|
|
5455
5455
|
cursor: "pointer",
|
|
5456
|
-
color:
|
|
5456
|
+
color: b.textSecondary
|
|
5457
5457
|
},
|
|
5458
5458
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "archive" })
|
|
5459
5459
|
}
|
|
@@ -5470,10 +5470,10 @@ function Af({
|
|
|
5470
5470
|
width: "32px",
|
|
5471
5471
|
height: "32px",
|
|
5472
5472
|
background: "transparent",
|
|
5473
|
-
border: `1px solid ${
|
|
5473
|
+
border: `1px solid ${b.border}`,
|
|
5474
5474
|
borderRadius: "6px",
|
|
5475
5475
|
cursor: "pointer",
|
|
5476
|
-
color:
|
|
5476
|
+
color: b.textSecondary
|
|
5477
5477
|
},
|
|
5478
5478
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "delete" })
|
|
5479
5479
|
}
|
|
@@ -5492,10 +5492,10 @@ function Af({
|
|
|
5492
5492
|
width: "32px",
|
|
5493
5493
|
height: "32px",
|
|
5494
5494
|
background: "transparent",
|
|
5495
|
-
border: `1px solid ${
|
|
5495
|
+
border: `1px solid ${b.border}`,
|
|
5496
5496
|
borderRadius: "6px",
|
|
5497
5497
|
cursor: "pointer",
|
|
5498
|
-
color:
|
|
5498
|
+
color: b.textSecondary
|
|
5499
5499
|
},
|
|
5500
5500
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px" }, children: "refresh" })
|
|
5501
5501
|
}
|
|
@@ -5503,25 +5503,25 @@ function Af({
|
|
|
5503
5503
|
] }), W = () => /* @__PURE__ */ p.jsx("div", { style: {
|
|
5504
5504
|
padding: "48px",
|
|
5505
5505
|
textAlign: "center",
|
|
5506
|
-
color:
|
|
5507
|
-
}, children: c }),
|
|
5506
|
+
color: b.textSecondary
|
|
5507
|
+
}, children: c }), be = () => /* @__PURE__ */ p.jsx("div", { style: {
|
|
5508
5508
|
padding: "48px",
|
|
5509
5509
|
textAlign: "center",
|
|
5510
|
-
color:
|
|
5511
|
-
}, children: "Loading..." }), Xe = C || ft, q = x || ht, T = A || At, X = w || W, J = E ||
|
|
5512
|
-
return M && D.length === 0 ? /* @__PURE__ */ p.jsx("div", { style: { background:
|
|
5510
|
+
color: b.textSecondary
|
|
5511
|
+
}, children: "Loading..." }), Xe = C || ft, q = x || ht, T = A || At, X = w || W, J = E || be;
|
|
5512
|
+
return M && D.length === 0 ? /* @__PURE__ */ p.jsx("div", { style: { background: b.background, width: "100%", height: "100%" }, children: J() }) : /* @__PURE__ */ p.jsxs("div", { style: { display: "flex", background: b.background, width: "100%", height: "100%" }, children: [
|
|
5513
5513
|
/* @__PURE__ */ p.jsxs("div", { style: {
|
|
5514
5514
|
flex: i && ie ? "0 0 50%" : "1",
|
|
5515
5515
|
display: "flex",
|
|
5516
5516
|
flexDirection: "column",
|
|
5517
|
-
borderRight: i && ie ? `1px solid ${
|
|
5517
|
+
borderRight: i && ie ? `1px solid ${b.border}` : "none",
|
|
5518
5518
|
overflow: "hidden"
|
|
5519
5519
|
}, children: [
|
|
5520
5520
|
o && T(Array.from(j), Wt),
|
|
5521
5521
|
l && /* @__PURE__ */ p.jsx("div", { style: {
|
|
5522
5522
|
padding: "8px 12px",
|
|
5523
|
-
borderBottom: `1px solid ${
|
|
5524
|
-
background:
|
|
5523
|
+
borderBottom: `1px solid ${b.border}`,
|
|
5524
|
+
background: b.background
|
|
5525
5525
|
}, children: /* @__PURE__ */ p.jsxs("div", { style: {
|
|
5526
5526
|
display: "flex",
|
|
5527
5527
|
alignItems: "center",
|
|
@@ -5530,7 +5530,7 @@ function Af({
|
|
|
5530
5530
|
background: "#f5f5f5",
|
|
5531
5531
|
borderRadius: "6px"
|
|
5532
5532
|
}, children: [
|
|
5533
|
-
/* @__PURE__ */ p.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
5533
|
+
/* @__PURE__ */ p.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: b.textSecondary, strokeWidth: "2", children: [
|
|
5534
5534
|
/* @__PURE__ */ p.jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
5535
5535
|
/* @__PURE__ */ p.jsx("path", { d: "M21 21l-4.35-4.35" })
|
|
5536
5536
|
] }),
|
|
@@ -5539,7 +5539,7 @@ function Af({
|
|
|
5539
5539
|
{
|
|
5540
5540
|
type: "text",
|
|
5541
5541
|
placeholder: "Search by email or subject...",
|
|
5542
|
-
value:
|
|
5542
|
+
value: Ce,
|
|
5543
5543
|
onChange: (S) => Ge(S.target.value),
|
|
5544
5544
|
style: {
|
|
5545
5545
|
flex: 1,
|
|
@@ -5547,11 +5547,11 @@ function Af({
|
|
|
5547
5547
|
background: "transparent",
|
|
5548
5548
|
outline: "none",
|
|
5549
5549
|
fontSize: "13px",
|
|
5550
|
-
color:
|
|
5550
|
+
color: b.text
|
|
5551
5551
|
}
|
|
5552
5552
|
}
|
|
5553
5553
|
),
|
|
5554
|
-
|
|
5554
|
+
Ce && /* @__PURE__ */ p.jsx(
|
|
5555
5555
|
"button",
|
|
5556
5556
|
{
|
|
5557
5557
|
onClick: () => Ge(""),
|
|
@@ -5564,16 +5564,16 @@ function Af({
|
|
|
5564
5564
|
alignItems: "center",
|
|
5565
5565
|
justifyContent: "center"
|
|
5566
5566
|
},
|
|
5567
|
-
children: /* @__PURE__ */ p.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke:
|
|
5567
|
+
children: /* @__PURE__ */ p.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: b.textSecondary, strokeWidth: "2", children: /* @__PURE__ */ p.jsx("path", { d: "M18 6L6 18M6 6l12 12" }) })
|
|
5568
5568
|
}
|
|
5569
5569
|
)
|
|
5570
5570
|
] }) }),
|
|
5571
5571
|
F && /* @__PURE__ */ p.jsx("div", { style: {
|
|
5572
5572
|
padding: "12px 16px",
|
|
5573
5573
|
background: "#fef2f2",
|
|
5574
|
-
color:
|
|
5574
|
+
color: b.danger,
|
|
5575
5575
|
fontSize: "14px",
|
|
5576
|
-
borderBottom: `1px solid ${
|
|
5576
|
+
borderBottom: `1px solid ${b.border}`
|
|
5577
5577
|
}, children: F }),
|
|
5578
5578
|
/* @__PURE__ */ p.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: ze.length === 0 ? X() : ze.map((S, I) => /* @__PURE__ */ p.jsx(
|
|
5579
5579
|
"div",
|
|
@@ -5796,20 +5796,20 @@ function kl(r, e, t) {
|
|
|
5796
5796
|
u = !0;
|
|
5797
5797
|
const A = h.addedNodes;
|
|
5798
5798
|
for (let v = 0; v < A.length; v++) {
|
|
5799
|
-
const
|
|
5800
|
-
if (k != null &&
|
|
5799
|
+
const b = A[v], D = Ll(b), k = b.parentNode;
|
|
5800
|
+
if (k != null && b !== a && D === null && !Ns(b, k, r)) {
|
|
5801
5801
|
if (Yt) {
|
|
5802
|
-
const M =
|
|
5802
|
+
const M = b.innerText || b.nodeValue;
|
|
5803
5803
|
M && (c += M);
|
|
5804
5804
|
}
|
|
5805
|
-
k.removeChild(
|
|
5805
|
+
k.removeChild(b);
|
|
5806
5806
|
}
|
|
5807
5807
|
}
|
|
5808
5808
|
const w = h.removedNodes, E = w.length;
|
|
5809
5809
|
if (E > 0) {
|
|
5810
5810
|
let v = 0;
|
|
5811
|
-
for (let
|
|
5812
|
-
const D = w[
|
|
5811
|
+
for (let b = 0; b < E; b++) {
|
|
5812
|
+
const D = w[b];
|
|
5813
5813
|
(Ns(D, m, r) || a === D) && (m.appendChild(D), v++);
|
|
5814
5814
|
}
|
|
5815
5815
|
E !== v && o.set(C, x);
|
|
@@ -6529,13 +6529,13 @@ function gc(r, e, t) {
|
|
|
6529
6529
|
}
|
|
6530
6530
|
} else (function(g, m, y, C, x, A) {
|
|
6531
6531
|
const w = C - 1, E = x - 1;
|
|
6532
|
-
let v,
|
|
6532
|
+
let v, b, D = A.getFirstChild(), k = 0, M = 0;
|
|
6533
6533
|
for (; k <= w && M <= E; ) {
|
|
6534
6534
|
const L = m[k], j = y[M];
|
|
6535
6535
|
if (L === j) D = Ls(Jr(j, A.element)), k++, M++;
|
|
6536
6536
|
else {
|
|
6537
|
-
v === void 0 && (v = new Set(m)),
|
|
6538
|
-
const Y =
|
|
6537
|
+
v === void 0 && (v = new Set(m)), b === void 0 && (b = new Set(y));
|
|
6538
|
+
const Y = b.has(L), de = v.has(j);
|
|
6539
6539
|
if (Y) if (de) {
|
|
6540
6540
|
const ie = Hn(Ye, j);
|
|
6541
6541
|
ie === D ? D = Ls(Jr(j, A.element)) : (A.withBefore(D).insertChild(ie), Jr(j, A.element)), k++, M++;
|
|
@@ -6908,8 +6908,8 @@ function po(r, e, t) {
|
|
|
6908
6908
|
const c = a.key, d = l.focus.key, f = l.getNodes(), h = f.length, g = l.isBackward(), m = g ? i : s, y = g ? s : i, C = g ? d : c, x = g ? c : d;
|
|
6909
6909
|
let A = zu, w = !1;
|
|
6910
6910
|
for (let E = 0; E < h; E++) {
|
|
6911
|
-
const v = f[E],
|
|
6912
|
-
if (z(v) &&
|
|
6911
|
+
const v = f[E], b = v.getTextContentSize();
|
|
6912
|
+
if (z(v) && b !== 0 && !(E === 0 && v.__key === C && m === b || E === h - 1 && v.__key === x && y === 0) && (w = !0, A &= v.getFormat(), A === 0)) break;
|
|
6913
6913
|
}
|
|
6914
6914
|
l.format = w ? A : 0;
|
|
6915
6915
|
}
|
|
@@ -7616,9 +7616,9 @@ class Lr extends gs {
|
|
|
7616
7616
|
const x = V(), A = [h];
|
|
7617
7617
|
let w = d.length;
|
|
7618
7618
|
for (let E = 1; E < c; E++) {
|
|
7619
|
-
const v = l[E],
|
|
7619
|
+
const v = l[E], b = v.length, D = Pe(v).getWritable();
|
|
7620
7620
|
D.__format = g, D.__style = m, D.__detail = y;
|
|
7621
|
-
const k = D.__key, M = w +
|
|
7621
|
+
const k = D.__key, M = w + b;
|
|
7622
7622
|
if (O(x)) {
|
|
7623
7623
|
const B = x.anchor, F = x.focus;
|
|
7624
7624
|
B.key === s && B.type === "text" && B.offset > w && B.offset <= M && (B.key = k, B.offset -= w, x.dirty = !0), F.key === s && F.type === "text" && F.offset > w && F.offset <= M && (F.key = k, F.offset -= w, x.dirty = !0);
|
|
@@ -7626,8 +7626,8 @@ class Lr extends gs {
|
|
|
7626
7626
|
o === s && We(k), w = M, A.push(D);
|
|
7627
7627
|
}
|
|
7628
7628
|
if (f !== null) {
|
|
7629
|
-
(function(
|
|
7630
|
-
const D =
|
|
7629
|
+
(function(b) {
|
|
7630
|
+
const D = b.getPreviousSibling(), k = b.getNextSibling();
|
|
7631
7631
|
D !== null && Kn(D), k !== null && Kn(k);
|
|
7632
7632
|
})(this);
|
|
7633
7633
|
const E = f.getWritable(), v = this.getIndexWithinParent();
|
|
@@ -8008,8 +8008,8 @@ class er {
|
|
|
8008
8008
|
const t = this.anchor, n = this.focus, s = this.format, o = this.style;
|
|
8009
8009
|
let i = t, l = n;
|
|
8010
8010
|
!this.isCollapsed() && n.isBefore(t) && (i = n, l = t), i.type === "element" && function(y, C, x, A) {
|
|
8011
|
-
const w = y.getNode(), E = w.getChildAtIndex(y.offset), v = Pe(),
|
|
8012
|
-
v.setFormat(x), v.setStyle(A), E === null ? w.append(
|
|
8011
|
+
const w = y.getNode(), E = w.getChildAtIndex(y.offset), v = Pe(), b = Qe(w) ? Le().append(v) : v;
|
|
8012
|
+
v.setFormat(x), v.setStyle(A), E === null ? w.append(b) : E.insertBefore(b), y.is(C) && C.set(v.__key, 0, "text"), y.set(v.__key, 0, "text");
|
|
8013
8013
|
}(i, l, s, o);
|
|
8014
8014
|
const a = i.offset;
|
|
8015
8015
|
let u = l.offset;
|
|
@@ -8073,11 +8073,11 @@ class er {
|
|
|
8073
8073
|
D.canBeEmpty() || D.getChildrenSize() !== 1 ? m.remove() : D.remove();
|
|
8074
8074
|
}
|
|
8075
8075
|
else y.add(m.__key);
|
|
8076
|
-
const w = x.getChildren(), E = new Set(c), v = C.is(x),
|
|
8076
|
+
const w = x.getChildren(), E = new Set(c), v = C.is(x), b = C.isInline() && f.getNextSibling() === null ? C : f;
|
|
8077
8077
|
for (let D = w.length - 1; D >= 0; D--) {
|
|
8078
8078
|
const k = w[D];
|
|
8079
8079
|
if (k.is(f) || N(k) && k.isParentOf(f)) break;
|
|
8080
|
-
k.isAttached() && (!E.has(k) || k.is(A) ? v ||
|
|
8080
|
+
k.isAttached() && (!E.has(k) || k.is(A) ? v || b.insertAfter(k, !1) : k.remove());
|
|
8081
8081
|
}
|
|
8082
8082
|
if (!v) {
|
|
8083
8083
|
let D = x, k = null;
|
|
@@ -8290,8 +8290,8 @@ class er {
|
|
|
8290
8290
|
N(x) ? x.selectEnd() : x.getParentOrThrow().selectEnd();
|
|
8291
8291
|
}
|
|
8292
8292
|
u.anchorNode === f.startContainer && u.anchorOffset === f.startOffset || function(x) {
|
|
8293
|
-
const A = x.focus, w = x.anchor, E = w.key, v = w.offset,
|
|
8294
|
-
Kt(w, A.key, A.offset, A.type), Kt(A, E, v,
|
|
8293
|
+
const A = x.focus, w = x.anchor, E = w.key, v = w.offset, b = w.type;
|
|
8294
|
+
Kt(w, A.key, A.offset, A.type), Kt(A, E, v, b), x._cachedNodes = null;
|
|
8295
8295
|
}(this);
|
|
8296
8296
|
}
|
|
8297
8297
|
}
|
|
@@ -8572,20 +8572,20 @@ function Sc(r, e, t, n, s, o, i) {
|
|
|
8572
8572
|
if (s.has("collaboration") && d !== o || d !== null && Ai(d)) return;
|
|
8573
8573
|
if (!O(e)) return void (r !== null && yn(t, l, a) && n.removeAllRanges());
|
|
8574
8574
|
const f = e.anchor, h = e.focus, g = f.key, m = h.key, y = Hn(t, g), C = Hn(t, m), x = f.offset, A = h.offset, w = e.format, E = e.style, v = e.isCollapsed();
|
|
8575
|
-
let
|
|
8575
|
+
let b = y, D = C, k = !1;
|
|
8576
8576
|
if (f.type === "text") {
|
|
8577
|
-
|
|
8577
|
+
b = Gn(y);
|
|
8578
8578
|
const R = f.getNode();
|
|
8579
8579
|
k = R.getFormat() !== w || R.getStyle() !== E;
|
|
8580
8580
|
} else O(r) && r.anchor.type === "text" && (k = !0);
|
|
8581
8581
|
var M, B, F, L, j;
|
|
8582
|
-
if (h.type === "text" && (D = Gn(C)),
|
|
8582
|
+
if (h.type === "text" && (D = Gn(C)), b !== null && D !== null && (v && (r === null || k || O(r) && (r.format !== w || r.style !== E)) && (M = w, B = E, F = x, L = g, j = performance.now(), Ql = [M, B, F, L, j]), u !== x || c !== A || l !== b || a !== D || n.type === "Range" && v || (d !== null && o.contains(d) || o.focus({ preventScroll: !0 }), f.type === "element"))) {
|
|
8583
8583
|
try {
|
|
8584
|
-
n.setBaseAndExtent(
|
|
8584
|
+
n.setBaseAndExtent(b, x, D, A);
|
|
8585
8585
|
} catch {
|
|
8586
8586
|
}
|
|
8587
8587
|
if (!s.has("skip-scroll-into-view") && e.isCollapsed() && o !== null && o === document.activeElement) {
|
|
8588
|
-
const R = e instanceof er && e.anchor.type === "element" ?
|
|
8588
|
+
const R = e instanceof er && e.anchor.type === "element" ? b.childNodes[x] || null : n.rangeCount > 0 ? n.getRangeAt(0) : null;
|
|
8589
8589
|
if (R !== null) {
|
|
8590
8590
|
let Y;
|
|
8591
8591
|
if (R instanceof Text) {
|
|
@@ -8593,26 +8593,26 @@ function Sc(r, e, t, n, s, o, i) {
|
|
|
8593
8593
|
de.selectNode(R), Y = de.getBoundingClientRect();
|
|
8594
8594
|
} else Y = R.getBoundingClientRect();
|
|
8595
8595
|
(function(de, ie, oe) {
|
|
8596
|
-
const
|
|
8596
|
+
const ve = oe.ownerDocument, pe = ve.defaultView;
|
|
8597
8597
|
if (pe === null) return;
|
|
8598
|
-
let { top:
|
|
8599
|
-
for (;
|
|
8600
|
-
const Ge =
|
|
8598
|
+
let { top: we, bottom: Se } = ie, Oe = 0, ke = 0, Ce = oe;
|
|
8599
|
+
for (; Ce !== null; ) {
|
|
8600
|
+
const Ge = Ce === ve.body;
|
|
8601
8601
|
if (Ge) Oe = 0, ke = hs(de).innerHeight;
|
|
8602
8602
|
else {
|
|
8603
|
-
const ge =
|
|
8603
|
+
const ge = Ce.getBoundingClientRect();
|
|
8604
8604
|
Oe = ge.top, ke = ge.bottom;
|
|
8605
8605
|
}
|
|
8606
8606
|
let ze = 0;
|
|
8607
|
-
if (
|
|
8607
|
+
if (we < Oe ? ze = -(Oe - we) : Se > ke && (ze = Se - ke), ze !== 0) if (Ge) pe.scrollBy(0, ze);
|
|
8608
8608
|
else {
|
|
8609
|
-
const ge =
|
|
8610
|
-
|
|
8611
|
-
const Me =
|
|
8612
|
-
|
|
8609
|
+
const ge = Ce.scrollTop;
|
|
8610
|
+
Ce.scrollTop += ze;
|
|
8611
|
+
const Me = Ce.scrollTop - ge;
|
|
8612
|
+
we -= Me, Se -= Me;
|
|
8613
8613
|
}
|
|
8614
8614
|
if (Ge) break;
|
|
8615
|
-
|
|
8615
|
+
Ce = xn(Ce);
|
|
8616
8616
|
}
|
|
8617
8617
|
})(t, Y, o);
|
|
8618
8618
|
}
|
|
@@ -8740,8 +8740,8 @@ function Jt(r, e) {
|
|
|
8740
8740
|
if (r._pendingEditorState = null, r._editorState = t, !s && a && h !== null) {
|
|
8741
8741
|
$e = r, Ie = t, tt = !1, r._updating = !0;
|
|
8742
8742
|
try {
|
|
8743
|
-
const v = r._dirtyType,
|
|
8744
|
-
h.disconnect(), g = mc(o, t, r, v,
|
|
8743
|
+
const v = r._dirtyType, b = r._dirtyElements, D = r._dirtyLeaves;
|
|
8744
|
+
h.disconnect(), g = mc(o, t, r, v, b, D);
|
|
8745
8745
|
} catch (v) {
|
|
8746
8746
|
if (v instanceof Error && r._onError(v), $s) throw v;
|
|
8747
8747
|
return pa(r, null, n, t), Bl(r), r._dirtyType = Br, $s = !0, Jt(r, o), void ($s = !1);
|
|
@@ -8751,10 +8751,10 @@ function Jt(r, e) {
|
|
|
8751
8751
|
}
|
|
8752
8752
|
t._readOnly || (t._readOnly = !0);
|
|
8753
8753
|
const m = r._dirtyLeaves, y = r._dirtyElements, C = r._normalizedNodes, x = r._updateTags, A = r._deferred;
|
|
8754
|
-
a && (r._dirtyType = ur, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements = /* @__PURE__ */ new Map(), r._normalizedNodes = /* @__PURE__ */ new Set(), r._updateTags = /* @__PURE__ */ new Set()), function(v,
|
|
8754
|
+
a && (r._dirtyType = ur, r._cloneNotNeeded.clear(), r._dirtyLeaves = /* @__PURE__ */ new Set(), r._dirtyElements = /* @__PURE__ */ new Map(), r._normalizedNodes = /* @__PURE__ */ new Set(), r._updateTags = /* @__PURE__ */ new Set()), function(v, b) {
|
|
8755
8755
|
const D = v._decorators;
|
|
8756
8756
|
let k = v._pendingDecorators || D;
|
|
8757
|
-
const M =
|
|
8757
|
+
const M = b._nodeMap;
|
|
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);
|
|
@@ -8771,31 +8771,31 @@ function Jt(r, e) {
|
|
|
8771
8771
|
$e = d, Ie = u;
|
|
8772
8772
|
}
|
|
8773
8773
|
}
|
|
8774
|
-
g !== null && function(v,
|
|
8774
|
+
g !== null && function(v, b, D, k, M) {
|
|
8775
8775
|
const B = Array.from(v._listeners.mutation), F = B.length;
|
|
8776
8776
|
for (let L = 0; L < F; L++) {
|
|
8777
|
-
const [j, R] = B[L], Y =
|
|
8777
|
+
const [j, R] = B[L], Y = b.get(R);
|
|
8778
8778
|
Y !== void 0 && j(Y, { dirtyLeaves: k, prevEditorState: M, updateTags: D });
|
|
8779
8779
|
}
|
|
8780
8780
|
}(r, g, x, m, o), O(l) || l === null || i !== null && i.is(l) || r.dispatchCommand(fi, void 0);
|
|
8781
8781
|
const E = r._pendingDecorators;
|
|
8782
|
-
E !== null && (r._decorators = E, r._pendingDecorators = null, sn("decorator", r, !0, E)), function(v,
|
|
8783
|
-
const k = ro(
|
|
8782
|
+
E !== null && (r._decorators = E, r._pendingDecorators = null, sn("decorator", r, !0, E)), function(v, b, D) {
|
|
8783
|
+
const k = ro(b), M = ro(D);
|
|
8784
8784
|
k !== M && sn("textcontent", v, !0, M);
|
|
8785
|
-
}(r, e || o, t), sn("update", r, !0, { dirtyElements: y, dirtyLeaves: m, editorState: t, normalizedNodes: C, prevEditorState: e || o, tags: x }), function(v,
|
|
8786
|
-
if (v._deferred = [],
|
|
8785
|
+
}(r, e || o, t), sn("update", r, !0, { dirtyElements: y, dirtyLeaves: m, editorState: t, normalizedNodes: C, prevEditorState: e || o, tags: x }), function(v, b) {
|
|
8786
|
+
if (v._deferred = [], b.length !== 0) {
|
|
8787
8787
|
const D = v._updating;
|
|
8788
8788
|
v._updating = !0;
|
|
8789
8789
|
try {
|
|
8790
|
-
for (let k = 0; k <
|
|
8790
|
+
for (let k = 0; k < b.length; k++) b[k]();
|
|
8791
8791
|
} finally {
|
|
8792
8792
|
v._updating = D;
|
|
8793
8793
|
}
|
|
8794
8794
|
}
|
|
8795
8795
|
}(r, A), function(v) {
|
|
8796
|
-
const
|
|
8797
|
-
if (
|
|
8798
|
-
const D =
|
|
8796
|
+
const b = v._updates;
|
|
8797
|
+
if (b.length !== 0) {
|
|
8798
|
+
const D = b.shift();
|
|
8799
8799
|
if (D) {
|
|
8800
8800
|
const [k, M] = D;
|
|
8801
8801
|
da(v, k, M);
|
|
@@ -8872,10 +8872,10 @@ function da(r, e, t) {
|
|
|
8872
8872
|
const A = x.getEditorState()._selection, w = C._selection;
|
|
8873
8873
|
if (O(w)) {
|
|
8874
8874
|
const E = w.anchor, v = w.focus;
|
|
8875
|
-
let
|
|
8876
|
-
if (E.type === "text" && (
|
|
8875
|
+
let b;
|
|
8876
|
+
if (E.type === "text" && (b = E.getNode(), b.selectionTransform(A, w)), v.type === "text") {
|
|
8877
8877
|
const D = v.getNode();
|
|
8878
|
-
|
|
8878
|
+
b !== D && D.selectionTransform(A, w);
|
|
8879
8879
|
}
|
|
8880
8880
|
}
|
|
8881
8881
|
}(a, r), r._dirtyType !== ur && (o ? function(C, x) {
|
|
@@ -8885,14 +8885,14 @@ function da(r, e, t) {
|
|
|
8885
8885
|
z(v) && v.isAttached() && v.isSimpleText() && !v.isUnmergeable() && eo(v);
|
|
8886
8886
|
}
|
|
8887
8887
|
}(a, r) : function(C, x) {
|
|
8888
|
-
const A = x._dirtyLeaves, w = x._dirtyElements, E = C._nodeMap, v = Ht(),
|
|
8888
|
+
const A = x._dirtyLeaves, w = x._dirtyElements, E = C._nodeMap, v = Ht(), b = /* @__PURE__ */ new Map();
|
|
8889
8889
|
let D = A, k = D.size, M = w, B = M.size;
|
|
8890
8890
|
for (; k > 0 || B > 0; ) {
|
|
8891
8891
|
if (k > 0) {
|
|
8892
8892
|
x._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
8893
8893
|
for (const F of D) {
|
|
8894
8894
|
const L = E.get(F);
|
|
8895
|
-
z(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && eo(L), L !== void 0 && Bo(L, v) && To(x, L,
|
|
8895
|
+
z(L) && L.isAttached() && L.isSimpleText() && !L.isUnmergeable() && eo(L), L !== void 0 && Bo(L, v) && To(x, L, b), A.add(F);
|
|
8896
8896
|
}
|
|
8897
8897
|
if (D = x._dirtyLeaves, k = D.size, k > 0) {
|
|
8898
8898
|
On++;
|
|
@@ -8904,18 +8904,18 @@ function da(r, e, t) {
|
|
|
8904
8904
|
const L = F[0], j = F[1];
|
|
8905
8905
|
if (L !== "root" && !j) continue;
|
|
8906
8906
|
const R = E.get(L);
|
|
8907
|
-
R !== void 0 && Bo(R, v) && To(x, R,
|
|
8907
|
+
R !== void 0 && Bo(R, v) && To(x, R, b), w.set(L, j);
|
|
8908
8908
|
}
|
|
8909
8909
|
D = x._dirtyLeaves, k = D.size, M = x._dirtyElements, B = M.size, On++;
|
|
8910
8910
|
}
|
|
8911
8911
|
x._dirtyLeaves = A, x._dirtyElements = w;
|
|
8912
8912
|
}(a, r), Fo(r), function(C, x, A, w) {
|
|
8913
|
-
const E = C._nodeMap, v = x._nodeMap,
|
|
8913
|
+
const E = C._nodeMap, v = x._nodeMap, b = [];
|
|
8914
8914
|
for (const [D] of w) {
|
|
8915
8915
|
const k = v.get(D);
|
|
8916
|
-
k !== void 0 && (k.isAttached() || (N(k) && zl(k, D, E, v,
|
|
8916
|
+
k !== void 0 && (k.isAttached() || (N(k) && zl(k, D, E, v, b, w), E.has(D) || w.delete(D), b.push(D)));
|
|
8917
8917
|
}
|
|
8918
|
-
for (const D of
|
|
8918
|
+
for (const D of b) v.delete(D);
|
|
8919
8919
|
for (const D of A) {
|
|
8920
8920
|
const k = v.get(D);
|
|
8921
8921
|
k === void 0 || k.isAttached() || (E.has(D) || A.delete(D), v.delete(D));
|
|
@@ -10707,7 +10707,7 @@ function vd({ content: r }) {
|
|
|
10707
10707
|
}
|
|
10708
10708
|
const Sa = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? jr : De;
|
|
10709
10709
|
function wd({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: s, ariaErrorMessage: o, ariaExpanded: i, ariaInvalid: l, ariaLabel: a, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: h, className: g, id: m, role: y = "textbox", spellCheck: C = !0, style: x, tabIndex: A, "data-testid": w, ...E }, v) {
|
|
10710
|
-
const [
|
|
10710
|
+
const [b, D] = H(r.isEditable()), k = re((B) => {
|
|
10711
10711
|
B && B.ownerDocument && B.ownerDocument.defaultView ? r.setRootElement(B) : r.setRootElement(null);
|
|
10712
10712
|
}, [r]), M = bt(() => /* @__PURE__ */ function(...B) {
|
|
10713
10713
|
return (F) => {
|
|
@@ -10718,7 +10718,7 @@ function wd({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
|
|
|
10718
10718
|
}(v, k), [k, v]);
|
|
10719
10719
|
return Sa(() => (D(r.isEditable()), r.registerEditableListener((B) => {
|
|
10720
10720
|
D(B);
|
|
10721
|
-
})), [r]), p.jsx("div", { "aria-activedescendant":
|
|
10721
|
+
})), [r]), p.jsx("div", { "aria-activedescendant": b ? e : void 0, "aria-autocomplete": b ? t : "none", "aria-controls": b ? n : void 0, "aria-describedby": s, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": b && y === "combobox" ? !!i : void 0, ...l != null ? { "aria-invalid": l } : {}, "aria-label": a, "aria-labelledby": u, "aria-multiline": c, "aria-owns": b ? d : void 0, "aria-readonly": !b || void 0, "aria-required": f, autoCapitalize: h, className: g, contentEditable: b, "data-testid": w, id: m, ref: M, role: b ? y : void 0, spellCheck: C, style: x, tabIndex: A, ...E });
|
|
10722
10722
|
}
|
|
10723
10723
|
const Cd = al(wd);
|
|
10724
10724
|
function Ho(r) {
|
|
@@ -10759,11 +10759,11 @@ function Bd(r, e, t, n, s) {
|
|
|
10759
10759
|
const l = function(C, x, A) {
|
|
10760
10760
|
const w = C._nodeMap, E = [];
|
|
10761
10761
|
for (const v of x) {
|
|
10762
|
-
const
|
|
10763
|
-
|
|
10762
|
+
const b = w.get(v);
|
|
10763
|
+
b !== void 0 && E.push(b);
|
|
10764
10764
|
}
|
|
10765
|
-
for (const [v,
|
|
10766
|
-
if (!
|
|
10765
|
+
for (const [v, b] of A) {
|
|
10766
|
+
if (!b) continue;
|
|
10767
10767
|
const D = w.get(v);
|
|
10768
10768
|
D === void 0 || Qe(D) || E.push(D);
|
|
10769
10769
|
}
|
|
@@ -11713,8 +11713,8 @@ function nf({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
|
|
|
11713
11713
|
u.dispatchCommand(Na, void 0);
|
|
11714
11714
|
}, [u]), A = re(() => {
|
|
11715
11715
|
u.update(() => {
|
|
11716
|
-
const
|
|
11717
|
-
O(
|
|
11716
|
+
const b = V();
|
|
11717
|
+
O(b) && Jc(b, () => Ii());
|
|
11718
11718
|
});
|
|
11719
11719
|
}, [u]), w = {
|
|
11720
11720
|
display: "flex",
|
|
@@ -11736,8 +11736,8 @@ function nf({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
|
|
|
11736
11736
|
}
|
|
11737
11737
|
`, v = () => {
|
|
11738
11738
|
setTimeout(() => {
|
|
11739
|
-
var
|
|
11740
|
-
(
|
|
11739
|
+
var b;
|
|
11740
|
+
(b = f.current) != null && b.contains(document.activeElement) || d(!1);
|
|
11741
11741
|
}, 150);
|
|
11742
11742
|
};
|
|
11743
11743
|
return /* @__PURE__ */ p.jsxs(
|
|
@@ -11932,8 +11932,8 @@ function nf({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
|
|
|
11932
11932
|
alignItems: "center",
|
|
11933
11933
|
gap: "8px"
|
|
11934
11934
|
},
|
|
11935
|
-
onMouseEnter: (
|
|
11936
|
-
onMouseLeave: (
|
|
11935
|
+
onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
|
|
11936
|
+
onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
|
|
11937
11937
|
children: [
|
|
11938
11938
|
/* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#3b82f6" }, children: "format_list_bulleted" }),
|
|
11939
11939
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
@@ -11962,8 +11962,8 @@ function nf({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
|
|
|
11962
11962
|
alignItems: "center",
|
|
11963
11963
|
gap: "8px"
|
|
11964
11964
|
},
|
|
11965
|
-
onMouseEnter: (
|
|
11966
|
-
onMouseLeave: (
|
|
11965
|
+
onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
|
|
11966
|
+
onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
|
|
11967
11967
|
children: [
|
|
11968
11968
|
/* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#22c55e" }, children: "spellcheck" }),
|
|
11969
11969
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
@@ -11992,8 +11992,8 @@ function nf({ theme: r, disabled: e, onAiRestructure: t, onAiProofread: n, onAiR
|
|
|
11992
11992
|
alignItems: "center",
|
|
11993
11993
|
gap: "8px"
|
|
11994
11994
|
},
|
|
11995
|
-
onMouseEnter: (
|
|
11996
|
-
onMouseLeave: (
|
|
11995
|
+
onMouseEnter: (b) => b.currentTarget.style.background = "#f3f4f6",
|
|
11996
|
+
onMouseLeave: (b) => b.currentTarget.style.background = "transparent",
|
|
11997
11997
|
children: [
|
|
11998
11998
|
/* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "18px", color: "#9333ea" }, children: "brush" }),
|
|
11999
11999
|
/* @__PURE__ */ p.jsxs("div", { children: [
|
|
@@ -12128,21 +12128,21 @@ function af({
|
|
|
12128
12128
|
aiProcessingAction: m,
|
|
12129
12129
|
renderAboveToolbar: y
|
|
12130
12130
|
}) {
|
|
12131
|
-
const C = { ...tf, ...s }, [x, A] = He.useState(!1), w = He.useRef(void 0), [E, v] = He.useState(r), [
|
|
12131
|
+
const C = { ...tf, ...s }, [x, A] = He.useState(!1), w = He.useRef(void 0), [E, v] = He.useState(r), [b, D] = He.useState(!1), [k, M] = He.useState(null), B = g ?? b, F = m ?? k;
|
|
12132
12132
|
He.useEffect(() => {
|
|
12133
12133
|
a !== void 0 && a !== w.current && (w.current = a, A(!0));
|
|
12134
12134
|
}, [a]);
|
|
12135
12135
|
const L = re(() => {
|
|
12136
12136
|
A(!1);
|
|
12137
12137
|
}, []), j = (pe) => pe.replace(/<[^>]*>/g, "").trim(), R = (pe) => pe.split(`
|
|
12138
|
-
`).map((
|
|
12139
|
-
const
|
|
12140
|
-
if (!
|
|
12138
|
+
`).map((we) => `<p>${we || "<br>"}</p>`).join(""), Y = async (pe) => {
|
|
12139
|
+
const we = j(E);
|
|
12140
|
+
if (!we) return;
|
|
12141
12141
|
const Se = pe === "restructure" ? d : pe === "proofread" ? f : h;
|
|
12142
12142
|
if (Se) {
|
|
12143
12143
|
D(!0), M(pe);
|
|
12144
12144
|
try {
|
|
12145
|
-
const Oe = await Se(
|
|
12145
|
+
const Oe = await Se(we), ke = R(Oe);
|
|
12146
12146
|
v(ke), e == null || e(ke), w.current = Date.now(), A(!0);
|
|
12147
12147
|
} catch (Oe) {
|
|
12148
12148
|
console.error(`AI ${pe} failed:`, Oe);
|
|
@@ -12159,14 +12159,14 @@ function af({
|
|
|
12159
12159
|
nodes: [Or, gr, mr, En, vs, _s],
|
|
12160
12160
|
editable: !o
|
|
12161
12161
|
}, oe = re(
|
|
12162
|
-
(pe,
|
|
12162
|
+
(pe, we) => {
|
|
12163
12163
|
pe.read(() => {
|
|
12164
|
-
const Se = wa(
|
|
12164
|
+
const Se = wa(we, null);
|
|
12165
12165
|
v(Se), e == null || e(Se);
|
|
12166
12166
|
});
|
|
12167
12167
|
},
|
|
12168
12168
|
[e]
|
|
12169
|
-
),
|
|
12169
|
+
), ve = `
|
|
12170
12170
|
.mail-editor-paragraph {
|
|
12171
12171
|
margin: 0 0 8px 0;
|
|
12172
12172
|
line-height: 1.5;
|
|
@@ -12252,7 +12252,7 @@ function af({
|
|
|
12252
12252
|
minHeight: l
|
|
12253
12253
|
},
|
|
12254
12254
|
children: [
|
|
12255
|
-
/* @__PURE__ */ p.jsx("style", { children:
|
|
12255
|
+
/* @__PURE__ */ p.jsx("style", { children: ve }),
|
|
12256
12256
|
y,
|
|
12257
12257
|
/* @__PURE__ */ p.jsxs(Rc, { initialConfig: ie, children: [
|
|
12258
12258
|
/* @__PURE__ */ p.jsx(
|
|
@@ -12359,33 +12359,33 @@ function Sf({
|
|
|
12359
12359
|
onAiRewrite: w,
|
|
12360
12360
|
renderAboveToolbar: E
|
|
12361
12361
|
}) {
|
|
12362
|
-
const v = { ...uf, ...c }, [
|
|
12362
|
+
const v = { ...uf, ...c }, [b, D] = H(r), [k, M] = H(""), [B, F] = H(""), [L, j] = H(e), [R, Y] = H(t), [de, ie] = H([]), [oe, ve] = H(!1), [pe, we] = H(""), [Se, Oe] = H(f), [ke, Ce] = H(!1), Ge = He.useRef(void 0);
|
|
12363
12363
|
He.useEffect(() => {
|
|
12364
|
-
l !== void 0 && l !== Ge.current && (Ge.current = l, Y(t),
|
|
12364
|
+
l !== void 0 && l !== Ge.current && (Ge.current = l, Y(t), Ce(!0));
|
|
12365
12365
|
}, [l, t]);
|
|
12366
12366
|
const ze = (W) => {
|
|
12367
|
-
Y(W),
|
|
12367
|
+
Y(W), Ce(!1), i == null || i(W);
|
|
12368
12368
|
}, ge = xe(null), [Me, ct] = H(!1), Ct = (W) => {
|
|
12369
|
-
const
|
|
12370
|
-
|
|
12369
|
+
const be = W.target.files;
|
|
12370
|
+
be && ie((Xe) => [...Xe, ...Array.from(be)]), ge.current && (ge.current.value = "");
|
|
12371
12371
|
}, qt = (W) => {
|
|
12372
12372
|
W.preventDefault(), W.stopPropagation(), ct(!0);
|
|
12373
12373
|
}, it = (W) => {
|
|
12374
12374
|
W.preventDefault(), W.stopPropagation(), ct(!1);
|
|
12375
12375
|
}, ot = (W) => {
|
|
12376
|
-
W.preventDefault(), W.stopPropagation(), ct(!1), W.dataTransfer.files && ie((
|
|
12376
|
+
W.preventDefault(), W.stopPropagation(), ct(!1), W.dataTransfer.files && ie((be) => [...be, ...Array.from(W.dataTransfer.files)]);
|
|
12377
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
|
-
ie((
|
|
12378
|
+
ie((be) => be.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
|
-
if (!
|
|
12381
|
-
|
|
12380
|
+
if (!b.trim()) {
|
|
12381
|
+
we("Recipient email is required");
|
|
12382
12382
|
return;
|
|
12383
12383
|
}
|
|
12384
12384
|
if (!L.trim()) {
|
|
12385
|
-
|
|
12385
|
+
we("Subject is required");
|
|
12386
12386
|
return;
|
|
12387
12387
|
}
|
|
12388
|
-
|
|
12388
|
+
ve(!0), we("");
|
|
12389
12389
|
try {
|
|
12390
12390
|
const W = await Promise.all(
|
|
12391
12391
|
de.map(async (Xe) => {
|
|
@@ -12399,20 +12399,20 @@ function Sf({
|
|
|
12399
12399
|
size: Xe.size
|
|
12400
12400
|
};
|
|
12401
12401
|
})
|
|
12402
|
-
),
|
|
12402
|
+
), be = R.replace(/>\n+</g, "><").replace(/<p class="[^"]*"><\/p>/g, "<br>").trim();
|
|
12403
12403
|
await s({
|
|
12404
|
-
to:
|
|
12404
|
+
to: b.trim(),
|
|
12405
12405
|
cc: k.trim() || void 0,
|
|
12406
12406
|
bcc: B.trim() || void 0,
|
|
12407
12407
|
subject: L.trim(),
|
|
12408
|
-
html:
|
|
12408
|
+
html: be,
|
|
12409
12409
|
attachments: W,
|
|
12410
12410
|
inReplyTo: n == null ? void 0 : n.messageId
|
|
12411
12411
|
}), D(""), M(""), F(""), j(""), Y(""), ie([]);
|
|
12412
12412
|
} catch (W) {
|
|
12413
|
-
|
|
12413
|
+
we(W instanceof Error ? W.message : "Failed to send email");
|
|
12414
12414
|
} finally {
|
|
12415
|
-
|
|
12415
|
+
ve(!1);
|
|
12416
12416
|
}
|
|
12417
12417
|
}, ft = {
|
|
12418
12418
|
width: "100%",
|
|
@@ -12430,14 +12430,14 @@ function Sf({
|
|
|
12430
12430
|
color: v.textSecondary,
|
|
12431
12431
|
marginBottom: "4px",
|
|
12432
12432
|
textTransform: "uppercase"
|
|
12433
|
-
}, At = (W) => ({
|
|
12433
|
+
}, At = (W, be = !1) => ({
|
|
12434
12434
|
padding: "10px 20px",
|
|
12435
12435
|
fontSize: "14px",
|
|
12436
12436
|
fontWeight: 500,
|
|
12437
12437
|
border: "none",
|
|
12438
12438
|
borderRadius: "6px",
|
|
12439
|
-
cursor:
|
|
12440
|
-
opacity:
|
|
12439
|
+
cursor: be ? "not-allowed" : "pointer",
|
|
12440
|
+
opacity: be ? 0.6 : 1,
|
|
12441
12441
|
background: W ? v.buttonPrimary : v.buttonSecondary,
|
|
12442
12442
|
color: W ? "#ffffff" : v.text,
|
|
12443
12443
|
display: "flex",
|
|
@@ -12476,7 +12476,7 @@ function Sf({
|
|
|
12476
12476
|
"input",
|
|
12477
12477
|
{
|
|
12478
12478
|
type: "email",
|
|
12479
|
-
value:
|
|
12479
|
+
value: b,
|
|
12480
12480
|
onChange: (W) => D(W.target.value),
|
|
12481
12481
|
placeholder: "recipient@example.com",
|
|
12482
12482
|
disabled: d || oe,
|
|
@@ -12609,7 +12609,7 @@ function Sf({
|
|
|
12609
12609
|
]
|
|
12610
12610
|
}
|
|
12611
12611
|
),
|
|
12612
|
-
de.length > 0 && /* @__PURE__ */ p.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: de.map((W,
|
|
12612
|
+
de.length > 0 && /* @__PURE__ */ p.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: de.map((W, be) => /* @__PURE__ */ p.jsxs(
|
|
12613
12613
|
"div",
|
|
12614
12614
|
{
|
|
12615
12615
|
style: {
|
|
@@ -12630,7 +12630,7 @@ function Sf({
|
|
|
12630
12630
|
"button",
|
|
12631
12631
|
{
|
|
12632
12632
|
type: "button",
|
|
12633
|
-
onClick: () => Ut(
|
|
12633
|
+
onClick: () => Ut(be),
|
|
12634
12634
|
disabled: d || oe,
|
|
12635
12635
|
style: {
|
|
12636
12636
|
background: "none",
|
|
@@ -12646,7 +12646,7 @@ function Sf({
|
|
|
12646
12646
|
)
|
|
12647
12647
|
]
|
|
12648
12648
|
},
|
|
12649
|
-
`${W.name}-${
|
|
12649
|
+
`${W.name}-${be}`
|
|
12650
12650
|
)) })
|
|
12651
12651
|
] }),
|
|
12652
12652
|
/* @__PURE__ */ p.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: "12px" }, children: [
|
|
@@ -12656,7 +12656,7 @@ function Sf({
|
|
|
12656
12656
|
type: "button",
|
|
12657
12657
|
onClick: o,
|
|
12658
12658
|
disabled: d || oe,
|
|
12659
|
-
style: At(!1),
|
|
12659
|
+
style: At(!1, d || oe),
|
|
12660
12660
|
children: "Cancel"
|
|
12661
12661
|
}
|
|
12662
12662
|
),
|
|
@@ -12665,8 +12665,8 @@ function Sf({
|
|
|
12665
12665
|
{
|
|
12666
12666
|
type: "button",
|
|
12667
12667
|
onClick: Dt,
|
|
12668
|
-
disabled: d || oe || !
|
|
12669
|
-
style: At(!0),
|
|
12668
|
+
disabled: d || oe || !b.trim() || !L.trim(),
|
|
12669
|
+
style: At(!0, d || oe || !b.trim() || !L.trim()),
|
|
12670
12670
|
children: [
|
|
12671
12671
|
/* @__PURE__ */ p.jsx(
|
|
12672
12672
|
"span",
|
|
@@ -12734,7 +12734,7 @@ function kf({
|
|
|
12734
12734
|
), E = s && y.trim() && !r.some((B) => {
|
|
12735
12735
|
var F;
|
|
12736
12736
|
return ((F = B.label) == null ? void 0 : F.toLowerCase()) === y.toLowerCase();
|
|
12737
|
-
}), v = e.map((B) => r.find((F) => F.id === B)).filter(Boolean),
|
|
12737
|
+
}), v = e.map((B) => r.find((F) => F.id === B)).filter(Boolean), b = re((B) => {
|
|
12738
12738
|
var F;
|
|
12739
12739
|
c > 0 && e.length >= c || (t([...e, B]), C(""), (F = A.current) == null || F.focus());
|
|
12740
12740
|
}, [e, t, c]), D = re((B) => {
|
|
@@ -12742,10 +12742,10 @@ function kf({
|
|
|
12742
12742
|
}, [e, t]), k = re(async () => {
|
|
12743
12743
|
if (!E) return;
|
|
12744
12744
|
const B = await (o == null ? void 0 : o(y.trim()));
|
|
12745
|
-
B &&
|
|
12746
|
-
}, [E, y, o,
|
|
12747
|
-
B.key === "Enter" ? (B.preventDefault(), E ? k() : w.length > 0 &&
|
|
12748
|
-
}, [E, w, y, e, k,
|
|
12745
|
+
B && b(B.id), C("");
|
|
12746
|
+
}, [E, y, o, b]), M = re((B) => {
|
|
12747
|
+
B.key === "Enter" ? (B.preventDefault(), E ? k() : w.length > 0 && b(w[0].id)) : B.key === "Backspace" && !y && e.length > 0 ? D(e[e.length - 1]) : B.key === "Escape" && (m(!1), C(""));
|
|
12748
|
+
}, [E, w, y, e, k, b, D]);
|
|
12749
12749
|
return /* @__PURE__ */ p.jsxs("div", { ref: x, className: f, style: { position: "relative" }, children: [
|
|
12750
12750
|
a && /* @__PURE__ */ p.jsx(
|
|
12751
12751
|
"label",
|
|
@@ -12874,7 +12874,7 @@ function kf({
|
|
|
12874
12874
|
w.map((B) => /* @__PURE__ */ p.jsxs(
|
|
12875
12875
|
"div",
|
|
12876
12876
|
{
|
|
12877
|
-
onClick: () =>
|
|
12877
|
+
onClick: () => b(B.id),
|
|
12878
12878
|
style: {
|
|
12879
12879
|
padding: "10px 12px",
|
|
12880
12880
|
fontSize: "14px",
|
|
@@ -12975,7 +12975,7 @@ function Tf({
|
|
|
12975
12975
|
const Y = F.target;
|
|
12976
12976
|
Y.style.opacity = "0.5";
|
|
12977
12977
|
});
|
|
12978
|
-
}, [t, n]),
|
|
12978
|
+
}, [t, n]), b = re((F) => {
|
|
12979
12979
|
const L = F.target;
|
|
12980
12980
|
L.style.opacity = "1", m(null), C(null), A(null), w.current = null;
|
|
12981
12981
|
}, []), D = re((F, L, j) => {
|
|
@@ -13032,9 +13032,9 @@ function Tf({
|
|
|
13032
13032
|
"div",
|
|
13033
13033
|
{
|
|
13034
13034
|
draggable: !0,
|
|
13035
|
-
onDragStart: (
|
|
13036
|
-
onDragEnd:
|
|
13037
|
-
onDragOver: (
|
|
13035
|
+
onDragStart: (ve) => v(ve, R),
|
|
13036
|
+
onDragEnd: b,
|
|
13037
|
+
onDragOver: (ve) => D(ve, F.id, Y),
|
|
13038
13038
|
onClick: () => a == null ? void 0 : a(R),
|
|
13039
13039
|
className: `cursor-grab active:cursor-grabbing transition-all ${ie ? "opacity-50 scale-95" : ""} ${h}`,
|
|
13040
13040
|
children: o(R, ie)
|
|
@@ -13107,33 +13107,33 @@ function Bf({
|
|
|
13107
13107
|
theme: g = {}
|
|
13108
13108
|
}) {
|
|
13109
13109
|
const m = { ...df, ...g }, { allDayItems: y, timedItems: C } = bt(() => {
|
|
13110
|
-
const
|
|
13110
|
+
const b = [], D = [];
|
|
13111
13111
|
for (const k of r)
|
|
13112
|
-
l(k) ?
|
|
13113
|
-
return { allDayItems:
|
|
13112
|
+
l(k) ? b.push(k) : D.push(k);
|
|
13113
|
+
return { allDayItems: b, timedItems: D };
|
|
13114
13114
|
}, [r, l]), x = bt(() => {
|
|
13115
|
-
const
|
|
13115
|
+
const b = [];
|
|
13116
13116
|
for (let D = t; D <= n; D++)
|
|
13117
|
-
|
|
13118
|
-
return
|
|
13117
|
+
b.push(D);
|
|
13118
|
+
return b;
|
|
13119
13119
|
}, [t, n]), A = (n - t + 1) * s, w = re(
|
|
13120
|
-
(
|
|
13121
|
-
const D = o(
|
|
13120
|
+
(b) => {
|
|
13121
|
+
const D = o(b);
|
|
13122
13122
|
if (!D) return null;
|
|
13123
13123
|
const k = ff(D);
|
|
13124
13124
|
if (!k) return null;
|
|
13125
|
-
const { hours: M, minutes: B } = k, F = Math.max(t, Math.min(n, M)), L = M < t ? 0 : B, j = (F - t) * s + L / 60 * s, R = i(
|
|
13125
|
+
const { hours: M, minutes: B } = k, F = Math.max(t, Math.min(n, M)), L = M < t ? 0 : B, j = (F - t) * s + L / 60 * s, R = i(b), Y = Math.max(20, R / 60 * s);
|
|
13126
13126
|
return { top: j, height: Y };
|
|
13127
13127
|
},
|
|
13128
13128
|
[o, i, t, n, s]
|
|
13129
13129
|
), E = bt(() => {
|
|
13130
13130
|
if (!f || !pf(e)) return null;
|
|
13131
|
-
const
|
|
13131
|
+
const b = /* @__PURE__ */ new Date(), D = b.getHours(), k = b.getMinutes();
|
|
13132
13132
|
return D < t || D > n ? null : (D - t) * s + k / 60 * s;
|
|
13133
13133
|
}, [e, f, t, n, s]), v = re(
|
|
13134
|
-
(
|
|
13134
|
+
(b) => {
|
|
13135
13135
|
if (!d) return;
|
|
13136
|
-
const D =
|
|
13136
|
+
const D = b.currentTarget.getBoundingClientRect(), M = (b.clientY - D.top) / s * 60, B = Math.floor(M / 60) + t, F = Math.round(M % 60 / 15) * 15, L = Math.min(n, Math.max(t, B)), j = F >= 60 ? 0 : F, R = `${L.toString().padStart(2, "0")}:${j.toString().padStart(2, "0")}`;
|
|
13137
13137
|
d(R);
|
|
13138
13138
|
},
|
|
13139
13139
|
[d, s, t, n]
|
|
@@ -13161,20 +13161,20 @@ function Bf({
|
|
|
13161
13161
|
children: "All Day"
|
|
13162
13162
|
}
|
|
13163
13163
|
),
|
|
13164
|
-
/* @__PURE__ */ p.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: y.map((
|
|
13164
|
+
/* @__PURE__ */ p.jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "4px" }, children: y.map((b) => /* @__PURE__ */ p.jsx(
|
|
13165
13165
|
"div",
|
|
13166
13166
|
{
|
|
13167
|
-
onClick: () => c == null ? void 0 : c(
|
|
13167
|
+
onClick: () => c == null ? void 0 : c(b),
|
|
13168
13168
|
style: { cursor: c ? "pointer" : "default" },
|
|
13169
|
-
children: u(
|
|
13169
|
+
children: u(b)
|
|
13170
13170
|
},
|
|
13171
|
-
a(
|
|
13171
|
+
a(b)
|
|
13172
13172
|
)) })
|
|
13173
13173
|
]
|
|
13174
13174
|
}
|
|
13175
13175
|
),
|
|
13176
13176
|
/* @__PURE__ */ p.jsxs("div", { style: { position: "relative", height: A }, children: [
|
|
13177
|
-
x.map((
|
|
13177
|
+
x.map((b, D) => /* @__PURE__ */ p.jsxs("div", { style: { position: "absolute", top: D * s, left: 0, right: 0 }, children: [
|
|
13178
13178
|
/* @__PURE__ */ p.jsx(
|
|
13179
13179
|
"div",
|
|
13180
13180
|
{
|
|
@@ -13188,7 +13188,7 @@ function Bf({
|
|
|
13188
13188
|
fontSize: "11px",
|
|
13189
13189
|
color: m.hourTextColor
|
|
13190
13190
|
},
|
|
13191
|
-
children: hf(
|
|
13191
|
+
children: hf(b)
|
|
13192
13192
|
}
|
|
13193
13193
|
),
|
|
13194
13194
|
/* @__PURE__ */ p.jsx(
|
|
@@ -13217,7 +13217,7 @@ function Bf({
|
|
|
13217
13217
|
}
|
|
13218
13218
|
}
|
|
13219
13219
|
)
|
|
13220
|
-
] },
|
|
13220
|
+
] }, b)),
|
|
13221
13221
|
/* @__PURE__ */ p.jsx(
|
|
13222
13222
|
"div",
|
|
13223
13223
|
{
|
|
@@ -13271,8 +13271,8 @@ function Bf({
|
|
|
13271
13271
|
]
|
|
13272
13272
|
}
|
|
13273
13273
|
),
|
|
13274
|
-
C.map((
|
|
13275
|
-
const D = w(
|
|
13274
|
+
C.map((b) => {
|
|
13275
|
+
const D = w(b);
|
|
13276
13276
|
return D ? /* @__PURE__ */ p.jsx(
|
|
13277
13277
|
"div",
|
|
13278
13278
|
{
|
|
@@ -13286,18 +13286,18 @@ function Bf({
|
|
|
13286
13286
|
cursor: c ? "pointer" : "default"
|
|
13287
13287
|
},
|
|
13288
13288
|
onClick: (k) => {
|
|
13289
|
-
k.stopPropagation(), c == null || c(
|
|
13289
|
+
k.stopPropagation(), c == null || c(b);
|
|
13290
13290
|
},
|
|
13291
|
-
children: u(
|
|
13291
|
+
children: u(b)
|
|
13292
13292
|
},
|
|
13293
|
-
a(
|
|
13293
|
+
a(b)
|
|
13294
13294
|
) : null;
|
|
13295
13295
|
})
|
|
13296
13296
|
] })
|
|
13297
13297
|
] });
|
|
13298
13298
|
}
|
|
13299
13299
|
function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, variant: s = "widget", hideSaveButton: o = !1 }) {
|
|
13300
|
-
const i = s === "widget", [l, a] = H("idle"), [u, c] = H(0), [d, f] = H(0), [h, g] = H(!1), [m, y] = H(0), [C, x] = H(null), [A, w] = H(!1), [E, v] = H(null),
|
|
13300
|
+
const i = s === "widget", [l, a] = H("idle"), [u, c] = H(0), [d, f] = H(0), [h, g] = H(!1), [m, y] = H(0), [C, x] = H(null), [A, w] = H(!1), [E, v] = H(null), b = xe(null), D = xe(null), k = xe(null), M = xe(null), B = xe(null), F = xe([]), L = xe(null), j = xe(null), R = xe(null), Y = xe(null), de = xe(!1), ie = xe([]), oe = xe(null), ve = xe(null), pe = xe([]), we = xe([]), Se = xe("insert"), Oe = xe(!1), ke = xe(0), Ce = xe(0), Ge = xe(0), ze = (q) => {
|
|
13301
13301
|
const T = Math.floor(q / 60), X = Math.floor(q % 60);
|
|
13302
13302
|
return `${T.toString().padStart(2, "0")}:${X.toString().padStart(2, "0")}`;
|
|
13303
13303
|
}, ge = async (q) => {
|
|
@@ -13334,7 +13334,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13334
13334
|
}
|
|
13335
13335
|
return await S.close(), ne;
|
|
13336
13336
|
}, Ct = re(() => {
|
|
13337
|
-
const q =
|
|
13337
|
+
const q = b.current;
|
|
13338
13338
|
if (!q) return;
|
|
13339
13339
|
const T = q.getContext("2d");
|
|
13340
13340
|
if (!T) return;
|
|
@@ -13399,18 +13399,18 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13399
13399
|
}
|
|
13400
13400
|
const I = new Blob(F.current, { type: "audio/webm" });
|
|
13401
13401
|
let K, Q;
|
|
13402
|
-
if (oe.current !== null &&
|
|
13402
|
+
if (oe.current !== null && ve.current)
|
|
13403
13403
|
try {
|
|
13404
|
-
const ne = await ge(I), te =
|
|
13405
|
-
|
|
13404
|
+
const ne = await ge(I), te = ve.current.sampleRate, Ae = Math.floor(oe.current * te), Fe = await ct(
|
|
13405
|
+
ve.current,
|
|
13406
13406
|
ne,
|
|
13407
13407
|
Ae,
|
|
13408
13408
|
Se.current
|
|
13409
13409
|
);
|
|
13410
13410
|
K = Me(Fe), Q = Fe.length / Fe.sampleRate, Se.current === "insert" && (ie.current = [
|
|
13411
13411
|
...ie.current,
|
|
13412
|
-
...
|
|
13413
|
-
]), oe.current = null,
|
|
13412
|
+
...we.current
|
|
13413
|
+
]), oe.current = null, ve.current = null, pe.current = [], we.current = [];
|
|
13414
13414
|
} catch {
|
|
13415
13415
|
K = I, Q = ke.current > 0 ? ke.current : 1;
|
|
13416
13416
|
}
|
|
@@ -13435,13 +13435,13 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13435
13435
|
}, ot = () => {
|
|
13436
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();
|
|
13437
13437
|
}, dt = (q) => {
|
|
13438
|
-
const T =
|
|
13438
|
+
const T = b.current;
|
|
13439
13439
|
if (!T) return;
|
|
13440
13440
|
const X = d || u;
|
|
13441
13441
|
if (X <= 0) return;
|
|
13442
13442
|
const J = ie.current;
|
|
13443
13443
|
if (J.length === 0) return;
|
|
13444
|
-
const S = T.getBoundingClientRect(), I = q -
|
|
13444
|
+
const S = T.getBoundingClientRect(), I = q - Ce.current, K = 4, Q = S.width / T.width, ee = J.length / X * K, ae = -I / (ee * Q), ne = Ge.current + ae, te = Math.max(0, Math.min(ne, X));
|
|
13445
13445
|
R.current && (R.current.currentTime = te), y(te);
|
|
13446
13446
|
}, Ut = () => {
|
|
13447
13447
|
R.current && (R.current.currentTime = 0), y(0);
|
|
@@ -13458,23 +13458,23 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13458
13458
|
return;
|
|
13459
13459
|
}
|
|
13460
13460
|
try {
|
|
13461
|
-
R.current && (R.current.pause(), g(!1)), Se.current = q,
|
|
13461
|
+
R.current && (R.current.pause(), g(!1)), Se.current = q, ve.current = await ge(Y.current);
|
|
13462
13462
|
const T = d || u;
|
|
13463
13463
|
oe.current = m;
|
|
13464
13464
|
const X = T > 0 ? m / T : 0, J = Math.floor(X * ie.current.length);
|
|
13465
|
-
pe.current = ie.current.slice(0, J),
|
|
13465
|
+
pe.current = ie.current.slice(0, J), we.current = ie.current.slice(J), ie.current = [...pe.current], it();
|
|
13466
13466
|
} catch {
|
|
13467
13467
|
x("Failed to prepare recording. Please try again.");
|
|
13468
13468
|
}
|
|
13469
13469
|
}, ht = () => {
|
|
13470
|
-
R.current && (R.current.pause(), R.current = null), Y.current = null,
|
|
13470
|
+
R.current && (R.current.pause(), R.current = null), Y.current = null, ve.current = null, oe.current = null, pe.current = [], g(!1), y(0), f(0), c(0), it();
|
|
13471
13471
|
}, At = () => {
|
|
13472
13472
|
Y.current ? r(Y.current, d || u) : alert("No audio recorded yet!");
|
|
13473
13473
|
};
|
|
13474
13474
|
if (De(() => {
|
|
13475
|
-
l === "recording" &&
|
|
13475
|
+
l === "recording" && b.current && B.current && de.current && (j.current = requestAnimationFrame(qt));
|
|
13476
13476
|
}, [l]), De(() => {
|
|
13477
|
-
const q =
|
|
13477
|
+
const q = b.current;
|
|
13478
13478
|
if (!q) return;
|
|
13479
13479
|
const T = () => {
|
|
13480
13480
|
const X = window.devicePixelRatio || 1, J = q.getBoundingClientRect();
|
|
@@ -13485,7 +13485,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13485
13485
|
return T(), window.addEventListener("resize", T), () => window.removeEventListener("resize", T);
|
|
13486
13486
|
}, []), De(() => {
|
|
13487
13487
|
if (l === "idle") {
|
|
13488
|
-
const q =
|
|
13488
|
+
const q = b.current;
|
|
13489
13489
|
if (!q) return;
|
|
13490
13490
|
const T = q.getContext("2d");
|
|
13491
13491
|
if (!T) return;
|
|
@@ -13510,7 +13510,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13510
13510
|
const T = () => {
|
|
13511
13511
|
const X = R.current;
|
|
13512
13512
|
if (X && h) {
|
|
13513
|
-
const J =
|
|
13513
|
+
const J = b.current;
|
|
13514
13514
|
if (J) {
|
|
13515
13515
|
const S = J.getContext("2d");
|
|
13516
13516
|
if (S) {
|
|
@@ -13567,7 +13567,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13567
13567
|
alignItems: "center",
|
|
13568
13568
|
justifyContent: "center",
|
|
13569
13569
|
transition: "background 0.15s"
|
|
13570
|
-
},
|
|
13570
|
+
}, be = {
|
|
13571
13571
|
...W,
|
|
13572
13572
|
opacity: 0.3,
|
|
13573
13573
|
cursor: "not-allowed"
|
|
@@ -13576,11 +13576,11 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13576
13576
|
/* @__PURE__ */ p.jsx(
|
|
13577
13577
|
"canvas",
|
|
13578
13578
|
{
|
|
13579
|
-
ref:
|
|
13579
|
+
ref: b,
|
|
13580
13580
|
style: { width: "100%", height: "32px", cursor: "pointer", flexShrink: 0 },
|
|
13581
13581
|
onMouseDown: (q) => {
|
|
13582
13582
|
if (l === "editing") {
|
|
13583
|
-
Oe.current = !0,
|
|
13583
|
+
Oe.current = !0, Ce.current = q.clientX, Ge.current = m;
|
|
13584
13584
|
const T = (J) => {
|
|
13585
13585
|
Oe.current && dt(J.clientX);
|
|
13586
13586
|
}, X = () => {
|
|
@@ -13611,7 +13611,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13611
13611
|
{
|
|
13612
13612
|
onClick: Ut,
|
|
13613
13613
|
disabled: l === "idle" || l === "recording",
|
|
13614
|
-
style: l === "idle" || l === "recording" ?
|
|
13614
|
+
style: l === "idle" || l === "recording" ? be : W,
|
|
13615
13615
|
title: "Go to start",
|
|
13616
13616
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: "#171717" }, children: "first_page" })
|
|
13617
13617
|
}
|
|
@@ -13627,7 +13627,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13627
13627
|
Dt();
|
|
13628
13628
|
},
|
|
13629
13629
|
disabled: l === "idle",
|
|
13630
|
-
style: l === "idle" ?
|
|
13630
|
+
style: l === "idle" ? be : W,
|
|
13631
13631
|
title: h || l === "recording" && !A ? "Pause" : "Play",
|
|
13632
13632
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: "#171717" }, children: h || l === "recording" && !A ? "pause" : "play_arrow" })
|
|
13633
13633
|
}
|
|
@@ -13637,7 +13637,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13637
13637
|
{
|
|
13638
13638
|
onClick: Wt,
|
|
13639
13639
|
disabled: l === "idle" || l === "recording",
|
|
13640
|
-
style: l === "idle" || l === "recording" ?
|
|
13640
|
+
style: l === "idle" || l === "recording" ? be : W,
|
|
13641
13641
|
title: "Go to end",
|
|
13642
13642
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: "#171717" }, children: "last_page" })
|
|
13643
13643
|
}
|
|
@@ -13650,7 +13650,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13650
13650
|
E === "insert" ? ot() : l === "idle" ? (v("insert"), it()) : l === "editing" && (v("insert"), ft("insert"));
|
|
13651
13651
|
},
|
|
13652
13652
|
disabled: l === "recording" && E !== "insert" || h,
|
|
13653
|
-
style: l === "recording" && E !== "insert" || h ?
|
|
13653
|
+
style: l === "recording" && E !== "insert" || h ? be : W,
|
|
13654
13654
|
title: E === "insert" ? "Stop recording" : "Insert recording",
|
|
13655
13655
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: E === "insert" ? "#ef4444" : "#171717" }, children: "add" })
|
|
13656
13656
|
}
|
|
@@ -13662,7 +13662,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13662
13662
|
E === "mic" ? ot() : l === "idle" ? (v("mic"), it()) : l === "editing" && (v("mic"), ft("replace"));
|
|
13663
13663
|
},
|
|
13664
13664
|
disabled: l === "recording" && E !== "mic" || h,
|
|
13665
|
-
style: l === "recording" && E !== "mic" || h ?
|
|
13665
|
+
style: l === "recording" && E !== "mic" || h ? be : W,
|
|
13666
13666
|
title: E === "mic" ? "Stop recording" : "Record",
|
|
13667
13667
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: E === "mic" ? "#ef4444" : "#171717" }, children: "mic" })
|
|
13668
13668
|
}
|
|
@@ -13674,7 +13674,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13674
13674
|
E === "startover" ? ot() : l === "editing" && (v("startover"), ht());
|
|
13675
13675
|
},
|
|
13676
13676
|
disabled: l === "idle" || l === "recording" && E !== "startover" || h,
|
|
13677
|
-
style: l === "idle" || l === "recording" && E !== "startover" || h ?
|
|
13677
|
+
style: l === "idle" || l === "recording" && E !== "startover" || h ? be : W,
|
|
13678
13678
|
title: E === "startover" ? "Stop recording" : "Start over",
|
|
13679
13679
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: E === "startover" ? "#ef4444" : "#171717" }, children: "refresh" })
|
|
13680
13680
|
}
|
|
@@ -13686,7 +13686,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13686
13686
|
{
|
|
13687
13687
|
onClick: () => Y.current && t(Y.current),
|
|
13688
13688
|
disabled: l !== "editing" || n,
|
|
13689
|
-
style: l !== "editing" || n ?
|
|
13689
|
+
style: l !== "editing" || n ? be : W,
|
|
13690
13690
|
title: n ? "Transcribing..." : "Transcribe audio",
|
|
13691
13691
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: "#171717" }, children: n ? "hourglass_empty" : "subtitles" })
|
|
13692
13692
|
}
|
|
@@ -13696,7 +13696,7 @@ function Nf({ onComplete: r, onCancel: e, onTranscribe: t, transcribing: n, vari
|
|
|
13696
13696
|
{
|
|
13697
13697
|
onClick: At,
|
|
13698
13698
|
disabled: l !== "editing",
|
|
13699
|
-
style: l !== "editing" ?
|
|
13699
|
+
style: l !== "editing" ? be : W,
|
|
13700
13700
|
title: "Save recording",
|
|
13701
13701
|
children: /* @__PURE__ */ p.jsx("span", { className: "material-icons", style: { fontSize: "20px", color: "#171717" }, children: "save" })
|
|
13702
13702
|
}
|