@factorialco/f0-react 10.7.0 → 10.8.0
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/{ChatPostComposerDialog-C2V9TUkg.js → ChatPostComposerDialog-Fz7bdV_-.js} +2 -2
- package/dist/{CoachmarkProvider-BvBZeMBP.js → CoachmarkProvider-DqNqwEPd.js} +14288 -14288
- package/dist/{DocumentToolbar-Ms3L6qnK.js → DocumentToolbar-B4aCipER.js} +2 -2
- package/dist/{DocxViewer-53xYfUJz.js → DocxViewer-BOdYordL.js} +1 -1
- package/dist/{F0AiProcessingOverlay-DU9SNCpZ.js → F0AiProcessingOverlay-BTW13lnQ.js} +1421 -2188
- package/dist/{F0CanvasPanel-CZJtegui.js → F0CanvasPanel-BcBFycU-.js} +1980 -509
- package/dist/F0DocumentViewer-BqRsz00c.js +3 -0
- package/dist/{F0DocumentViewer-CMRiSo6z.js → F0DocumentViewer-CWZNde9w.js} +7 -7
- package/dist/{F0Map-Biu6ugJ0.js → F0Map-4fqLL5gP.js} +5 -5
- package/dist/{F0VideoPlayer-ecHVj-1l.js → F0VideoPlayer-CTsCZ4u5.js} +270 -270
- package/dist/F0VideoPlayer-DEpDxvjC.js +1 -0
- package/dist/{Map-UhAoXj_6.js → Map-B_fzR9ly.js} +3 -3
- package/dist/{PdfThumbnail-CAjsh0iU.js → PdfThumbnail-BLNfQ1EH.js} +1 -1
- package/dist/{SheetViewer-C95sLVLL.js → SheetViewer-BhZTOpb4.js} +6 -6
- package/dist/{TextViewer-D5kapR67.js → TextViewer-B1eR_7q4.js} +1 -1
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +4 -4
- package/dist/component-status.js +29 -7
- package/dist/experimental.d.ts +1 -1
- package/dist/experimental.js +7412 -8327
- package/dist/{exports-G0JJykkK.d.ts → exports-cU26nMV5.d.ts} +365 -15
- package/dist/f0.d.ts +3 -3
- package/dist/f0.js +1709 -1709
- package/dist/{index-BrGZDOLv.d.ts → index-BDEEuyti.d.ts} +1 -1
- package/dist/{maplibre-BxlnEhf3.js → maplibre-NpfvETJP.js} +1 -1
- package/dist/{pdfWorker-C9Hcqt4e.js → pdfWorker-CA8jPCRh.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/F0DocumentViewer-DOf2JnU5.js +0 -3
- package/dist/F0VideoPlayer-fM7EfmVJ.js +0 -1
|
@@ -39573,7 +39573,7 @@ function jQ() {
|
|
|
39573
39573
|
return Rr(kQ);
|
|
39574
39574
|
}
|
|
39575
39575
|
//#endregion
|
|
39576
|
-
//#region src/
|
|
39576
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/voice/useAudioRecorder.ts
|
|
39577
39577
|
var MQ = 250, NQ = 12e4, PQ = () => typeof navigator < "u" && !!navigator.mediaDevices?.getUserMedia && typeof MediaRecorder < "u";
|
|
39578
39578
|
function FQ({ onTranscribe: e, onPartial: t, onFinal: n, onError: r, maxDurationMs: i = NQ, onAudio: a }) {
|
|
39579
39579
|
let [o, s] = H("idle"), [c, l] = H(0), [u] = H(PQ), [d, f] = H(null), p = V(null), m = V(null), h = V([]), g = V(null), _ = V(!1), v = V(null), y = V(null), b = V(0), x = V({
|
|
@@ -40291,13 +40291,25 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40291
40291
|
})]
|
|
40292
40292
|
})
|
|
40293
40293
|
});
|
|
40294
|
-
}), z$ = {
|
|
40294
|
+
}), z$ = ({ tone: e }) => e === "page" ? /* @__PURE__ */ U("div", { className: "absolute inset-0 bg-f1-special-page" }) : null, B$ = ({ className: e, tone: t = "background" }) => /* @__PURE__ */ W("div", {
|
|
40295
|
+
"aria-hidden": !0,
|
|
40296
|
+
"data-composer-backdrop": "",
|
|
40297
|
+
className: F("pointer-events-none absolute inset-x-0 -top-11 bottom-0", e),
|
|
40298
|
+
children: [/* @__PURE__ */ U("div", {
|
|
40299
|
+
"data-composer-backdrop-fade": "",
|
|
40300
|
+
className: F("absolute inset-x-0 top-0 h-8 bg-f1-background/85", "[mask-image:linear-gradient(to_bottom,transparent,rgb(0_0_0/0.3))]"),
|
|
40301
|
+
children: /* @__PURE__ */ U(z$, { tone: t })
|
|
40302
|
+
}), /* @__PURE__ */ U("div", {
|
|
40303
|
+
className: F("absolute inset-x-0 top-8 bottom-0 bg-f1-background/85 backdrop-blur-lg", "[mask-image:linear-gradient(to_bottom,rgb(0_0_0/0.3),#000_24px)]"),
|
|
40304
|
+
children: /* @__PURE__ */ U(z$, { tone: t })
|
|
40305
|
+
})]
|
|
40306
|
+
}), V$ = {
|
|
40295
40307
|
status: "loading",
|
|
40296
40308
|
url: void 0
|
|
40297
|
-
},
|
|
40309
|
+
}, H$ = {
|
|
40298
40310
|
status: "error",
|
|
40299
40311
|
url: void 0
|
|
40300
|
-
},
|
|
40312
|
+
}, U$ = (e) => e.startsWith("blob:") || e.startsWith("data:"), W$ = class {
|
|
40301
40313
|
entries = /* @__PURE__ */ new Map();
|
|
40302
40314
|
queue = [];
|
|
40303
40315
|
running = 0;
|
|
@@ -40308,7 +40320,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40308
40320
|
constructor(e, t = {}) {
|
|
40309
40321
|
this.getResolver = typeof e == "function" ? e : () => e.current, this.graceMs = t.graceMs ?? 6e4, this.concurrency = t.concurrency ?? 4, this.maxIdleBytes = t.maxIdleBytes ?? 157286400;
|
|
40310
40322
|
}
|
|
40311
|
-
getSnapshot = (e) => this.entries.get(e)?.snapshot ??
|
|
40323
|
+
getSnapshot = (e) => this.entries.get(e)?.snapshot ?? V$;
|
|
40312
40324
|
subscribe = (e, t) => {
|
|
40313
40325
|
let n = this.ensure(e);
|
|
40314
40326
|
return n.listeners.add(t), () => {
|
|
@@ -40317,7 +40329,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40317
40329
|
};
|
|
40318
40330
|
acquire = (e) => {
|
|
40319
40331
|
let t = this.ensure(e);
|
|
40320
|
-
t.refs += 1, t.lastUsed = Date.now(), t.releaseTimer &&= (clearTimeout(t.releaseTimer), null), t.snapshot.status === "error" && this.update(t,
|
|
40332
|
+
t.refs += 1, t.lastUsed = Date.now(), t.releaseTimer &&= (clearTimeout(t.releaseTimer), null), t.snapshot.status === "error" && this.update(t, V$), t.snapshot.status === "loading" && !t.controller && this.enqueue(e);
|
|
40321
40333
|
};
|
|
40322
40334
|
release = (e) => {
|
|
40323
40335
|
let t = this.entries.get(e);
|
|
@@ -40343,7 +40355,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40343
40355
|
ensure(e) {
|
|
40344
40356
|
let t = this.entries.get(e);
|
|
40345
40357
|
return t || (t = {
|
|
40346
|
-
snapshot:
|
|
40358
|
+
snapshot: V$,
|
|
40347
40359
|
refs: 0,
|
|
40348
40360
|
controller: null,
|
|
40349
40361
|
objectUrl: null,
|
|
@@ -40379,7 +40391,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40379
40391
|
url: r ?? e
|
|
40380
40392
|
}));
|
|
40381
40393
|
}).catch(() => {
|
|
40382
|
-
n.signal.aborted || this.entries.get(e) !== t || this.update(t,
|
|
40394
|
+
n.signal.aborted || this.entries.get(e) !== t || this.update(t, H$);
|
|
40383
40395
|
}).finally(() => {
|
|
40384
40396
|
--this.running, t.controller === n && (t.controller = null), this.pump();
|
|
40385
40397
|
});
|
|
@@ -40402,35 +40414,35 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40402
40414
|
}
|
|
40403
40415
|
}
|
|
40404
40416
|
}
|
|
40405
|
-
},
|
|
40417
|
+
}, G$ = Nr({
|
|
40406
40418
|
reducedMotion: !1,
|
|
40407
40419
|
urlCache: null
|
|
40408
|
-
}),
|
|
40420
|
+
}), K$ = ({ children: e, reducedMotion: t, resolveUrl: n }) => {
|
|
40409
40421
|
let r = V(n);
|
|
40410
40422
|
Vr(() => {
|
|
40411
40423
|
r.current = n;
|
|
40412
40424
|
}, [n]);
|
|
40413
|
-
let i = n !== void 0, a = Hr(() => i ? new
|
|
40425
|
+
let i = n !== void 0, a = Hr(() => i ? new W$(r) : null, [i]);
|
|
40414
40426
|
B(() => () => a?.clear(), [a]);
|
|
40415
40427
|
let o = Hr(() => ({
|
|
40416
40428
|
reducedMotion: t,
|
|
40417
40429
|
urlCache: a
|
|
40418
40430
|
}), [t, a]);
|
|
40419
|
-
return /* @__PURE__ */ U(
|
|
40431
|
+
return /* @__PURE__ */ U(G$.Provider, {
|
|
40420
40432
|
value: o,
|
|
40421
40433
|
children: e
|
|
40422
40434
|
});
|
|
40423
|
-
},
|
|
40435
|
+
}, q$ = () => Rr(G$), J$ = /* @__PURE__ */ new Set(["blob:", "data:"]), Y$ = /* @__PURE__ */ new Set(["http:", "https:"]), X$ = 52428800, Z$ = (e) => {
|
|
40424
40436
|
try {
|
|
40425
40437
|
return new URL(e, window.location.href);
|
|
40426
40438
|
} catch {
|
|
40427
40439
|
return null;
|
|
40428
40440
|
}
|
|
40429
|
-
},
|
|
40441
|
+
}, Q$ = (e) => {
|
|
40430
40442
|
let t = e.headers.get("content-length");
|
|
40431
|
-
return t !== null && /^\d+$/.test(t.trim()) && Number(t) >
|
|
40432
|
-
},
|
|
40433
|
-
if (
|
|
40443
|
+
return t !== null && /^\d+$/.test(t.trim()) && Number(t) > X$;
|
|
40444
|
+
}, $$ = async (e) => {
|
|
40445
|
+
if (Q$(e)) return null;
|
|
40434
40446
|
let t = e.headers.get("content-type") ?? "";
|
|
40435
40447
|
if (!e.body) return new Blob([], { type: t });
|
|
40436
40448
|
let n = e.body.getReader(), r = [], i = 0;
|
|
@@ -40438,7 +40450,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40438
40450
|
for (;;) {
|
|
40439
40451
|
let { done: e, value: t } = await n.read();
|
|
40440
40452
|
if (e) break;
|
|
40441
|
-
if (i += t.byteLength, i >
|
|
40453
|
+
if (i += t.byteLength, i > X$) return await n.cancel(), null;
|
|
40442
40454
|
let a = new Uint8Array(t.byteLength);
|
|
40443
40455
|
a.set(t), r.push(a.buffer);
|
|
40444
40456
|
}
|
|
@@ -40446,22 +40458,22 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40446
40458
|
n.releaseLock();
|
|
40447
40459
|
}
|
|
40448
40460
|
return new Blob(r, { type: t });
|
|
40449
|
-
},
|
|
40461
|
+
}, e1 = (e, t, n = void 0) => {
|
|
40450
40462
|
let r = document.createElement("a");
|
|
40451
40463
|
r.href = e, r.download = t, r.rel = "noreferrer", n && (r.target = n), document.body.appendChild(r), r.click(), r.remove();
|
|
40452
|
-
},
|
|
40464
|
+
}, t1 = (e, t) => {
|
|
40453
40465
|
let n = URL.createObjectURL(e);
|
|
40454
|
-
|
|
40455
|
-
},
|
|
40456
|
-
let n =
|
|
40466
|
+
e1(n, t), setTimeout(() => URL.revokeObjectURL(n), 0);
|
|
40467
|
+
}, n1 = async (e, t) => {
|
|
40468
|
+
let n = Z$(e);
|
|
40457
40469
|
if (!n) return;
|
|
40458
|
-
if (
|
|
40459
|
-
|
|
40470
|
+
if (J$.has(n.protocol)) {
|
|
40471
|
+
e1(n.href, t);
|
|
40460
40472
|
return;
|
|
40461
40473
|
}
|
|
40462
|
-
if (!
|
|
40474
|
+
if (!Y$.has(n.protocol)) return;
|
|
40463
40475
|
if (n.origin === window.location.origin) {
|
|
40464
|
-
|
|
40476
|
+
e1(n.href, t);
|
|
40465
40477
|
return;
|
|
40466
40478
|
}
|
|
40467
40479
|
let r = new AbortController(), i = null;
|
|
@@ -40470,20 +40482,20 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40470
40482
|
credentials: "omit",
|
|
40471
40483
|
signal: r.signal
|
|
40472
40484
|
});
|
|
40473
|
-
e.ok && (i = await
|
|
40485
|
+
e.ok && (i = await $$(e)), i || r.abort();
|
|
40474
40486
|
} catch {
|
|
40475
40487
|
i = null;
|
|
40476
40488
|
}
|
|
40477
|
-
i ?
|
|
40478
|
-
},
|
|
40489
|
+
i ? t1(i, t) : e1(n.href, t, "_blank");
|
|
40490
|
+
}, r1 = () => () => {}, i1 = {
|
|
40479
40491
|
status: "loading",
|
|
40480
40492
|
url: void 0
|
|
40481
|
-
},
|
|
40482
|
-
let { urlCache: n } =
|
|
40493
|
+
}, a1 = (e, { enabled: t = !0 } = {}) => {
|
|
40494
|
+
let { urlCache: n } = q$(), r = !n || !e || U$(e), i = !r && t, a = z((t) => i && n && e ? n.subscribe(e, t) : r1(), [
|
|
40483
40495
|
i,
|
|
40484
40496
|
n,
|
|
40485
40497
|
e
|
|
40486
|
-
]), o = z(() => i && n && e ? n.getSnapshot(e) :
|
|
40498
|
+
]), o = z(() => i && n && e ? n.getSnapshot(e) : i1, [
|
|
40487
40499
|
i,
|
|
40488
40500
|
n,
|
|
40489
40501
|
e
|
|
@@ -40501,31 +40513,31 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40501
40513
|
status: "error",
|
|
40502
40514
|
url: void 0
|
|
40503
40515
|
} : s;
|
|
40504
|
-
},
|
|
40516
|
+
}, o1 = (e, t) => {
|
|
40505
40517
|
let n = V(t), r = V(!1);
|
|
40506
40518
|
Vr(() => {
|
|
40507
40519
|
n.current = t;
|
|
40508
40520
|
}), B(() => {
|
|
40509
40521
|
e === "error" ? r.current && n.current?.() : r.current = !0;
|
|
40510
40522
|
}, [e]);
|
|
40511
|
-
},
|
|
40512
|
-
let { urlCache: e } =
|
|
40523
|
+
}, s1 = () => {
|
|
40524
|
+
let { urlCache: e } = q$();
|
|
40513
40525
|
return z((t, n) => {
|
|
40514
|
-
!e ||
|
|
40526
|
+
!e || U$(t) ? n1(t, n) : e.resolveNow(t).then((e) => n1(e, n)).catch(() => void 0);
|
|
40515
40527
|
}, [e]);
|
|
40516
|
-
},
|
|
40517
|
-
let e =
|
|
40528
|
+
}, c1 = Nr(null), l1 = Nr(null), u1 = () => Rr(c1), d1 = () => Rr(l1), f1 = () => {
|
|
40529
|
+
let e = u1();
|
|
40518
40530
|
if (!e) throw Error("useAttachmentImagePreview must be used within an AttachmentPreviewProvider");
|
|
40519
40531
|
return e;
|
|
40520
|
-
},
|
|
40521
|
-
let e =
|
|
40532
|
+
}, p1 = () => {
|
|
40533
|
+
let e = d1();
|
|
40522
40534
|
if (!e) throw Error("useAttachmentDocumentPreview must be used within an AttachmentPreviewProvider");
|
|
40523
40535
|
return e;
|
|
40524
|
-
},
|
|
40536
|
+
}, m1 = Ir(() => import("./F0DocumentViewer-BqRsz00c.js").then((e) => ({ default: e.F0DocumentViewer }))), h1 = (e) => {
|
|
40525
40537
|
let t = e.lastIndexOf(".");
|
|
40526
40538
|
return `${t > 0 ? e.slice(0, t) : e}.pdf`;
|
|
40527
|
-
},
|
|
40528
|
-
let e = He(), { documentPreview: t, closeDocumentPreview: n } =
|
|
40539
|
+
}, g1 = () => {
|
|
40540
|
+
let e = He(), { documentPreview: t, closeDocumentPreview: n } = p1(), [r, i] = H(null);
|
|
40529
40541
|
B(() => i(document.body), []);
|
|
40530
40542
|
let a = t?.file, o = t?.kind;
|
|
40531
40543
|
return /* @__PURE__ */ U(SH, {
|
|
@@ -40554,7 +40566,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40554
40566
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center px-4 pb-4 pt-4",
|
|
40555
40567
|
children: /* @__PURE__ */ U("div", {
|
|
40556
40568
|
className: "pointer-events-auto h-full w-full max-w-4xl overflow-hidden rounded-lg",
|
|
40557
|
-
children: /* @__PURE__ */ U(
|
|
40569
|
+
children: /* @__PURE__ */ U(_1, {
|
|
40558
40570
|
file: a,
|
|
40559
40571
|
kind: o,
|
|
40560
40572
|
onClose: n
|
|
@@ -40564,8 +40576,8 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40564
40576
|
]
|
|
40565
40577
|
}) : null
|
|
40566
40578
|
});
|
|
40567
|
-
},
|
|
40568
|
-
let r = He(), i =
|
|
40579
|
+
}, _1 = ({ file: e, kind: t, onClose: n }) => {
|
|
40580
|
+
let r = He(), i = s1(), a = !!e.previewUrl && t === "pdf", o = a1(a ? e.previewUrl : e.url);
|
|
40569
40581
|
if (o.status === "loading") return /* @__PURE__ */ U(Ie, { className: "h-full w-full" });
|
|
40570
40582
|
if (o.status === "error") return /* @__PURE__ */ U("div", {
|
|
40571
40583
|
className: "flex h-full w-full items-center justify-center bg-f1-background p-6 text-center text-f1-foreground-secondary",
|
|
@@ -40582,27 +40594,27 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40582
40594
|
}];
|
|
40583
40595
|
return /* @__PURE__ */ U(jr, {
|
|
40584
40596
|
fallback: /* @__PURE__ */ U(Ie, { className: "h-full w-full" }),
|
|
40585
|
-
children: /* @__PURE__ */ U(
|
|
40597
|
+
children: /* @__PURE__ */ U(m1, {
|
|
40586
40598
|
url: o.url,
|
|
40587
40599
|
kind: t,
|
|
40588
|
-
filename: a ?
|
|
40600
|
+
filename: a ? h1(e.name) : e.name,
|
|
40589
40601
|
mimeType: a ? "application/pdf" : e.mimeType,
|
|
40590
40602
|
initialScale: "page-width",
|
|
40591
40603
|
withCredentials: !1,
|
|
40592
40604
|
actions: s
|
|
40593
40605
|
})
|
|
40594
40606
|
});
|
|
40595
|
-
},
|
|
40607
|
+
}, v1 = wr.ease.outSwift, y1 = {
|
|
40596
40608
|
duration: .16,
|
|
40597
|
-
ease:
|
|
40598
|
-
},
|
|
40609
|
+
ease: v1
|
|
40610
|
+
}, b1 = {
|
|
40599
40611
|
duration: .12,
|
|
40600
40612
|
ease: "easeIn"
|
|
40601
|
-
},
|
|
40613
|
+
}, x1 = {
|
|
40602
40614
|
duration: .15,
|
|
40603
|
-
ease:
|
|
40604
|
-
},
|
|
40605
|
-
let { reducedMotion: a } =
|
|
40615
|
+
ease: v1
|
|
40616
|
+
}, S1 = ({ className: e, onLoad: t, onLoadedChange: n, eager: r = !1, ...i }) => {
|
|
40617
|
+
let { reducedMotion: a } = q$(), [o, s] = H(!1), c = () => {
|
|
40606
40618
|
s(!0), n?.(!0);
|
|
40607
40619
|
};
|
|
40608
40620
|
return /* @__PURE__ */ U("img", {
|
|
@@ -40617,7 +40629,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40617
40629
|
},
|
|
40618
40630
|
className: F(!a && "transition-opacity duration-200", o ? "opacity-100" : "opacity-0", e)
|
|
40619
40631
|
});
|
|
40620
|
-
},
|
|
40632
|
+
}, C1 = ({ icon: e, label: t, onClick: n }) => /* @__PURE__ */ U("span", {
|
|
40621
40633
|
className: "shadow-sm pointer-events-auto z-50 flex rounded bg-f1-background",
|
|
40622
40634
|
children: /* @__PURE__ */ U(Je, {
|
|
40623
40635
|
variant: "outline",
|
|
@@ -40626,10 +40638,10 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40626
40638
|
label: t,
|
|
40627
40639
|
onClick: n
|
|
40628
40640
|
})
|
|
40629
|
-
}),
|
|
40630
|
-
let t = He(), { reducedMotion: n } =
|
|
40641
|
+
}), w1 = ({ onImageDownloaded: e }) => {
|
|
40642
|
+
let t = He(), { reducedMotion: n } = q$(), { imagePreview: r, closeImagePreview: i, setImagePreviewIndex: a } = f1(), o = s1(), [s, c] = H(null);
|
|
40631
40643
|
B(() => c(document.body), []);
|
|
40632
|
-
let l = r !== null, u = r?.images ?? [], d = u.length, f = r?.index ?? 0, p = u[f], m = d > 1, h =
|
|
40644
|
+
let l = r !== null, u = r?.images ?? [], d = u.length, f = r?.index ?? 0, p = u[f], m = d > 1, h = a1(p?.url), g = z((e) => {
|
|
40633
40645
|
d !== 0 && a((f + e + d) % d);
|
|
40634
40646
|
}, [
|
|
40635
40647
|
d,
|
|
@@ -40689,9 +40701,9 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40689
40701
|
},
|
|
40690
40702
|
transition: {
|
|
40691
40703
|
duration: .2,
|
|
40692
|
-
ease:
|
|
40704
|
+
ease: v1
|
|
40693
40705
|
},
|
|
40694
|
-
children: h.status === "ready" ? /* @__PURE__ */ U(
|
|
40706
|
+
children: h.status === "ready" ? /* @__PURE__ */ U(S1, {
|
|
40695
40707
|
src: h.url,
|
|
40696
40708
|
alt: p.name,
|
|
40697
40709
|
className: "max-h-full max-w-full rounded-lg object-contain"
|
|
@@ -40701,13 +40713,13 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40701
40713
|
}),
|
|
40702
40714
|
/* @__PURE__ */ W("div", {
|
|
40703
40715
|
className: "pointer-events-none absolute inset-x-0 top-0 flex justify-end gap-1.5 p-3",
|
|
40704
|
-
children: [/* @__PURE__ */ U(
|
|
40716
|
+
children: [/* @__PURE__ */ U(C1, {
|
|
40705
40717
|
icon: Ka,
|
|
40706
40718
|
label: t.chat.download,
|
|
40707
40719
|
onClick: () => {
|
|
40708
40720
|
o(p.url, p.name), e?.();
|
|
40709
40721
|
}
|
|
40710
|
-
}), /* @__PURE__ */ U(
|
|
40722
|
+
}), /* @__PURE__ */ U(C1, {
|
|
40711
40723
|
icon: ut,
|
|
40712
40724
|
label: t.chat.closePreview,
|
|
40713
40725
|
onClick: i
|
|
@@ -40716,7 +40728,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40716
40728
|
m ? /* @__PURE__ */ W("div", {
|
|
40717
40729
|
className: "pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-center gap-2 p-3",
|
|
40718
40730
|
children: [
|
|
40719
|
-
/* @__PURE__ */ U(
|
|
40731
|
+
/* @__PURE__ */ U(C1, {
|
|
40720
40732
|
icon: ln,
|
|
40721
40733
|
label: t.chat.previousImage,
|
|
40722
40734
|
onClick: () => g(-1)
|
|
@@ -40729,7 +40741,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40729
40741
|
d
|
|
40730
40742
|
]
|
|
40731
40743
|
}),
|
|
40732
|
-
/* @__PURE__ */ U(
|
|
40744
|
+
/* @__PURE__ */ U(C1, {
|
|
40733
40745
|
icon: Gt,
|
|
40734
40746
|
label: t.chat.nextImage,
|
|
40735
40747
|
onClick: () => g(1)
|
|
@@ -40739,13 +40751,13 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40739
40751
|
]
|
|
40740
40752
|
}) : null
|
|
40741
40753
|
});
|
|
40742
|
-
},
|
|
40754
|
+
}, T1 = /* @__PURE__ */ new Set([
|
|
40743
40755
|
"m4v",
|
|
40744
40756
|
"mov",
|
|
40745
40757
|
"mp4",
|
|
40746
40758
|
"ogv",
|
|
40747
40759
|
"webm"
|
|
40748
|
-
]),
|
|
40760
|
+
]), E1 = (e) => {
|
|
40749
40761
|
if (e < 1024) return `${e} B`;
|
|
40750
40762
|
if (e < 1048576) {
|
|
40751
40763
|
let t = e / 1024;
|
|
@@ -40757,10 +40769,10 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40757
40769
|
}
|
|
40758
40770
|
let t = e / 1073741824;
|
|
40759
40771
|
return `${Number.isInteger(t) ? t : t.toFixed(1)} GB`;
|
|
40760
|
-
},
|
|
40772
|
+
}, D1 = (e) => e.mimeType?.toLowerCase().startsWith("video/") ? !0 : [e.name, e.url].some((e) => {
|
|
40761
40773
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split(".").at(-1)?.toLowerCase();
|
|
40762
|
-
return t !== void 0 &&
|
|
40763
|
-
}),
|
|
40774
|
+
return t !== void 0 && T1.has(t);
|
|
40775
|
+
}), O1 = [
|
|
40764
40776
|
["application/pdf", "pdf"],
|
|
40765
40777
|
["spreadsheetml", "sheet"],
|
|
40766
40778
|
["text/csv", "sheet"],
|
|
@@ -40768,7 +40780,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40768
40780
|
["text/markdown", "text"],
|
|
40769
40781
|
["text/plain", "text"],
|
|
40770
40782
|
["application/json", "text"]
|
|
40771
|
-
],
|
|
40783
|
+
], k1 = {
|
|
40772
40784
|
pdf: "pdf",
|
|
40773
40785
|
xlsx: "sheet",
|
|
40774
40786
|
csv: "sheet",
|
|
@@ -40778,20 +40790,20 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40778
40790
|
markdown: "text",
|
|
40779
40791
|
log: "text",
|
|
40780
40792
|
json: "text"
|
|
40781
|
-
},
|
|
40793
|
+
}, A1 = (e) => {
|
|
40782
40794
|
let t = e.mimeType?.toLowerCase() ?? "";
|
|
40783
|
-
for (let [e, n] of
|
|
40795
|
+
for (let [e, n] of O1) if (t.includes(e)) return n;
|
|
40784
40796
|
let n = e.name.toLowerCase(), r = n.lastIndexOf(".");
|
|
40785
|
-
return r <= 0 ? null :
|
|
40786
|
-
},
|
|
40797
|
+
return r <= 0 ? null : k1[n.slice(r + 1)] ?? null;
|
|
40798
|
+
}, j1 = {
|
|
40787
40799
|
pdf: Infinity,
|
|
40788
40800
|
sheet: 10485760,
|
|
40789
40801
|
docx: 10485760,
|
|
40790
40802
|
text: 2097152
|
|
40791
|
-
},
|
|
40803
|
+
}, M1 = (e, t) => (e.size ?? 0) <= j1[t], N1 = /^(application\/octet-stream|application\/vnd\.factorial\.)/i, P1 = (e) => {
|
|
40792
40804
|
let t = e?.trim();
|
|
40793
|
-
if (t && !
|
|
40794
|
-
},
|
|
40805
|
+
if (t && !N1.test(t)) return t;
|
|
40806
|
+
}, F1 = {
|
|
40795
40807
|
png: "image/png",
|
|
40796
40808
|
jpg: "image/jpeg",
|
|
40797
40809
|
jpeg: "image/jpeg",
|
|
@@ -40826,55 +40838,55 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40826
40838
|
mp3: "audio/mpeg",
|
|
40827
40839
|
m4a: "audio/mp4",
|
|
40828
40840
|
wav: "audio/wav"
|
|
40829
|
-
},
|
|
40841
|
+
}, I1 = (e) => {
|
|
40830
40842
|
if (!e) return;
|
|
40831
40843
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").at(-1) ?? "", n = t.lastIndexOf(".");
|
|
40832
40844
|
return n > 0 ? t.slice(n + 1).toLowerCase() : void 0;
|
|
40833
|
-
},
|
|
40845
|
+
}, L1 = (e) => {
|
|
40834
40846
|
let t = e.split("?")[1];
|
|
40835
40847
|
if (t) try {
|
|
40836
40848
|
return new URLSearchParams(t.split("#")[0]).get("path") ?? void 0;
|
|
40837
40849
|
} catch {
|
|
40838
40850
|
return;
|
|
40839
40851
|
}
|
|
40840
|
-
},
|
|
40852
|
+
}, R1 = (e) => {
|
|
40841
40853
|
let t = (e.split(/[?#]/, 1)[0] ?? "").split("/").filter(Boolean).at(-1) ?? "";
|
|
40842
40854
|
try {
|
|
40843
40855
|
return decodeURIComponent(t);
|
|
40844
40856
|
} catch {
|
|
40845
40857
|
return t;
|
|
40846
40858
|
}
|
|
40847
|
-
},
|
|
40848
|
-
let t =
|
|
40859
|
+
}, z1 = (e) => {
|
|
40860
|
+
let t = P1(e.mimeType);
|
|
40849
40861
|
if (t) return t;
|
|
40850
40862
|
for (let t of [
|
|
40851
40863
|
e.name,
|
|
40852
|
-
|
|
40864
|
+
L1(e.url),
|
|
40853
40865
|
e.url
|
|
40854
40866
|
]) {
|
|
40855
|
-
let e =
|
|
40856
|
-
if (e &&
|
|
40867
|
+
let e = I1(t);
|
|
40868
|
+
if (e && F1[e]) return F1[e];
|
|
40857
40869
|
}
|
|
40858
|
-
},
|
|
40859
|
-
let t =
|
|
40870
|
+
}, B1 = /^image\/(png|jpeg|gif|webp|avif|bmp|svg\+xml)$/, V1 = (e) => B1.test(z1(e) ?? ""), H1 = (e) => {
|
|
40871
|
+
let t = z1(e);
|
|
40860
40872
|
return t === e.mimeType ? e : {
|
|
40861
40873
|
...e,
|
|
40862
40874
|
mimeType: t
|
|
40863
40875
|
};
|
|
40864
|
-
},
|
|
40876
|
+
}, U1 = (e) => {
|
|
40865
40877
|
if (e.previewUrl) return {
|
|
40866
40878
|
kind: "pdf",
|
|
40867
40879
|
url: e.previewUrl
|
|
40868
40880
|
};
|
|
40869
|
-
let t =
|
|
40881
|
+
let t = A1({
|
|
40870
40882
|
name: e.name,
|
|
40871
|
-
mimeType:
|
|
40883
|
+
mimeType: z1(e)
|
|
40872
40884
|
});
|
|
40873
|
-
return !t || !
|
|
40885
|
+
return !t || !M1(e, t) ? null : {
|
|
40874
40886
|
kind: t,
|
|
40875
40887
|
url: e.url
|
|
40876
40888
|
};
|
|
40877
|
-
},
|
|
40889
|
+
}, W1 = (e) => {
|
|
40878
40890
|
let t = {
|
|
40879
40891
|
images: [],
|
|
40880
40892
|
videos: [],
|
|
@@ -40882,11 +40894,11 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40882
40894
|
files: []
|
|
40883
40895
|
};
|
|
40884
40896
|
for (let n of e) {
|
|
40885
|
-
let e =
|
|
40886
|
-
if (
|
|
40887
|
-
else if (
|
|
40897
|
+
let e = H1(n);
|
|
40898
|
+
if (V1(e)) t.images.push(n);
|
|
40899
|
+
else if (D1(e)) t.videos.push(n);
|
|
40888
40900
|
else {
|
|
40889
|
-
let r =
|
|
40901
|
+
let r = U1(e);
|
|
40890
40902
|
r ? t.documents.push({
|
|
40891
40903
|
file: n,
|
|
40892
40904
|
kind: r.kind
|
|
@@ -40894,12 +40906,12 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40894
40906
|
}
|
|
40895
40907
|
}
|
|
40896
40908
|
return t;
|
|
40897
|
-
},
|
|
40909
|
+
}, G1 = (e) => ({
|
|
40898
40910
|
url: e.url,
|
|
40899
40911
|
name: e.name,
|
|
40900
40912
|
thumbnailUrl: e.thumbnailUrl,
|
|
40901
|
-
mimeType:
|
|
40902
|
-
}),
|
|
40913
|
+
mimeType: z1(e)
|
|
40914
|
+
}), K1 = ({ children: e, onImageDownloaded: t }) => {
|
|
40903
40915
|
let [n, r] = H(null), [i, a] = H(null), o = V(null), s = () => {
|
|
40904
40916
|
o.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
40905
40917
|
}, c = () => {
|
|
@@ -40918,7 +40930,7 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40918
40930
|
...t,
|
|
40919
40931
|
index: e
|
|
40920
40932
|
}), []), f = z((e) => {
|
|
40921
|
-
let t =
|
|
40933
|
+
let t = U1(e);
|
|
40922
40934
|
t && (s(), a({
|
|
40923
40935
|
file: e,
|
|
40924
40936
|
kind: t.kind
|
|
@@ -40944,63 +40956,63 @@ var D$ = Ue("F0FileItem", be(E$)), O$ = D$, k$ = 2, A$ = 70, j$ = .08, M$ = 6, N
|
|
|
40944
40956
|
f,
|
|
40945
40957
|
p
|
|
40946
40958
|
]);
|
|
40947
|
-
return /* @__PURE__ */ U(
|
|
40959
|
+
return /* @__PURE__ */ U(c1.Provider, {
|
|
40948
40960
|
value: m,
|
|
40949
|
-
children: /* @__PURE__ */ W(
|
|
40961
|
+
children: /* @__PURE__ */ W(l1.Provider, {
|
|
40950
40962
|
value: h,
|
|
40951
40963
|
children: [
|
|
40952
40964
|
e,
|
|
40953
|
-
/* @__PURE__ */ U(
|
|
40954
|
-
/* @__PURE__ */ U(
|
|
40965
|
+
/* @__PURE__ */ U(w1, { onImageDownloaded: t }),
|
|
40966
|
+
/* @__PURE__ */ U(g1, {})
|
|
40955
40967
|
]
|
|
40956
40968
|
})
|
|
40957
40969
|
});
|
|
40958
|
-
},
|
|
40970
|
+
}, q1 = Nr({
|
|
40959
40971
|
remotePreviews: !1,
|
|
40960
40972
|
provided: !1
|
|
40961
|
-
}),
|
|
40973
|
+
}), J1 = () => Rr(q1), Y1 = ({ filePreviews: e, children: t }) => {
|
|
40962
40974
|
let n = O(), r = !!(e?.resolveUrl || e?.directUrls);
|
|
40963
|
-
return /* @__PURE__ */ U(
|
|
40964
|
-
value: r ?
|
|
40965
|
-
children: /* @__PURE__ */ U(
|
|
40975
|
+
return /* @__PURE__ */ U(q1.Provider, {
|
|
40976
|
+
value: r ? X1 : Z1,
|
|
40977
|
+
children: /* @__PURE__ */ U(K$, {
|
|
40966
40978
|
reducedMotion: n,
|
|
40967
40979
|
resolveUrl: e?.resolveUrl,
|
|
40968
|
-
children: /* @__PURE__ */ U(
|
|
40980
|
+
children: /* @__PURE__ */ U(K1, { children: t })
|
|
40969
40981
|
})
|
|
40970
40982
|
});
|
|
40971
|
-
},
|
|
40983
|
+
}, X1 = {
|
|
40972
40984
|
remotePreviews: !0,
|
|
40973
40985
|
provided: !0
|
|
40974
|
-
},
|
|
40986
|
+
}, Z1 = {
|
|
40975
40987
|
remotePreviews: !1,
|
|
40976
40988
|
provided: !0
|
|
40977
|
-
},
|
|
40989
|
+
}, Q1 = Er.min, $1 = Er.max, e0 = Er.default, { min: t0, max: n0, default: r0, mainMin: i0, mainHardMin: a0, splitMinFrame: o0 } = Er, s0 = o0, c0 = (e) => {
|
|
40978
40990
|
if (!Number.isFinite(e) || e <= 0) return {
|
|
40979
|
-
min:
|
|
40980
|
-
max:
|
|
40981
|
-
autoMax:
|
|
40991
|
+
min: t0,
|
|
40992
|
+
max: n0,
|
|
40993
|
+
autoMax: n0,
|
|
40982
40994
|
shouldOverlay: !1
|
|
40983
40995
|
};
|
|
40984
|
-
if (e <
|
|
40985
|
-
min:
|
|
40986
|
-
max:
|
|
40987
|
-
autoMax:
|
|
40996
|
+
if (e < s0) return {
|
|
40997
|
+
min: t0,
|
|
40998
|
+
max: n0,
|
|
40999
|
+
autoMax: n0,
|
|
40988
41000
|
shouldOverlay: !0
|
|
40989
41001
|
};
|
|
40990
|
-
let t = Math.min(
|
|
41002
|
+
let t = Math.min(n0, Math.max(e - i0, t0));
|
|
40991
41003
|
return {
|
|
40992
|
-
min:
|
|
40993
|
-
max: Math.min(
|
|
41004
|
+
min: t0,
|
|
41005
|
+
max: Math.min(n0, Math.max(e - a0, t0)),
|
|
40994
41006
|
autoMax: t,
|
|
40995
41007
|
shouldOverlay: !1
|
|
40996
41008
|
};
|
|
40997
|
-
},
|
|
40998
|
-
let { min: n, max: r, autoMax: i } =
|
|
40999
|
-
return Math.max(n, Math.min(e ===
|
|
41000
|
-
},
|
|
41009
|
+
}, l0 = (e, t) => {
|
|
41010
|
+
let { min: n, max: r, autoMax: i } = c0(t);
|
|
41011
|
+
return Math.max(n, Math.min(e === r0 ? i : r, e));
|
|
41012
|
+
}, u0 = "f0-side-panel-width", d0 = "f0-side-panel-open", f0 = "f0-side-panel-layout", p0 = "f0-side-panel-view-id", m0 = ["ONE-ai-chat-width"], h0 = ["ONE-ai-chat-open"], g0 = ["ONE-ai-chat-visualization-mode"], _0 = ["ONE-ai-chat-panel-content-id"];
|
|
41001
41013
|
//#endregion
|
|
41002
41014
|
//#region src/elements/lib/local-storage.ts
|
|
41003
|
-
function
|
|
41015
|
+
function v0(e, t) {
|
|
41004
41016
|
try {
|
|
41005
41017
|
let n = localStorage.getItem(e);
|
|
41006
41018
|
return n === null ? t : JSON.parse(n);
|
|
@@ -41008,18 +41020,18 @@ function g0(e, t) {
|
|
|
41008
41020
|
return t;
|
|
41009
41021
|
}
|
|
41010
41022
|
}
|
|
41011
|
-
function
|
|
41023
|
+
function y0(e, t) {
|
|
41012
41024
|
try {
|
|
41013
41025
|
localStorage.setItem(e, JSON.stringify(t));
|
|
41014
41026
|
} catch {}
|
|
41015
41027
|
}
|
|
41016
41028
|
//#endregion
|
|
41017
41029
|
//#region src/elements/lib/persisted-state.ts
|
|
41018
|
-
function
|
|
41030
|
+
function b0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, debounceMs: a = 0 }) {
|
|
41019
41031
|
let [o, s] = H(() => {
|
|
41020
41032
|
if (typeof window > "u") return n;
|
|
41021
41033
|
for (let n of [e, ...t ?? []]) {
|
|
41022
|
-
let e =
|
|
41034
|
+
let e = v0(n, null);
|
|
41023
41035
|
if (e !== null && (!r || r(e))) return e;
|
|
41024
41036
|
}
|
|
41025
41037
|
return n;
|
|
@@ -41027,10 +41039,10 @@ function v0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41027
41039
|
return B(() => {
|
|
41028
41040
|
if (typeof window > "u" || i && !i(o)) return;
|
|
41029
41041
|
if (a <= 0) {
|
|
41030
|
-
|
|
41042
|
+
y0(e, o);
|
|
41031
41043
|
return;
|
|
41032
41044
|
}
|
|
41033
|
-
let t = window.setTimeout(() =>
|
|
41045
|
+
let t = window.setTimeout(() => y0(e, o), a);
|
|
41034
41046
|
return () => window.clearTimeout(t);
|
|
41035
41047
|
}, [
|
|
41036
41048
|
e,
|
|
@@ -41041,21 +41053,21 @@ function v0({ key: e, legacyKeys: t, fallback: n, validate: r, shouldWrite: i, d
|
|
|
41041
41053
|
}
|
|
41042
41054
|
//#endregion
|
|
41043
41055
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelProvider.tsx
|
|
41044
|
-
var
|
|
41045
|
-
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] =
|
|
41046
|
-
key:
|
|
41047
|
-
legacyKeys:
|
|
41048
|
-
fallback:
|
|
41049
|
-
validate: (e) => typeof e == "number" && !isNaN(e) && e >=
|
|
41056
|
+
var x0 = Nr(null), { min: S0, max: C0 } = Er, w0 = 5e3, T0 = () => {}, E0 = [], D0 = ({ children: e, views: t = E0, side: n = "right", contentSide: r, resizable: i = !1, defaultLayout: a = "sidepanel" }) => {
|
|
41057
|
+
let o = t.some((e) => e.available !== !1), s = t.some((e) => e.available !== !1 && e.restoresContent), [c, l] = b0({
|
|
41058
|
+
key: u0,
|
|
41059
|
+
legacyKeys: m0,
|
|
41060
|
+
fallback: e0,
|
|
41061
|
+
validate: (e) => typeof e == "number" && !isNaN(e) && e >= S0 && e <= C0,
|
|
41050
41062
|
debounceMs: 150
|
|
41051
|
-
}), [u, d] = H(!1), [f, p] = H(0), m = Hr(() =>
|
|
41052
|
-
key:
|
|
41053
|
-
legacyKeys:
|
|
41063
|
+
}), [u, d] = H(!1), [f, p] = H(0), m = Hr(() => c0(f), [f]), h = Hr(() => l0(c, f), [c, f]), g = E("(pointer: coarse)", { initializeWithValue: !0 }), _ = E(`(max-width: ${Tr.md}px)`, { initializeWithValue: !0 }), v = g && _ || m.shouldOverlay, [y, b] = H(null), x = o || y !== null, [S, C] = b0({
|
|
41064
|
+
key: d0,
|
|
41065
|
+
legacyKeys: h0,
|
|
41054
41066
|
fallback: a === "fullscreen",
|
|
41055
41067
|
validate: (e) => typeof e == "boolean"
|
|
41056
|
-
}), w = S && x, [T, D] =
|
|
41057
|
-
key:
|
|
41058
|
-
legacyKeys:
|
|
41068
|
+
}), w = S && x, [T, D] = b0({
|
|
41069
|
+
key: f0,
|
|
41070
|
+
legacyKeys: g0,
|
|
41059
41071
|
fallback: a,
|
|
41060
41072
|
validate: (e) => e === "sidepanel" || e === "fullscreen"
|
|
41061
41073
|
}), O = z((e) => {
|
|
@@ -41063,16 +41075,16 @@ var y0 = Nr(null), { min: b0, max: x0 } = Er, S0 = 5e3, C0 = () => {}, w0 = [],
|
|
|
41063
41075
|
let n = typeof e == "function" ? e(t) : e;
|
|
41064
41076
|
return n === "fullscreen" && C(!0), n;
|
|
41065
41077
|
});
|
|
41066
|
-
}, [D, C]), [k, A] = H(() => T !== "fullscreen"), [j, M] =
|
|
41067
|
-
key:
|
|
41068
|
-
legacyKeys:
|
|
41078
|
+
}, [D, C]), [k, A] = H(() => T !== "fullscreen"), [j, M] = b0({
|
|
41079
|
+
key: p0,
|
|
41080
|
+
legacyKeys: _0,
|
|
41069
41081
|
fallback: null,
|
|
41070
41082
|
validate: (e) => e === null || typeof e == "string"
|
|
41071
41083
|
}), [N, ee] = H(() => w && s ? j : null), te = z((e) => {
|
|
41072
41084
|
b(e), ee(null), e && !w && C(!0);
|
|
41073
41085
|
}, [w, C]), ne = z(() => {
|
|
41074
41086
|
b(null), ee(null);
|
|
41075
|
-
}, []), re = z(() => ee(null), []), ie = z(() => l(
|
|
41087
|
+
}, []), re = z(() => ee(null), []), ie = z(() => l(e0), [l]);
|
|
41076
41088
|
B(() => {
|
|
41077
41089
|
N || M(y?.id ?? null);
|
|
41078
41090
|
}, [
|
|
@@ -41085,7 +41097,7 @@ var y0 = Nr(null), { min: b0, max: x0 } = Er, S0 = 5e3, C0 = () => {}, w0 = [],
|
|
|
41085
41097
|
if (!N) return;
|
|
41086
41098
|
let e = setTimeout(() => {
|
|
41087
41099
|
process.env.NODE_ENV !== "production" && console.warn(`[f0] Side panel restore for "${N}" timed out: no view answered it with present() or cancelRestore().`), ee(null);
|
|
41088
|
-
},
|
|
41100
|
+
}, w0);
|
|
41089
41101
|
return () => clearTimeout(e);
|
|
41090
41102
|
}, [N]), B(() => {
|
|
41091
41103
|
if (!w) {
|
|
@@ -41144,47 +41156,47 @@ var y0 = Nr(null), { min: b0, max: x0 } = Er, S0 = 5e3, C0 = () => {}, w0 = [],
|
|
|
41144
41156
|
i,
|
|
41145
41157
|
k
|
|
41146
41158
|
]);
|
|
41147
|
-
return /* @__PURE__ */ U(
|
|
41159
|
+
return /* @__PURE__ */ U(x0.Provider, {
|
|
41148
41160
|
value: de,
|
|
41149
41161
|
children: e
|
|
41150
41162
|
});
|
|
41151
|
-
},
|
|
41163
|
+
}, O0 = Object.freeze({
|
|
41152
41164
|
hasAvailableView: !1,
|
|
41153
41165
|
open: !1,
|
|
41154
|
-
setOpen:
|
|
41166
|
+
setOpen: T0,
|
|
41155
41167
|
layout: "sidepanel",
|
|
41156
|
-
setLayout:
|
|
41168
|
+
setLayout: T0,
|
|
41157
41169
|
side: "right",
|
|
41158
|
-
setSide:
|
|
41170
|
+
setSide: T0,
|
|
41159
41171
|
contentSide: "right",
|
|
41160
|
-
setContentSide:
|
|
41172
|
+
setContentSide: T0,
|
|
41161
41173
|
activeContent: null,
|
|
41162
|
-
present:
|
|
41163
|
-
clear:
|
|
41174
|
+
present: T0,
|
|
41175
|
+
clear: T0,
|
|
41164
41176
|
restoringViewId: null,
|
|
41165
|
-
cancelRestore:
|
|
41166
|
-
width:
|
|
41167
|
-
setWidth:
|
|
41168
|
-
resetWidth:
|
|
41169
|
-
effectiveWidth:
|
|
41170
|
-
widthBounds:
|
|
41177
|
+
cancelRestore: T0,
|
|
41178
|
+
width: e0,
|
|
41179
|
+
setWidth: T0,
|
|
41180
|
+
resetWidth: T0,
|
|
41181
|
+
effectiveWidth: e0,
|
|
41182
|
+
widthBounds: c0(0),
|
|
41171
41183
|
panelOverlays: !1,
|
|
41172
|
-
setFrameWidth:
|
|
41184
|
+
setFrameWidth: T0,
|
|
41173
41185
|
isResizing: !1,
|
|
41174
|
-
setIsResizing:
|
|
41186
|
+
setIsResizing: T0,
|
|
41175
41187
|
resizable: !1,
|
|
41176
41188
|
shouldPlayEntranceAnimation: !0,
|
|
41177
|
-
setShouldPlayEntranceAnimation:
|
|
41189
|
+
setShouldPlayEntranceAnimation: T0
|
|
41178
41190
|
});
|
|
41179
|
-
function
|
|
41180
|
-
return Rr(
|
|
41191
|
+
function k0() {
|
|
41192
|
+
return Rr(x0) ?? O0;
|
|
41181
41193
|
}
|
|
41182
|
-
function
|
|
41183
|
-
return Rr(
|
|
41194
|
+
function A0() {
|
|
41195
|
+
return Rr(x0) !== null;
|
|
41184
41196
|
}
|
|
41185
41197
|
//#endregion
|
|
41186
41198
|
//#region src/blocks/ApplicationFrame/SidePanel/SidePanelResizeHandle.tsx
|
|
41187
|
-
var
|
|
41199
|
+
var j0 = 16, M0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, flushInnerSeam: i, side: a = "right", value: o, minValue: s, maxValue: c }) => {
|
|
41188
41200
|
let l = V(0), u = V(0), d = V(null), f = He(), p = z((e) => {
|
|
41189
41201
|
e.preventDefault(), l.current = e.clientX, r(!0);
|
|
41190
41202
|
}, [r]), m = z(() => {
|
|
@@ -41215,10 +41227,10 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41215
41227
|
let r;
|
|
41216
41228
|
switch (n.key) {
|
|
41217
41229
|
case "ArrowLeft":
|
|
41218
|
-
r = a === "left" ? -16 :
|
|
41230
|
+
r = a === "left" ? -16 : j0;
|
|
41219
41231
|
break;
|
|
41220
41232
|
case "ArrowRight":
|
|
41221
|
-
r = a === "left" ?
|
|
41233
|
+
r = a === "left" ? j0 : -16;
|
|
41222
41234
|
break;
|
|
41223
41235
|
case "Home":
|
|
41224
41236
|
r = s - o;
|
|
@@ -41264,20 +41276,20 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41264
41276
|
})]
|
|
41265
41277
|
})
|
|
41266
41278
|
});
|
|
41267
|
-
}, { duration:
|
|
41279
|
+
}, { duration: N0, ease: P0 } = wr, F0 = { leaving: ({ exitStyle: e, closedClipPath: t, reducedMotion: n }) => n ? {
|
|
41268
41280
|
opacity: 0,
|
|
41269
41281
|
transition: { duration: 0 }
|
|
41270
41282
|
} : e === "hold" ? {
|
|
41271
41283
|
opacity: 0,
|
|
41272
41284
|
transition: {
|
|
41273
|
-
delay:
|
|
41285
|
+
delay: N0.base,
|
|
41274
41286
|
duration: 0
|
|
41275
41287
|
}
|
|
41276
41288
|
} : {
|
|
41277
41289
|
opacity: 0,
|
|
41278
41290
|
clipPath: t
|
|
41279
|
-
} },
|
|
41280
|
-
let { open: c, layout: l, shouldPlayEntranceAnimation: u, setShouldPlayEntranceAnimation: d, resizable: f, width: p, effectiveWidth: m, setWidth: h, resetWidth: g, widthBounds: _, panelOverlays: v, setIsResizing: y, side: b } =
|
|
41291
|
+
} }, I0 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", flushInnerSeam: i = !1, surfaceProps: a, surfaceRef: o, decorations: s }) => {
|
|
41292
|
+
let { open: c, layout: l, shouldPlayEntranceAnimation: u, setShouldPlayEntranceAnimation: d, resizable: f, width: p, effectiveWidth: m, setWidth: h, resetWidth: g, widthBounds: _, panelOverlays: v, setIsResizing: y, side: b } = k0(), x = t ?? c, S = O(), C = (n ?? b) === "left", w = V(!1);
|
|
41281
41293
|
B(() => {
|
|
41282
41294
|
w.current = c;
|
|
41283
41295
|
});
|
|
@@ -41286,8 +41298,8 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41286
41298
|
if (E) return y(!0), () => y(!1);
|
|
41287
41299
|
}, [E, y]);
|
|
41288
41300
|
let { min: k, max: A } = _ ?? {
|
|
41289
|
-
min:
|
|
41290
|
-
max:
|
|
41301
|
+
min: Q1,
|
|
41302
|
+
max: $1
|
|
41291
41303
|
}, j = f && !T && !(v ?? !1) && A > k, M = Math.max(k, Math.min(A, m ?? p)), N = z((e) => {
|
|
41292
41304
|
h((t) => {
|
|
41293
41305
|
let n = t + e;
|
|
@@ -41298,8 +41310,8 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41298
41310
|
k,
|
|
41299
41311
|
A
|
|
41300
41312
|
]), ee = Hr(() => E || S ? { duration: 0 } : {
|
|
41301
|
-
duration:
|
|
41302
|
-
ease:
|
|
41313
|
+
duration: N0.base,
|
|
41314
|
+
ease: P0.outSwift
|
|
41303
41315
|
}, [E, S]), te = C ? "inset(0 100% 0 0)" : "inset(0 0 0 100%)", ne = {
|
|
41304
41316
|
exitStyle: r,
|
|
41305
41317
|
closedClipPath: te,
|
|
@@ -41308,7 +41320,7 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41308
41320
|
return /* @__PURE__ */ U(ge, {
|
|
41309
41321
|
custom: ne,
|
|
41310
41322
|
children: x ? /* @__PURE__ */ W(De.div, {
|
|
41311
|
-
variants:
|
|
41323
|
+
variants: F0,
|
|
41312
41324
|
className: F("bg-f1-transparent pointer-events-auto relative flex h-full dark:bg-f1-background xs:py-1", T ? "xs:pr-1" : C ? "mr-auto" : "ml-auto xs:pr-1"),
|
|
41313
41325
|
initial: re ? {
|
|
41314
41326
|
opacity: 0,
|
|
@@ -41328,7 +41340,7 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41328
41340
|
u && d(!1);
|
|
41329
41341
|
},
|
|
41330
41342
|
children: [
|
|
41331
|
-
j && !C ? /* @__PURE__ */ U(
|
|
41343
|
+
j && !C ? /* @__PURE__ */ U(M0, {
|
|
41332
41344
|
onResize: N,
|
|
41333
41345
|
onReset: g,
|
|
41334
41346
|
isResizing: E,
|
|
@@ -41349,7 +41361,7 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41349
41361
|
children: e
|
|
41350
41362
|
}), s]
|
|
41351
41363
|
}),
|
|
41352
|
-
j && C ? /* @__PURE__ */ U(
|
|
41364
|
+
j && C ? /* @__PURE__ */ U(M0, {
|
|
41353
41365
|
onResize: N,
|
|
41354
41366
|
onReset: g,
|
|
41355
41367
|
isResizing: E,
|
|
@@ -41363,21 +41375,1446 @@ var k0 = 16, A0 = ({ onResize: e, onReset: t, isResizing: n, setIsResizing: r, f
|
|
|
41363
41375
|
]
|
|
41364
41376
|
}, "chat-wrapper") : null
|
|
41365
41377
|
});
|
|
41366
|
-
},
|
|
41378
|
+
}, L0 = (e, { preferText: t = !1 } = {}) => {
|
|
41367
41379
|
let n = Array.from(e.files ?? []);
|
|
41368
41380
|
return n.length === 0 || t && e.getData("text/plain").trim() !== "" && n.every((e) => e.type.startsWith("image/")) ? [] : n;
|
|
41369
|
-
},
|
|
41381
|
+
}, R0 = ({ enabled: e, onFiles: t, preferText: n = !1 }) => z((r) => {
|
|
41370
41382
|
if (!e) return;
|
|
41371
|
-
let i =
|
|
41383
|
+
let i = L0(r.clipboardData, { preferText: n });
|
|
41372
41384
|
i.length !== 0 && (r.preventDefault(), t(i));
|
|
41373
41385
|
}, [
|
|
41374
41386
|
e,
|
|
41375
41387
|
t,
|
|
41376
41388
|
n
|
|
41377
|
-
])
|
|
41389
|
+
]), z0 = "text-base leading-5 max-sm:text-[16px] [@media(pointer:coarse)]:text-[16px]", B0 = `whitespace-pre-wrap break-words p-3 ${z0}`, V0 = "min-h-[44px] max-h-[140px]", H0 = ({ placeholders: e, defaultPlaceholder: t, inputValue: n, inProgress: r }) => {
|
|
41390
|
+
let i = O(), [a, o] = H(""), [s, c] = H(0), [l, u] = H(!1), d = V(null), f = V(null), p = V(null), m = e[s] ?? t;
|
|
41391
|
+
return B(() => {
|
|
41392
|
+
let t = () => {
|
|
41393
|
+
f.current &&= (clearInterval(f.current), null), p.current &&= (clearInterval(p.current), null), d.current &&= (clearTimeout(d.current), null);
|
|
41394
|
+
};
|
|
41395
|
+
if (n.length > 0 || r) {
|
|
41396
|
+
u(!1), o(""), t();
|
|
41397
|
+
return;
|
|
41398
|
+
}
|
|
41399
|
+
if (i) return u(!1), o(m), t(), d.current = setTimeout(() => {
|
|
41400
|
+
let t = (s + 1) % Math.max(e.length, 1);
|
|
41401
|
+
c(t);
|
|
41402
|
+
}, 4e3), () => {
|
|
41403
|
+
t();
|
|
41404
|
+
};
|
|
41405
|
+
u(!0), o("");
|
|
41406
|
+
let a = 0, l = () => {
|
|
41407
|
+
p.current = setInterval(() => {
|
|
41408
|
+
a > 0 ? (a--, o(m.slice(0, a))) : (p.current &&= (clearInterval(p.current), null), d.current = setTimeout(() => {
|
|
41409
|
+
let t = (s + 1) % Math.max(e.length, 1);
|
|
41410
|
+
c(t);
|
|
41411
|
+
}, 1e3));
|
|
41412
|
+
}, 30);
|
|
41413
|
+
};
|
|
41414
|
+
return f.current = setInterval(() => {
|
|
41415
|
+
a < m.length ? (o(m.slice(0, a + 1)), a++) : (f.current &&= (clearInterval(f.current), null), d.current = setTimeout(l, 2e3));
|
|
41416
|
+
}, 50), () => {
|
|
41417
|
+
t();
|
|
41418
|
+
};
|
|
41419
|
+
}, [
|
|
41420
|
+
n,
|
|
41421
|
+
r,
|
|
41422
|
+
m,
|
|
41423
|
+
s,
|
|
41424
|
+
e.length,
|
|
41425
|
+
i
|
|
41426
|
+
]), n.length > 0 || r ? null : /* @__PURE__ */ U(ge, { children: /* @__PURE__ */ U(De.div, {
|
|
41427
|
+
initial: { opacity: 0 },
|
|
41428
|
+
animate: { opacity: 1 },
|
|
41429
|
+
exit: { opacity: 0 },
|
|
41430
|
+
transition: { duration: i ? 0 : .4 },
|
|
41431
|
+
className: F("col-start-1 row-start-1", "pointer-events-none", "text-f1-foreground-secondary", z0, "font-normal", "p-3"),
|
|
41432
|
+
children: /* @__PURE__ */ W("div", {
|
|
41433
|
+
"data-a11y-color-contrast-ignore": !0,
|
|
41434
|
+
className: F("overflow-hidden text-ellipsis whitespace-nowrap", "whitespace-pre-wrap break-words overflow-visible"),
|
|
41435
|
+
children: [a, l && !i ? /* @__PURE__ */ U("span", {
|
|
41436
|
+
className: "f0-chat-cursor-blink",
|
|
41437
|
+
children: "|"
|
|
41438
|
+
}) : null]
|
|
41439
|
+
})
|
|
41440
|
+
}) });
|
|
41441
|
+
}, U0 = ({ textareaRef: e, highlightRef: t, value: n, placeholder: r, ariaLabel: i, role: a, name: o, onChange: s, onKeyDown: c, onPaste: l, onFocus: u, onBlur: d, onCursorUpdate: f, onScroll: p, highlightSegments: m, hasOverlay: h, isAutocompleteOpen: g = !1, autocompleteListboxId: _, activeAutocompleteOptionId: v, isInvalid: y, errorMessageId: b, className: x }) => {
|
|
41442
|
+
let S = r.mode === "overlay" ? r.texts : [], C = S.length > 1, w = r.mode === "overlay" && !C && n.length === 0 ? S[0] ?? r.fallback : null;
|
|
41443
|
+
return /* @__PURE__ */ W("div", {
|
|
41444
|
+
className: F("grid grid-cols-1 grid-rows-1", x),
|
|
41445
|
+
children: [
|
|
41446
|
+
/* @__PURE__ */ U("div", {
|
|
41447
|
+
"aria-hidden": !0,
|
|
41448
|
+
className: F("col-start-1 row-start-1", "pointer-events-none invisible", B0, V0),
|
|
41449
|
+
children: n.endsWith("\n") ? n + "_" : n || " "
|
|
41450
|
+
}),
|
|
41451
|
+
h ? /* @__PURE__ */ U("div", {
|
|
41452
|
+
ref: t,
|
|
41453
|
+
"aria-hidden": !0,
|
|
41454
|
+
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground", B0, V0, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),
|
|
41455
|
+
children: m.map((e, t) => e.type === "mention" ? /* @__PURE__ */ U("span", {
|
|
41456
|
+
className: "text-f1-foreground-secondary",
|
|
41457
|
+
children: e.text
|
|
41458
|
+
}, t) : e.type === "ghost" ? /* @__PURE__ */ U("span", {
|
|
41459
|
+
className: "text-f1-foreground-secondary opacity-50",
|
|
41460
|
+
children: e.text
|
|
41461
|
+
}, t) : /* @__PURE__ */ U("span", { children: e.text }, t))
|
|
41462
|
+
}) : null,
|
|
41463
|
+
w === null ? null : /* @__PURE__ */ U("p", {
|
|
41464
|
+
"aria-hidden": !0,
|
|
41465
|
+
className: F("col-start-1 row-start-1", "pointer-events-none text-f1-foreground-secondary", B0, "overflow-hidden text-ellipsis whitespace-nowrap"),
|
|
41466
|
+
children: w
|
|
41467
|
+
}),
|
|
41468
|
+
/* @__PURE__ */ U("textarea", {
|
|
41469
|
+
ref: e,
|
|
41470
|
+
rows: 1,
|
|
41471
|
+
name: o,
|
|
41472
|
+
value: n,
|
|
41473
|
+
placeholder: r.mode === "native" ? r.text : void 0,
|
|
41474
|
+
"aria-label": i,
|
|
41475
|
+
onChange: (e) => s(e.target.value, e.target.selectionStart ?? 0),
|
|
41476
|
+
onKeyDown: c,
|
|
41477
|
+
onPaste: l,
|
|
41478
|
+
onFocus: u,
|
|
41479
|
+
onBlur: d,
|
|
41480
|
+
onKeyUp: f,
|
|
41481
|
+
onClick: f,
|
|
41482
|
+
onSelect: f,
|
|
41483
|
+
onScroll: p,
|
|
41484
|
+
role: a,
|
|
41485
|
+
"aria-autocomplete": "list",
|
|
41486
|
+
"aria-expanded": a === "combobox" ? g : void 0,
|
|
41487
|
+
"aria-controls": _,
|
|
41488
|
+
"aria-activedescendant": v,
|
|
41489
|
+
"aria-invalid": y || void 0,
|
|
41490
|
+
"aria-describedby": y ? b : void 0,
|
|
41491
|
+
className: F("col-start-1 row-start-1", "w-full resize-none bg-transparent outline-none", "placeholder:text-f1-foreground-secondary", B0, V0, "overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", h ? "text-transparent caret-f1-foreground" : "text-f1-foreground", !h && C && n.length === 0 && "caret-transparent")
|
|
41492
|
+
}),
|
|
41493
|
+
C && r.mode === "overlay" ? /* @__PURE__ */ U(H0, {
|
|
41494
|
+
placeholders: S,
|
|
41495
|
+
defaultPlaceholder: r.fallback,
|
|
41496
|
+
inputValue: n,
|
|
41497
|
+
inProgress: r.paused ?? !1
|
|
41498
|
+
}) : null
|
|
41499
|
+
]
|
|
41500
|
+
});
|
|
41501
|
+
}, W0 = 4e3;
|
|
41502
|
+
function G0(e = W0) {
|
|
41503
|
+
let [t, n] = H(null), r = V(null), i = z(() => {
|
|
41504
|
+
r.current && clearTimeout(r.current), r.current = null, n(null);
|
|
41505
|
+
}, []), a = z((t, i) => {
|
|
41506
|
+
r.current && clearTimeout(r.current), n(t), i?.persistent ? r.current = null : r.current = setTimeout(() => {
|
|
41507
|
+
n(null), r.current = null;
|
|
41508
|
+
}, e);
|
|
41509
|
+
}, [e]);
|
|
41510
|
+
return B(() => () => {
|
|
41511
|
+
r.current && clearTimeout(r.current);
|
|
41512
|
+
}, []), {
|
|
41513
|
+
error: t,
|
|
41514
|
+
show: a,
|
|
41515
|
+
clear: i
|
|
41516
|
+
};
|
|
41517
|
+
}
|
|
41518
|
+
//#endregion
|
|
41519
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerMentionPopover.tsx
|
|
41520
|
+
var K0 = (e, t) => `${e}-option-${`${t.type}-${t.id}`.replace(/[^a-zA-Z0-9_-]/g, "-")}`, q0 = (e) => e.type === "icon" || e.type === "emoji" ? "sm" : "xs", J0 = Lr(R(({ id: e, item: t, source: n, isSelected: r, onSelect: i, description: a }, o) => {
|
|
41521
|
+
let s = !n;
|
|
41522
|
+
return /* @__PURE__ */ W("div", {
|
|
41523
|
+
ref: o,
|
|
41524
|
+
id: e,
|
|
41525
|
+
role: "option",
|
|
41526
|
+
"aria-selected": r,
|
|
41527
|
+
className: F("flex cursor-pointer items-center gap-2 rounded p-2", "transition-colors", r ? "bg-f1-background-secondary" : "hover:bg-f1-background-secondary-hover"),
|
|
41528
|
+
onMouseDown: (e) => {
|
|
41529
|
+
e.preventDefault(), i({
|
|
41530
|
+
item: t,
|
|
41531
|
+
source: n
|
|
41532
|
+
});
|
|
41533
|
+
},
|
|
41534
|
+
children: [s ? /* @__PURE__ */ U("span", {
|
|
41535
|
+
className: "flex size-5 shrink-0 items-center justify-center rounded-full bg-f1-background-secondary",
|
|
41536
|
+
children: /* @__PURE__ */ U(Ae, {
|
|
41537
|
+
icon: Ws,
|
|
41538
|
+
size: "sm",
|
|
41539
|
+
color: "default"
|
|
41540
|
+
})
|
|
41541
|
+
}) : t.avatar ? /* @__PURE__ */ U(Rt, {
|
|
41542
|
+
size: q0(t.avatar),
|
|
41543
|
+
avatar: t.avatar
|
|
41544
|
+
}) : t.type === "person" ? /* @__PURE__ */ U(Rt, {
|
|
41545
|
+
size: "xs",
|
|
41546
|
+
avatar: {
|
|
41547
|
+
type: "person",
|
|
41548
|
+
firstName: t.label,
|
|
41549
|
+
lastName: ""
|
|
41550
|
+
}
|
|
41551
|
+
}) : null, /* @__PURE__ */ W("div", {
|
|
41552
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
41553
|
+
children: [/* @__PURE__ */ U(tt, {
|
|
41554
|
+
className: "text-base font-medium text-f1-foreground",
|
|
41555
|
+
children: t.label
|
|
41556
|
+
}), a ?? t.description ? /* @__PURE__ */ U(tt, {
|
|
41557
|
+
className: "text-sm text-f1-foreground-secondary",
|
|
41558
|
+
children: a ?? t.description ?? ""
|
|
41559
|
+
}) : null]
|
|
41560
|
+
})]
|
|
41561
|
+
});
|
|
41562
|
+
}));
|
|
41563
|
+
J0.displayName = "ComposerMentionRow";
|
|
41564
|
+
var Y0 = () => /* @__PURE__ */ U(Wr, { children: Array.from({ length: 3 }, (e, t) => /* @__PURE__ */ W("div", {
|
|
41565
|
+
className: "flex items-center gap-2 p-2",
|
|
41566
|
+
"aria-hidden": "true",
|
|
41567
|
+
children: [/* @__PURE__ */ U(Ie, { className: "size-5 shrink-0 rounded-full" }), /* @__PURE__ */ U(Ie, { className: F("h-4 rounded", t === 1 ? "w-24" : "w-32") })]
|
|
41568
|
+
}, t)) });
|
|
41569
|
+
function X0({ isOpen: e, listboxId: t, label: n, rows: r, groups: i, showGroupLabels: a, isLoading: o, selectedIndex: s, position: c, onSelect: l, pinnedDescription: u }) {
|
|
41570
|
+
let d = V(null), f = V(null), p = V(l);
|
|
41571
|
+
Vr(() => {
|
|
41572
|
+
p.current = l;
|
|
41573
|
+
});
|
|
41574
|
+
let m = z((e) => p.current(e), []);
|
|
41575
|
+
B(() => {
|
|
41576
|
+
f.current?.scrollIntoView?.({ block: "nearest" });
|
|
41577
|
+
}, [s]), Vr(() => {
|
|
41578
|
+
let e = d.current, t = e?.offsetParent;
|
|
41579
|
+
if (!e || !(t instanceof HTMLElement)) return;
|
|
41580
|
+
let n = e.offsetLeft + e.offsetWidth - t.clientWidth;
|
|
41581
|
+
n > 0 && (e.style.left = `${Math.max(0, e.offsetLeft - n)}px`);
|
|
41582
|
+
}, [c]);
|
|
41583
|
+
let h = r[0] && !r[0].source ? r[0] : null, g = i.length > 0;
|
|
41584
|
+
if (!e || r.length === 0 && !o) return null;
|
|
41585
|
+
let _ = h ? 0 : -1;
|
|
41586
|
+
return /* @__PURE__ */ W("div", {
|
|
41587
|
+
ref: d,
|
|
41588
|
+
id: t,
|
|
41589
|
+
role: "listbox",
|
|
41590
|
+
"aria-label": n,
|
|
41591
|
+
"aria-busy": o || void 0,
|
|
41592
|
+
style: {
|
|
41593
|
+
position: "absolute",
|
|
41594
|
+
bottom: c ? `${c.bottom}px` : "100%",
|
|
41595
|
+
left: c ? `${c.left}px` : 0
|
|
41596
|
+
},
|
|
41597
|
+
className: F("z-50", "w-64 max-h-60 overflow-y-auto", "rounded-lg border border-solid border-f1-border-secondary", "bg-f1-background shadow-md", "p-1"),
|
|
41598
|
+
children: [
|
|
41599
|
+
h ? /* @__PURE__ */ U(J0, {
|
|
41600
|
+
ref: s === 0 ? f : void 0,
|
|
41601
|
+
id: K0(t, h.item),
|
|
41602
|
+
item: h.item,
|
|
41603
|
+
source: h.source,
|
|
41604
|
+
isSelected: s === 0,
|
|
41605
|
+
onSelect: m,
|
|
41606
|
+
description: u
|
|
41607
|
+
}) : null,
|
|
41608
|
+
i.map((e) => /* @__PURE__ */ W("div", {
|
|
41609
|
+
role: "group",
|
|
41610
|
+
"aria-label": a ? e.source.label : void 0,
|
|
41611
|
+
children: [a ? /* @__PURE__ */ U("div", {
|
|
41612
|
+
"aria-hidden": "true",
|
|
41613
|
+
className: "px-2 pb-1 pt-2 text-sm font-medium text-f1-foreground-secondary",
|
|
41614
|
+
children: e.source.label
|
|
41615
|
+
}) : null, e.items.map((n) => {
|
|
41616
|
+
_++;
|
|
41617
|
+
let r = _ === s;
|
|
41618
|
+
return /* @__PURE__ */ U(J0, {
|
|
41619
|
+
ref: r ? f : void 0,
|
|
41620
|
+
id: K0(t, n),
|
|
41621
|
+
item: n,
|
|
41622
|
+
source: e.source,
|
|
41623
|
+
isSelected: r,
|
|
41624
|
+
onSelect: m
|
|
41625
|
+
}, `${n.type}:${n.id}`);
|
|
41626
|
+
})]
|
|
41627
|
+
}, e.source.type)),
|
|
41628
|
+
o && !g ? /* @__PURE__ */ U(Y0, {}) : null
|
|
41629
|
+
]
|
|
41630
|
+
});
|
|
41631
|
+
}
|
|
41632
|
+
//#endregion
|
|
41633
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/parts/ComposerNotices.tsx
|
|
41634
|
+
var Z0 = ({ message: e, id: t, reducedMotion: n }) => /* @__PURE__ */ U(ge, {
|
|
41635
|
+
initial: !1,
|
|
41636
|
+
children: e ? /* @__PURE__ */ U(De.div, {
|
|
41637
|
+
id: t,
|
|
41638
|
+
role: "alert",
|
|
41639
|
+
"aria-atomic": "true",
|
|
41640
|
+
className: "p-1",
|
|
41641
|
+
initial: {
|
|
41642
|
+
opacity: 0,
|
|
41643
|
+
y: -4
|
|
41644
|
+
},
|
|
41645
|
+
animate: {
|
|
41646
|
+
opacity: 1,
|
|
41647
|
+
y: 0
|
|
41648
|
+
},
|
|
41649
|
+
exit: {
|
|
41650
|
+
opacity: 0,
|
|
41651
|
+
y: -4
|
|
41652
|
+
},
|
|
41653
|
+
transition: {
|
|
41654
|
+
duration: n ? 0 : .2,
|
|
41655
|
+
ease: "easeOut"
|
|
41656
|
+
},
|
|
41657
|
+
children: /* @__PURE__ */ W("div", {
|
|
41658
|
+
className: F("flex w-full flex-row items-center gap-2 rounded-md p-2 pr-3", "bg-f1-background-critical text-f1-foreground"),
|
|
41659
|
+
children: [/* @__PURE__ */ U("div", {
|
|
41660
|
+
"aria-hidden": "true",
|
|
41661
|
+
className: "h-6 w-6 flex-shrink-0",
|
|
41662
|
+
children: /* @__PURE__ */ U($d, {
|
|
41663
|
+
type: "critical",
|
|
41664
|
+
size: "sm"
|
|
41665
|
+
})
|
|
41666
|
+
}), /* @__PURE__ */ U("p", {
|
|
41667
|
+
className: "font-medium text-f1-foreground-critical",
|
|
41668
|
+
children: e
|
|
41669
|
+
})]
|
|
41670
|
+
})
|
|
41671
|
+
}, "composer-error") : null
|
|
41672
|
+
}), Q0 = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow-md backdrop-blur-[5px] transition-colors", $0 = (e, t) => {
|
|
41673
|
+
let n = Math.min(e.length, t.length), r = 0;
|
|
41674
|
+
for (; r < n && e[r] === t[r];) r++;
|
|
41675
|
+
let i = 0;
|
|
41676
|
+
for (; i < n - r && e[e.length - 1 - i] === t[t.length - 1 - i];) i++;
|
|
41677
|
+
return {
|
|
41678
|
+
start: r,
|
|
41679
|
+
prevEnd: e.length - i,
|
|
41680
|
+
nextEnd: t.length - i
|
|
41681
|
+
};
|
|
41682
|
+
}, e2 = 600, t2 = 100, n2 = (e, t) => {
|
|
41683
|
+
let { start: n, prevEnd: r, nextEnd: i } = $0(e, t), a = r - n, o = i - n;
|
|
41684
|
+
return a === 0 && o === 1 ? /\s/.test(t[n] ?? "") ? "other" : "insert" : o === 0 && a === 1 ? "delete" : "other";
|
|
41685
|
+
}, r2 = () => {
|
|
41686
|
+
let e = V([]), t = V([]), n = V("other"), r = V(0);
|
|
41687
|
+
return {
|
|
41688
|
+
record: z((i, a) => {
|
|
41689
|
+
t.current = [];
|
|
41690
|
+
let o = n2(i.value, a.value), s = Date.now(), c = o !== "other" && o === n.current && s - r.current <= e2 && i.mentions === a.mentions && e.current.length > 0;
|
|
41691
|
+
n.current = o, r.current = s, !c && (e.current.push(i), e.current.length > t2 && e.current.shift());
|
|
41692
|
+
}, []),
|
|
41693
|
+
undo: z((r) => {
|
|
41694
|
+
let i = e.current.pop();
|
|
41695
|
+
return i ? (t.current.push(r), n.current = "other", i) : null;
|
|
41696
|
+
}, []),
|
|
41697
|
+
redo: z((r) => {
|
|
41698
|
+
let i = t.current.pop();
|
|
41699
|
+
return i ? (e.current.push(r), n.current = "other", i) : null;
|
|
41700
|
+
}, []),
|
|
41701
|
+
reset: z(() => {
|
|
41702
|
+
e.current = [], t.current = [], n.current = "other", r.current = 0;
|
|
41703
|
+
}, [])
|
|
41704
|
+
};
|
|
41705
|
+
}, i2 = /* @__PURE__ */ "direction.boxSizing.width.height.overflowX.overflowY.borderTopWidth.borderRightWidth.borderBottomWidth.borderLeftWidth.borderStyle.paddingTop.paddingRight.paddingBottom.paddingLeft.fontStyle.fontVariant.fontWeight.fontStretch.fontSize.fontSizeAdjust.lineHeight.fontFamily.textAlign.textTransform.textIndent.textDecoration.letterSpacing.wordSpacing.tabSize.MozTabSize.whiteSpace.wordWrap.wordBreak".split("."), a2 = (e) => {
|
|
41706
|
+
let t = document.createElement("div"), n = t.style, r = window.getComputedStyle(e);
|
|
41707
|
+
n.whiteSpace = "pre-wrap", n.wordWrap = "break-word", n.position = "absolute", n.visibility = "hidden", n.overflow = "hidden";
|
|
41708
|
+
for (let e of i2) n.setProperty(e, r.getPropertyValue(e));
|
|
41709
|
+
let i = document.createTextNode(""), a = document.createElement("span");
|
|
41710
|
+
return t.appendChild(i), t.appendChild(a), document.body.appendChild(t), {
|
|
41711
|
+
textarea: e,
|
|
41712
|
+
width: e.clientWidth,
|
|
41713
|
+
div: t,
|
|
41714
|
+
prefix: i,
|
|
41715
|
+
span: a
|
|
41716
|
+
};
|
|
41717
|
+
}, o2 = (e) => {
|
|
41718
|
+
e.div.remove();
|
|
41719
|
+
}, s2 = (e, t) => {
|
|
41720
|
+
let { value: n } = e.textarea;
|
|
41721
|
+
return e.prefix.data = n.substring(0, t), e.span.textContent = n.substring(t) || "", {
|
|
41722
|
+
left: e.span.offsetLeft,
|
|
41723
|
+
top: e.span.offsetTop - e.textarea.scrollTop
|
|
41724
|
+
};
|
|
41725
|
+
};
|
|
41726
|
+
function c2(e, t) {
|
|
41727
|
+
let n = a2(e);
|
|
41728
|
+
try {
|
|
41729
|
+
return s2(n, t);
|
|
41730
|
+
} finally {
|
|
41731
|
+
o2(n);
|
|
41732
|
+
}
|
|
41733
|
+
}
|
|
41734
|
+
//#endregion
|
|
41735
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/sanitize-text.ts
|
|
41736
|
+
var l2 = /(\p{M}{3})\p{M}+/gu, u2 = /[\u202A-\u202E\u2066-\u2069]/g, d2 = "NFC", f2 = (e) => e.normalize(d2).replace(l2, "$1").replace(u2, ""), p2 = /[\s\S]\p{M}*/uy, m2 = /[\p{M}\u1161-\u1175\u11A8-\u11C2]/uy, h2 = (e, t) => (m2.lastIndex = t, m2.test(e)), g2 = /\P{ASCII}/u, _2 = (e, t) => (p2.lastIndex = t, p2.exec(e), Math.max(p2.lastIndex, t + 1)), v2 = (e, t, n) => {
|
|
41737
|
+
let r = t;
|
|
41738
|
+
for (;;) {
|
|
41739
|
+
let i = f2(e.slice(t, r));
|
|
41740
|
+
if (i === n) return h2(e, r) ? -1 : r;
|
|
41741
|
+
if (r === e.length || !n.startsWith(i) && !h2(e, r)) return -1;
|
|
41742
|
+
r = _2(e, r);
|
|
41743
|
+
}
|
|
41744
|
+
}, y2 = (e, t, n) => {
|
|
41745
|
+
let r = t + n.length;
|
|
41746
|
+
return e.startsWith(n, t) && !h2(e, r) ? r : -1;
|
|
41747
|
+
}, b2 = (e, t, { pattern: n, asWritten: r, foldable: i }) => {
|
|
41748
|
+
let a = y2(e, t, n);
|
|
41749
|
+
if (a !== -1) return a;
|
|
41750
|
+
if (r !== n) {
|
|
41751
|
+
let n = y2(e, t, r);
|
|
41752
|
+
if (n !== -1) return n;
|
|
41753
|
+
}
|
|
41754
|
+
return i ? v2(e, t, n) : -1;
|
|
41755
|
+
}, x2 = (e, t) => {
|
|
41756
|
+
let n = ((t) => {
|
|
41757
|
+
let n = [], r = g2.test(e);
|
|
41758
|
+
for (let i of t) {
|
|
41759
|
+
let t = 0;
|
|
41760
|
+
for (;;) {
|
|
41761
|
+
let a = e.indexOf("@", t);
|
|
41762
|
+
if (a === -1) break;
|
|
41763
|
+
let o = i.candidates.reduce((t, { asWritten: n }) => Math.max(t, b2(e, a, {
|
|
41764
|
+
pattern: i.pattern,
|
|
41765
|
+
asWritten: n,
|
|
41766
|
+
foldable: r
|
|
41767
|
+
})), -1);
|
|
41768
|
+
o === -1 ? t = a + 1 : (n.push({
|
|
41769
|
+
group: i,
|
|
41770
|
+
start: a,
|
|
41771
|
+
end: o
|
|
41772
|
+
}), t = o);
|
|
41773
|
+
}
|
|
41774
|
+
}
|
|
41775
|
+
return n.sort((e, t) => e.start - t.start || t.group.pattern.length - e.group.pattern.length), n;
|
|
41776
|
+
})((() => {
|
|
41777
|
+
let e = /* @__PURE__ */ new Map();
|
|
41778
|
+
for (let n of t) {
|
|
41779
|
+
let t = (() => {
|
|
41780
|
+
let e = `@${n.name}`;
|
|
41781
|
+
return {
|
|
41782
|
+
entry: n,
|
|
41783
|
+
asWritten: e,
|
|
41784
|
+
pattern: f2(e)
|
|
41785
|
+
};
|
|
41786
|
+
})(), r = e.get(t.pattern);
|
|
41787
|
+
r ? r.candidates.push(t) : e.set(t.pattern, {
|
|
41788
|
+
pattern: t.pattern,
|
|
41789
|
+
candidates: [t]
|
|
41790
|
+
});
|
|
41791
|
+
}
|
|
41792
|
+
return [...e.values()].sort((e, t) => t.pattern.length - e.pattern.length);
|
|
41793
|
+
})()), r = [], i = 0;
|
|
41794
|
+
for (let e of n) e.start < i || (r.push(e), i = e.end);
|
|
41795
|
+
let a = /* @__PURE__ */ new Map();
|
|
41796
|
+
return r.map(({ group: t, start: n, end: r }) => {
|
|
41797
|
+
let i = a.get(t) ?? /* @__PURE__ */ new Set();
|
|
41798
|
+
a.set(t, i);
|
|
41799
|
+
let o = t.candidates.map((e, t) => ({
|
|
41800
|
+
candidate: e,
|
|
41801
|
+
index: t
|
|
41802
|
+
})).filter(({ candidate: t }) => y2(e, n, t.asWritten) === r), s = o.find(({ index: e }) => !i.has(e)) ?? o.at(-1) ?? t.candidates.map((e, t) => ({
|
|
41803
|
+
candidate: e,
|
|
41804
|
+
index: t
|
|
41805
|
+
})).find(({ index: e }) => !i.has(e)) ?? {
|
|
41806
|
+
candidate: t.candidates[t.candidates.length - 1],
|
|
41807
|
+
index: t.candidates.length - 1
|
|
41808
|
+
};
|
|
41809
|
+
return i.add(s.index), {
|
|
41810
|
+
entry: s.candidate.entry,
|
|
41811
|
+
start: n,
|
|
41812
|
+
end: r
|
|
41813
|
+
};
|
|
41814
|
+
});
|
|
41815
|
+
}, S2 = (e) => e.start + e.length, C2 = ({ type: e, id: t, label: n, start: r }) => ({
|
|
41816
|
+
type: e,
|
|
41817
|
+
id: t,
|
|
41818
|
+
label: n,
|
|
41819
|
+
start: r
|
|
41820
|
+
});
|
|
41821
|
+
//#endregion
|
|
41822
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/mentions/anchors.ts
|
|
41823
|
+
function w2(e, t, n) {
|
|
41824
|
+
let r = e.slice(0, t).lastIndexOf("@");
|
|
41825
|
+
if (r === -1) return null;
|
|
41826
|
+
if (r > 0) {
|
|
41827
|
+
let t = e[r - 1];
|
|
41828
|
+
if (t !== " " && t !== "\n" && t !== " ") return null;
|
|
41829
|
+
}
|
|
41830
|
+
let i = e.slice(r + 1, t);
|
|
41831
|
+
return i.includes("\n") || n.some((e) => e.start === r) ? null : {
|
|
41832
|
+
atIndex: r,
|
|
41833
|
+
query: i
|
|
41834
|
+
};
|
|
41835
|
+
}
|
|
41836
|
+
var T2 = (e, t, n) => n.at >= 0 && t.slice(0, n.at) === e.slice(0, n.at) && t.slice(n.at + n.inserted) === e.slice(n.at + n.removed), E2 = (e, t) => e.every((e) => e.start >= S2(t) || S2(e) <= t.start), D2 = (e, t, n, r) => e >= r || t <= n, O2 = ({ start: e, end: t, editStart: n, previousEditEnd: r, nextEditEnd: i, delta: a }) => {
|
|
41837
|
+
let o = e < n, s = t > r;
|
|
41838
|
+
if (o && s) return [{
|
|
41839
|
+
start: e,
|
|
41840
|
+
end: t + a
|
|
41841
|
+
}];
|
|
41842
|
+
let c = [];
|
|
41843
|
+
return o && c.push({
|
|
41844
|
+
start: e,
|
|
41845
|
+
end: n
|
|
41846
|
+
}), s && c.push({
|
|
41847
|
+
start: i,
|
|
41848
|
+
end: t + a
|
|
41849
|
+
}), c;
|
|
41850
|
+
}, k2 = (e, t, n) => {
|
|
41851
|
+
let { start: r, prevEnd: i, nextEnd: a } = $0(e, t), o = t.length - e.length, s = i - r, c = a - r, l = [], u = [];
|
|
41852
|
+
for (let d of n) {
|
|
41853
|
+
let n = d.start, f = S2(d);
|
|
41854
|
+
if (D2(r, i, n, f)) {
|
|
41855
|
+
let e = n < r ? 0 : o;
|
|
41856
|
+
l.push({
|
|
41857
|
+
...d,
|
|
41858
|
+
start: n + e
|
|
41859
|
+
});
|
|
41860
|
+
continue;
|
|
41861
|
+
}
|
|
41862
|
+
let p = {
|
|
41863
|
+
...d,
|
|
41864
|
+
start: n + o
|
|
41865
|
+
};
|
|
41866
|
+
E2(l, p) && T2(e, t, {
|
|
41867
|
+
at: n - s,
|
|
41868
|
+
removed: s,
|
|
41869
|
+
inserted: c
|
|
41870
|
+
}) ? l.push(p) : u.push(...O2({
|
|
41871
|
+
start: n,
|
|
41872
|
+
end: f,
|
|
41873
|
+
editStart: r,
|
|
41874
|
+
previousEditEnd: i,
|
|
41875
|
+
nextEditEnd: a,
|
|
41876
|
+
delta: o
|
|
41877
|
+
}));
|
|
41878
|
+
}
|
|
41879
|
+
return {
|
|
41880
|
+
kept: l,
|
|
41881
|
+
touched: u
|
|
41882
|
+
};
|
|
41883
|
+
}, A2 = (e, t, n, r) => {
|
|
41884
|
+
let i = [];
|
|
41885
|
+
for (let e of [...t].sort((e, t) => e.start - t.start)) {
|
|
41886
|
+
let t = i[i.length - 1];
|
|
41887
|
+
t && e.start <= t.end ? t.end = Math.max(t.end, e.end) : i.push({ ...e });
|
|
41888
|
+
}
|
|
41889
|
+
let a = (e) => {
|
|
41890
|
+
let t = 0;
|
|
41891
|
+
for (let n of i) n.end <= e ? t += n.end - n.start : n.start < e && (t += e - n.start);
|
|
41892
|
+
return t;
|
|
41893
|
+
}, o = "", s = 0;
|
|
41894
|
+
for (let t of i) o += e.slice(s, t.start), s = t.end;
|
|
41895
|
+
return o += e.slice(s), {
|
|
41896
|
+
text: o,
|
|
41897
|
+
mentions: n.map((e) => ({
|
|
41898
|
+
...e,
|
|
41899
|
+
start: e.start - a(e.start)
|
|
41900
|
+
})),
|
|
41901
|
+
caret: r - a(r)
|
|
41902
|
+
};
|
|
41903
|
+
}, j2 = {
|
|
41904
|
+
query: "",
|
|
41905
|
+
groups: []
|
|
41906
|
+
}, M2 = (e, t) => !!e && e.atIndex === t.atIndex && t.query.startsWith(e.query), N2 = (e) => e.normalize("NFC"), P2 = (e, t) => e.toLowerCase().startsWith(t.toLowerCase()), F2 = (e, t, n) => t === n || n.length === 0 || P2(e.label, n), I2 = (e, t) => typeof e.order == "function" ? e.order(t) : e.order ?? 0, L2 = (e, t, n) => Promise.all(e.map((e) => e.search(t, n).then((t) => ({
|
|
41907
|
+
source: e,
|
|
41908
|
+
items: t,
|
|
41909
|
+
failed: !1
|
|
41910
|
+
}), () => ({
|
|
41911
|
+
source: e,
|
|
41912
|
+
items: [],
|
|
41913
|
+
failed: !0
|
|
41914
|
+
})))), R2 = (e, t) => e.filter((e) => e.items.length > 0).map(({ source: e, items: t }) => ({
|
|
41915
|
+
source: e,
|
|
41916
|
+
items: t
|
|
41917
|
+
})).sort((e, n) => I2(e.source, t) - I2(n.source, t)), z2 = (e, t) => e.length === t.length && e.every((e, n) => {
|
|
41918
|
+
let r = t[n];
|
|
41919
|
+
return r !== void 0 && r.id === e.id && r.type === e.type && r.label === e.label && r.start === e.start && r.length === e.length;
|
|
41920
|
+
});
|
|
41921
|
+
function B2({ inputValue: e, setInputValue: t, cursorPosition: n, setCursorPosition: r, requestSelection: i, onMentionErased: a, textareaRef: o, enabled: s, sources: c, pinned: l, scopeKey: u, onInserted: d }) {
|
|
41922
|
+
let [f, p] = H(!1), [m, h] = H(""), [g, _] = H(j2), [v, y] = H(!1), [b, x] = H(0), [S, C] = H([]), w = V(S), T = z((e) => {
|
|
41923
|
+
z2(w.current, e) || (w.current = e, C(e));
|
|
41924
|
+
}, []), E = V(e), D = V(e);
|
|
41925
|
+
D.current = e;
|
|
41926
|
+
let O = V(-1), k = V(null), A = V(0), j = V(null), M = V(null), N = V(c), ee = V(d), te = V(u);
|
|
41927
|
+
Vr(() => {
|
|
41928
|
+
N.current = c, ee.current = d;
|
|
41929
|
+
});
|
|
41930
|
+
let ne = s && (c.length > 0 || !!l), re = z(() => {
|
|
41931
|
+
k.current &&= (clearTimeout(k.current), null), A.current++, y(!1), _((e) => e.groups.length === 0 ? e : j2);
|
|
41932
|
+
}, []), ie = te.current === u;
|
|
41933
|
+
Vr(() => {
|
|
41934
|
+
te.current !== u && (te.current = u, j.current = null, re());
|
|
41935
|
+
}, [u, re]);
|
|
41936
|
+
let ae = z(() => {
|
|
41937
|
+
let e = M.current;
|
|
41938
|
+
e && (M.current = null, o2(e));
|
|
41939
|
+
}, []), oe = z((e) => !!l && l.matches(e), [l]), se = Hr(() => oe(m), [oe, m]), ce = Hr(() => g.groups.map((e) => e.items.map((e) => ie && F2(e, g.query, m) ? "1" : "0").join("")).join("|"), [
|
|
41940
|
+
g,
|
|
41941
|
+
ie,
|
|
41942
|
+
m
|
|
41943
|
+
]), le = Hr(() => {
|
|
41944
|
+
let e = ce.split("|");
|
|
41945
|
+
return g.groups.map((t, n) => ({
|
|
41946
|
+
source: t.source,
|
|
41947
|
+
items: t.items.filter((t, r) => e[n]?.[r] === "1")
|
|
41948
|
+
})).filter((e) => e.items.length > 0);
|
|
41949
|
+
}, [g, ce]), ue = Hr(() => {
|
|
41950
|
+
let e = [];
|
|
41951
|
+
l && se && e.push({ item: l.item });
|
|
41952
|
+
for (let t of le) for (let n of t.items) e.push({
|
|
41953
|
+
item: n,
|
|
41954
|
+
source: t.source
|
|
41955
|
+
});
|
|
41956
|
+
return e;
|
|
41957
|
+
}, [
|
|
41958
|
+
l,
|
|
41959
|
+
se,
|
|
41960
|
+
le
|
|
41961
|
+
]);
|
|
41962
|
+
B(() => {
|
|
41963
|
+
if (!ne) {
|
|
41964
|
+
re(), p(!1);
|
|
41965
|
+
return;
|
|
41966
|
+
}
|
|
41967
|
+
let t = w2(e, n, S);
|
|
41968
|
+
if (!t) {
|
|
41969
|
+
re(), p(!1), h(""), x(0), O.current = -1, j.current = null;
|
|
41970
|
+
return;
|
|
41971
|
+
}
|
|
41972
|
+
if (M2(j.current, t)) {
|
|
41973
|
+
re();
|
|
41974
|
+
return;
|
|
41975
|
+
}
|
|
41976
|
+
j.current = null, O.current = t.atIndex, h(t.query), p(!0), x(0), y(!0), k.current && clearTimeout(k.current);
|
|
41977
|
+
let r = ++A.current, i = {
|
|
41978
|
+
text: e,
|
|
41979
|
+
cursor: n,
|
|
41980
|
+
mentionsBefore: S.filter((e) => S2(e) <= t.atIndex).map(C2)
|
|
41981
|
+
};
|
|
41982
|
+
return k.current = setTimeout(() => {
|
|
41983
|
+
let e = N.current;
|
|
41984
|
+
e.length === 0 ? r === A.current && y(!1) : L2(e, t.query, i).then((e) => {
|
|
41985
|
+
if (r !== A.current) return;
|
|
41986
|
+
y(!1);
|
|
41987
|
+
let n = R2(e, i);
|
|
41988
|
+
_({
|
|
41989
|
+
query: t.query,
|
|
41990
|
+
groups: n
|
|
41991
|
+
}), x(0), !(n.length > 0 || oe(t.query)) && (e.some((e) => !e.failed) ? t.query.length > 0 && (j.current = {
|
|
41992
|
+
atIndex: t.atIndex,
|
|
41993
|
+
query: t.query
|
|
41994
|
+
}, p(!1)) : p(!1));
|
|
41995
|
+
});
|
|
41996
|
+
}, 250), () => {
|
|
41997
|
+
k.current && clearTimeout(k.current);
|
|
41998
|
+
};
|
|
41999
|
+
}, [
|
|
42000
|
+
e,
|
|
42001
|
+
n,
|
|
42002
|
+
ne,
|
|
42003
|
+
S,
|
|
42004
|
+
u,
|
|
42005
|
+
oe,
|
|
42006
|
+
re
|
|
42007
|
+
]);
|
|
42008
|
+
let de = z(() => {
|
|
42009
|
+
re(), p(!1), h(""), x(0), O.current = -1;
|
|
42010
|
+
}, [re]), fe = z(() => {
|
|
42011
|
+
O.current !== -1 && (j.current = {
|
|
42012
|
+
atIndex: O.current,
|
|
42013
|
+
query: m
|
|
42014
|
+
}), de();
|
|
42015
|
+
}, [de, m]), pe = z((r) => {
|
|
42016
|
+
let a = O.current;
|
|
42017
|
+
if (a === -1) return;
|
|
42018
|
+
let { item: o } = r, s = e.slice(0, a), c = e.slice(n), l = `@${o.label} `, u = s + l + c, d = s.length + l.length;
|
|
42019
|
+
t(u);
|
|
42020
|
+
let f = l.length - (n - a), p = w.current.filter((e) => S2(e) <= a || e.start >= n).map((e) => e.start >= n ? {
|
|
42021
|
+
...e,
|
|
42022
|
+
start: e.start + f
|
|
42023
|
+
} : e);
|
|
42024
|
+
p.push({
|
|
42025
|
+
...o,
|
|
42026
|
+
start: a,
|
|
42027
|
+
length: o.label.length + 1
|
|
42028
|
+
}), p.sort((e, t) => e.start - t.start), E.current = u, T(p), ee.current?.(o, { pinned: !r.source }), de(), i(d, u, !0);
|
|
42029
|
+
}, [
|
|
42030
|
+
e,
|
|
42031
|
+
n,
|
|
42032
|
+
t,
|
|
42033
|
+
de,
|
|
42034
|
+
T,
|
|
42035
|
+
i
|
|
42036
|
+
]), P = z((e) => {
|
|
42037
|
+
if (!f) return !1;
|
|
42038
|
+
if (e.key === "Escape") return e.preventDefault(), de(), !0;
|
|
42039
|
+
if (ue.length === 0 && e.key === "Enter" && v) return e.preventDefault(), !0;
|
|
42040
|
+
if (ue.length === 0) return !1;
|
|
42041
|
+
switch (e.key) {
|
|
42042
|
+
case "ArrowDown": return e.preventDefault(), x((e) => (e + 1) % ue.length), !0;
|
|
42043
|
+
case "ArrowUp": return e.preventDefault(), x((e) => (e + ue.length - 1) % ue.length), !0;
|
|
42044
|
+
case "Tab": {
|
|
42045
|
+
let t = ue[b];
|
|
42046
|
+
return t && (m.length === 0 || P2(t.item.label, m)) ? (e.preventDefault(), pe(t), !0) : !1;
|
|
42047
|
+
}
|
|
42048
|
+
case "Enter": {
|
|
42049
|
+
e.preventDefault();
|
|
42050
|
+
let t = ue[b];
|
|
42051
|
+
return t && F2(t.item, g.query, m) && pe(t), !0;
|
|
42052
|
+
}
|
|
42053
|
+
default: return !1;
|
|
42054
|
+
}
|
|
42055
|
+
}, [
|
|
42056
|
+
f,
|
|
42057
|
+
ue,
|
|
42058
|
+
b,
|
|
42059
|
+
m,
|
|
42060
|
+
g.query,
|
|
42061
|
+
pe,
|
|
42062
|
+
de,
|
|
42063
|
+
v
|
|
42064
|
+
]), me = z((e, t) => {
|
|
42065
|
+
let n = t ?? D.current;
|
|
42066
|
+
E.current = n;
|
|
42067
|
+
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
42068
|
+
for (let t of e) {
|
|
42069
|
+
let e = N2(t.label), n = r.get(e);
|
|
42070
|
+
n ? n.push(t) : r.set(e, [t]), i.add(t.label);
|
|
42071
|
+
}
|
|
42072
|
+
let a = /* @__PURE__ */ new Set();
|
|
42073
|
+
T(x2(n, [...i].map((e) => ({ name: e }))).flatMap(({ entry: { name: e }, start: t, end: i }) => {
|
|
42074
|
+
let o = r.get(N2(e)) ?? [], s = o.filter((e) => !a.has(e)), c = n.slice(t + 1, i), l = s.find((e) => e.label === c) ?? s[0] ?? o[o.length - 1];
|
|
42075
|
+
return l && a.add(l), l ? [{
|
|
42076
|
+
...l,
|
|
42077
|
+
start: t,
|
|
42078
|
+
length: i - t
|
|
42079
|
+
}] : [];
|
|
42080
|
+
}));
|
|
42081
|
+
}, [T]), he = z((e, t) => {
|
|
42082
|
+
E.current = t, T(e);
|
|
42083
|
+
}, [T]);
|
|
42084
|
+
B(() => {
|
|
42085
|
+
let o = E.current;
|
|
42086
|
+
if (o === e) return;
|
|
42087
|
+
E.current = e;
|
|
42088
|
+
let s = w.current;
|
|
42089
|
+
if (s.length === 0) return;
|
|
42090
|
+
let { kept: c, touched: l } = k2(o, e, s);
|
|
42091
|
+
if (l.length === 0) {
|
|
42092
|
+
T(c);
|
|
42093
|
+
return;
|
|
42094
|
+
}
|
|
42095
|
+
let u = A2(e, l, c, n);
|
|
42096
|
+
E.current = u.text, T(u.mentions), t(u.text), r(u.caret), i(u.caret, u.text), a?.(u.text);
|
|
42097
|
+
}, [
|
|
42098
|
+
e,
|
|
42099
|
+
n,
|
|
42100
|
+
t,
|
|
42101
|
+
r,
|
|
42102
|
+
T,
|
|
42103
|
+
i,
|
|
42104
|
+
a
|
|
42105
|
+
]);
|
|
42106
|
+
let [ge, _e] = H(null);
|
|
42107
|
+
return Vr(() => {
|
|
42108
|
+
if (!f || O.current === -1) {
|
|
42109
|
+
ae(), _e(null);
|
|
42110
|
+
return;
|
|
42111
|
+
}
|
|
42112
|
+
let e = o.current;
|
|
42113
|
+
if (!e) {
|
|
42114
|
+
ae(), _e(null);
|
|
42115
|
+
return;
|
|
42116
|
+
}
|
|
42117
|
+
let t = M.current;
|
|
42118
|
+
(!t || t.textarea !== e || t.width !== e.clientWidth) && (t && o2(t), t = a2(e), M.current = t);
|
|
42119
|
+
let n = s2(t, O.current), r = e.offsetLeft + n.left, i = e.offsetParent, a = (i instanceof HTMLElement ? i.offsetHeight : 0) - (e.offsetTop + n.top);
|
|
42120
|
+
_e((e) => e?.left === r && e.bottom === a ? e : {
|
|
42121
|
+
left: r,
|
|
42122
|
+
bottom: a
|
|
42123
|
+
});
|
|
42124
|
+
}, [
|
|
42125
|
+
f,
|
|
42126
|
+
e,
|
|
42127
|
+
n,
|
|
42128
|
+
o,
|
|
42129
|
+
ae
|
|
42130
|
+
]), Vr(() => ae, [ae]), {
|
|
42131
|
+
isOpen: f,
|
|
42132
|
+
query: m,
|
|
42133
|
+
groups: le,
|
|
42134
|
+
rows: ue,
|
|
42135
|
+
isLoading: v,
|
|
42136
|
+
selectedIndex: b,
|
|
42137
|
+
setSelectedIndex: x,
|
|
42138
|
+
mentions: S,
|
|
42139
|
+
popoverPosition: ge,
|
|
42140
|
+
inlineCompletion: Hr(() => {
|
|
42141
|
+
if (!f || ue.length === 0) return null;
|
|
42142
|
+
let e = ue[b];
|
|
42143
|
+
if (!e) return null;
|
|
42144
|
+
let t = e.item.label;
|
|
42145
|
+
return m.length === 0 ? t : P2(t, m) ? t.slice(m.length) : null;
|
|
42146
|
+
}, [
|
|
42147
|
+
f,
|
|
42148
|
+
ue,
|
|
42149
|
+
b,
|
|
42150
|
+
m
|
|
42151
|
+
]),
|
|
42152
|
+
handleKeyDown: P,
|
|
42153
|
+
selectRow: pe,
|
|
42154
|
+
seedMentions: me,
|
|
42155
|
+
restoreMentions: he,
|
|
42156
|
+
close: de,
|
|
42157
|
+
dismissCurrentTrigger: fe
|
|
42158
|
+
};
|
|
42159
|
+
}
|
|
42160
|
+
//#endregion
|
|
42161
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/utils/highlight.ts
|
|
42162
|
+
function V2(e, t, n) {
|
|
42163
|
+
let r = n?.cursorPosition ?? e.length, i = n?.inlineCompletion ?? null, a = t.map((e) => ({
|
|
42164
|
+
start: e.start,
|
|
42165
|
+
end: S2(e)
|
|
42166
|
+
})).filter((t) => t.start >= 0 && t.end <= e.length).sort((e, t) => e.start - t.start), o = [], s = 0, c = !1, l = (t) => {
|
|
42167
|
+
!i || c || r < s || r > t ? (t > s && o.push({
|
|
42168
|
+
type: "text",
|
|
42169
|
+
text: e.slice(s, t)
|
|
42170
|
+
}), s = t) : (r > s && o.push({
|
|
42171
|
+
type: "text",
|
|
42172
|
+
text: e.slice(s, r)
|
|
42173
|
+
}), o.push({
|
|
42174
|
+
type: "ghost",
|
|
42175
|
+
text: i
|
|
42176
|
+
}), c = !0, r < t && o.push({
|
|
42177
|
+
type: "text",
|
|
42178
|
+
text: e.slice(r, t)
|
|
42179
|
+
}), s = t);
|
|
42180
|
+
};
|
|
42181
|
+
for (let t of a) l(t.start), o.push({
|
|
42182
|
+
type: "mention",
|
|
42183
|
+
text: e.slice(t.start, t.end)
|
|
42184
|
+
}), s = t.end;
|
|
42185
|
+
return l(e.length), !c && i && r >= s && o.push({
|
|
42186
|
+
type: "ghost",
|
|
42187
|
+
text: i
|
|
42188
|
+
}), o.length === 0 ? [{
|
|
42189
|
+
type: "text",
|
|
42190
|
+
text: e
|
|
42191
|
+
}] : o;
|
|
42192
|
+
}
|
|
42193
|
+
//#endregion
|
|
42194
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/useComposerEditor.ts
|
|
42195
|
+
var H2 = 1500, U2 = (e) => e.nativeEvent.isComposing || e.keyCode === 229;
|
|
42196
|
+
function W2({ mentions: e, transformChange: t, onTextChange: n, historySuspended: r = !1 }) {
|
|
42197
|
+
let [i, a] = H(""), [o, s] = H(0), c = V(null), l = V(null), u = V(null), d = z((e, t, n = !1) => {
|
|
42198
|
+
u.current = {
|
|
42199
|
+
caret: e,
|
|
42200
|
+
forText: t,
|
|
42201
|
+
focus: n
|
|
42202
|
+
};
|
|
42203
|
+
}, []), f = r2(), p = V({
|
|
42204
|
+
value: "",
|
|
42205
|
+
caret: 0,
|
|
42206
|
+
mentions: []
|
|
42207
|
+
}), m = V(!1), h = V(null), g = V(!1), _ = B2({
|
|
42208
|
+
inputValue: i,
|
|
42209
|
+
setInputValue: a,
|
|
42210
|
+
cursorPosition: o,
|
|
42211
|
+
setCursorPosition: s,
|
|
42212
|
+
requestSelection: d,
|
|
42213
|
+
onMentionErased: z((e) => {
|
|
42214
|
+
h.current = e;
|
|
42215
|
+
}, []),
|
|
42216
|
+
textareaRef: c,
|
|
42217
|
+
enabled: e.enabled,
|
|
42218
|
+
sources: e.sources,
|
|
42219
|
+
pinned: e.pinned,
|
|
42220
|
+
scopeKey: e.scopeKey,
|
|
42221
|
+
onInserted: e.onInserted
|
|
42222
|
+
});
|
|
42223
|
+
Vr(function() {
|
|
42224
|
+
let e = u.current;
|
|
42225
|
+
if (!e || (u.current = null, e.forText !== i)) return;
|
|
42226
|
+
let t = c.current;
|
|
42227
|
+
t && (e.focus && t.focus(), t.setSelectionRange(e.caret, e.caret));
|
|
42228
|
+
}, [i]);
|
|
42229
|
+
let v = V(r);
|
|
42230
|
+
v.current = r, B(function() {
|
|
42231
|
+
let e = p.current;
|
|
42232
|
+
if (e.value === i && e.mentions === _.mentions) {
|
|
42233
|
+
p.current = {
|
|
42234
|
+
...e,
|
|
42235
|
+
caret: o
|
|
42236
|
+
};
|
|
42237
|
+
return;
|
|
42238
|
+
}
|
|
42239
|
+
let t = {
|
|
42240
|
+
value: i,
|
|
42241
|
+
caret: o,
|
|
42242
|
+
mentions: _.mentions
|
|
42243
|
+
};
|
|
42244
|
+
v.current || (p.current = t, m.current ? m.current = !1 : h.current === i ? h.current = null : g.current ? (g.current = !1, f.reset()) : f.record(e, t));
|
|
42245
|
+
}, [
|
|
42246
|
+
i,
|
|
42247
|
+
o,
|
|
42248
|
+
_.mentions,
|
|
42249
|
+
f,
|
|
42250
|
+
r
|
|
42251
|
+
]);
|
|
42252
|
+
let [y, b] = H(!1), x = V(null), S = z(() => {
|
|
42253
|
+
x.current &&= (clearTimeout(x.current), null), b(!1);
|
|
42254
|
+
}, []);
|
|
42255
|
+
B(() => S, [S]);
|
|
42256
|
+
let C = z((e, r) => {
|
|
42257
|
+
let i = t?.(e, r) ?? null, o = i?.value ?? e, c = i?.cursorPosition ?? r;
|
|
42258
|
+
a(o), s(c), S(), i && d(c, o), n?.(o);
|
|
42259
|
+
}, [
|
|
42260
|
+
t,
|
|
42261
|
+
n,
|
|
42262
|
+
S,
|
|
42263
|
+
d
|
|
42264
|
+
]), w = z(() => {
|
|
42265
|
+
s(c.current?.selectionStart ?? 0);
|
|
42266
|
+
}, []), T = z(() => {
|
|
42267
|
+
l.current && c.current && (l.current.scrollTop = c.current.scrollTop);
|
|
42268
|
+
}, []), { close: E, seedMentions: D, restoreMentions: O } = _, k = z((e) => {
|
|
42269
|
+
m.current = !0, p.current = e, E(), O(e.mentions, e.value), a(e.value), s(e.caret), d(e.caret, e.value);
|
|
42270
|
+
}, [
|
|
42271
|
+
E,
|
|
42272
|
+
O,
|
|
42273
|
+
d
|
|
42274
|
+
]), A = z(() => ({
|
|
42275
|
+
value: i,
|
|
42276
|
+
caret: o,
|
|
42277
|
+
mentions: _.mentions
|
|
42278
|
+
}), [
|
|
42279
|
+
i,
|
|
42280
|
+
o,
|
|
42281
|
+
_.mentions
|
|
42282
|
+
]), j = z((e) => {
|
|
42283
|
+
if (!(e.metaKey || e.ctrlKey) || e.altKey) return !1;
|
|
42284
|
+
let t = e.key.toLowerCase(), n = t === "y" || t === "z" && e.shiftKey;
|
|
42285
|
+
if (t !== "z" && t !== "y") return !1;
|
|
42286
|
+
if (e.preventDefault(), v.current) return !0;
|
|
42287
|
+
let r = n ? f.redo(A()) : f.undo(A());
|
|
42288
|
+
return r && k(r), !0;
|
|
42289
|
+
}, [
|
|
42290
|
+
f,
|
|
42291
|
+
A,
|
|
42292
|
+
k
|
|
42293
|
+
]), M = z(() => {
|
|
42294
|
+
E(), D([], ""), a(""), s(0), S();
|
|
42295
|
+
}, [
|
|
42296
|
+
E,
|
|
42297
|
+
D,
|
|
42298
|
+
S
|
|
42299
|
+
]), N = z((e) => e.key !== "Escape" || i.length === 0 ? !1 : (e.preventDefault(), e.stopPropagation(), y ? (M(), !0) : (b(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
|
|
42300
|
+
x.current = null, b(!1);
|
|
42301
|
+
}, H2), !0)), [
|
|
42302
|
+
i.length,
|
|
42303
|
+
y,
|
|
42304
|
+
M
|
|
42305
|
+
]), ee = z(() => {
|
|
42306
|
+
g.current = !0;
|
|
42307
|
+
}, []);
|
|
42308
|
+
return {
|
|
42309
|
+
value: i,
|
|
42310
|
+
setValue: a,
|
|
42311
|
+
cursorPosition: o,
|
|
42312
|
+
setCursorPosition: s,
|
|
42313
|
+
textareaRef: c,
|
|
42314
|
+
highlightRef: l,
|
|
42315
|
+
mentions: _,
|
|
42316
|
+
handleChange: C,
|
|
42317
|
+
updateCursorPosition: w,
|
|
42318
|
+
syncHighlightScroll: T,
|
|
42319
|
+
requestSelection: d,
|
|
42320
|
+
handleUndoRedoKeyDown: j,
|
|
42321
|
+
handleClearKeyDown: N,
|
|
42322
|
+
escapeArmed: y,
|
|
42323
|
+
clearText: M,
|
|
42324
|
+
loadDraft: z((e) => {
|
|
42325
|
+
E(), a(e.value), s(e.value.length), D(e.mentions ?? [], e.value), S(), g.current = !0;
|
|
42326
|
+
}, [
|
|
42327
|
+
E,
|
|
42328
|
+
D,
|
|
42329
|
+
S
|
|
42330
|
+
]),
|
|
42331
|
+
breakHistory: ee
|
|
42332
|
+
};
|
|
42333
|
+
}
|
|
42334
|
+
function G2(e, { suppressGhost: t = !1 } = {}) {
|
|
42335
|
+
let { value: n, cursorPosition: r, mentions: i } = e, a = t ? null : i.inlineCompletion;
|
|
42336
|
+
return {
|
|
42337
|
+
highlightSegments: Hr(() => V2(n, i.mentions, {
|
|
42338
|
+
cursorPosition: r,
|
|
42339
|
+
inlineCompletion: a
|
|
42340
|
+
}), [
|
|
42341
|
+
n,
|
|
42342
|
+
i.mentions,
|
|
42343
|
+
r,
|
|
42344
|
+
a
|
|
42345
|
+
]),
|
|
42346
|
+
hasOverlay: i.mentions.length > 0 || a !== null
|
|
42347
|
+
};
|
|
42348
|
+
}
|
|
42349
|
+
//#endregion
|
|
42350
|
+
//#region src/elements/primitives/_primitives/F0ChatComposer/F0ChatComposer.tsx
|
|
42351
|
+
var K2 = [], q2 = () => null, J2 = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: i = !1, sendBlocked: a = !1, maxLength: o, maxLengthError: s, error: c = null, labels: l, placeholders: u, placeholdersPaused: d, role: f = "combobox", name: p, mentions: m, autocomplete: h, voice: g, onTextChange: _, onCleared: v, onEscape: y, onArrowUpWhenEmpty: b, onPasteFiles: x, pastePreferText: S = !1, onStateChange: C, header: w, tray: T, leading: E, toolbarStart: D, toolbarCenter: O, collapsible: k = !1, collapsed: A = !1, replacement: j, accent: M = !1, asForm: N = !1, className: ee, surfaceRef: te, onSurfaceFocus: ne, onSurfaceBlur: re, handleRef: ie, reducedMotion: ae = !1, "data-testid": oe }) => {
|
|
42352
|
+
let se = He(), ce = {
|
|
42353
|
+
placeholder: se.chat.placeholder,
|
|
42354
|
+
listening: se.chat.listening,
|
|
42355
|
+
send: se.actions.send,
|
|
42356
|
+
save: se.chat.saveEdit,
|
|
42357
|
+
stop: se.ai.stopAnswerGeneration,
|
|
42358
|
+
recordAudio: se.chat.recordAudio,
|
|
42359
|
+
sendingVoice: se.chat.sendingVoiceNote,
|
|
42360
|
+
cancelRecording: se.chat.cancelRecording,
|
|
42361
|
+
confirmRecording: g?.onAudio ? se.chat.sendVoiceNote : se.chat.stopRecording,
|
|
42362
|
+
micPermissionDenied: se.chat.micPermissionDenied,
|
|
42363
|
+
micError: se.chat.micError,
|
|
42364
|
+
transcriptionError: se.chat.transcriptionError,
|
|
42365
|
+
...l
|
|
42366
|
+
}, le = j != null, { error: ue, show: de, clear: fe } = G0(), pe = V(() => {}), P = V(() => {}), me = V(""), he = z((e) => {
|
|
42367
|
+
let t = me.current, n = t && !/\s$/.test(t) ? " " : "";
|
|
42368
|
+
pe.current(`${t}${n}${e}`);
|
|
42369
|
+
}, []), _e = {
|
|
42370
|
+
"permission-denied": ce.micPermissionDenied,
|
|
42371
|
+
"device-error": ce.micError,
|
|
42372
|
+
"transcription-failed": ce.transcriptionError
|
|
42373
|
+
}, ve = FQ({
|
|
42374
|
+
onTranscribe: g?.onTranscribe,
|
|
42375
|
+
onPartial: he,
|
|
42376
|
+
onFinal: (e) => {
|
|
42377
|
+
he(e), P.current();
|
|
42378
|
+
},
|
|
42379
|
+
onError: (e) => de(_e[e]),
|
|
42380
|
+
onAudio: g?.onAudio
|
|
42381
|
+
}), [ye, be] = H(!1), xe = ve.status === "recording", Se = ve.status === "transcribing", Ce = !!g && (!!g.onTranscribe || !!g.onAudio) && ve.isSupported, we = !g?.onAudio && (ve.status !== "idle" || ye), [Te, Ee] = H(!1), Oe = W2({
|
|
42382
|
+
mentions: {
|
|
42383
|
+
enabled: !!m && m.sources.length + +!!m.pinned > 0 && !Te && !le,
|
|
42384
|
+
sources: m?.sources ?? K2,
|
|
42385
|
+
pinned: m?.pinned,
|
|
42386
|
+
scopeKey: m?.scopeKey,
|
|
42387
|
+
onInserted: m?.onInserted
|
|
42388
|
+
},
|
|
42389
|
+
transformChange: h?.transformChange,
|
|
42390
|
+
onTextChange: _,
|
|
42391
|
+
historySuspended: we
|
|
42392
|
+
}), { value: ke, setValue: Ae, setCursorPosition: je, textareaRef: Me, highlightRef: Ne, mentions: Pe, requestSelection: Fe, clearText: Ie, breakHistory: Le } = Oe;
|
|
42393
|
+
pe.current = (e) => {
|
|
42394
|
+
Ae(e), je(e.length);
|
|
42395
|
+
};
|
|
42396
|
+
let Re = V(ke);
|
|
42397
|
+
Re.current = ke;
|
|
42398
|
+
let ze = (h?.useAutocomplete ?? q2)(Oe), Be = ze?.isOpen ?? !1, Ve = Pe.dismissCurrentTrigger;
|
|
42399
|
+
B(() => {
|
|
42400
|
+
Ee(Be), Be && Ve();
|
|
42401
|
+
}, [Be, Ve]);
|
|
42402
|
+
let { highlightSegments: Ue, hasOverlay: We } = G2(Oe, { suppressGhost: Be }), Ge = z((e) => {
|
|
42403
|
+
let t = Me.current;
|
|
42404
|
+
if (!t) return;
|
|
42405
|
+
t.focus(e);
|
|
42406
|
+
let n = t.value.length;
|
|
42407
|
+
t.setSelectionRange(n, n);
|
|
42408
|
+
}, [Me]);
|
|
42409
|
+
P.current = () => Me.current?.focus();
|
|
42410
|
+
let Ke = Pe.close;
|
|
42411
|
+
B(() => {
|
|
42412
|
+
le && Ke();
|
|
42413
|
+
}, [le, Ke]);
|
|
42414
|
+
let qe = ke.length === 0;
|
|
42415
|
+
B(() => {
|
|
42416
|
+
C?.({
|
|
42417
|
+
isEmpty: qe,
|
|
42418
|
+
recorder: ve.status
|
|
42419
|
+
});
|
|
42420
|
+
}, [
|
|
42421
|
+
C,
|
|
42422
|
+
qe,
|
|
42423
|
+
ve.status
|
|
42424
|
+
]);
|
|
42425
|
+
let [Ye, Xe] = H(!1), Ze = o !== void 0 && ke.trim().length > o;
|
|
42426
|
+
B(() => {
|
|
42427
|
+
Ze || Xe(!1);
|
|
42428
|
+
}, [Ze]);
|
|
42429
|
+
let Qe = Ye && Ze ? s ?? null : null, $e = Qe ?? c ?? ue, [et, tt] = H(!1), nt = V(!1), rt = (ke.trim().length > 0 || i) && !we && !a && !et && !le, it = t && !Se, at = z(() => {
|
|
42430
|
+
if (!rt || nt.current) return;
|
|
42431
|
+
if (Ze) {
|
|
42432
|
+
Xe(!0);
|
|
42433
|
+
return;
|
|
42434
|
+
}
|
|
42435
|
+
Pe.close();
|
|
42436
|
+
let t = Re.current, n = (e) => {
|
|
42437
|
+
!e && Re.current === t && (Ie(), Le()), Me.current?.focus({ preventScroll: !0 });
|
|
42438
|
+
}, r;
|
|
42439
|
+
try {
|
|
42440
|
+
r = e({
|
|
42441
|
+
text: t,
|
|
42442
|
+
mentions: Pe.mentions
|
|
42443
|
+
});
|
|
42444
|
+
} catch {
|
|
42445
|
+
n(!0);
|
|
42446
|
+
return;
|
|
42447
|
+
}
|
|
42448
|
+
r instanceof Promise ? (nt.current = !0, tt(!0), r.then((e) => {
|
|
42449
|
+
nt.current = !1, tt(!1), n(e === !1);
|
|
42450
|
+
}, () => {
|
|
42451
|
+
nt.current = !1, tt(!1), n(!0);
|
|
42452
|
+
})) : n(r === !1);
|
|
42453
|
+
}, [
|
|
42454
|
+
rt,
|
|
42455
|
+
Ze,
|
|
42456
|
+
Pe,
|
|
42457
|
+
e,
|
|
42458
|
+
Ie,
|
|
42459
|
+
Le,
|
|
42460
|
+
Me
|
|
42461
|
+
]), [ot, st] = H(0), ct = V(rt);
|
|
42462
|
+
ct.current !== rt && (ct.current = rt, rt && st((e) => e + 1));
|
|
42463
|
+
let lt = z(() => {
|
|
42464
|
+
ye || (g?.onPress?.(), fe(), be(!0), (async () => {
|
|
42465
|
+
try {
|
|
42466
|
+
await ve.start(), me.current = Re.current;
|
|
42467
|
+
} catch {} finally {
|
|
42468
|
+
be(!1);
|
|
42469
|
+
}
|
|
42470
|
+
})());
|
|
42471
|
+
}, [
|
|
42472
|
+
ye,
|
|
42473
|
+
g,
|
|
42474
|
+
fe,
|
|
42475
|
+
ve
|
|
42476
|
+
]), dt = ve.cancel, ft = z(() => {
|
|
42477
|
+
dt(), g?.onCancelled?.();
|
|
42478
|
+
}, [dt, g]), pt = V(!1), mt = g?.onStarted;
|
|
42479
|
+
B(() => {
|
|
42480
|
+
xe && !pt.current && mt?.(), pt.current = xe;
|
|
42481
|
+
}, [xe, mt]), Br(ie, () => ({
|
|
42482
|
+
focus: (e) => {
|
|
42483
|
+
le || Ge(e);
|
|
42484
|
+
},
|
|
42485
|
+
clear: Ie,
|
|
42486
|
+
loadDraft: Oe.loadDraft,
|
|
42487
|
+
insertText: (e) => {
|
|
42488
|
+
let t = Me.current, n = Re.current, r = t?.selectionStart ?? n.length, i = t?.selectionEnd ?? n.length, a = r + e.length, o = n.slice(0, r) + e + n.slice(i);
|
|
42489
|
+
Ae(o), je(a), _?.(o), Fe(a, o, !0);
|
|
42490
|
+
},
|
|
42491
|
+
cancelRecording: dt,
|
|
42492
|
+
breakHistory: Le
|
|
42493
|
+
}), [
|
|
42494
|
+
le,
|
|
42495
|
+
Ge,
|
|
42496
|
+
Ie,
|
|
42497
|
+
Oe.loadDraft,
|
|
42498
|
+
Me,
|
|
42499
|
+
Ae,
|
|
42500
|
+
je,
|
|
42501
|
+
_,
|
|
42502
|
+
Fe,
|
|
42503
|
+
dt,
|
|
42504
|
+
Le
|
|
42505
|
+
]);
|
|
42506
|
+
let { escapeArmed: ht, handleClearKeyDown: gt, handleUndoRedoKeyDown: _t } = Oe, vt = (e) => {
|
|
42507
|
+
if (e.key !== "Escape") return !1;
|
|
42508
|
+
if (y?.(e)) return !0;
|
|
42509
|
+
if (xe) return e.preventDefault(), ft(), !0;
|
|
42510
|
+
let t = ht;
|
|
42511
|
+
return gt(e) ? (t && (Xe(!1), v?.()), !0) : !1;
|
|
42512
|
+
}, yt = (e) => {
|
|
42513
|
+
le || U2(e) || _t(e) || ze?.handleKeyDown(e) || Pe.handleKeyDown(e) || vt(e) || (e.key === "ArrowUp" && !e.shiftKey && !e.altKey && !e.metaKey && !e.ctrlKey && ke === "" && ve.status === "idle" && !ye && !g?.busy && b?.() ? e.preventDefault() : e.key === "Enter" && !e.shiftKey && (e.preventDefault(), t || at()));
|
|
42514
|
+
}, bt = (e) => {
|
|
42515
|
+
e.preventDefault(), !le && (t && !we ? (Pe.close(), n?.(), Me.current?.focus()) : at());
|
|
42516
|
+
}, xt = R0({
|
|
42517
|
+
enabled: !!x && !le,
|
|
42518
|
+
onFiles: x ?? (() => {}),
|
|
42519
|
+
preferText: S
|
|
42520
|
+
}), St = zr(), Ct = zr(), wt = `chat-composer-mentions-${St.replace(/:/g, "")}`, Tt = Pe.isOpen && !Be && !le && (Pe.isLoading || Pe.rows.length > 0), Et = Pe.rows[Pe.selectedIndex] ?? Pe.rows[0], Dt = Tt && Et ? K0(wt, Et.item) : void 0, Ot = (e) => Ce ? /* @__PURE__ */ U(Je, {
|
|
42521
|
+
type: "button",
|
|
42522
|
+
variant: "outline",
|
|
42523
|
+
size: e,
|
|
42524
|
+
hideLabel: !0,
|
|
42525
|
+
label: g?.busy ? ce.sendingVoice : ce.recordAudio,
|
|
42526
|
+
icon: gs,
|
|
42527
|
+
onClick: lt,
|
|
42528
|
+
disabled: g?.disabled,
|
|
42529
|
+
loading: ye || Se || !!g?.busy
|
|
42530
|
+
}) : null, kt = it ? "stop" : r, At = (e) => /* @__PURE__ */ U(ge, {
|
|
42531
|
+
initial: !1,
|
|
42532
|
+
mode: "popLayout",
|
|
42533
|
+
children: /* @__PURE__ */ U(De.div, {
|
|
42534
|
+
className: "flex",
|
|
42535
|
+
initial: !ae && {
|
|
42536
|
+
opacity: 0,
|
|
42537
|
+
scale: .95
|
|
42538
|
+
},
|
|
42539
|
+
animate: {
|
|
42540
|
+
opacity: 1,
|
|
42541
|
+
scale: 1
|
|
42542
|
+
},
|
|
42543
|
+
exit: ae ? void 0 : {
|
|
42544
|
+
opacity: 0,
|
|
42545
|
+
transition: { duration: .1 }
|
|
42546
|
+
},
|
|
42547
|
+
transition: {
|
|
42548
|
+
duration: .15,
|
|
42549
|
+
ease: v1
|
|
42550
|
+
},
|
|
42551
|
+
children: it ? /* @__PURE__ */ U(Je, {
|
|
42552
|
+
type: N ? "submit" : "button",
|
|
42553
|
+
variant: "neutral",
|
|
42554
|
+
size: e,
|
|
42555
|
+
hideLabel: !0,
|
|
42556
|
+
label: ce.stop,
|
|
42557
|
+
icon: Ac,
|
|
42558
|
+
onClick: N ? void 0 : () => {
|
|
42559
|
+
n?.(), Me.current?.focus();
|
|
42560
|
+
}
|
|
42561
|
+
}) : /* @__PURE__ */ U(Je, {
|
|
42562
|
+
type: N ? "submit" : "button",
|
|
42563
|
+
variant: "default",
|
|
42564
|
+
size: e,
|
|
42565
|
+
hideLabel: !0,
|
|
42566
|
+
label: r === "save" ? ce.save : ce.send,
|
|
42567
|
+
icon: r === "save" ? xr : qn,
|
|
42568
|
+
onClick: N ? void 0 : at,
|
|
42569
|
+
disabled: !rt
|
|
42570
|
+
})
|
|
42571
|
+
}, `${kt}-${it ? 0 : ot}`)
|
|
42572
|
+
}), jt = { duration: ae ? 0 : .15 }, Mt = typeof D == "function" ? D(ve.status) : D, Nt = /* @__PURE__ */ U("div", {
|
|
42573
|
+
className: "grid",
|
|
42574
|
+
children: /* @__PURE__ */ U(ge, {
|
|
42575
|
+
initial: !1,
|
|
42576
|
+
children: xe ? /* @__PURE__ */ W(De.div, {
|
|
42577
|
+
className: "flex items-center gap-3 p-3 [grid-area:1/1]",
|
|
42578
|
+
initial: { opacity: 0 },
|
|
42579
|
+
animate: { opacity: 1 },
|
|
42580
|
+
exit: { opacity: 0 },
|
|
42581
|
+
transition: jt,
|
|
42582
|
+
children: [/* @__PURE__ */ U(F$, {
|
|
42583
|
+
stream: ve.stream,
|
|
42584
|
+
className: "min-w-0 flex-1"
|
|
42585
|
+
}), /* @__PURE__ */ W("div", {
|
|
42586
|
+
className: "flex shrink-0 items-center gap-2",
|
|
42587
|
+
children: [/* @__PURE__ */ U(Je, {
|
|
42588
|
+
type: "button",
|
|
42589
|
+
variant: "outline",
|
|
42590
|
+
size: "md",
|
|
42591
|
+
hideLabel: !0,
|
|
42592
|
+
label: ce.cancelRecording,
|
|
42593
|
+
icon: ut,
|
|
42594
|
+
onClick: ft
|
|
42595
|
+
}), /* @__PURE__ */ U(Je, {
|
|
42596
|
+
type: "button",
|
|
42597
|
+
variant: "default",
|
|
42598
|
+
size: "md",
|
|
42599
|
+
hideLabel: !0,
|
|
42600
|
+
label: ce.confirmRecording,
|
|
42601
|
+
icon: xr,
|
|
42602
|
+
onClick: ve.stop
|
|
42603
|
+
})]
|
|
42604
|
+
})]
|
|
42605
|
+
}, "recording-row") : /* @__PURE__ */ W(De.div, {
|
|
42606
|
+
className: "flex items-center gap-2 p-3 [grid-area:1/1]",
|
|
42607
|
+
initial: { opacity: 0 },
|
|
42608
|
+
animate: { opacity: 1 },
|
|
42609
|
+
exit: { opacity: 0 },
|
|
42610
|
+
transition: jt,
|
|
42611
|
+
children: [
|
|
42612
|
+
Mt ? /* @__PURE__ */ U("div", {
|
|
42613
|
+
className: F("flex items-center gap-1", O ? "shrink-0" : "min-w-0"),
|
|
42614
|
+
children: Mt
|
|
42615
|
+
}) : null,
|
|
42616
|
+
O ? /* @__PURE__ */ U("div", {
|
|
42617
|
+
className: "min-w-0 flex-1",
|
|
42618
|
+
children: O
|
|
42619
|
+
}) : null,
|
|
42620
|
+
/* @__PURE__ */ W("div", {
|
|
42621
|
+
className: "ml-auto flex shrink-0 items-center gap-1",
|
|
42622
|
+
children: [Ot("md"), At("md")]
|
|
42623
|
+
})
|
|
42624
|
+
]
|
|
42625
|
+
}, "actions-row")
|
|
42626
|
+
})
|
|
42627
|
+
}), Pt = {
|
|
42628
|
+
duration: ae ? 0 : .32,
|
|
42629
|
+
ease: [
|
|
42630
|
+
.4,
|
|
42631
|
+
0,
|
|
42632
|
+
.2,
|
|
42633
|
+
1
|
|
42634
|
+
]
|
|
42635
|
+
}, Ft = /* @__PURE__ */ W(Wr, { children: [
|
|
42636
|
+
w,
|
|
42637
|
+
/* @__PURE__ */ U(Z0, {
|
|
42638
|
+
message: $e,
|
|
42639
|
+
id: Ct,
|
|
42640
|
+
reducedMotion: ae
|
|
42641
|
+
}),
|
|
42642
|
+
T,
|
|
42643
|
+
/* @__PURE__ */ W("div", {
|
|
42644
|
+
className: F((E || A) && "flex items-end", A && "pr-3"),
|
|
42645
|
+
children: [
|
|
42646
|
+
E,
|
|
42647
|
+
/* @__PURE__ */ U(U0, {
|
|
42648
|
+
className: "min-w-0 flex-1",
|
|
42649
|
+
textareaRef: Me,
|
|
42650
|
+
highlightRef: Ne,
|
|
42651
|
+
value: ke,
|
|
42652
|
+
role: f,
|
|
42653
|
+
name: p,
|
|
42654
|
+
ariaLabel: ce.placeholder,
|
|
42655
|
+
placeholder: u ? {
|
|
42656
|
+
mode: "overlay",
|
|
42657
|
+
texts: xe ? [ce.listening] : u,
|
|
42658
|
+
fallback: xe ? ce.listening : ce.placeholder,
|
|
42659
|
+
paused: d
|
|
42660
|
+
} : {
|
|
42661
|
+
mode: "native",
|
|
42662
|
+
text: xe ? ce.listening : ce.placeholder
|
|
42663
|
+
},
|
|
42664
|
+
onChange: Oe.handleChange,
|
|
42665
|
+
onKeyDown: yt,
|
|
42666
|
+
onPaste: xt,
|
|
42667
|
+
onFocus: ze?.handleFocus,
|
|
42668
|
+
onBlur: ze?.handleBlur,
|
|
42669
|
+
onCursorUpdate: Oe.updateCursorPosition,
|
|
42670
|
+
onScroll: Oe.syncHighlightScroll,
|
|
42671
|
+
highlightSegments: Ue,
|
|
42672
|
+
hasOverlay: We,
|
|
42673
|
+
isAutocompleteOpen: Be || Tt,
|
|
42674
|
+
autocompleteListboxId: Be ? ze?.listboxId : Tt ? wt : void 0,
|
|
42675
|
+
activeAutocompleteOptionId: (Be ? ze?.activeDescendantId : void 0) ?? Dt,
|
|
42676
|
+
isInvalid: Qe !== null,
|
|
42677
|
+
errorMessageId: Ct
|
|
42678
|
+
}),
|
|
42679
|
+
A ? /* @__PURE__ */ W("div", {
|
|
42680
|
+
className: "flex shrink-0 items-center gap-2 pb-[10px] pl-2",
|
|
42681
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
42682
|
+
children: [Ot("sm"), At("sm")]
|
|
42683
|
+
}) : null
|
|
42684
|
+
]
|
|
42685
|
+
}),
|
|
42686
|
+
k ? /* @__PURE__ */ U(ge, {
|
|
42687
|
+
initial: !1,
|
|
42688
|
+
children: A ? null : /* @__PURE__ */ U(De.div, {
|
|
42689
|
+
className: "overflow-hidden",
|
|
42690
|
+
initial: {
|
|
42691
|
+
opacity: 0,
|
|
42692
|
+
height: 0
|
|
42693
|
+
},
|
|
42694
|
+
animate: {
|
|
42695
|
+
opacity: 1,
|
|
42696
|
+
height: "auto"
|
|
42697
|
+
},
|
|
42698
|
+
exit: {
|
|
42699
|
+
opacity: 0,
|
|
42700
|
+
height: 0
|
|
42701
|
+
},
|
|
42702
|
+
transition: Pt,
|
|
42703
|
+
children: Nt
|
|
42704
|
+
}, "action-row")
|
|
42705
|
+
}) : Nt
|
|
42706
|
+
] }), It = /* @__PURE__ */ W(Wr, { children: [
|
|
42707
|
+
ze?.popover,
|
|
42708
|
+
/* @__PURE__ */ U(X0, {
|
|
42709
|
+
isOpen: Tt,
|
|
42710
|
+
listboxId: wt,
|
|
42711
|
+
label: ce.mentionSuggestions,
|
|
42712
|
+
rows: Pe.rows,
|
|
42713
|
+
groups: Pe.groups,
|
|
42714
|
+
showGroupLabels: !!m?.showGroupLabels,
|
|
42715
|
+
isLoading: Pe.isLoading,
|
|
42716
|
+
selectedIndex: Pe.selectedIndex,
|
|
42717
|
+
position: Pe.popoverPosition,
|
|
42718
|
+
onSelect: Pe.selectRow,
|
|
42719
|
+
pinnedDescription: ce.mentionPinnedDescription
|
|
42720
|
+
}),
|
|
42721
|
+
j === void 0 ? Ft : /* @__PURE__ */ U(ge, {
|
|
42722
|
+
initial: !1,
|
|
42723
|
+
children: le ? /* @__PURE__ */ U(De.div, {
|
|
42724
|
+
className: "overflow-hidden",
|
|
42725
|
+
initial: {
|
|
42726
|
+
height: 0,
|
|
42727
|
+
opacity: 0
|
|
42728
|
+
},
|
|
42729
|
+
animate: {
|
|
42730
|
+
height: "auto",
|
|
42731
|
+
opacity: 1
|
|
42732
|
+
},
|
|
42733
|
+
exit: {
|
|
42734
|
+
height: 0,
|
|
42735
|
+
opacity: 0,
|
|
42736
|
+
transition: {
|
|
42737
|
+
duration: ae ? 0 : .22,
|
|
42738
|
+
ease: [
|
|
42739
|
+
.4,
|
|
42740
|
+
0,
|
|
42741
|
+
1,
|
|
42742
|
+
1
|
|
42743
|
+
]
|
|
42744
|
+
}
|
|
42745
|
+
},
|
|
42746
|
+
transition: {
|
|
42747
|
+
duration: ae ? 0 : .4,
|
|
42748
|
+
ease: [
|
|
42749
|
+
.4,
|
|
42750
|
+
0,
|
|
42751
|
+
.2,
|
|
42752
|
+
1
|
|
42753
|
+
]
|
|
42754
|
+
},
|
|
42755
|
+
children: j
|
|
42756
|
+
}, "replacement") : /* @__PURE__ */ U(De.div, {
|
|
42757
|
+
className: "overflow-hidden",
|
|
42758
|
+
initial: {
|
|
42759
|
+
height: 0,
|
|
42760
|
+
opacity: 0
|
|
42761
|
+
},
|
|
42762
|
+
animate: {
|
|
42763
|
+
height: "auto",
|
|
42764
|
+
opacity: 1
|
|
42765
|
+
},
|
|
42766
|
+
exit: {
|
|
42767
|
+
height: 0,
|
|
42768
|
+
opacity: 0,
|
|
42769
|
+
transition: {
|
|
42770
|
+
duration: ae ? 0 : .15,
|
|
42771
|
+
ease: [
|
|
42772
|
+
.55,
|
|
42773
|
+
0,
|
|
42774
|
+
1,
|
|
42775
|
+
.45
|
|
42776
|
+
]
|
|
42777
|
+
}
|
|
42778
|
+
},
|
|
42779
|
+
transition: {
|
|
42780
|
+
duration: ae ? 0 : .4,
|
|
42781
|
+
ease: [
|
|
42782
|
+
.4,
|
|
42783
|
+
0,
|
|
42784
|
+
.2,
|
|
42785
|
+
1
|
|
42786
|
+
]
|
|
42787
|
+
},
|
|
42788
|
+
children: Ft
|
|
42789
|
+
}, "input")
|
|
42790
|
+
})
|
|
42791
|
+
] }), Lt = F(Q0, M && "!border-f1-border-selected", ee);
|
|
42792
|
+
return N ? /* @__PURE__ */ U("form", {
|
|
42793
|
+
ref: te,
|
|
42794
|
+
"data-testid": oe,
|
|
42795
|
+
"data-f0-chat-composer": "",
|
|
42796
|
+
"aria-busy": t,
|
|
42797
|
+
className: Lt,
|
|
42798
|
+
onClick: () => {
|
|
42799
|
+
le || Me.current?.focus();
|
|
42800
|
+
},
|
|
42801
|
+
onFocus: ne,
|
|
42802
|
+
onBlur: re,
|
|
42803
|
+
onSubmit: bt,
|
|
42804
|
+
children: It
|
|
42805
|
+
}) : /* @__PURE__ */ U("div", {
|
|
42806
|
+
ref: te,
|
|
42807
|
+
"data-testid": oe,
|
|
42808
|
+
"data-f0-chat-composer": "",
|
|
42809
|
+
className: Lt,
|
|
42810
|
+
onFocus: ne,
|
|
42811
|
+
onBlur: re,
|
|
42812
|
+
children: It
|
|
42813
|
+
});
|
|
42814
|
+
};
|
|
41378
42815
|
//#endregion
|
|
41379
42816
|
//#region src/addons/ai/ai/F0AiChat/hooks/useRevealOnChange.ts
|
|
41380
|
-
function
|
|
42817
|
+
function Y2(e, t, n = .2) {
|
|
41381
42818
|
let r = O(), [i, a] = H(!0), o = V(e);
|
|
41382
42819
|
return S(() => {
|
|
41383
42820
|
if (o.current === e) return;
|
|
@@ -41401,10 +42838,10 @@ function L0(e, t, n = .2) {
|
|
|
41401
42838
|
}
|
|
41402
42839
|
//#endregion
|
|
41403
42840
|
//#region src/addons/ai/ai/F0AiChat/providers/AiChatStateProvider.tsx
|
|
41404
|
-
var
|
|
42841
|
+
var X2 = Nr(null), Z2 = () => {}, Q2 = [{
|
|
41405
42842
|
id: "ai",
|
|
41406
42843
|
restoresContent: !0
|
|
41407
|
-
}],
|
|
42844
|
+
}], $2 = (e) => ({
|
|
41408
42845
|
open: e.open,
|
|
41409
42846
|
setOpen: e.setOpen,
|
|
41410
42847
|
resizable: e.resizable,
|
|
@@ -41427,15 +42864,15 @@ var R0 = Nr(null), z0 = () => {}, B0 = [{
|
|
|
41427
42864
|
setPanelContentSide: e.setContentSide,
|
|
41428
42865
|
shouldPlayEntranceAnimation: e.shouldPlayEntranceAnimation,
|
|
41429
42866
|
setShouldPlayEntranceAnimation: e.setShouldPlayEntranceAnimation
|
|
41430
|
-
}),
|
|
41431
|
-
views:
|
|
42867
|
+
}), e4 = (e) => A0() ? /* @__PURE__ */ U(t4, { ...e }) : /* @__PURE__ */ U(D0, {
|
|
42868
|
+
views: Q2,
|
|
41432
42869
|
side: e.side,
|
|
41433
42870
|
contentSide: e.panelContentSide,
|
|
41434
42871
|
resizable: e.resizable,
|
|
41435
42872
|
defaultLayout: e.defaultVisualizationMode === "fullscreen" ? "fullscreen" : "sidepanel",
|
|
41436
|
-
children: /* @__PURE__ */ U(
|
|
41437
|
-
}),
|
|
41438
|
-
let [D, O] = H(p), [k, A] = H(t), j =
|
|
42873
|
+
children: /* @__PURE__ */ U(t4, { ...e })
|
|
42874
|
+
}), t4 = ({ children: e, enabled: t, agent: n, initialMessage: r, chatHeader: i, chatMessages: a, chatInput: o, chatOverlay: s, welcomeScreenSuggestions: c = [], welcomeScreenCards: l = [], disclaimer: u, lockVisualizationMode: d = !1, historyEnabled: f = !1, footer: p, VoiceMode: m, entityRefs: h, canvasActions: g, canvasEntities: _, credits: v, employeeCredits: y, creditWarning: b, fileAttachments: x, filePreviews: S, onTranscribe: C, onThumbsDown: w, onThumbsUp: T, tracking: E }) => {
|
|
42875
|
+
let [D, O] = H(p), [k, A] = H(t), j = k0(), { open: M, setOpen: N, layout: ee, setLayout: te } = j, [ne, re] = H("chat"), [ie, ae] = H(n), [oe, se] = H(c), [ce, le] = H(l), ue = He(), { currentPath: de } = Be(), [fe, pe] = H([ue.t("ai.inputPlaceholder")]), [P, me] = H(r), [he, ge] = H(null), _e = he ? "canvas" : ee, ve = V(he);
|
|
41439
42876
|
ve.current = he;
|
|
41440
42877
|
let ye = V(ee);
|
|
41441
42878
|
ye.current = ee;
|
|
@@ -41488,7 +42925,7 @@ var R0 = Nr(null), z0 = () => {}, B0 = [{
|
|
|
41488
42925
|
let Xe = z((e) => {
|
|
41489
42926
|
e && ge(null), j.present(e);
|
|
41490
42927
|
}, [j]);
|
|
41491
|
-
return /* @__PURE__ */ U(
|
|
42928
|
+
return /* @__PURE__ */ U(X2.Provider, {
|
|
41492
42929
|
value: {
|
|
41493
42930
|
enabled: k,
|
|
41494
42931
|
setEnabled: A,
|
|
@@ -41550,18 +42987,18 @@ var R0 = Nr(null), z0 = () => {}, B0 = [{
|
|
|
41550
42987
|
},
|
|
41551
42988
|
children: e
|
|
41552
42989
|
});
|
|
41553
|
-
},
|
|
42990
|
+
}, n4 = /* @__PURE__ */ new Set([
|
|
41554
42991
|
"enabled",
|
|
41555
42992
|
"fileDragOver",
|
|
41556
42993
|
"lockVisualizationMode",
|
|
41557
42994
|
"historyEnabled",
|
|
41558
42995
|
"isClarifying"
|
|
41559
|
-
]),
|
|
42996
|
+
]), r4 = /* @__PURE__ */ new Set([
|
|
41560
42997
|
"canvasContent",
|
|
41561
42998
|
"pendingContext",
|
|
41562
42999
|
"pendingQuote",
|
|
41563
43000
|
"activeGame"
|
|
41564
|
-
]),
|
|
43001
|
+
]), i4 = /* @__PURE__ */ new Set([
|
|
41565
43002
|
"agent",
|
|
41566
43003
|
"initialMessage",
|
|
41567
43004
|
"chatHeader",
|
|
@@ -41583,34 +43020,34 @@ var R0 = Nr(null), z0 = () => {}, B0 = [{
|
|
|
41583
43020
|
"onTranscribe",
|
|
41584
43021
|
"onThumbsUp",
|
|
41585
43022
|
"onThumbsDown"
|
|
41586
|
-
]),
|
|
43023
|
+
]), a4 = {
|
|
41587
43024
|
visualizationMode: "sidepanel",
|
|
41588
43025
|
mode: "chat",
|
|
41589
43026
|
placeholders: [],
|
|
41590
43027
|
welcomeScreenSuggestions: [],
|
|
41591
43028
|
welcomeScreenCards: [],
|
|
41592
43029
|
focusChatInput: () => !1
|
|
41593
|
-
},
|
|
43030
|
+
}, o4 = (e) => {
|
|
41594
43031
|
let t = e;
|
|
41595
|
-
if (t in
|
|
41596
|
-
if (
|
|
41597
|
-
if (!
|
|
43032
|
+
if (t in a4) return a4[t];
|
|
43033
|
+
if (r4.has(t)) return null;
|
|
43034
|
+
if (!i4.has(t)) return !n4.has(t) && Z2;
|
|
41598
43035
|
};
|
|
41599
|
-
function
|
|
41600
|
-
let e = Rr(
|
|
43036
|
+
function s4() {
|
|
43037
|
+
let e = Rr(X2), t = k0();
|
|
41601
43038
|
return Hr(() => {
|
|
41602
|
-
let n =
|
|
43039
|
+
let n = $2(t);
|
|
41603
43040
|
return e ? {
|
|
41604
43041
|
...e,
|
|
41605
43042
|
...n
|
|
41606
43043
|
} : new Proxy({}, { get(e, t) {
|
|
41607
|
-
if (typeof t == "string") return t in n ? n[t] :
|
|
43044
|
+
if (typeof t == "string") return t in n ? n[t] : o4(t);
|
|
41608
43045
|
} });
|
|
41609
43046
|
}, [e, t]);
|
|
41610
43047
|
}
|
|
41611
43048
|
//#endregion
|
|
41612
43049
|
//#region src/elements/primitives/_primitives/F0Attachments/hooks/useMountOnVisible.ts
|
|
41613
|
-
var
|
|
43050
|
+
var c4 = () => {
|
|
41614
43051
|
let [e, t] = H(() => typeof IntersectionObserver > "u"), n = V(null), r = V(e);
|
|
41615
43052
|
return {
|
|
41616
43053
|
ref: z((e) => {
|
|
@@ -41622,7 +43059,7 @@ var X0 = () => {
|
|
|
41622
43059
|
}, []),
|
|
41623
43060
|
shouldMount: e
|
|
41624
43061
|
};
|
|
41625
|
-
},
|
|
43062
|
+
}, l4 = ({ children: e, className: t, lines: n = 1 }) => n > 1 ? /* @__PURE__ */ U("span", {
|
|
41626
43063
|
title: e,
|
|
41627
43064
|
className: F("line-clamp-1 min-w-0 max-w-full overflow-hidden whitespace-normal", t),
|
|
41628
43065
|
style: {
|
|
@@ -41634,25 +43071,25 @@ var X0 = () => {
|
|
|
41634
43071
|
title: e,
|
|
41635
43072
|
className: F("block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap", t),
|
|
41636
43073
|
children: e
|
|
41637
|
-
}),
|
|
43074
|
+
}), u4 = () => import("./PdfThumbnail-BLNfQ1EH.js"), d4 = () => import("./SheetThumbnail-HtGezPp4.js"), f4 = () => import("./DocxThumbnail-kHTNnwW0.js"), p4 = () => import("./TextThumbnail-X04JgaNI.js"), m4 = Ir(u4), h4 = Ir(d4), g4 = Ir(f4), _4 = Ir(p4), v4 = 384, y4 = 160, b4 = ({ kind: e, url: t, width: n, onError: r, onRendered: i }) => e === "pdf" ? /* @__PURE__ */ U(m4, {
|
|
41638
43075
|
url: t,
|
|
41639
43076
|
width: n,
|
|
41640
43077
|
onError: r,
|
|
41641
43078
|
onRendered: i
|
|
41642
|
-
}) : e === "sheet" ? /* @__PURE__ */ U(
|
|
43079
|
+
}) : e === "sheet" ? /* @__PURE__ */ U(h4, {
|
|
41643
43080
|
url: t,
|
|
41644
43081
|
onError: r,
|
|
41645
43082
|
onRendered: i
|
|
41646
|
-
}) : e === "docx" ? /* @__PURE__ */ U(
|
|
43083
|
+
}) : e === "docx" ? /* @__PURE__ */ U(g4, {
|
|
41647
43084
|
url: t,
|
|
41648
43085
|
width: n,
|
|
41649
43086
|
onError: r,
|
|
41650
43087
|
onRendered: i
|
|
41651
|
-
}) : e === "text" ? /* @__PURE__ */ U(
|
|
43088
|
+
}) : e === "text" ? /* @__PURE__ */ U(_4, {
|
|
41652
43089
|
url: t,
|
|
41653
43090
|
onError: r,
|
|
41654
43091
|
onRendered: i
|
|
41655
|
-
}) : null,
|
|
43092
|
+
}) : null, x4 = ({ file: e, action: t, cornerClass: n, surfaceClassName: r, testIdPrefix: i }) => {
|
|
41656
43093
|
let a = {
|
|
41657
43094
|
name: e.name,
|
|
41658
43095
|
type: e.mimeType ?? ""
|
|
@@ -41678,21 +43115,21 @@ var X0 = () => {
|
|
|
41678
43115
|
children: e.name
|
|
41679
43116
|
})] }) : null]
|
|
41680
43117
|
});
|
|
41681
|
-
},
|
|
41682
|
-
let h = He(), g =
|
|
43118
|
+
}, S4 = ({ file: e, kind: t, cornerClass: n = "rounded-xl", action: r, previewDisabled: i = !1, compact: a = !1, surfaceClassName: o, onOpened: s, onBeforeOpen: c, onDownloaded: l, testIdPrefix: u = "chat", lazyMount: d = !1, failedAction: f, fitWidth: p = !1, decorativeSnapshot: m = !1 }) => {
|
|
43119
|
+
let h = He(), g = d1(), _ = s1(), [v, y] = H(!1), b = c4(), x = !d || b.shouldMount, S = a1(t === "pdf" ? e.previewUrl ?? e.url : e.url, { enabled: x }), C = r ?? {
|
|
41683
43120
|
label: h.t("chat.downloadNamedFile", { name: e.name }),
|
|
41684
43121
|
icon: Ka,
|
|
41685
43122
|
onClick: () => {
|
|
41686
43123
|
_(e.url, e.name), l?.();
|
|
41687
43124
|
}
|
|
41688
|
-
}, w = a ? 64 :
|
|
43125
|
+
}, w = a ? 64 : v4, T = C4(p && !a, w), E = b.ref, D = T.setElement, O = z((e) => {
|
|
41689
43126
|
d && E(e), D(e);
|
|
41690
43127
|
}, [
|
|
41691
43128
|
d,
|
|
41692
43129
|
E,
|
|
41693
43130
|
D
|
|
41694
43131
|
]), k = v || S.status === "error";
|
|
41695
|
-
return k && a ? /* @__PURE__ */ U(
|
|
43132
|
+
return k && a ? /* @__PURE__ */ U(x4, {
|
|
41696
43133
|
file: e,
|
|
41697
43134
|
action: f === void 0 ? C : f,
|
|
41698
43135
|
cornerClass: n,
|
|
@@ -41715,7 +43152,7 @@ var X0 = () => {
|
|
|
41715
43152
|
},
|
|
41716
43153
|
size: "md"
|
|
41717
43154
|
}),
|
|
41718
|
-
/* @__PURE__ */ U(
|
|
43155
|
+
/* @__PURE__ */ U(l4, {
|
|
41719
43156
|
className: "grow text-sm font-medium text-f1-foreground",
|
|
41720
43157
|
children: e.name
|
|
41721
43158
|
}),
|
|
@@ -41729,18 +43166,18 @@ var X0 = () => {
|
|
|
41729
43166
|
}) : null
|
|
41730
43167
|
]
|
|
41731
43168
|
}),
|
|
41732
|
-
k ? /* @__PURE__ */ U(
|
|
41733
|
-
height:
|
|
43169
|
+
k ? /* @__PURE__ */ U(w4, {
|
|
43170
|
+
height: y4,
|
|
41734
43171
|
surfaceClassName: o,
|
|
41735
43172
|
testIdPrefix: u,
|
|
41736
43173
|
download: r ? void 0 : C
|
|
41737
|
-
}) : /* @__PURE__ */ U(
|
|
43174
|
+
}) : /* @__PURE__ */ U(T4, {
|
|
41738
43175
|
file: e,
|
|
41739
43176
|
kind: t,
|
|
41740
43177
|
compact: a,
|
|
41741
43178
|
url: x && S.status === "ready" ? S.url : void 0,
|
|
41742
43179
|
width: w - 2,
|
|
41743
|
-
height: a ? "100%" :
|
|
43180
|
+
height: a ? "100%" : y4,
|
|
41744
43181
|
scale: T.value,
|
|
41745
43182
|
previewDisabled: i,
|
|
41746
43183
|
decorative: m,
|
|
@@ -41767,7 +43204,7 @@ var X0 = () => {
|
|
|
41767
43204
|
})] }) : null
|
|
41768
43205
|
]
|
|
41769
43206
|
});
|
|
41770
|
-
},
|
|
43207
|
+
}, C4 = (e, t) => {
|
|
41771
43208
|
let [n, r] = H(null), [i, a] = H(1);
|
|
41772
43209
|
return Vr(() => {
|
|
41773
43210
|
if (!e || !n) return;
|
|
@@ -41786,7 +43223,7 @@ var X0 = () => {
|
|
|
41786
43223
|
setElement: r,
|
|
41787
43224
|
value: i
|
|
41788
43225
|
};
|
|
41789
|
-
},
|
|
43226
|
+
}, w4 = ({ height: e, surfaceClassName: t, testIdPrefix: n, download: r }) => {
|
|
41790
43227
|
let i = He();
|
|
41791
43228
|
return /* @__PURE__ */ W("div", {
|
|
41792
43229
|
className: F("flex flex-col items-center justify-center gap-2 border-0 border-t border-solid border-f1-border-secondary bg-f1-background-secondary px-4", t),
|
|
@@ -41804,8 +43241,8 @@ var X0 = () => {
|
|
|
41804
43241
|
onClick: r.onClick
|
|
41805
43242
|
}) : null]
|
|
41806
43243
|
});
|
|
41807
|
-
},
|
|
41808
|
-
let p = He(), { reducedMotion: m } =
|
|
43244
|
+
}, T4 = ({ file: e, kind: t, compact: n, url: r, width: i, height: a, scale: o, previewDisabled: s, decorative: c, surfaceClassName: l, testIdPrefix: u, onOpen: d, onFailed: f }) => {
|
|
43245
|
+
let p = He(), { reducedMotion: m } = q$(), [h, g] = H(!1);
|
|
41809
43246
|
return /* @__PURE__ */ W("button", {
|
|
41810
43247
|
type: "button",
|
|
41811
43248
|
onClick: d,
|
|
@@ -41825,7 +43262,7 @@ var X0 = () => {
|
|
|
41825
43262
|
"data-testid": `${u}-document-snapshot`,
|
|
41826
43263
|
children: /* @__PURE__ */ U(jr, {
|
|
41827
43264
|
fallback: null,
|
|
41828
|
-
children: r ? /* @__PURE__ */ U(
|
|
43265
|
+
children: r ? /* @__PURE__ */ U(b4, {
|
|
41829
43266
|
kind: t,
|
|
41830
43267
|
url: r,
|
|
41831
43268
|
width: i,
|
|
@@ -41835,14 +43272,14 @@ var X0 = () => {
|
|
|
41835
43272
|
})
|
|
41836
43273
|
})]
|
|
41837
43274
|
});
|
|
41838
|
-
},
|
|
43275
|
+
}, E4 = ({ attachment: e, status: t, errorMessage: n, removeLabel: r, onRemove: i, testIdPrefix: a = "chat" }) => {
|
|
41839
43276
|
let o = t === "uploading", s = t === "error", [c, l] = H(null), u = c === e.url, d, f, p = "";
|
|
41840
|
-
if (e.kind === "image") f = "image-preview", p = "h-16 w-16", d = /* @__PURE__ */ U(
|
|
43277
|
+
if (e.kind === "image") f = "image-preview", p = "h-16 w-16", d = /* @__PURE__ */ U(S1, {
|
|
41841
43278
|
src: e.thumbnailUrl ?? e.url,
|
|
41842
43279
|
alt: e.name,
|
|
41843
43280
|
className: "h-16 w-16 rounded-lg border border-solid border-f1-border-secondary object-cover"
|
|
41844
43281
|
});
|
|
41845
|
-
else if (
|
|
43282
|
+
else if (D1(e) && !u) f = "video-preview", p = "box-border h-16 w-28 border border-solid border-f1-border-secondary bg-f1-background-secondary", d = /* @__PURE__ */ U("div", {
|
|
41846
43283
|
className: "h-full w-full",
|
|
41847
43284
|
children: /* @__PURE__ */ U("video", {
|
|
41848
43285
|
src: e.url,
|
|
@@ -41862,8 +43299,8 @@ var X0 = () => {
|
|
|
41862
43299
|
})
|
|
41863
43300
|
});
|
|
41864
43301
|
else {
|
|
41865
|
-
let t =
|
|
41866
|
-
t &&
|
|
43302
|
+
let t = A1(e);
|
|
43303
|
+
t && M1(e, t) ? (f = "document-preview", d = /* @__PURE__ */ U(S4, {
|
|
41867
43304
|
file: e,
|
|
41868
43305
|
kind: t,
|
|
41869
43306
|
cornerClass: "rounded-lg",
|
|
@@ -41890,11 +43327,11 @@ var X0 = () => {
|
|
|
41890
43327
|
"data-testid": `${a}-composer-${f}`,
|
|
41891
43328
|
"data-status": t,
|
|
41892
43329
|
children: [
|
|
41893
|
-
/* @__PURE__ */ U(
|
|
43330
|
+
/* @__PURE__ */ U(D4, {
|
|
41894
43331
|
active: o,
|
|
41895
43332
|
children: d
|
|
41896
43333
|
}),
|
|
41897
|
-
/* @__PURE__ */ U(
|
|
43334
|
+
/* @__PURE__ */ U(O4, {
|
|
41898
43335
|
uploading: o,
|
|
41899
43336
|
failed: s,
|
|
41900
43337
|
testIdPrefix: a
|
|
@@ -41920,14 +43357,14 @@ var X0 = () => {
|
|
|
41920
43357
|
label: n,
|
|
41921
43358
|
children: m
|
|
41922
43359
|
}) : m;
|
|
41923
|
-
},
|
|
41924
|
-
let { reducedMotion: n } =
|
|
43360
|
+
}, D4 = ({ active: e, children: t }) => {
|
|
43361
|
+
let { reducedMotion: n } = q$();
|
|
41925
43362
|
return /* @__PURE__ */ U("div", {
|
|
41926
43363
|
className: F("flex h-full w-full", !n && "transition-[filter,transform] duration-200 ease-out", e && "scale-[1.08] blur-[4px]"),
|
|
41927
43364
|
children: t
|
|
41928
43365
|
});
|
|
41929
|
-
},
|
|
41930
|
-
let { reducedMotion: r } =
|
|
43366
|
+
}, O4 = ({ uploading: e, failed: t, testIdPrefix: n }) => {
|
|
43367
|
+
let { reducedMotion: r } = q$(), i = {
|
|
41931
43368
|
duration: r ? 0 : .18,
|
|
41932
43369
|
ease: "easeOut"
|
|
41933
43370
|
};
|
|
@@ -41965,7 +43402,7 @@ var X0 = () => {
|
|
|
41965
43402
|
})
|
|
41966
43403
|
}, "overlay") : null
|
|
41967
43404
|
});
|
|
41968
|
-
},
|
|
43405
|
+
}, k4 = ({ items: e, label: t, busy: n, reducedMotion: r, stripRef: i, testIdPrefix: a = "chat" }) => /* @__PURE__ */ U(ge, {
|
|
41969
43406
|
initial: !1,
|
|
41970
43407
|
children: e.length > 0 ? /* @__PURE__ */ U(De.div, {
|
|
41971
43408
|
className: "overflow-hidden",
|
|
@@ -41983,7 +43420,7 @@ var X0 = () => {
|
|
|
41983
43420
|
},
|
|
41984
43421
|
transition: {
|
|
41985
43422
|
duration: r ? 0 : .18,
|
|
41986
|
-
ease:
|
|
43423
|
+
ease: v1
|
|
41987
43424
|
},
|
|
41988
43425
|
children: /* @__PURE__ */ U("div", {
|
|
41989
43426
|
ref: i,
|
|
@@ -42011,11 +43448,11 @@ var X0 = () => {
|
|
|
42011
43448
|
exit: r ? void 0 : {
|
|
42012
43449
|
opacity: 0,
|
|
42013
43450
|
scale: .95,
|
|
42014
|
-
transition:
|
|
43451
|
+
transition: b1
|
|
42015
43452
|
},
|
|
42016
43453
|
transition: {
|
|
42017
|
-
...
|
|
42018
|
-
layout:
|
|
43454
|
+
...y1,
|
|
43455
|
+
layout: x1
|
|
42019
43456
|
},
|
|
42020
43457
|
children: /* @__PURE__ */ U(De.div, {
|
|
42021
43458
|
className: "flex",
|
|
@@ -42028,7 +43465,7 @@ var X0 = () => {
|
|
|
42028
43465
|
})
|
|
42029
43466
|
})
|
|
42030
43467
|
}, "attachments-row") : null
|
|
42031
|
-
}),
|
|
43468
|
+
}), A4 = ke({
|
|
42032
43469
|
base: "flex gap-md",
|
|
42033
43470
|
variants: {
|
|
42034
43471
|
align: {
|
|
@@ -42088,11 +43525,11 @@ var X0 = () => {
|
|
|
42088
43525
|
fullWidthOnStack: !1,
|
|
42089
43526
|
reverseOnStack: !1
|
|
42090
43527
|
}
|
|
42091
|
-
}),
|
|
43528
|
+
}), j4 = {
|
|
42092
43529
|
sm: 640,
|
|
42093
43530
|
md: 768,
|
|
42094
43531
|
"container-md": 448
|
|
42095
|
-
},
|
|
43532
|
+
}, M4 = (e) => "type" in e && e.type === "separator", N4 = (e) => "type" in e && e.type === "split", P4 = (e) => !("type" in e), F4 = (e, t, n) => /* @__PURE__ */ U(xe, {
|
|
42096
43533
|
label: e.label,
|
|
42097
43534
|
icon: e.icon,
|
|
42098
43535
|
iconPosition: e.iconPosition,
|
|
@@ -42106,29 +43543,29 @@ var X0 = () => {
|
|
|
42106
43543
|
href: e.href,
|
|
42107
43544
|
target: e.target
|
|
42108
43545
|
}
|
|
42109
|
-
}, e.id),
|
|
43546
|
+
}, e.id), I4 = (e, t, n) => {
|
|
42110
43547
|
let { id: r, type: i, ...a } = e;
|
|
42111
43548
|
return /* @__PURE__ */ U(VB, {
|
|
42112
43549
|
...a,
|
|
42113
43550
|
size: t,
|
|
42114
43551
|
variant: n
|
|
42115
43552
|
}, r);
|
|
42116
|
-
},
|
|
43553
|
+
}, L4 = (e, t) => /* @__PURE__ */ U(xe, {
|
|
42117
43554
|
label: e.label,
|
|
42118
43555
|
variant: "outline",
|
|
42119
43556
|
size: t,
|
|
42120
43557
|
disabled: e.disabled,
|
|
42121
43558
|
href: e.href,
|
|
42122
43559
|
target: e.target
|
|
42123
|
-
}, "secondary-link"),
|
|
43560
|
+
}, "secondary-link"), R4 = (e, t) => {
|
|
42124
43561
|
let n = e.variant ?? "default";
|
|
42125
|
-
return
|
|
43562
|
+
return N4(e) ? I4(e, t, n) : F4(e, t, n);
|
|
42126
43563
|
};
|
|
42127
|
-
function
|
|
43564
|
+
function z4({ primaryAction: e, secondaryActions: t, otherActions: n = [], size: r = "md", align: i = "end", stack: a = "none", fullWidthOnStack: o = !1, reverseOnStack: s = !1, canOverflow: c = !0, className: l }) {
|
|
42128
43565
|
let u = V(null), { width: d = 0 } = it({
|
|
42129
43566
|
ref: u,
|
|
42130
43567
|
box: "border-box"
|
|
42131
|
-
}), f = a === "sm" || a === "md" ?
|
|
43568
|
+
}), f = a === "sm" || a === "md" ? j4[a] : j4.md, p = E(`(min-width: ${f}px)`, { initializeWithValue: !1 }), m = a === "none" ? !0 : a === "container-md" ? d >= j4["container-md"] : p, h = typeof r == "string" ? r : r.base, g = typeof r == "string" ? r : r.md, _ = m ? g : h, v = {
|
|
42132
43569
|
primaryAction: e,
|
|
42133
43570
|
secondaryItems: Array.isArray(t) ? t : [],
|
|
42134
43571
|
secondaryLink: t != null && !Array.isArray(t) ? t : void 0,
|
|
@@ -42140,26 +43577,26 @@ function D2({ primaryAction: e, secondaryActions: t, otherActions: n = [], size:
|
|
|
42140
43577
|
return /* @__PURE__ */ U("div", {
|
|
42141
43578
|
ref: u,
|
|
42142
43579
|
role: "group",
|
|
42143
|
-
className: F(m ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" :
|
|
43580
|
+
className: F(m ? "flex w-full items-center gap-md [&>*:not(:first-child)]:shrink-0" : A4({
|
|
42144
43581
|
align: i,
|
|
42145
43582
|
stack: a,
|
|
42146
43583
|
fullWidthOnStack: o,
|
|
42147
43584
|
reverseOnStack: s
|
|
42148
43585
|
}), l),
|
|
42149
|
-
children: m ? /* @__PURE__ */ U(
|
|
43586
|
+
children: m ? /* @__PURE__ */ U(V4, { ...v }, "row") : /* @__PURE__ */ U(B4, { ...v }, "stacked")
|
|
42150
43587
|
});
|
|
42151
43588
|
}
|
|
42152
|
-
function
|
|
42153
|
-
let a = t.filter((e) => !
|
|
43589
|
+
function B4({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i }) {
|
|
43590
|
+
let a = t.filter((e) => !M4(e)).map((e) => N4(e) ? I4(e, i, "outline") : F4(e, i, "outline"));
|
|
42154
43591
|
return /* @__PURE__ */ W(Wr, { children: [
|
|
42155
43592
|
r.length > 0 ? /* @__PURE__ */ U(Zd, { items: r }) : null,
|
|
42156
43593
|
a,
|
|
42157
|
-
n ?
|
|
42158
|
-
e ?
|
|
43594
|
+
n ? L4(n, i) : null,
|
|
43595
|
+
e ? R4(e, i) : null
|
|
42159
43596
|
] });
|
|
42160
43597
|
}
|
|
42161
|
-
function
|
|
42162
|
-
let s = Hr(() => t.filter(
|
|
43598
|
+
function V4({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherActions: r, size: i, align: a, canOverflow: o }) {
|
|
43599
|
+
let s = Hr(() => t.filter(P4), [t]), { containerRef: c, measurementContainerRef: l, customOverflowIndicatorRef: u, visibleItems: d, overflowItems: f, isInitialized: p } = Et(s, 8);
|
|
42163
43600
|
B(() => {
|
|
42164
43601
|
l.current?.setAttribute("inert", "");
|
|
42165
43602
|
}, [l]);
|
|
@@ -42169,14 +43606,14 @@ function k2({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
42169
43606
|
} : {
|
|
42170
43607
|
shown: d,
|
|
42171
43608
|
overflowed: f
|
|
42172
|
-
}, g = new Set(m.map((e) => e.id)), _ = e ?
|
|
43609
|
+
}, g = new Set(m.map((e) => e.id)), _ = e ? R4(e, i) : null, v = t.filter(N4), y = t[t.length - 1], b = y != null && M4(y) && (v.length > 0 || _ != null), x = [];
|
|
42173
43610
|
t.forEach((e, t) => {
|
|
42174
|
-
|
|
43611
|
+
N4(e) || (M4(e) ? x.push({
|
|
42175
43612
|
kind: "sep",
|
|
42176
43613
|
key: `sep-${t}`
|
|
42177
43614
|
}) : g.has(e.id) && x.push({
|
|
42178
43615
|
kind: "node",
|
|
42179
|
-
node:
|
|
43616
|
+
node: F4(e, i, "outline")
|
|
42180
43617
|
}));
|
|
42181
43618
|
});
|
|
42182
43619
|
let S = x.filter((e, t) => e.kind === "node" || x[t - 1]?.kind === "node" && x[t + 1]?.kind === "node"), C = [
|
|
@@ -42199,7 +43636,7 @@ function k2({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
42199
43636
|
ref: l,
|
|
42200
43637
|
"aria-hidden": "true",
|
|
42201
43638
|
className: "pointer-events-none invisible absolute left-0 top-0 flex items-center gap-md whitespace-nowrap",
|
|
42202
|
-
children: s.map((e) =>
|
|
43639
|
+
children: s.map((e) => F4(e, i, "outline"))
|
|
42203
43640
|
}) : null,
|
|
42204
43641
|
C.length > 0 ? /* @__PURE__ */ U("div", {
|
|
42205
43642
|
ref: u,
|
|
@@ -42209,16 +43646,16 @@ function k2({ primaryAction: e, secondaryItems: t, secondaryLink: n, otherAction
|
|
|
42209
43646
|
size: i
|
|
42210
43647
|
})
|
|
42211
43648
|
}) : null,
|
|
42212
|
-
S.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(
|
|
42213
|
-
n ?
|
|
43649
|
+
S.map((e) => e.kind === "sep" ? /* @__PURE__ */ U(H4, {}, e.key) : e.node),
|
|
43650
|
+
n ? L4(n, i) : null
|
|
42214
43651
|
]
|
|
42215
43652
|
}),
|
|
42216
|
-
v.map((e) =>
|
|
42217
|
-
b ? /* @__PURE__ */ U(
|
|
43653
|
+
v.map((e) => I4(e, i, "outline")),
|
|
43654
|
+
b ? /* @__PURE__ */ U(H4, {}) : null,
|
|
42218
43655
|
_
|
|
42219
43656
|
] });
|
|
42220
43657
|
}
|
|
42221
|
-
function
|
|
43658
|
+
function H4() {
|
|
42222
43659
|
return /* @__PURE__ */ U("div", {
|
|
42223
43660
|
role: "separator",
|
|
42224
43661
|
"aria-orientation": "vertical",
|
|
@@ -42227,22 +43664,22 @@ function A2() {
|
|
|
42227
43664
|
}
|
|
42228
43665
|
//#endregion
|
|
42229
43666
|
//#region src/elements/F0CardHorizontal/components/CardHorizontalActions.tsx
|
|
42230
|
-
var
|
|
43667
|
+
var U4 = {
|
|
42231
43668
|
sm: "flex flex-col @xs:flex-row @xs:items-start @xs:justify-between @xs:gap-4",
|
|
42232
43669
|
md: "flex flex-col @md:flex-row @md:items-start @md:justify-between @md:gap-4",
|
|
42233
43670
|
lg: "flex flex-col @lg:flex-row @lg:items-start @lg:justify-between @lg:gap-4",
|
|
42234
43671
|
never: "flex flex-row items-start justify-between gap-4"
|
|
42235
|
-
},
|
|
43672
|
+
}, W4 = {
|
|
42236
43673
|
sm: "@xs:self-center",
|
|
42237
43674
|
md: "@md:self-center",
|
|
42238
43675
|
lg: "@lg:self-center",
|
|
42239
43676
|
never: "self-center"
|
|
42240
|
-
},
|
|
43677
|
+
}, G4 = {
|
|
42241
43678
|
sm: "@xs:flex-1",
|
|
42242
43679
|
md: "@md:flex-1",
|
|
42243
43680
|
lg: "@lg:flex-1",
|
|
42244
43681
|
never: "flex-1"
|
|
42245
|
-
},
|
|
43682
|
+
}, K4 = {
|
|
42246
43683
|
sm: {
|
|
42247
43684
|
sm: "@xs:pt-2",
|
|
42248
43685
|
md: "@md:pt-2",
|
|
@@ -42255,46 +43692,46 @@ var j2 = {
|
|
|
42255
43692
|
lg: "@lg:pt-1",
|
|
42256
43693
|
never: "pt-1"
|
|
42257
43694
|
}
|
|
42258
|
-
},
|
|
43695
|
+
}, q4 = {
|
|
42259
43696
|
sm: "@xs:min-h-10",
|
|
42260
43697
|
md: "@md:min-h-10",
|
|
42261
43698
|
lg: "@lg:min-h-10",
|
|
42262
43699
|
never: "min-h-10"
|
|
42263
|
-
},
|
|
43700
|
+
}, J4 = {
|
|
42264
43701
|
sm: "hidden @xs:flex",
|
|
42265
43702
|
md: "hidden @md:flex",
|
|
42266
43703
|
lg: "hidden @lg:flex",
|
|
42267
43704
|
never: "flex"
|
|
42268
|
-
},
|
|
43705
|
+
}, Y4 = {
|
|
42269
43706
|
sm: "flex @xs:hidden",
|
|
42270
43707
|
md: "flex @md:hidden",
|
|
42271
43708
|
lg: "flex @lg:hidden",
|
|
42272
43709
|
never: "hidden"
|
|
42273
|
-
},
|
|
43710
|
+
}, X4 = {
|
|
42274
43711
|
sm: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @xs:mx-0 @xs:mt-0 @xs:border-t-0 @xs:px-0 @xs:pt-0",
|
|
42275
43712
|
md: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @md:mx-0 @md:mt-0 @md:border-t-0 @md:px-0 @md:pt-0",
|
|
42276
43713
|
lg: "-mx-4 mt-4 border-0 border-t border-solid border-t-f1-border-secondary px-4 pt-4 @lg:mx-0 @lg:mt-0 @lg:border-t-0 @lg:px-0 @lg:pt-0",
|
|
42277
43714
|
never: ""
|
|
42278
|
-
},
|
|
43715
|
+
}, Z4 = {
|
|
42279
43716
|
neutral: "secondary",
|
|
42280
43717
|
info: "info",
|
|
42281
43718
|
positive: "positive",
|
|
42282
43719
|
warning: "warning",
|
|
42283
43720
|
critical: "critical"
|
|
42284
43721
|
};
|
|
42285
|
-
function
|
|
42286
|
-
let l = c ?
|
|
43722
|
+
function Q4({ primaryAction: e, secondaryActions: t, otherActions: n, size: r = "md", confirmAction: i, rejectAction: a, status: o, stackAt: s = "never", hasAvatar: c = !1 }) {
|
|
43723
|
+
let l = c ? K4[r][s] : void 0;
|
|
42287
43724
|
if (o) return /* @__PURE__ */ U("div", {
|
|
42288
|
-
className: F("flex items-center justify-end", c &&
|
|
43725
|
+
className: F("flex items-center justify-end", c && q4[s], X4[s]),
|
|
42289
43726
|
children: /* @__PURE__ */ U(Ae, {
|
|
42290
43727
|
icon: o.icon,
|
|
42291
|
-
color:
|
|
43728
|
+
color: Z4[o.variant],
|
|
42292
43729
|
size: "lg",
|
|
42293
43730
|
role: "img",
|
|
42294
43731
|
"aria-label": o.label
|
|
42295
43732
|
})
|
|
42296
43733
|
});
|
|
42297
|
-
let u = F("relative z-[1]",
|
|
43734
|
+
let u = F("relative z-[1]", G4[s], X4[s], l), d = (e) => /* @__PURE__ */ U("div", {
|
|
42298
43735
|
className: u,
|
|
42299
43736
|
onClick: (e) => e.stopPropagation(),
|
|
42300
43737
|
children: e
|
|
@@ -42316,19 +43753,19 @@ function B2({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
42316
43753
|
disabled: i.disabled,
|
|
42317
43754
|
onClick: i.onClick
|
|
42318
43755
|
} : void 0;
|
|
42319
|
-
return /* @__PURE__ */ U(
|
|
43756
|
+
return /* @__PURE__ */ U(z4, {
|
|
42320
43757
|
primaryAction: n,
|
|
42321
43758
|
secondaryActions: t ? [t] : void 0,
|
|
42322
43759
|
size: r,
|
|
42323
43760
|
canOverflow: !1
|
|
42324
43761
|
});
|
|
42325
43762
|
}, t = /* @__PURE__ */ U("div", {
|
|
42326
|
-
className: F("relative z-[1] flex-1", l,
|
|
43763
|
+
className: F("relative z-[1] flex-1", l, J4[s]),
|
|
42327
43764
|
onClick: (e) => e.stopPropagation(),
|
|
42328
43765
|
children: e(!0)
|
|
42329
43766
|
});
|
|
42330
43767
|
return s === "never" ? t : /* @__PURE__ */ W(Wr, { children: [t, /* @__PURE__ */ U("div", {
|
|
42331
|
-
className: F("relative z-[1]",
|
|
43768
|
+
className: F("relative z-[1]", Y4[s], X4[s]),
|
|
42332
43769
|
onClick: (e) => e.stopPropagation(),
|
|
42333
43770
|
children: e(!1)
|
|
42334
43771
|
})] });
|
|
@@ -42350,7 +43787,7 @@ function B2({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
42350
43787
|
onClick: e.onClick,
|
|
42351
43788
|
variant: e.variant
|
|
42352
43789
|
} : void 0;
|
|
42353
|
-
return p || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? d(/* @__PURE__ */ U(
|
|
43790
|
+
return p || (Array.isArray(t) ? t.length > 0 : t) || (n?.length ?? 0) > 0 ? d(/* @__PURE__ */ U(z4, {
|
|
42354
43791
|
primaryAction: p,
|
|
42355
43792
|
secondaryActions: f,
|
|
42356
43793
|
otherActions: n,
|
|
@@ -42359,7 +43796,7 @@ function B2({ primaryAction: e, secondaryActions: t, otherActions: n, size: r =
|
|
|
42359
43796
|
}
|
|
42360
43797
|
//#endregion
|
|
42361
43798
|
//#region src/elements/F0CardHorizontal/F0CardHorizontal.tsx
|
|
42362
|
-
var
|
|
43799
|
+
var $4 = ({ title: e, tag: t, inactive: n }) => {
|
|
42363
43800
|
let r = /* @__PURE__ */ U(At, {
|
|
42364
43801
|
variant: "body",
|
|
42365
43802
|
content: e,
|
|
@@ -42376,14 +43813,14 @@ var V2 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
42376
43813
|
})
|
|
42377
43814
|
})]
|
|
42378
43815
|
}) : r;
|
|
42379
|
-
},
|
|
42380
|
-
className: F("flex min-w-0 flex-row gap-3",
|
|
43816
|
+
}, e3 = ({ avatar: e, title: t, tag: n, description: r, inactive: i, descriptionAsSingleLine: a, stackAt: o }) => /* @__PURE__ */ W("div", {
|
|
43817
|
+
className: F("flex min-w-0 flex-row gap-3", W4[o], e ? "items-start" : "items-center"),
|
|
42381
43818
|
children: [e ? /* @__PURE__ */ U($V, {
|
|
42382
43819
|
avatar: e,
|
|
42383
43820
|
size: "lg"
|
|
42384
43821
|
}) : null, /* @__PURE__ */ W("div", {
|
|
42385
43822
|
className: "flex min-w-0 flex-col gap-0",
|
|
42386
|
-
children: [/* @__PURE__ */ U(
|
|
43823
|
+
children: [/* @__PURE__ */ U($4, {
|
|
42387
43824
|
title: t,
|
|
42388
43825
|
tag: n,
|
|
42389
43826
|
inactive: i
|
|
@@ -42394,7 +43831,7 @@ var V2 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
42394
43831
|
className: F(!a && "break-words", i && "line-through")
|
|
42395
43832
|
}) : null]
|
|
42396
43833
|
})]
|
|
42397
|
-
}),
|
|
43834
|
+
}), t3 = R(function({ title: e, tag: t, description: n, avatar: r, primaryAction: i, secondaryActions: a, otherActions: o, actionsSize: s = "md", confirmAction: c, rejectAction: l, status: u, inactive: d = !1, fullHeight: f = !1, alert: p, link: m, onClick: h, disableOverlayLink: g = !1, stackAt: _ = "never", disabled: v = !1, descriptionAsSingleLine: y = !1 }, b) {
|
|
42398
43835
|
let x = !!p && p.visible !== !1, S = /* @__PURE__ */ W(_l, {
|
|
42399
43836
|
ref: x ? void 0 : b,
|
|
42400
43837
|
className: F("group relative @container bg-f1-background shadow-none transition-all", f && "h-full", (!!m || !!h) && !v && "cursor-pointer focus-within:border-f1-border-hover focus-within:shadow-md hover:border-f1-border-hover hover:shadow-md", v && "pointer-events-none opacity-50"),
|
|
@@ -42411,8 +43848,8 @@ var V2 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
42411
43848
|
"aria-label": t ? `${e}, ${t.text}` : e,
|
|
42412
43849
|
children: "\xA0"
|
|
42413
43850
|
}) : null, /* @__PURE__ */ W("div", {
|
|
42414
|
-
className:
|
|
42415
|
-
children: [/* @__PURE__ */ U(
|
|
43851
|
+
className: U4[_],
|
|
43852
|
+
children: [/* @__PURE__ */ U(e3, {
|
|
42416
43853
|
avatar: r,
|
|
42417
43854
|
title: e,
|
|
42418
43855
|
tag: t,
|
|
@@ -42420,7 +43857,7 @@ var V2 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
42420
43857
|
inactive: d,
|
|
42421
43858
|
descriptionAsSingleLine: y,
|
|
42422
43859
|
stackAt: _
|
|
42423
|
-
}), /* @__PURE__ */ U(
|
|
43860
|
+
}), /* @__PURE__ */ U(Q4, {
|
|
42424
43861
|
primaryAction: i,
|
|
42425
43862
|
secondaryActions: a,
|
|
42426
43863
|
otherActions: o,
|
|
@@ -42440,8 +43877,8 @@ var V2 = ({ title: e, tag: t, inactive: n }) => {
|
|
|
42440
43877
|
children: S
|
|
42441
43878
|
}) : S;
|
|
42442
43879
|
});
|
|
42443
|
-
|
|
42444
|
-
var
|
|
43880
|
+
t3.displayName = "F0CardHorizontal";
|
|
43881
|
+
var n3 = be(Ue("F0CardHorizontal", Bl(t3, () => /* @__PURE__ */ U(_l, {
|
|
42445
43882
|
className: F("group relative bg-f1-background shadow-none"),
|
|
42446
43883
|
"aria-busy": "true",
|
|
42447
43884
|
"aria-live": "polite",
|
|
@@ -42455,7 +43892,7 @@ var W2 = be(Ue("F0CardHorizontal", Bl(U2, () => /* @__PURE__ */ U(_l, {
|
|
|
42455
43892
|
})]
|
|
42456
43893
|
}), /* @__PURE__ */ U(Ie, { className: "h-9 w-24 rounded-md" })]
|
|
42457
43894
|
})
|
|
42458
|
-
})))),
|
|
43895
|
+
})))), r3 = ({ visible: e, onFilesDropped: t, mode: n = "files" }) => {
|
|
42459
43896
|
let r = He(), i = n === "discuss";
|
|
42460
43897
|
return /* @__PURE__ */ W("div", {
|
|
42461
43898
|
"aria-hidden": !e,
|
|
@@ -42488,7 +43925,7 @@ var W2 = be(Ue("F0CardHorizontal", Bl(U2, () => /* @__PURE__ */ U(_l, {
|
|
|
42488
43925
|
};
|
|
42489
43926
|
//#endregion
|
|
42490
43927
|
//#region src/addons/ai/ai/F0AiPong/components/PongBall.tsx
|
|
42491
|
-
function
|
|
43928
|
+
function i3({ size: e = 40, className: t, style: n }) {
|
|
42492
43929
|
return /* @__PURE__ */ U("div", {
|
|
42493
43930
|
className: F(t, "rounded-full"),
|
|
42494
43931
|
style: {
|
|
@@ -42501,38 +43938,38 @@ function K2({ size: e = 40, className: t, style: n }) {
|
|
|
42501
43938
|
}
|
|
42502
43939
|
//#endregion
|
|
42503
43940
|
//#region src/addons/ai/ai/F0AiPong/F0AiPong.tsx
|
|
42504
|
-
var
|
|
42505
|
-
function
|
|
43941
|
+
var a3 = 40, o3 = 93, s3 = o3 * .5, c3 = 32, l3 = 24, u3 = 8, d3 = 48, f3 = 10, p3 = 7, m3 = 18, h3 = .25, g3 = .15, _3 = 800, v3 = Math.PI / 3, y3 = a3 / 2, b3 = .12, x3 = 8, S3 = 5, C3 = .08;
|
|
43942
|
+
function w3(e, t, n) {
|
|
42506
43943
|
return Math.max(t, Math.min(n, e));
|
|
42507
43944
|
}
|
|
42508
|
-
function
|
|
43945
|
+
function T3() {
|
|
42509
43946
|
let e = (Math.random() * 50 + 65) * Math.PI / 180, t = Math.random() > .5 ? 1 : -1, n = Math.random() > .5 ? 1 : -1;
|
|
42510
43947
|
return {
|
|
42511
|
-
vx: Math.cos(e) *
|
|
42512
|
-
vy: Math.sin(e) *
|
|
43948
|
+
vx: Math.cos(e) * p3 * t,
|
|
43949
|
+
vy: Math.sin(e) * p3 * n
|
|
42513
43950
|
};
|
|
42514
43951
|
}
|
|
42515
|
-
var
|
|
43952
|
+
var E3 = ({ onClose: e }) => {
|
|
42516
43953
|
let t = He(), n = O(), r = V(null), i = V(null), a = V(null), o = V(null), [c, l] = H(null), u = V(/* @__PURE__ */ new Set()), d = V({
|
|
42517
43954
|
x: 0,
|
|
42518
43955
|
y: 0,
|
|
42519
43956
|
vx: 0,
|
|
42520
43957
|
vy: 0,
|
|
42521
|
-
speed:
|
|
43958
|
+
speed: p3
|
|
42522
43959
|
}), f = V(0), p = V(0), m = V(0), h = V({
|
|
42523
43960
|
player: 0,
|
|
42524
43961
|
ai: 0
|
|
42525
43962
|
}), g = V("countdown"), _ = V(0), v = V(0), y = V([]), b = V(0), x = V(0), S = V({
|
|
42526
43963
|
width: 0,
|
|
42527
43964
|
height: 0
|
|
42528
|
-
}), C = V(0), w = V(0), T = V(
|
|
43965
|
+
}), C = V(0), w = V(0), T = V(o3), E = V(0), D = V(0), k = V(0), A = V(0), j = V(null), [M, N] = H({
|
|
42529
43966
|
x: 0,
|
|
42530
43967
|
y: 0
|
|
42531
43968
|
}), [ee, te] = H(0), [ne, re] = H(0), [ie, ae] = H({
|
|
42532
43969
|
player: 0,
|
|
42533
43970
|
ai: 0
|
|
42534
|
-
}), [oe, se] = H(
|
|
42535
|
-
let { width: e, height: t } = S.current, n =
|
|
43971
|
+
}), [oe, se] = H(o3), [ce, le] = H("countdown"), [ue, de] = H(3), [fe, pe] = H([]), [P, me] = H(0), [he, ge] = H(0), [_e, ve] = H(null), [ye, be] = H(null), Se = z(() => {
|
|
43972
|
+
let { width: e, height: t } = S.current, n = p3 + E.current;
|
|
42536
43973
|
d.current = {
|
|
42537
43974
|
x: e / 2,
|
|
42538
43975
|
y: t / 2,
|
|
@@ -42541,7 +43978,7 @@ var m4 = ({ onClose: e }) => {
|
|
|
42541
43978
|
speed: n
|
|
42542
43979
|
}, y.current = [], v.current = 0;
|
|
42543
43980
|
}, []), Ce = z(() => {
|
|
42544
|
-
let e =
|
|
43981
|
+
let e = p3 + E.current, { vx: t, vy: n } = T3(), r = e / p3;
|
|
42545
43982
|
d.current.vx = t * r, d.current.vy = n * r, d.current.speed = e, g.current = "playing", le("playing"), j.current = null, be(null);
|
|
42546
43983
|
}, []), we = z(() => {
|
|
42547
43984
|
Se(), g.current = "countdown", le("countdown"), de(3);
|
|
@@ -42567,9 +44004,9 @@ var m4 = ({ onClose: e }) => {
|
|
|
42567
44004
|
});
|
|
42568
44005
|
}, [n]), Ee = z((n) => {
|
|
42569
44006
|
let r = { ...h.current };
|
|
42570
|
-
n === "player" ? r.player++ : r.ai++, h.current = r, ae(r), C.current = 8, j.current = n, be(n), E.current = Math.min(11, E.current +
|
|
44007
|
+
n === "player" ? r.player++ : r.ai++, h.current = r, ae(r), C.current = 8, j.current = n, be(n), E.current = Math.min(11, E.current + g3), n === "player" && Te(), r.player >= 3 || r.ai >= 3 ? (g.current = "gameover", le("gameover"), Se(), ve(r.player >= 3 ? t.ai.pong.youWin : t.ai.pong.youLose), setTimeout(() => e(), 2e3)) : (g.current = "scored", le("scored"), Se(), _.current = _3, setTimeout(() => {
|
|
42571
44008
|
g.current === "scored" && we();
|
|
42572
|
-
},
|
|
44009
|
+
}, _3));
|
|
42573
44010
|
}, [
|
|
42574
44011
|
Se,
|
|
42575
44012
|
we,
|
|
@@ -42610,10 +44047,10 @@ var m4 = ({ onClose: e }) => {
|
|
|
42610
44047
|
}, ae({
|
|
42611
44048
|
player: 0,
|
|
42612
44049
|
ai: 0
|
|
42613
|
-
}), w.current = 0, T.current =
|
|
44050
|
+
}), w.current = 0, T.current = o3, se(o3), E.current = 0, D.current = 0;
|
|
42614
44051
|
let r = we(), a = (t) => {
|
|
42615
44052
|
let n = e.getBoundingClientRect(), r = T.current;
|
|
42616
|
-
f.current =
|
|
44053
|
+
f.current = w3(t.clientX - n.left, r / 2 + u3, n.width - r / 2 - u3);
|
|
42617
44054
|
};
|
|
42618
44055
|
e.addEventListener("pointermove", a);
|
|
42619
44056
|
let o = (e) => {
|
|
@@ -42621,34 +44058,34 @@ var m4 = ({ onClose: e }) => {
|
|
|
42621
44058
|
let t = (e - b.current) / 16.667, n = Math.min(t, 3);
|
|
42622
44059
|
b.current = e;
|
|
42623
44060
|
let { width: r, height: i } = S.current, a = d.current, s = T.current;
|
|
42624
|
-
if (u.current.has("ArrowLeft") && (f.current =
|
|
44061
|
+
if (u.current.has("ArrowLeft") && (f.current = w3(f.current - f3 * n, s / 2 + u3, r - s / 2 - u3)), u.current.has("ArrowRight") && (f.current = w3(f.current + f3 * n, s / 2 + u3, r - s / 2 - u3)), C.current > 0 && (C.current *= .85, C.current < .5 && (C.current = 0)), g.current === "playing") {
|
|
42625
44062
|
y.current.push({
|
|
42626
44063
|
x: a.x,
|
|
42627
44064
|
y: a.y
|
|
42628
|
-
}), y.current.length >
|
|
42629
|
-
let e = r -
|
|
44065
|
+
}), y.current.length > S3 && (y.current = y.current.slice(-5)), a.x += a.vx * n, a.y += a.vy * n, k.current += A.current * n, A.current *= .96;
|
|
44066
|
+
let e = r - u3 - a3 / 2;
|
|
42630
44067
|
a.x <= 28 && (a.x = 28, a.vx = Math.abs(a.vx), A.current *= -.5), a.x >= e && (a.x = e, a.vx = -Math.abs(a.vx), A.current *= -.5);
|
|
42631
|
-
let t = i -
|
|
42632
|
-
if (a.y +
|
|
42633
|
-
a.y = t -
|
|
42634
|
-
let e =
|
|
42635
|
-
a.speed = Math.min(a.speed +
|
|
42636
|
-
let n = e *
|
|
44068
|
+
let t = i - l3 - c3, o = s / 2;
|
|
44069
|
+
if (a.y + y3 >= t && a.y - y3 <= t + c3 && a.vy > 0 && a.x >= f.current - o - y3 && a.x <= f.current + o + y3) {
|
|
44070
|
+
a.y = t - y3;
|
|
44071
|
+
let e = w3((a.x - f.current) / o, -1, 1);
|
|
44072
|
+
a.speed = Math.min(a.speed + h3, m3);
|
|
44073
|
+
let n = e * v3;
|
|
42637
44074
|
a.vx = Math.sin(n) * a.speed, a.vy = -Math.cos(n) * a.speed, A.current = e * 1.2, v.current++, w.current++;
|
|
42638
|
-
let r =
|
|
42639
|
-
T.current =
|
|
44075
|
+
let r = s3 / o3 + (1 - s3 / o3) * Math.exp(-w.current * .03);
|
|
44076
|
+
T.current = o3 * r;
|
|
42640
44077
|
}
|
|
42641
|
-
let c =
|
|
42642
|
-
if (a.y -
|
|
44078
|
+
let c = o3 / 2;
|
|
44079
|
+
if (a.y - y3 <= 56 && a.y + y3 >= l3 && a.vy < 0 && a.x >= p.current - c - y3 && a.x <= p.current + c + y3) {
|
|
42643
44080
|
a.y = 76;
|
|
42644
|
-
let e =
|
|
42645
|
-
a.speed = Math.min(a.speed +
|
|
42646
|
-
let t = e *
|
|
44081
|
+
let e = w3((a.x - p.current) / c, -1, 1);
|
|
44082
|
+
a.speed = Math.min(a.speed + h3, m3);
|
|
44083
|
+
let t = e * v3;
|
|
42647
44084
|
a.vx = Math.sin(t) * a.speed, a.vy = Math.cos(t) * a.speed, A.current = e * 1.2, v.current++;
|
|
42648
44085
|
}
|
|
42649
44086
|
if (a.y < -80 ? Ee("player") : a.y > i + 80 && Ee("ai"), a.vy < 0) {
|
|
42650
|
-
let e = Math.max(1, (a.y -
|
|
42651
|
-
m.current += i *
|
|
44087
|
+
let e = Math.max(1, (a.y - l3) / -a.vy), t = a.x + a.vx * e, r = x3 * (1 + a.speed / m3), i = t + (Math.random() - .5) * r - m.current;
|
|
44088
|
+
m.current += i * b3 * n;
|
|
42652
44089
|
} else {
|
|
42653
44090
|
let e = Math.sin(Date.now() * .002) * 15;
|
|
42654
44091
|
m.current += (r / 2 + e - m.current) * .025 * n;
|
|
@@ -42656,7 +44093,7 @@ var m4 = ({ onClose: e }) => {
|
|
|
42656
44093
|
let l = (m.current - p.current) * .1 * n;
|
|
42657
44094
|
D.current += l, D.current *= .88;
|
|
42658
44095
|
let u = 6 + v.current * .12;
|
|
42659
|
-
D.current =
|
|
44096
|
+
D.current = w3(D.current, -u, u), p.current += D.current * n, p.current = w3(p.current, 54.5, r - o3 / 2 - u3);
|
|
42660
44097
|
}
|
|
42661
44098
|
N({
|
|
42662
44099
|
x: a.x,
|
|
@@ -42702,13 +44139,13 @@ var m4 = ({ onClose: e }) => {
|
|
|
42702
44139
|
children: [
|
|
42703
44140
|
/* @__PURE__ */ U("div", { className: "pointer-events-none absolute left-0 right-0 top-1/2 h-px translate-y-1/2 bg-f1-border" }),
|
|
42704
44141
|
fe.map((e, t) => {
|
|
42705
|
-
let n = (t + 1) / fe.length, r =
|
|
44142
|
+
let n = (t + 1) / fe.length, r = a3 * (.15 + n * .25);
|
|
42706
44143
|
return /* @__PURE__ */ U("div", {
|
|
42707
44144
|
className: "pointer-events-none absolute rounded-full bg-f1-foreground-secondary/40",
|
|
42708
44145
|
style: {
|
|
42709
44146
|
width: r,
|
|
42710
44147
|
height: r,
|
|
42711
|
-
opacity: n *
|
|
44148
|
+
opacity: n * C3,
|
|
42712
44149
|
transform: `translate(${e.x - r / 2}px, ${e.y - r / 2}px)`
|
|
42713
44150
|
}
|
|
42714
44151
|
}, t);
|
|
@@ -42716,19 +44153,19 @@ var m4 = ({ onClose: e }) => {
|
|
|
42716
44153
|
/* @__PURE__ */ U("div", {
|
|
42717
44154
|
className: F("absolute isolate rounded", "border border-solid border-f1-border", "before:pointer-events-none before:absolute before:inset-0 before:z-[-1]", "before:rounded-[inherit] before:bg-f1-special-page before:content-['']", "after:pointer-events-none after:absolute after:inset-0.5 after:z-[-2]", "after:rounded-[inherit] after:blur-[5px] after:content-['']", "after:bg-[conic-gradient(from_var(--gradient-angle),var(--tw-gradient-stops))]", "from-[#E55619] via-[#A1ADE5] to-[#E51943]", "after:scale-100 after:opacity-100"),
|
|
42718
44155
|
style: {
|
|
42719
|
-
width:
|
|
42720
|
-
height:
|
|
42721
|
-
top:
|
|
42722
|
-
transform: `translateX(${ne -
|
|
44156
|
+
width: o3,
|
|
44157
|
+
height: c3,
|
|
44158
|
+
top: l3,
|
|
44159
|
+
transform: `translateX(${ne - o3 / 2}px)`,
|
|
42723
44160
|
animation: "pong-ai-glow 4s linear infinite",
|
|
42724
44161
|
"--gradient-angle": "0deg"
|
|
42725
44162
|
}
|
|
42726
44163
|
}),
|
|
42727
|
-
/* @__PURE__ */ U(
|
|
42728
|
-
size:
|
|
44164
|
+
/* @__PURE__ */ U(i3, {
|
|
44165
|
+
size: a3,
|
|
42729
44166
|
className: "pointer-events-none absolute z-30",
|
|
42730
44167
|
style: {
|
|
42731
|
-
transform: `translate(${M.x -
|
|
44168
|
+
transform: `translate(${M.x - a3 / 2}px, ${M.y - a3 / 2}px) rotate(${he}rad)`,
|
|
42732
44169
|
opacity: ce === "countdown" ? 0 : 1,
|
|
42733
44170
|
transition: "opacity 0.3s ease-in"
|
|
42734
44171
|
}
|
|
@@ -42737,8 +44174,8 @@ var m4 = ({ onClose: e }) => {
|
|
|
42737
44174
|
className: "absolute rounded border-2 border-solid border-f1-border",
|
|
42738
44175
|
style: {
|
|
42739
44176
|
width: oe,
|
|
42740
|
-
height:
|
|
42741
|
-
bottom:
|
|
44177
|
+
height: c3,
|
|
44178
|
+
bottom: l3,
|
|
42742
44179
|
transform: `translateX(${ee - oe / 2}px)`,
|
|
42743
44180
|
transition: "width 0.3s ease-out"
|
|
42744
44181
|
},
|
|
@@ -42776,7 +44213,7 @@ var m4 = ({ onClose: e }) => {
|
|
|
42776
44213
|
]
|
|
42777
44214
|
}), /* @__PURE__ */ U("div", {
|
|
42778
44215
|
className: "pointer-events-none absolute inset-y-0 right-0 flex flex-col items-center justify-center",
|
|
42779
|
-
style: { width:
|
|
44216
|
+
style: { width: d3 },
|
|
42780
44217
|
children: /* @__PURE__ */ W("div", {
|
|
42781
44218
|
className: "flex flex-col items-center gap-6",
|
|
42782
44219
|
children: [/* @__PURE__ */ U("span", {
|
|
@@ -42799,8 +44236,8 @@ var m4 = ({ onClose: e }) => {
|
|
|
42799
44236
|
]
|
|
42800
44237
|
})]
|
|
42801
44238
|
}), c);
|
|
42802
|
-
},
|
|
42803
|
-
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } =
|
|
44239
|
+
}, D3 = "f0:widget-drag-start", O3 = "f0:widget-drag-end", k3 = ({ isVisible: e, acceptsWidgetDrop: t }) => {
|
|
44240
|
+
let { fileAttachments: n, isClarifying: r, setFileDragOver: i, processDroppedFiles: a, setPendingQuote: o, focusChatInput: s, activeGame: c } = s4(), l = t && c === null && e && !r, u = V(l);
|
|
42804
44241
|
u.current = l;
|
|
42805
44242
|
let d = V(null), f = V(0), p = n?.onUploadFiles != null && !r;
|
|
42806
44243
|
B(() => {
|
|
@@ -42823,8 +44260,8 @@ var m4 = ({ onClose: e }) => {
|
|
|
42823
44260
|
let t = e.detail;
|
|
42824
44261
|
typeof t?.id == "string" && t.id && typeof t.title == "string" && t.title.trim() && x(t);
|
|
42825
44262
|
}, t = () => x(null);
|
|
42826
|
-
return window.addEventListener(
|
|
42827
|
-
window.removeEventListener(
|
|
44263
|
+
return window.addEventListener(D3, e), window.addEventListener(O3, t), () => {
|
|
44264
|
+
window.removeEventListener(D3, e), window.removeEventListener(O3, t);
|
|
42828
44265
|
};
|
|
42829
44266
|
}, [l, x]), B(() => {
|
|
42830
44267
|
l || x(null);
|
|
@@ -42873,26 +44310,52 @@ var m4 = ({ onClose: e }) => {
|
|
|
42873
44310
|
} : void 0
|
|
42874
44311
|
}
|
|
42875
44312
|
};
|
|
42876
|
-
},
|
|
42877
|
-
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } =
|
|
44313
|
+
}, A3 = ({ children: e, visible: t, side: n, exitStyle: r = "shrink", acceptsWidgetDrop: i = !1 }) => {
|
|
44314
|
+
let { open: a, visualizationMode: o, fileDragOver: s, activeGame: c, closeGame: l } = s4(), u = t ?? a, d = o === "canvas", { surfaceRef: f, surfaceProps: p, decorations: m } = k3({
|
|
42878
44315
|
isVisible: u,
|
|
42879
44316
|
acceptsWidgetDrop: i
|
|
42880
44317
|
});
|
|
42881
|
-
return /* @__PURE__ */ U(
|
|
44318
|
+
return /* @__PURE__ */ U(I0, {
|
|
42882
44319
|
visible: t,
|
|
42883
44320
|
side: n,
|
|
42884
44321
|
exitStyle: r,
|
|
42885
44322
|
flushInnerSeam: d,
|
|
42886
44323
|
surfaceRef: f,
|
|
42887
44324
|
surfaceProps: p,
|
|
42888
|
-
decorations: /* @__PURE__ */ W(Wr, { children: [m.canDrop || m.canAcceptWidgetDrop && m.dragQuote !== null ? /* @__PURE__ */ U(
|
|
44325
|
+
decorations: /* @__PURE__ */ W(Wr, { children: [m.canDrop || m.canAcceptWidgetDrop && m.dragQuote !== null ? /* @__PURE__ */ U(r3, {
|
|
42889
44326
|
visible: m.canDrop && s || m.dragQuote !== null,
|
|
42890
44327
|
mode: m.dragQuote === null ? "files" : "discuss",
|
|
42891
44328
|
onFilesDropped: m.onFilesDropped
|
|
42892
|
-
}) : null, c === "pong" ? /* @__PURE__ */ U(
|
|
44329
|
+
}) : null, c === "pong" ? /* @__PURE__ */ U(E3, { onClose: l }) : null] }),
|
|
42893
44330
|
children: e
|
|
42894
44331
|
});
|
|
42895
|
-
},
|
|
44332
|
+
}, j3 = "--f0-ai-composer-overlap", M3 = () => {
|
|
44333
|
+
let [e, t] = H(null), [n, r] = H(null), [i, a] = H(!1), [o, s] = H(!1);
|
|
44334
|
+
return Vr(() => {
|
|
44335
|
+
if (!e || !n) return;
|
|
44336
|
+
let t = -1, r = () => {
|
|
44337
|
+
let r = n.querySelector("[data-composer-layout=\"welcome\"]") !== null, i = r ? 0 : Math.ceil(n.getBoundingClientRect().height);
|
|
44338
|
+
s(r), a(!r && (n.querySelector("[data-composer-layout=\"docked\"]") !== null || i > 0)), i !== t && (t = i, e.style.setProperty(j3, `${i}px`));
|
|
44339
|
+
};
|
|
44340
|
+
if (r(), typeof ResizeObserver > "u") return;
|
|
44341
|
+
let i = new ResizeObserver(r);
|
|
44342
|
+
i.observe(n);
|
|
44343
|
+
let o = new MutationObserver(r);
|
|
44344
|
+
return o.observe(n, {
|
|
44345
|
+
subtree: !0,
|
|
44346
|
+
childList: !0,
|
|
44347
|
+
attributes: !0,
|
|
44348
|
+
attributeFilter: ["data-composer-layout"]
|
|
44349
|
+
}), () => {
|
|
44350
|
+
i.disconnect(), o.disconnect(), e.style.removeProperty(j3);
|
|
44351
|
+
};
|
|
44352
|
+
}, [e, n]), {
|
|
44353
|
+
setShell: t,
|
|
44354
|
+
setComposer: r,
|
|
44355
|
+
floating: i,
|
|
44356
|
+
welcome: o
|
|
44357
|
+
};
|
|
44358
|
+
}, N3 = wr.duration.reveal * 1e3, P3 = ({ enabled: e = !1, side: t, panelContentSide: n, initialMessage: r, chatHeader: i, chatMessages: a, chatInput: o, chatOverlay: s, welcomeScreenSuggestions: c, welcomeScreenCards: l, disclaimer: u, resizable: d = !1, defaultVisualizationMode: f, lockVisualizationMode: p, historyEnabled: m, footer: h, VoiceMode: g, entityRefs: _, canvasActions: v, canvasEntities: y, credits: b, employeeCredits: x, creditWarning: S, fileAttachments: C, filePreviews: w, onTranscribe: T, onThumbsUp: E, onThumbsDown: D, children: O, agent: k, tracking: A }) => /* @__PURE__ */ U(e4, {
|
|
42896
44359
|
enabled: e,
|
|
42897
44360
|
side: t,
|
|
42898
44361
|
panelContentSide: n,
|
|
@@ -42924,10 +44387,10 @@ var m4 = ({ onClose: e }) => {
|
|
|
42924
44387
|
filePreviews: w,
|
|
42925
44388
|
onTranscribe: T,
|
|
42926
44389
|
children: O
|
|
42927
|
-
}),
|
|
42928
|
-
let { enabled: i, open: a, setOpen: o, mode: s, visualizationMode: c, VoiceMode: l, tracking: u, chatHeader: d, chatMessages: f, chatInput: p, chatOverlay: m, panelContent: h, panelSide: g, panelContentSide: _, restoringPanelContentId: v, filePreviews: y } =
|
|
44390
|
+
}), F3 = Ue("F0AiChat", ({ header: e, messages: t, input: n, overlay: r }) => {
|
|
44391
|
+
let { enabled: i, open: a, setOpen: o, mode: s, visualizationMode: c, VoiceMode: l, tracking: u, chatHeader: d, chatMessages: f, chatInput: p, chatOverlay: m, panelContent: h, panelSide: g, panelContentSide: _, restoringPanelContentId: v, filePreviews: y } = s4(), b = He(), x = _ !== g, { motionProps: S } = Y2(a ? c === "fullscreen" ? "fullscreen" : "docked" : "closed", (e, t) => t === "closed" ? 0 : N3), C = O(), w = M3(), T = e ?? d, E = t ?? f, D = n ?? p, k = r ?? m;
|
|
42929
44392
|
if (!i) return null;
|
|
42930
|
-
let { viewKey:
|
|
44393
|
+
let { viewKey: A, viewContent: j } = h && !x ? {
|
|
42931
44394
|
viewKey: `panel:${h.id}`,
|
|
42932
44395
|
viewContent: h.content
|
|
42933
44396
|
} : v && !x ? {
|
|
@@ -42960,29 +44423,37 @@ var m4 = ({ onClose: e }) => {
|
|
|
42960
44423
|
className: "relative flex h-full w-full flex-col",
|
|
42961
44424
|
children: [/* @__PURE__ */ W("div", {
|
|
42962
44425
|
ref: (e) => {
|
|
42963
|
-
|
|
44426
|
+
k ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
42964
44427
|
},
|
|
42965
44428
|
className: "flex min-h-0 flex-1 flex-col",
|
|
42966
|
-
children: [
|
|
42967
|
-
|
|
44429
|
+
children: [T, /* @__PURE__ */ W(De.div, {
|
|
44430
|
+
ref: w.setShell,
|
|
44431
|
+
className: "relative flex min-h-0 flex-1 flex-col",
|
|
42968
44432
|
...S,
|
|
42969
44433
|
children: [/* @__PURE__ */ U("div", {
|
|
42970
|
-
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
42971
|
-
children:
|
|
42972
|
-
}),
|
|
44434
|
+
className: "mb-[calc(-1*var(--f0-ai-composer-overlap,0px))] isolate flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
44435
|
+
children: E
|
|
44436
|
+
}), /* @__PURE__ */ W("div", {
|
|
44437
|
+
ref: w.setComposer,
|
|
44438
|
+
className: F("relative z-10 flex min-h-0 flex-col", w.welcome && "flex-1"),
|
|
44439
|
+
children: [w.floating ? /* @__PURE__ */ U(B$, { tone: "page" }) : null, /* @__PURE__ */ U("div", {
|
|
44440
|
+
className: F("relative flex min-h-0 flex-col", w.welcome && "flex-1", "[&_[data-composer-layout=docked]]:pt-0"),
|
|
44441
|
+
children: D
|
|
44442
|
+
})]
|
|
44443
|
+
})]
|
|
42973
44444
|
})]
|
|
42974
|
-
}),
|
|
44445
|
+
}), k ? /* @__PURE__ */ U("div", {
|
|
42975
44446
|
className: "absolute inset-0 z-30 flex items-center justify-center bg-f1-background-overlay p-4",
|
|
42976
|
-
children:
|
|
44447
|
+
children: k
|
|
42977
44448
|
}) : null]
|
|
42978
44449
|
})
|
|
42979
44450
|
};
|
|
42980
|
-
return /* @__PURE__ */ U(
|
|
44451
|
+
return /* @__PURE__ */ U(Y1, {
|
|
42981
44452
|
filePreviews: y,
|
|
42982
|
-
children: /* @__PURE__ */ U(
|
|
44453
|
+
children: /* @__PURE__ */ U(A3, {
|
|
42983
44454
|
visible: x ? a && !h && !v : void 0,
|
|
42984
44455
|
exitStyle: x && a ? "hold" : "shrink",
|
|
42985
|
-
acceptsWidgetDrop:
|
|
44456
|
+
acceptsWidgetDrop: A === "chat" && !k,
|
|
42986
44457
|
children: /* @__PURE__ */ U(ge, {
|
|
42987
44458
|
initial: !1,
|
|
42988
44459
|
children: /* @__PURE__ */ U(De.div, {
|
|
@@ -42994,28 +44465,28 @@ var m4 = ({ onClose: e }) => {
|
|
|
42994
44465
|
duration: C ? 0 : .15,
|
|
42995
44466
|
ease: "easeOut"
|
|
42996
44467
|
},
|
|
42997
|
-
children:
|
|
42998
|
-
},
|
|
44468
|
+
children: j
|
|
44469
|
+
}, A)
|
|
42999
44470
|
})
|
|
43000
44471
|
})
|
|
43001
44472
|
});
|
|
43002
|
-
}),
|
|
44473
|
+
}), I3 = Ue("F0AiChatProvider", P3), L3 = 31, R3 = async (e) => {
|
|
43003
44474
|
let { default: t } = await import("./browser-Chetd4xB.js");
|
|
43004
44475
|
return t(e.map(({ name: e, rows: t }) => ({
|
|
43005
|
-
sheet: e.slice(0,
|
|
44476
|
+
sheet: e.slice(0, L3),
|
|
43006
44477
|
data: t,
|
|
43007
44478
|
dateFormat: "yyyy-mm-dd"
|
|
43008
44479
|
}))).toBlob();
|
|
43009
|
-
},
|
|
44480
|
+
}, z3 = async (t) => {
|
|
43010
44481
|
let { default: n } = await import("./papaparse.min-BwPbUAd9.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), r = n.unparse(t.map((e) => e.map((e) => e instanceof Date ? e.toISOString() : e)));
|
|
43011
44482
|
return new Blob([r], { type: "text/csv;charset=utf-8;" });
|
|
43012
|
-
},
|
|
44483
|
+
}, B3 = /^-?\d+(\.\d+)?$/, V3 = (e) => Array.from(e.rows, (e) => Array.from(e.cells, (e) => {
|
|
43013
44484
|
let t = e.textContent?.trim() ?? "";
|
|
43014
|
-
return
|
|
43015
|
-
})),
|
|
44485
|
+
return B3.test(t) ? Number(t) : t;
|
|
44486
|
+
})), H3 = (e, t) => {
|
|
43016
44487
|
let n = document.createElement("a");
|
|
43017
44488
|
n.href = URL.createObjectURL(e), n.download = t, n.click(), URL.revokeObjectURL(n.href);
|
|
43018
|
-
},
|
|
44489
|
+
}, U3 = ke({
|
|
43019
44490
|
base: F("inline-flex items-center justify-center rounded-sm text-sm font-medium transition-colors hover:bg-f1-background-secondary hover:text-f1-foreground-secondary disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-f1-background-secondary data-[state=on]:text-f1-foreground", at()),
|
|
43020
44491
|
variants: {
|
|
43021
44492
|
variant: {
|
|
@@ -43032,26 +44503,26 @@ var m4 = ({ onClose: e }) => {
|
|
|
43032
44503
|
variant: "default",
|
|
43033
44504
|
size: "default"
|
|
43034
44505
|
}
|
|
43035
|
-
}),
|
|
44506
|
+
}), W3 = I.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ U(yn, {
|
|
43036
44507
|
ref: i,
|
|
43037
|
-
className: F(
|
|
44508
|
+
className: F(U3({
|
|
43038
44509
|
variant: t,
|
|
43039
44510
|
size: n,
|
|
43040
44511
|
className: e
|
|
43041
44512
|
})),
|
|
43042
44513
|
...r
|
|
43043
44514
|
}));
|
|
43044
|
-
|
|
44515
|
+
W3.displayName = yn.displayName;
|
|
43045
44516
|
//#endregion
|
|
43046
44517
|
//#region src/elements/ToggleGroup/ToggleGroup.tsx
|
|
43047
|
-
var
|
|
44518
|
+
var G3 = I.createContext({
|
|
43048
44519
|
size: "default",
|
|
43049
44520
|
variant: "default"
|
|
43050
|
-
}),
|
|
44521
|
+
}), K3 = I.forwardRef(({ className: e, variant: t, size: n, children: r, ...i }, a) => /* @__PURE__ */ U(wV, {
|
|
43051
44522
|
ref: a,
|
|
43052
44523
|
className: F("flex items-center justify-center gap-1.5", e),
|
|
43053
44524
|
...i,
|
|
43054
|
-
children: /* @__PURE__ */ U(
|
|
44525
|
+
children: /* @__PURE__ */ U(G3.Provider, {
|
|
43055
44526
|
value: {
|
|
43056
44527
|
variant: t,
|
|
43057
44528
|
size: n
|
|
@@ -43059,12 +44530,12 @@ var j4 = I.createContext({
|
|
|
43059
44530
|
children: r
|
|
43060
44531
|
})
|
|
43061
44532
|
}));
|
|
43062
|
-
|
|
43063
|
-
var
|
|
43064
|
-
let o = I.useContext(
|
|
44533
|
+
K3.displayName = wV.displayName;
|
|
44534
|
+
var q3 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i }, a) => {
|
|
44535
|
+
let o = I.useContext(G3);
|
|
43065
44536
|
return /* @__PURE__ */ U(TV, {
|
|
43066
44537
|
ref: a,
|
|
43067
|
-
className: F(
|
|
44538
|
+
className: F(U3({
|
|
43068
44539
|
variant: o.variant || n,
|
|
43069
44540
|
size: o.size || r
|
|
43070
44541
|
}), e),
|
|
@@ -43072,10 +44543,10 @@ var N4 = I.forwardRef(({ className: e, children: t, variant: n, size: r, ...i },
|
|
|
43072
44543
|
children: t
|
|
43073
44544
|
});
|
|
43074
44545
|
});
|
|
43075
|
-
|
|
44546
|
+
q3.displayName = TV.displayName;
|
|
43076
44547
|
//#endregion
|
|
43077
44548
|
//#region src/blocks/Widgets/Content/Weekdays/Weekdays.tsx
|
|
43078
|
-
var
|
|
44549
|
+
var J3 = [
|
|
43079
44550
|
"Monday",
|
|
43080
44551
|
"Tuesday",
|
|
43081
44552
|
"Wednesday",
|
|
@@ -43083,26 +44554,26 @@ var P4 = [
|
|
|
43083
44554
|
"Friday",
|
|
43084
44555
|
"Saturday",
|
|
43085
44556
|
"Sunday"
|
|
43086
|
-
],
|
|
44557
|
+
], Y3 = R(function({ daysOfTheWeek: e = J3, activatedDays: t = [] }, n) {
|
|
43087
44558
|
let r = t.map((t) => `${t}-${e[t]}`);
|
|
43088
|
-
return /* @__PURE__ */ U(
|
|
44559
|
+
return /* @__PURE__ */ U(K3, {
|
|
43089
44560
|
type: "multiple",
|
|
43090
44561
|
value: r,
|
|
43091
44562
|
disabled: !0,
|
|
43092
44563
|
className: "flex justify-start",
|
|
43093
44564
|
ref: n,
|
|
43094
|
-
children: e.map((e, t) => /* @__PURE__ */ U(
|
|
44565
|
+
children: e.map((e, t) => /* @__PURE__ */ U(q3, {
|
|
43095
44566
|
"aria-label": e,
|
|
43096
44567
|
value: `${t}-${e}`,
|
|
43097
44568
|
className: "h-6 w-6 shrink-0 grow-0 basis-6 p-0 text-sm font-medium disabled:select-none disabled:bg-f1-background-tertiary disabled:text-f1-foreground-secondary disabled:opacity-100 disabled:data-[state=on]:border disabled:data-[state=on]:border-solid disabled:data-[state=on]:border-f1-border-selected disabled:data-[state=on]:bg-f1-background-selected disabled:data-[state=on]:text-f1-foreground-selected",
|
|
43098
44569
|
children: e[0]
|
|
43099
44570
|
}, t))
|
|
43100
44571
|
});
|
|
43101
|
-
}),
|
|
44572
|
+
}), X3 = 750, Z3 = ({ text: e, children: t }) => {
|
|
43102
44573
|
let [n, r] = H(!1);
|
|
43103
44574
|
return B(() => {
|
|
43104
44575
|
if (n) {
|
|
43105
|
-
let e = setTimeout(() => r(!1),
|
|
44576
|
+
let e = setTimeout(() => r(!1), X3);
|
|
43106
44577
|
return () => clearTimeout(e);
|
|
43107
44578
|
}
|
|
43108
44579
|
}, [n]), /* @__PURE__ */ W("button", {
|
|
@@ -43166,7 +44637,7 @@ var P4 = [
|
|
|
43166
44637
|
})
|
|
43167
44638
|
})]
|
|
43168
44639
|
});
|
|
43169
|
-
},
|
|
44640
|
+
}, Q3 = Lr(({ children: e, className: t, ...n }) => /* @__PURE__ */ W(Ge, {
|
|
43170
44641
|
...n,
|
|
43171
44642
|
className: F("text-inherit group flex items-center gap-1.5 rounded p-1.5 text-f1-foreground", "no-underline hover:bg-f1-background-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-f1-border-selected-bold active:bg-f1-background-secondary-hover", t),
|
|
43172
44643
|
children: [e, /* @__PURE__ */ U("div", {
|
|
@@ -43178,10 +44649,10 @@ var P4 = [
|
|
|
43178
44649
|
})
|
|
43179
44650
|
})]
|
|
43180
44651
|
}));
|
|
43181
|
-
|
|
44652
|
+
Q3.displayName = "NavigateAction";
|
|
43182
44653
|
//#endregion
|
|
43183
44654
|
//#region src/elements/DataList/actions/OpenLinkAction.tsx
|
|
43184
|
-
var
|
|
44655
|
+
var $3 = Lr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(Ge, {
|
|
43185
44656
|
...r,
|
|
43186
44657
|
target: "_blank",
|
|
43187
44658
|
href: n,
|
|
@@ -43197,15 +44668,15 @@ var z4 = Lr(({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ W(
|
|
|
43197
44668
|
})
|
|
43198
44669
|
})]
|
|
43199
44670
|
}));
|
|
43200
|
-
|
|
44671
|
+
$3.displayName = "OpenLinkAction";
|
|
43201
44672
|
//#endregion
|
|
43202
44673
|
//#region src/elements/DataList/ItemContainer.tsx
|
|
43203
|
-
var
|
|
44674
|
+
var e6 = R((e, t) => {
|
|
43204
44675
|
let { text: n, leftIcon: r, className: i, action: a = { type: "noop" } } = e;
|
|
43205
44676
|
return /* @__PURE__ */ U("li", {
|
|
43206
44677
|
className: "flex rounded font-medium text-f1-foreground *:flex-1",
|
|
43207
44678
|
ref: t,
|
|
43208
|
-
children: /* @__PURE__ */ W(
|
|
44679
|
+
children: /* @__PURE__ */ W(t6, {
|
|
43209
44680
|
action: a,
|
|
43210
44681
|
className: F("flex items-center gap-1.5 p-1.5", i),
|
|
43211
44682
|
children: [r ? typeof r == "function" ? r({}) : /* @__PURE__ */ U(Ae, {
|
|
@@ -43219,21 +44690,21 @@ var B4 = R((e, t) => {
|
|
|
43219
44690
|
})
|
|
43220
44691
|
});
|
|
43221
44692
|
});
|
|
43222
|
-
|
|
43223
|
-
var
|
|
44693
|
+
e6.displayName = "ItemContainer";
|
|
44694
|
+
var t6 = ({ children: e, action: t, ...n }) => {
|
|
43224
44695
|
let r = t.type;
|
|
43225
44696
|
switch (r) {
|
|
43226
|
-
case "copy": return /* @__PURE__ */ U(
|
|
44697
|
+
case "copy": return /* @__PURE__ */ U(Z3, {
|
|
43227
44698
|
...t,
|
|
43228
44699
|
...n,
|
|
43229
44700
|
children: e
|
|
43230
44701
|
});
|
|
43231
|
-
case "navigate": return /* @__PURE__ */ U(
|
|
44702
|
+
case "navigate": return /* @__PURE__ */ U(Q3, {
|
|
43232
44703
|
...t,
|
|
43233
44704
|
...n,
|
|
43234
44705
|
children: e
|
|
43235
44706
|
});
|
|
43236
|
-
case "open-link": return /* @__PURE__ */ U(
|
|
44707
|
+
case "open-link": return /* @__PURE__ */ U($3, {
|
|
43237
44708
|
...t,
|
|
43238
44709
|
...n,
|
|
43239
44710
|
children: e
|
|
@@ -43244,19 +44715,19 @@ var V4 = ({ children: e, action: t, ...n }) => {
|
|
|
43244
44715
|
});
|
|
43245
44716
|
default: return r;
|
|
43246
44717
|
}
|
|
43247
|
-
},
|
|
44718
|
+
}, n6 = (e, t) => e && e.type === "copy" ? {
|
|
43248
44719
|
type: "copy",
|
|
43249
44720
|
text: e.text ?? t
|
|
43250
|
-
} : e,
|
|
44721
|
+
} : e, r6 = R(({ text: e, icon: t, action: n }, r) => /* @__PURE__ */ U(e6, {
|
|
43251
44722
|
ref: r,
|
|
43252
44723
|
text: e,
|
|
43253
44724
|
leftIcon: t,
|
|
43254
|
-
action:
|
|
44725
|
+
action: n6(n, e)
|
|
43255
44726
|
}));
|
|
43256
|
-
|
|
43257
|
-
var
|
|
44727
|
+
r6.displayName = "DataList.Item";
|
|
44728
|
+
var i6 = Ue("DataList.Item", r6), a6 = R(({ action: e, avatarUrl: t, firstName: n, lastName: r }, i) => {
|
|
43258
44729
|
let a = `${n} ${r}`;
|
|
43259
|
-
return /* @__PURE__ */ U(
|
|
44730
|
+
return /* @__PURE__ */ U(e6, {
|
|
43260
44731
|
ref: i,
|
|
43261
44732
|
leftIcon: () => /* @__PURE__ */ U(Lt, {
|
|
43262
44733
|
size: "xs",
|
|
@@ -43265,11 +44736,11 @@ var W4 = Ue("DataList.Item", U4), G4 = R(({ action: e, avatarUrl: t, firstName:
|
|
|
43265
44736
|
lastName: r
|
|
43266
44737
|
}),
|
|
43267
44738
|
text: a,
|
|
43268
|
-
action:
|
|
44739
|
+
action: n6(e, a)
|
|
43269
44740
|
});
|
|
43270
44741
|
});
|
|
43271
|
-
|
|
43272
|
-
var
|
|
44742
|
+
a6.displayName = "PersonItem";
|
|
44743
|
+
var o6 = Ue("PersonItem", a6), s6 = R(({ avatarUrl: e, name: t, action: n }, r) => /* @__PURE__ */ U(e6, {
|
|
43273
44744
|
ref: r,
|
|
43274
44745
|
leftIcon: () => /* @__PURE__ */ U(Ot, {
|
|
43275
44746
|
name: t,
|
|
@@ -43277,62 +44748,62 @@ var K4 = Ue("PersonItem", G4), q4 = R(({ avatarUrl: e, name: t, action: n }, r)
|
|
|
43277
44748
|
src: e
|
|
43278
44749
|
}),
|
|
43279
44750
|
text: t,
|
|
43280
|
-
action:
|
|
44751
|
+
action: n6(n, t)
|
|
43281
44752
|
}));
|
|
43282
|
-
|
|
43283
|
-
var
|
|
44753
|
+
s6.displayName = "CompanyItem";
|
|
44754
|
+
var c6 = Ue("CompanyItem", s6), l6 = R(({ action: e, name: t }, n) => /* @__PURE__ */ U(e6, {
|
|
43284
44755
|
ref: n,
|
|
43285
44756
|
leftIcon: () => /* @__PURE__ */ U(ht, {
|
|
43286
44757
|
name: t,
|
|
43287
44758
|
size: "xs"
|
|
43288
44759
|
}),
|
|
43289
44760
|
text: t,
|
|
43290
|
-
action:
|
|
44761
|
+
action: n6(e, t)
|
|
43291
44762
|
}));
|
|
43292
|
-
|
|
43293
|
-
var
|
|
44763
|
+
l6.displayName = "TeamItem";
|
|
44764
|
+
var u6 = Ue("TeamItem", l6), d6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
43294
44765
|
ref: t,
|
|
43295
44766
|
className: "flex items-start pt-1",
|
|
43296
44767
|
children: /* @__PURE__ */ U(sn, { ...e })
|
|
43297
44768
|
}));
|
|
43298
|
-
|
|
43299
|
-
var
|
|
44769
|
+
d6.displayName = "DotTagItem";
|
|
44770
|
+
var f6 = Ue("DotTagItem", d6), p6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
43300
44771
|
ref: t,
|
|
43301
44772
|
className: "flex items-start pt-1",
|
|
43302
44773
|
children: /* @__PURE__ */ U(cn, { ...e })
|
|
43303
44774
|
}));
|
|
43304
|
-
|
|
43305
|
-
var
|
|
44775
|
+
p6.displayName = "AlertTagItem";
|
|
44776
|
+
var m6 = Ue("AlertTagItem", p6), h6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
43306
44777
|
ref: t,
|
|
43307
44778
|
className: "flex items-start pt-1",
|
|
43308
44779
|
children: /* @__PURE__ */ U(Yt, { ...e })
|
|
43309
44780
|
}));
|
|
43310
|
-
|
|
43311
|
-
var
|
|
44781
|
+
h6.displayName = "BalanceTagItem";
|
|
44782
|
+
var g6 = Ue("BalanceTagItem", h6), _6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
43312
44783
|
ref: t,
|
|
43313
44784
|
className: "flex items-start pt-1",
|
|
43314
44785
|
children: /* @__PURE__ */ U(Wt, { ...e })
|
|
43315
44786
|
}));
|
|
43316
|
-
|
|
43317
|
-
var
|
|
44787
|
+
_6.displayName = "StatusTagItem";
|
|
44788
|
+
var v6 = Ue("StatusTagItem", _6), y6 = R(({ ...e }, t) => /* @__PURE__ */ U("li", {
|
|
43318
44789
|
ref: t,
|
|
43319
44790
|
className: "flex items-start pt-1",
|
|
43320
44791
|
children: /* @__PURE__ */ U(Jn, { ...e })
|
|
43321
44792
|
}));
|
|
43322
|
-
|
|
43323
|
-
var
|
|
44793
|
+
y6.displayName = "RawTagItem";
|
|
44794
|
+
var b6 = Ue("RawTagItem", y6);
|
|
43324
44795
|
//#endregion
|
|
43325
44796
|
//#region src/elements/DataList/items/TagListItem.tsx
|
|
43326
|
-
function
|
|
44797
|
+
function x6(e, t) {
|
|
43327
44798
|
return /* @__PURE__ */ U("li", {
|
|
43328
44799
|
ref: t,
|
|
43329
44800
|
className: "flex items-start pt-1",
|
|
43330
44801
|
children: /* @__PURE__ */ U(rr, { ...e })
|
|
43331
44802
|
});
|
|
43332
44803
|
}
|
|
43333
|
-
var
|
|
43334
|
-
|
|
43335
|
-
var
|
|
44804
|
+
var S6 = R(x6);
|
|
44805
|
+
S6.displayName = "TagListItem";
|
|
44806
|
+
var C6 = Ue("TagListItem", S6), w6 = R(({ children: e, label: t, isHorizontal: n = !1 }, r) => /* @__PURE__ */ W("div", {
|
|
43336
44807
|
className: F(n ? "flex min-h-12 flex-1 flex-col py-1.5 pl-3 pr-1.5 xs:flex-row" : "min-w-32"),
|
|
43337
44808
|
children: [t ? /* @__PURE__ */ U("p", {
|
|
43338
44809
|
className: F("px-1.5 text-f1-foreground-secondary", n ? "mt-2 w-44 xs:px-0" : "mb-0.5"),
|
|
@@ -43343,33 +44814,33 @@ var l3 = Ue("TagListItem", c3), u3 = R(({ children: e, label: t, isHorizontal: n
|
|
|
43343
44814
|
children: e
|
|
43344
44815
|
})]
|
|
43345
44816
|
}));
|
|
43346
|
-
|
|
43347
|
-
var
|
|
43348
|
-
Item:
|
|
43349
|
-
CompanyItem:
|
|
43350
|
-
PersonItem:
|
|
43351
|
-
TeamItem:
|
|
43352
|
-
DotTagItem:
|
|
43353
|
-
AlertTagItem:
|
|
43354
|
-
BalanceTagItem:
|
|
43355
|
-
StatusTagItem:
|
|
43356
|
-
RawTagItem:
|
|
43357
|
-
TagListItem:
|
|
43358
|
-
}),
|
|
44817
|
+
w6.displayName = "DataList";
|
|
44818
|
+
var T6 = Ue("DataList", w6), E6 = Object.assign(T6, {
|
|
44819
|
+
Item: i6,
|
|
44820
|
+
CompanyItem: c6,
|
|
44821
|
+
PersonItem: o6,
|
|
44822
|
+
TeamItem: u6,
|
|
44823
|
+
DotTagItem: f6,
|
|
44824
|
+
AlertTagItem: m6,
|
|
44825
|
+
BalanceTagItem: g6,
|
|
44826
|
+
StatusTagItem: v6,
|
|
44827
|
+
RawTagItem: b6,
|
|
44828
|
+
TagListItem: C6
|
|
44829
|
+
}), D6 = ({ content: e }) => /* @__PURE__ */ W(Wr, { children: [
|
|
43359
44830
|
e.type === "weekdays" ? /* @__PURE__ */ U("li", {
|
|
43360
44831
|
className: "list-none px-1.5 py-1",
|
|
43361
|
-
children: /* @__PURE__ */ U(
|
|
44832
|
+
children: /* @__PURE__ */ U(Y3, { ...e })
|
|
43362
44833
|
}) : null,
|
|
43363
|
-
e.type === "person" ? /* @__PURE__ */ U(
|
|
43364
|
-
e.type === "item" ? /* @__PURE__ */ U(
|
|
43365
|
-
e.type === "team" ? /* @__PURE__ */ U(
|
|
43366
|
-
e.type === "company" ? /* @__PURE__ */ U(
|
|
43367
|
-
e.type === "dot-tag" ? /* @__PURE__ */ U(
|
|
43368
|
-
e.type === "alert-tag" ? /* @__PURE__ */ U(
|
|
43369
|
-
e.type === "balance-tag" ? /* @__PURE__ */ U(
|
|
43370
|
-
e.type === "status-tag" ? /* @__PURE__ */ U(
|
|
43371
|
-
e.type === "raw-tag" ? /* @__PURE__ */ U(
|
|
43372
|
-
e.type === "tag-list" ? /* @__PURE__ */ U(
|
|
44834
|
+
e.type === "person" ? /* @__PURE__ */ U(E6.PersonItem, { ...e }) : null,
|
|
44835
|
+
e.type === "item" ? /* @__PURE__ */ U(E6.Item, { ...e }) : null,
|
|
44836
|
+
e.type === "team" ? /* @__PURE__ */ U(E6.TeamItem, { ...e }) : null,
|
|
44837
|
+
e.type === "company" ? /* @__PURE__ */ U(E6.CompanyItem, { ...e }) : null,
|
|
44838
|
+
e.type === "dot-tag" ? /* @__PURE__ */ U(E6.DotTagItem, { ...e }) : null,
|
|
44839
|
+
e.type === "alert-tag" ? /* @__PURE__ */ U(E6.AlertTagItem, { ...e }) : null,
|
|
44840
|
+
e.type === "balance-tag" ? /* @__PURE__ */ U(E6.BalanceTagItem, { ...e }) : null,
|
|
44841
|
+
e.type === "status-tag" ? /* @__PURE__ */ U(E6.StatusTagItem, { ...e }) : null,
|
|
44842
|
+
e.type === "raw-tag" ? /* @__PURE__ */ U(E6.RawTagItem, { ...e }) : null,
|
|
44843
|
+
e.type === "tag-list" ? /* @__PURE__ */ U(E6.TagListItem, { ...e.tagList }) : null,
|
|
43373
44844
|
e.type === "avatar-list" ? /* @__PURE__ */ U("li", {
|
|
43374
44845
|
className: "list-none px-1.5 py-1",
|
|
43375
44846
|
children: /* @__PURE__ */ U(Dt, { ...e.avatarList })
|
|
@@ -43381,25 +44852,25 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43381
44852
|
children: /* @__PURE__ */ U(D$, { ...n })
|
|
43382
44853
|
});
|
|
43383
44854
|
})() : null
|
|
43384
|
-
] }),
|
|
44855
|
+
] }), O6 = R(function({ title: e, content: t, isHorizontal: n = !1, verticalLayout: r = !1, spacingAtTheBottom: i }, a) {
|
|
43385
44856
|
let o = Array.isArray(t) ? t : [t];
|
|
43386
44857
|
return /* @__PURE__ */ U("div", {
|
|
43387
44858
|
ref: a,
|
|
43388
44859
|
className: F("flex flex-col gap-0.5", i && !n && "pb-3", n && !r && "xs:[&_ul>li]:p-0 [&_ul]:flex-1", n && r && "[&_ul>li>*]:px-0 [&_ul]:flex-1 xs:[&>div]:flex-col"),
|
|
43389
|
-
children: /* @__PURE__ */ U(
|
|
44860
|
+
children: /* @__PURE__ */ U(E6, {
|
|
43390
44861
|
label: e,
|
|
43391
44862
|
isHorizontal: n,
|
|
43392
|
-
children: o.map((e, t) => /* @__PURE__ */ U(
|
|
44863
|
+
children: o.map((e, t) => /* @__PURE__ */ U(D6, { content: e }, t))
|
|
43393
44864
|
})
|
|
43394
44865
|
});
|
|
43395
|
-
}),
|
|
44866
|
+
}), k6 = be(Ue("DetailsItem", O6)), A6 = ({ onClick: e }) => {
|
|
43396
44867
|
let t = He();
|
|
43397
44868
|
return /* @__PURE__ */ U(xe, {
|
|
43398
44869
|
label: t.actions.seeMore,
|
|
43399
44870
|
onClick: e,
|
|
43400
44871
|
variant: "neutral"
|
|
43401
44872
|
});
|
|
43402
|
-
},
|
|
44873
|
+
}, j6 = R(function({ title: e, tableView: t = !1, details: n, dataTestId: r, showSeeMore: i, onClickSeeMore: a }, o) {
|
|
43403
44874
|
return /* @__PURE__ */ U(je, {
|
|
43404
44875
|
dataTestId: r,
|
|
43405
44876
|
children: /* @__PURE__ */ W("div", {
|
|
@@ -43412,7 +44883,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43412
44883
|
}) : null,
|
|
43413
44884
|
/* @__PURE__ */ U("div", {
|
|
43414
44885
|
className: F("flex flex-col", t ? "rounded-md border border-solid border-f1-border-secondary" : "gap-3"),
|
|
43415
|
-
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(
|
|
44886
|
+
children: n?.map((e, r) => /* @__PURE__ */ W(L.Fragment, { children: [/* @__PURE__ */ U(k6, {
|
|
43416
44887
|
title: e.title,
|
|
43417
44888
|
content: e.content,
|
|
43418
44889
|
spacingAtTheBottom: e.spacingAtTheBottom,
|
|
@@ -43420,13 +44891,13 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43420
44891
|
verticalLayout: e.verticalLayout
|
|
43421
44892
|
}, e.title), t && r !== n.length - 1 ? /* @__PURE__ */ U("div", { className: "h-[1px] w-full bg-f1-border-secondary" }) : null] }, e.title))
|
|
43422
44893
|
}),
|
|
43423
|
-
i ? /* @__PURE__ */ U(
|
|
44894
|
+
i ? /* @__PURE__ */ U(A6, { onClick: a }) : null
|
|
43424
44895
|
]
|
|
43425
44896
|
})
|
|
43426
44897
|
});
|
|
43427
|
-
}),
|
|
43428
|
-
let { reducedMotion: f } =
|
|
43429
|
-
return
|
|
44898
|
+
}), M6 = Ue("DetailsItemsList", j6), N6 = ({ image: e, aspectRatio: t, spanFull: n, inset: r, surfaceClassName: i, label: a, onOpen: o, overlay: s, eager: c = !0, onImageError: l, testIdPrefix: u = "chat", preventDrag: d = !1 }) => {
|
|
44899
|
+
let { reducedMotion: f } = q$(), [p, m] = H(!1), h = a1(e.thumbnailUrl ?? e.url);
|
|
44900
|
+
return o1(h.status, l), /* @__PURE__ */ W("button", {
|
|
43430
44901
|
type: "button",
|
|
43431
44902
|
onClick: o,
|
|
43432
44903
|
style: { aspectRatio: t },
|
|
@@ -43442,7 +44913,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43442
44913
|
className: "pointer-events-none absolute inset-0 h-full w-full scale-105 object-cover blur-md",
|
|
43443
44914
|
"data-testid": `${u}-image-blur`
|
|
43444
44915
|
}) : null,
|
|
43445
|
-
h.status === "ready" ? /* @__PURE__ */ U(
|
|
44916
|
+
h.status === "ready" ? /* @__PURE__ */ U(S1, {
|
|
43446
44917
|
src: h.url,
|
|
43447
44918
|
alt: e.name,
|
|
43448
44919
|
eager: c,
|
|
@@ -43458,8 +44929,8 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43458
44929
|
s
|
|
43459
44930
|
]
|
|
43460
44931
|
});
|
|
43461
|
-
},
|
|
43462
|
-
let s = He(), { urlCache: c } =
|
|
44932
|
+
}, P6 = "w-[24rem] max-w-full", F6 = "w-[32rem] max-w-full", I6 = "gap-0.5", L6 = "pointer-events-none absolute inset-x-0 bottom-0 h-[46%] bg-[linear-gradient(to_top,rgba(0,0,0,0.5),rgba(0,0,0,0.18)_45%,transparent)]", R6 = "bg-[hsl(222_31%_11%)]", z6 = "bg-[hsl(220_39%_6%/0.72)]", B6 = "bg-[hsl(220_39%_6%/0.6)]", V6 = "bg-[hsl(220_39%_6%/0.55)]", H6 = Ir(() => import("./F0VideoPlayer-DEpDxvjC.js").then((e) => ({ default: e.F0VideoPlayer }))), U6 = ({ file: e, cornerClass: t, className: n, surfaceClassName: r, meta: i, onDownloaded: a, testIdPrefix: o = "chat" }) => {
|
|
44933
|
+
let s = He(), { urlCache: c } = q$(), l = s1(), [u, d] = H(!1), [f, p] = H(!1), m = c !== null && !U$(e.url), [h, g] = H(!1), _ = a1(e.url, { enabled: !m || h }), v = a1(e.thumbnailUrl), y = v.status === "ready" ? v.url : void 0, b = e.size == null ? null : E1(e.size), x = {
|
|
43463
44934
|
label: s.t("chat.downloadNamedFile", { name: e.name }),
|
|
43464
44935
|
icon: Ka,
|
|
43465
44936
|
onClick: () => {
|
|
@@ -43469,7 +44940,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43469
44940
|
return /* @__PURE__ */ W("figure", {
|
|
43470
44941
|
"aria-label": e.name,
|
|
43471
44942
|
"aria-busy": !f && !S || void 0,
|
|
43472
|
-
className: F("group/video relative m-0 aspect-video max-w-full overflow-hidden",
|
|
44943
|
+
className: F("group/video relative m-0 aspect-video max-w-full overflow-hidden", P6, R6, t, n),
|
|
43473
44944
|
onErrorCapture: (e) => {
|
|
43474
44945
|
e.target instanceof HTMLVideoElement && d(!0);
|
|
43475
44946
|
},
|
|
@@ -43499,7 +44970,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43499
44970
|
"aria-hidden": f ? !0 : void 0,
|
|
43500
44971
|
"data-testid": `${o}-video-placeholder`,
|
|
43501
44972
|
children: [
|
|
43502
|
-
/* @__PURE__ */ U(
|
|
44973
|
+
/* @__PURE__ */ U(W6, {
|
|
43503
44974
|
name: e.name,
|
|
43504
44975
|
poster: y,
|
|
43505
44976
|
announce: !f,
|
|
@@ -43507,11 +44978,11 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43507
44978
|
}),
|
|
43508
44979
|
/* @__PURE__ */ U("span", { className: "absolute inset-0 bg-[hsl(0_0%_0%/0.2)]" }),
|
|
43509
44980
|
/* @__PURE__ */ U("span", {
|
|
43510
|
-
className: F("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse",
|
|
44981
|
+
className: F("absolute left-1/2 top-1/2 flex size-14 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full text-f1-foreground-inverse", z6),
|
|
43511
44982
|
children: /* @__PURE__ */ U(kc, { className: "size-6" })
|
|
43512
44983
|
}),
|
|
43513
44984
|
b ? /* @__PURE__ */ U("span", {
|
|
43514
|
-
className: F("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse",
|
|
44985
|
+
className: F("absolute bottom-2 left-2 rounded-full px-2 py-0.5 text-sm font-medium text-f1-foreground-inverse", B6),
|
|
43515
44986
|
"data-testid": `${o}-video-size`,
|
|
43516
44987
|
children: b
|
|
43517
44988
|
}) : null
|
|
@@ -43529,7 +45000,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43529
45000
|
"data-testid": `${o}-video-player-shell`,
|
|
43530
45001
|
children: /* @__PURE__ */ U(jr, {
|
|
43531
45002
|
fallback: null,
|
|
43532
|
-
children: _.status === "ready" ? /* @__PURE__ */ U(
|
|
45003
|
+
children: _.status === "ready" ? /* @__PURE__ */ U(H6, {
|
|
43533
45004
|
src: _.url,
|
|
43534
45005
|
ariaLabel: s.t("chat.videoPlayerLabel", { name: e.name }),
|
|
43535
45006
|
poster: y,
|
|
@@ -43555,25 +45026,25 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43555
45026
|
})
|
|
43556
45027
|
]
|
|
43557
45028
|
});
|
|
43558
|
-
},
|
|
45029
|
+
}, W6 = ({ name: e, poster: t, announce: n = !0, surfaceClassName: r }) => {
|
|
43559
45030
|
let i = He();
|
|
43560
45031
|
return /* @__PURE__ */ U("div", {
|
|
43561
45032
|
role: n ? "status" : void 0,
|
|
43562
45033
|
"aria-label": n ? i.t("chat.loadingVideo", { name: e }) : void 0,
|
|
43563
45034
|
"aria-hidden": !n || void 0,
|
|
43564
45035
|
className: "relative h-full w-full",
|
|
43565
|
-
children: t ? /* @__PURE__ */ U(
|
|
45036
|
+
children: t ? /* @__PURE__ */ U(S1, {
|
|
43566
45037
|
src: t,
|
|
43567
45038
|
alt: "",
|
|
43568
45039
|
"aria-hidden": "true",
|
|
43569
45040
|
className: "h-full w-full object-contain"
|
|
43570
45041
|
}) : /* @__PURE__ */ U(Ie, { className: F("h-full w-full", n ? "motion-reduce:animate-none" : "animate-none", r) })
|
|
43571
45042
|
});
|
|
43572
|
-
},
|
|
43573
|
-
let t =
|
|
45043
|
+
}, G6 = /* @__PURE__ */ new Map(), K6 = /* @__PURE__ */ new Set(), q6 = /* @__PURE__ */ new Map(), J6 = (e) => G6.get(e) ?? (K6.has(e) ? null : void 0), Y6 = (e) => {
|
|
45044
|
+
let t = G6.get(e);
|
|
43574
45045
|
if (t) return Promise.resolve(t);
|
|
43575
|
-
if (
|
|
43576
|
-
let n =
|
|
45046
|
+
if (K6.has(e)) return Promise.resolve(null);
|
|
45047
|
+
let n = q6.get(e);
|
|
43577
45048
|
if (n) return n;
|
|
43578
45049
|
if (typeof Image > "u") return Promise.resolve(null);
|
|
43579
45050
|
let r = new Promise((t) => {
|
|
@@ -43583,20 +45054,20 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43583
45054
|
width: n.naturalWidth,
|
|
43584
45055
|
height: n.naturalHeight
|
|
43585
45056
|
};
|
|
43586
|
-
r.width > 0 && r.height > 0 ? (
|
|
45057
|
+
r.width > 0 && r.height > 0 ? (G6.set(e, r), t(r)) : (K6.add(e), t(null));
|
|
43587
45058
|
}, n.onerror = () => {
|
|
43588
|
-
|
|
45059
|
+
K6.add(e), t(null);
|
|
43589
45060
|
}, n.src = e;
|
|
43590
45061
|
}).finally(() => {
|
|
43591
|
-
|
|
45062
|
+
q6.delete(e);
|
|
43592
45063
|
});
|
|
43593
|
-
return
|
|
43594
|
-
},
|
|
45064
|
+
return q6.set(e, r), r;
|
|
45065
|
+
}, X6 = (e, t) => {
|
|
43595
45066
|
let n = t?.width, r = t?.height, i = !!(n && r), [, a] = H(null);
|
|
43596
45067
|
return B(() => {
|
|
43597
45068
|
if (!e || i) return;
|
|
43598
45069
|
let t = !1;
|
|
43599
|
-
return
|
|
45070
|
+
return Y6(e).then((n) => {
|
|
43600
45071
|
t || a({
|
|
43601
45072
|
src: e,
|
|
43602
45073
|
size: n
|
|
@@ -43607,8 +45078,8 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43607
45078
|
}, [e, i]), n && r ? {
|
|
43608
45079
|
width: n,
|
|
43609
45080
|
height: r
|
|
43610
|
-
} : e ?
|
|
43611
|
-
},
|
|
45081
|
+
} : e ? J6(e) : void 0;
|
|
45082
|
+
}, Z6 = 1.3, Q6 = .6, $6 = (e, t) => {
|
|
43612
45083
|
if (!e || !t) return null;
|
|
43613
45084
|
let n = Math.min(e, 384), r = n * t / e;
|
|
43614
45085
|
r > 512 && (r = 512, n = r * e / t);
|
|
@@ -43619,10 +45090,10 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43619
45090
|
scaleX: Math.min(1, n / i),
|
|
43620
45091
|
scaleY: Math.min(1, r / a)
|
|
43621
45092
|
};
|
|
43622
|
-
},
|
|
45093
|
+
}, e8 = (e) => {
|
|
43623
45094
|
if (e.length === 0) return [];
|
|
43624
45095
|
if (e.length === 1) {
|
|
43625
|
-
let t =
|
|
45096
|
+
let t = $6(e[0]?.width, e[0]?.height), n = t ? t.scaleX < 1 || t.scaleY < 1 : !1;
|
|
43626
45097
|
return [{
|
|
43627
45098
|
index: 0,
|
|
43628
45099
|
span: 2,
|
|
@@ -43637,14 +45108,14 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43637
45108
|
if (e.length === 2) return e.map((e, t) => ({
|
|
43638
45109
|
index: t,
|
|
43639
45110
|
span: 1,
|
|
43640
|
-
aspectRatio: 1 /
|
|
45111
|
+
aspectRatio: 1 / Z6,
|
|
43641
45112
|
hiddenCount: 0
|
|
43642
45113
|
}));
|
|
43643
45114
|
if (e.length === 3) return [
|
|
43644
45115
|
{
|
|
43645
45116
|
index: 0,
|
|
43646
45117
|
span: 2,
|
|
43647
|
-
aspectRatio: 1 /
|
|
45118
|
+
aspectRatio: 1 / Q6,
|
|
43648
45119
|
hiddenCount: 0
|
|
43649
45120
|
},
|
|
43650
45121
|
{
|
|
@@ -43667,7 +45138,7 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43667
45138
|
aspectRatio: 1,
|
|
43668
45139
|
hiddenCount: n === 3 ? t : 0
|
|
43669
45140
|
}));
|
|
43670
|
-
},
|
|
45141
|
+
}, t8 = ({ position: e }) => /* @__PURE__ */ U(De.div, {
|
|
43671
45142
|
transition: {
|
|
43672
45143
|
duration: .2,
|
|
43673
45144
|
ease: "easeOut"
|
|
@@ -43686,8 +45157,8 @@ var d3 = Ue("DataList", u3), f3 = Object.assign(d3, {
|
|
|
43686
45157
|
});
|
|
43687
45158
|
//#endregion
|
|
43688
45159
|
//#region src/addons/ai/ai/F0AiChat/providers/useAiChatToggle.ts
|
|
43689
|
-
function
|
|
43690
|
-
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } =
|
|
45160
|
+
function n8() {
|
|
45161
|
+
let { enabled: e, open: t, setOpen: n, panelContent: r, clearPanelContent: i, restoringPanelContentId: a } = s4();
|
|
43691
45162
|
return {
|
|
43692
45163
|
enabled: e,
|
|
43693
45164
|
open: t && !r && !a,
|
|
@@ -43698,8 +45169,8 @@ function H3() {
|
|
|
43698
45169
|
}
|
|
43699
45170
|
//#endregion
|
|
43700
45171
|
//#region src/addons/ai/ai/F0OneSwitch/F0OneSwitch.tsx
|
|
43701
|
-
var
|
|
43702
|
-
let c =
|
|
45172
|
+
var r8 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !1, onToggle: a, checked: o, onCheckedChange: s }) => {
|
|
45173
|
+
let c = n8(), l = He(), u = s !== void 0, d = u ? !0 : c.enabled, f = u ? !!o : c.open, p = u ? s : c.setOpen, [m, h] = H(!1), [g, _] = H(!1), [v, y] = H(i), b = t && r?.whenDisabled ? r?.whenDisabled : r?.whenEnabled ?? l.ai.welcome, x = i ? v : g;
|
|
43703
45174
|
return B(() => {
|
|
43704
45175
|
i && y(!0);
|
|
43705
45176
|
}, [i]), B(() => {
|
|
@@ -43748,7 +45219,7 @@ var U3 = ({ className: e, disabled: t, onVisible: n, tooltip: r, autoOpen: i = !
|
|
|
43748
45219
|
};
|
|
43749
45220
|
//#endregion
|
|
43750
45221
|
//#region src/addons/ai/ai/F0CanvasPanel/F0CanvasPanel.tsx
|
|
43751
|
-
function
|
|
45222
|
+
function i8({ content: e, onClose: t, entities: n, side: r = "right" }) {
|
|
43752
45223
|
let i = r === "left", a = e?.coversChat === !0, o = O(), [s, c] = H(0), l = V(e);
|
|
43753
45224
|
B(() => {
|
|
43754
45225
|
e && l.current && e !== l.current && c((e) => e + 1), l.current = e;
|
|
@@ -43808,6 +45279,6 @@ function W3({ content: e, onClose: t, entities: n, side: r = "right" }) {
|
|
|
43808
45279
|
})
|
|
43809
45280
|
}) : null });
|
|
43810
45281
|
}
|
|
43811
|
-
|
|
45282
|
+
i8.displayName = "F0CanvasPanel";
|
|
43812
45283
|
//#endregion
|
|
43813
|
-
export {
|
|
45284
|
+
export { e0 as $, Kc as $a, Gf as $i, mG as $n, Ko as $o, MR as $r, Mi as $s, UX as $t, i3 as A, _l as Aa, PT as Ai, yq as An, Rs as Ao, SH as Ar, Fa as As, O$ as At, J2 as B, pl as Ba, Ov as Bi, $K as Bn, vs as Bo, tH as Br, fa as Bs, gQ as Bt, V3 as C, Tu as Ca, FD as Ci, dJ as Cn, Xs as Co, BH as Cr, Ya as Cs, n1 as Ct, O3 as D, Vl as Da, ME as Di, jq as Dn, Vs as Do, MH as Dr, Ga as Ds, R$ as Dt, I3 as E, xu as Ea, rD as Ei, Kq as En, Ws as Eo, NH as Er, Ka as Es, B$ as Et, S4 as F, bl as Fa, nx as Fi, pq as Fn, js as Fo, mH as Fr, ya as Fs, AQ as Ft, G0 as G, nl as Ga, Lh as Gi, nq as Gn, cs as Go, DV as Gr, ta as Gs, nZ as Gt, x2 as H, al as Ha, v_ as Hi, QK as Hn, gs as Ho, BV as Hr, ua as Hs, hQ as Ht, l4 as I, yl as Ia, $y as Ii, dq as In, ks as Io, lH as Ir, va as Is, wQ as It, A0 as J, Qc as Ja, Ep as Ji, bG as Jn, rs as Jo, VB as Jr, Wi as Js, sZ as Jt, I0 as K, tl as Ka, Up as Ki, Y as Kn, ss as Ko, pV as Kr, $i as Ks, rZ as Kt, c4 as L, gl as La, Yv as Li, mq as Ln, Ds as Lo, aH as Lr, ha as Ls, jQ as Lt, n3 as M, Cl as Ma, Lx as Mi, hq as Mn, Ps as Mo, bH as Mr, Ea as Ms, x$ as Mt, k4 as N, wl as Na, jx as Ni, lq as Nn, Ns as No, yH as Nr, Ca as Ns, y$ as Nt, D3 as O, Bl as Oa, LT as Oi, zq as On, Bs as Oo, kH as Or, Ra as Os, F$ as Ot, E4 as P, vl as Pa, Ex as Pi, fq as Pn, Ms as Po, _H as Pr, ba as Ps, FQ as Pt, y0 as Q, qc as Qa, Xf as Qi, hG as Qn, Yo as Qo, YR as Qr, Ni as Qs, ZX as Qt, s4 as R, ml as Ra, Jv as Ri, tq as Rn, xs as Ro, rH as Rr, ma as Rs, mQ as Rt, H3 as S, Ld as Sa, JD as Si, pJ as Sn, $s as So, zH as Sr, Qa as Ss, a1 as St, F3 as T, wu as Ta, CD as Ti, uJ as Tn, Gs as To, jH as Tr, qa as Ts, U$ as Tt, f2 as U, il as Ua, Xg as Ui, iq as Un, ms as Uo, HV as Ur, la as Us, vQ as Ut, S2 as V, ul as Va, lv as Vi, eq as Vn, _s as Vo, eH as Vr, da as Vs, fQ as Vt, c2 as W, rl as Wa, gg as Wi, ZK as Wn, us as Wo, VV as Wr, sa as Ws, pQ as Wt, b0 as X, Xc as Xa, wp as Xi, dG as Xn, Qo as Xo, FB as Xr, Ri as Xs, eZ as Xt, k0 as Y, Zc as Ya, yp as Yi, fG as Yn, es as Yo, IB as Yr, zi as Ys, $X as Yt, v0 as Z, Jc as Za, cp as Zi, _G as Zn, Xo as Zo, fz as Zr, Li as Zs, aZ as Zt, k6 as _, Hd as _a, ZO as _i, wJ as _n, lc as _o, ZH as _r, io as _s, c1 as _t, $6 as a, Of as aa, Ti as ac, fI as ai, BX as an, Lc as ao, HW as ar, Do as as, z1 as at, q3 as b, Rd as ba, OO as bi, vJ as bn, ac as bo, GH as br, eo as bs, s1 as bt, Y6 as c, cf as ca, EF as ci, MX as cn, Ac as co, AU as cr, So as cs, W1 as ct, V6 as d, pf as da, QM as di, FY as dn, Dc as do, wU as dr, go as ds, M1 as dt, Jf as ea, ji as ec, lR as ei, QX as en, Gc as eo, gG as er, Uo as es, Y1 as et, L6 as f, sf as fa, FM as fi, AY as fn, Sc as fo, uU as fr, ho as fs, w1 as ft, M6 as g, $d as ga, ek as gi, TJ as gn, uc as go, QH as gr, ao as gs, l1 as gt, N6 as h, tf as ha, bk as hi, DJ as hn, hc as ho, tU as hr, oo as hs, g1 as ht, e8 as i, kf as ia, Di as ic, pI as ii, YX as in, Rc as io, tG as ir, Po as is, E1 as it, r3 as j, Tl as ja, Rx as ji, gq as jn, Fs as jo, xH as jr, Da as js, S$ as jt, E3 as k, zl as ka, FT as ki, Bq as kn, zs as ko, OH as kr, La as ks, D$ as kt, U6 as l, lf as la, qN as li, jX as ln, kc as lo, EU as lr, xo as ls, G1 as lt, P6 as m, nf as ma, Xk as mi, EJ as mn, gc as mo, aU as mr, co as ms, v1 as mt, r8 as n, Bf as na, ki as nc, cI as ni, JX as nn, Uc as no, lG as nr, Bo as ns, R1 as nt, X6 as o, gf as oa, wi as oc, lI as oi, zX as on, Ic as oo, WW as or, Eo as os, V1 as ot, F6 as p, of as pa, oA as pi, iY as pn, xc as po, iU as pr, fo as ps, S1 as pt, D0 as q, el as qa, Vp as qi, yG as qn, os as qo, SV as qr, Ki as qs, iZ as qt, t8 as r, Wf as ra, Oi as rc, mI as ri, XX as rn, Bc as ro, cG as rr, Io as rs, A1 as rt, J6 as s, mf as sa, qr as sc, IF as si, qX as sn, Fc as so, UW as sr, To as ss, D1 as st, i8 as t, G as ta, Ai as tc, BL as ti, VX as tn, Wc as to, uG as tr, Ho as ts, J1 as tt, I6 as u, ff as ua, eN as ui, PY as un, Oc as uo, jU as ur, _o as us, H1 as ut, Y3 as v, Zd as va, SO as vi, CJ as vn, sc as vo, KH as vr, no as vs, f1 as vt, R3 as w, Du as wa, ID as wi, lJ as wn, Js as wo, IH as wr, Ja as ws, K$ as wt, z3 as x, Bd as xa, bO as xi, mJ as xn, rc as xo, HH as xr, $a as xs, o1 as xt, K3 as y, Pd as ya, xO as yi, yJ as yn, oc as yo, WH as yr, to as ys, u1 as yt, Y2 as z, fl as za, Pv as zi, rq as zn, ys as zo, iH as zr, pa as zs, _Q as zt };
|