@ynput/ayon-frontend-shared 0.6.3 → 0.6.5
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 +480 -477
- package/dist/ListTable.es.js +24 -25
- package/dist/NewEntity.es.js +6 -7
- package/dist/ProjectTreeTable.es.js +2016 -1996
- package/dist/Views.es.js +28 -28
- package/dist/api.es.js +291 -289
- package/dist/chunks/Actions.es.js +12 -12
- package/dist/chunks/ColumnDropIndicator.es.js +8 -9
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
- package/dist/chunks/DetailsDialog.es.js +1 -1
- package/dist/chunks/EmptyPlaceholder.es.js +13 -12
- package/dist/chunks/EntityPath.es.js +67 -67
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +8 -8
- package/dist/chunks/Feed.es.js +692 -689
- package/dist/chunks/MetaWidget.es.js +1283 -1279
- package/dist/chunks/PlayableIcon.es.js +458 -451
- package/dist/chunks/ProjectContext.es.js +20 -20
- package/dist/chunks/RepresentationsList.es.js +9 -9
- package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
- package/dist/chunks/Slicer.es.js +68 -69
- package/dist/chunks/ThumbnailSimple.es.js +4 -4
- package/dist/chunks/Watchers.es.js +104 -105
- package/dist/chunks/activeEntities.es.js +58 -0
- package/dist/chunks/columnConfigConverter.es.js +57 -63
- package/dist/chunks/getUris.es.js +886 -831
- package/dist/chunks/iconUtils.es.js +151 -0
- package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
- package/dist/chunks/searchTerms.es.js +329 -247
- package/dist/chunks/useAttributeEnums.es.js +34 -34
- package/dist/chunks/viewUpdateHelper.es.js +11 -11
- package/dist/components.es.js +340 -337
- package/dist/context.es.js +48 -48
- package/dist/hooks.es.js +34 -34
- package/dist/index.es.js +1 -1
- package/dist/types/ContextMenu.d.ts +1 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +4 -1
- package/dist/types/SimpleTable.d.ts +1 -1
- package/dist/types/Slicer.d.ts +5 -5
- package/dist/types/Views.d.ts +4 -4
- package/dist/types/api.d.ts +545 -171
- package/dist/types/components.d.ts +64 -9
- package/dist/types/context.d.ts +5 -5
- package/dist/types/util.d.ts +237 -2
- package/dist/util.es.js +127 -114
- package/package.json +1 -1
- package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
- package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { format as Bn, isValid as Ae, isSameMinute as Yt, isBefore as zn, formatDistanceToNow as Fn, subYears as Kn, endOfYear as kt, startOfYear as wt, subMonths as Un, endOfMonth as Ue, startOfMonth as He, addMonths as Hn, subWeeks as
|
|
1
|
+
import { format as Bn, isValid as Ae, isSameMinute as Yt, isBefore as zn, formatDistanceToNow as Fn, subYears as Kn, endOfYear as kt, startOfYear as wt, subMonths as Un, endOfMonth as Ue, startOfMonth as He, addMonths as Hn, subWeeks as Gn, endOfWeek as Ge, startOfWeek as je, addWeeks as jn, setHours as _t, subDays as Wn, endOfDay as Et, startOfDay as Ct, parseISO as B, isSameDay as K } from "date-fns";
|
|
2
2
|
import { matchSorter as Yn } from "match-sorter";
|
|
3
3
|
import { isArray as qn } from "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
@@ -6,27 +6,27 @@ import "react-toastify";
|
|
|
6
6
|
import { g as it } from "./getEntityTypeIcon.es.js";
|
|
7
7
|
import "uuid";
|
|
8
8
|
import { b2 as Vn } from "./searchTerms.es.js";
|
|
9
|
+
import qt, { useRef as O, useState as U, useLayoutEffect as oe, useCallback as H, useMemo as _e, useEffect as R, Fragment as Qn, useImperativeHandle as Jn, forwardRef as Vt, useContext as Xn } from "react";
|
|
9
10
|
import { jsx as l, jsxs as S, Fragment as me } from "react/jsx-runtime";
|
|
10
|
-
import qt, { useRef as O, useState as U, useLayoutEffect as oe, useCallback as H, useMemo as _e, useEffect as R, Fragment as Qn, useImperativeHandle as Jn, forwardRef as Vt } from "react";
|
|
11
11
|
import P from "clsx";
|
|
12
12
|
import x, { css as Ee } from "styled-components";
|
|
13
|
-
import { UserImage as Tt, Icon as J, Button as te, Dropdown as
|
|
14
|
-
import { TextNode as st, $applyNodeReplacement as at, createCommand as ge, LineBreakNode as
|
|
15
|
-
import { LexicalExtensionComposer as
|
|
13
|
+
import { UserImage as Tt, Icon as J, Button as te, Dropdown as Zn, InputText as eo, getTextColor as to, theme as Oe } from "@ynput/ayon-react-components";
|
|
14
|
+
import { TextNode as st, $applyNodeReplacement as at, createCommand as ge, LineBreakNode as no, $isLineBreakNode as Qt, $createTextNode as Ce, $getEditor as oo, $getRoot as ie, $createParagraphNode as he, $getSelection as M, $isParagraphNode as Y, $isTextNode as X, $isRangeSelection as $, COMMAND_PRIORITY_EDITOR as Jt, COMMAND_PRIORITY_NORMAL as Z, $isRootOrShadowRoot as ro, SELECTION_CHANGE_COMMAND as lt, COMMAND_PRIORITY_CRITICAL as Ve, BLUR_COMMAND as ct, COMMAND_PRIORITY_LOW as D, FORMAT_TEXT_COMMAND as dt, KEY_DOWN_COMMAND as Xt, KEY_ARROW_RIGHT_COMMAND as Zt, KEY_ARROW_LEFT_COMMAND as io, KEY_ARROW_DOWN_COMMAND as so, KEY_ENTER_COMMAND as Qe, COMMAND_PRIORITY_HIGH as ao, INSERT_PARAGRAPH_COMMAND as en, KEY_ESCAPE_COMMAND as tn, COMMAND_PRIORITY_BEFORE_EDITOR as lo, $isRootNode as ut, $getNearestNodeFromDOMNode as nn, PASTE_COMMAND as mt, $setSelection as We, $getNodeByKey as se, KEY_TAB_COMMAND as co, COPY_COMMAND as uo, CUT_COMMAND as mo, CLEAR_HISTORY_COMMAND as po, defineExtension as go } from "lexical";
|
|
15
|
+
import { LexicalExtensionComposer as ho } from "@lexical/react/LexicalExtensionComposer";
|
|
16
16
|
import { useLexicalComposerContext as I } from "@lexical/react/LexicalComposerContext";
|
|
17
|
-
import { ContentEditable as
|
|
18
|
-
import { HistoryPlugin as
|
|
19
|
-
import { ListPlugin as
|
|
20
|
-
import { CheckListPlugin as
|
|
21
|
-
import { LinkPlugin as
|
|
22
|
-
import { createLinkMatcherWithRegExp as Lt, AutoLinkPlugin as
|
|
23
|
-
import { MarkdownShortcutPlugin as
|
|
24
|
-
import { TabIndentationPlugin as
|
|
25
|
-
import { AutoFocusPlugin as
|
|
26
|
-
import { $isHeadingNode as
|
|
27
|
-
import { $isListNode as sn, ListNode as an, REMOVE_LIST_COMMAND as
|
|
28
|
-
import { $isLinkNode as ne, $isAutoLinkNode as Je, $createLinkNode as cn, TOGGLE_LINK_COMMAND as
|
|
29
|
-
import { $isCodeNode as ee, $createCodeNode as Mt, CodeNode as
|
|
17
|
+
import { ContentEditable as fo } from "@lexical/react/LexicalContentEditable";
|
|
18
|
+
import { HistoryPlugin as bo } from "@lexical/react/LexicalHistoryPlugin";
|
|
19
|
+
import { ListPlugin as yo } from "@lexical/react/LexicalListPlugin";
|
|
20
|
+
import { CheckListPlugin as vo } from "@lexical/react/LexicalCheckListPlugin";
|
|
21
|
+
import { LinkPlugin as xo } from "@lexical/react/LexicalLinkPlugin";
|
|
22
|
+
import { createLinkMatcherWithRegExp as Lt, AutoLinkPlugin as ko } from "@lexical/react/LexicalAutoLinkPlugin";
|
|
23
|
+
import { MarkdownShortcutPlugin as wo } from "@lexical/react/LexicalMarkdownShortcutPlugin";
|
|
24
|
+
import { TabIndentationPlugin as _o } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
25
|
+
import { AutoFocusPlugin as Eo } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
26
|
+
import { $isHeadingNode as Co, $isQuoteNode as on, $createHeadingNode as To, $createQuoteNode as Lo, DRAG_DROP_PASTE as rn, RichTextExtension as Mo, HeadingNode as $o, QuoteNode as No } from "@lexical/rich-text";
|
|
27
|
+
import { $isListNode as sn, ListNode as an, REMOVE_LIST_COMMAND as So, INSERT_CHECK_LIST_COMMAND as Oo, INSERT_ORDERED_LIST_COMMAND as Ro, INSERT_UNORDERED_LIST_COMMAND as Ao, $isListItemNode as ln, $createListNode as Io, ListItemNode as Do } from "@lexical/list";
|
|
28
|
+
import { $isLinkNode as ne, $isAutoLinkNode as Je, $createLinkNode as cn, TOGGLE_LINK_COMMAND as Po, LinkNode as dn, AutoLinkNode as un } from "@lexical/link";
|
|
29
|
+
import { $isCodeNode as ee, $createCodeNode as Mt, CodeNode as Bo, CodeHighlightNode as zo } from "@lexical/code";
|
|
30
30
|
import mn from "prismjs";
|
|
31
31
|
import "prismjs/components/prism-clike";
|
|
32
32
|
import "prismjs/components/prism-c";
|
|
@@ -54,23 +54,22 @@ import "prismjs/components/prism-markdown";
|
|
|
54
54
|
import "prismjs/components/prism-powershell";
|
|
55
55
|
import { BlockWithAlignableContents as pn } from "@lexical/react/LexicalBlockWithAlignableContents";
|
|
56
56
|
import { DecoratorBlockNode as gn } from "@lexical/react/LexicalDecoratorBlockNode";
|
|
57
|
-
import { HEADING as
|
|
58
|
-
import
|
|
57
|
+
import { HEADING as Fo, QUOTE as Ko, CHECK_LIST as Uo, UNORDERED_LIST as Ho, ORDERED_LIST as Go, CODE as jo, INLINE_CODE as Wo, BOLD_ITALIC_STAR as Yo, BOLD_ITALIC_UNDERSCORE as qo, BOLD_STAR as Vo, BOLD_UNDERSCORE as Qo, ITALIC_STAR as Jo, ITALIC_UNDERSCORE as Xo, STRIKETHROUGH as Zo, LINK as er, $generateNodesFromMarkdownString as tr, $convertToMarkdownString as nr, $convertSelectionToMarkdownString as or } from "@lexical/markdown";
|
|
58
|
+
import rr from "emojilib/emojis.json";
|
|
59
59
|
import $t from "emojilib/ordered.json";
|
|
60
60
|
import { LexicalTypeaheadMenuPlugin as pt, MenuOption as gt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
61
|
-
import { $findMatchingParent as W, mergeRegister as q, $getNearestNodeOfType as
|
|
61
|
+
import { $findMatchingParent as W, mergeRegister as q, $getNearestNodeOfType as ir, $unwrapNode as sr } from "@lexical/utils";
|
|
62
62
|
import { createPortal as fe } from "react-dom";
|
|
63
|
-
import {
|
|
63
|
+
import { bf as ar } from "./getUris.es.js";
|
|
64
64
|
import "@module-federation/enhanced/runtime";
|
|
65
|
-
import { d as
|
|
65
|
+
import { d as lr, G as cr } from "./DeleteEntitiesContextInstance.es.js";
|
|
66
66
|
import "semver";
|
|
67
67
|
import "./ContextMenuContextInstance.es.js";
|
|
68
68
|
import "react-redux";
|
|
69
69
|
import { $setBlocksType as Me } from "@lexical/selection";
|
|
70
|
-
import { PrismTokenizer as
|
|
71
|
-
import { $getClipboardDataFromSelection as
|
|
72
|
-
|
|
73
|
-
const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */ l(
|
|
70
|
+
import { PrismTokenizer as dr, registerCodeHighlighting as ur } from "@lexical/code-prism";
|
|
71
|
+
import { $getClipboardDataFromSelection as mr, copyToClipboard as pr } from "@lexical/clipboard";
|
|
72
|
+
const gr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */ l(
|
|
74
73
|
Tt,
|
|
75
74
|
{
|
|
76
75
|
name: t,
|
|
@@ -78,16 +77,16 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
78
77
|
src: `/api/users/${t}/avatar?key=${n || ""}`,
|
|
79
78
|
...o
|
|
80
79
|
}
|
|
81
|
-
) : /* @__PURE__ */ l(Tt, { name: "", className: P(o.className, "loading"), ...o }),
|
|
80
|
+
) : /* @__PURE__ */ l(Tt, { name: "", className: P(o.className, "loading"), ...o }), Il = (t, e) => {
|
|
82
81
|
const n = new Date(t.getTime() + t.getTimezoneOffset() * 6e4);
|
|
83
82
|
return Bn(n, e);
|
|
84
|
-
}, ae = "block-dialog-close",
|
|
83
|
+
}, ae = "block-dialog-close", hr = x.div`
|
|
85
84
|
position: fixed;
|
|
86
85
|
z-index: 310;
|
|
87
86
|
overflow: hidden;
|
|
88
87
|
display: flex;
|
|
89
88
|
flex-direction: column;
|
|
90
|
-
`,
|
|
89
|
+
`, Dl = ({
|
|
91
90
|
isEditing: t,
|
|
92
91
|
anchorId: e,
|
|
93
92
|
containerClassName: n = "table-container",
|
|
@@ -106,17 +105,17 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
106
105
|
return;
|
|
107
106
|
}
|
|
108
107
|
const w = b.getBoundingClientRect(), T = y.getBoundingClientRect(), E = T.right, p = window.innerWidth - T.right, f = 24, v = 250, C = 400, h = 600, L = window.innerWidth, A = window.innerHeight, F = E - w.left;
|
|
109
|
-
let N = {},
|
|
110
|
-
i ? (N.left = w.left,
|
|
108
|
+
let N = {}, j = C;
|
|
109
|
+
i ? (N.left = w.left, j = Math.max(C, w.width)) : F < C ? w.right - f >= C ? N.right = Math.max(
|
|
111
110
|
L - w.right,
|
|
112
111
|
f + p
|
|
113
|
-
) : (N.left = f,
|
|
112
|
+
) : (N.left = f, j = L - 2 * f) : (N.left = w.left, j = Math.max(C, F));
|
|
114
113
|
const ce = T.left, xe = T.right;
|
|
115
|
-
if (N.left !== void 0 && (N.left +
|
|
114
|
+
if (N.left !== void 0 && (N.left + j > xe && (N.left = Math.max(ce, xe - j)), N.left = Math.max(ce, N.left)), N.right !== void 0) {
|
|
116
115
|
const Ke = L - xe;
|
|
117
|
-
N.right +
|
|
116
|
+
N.right + j > L - ce && (N.right = Math.max(Ke, L - ce - j)), N.right = Math.max(Ke, N.right);
|
|
118
117
|
}
|
|
119
|
-
k(
|
|
118
|
+
k(j);
|
|
120
119
|
const ke = A - w.bottom - f, Te = w.top - f;
|
|
121
120
|
let we, Le = !1, Fe;
|
|
122
121
|
ke < v && Te > ke ? (Le = !0, we = w.top - 4, Fe = Te - 4) : (we = w.bottom + 4, Fe = ke - 4), g(Math.min(Math.max(200, Fe), h)), m({
|
|
@@ -153,7 +152,7 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
153
152
|
};
|
|
154
153
|
return t ? fe(
|
|
155
154
|
/* @__PURE__ */ l(
|
|
156
|
-
|
|
155
|
+
hr,
|
|
157
156
|
{
|
|
158
157
|
ref: s,
|
|
159
158
|
style: {
|
|
@@ -201,14 +200,14 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
201
200
|
{ value: "vex", label: "VEX" },
|
|
202
201
|
{ value: "xml", label: "XML" },
|
|
203
202
|
{ value: "yaml", label: "YAML" }
|
|
204
|
-
],
|
|
203
|
+
], fr = (t) => Re.find((e) => e.value === (t || ""))?.label || t || "", br = (t) => {
|
|
205
204
|
if (!t) return;
|
|
206
205
|
const e = mn.languages[t.toLowerCase()];
|
|
207
206
|
return typeof e == "object" ? e : void 0;
|
|
208
|
-
},
|
|
209
|
-
const n =
|
|
207
|
+
}, yr = (t, e) => {
|
|
208
|
+
const n = br(e);
|
|
210
209
|
return !n || !e ? null : mn.highlight(t, n, e.toLowerCase());
|
|
211
|
-
},
|
|
210
|
+
}, vr = [
|
|
212
211
|
"atrule",
|
|
213
212
|
"attr",
|
|
214
213
|
"attr-name",
|
|
@@ -241,9 +240,9 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
241
240
|
"tag",
|
|
242
241
|
"url",
|
|
243
242
|
"variable"
|
|
244
|
-
],
|
|
245
|
-
|
|
246
|
-
),
|
|
243
|
+
], xr = Object.fromEntries(
|
|
244
|
+
vr.map((t) => [t, `token ${t}`])
|
|
245
|
+
), kr = {
|
|
247
246
|
paragraph: "md-paragraph",
|
|
248
247
|
heading: {
|
|
249
248
|
h1: "md-heading md-h1",
|
|
@@ -259,7 +258,7 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
259
258
|
link: "md-link",
|
|
260
259
|
code: "md-code-block",
|
|
261
260
|
// prism token types -> `token <type>` classes, coloured by codeTokenStyles
|
|
262
|
-
codeHighlight:
|
|
261
|
+
codeHighlight: xr,
|
|
263
262
|
list: {
|
|
264
263
|
ul: "md-list md-list-ul",
|
|
265
264
|
ol: "md-list md-list-ol",
|
|
@@ -287,12 +286,12 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
287
286
|
"representation",
|
|
288
287
|
"workfile",
|
|
289
288
|
"product"
|
|
290
|
-
],
|
|
289
|
+
], wr = {
|
|
291
290
|
user: "@",
|
|
292
291
|
team: "@",
|
|
293
292
|
version: "@@",
|
|
294
293
|
task: "@@@"
|
|
295
|
-
},
|
|
294
|
+
}, _r = (t) => wr[t] ?? "@", Er = [
|
|
296
295
|
"bold",
|
|
297
296
|
"italic",
|
|
298
297
|
"strikethrough",
|
|
@@ -303,7 +302,7 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
303
302
|
"numberList",
|
|
304
303
|
"bulletList",
|
|
305
304
|
"checkList"
|
|
306
|
-
],
|
|
305
|
+
], Cr = [
|
|
307
306
|
"bold",
|
|
308
307
|
"italic",
|
|
309
308
|
"strikethrough",
|
|
@@ -322,7 +321,7 @@ const pr = ({ name: t, fullName: e, imageKey: n, ...o }) => t ? /* @__PURE__ */
|
|
|
322
321
|
} catch {
|
|
323
322
|
}
|
|
324
323
|
return { type: o, id: r };
|
|
325
|
-
},
|
|
324
|
+
}, Tr = (t) => {
|
|
326
325
|
const e = t.getAttribute("data-mention-value") || t.getAttribute("data-value") || t.getAttribute("href"), n = ft(e);
|
|
327
326
|
if (!n) return null;
|
|
328
327
|
const o = ue(
|
|
@@ -380,7 +379,7 @@ class be extends st {
|
|
|
380
379
|
static importDOM() {
|
|
381
380
|
const e = (o) => !!ft(
|
|
382
381
|
o.getAttribute("data-mention-value") || o.getAttribute("data-value") || o.getAttribute("href")
|
|
383
|
-
), n = (o) => e(o) ? { conversion:
|
|
382
|
+
), n = (o) => e(o) ? { conversion: Tr, priority: 2 } : null;
|
|
384
383
|
return {
|
|
385
384
|
a: n,
|
|
386
385
|
span: n,
|
|
@@ -399,9 +398,9 @@ class be extends st {
|
|
|
399
398
|
}
|
|
400
399
|
}
|
|
401
400
|
const De = (t, e, n) => {
|
|
402
|
-
const o = new be(t, e,
|
|
401
|
+
const o = new be(t, e, _r(t) + ue(n));
|
|
403
402
|
return o.setMode("token").toggleDirectionless(), at(o);
|
|
404
|
-
}, hn = (t) => t instanceof be,
|
|
403
|
+
}, hn = (t) => t instanceof be, Lr = /^[\w-]{11}$/, Mr = (t) => {
|
|
405
404
|
if (!t) return;
|
|
406
405
|
if (/^\d+$/.test(t)) return Number(t);
|
|
407
406
|
const e = t.match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);
|
|
@@ -426,10 +425,10 @@ const De = (t, e, n) => {
|
|
|
426
425
|
const [, i, s] = e.pathname.split("/");
|
|
427
426
|
["shorts", "embed", "live", "v"].includes(i) && (o = s);
|
|
428
427
|
}
|
|
429
|
-
if (!o || !
|
|
430
|
-
const r =
|
|
428
|
+
if (!o || !Lr.test(o)) return null;
|
|
429
|
+
const r = Mr(e.searchParams.get("t") ?? e.searchParams.get("start"));
|
|
431
430
|
return r ? { id: o, start: r } : { id: o };
|
|
432
|
-
}, fn = ({ id: t, start: e }) => `https://www.youtube-nocookie.com/embed/${t}${e ? `?start=${e}` : ""}`,
|
|
431
|
+
}, fn = ({ id: t, start: e }) => `https://www.youtube-nocookie.com/embed/${t}${e ? `?start=${e}` : ""}`, $r = x.div`
|
|
433
432
|
width: 100%;
|
|
434
433
|
max-width: 560px;
|
|
435
434
|
aspect-ratio: 16 / 9;
|
|
@@ -443,7 +442,7 @@ const De = (t, e, n) => {
|
|
|
443
442
|
height: 100%;
|
|
444
443
|
border: none;
|
|
445
444
|
}
|
|
446
|
-
`,
|
|
445
|
+
`, Nr = ({ video: t, className: e }) => /* @__PURE__ */ l($r, { className: e ? `youtube-embed ${e}` : "youtube-embed", children: /* @__PURE__ */ l(
|
|
447
446
|
"iframe",
|
|
448
447
|
{
|
|
449
448
|
src: fn(t),
|
|
@@ -503,26 +502,26 @@ class ye extends gn {
|
|
|
503
502
|
className: { base: r.base || "", focus: r.focus || "" },
|
|
504
503
|
format: this.__format,
|
|
505
504
|
nodeKey: this.getKey(),
|
|
506
|
-
children: o ? /* @__PURE__ */ l(
|
|
505
|
+
children: o ? /* @__PURE__ */ l(Nr, { video: o }) : /* @__PURE__ */ l("span", { children: this.__url })
|
|
507
506
|
}
|
|
508
507
|
);
|
|
509
508
|
}
|
|
510
509
|
}
|
|
511
|
-
const pe = (t) => at(new ye(t.trim())),
|
|
510
|
+
const pe = (t) => at(new ye(t.trim())), Sr = (t) => t instanceof ye, bn = ["mp4", "mov", "webm", "mkv", "m4v", "ogv", "avi"], Or = ["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", Rr = (t) => t.type.startsWith("image/") || t.type.startsWith("video/") || [...Or, ...bn].includes(yn(t.name)), Ar = /\/api\/projects\/[^/]+\/files\/([\w-]+)/, bt = (t) => t?.match(Ar)?.[1] ?? null, Ir = /^\s*!\[[^\]]*\]\(<?([^\s)>]+)>?(?:\s+"[^"]*")?\)\s*$/, Dr = /^\s*(```|~~~)/, Pl = (t) => {
|
|
512
511
|
const e = /* @__PURE__ */ new Set();
|
|
513
512
|
let n = !1;
|
|
514
513
|
for (const o of String(t || "").split(`
|
|
515
514
|
`)) {
|
|
516
|
-
if (
|
|
515
|
+
if (Dr.test(o)) {
|
|
517
516
|
n = !n;
|
|
518
517
|
continue;
|
|
519
518
|
}
|
|
520
519
|
if (n) continue;
|
|
521
|
-
const r = bt(o.match(
|
|
520
|
+
const r = bt(o.match(Ir)?.[1]);
|
|
522
521
|
r && e.add(r);
|
|
523
522
|
}
|
|
524
523
|
return e;
|
|
525
|
-
},
|
|
524
|
+
}, Pr = x.div`
|
|
526
525
|
position: relative;
|
|
527
526
|
display: inline-flex;
|
|
528
527
|
max-width: 100%;
|
|
@@ -607,10 +606,10 @@ const pe = (t) => at(new ye(t.trim())), Nr = (t) => t instanceof ye, bn = ["mp4"
|
|
|
607
606
|
transform: rotate(360deg);
|
|
608
607
|
}
|
|
609
608
|
}
|
|
610
|
-
`,
|
|
609
|
+
`, Br = ({ src: t, alt: e, mime: n, uploading: o, onOpen: r, className: i }) => {
|
|
611
610
|
const s = vn(n, e, t), a = s === "video" && bt(t) ? `${t}/thumbnail` : void 0;
|
|
612
611
|
return /* @__PURE__ */ S(
|
|
613
|
-
|
|
612
|
+
Pr,
|
|
614
613
|
{
|
|
615
614
|
className: P("md-media", `md-media-${s}`, i, { clickable: !!r }),
|
|
616
615
|
children: [
|
|
@@ -708,7 +707,7 @@ class ve extends gn {
|
|
|
708
707
|
format: this.__format,
|
|
709
708
|
nodeKey: this.getKey(),
|
|
710
709
|
children: /* @__PURE__ */ l(
|
|
711
|
-
|
|
710
|
+
Br,
|
|
712
711
|
{
|
|
713
712
|
src: this.__src,
|
|
714
713
|
alt: this.__alt,
|
|
@@ -720,13 +719,13 @@ class ve extends gn {
|
|
|
720
719
|
);
|
|
721
720
|
}
|
|
722
721
|
}
|
|
723
|
-
const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USED_COMMAND"), xn =
|
|
722
|
+
const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USED_COMMAND"), xn = rr, zr = [
|
|
724
723
|
...$t,
|
|
725
724
|
...Object.keys(xn).filter((t) => !$t.includes(t))
|
|
726
|
-
], kn =
|
|
725
|
+
], kn = zr.flatMap((t) => {
|
|
727
726
|
const e = xn[t];
|
|
728
727
|
return e?.char ? [{ name: t, char: e.char, keywords: e.keywords }] : [];
|
|
729
|
-
}),
|
|
728
|
+
}), Fr = new Map(kn.map((t) => [t.name, t])), wn = (t) => Fr.get(t.toLowerCase()), Kr = (t, e) => {
|
|
730
729
|
const { name: n, keywords: o } = t;
|
|
731
730
|
if (n === e) return { score: 0 };
|
|
732
731
|
if (n.startsWith(e)) return { score: 1 };
|
|
@@ -735,10 +734,10 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
735
734
|
if (n.includes(`_${e}`)) return { score: 3 };
|
|
736
735
|
const i = o.find((s) => s.toLowerCase().startsWith(e));
|
|
737
736
|
return i ? { score: 4, keyword: i } : n.includes(e) ? { score: 5 } : null;
|
|
738
|
-
},
|
|
737
|
+
}, Ur = (t, e = 8, n = {}) => {
|
|
739
738
|
const o = t.toLowerCase(), r = [];
|
|
740
739
|
return kn.forEach((i, s) => {
|
|
741
|
-
const a =
|
|
740
|
+
const a = Kr(i, o);
|
|
742
741
|
a && r.push({
|
|
743
742
|
emoji: { ...i, matchedKeyword: a.keyword },
|
|
744
743
|
score: a.score,
|
|
@@ -747,7 +746,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
747
746
|
}), r.sort(
|
|
748
747
|
(i, s) => i.score - s.score || (n[s.emoji.name] ?? 0) - (n[i.emoji.name] ?? 0) || i.index - s.index
|
|
749
748
|
).slice(0, e).map(({ emoji: i }) => i);
|
|
750
|
-
},
|
|
749
|
+
}, Hr = [
|
|
751
750
|
"+1",
|
|
752
751
|
"heart",
|
|
753
752
|
"joy",
|
|
@@ -764,31 +763,31 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
764
763
|
"sweat_smile",
|
|
765
764
|
"100",
|
|
766
765
|
"x"
|
|
767
|
-
],
|
|
766
|
+
], Gr = (t) => (e, n) => (t[n] ?? 0) - (t[e] ?? 0), jr = (t, e = {}, n = 8) => {
|
|
768
767
|
if (!t) {
|
|
769
|
-
const o = Object.keys(e).filter((i) => e[i] > 0).sort(
|
|
770
|
-
return [.../* @__PURE__ */ new Set([...o, ...
|
|
768
|
+
const o = Object.keys(e).filter((i) => e[i] > 0).sort(Gr(e));
|
|
769
|
+
return [.../* @__PURE__ */ new Set([...o, ...Hr])].flatMap((i) => wn(i) ?? []).slice(0, n);
|
|
771
770
|
}
|
|
772
|
-
return
|
|
773
|
-
},
|
|
771
|
+
return Ur(t, n, e);
|
|
772
|
+
}, Wr = (t) => t.replaceAll(" ", "%20"), Yr = (t) => {
|
|
774
773
|
try {
|
|
775
774
|
return decodeURIComponent(t);
|
|
776
775
|
} catch {
|
|
777
776
|
return t;
|
|
778
777
|
}
|
|
779
|
-
},
|
|
778
|
+
}, qr = (t) => t.replace(/[[\]]/g, ""), Vr = ht.join("|"), Nt = `\\[([^\\]\\n]+)\\]\\(@?(${Vr}):([^)\\s]+)\\)`, Qr = {
|
|
780
779
|
dependencies: [be],
|
|
781
|
-
export: (t) => hn(t) ? `[${
|
|
780
|
+
export: (t) => hn(t) ? `[${qr(t.getLabel())}](${t.getMentionType()}:${Wr(t.getMentionId())})` : null,
|
|
782
781
|
importRegExp: new RegExp(Nt),
|
|
783
782
|
regExp: new RegExp(Nt + "$"),
|
|
784
783
|
replace: (t, e) => {
|
|
785
|
-
const [, n, o, r] = e, i = De(o,
|
|
784
|
+
const [, n, o, r] = e, i = De(o, Yr(r), n.replace(/^@+/, ""));
|
|
786
785
|
return t.replace(i), i;
|
|
787
786
|
},
|
|
788
787
|
trigger: ")",
|
|
789
788
|
type: "text-match"
|
|
790
|
-
},
|
|
791
|
-
dependencies: [
|
|
789
|
+
}, Jr = {
|
|
790
|
+
dependencies: [no],
|
|
792
791
|
export: (t) => Qt(t) ? `\\
|
|
793
792
|
` : null,
|
|
794
793
|
// never matches, line breaks are imported by the paragraph importer
|
|
@@ -797,7 +796,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
797
796
|
replace: () => {
|
|
798
797
|
},
|
|
799
798
|
type: "text-match"
|
|
800
|
-
},
|
|
799
|
+
}, Xr = {
|
|
801
800
|
dependencies: [st],
|
|
802
801
|
export: () => null,
|
|
803
802
|
importRegExp: /(?!)/,
|
|
@@ -807,20 +806,20 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
807
806
|
const n = wn(e[1]);
|
|
808
807
|
if (!n) return;
|
|
809
808
|
const o = Ce(n.char).setFormat(t.getFormat());
|
|
810
|
-
return t.replace(o),
|
|
809
|
+
return t.replace(o), oo().dispatchCommand(Ze, n.name), o;
|
|
811
810
|
},
|
|
812
811
|
trigger: ":",
|
|
813
812
|
type: "text-match"
|
|
814
|
-
},
|
|
813
|
+
}, Zr = {
|
|
815
814
|
dependencies: [ye],
|
|
816
|
-
export: (t) =>
|
|
815
|
+
export: (t) => Sr(t) ? t.getUrl() : null,
|
|
817
816
|
regExp: /^\s*(https?:\/\/\S+)\s*$/,
|
|
818
817
|
replace: (t, e, n, o) => {
|
|
819
818
|
if (!o || !re(n[1])) return !1;
|
|
820
819
|
t.replace(pe(n[1]));
|
|
821
820
|
},
|
|
822
821
|
type: "element"
|
|
823
|
-
},
|
|
822
|
+
}, ei = {
|
|
824
823
|
dependencies: [ve],
|
|
825
824
|
export: (t) => {
|
|
826
825
|
if (!Xe(t)) return null;
|
|
@@ -836,15 +835,14 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
836
835
|
},
|
|
837
836
|
type: "element"
|
|
838
837
|
}, Pe = [
|
|
839
|
-
Xr,
|
|
840
838
|
Zr,
|
|
841
|
-
|
|
839
|
+
ei,
|
|
842
840
|
Fo,
|
|
843
841
|
Ko,
|
|
844
842
|
Uo,
|
|
845
843
|
Ho,
|
|
846
|
-
jo,
|
|
847
844
|
Go,
|
|
845
|
+
jo,
|
|
848
846
|
Wo,
|
|
849
847
|
Yo,
|
|
850
848
|
qo,
|
|
@@ -852,17 +850,18 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
852
850
|
Qo,
|
|
853
851
|
Jo,
|
|
854
852
|
Xo,
|
|
855
|
-
|
|
853
|
+
Zo,
|
|
856
854
|
Qr,
|
|
857
855
|
Jr,
|
|
858
|
-
|
|
859
|
-
|
|
856
|
+
Xr,
|
|
857
|
+
er
|
|
858
|
+
], ti = /^\s*(`{3,}|~{3,})/, _n = (t) => {
|
|
860
859
|
let e = null;
|
|
861
860
|
return t.map((n) => {
|
|
862
|
-
const o = n.match(
|
|
861
|
+
const o = n.match(ti);
|
|
863
862
|
return e ? (o && o[1][0] === e[0] && o[1].length >= e.length && (e = null), !0) : (o && (e = o[1]), !!o);
|
|
864
863
|
});
|
|
865
|
-
},
|
|
864
|
+
}, ni = (t, e) => {
|
|
866
865
|
const n = t.split(`
|
|
867
866
|
`), o = _n(n), r = [];
|
|
868
867
|
return n.forEach((i, s) => {
|
|
@@ -883,14 +882,14 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
883
882
|
const m = n[a] && (a === 0 || !n[a - 1]);
|
|
884
883
|
r && (m || r.isCode && !n[a]) && (o.push(r), r = null), r || (r = { lines: [], blanksBefore: i, isCode: n[a] }, i = 0), r.lines.push(s);
|
|
885
884
|
}), r && o.push(r), o;
|
|
886
|
-
},
|
|
885
|
+
}, oi = /^\s*([-*+]\s|\d+[.)]\s|#{1,6}\s|>|\||:::|<\/?[a-z])/i, St = (t) => !t.isCode && !oi.test(t.lines[0]), ri = (t) => (t.match(/\\+$/)?.[0].length ?? 0) % 2 === 1, ii = (t) => {
|
|
887
886
|
if (t.isCode) return t.lines.join(`
|
|
888
887
|
`);
|
|
889
888
|
const e = [...t.lines], n = e.length - 1;
|
|
890
|
-
return
|
|
889
|
+
return ri(e[n]) && (e[n] = e[n].slice(0, -1).trimEnd()), e.map((o) => o.replace(si, "$1* $2")).join(`
|
|
891
890
|
`);
|
|
892
|
-
},
|
|
893
|
-
const e =
|
|
891
|
+
}, si = /^(\s*)[-+] (\[[ xX]\]\s)/, Ot = (t) => /^\s*( |<br\s*\/?>)\s*$/i.test(t), ai = (t) => {
|
|
892
|
+
const e = ni(
|
|
894
893
|
t.replace(/\r\n?/g, `
|
|
895
894
|
`),
|
|
896
895
|
(a) => a.replace(/<\/?u>/gi, "")
|
|
@@ -911,15 +910,15 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
911
910
|
` + k : r = k, i = d, s = !1;
|
|
912
911
|
}
|
|
913
912
|
return r;
|
|
914
|
-
},
|
|
913
|
+
}, li = (t) => {
|
|
915
914
|
if (!Y(t)) return !1;
|
|
916
915
|
const e = t.getFirstChild();
|
|
917
916
|
return e === null || t.getChildrenSize() === 1 && X(e) && /^\s{0,3}$/.test(e.getTextContent());
|
|
918
|
-
},
|
|
917
|
+
}, ci = (t, e) => {
|
|
919
918
|
const n = En(t), o = [];
|
|
920
919
|
let r = !1;
|
|
921
920
|
for (const s of e.getChildren()) {
|
|
922
|
-
if (
|
|
921
|
+
if (li(s)) {
|
|
923
922
|
r = !0;
|
|
924
923
|
continue;
|
|
925
924
|
}
|
|
@@ -927,32 +926,32 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
927
926
|
}
|
|
928
927
|
const i = o.length === n.length;
|
|
929
928
|
return n.map((s, a) => {
|
|
930
|
-
const m =
|
|
929
|
+
const m = ii(s);
|
|
931
930
|
return a === 0 ? m : ((i ? !o[a].hasGapBefore && o[a].isParagraph && o[a - 1].isParagraph : !1) ? `\\
|
|
932
931
|
` : `
|
|
933
932
|
|
|
934
933
|
`) + m;
|
|
935
934
|
}).join("").trim();
|
|
936
|
-
},
|
|
935
|
+
}, di = (t) => {
|
|
937
936
|
const e = [t];
|
|
938
937
|
let n = t;
|
|
939
938
|
for (const o of t.getChildren())
|
|
940
939
|
Qt(o) ? (n = he().setFormat(t.getFormatType()), e.push(n), o.remove()) : n !== t && n.append(o);
|
|
941
940
|
return e;
|
|
942
|
-
},
|
|
941
|
+
}, ui = (t) => {
|
|
943
942
|
const e = [];
|
|
944
943
|
return t.forEach((n, o) => {
|
|
945
944
|
if (!Y(n)) {
|
|
946
945
|
e.push(n);
|
|
947
946
|
return;
|
|
948
947
|
}
|
|
949
|
-
o > 0 && Y(t[o - 1]) && e.push(he()), e.push(...
|
|
948
|
+
o > 0 && Y(t[o - 1]) && e.push(he()), e.push(...di(n));
|
|
950
949
|
}), e;
|
|
951
950
|
}, Cn = (t) => (
|
|
952
951
|
// shouldMergeAdjacentLines: a soft line break renders as a space, so show it as one
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
952
|
+
ui(
|
|
953
|
+
tr(
|
|
954
|
+
ai(t || ""),
|
|
956
955
|
Pe,
|
|
957
956
|
!1,
|
|
958
957
|
!0
|
|
@@ -961,7 +960,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
961
960
|
), et = (t) => {
|
|
962
961
|
const e = ie(), n = Cn(t);
|
|
963
962
|
e.clear(), e.append(...n.length ? n : [he()]), M() !== null && e.selectStart();
|
|
964
|
-
}, Rt = (t = ie()) =>
|
|
963
|
+
}, Rt = (t = ie()) => ci(nr(Pe, t, !1), t), mi = () => {
|
|
965
964
|
const e = ie().getChildren();
|
|
966
965
|
if (e.length === 0) return !0;
|
|
967
966
|
if (e.length > 1) return !1;
|
|
@@ -1017,7 +1016,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1017
1016
|
.token.builtin {
|
|
1018
1017
|
color: #56b6c2;
|
|
1019
1018
|
}
|
|
1020
|
-
`,
|
|
1019
|
+
`, pi = `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")`, gi = `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")`, hi = x.div`
|
|
1021
1020
|
position: relative;
|
|
1022
1021
|
display: flex;
|
|
1023
1022
|
flex-direction: column;
|
|
@@ -1032,7 +1031,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1032
1031
|
border-color: var(--md-sys-color-primary);
|
|
1033
1032
|
}
|
|
1034
1033
|
}
|
|
1035
|
-
`,
|
|
1034
|
+
`, fi = x.div`
|
|
1036
1035
|
position: relative;
|
|
1037
1036
|
display: flex;
|
|
1038
1037
|
align-items: center;
|
|
@@ -1078,7 +1077,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1078
1077
|
display: none;
|
|
1079
1078
|
}
|
|
1080
1079
|
}
|
|
1081
|
-
`,
|
|
1080
|
+
`, bi = x.div`
|
|
1082
1081
|
display: flex;
|
|
1083
1082
|
align-items: center;
|
|
1084
1083
|
gap: 2px;
|
|
@@ -1086,12 +1085,12 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1086
1085
|
min-width: 0;
|
|
1087
1086
|
overflow: hidden;
|
|
1088
1087
|
justify-content: flex-end;
|
|
1089
|
-
`,
|
|
1088
|
+
`, yi = x.span`
|
|
1090
1089
|
width: 1px;
|
|
1091
1090
|
height: 18px;
|
|
1092
1091
|
margin: 0 4px;
|
|
1093
1092
|
background-color: var(--md-sys-color-outline-variant);
|
|
1094
|
-
`,
|
|
1093
|
+
`, vi = x.div`
|
|
1095
1094
|
position: fixed;
|
|
1096
1095
|
z-index: 1100;
|
|
1097
1096
|
display: flex;
|
|
@@ -1124,7 +1123,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1124
1123
|
padding: 4px;
|
|
1125
1124
|
min-height: 0;
|
|
1126
1125
|
}
|
|
1127
|
-
`,
|
|
1126
|
+
`, xi = x.button`
|
|
1128
1127
|
all: unset;
|
|
1129
1128
|
position: fixed;
|
|
1130
1129
|
z-index: 1100;
|
|
@@ -1156,7 +1155,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1156
1155
|
&:hover {
|
|
1157
1156
|
background-color: var(--md-sys-color-surface-container-high-hover);
|
|
1158
1157
|
}
|
|
1159
|
-
`,
|
|
1158
|
+
`, ki = x.div`
|
|
1160
1159
|
position: fixed;
|
|
1161
1160
|
z-index: 1000;
|
|
1162
1161
|
transform: translateX(-100%);
|
|
@@ -1172,7 +1171,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1172
1171
|
display: none;
|
|
1173
1172
|
}
|
|
1174
1173
|
}
|
|
1175
|
-
`,
|
|
1174
|
+
`, wi = x.span`
|
|
1176
1175
|
display: flex;
|
|
1177
1176
|
align-items: center;
|
|
1178
1177
|
gap: 2px;
|
|
@@ -1193,7 +1192,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1193
1192
|
&:hover {
|
|
1194
1193
|
color: var(--md-sys-color-on-surface);
|
|
1195
1194
|
}
|
|
1196
|
-
`,
|
|
1195
|
+
`, _i = x.div`
|
|
1197
1196
|
display: flex;
|
|
1198
1197
|
align-items: flex-end;
|
|
1199
1198
|
min-width: 0;
|
|
@@ -1204,7 +1203,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1204
1203
|
gap: 2px;
|
|
1205
1204
|
padding: 4px;
|
|
1206
1205
|
}
|
|
1207
|
-
`,
|
|
1206
|
+
`, Ei = x.div`
|
|
1208
1207
|
position: fixed;
|
|
1209
1208
|
z-index: 1100;
|
|
1210
1209
|
transform: translate(-50%, calc(-100% - 8px));
|
|
@@ -1228,12 +1227,12 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1228
1227
|
color: var(--md-sys-color-on-primary-container);
|
|
1229
1228
|
}
|
|
1230
1229
|
}
|
|
1231
|
-
`,
|
|
1230
|
+
`, Ci = x.div`
|
|
1232
1231
|
position: relative;
|
|
1233
1232
|
overflow-y: auto;
|
|
1234
1233
|
flex: 1;
|
|
1235
1234
|
min-width: 0;
|
|
1236
|
-
`,
|
|
1235
|
+
`, Ti = x.div`
|
|
1237
1236
|
position: absolute;
|
|
1238
1237
|
top: 8px;
|
|
1239
1238
|
left: 10px;
|
|
@@ -1244,7 +1243,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1244
1243
|
overflow: hidden;
|
|
1245
1244
|
text-overflow: ellipsis;
|
|
1246
1245
|
white-space: nowrap;
|
|
1247
|
-
`,
|
|
1246
|
+
`, Li = x.div`
|
|
1248
1247
|
.md-content {
|
|
1249
1248
|
outline: none;
|
|
1250
1249
|
padding: 8px 10px;
|
|
@@ -1419,12 +1418,12 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1419
1418
|
}
|
|
1420
1419
|
}
|
|
1421
1420
|
.md-list-item-unchecked::before {
|
|
1422
|
-
background-image: ${
|
|
1421
|
+
background-image: ${gi};
|
|
1423
1422
|
}
|
|
1424
1423
|
.md-list-item-checked {
|
|
1425
1424
|
color: var(--md-sys-color-outline);
|
|
1426
1425
|
&::before {
|
|
1427
|
-
background-image: ${
|
|
1426
|
+
background-image: ${pi};
|
|
1428
1427
|
}
|
|
1429
1428
|
}
|
|
1430
1429
|
|
|
@@ -1466,7 +1465,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1466
1465
|
.md-activity-link {
|
|
1467
1466
|
text-decoration: none;
|
|
1468
1467
|
}
|
|
1469
|
-
`,
|
|
1468
|
+
`, Mi = x.div`
|
|
1470
1469
|
position: absolute;
|
|
1471
1470
|
top: 4px;
|
|
1472
1471
|
left: 0;
|
|
@@ -1507,12 +1506,12 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1507
1506
|
padding-top: 4px;
|
|
1508
1507
|
}
|
|
1509
1508
|
}
|
|
1510
|
-
`,
|
|
1509
|
+
`, $i = x.li`
|
|
1511
1510
|
list-style: none;
|
|
1512
1511
|
height: 1px;
|
|
1513
1512
|
margin: 4px 4px;
|
|
1514
1513
|
background-color: var(--md-sys-color-outline-variant);
|
|
1515
|
-
`,
|
|
1514
|
+
`, Ni = x.div`
|
|
1516
1515
|
display: flex;
|
|
1517
1516
|
align-items: center;
|
|
1518
1517
|
justify-content: space-between;
|
|
@@ -1520,10 +1519,10 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1520
1519
|
margin-bottom: 4px;
|
|
1521
1520
|
background-color: var(--md-sys-color-surface-container-lowest);
|
|
1522
1521
|
color: var(--md-sys-color-outline);
|
|
1523
|
-
`,
|
|
1522
|
+
`, Si = x.span`
|
|
1524
1523
|
display: flex;
|
|
1525
1524
|
gap: 2px;
|
|
1526
|
-
`,
|
|
1525
|
+
`, Oi = x.button`
|
|
1527
1526
|
all: unset;
|
|
1528
1527
|
display: flex;
|
|
1529
1528
|
align-items: center;
|
|
@@ -1595,7 +1594,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1595
1594
|
font-family: monospace;
|
|
1596
1595
|
font-size: 11px;
|
|
1597
1596
|
}
|
|
1598
|
-
`,
|
|
1597
|
+
`, Ri = 4, Ai = 26, yt = ({
|
|
1599
1598
|
editor: t,
|
|
1600
1599
|
anchor: e,
|
|
1601
1600
|
placement: n,
|
|
@@ -1622,11 +1621,11 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1622
1621
|
return oe(() => {
|
|
1623
1622
|
const v = c.current;
|
|
1624
1623
|
if (T || !v) return;
|
|
1625
|
-
const C = e.getBoundingClientRect(), h = v.offsetHeight, L = window.innerHeight - C.top -
|
|
1624
|
+
const C = e.getBoundingClientRect(), h = v.offsetHeight, L = window.innerHeight - C.top - Ri, A = C.top - Ai;
|
|
1626
1625
|
w(h > L && A > L);
|
|
1627
1626
|
}, [T, e, i.length, o, _]), fe(
|
|
1628
1627
|
/* @__PURE__ */ S(
|
|
1629
|
-
|
|
1628
|
+
Mi,
|
|
1630
1629
|
{
|
|
1631
1630
|
ref: c,
|
|
1632
1631
|
className: P("mention-menu md-popover", ae, g, {
|
|
@@ -1635,13 +1634,13 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1635
1634
|
}),
|
|
1636
1635
|
onMouseDown: (v) => v.preventDefault(),
|
|
1637
1636
|
children: [
|
|
1638
|
-
(o || r) && /* @__PURE__ */ S(
|
|
1637
|
+
(o || r) && /* @__PURE__ */ S(Ni, { children: [
|
|
1639
1638
|
/* @__PURE__ */ l("span", { children: o }),
|
|
1640
1639
|
r
|
|
1641
1640
|
] }),
|
|
1642
1641
|
/* @__PURE__ */ S("ul", { ref: y, role: "listbox", className: P({ untitled: !o && !r }), children: [
|
|
1643
1642
|
i.map((v, C) => [
|
|
1644
|
-
C > 0 && b && b(v) !== b(i[C - 1]) && /* @__PURE__ */ l(
|
|
1643
|
+
C > 0 && b && b(v) !== b(i[C - 1]) && /* @__PURE__ */ l($i, { role: "separator" }, `divider-${v.key}`),
|
|
1645
1644
|
/* @__PURE__ */ l(
|
|
1646
1645
|
At,
|
|
1647
1646
|
{
|
|
@@ -1673,7 +1672,7 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1673
1672
|
return X(e) && e.hasFormat("code") ? !0 : !!W(e, ee);
|
|
1674
1673
|
}, vt = ge(
|
|
1675
1674
|
"INSERT_MENTION_TRIGGER_COMMAND"
|
|
1676
|
-
),
|
|
1675
|
+
), Ii = ["@", "@@", "@@@"], Di = {
|
|
1677
1676
|
"@": {
|
|
1678
1677
|
title: "@ Users & Teams",
|
|
1679
1678
|
noun: "user",
|
|
@@ -1686,14 +1685,14 @@ const Ie = (t) => at(new ve(t)), Xe = (t) => t instanceof ve, Ze = ge("EMOJI_USE
|
|
|
1686
1685
|
"@@": { title: "@@ Versions", noun: "version" },
|
|
1687
1686
|
"@@@": { title: "@@@ Tasks", noun: "task" }
|
|
1688
1687
|
}, It = /(^|[\s([{"'])(@{1,3})([^\s@]{0,75})$/;
|
|
1689
|
-
class
|
|
1688
|
+
class Pi extends gt {
|
|
1690
1689
|
item;
|
|
1691
1690
|
constructor(e, n) {
|
|
1692
1691
|
super(`${e.type}:${e.id}:${n}`), this.item = e;
|
|
1693
1692
|
}
|
|
1694
1693
|
}
|
|
1695
|
-
const
|
|
1696
|
-
const [o] = I(), [r, i] = U(null), [s, a] = U(null), m = O("@"), [d, k] = U("@"), _ = t.triggers ??
|
|
1694
|
+
const Bi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
1695
|
+
const [o] = I(), [r, i] = U(null), [s, a] = U(null), m = O("@"), [d, k] = U("@"), _ = t.triggers ?? Ii, g = t.limit ?? (n === "top" ? 8 : 5), b = H(
|
|
1697
1696
|
(E) => {
|
|
1698
1697
|
if (Be()) return null;
|
|
1699
1698
|
const p = It.exec(E);
|
|
@@ -1712,7 +1711,7 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1712
1711
|
return;
|
|
1713
1712
|
}
|
|
1714
1713
|
k((p) => (p !== m.current && a(null), m.current));
|
|
1715
|
-
}, []), c = { ...
|
|
1714
|
+
}, []), c = { ...Di[d], ...t.config?.[d] }, u = r !== null ? t.getError?.(d) : null, w = _e(() => r === null || u ? [] : t.getOptions({ trigger: d, search: r.toLowerCase(), filter: s }).slice(0, g).map((E, p) => new Pi(E, p)), [r, d, s, t, g, u]), T = H(
|
|
1716
1715
|
(E, p, f) => {
|
|
1717
1716
|
o.update(() => {
|
|
1718
1717
|
const { type: v, id: C, label: h } = E.item, L = De(v, C, h);
|
|
@@ -1746,8 +1745,8 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1746
1745
|
if (X(A)) {
|
|
1747
1746
|
const F = A.getTextContent().slice(0, L.offset), N = It.exec(F);
|
|
1748
1747
|
if (N) {
|
|
1749
|
-
const
|
|
1750
|
-
A.spliceText(
|
|
1748
|
+
const j = N.index + N[1].length;
|
|
1749
|
+
A.spliceText(j, L.offset - j, "", !0);
|
|
1751
1750
|
}
|
|
1752
1751
|
}
|
|
1753
1752
|
}
|
|
@@ -1778,8 +1777,8 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1778
1777
|
anchor: C,
|
|
1779
1778
|
placement: n,
|
|
1780
1779
|
title: c.title,
|
|
1781
|
-
titleActions: !!c.filters?.length && /* @__PURE__ */ l(
|
|
1782
|
-
|
|
1780
|
+
titleActions: !!c.filters?.length && /* @__PURE__ */ l(Si, { children: c.filters.map((h) => /* @__PURE__ */ l(
|
|
1781
|
+
Oi,
|
|
1783
1782
|
{
|
|
1784
1783
|
className: P({ active: s === h.id }),
|
|
1785
1784
|
onClick: () => a((L) => L === h.id ? null : h.id),
|
|
@@ -1798,7 +1797,7 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1798
1797
|
optionClassName: () => c.isCircle ? void 0 : "square",
|
|
1799
1798
|
emptyMessage: u || `No ${c.noun}s found`,
|
|
1800
1799
|
renderOption: ({ item: h }) => /* @__PURE__ */ S(me, { children: [
|
|
1801
|
-
t.renderOptionImage ? t.renderOptionImage(h) : h.type === "user" ? /* @__PURE__ */ l(
|
|
1800
|
+
t.renderOptionImage ? t.renderOptionImage(h) : h.type === "user" ? /* @__PURE__ */ l(gr, { size: 20, name: h.id, className: "image" }) : h.icon && /* @__PURE__ */ l(J, { icon: h.icon, className: "image", style: { color: h.color } }),
|
|
1802
1801
|
h.context && /* @__PURE__ */ S("span", { className: "context", children: [
|
|
1803
1802
|
h.context,
|
|
1804
1803
|
" - "
|
|
@@ -1811,14 +1810,14 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1811
1810
|
}
|
|
1812
1811
|
}
|
|
1813
1812
|
);
|
|
1814
|
-
}, Dt = "emojiUsage",
|
|
1815
|
-
const { user: t } =
|
|
1813
|
+
}, Dt = "emojiUsage", zi = 40, Fi = () => {
|
|
1814
|
+
const { user: t } = lr(), e = t?.data?.frontendPreferences?.[Dt] ?? {}, n = O(e);
|
|
1816
1815
|
n.current = e;
|
|
1817
1816
|
const [o] = Vn(), r = H(
|
|
1818
1817
|
(i) => {
|
|
1819
1818
|
if (!t?.name) return;
|
|
1820
1819
|
const s = { ...n.current, [i]: (n.current[i] ?? 0) + 1 }, a = Object.fromEntries(
|
|
1821
|
-
Object.entries(s).sort(([, m], [, d]) => d - m).slice(0,
|
|
1820
|
+
Object.entries(s).sort(([, m], [, d]) => d - m).slice(0, zi)
|
|
1822
1821
|
);
|
|
1823
1822
|
n.current = a, o({
|
|
1824
1823
|
userName: t.name,
|
|
@@ -1831,16 +1830,16 @@ const Pi = ({ source: t, menuParent: e, placement: n = "inline" }) => {
|
|
|
1831
1830
|
[t?.name, o]
|
|
1832
1831
|
);
|
|
1833
1832
|
return { usage: e, recordUse: r };
|
|
1834
|
-
},
|
|
1835
|
-
class
|
|
1833
|
+
}, Ki = /(^|[\s([{"'])(:)([a-z0-9_+-]{0,40})$/i;
|
|
1834
|
+
class Ui extends gt {
|
|
1836
1835
|
emoji;
|
|
1837
1836
|
constructor(e) {
|
|
1838
1837
|
super(e.name), this.emoji = e;
|
|
1839
1838
|
}
|
|
1840
1839
|
}
|
|
1841
|
-
const
|
|
1842
|
-
const [n] = I(), [o, r] = U(null), i = t === "top" ? 8 : 5, { usage: s, recordUse: a } =
|
|
1843
|
-
() => o === null ? [] : jr(o, s, i).map((_) => new
|
|
1840
|
+
const Hi = ({ placement: t = "inline", menuParent: e }) => {
|
|
1841
|
+
const [n] = I(), [o, r] = U(null), i = t === "top" ? 8 : 5, { usage: s, recordUse: a } = Fi(), m = _e(
|
|
1842
|
+
() => o === null ? [] : jr(o, s, i).map((_) => new Ui(_)),
|
|
1844
1843
|
[o, i, s]
|
|
1845
1844
|
);
|
|
1846
1845
|
R(
|
|
@@ -1853,7 +1852,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1853
1852
|
);
|
|
1854
1853
|
const d = H((_) => {
|
|
1855
1854
|
if (Be()) return null;
|
|
1856
|
-
const g =
|
|
1855
|
+
const g = Ki.exec(_);
|
|
1857
1856
|
return g ? {
|
|
1858
1857
|
leadOffset: g.index + g[1].length,
|
|
1859
1858
|
matchingString: g[3],
|
|
@@ -1922,7 +1921,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1922
1921
|
if (!e) return null;
|
|
1923
1922
|
const n = ft(e.getAttribute("data-mention-value"));
|
|
1924
1923
|
return n ? { target: e, mention: { ...n, label: e.getAttribute("data-mention-label") || "" } } : null;
|
|
1925
|
-
},
|
|
1924
|
+
}, Gi = ({ onMentionClick: t, onMentionHover: e }) => {
|
|
1926
1925
|
const [n] = I(), o = O({ onMentionClick: t, onMentionHover: e });
|
|
1927
1926
|
return o.current = { onMentionClick: t, onMentionHover: e }, R(() => {
|
|
1928
1927
|
const r = (m) => {
|
|
@@ -1943,27 +1942,27 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1943
1942
|
}, tt = (t) => {
|
|
1944
1943
|
let e = t.getKey() === "root" ? t : W(t, (n) => {
|
|
1945
1944
|
const o = n.getParent();
|
|
1946
|
-
return o !== null &&
|
|
1945
|
+
return o !== null && ro(o);
|
|
1947
1946
|
});
|
|
1948
1947
|
if (e === null && (e = t.getTopLevelElementOrThrow()), sn(e))
|
|
1949
|
-
return (
|
|
1950
|
-
if (
|
|
1948
|
+
return (ir(t, an) ?? e).getListType();
|
|
1949
|
+
if (Co(e)) {
|
|
1951
1950
|
const n = e.getTag();
|
|
1952
1951
|
return n === "h1" || n === "h2" || n === "h3" ? n : "heading";
|
|
1953
1952
|
}
|
|
1954
1953
|
return on(e) ? "quote" : ee(e) ? "code" : "paragraph";
|
|
1955
1954
|
}, ji = {
|
|
1956
|
-
bullet:
|
|
1957
|
-
number:
|
|
1958
|
-
check:
|
|
1959
|
-
},
|
|
1955
|
+
bullet: Ao,
|
|
1956
|
+
number: Ro,
|
|
1957
|
+
check: Oo
|
|
1958
|
+
}, G = (t, e, n = "toggle") => {
|
|
1960
1959
|
const o = t.getEditorState().read(() => {
|
|
1961
1960
|
const r = M();
|
|
1962
1961
|
return $(r) ? tt(r.anchor.getNode()) : null;
|
|
1963
1962
|
});
|
|
1964
1963
|
if (o !== null && !(n === "set" && o === e)) {
|
|
1965
1964
|
if (e === "bullet" || e === "number" || e === "check") {
|
|
1966
|
-
o === e ? t.dispatchCommand(
|
|
1965
|
+
o === e ? t.dispatchCommand(So, void 0) : t.dispatchCommand(ji[e], void 0);
|
|
1967
1966
|
return;
|
|
1968
1967
|
}
|
|
1969
1968
|
t.update(() => {
|
|
@@ -1974,8 +1973,8 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1974
1973
|
return;
|
|
1975
1974
|
}
|
|
1976
1975
|
if (e === "h1" || e === "h2" || e === "h3")
|
|
1977
|
-
Me(r, () =>
|
|
1978
|
-
else if (e === "quote") Me(r, () =>
|
|
1976
|
+
Me(r, () => To(e));
|
|
1977
|
+
else if (e === "quote") Me(r, () => Lo());
|
|
1979
1978
|
else if (r.isCollapsed()) Me(r, () => Mt());
|
|
1980
1979
|
else {
|
|
1981
1980
|
const i = r.getTextContent(), s = Mt();
|
|
@@ -1993,11 +1992,11 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
1993
1992
|
), Bt = (t) => {
|
|
1994
1993
|
const e = t.trim();
|
|
1995
1994
|
return e ? /^(https?:|mailto:|\/|#)/i.test(e) ? e : `https://${e}` : "";
|
|
1996
|
-
},
|
|
1995
|
+
}, Wi = {
|
|
1997
1996
|
blockType: "paragraph",
|
|
1998
1997
|
formats: {},
|
|
1999
1998
|
isLink: !1
|
|
2000
|
-
},
|
|
1999
|
+
}, Yi = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), $e = Yi ? "⌘" : "Ctrl+", Ye = {
|
|
2001
2000
|
h1: { icon: "format_h1", tooltip: "Heading 1", shortcut: "#" },
|
|
2002
2001
|
h2: { icon: "format_h2", tooltip: "Heading 2", shortcut: "##" },
|
|
2003
2002
|
h3: { icon: "format_h3", tooltip: "Heading 3", shortcut: "###" },
|
|
@@ -2011,8 +2010,8 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2011
2010
|
numberList: { icon: "format_list_numbered", tooltip: "Numbered list", shortcut: "1." },
|
|
2012
2011
|
bulletList: { icon: "format_list_bulleted", tooltip: "Bullet list", shortcut: "-" },
|
|
2013
2012
|
checkList: { icon: "check_circle", tooltip: "Checklist", shortcut: "[]" }
|
|
2014
|
-
}, zt = ({ layout: t =
|
|
2015
|
-
const [r] = I(), [i, s] = U(
|
|
2013
|
+
}, zt = ({ layout: t = Er, start: e, end: n, floating: o }) => {
|
|
2014
|
+
const [r] = I(), [i, s] = U(Wi), [a, m] = U(null), d = H(() => {
|
|
2016
2015
|
const c = r.getRootElement(), u = window.getSelection();
|
|
2017
2016
|
if (!c || !u || u.isCollapsed || !u.rangeCount) {
|
|
2018
2017
|
m(null);
|
|
@@ -2067,25 +2066,25 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2067
2066
|
case "h1":
|
|
2068
2067
|
case "h2":
|
|
2069
2068
|
case "h3":
|
|
2070
|
-
|
|
2069
|
+
G(r, c);
|
|
2071
2070
|
break;
|
|
2072
2071
|
case "quote":
|
|
2073
|
-
|
|
2072
|
+
G(r, "quote");
|
|
2074
2073
|
break;
|
|
2075
2074
|
case "codeBlock":
|
|
2076
|
-
|
|
2075
|
+
G(r, "code");
|
|
2077
2076
|
break;
|
|
2078
2077
|
case "link":
|
|
2079
2078
|
m(null), r.dispatchCommand(Ln, void 0);
|
|
2080
2079
|
break;
|
|
2081
2080
|
case "bulletList":
|
|
2082
|
-
|
|
2081
|
+
G(r, "bullet");
|
|
2083
2082
|
break;
|
|
2084
2083
|
case "numberList":
|
|
2085
|
-
|
|
2084
|
+
G(r, "number");
|
|
2086
2085
|
break;
|
|
2087
2086
|
case "checkList":
|
|
2088
|
-
|
|
2087
|
+
G(r, "check");
|
|
2089
2088
|
break;
|
|
2090
2089
|
}
|
|
2091
2090
|
}, g = (c) => {
|
|
@@ -2112,8 +2111,8 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2112
2111
|
case "checkList":
|
|
2113
2112
|
return i.blockType === "check";
|
|
2114
2113
|
}
|
|
2115
|
-
}, b = (c) => i.blockType === "code" && ["bold", "italic", "strikethrough", "code", "link"].includes(c), y = /* @__PURE__ */ l(
|
|
2116
|
-
(c, u) => c === "|" ? /* @__PURE__ */ l(
|
|
2114
|
+
}, b = (c) => i.blockType === "code" && ["bold", "italic", "strikethrough", "code", "link"].includes(c), y = /* @__PURE__ */ l(bi, { children: t.map(
|
|
2115
|
+
(c, u) => c === "|" ? /* @__PURE__ */ l(yi, { className: "md-toolbar-divider" }, `divider-${u}`) : /* @__PURE__ */ l(Qn, { children: /* @__PURE__ */ l(
|
|
2117
2116
|
te,
|
|
2118
2117
|
{
|
|
2119
2118
|
icon: Ye[c].icon,
|
|
@@ -2133,7 +2132,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2133
2132
|
) });
|
|
2134
2133
|
return o ? a ? fe(
|
|
2135
2134
|
/* @__PURE__ */ l(
|
|
2136
|
-
|
|
2135
|
+
Ei,
|
|
2137
2136
|
{
|
|
2138
2137
|
className: P("md-toolbar md-floating-toolbar md-popover", ae),
|
|
2139
2138
|
style: { top: a.top, left: a.left },
|
|
@@ -2141,18 +2140,18 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2141
2140
|
}
|
|
2142
2141
|
),
|
|
2143
2142
|
document.body
|
|
2144
|
-
) : null : /* @__PURE__ */ S(
|
|
2143
|
+
) : null : /* @__PURE__ */ S(fi, { className: "md-toolbar", children: [
|
|
2145
2144
|
e,
|
|
2146
2145
|
y,
|
|
2147
2146
|
n
|
|
2148
2147
|
] });
|
|
2149
|
-
},
|
|
2148
|
+
}, qi = (t) => t.metaKey || t.ctrlKey, Vi = () => {
|
|
2150
2149
|
const [t] = I();
|
|
2151
2150
|
return R(
|
|
2152
2151
|
() => q(
|
|
2153
2152
|
t.registerCommand(
|
|
2154
2153
|
Xt,
|
|
2155
|
-
(e) =>
|
|
2154
|
+
(e) => qi(e) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === "e" ? (e.preventDefault(), t.dispatchCommand(dt, "code"), !0) : !1,
|
|
2156
2155
|
D
|
|
2157
2156
|
),
|
|
2158
2157
|
t.registerCommand(
|
|
@@ -2170,7 +2169,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2170
2169
|
D
|
|
2171
2170
|
),
|
|
2172
2171
|
t.registerCommand(
|
|
2173
|
-
|
|
2172
|
+
io,
|
|
2174
2173
|
(e) => {
|
|
2175
2174
|
if (e?.shiftKey) return !1;
|
|
2176
2175
|
const n = M();
|
|
@@ -2191,7 +2190,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2191
2190
|
),
|
|
2192
2191
|
[t]
|
|
2193
2192
|
), null;
|
|
2194
|
-
},
|
|
2193
|
+
}, Qi = () => {
|
|
2195
2194
|
const [t] = I();
|
|
2196
2195
|
return R(() => {
|
|
2197
2196
|
const e = (n) => {
|
|
@@ -2209,16 +2208,16 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2209
2208
|
return r.insertAfter(d), d.select(), !0;
|
|
2210
2209
|
};
|
|
2211
2210
|
return q(
|
|
2212
|
-
t.registerCommand(
|
|
2211
|
+
t.registerCommand(so, e, D),
|
|
2213
2212
|
t.registerCommand(Zt, e, D)
|
|
2214
2213
|
);
|
|
2215
2214
|
}, [t]), null;
|
|
2216
|
-
},
|
|
2215
|
+
}, Ji = /^\[([ xX]?)\]\s/, Xi = () => {
|
|
2217
2216
|
const [t] = I();
|
|
2218
2217
|
return R(
|
|
2219
2218
|
() => t.registerNodeTransform(st, (e) => {
|
|
2220
2219
|
if (!e.isSimpleText()) return;
|
|
2221
|
-
const n = e.getTextContent().match(
|
|
2220
|
+
const n = e.getTextContent().match(Ji);
|
|
2222
2221
|
if (!n) return;
|
|
2223
2222
|
const o = e.getParent();
|
|
2224
2223
|
if (!ln(o) || !e.is(o.getFirstChild())) return;
|
|
@@ -2227,7 +2226,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2227
2226
|
if (r.getChildrenSize() === 1)
|
|
2228
2227
|
r.setListType("check");
|
|
2229
2228
|
else if (o.is(r.getLastChild())) {
|
|
2230
|
-
const s =
|
|
2229
|
+
const s = Io("check");
|
|
2231
2230
|
r.insertAfter(s), s.append(o);
|
|
2232
2231
|
} else
|
|
2233
2232
|
return;
|
|
@@ -2236,7 +2235,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2236
2235
|
}),
|
|
2237
2236
|
[t]
|
|
2238
2237
|
), null;
|
|
2239
|
-
},
|
|
2238
|
+
}, Zi = ({ onSubmit: t, onEscape: e, submitOnEnter: n }) => {
|
|
2240
2239
|
const [o] = I(), r = O({ onSubmit: t, onEscape: e, submitOnEnter: n });
|
|
2241
2240
|
return r.current = { onSubmit: t, onEscape: e, submitOnEnter: n }, R(() => {
|
|
2242
2241
|
const i = () => {
|
|
@@ -2256,7 +2255,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2256
2255
|
o.registerCommand(
|
|
2257
2256
|
Qe,
|
|
2258
2257
|
(s) => !s || !(s.metaKey || s.ctrlKey) || !r.current.onSubmit ? !1 : (s.preventDefault(), r.current.onSubmit(), !0),
|
|
2259
|
-
|
|
2258
|
+
ao
|
|
2260
2259
|
),
|
|
2261
2260
|
// below the mention menu (which selects an option on enter), above the rich text plugin
|
|
2262
2261
|
o.registerCommand(
|
|
@@ -2277,11 +2276,11 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2277
2276
|
o.registerCommand(
|
|
2278
2277
|
tn,
|
|
2279
2278
|
() => r.current.onEscape ? (r.current.onEscape(), !0) : !1,
|
|
2280
|
-
|
|
2279
|
+
lo
|
|
2281
2280
|
)
|
|
2282
2281
|
);
|
|
2283
2282
|
}, [o]), null;
|
|
2284
|
-
}, qe = (t) => Y(t) && t.getChildrenSize() === 0,
|
|
2283
|
+
}, qe = (t) => Y(t) && t.getChildrenSize() === 0, es = () => {
|
|
2285
2284
|
const [t] = I();
|
|
2286
2285
|
return R(
|
|
2287
2286
|
() => t.registerCommand(
|
|
@@ -2298,7 +2297,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2298
2297
|
),
|
|
2299
2298
|
[t]
|
|
2300
2299
|
), null;
|
|
2301
|
-
}, Ft = /^[0-9a-f]{32}$/,
|
|
2300
|
+
}, Ft = /^[0-9a-f]{32}$/, Bl = (t, e) => `source:${t}` + (e ? `?${new URLSearchParams({ type: e.type, id: e.id })}` : ""), ze = (t) => {
|
|
2302
2301
|
if (!t) return null;
|
|
2303
2302
|
const e = t.match(/^source:([0-9a-f]{32})(?:\?(.*))?$/);
|
|
2304
2303
|
if (e) {
|
|
@@ -2330,7 +2329,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2330
2329
|
} catch {
|
|
2331
2330
|
return { projectName: o, ...i };
|
|
2332
2331
|
}
|
|
2333
|
-
}, $n = "Comment",
|
|
2332
|
+
}, $n = "Comment", ts = () => {
|
|
2334
2333
|
const [t] = I();
|
|
2335
2334
|
return R(() => {
|
|
2336
2335
|
const e = (r) => {
|
|
@@ -2376,7 +2375,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2376
2375
|
}
|
|
2377
2376
|
const n = M(), o = $(n) ? n.anchor.getNode().getTopLevelElement() : ie().getLastChild();
|
|
2378
2377
|
o ? o.insertAfter(t) : ie().append(t), Nn(t);
|
|
2379
|
-
},
|
|
2378
|
+
}, ns = (t) => Sn(pe(t)), os = () => {
|
|
2380
2379
|
const [t] = I();
|
|
2381
2380
|
return R(
|
|
2382
2381
|
() => q(
|
|
@@ -2418,7 +2417,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2418
2417
|
if (!e || Je(e) && e.getIsUnlinked()) return null;
|
|
2419
2418
|
const n = W(t.focus.getNode(), ne);
|
|
2420
2419
|
return n && n.is(e) ? e : null;
|
|
2421
|
-
},
|
|
2420
|
+
}, rs = () => {
|
|
2422
2421
|
const [t] = I(), [e, n] = U(null), [o, r] = U(""), [i, s] = U(!1), a = O(null), m = O(null), d = O(null), k = O(e);
|
|
2423
2422
|
k.current = e;
|
|
2424
2423
|
const _ = () => !!m.current && document.activeElement === m.current, g = H(
|
|
@@ -2523,7 +2522,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2523
2522
|
const p = k.current;
|
|
2524
2523
|
p?.mode === "link" && (t.update(() => {
|
|
2525
2524
|
const f = se(p.key);
|
|
2526
|
-
Je(f) ? (f.setIsUnlinked(!0), f.markDirty()) : ne(f) &&
|
|
2525
|
+
Je(f) ? (f.setIsUnlinked(!0), f.markDirty()) : ne(f) && sr(f);
|
|
2527
2526
|
}), g(!0));
|
|
2528
2527
|
}, w = () => {
|
|
2529
2528
|
const p = k.current;
|
|
@@ -2553,7 +2552,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2553
2552
|
return;
|
|
2554
2553
|
}
|
|
2555
2554
|
t.update(() => {
|
|
2556
|
-
d.current && We(d.current.clone()),
|
|
2555
|
+
d.current && We(d.current.clone()), ns(f);
|
|
2557
2556
|
}), g(!0);
|
|
2558
2557
|
return;
|
|
2559
2558
|
}
|
|
@@ -2573,7 +2572,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2573
2572
|
h.anchor.set(L.key, L.offset - f.length, "text");
|
|
2574
2573
|
}
|
|
2575
2574
|
}
|
|
2576
|
-
t.dispatchCommand(
|
|
2575
|
+
t.dispatchCommand(Po, f);
|
|
2577
2576
|
const C = M();
|
|
2578
2577
|
if ($(C)) {
|
|
2579
2578
|
const h = C.isBackward() ? C.anchor : C.focus;
|
|
@@ -2585,7 +2584,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2585
2584
|
const T = Math.max(8, Math.min(e.rect.left, window.innerWidth - Kt - 8)), E = Bt(o) !== e.url;
|
|
2586
2585
|
return fe(
|
|
2587
2586
|
/* @__PURE__ */ S(
|
|
2588
|
-
|
|
2587
|
+
vi,
|
|
2589
2588
|
{
|
|
2590
2589
|
ref: a,
|
|
2591
2590
|
className: P("md-popover md-link-popover", ae),
|
|
@@ -2660,7 +2659,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2660
2659
|
),
|
|
2661
2660
|
document.body
|
|
2662
2661
|
);
|
|
2663
|
-
},
|
|
2662
|
+
}, is = () => {
|
|
2664
2663
|
const [t] = I(), [e, n] = U(null), o = O(null), r = O(null), i = O(!1), s = H(() => {
|
|
2665
2664
|
i.current || t.getEditorState().read(() => {
|
|
2666
2665
|
let d = null;
|
|
@@ -2723,7 +2722,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2723
2722
|
const m = Re.some((d) => d.value === e.language) ? Re : [...Re, { value: e.language, label: e.language }];
|
|
2724
2723
|
return fe(
|
|
2725
2724
|
/* @__PURE__ */ l(
|
|
2726
|
-
|
|
2725
|
+
ki,
|
|
2727
2726
|
{
|
|
2728
2727
|
ref: r,
|
|
2729
2728
|
className: P("md-popover md-code-language", ae),
|
|
@@ -2732,7 +2731,7 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2732
2731
|
i.current || t.getRootElement()?.contains(d.relatedTarget) || (o.current = null, s());
|
|
2733
2732
|
},
|
|
2734
2733
|
children: /* @__PURE__ */ l(
|
|
2735
|
-
|
|
2734
|
+
Zn,
|
|
2736
2735
|
{
|
|
2737
2736
|
options: m,
|
|
2738
2737
|
value: [e.language],
|
|
@@ -2752,8 +2751,8 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2752
2751
|
i.current = !1, a(d[0] ?? "");
|
|
2753
2752
|
},
|
|
2754
2753
|
listClassName: P("md-code-language-list", ae),
|
|
2755
|
-
valueTemplate: () => /* @__PURE__ */ S(
|
|
2756
|
-
/* @__PURE__ */ l("span", { children:
|
|
2754
|
+
valueTemplate: () => /* @__PURE__ */ S(wi, { className: "md-code-language-button", children: [
|
|
2755
|
+
/* @__PURE__ */ l("span", { children: fr(e.language) || "Plain text" }),
|
|
2757
2756
|
/* @__PURE__ */ l(J, { icon: "expand_more" })
|
|
2758
2757
|
] })
|
|
2759
2758
|
}
|
|
@@ -2762,21 +2761,21 @@ const Ui = ({ placement: t = "inline", menuParent: e }) => {
|
|
|
2762
2761
|
),
|
|
2763
2762
|
document.body
|
|
2764
2763
|
);
|
|
2765
|
-
},
|
|
2764
|
+
}, ss = { ...dr, defaultLanguage: null }, as = () => {
|
|
2766
2765
|
const [t] = I();
|
|
2767
|
-
return R(() =>
|
|
2766
|
+
return R(() => ur(t, ss), [t]), null;
|
|
2768
2767
|
}, Ht = ge(
|
|
2769
2768
|
"INSERT_MEDIA_FILES_COMMAND"
|
|
2770
2769
|
), On = ge(
|
|
2771
2770
|
"OPEN_MEDIA_PICKER_COMMAND"
|
|
2772
|
-
),
|
|
2773
|
-
class
|
|
2771
|
+
), ls = /(^|\s)(\/)([\w-]{0,30})$/;
|
|
2772
|
+
class cs extends gt {
|
|
2774
2773
|
command;
|
|
2775
2774
|
constructor(e) {
|
|
2776
2775
|
super(e.id), this.command = e;
|
|
2777
2776
|
}
|
|
2778
2777
|
}
|
|
2779
|
-
const
|
|
2778
|
+
const ds = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), us = ds ? "⌘" : "Ctrl+", ms = ({
|
|
2780
2779
|
placement: t = "inline",
|
|
2781
2780
|
menuParent: e,
|
|
2782
2781
|
mentionTriggers: n = [],
|
|
@@ -2800,7 +2799,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2800
2799
|
group: "headings",
|
|
2801
2800
|
keywords: ["h1", "title", "heading"],
|
|
2802
2801
|
hint: "#",
|
|
2803
|
-
run: (u) =>
|
|
2802
|
+
run: (u) => G(u, "h1", "set")
|
|
2804
2803
|
},
|
|
2805
2804
|
{
|
|
2806
2805
|
id: "h2",
|
|
@@ -2809,7 +2808,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2809
2808
|
group: "headings",
|
|
2810
2809
|
keywords: ["h2", "heading", "subtitle"],
|
|
2811
2810
|
hint: "##",
|
|
2812
|
-
run: (u) =>
|
|
2811
|
+
run: (u) => G(u, "h2", "set")
|
|
2813
2812
|
},
|
|
2814
2813
|
{
|
|
2815
2814
|
id: "h3",
|
|
@@ -2818,7 +2817,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2818
2817
|
group: "headings",
|
|
2819
2818
|
keywords: ["h3", "heading"],
|
|
2820
2819
|
hint: "###",
|
|
2821
|
-
run: (u) =>
|
|
2820
|
+
run: (u) => G(u, "h3", "set")
|
|
2822
2821
|
},
|
|
2823
2822
|
{
|
|
2824
2823
|
id: "bullet",
|
|
@@ -2827,7 +2826,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2827
2826
|
group: "lists",
|
|
2828
2827
|
keywords: ["list", "bullet", "unordered", "ul"],
|
|
2829
2828
|
hint: "-",
|
|
2830
|
-
run: (u) =>
|
|
2829
|
+
run: (u) => G(u, "bullet", "set")
|
|
2831
2830
|
},
|
|
2832
2831
|
{
|
|
2833
2832
|
id: "number",
|
|
@@ -2836,7 +2835,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2836
2835
|
group: "lists",
|
|
2837
2836
|
keywords: ["list", "numbered", "ordered", "ol"],
|
|
2838
2837
|
hint: "1.",
|
|
2839
|
-
run: (u) =>
|
|
2838
|
+
run: (u) => G(u, "number", "set")
|
|
2840
2839
|
},
|
|
2841
2840
|
{
|
|
2842
2841
|
id: "check",
|
|
@@ -2845,7 +2844,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2845
2844
|
group: "lists",
|
|
2846
2845
|
keywords: ["list", "check", "task", "todo"],
|
|
2847
2846
|
hint: "[]",
|
|
2848
|
-
run: (u) =>
|
|
2847
|
+
run: (u) => G(u, "check", "set")
|
|
2849
2848
|
},
|
|
2850
2849
|
{
|
|
2851
2850
|
id: "quote",
|
|
@@ -2854,7 +2853,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2854
2853
|
group: "blocks",
|
|
2855
2854
|
keywords: ["quote", "blockquote"],
|
|
2856
2855
|
hint: ">",
|
|
2857
|
-
run: (u) =>
|
|
2856
|
+
run: (u) => G(u, "quote", "set")
|
|
2858
2857
|
},
|
|
2859
2858
|
{
|
|
2860
2859
|
id: "codeBlock",
|
|
@@ -2863,7 +2862,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2863
2862
|
group: "blocks",
|
|
2864
2863
|
keywords: ["code", "block", "snippet", "pre"],
|
|
2865
2864
|
hint: "```",
|
|
2866
|
-
run: (u) =>
|
|
2865
|
+
run: (u) => G(u, "code", "set")
|
|
2867
2866
|
},
|
|
2868
2867
|
{
|
|
2869
2868
|
id: "code",
|
|
@@ -2871,7 +2870,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2871
2870
|
icon: "code",
|
|
2872
2871
|
group: "blocks",
|
|
2873
2872
|
keywords: ["code", "inline", "monospace"],
|
|
2874
|
-
hint: `${
|
|
2873
|
+
hint: `${us}E`,
|
|
2875
2874
|
run: (u) => u.dispatchCommand(dt, "code")
|
|
2876
2875
|
},
|
|
2877
2876
|
{
|
|
@@ -2919,10 +2918,10 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
2919
2918
|
(c) => !y || c.label.toLowerCase().startsWith(y) || [...c.label.toLowerCase().split(/\s+/), ...c.keywords].some(
|
|
2920
2919
|
(u) => u.startsWith(y)
|
|
2921
2920
|
)
|
|
2922
|
-
).map((c) => new
|
|
2921
|
+
).map((c) => new cs(c));
|
|
2923
2922
|
}, [k, a]), g = H((y) => {
|
|
2924
2923
|
if (Be()) return null;
|
|
2925
|
-
const c =
|
|
2924
|
+
const c = ls.exec(y);
|
|
2926
2925
|
return c ? {
|
|
2927
2926
|
leadOffset: c.index + c[1].length,
|
|
2928
2927
|
matchingString: c[3],
|
|
@@ -3000,7 +2999,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3000
2999
|
}, xt = (t) => t.slice(0, 7), Rn = (t) => {
|
|
3001
3000
|
const e = t.match(/^#L(\d+)(?:C\d+)?(?:-L(\d+))?/);
|
|
3002
3001
|
return e ? e[2] ? `:${e[1]}-${e[2]}` : `:${e[1]}` : "";
|
|
3003
|
-
}, An = (t) => Q(t[t.length - 1] || ""),
|
|
3002
|
+
}, An = (t) => Q(t[t.length - 1] || ""), ps = /* @__PURE__ */ new Set([
|
|
3004
3003
|
"about",
|
|
3005
3004
|
"apps",
|
|
3006
3005
|
"collections",
|
|
@@ -3021,9 +3020,9 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3021
3020
|
"sponsors",
|
|
3022
3021
|
"topics",
|
|
3023
3022
|
"trending"
|
|
3024
|
-
]),
|
|
3023
|
+
]), gs = (t, e) => {
|
|
3025
3024
|
const [n, o, r, ...i] = e;
|
|
3026
|
-
if (!n ||
|
|
3025
|
+
if (!n || ps.has(n)) return null;
|
|
3027
3026
|
if (!o) return n;
|
|
3028
3027
|
switch (r) {
|
|
3029
3028
|
case void 0:
|
|
@@ -3050,7 +3049,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3050
3049
|
default:
|
|
3051
3050
|
return null;
|
|
3052
3051
|
}
|
|
3053
|
-
},
|
|
3052
|
+
}, hs = (t, e) => {
|
|
3054
3053
|
const n = e.indexOf("-");
|
|
3055
3054
|
if (n < 2) return e.length >= 2 ? e[e.length - 1] : null;
|
|
3056
3055
|
const o = e[n - 1], [r, i, ...s] = e.slice(n + 1);
|
|
@@ -3072,60 +3071,60 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3072
3071
|
default:
|
|
3073
3072
|
return null;
|
|
3074
3073
|
}
|
|
3075
|
-
},
|
|
3074
|
+
}, fs = (t, e) => {
|
|
3076
3075
|
const [, n, o, r] = e;
|
|
3077
3076
|
return n ? o === "pull-requests" && r ? `${n} #${r}` : o === "issues" && r ? `${n} #${r}` : o === "commits" && r ? `${n}@${xt(r)}` : o ? null : n : null;
|
|
3078
|
-
},
|
|
3079
|
-
const n = e.find((o) =>
|
|
3080
|
-
if (n &&
|
|
3077
|
+
}, Gt = /^[A-Z][A-Z0-9_]+-\d+$/, bs = (t, e) => {
|
|
3078
|
+
const n = e.find((o) => Gt.test(o)) || t.searchParams.get("selectedIssue");
|
|
3079
|
+
if (n && Gt.test(n)) return n;
|
|
3081
3080
|
if (e[0] === "wiki") {
|
|
3082
3081
|
const o = e.indexOf("pages"), r = o >= 0 ? e[o + 2] : void 0;
|
|
3083
3082
|
if (r) return Q(r);
|
|
3084
3083
|
if (e[1] === "spaces" && e[2]) return `${e[2]} space`;
|
|
3085
3084
|
}
|
|
3086
3085
|
return null;
|
|
3087
|
-
},
|
|
3086
|
+
}, ys = (t, e) => {
|
|
3088
3087
|
const [, n, o, r] = e;
|
|
3089
3088
|
return n === "issue" && o ? r ? `${o} ${le(r)}` : o : n === "project" && o ? le(o.replace(/-[0-9a-f]{8,}$/, "")) : null;
|
|
3090
|
-
},
|
|
3089
|
+
}, vs = (t, e) => {
|
|
3091
3090
|
const o = e[e.length - 1]?.replace(/-?[0-9a-f]{32}$/i, "");
|
|
3092
3091
|
return o ? le(o) : null;
|
|
3093
|
-
},
|
|
3092
|
+
}, xs = (t, e) => {
|
|
3094
3093
|
const [n, , o] = e;
|
|
3095
3094
|
return ["file", "design", "proto", "board", "slides"].includes(n || "") && o ? `${Q(o).replace(/-/g, " ")} (Figma)` : null;
|
|
3096
|
-
},
|
|
3095
|
+
}, ks = (t, e) => {
|
|
3097
3096
|
const [n, , o] = e;
|
|
3098
3097
|
return !o || !["c", "b"].includes(n || "") ? null : le(n === "c" ? o.replace(/^\d+-/, "") : o);
|
|
3099
|
-
},
|
|
3098
|
+
}, ws = (t, e) => {
|
|
3100
3099
|
const n = e.indexOf("detail");
|
|
3101
3100
|
if (n >= 0 && e[n + 1] && /^\d+$/.test(e[n + 2] || ""))
|
|
3102
3101
|
return `${Q(e[n + 1]).replace(/_/g, " ")} ${e[n + 2]}`;
|
|
3103
3102
|
const o = t.hash.match(/^#([A-Za-z]+(?:_[A-Za-z]+)*)_(\d+)/);
|
|
3104
3103
|
return o ? `${o[1].replace(/_/g, " ")} ${o[2]}` : null;
|
|
3105
|
-
},
|
|
3104
|
+
}, _s = (t, e) => e[0] === "questions" && e[2] ? le(e[2]) : null, Es = (t, e) => e[0] === "t" && e[1] && !/^\d+$/.test(e[1]) ? le(e[1]) : null, Cs = {
|
|
3106
3105
|
document: "Google Doc",
|
|
3107
3106
|
spreadsheets: "Google Sheet",
|
|
3108
3107
|
presentation: "Google Slides",
|
|
3109
3108
|
forms: "Google Form",
|
|
3110
3109
|
drawings: "Google Drawing"
|
|
3111
|
-
},
|
|
3110
|
+
}, Ts = (t, e) => t.hostname === "docs.google.com" ? Cs[e[0]] ?? null : e.includes("folders") ? "Google Drive folder" : e[0] === "file" ? "Google Drive file" : null, Ls = (t, e) => {
|
|
3112
3111
|
const n = e[e.length - 1];
|
|
3113
3112
|
return e.length >= 3 && n?.includes(".") ? Q(n) : null;
|
|
3114
|
-
},
|
|
3115
|
-
[/^(www\.)?github\.com$/,
|
|
3116
|
-
[/^(www\.)?gitlab\.com$|^gitlab\./,
|
|
3117
|
-
[/^(www\.)?bitbucket\.org$/,
|
|
3118
|
-
[/\.atlassian\.net$/,
|
|
3119
|
-
[/^(www\.)?linear\.app$/,
|
|
3120
|
-
[/^(www\.)?notion\.so$|\.notion\.site$/,
|
|
3121
|
-
[/^(www\.)?figma\.com$/,
|
|
3122
|
-
[/^(www\.)?trello\.com$/,
|
|
3123
|
-
[/\.shotgrid\.autodesk\.com$|\.shotgunstudio\.com$/,
|
|
3124
|
-
[/^(www\.)?stackoverflow\.com$/,
|
|
3125
|
-
[/^community\.ynput\.io$|^(forum|forums|community|discourse)\./,
|
|
3126
|
-
[/^(docs|drive)\.google\.com$/,
|
|
3127
|
-
[/^(www\.)?dropbox\.com$/,
|
|
3128
|
-
],
|
|
3113
|
+
}, Ms = [
|
|
3114
|
+
[/^(www\.)?github\.com$/, gs],
|
|
3115
|
+
[/^(www\.)?gitlab\.com$|^gitlab\./, hs],
|
|
3116
|
+
[/^(www\.)?bitbucket\.org$/, fs],
|
|
3117
|
+
[/\.atlassian\.net$/, bs],
|
|
3118
|
+
[/^(www\.)?linear\.app$/, ys],
|
|
3119
|
+
[/^(www\.)?notion\.so$|\.notion\.site$/, vs],
|
|
3120
|
+
[/^(www\.)?figma\.com$/, xs],
|
|
3121
|
+
[/^(www\.)?trello\.com$/, ks],
|
|
3122
|
+
[/\.shotgrid\.autodesk\.com$|\.shotgunstudio\.com$/, ws],
|
|
3123
|
+
[/^(www\.)?stackoverflow\.com$/, _s],
|
|
3124
|
+
[/^community\.ynput\.io$|^(forum|forums|community|discourse)\./, Es],
|
|
3125
|
+
[/^(docs|drive)\.google\.com$/, Ts],
|
|
3126
|
+
[/^(www\.)?dropbox\.com$/, Ls]
|
|
3127
|
+
], $s = (t) => {
|
|
3129
3128
|
if (ze(t)) return $n;
|
|
3130
3129
|
let e;
|
|
3131
3130
|
try {
|
|
@@ -3134,11 +3133,11 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3134
3133
|
return null;
|
|
3135
3134
|
}
|
|
3136
3135
|
if (e.protocol !== "https:" && e.protocol !== "http:") return null;
|
|
3137
|
-
const n = e.hostname.toLowerCase(), o =
|
|
3136
|
+
const n = e.hostname.toLowerCase(), o = Ms.find(([s]) => s.test(n))?.[1];
|
|
3138
3137
|
if (!o) return null;
|
|
3139
3138
|
const r = e.pathname.split("/").filter(Boolean);
|
|
3140
3139
|
return o(e, r)?.replace(/[[\]]/g, "").trim() || null;
|
|
3141
|
-
},
|
|
3140
|
+
}, Ns = () => {
|
|
3142
3141
|
const [t] = I();
|
|
3143
3142
|
return R(
|
|
3144
3143
|
() => t.registerCommand(
|
|
@@ -3147,7 +3146,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3147
3146
|
if (!(e instanceof ClipboardEvent) || !e.clipboardData) return !1;
|
|
3148
3147
|
const n = e.clipboardData.getData("text/plain").trim();
|
|
3149
3148
|
if (!n || /\s/.test(n)) return !1;
|
|
3150
|
-
const o =
|
|
3149
|
+
const o = $s(n);
|
|
3151
3150
|
if (!o) return !1;
|
|
3152
3151
|
const r = M();
|
|
3153
3152
|
return !$(r) || !r.isCollapsed() || Be() || W(r.anchor.getNode(), ne) ? !1 : (e.preventDefault(), r.insertNodes([cn(n).append(Ce(o))]), !0);
|
|
@@ -3157,7 +3156,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3157
3156
|
),
|
|
3158
3157
|
[t]
|
|
3159
3158
|
), null;
|
|
3160
|
-
},
|
|
3159
|
+
}, Ss = () => {
|
|
3161
3160
|
const [t] = I();
|
|
3162
3161
|
return R(() => {
|
|
3163
3162
|
const e = (n) => {
|
|
@@ -3176,7 +3175,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3176
3175
|
t.registerMutationListener(un, e, { skipInitialization: !1 })
|
|
3177
3176
|
);
|
|
3178
3177
|
}, [t]), null;
|
|
3179
|
-
},
|
|
3178
|
+
}, Os = (t) => {
|
|
3180
3179
|
const e = window.getSelection(), n = e?.rangeCount ? e.getRangeAt(0) : null;
|
|
3181
3180
|
let o = n?.getBoundingClientRect();
|
|
3182
3181
|
if (!o || !o.width && !o.height) {
|
|
@@ -3184,7 +3183,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3184
3183
|
o = (i && t?.contains(i) ? i : t)?.getBoundingClientRect();
|
|
3185
3184
|
}
|
|
3186
3185
|
return o ? { top: o.bottom + 6, left: o.left } : null;
|
|
3187
|
-
},
|
|
3186
|
+
}, Rs = ({ onUploadMedia: t, onFiles: e }) => {
|
|
3188
3187
|
const [n] = I(), o = O(null), r = O({ onUploadMedia: t, onFiles: e });
|
|
3189
3188
|
r.current = { onUploadMedia: t, onFiles: e };
|
|
3190
3189
|
const [i, s] = U(null), a = O(i);
|
|
@@ -3237,17 +3236,17 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3237
3236
|
n.registerCommand(
|
|
3238
3237
|
rn,
|
|
3239
3238
|
(b) => {
|
|
3240
|
-
const y = b.filter(
|
|
3239
|
+
const y = b.filter(Rr);
|
|
3241
3240
|
if (!y.length || !r.current.onFiles) return !1;
|
|
3242
3241
|
r.current.onFiles(b);
|
|
3243
|
-
const c =
|
|
3242
|
+
const c = Os(n.getRootElement());
|
|
3244
3243
|
return c && s({ files: y, rect: c }), !0;
|
|
3245
3244
|
},
|
|
3246
3245
|
Z
|
|
3247
3246
|
),
|
|
3248
3247
|
// tab switches the pasted media to inline (before list indenting and menus)
|
|
3249
3248
|
n.registerCommand(
|
|
3250
|
-
|
|
3249
|
+
co,
|
|
3251
3250
|
(b) => !a.current || b.shiftKey ? !1 : (b.preventDefault(), d(), !0),
|
|
3252
3251
|
Ve
|
|
3253
3252
|
),
|
|
@@ -3265,7 +3264,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3265
3264
|
return /* @__PURE__ */ S(me, { children: [
|
|
3266
3265
|
i && fe(
|
|
3267
3266
|
/* @__PURE__ */ S(
|
|
3268
|
-
|
|
3267
|
+
xi,
|
|
3269
3268
|
{
|
|
3270
3269
|
className: P("md-popover md-inline-prompt", ae),
|
|
3271
3270
|
style: { top: i.rect.top, left: i.rect.left },
|
|
@@ -3300,22 +3299,22 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3300
3299
|
}
|
|
3301
3300
|
)
|
|
3302
3301
|
] });
|
|
3303
|
-
},
|
|
3302
|
+
}, As = new RegExp(
|
|
3304
3303
|
`\\[[^\\]\\n]+\\]\\(@?(${ht.join("|")}):[^)\\s]+\\)`
|
|
3305
|
-
),
|
|
3304
|
+
), Is = ({ onFiles: t }) => {
|
|
3306
3305
|
const [e] = I(), n = O(t);
|
|
3307
3306
|
return n.current = t, R(() => {
|
|
3308
3307
|
const o = (r) => {
|
|
3309
3308
|
if (!(r instanceof ClipboardEvent)) return !1;
|
|
3310
3309
|
const i = M();
|
|
3311
3310
|
if (!$(i) || i.isCollapsed() || !i.getNodes().some(hn)) return !1;
|
|
3312
|
-
const s =
|
|
3313
|
-
return s["text/plain"] =
|
|
3311
|
+
const s = mr(i);
|
|
3312
|
+
return s["text/plain"] = or(Pe, i), pr(e, r, s), !0;
|
|
3314
3313
|
};
|
|
3315
3314
|
return q(
|
|
3316
|
-
e.registerCommand(
|
|
3315
|
+
e.registerCommand(uo, o, D),
|
|
3317
3316
|
e.registerCommand(
|
|
3318
|
-
|
|
3317
|
+
mo,
|
|
3319
3318
|
(r) => {
|
|
3320
3319
|
if (!o(r)) return !1;
|
|
3321
3320
|
const i = M();
|
|
@@ -3330,7 +3329,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3330
3329
|
const { clipboardData: i } = r;
|
|
3331
3330
|
if (i.types.includes("application/x-lexical-editor") || i.types.includes("text/html")) return !1;
|
|
3332
3331
|
const s = i.getData("text/plain");
|
|
3333
|
-
if (!s || !
|
|
3332
|
+
if (!s || !As.test(s)) return !1;
|
|
3334
3333
|
const a = M();
|
|
3335
3334
|
if (!$(a)) return !1;
|
|
3336
3335
|
r.preventDefault();
|
|
@@ -3346,7 +3345,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3346
3345
|
)
|
|
3347
3346
|
);
|
|
3348
3347
|
}, [e]), null;
|
|
3349
|
-
},
|
|
3348
|
+
}, Ds = ({ value: t, onChange: e, handleRef: n }) => {
|
|
3350
3349
|
const [o] = I(), r = O(t), i = O(e);
|
|
3351
3350
|
return i.current = e, R(
|
|
3352
3351
|
() => o.registerUpdateListener(({ editorState: s, dirtyElements: a, dirtyLeaves: m, tags: d }) => {
|
|
@@ -3356,7 +3355,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3356
3355
|
}),
|
|
3357
3356
|
[o]
|
|
3358
3357
|
), R(() => {
|
|
3359
|
-
t === void 0 || t === r.current || (r.current = t, o.update(() => et(t), { tag: "markdown-value" }), o.dispatchCommand(
|
|
3358
|
+
t === void 0 || t === r.current || (r.current = t, o.update(() => et(t), { tag: "markdown-value" }), o.dispatchCommand(po, void 0));
|
|
3360
3359
|
}, [o, t]), Jn(
|
|
3361
3360
|
n,
|
|
3362
3361
|
() => ({
|
|
@@ -3370,32 +3369,32 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3370
3369
|
clear: () => {
|
|
3371
3370
|
o.update(() => ie().clear());
|
|
3372
3371
|
},
|
|
3373
|
-
isEmpty: () => o.getEditorState().read(() =>
|
|
3372
|
+
isEmpty: () => o.getEditorState().read(() => mi()),
|
|
3374
3373
|
insertMentionTrigger: (s) => {
|
|
3375
3374
|
o.focus(() => o.dispatchCommand(vt, s));
|
|
3376
3375
|
}
|
|
3377
3376
|
}),
|
|
3378
3377
|
[o]
|
|
3379
3378
|
), null;
|
|
3380
|
-
},
|
|
3379
|
+
}, Ps = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)/, Bs = /(([^<>()[\]\\.,;:\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,}))/, zs = [
|
|
3381
3380
|
Lt(
|
|
3382
|
-
|
|
3381
|
+
Ps,
|
|
3383
3382
|
(t) => t.startsWith("http") ? t : `https://${t}`
|
|
3384
3383
|
),
|
|
3385
|
-
Lt(
|
|
3386
|
-
],
|
|
3387
|
-
Mo,
|
|
3384
|
+
Lt(Bs, (t) => `mailto:${t}`)
|
|
3385
|
+
], Fs = (t) => /^(https?:|mailto:|\/|#)/i.test(t), Ks = [
|
|
3388
3386
|
$o,
|
|
3387
|
+
No,
|
|
3389
3388
|
an,
|
|
3390
|
-
|
|
3389
|
+
Do,
|
|
3391
3390
|
dn,
|
|
3392
3391
|
un,
|
|
3393
|
-
Po,
|
|
3394
3392
|
Bo,
|
|
3393
|
+
zo,
|
|
3395
3394
|
be,
|
|
3396
3395
|
ye,
|
|
3397
3396
|
ve
|
|
3398
|
-
],
|
|
3397
|
+
], Us = ({ editable: t }) => {
|
|
3399
3398
|
const [e] = I();
|
|
3400
3399
|
return R(() => e.setEditable(t), [e, t]), null;
|
|
3401
3400
|
}, de = {
|
|
@@ -3418,7 +3417,7 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3418
3417
|
minHeight: 20,
|
|
3419
3418
|
maxHeight: 400
|
|
3420
3419
|
}
|
|
3421
|
-
},
|
|
3420
|
+
}, Hs = Vt(
|
|
3422
3421
|
({
|
|
3423
3422
|
variant: t = "document",
|
|
3424
3423
|
value: e,
|
|
@@ -3449,21 +3448,21 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3449
3448
|
minHeight: A = de[t].minHeight,
|
|
3450
3449
|
maxHeight: F = de[t].maxHeight,
|
|
3451
3450
|
namespace: N = "ayon-markdown-editor",
|
|
3452
|
-
className:
|
|
3451
|
+
className: j,
|
|
3453
3452
|
style: ce,
|
|
3454
3453
|
contentClassName: xe,
|
|
3455
3454
|
children: ke
|
|
3456
3455
|
}, Te) => {
|
|
3457
3456
|
const we = _e(
|
|
3458
|
-
() =>
|
|
3457
|
+
() => go({
|
|
3459
3458
|
name: N,
|
|
3460
3459
|
namespace: N,
|
|
3461
|
-
theme:
|
|
3462
|
-
nodes:
|
|
3460
|
+
theme: kr,
|
|
3461
|
+
nodes: Ks,
|
|
3463
3462
|
editable: !h,
|
|
3464
3463
|
$initialEditorState: () => et(e || ""),
|
|
3465
3464
|
// the react extension renders the decorator nodes (media, youtube)
|
|
3466
|
-
dependencies: [
|
|
3465
|
+
dependencies: [Mo],
|
|
3467
3466
|
onError: (Le) => {
|
|
3468
3467
|
console.error("[MarkdownEditor]", Le);
|
|
3469
3468
|
}
|
|
@@ -3473,11 +3472,11 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3473
3472
|
);
|
|
3474
3473
|
return (
|
|
3475
3474
|
// the content editable is rendered below, inside the editor layout
|
|
3476
|
-
/* @__PURE__ */ S(
|
|
3475
|
+
/* @__PURE__ */ S(ho, { extension: we, contentEditable: null, children: [
|
|
3477
3476
|
/* @__PURE__ */ S(
|
|
3478
|
-
|
|
3477
|
+
hi,
|
|
3479
3478
|
{
|
|
3480
|
-
className: P("md-editor", "block-shortcuts", `md-editor-${t}`,
|
|
3479
|
+
className: P("md-editor", "block-shortcuts", `md-editor-${t}`, j, {
|
|
3481
3480
|
bordered: L,
|
|
3482
3481
|
readOnly: h
|
|
3483
3482
|
}),
|
|
@@ -3491,14 +3490,14 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3491
3490
|
end: p
|
|
3492
3491
|
}
|
|
3493
3492
|
),
|
|
3494
|
-
/* @__PURE__ */ S(
|
|
3495
|
-
/* @__PURE__ */ l(
|
|
3496
|
-
|
|
3493
|
+
/* @__PURE__ */ S(_i, { children: [
|
|
3494
|
+
/* @__PURE__ */ l(Ci, { style: { minHeight: A, maxHeight: F }, children: /* @__PURE__ */ l(Li, { children: /* @__PURE__ */ l(
|
|
3495
|
+
fo,
|
|
3497
3496
|
{
|
|
3498
3497
|
className: P("md-content", xe),
|
|
3499
3498
|
style: { minHeight: A },
|
|
3500
3499
|
"aria-placeholder": o,
|
|
3501
|
-
placeholder: /* @__PURE__ */ l(
|
|
3500
|
+
placeholder: /* @__PURE__ */ l(Ti, { className: "md-placeholder", children: o })
|
|
3502
3501
|
}
|
|
3503
3502
|
) }) }),
|
|
3504
3503
|
v && /* @__PURE__ */ l("div", { className: "md-actions", children: v })
|
|
@@ -3507,38 +3506,38 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3507
3506
|
]
|
|
3508
3507
|
}
|
|
3509
3508
|
),
|
|
3510
|
-
/* @__PURE__ */ l(
|
|
3511
|
-
/* @__PURE__ */ l(fo, {}),
|
|
3509
|
+
/* @__PURE__ */ l(Us, { editable: !h }),
|
|
3512
3510
|
/* @__PURE__ */ l(bo, {}),
|
|
3513
3511
|
/* @__PURE__ */ l(yo, {}),
|
|
3514
|
-
/* @__PURE__ */ l(
|
|
3515
|
-
/* @__PURE__ */ l(
|
|
3516
|
-
/* @__PURE__ */ l(xo, {
|
|
3517
|
-
/* @__PURE__ */ l(
|
|
3518
|
-
/* @__PURE__ */ l(
|
|
3519
|
-
|
|
3512
|
+
/* @__PURE__ */ l(vo, {}),
|
|
3513
|
+
/* @__PURE__ */ l(_o, { maxIndent: 5 }),
|
|
3514
|
+
/* @__PURE__ */ l(xo, { validateUrl: Fs }),
|
|
3515
|
+
/* @__PURE__ */ l(ko, { matchers: zs }),
|
|
3516
|
+
/* @__PURE__ */ l(ts, {}),
|
|
3517
|
+
/* @__PURE__ */ l(Ss, {}),
|
|
3520
3518
|
!h && /* @__PURE__ */ l(rs, {}),
|
|
3521
|
-
/* @__PURE__ */ l(
|
|
3522
|
-
|
|
3523
|
-
!h && /* @__PURE__ */ l(
|
|
3524
|
-
|
|
3525
|
-
/* @__PURE__ */ l(
|
|
3526
|
-
/* @__PURE__ */ l(
|
|
3527
|
-
/* @__PURE__ */ l(
|
|
3519
|
+
!h && /* @__PURE__ */ l(is, {}),
|
|
3520
|
+
/* @__PURE__ */ l(as, {}),
|
|
3521
|
+
!h && /* @__PURE__ */ l(os, {}),
|
|
3522
|
+
!h && /* @__PURE__ */ l(Ns, {}),
|
|
3523
|
+
m && !h && /* @__PURE__ */ l(Rs, { onUploadMedia: m, onFiles: a }),
|
|
3524
|
+
/* @__PURE__ */ l(wo, { transformers: Pe }),
|
|
3525
|
+
/* @__PURE__ */ l(Xi, {}),
|
|
3528
3526
|
/* @__PURE__ */ l(Vi, {}),
|
|
3529
|
-
/* @__PURE__ */ l(
|
|
3530
|
-
/* @__PURE__ */ l(
|
|
3527
|
+
/* @__PURE__ */ l(Qi, {}),
|
|
3528
|
+
/* @__PURE__ */ l(es, {}),
|
|
3529
|
+
/* @__PURE__ */ l(Zi, { onSubmit: r, onEscape: s, submitOnEnter: i }),
|
|
3531
3530
|
T && !h && /* @__PURE__ */ l(
|
|
3532
3531
|
zt,
|
|
3533
3532
|
{
|
|
3534
3533
|
floating: !0,
|
|
3535
|
-
layout: Array.isArray(T) ? T :
|
|
3534
|
+
layout: Array.isArray(T) ? T : Cr
|
|
3536
3535
|
}
|
|
3537
3536
|
),
|
|
3538
|
-
/* @__PURE__ */ l(
|
|
3539
|
-
/* @__PURE__ */ l(
|
|
3537
|
+
/* @__PURE__ */ l(Is, { onFiles: a }),
|
|
3538
|
+
/* @__PURE__ */ l(Ds, { value: e, onChange: n, handleRef: Te }),
|
|
3540
3539
|
b && !h && /* @__PURE__ */ l(
|
|
3541
|
-
|
|
3540
|
+
ms,
|
|
3542
3541
|
{
|
|
3543
3542
|
placement: _,
|
|
3544
3543
|
menuParent: k,
|
|
@@ -3548,29 +3547,29 @@ const cs = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform),
|
|
|
3548
3547
|
customCommands: y
|
|
3549
3548
|
}
|
|
3550
3549
|
),
|
|
3551
|
-
g && !h && /* @__PURE__ */ l(
|
|
3550
|
+
g && !h && /* @__PURE__ */ l(Hi, { placement: _, menuParent: k }),
|
|
3552
3551
|
d && /* @__PURE__ */ l(
|
|
3553
|
-
|
|
3552
|
+
Bi,
|
|
3554
3553
|
{
|
|
3555
3554
|
source: d,
|
|
3556
3555
|
menuParent: k,
|
|
3557
3556
|
placement: _
|
|
3558
3557
|
}
|
|
3559
3558
|
),
|
|
3560
|
-
(c || u) && /* @__PURE__ */ l(
|
|
3561
|
-
C && /* @__PURE__ */ l(
|
|
3559
|
+
(c || u) && /* @__PURE__ */ l(Gi, { onMentionClick: c, onMentionHover: u }),
|
|
3560
|
+
C && /* @__PURE__ */ l(Eo, { defaultSelection: "rootEnd" }),
|
|
3562
3561
|
ke
|
|
3563
3562
|
] })
|
|
3564
3563
|
);
|
|
3565
3564
|
}
|
|
3566
3565
|
);
|
|
3567
|
-
|
|
3568
|
-
const
|
|
3566
|
+
Hs.displayName = "MarkdownEditor";
|
|
3567
|
+
const Gs = (t, e) => {
|
|
3569
3568
|
const n = t.item || t, o = e.item || e, r = new Date(n.createdAt), i = new Date(o.createdAt), s = Ae(r) && Ae(i), a = s && Yt(r, i);
|
|
3570
3569
|
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;
|
|
3571
|
-
}, js = (t, e) => t.relevance > e.relevance ? -1 : t.relevance < e.relevance ? 1 : t.label?.localeCompare(e.label),
|
|
3570
|
+
}, js = (t, e) => t.relevance > e.relevance ? -1 : t.relevance < e.relevance ? 1 : t.label?.localeCompare(e.label), Ws = ["team:", "user:"], Ys = (t) => {
|
|
3572
3571
|
if (!t) return { typeFilter: null, search: void 0 };
|
|
3573
|
-
for (const e of
|
|
3572
|
+
for (const e of Ws)
|
|
3574
3573
|
if (t.startsWith(e))
|
|
3575
3574
|
return {
|
|
3576
3575
|
typeFilter: e.slice(0, -1),
|
|
@@ -3578,17 +3577,17 @@ const Hs = (t, e) => {
|
|
|
3578
3577
|
search: t.slice(e.length) || void 0
|
|
3579
3578
|
};
|
|
3580
3579
|
return { typeFilter: null, search: t };
|
|
3581
|
-
},
|
|
3580
|
+
}, qs = (t, e = {}, n) => {
|
|
3582
3581
|
if (!(t in e)) return [];
|
|
3583
3582
|
const o = e[t]() || [];
|
|
3584
3583
|
let r = js;
|
|
3585
|
-
t === "@@" && (r =
|
|
3586
|
-
const { typeFilter: i, search: s } =
|
|
3584
|
+
t === "@@" && (r = Gs);
|
|
3585
|
+
const { typeFilter: i, search: s } = Ys(n), a = i ? o.filter((d) => d.type === i) : o;
|
|
3587
3586
|
return s ? Yn(a, s, {
|
|
3588
3587
|
keys: ["label", "context", "keywords"],
|
|
3589
3588
|
baseSort: r
|
|
3590
3589
|
}) : a.sort(r);
|
|
3591
|
-
},
|
|
3590
|
+
}, Vs = (t = [], e = []) => {
|
|
3592
3591
|
const n = t.map((r) => ({
|
|
3593
3592
|
type: "user",
|
|
3594
3593
|
id: r.name,
|
|
@@ -3605,7 +3604,7 @@ const Hs = (t, e) => {
|
|
|
3605
3604
|
suffix: "Team"
|
|
3606
3605
|
}));
|
|
3607
3606
|
return [...n, ...o];
|
|
3608
|
-
},
|
|
3607
|
+
}, Qs = (t = [], e = []) => t.map((n) => {
|
|
3609
3608
|
const o = e.find((_) => _.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}`, k = [n.name, n.taskType, n.label, n.parent?.name, d];
|
|
3610
3609
|
return {
|
|
3611
3610
|
type: "task",
|
|
@@ -3617,13 +3616,13 @@ const Hs = (t, e) => {
|
|
|
3617
3616
|
keywords: k,
|
|
3618
3617
|
relevance: n.relevance
|
|
3619
3618
|
};
|
|
3620
|
-
}),
|
|
3619
|
+
}), Js = (t) => {
|
|
3621
3620
|
let e = Fn(t, { addSuffix: !0 });
|
|
3622
3621
|
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;
|
|
3623
|
-
},
|
|
3622
|
+
}, Xs = (t = [], e) => t?.map((n) => {
|
|
3624
3623
|
if (!n.parent)
|
|
3625
3624
|
return null;
|
|
3626
|
-
const r = e.productTypes?.find((k) => k.name === n.parent?.productType)?.icon || it("version"), i = n.parent?.name, s = n.name || n.version, a = n.createdAt &&
|
|
3625
|
+
const r = e.productTypes?.find((k) => k.name === n.parent?.productType)?.icon || it("version"), i = n.parent?.name, s = n.name || n.version, a = n.createdAt && Js(new Date(n.createdAt)), m = `${i} ${s} ${a}`, d = [n.name, n.version, n.parent?.name, m];
|
|
3627
3626
|
return {
|
|
3628
3627
|
type: "version",
|
|
3629
3628
|
id: n.id,
|
|
@@ -3635,25 +3634,25 @@ const Hs = (t, e) => {
|
|
|
3635
3634
|
keywords: d,
|
|
3636
3635
|
relevance: n.relevance
|
|
3637
3636
|
};
|
|
3638
|
-
}),
|
|
3637
|
+
}), zl = ({
|
|
3639
3638
|
suggestions: t = {},
|
|
3640
3639
|
// version options read the product types
|
|
3641
3640
|
project: e = { productTypes: [] },
|
|
3642
3641
|
taskTypes: n = [],
|
|
3643
3642
|
entityType: o
|
|
3644
3643
|
}) => ({
|
|
3645
|
-
getOptions: ({ trigger: r, search: i, filter: s }) =>
|
|
3644
|
+
getOptions: ({ trigger: r, search: i, filter: s }) => qs(
|
|
3646
3645
|
r,
|
|
3647
3646
|
{
|
|
3648
|
-
"@": () =>
|
|
3649
|
-
"@@": () =>
|
|
3650
|
-
"@@@": () =>
|
|
3647
|
+
"@": () => Vs(t.users, t.teams),
|
|
3648
|
+
"@@": () => Xs(t.versions, e),
|
|
3649
|
+
"@@@": () => Qs(t.tasks, n)
|
|
3651
3650
|
},
|
|
3652
3651
|
// the helper understands `team:` / `user:` prefixes
|
|
3653
3652
|
(s ? `${s}:` : "") + i || void 0
|
|
3654
3653
|
).filter((m) => !!m),
|
|
3655
3654
|
getError: (r) => r === "@@" && o === "folder" ? "Version mentions are disabled for folders" : null
|
|
3656
|
-
}),
|
|
3655
|
+
}), Zs = x.span`
|
|
3657
3656
|
gap: 2px;
|
|
3658
3657
|
display: inline-flex;
|
|
3659
3658
|
border-radius: var(--border-radius-m);
|
|
@@ -3725,7 +3724,7 @@ const Hs = (t, e) => {
|
|
|
3725
3724
|
}) => {
|
|
3726
3725
|
const _ = r || (e === "user" ? "alternate_email" : e === "team" ? "group" : it(e, "link")), g = O(null);
|
|
3727
3726
|
return /* @__PURE__ */ S(
|
|
3728
|
-
|
|
3727
|
+
Zs,
|
|
3729
3728
|
{
|
|
3730
3729
|
...k,
|
|
3731
3730
|
$variant: n,
|
|
@@ -3746,7 +3745,7 @@ const Hs = (t, e) => {
|
|
|
3746
3745
|
]
|
|
3747
3746
|
}
|
|
3748
3747
|
);
|
|
3749
|
-
},
|
|
3748
|
+
}, ea = x(J)`
|
|
3750
3749
|
cursor: pointer;
|
|
3751
3750
|
user-select: none;
|
|
3752
3751
|
font-size: 24px;
|
|
@@ -3764,8 +3763,8 @@ const Hs = (t, e) => {
|
|
|
3764
3763
|
&.readOnly {
|
|
3765
3764
|
cursor: default;
|
|
3766
3765
|
}
|
|
3767
|
-
`,
|
|
3768
|
-
|
|
3766
|
+
`, ta = ({ checked: t, isReadOnly: e, ...n }) => /* @__PURE__ */ l(
|
|
3767
|
+
ea,
|
|
3769
3768
|
{
|
|
3770
3769
|
...n,
|
|
3771
3770
|
icon: t ? "check_circle" : "radio_button_unchecked",
|
|
@@ -3799,26 +3798,26 @@ const Hs = (t, e) => {
|
|
|
3799
3798
|
"this-week": () => {
|
|
3800
3799
|
const t = /* @__PURE__ */ new Date();
|
|
3801
3800
|
return V(
|
|
3802
|
-
Ge(t, { weekStartsOn: 0 }),
|
|
3803
3801
|
je(t, { weekStartsOn: 0 }),
|
|
3802
|
+
Ge(t, { weekStartsOn: 0 }),
|
|
3804
3803
|
"Start of week",
|
|
3805
3804
|
"End of week"
|
|
3806
3805
|
);
|
|
3807
3806
|
},
|
|
3808
3807
|
"next-week": () => {
|
|
3809
|
-
const t =
|
|
3808
|
+
const t = jn(/* @__PURE__ */ new Date(), 1);
|
|
3810
3809
|
return V(
|
|
3811
|
-
Ge(t, { weekStartsOn: 0 }),
|
|
3812
3810
|
je(t, { weekStartsOn: 0 }),
|
|
3811
|
+
Ge(t, { weekStartsOn: 0 }),
|
|
3813
3812
|
"Start of next week",
|
|
3814
3813
|
"End of next week"
|
|
3815
3814
|
);
|
|
3816
3815
|
},
|
|
3817
3816
|
"last-week": () => {
|
|
3818
|
-
const t =
|
|
3817
|
+
const t = Gn(/* @__PURE__ */ new Date(), 1);
|
|
3819
3818
|
return V(
|
|
3820
|
-
Ge(t, { weekStartsOn: 0 }),
|
|
3821
3819
|
je(t, { weekStartsOn: 0 }),
|
|
3820
|
+
Ge(t, { weekStartsOn: 0 }),
|
|
3822
3821
|
"Start of last week",
|
|
3823
3822
|
"End of last week"
|
|
3824
3823
|
);
|
|
@@ -3858,11 +3857,11 @@ const Hs = (t, e) => {
|
|
|
3858
3857
|
"End of last year"
|
|
3859
3858
|
);
|
|
3860
3859
|
}
|
|
3861
|
-
},
|
|
3862
|
-
id:
|
|
3860
|
+
}, na = "custom-range", oa = "tune", ra = {
|
|
3861
|
+
id: na,
|
|
3863
3862
|
label: "Custom range...",
|
|
3864
3863
|
values: [],
|
|
3865
|
-
icon:
|
|
3864
|
+
icon: oa
|
|
3866
3865
|
}, In = () => [
|
|
3867
3866
|
{
|
|
3868
3867
|
id: "today",
|
|
@@ -3924,10 +3923,10 @@ const Hs = (t, e) => {
|
|
|
3924
3923
|
values: z["last-year"](),
|
|
3925
3924
|
icon: "calendar_month"
|
|
3926
3925
|
}
|
|
3927
|
-
],
|
|
3928
|
-
|
|
3926
|
+
], Fl = In(), ia = () => [
|
|
3927
|
+
ra,
|
|
3929
3928
|
...In()
|
|
3930
|
-
],
|
|
3929
|
+
], Kl = ia(), Ul = (t, e) => {
|
|
3931
3930
|
if (!t || !e) return null;
|
|
3932
3931
|
try {
|
|
3933
3932
|
const n = B(t), o = B(e);
|
|
@@ -4005,7 +4004,7 @@ const Hs = (t, e) => {
|
|
|
4005
4004
|
} catch {
|
|
4006
4005
|
return null;
|
|
4007
4006
|
}
|
|
4008
|
-
},
|
|
4007
|
+
}, sa = x.label`
|
|
4009
4008
|
cursor: pointer;
|
|
4010
4009
|
position: relative;
|
|
4011
4010
|
right: 2rem;
|
|
@@ -4032,10 +4031,10 @@ const Hs = (t, e) => {
|
|
|
4032
4031
|
font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 20;
|
|
4033
4032
|
}
|
|
4034
4033
|
}
|
|
4035
|
-
`,
|
|
4034
|
+
`, aa = ({ checked: t, onChange: e }) => /* @__PURE__ */ S(sa, { className: P({ checked: t }), children: [
|
|
4036
4035
|
/* @__PURE__ */ l("input", { checked: t, disabled: !1, onChange: e, type: "checkbox" }),
|
|
4037
|
-
/* @__PURE__ */ l(
|
|
4038
|
-
] }),
|
|
4036
|
+
/* @__PURE__ */ l(ta, { checked: t })
|
|
4037
|
+
] }), la = ({
|
|
4039
4038
|
projectName: t,
|
|
4040
4039
|
activityId: e,
|
|
4041
4040
|
entityId: n,
|
|
@@ -4043,7 +4042,7 @@ const Hs = (t, e) => {
|
|
|
4043
4042
|
categoryPrimary: r,
|
|
4044
4043
|
categorySecondary: i
|
|
4045
4044
|
}) => {
|
|
4046
|
-
const { data: s, isError: a } =
|
|
4045
|
+
const { data: s, isError: a } = ar({
|
|
4047
4046
|
projectName: t,
|
|
4048
4047
|
entityIds: [n],
|
|
4049
4048
|
activityIds: [e]
|
|
@@ -4061,14 +4060,22 @@ const Hs = (t, e) => {
|
|
|
4061
4060
|
children: "Source"
|
|
4062
4061
|
}
|
|
4063
4062
|
);
|
|
4064
|
-
},
|
|
4063
|
+
}, ca = ({ to: t, useNavigate: e, children: n }) => {
|
|
4064
|
+
const o = e();
|
|
4065
|
+
return /* @__PURE__ */ l("a", { href: t, onClick: (i) => {
|
|
4066
|
+
i.button !== 0 || i.metaKey || i.ctrlKey || i.shiftKey || i.altKey || (i.preventDefault(), o(t));
|
|
4067
|
+
}, children: n });
|
|
4068
|
+
}, da = ({ to: t, children: e }) => {
|
|
4069
|
+
const n = Xn(cr)?.useNavigate;
|
|
4070
|
+
return n ? /* @__PURE__ */ l(ca, { to: t, useNavigate: n, children: e }) : /* @__PURE__ */ l("a", { href: t, children: e });
|
|
4071
|
+
}, ua = (t, e, n) => {
|
|
4065
4072
|
const o = new URLSearchParams(window.location.search);
|
|
4066
4073
|
n && (o.set("project", t), o.set("type", n.type), o.set("id", n.id));
|
|
4067
4074
|
const r = o.get("type") === "version" ? "products" : "overview";
|
|
4068
4075
|
o.set("activity", e);
|
|
4069
4076
|
const i = new URL(`${window.location.origin}/projects/${t}/${r}`);
|
|
4070
4077
|
return i.search = o.toString(), i.toString();
|
|
4071
|
-
},
|
|
4078
|
+
}, Hl = x.div`
|
|
4072
4079
|
/* use grid tick for auto height transition */
|
|
4073
4080
|
display: grid;
|
|
4074
4081
|
height: 100%;
|
|
@@ -4094,9 +4101,9 @@ const Hs = (t, e) => {
|
|
|
4094
4101
|
--background-color: ${n};
|
|
4095
4102
|
--button-color: ${t};
|
|
4096
4103
|
--button-color-secondary: ${e};
|
|
4097
|
-
--button-text-color: ${
|
|
4104
|
+
--button-text-color: ${to(t)};
|
|
4098
4105
|
--border-color: ${t};
|
|
4099
|
-
`,
|
|
4106
|
+
`, Gl = x.div`
|
|
4100
4107
|
/* VARS */
|
|
4101
4108
|
--background-color: var(--md-sys-color-surface-container);
|
|
4102
4109
|
--button-color: var(--md-sys-color-primary);
|
|
@@ -4194,14 +4201,14 @@ const Hs = (t, e) => {
|
|
|
4194
4201
|
/* remove outline */
|
|
4195
4202
|
outline: none;
|
|
4196
4203
|
}
|
|
4197
|
-
`,
|
|
4204
|
+
`, jl = x.div`
|
|
4198
4205
|
padding: 4px 4px 0;
|
|
4199
|
-
`,
|
|
4206
|
+
`, Wl = x.span`
|
|
4200
4207
|
width: 1px;
|
|
4201
4208
|
height: 18px;
|
|
4202
4209
|
margin: 0 4px;
|
|
4203
4210
|
background-color: var(--md-sys-color-surface-container-hover);
|
|
4204
|
-
`,
|
|
4211
|
+
`, Yl = x.footer`
|
|
4205
4212
|
display: flex;
|
|
4206
4213
|
justify-content: space-between;
|
|
4207
4214
|
padding: var(--padding-m);
|
|
@@ -4227,7 +4234,7 @@ const Hs = (t, e) => {
|
|
|
4227
4234
|
background-color: var(--button-color);
|
|
4228
4235
|
color: var(--button-text-color);
|
|
4229
4236
|
}
|
|
4230
|
-
`,
|
|
4237
|
+
`, ma = x.div`
|
|
4231
4238
|
display: flex;
|
|
4232
4239
|
gap: var(--base-gap-small);
|
|
4233
4240
|
|
|
@@ -4242,7 +4249,7 @@ const Hs = (t, e) => {
|
|
|
4242
4249
|
}
|
|
4243
4250
|
}
|
|
4244
4251
|
}
|
|
4245
|
-
`,
|
|
4252
|
+
`, ql = x.div`
|
|
4246
4253
|
display: inline-flex;
|
|
4247
4254
|
align-items: center;
|
|
4248
4255
|
border-radius: var(--border-radius-m);
|
|
@@ -4256,14 +4263,14 @@ const Hs = (t, e) => {
|
|
|
4256
4263
|
background-color: var(--md-sys-color-primary-container-hover);
|
|
4257
4264
|
}
|
|
4258
4265
|
}
|
|
4259
|
-
`,
|
|
4266
|
+
`, Vl = x(te)`
|
|
4260
4267
|
color: inherit;
|
|
4261
4268
|
background: transparent;
|
|
4262
4269
|
|
|
4263
4270
|
&:hover {
|
|
4264
4271
|
background-color: var(--md-sys-color-primary-container-hover) !important;
|
|
4265
4272
|
}
|
|
4266
|
-
`,
|
|
4273
|
+
`, Ql = x(te)`
|
|
4267
4274
|
width: 100%;
|
|
4268
4275
|
padding: 4px 6px;
|
|
4269
4276
|
white-space: nowrap;
|
|
@@ -4273,14 +4280,14 @@ const Hs = (t, e) => {
|
|
|
4273
4280
|
&:hover {
|
|
4274
4281
|
background-color: var(--md-sys-color-surface-container-low) !important;
|
|
4275
4282
|
}
|
|
4276
|
-
`,
|
|
4283
|
+
`, Jl = x(eo)`
|
|
4277
4284
|
min-width: 0;
|
|
4278
4285
|
padding: 4px 8px;
|
|
4279
|
-
`,
|
|
4286
|
+
`, Xl = x(ma)`
|
|
4280
4287
|
margin-left: auto;
|
|
4281
4288
|
flex-shrink: 1;
|
|
4282
4289
|
overflow: hidden;
|
|
4283
|
-
`,
|
|
4290
|
+
`, Zl = x.div`
|
|
4284
4291
|
position: absolute;
|
|
4285
4292
|
inset: 0;
|
|
4286
4293
|
user-select: none;
|
|
@@ -4304,18 +4311,18 @@ const Hs = (t, e) => {
|
|
|
4304
4311
|
.icon {
|
|
4305
4312
|
font-size: 40px;
|
|
4306
4313
|
}
|
|
4307
|
-
`,
|
|
4314
|
+
`, ec = x.span`
|
|
4308
4315
|
padding: 12px 15px;
|
|
4309
4316
|
/* italic */
|
|
4310
4317
|
font-style: italic;
|
|
4311
4318
|
opacity: 0.4;
|
|
4312
|
-
`,
|
|
4319
|
+
`, tc = x.div`
|
|
4313
4320
|
display: grid;
|
|
4314
4321
|
gap: var(--base-gap-medium);
|
|
4315
4322
|
grid-template-columns: 1fr 1fr;
|
|
4316
|
-
`,
|
|
4323
|
+
`, nc = x.div`
|
|
4317
4324
|
margin-top: var(--padding-m);
|
|
4318
|
-
`,
|
|
4325
|
+
`, oc = x(te)`
|
|
4319
4326
|
background: transparent;
|
|
4320
4327
|
border: solid 1px currentColor;
|
|
4321
4328
|
flex-grow: 1;
|
|
@@ -4350,7 +4357,7 @@ const Hs = (t, e) => {
|
|
|
4350
4357
|
pointer-events: none;
|
|
4351
4358
|
}
|
|
4352
4359
|
}
|
|
4353
|
-
`,
|
|
4360
|
+
`, rc = x.div`
|
|
4354
4361
|
border-radius: var(--border-radius-l);
|
|
4355
4362
|
margin-bottom: var(--padding-m);
|
|
4356
4363
|
user-select: none;
|
|
@@ -4378,7 +4385,7 @@ const Hs = (t, e) => {
|
|
|
4378
4385
|
x.div`
|
|
4379
4386
|
border-radius: var(--border-radius-m);
|
|
4380
4387
|
`;
|
|
4381
|
-
const
|
|
4388
|
+
const ic = x.li`
|
|
4382
4389
|
/* VARS */
|
|
4383
4390
|
--background-color: var(--md-sys-color-surface-container);
|
|
4384
4391
|
--button-color-secondary: var(--md-sys-color-surface-container-high);
|
|
@@ -4428,7 +4435,7 @@ const oc = x.li`
|
|
|
4428
4435
|
&.isHighlighted {
|
|
4429
4436
|
background-color: var(--md-sys-color-secondary-container);
|
|
4430
4437
|
}
|
|
4431
|
-
`,
|
|
4438
|
+
`, sc = x.div`
|
|
4432
4439
|
background-color: var(--background-color);
|
|
4433
4440
|
border-radius: var(--border-radius-m);
|
|
4434
4441
|
padding: var(--padding-m);
|
|
@@ -4566,7 +4573,7 @@ const oc = x.li`
|
|
|
4566
4573
|
padding: 0;
|
|
4567
4574
|
border-radius: var(--border-radius-l);
|
|
4568
4575
|
}
|
|
4569
|
-
`,
|
|
4576
|
+
`, jt = x.p`
|
|
4570
4577
|
margin: 0;
|
|
4571
4578
|
|
|
4572
4579
|
&:first-child {
|
|
@@ -4651,7 +4658,7 @@ const Wt = x.pre`
|
|
|
4651
4658
|
|
|
4652
4659
|
/* syntax highlighting, same colours as the editor */
|
|
4653
4660
|
${Tn}
|
|
4654
|
-
`,
|
|
4661
|
+
`, pa = x.code`
|
|
4655
4662
|
font-family: monospace;
|
|
4656
4663
|
font-size: 0.9em;
|
|
4657
4664
|
padding: 1px 4px;
|
|
@@ -4660,7 +4667,7 @@ const Wt = x.pre`
|
|
|
4660
4667
|
color: var(--md-sys-color-tertiary);
|
|
4661
4668
|
white-space: pre-wrap;
|
|
4662
4669
|
word-break: break-word;
|
|
4663
|
-
`,
|
|
4670
|
+
`, ac = x.div`
|
|
4664
4671
|
display: flex;
|
|
4665
4672
|
position: absolute;
|
|
4666
4673
|
right: 4px;
|
|
@@ -4673,7 +4680,7 @@ const Wt = x.pre`
|
|
|
4673
4680
|
|
|
4674
4681
|
/* by default hidden */
|
|
4675
4682
|
opacity: 0;
|
|
4676
|
-
`,
|
|
4683
|
+
`, lc = x(te)`
|
|
4677
4684
|
&.hasIcon {
|
|
4678
4685
|
padding: 4px;
|
|
4679
4686
|
}
|
|
@@ -4688,7 +4695,7 @@ const Wt = x.pre`
|
|
|
4688
4695
|
position: relative;
|
|
4689
4696
|
top: -1px;
|
|
4690
4697
|
}
|
|
4691
|
-
`,
|
|
4698
|
+
`, cc = x.span`
|
|
4692
4699
|
background-color: var(--md-sys-color-secondary-container);
|
|
4693
4700
|
display: flex;
|
|
4694
4701
|
align-items: center;
|
|
@@ -4709,14 +4716,14 @@ const Wt = x.pre`
|
|
|
4709
4716
|
.icon {
|
|
4710
4717
|
font-size: 24px;
|
|
4711
4718
|
}
|
|
4712
|
-
`,
|
|
4719
|
+
`, dc = x.div`
|
|
4713
4720
|
display: flex;
|
|
4714
4721
|
align-items: center;
|
|
4715
4722
|
gap: var(--base-gap-small);
|
|
4716
4723
|
min-width: 0;
|
|
4717
4724
|
overflow-x: auto;
|
|
4718
4725
|
padding-bottom: 4px;
|
|
4719
|
-
`,
|
|
4726
|
+
`, uc = x.button`
|
|
4720
4727
|
display: inline-flex;
|
|
4721
4728
|
align-items: center;
|
|
4722
4729
|
gap: var(--base-gap-small);
|
|
@@ -4746,7 +4753,7 @@ const Wt = x.pre`
|
|
|
4746
4753
|
&:disabled {
|
|
4747
4754
|
cursor: default;
|
|
4748
4755
|
}
|
|
4749
|
-
`,
|
|
4756
|
+
`, ga = [
|
|
4750
4757
|
"user",
|
|
4751
4758
|
"team",
|
|
4752
4759
|
"task",
|
|
@@ -4755,12 +4762,12 @@ const Wt = x.pre`
|
|
|
4755
4762
|
"representation",
|
|
4756
4763
|
"workfile",
|
|
4757
4764
|
"product"
|
|
4758
|
-
],
|
|
4765
|
+
], ha = (t = "") => {
|
|
4759
4766
|
if (t.startsWith("https://")) return { url: t, type: "url" };
|
|
4760
4767
|
if (t.startsWith("/")) return { url: t, type: "relative" };
|
|
4761
4768
|
if (t.includes(":")) {
|
|
4762
4769
|
const e = t.split(":"), [n, o] = e;
|
|
4763
|
-
if (
|
|
4770
|
+
if (ga.includes(n) && o && e.length === 2) {
|
|
4764
4771
|
const r = (() => {
|
|
4765
4772
|
try {
|
|
4766
4773
|
return decodeURIComponent(o);
|
|
@@ -4772,7 +4779,7 @@ const Wt = x.pre`
|
|
|
4772
4779
|
}
|
|
4773
4780
|
}
|
|
4774
4781
|
return {};
|
|
4775
|
-
},
|
|
4782
|
+
}, fa = (t) => qt.Children.toArray(t).map((e) => typeof e == "string" || typeof e == "number" ? String(e) : "").join(""), mc = ({ children: t, href: e }, {
|
|
4776
4783
|
entityId: n,
|
|
4777
4784
|
entityType: o,
|
|
4778
4785
|
userName: r,
|
|
@@ -4790,9 +4797,9 @@ const Wt = x.pre`
|
|
|
4790
4797
|
if (b.isSource) {
|
|
4791
4798
|
const C = b.entity ?? (n && o ? { id: n, type: o } : null);
|
|
4792
4799
|
if (!s || !C) return null;
|
|
4793
|
-
const h =
|
|
4800
|
+
const h = ua(s, b.activityId, C);
|
|
4794
4801
|
return /* @__PURE__ */ l(
|
|
4795
|
-
|
|
4802
|
+
la,
|
|
4796
4803
|
{
|
|
4797
4804
|
projectName: s,
|
|
4798
4805
|
activityId: b.activityId,
|
|
@@ -4803,7 +4810,7 @@ const Wt = x.pre`
|
|
|
4803
4810
|
}
|
|
4804
4811
|
);
|
|
4805
4812
|
}
|
|
4806
|
-
const p =
|
|
4813
|
+
const p = fa(t).trim(), f = !p || /^https?:\/\//.test(p) ? $n : p, v = b;
|
|
4807
4814
|
return /* @__PURE__ */ l(
|
|
4808
4815
|
rt,
|
|
4809
4816
|
{
|
|
@@ -4818,11 +4825,11 @@ const Wt = x.pre`
|
|
|
4818
4825
|
}
|
|
4819
4826
|
);
|
|
4820
4827
|
}
|
|
4821
|
-
const { url: y, type: c, id: u } =
|
|
4828
|
+
const { url: y, type: c, id: u } = ha(e);
|
|
4822
4829
|
if (!y && !c && !u)
|
|
4823
4830
|
return t;
|
|
4824
4831
|
if (y || !c || !u)
|
|
4825
|
-
return c === "relative" && y ? /* @__PURE__ */ l(
|
|
4832
|
+
return c === "relative" && y ? /* @__PURE__ */ l(da, { to: y, children: t }) : /* @__PURE__ */ l("a", { href: y, target: "_blank", rel: "noreferrer", children: t });
|
|
4826
4833
|
const w = t && t.toString().replace("@", "") || "", T = u === n || c === "user" && u === r || c === "team" && !!i?.includes(u), E = u.replaceAll(".", "-").replaceAll(" ", "-");
|
|
4827
4834
|
return /* @__PURE__ */ l(
|
|
4828
4835
|
rt,
|
|
@@ -4841,24 +4848,24 @@ const Wt = x.pre`
|
|
|
4841
4848
|
children: w
|
|
4842
4849
|
}
|
|
4843
4850
|
);
|
|
4844
|
-
},
|
|
4845
|
-
|
|
4851
|
+
}, pc = ({ type: t, checked: e, ...n }, { activity: o, onCheckChange: r }) => t === "checkbox" ? /* @__PURE__ */ l(
|
|
4852
|
+
aa,
|
|
4846
4853
|
{
|
|
4847
4854
|
checked: !!e,
|
|
4848
4855
|
onChange: (i) => r && r(i, o)
|
|
4849
4856
|
}
|
|
4850
|
-
) : /* @__PURE__ */ l("input", { type: t, disabled: !0, ...n }),
|
|
4851
|
-
if (!(!!e?.startsWith("language-") || t?.position && t.position.start.line !== t.position.end.line)) return /* @__PURE__ */ l(
|
|
4852
|
-
const r = e?.replace(/^language-/, ""), i = typeof n == "string" ? n.replace(/\n$/, "") : null, s = i !== null ?
|
|
4857
|
+
) : /* @__PURE__ */ l("input", { type: t, disabled: !0, ...n }), gc = ({ node: t, className: e, children: n }) => {
|
|
4858
|
+
if (!(!!e?.startsWith("language-") || t?.position && t.position.start.line !== t.position.end.line)) return /* @__PURE__ */ l(pa, { children: n });
|
|
4859
|
+
const r = e?.replace(/^language-/, ""), i = typeof n == "string" ? n.replace(/\n$/, "") : null, s = i !== null ? yr(i, r) : null;
|
|
4853
4860
|
return s !== null ? /* @__PURE__ */ l(Wt, { children: /* @__PURE__ */ l("code", { className: e, dangerouslySetInnerHTML: { __html: s } }) }) : /* @__PURE__ */ l(Wt, { children: n });
|
|
4854
|
-
},
|
|
4861
|
+
}, hc = ({ children: t }) => {
|
|
4855
4862
|
const e = qt.Children.toArray(t).find((o) => !!o?.props)?.props?.children;
|
|
4856
4863
|
if (!e) return /* @__PURE__ */ l("blockquote", { children: t });
|
|
4857
4864
|
const n = [];
|
|
4858
4865
|
if (typeof e == "string")
|
|
4859
4866
|
e.split(`
|
|
4860
4867
|
`).forEach((r, i) => {
|
|
4861
|
-
n.push(/* @__PURE__ */ l(
|
|
4868
|
+
n.push(/* @__PURE__ */ l(jt, { children: r }, i));
|
|
4862
4869
|
});
|
|
4863
4870
|
else if (qn(e)) {
|
|
4864
4871
|
const o = [];
|
|
@@ -4869,11 +4876,11 @@ const Wt = x.pre`
|
|
|
4869
4876
|
` ? (r++, o[r] = []) : o[r].push(a);
|
|
4870
4877
|
}) : o[r].push(i);
|
|
4871
4878
|
}), o.forEach((i, s) => {
|
|
4872
|
-
n.push(/* @__PURE__ */ l(
|
|
4879
|
+
n.push(/* @__PURE__ */ l(jt, { children: i }, s));
|
|
4873
4880
|
});
|
|
4874
4881
|
}
|
|
4875
4882
|
return /* @__PURE__ */ l("blockquote", { children: n });
|
|
4876
|
-
},
|
|
4883
|
+
}, ba = x.span`
|
|
4877
4884
|
position: absolute;
|
|
4878
4885
|
top: 3px;
|
|
4879
4886
|
right: 3px;
|
|
@@ -4901,67 +4908,67 @@ const Wt = x.pre`
|
|
|
4901
4908
|
z-index: 0;
|
|
4902
4909
|
border-radius: 100%;
|
|
4903
4910
|
}
|
|
4904
|
-
`,
|
|
4905
|
-
({ className: t, ...e }, n) => /* @__PURE__ */ l(
|
|
4911
|
+
`, fc = Vt(
|
|
4912
|
+
({ className: t, ...e }, n) => /* @__PURE__ */ l(ba, { className: P("playable", t), ...e, ref: n, children: /* @__PURE__ */ l(J, { icon: "play_circle" }) })
|
|
4906
4913
|
);
|
|
4907
4914
|
export {
|
|
4908
|
-
|
|
4915
|
+
cc as $,
|
|
4909
4916
|
rt as A,
|
|
4910
4917
|
ae as B,
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4918
|
+
oa as C,
|
|
4919
|
+
ta as D,
|
|
4920
|
+
jl as E,
|
|
4921
|
+
Yl as F,
|
|
4922
|
+
Ql as G,
|
|
4923
|
+
Zl as H,
|
|
4924
|
+
nc as I,
|
|
4925
|
+
Pl as J,
|
|
4926
|
+
Bl as K,
|
|
4927
|
+
rc as L,
|
|
4928
|
+
Hs as M,
|
|
4922
4929
|
Se as N,
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4930
|
+
dc as O,
|
|
4931
|
+
fc as P,
|
|
4932
|
+
uc as Q,
|
|
4933
|
+
ua as R,
|
|
4934
|
+
Xl as S,
|
|
4935
|
+
Wl as T,
|
|
4936
|
+
gr as U,
|
|
4937
|
+
tc as V,
|
|
4938
|
+
ic as W,
|
|
4939
|
+
sc as X,
|
|
4940
|
+
Nr as Y,
|
|
4941
|
+
ac as Z,
|
|
4942
|
+
lc as _,
|
|
4943
|
+
na as a,
|
|
4944
|
+
hc as a0,
|
|
4945
|
+
gc as a1,
|
|
4946
|
+
pc as a2,
|
|
4947
|
+
mc as a3,
|
|
4941
4948
|
bt as a4,
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4949
|
+
Il as b,
|
|
4950
|
+
ra as c,
|
|
4951
|
+
Ul as d,
|
|
4952
|
+
Dl as e,
|
|
4946
4953
|
z as f,
|
|
4947
4954
|
In as g,
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4955
|
+
Kl as h,
|
|
4956
|
+
Fl as i,
|
|
4957
|
+
ia as j,
|
|
4958
|
+
ga as k,
|
|
4959
|
+
zl as l,
|
|
4953
4960
|
ht as m,
|
|
4954
|
-
|
|
4955
|
-
|
|
4961
|
+
ai as n,
|
|
4962
|
+
Js as o,
|
|
4956
4963
|
re as p,
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4964
|
+
Br as q,
|
|
4965
|
+
oc as r,
|
|
4966
|
+
Hl as s,
|
|
4967
|
+
G as t,
|
|
4968
|
+
Gl as u,
|
|
4969
|
+
ec as v,
|
|
4970
|
+
ma as w,
|
|
4971
|
+
ql as x,
|
|
4972
|
+
Vl as y,
|
|
4973
|
+
Jl as z
|
|
4967
4974
|
};
|