@ynput/ayon-frontend-shared 0.7.5 → 0.7.6
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/DetailsPanel.es.js +376 -380
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +26 -26
- package/dist/ProjectTreeTable.es.js +2521 -2510
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +32 -32
- package/dist/Views.es.js +1 -1
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityPickerDialog.es.js +481 -460
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +11 -10
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +250 -247
- package/dist/chunks/MetaWidget.es.js +2 -2
- package/dist/chunks/PlayableIcon.es.js +368 -368
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
- package/dist/chunks/SimpleTable.es.js +301 -296
- package/dist/chunks/Slicer.es.js +418 -410
- package/dist/chunks/TableExportContextInstance.es.js +428 -382
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/components.es.js +1404 -1274
- package/dist/context.es.js +559 -657
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/EntityPickerDialog.d.ts +45 -2
- package/dist/types/ProjectTreeTable.d.ts +119 -17
- package/dist/types/components.d.ts +210 -23
- package/dist/types/context.d.ts +8 -0
- package/package.json +3 -3
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
|
@@ -64,7 +64,7 @@ import { createPortal as fe } from "react-dom";
|
|
|
64
64
|
import { bj as lr } from "./getUris.es.js";
|
|
65
65
|
import "@module-federation/enhanced/runtime";
|
|
66
66
|
import "@ynput/ayon-addon/host";
|
|
67
|
-
import { d as cr,
|
|
67
|
+
import { d as cr, N as dr } from "./TableExportContextInstance.es.js";
|
|
68
68
|
import "semver";
|
|
69
69
|
import "./ContextMenuContextInstance.es.js";
|
|
70
70
|
import "react-redux";
|
|
@@ -72,7 +72,8 @@ import "react-router-dom";
|
|
|
72
72
|
import { $setBlocksType as Me } from "@lexical/selection";
|
|
73
73
|
import { PrismTokenizer as ur, registerCodeHighlighting as mr } from "@lexical/code-prism";
|
|
74
74
|
import { $getClipboardDataFromSelection as pr, copyToClipboard as gr } from "@lexical/clipboard";
|
|
75
|
-
|
|
75
|
+
import { entityUrl as hr } from "@ynput/ayon-addon";
|
|
76
|
+
const fr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */ l(
|
|
76
77
|
Tt,
|
|
77
78
|
{
|
|
78
79
|
name: t,
|
|
@@ -80,16 +81,16 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
80
81
|
src: `/api/users/${t}/avatar?key=${n || ""}`,
|
|
81
82
|
...o
|
|
82
83
|
}
|
|
83
|
-
) : /* @__PURE__ */ l(Tt, { name: "", className: P(o.className, "loading"), ...o }),
|
|
84
|
+
) : /* @__PURE__ */ l(Tt, { name: "", className: P(o.className, "loading"), ...o }), Kl = (t, e) => {
|
|
84
85
|
const n = new Date(t.getTime() + t.getTimezoneOffset() * 6e4);
|
|
85
86
|
return Bn(n, e);
|
|
86
|
-
}, ae = "block-dialog-close",
|
|
87
|
+
}, ae = "block-dialog-close", br = w.div`
|
|
87
88
|
position: fixed;
|
|
88
89
|
z-index: 310;
|
|
89
90
|
overflow: hidden;
|
|
90
91
|
display: flex;
|
|
91
92
|
flex-direction: column;
|
|
92
|
-
`,
|
|
93
|
+
`, Ul = ({
|
|
93
94
|
isEditing: t,
|
|
94
95
|
anchorId: e,
|
|
95
96
|
containerClassName: n = "table-container",
|
|
@@ -155,7 +156,7 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
155
156
|
};
|
|
156
157
|
return t ? fe(
|
|
157
158
|
/* @__PURE__ */ l(
|
|
158
|
-
|
|
159
|
+
br,
|
|
159
160
|
{
|
|
160
161
|
ref: s,
|
|
161
162
|
style: {
|
|
@@ -203,14 +204,14 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
203
204
|
{ value: "vex", label: "VEX" },
|
|
204
205
|
{ value: "xml", label: "XML" },
|
|
205
206
|
{ value: "yaml", label: "YAML" }
|
|
206
|
-
],
|
|
207
|
+
], yr = (t) => Re.find((e) => e.value === (t || ""))?.label || t || "", vr = (t) => {
|
|
207
208
|
if (!t) return;
|
|
208
209
|
const e = mn.languages[t.toLowerCase()];
|
|
209
210
|
return typeof e == "object" ? e : void 0;
|
|
210
|
-
},
|
|
211
|
-
const n =
|
|
211
|
+
}, xr = (t, e) => {
|
|
212
|
+
const n = vr(e);
|
|
212
213
|
return !n || !e ? null : mn.highlight(t, n, e.toLowerCase());
|
|
213
|
-
},
|
|
214
|
+
}, kr = [
|
|
214
215
|
"atrule",
|
|
215
216
|
"attr",
|
|
216
217
|
"attr-name",
|
|
@@ -243,9 +244,9 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
243
244
|
"tag",
|
|
244
245
|
"url",
|
|
245
246
|
"variable"
|
|
246
|
-
],
|
|
247
|
-
|
|
248
|
-
),
|
|
247
|
+
], wr = Object.fromEntries(
|
|
248
|
+
kr.map((t) => [t, `token ${t}`])
|
|
249
|
+
), _r = {
|
|
249
250
|
paragraph: "md-paragraph",
|
|
250
251
|
heading: {
|
|
251
252
|
h1: "md-heading md-h1",
|
|
@@ -261,7 +262,7 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
261
262
|
link: "md-link",
|
|
262
263
|
code: "md-code-block",
|
|
263
264
|
// prism token types -> `token <type>` classes, coloured by codeTokenStyles
|
|
264
|
-
codeHighlight:
|
|
265
|
+
codeHighlight: wr,
|
|
265
266
|
list: {
|
|
266
267
|
ul: "md-list md-list-ul",
|
|
267
268
|
ol: "md-list md-list-ol",
|
|
@@ -289,12 +290,12 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
289
290
|
"representation",
|
|
290
291
|
"workfile",
|
|
291
292
|
"product"
|
|
292
|
-
],
|
|
293
|
+
], Er = {
|
|
293
294
|
user: "@",
|
|
294
295
|
team: "@",
|
|
295
296
|
version: "@@",
|
|
296
297
|
task: "@@@"
|
|
297
|
-
},
|
|
298
|
+
}, Cr = (t) => Er[t] ?? "@", Tr = [
|
|
298
299
|
"bold",
|
|
299
300
|
"italic",
|
|
300
301
|
"strikethrough",
|
|
@@ -305,7 +306,7 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
305
306
|
"numberList",
|
|
306
307
|
"bulletList",
|
|
307
308
|
"checkList"
|
|
308
|
-
],
|
|
309
|
+
], Hl = [
|
|
309
310
|
"h1",
|
|
310
311
|
"h2",
|
|
311
312
|
"h3",
|
|
@@ -320,7 +321,7 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
320
321
|
"|",
|
|
321
322
|
"numberList",
|
|
322
323
|
"bulletList"
|
|
323
|
-
],
|
|
324
|
+
], Lr = [
|
|
324
325
|
"bold",
|
|
325
326
|
"italic",
|
|
326
327
|
"strikethrough",
|
|
@@ -339,7 +340,7 @@ const hr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
339
340
|
} catch {
|
|
340
341
|
}
|
|
341
342
|
return { type: o, id: r };
|
|
342
|
-
},
|
|
343
|
+
}, Mr = (t) => {
|
|
343
344
|
const e = t.getAttribute("data-mention-value") || t.getAttribute("data-value") || t.getAttribute("href"), n = ft(e);
|
|
344
345
|
if (!n) return null;
|
|
345
346
|
const o = ue(
|
|
@@ -397,7 +398,7 @@ class be extends st {
|
|
|
397
398
|
static importDOM() {
|
|
398
399
|
const e = (o) => !!ft(
|
|
399
400
|
o.getAttribute("data-mention-value") || o.getAttribute("data-value") || o.getAttribute("href")
|
|
400
|
-
), n = (o) => e(o) ? { conversion:
|
|
401
|
+
), n = (o) => e(o) ? { conversion: Mr, priority: 2 } : null;
|
|
401
402
|
return {
|
|
402
403
|
a: n,
|
|
403
404
|
span: n,
|
|
@@ -416,9 +417,9 @@ class be extends st {
|
|
|
416
417
|
}
|
|
417
418
|
}
|
|
418
419
|
const De = (t, e, n) => {
|
|
419
|
-
const o = new be(t, e,
|
|
420
|
+
const o = new be(t, e, Cr(t) + ue(n));
|
|
420
421
|
return o.setMode("token").toggleDirectionless(), at(o);
|
|
421
|
-
}, hn = (t) => t instanceof be,
|
|
422
|
+
}, hn = (t) => t instanceof be, $r = /^[\w-]{11}$/, Nr = (t) => {
|
|
422
423
|
if (!t) return;
|
|
423
424
|
if (/^\d+$/.test(t)) return Number(t);
|
|
424
425
|
const e = t.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);
|
|
@@ -443,10 +444,10 @@ const De = (t, e, n) => {
|
|
|
443
444
|
const [, i, s] = e.pathname.split("/");
|
|
444
445
|
["shorts", "embed", "live", "v"].includes(i) && (o = s);
|
|
445
446
|
}
|
|
446
|
-
if (!o ||
|
|
447
|
-
const r =
|
|
447
|
+
if (!o || !$r.test(o)) return null;
|
|
448
|
+
const r = Nr(e.searchParams.get("t") ?? e.searchParams.get("start"));
|
|
448
449
|
return r ? { id: o, start: r } : { id: o };
|
|
449
|
-
}, fn = ({ id: t, start: e }) => `https://www.youtube-nocookie.com/embed/${t}${e ? `?start=${e}` : ""}`,
|
|
450
|
+
}, fn = ({ id: t, start: e }) => `https://www.youtube-nocookie.com/embed/${t}${e ? `?start=${e}` : ""}`, Sr = w.div`
|
|
450
451
|
width: 100%;
|
|
451
452
|
max-width: 560px;
|
|
452
453
|
aspect-ratio: 16 / 9;
|
|
@@ -460,7 +461,7 @@ const De = (t, e, n) => {
|
|
|
460
461
|
height: 100%;
|
|
461
462
|
border: none;
|
|
462
463
|
}
|
|
463
|
-
`,
|
|
464
|
+
`, Or = ({ video: t, className: e }) => /* @__PURE__ */ l(Sr, { className: e ? `youtube-embed ${e}` : "youtube-embed", children: /* @__PURE__ */ l(
|
|
464
465
|
"iframe",
|
|
465
466
|
{
|
|
466
467
|
src: fn(t),
|
|
@@ -520,26 +521,26 @@ class ye extends gn {
|
|
|
520
521
|
className: { base: r.base || "", focus: r.focus || "" },
|
|
521
522
|
format: this.__format,
|
|
522
523
|
nodeKey: this.getKey(),
|
|
523
|
-
children: o ? /* @__PURE__ */ l(
|
|
524
|
+
children: o ? /* @__PURE__ */ l(Or, { video: o }) : /* @__PURE__ */ l("span", { children: this.__url })
|
|
524
525
|
}
|
|
525
526
|
);
|
|
526
527
|
}
|
|
527
528
|
}
|
|
528
|
-
const pe = (t) => at(new ye(t.trim())),
|
|
529
|
+
const pe = (t) => at(new ye(t.trim())), Rr = (t) => t instanceof ye, bn = ["mp4", "mov", "webm", "mkv", "m4v", "ogv", "avi"], Ir = ["png", "jpg", "jpeg", "gif", "webp", "svg", "avif", "bmp"], yn = (t) => t?.split(/[?#]/)[0].split(".").pop()?.toLowerCase() || "", vn = (t, ...e) => t?.startsWith("video/") ? "video" : t?.startsWith("image/") ? "image" : e.some((n) => bn.includes(yn(n))) ? "video" : "image", Ar = (t) => t.type.startsWith("image/") || t.type.startsWith("video/") || [...Ir, ...bn].includes(yn(t.name)), Dr = /\/api\/projects\/[^/]+\/files\/([\w-]+)/, bt = (t) => t?.match(Dr)?.[1] ?? null, Pr = /^\s*!\[[^\]]*\]\(<?([^\s)>]+)>?(?:\s+"[^"]*")?\)\s*$/, Br = /^\s*(```|~~~)/, jl = (t) => {
|
|
529
530
|
const e = /* @__PURE__ */ new Set();
|
|
530
531
|
let n = !1;
|
|
531
532
|
for (const o of String(t || "").split(`
|
|
532
533
|
`)) {
|
|
533
|
-
if (
|
|
534
|
+
if (Br.test(o)) {
|
|
534
535
|
n = !n;
|
|
535
536
|
continue;
|
|
536
537
|
}
|
|
537
538
|
if (n) continue;
|
|
538
|
-
const r = bt(o.match(
|
|
539
|
+
const r = bt(o.match(Pr)?.[1]);
|
|
539
540
|
r && e.add(r);
|
|
540
541
|
}
|
|
541
542
|
return e;
|
|
542
|
-
},
|
|
543
|
+
}, zr = w.div`
|
|
543
544
|
position: relative;
|
|
544
545
|
display: inline-flex;
|
|
545
546
|
max-width: 100%;
|
|
@@ -624,10 +625,10 @@ const pe = (t) => at(new ye(t.trim())), Or = (t) => t instanceof ye, bn = ["mp4"
|
|
|
624
625
|
transform: rotate(360deg);
|
|
625
626
|
}
|
|
626
627
|
}
|
|
627
|
-
`,
|
|
628
|
+
`, Fr = ({ src: t, alt: e, mime: n, uploading: o, onOpen: r, className: i }) => {
|
|
628
629
|
const s = vn(n, e, t), a = s === "video" && bt(t) ? `${t}/thumbnail` : void 0;
|
|
629
630
|
return /* @__PURE__ */ S(
|
|
630
|
-
|
|
631
|
+
zr,
|
|
631
632
|
{
|
|
632
633
|
className: P("md-media", `md-media-${s}`, i, { clickable: !!r }),
|
|
633
634
|
children: [
|
|
@@ -725,7 +726,7 @@ class ve extends gn {
|
|
|
725
726
|
format: this.__format,
|
|
726
727
|
nodeKey: this.getKey(),
|
|
727
728
|
children: /* @__PURE__ */ l(
|
|
728
|
-
|
|
729
|
+
Fr,
|
|
729
730
|
{
|
|
730
731
|
src: this.__src,
|
|
731
732
|
alt: this.__alt,
|
|
@@ -737,13 +738,13 @@ class ve extends gn {
|
|
|
737
738
|
);
|
|
738
739
|
}
|
|
739
740
|
}
|
|
740
|
-
const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USED_COMMAND"), xn = ir,
|
|
741
|
+
const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USED_COMMAND"), xn = ir, Kr = [
|
|
741
742
|
...$t,
|
|
742
743
|
...Object.keys(xn).filter((t) => !$t.includes(t))
|
|
743
|
-
], kn =
|
|
744
|
+
], kn = Kr.flatMap((t) => {
|
|
744
745
|
const e = xn[t];
|
|
745
746
|
return e?.char ? [{ name: t, char: e.char, keywords: e.keywords }] : [];
|
|
746
|
-
}),
|
|
747
|
+
}), Ur = new Map(kn.map((t) => [t.name, t])), wn = (t) => Ur.get(t.toLowerCase()), Hr = (t, e) => {
|
|
747
748
|
const { name: n, keywords: o } = t;
|
|
748
749
|
if (n === e) return { score: 0 };
|
|
749
750
|
if (n.startsWith(e)) return { score: 1 };
|
|
@@ -752,10 +753,10 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
752
753
|
if (n.includes(`_${e}`)) return { score: 3 };
|
|
753
754
|
const i = o.find((s) => s.toLowerCase().startsWith(e));
|
|
754
755
|
return i ? { score: 4, keyword: i } : n.includes(e) ? { score: 5 } : null;
|
|
755
|
-
},
|
|
756
|
+
}, jr = (t, e = 8, n = {}) => {
|
|
756
757
|
const o = t.toLowerCase(), r = [];
|
|
757
758
|
return kn.forEach((i, s) => {
|
|
758
|
-
const a =
|
|
759
|
+
const a = Hr(i, o);
|
|
759
760
|
a && r.push({
|
|
760
761
|
emoji: { ...i, matchedKeyword: a.keyword },
|
|
761
762
|
score: a.score,
|
|
@@ -764,7 +765,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
764
765
|
}), r.sort(
|
|
765
766
|
(i, s) => i.score - s.score || (n[s.emoji.name] ?? 0) - (n[i.emoji.name] ?? 0) || i.index - s.index
|
|
766
767
|
).slice(0, e).map(({ emoji: i }) => i);
|
|
767
|
-
},
|
|
768
|
+
}, Gr = [
|
|
768
769
|
"+1",
|
|
769
770
|
"heart",
|
|
770
771
|
"joy",
|
|
@@ -781,30 +782,30 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
781
782
|
"sweat_smile",
|
|
782
783
|
"100",
|
|
783
784
|
"x"
|
|
784
|
-
],
|
|
785
|
+
], Wr = (t) => (e, n) => (t[n] ?? 0) - (t[e] ?? 0), Yr = (t, e = {}, n = 8) => {
|
|
785
786
|
if (!t) {
|
|
786
|
-
const o = Object.keys(e).filter((i) => e[i] > 0).sort(
|
|
787
|
-
return [.../* @__PURE__ */ new Set([...o, ...
|
|
787
|
+
const o = Object.keys(e).filter((i) => e[i] > 0).sort(Wr(e));
|
|
788
|
+
return [.../* @__PURE__ */ new Set([...o, ...Gr])].flatMap((i) => wn(i) ?? []).slice(0, n);
|
|
788
789
|
}
|
|
789
|
-
return
|
|
790
|
-
},
|
|
790
|
+
return jr(t, n, e);
|
|
791
|
+
}, qr = (t) => t.replaceAll(" ", "%20"), Qr = (t) => {
|
|
791
792
|
try {
|
|
792
793
|
return decodeURIComponent(t);
|
|
793
794
|
} catch {
|
|
794
795
|
return t;
|
|
795
796
|
}
|
|
796
|
-
},
|
|
797
|
+
}, Vr = (t) => t.replace(/[[\]]/g, ""), Jr = ht.join("|"), Nt = `\\[([^\\]\\n]+)\\]\\(@?(${Jr}):([^)\\s]+)\\)`, Xr = {
|
|
797
798
|
dependencies: [be],
|
|
798
|
-
export: (t) => hn(t) ? `[${
|
|
799
|
+
export: (t) => hn(t) ? `[${Vr(t.getLabel())}](${t.getMentionType()}:${qr(t.getMentionId())})` : null,
|
|
799
800
|
importRegExp: new RegExp(Nt),
|
|
800
801
|
regExp: new RegExp(Nt + "$"),
|
|
801
802
|
replace: (t, e) => {
|
|
802
|
-
const [, n, o, r] = e, i = De(o,
|
|
803
|
+
const [, n, o, r] = e, i = De(o, Qr(r), n.replace(/^@+/, ""));
|
|
803
804
|
return t.replace(i), i;
|
|
804
805
|
},
|
|
805
806
|
trigger: ")",
|
|
806
807
|
type: "text-match"
|
|
807
|
-
},
|
|
808
|
+
}, Zr = {
|
|
808
809
|
dependencies: [oo],
|
|
809
810
|
export: (t) => Vt(t) ? `\\
|
|
810
811
|
` : null,
|
|
@@ -814,7 +815,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
814
815
|
replace: () => {
|
|
815
816
|
},
|
|
816
817
|
type: "text-match"
|
|
817
|
-
},
|
|
818
|
+
}, ei = {
|
|
818
819
|
dependencies: [st],
|
|
819
820
|
export: () => null,
|
|
820
821
|
importRegExp: /(?!)/,
|
|
@@ -828,16 +829,16 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
828
829
|
},
|
|
829
830
|
trigger: ":",
|
|
830
831
|
type: "text-match"
|
|
831
|
-
},
|
|
832
|
+
}, ti = {
|
|
832
833
|
dependencies: [ye],
|
|
833
|
-
export: (t) =>
|
|
834
|
+
export: (t) => Rr(t) ? t.getUrl() : null,
|
|
834
835
|
regExp: /^\s*(https?:\/\/\S+)\s*$/,
|
|
835
836
|
replace: (t, e, n, o) => {
|
|
836
837
|
if (!o || !re(n[1])) return !1;
|
|
837
838
|
t.replace(pe(n[1]));
|
|
838
839
|
},
|
|
839
840
|
type: "element"
|
|
840
|
-
},
|
|
841
|
+
}, ni = {
|
|
841
842
|
dependencies: [ve],
|
|
842
843
|
export: (t) => {
|
|
843
844
|
if (!Xe(t)) return null;
|
|
@@ -853,8 +854,8 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
853
854
|
},
|
|
854
855
|
type: "element"
|
|
855
856
|
}, Pe = [
|
|
856
|
-
ei,
|
|
857
857
|
ti,
|
|
858
|
+
ni,
|
|
858
859
|
Ko,
|
|
859
860
|
Uo,
|
|
860
861
|
Ho,
|
|
@@ -869,17 +870,17 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
869
870
|
Xo,
|
|
870
871
|
Zo,
|
|
871
872
|
er,
|
|
872
|
-
Jr,
|
|
873
873
|
Xr,
|
|
874
874
|
Zr,
|
|
875
|
+
ei,
|
|
875
876
|
tr
|
|
876
|
-
],
|
|
877
|
+
], oi = /^\s*(`{3,}|~{3,})/, _n = (t) => {
|
|
877
878
|
let e = null;
|
|
878
879
|
return t.map((n) => {
|
|
879
|
-
const o = n.match(
|
|
880
|
+
const o = n.match(oi);
|
|
880
881
|
return e ? (o && o[1][0] === e[0] && o[1].length >= e.length && (e = null), !0) : (o && (e = o[1]), !!o);
|
|
881
882
|
});
|
|
882
|
-
},
|
|
883
|
+
}, ri = (t, e) => {
|
|
883
884
|
const n = t.split(`
|
|
884
885
|
`), o = _n(n), r = [];
|
|
885
886
|
return n.forEach((i, s) => {
|
|
@@ -900,14 +901,14 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
900
901
|
const u = n[a] && (a === 0 || !n[a - 1]);
|
|
901
902
|
r && (u || r.isCode && !n[a]) && (o.push(r), r = null), r || (r = { lines: [], blanksBefore: i, isCode: n[a] }, i = 0), r.lines.push(s);
|
|
902
903
|
}), r && o.push(r), o;
|
|
903
|
-
},
|
|
904
|
+
}, ii = /^\s*([-*+]\s|\d+[.)]\s|#{1,6}\s|>|\||:::|<\/?[a-z])/i, St = (t) => !t.isCode && !ii.test(t.lines[0]), si = (t) => (t.match(/\\+$/)?.[0].length ?? 0) % 2 === 1, ai = (t) => {
|
|
904
905
|
if (t.isCode) return t.lines.join(`
|
|
905
906
|
`);
|
|
906
907
|
const e = [...t.lines], n = e.length - 1;
|
|
907
|
-
return
|
|
908
|
+
return si(e[n]) && (e[n] = e[n].slice(0, -1).trimEnd()), e.map((o) => o.replace(li, "$1* $2")).join(`
|
|
908
909
|
`);
|
|
909
|
-
},
|
|
910
|
-
const e =
|
|
910
|
+
}, li = /^(\s*)[-+] (\[[ xX]\]\s)/, Ot = (t) => /^\s*( |<br\s*\/?>)\s*$/i.test(t), ci = (t) => {
|
|
911
|
+
const e = ri(
|
|
911
912
|
t.replace(/\r\n?/g, `
|
|
912
913
|
`),
|
|
913
914
|
(a) => a.replace(/<\/?u>/gi, "")
|
|
@@ -928,15 +929,15 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
928
929
|
` + v : r = v, i = d, s = !1;
|
|
929
930
|
}
|
|
930
931
|
return r;
|
|
931
|
-
},
|
|
932
|
+
}, di = (t) => {
|
|
932
933
|
if (!Y(t)) return !1;
|
|
933
934
|
const e = t.getFirstChild();
|
|
934
935
|
return e === null || t.getChildrenSize() === 1 && X(e) && /^\s{0,3}$/.test(e.getTextContent());
|
|
935
|
-
},
|
|
936
|
+
}, ui = (t, e) => {
|
|
936
937
|
const n = En(t), o = [];
|
|
937
938
|
let r = !1;
|
|
938
939
|
for (const s of e.getChildren()) {
|
|
939
|
-
if (
|
|
940
|
+
if (di(s)) {
|
|
940
941
|
r = !0;
|
|
941
942
|
continue;
|
|
942
943
|
}
|
|
@@ -944,32 +945,32 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
944
945
|
}
|
|
945
946
|
const i = o.length === n.length;
|
|
946
947
|
return n.map((s, a) => {
|
|
947
|
-
const u =
|
|
948
|
+
const u = ai(s);
|
|
948
949
|
return a === 0 ? u : ((i ? !o[a].hasGapBefore && o[a].isParagraph && o[a - 1].isParagraph : !1) ? `\\
|
|
949
950
|
` : `
|
|
950
951
|
|
|
951
952
|
`) + u;
|
|
952
953
|
}).join("").trim();
|
|
953
|
-
},
|
|
954
|
+
}, mi = (t) => {
|
|
954
955
|
const e = [t];
|
|
955
956
|
let n = t;
|
|
956
957
|
for (const o of t.getChildren())
|
|
957
958
|
Vt(o) ? (n = he().setFormat(t.getFormatType()), e.push(n), o.remove()) : n !== t && n.append(o);
|
|
958
959
|
return e;
|
|
959
|
-
},
|
|
960
|
+
}, pi = (t) => {
|
|
960
961
|
const e = [];
|
|
961
962
|
return t.forEach((n, o) => {
|
|
962
963
|
if (!Y(n)) {
|
|
963
964
|
e.push(n);
|
|
964
965
|
return;
|
|
965
966
|
}
|
|
966
|
-
o > 0 && Y(t[o - 1]) && e.push(he()), e.push(...
|
|
967
|
+
o > 0 && Y(t[o - 1]) && e.push(he()), e.push(...mi(n));
|
|
967
968
|
}), e;
|
|
968
969
|
}, Cn = (t) => (
|
|
969
970
|
// shouldMergeAdjacentLines: a soft line break renders as a space, so show it as one
|
|
970
|
-
|
|
971
|
+
pi(
|
|
971
972
|
nr(
|
|
972
|
-
|
|
973
|
+
ci(t || ""),
|
|
973
974
|
Pe,
|
|
974
975
|
!1,
|
|
975
976
|
!0
|
|
@@ -978,7 +979,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
978
979
|
), et = (t) => {
|
|
979
980
|
const e = ie(), n = Cn(t);
|
|
980
981
|
e.clear(), e.append(...n.length ? n : [he()]), M() !== null && e.selectStart();
|
|
981
|
-
}, Rt = (t = ie()) =>
|
|
982
|
+
}, Rt = (t = ie()) => ui(or(Pe, t, !1), t), gi = () => {
|
|
982
983
|
const e = ie().getChildren();
|
|
983
984
|
if (e.length === 0) return !0;
|
|
984
985
|
if (e.length > 1) return !1;
|
|
@@ -1034,7 +1035,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1034
1035
|
.token.builtin {
|
|
1035
1036
|
color: #56b6c2;
|
|
1036
1037
|
}
|
|
1037
|
-
`,
|
|
1038
|
+
`, hi = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20' viewBox='0 -960 960 960' width='20' fill='%2323E0A9'%3E%3Cpath d='m427.462-343.692 233.846-232.846L620-617.846 427.462-426.308l-87-86L299.154-471l128.308 127.308ZM480.134-104q-77.313 0-145.89-29.359-68.577-29.36-120.025-80.762-51.447-51.402-80.833-119.917Q104-402.554 104-479.866q0-78.569 29.418-146.871 29.419-68.303 80.922-119.917 51.503-51.614 119.916-80.48Q402.67-856 479.866-856q78.559 0 146.853 28.839 68.294 28.84 119.922 80.422 51.627 51.582 80.493 119.841Q856-558.639 856-480.05q0 77.589-28.839 145.826-28.84 68.237-80.408 119.786-51.569 51.548-119.81 80.993Q558.702-104 480.134-104Z'/%3E%3C/svg%3E")`, fi = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='20' viewBox='0 -960 960 960' width='20' fill='%23C4C7C5'%3E%3Cpath d='M480.409-104q-77.588 0-146.165-29.359-68.577-29.360-120.025-80.762-51.447-51.402-80.833-119.876Q104-402.471 104-480.325q0-78.110 29.418-146.412 29.419-68.303 80.922-119.917 51.503-51.614 119.875-80.480Q402.587-856 480.325-856q78.100 0 146.394 28.839 68.294 28.840 119.922 80.422 51.627 51.582 80.493 120.065Q856-558.191 856-480.326q0 77.865-28.839 146.102-28.840 68.237-80.408 119.786-51.569 51.548-120.034 80.993Q558.253-104 480.409-104ZM480-162q132.513 0 225.256-92.744Q798-347.487 798-480t-92.744-225.256Q612.513-798 480-798t-225.256 92.744Q162-612.513 162-480t92.744 225.256Q347.487-162 480-162Zm0-318Z'/%3E%3C/svg%3E")`, bi = w.div`
|
|
1038
1039
|
position: relative;
|
|
1039
1040
|
display: flex;
|
|
1040
1041
|
flex-direction: column;
|
|
@@ -1049,7 +1050,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1049
1050
|
border-color: var(--md-sys-color-primary);
|
|
1050
1051
|
}
|
|
1051
1052
|
}
|
|
1052
|
-
`,
|
|
1053
|
+
`, yi = w.div`
|
|
1053
1054
|
position: relative;
|
|
1054
1055
|
display: flex;
|
|
1055
1056
|
align-items: center;
|
|
@@ -1095,7 +1096,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1095
1096
|
display: none;
|
|
1096
1097
|
}
|
|
1097
1098
|
}
|
|
1098
|
-
`,
|
|
1099
|
+
`, vi = w.div`
|
|
1099
1100
|
display: flex;
|
|
1100
1101
|
align-items: center;
|
|
1101
1102
|
gap: 2px;
|
|
@@ -1103,12 +1104,12 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1103
1104
|
min-width: 0;
|
|
1104
1105
|
overflow: hidden;
|
|
1105
1106
|
justify-content: flex-end;
|
|
1106
|
-
`,
|
|
1107
|
+
`, xi = w.span`
|
|
1107
1108
|
width: 1px;
|
|
1108
1109
|
height: 18px;
|
|
1109
1110
|
margin: 0 4px;
|
|
1110
1111
|
background-color: var(--md-sys-color-outline-variant);
|
|
1111
|
-
`,
|
|
1112
|
+
`, ki = w.div`
|
|
1112
1113
|
position: fixed;
|
|
1113
1114
|
z-index: 1100;
|
|
1114
1115
|
display: flex;
|
|
@@ -1141,7 +1142,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1141
1142
|
padding: 4px;
|
|
1142
1143
|
min-height: 0;
|
|
1143
1144
|
}
|
|
1144
|
-
`,
|
|
1145
|
+
`, wi = w.button`
|
|
1145
1146
|
all: unset;
|
|
1146
1147
|
position: fixed;
|
|
1147
1148
|
z-index: 1100;
|
|
@@ -1173,7 +1174,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1173
1174
|
&:hover {
|
|
1174
1175
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
1175
1176
|
}
|
|
1176
|
-
`,
|
|
1177
|
+
`, _i = w.div`
|
|
1177
1178
|
position: fixed;
|
|
1178
1179
|
z-index: 1000;
|
|
1179
1180
|
transform: translateX(-100%);
|
|
@@ -1189,7 +1190,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1189
1190
|
display: none;
|
|
1190
1191
|
}
|
|
1191
1192
|
}
|
|
1192
|
-
`,
|
|
1193
|
+
`, Ei = w.span`
|
|
1193
1194
|
display: flex;
|
|
1194
1195
|
align-items: center;
|
|
1195
1196
|
gap: 2px;
|
|
@@ -1210,7 +1211,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1210
1211
|
&:hover {
|
|
1211
1212
|
color: var(--md-sys-color-on-surface);
|
|
1212
1213
|
}
|
|
1213
|
-
`,
|
|
1214
|
+
`, Ci = w.div`
|
|
1214
1215
|
display: flex;
|
|
1215
1216
|
align-items: flex-end;
|
|
1216
1217
|
min-width: 0;
|
|
@@ -1221,7 +1222,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1221
1222
|
gap: 2px;
|
|
1222
1223
|
padding: 4px;
|
|
1223
1224
|
}
|
|
1224
|
-
`,
|
|
1225
|
+
`, Ti = w.div`
|
|
1225
1226
|
position: fixed;
|
|
1226
1227
|
z-index: 1100;
|
|
1227
1228
|
transform: translate(-50%, calc(-100% - 8px));
|
|
@@ -1245,12 +1246,12 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1245
1246
|
color: var(--md-sys-color-on-primary-container);
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
1248
|
-
`,
|
|
1249
|
+
`, Li = w.div`
|
|
1249
1250
|
position: relative;
|
|
1250
1251
|
overflow-y: auto;
|
|
1251
1252
|
flex: 1;
|
|
1252
1253
|
min-width: 0;
|
|
1253
|
-
`,
|
|
1254
|
+
`, Mi = w.div`
|
|
1254
1255
|
position: absolute;
|
|
1255
1256
|
top: 8px;
|
|
1256
1257
|
left: 10px;
|
|
@@ -1261,7 +1262,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1261
1262
|
overflow: hidden;
|
|
1262
1263
|
text-overflow: ellipsis;
|
|
1263
1264
|
white-space: nowrap;
|
|
1264
|
-
`,
|
|
1265
|
+
`, $i = w.div`
|
|
1265
1266
|
.md-content {
|
|
1266
1267
|
outline: none;
|
|
1267
1268
|
padding: 8px 10px;
|
|
@@ -1436,12 +1437,12 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1436
1437
|
}
|
|
1437
1438
|
}
|
|
1438
1439
|
.md-list-item-unchecked::before {
|
|
1439
|
-
background-image: ${
|
|
1440
|
+
background-image: ${fi};
|
|
1440
1441
|
}
|
|
1441
1442
|
.md-list-item-checked {
|
|
1442
1443
|
color: var(--md-sys-color-outline);
|
|
1443
1444
|
&::before {
|
|
1444
|
-
background-image: ${
|
|
1445
|
+
background-image: ${hi};
|
|
1445
1446
|
}
|
|
1446
1447
|
}
|
|
1447
1448
|
|
|
@@ -1483,7 +1484,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1483
1484
|
.md-activity-link {
|
|
1484
1485
|
text-decoration: none;
|
|
1485
1486
|
}
|
|
1486
|
-
`,
|
|
1487
|
+
`, Ni = w.div`
|
|
1487
1488
|
position: absolute;
|
|
1488
1489
|
top: 4px;
|
|
1489
1490
|
left: 0;
|
|
@@ -1524,12 +1525,12 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1524
1525
|
padding-top: 4px;
|
|
1525
1526
|
}
|
|
1526
1527
|
}
|
|
1527
|
-
`,
|
|
1528
|
+
`, Si = w.li`
|
|
1528
1529
|
list-style: none;
|
|
1529
1530
|
height: 1px;
|
|
1530
1531
|
margin: 4px 4px;
|
|
1531
1532
|
background-color: var(--md-sys-color-outline-variant);
|
|
1532
|
-
`,
|
|
1533
|
+
`, Oi = w.div`
|
|
1533
1534
|
display: flex;
|
|
1534
1535
|
align-items: center;
|
|
1535
1536
|
justify-content: space-between;
|
|
@@ -1537,10 +1538,10 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1537
1538
|
margin-bottom: 4px;
|
|
1538
1539
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
1539
1540
|
color: var(--md-sys-color-outline);
|
|
1540
|
-
`,
|
|
1541
|
+
`, Ri = w.span`
|
|
1541
1542
|
display: flex;
|
|
1542
1543
|
gap: 2px;
|
|
1543
|
-
`,
|
|
1544
|
+
`, Ii = w.button`
|
|
1544
1545
|
all: unset;
|
|
1545
1546
|
display: flex;
|
|
1546
1547
|
align-items: center;
|
|
@@ -1612,7 +1613,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1612
1613
|
font-family: monospace;
|
|
1613
1614
|
font-size: 11px;
|
|
1614
1615
|
}
|
|
1615
|
-
`,
|
|
1616
|
+
`, Ai = 4, Di = 26, yt = ({
|
|
1616
1617
|
editor: t,
|
|
1617
1618
|
anchor: e,
|
|
1618
1619
|
placement: n,
|
|
@@ -1639,11 +1640,11 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1639
1640
|
return oe(() => {
|
|
1640
1641
|
const k = c.current;
|
|
1641
1642
|
if (T || !k) return;
|
|
1642
|
-
const C = e.getBoundingClientRect(), b = k.offsetHeight, L = window.innerHeight - C.top -
|
|
1643
|
+
const C = e.getBoundingClientRect(), b = k.offsetHeight, L = window.innerHeight - C.top - Ai, I = C.top - Di;
|
|
1643
1644
|
_(b > L && I > L);
|
|
1644
1645
|
}, [T, e, i.length, o, x]), fe(
|
|
1645
1646
|
/* @__PURE__ */ S(
|
|
1646
|
-
|
|
1647
|
+
Ni,
|
|
1647
1648
|
{
|
|
1648
1649
|
ref: c,
|
|
1649
1650
|
className: P("mention-menu md-popover", ae, g, {
|
|
@@ -1652,13 +1653,13 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1652
1653
|
}),
|
|
1653
1654
|
onMouseDown: (k) => k.preventDefault(),
|
|
1654
1655
|
children: [
|
|
1655
|
-
(o || r) && /* @__PURE__ */ S(
|
|
1656
|
+
(o || r) && /* @__PURE__ */ S(Oi, { children: [
|
|
1656
1657
|
/* @__PURE__ */ l("span", { children: o }),
|
|
1657
1658
|
r
|
|
1658
1659
|
] }),
|
|
1659
1660
|
/* @__PURE__ */ S("ul", { ref: f, role: "listbox", className: P({ untitled: !o && !r }), children: [
|
|
1660
1661
|
i.map((k, C) => [
|
|
1661
|
-
C > 0 && h && h(k) !== h(i[C - 1]) && /* @__PURE__ */ l(
|
|
1662
|
+
C > 0 && h && h(k) !== h(i[C - 1]) && /* @__PURE__ */ l(Si, { role: "separator" }, `divider-${k.key}`),
|
|
1662
1663
|
/* @__PURE__ */ l(
|
|
1663
1664
|
It,
|
|
1664
1665
|
{
|
|
@@ -1690,7 +1691,7 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1690
1691
|
return X(e) && e.hasFormat("code") ? !0 : !!W(e, ee);
|
|
1691
1692
|
}, vt = ge(
|
|
1692
1693
|
"INSERT_MENTION_TRIGGER_COMMAND"
|
|
1693
|
-
),
|
|
1694
|
+
), Pi = ["@", "@@", "@@@"], Bi = {
|
|
1694
1695
|
"@": {
|
|
1695
1696
|
title: "@ Users & Teams",
|
|
1696
1697
|
noun: "user",
|
|
@@ -1703,14 +1704,14 @@ const Ae = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1703
1704
|
"@@": { title: "@@ Versions", noun: "version" },
|
|
1704
1705
|
"@@@": { title: "@@@ Tasks", noun: "task" }
|
|
1705
1706
|
}, At = /(^|[\s([{"'])(@{1,3})([^\s@]{0,75})$/;
|
|
1706
|
-
class
|
|
1707
|
+
class zi extends gt {
|
|
1707
1708
|
item;
|
|
1708
1709
|
constructor(e, n) {
|
|
1709
1710
|
super(`${e.type}:${e.id}:${n}`), this.item = e;
|
|
1710
1711
|
}
|
|
1711
1712
|
}
|
|
1712
|
-
const
|
|
1713
|
-
const [o] = A(), [r, i] = U(null), [s, a] = U(null), u = O("@"), [d, v] = U("@"), x = t.triggers ??
|
|
1713
|
+
const Fi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
1714
|
+
const [o] = A(), [r, i] = U(null), [s, a] = U(null), u = O("@"), [d, v] = U("@"), x = t.triggers ?? Pi, g = t.limit ?? (n === "top" ? 8 : 5), h = H(
|
|
1714
1715
|
(E) => {
|
|
1715
1716
|
if (Be()) return null;
|
|
1716
1717
|
const p = At.exec(E);
|
|
@@ -1729,7 +1730,7 @@ const zi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1729
1730
|
return;
|
|
1730
1731
|
}
|
|
1731
1732
|
v((p) => (p !== u.current && a(null), u.current));
|
|
1732
|
-
}, []), c = { ...
|
|
1733
|
+
}, []), c = { ...Bi[d], ...t.config?.[d] }, m = r !== null ? t.getError?.(d) : null, _ = _e(() => r === null || m ? [] : t.getOptions({ trigger: d, search: r.toLowerCase(), filter: s }).slice(0, g).map((E, p) => new zi(E, p)), [r, d, s, t, g, m]), T = H(
|
|
1733
1734
|
(E, p, y) => {
|
|
1734
1735
|
o.update(() => {
|
|
1735
1736
|
const { type: k, id: C, label: b } = E.item, L = De(k, C, b);
|
|
@@ -1795,8 +1796,8 @@ const zi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1795
1796
|
anchor: C,
|
|
1796
1797
|
placement: n,
|
|
1797
1798
|
title: c.title,
|
|
1798
|
-
titleActions: !!c.filters?.length && /* @__PURE__ */ l(
|
|
1799
|
-
|
|
1799
|
+
titleActions: !!c.filters?.length && /* @__PURE__ */ l(Ri, { children: c.filters.map((b) => /* @__PURE__ */ l(
|
|
1800
|
+
Ii,
|
|
1800
1801
|
{
|
|
1801
1802
|
className: P({ active: s === b.id }),
|
|
1802
1803
|
onClick: () => a((L) => L === b.id ? null : b.id),
|
|
@@ -1815,7 +1816,7 @@ const zi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1815
1816
|
optionClassName: () => c.isCircle ? void 0 : "square",
|
|
1816
1817
|
emptyMessage: m || `No ${c.noun}s found`,
|
|
1817
1818
|
renderOption: ({ item: b }) => /* @__PURE__ */ S(me, { children: [
|
|
1818
|
-
t.renderOptionImage ? t.renderOptionImage(b) : b.type === "user" ? /* @__PURE__ */ l(
|
|
1819
|
+
t.renderOptionImage ? t.renderOptionImage(b) : b.type === "user" ? /* @__PURE__ */ l(fr, { size: 20, name: b.id, className: "image" }) : b.icon && /* @__PURE__ */ l(J, { icon: b.icon, className: "image", style: { color: b.color } }),
|
|
1819
1820
|
b.context && /* @__PURE__ */ S("span", { className: "context", children: [
|
|
1820
1821
|
b.context,
|
|
1821
1822
|
" - "
|
|
@@ -1828,14 +1829,14 @@ const zi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1828
1829
|
}
|
|
1829
1830
|
}
|
|
1830
1831
|
);
|
|
1831
|
-
}, Dt = "emojiUsage",
|
|
1832
|
+
}, Dt = "emojiUsage", Ki = 40, Ui = () => {
|
|
1832
1833
|
const { user: t } = cr(), e = t?.data?.frontendPreferences?.[Dt] ?? {}, n = O(e);
|
|
1833
1834
|
n.current = e;
|
|
1834
1835
|
const [o] = qn(), r = H(
|
|
1835
1836
|
(i) => {
|
|
1836
1837
|
if (!t?.name) return;
|
|
1837
1838
|
const s = { ...n.current, [i]: (n.current[i] ?? 0) + 1 }, a = Object.fromEntries(
|
|
1838
|
-
Object.entries(s).sort(([, u], [, d]) => d - u).slice(0,
|
|
1839
|
+
Object.entries(s).sort(([, u], [, d]) => d - u).slice(0, Ki)
|
|
1839
1840
|
);
|
|
1840
1841
|
n.current = a, o({
|
|
1841
1842
|
userName: t.name,
|
|
@@ -1848,16 +1849,16 @@ const zi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1848
1849
|
[t?.name, o]
|
|
1849
1850
|
);
|
|
1850
1851
|
return { usage: e, recordUse: r };
|
|
1851
|
-
},
|
|
1852
|
-
class
|
|
1852
|
+
}, Hi = /(^|[\s([{"'])(:)([a-z0-9_+-]{0,40})$/i;
|
|
1853
|
+
class ji extends gt {
|
|
1853
1854
|
emoji;
|
|
1854
1855
|
constructor(e) {
|
|
1855
1856
|
super(e.name), this.emoji = e;
|
|
1856
1857
|
}
|
|
1857
1858
|
}
|
|
1858
|
-
const
|
|
1859
|
-
const [n] = A(), [o, r] = U(null), i = t === "top" ? 8 : 5, { usage: s, recordUse: a } =
|
|
1860
|
-
() => o === null ? [] :
|
|
1859
|
+
const Gi = ({ placement: t = "inline", menuParent: e }) => {
|
|
1860
|
+
const [n] = A(), [o, r] = U(null), i = t === "top" ? 8 : 5, { usage: s, recordUse: a } = Ui(), u = _e(
|
|
1861
|
+
() => o === null ? [] : Yr(o, s, i).map((x) => new ji(x)),
|
|
1861
1862
|
[o, i, s]
|
|
1862
1863
|
);
|
|
1863
1864
|
R(
|
|
@@ -1870,7 +1871,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1870
1871
|
);
|
|
1871
1872
|
const d = H((x) => {
|
|
1872
1873
|
if (Be()) return null;
|
|
1873
|
-
const g =
|
|
1874
|
+
const g = Hi.exec(x);
|
|
1874
1875
|
return g ? {
|
|
1875
1876
|
leadOffset: g.index + g[1].length,
|
|
1876
1877
|
matchingString: g[3],
|
|
@@ -1939,7 +1940,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1939
1940
|
if (!e) return null;
|
|
1940
1941
|
const n = ft(e.getAttribute("data-mention-value"));
|
|
1941
1942
|
return n ? { target: e, mention: { ...n, label: e.getAttribute("data-mention-label") || "" } } : null;
|
|
1942
|
-
},
|
|
1943
|
+
}, Wi = ({ onMentionClick: t, onMentionHover: e }) => {
|
|
1943
1944
|
const [n] = A(), o = O({ onMentionClick: t, onMentionHover: e });
|
|
1944
1945
|
return o.current = { onMentionClick: t, onMentionHover: e }, R(() => {
|
|
1945
1946
|
const r = (u) => {
|
|
@@ -1969,7 +1970,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1969
1970
|
return n === "h1" || n === "h2" || n === "h3" ? n : "heading";
|
|
1970
1971
|
}
|
|
1971
1972
|
return on(e) ? "quote" : ee(e) ? "code" : "paragraph";
|
|
1972
|
-
},
|
|
1973
|
+
}, Yi = {
|
|
1973
1974
|
bullet: Ao,
|
|
1974
1975
|
number: Io,
|
|
1975
1976
|
check: Ro
|
|
@@ -1980,7 +1981,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1980
1981
|
});
|
|
1981
1982
|
if (o !== null && !(n === "set" && o === e)) {
|
|
1982
1983
|
if (e === "bullet" || e === "number" || e === "check") {
|
|
1983
|
-
o === e ? t.dispatchCommand(Oo, void 0) : t.dispatchCommand(
|
|
1984
|
+
o === e ? t.dispatchCommand(Oo, void 0) : t.dispatchCommand(Yi[e], void 0);
|
|
1984
1985
|
return;
|
|
1985
1986
|
}
|
|
1986
1987
|
t.update(() => {
|
|
@@ -2010,11 +2011,11 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2010
2011
|
), Bt = (t) => {
|
|
2011
2012
|
const e = t.trim();
|
|
2012
2013
|
return e ? /^(https?:|mailto:|\/|#)/i.test(e) ? e : `https://${e}` : "";
|
|
2013
|
-
},
|
|
2014
|
+
}, qi = {
|
|
2014
2015
|
blockType: "paragraph",
|
|
2015
2016
|
formats: {},
|
|
2016
2017
|
isLink: !1
|
|
2017
|
-
},
|
|
2018
|
+
}, Qi = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), $e = Qi ? "⌘" : "Ctrl+", Ye = {
|
|
2018
2019
|
h1: { icon: "format_h1", tooltip: "Heading 1", shortcut: "#" },
|
|
2019
2020
|
h2: { icon: "format_h2", tooltip: "Heading 2", shortcut: "##" },
|
|
2020
2021
|
h3: { icon: "format_h3", tooltip: "Heading 3", shortcut: "###" },
|
|
@@ -2028,8 +2029,8 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2028
2029
|
numberList: { icon: "format_list_numbered", tooltip: "Numbered list", shortcut: "1." },
|
|
2029
2030
|
bulletList: { icon: "format_list_bulleted", tooltip: "Bullet list", shortcut: "-" },
|
|
2030
2031
|
checkList: { icon: "check_circle", tooltip: "Checklist", shortcut: "[]" }
|
|
2031
|
-
}, zt = ({ layout: t =
|
|
2032
|
-
const [r] = A(), [i, s] = U(
|
|
2032
|
+
}, zt = ({ layout: t = Tr, start: e, end: n, floating: o }) => {
|
|
2033
|
+
const [r] = A(), [i, s] = U(qi), [a, u] = U(null), d = H(() => {
|
|
2033
2034
|
const c = r.getRootElement(), m = window.getSelection();
|
|
2034
2035
|
if (!c || !m || m.isCollapsed || !m.rangeCount) {
|
|
2035
2036
|
u(null);
|
|
@@ -2129,8 +2130,8 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2129
2130
|
case "checkList":
|
|
2130
2131
|
return i.blockType === "check";
|
|
2131
2132
|
}
|
|
2132
|
-
}, h = (c) => i.blockType === "code" && ["bold", "italic", "strikethrough", "code", "link"].includes(c), f = /* @__PURE__ */ l(
|
|
2133
|
-
(c, m) => c === "|" ? /* @__PURE__ */ l(
|
|
2133
|
+
}, h = (c) => i.blockType === "code" && ["bold", "italic", "strikethrough", "code", "link"].includes(c), f = /* @__PURE__ */ l(vi, { children: t.map(
|
|
2134
|
+
(c, m) => c === "|" ? /* @__PURE__ */ l(xi, { className: "md-toolbar-divider" }, `divider-${m}`) : /* @__PURE__ */ l(Jn, { children: /* @__PURE__ */ l(
|
|
2134
2135
|
te,
|
|
2135
2136
|
{
|
|
2136
2137
|
icon: Ye[c].icon,
|
|
@@ -2150,7 +2151,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2150
2151
|
) });
|
|
2151
2152
|
return o ? a ? fe(
|
|
2152
2153
|
/* @__PURE__ */ l(
|
|
2153
|
-
|
|
2154
|
+
Ti,
|
|
2154
2155
|
{
|
|
2155
2156
|
className: P("md-toolbar md-floating-toolbar md-popover", ae),
|
|
2156
2157
|
style: { top: a.top, left: a.left },
|
|
@@ -2158,18 +2159,18 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2158
2159
|
}
|
|
2159
2160
|
),
|
|
2160
2161
|
document.body
|
|
2161
|
-
) : null : /* @__PURE__ */ S(
|
|
2162
|
+
) : null : /* @__PURE__ */ S(yi, { className: "md-toolbar", children: [
|
|
2162
2163
|
e,
|
|
2163
2164
|
f,
|
|
2164
2165
|
n
|
|
2165
2166
|
] });
|
|
2166
|
-
},
|
|
2167
|
+
}, Vi = (t) => t.metaKey || t.ctrlKey, Ji = () => {
|
|
2167
2168
|
const [t] = A();
|
|
2168
2169
|
return R(
|
|
2169
2170
|
() => q(
|
|
2170
2171
|
t.registerCommand(
|
|
2171
2172
|
Xt,
|
|
2172
|
-
(e) =>
|
|
2173
|
+
(e) => Vi(e) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "e" ? (e.preventDefault(), t.dispatchCommand(dt, "code"), !0) : !1,
|
|
2173
2174
|
D
|
|
2174
2175
|
),
|
|
2175
2176
|
t.registerCommand(
|
|
@@ -2208,7 +2209,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2208
2209
|
),
|
|
2209
2210
|
[t]
|
|
2210
2211
|
), null;
|
|
2211
|
-
},
|
|
2212
|
+
}, Xi = () => {
|
|
2212
2213
|
const [t] = A();
|
|
2213
2214
|
return R(() => {
|
|
2214
2215
|
const e = (n) => {
|
|
@@ -2230,12 +2231,12 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2230
2231
|
t.registerCommand(Zt, e, D)
|
|
2231
2232
|
);
|
|
2232
2233
|
}, [t]), null;
|
|
2233
|
-
},
|
|
2234
|
+
}, Zi = /^\[([ xX]?)\]\s/, es = () => {
|
|
2234
2235
|
const [t] = A();
|
|
2235
2236
|
return R(
|
|
2236
2237
|
() => t.registerNodeTransform(st, (e) => {
|
|
2237
2238
|
if (!e.isSimpleText()) return;
|
|
2238
|
-
const n = e.getTextContent().match(
|
|
2239
|
+
const n = e.getTextContent().match(Zi);
|
|
2239
2240
|
if (!n) return;
|
|
2240
2241
|
const o = e.getParent();
|
|
2241
2242
|
if (!ln(o) || !e.is(o.getFirstChild())) return;
|
|
@@ -2253,7 +2254,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2253
2254
|
}),
|
|
2254
2255
|
[t]
|
|
2255
2256
|
), null;
|
|
2256
|
-
},
|
|
2257
|
+
}, ts = ({ onSubmit: t, onEscape: e, submitOnEnter: n }) => {
|
|
2257
2258
|
const [o] = A(), r = O({ onSubmit: t, onEscape: e, submitOnEnter: n });
|
|
2258
2259
|
return r.current = { onSubmit: t, onEscape: e, submitOnEnter: n }, R(() => {
|
|
2259
2260
|
const i = () => {
|
|
@@ -2298,7 +2299,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2298
2299
|
)
|
|
2299
2300
|
);
|
|
2300
2301
|
}, [o]), null;
|
|
2301
|
-
}, qe = (t) => Y(t) && t.getChildrenSize() === 0,
|
|
2302
|
+
}, qe = (t) => Y(t) && t.getChildrenSize() === 0, ns = () => {
|
|
2302
2303
|
const [t] = A();
|
|
2303
2304
|
return R(
|
|
2304
2305
|
() => t.registerCommand(
|
|
@@ -2315,7 +2316,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2315
2316
|
),
|
|
2316
2317
|
[t]
|
|
2317
2318
|
), null;
|
|
2318
|
-
}, Ft = /^[0-9a-f]{32}$/,
|
|
2319
|
+
}, Ft = /^[0-9a-f]{32}$/, Gl = (t, e) => `source:${t}` + (e ? `?${new URLSearchParams({ type: e.type, id: e.id })}` : ""), ze = (t) => {
|
|
2319
2320
|
if (!t) return null;
|
|
2320
2321
|
const e = t.match(/^source:([0-9a-f]{32})(?:\?(.*))?$/);
|
|
2321
2322
|
if (e) {
|
|
@@ -2347,7 +2348,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2347
2348
|
} catch {
|
|
2348
2349
|
return { projectName: o, ...i };
|
|
2349
2350
|
}
|
|
2350
|
-
}, $n = "Comment",
|
|
2351
|
+
}, $n = "Comment", os = () => {
|
|
2351
2352
|
const [t] = A();
|
|
2352
2353
|
return R(() => {
|
|
2353
2354
|
const e = (r) => {
|
|
@@ -2393,7 +2394,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2393
2394
|
}
|
|
2394
2395
|
const n = M(), o = $(n) ? n.anchor.getNode().getTopLevelElement() : ie().getLastChild();
|
|
2395
2396
|
o ? o.insertAfter(t) : ie().append(t), Nn(t);
|
|
2396
|
-
},
|
|
2397
|
+
}, rs = (t) => Sn(pe(t)), is = () => {
|
|
2397
2398
|
const [t] = A();
|
|
2398
2399
|
return R(
|
|
2399
2400
|
() => q(
|
|
@@ -2435,7 +2436,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2435
2436
|
if (!e || Je(e) && e.getIsUnlinked()) return null;
|
|
2436
2437
|
const n = W(t.focus.getNode(), ne);
|
|
2437
2438
|
return n && n.is(e) ? e : null;
|
|
2438
|
-
},
|
|
2439
|
+
}, ss = () => {
|
|
2439
2440
|
const [t] = A(), [e, n] = U(null), [o, r] = U(""), [i, s] = U(!1), a = O(null), u = O(null), d = O(null), v = O(e);
|
|
2440
2441
|
v.current = e;
|
|
2441
2442
|
const x = () => !!u.current && document.activeElement === u.current, g = H(
|
|
@@ -2570,7 +2571,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2570
2571
|
return;
|
|
2571
2572
|
}
|
|
2572
2573
|
t.update(() => {
|
|
2573
|
-
d.current && We(d.current.clone()),
|
|
2574
|
+
d.current && We(d.current.clone()), rs(y);
|
|
2574
2575
|
}), g(!0);
|
|
2575
2576
|
return;
|
|
2576
2577
|
}
|
|
@@ -2602,7 +2603,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2602
2603
|
const T = Math.max(8, Math.min(e.rect.left, window.innerWidth - Kt - 8)), E = Bt(o) !== e.url;
|
|
2603
2604
|
return fe(
|
|
2604
2605
|
/* @__PURE__ */ S(
|
|
2605
|
-
|
|
2606
|
+
ki,
|
|
2606
2607
|
{
|
|
2607
2608
|
ref: a,
|
|
2608
2609
|
className: P("md-popover md-link-popover", ae),
|
|
@@ -2677,7 +2678,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2677
2678
|
),
|
|
2678
2679
|
document.body
|
|
2679
2680
|
);
|
|
2680
|
-
},
|
|
2681
|
+
}, as = () => {
|
|
2681
2682
|
const [t] = A(), [e, n] = U(null), o = O(null), r = O(null), i = O(!1), s = H(() => {
|
|
2682
2683
|
i.current || t.getEditorState().read(() => {
|
|
2683
2684
|
let d = null;
|
|
@@ -2740,7 +2741,7 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2740
2741
|
const u = Re.some((d) => d.value === e.language) ? Re : [...Re, { value: e.language, label: e.language }];
|
|
2741
2742
|
return fe(
|
|
2742
2743
|
/* @__PURE__ */ l(
|
|
2743
|
-
|
|
2744
|
+
_i,
|
|
2744
2745
|
{
|
|
2745
2746
|
ref: r,
|
|
2746
2747
|
className: P("md-popover md-code-language", ae),
|
|
@@ -2769,8 +2770,8 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2769
2770
|
i.current = !1, a(d[0] ?? "");
|
|
2770
2771
|
},
|
|
2771
2772
|
listClassName: P("md-code-language-list", ae),
|
|
2772
|
-
valueTemplate: () => /* @__PURE__ */ S(
|
|
2773
|
-
/* @__PURE__ */ l("span", { children:
|
|
2773
|
+
valueTemplate: () => /* @__PURE__ */ S(Ei, { className: "md-code-language-button", children: [
|
|
2774
|
+
/* @__PURE__ */ l("span", { children: yr(e.language) || "Plain text" }),
|
|
2774
2775
|
/* @__PURE__ */ l(J, { icon: "expand_more" })
|
|
2775
2776
|
] })
|
|
2776
2777
|
}
|
|
@@ -2779,21 +2780,21 @@ const ji = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2779
2780
|
),
|
|
2780
2781
|
document.body
|
|
2781
2782
|
);
|
|
2782
|
-
},
|
|
2783
|
+
}, ls = { ...ur, defaultLanguage: null }, cs = () => {
|
|
2783
2784
|
const [t] = A();
|
|
2784
|
-
return R(() => mr(t,
|
|
2785
|
+
return R(() => mr(t, ls), [t]), null;
|
|
2785
2786
|
}, Ht = ge(
|
|
2786
2787
|
"INSERT_MEDIA_FILES_COMMAND"
|
|
2787
2788
|
), On = ge(
|
|
2788
2789
|
"OPEN_MEDIA_PICKER_COMMAND"
|
|
2789
|
-
),
|
|
2790
|
-
class
|
|
2790
|
+
), ds = /(^|\s)(\/)([\w-]{0,30})$/;
|
|
2791
|
+
class us extends gt {
|
|
2791
2792
|
command;
|
|
2792
2793
|
constructor(e) {
|
|
2793
2794
|
super(e.id), this.command = e;
|
|
2794
2795
|
}
|
|
2795
2796
|
}
|
|
2796
|
-
const
|
|
2797
|
+
const ms = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), ps = ms ? "⌘" : "Ctrl+", gs = ({
|
|
2797
2798
|
placement: t = "inline",
|
|
2798
2799
|
menuParent: e,
|
|
2799
2800
|
mentionTriggers: n = [],
|
|
@@ -2888,7 +2889,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2888
2889
|
icon: "code",
|
|
2889
2890
|
group: "blocks",
|
|
2890
2891
|
keywords: ["code", "inline", "monospace"],
|
|
2891
|
-
hint: `${
|
|
2892
|
+
hint: `${ps}E`,
|
|
2892
2893
|
run: (m) => m.dispatchCommand(dt, "code")
|
|
2893
2894
|
},
|
|
2894
2895
|
{
|
|
@@ -2936,10 +2937,10 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2936
2937
|
(c) => !f || c.label.toLowerCase().startsWith(f) || [...c.label.toLowerCase().split(/\s+/), ...c.keywords].some(
|
|
2937
2938
|
(m) => m.startsWith(f)
|
|
2938
2939
|
)
|
|
2939
|
-
).map((c) => new
|
|
2940
|
+
).map((c) => new us(c));
|
|
2940
2941
|
}, [v, a]), g = H((f) => {
|
|
2941
2942
|
if (Be()) return null;
|
|
2942
|
-
const c =
|
|
2943
|
+
const c = ds.exec(f);
|
|
2943
2944
|
return c ? {
|
|
2944
2945
|
leadOffset: c.index + c[1].length,
|
|
2945
2946
|
matchingString: c[3],
|
|
@@ -3017,7 +3018,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3017
3018
|
}, xt = (t) => t.slice(0, 7), Rn = (t) => {
|
|
3018
3019
|
const e = t.match(/^#L(\d+)(?:C\d+)?(?:-L(\d+))?/);
|
|
3019
3020
|
return e ? e[2] ? `:${e[1]}-${e[2]}` : `:${e[1]}` : "";
|
|
3020
|
-
}, In = (t) => V(t[t.length - 1] || ""),
|
|
3021
|
+
}, In = (t) => V(t[t.length - 1] || ""), hs = /* @__PURE__ */ new Set([
|
|
3021
3022
|
"about",
|
|
3022
3023
|
"apps",
|
|
3023
3024
|
"collections",
|
|
@@ -3038,9 +3039,9 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3038
3039
|
"sponsors",
|
|
3039
3040
|
"topics",
|
|
3040
3041
|
"trending"
|
|
3041
|
-
]),
|
|
3042
|
+
]), fs = (t, e) => {
|
|
3042
3043
|
const [n, o, r, ...i] = e;
|
|
3043
|
-
if (!n ||
|
|
3044
|
+
if (!n || hs.has(n)) return null;
|
|
3044
3045
|
if (!o) return n;
|
|
3045
3046
|
switch (r) {
|
|
3046
3047
|
case void 0:
|
|
@@ -3067,7 +3068,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3067
3068
|
default:
|
|
3068
3069
|
return null;
|
|
3069
3070
|
}
|
|
3070
|
-
},
|
|
3071
|
+
}, bs = (t, e) => {
|
|
3071
3072
|
const n = e.indexOf("-");
|
|
3072
3073
|
if (n < 2) return e.length >= 2 ? e[e.length - 1] : null;
|
|
3073
3074
|
const o = e[n - 1], [r, i, ...s] = e.slice(n + 1);
|
|
@@ -3089,10 +3090,10 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3089
3090
|
default:
|
|
3090
3091
|
return null;
|
|
3091
3092
|
}
|
|
3092
|
-
},
|
|
3093
|
+
}, ys = (t, e) => {
|
|
3093
3094
|
const [, n, o, r] = e;
|
|
3094
3095
|
return n ? o === "pull-requests" && r ? `${n} #${r}` : o === "issues" && r ? `${n} #${r}` : o === "commits" && r ? `${n}@${xt(r)}` : o ? null : n : null;
|
|
3095
|
-
}, jt = /^[A-Z][A-Z0-9_]+-\d+$/,
|
|
3096
|
+
}, jt = /^[A-Z][A-Z0-9_]+-\d+$/, vs = (t, e) => {
|
|
3096
3097
|
const n = e.find((o) => jt.test(o)) || t.searchParams.get("selectedIssue");
|
|
3097
3098
|
if (n && jt.test(n)) return n;
|
|
3098
3099
|
if (e[0] === "wiki") {
|
|
@@ -3101,48 +3102,48 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3101
3102
|
if (e[1] === "spaces" && e[2]) return `${e[2]} space`;
|
|
3102
3103
|
}
|
|
3103
3104
|
return null;
|
|
3104
|
-
},
|
|
3105
|
+
}, xs = (t, e) => {
|
|
3105
3106
|
const [, n, o, r] = e;
|
|
3106
3107
|
return n === "issue" && o ? r ? `${o} ${le(r)}` : o : n === "project" && o ? le(o.replace(/-[0-9a-f]{8,}$/, "")) : null;
|
|
3107
|
-
},
|
|
3108
|
+
}, ks = (t, e) => {
|
|
3108
3109
|
const o = e[e.length - 1]?.replace(/-?[0-9a-f]{32}$/i, "");
|
|
3109
3110
|
return o ? le(o) : null;
|
|
3110
|
-
},
|
|
3111
|
+
}, ws = (t, e) => {
|
|
3111
3112
|
const [n, , o] = e;
|
|
3112
3113
|
return ["file", "design", "proto", "board", "slides"].includes(n || "") && o ? `${V(o).replace(/-/g, " ")} (Figma)` : null;
|
|
3113
|
-
},
|
|
3114
|
+
}, _s = (t, e) => {
|
|
3114
3115
|
const [n, , o] = e;
|
|
3115
3116
|
return !o || !["c", "b"].includes(n || "") ? null : le(n === "c" ? o.replace(/^\d+-/, "") : o);
|
|
3116
|
-
},
|
|
3117
|
+
}, Es = (t, e) => {
|
|
3117
3118
|
const n = e.indexOf("detail");
|
|
3118
3119
|
if (n >= 0 && e[n + 1] && /^\d+$/.test(e[n + 2] || ""))
|
|
3119
3120
|
return `${V(e[n + 1]).replace(/_/g, " ")} ${e[n + 2]}`;
|
|
3120
3121
|
const o = t.hash.match(/^#([A-Za-z]+(?:_[A-Za-z]+)*)_(\d+)/);
|
|
3121
3122
|
return o ? `${o[1].replace(/_/g, " ")} ${o[2]}` : null;
|
|
3122
|
-
},
|
|
3123
|
+
}, Cs = (t, e) => e[0] === "questions" && e[2] ? le(e[2]) : null, Ts = (t, e) => e[0] === "t" && e[1] && !/^\d+$/.test(e[1]) ? le(e[1]) : null, Ls = {
|
|
3123
3124
|
document: "Google Doc",
|
|
3124
3125
|
spreadsheets: "Google Sheet",
|
|
3125
3126
|
presentation: "Google Slides",
|
|
3126
3127
|
forms: "Google Form",
|
|
3127
3128
|
drawings: "Google Drawing"
|
|
3128
|
-
},
|
|
3129
|
+
}, Ms = (t, e) => t.hostname === "docs.google.com" ? Ls[e[0]] ?? null : e.includes("folders") ? "Google Drive folder" : e[0] === "file" ? "Google Drive file" : null, $s = (t, e) => {
|
|
3129
3130
|
const n = e[e.length - 1];
|
|
3130
3131
|
return e.length >= 3 && n?.includes(".") ? V(n) : null;
|
|
3131
|
-
},
|
|
3132
|
-
[/^(www\.)?github\.com$/,
|
|
3133
|
-
[/^(www\.)?gitlab\.com$|^gitlab\./,
|
|
3134
|
-
[/^(www\.)?bitbucket\.org$/,
|
|
3135
|
-
[/\.atlassian\.net$/,
|
|
3136
|
-
[/^(www\.)?linear\.app$/,
|
|
3137
|
-
[/^(www\.)?notion\.so$|\.notion\.site$/,
|
|
3138
|
-
[/^(www\.)?figma\.com$/,
|
|
3139
|
-
[/^(www\.)?trello\.com$/,
|
|
3140
|
-
[/\.shotgrid\.autodesk\.com$|\.shotgunstudio\.com$/,
|
|
3141
|
-
[/^(www\.)?stackoverflow\.com$/,
|
|
3142
|
-
[/^community\.ynput\.io$|^(forum|forums|community|discourse)\./,
|
|
3143
|
-
[/^(docs|drive)\.google\.com$/,
|
|
3144
|
-
[/^(www\.)?dropbox\.com$/,
|
|
3145
|
-
],
|
|
3132
|
+
}, Ns = [
|
|
3133
|
+
[/^(www\.)?github\.com$/, fs],
|
|
3134
|
+
[/^(www\.)?gitlab\.com$|^gitlab\./, bs],
|
|
3135
|
+
[/^(www\.)?bitbucket\.org$/, ys],
|
|
3136
|
+
[/\.atlassian\.net$/, vs],
|
|
3137
|
+
[/^(www\.)?linear\.app$/, xs],
|
|
3138
|
+
[/^(www\.)?notion\.so$|\.notion\.site$/, ks],
|
|
3139
|
+
[/^(www\.)?figma\.com$/, ws],
|
|
3140
|
+
[/^(www\.)?trello\.com$/, _s],
|
|
3141
|
+
[/\.shotgrid\.autodesk\.com$|\.shotgunstudio\.com$/, Es],
|
|
3142
|
+
[/^(www\.)?stackoverflow\.com$/, Cs],
|
|
3143
|
+
[/^community\.ynput\.io$|^(forum|forums|community|discourse)\./, Ts],
|
|
3144
|
+
[/^(docs|drive)\.google\.com$/, Ms],
|
|
3145
|
+
[/^(www\.)?dropbox\.com$/, $s]
|
|
3146
|
+
], Ss = (t) => {
|
|
3146
3147
|
if (ze(t)) return $n;
|
|
3147
3148
|
let e;
|
|
3148
3149
|
try {
|
|
@@ -3151,11 +3152,11 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3151
3152
|
return null;
|
|
3152
3153
|
}
|
|
3153
3154
|
if (e.protocol !== "https:" && e.protocol !== "http:") return null;
|
|
3154
|
-
const n = e.hostname.toLowerCase(), o =
|
|
3155
|
+
const n = e.hostname.toLowerCase(), o = Ns.find(([s]) => s.test(n))?.[1];
|
|
3155
3156
|
if (!o) return null;
|
|
3156
3157
|
const r = e.pathname.split("/").filter(Boolean);
|
|
3157
3158
|
return o(e, r)?.replace(/[[\]]/g, "").trim() || null;
|
|
3158
|
-
},
|
|
3159
|
+
}, Os = () => {
|
|
3159
3160
|
const [t] = A();
|
|
3160
3161
|
return R(
|
|
3161
3162
|
() => t.registerCommand(
|
|
@@ -3164,7 +3165,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3164
3165
|
if (!(e instanceof ClipboardEvent) || !e.clipboardData) return !1;
|
|
3165
3166
|
const n = e.clipboardData.getData("text/plain").trim();
|
|
3166
3167
|
if (!n || /\s/.test(n)) return !1;
|
|
3167
|
-
const o =
|
|
3168
|
+
const o = Ss(n);
|
|
3168
3169
|
if (!o) return !1;
|
|
3169
3170
|
const r = M();
|
|
3170
3171
|
return !$(r) || !r.isCollapsed() || Be() || W(r.anchor.getNode(), ne) ? !1 : (e.preventDefault(), r.insertNodes([cn(n).append(Ce(o))]), !0);
|
|
@@ -3174,7 +3175,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3174
3175
|
),
|
|
3175
3176
|
[t]
|
|
3176
3177
|
), null;
|
|
3177
|
-
},
|
|
3178
|
+
}, Rs = () => {
|
|
3178
3179
|
const [t] = A();
|
|
3179
3180
|
return R(() => {
|
|
3180
3181
|
const e = (n) => {
|
|
@@ -3193,7 +3194,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3193
3194
|
t.registerMutationListener(un, e, { skipInitialization: !1 })
|
|
3194
3195
|
);
|
|
3195
3196
|
}, [t]), null;
|
|
3196
|
-
},
|
|
3197
|
+
}, Is = (t) => {
|
|
3197
3198
|
const e = window.getSelection(), n = e?.rangeCount ? e.getRangeAt(0) : null;
|
|
3198
3199
|
let o = n?.getBoundingClientRect();
|
|
3199
3200
|
if (!o || !o.width && !o.height) {
|
|
@@ -3201,7 +3202,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3201
3202
|
o = (i && t?.contains(i) ? i : t)?.getBoundingClientRect();
|
|
3202
3203
|
}
|
|
3203
3204
|
return o ? { top: o.bottom + 6, left: o.left } : null;
|
|
3204
|
-
},
|
|
3205
|
+
}, As = ({ onUploadMedia: t, onFiles: e }) => {
|
|
3205
3206
|
const [n] = A(), o = O(null), r = O({ onUploadMedia: t, onFiles: e });
|
|
3206
3207
|
r.current = { onUploadMedia: t, onFiles: e };
|
|
3207
3208
|
const [i, s] = U(null), a = O(i);
|
|
@@ -3254,10 +3255,10 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3254
3255
|
n.registerCommand(
|
|
3255
3256
|
rn,
|
|
3256
3257
|
(h) => {
|
|
3257
|
-
const f = h.filter(
|
|
3258
|
+
const f = h.filter(Ar);
|
|
3258
3259
|
if (!f.length || !r.current.onFiles) return !1;
|
|
3259
3260
|
r.current.onFiles(h);
|
|
3260
|
-
const c =
|
|
3261
|
+
const c = Is(n.getRootElement());
|
|
3261
3262
|
return c && s({ files: f, rect: c }), !0;
|
|
3262
3263
|
},
|
|
3263
3264
|
Z
|
|
@@ -3282,7 +3283,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3282
3283
|
return /* @__PURE__ */ S(me, { children: [
|
|
3283
3284
|
i && fe(
|
|
3284
3285
|
/* @__PURE__ */ S(
|
|
3285
|
-
|
|
3286
|
+
wi,
|
|
3286
3287
|
{
|
|
3287
3288
|
className: P("md-popover md-inline-prompt", ae),
|
|
3288
3289
|
style: { top: i.rect.top, left: i.rect.left },
|
|
@@ -3317,9 +3318,9 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3317
3318
|
}
|
|
3318
3319
|
)
|
|
3319
3320
|
] });
|
|
3320
|
-
},
|
|
3321
|
+
}, Ds = new RegExp(
|
|
3321
3322
|
`\\[[^\\]\\n]+\\]\\(@?(${ht.join("|")}):[^)\\s]+\\)`
|
|
3322
|
-
),
|
|
3323
|
+
), Ps = ({ onFiles: t }) => {
|
|
3323
3324
|
const [e] = A(), n = O(t);
|
|
3324
3325
|
return n.current = t, R(() => {
|
|
3325
3326
|
const o = (r) => {
|
|
@@ -3347,7 +3348,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3347
3348
|
const { clipboardData: i } = r;
|
|
3348
3349
|
if (i.types.includes("application/x-lexical-editor") || i.types.includes("text/html")) return !1;
|
|
3349
3350
|
const s = i.getData("text/plain");
|
|
3350
|
-
if (!s || !
|
|
3351
|
+
if (!s || !Ds.test(s)) return !1;
|
|
3351
3352
|
const a = M();
|
|
3352
3353
|
if (!$(a)) return !1;
|
|
3353
3354
|
r.preventDefault();
|
|
@@ -3363,7 +3364,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3363
3364
|
)
|
|
3364
3365
|
);
|
|
3365
3366
|
}, [e]), null;
|
|
3366
|
-
},
|
|
3367
|
+
}, Bs = ({ value: t, onChange: e, handleRef: n }) => {
|
|
3367
3368
|
const [o] = A(), r = O(t), i = O(e);
|
|
3368
3369
|
return i.current = e, R(
|
|
3369
3370
|
() => o.registerUpdateListener(({ editorState: s, dirtyElements: a, dirtyLeaves: u, tags: d }) => {
|
|
@@ -3387,20 +3388,20 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3387
3388
|
clear: () => {
|
|
3388
3389
|
o.update(() => ie().clear());
|
|
3389
3390
|
},
|
|
3390
|
-
isEmpty: () => o.getEditorState().read(() =>
|
|
3391
|
+
isEmpty: () => o.getEditorState().read(() => gi()),
|
|
3391
3392
|
insertMentionTrigger: (s) => {
|
|
3392
3393
|
o.focus(() => o.dispatchCommand(vt, s));
|
|
3393
3394
|
}
|
|
3394
3395
|
}),
|
|
3395
3396
|
[o]
|
|
3396
3397
|
), null;
|
|
3397
|
-
},
|
|
3398
|
+
}, zs = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, Fs = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, Ks = [
|
|
3398
3399
|
Lt(
|
|
3399
|
-
|
|
3400
|
+
zs,
|
|
3400
3401
|
(t) => t.startsWith("http") ? t : `https://${t}`
|
|
3401
3402
|
),
|
|
3402
|
-
Lt(
|
|
3403
|
-
],
|
|
3403
|
+
Lt(Fs, (t) => `mailto:${t}`)
|
|
3404
|
+
], Us = (t) => /^(https?:|mailto:|\/|#)/i.test(t), Hs = [
|
|
3404
3405
|
No,
|
|
3405
3406
|
So,
|
|
3406
3407
|
an,
|
|
@@ -3412,7 +3413,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3412
3413
|
be,
|
|
3413
3414
|
ye,
|
|
3414
3415
|
ve
|
|
3415
|
-
],
|
|
3416
|
+
], js = ({ editable: t }) => {
|
|
3416
3417
|
const [e] = A();
|
|
3417
3418
|
return R(() => e.setEditable(t), [e, t]), null;
|
|
3418
3419
|
}, de = {
|
|
@@ -3435,7 +3436,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3435
3436
|
minHeight: 20,
|
|
3436
3437
|
maxHeight: 400
|
|
3437
3438
|
}
|
|
3438
|
-
},
|
|
3439
|
+
}, Gs = Qt(
|
|
3439
3440
|
({
|
|
3440
3441
|
variant: t = "document",
|
|
3441
3442
|
value: e,
|
|
@@ -3475,8 +3476,8 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3475
3476
|
() => ho({
|
|
3476
3477
|
name: N,
|
|
3477
3478
|
namespace: N,
|
|
3478
|
-
theme:
|
|
3479
|
-
nodes:
|
|
3479
|
+
theme: _r,
|
|
3480
|
+
nodes: Hs,
|
|
3480
3481
|
editable: !b,
|
|
3481
3482
|
$initialEditorState: () => et(e || ""),
|
|
3482
3483
|
// the react extension renders the decorator nodes (media, youtube)
|
|
@@ -3492,7 +3493,7 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3492
3493
|
// the content editable is rendered below, inside the editor layout
|
|
3493
3494
|
/* @__PURE__ */ S(fo, { extension: we, contentEditable: null, children: [
|
|
3494
3495
|
/* @__PURE__ */ S(
|
|
3495
|
-
|
|
3496
|
+
bi,
|
|
3496
3497
|
{
|
|
3497
3498
|
className: P("md-editor", "block-shortcuts", `md-editor-${t}`, G, {
|
|
3498
3499
|
bordered: L,
|
|
@@ -3508,14 +3509,14 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3508
3509
|
end: p
|
|
3509
3510
|
}
|
|
3510
3511
|
),
|
|
3511
|
-
/* @__PURE__ */ S(
|
|
3512
|
-
/* @__PURE__ */ l(
|
|
3512
|
+
/* @__PURE__ */ S(Ci, { children: [
|
|
3513
|
+
/* @__PURE__ */ l(Li, { style: { minHeight: I, maxHeight: F }, children: /* @__PURE__ */ l($i, { children: /* @__PURE__ */ l(
|
|
3513
3514
|
bo,
|
|
3514
3515
|
{
|
|
3515
3516
|
className: P("md-content", xe),
|
|
3516
3517
|
style: { minHeight: I },
|
|
3517
3518
|
"aria-placeholder": o,
|
|
3518
|
-
placeholder: /* @__PURE__ */ l(
|
|
3519
|
+
placeholder: /* @__PURE__ */ l(Mi, { className: "md-placeholder", children: o })
|
|
3519
3520
|
}
|
|
3520
3521
|
) }) }),
|
|
3521
3522
|
k && /* @__PURE__ */ l("div", { className: "md-actions", children: k })
|
|
@@ -3524,38 +3525,38 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3524
3525
|
]
|
|
3525
3526
|
}
|
|
3526
3527
|
),
|
|
3527
|
-
/* @__PURE__ */ l(
|
|
3528
|
+
/* @__PURE__ */ l(js, { editable: !b }),
|
|
3528
3529
|
/* @__PURE__ */ l(yo, {}),
|
|
3529
3530
|
/* @__PURE__ */ l(vo, {}),
|
|
3530
3531
|
/* @__PURE__ */ l(xo, {}),
|
|
3531
3532
|
/* @__PURE__ */ l(Eo, { maxIndent: 5 }),
|
|
3532
|
-
/* @__PURE__ */ l(ko, { validateUrl:
|
|
3533
|
-
/* @__PURE__ */ l(wo, { matchers:
|
|
3534
|
-
/* @__PURE__ */ l(
|
|
3535
|
-
/* @__PURE__ */ l(
|
|
3536
|
-
!b && /* @__PURE__ */ l(is, {}),
|
|
3533
|
+
/* @__PURE__ */ l(ko, { validateUrl: Us }),
|
|
3534
|
+
/* @__PURE__ */ l(wo, { matchers: Ks }),
|
|
3535
|
+
/* @__PURE__ */ l(os, {}),
|
|
3536
|
+
/* @__PURE__ */ l(Rs, {}),
|
|
3537
3537
|
!b && /* @__PURE__ */ l(ss, {}),
|
|
3538
|
-
/* @__PURE__ */ l(
|
|
3539
|
-
|
|
3540
|
-
!b && /* @__PURE__ */ l(
|
|
3541
|
-
|
|
3538
|
+
!b && /* @__PURE__ */ l(as, {}),
|
|
3539
|
+
/* @__PURE__ */ l(cs, {}),
|
|
3540
|
+
!b && /* @__PURE__ */ l(is, {}),
|
|
3541
|
+
!b && /* @__PURE__ */ l(Os, {}),
|
|
3542
|
+
u && !b && /* @__PURE__ */ l(As, { onUploadMedia: u, onFiles: a }),
|
|
3542
3543
|
/* @__PURE__ */ l(_o, { transformers: Pe }),
|
|
3543
|
-
/* @__PURE__ */ l(
|
|
3544
|
-
/* @__PURE__ */ l(Vi, {}),
|
|
3544
|
+
/* @__PURE__ */ l(es, {}),
|
|
3545
3545
|
/* @__PURE__ */ l(Ji, {}),
|
|
3546
|
-
/* @__PURE__ */ l(
|
|
3547
|
-
/* @__PURE__ */ l(
|
|
3546
|
+
/* @__PURE__ */ l(Xi, {}),
|
|
3547
|
+
/* @__PURE__ */ l(ns, {}),
|
|
3548
|
+
/* @__PURE__ */ l(ts, { onSubmit: r, onEscape: s, submitOnEnter: i }),
|
|
3548
3549
|
T && !b && /* @__PURE__ */ l(
|
|
3549
3550
|
zt,
|
|
3550
3551
|
{
|
|
3551
3552
|
floating: !0,
|
|
3552
|
-
layout: Array.isArray(T) ? T :
|
|
3553
|
+
layout: Array.isArray(T) ? T : Lr
|
|
3553
3554
|
}
|
|
3554
3555
|
),
|
|
3555
|
-
/* @__PURE__ */ l(
|
|
3556
|
-
/* @__PURE__ */ l(
|
|
3556
|
+
/* @__PURE__ */ l(Ps, { onFiles: a }),
|
|
3557
|
+
/* @__PURE__ */ l(Bs, { value: e, onChange: n, handleRef: Te }),
|
|
3557
3558
|
h && !b && /* @__PURE__ */ l(
|
|
3558
|
-
|
|
3559
|
+
gs,
|
|
3559
3560
|
{
|
|
3560
3561
|
placement: x,
|
|
3561
3562
|
menuParent: v,
|
|
@@ -3565,29 +3566,29 @@ const us = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3565
3566
|
customCommands: f
|
|
3566
3567
|
}
|
|
3567
3568
|
),
|
|
3568
|
-
g && !b && /* @__PURE__ */ l(
|
|
3569
|
+
g && !b && /* @__PURE__ */ l(Gi, { placement: x, menuParent: v }),
|
|
3569
3570
|
d && /* @__PURE__ */ l(
|
|
3570
|
-
|
|
3571
|
+
Fi,
|
|
3571
3572
|
{
|
|
3572
3573
|
source: d,
|
|
3573
3574
|
menuParent: v,
|
|
3574
3575
|
placement: x
|
|
3575
3576
|
}
|
|
3576
3577
|
),
|
|
3577
|
-
(c || m) && /* @__PURE__ */ l(
|
|
3578
|
+
(c || m) && /* @__PURE__ */ l(Wi, { onMentionClick: c, onMentionHover: m }),
|
|
3578
3579
|
C && /* @__PURE__ */ l(Co, { defaultSelection: "rootEnd" }),
|
|
3579
3580
|
ke
|
|
3580
3581
|
] })
|
|
3581
3582
|
);
|
|
3582
3583
|
}
|
|
3583
3584
|
);
|
|
3584
|
-
|
|
3585
|
-
const
|
|
3585
|
+
Gs.displayName = "MarkdownEditor";
|
|
3586
|
+
const Ws = (t, e) => {
|
|
3586
3587
|
const n = t.item || t, o = e.item || e, r = new Date(n.createdAt), i = new Date(o.createdAt), s = Ie(r) && Ie(i), a = s && Yt(r, i);
|
|
3587
3588
|
return !s || a ? n.relevance > o.relevance ? -1 : n.relevance < o.relevance ? 1 : String(o.label).localeCompare(String(n.label)) : zn(i, r) ? -1 : 1;
|
|
3588
|
-
},
|
|
3589
|
+
}, Ys = (t, e) => t.relevance > e.relevance ? -1 : t.relevance < e.relevance ? 1 : t.label?.localeCompare(e.label), qs = ["team:", "user:"], Qs = (t) => {
|
|
3589
3590
|
if (!t) return { typeFilter: null, search: void 0 };
|
|
3590
|
-
for (const e of
|
|
3591
|
+
for (const e of qs)
|
|
3591
3592
|
if (t.startsWith(e))
|
|
3592
3593
|
return {
|
|
3593
3594
|
typeFilter: e.slice(0, -1),
|
|
@@ -3595,12 +3596,12 @@ const Gs = (t, e) => {
|
|
|
3595
3596
|
search: t.slice(e.length) || void 0
|
|
3596
3597
|
};
|
|
3597
3598
|
return { typeFilter: null, search: t };
|
|
3598
|
-
},
|
|
3599
|
+
}, Vs = (t, e = {}, n) => {
|
|
3599
3600
|
if (!(t in e)) return [];
|
|
3600
3601
|
const o = e[t]() || [];
|
|
3601
|
-
let r =
|
|
3602
|
-
t === "@@" && (r =
|
|
3603
|
-
const { typeFilter: i, search: s } =
|
|
3602
|
+
let r = Ys;
|
|
3603
|
+
t === "@@" && (r = Ws);
|
|
3604
|
+
const { typeFilter: i, search: s } = Qs(n), a = i ? o.filter((h) => h.type === i) : o, u = Qn(s || "");
|
|
3604
3605
|
if (!u.length) return a.sort(r);
|
|
3605
3606
|
const d = (h, f) => Yn(h, f, {
|
|
3606
3607
|
keys: ["label", "context", "keywords"],
|
|
@@ -3609,7 +3610,7 @@ const Gs = (t, e) => {
|
|
|
3609
3610
|
for (let h = 0; h < g; h++)
|
|
3610
3611
|
v.forEach((f) => f[h] && x.add(f[h]));
|
|
3611
3612
|
return [...x];
|
|
3612
|
-
},
|
|
3613
|
+
}, Js = (t = [], e = []) => {
|
|
3613
3614
|
const n = t.map((r) => ({
|
|
3614
3615
|
type: "user",
|
|
3615
3616
|
id: r.name,
|
|
@@ -3626,7 +3627,7 @@ const Gs = (t, e) => {
|
|
|
3626
3627
|
suffix: "Team"
|
|
3627
3628
|
}));
|
|
3628
3629
|
return [...n, ...o];
|
|
3629
|
-
},
|
|
3630
|
+
}, Xs = (t = [], e = []) => t.map((n) => {
|
|
3630
3631
|
const o = e.find((x) => x.name === n.taskType), r = o?.icon || it("task"), i = o?.color, s = n.label || n.name, a = n.parent?.name, d = `${a} ${s} ${n.taskType}`, v = [n.name, n.taskType, n.label, n.parent?.name, d];
|
|
3631
3632
|
return {
|
|
3632
3633
|
type: "task",
|
|
@@ -3638,13 +3639,13 @@ const Gs = (t, e) => {
|
|
|
3638
3639
|
keywords: v,
|
|
3639
3640
|
relevance: n.relevance
|
|
3640
3641
|
};
|
|
3641
|
-
}),
|
|
3642
|
+
}), Zs = (t) => {
|
|
3642
3643
|
let e = Fn(t, { addSuffix: !0 });
|
|
3643
3644
|
return e = e.replace("about", ""), e = e.replace("minutes", "mins"), e = e.replace("minute", "min"), e = e.replace(" ago", ""), Yt(t, /* @__PURE__ */ new Date()) && (e = "Just now"), e;
|
|
3644
|
-
},
|
|
3645
|
+
}, ea = (t = [], e) => t?.map((n) => {
|
|
3645
3646
|
if (!n.parent)
|
|
3646
3647
|
return null;
|
|
3647
|
-
const r = e.productTypes?.find((v) => v.name === n.parent?.productType)?.icon || it("version"), i = n.parent?.name, s = n.name || n.version, a = n.createdAt &&
|
|
3648
|
+
const r = e.productTypes?.find((v) => v.name === n.parent?.productType)?.icon || it("version"), i = n.parent?.name, s = n.name || n.version, a = n.createdAt && Zs(new Date(n.createdAt)), u = `${i} ${s} ${a}`, d = [n.name, n.version, n.parent?.name, u];
|
|
3648
3649
|
return {
|
|
3649
3650
|
type: "version",
|
|
3650
3651
|
id: n.id,
|
|
@@ -3656,25 +3657,25 @@ const Gs = (t, e) => {
|
|
|
3656
3657
|
keywords: d,
|
|
3657
3658
|
relevance: n.relevance
|
|
3658
3659
|
};
|
|
3659
|
-
}),
|
|
3660
|
+
}), Wl = ({
|
|
3660
3661
|
suggestions: t = {},
|
|
3661
3662
|
// version options read the product types
|
|
3662
3663
|
project: e = { productTypes: [] },
|
|
3663
3664
|
taskTypes: n = [],
|
|
3664
3665
|
entityType: o
|
|
3665
3666
|
}) => ({
|
|
3666
|
-
getOptions: ({ trigger: r, search: i, filter: s }) =>
|
|
3667
|
+
getOptions: ({ trigger: r, search: i, filter: s }) => Vs(
|
|
3667
3668
|
r,
|
|
3668
3669
|
{
|
|
3669
|
-
"@": () =>
|
|
3670
|
-
"@@": () =>
|
|
3671
|
-
"@@@": () =>
|
|
3670
|
+
"@": () => Js(t.users, t.teams),
|
|
3671
|
+
"@@": () => ea(t.versions, e),
|
|
3672
|
+
"@@@": () => Xs(t.tasks, n)
|
|
3672
3673
|
},
|
|
3673
3674
|
// the helper understands `team:` / `user:` prefixes
|
|
3674
3675
|
(s ? `${s}:` : "") + i || void 0
|
|
3675
3676
|
).filter((u) => !!u),
|
|
3676
3677
|
getError: (r) => r === "@@" && o === "folder" ? "Version mentions are disabled for folders" : null
|
|
3677
|
-
}),
|
|
3678
|
+
}), ta = w.span`
|
|
3678
3679
|
gap: 2px;
|
|
3679
3680
|
display: inline-flex;
|
|
3680
3681
|
border-radius: var(--border-radius-m);
|
|
@@ -3746,7 +3747,7 @@ const Gs = (t, e) => {
|
|
|
3746
3747
|
}) => {
|
|
3747
3748
|
const x = r || (e === "user" ? "alternate_email" : e === "team" ? "group" : it(e, "link")), g = O(null);
|
|
3748
3749
|
return /* @__PURE__ */ S(
|
|
3749
|
-
|
|
3750
|
+
ta,
|
|
3750
3751
|
{
|
|
3751
3752
|
...v,
|
|
3752
3753
|
$variant: n,
|
|
@@ -3767,7 +3768,7 @@ const Gs = (t, e) => {
|
|
|
3767
3768
|
]
|
|
3768
3769
|
}
|
|
3769
3770
|
);
|
|
3770
|
-
},
|
|
3771
|
+
}, na = w(J)`
|
|
3771
3772
|
cursor: pointer;
|
|
3772
3773
|
user-select: none;
|
|
3773
3774
|
font-size: 24px;
|
|
@@ -3785,8 +3786,8 @@ const Gs = (t, e) => {
|
|
|
3785
3786
|
&.readOnly {
|
|
3786
3787
|
cursor: default;
|
|
3787
3788
|
}
|
|
3788
|
-
`,
|
|
3789
|
-
|
|
3789
|
+
`, oa = ({ checked: t, isReadOnly: e, ...n }) => /* @__PURE__ */ l(
|
|
3790
|
+
na,
|
|
3790
3791
|
{
|
|
3791
3792
|
...n,
|
|
3792
3793
|
icon: t ? "check_circle" : "radio_button_unchecked",
|
|
@@ -3879,11 +3880,11 @@ const Gs = (t, e) => {
|
|
|
3879
3880
|
"End of last year"
|
|
3880
3881
|
);
|
|
3881
3882
|
}
|
|
3882
|
-
},
|
|
3883
|
-
id:
|
|
3883
|
+
}, ra = "custom-range", ia = "tune", sa = {
|
|
3884
|
+
id: ra,
|
|
3884
3885
|
label: "Custom range...",
|
|
3885
3886
|
values: [],
|
|
3886
|
-
icon:
|
|
3887
|
+
icon: ia
|
|
3887
3888
|
}, An = () => [
|
|
3888
3889
|
{
|
|
3889
3890
|
id: "today",
|
|
@@ -3945,10 +3946,10 @@ const Gs = (t, e) => {
|
|
|
3945
3946
|
values: z["last-year"](),
|
|
3946
3947
|
icon: "calendar_month"
|
|
3947
3948
|
}
|
|
3948
|
-
],
|
|
3949
|
-
|
|
3949
|
+
], Yl = An(), aa = () => [
|
|
3950
|
+
sa,
|
|
3950
3951
|
...An()
|
|
3951
|
-
],
|
|
3952
|
+
], ql = aa(), Ql = (t, e) => {
|
|
3952
3953
|
if (!t || !e) return null;
|
|
3953
3954
|
try {
|
|
3954
3955
|
const n = B(t), o = B(e);
|
|
@@ -4026,7 +4027,7 @@ const Gs = (t, e) => {
|
|
|
4026
4027
|
} catch {
|
|
4027
4028
|
return null;
|
|
4028
4029
|
}
|
|
4029
|
-
},
|
|
4030
|
+
}, la = w.label`
|
|
4030
4031
|
cursor: pointer;
|
|
4031
4032
|
position: relative;
|
|
4032
4033
|
right: 2rem;
|
|
@@ -4053,10 +4054,10 @@ const Gs = (t, e) => {
|
|
|
4053
4054
|
font-variation-settings: 'FILL' 1;
|
|
4054
4055
|
}
|
|
4055
4056
|
}
|
|
4056
|
-
`,
|
|
4057
|
+
`, ca = ({ checked: t, onChange: e }) => /* @__PURE__ */ S(la, { className: P({ checked: t }), children: [
|
|
4057
4058
|
/* @__PURE__ */ l("input", { checked: t, disabled: !1, onChange: e, type: "checkbox" }),
|
|
4058
|
-
/* @__PURE__ */ l(
|
|
4059
|
-
] }),
|
|
4059
|
+
/* @__PURE__ */ l(oa, { checked: t })
|
|
4060
|
+
] }), da = ({
|
|
4060
4061
|
projectName: t,
|
|
4061
4062
|
activityId: e,
|
|
4062
4063
|
entityId: n,
|
|
@@ -4082,22 +4083,21 @@ const Gs = (t, e) => {
|
|
|
4082
4083
|
children: "Source"
|
|
4083
4084
|
}
|
|
4084
4085
|
);
|
|
4085
|
-
},
|
|
4086
|
+
}, ua = ({ to: t, useNavigate: e, children: n }) => {
|
|
4086
4087
|
const o = e();
|
|
4087
4088
|
return /* @__PURE__ */ l("a", { href: t, onClick: (i) => {
|
|
4088
4089
|
i.button !== 0 || i.metaKey || i.ctrlKey || i.shiftKey || i.altKey || (i.preventDefault(), o(t));
|
|
4089
4090
|
}, children: n });
|
|
4090
|
-
},
|
|
4091
|
+
}, ma = ({ to: t, children: e }) => {
|
|
4091
4092
|
const n = Zn(dr)?.useNavigate;
|
|
4092
|
-
return n ? /* @__PURE__ */ l(
|
|
4093
|
-
},
|
|
4094
|
-
const o = new URLSearchParams(window.location.search);
|
|
4095
|
-
|
|
4096
|
-
const r = o.get("type") === "version" ? "products" : "overview";
|
|
4093
|
+
return n ? /* @__PURE__ */ l(ua, { to: t, useNavigate: n, children: e }) : /* @__PURE__ */ l("a", { href: t, children: e });
|
|
4094
|
+
}, pa = (t, e, n) => {
|
|
4095
|
+
const o = new URLSearchParams(window.location.search), r = n?.type ?? o.get("type"), i = n?.id ?? o.get("id"), s = r && i && hr({ projectName: t, entityType: r, id: i }, { activity: e });
|
|
4096
|
+
if (s) return `${window.location.origin}${s}`;
|
|
4097
4097
|
o.set("activity", e);
|
|
4098
|
-
const
|
|
4099
|
-
return
|
|
4100
|
-
},
|
|
4098
|
+
const a = new URL(`${window.location.origin}/projects/${t}/overview`);
|
|
4099
|
+
return a.search = o.toString(), a.toString();
|
|
4100
|
+
}, Vl = w.div`
|
|
4101
4101
|
/* use grid tick for auto height transition */
|
|
4102
4102
|
display: grid;
|
|
4103
4103
|
height: 100%;
|
|
@@ -4125,7 +4125,7 @@ const Gs = (t, e) => {
|
|
|
4125
4125
|
--button-color-secondary: ${e};
|
|
4126
4126
|
--button-text-color: ${no(t)};
|
|
4127
4127
|
--border-color: ${t};
|
|
4128
|
-
`,
|
|
4128
|
+
`, Jl = w.div`
|
|
4129
4129
|
/* VARS */
|
|
4130
4130
|
--background-color: var(--md-sys-color-surface-container);
|
|
4131
4131
|
--button-color: var(--md-sys-color-primary);
|
|
@@ -4223,14 +4223,14 @@ const Gs = (t, e) => {
|
|
|
4223
4223
|
/* remove outline */
|
|
4224
4224
|
outline: none;
|
|
4225
4225
|
}
|
|
4226
|
-
`,
|
|
4226
|
+
`, Xl = w.div`
|
|
4227
4227
|
padding: 4px 4px 0;
|
|
4228
|
-
`,
|
|
4228
|
+
`, Zl = w.span`
|
|
4229
4229
|
width: 1px;
|
|
4230
4230
|
height: 18px;
|
|
4231
4231
|
margin: 0 4px;
|
|
4232
4232
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
4233
|
-
`,
|
|
4233
|
+
`, ec = w.footer`
|
|
4234
4234
|
display: flex;
|
|
4235
4235
|
justify-content: space-between;
|
|
4236
4236
|
padding: var(--padding-m);
|
|
@@ -4256,7 +4256,7 @@ const Gs = (t, e) => {
|
|
|
4256
4256
|
background-color: var(--button-color);
|
|
4257
4257
|
color: var(--button-text-color);
|
|
4258
4258
|
}
|
|
4259
|
-
`,
|
|
4259
|
+
`, ga = w.div`
|
|
4260
4260
|
display: flex;
|
|
4261
4261
|
gap: var(--base-gap-small);
|
|
4262
4262
|
|
|
@@ -4271,7 +4271,7 @@ const Gs = (t, e) => {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
}
|
|
4273
4273
|
}
|
|
4274
|
-
`,
|
|
4274
|
+
`, tc = w.div`
|
|
4275
4275
|
display: inline-flex;
|
|
4276
4276
|
align-items: center;
|
|
4277
4277
|
border-radius: var(--border-radius-m);
|
|
@@ -4285,14 +4285,14 @@ const Gs = (t, e) => {
|
|
|
4285
4285
|
background-color: var(--md-sys-color-primary-container-hover);
|
|
4286
4286
|
}
|
|
4287
4287
|
}
|
|
4288
|
-
`,
|
|
4288
|
+
`, nc = w(te)`
|
|
4289
4289
|
color: inherit;
|
|
4290
4290
|
background: transparent;
|
|
4291
4291
|
|
|
4292
4292
|
&:hover {
|
|
4293
4293
|
background-color: var(--md-sys-color-primary-container-hover) !important;
|
|
4294
4294
|
}
|
|
4295
|
-
`,
|
|
4295
|
+
`, oc = w(te)`
|
|
4296
4296
|
width: 100%;
|
|
4297
4297
|
padding: 4px 6px;
|
|
4298
4298
|
white-space: nowrap;
|
|
@@ -4302,14 +4302,14 @@ const Gs = (t, e) => {
|
|
|
4302
4302
|
&:hover {
|
|
4303
4303
|
background-color: var(--md-sys-color-surface-container-low) !important;
|
|
4304
4304
|
}
|
|
4305
|
-
`,
|
|
4305
|
+
`, rc = w(to)`
|
|
4306
4306
|
min-width: 0;
|
|
4307
4307
|
padding: 4px 8px;
|
|
4308
|
-
`,
|
|
4308
|
+
`, ic = w(ga)`
|
|
4309
4309
|
margin-left: auto;
|
|
4310
4310
|
flex-shrink: 1;
|
|
4311
4311
|
overflow: hidden;
|
|
4312
|
-
`,
|
|
4312
|
+
`, sc = w.div`
|
|
4313
4313
|
position: absolute;
|
|
4314
4314
|
inset: 0;
|
|
4315
4315
|
user-select: none;
|
|
@@ -4333,18 +4333,18 @@ const Gs = (t, e) => {
|
|
|
4333
4333
|
.icon {
|
|
4334
4334
|
font-size: 40px;
|
|
4335
4335
|
}
|
|
4336
|
-
`,
|
|
4336
|
+
`, ac = w.span`
|
|
4337
4337
|
padding: 12px 15px;
|
|
4338
4338
|
/* italic */
|
|
4339
4339
|
font-style: italic;
|
|
4340
4340
|
opacity: 0.4;
|
|
4341
|
-
`,
|
|
4341
|
+
`, lc = w.div`
|
|
4342
4342
|
display: grid;
|
|
4343
4343
|
gap: var(--base-gap-medium);
|
|
4344
4344
|
grid-template-columns: 1fr 1fr;
|
|
4345
|
-
`,
|
|
4345
|
+
`, cc = w.div`
|
|
4346
4346
|
margin-top: var(--padding-m);
|
|
4347
|
-
`,
|
|
4347
|
+
`, dc = w(te)`
|
|
4348
4348
|
background: transparent;
|
|
4349
4349
|
border: solid 1px currentColor;
|
|
4350
4350
|
flex-grow: 1;
|
|
@@ -4379,7 +4379,7 @@ const Gs = (t, e) => {
|
|
|
4379
4379
|
pointer-events: none;
|
|
4380
4380
|
}
|
|
4381
4381
|
}
|
|
4382
|
-
`,
|
|
4382
|
+
`, uc = w.div`
|
|
4383
4383
|
border-radius: var(--border-radius-l);
|
|
4384
4384
|
margin-bottom: var(--padding-m);
|
|
4385
4385
|
user-select: none;
|
|
@@ -4407,7 +4407,7 @@ const Gs = (t, e) => {
|
|
|
4407
4407
|
w.div`
|
|
4408
4408
|
border-radius: var(--border-radius-m);
|
|
4409
4409
|
`;
|
|
4410
|
-
const
|
|
4410
|
+
const mc = w.li`
|
|
4411
4411
|
/* VARS */
|
|
4412
4412
|
--background-color: var(--md-sys-color-surface-container);
|
|
4413
4413
|
--button-color-secondary: var(--md-sys-color-surface-container-high);
|
|
@@ -4457,7 +4457,7 @@ const dc = w.li`
|
|
|
4457
4457
|
&.isHighlighted {
|
|
4458
4458
|
background-color: var(--md-sys-color-secondary-container);
|
|
4459
4459
|
}
|
|
4460
|
-
`,
|
|
4460
|
+
`, pc = w.div`
|
|
4461
4461
|
background-color: var(--background-color);
|
|
4462
4462
|
border-radius: var(--border-radius-m);
|
|
4463
4463
|
padding: var(--padding-m);
|
|
@@ -4680,7 +4680,7 @@ const Wt = w.pre`
|
|
|
4680
4680
|
|
|
4681
4681
|
/* syntax highlighting, same colours as the editor */
|
|
4682
4682
|
${Tn}
|
|
4683
|
-
`,
|
|
4683
|
+
`, ha = w.code`
|
|
4684
4684
|
font-family: monospace;
|
|
4685
4685
|
font-size: 0.9em;
|
|
4686
4686
|
padding: 1px 4px;
|
|
@@ -4689,7 +4689,7 @@ const Wt = w.pre`
|
|
|
4689
4689
|
color: var(--md-sys-color-tertiary);
|
|
4690
4690
|
white-space: pre-wrap;
|
|
4691
4691
|
word-break: break-word;
|
|
4692
|
-
`,
|
|
4692
|
+
`, gc = w.div`
|
|
4693
4693
|
display: flex;
|
|
4694
4694
|
position: absolute;
|
|
4695
4695
|
right: 4px;
|
|
@@ -4702,7 +4702,7 @@ const Wt = w.pre`
|
|
|
4702
4702
|
|
|
4703
4703
|
/* by default hidden */
|
|
4704
4704
|
opacity: 0;
|
|
4705
|
-
`,
|
|
4705
|
+
`, hc = w(te)`
|
|
4706
4706
|
&.hasIcon {
|
|
4707
4707
|
padding: 4px;
|
|
4708
4708
|
}
|
|
@@ -4717,7 +4717,7 @@ const Wt = w.pre`
|
|
|
4717
4717
|
position: relative;
|
|
4718
4718
|
top: -1px;
|
|
4719
4719
|
}
|
|
4720
|
-
`,
|
|
4720
|
+
`, fc = w.span`
|
|
4721
4721
|
background-color: var(--md-sys-color-secondary-container);
|
|
4722
4722
|
display: flex;
|
|
4723
4723
|
align-items: center;
|
|
@@ -4738,14 +4738,14 @@ const Wt = w.pre`
|
|
|
4738
4738
|
.icon {
|
|
4739
4739
|
font-size: 24px;
|
|
4740
4740
|
}
|
|
4741
|
-
`,
|
|
4741
|
+
`, bc = w.div`
|
|
4742
4742
|
display: flex;
|
|
4743
4743
|
align-items: center;
|
|
4744
4744
|
gap: var(--base-gap-small);
|
|
4745
4745
|
min-width: 0;
|
|
4746
4746
|
overflow-x: auto;
|
|
4747
4747
|
padding-bottom: 4px;
|
|
4748
|
-
`,
|
|
4748
|
+
`, yc = w.button`
|
|
4749
4749
|
display: inline-flex;
|
|
4750
4750
|
align-items: center;
|
|
4751
4751
|
gap: var(--base-gap-small);
|
|
@@ -4775,7 +4775,7 @@ const Wt = w.pre`
|
|
|
4775
4775
|
&:disabled {
|
|
4776
4776
|
cursor: default;
|
|
4777
4777
|
}
|
|
4778
|
-
`,
|
|
4778
|
+
`, fa = [
|
|
4779
4779
|
"user",
|
|
4780
4780
|
"team",
|
|
4781
4781
|
"task",
|
|
@@ -4784,12 +4784,12 @@ const Wt = w.pre`
|
|
|
4784
4784
|
"representation",
|
|
4785
4785
|
"workfile",
|
|
4786
4786
|
"product"
|
|
4787
|
-
],
|
|
4787
|
+
], ba = (t = "") => {
|
|
4788
4788
|
if (t.startsWith("https://")) return { url: t, type: "url" };
|
|
4789
4789
|
if (t.startsWith("/")) return { url: t, type: "relative" };
|
|
4790
4790
|
if (t.includes(":")) {
|
|
4791
4791
|
const e = t.split(":"), [n, o] = e;
|
|
4792
|
-
if (
|
|
4792
|
+
if (fa.includes(n) && o && e.length === 2) {
|
|
4793
4793
|
const r = (() => {
|
|
4794
4794
|
try {
|
|
4795
4795
|
return decodeURIComponent(o);
|
|
@@ -4801,7 +4801,7 @@ const Wt = w.pre`
|
|
|
4801
4801
|
}
|
|
4802
4802
|
}
|
|
4803
4803
|
return {};
|
|
4804
|
-
},
|
|
4804
|
+
}, ya = (t) => qt.Children.toArray(t).map((e) => typeof e == "string" || typeof e == "number" ? String(e) : "").join(""), vc = ({ children: t, href: e }, {
|
|
4805
4805
|
entityId: n,
|
|
4806
4806
|
entityType: o,
|
|
4807
4807
|
userName: r,
|
|
@@ -4819,9 +4819,9 @@ const Wt = w.pre`
|
|
|
4819
4819
|
if (h.isSource) {
|
|
4820
4820
|
const C = h.entity ?? (n && o ? { id: n, type: o } : null);
|
|
4821
4821
|
if (!s || !C) return null;
|
|
4822
|
-
const b =
|
|
4822
|
+
const b = pa(s, h.activityId, C);
|
|
4823
4823
|
return /* @__PURE__ */ l(
|
|
4824
|
-
|
|
4824
|
+
da,
|
|
4825
4825
|
{
|
|
4826
4826
|
projectName: s,
|
|
4827
4827
|
activityId: h.activityId,
|
|
@@ -4832,7 +4832,7 @@ const Wt = w.pre`
|
|
|
4832
4832
|
}
|
|
4833
4833
|
);
|
|
4834
4834
|
}
|
|
4835
|
-
const p =
|
|
4835
|
+
const p = ya(t).trim(), y = !p || /^https?:\/\//.test(p) ? $n : p, k = h;
|
|
4836
4836
|
return /* @__PURE__ */ l(
|
|
4837
4837
|
rt,
|
|
4838
4838
|
{
|
|
@@ -4847,11 +4847,11 @@ const Wt = w.pre`
|
|
|
4847
4847
|
}
|
|
4848
4848
|
);
|
|
4849
4849
|
}
|
|
4850
|
-
const { url: f, type: c, id: m } =
|
|
4850
|
+
const { url: f, type: c, id: m } = ba(e);
|
|
4851
4851
|
if (!f && !c && !m)
|
|
4852
4852
|
return t;
|
|
4853
4853
|
if (f || !c || !m)
|
|
4854
|
-
return c === "relative" && f ? /* @__PURE__ */ l(
|
|
4854
|
+
return c === "relative" && f ? /* @__PURE__ */ l(ma, { to: f, children: t }) : /* @__PURE__ */ l("a", { href: f, target: "_blank", rel: "noreferrer", children: t });
|
|
4855
4855
|
const _ = t && t.toString().replace("@", "") || "", T = m === n || c === "user" && m === r || c === "team" && !!i?.includes(m), E = m.replaceAll(".", "-").replaceAll(" ", "-");
|
|
4856
4856
|
return /* @__PURE__ */ l(
|
|
4857
4857
|
rt,
|
|
@@ -4870,17 +4870,17 @@ const Wt = w.pre`
|
|
|
4870
4870
|
children: _
|
|
4871
4871
|
}
|
|
4872
4872
|
);
|
|
4873
|
-
},
|
|
4874
|
-
|
|
4873
|
+
}, xc = ({ type: t, checked: e, ...n }, { activity: o, onCheckChange: r }) => t === "checkbox" ? /* @__PURE__ */ l(
|
|
4874
|
+
ca,
|
|
4875
4875
|
{
|
|
4876
4876
|
checked: !!e,
|
|
4877
4877
|
onChange: (i) => r && r(i, o)
|
|
4878
4878
|
}
|
|
4879
|
-
) : /* @__PURE__ */ l("input", { type: t, disabled: !0, ...n }),
|
|
4880
|
-
if (!(!!e?.startsWith("language-") || t?.position && t.position.start.line !== t.position.end.line)) return /* @__PURE__ */ l(
|
|
4881
|
-
const r = e?.replace(/^language-/, ""), i = typeof n == "string" ? n.replace(/\n$/, "") : null, s = i !== null ?
|
|
4879
|
+
) : /* @__PURE__ */ l("input", { type: t, disabled: !0, ...n }), kc = ({ node: t, className: e, children: n }) => {
|
|
4880
|
+
if (!(!!e?.startsWith("language-") || t?.position && t.position.start.line !== t.position.end.line)) return /* @__PURE__ */ l(ha, { children: n });
|
|
4881
|
+
const r = e?.replace(/^language-/, ""), i = typeof n == "string" ? n.replace(/\n$/, "") : null, s = i !== null ? xr(i, r) : null;
|
|
4882
4882
|
return s !== null ? /* @__PURE__ */ l(Wt, { children: /* @__PURE__ */ l("code", { className: e, dangerouslySetInnerHTML: { __html: s } }) }) : /* @__PURE__ */ l(Wt, { children: n });
|
|
4883
|
-
},
|
|
4883
|
+
}, wc = ({ children: t }) => {
|
|
4884
4884
|
const e = qt.Children.toArray(t).find((o) => !!o?.props)?.props?.children;
|
|
4885
4885
|
if (!e) return /* @__PURE__ */ l("blockquote", { children: t });
|
|
4886
4886
|
const n = [];
|
|
@@ -4902,7 +4902,7 @@ const Wt = w.pre`
|
|
|
4902
4902
|
});
|
|
4903
4903
|
}
|
|
4904
4904
|
return /* @__PURE__ */ l("blockquote", { children: n });
|
|
4905
|
-
},
|
|
4905
|
+
}, va = w.span`
|
|
4906
4906
|
position: absolute;
|
|
4907
4907
|
top: 3px;
|
|
4908
4908
|
right: 3px;
|
|
@@ -4930,91 +4930,91 @@ const Wt = w.pre`
|
|
|
4930
4930
|
z-index: 0;
|
|
4931
4931
|
border-radius: 100%;
|
|
4932
4932
|
}
|
|
4933
|
-
`,
|
|
4934
|
-
({ className: t, ...e }, n) => /* @__PURE__ */ l(
|
|
4933
|
+
`, _c = Qt(
|
|
4934
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ l(va, { className: P("playable", t), ...e, ref: n, children: /* @__PURE__ */ l(J, { icon: "play_circle" }) })
|
|
4935
4935
|
);
|
|
4936
4936
|
export {
|
|
4937
4937
|
Ae as $,
|
|
4938
4938
|
$n as A,
|
|
4939
4939
|
ae as B,
|
|
4940
|
-
|
|
4941
|
-
|
|
4940
|
+
ia as C,
|
|
4941
|
+
Tr as D,
|
|
4942
4942
|
be as E,
|
|
4943
|
-
|
|
4943
|
+
Lr as F,
|
|
4944
4944
|
ye as G,
|
|
4945
|
-
|
|
4945
|
+
Wl as H,
|
|
4946
4946
|
vt as I,
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4947
|
+
ql as J,
|
|
4948
|
+
Yl as K,
|
|
4949
|
+
aa as L,
|
|
4950
|
+
Fr as M,
|
|
4951
4951
|
Se as N,
|
|
4952
|
-
|
|
4953
|
-
|
|
4952
|
+
jl as O,
|
|
4953
|
+
Ss as P,
|
|
4954
4954
|
vn as Q,
|
|
4955
|
-
|
|
4955
|
+
Cr as R,
|
|
4956
4956
|
bt as S,
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4957
|
+
Gl as T,
|
|
4958
|
+
fr as U,
|
|
4959
|
+
Ar as V,
|
|
4960
|
+
ci as W,
|
|
4961
4961
|
ze as X,
|
|
4962
|
-
|
|
4962
|
+
Or as Y,
|
|
4963
4963
|
j as Z,
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4964
|
+
_c as _,
|
|
4965
|
+
ra as a,
|
|
4966
|
+
fa as a0,
|
|
4967
|
+
Zs as a1,
|
|
4968
|
+
uc as a2,
|
|
4969
|
+
lc as a3,
|
|
4970
|
+
dc as a4,
|
|
4971
|
+
Vl as a5,
|
|
4972
|
+
Jl as a6,
|
|
4973
|
+
Xl as a7,
|
|
4974
|
+
Zl as a8,
|
|
4975
|
+
ac as a9,
|
|
4976
|
+
ec as aa,
|
|
4977
|
+
ga as ab,
|
|
4978
|
+
tc as ac,
|
|
4979
|
+
nc as ad,
|
|
4980
|
+
rc as ae,
|
|
4981
|
+
oc as af,
|
|
4982
|
+
ic as ag,
|
|
4983
|
+
sc as ah,
|
|
4984
|
+
cc as ai,
|
|
4985
4985
|
rt as aj,
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4986
|
+
bc as ak,
|
|
4987
|
+
yc as al,
|
|
4988
|
+
pa as am,
|
|
4989
|
+
mc as an,
|
|
4990
|
+
pc as ao,
|
|
4991
|
+
gc as ap,
|
|
4992
|
+
hc as aq,
|
|
4993
|
+
fc as ar,
|
|
4994
|
+
vc as as,
|
|
4995
|
+
wc as b,
|
|
4996
|
+
kc as c,
|
|
4997
|
+
Ql as d,
|
|
4998
|
+
Kl as e,
|
|
4999
4999
|
z as f,
|
|
5000
|
-
|
|
5000
|
+
sa as g,
|
|
5001
5001
|
An as h,
|
|
5002
|
-
|
|
5002
|
+
xc as i,
|
|
5003
5003
|
De as j,
|
|
5004
5004
|
pe as k,
|
|
5005
5005
|
Rt as l,
|
|
5006
5006
|
Xe as m,
|
|
5007
5007
|
hn as n,
|
|
5008
|
-
|
|
5008
|
+
Rr as o,
|
|
5009
5009
|
re as p,
|
|
5010
5010
|
et as q,
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5011
|
+
Ul as r,
|
|
5012
|
+
Hl as s,
|
|
5013
|
+
oa as t,
|
|
5014
5014
|
Pe as u,
|
|
5015
|
-
|
|
5015
|
+
Xr as v,
|
|
5016
5016
|
ht as w,
|
|
5017
|
-
|
|
5018
|
-
|
|
5017
|
+
Er as x,
|
|
5018
|
+
Gs as y,
|
|
5019
5019
|
ve as z
|
|
5020
5020
|
};
|