@pixelmatters/markup 1.3.4 → 1.3.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/README.md +6 -6
- package/dist/widget.js +464 -495
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -45,7 +45,7 @@ function w(e, t) {
|
|
|
45
45
|
function T(e) {
|
|
46
46
|
if (e.__P && e.__d) {
|
|
47
47
|
var n = e.__v, r = n.__e, i = [], a = [], o = v({}, n);
|
|
48
|
-
o.__v = n.__v + 1, t.vnode && t.vnode(o),
|
|
48
|
+
o.__v = n.__v + 1, t.vnode && t.vnode(o), P(e.__P, o, n, e.__n, e.__P.namespaceURI, 32 & n.__u ? [r] : null, i, r ?? w(n), !!(32 & n.__u), a), o.__v = n.__v, o.__.__k[o.__i] = o, re(i, o, a), n.__e = n.__ = null, o.__e != r && E(o);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
function E(e) {
|
|
@@ -63,21 +63,21 @@ function O() {
|
|
|
63
63
|
r.length = O.__r = 0;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function k(e, t, n, r, i, a, o, s, c, l, u) {
|
|
67
67
|
var d, f, p, g, _, v, y, b = r && r.__k || h, x = t.length;
|
|
68
|
-
for (c =
|
|
68
|
+
for (c = A(n, t, b, c, x), d = 0; d < x; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && b[p.__i] || m, p.__i = d, v = P(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && oe(f.ref, null, p), u.push(p.ref, p.__c || g, p)), _ == null && g != null && (_ = g), (y = !!(4 & p.__u)) || f.__k === p.__k ? (c = j(p, c, e, y), y && f.__e && (f.__e = null)) : typeof p.type == "function" && v !== void 0 ? c = v : g && (c = g.nextSibling), p.__u &= -7);
|
|
69
69
|
return n.__e = _, c;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function A(e, t, n, r, i) {
|
|
72
72
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
73
|
-
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i =
|
|
73
|
+
for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = x(null, o, null, null, null) : _(o) ? o = e.__k[a] = x(S, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = x(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = M(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
|
|
74
74
|
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), se(s, s));
|
|
75
75
|
return r;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function j(e, t, n, r) {
|
|
78
78
|
var i, a;
|
|
79
79
|
if (typeof e.type == "function") {
|
|
80
|
-
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t =
|
|
80
|
+
for (i = e.__k, a = 0; i && a < i.length; a++) i[a] && (i[a].__ = e, t = j(i[a], t, n, r));
|
|
81
81
|
return t;
|
|
82
82
|
}
|
|
83
83
|
e.__e != t && (r && (t && e.type && !t.parentNode && (t = w(e)), n.insertBefore(e.__e, t || null)), t = e.__e);
|
|
@@ -86,7 +86,7 @@ function A(e, t, n, r) {
|
|
|
86
86
|
while (t != null && t.nodeType == 8);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function M(e, t, n, r) {
|
|
90
90
|
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && (2 & l.__u) == 0;
|
|
91
91
|
if (l === null && s == null || u && s == l.key && c == l.type) return n;
|
|
92
92
|
if (r > +!!u) {
|
|
@@ -94,15 +94,15 @@ function j(e, t, n, r) {
|
|
|
94
94
|
}
|
|
95
95
|
return -1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function N(e, t, n) {
|
|
98
98
|
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || g.test(t) ? n : n + "px";
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ee(e, t, n, r, i) {
|
|
101
101
|
var a, o;
|
|
102
102
|
n: if (t == "style") if (typeof n == "string") e.style.cssText = n;
|
|
103
103
|
else {
|
|
104
|
-
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n ||
|
|
105
|
-
if (n) for (t in n) r && n[t] == r[t] ||
|
|
104
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || N(e.style, t, "");
|
|
105
|
+
if (n) for (t in n) r && n[t] == r[t] || N(e.style, t, n[t]);
|
|
106
106
|
}
|
|
107
107
|
else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(u, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[l] = r[l] : (n[l] = d, e.addEventListener(t, a ? p : f, a)) : e.removeEventListener(t, a ? p : f, a);
|
|
108
108
|
else {
|
|
@@ -114,7 +114,7 @@ function te(e, t, n, r, i) {
|
|
|
114
114
|
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function te(e) {
|
|
118
118
|
return function(n) {
|
|
119
119
|
if (this.l) {
|
|
120
120
|
var r = this.l[n.type + e];
|
|
@@ -124,14 +124,14 @@ function ne(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
var d, f, p, m, g, b, x, w, T, E, D, O,
|
|
127
|
+
function P(e, n, r, i, a, o, s, c, l, u) {
|
|
128
|
+
var d, f, p, m, g, b, x, w, T, E, D, O, A, j, M, N = n.type;
|
|
129
129
|
if (n.constructor !== void 0) return null;
|
|
130
130
|
128 & r.__u && (l = !!(32 & r.__u), o = [c = n.__e = r.__e]), (d = t.__b) && d(n);
|
|
131
|
-
n: if (typeof
|
|
132
|
-
if (w = n.props, T =
|
|
131
|
+
n: if (typeof N == "function") try {
|
|
132
|
+
if (w = n.props, T = N.prototype && N.prototype.render, E = (d = N.contextType) && i[d.__c], D = d ? E ? E.props.value : d.__ : i, r.__c ? x = (f = n.__c = r.__c).__ = f.__E : (T ? n.__c = f = new N(w, D) : (n.__c = f = new C(w, D), f.constructor = N, f.render = ce), E && E.sub(f), f.state ||= {}, f.__n = i, p = f.__d = !0, f.__h = [], f._sb = []), T && f.__s == null && (f.__s = f.state), T && N.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = v({}, f.__s)), v(f.__s, N.getDerivedStateFromProps(w, f.__s))), m = f.props, g = f.state, f.__v = n, p) T && N.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), T && f.componentDidMount != null && f.__h.push(f.componentDidMount);
|
|
133
133
|
else {
|
|
134
|
-
if (T &&
|
|
134
|
+
if (T && N.getDerivedStateFromProps == null && w !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(w, D), n.__v == r.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(w, f.__s, D)) {
|
|
135
135
|
n.__v != r.__v && (f.props = w, f.state = f.__s, f.__d = !1), n.__e = r.__e, n.__k = r.__k, n.__k.some(function(e) {
|
|
136
136
|
e && (e.__ = n);
|
|
137
137
|
}), h.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && s.push(f);
|
|
@@ -141,29 +141,29 @@ function N(e, n, r, i, a, o, s, c, l, u) {
|
|
|
141
141
|
f.componentDidUpdate(m, g, b);
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
-
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r,
|
|
144
|
+
if (f.context = D, f.props = w, f.__P = e, f.__e = !1, O = t.__r, A = 0, T) f.state = f.__s, f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), h.push.apply(f.__h, f._sb), f._sb = [];
|
|
145
145
|
else do
|
|
146
146
|
f.__d = !1, O && O(n), d = f.render(f.props, f.state, f.context), f.state = f.__s;
|
|
147
|
-
while (f.__d && ++
|
|
148
|
-
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)),
|
|
147
|
+
while (f.__d && ++A < 25);
|
|
148
|
+
f.state = f.__s, f.getChildContext != null && (i = v(v({}, i), f.getChildContext())), T && !p && f.getSnapshotBeforeUpdate != null && (b = f.getSnapshotBeforeUpdate(m, g)), j = d != null && d.type === S && d.key == null ? ie(d.props.children) : d, c = k(e, _(j) ? j : [j], n, r, i, a, o, s, c, l, u), f.base = n.__e, n.__u &= -161, f.__h.length && s.push(f), x && (f.__E = f.__ = null);
|
|
149
149
|
} catch (e) {
|
|
150
150
|
if (n.__v = null, l || o != null) if (e.then) {
|
|
151
151
|
for (n.__u |= l ? 160 : 128; c && c.nodeType == 8 && c.nextSibling;) c = c.nextSibling;
|
|
152
152
|
o[o.indexOf(c)] = null, n.__e = c;
|
|
153
153
|
} else {
|
|
154
|
-
for (
|
|
155
|
-
|
|
154
|
+
for (M = o.length; M--;) y(o[M]);
|
|
155
|
+
ne(n);
|
|
156
156
|
}
|
|
157
|
-
else n.__e = r.__e, n.__k = r.__k, e.then ||
|
|
157
|
+
else n.__e = r.__e, n.__k = r.__k, e.then || ne(n);
|
|
158
158
|
t.__e(e, n, r);
|
|
159
159
|
}
|
|
160
160
|
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e = ae(r.__e, n, r, i, a, o, s, l, u);
|
|
161
161
|
return (d = t.diffed) && d(n), 128 & n.__u ? void 0 : c;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(
|
|
163
|
+
function ne(e) {
|
|
164
|
+
e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ne));
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function re(e, n, r) {
|
|
167
167
|
for (var i = 0; i < r.length; i++) oe(r[i], r[++i], r[++i]);
|
|
168
168
|
t.__c && t.__c(n, e), e.some(function(n) {
|
|
169
169
|
try {
|
|
@@ -175,8 +175,8 @@ function ie(e, n, r) {
|
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(
|
|
178
|
+
function ie(e) {
|
|
179
|
+
return typeof e != "object" || !e || e.__b > 0 ? e : _(e) ? e.map(ie) : v({}, e);
|
|
180
180
|
}
|
|
181
181
|
function ae(n, r, i, a, o, s, c, l, u) {
|
|
182
182
|
var d, f, p, h, g, v, b, x = i.props || m, S = r.props, C = r.type;
|
|
@@ -193,11 +193,11 @@ function ae(n, r, i, a, o, s, c, l, u) {
|
|
|
193
193
|
if (C == null) x === S || l && n.data == S || (n.data = S);
|
|
194
194
|
else {
|
|
195
195
|
if (s &&= e.call(n.childNodes), !l && s != null) for (x = {}, d = 0; d < n.attributes.length; d++) x[(g = n.attributes[d]).name] = g.value;
|
|
196
|
-
for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S ||
|
|
197
|
-
for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g ||
|
|
196
|
+
for (d in x) g = x[d], d == "dangerouslySetInnerHTML" ? p = g : d == "children" || d in S || d == "value" && "defaultValue" in S || d == "checked" && "defaultChecked" in S || ee(n, d, null, g, o);
|
|
197
|
+
for (d in S) g = S[d], d == "children" ? h = g : d == "dangerouslySetInnerHTML" ? f = g : d == "value" ? v = g : d == "checked" ? b = g : l && typeof g != "function" || x[d] === g || ee(n, d, g, x[d], o);
|
|
198
198
|
if (f) l || p && (f.__html == p.__html || f.__html == n.innerHTML) || (n.innerHTML = f.__html), r.__k = [];
|
|
199
|
-
else if (p && (n.innerHTML = ""),
|
|
200
|
-
l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) &&
|
|
199
|
+
else if (p && (n.innerHTML = ""), k(r.type == "template" ? n.content : n, _(h) ? h : [h], r, i, a, C == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : i.__k && w(i, 0), l, u), s != null) for (d = s.length; d--;) y(s[d]);
|
|
200
|
+
l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && ee(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && ee(n, d, b, x[d], o));
|
|
201
201
|
}
|
|
202
202
|
return n;
|
|
203
203
|
}
|
|
@@ -229,7 +229,7 @@ function ce(e, t, n) {
|
|
|
229
229
|
}
|
|
230
230
|
function le(n, r, i) {
|
|
231
231
|
var a, o, s, c;
|
|
232
|
-
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [],
|
|
232
|
+
r == document && (r = document.documentElement), t.__ && t.__(n, r), o = (a = typeof i == "function") ? null : i && i.__k || r.__k, s = [], c = [], P(r, n = (!a && i || r).__k = b(S, null, [n]), o || m, m, r.namespaceURI, !a && i ? [i] : o ? null : r.firstChild ? e.call(r.childNodes) : null, s, !a && i ? i : o ? o.__e : r.firstChild, a, c), re(s, n, c);
|
|
233
233
|
}
|
|
234
234
|
e = h.slice, t = { __e: function(e, t, n, r) {
|
|
235
235
|
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
|
|
@@ -245,27 +245,27 @@ e = h.slice, t = { __e: function(e, t, n, r) {
|
|
|
245
245
|
this.__v && (this.__e = !0, e && this.__h.push(e), D(this));
|
|
246
246
|
}, C.prototype.render = S, r = [], a = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, o = function(e, t) {
|
|
247
247
|
return e.__v.__b - t.__v.__b;
|
|
248
|
-
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f =
|
|
248
|
+
}, O.__r = 0, s = Math.random().toString(8), c = "__d" + s, l = "__a" + s, u = /(PointerCapture)$|Capture$/i, d = 0, f = te(!1), p = te(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var ue = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", F, I, de, fe, L = 0, pe = [], R = t, me = R.__b, he = R.__r, ge = R.diffed, _e = R.__c, ve = R.unmount, ye = R.__;
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
-
var n =
|
|
251
|
+
var ue = ":host{--markup-paper:#fdfcfa;--markup-ink:#1a1614;--markup-muted:#6b6661;--markup-border:#1a16141a;--markup-border-strong:#1a16142e;--markup-brand:#e35d2a;--markup-brand-hover:#c84d20;--markup-team:#2a4ac8;--markup-shadow:0 1px 2px #1a16140f, 0 8px 28px #1a16141f;--markup-overlay-tint:#1a16140a;--markup-danger:#dc2626;--markup-radius:6px;--markup-radius-sm:4px;--markup-font:\"Geist Variable\", \"Geist\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif;--markup-font-mono:\"Geist Mono Variable\", \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;all:initial;font-family:var(--markup-font);color:var(--markup-ink);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:1.5}:host([data-theme=dark]){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}@media (prefers-color-scheme:dark){:host(:not([data-theme=light])){--markup-paper:#1a1614;--markup-ink:#fdfcfa;--markup-muted:#a8a39e;--markup-border:#fdfcfa1f;--markup-border-strong:#fdfcfa38;--markup-team:#7b99f0;--markup-shadow:0 1px 2px #00000059, 0 12px 40px #00000073;--markup-overlay-tint:#fdfcfa0d;--markup-danger:#f87171}}.markup-shadow-root{font-family:var(--markup-font)}.markup-shadow-root *,.markup-shadow-root :before,.markup-shadow-root :after{box-sizing:border-box}:where(.markup-shadow-root button,.markup-shadow-root input,.markup-shadow-root textarea){font:inherit;color:inherit}.markup-eyebrow{font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;color:var(--markup-muted);font-size:10px;font-weight:500}.markup-fab{z-index:10;background:var(--markup-ink);color:var(--markup-paper);cursor:pointer;touch-action:none;letter-spacing:-.01em;pointer-events:auto;box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;font-weight:500;transition:background .15s,box-shadow .15s,transform .15s;display:inline-flex;position:fixed;bottom:24px}.markup-fab:hover{background:var(--markup-brand);box-shadow:0 0 0 1px color-mix(in srgb, var(--markup-brand) 0%, transparent), var(--markup-shadow)}.markup-fab:active{transform:translateY(1px)}.markup-fab.is-active{background:var(--markup-brand);box-shadow:var(--markup-shadow)}.markup-fab.is-active:hover{background:var(--markup-brand-hover)}.markup-fab .markup-fab-icon{color:var(--markup-brand);transition:color .15s}.markup-fab:hover .markup-fab-icon,.markup-fab.is-active .markup-fab-icon{color:var(--markup-paper)}.markup-fab-right{right:24px}.markup-fab-left{left:24px}.markup-fab.is-floating{inset:0 auto auto 0}.markup-fab.is-dragging{cursor:grabbing;transition:none}.markup-fab-icon{align-items:center;display:inline-flex}.markup-fab-label{font-family:var(--markup-font)}.markup-hud-hidden-toast{z-index:10;background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:500;animation:.22s ease-out markup-hud-hidden-in,.32s ease-in 4.6s forwards markup-hud-hidden-out;display:inline-flex;position:fixed;bottom:24px}.markup-hud-hidden-toast-right{right:24px}.markup-hud-hidden-toast-left{left:24px}.markup-kbd{background:color-mix(in srgb, var(--markup-paper) 14%, transparent);min-width:18px;height:18px;color:var(--markup-paper);font-family:var(--markup-font);border-radius:4px;justify-content:center;align-items:center;padding:0 5px;font-size:10px;font-weight:600;line-height:1;display:inline-flex}@keyframes markup-hud-hidden-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes markup-hud-hidden-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}.markup-pins-layer{pointer-events:none;position:fixed;inset:0}.markup-pin{background:var(--markup-ink);width:28px;height:28px;color:var(--markup-brand);cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 3px color-mix(in srgb, var(--markup-brand) 35%, transparent), var(--markup-shadow);border:none;border-radius:50% 50% 50% 4px;justify-content:center;align-items:center;margin-top:-28px;padding:0;transition:transform .15s,background .15s,color .15s;display:inline-flex;position:absolute}.markup-pin:hover,.markup-pin.is-active{background:var(--markup-brand);color:var(--markup-paper)}.markup-pin.is-anchor{anchor-name:--markup-active-anchor}.markup-pin-ghost{background:var(--markup-brand);color:var(--markup-paper);cursor:default;pointer-events:none;animation:1.2s ease-in-out infinite markup-ghost-pulse}.markup-pin-dot{background:currentColor;border-radius:50%;width:6px;height:6px;display:inline-block}.markup-pin-count{background:var(--markup-brand);min-width:16px;height:16px;color:var(--markup-paper);font-family:var(--markup-font-mono);text-align:center;box-shadow:0 0 0 2px var(--markup-paper);border-radius:999px;padding:0 4px;font-size:9px;font-weight:600;line-height:16px;position:absolute;top:-4px;left:50%;transform:translate(-50%,-50%)}@keyframes markup-ghost-pulse{0%,to{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 0 #e35d2a66}50%{box-shadow:0 0 0 2px var(--markup-paper), 0 0 0 10px #e35d2a00}}.markup-placement-overlay{background:var(--markup-overlay-tint);cursor:crosshair;pointer-events:auto;z-index:1;animation:.18s ease-out markup-overlay-in;position:fixed;inset:0}.markup-placement-cursor-help{background:var(--markup-ink);color:var(--markup-paper);letter-spacing:-.01em;box-shadow:var(--markup-shadow);pointer-events:none;border-radius:999px;padding:10px 16px;font-size:12px;font-weight:500;animation:.22s ease-out 60ms backwards markup-help-in;position:fixed;top:24px;left:50%;transform:translate(-50%)}@keyframes markup-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes markup-help-in{0%{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%)}}.markup-popover{width:320px;max-width:calc(100vw - 24px);height:auto;max-height:calc(100dvh - 24px);inset:auto;left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);background:var(--markup-paper);color:var(--markup-ink);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);box-shadow:var(--markup-shadow);pointer-events:auto;flex-direction:column;gap:0;margin:0;padding:0;animation:.16s ease-out markup-popover-in;display:flex;position:fixed;overflow:hidden}@supports (anchor-name:--x){.markup-popover{position-anchor:--markup-active-anchor;left:calc(anchor(right) + 8px);top:calc(anchor(top) - 9px);position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;position-try-order:most-block-size}.markup-popover.is-floating{left:var(--markup-pop-x,0);top:var(--markup-pop-y,0);position-try-fallbacks:none}}.markup-popover.is-hud-hidden{display:none}@keyframes markup-popover-in{0%{opacity:0;transform:translateY(-4px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.markup-popover-header{border-bottom:1px solid var(--markup-border);cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.markup-popover.is-dragging .markup-popover-header{cursor:grabbing}.markup-popover-header-actions{align-items:center;gap:4px;display:flex}.markup-thread-menu{display:flex;position:relative}.markup-thread-menu-list{z-index:10;background:var(--markup-paper);border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius);min-width:160px;box-shadow:var(--markup-shadow);padding:4px;animation:.12s ease-out markup-menu-in;position:absolute;top:calc(100% + 6px);right:0}.markup-thread-menu-item{border-radius:var(--markup-radius-sm);width:100%;color:var(--markup-ink);text-align:left;cursor:pointer;background:0 0;border:none;padding:7px 10px;font-size:13px;transition:background .1s,color .1s;display:block}.markup-thread-menu-item:hover{background:var(--markup-border)}.markup-thread-menu-item.is-danger{color:var(--markup-danger,#dc2626)}.markup-thread-menu-item.is-danger:hover{background:color-mix(in srgb, var(--markup-danger,#dc2626) 10%, transparent)}.markup-thread-menu-item:disabled{opacity:.5;cursor:default}@keyframes markup-menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.markup-popover-body{padding:12px}.markup-popover-byline{color:var(--markup-muted);align-items:center;gap:4px;margin:0 0 8px;font-size:12px;display:flex}.markup-popover-name{color:var(--markup-ink);font-weight:500}.markup-icon-btn{border-radius:var(--markup-radius-sm);width:24px;height:24px;color:var(--markup-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.markup-icon-btn:hover,.markup-icon-btn.is-open{background:var(--markup-border);color:var(--markup-ink)}.markup-comments{border-bottom:1px solid var(--markup-border);background:linear-gradient(var(--markup-paper), transparent) top / 100% 20px no-repeat local, linear-gradient(transparent, var(--markup-paper)) bottom / 100% 20px no-repeat local, radial-gradient(farthest-side at 50% 0%, #1a16141a, transparent) top / 100% 10px no-repeat scroll, radial-gradient(farthest-side at 50% 100%, #1a16141a, transparent) bottom / 100% 10px no-repeat scroll;flex-direction:column;gap:12px;max-height:280px;margin:0;padding:8px 12px 4px;list-style:none;display:flex;overflow-y:auto}.markup-comment{flex-direction:column;gap:4px;display:flex}.markup-comment-meta{align-items:center;gap:6px;font-size:11px;display:flex}.markup-comment-author{color:var(--markup-ink);font-weight:600}.markup-comment.is-team .markup-comment-author{color:var(--markup-team)}.markup-comment-badge{background:color-mix(in srgb, var(--markup-team) 12%, transparent);height:14px;color:var(--markup-team);font-family:var(--markup-font-mono);letter-spacing:.12em;text-transform:uppercase;border-radius:999px;align-items:center;padding:0 5px;font-size:9px;font-weight:500;line-height:1;display:inline-flex}.markup-comment-time{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.04em;font-size:10px}.markup-comment-body{white-space:pre-wrap;word-break:break-word;margin:0;font-size:13px;line-height:1.5}.markup-comment-edited{color:var(--markup-muted);font-size:11px}.markup-thread-actions{align-items:center;gap:4px;display:flex}.markup-comment-meta .markup-reaction-picker-wrap,.markup-thread-actions{margin-left:auto}.markup-comment-meta .markup-reaction-add{width:22px;height:22px;margin-top:-4px;margin-bottom:-4px}.markup-reaction-picker-wrap>.markup-icon-btn,.markup-comment-menu>.markup-icon-btn{margin-top:-4px;margin-bottom:-4px}.markup-comment-menu.is-up .markup-thread-menu-list{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}@keyframes markup-menu-in-up{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.markup-comment{position:relative}.markup-reactions{flex-wrap:wrap;align-items:center;gap:4px;margin-top:2px;display:flex}.markup-reaction-chip{border:1px solid var(--markup-border);height:22px;color:var(--markup-ink);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 7px 0 6px;font-size:11px;line-height:1;transition:background .12s,border-color .12s;display:inline-flex}.markup-reaction-chip:hover:not(:disabled){background:color-mix(in srgb, var(--markup-ink) 5%, transparent)}.markup-reaction-chip.is-mine{border-color:color-mix(in srgb, var(--markup-brand) 45%, transparent);background:color-mix(in srgb, var(--markup-brand) 10%, transparent)}.markup-reaction-chip.is-mine:hover:not(:disabled){background:color-mix(in srgb, var(--markup-brand) 16%, transparent)}.markup-reaction-chip:disabled{cursor:default;opacity:.6}.markup-reaction-emoji{font-size:13px;line-height:1}.markup-reaction-count{font-family:var(--markup-font-mono);letter-spacing:.04em;color:var(--markup-muted);font-size:10px}.markup-reaction-chip.is-mine .markup-reaction-count{color:var(--markup-brand)}.markup-reaction-picker-wrap{opacity:0;flex:none;transition:opacity .12s;display:inline-flex;position:relative}.markup-comment:hover .markup-reaction-picker-wrap,.markup-comment:focus-within .markup-reaction-picker-wrap,.markup-reaction-picker-wrap.is-open{opacity:1}.markup-reaction-add{border:1px dashed var(--markup-border-strong);width:22px;height:22px;color:var(--markup-muted);font:inherit;cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:background .12s,color .12s,border-color .12s;display:inline-flex}.markup-reaction-add:hover,.markup-reaction-add.is-open{background:color-mix(in srgb, var(--markup-ink) 5%, transparent);color:var(--markup-ink);border-style:solid}.markup-reaction-picker{z-index:1;border:1px solid var(--markup-border-strong);background:var(--markup-paper);border-radius:8px;gap:2px;padding:4px;animation:.12s markup-menu-in;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 1px 2px #1a16140f,0 8px 28px #1a16141a}.markup-reaction-picker-wrap.is-up .markup-reaction-picker{animation-name:markup-menu-in-up;top:auto;bottom:calc(100% + 6px)}.markup-reaction-picker-item{cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;font-size:16px;line-height:1;transition:background .12s;display:inline-flex}.markup-reaction-picker-item:hover{background:color-mix(in srgb, var(--markup-ink) 8%, transparent)}.markup-reaction-picker-item.is-mine{background:color-mix(in srgb, var(--markup-brand) 14%, transparent)}.markup-comment-edit-form{flex-direction:column;gap:6px;display:flex}.markup-comment-edit-form .markup-textarea{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;color:var(--markup-ink);resize:vertical;font:inherit;outline:none;padding:8px 10px;font-size:13px;line-height:1.5}.markup-comment-edit-form .markup-textarea:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-comment-edit-actions{justify-content:flex-end;gap:6px;display:flex}.markup-composer{flex-direction:column;display:flex;position:relative}.markup-composer-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;min-height:36px;max-height:96px;color:var(--markup-ink);resize:none;font-family:var(--markup-font);outline:none;padding:8px 10px;font-size:13px;line-height:1.5;transition:border-color .12s,box-shadow .12s,border-bottom-left-radius .15s,border-bottom-right-radius .15s}.markup-composer-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-composer-input:disabled{opacity:.6}.markup-composer-input::placeholder{color:var(--markup-muted)}.markup-composer.is-filled .markup-composer-input{border-bottom-right-radius:0;border-bottom-left-radius:0}.markup-composer-footer-wrap{grid-template-rows:0fr;transition:grid-template-rows .15s;display:grid}.markup-composer.is-filled .markup-composer-footer-wrap{grid-template-rows:1fr}.markup-composer-footer{border:1px solid var(--markup-border-strong);border-radius:0 0 var(--markup-radius-sm) var(--markup-radius-sm);opacity:0;border-top:none;justify-content:space-between;align-items:center;gap:8px;padding:2px 2px 2px 10px;transition:opacity .1s;display:flex;overflow:hidden}.markup-composer.is-filled .markup-composer-footer{opacity:1;transition-delay:60ms}.markup-composer-hint{font-family:var(--markup-font-mono);letter-spacing:.06em;color:var(--markup-muted);font-size:10px}.markup-composer-error{color:var(--markup-brand)}.markup-composer-actions{align-items:center;gap:6px;display:flex}.markup-composer-actions-empty{transition:opacity .12s;position:absolute;top:3px;right:3px}.markup-composer.is-filled .markup-composer-actions-empty{opacity:0;pointer-events:none}.markup-author-prompt{flex-direction:column;gap:10px;padding:12px;display:flex}.markup-author-status{color:var(--markup-muted);margin:0;font-size:12px}.markup-input{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);background:var(--markup-paper);width:100%;height:36px;color:var(--markup-ink);outline:none;padding:0 10px;font-size:14px;transition:border-color .12s,box-shadow .12s}.markup-input:focus-visible{border-color:var(--markup-brand);box-shadow:0 0 0 3px #e35d2a2e}.markup-btn{border-radius:var(--markup-radius-sm);height:30px;color:var(--markup-ink);cursor:pointer;letter-spacing:-.01em;white-space:nowrap;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:0 8px;font-size:12px;font-weight:500;transition:background .12s,border-color .12s,color .12s,opacity .12s;display:inline-flex}.markup-btn:disabled{opacity:.5;cursor:not-allowed}.markup-btn-primary{background:var(--markup-ink);color:var(--markup-paper)}.markup-btn-primary:hover:not(:disabled){background:var(--markup-brand)}.markup-btn-ghost{color:var(--markup-muted)}.markup-btn-ghost:hover:not(:disabled){background:var(--markup-border);color:var(--markup-ink)}.markup-screenshot-row{border-top:1px solid var(--markup-border);margin-top:8px;padding-top:8px}.markup-screenshot-status{color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;display:flex}.markup-screenshot-toggle{cursor:pointer;color:var(--markup-muted);font-family:var(--markup-font-mono);letter-spacing:.06em;align-items:center;gap:5px;font-size:10px;transition:color .12s;display:flex}.markup-screenshot-toggle:hover{color:var(--markup-ink)}.markup-screenshot-checkbox{width:12px;height:12px;accent-color:var(--markup-brand);cursor:pointer;margin:0}.markup-screenshot-thumb{border:1px solid var(--markup-border-strong);object-fit:cover;border-radius:3px;flex-shrink:0;width:auto;height:25px;margin:-5px 0 -5px auto;display:block}.markup-comment-screenshot{border:1px solid var(--markup-border-strong);border-radius:var(--markup-radius-sm);cursor:pointer;background:0 0;margin-top:8px;padding:0;transition:border-color .12s,opacity .12s;display:block;overflow:hidden}.markup-comment-screenshot:hover{border-color:var(--markup-brand);opacity:.9}.markup-comment-screenshot img{object-fit:cover;object-position:top;width:100%;height:auto;max-height:120px;display:block}.markup-lightbox{background:#1a1614e0;border:none;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:24px;position:fixed;inset:0}.markup-lightbox[open]{justify-content:center;align-items:center;display:flex}.markup-lightbox::backdrop{display:none}.markup-lightbox-img{border-radius:var(--markup-radius);object-fit:contain;max-width:100%;max-height:100%;box-shadow:var(--markup-shadow);animation:.16s ease-out markup-lightbox-in}.markup-lightbox-close{color:#fdfcfa;background:#1a161499;position:absolute;top:16px;right:16px}.markup-lightbox-close:hover{color:#fdfcfa;background:#1a1614d9}@keyframes markup-lightbox-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.markup-fab,.markup-pin,.markup-icon-btn,.markup-btn,.markup-popover,.markup-pin-ghost,.markup-placement-overlay,.markup-placement-cursor-help,.markup-lightbox-img{transition:none;animation:none}}", de, F, fe, pe, I = 0, me = [], L = t, he = L.__b, ge = L.__r, _e = L.diffed, ve = L.__c, ye = L.unmount, be = L.__;
|
|
252
|
+
function xe(e, t) {
|
|
253
|
+
L.__h && L.__h(F, e, I || t), I = 0;
|
|
254
|
+
var n = F.__H ||= {
|
|
255
255
|
__: [],
|
|
256
256
|
__h: []
|
|
257
257
|
};
|
|
258
258
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
return
|
|
260
|
+
function R(e) {
|
|
261
|
+
return I = 1, Se(Ae, e);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
var r =
|
|
265
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
263
|
+
function Se(e, t, n) {
|
|
264
|
+
var r = xe(de++, 2);
|
|
265
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ae(void 0, t), function(e) {
|
|
266
266
|
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
|
|
267
267
|
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
|
|
268
|
-
}], r.__c =
|
|
268
|
+
}], r.__c = F, !F.__f)) {
|
|
269
269
|
var i = function(e, t, n) {
|
|
270
270
|
if (!r.__c.__H) return !0;
|
|
271
271
|
var i = r.__c.__H.__.filter(function(e) {
|
|
@@ -282,111 +282,111 @@ function xe(e, t, n) {
|
|
|
282
282
|
}
|
|
283
283
|
}), a && a.call(this, e, t, n) || o;
|
|
284
284
|
};
|
|
285
|
-
|
|
286
|
-
var a =
|
|
287
|
-
|
|
285
|
+
F.__f = !0;
|
|
286
|
+
var a = F.shouldComponentUpdate, o = F.componentWillUpdate;
|
|
287
|
+
F.componentWillUpdate = function(e, t, n) {
|
|
288
288
|
if (this.__e) {
|
|
289
289
|
var r = a;
|
|
290
290
|
a = void 0, i(e, t, n), a = r;
|
|
291
291
|
}
|
|
292
292
|
o && o.call(this, e, t, n);
|
|
293
|
-
},
|
|
293
|
+
}, F.shouldComponentUpdate = i;
|
|
294
294
|
}
|
|
295
295
|
return r.__N || r.__;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
var n =
|
|
299
|
-
!
|
|
297
|
+
function z(e, t) {
|
|
298
|
+
var n = xe(de++, 3);
|
|
299
|
+
!L.__s && ke(n.__H, t) && (n.__ = e, n.u = t, F.__H.__h.push(n));
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
301
|
+
function B(e) {
|
|
302
|
+
return I = 5, Ce(function() {
|
|
303
303
|
return { current: e };
|
|
304
304
|
}, []);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
var n =
|
|
308
|
-
return
|
|
306
|
+
function Ce(e, t) {
|
|
307
|
+
var n = xe(de++, 7);
|
|
308
|
+
return ke(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
310
|
+
function V(e, t) {
|
|
311
|
+
return I = 8, Ce(function() {
|
|
312
312
|
return e;
|
|
313
313
|
}, t);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
for (var e; e =
|
|
315
|
+
function we() {
|
|
316
|
+
for (var e; e = me.shift();) {
|
|
317
317
|
var t = e.__H;
|
|
318
318
|
if (e.__P && t) try {
|
|
319
|
-
t.__h.some(
|
|
319
|
+
t.__h.some(De), t.__h.some(Oe), t.__h = [];
|
|
320
320
|
} catch (n) {
|
|
321
|
-
t.__h = [],
|
|
321
|
+
t.__h = [], L.__e(n, e.__v);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
e && t.__k && t.__k.__m && (e.__m = t.__k.__m),
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
var t = (
|
|
332
|
-
t && (
|
|
325
|
+
L.__b = function(e) {
|
|
326
|
+
F = null, he && he(e);
|
|
327
|
+
}, L.__ = function(e, t) {
|
|
328
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), be && be(e, t);
|
|
329
|
+
}, L.__r = function(e) {
|
|
330
|
+
ge && ge(e), de = 0;
|
|
331
|
+
var t = (F = e.__c).__H;
|
|
332
|
+
t && (fe === F ? (t.__h = [], F.__h = [], t.__.some(function(e) {
|
|
333
333
|
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
|
|
334
|
-
})) : (t.__h.some(
|
|
335
|
-
},
|
|
336
|
-
|
|
334
|
+
})) : (t.__h.some(De), t.__h.some(Oe), t.__h = [], de = 0)), fe = F;
|
|
335
|
+
}, L.diffed = function(e) {
|
|
336
|
+
_e && _e(e);
|
|
337
337
|
var t = e.__c;
|
|
338
|
-
t && t.__H && (t.__H.__h.length && (
|
|
338
|
+
t && t.__H && (t.__H.__h.length && (me.push(t) !== 1 && pe === L.requestAnimationFrame || ((pe = L.requestAnimationFrame) || Ee)(we)), t.__H.__.some(function(e) {
|
|
339
339
|
e.u && (e.__H = e.u), e.u = void 0;
|
|
340
|
-
})),
|
|
341
|
-
},
|
|
340
|
+
})), fe = F = null;
|
|
341
|
+
}, L.__c = function(e, t) {
|
|
342
342
|
t.some(function(e) {
|
|
343
343
|
try {
|
|
344
|
-
e.__h.some(
|
|
345
|
-
return !e.__ ||
|
|
344
|
+
e.__h.some(De), e.__h = e.__h.filter(function(e) {
|
|
345
|
+
return !e.__ || Oe(e);
|
|
346
346
|
});
|
|
347
347
|
} catch (n) {
|
|
348
348
|
t.some(function(e) {
|
|
349
349
|
e.__h &&= [];
|
|
350
|
-
}), t = [],
|
|
350
|
+
}), t = [], L.__e(n, e.__v);
|
|
351
351
|
}
|
|
352
|
-
}),
|
|
353
|
-
},
|
|
354
|
-
|
|
352
|
+
}), ve && ve(e, t);
|
|
353
|
+
}, L.unmount = function(e) {
|
|
354
|
+
ye && ye(e);
|
|
355
355
|
var t, n = e.__c;
|
|
356
356
|
n && n.__H && (n.__H.__.some(function(e) {
|
|
357
357
|
try {
|
|
358
|
-
|
|
358
|
+
De(e);
|
|
359
359
|
} catch (e) {
|
|
360
360
|
t = e;
|
|
361
361
|
}
|
|
362
|
-
}), n.__H = void 0, t &&
|
|
362
|
+
}), n.__H = void 0, t && L.__e(t, n.__v));
|
|
363
363
|
};
|
|
364
|
-
var
|
|
365
|
-
function
|
|
364
|
+
var Te = typeof requestAnimationFrame == "function";
|
|
365
|
+
function Ee(e) {
|
|
366
366
|
var t, n = function() {
|
|
367
|
-
clearTimeout(r),
|
|
367
|
+
clearTimeout(r), Te && cancelAnimationFrame(t), setTimeout(e);
|
|
368
368
|
}, r = setTimeout(n, 35);
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
function Ee(e) {
|
|
372
|
-
var t = I, n = e.__c;
|
|
373
|
-
typeof n == "function" && (e.__c = void 0, n()), I = t;
|
|
369
|
+
Te && (t = requestAnimationFrame(n));
|
|
374
370
|
}
|
|
375
371
|
function De(e) {
|
|
376
|
-
var t =
|
|
377
|
-
e.__c =
|
|
372
|
+
var t = F, n = e.__c;
|
|
373
|
+
typeof n == "function" && (e.__c = void 0, n()), F = t;
|
|
378
374
|
}
|
|
379
|
-
function Oe(e
|
|
375
|
+
function Oe(e) {
|
|
376
|
+
var t = F;
|
|
377
|
+
e.__c = e.__(), F = t;
|
|
378
|
+
}
|
|
379
|
+
function ke(e, t) {
|
|
380
380
|
return !e || e.length !== t.length || t.some(function(t, n) {
|
|
381
381
|
return t !== e[n];
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function Ae(e, t) {
|
|
385
385
|
return typeof t == "function" ? t(e) : t;
|
|
386
386
|
}
|
|
387
|
-
for (var
|
|
388
|
-
|
|
389
|
-
function
|
|
387
|
+
for (var je = "1.37.0", H = [], U = [], Me = Uint8Array, Ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Pe = 0, Fe = Ne.length; Pe < Fe; ++Pe) H[Pe] = Ne[Pe], U[Ne.charCodeAt(Pe)] = Pe;
|
|
388
|
+
U[45] = 62, U[95] = 63;
|
|
389
|
+
function Ie(e) {
|
|
390
390
|
var t = e.length;
|
|
391
391
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
392
392
|
var n = e.indexOf("=");
|
|
@@ -394,28 +394,28 @@ function Fe(e) {
|
|
|
394
394
|
var r = n === t ? 0 : 4 - n % 4;
|
|
395
395
|
return [n, r];
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Le(e, t, n) {
|
|
398
398
|
return (t + n) * 3 / 4 - n;
|
|
399
399
|
}
|
|
400
|
-
function Le(e) {
|
|
401
|
-
var t, n = Fe(e), r = n[0], i = n[1], a = new je(Ie(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
402
|
-
for (c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
403
|
-
return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
404
|
-
}
|
|
405
400
|
function Re(e) {
|
|
406
|
-
|
|
401
|
+
var t, n = Ie(e), r = n[0], i = n[1], a = new Me(Le(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
402
|
+
for (c = 0; c < s; c += 4) t = U[e.charCodeAt(c)] << 18 | U[e.charCodeAt(c + 1)] << 12 | U[e.charCodeAt(c + 2)] << 6 | U[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
403
|
+
return i === 2 && (t = U[e.charCodeAt(c)] << 2 | U[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = U[e.charCodeAt(c)] << 10 | U[e.charCodeAt(c + 1)] << 4 | U[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
407
404
|
}
|
|
408
|
-
function ze(e
|
|
409
|
-
|
|
405
|
+
function ze(e) {
|
|
406
|
+
return H[e >> 18 & 63] + H[e >> 12 & 63] + H[e >> 6 & 63] + H[e & 63];
|
|
407
|
+
}
|
|
408
|
+
function Be(e, t, n) {
|
|
409
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(ze(r));
|
|
410
410
|
return i.join("");
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(
|
|
414
|
-
return r === 1 ? (t = e[n - 1], i.push(
|
|
412
|
+
function Ve(e) {
|
|
413
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(Be(e, o, o + a > s ? s : o + a));
|
|
414
|
+
return r === 1 ? (t = e[n - 1], i.push(H[t >> 2] + H[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(H[t >> 10] + H[t >> 4 & 63] + H[t << 2 & 63] + "=")), i.join("");
|
|
415
415
|
}
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/common/index.js
|
|
418
|
-
function
|
|
418
|
+
function W(e) {
|
|
419
419
|
if (e === void 0) return {};
|
|
420
420
|
if (!Ue(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
|
|
421
421
|
return e;
|
|
@@ -447,10 +447,10 @@ function Ze(e) {
|
|
|
447
447
|
t.length % 2 == 1 && (t = "0" + t);
|
|
448
448
|
let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
|
|
449
449
|
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= Je;
|
|
450
|
-
return
|
|
450
|
+
return Ve(n);
|
|
451
451
|
}
|
|
452
452
|
function Qe(e) {
|
|
453
|
-
let t =
|
|
453
|
+
let t = Re(e);
|
|
454
454
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
455
455
|
let n = qe, r = qe;
|
|
456
456
|
for (let e of t) n += BigInt(e) * Ye ** r, r++;
|
|
@@ -459,10 +459,10 @@ function Qe(e) {
|
|
|
459
459
|
function $e(e) {
|
|
460
460
|
if (e < Ge || Ke < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
461
461
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
462
|
-
return new DataView(t).setBigInt64(0, e, !0),
|
|
462
|
+
return new DataView(t).setBigInt64(0, e, !0), Ve(new Uint8Array(t));
|
|
463
463
|
}
|
|
464
464
|
function et(e) {
|
|
465
|
-
let t =
|
|
465
|
+
let t = Re(e);
|
|
466
466
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
467
467
|
return new DataView(t.buffer).getBigInt64(0, !0);
|
|
468
468
|
}
|
|
@@ -484,7 +484,7 @@ function at(e) {
|
|
|
484
484
|
let n = t[0][0];
|
|
485
485
|
if (n === "$bytes") {
|
|
486
486
|
if (typeof e.$bytes != "string") throw Error(`Malformed $bytes field on ${e}`);
|
|
487
|
-
return
|
|
487
|
+
return Re(e.$bytes).buffer;
|
|
488
488
|
}
|
|
489
489
|
if (n === "$integer") {
|
|
490
490
|
if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
|
|
@@ -492,7 +492,7 @@ function at(e) {
|
|
|
492
492
|
}
|
|
493
493
|
if (n === "$float") {
|
|
494
494
|
if (typeof e.$float != "string") throw Error(`Malformed $float field on ${e}`);
|
|
495
|
-
let t =
|
|
495
|
+
let t = Re(e.$float);
|
|
496
496
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
|
|
497
497
|
let n = new DataView(t.buffer).getFloat64(0, We);
|
|
498
498
|
if (!Xe(n)) throw Error(`Float ${n} should be encoded as a number`);
|
|
@@ -526,10 +526,10 @@ function ct(e, t, n, r) {
|
|
|
526
526
|
}
|
|
527
527
|
if (typeof e == "number") if (Xe(e)) {
|
|
528
528
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
529
|
-
return new DataView(t).setFloat64(0, e, We), { $float:
|
|
529
|
+
return new DataView(t).setFloat64(0, e, We), { $float: Ve(new Uint8Array(t)) };
|
|
530
530
|
} else return e;
|
|
531
531
|
if (typeof e == "boolean" || typeof e == "string") return e;
|
|
532
|
-
if (e instanceof ArrayBuffer) return { $bytes:
|
|
532
|
+
if (e instanceof ArrayBuffer) return { $bytes: Ve(new Uint8Array(e)) };
|
|
533
533
|
if (Array.isArray(e)) return e.map((e, r) => ct(e, t, n + `[${r}]`, !1));
|
|
534
534
|
if (e instanceof Set) throw Error(lt(n, "Set", [...e], t));
|
|
535
535
|
if (e instanceof Map) throw Error(lt(n, "Map", [...e], t));
|
|
@@ -1047,7 +1047,7 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1047
1047
|
Zt(this, "queryResults"), Zt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1048
1048
|
}
|
|
1049
1049
|
getQuery(t, ...n) {
|
|
1050
|
-
let r =
|
|
1050
|
+
let r = W(n[0]), i = K(t), a = this.queryResults.get(Mt(i, r));
|
|
1051
1051
|
if (a !== void 0) return e.queryValue(a.result);
|
|
1052
1052
|
}
|
|
1053
1053
|
getAllQueries(t) {
|
|
@@ -1059,7 +1059,7 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1059
1059
|
return n;
|
|
1060
1060
|
}
|
|
1061
1061
|
setQuery(e, t, n) {
|
|
1062
|
-
let r =
|
|
1062
|
+
let r = W(t), i = K(e), a = Mt(i, r), o;
|
|
1063
1063
|
o = n === void 0 ? void 0 : {
|
|
1064
1064
|
success: !0,
|
|
1065
1065
|
value: n,
|
|
@@ -1225,11 +1225,11 @@ var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
|
1225
1225
|
//#endregion
|
|
1226
1226
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/protocol.js
|
|
1227
1227
|
function mn(e) {
|
|
1228
|
-
let t =
|
|
1228
|
+
let t = Re(e);
|
|
1229
1229
|
return rn.fromBytesLE(Array.from(t));
|
|
1230
1230
|
}
|
|
1231
1231
|
function hn(e) {
|
|
1232
|
-
return
|
|
1232
|
+
return Ve(new Uint8Array(e.toBytesLE()));
|
|
1233
1233
|
}
|
|
1234
1234
|
function gn(e) {
|
|
1235
1235
|
switch (e.type) {
|
|
@@ -1868,7 +1868,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
1868
1868
|
if (s === "http") c = "ws";
|
|
1869
1869
|
else if (s === "https") c = "wss";
|
|
1870
1870
|
else throw Error(`Unknown parent protocol ${s}`);
|
|
1871
|
-
let l = `${c}://${o}/api/${
|
|
1871
|
+
let l = `${c}://${o}/api/${je}/sync`;
|
|
1872
1872
|
this.state = new Lt(), this.remoteQuerySet = new pn((e) => this.state.queryPath(e), this.logger), this.requestManager = new Vt(this.logger, this.markConnectionStateDirty);
|
|
1873
1873
|
let u = () => {
|
|
1874
1874
|
this.webSocketManager.pause(), this.state.pause();
|
|
@@ -2022,7 +2022,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2022
2022
|
this.webSocketManager.sendMessage(e);
|
|
2023
2023
|
}
|
|
2024
2024
|
subscribe(e, t, n) {
|
|
2025
|
-
let r =
|
|
2025
|
+
let r = W(t), { modification: i, queryToken: a, unsubscribe: o } = this.state.subscribe(e, r, n?.journal, n?.componentPath);
|
|
2026
2026
|
return i !== null && this.webSocketManager.sendMessage(i), {
|
|
2027
2027
|
queryToken: a,
|
|
2028
2028
|
unsubscribe: () => {
|
|
@@ -2032,7 +2032,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
2034
|
localQueryResult(e, t) {
|
|
2035
|
-
let n = Mt(e,
|
|
2035
|
+
let n = Mt(e, W(t));
|
|
2036
2036
|
return this.optimisticQueryResults.queryResult(n);
|
|
2037
2037
|
}
|
|
2038
2038
|
localQueryResultByToken(e) {
|
|
@@ -2042,11 +2042,11 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2042
2042
|
return this.optimisticQueryResults.hasQueryResult(e);
|
|
2043
2043
|
}
|
|
2044
2044
|
localQueryLogs(e, t) {
|
|
2045
|
-
let n = Mt(e,
|
|
2045
|
+
let n = Mt(e, W(t));
|
|
2046
2046
|
return this.optimisticQueryResults.queryLogs(n);
|
|
2047
2047
|
}
|
|
2048
2048
|
queryJournal(e, t) {
|
|
2049
|
-
let n = Mt(e,
|
|
2049
|
+
let n = Mt(e, W(t));
|
|
2050
2050
|
return this.state.queryJournal(n);
|
|
2051
2051
|
}
|
|
2052
2052
|
connectionState() {
|
|
@@ -2078,7 +2078,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2078
2078
|
return i;
|
|
2079
2079
|
}
|
|
2080
2080
|
enqueueMutation(e, t, n, r) {
|
|
2081
|
-
let i =
|
|
2081
|
+
let i = W(t);
|
|
2082
2082
|
this.tryReportLongDisconnect();
|
|
2083
2083
|
let a = this.nextRequestId;
|
|
2084
2084
|
if (this._nextRequestId++, n !== void 0) {
|
|
@@ -2125,7 +2125,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2125
2125
|
return n.value;
|
|
2126
2126
|
}
|
|
2127
2127
|
async actionInternal(e, t, n) {
|
|
2128
|
-
let r =
|
|
2128
|
+
let r = W(t), i = this.nextRequestId;
|
|
2129
2129
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
2130
2130
|
let a = {
|
|
2131
2131
|
type: "Action",
|
|
@@ -2167,7 +2167,7 @@ var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
|
2167
2167
|
method: "POST",
|
|
2168
2168
|
headers: {
|
|
2169
2169
|
"Content-Type": "application/json",
|
|
2170
|
-
"Convex-Client": `npm-${
|
|
2170
|
+
"Convex-Client": `npm-${je}`
|
|
2171
2171
|
},
|
|
2172
2172
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
2173
2173
|
}).then((e) => {
|
|
@@ -3386,8 +3386,59 @@ function Q(...e) {
|
|
|
3386
3386
|
return e.filter(Boolean).join(" ");
|
|
3387
3387
|
}
|
|
3388
3388
|
//#endregion
|
|
3389
|
+
//#region src/runtime/use-drag.ts
|
|
3390
|
+
function na(e) {
|
|
3391
|
+
let t = B(e);
|
|
3392
|
+
t.current = e;
|
|
3393
|
+
let [n, r] = R(!1), i = B(!1);
|
|
3394
|
+
return {
|
|
3395
|
+
onPointerDown: V((e) => {
|
|
3396
|
+
let n = t.current;
|
|
3397
|
+
if (n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
3398
|
+
let a = e.currentTarget;
|
|
3399
|
+
if (!a) return;
|
|
3400
|
+
let o = (n.targetRef?.current ?? a).getBoundingClientRect(), s = e.clientX, c = e.clientY, l = o.left, u = o.top, d = o.width, f = o.height, p = n.threshold ?? 4, m = n.margin ?? 8, h = e.pointerId, g = !1, _ = null;
|
|
3401
|
+
i.current = !1;
|
|
3402
|
+
try {
|
|
3403
|
+
a.setPointerCapture(h);
|
|
3404
|
+
} catch {}
|
|
3405
|
+
function v() {
|
|
3406
|
+
try {
|
|
3407
|
+
a?.releasePointerCapture(h);
|
|
3408
|
+
} catch {}
|
|
3409
|
+
a?.removeEventListener("pointermove", y), a?.removeEventListener("pointerup", b), a?.removeEventListener("pointercancel", x), r(!1);
|
|
3410
|
+
}
|
|
3411
|
+
function y(e) {
|
|
3412
|
+
if (e.pointerId !== h) return;
|
|
3413
|
+
let n = e.clientX - s, a = e.clientY - c;
|
|
3414
|
+
if (!g) {
|
|
3415
|
+
if (Math.abs(n) + Math.abs(a) < p) return;
|
|
3416
|
+
g = !0, i.current = !0, r(!0), t.current.onStart?.();
|
|
3417
|
+
}
|
|
3418
|
+
let o = Math.max(m, window.innerWidth - d - m), v = Math.max(m, window.innerHeight - f - m), y = {
|
|
3419
|
+
left: ra(l + n, m, o),
|
|
3420
|
+
top: ra(u + a, m, v)
|
|
3421
|
+
};
|
|
3422
|
+
_ = y, t.current.onMove(y);
|
|
3423
|
+
}
|
|
3424
|
+
function b(e) {
|
|
3425
|
+
e.pointerId === h && (v(), g && _ && t.current.onEnd?.(_, e));
|
|
3426
|
+
}
|
|
3427
|
+
function x(e) {
|
|
3428
|
+
e.pointerId === h && (v(), i.current = !1, t.current.onCancel?.());
|
|
3429
|
+
}
|
|
3430
|
+
a.addEventListener("pointermove", y), a.addEventListener("pointerup", b), a.addEventListener("pointercancel", x);
|
|
3431
|
+
}, []),
|
|
3432
|
+
isDragging: n,
|
|
3433
|
+
consumeClickIfDragged: V(() => i.current ? (i.current = !1, !0) : !1, [])
|
|
3434
|
+
};
|
|
3435
|
+
}
|
|
3436
|
+
function ra(e, t, n) {
|
|
3437
|
+
return Math.max(t, Math.min(n, e));
|
|
3438
|
+
}
|
|
3439
|
+
//#endregion
|
|
3389
3440
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
3390
|
-
var
|
|
3441
|
+
var ia = 0;
|
|
3391
3442
|
Array.isArray;
|
|
3392
3443
|
function $(e, n, r, i, a, o) {
|
|
3393
3444
|
n ||= {};
|
|
@@ -3404,7 +3455,7 @@ function $(e, n, r, i, a, o) {
|
|
|
3404
3455
|
__e: null,
|
|
3405
3456
|
__c: null,
|
|
3406
3457
|
constructor: void 0,
|
|
3407
|
-
__v: --
|
|
3458
|
+
__v: --ia,
|
|
3408
3459
|
__i: -1,
|
|
3409
3460
|
__u: 0,
|
|
3410
3461
|
__source: a,
|
|
@@ -3415,7 +3466,7 @@ function $(e, n, r, i, a, o) {
|
|
|
3415
3466
|
}
|
|
3416
3467
|
//#endregion
|
|
3417
3468
|
//#region src/runtime/ui/icons.tsx
|
|
3418
|
-
function
|
|
3469
|
+
function aa({ size: e = 16 }) {
|
|
3419
3470
|
return /* @__PURE__ */ $("svg", {
|
|
3420
3471
|
width: e,
|
|
3421
3472
|
height: e,
|
|
@@ -3425,7 +3476,7 @@ function ra({ size: e = 16 }) {
|
|
|
3425
3476
|
children: /* @__PURE__ */ $("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
|
|
3426
3477
|
});
|
|
3427
3478
|
}
|
|
3428
|
-
function
|
|
3479
|
+
function oa({ size: e = 16 }) {
|
|
3429
3480
|
return /* @__PURE__ */ $("svg", {
|
|
3430
3481
|
width: e,
|
|
3431
3482
|
height: e,
|
|
@@ -3434,7 +3485,7 @@ function ia({ size: e = 16 }) {
|
|
|
3434
3485
|
children: /* @__PURE__ */ $("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
3435
3486
|
});
|
|
3436
3487
|
}
|
|
3437
|
-
function
|
|
3488
|
+
function sa({ size: e = 16 }) {
|
|
3438
3489
|
return /* @__PURE__ */ $("svg", {
|
|
3439
3490
|
width: e,
|
|
3440
3491
|
height: e,
|
|
@@ -3443,7 +3494,7 @@ function aa({ size: e = 16 }) {
|
|
|
3443
3494
|
children: /* @__PURE__ */ $("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
|
|
3444
3495
|
});
|
|
3445
3496
|
}
|
|
3446
|
-
function
|
|
3497
|
+
function ca({ size: e = 16 }) {
|
|
3447
3498
|
return /* @__PURE__ */ $("svg", {
|
|
3448
3499
|
width: e,
|
|
3449
3500
|
height: e,
|
|
@@ -3456,7 +3507,7 @@ function oa({ size: e = 16 }) {
|
|
|
3456
3507
|
})
|
|
3457
3508
|
});
|
|
3458
3509
|
}
|
|
3459
|
-
function
|
|
3510
|
+
function la({ size: e = 16 }) {
|
|
3460
3511
|
return /* @__PURE__ */ $("svg", {
|
|
3461
3512
|
width: e,
|
|
3462
3513
|
height: e,
|
|
@@ -3470,7 +3521,7 @@ function sa({ size: e = 16 }) {
|
|
|
3470
3521
|
})
|
|
3471
3522
|
});
|
|
3472
3523
|
}
|
|
3473
|
-
function
|
|
3524
|
+
function ua({ size: e = 16 }) {
|
|
3474
3525
|
return /* @__PURE__ */ $("svg", {
|
|
3475
3526
|
width: e,
|
|
3476
3527
|
height: e,
|
|
@@ -3479,7 +3530,7 @@ function ca({ size: e = 16 }) {
|
|
|
3479
3530
|
children: /* @__PURE__ */ $("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
|
|
3480
3531
|
});
|
|
3481
3532
|
}
|
|
3482
|
-
function
|
|
3533
|
+
function da({ size: e = 16 }) {
|
|
3483
3534
|
return /* @__PURE__ */ $("svg", {
|
|
3484
3535
|
width: e,
|
|
3485
3536
|
height: e,
|
|
@@ -3491,85 +3542,48 @@ function la({ size: e = 16 }) {
|
|
|
3491
3542
|
}
|
|
3492
3543
|
//#endregion
|
|
3493
3544
|
//#region src/runtime/ui/fab.tsx
|
|
3494
|
-
function
|
|
3495
|
-
let a = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", o =
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
if (
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
if (Math.abs(n) + Math.abs(r) < 4) return;
|
|
3510
|
-
g = !0, d.current = !0, u(!0);
|
|
3511
|
-
}
|
|
3512
|
-
let i = Math.max(8, window.innerWidth - m - 8), a = Math.max(8, window.innerHeight - h - 8);
|
|
3513
|
-
c({
|
|
3514
|
-
left: da(f + n, 8, i),
|
|
3515
|
-
top: da(p + r, 8, a)
|
|
3516
|
-
});
|
|
3517
|
-
}
|
|
3518
|
-
function v(e) {
|
|
3519
|
-
try {
|
|
3520
|
-
n.releasePointerCapture(e.pointerId);
|
|
3521
|
-
} catch {}
|
|
3522
|
-
n.removeEventListener("pointermove", _), n.removeEventListener("pointerup", y), n.removeEventListener("pointercancel", b), c(null), u(!1);
|
|
3523
|
-
}
|
|
3524
|
-
function y(t) {
|
|
3525
|
-
if (t.pointerId === e.pointerId && (v(t), g)) {
|
|
3526
|
-
let e = t.clientX < window.innerWidth / 2 ? "bottom-left" : "bottom-right";
|
|
3527
|
-
e !== r && i?.(e);
|
|
3545
|
+
function fa({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i }) {
|
|
3546
|
+
let a = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", [o, s] = R(null), { onPointerDown: c, isDragging: l, consumeClickIfDragged: u } = na({
|
|
3547
|
+
stopPropagation: !0,
|
|
3548
|
+
onMove: s,
|
|
3549
|
+
onEnd: (e, t) => {
|
|
3550
|
+
let n = t.clientX < window.innerWidth / 2 ? "bottom-left" : "bottom-right";
|
|
3551
|
+
n !== r && i?.(n), s(null);
|
|
3552
|
+
},
|
|
3553
|
+
onCancel: () => s(null)
|
|
3554
|
+
});
|
|
3555
|
+
function d(e) {
|
|
3556
|
+
if (e.preventDefault(), e.stopPropagation(), !u()) {
|
|
3557
|
+
if ((e.metaKey || e.ctrlKey) && n) {
|
|
3558
|
+
n();
|
|
3559
|
+
return;
|
|
3528
3560
|
}
|
|
3561
|
+
t();
|
|
3529
3562
|
}
|
|
3530
|
-
function b(t) {
|
|
3531
|
-
t.pointerId === e.pointerId && (v(t), d.current = !1);
|
|
3532
|
-
}
|
|
3533
|
-
n.addEventListener("pointermove", _), n.addEventListener("pointerup", y), n.addEventListener("pointercancel", b);
|
|
3534
|
-
}
|
|
3535
|
-
function p(e) {
|
|
3536
|
-
if (e.preventDefault(), e.stopPropagation(), d.current) {
|
|
3537
|
-
d.current = !1;
|
|
3538
|
-
return;
|
|
3539
|
-
}
|
|
3540
|
-
if ((e.metaKey || e.ctrlKey) && n) {
|
|
3541
|
-
n();
|
|
3542
|
-
return;
|
|
3543
|
-
}
|
|
3544
|
-
t();
|
|
3545
3563
|
}
|
|
3546
3564
|
return /* @__PURE__ */ $("button", {
|
|
3547
|
-
ref: o,
|
|
3548
3565
|
type: "button",
|
|
3549
|
-
class: Q("markup-fab", !
|
|
3550
|
-
style:
|
|
3551
|
-
left: `${
|
|
3552
|
-
top: `${
|
|
3566
|
+
class: Q("markup-fab", !o && a, o && "is-floating", l && "is-dragging", e && "is-active"),
|
|
3567
|
+
style: o ? {
|
|
3568
|
+
left: `${o.left}px`,
|
|
3569
|
+
top: `${o.top}px`
|
|
3553
3570
|
} : void 0,
|
|
3554
|
-
onClick:
|
|
3555
|
-
onPointerDown:
|
|
3571
|
+
onClick: d,
|
|
3572
|
+
onPointerDown: c,
|
|
3556
3573
|
"aria-label": e ? "Cancel placing markup" : "Leave a markup",
|
|
3557
3574
|
"aria-pressed": e,
|
|
3558
3575
|
children: [/* @__PURE__ */ $("span", {
|
|
3559
3576
|
class: "markup-fab-icon",
|
|
3560
|
-
children: $(e ?
|
|
3577
|
+
children: $(e ? oa : aa, { size: 16 })
|
|
3561
3578
|
}), /* @__PURE__ */ $("span", {
|
|
3562
3579
|
class: "markup-fab-label",
|
|
3563
3580
|
children: e ? "Cancel" : "Markup"
|
|
3564
3581
|
})]
|
|
3565
3582
|
});
|
|
3566
3583
|
}
|
|
3567
|
-
function da(e, t, n) {
|
|
3568
|
-
return Math.max(t, Math.min(n, e));
|
|
3569
|
-
}
|
|
3570
3584
|
//#endregion
|
|
3571
3585
|
//#region src/runtime/use-focus-trap.ts
|
|
3572
|
-
var
|
|
3586
|
+
var pa = [
|
|
3573
3587
|
"a[href]",
|
|
3574
3588
|
"button:not([disabled])",
|
|
3575
3589
|
"input:not([disabled])",
|
|
@@ -3577,14 +3591,14 @@ var fa = [
|
|
|
3577
3591
|
"textarea:not([disabled])",
|
|
3578
3592
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
3579
3593
|
].join(",");
|
|
3580
|
-
function
|
|
3581
|
-
|
|
3594
|
+
function ma(e, t) {
|
|
3595
|
+
z(() => {
|
|
3582
3596
|
if (!t) return;
|
|
3583
3597
|
let n = e.current;
|
|
3584
3598
|
if (!n) return;
|
|
3585
3599
|
function r(e) {
|
|
3586
3600
|
if (e.key !== "Tab") return;
|
|
3587
|
-
let t = Array.from(n.querySelectorAll(
|
|
3601
|
+
let t = Array.from(n.querySelectorAll(pa)), r = t[0], i = t[t.length - 1];
|
|
3588
3602
|
if (!r || !i) return;
|
|
3589
3603
|
let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
|
|
3590
3604
|
(e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
|
|
@@ -3594,9 +3608,9 @@ function pa(e, t) {
|
|
|
3594
3608
|
}
|
|
3595
3609
|
//#endregion
|
|
3596
3610
|
//#region src/runtime/ui/author-prompt.tsx
|
|
3597
|
-
function
|
|
3598
|
-
let [o, s] =
|
|
3599
|
-
|
|
3611
|
+
function ha({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
|
|
3612
|
+
let [o, s] = R(""), [c, l] = R(""), u = B(null);
|
|
3613
|
+
z(() => {
|
|
3600
3614
|
u.current?.focus();
|
|
3601
3615
|
}, []);
|
|
3602
3616
|
function d(n) {
|
|
@@ -3673,18 +3687,18 @@ function ma({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3673
3687
|
}
|
|
3674
3688
|
//#endregion
|
|
3675
3689
|
//#region src/runtime/ui/composer.tsx
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3678
|
-
let [s, c] =
|
|
3679
|
-
|
|
3690
|
+
var ga = 4e3;
|
|
3691
|
+
function _a({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, pending: i, error: a, onSubmit: o }) {
|
|
3692
|
+
let [s, c] = R(""), l = B(null), u = B(!1);
|
|
3693
|
+
z(() => {
|
|
3680
3694
|
r && l.current?.focus();
|
|
3681
|
-
}, [r]),
|
|
3695
|
+
}, [r]), z(() => {
|
|
3682
3696
|
let e = l.current;
|
|
3683
3697
|
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
|
|
3684
|
-
}, [s]),
|
|
3698
|
+
}, [s]), z(() => {
|
|
3685
3699
|
u.current && !i && !a && (c(""), l.current?.focus()), u.current = i;
|
|
3686
3700
|
}, [i, a]);
|
|
3687
|
-
let d =
|
|
3701
|
+
let d = ga - s.length, f = d < 0;
|
|
3688
3702
|
function p(e) {
|
|
3689
3703
|
e?.preventDefault();
|
|
3690
3704
|
let t = s.trim();
|
|
@@ -3702,7 +3716,7 @@ function ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3702
3716
|
"aria-label": i ? "Sending…" : n,
|
|
3703
3717
|
title: i ? "Sending…" : n,
|
|
3704
3718
|
tabIndex: e,
|
|
3705
|
-
children: /* @__PURE__ */ $(
|
|
3719
|
+
children: /* @__PURE__ */ $(ua, { size: 14 })
|
|
3706
3720
|
});
|
|
3707
3721
|
}
|
|
3708
3722
|
return /* @__PURE__ */ $("form", {
|
|
@@ -3715,7 +3729,7 @@ function ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3715
3729
|
class: "markup-composer-input",
|
|
3716
3730
|
placeholder: t,
|
|
3717
3731
|
rows: h ? 2 : 1,
|
|
3718
|
-
maxLength:
|
|
3732
|
+
maxLength: ga + 100,
|
|
3719
3733
|
value: s,
|
|
3720
3734
|
onInput: (e) => c(e.currentTarget.value),
|
|
3721
3735
|
onKeyDown: m,
|
|
@@ -3751,18 +3765,22 @@ function ga({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3751
3765
|
}
|
|
3752
3766
|
//#endregion
|
|
3753
3767
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
3754
|
-
function
|
|
3755
|
-
let m =
|
|
3756
|
-
|
|
3757
|
-
let [h, g] =
|
|
3758
|
-
|
|
3768
|
+
function va({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolving: i, signingIn: a, pending: o, error: s, screenshot: c, screenshotCapturing: l, onAuthor: u, onSignIn: d, onSubmit: f, onClose: p }) {
|
|
3769
|
+
let m = B(null);
|
|
3770
|
+
ma(m, !0);
|
|
3771
|
+
let [h, g] = R(!1), [_, v] = R(null), [y, b] = R(null), { onPointerDown: x, isDragging: S } = na({
|
|
3772
|
+
targetRef: m,
|
|
3773
|
+
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
3774
|
+
onMove: b
|
|
3775
|
+
});
|
|
3776
|
+
z(() => {
|
|
3759
3777
|
if (!c) {
|
|
3760
3778
|
v(null);
|
|
3761
3779
|
return;
|
|
3762
3780
|
}
|
|
3763
3781
|
let e = URL.createObjectURL(c);
|
|
3764
3782
|
return v(e), () => URL.revokeObjectURL(e);
|
|
3765
|
-
}, [c]),
|
|
3783
|
+
}, [c]), z(() => {
|
|
3766
3784
|
let e = m.current;
|
|
3767
3785
|
if (!e) return;
|
|
3768
3786
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
@@ -3773,41 +3791,10 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3773
3791
|
}
|
|
3774
3792
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3775
3793
|
}, [p]);
|
|
3776
|
-
let C =
|
|
3777
|
-
function D(e) {
|
|
3778
|
-
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
3779
|
-
let t = m.current;
|
|
3780
|
-
if (!t) return;
|
|
3781
|
-
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
3782
|
-
try {
|
|
3783
|
-
l.setPointerCapture(e.pointerId);
|
|
3784
|
-
} catch {}
|
|
3785
|
-
function d(t) {
|
|
3786
|
-
if (t.pointerId !== e.pointerId) return;
|
|
3787
|
-
let n = t.clientX - r, l = t.clientY - i;
|
|
3788
|
-
if (!u) {
|
|
3789
|
-
if (Math.abs(n) + Math.abs(l) < 4) return;
|
|
3790
|
-
u = !0, S(!0);
|
|
3791
|
-
}
|
|
3792
|
-
let d = Math.max(8, window.innerWidth - s - 8), f = Math.max(8, window.innerHeight - c - 8);
|
|
3793
|
-
b({
|
|
3794
|
-
left: va(a + n, 8, d),
|
|
3795
|
-
top: va(o + l, 8, f)
|
|
3796
|
-
});
|
|
3797
|
-
}
|
|
3798
|
-
function f(t) {
|
|
3799
|
-
if (t.pointerId === e.pointerId) {
|
|
3800
|
-
try {
|
|
3801
|
-
l.releasePointerCapture(t.pointerId);
|
|
3802
|
-
} catch {}
|
|
3803
|
-
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f), S(!1);
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
|
-
l.addEventListener("pointermove", d), l.addEventListener("pointerup", f), l.addEventListener("pointercancel", f);
|
|
3807
|
-
}
|
|
3794
|
+
let C = ya(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), w = ya(t - window.scrollY - 16, 12, window.innerHeight - 220), T = c != null, E = l || T;
|
|
3808
3795
|
return /* @__PURE__ */ $("div", {
|
|
3809
3796
|
ref: m,
|
|
3810
|
-
class: Q("markup-popover", y && "is-floating",
|
|
3797
|
+
class: Q("markup-popover", y && "is-floating", S && "is-dragging"),
|
|
3811
3798
|
popover: "auto",
|
|
3812
3799
|
style: {
|
|
3813
3800
|
"--markup-pop-x": `${y?.left ?? C}px`,
|
|
@@ -3817,7 +3804,7 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3817
3804
|
"aria-label": "New markup",
|
|
3818
3805
|
children: [/* @__PURE__ */ $("header", {
|
|
3819
3806
|
class: "markup-popover-header",
|
|
3820
|
-
onPointerDown:
|
|
3807
|
+
onPointerDown: x,
|
|
3821
3808
|
children: [/* @__PURE__ */ $("span", {
|
|
3822
3809
|
class: "markup-eyebrow",
|
|
3823
3810
|
children: "new · markup"
|
|
@@ -3826,9 +3813,9 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3826
3813
|
class: "markup-icon-btn",
|
|
3827
3814
|
"aria-label": "Discard pin",
|
|
3828
3815
|
onClick: p,
|
|
3829
|
-
children: /* @__PURE__ */ $(
|
|
3816
|
+
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
3830
3817
|
})]
|
|
3831
|
-
}), n == null ? /* @__PURE__ */ $(
|
|
3818
|
+
}), n == null ? /* @__PURE__ */ $(ha, {
|
|
3832
3819
|
pending: o,
|
|
3833
3820
|
connecting: i,
|
|
3834
3821
|
signingIn: a,
|
|
@@ -3852,7 +3839,7 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3852
3839
|
}) : null
|
|
3853
3840
|
]
|
|
3854
3841
|
}),
|
|
3855
|
-
/* @__PURE__ */ $(
|
|
3842
|
+
/* @__PURE__ */ $(_a, {
|
|
3856
3843
|
label: "Feedback",
|
|
3857
3844
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
3858
3845
|
submitLabel: "Post markup",
|
|
@@ -3870,7 +3857,7 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3870
3857
|
class: "markup-screenshot-checkbox",
|
|
3871
3858
|
disabled: !0
|
|
3872
3859
|
}),
|
|
3873
|
-
/* @__PURE__ */ $(
|
|
3860
|
+
/* @__PURE__ */ $(la, { size: 12 }),
|
|
3874
3861
|
/* @__PURE__ */ $("span", { children: "Capturing…" })
|
|
3875
3862
|
]
|
|
3876
3863
|
}) : /* @__PURE__ */ $("label", {
|
|
@@ -3882,7 +3869,7 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3882
3869
|
checked: h,
|
|
3883
3870
|
onChange: (e) => g(e.currentTarget.checked)
|
|
3884
3871
|
}),
|
|
3885
|
-
/* @__PURE__ */ $(
|
|
3872
|
+
/* @__PURE__ */ $(la, { size: 12 }),
|
|
3886
3873
|
/* @__PURE__ */ $("span", { children: "Attach screenshot" }),
|
|
3887
3874
|
_ && h ? /* @__PURE__ */ $("img", {
|
|
3888
3875
|
class: "markup-screenshot-thumb",
|
|
@@ -3896,12 +3883,12 @@ function _a({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3896
3883
|
})]
|
|
3897
3884
|
});
|
|
3898
3885
|
}
|
|
3899
|
-
function
|
|
3886
|
+
function ya(e, t, n) {
|
|
3900
3887
|
return Math.max(t, Math.min(n, e));
|
|
3901
3888
|
}
|
|
3902
3889
|
//#endregion
|
|
3903
3890
|
//#region src/runtime/ui/pin.tsx
|
|
3904
|
-
function
|
|
3891
|
+
function ba({ pageX: e, pageY: t, count: n, active: r, onClick: i }) {
|
|
3905
3892
|
let a = t - window.scrollY, o = e - window.scrollX;
|
|
3906
3893
|
return /* @__PURE__ */ $("button", {
|
|
3907
3894
|
type: "button",
|
|
@@ -3924,7 +3911,7 @@ function ya({ pageX: e, pageY: t, count: n, active: r, onClick: i }) {
|
|
|
3924
3911
|
}) : null]
|
|
3925
3912
|
});
|
|
3926
3913
|
}
|
|
3927
|
-
function
|
|
3914
|
+
function xa({ pageX: e, pageY: t }) {
|
|
3928
3915
|
let n = t - window.scrollY, r = e - window.scrollX;
|
|
3929
3916
|
return /* @__PURE__ */ $("div", {
|
|
3930
3917
|
class: "markup-pin markup-pin-ghost is-anchor",
|
|
@@ -3940,8 +3927,8 @@ function ba({ pageX: e, pageY: t }) {
|
|
|
3940
3927
|
}
|
|
3941
3928
|
//#endregion
|
|
3942
3929
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
3943
|
-
function
|
|
3944
|
-
|
|
3930
|
+
function Sa({ onPlace: e, onCancel: t }) {
|
|
3931
|
+
z(() => {
|
|
3945
3932
|
function e(e) {
|
|
3946
3933
|
e.key === "Escape" && t();
|
|
3947
3934
|
}
|
|
@@ -3966,7 +3953,7 @@ function xa({ onPlace: e, onCancel: t }) {
|
|
|
3966
3953
|
}
|
|
3967
3954
|
//#endregion
|
|
3968
3955
|
//#region src/runtime/ui/thread-popover.tsx
|
|
3969
|
-
var
|
|
3956
|
+
var Ca = [
|
|
3970
3957
|
"👍",
|
|
3971
3958
|
"❤️",
|
|
3972
3959
|
"🎉",
|
|
@@ -3974,56 +3961,37 @@ var Sa = [
|
|
|
3974
3961
|
"😄",
|
|
3975
3962
|
"❓"
|
|
3976
3963
|
];
|
|
3977
|
-
function
|
|
3978
|
-
let y =
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
let
|
|
3964
|
+
function wa({ thread: e, authorName: t, currentClientId: n, isVerified: r, identityResolving: i, signingIn: a, canDelete: o, pending: s, error: c, hidden: l = !1, onAuthor: u, onSignIn: d, onClose: f, onReply: p, onEditComment: m, onDeleteComment: h, onToggleReaction: g, onResolve: _, onDelete: v }) {
|
|
3965
|
+
let y = B(null), b = B(null), x = B(null), S = B(null), [C, w] = R({ kind: "none" }), [T, E] = R(null), { onPointerDown: D, isDragging: O } = na({
|
|
3966
|
+
targetRef: y,
|
|
3967
|
+
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
3968
|
+
onMove: E
|
|
3969
|
+
});
|
|
3970
|
+
ma(y, !0);
|
|
3971
|
+
let k = e.resolvedAt != null, A = Ce(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
3972
|
+
z(() => {
|
|
3973
|
+
if (C.kind === "none" || C.kind === "editing") return;
|
|
3974
|
+
function e(e) {
|
|
3975
|
+
let t = S.current;
|
|
3976
|
+
t && !e.composedPath().includes(t) && w({ kind: "none" });
|
|
3977
|
+
}
|
|
3978
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
3979
|
+
}, [C.kind]), z(() => {
|
|
3980
|
+
if (C.kind !== "editing") return;
|
|
3981
|
+
let t = e.comments.find((e) => e._id === C.commentId);
|
|
3982
|
+
(!t || t.deleted) && w({ kind: "none" });
|
|
3983
|
+
}, [e.comments, C]);
|
|
3984
|
+
let j = B(!0);
|
|
3985
|
+
z(() => {
|
|
3986
|
+
let e = b.current;
|
|
3995
3987
|
if (e) {
|
|
3996
|
-
if (
|
|
3997
|
-
|
|
3988
|
+
if (j.current) {
|
|
3989
|
+
j.current = !1, e.scrollTop = e.scrollHeight;
|
|
3998
3990
|
return;
|
|
3999
3991
|
}
|
|
4000
3992
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
4001
3993
|
}
|
|
4002
|
-
}, [
|
|
4003
|
-
if (!w) {
|
|
4004
|
-
D(!1);
|
|
4005
|
-
return;
|
|
4006
|
-
}
|
|
4007
|
-
function e(e) {
|
|
4008
|
-
b.current && !e.composedPath().includes(b.current) && T(!1);
|
|
4009
|
-
}
|
|
4010
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4011
|
-
}, [w]), B(() => {
|
|
4012
|
-
if (!j) {
|
|
4013
|
-
re(null);
|
|
4014
|
-
return;
|
|
4015
|
-
}
|
|
4016
|
-
function e(e) {
|
|
4017
|
-
x.current && !e.composedPath().includes(x.current) && M(null);
|
|
4018
|
-
}
|
|
4019
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4020
|
-
}, [j]), B(() => {
|
|
4021
|
-
if (!ie) return;
|
|
4022
|
-
function e(e) {
|
|
4023
|
-
se.current && !e.composedPath().includes(se.current) && P(null);
|
|
4024
|
-
}
|
|
4025
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4026
|
-
}, [ie]), B(() => {
|
|
3994
|
+
}, [A.length]), z(() => {
|
|
4027
3995
|
let e = y.current;
|
|
4028
3996
|
if (!e) return;
|
|
4029
3997
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
@@ -4034,46 +4002,15 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4034
4002
|
}
|
|
4035
4003
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
4036
4004
|
}, [f]);
|
|
4037
|
-
|
|
4038
|
-
if (e.button !== 0 || e.target?.closest("button, a, input, textarea, select")) return;
|
|
4039
|
-
let t = y.current;
|
|
4040
|
-
if (!t) return;
|
|
4041
|
-
let n = t.getBoundingClientRect(), r = e.clientX, i = e.clientY, a = n.left, o = n.top, s = n.width, c = n.height, l = e.currentTarget, u = !1;
|
|
4042
|
-
try {
|
|
4043
|
-
l.setPointerCapture(e.pointerId);
|
|
4044
|
-
} catch {}
|
|
4045
|
-
function d(t) {
|
|
4046
|
-
if (t.pointerId !== e.pointerId) return;
|
|
4047
|
-
let n = t.clientX - r, l = t.clientY - i;
|
|
4048
|
-
if (!u) {
|
|
4049
|
-
if (Math.abs(n) + Math.abs(l) < 4) return;
|
|
4050
|
-
u = !0, F(!0);
|
|
4051
|
-
}
|
|
4052
|
-
let d = Math.max(8, window.innerWidth - s - 8), f = Math.max(8, window.innerHeight - c - 8);
|
|
4053
|
-
le({
|
|
4054
|
-
left: Da(a + n, 8, d),
|
|
4055
|
-
top: Da(o + l, 8, f)
|
|
4056
|
-
});
|
|
4057
|
-
}
|
|
4058
|
-
function f(t) {
|
|
4059
|
-
if (t.pointerId === e.pointerId) {
|
|
4060
|
-
try {
|
|
4061
|
-
l.releasePointerCapture(t.pointerId);
|
|
4062
|
-
} catch {}
|
|
4063
|
-
l.removeEventListener("pointermove", d), l.removeEventListener("pointerup", f), l.removeEventListener("pointercancel", f), F(!1);
|
|
4064
|
-
}
|
|
4065
|
-
}
|
|
4066
|
-
l.addEventListener("pointermove", d), l.addEventListener("pointerup", f), l.addEventListener("pointercancel", f);
|
|
4067
|
-
}
|
|
4068
|
-
let me = Se(() => {
|
|
4005
|
+
let M = Ce(() => {
|
|
4069
4006
|
let t = Tr({
|
|
4070
4007
|
anchorX: e.anchorX,
|
|
4071
4008
|
anchorY: e.anchorY,
|
|
4072
4009
|
anchorSelector: e.anchorSelector
|
|
4073
4010
|
});
|
|
4074
4011
|
return {
|
|
4075
|
-
left:
|
|
4076
|
-
top:
|
|
4012
|
+
left: Oa(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
|
|
4013
|
+
top: Oa(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
|
|
4077
4014
|
};
|
|
4078
4015
|
}, [
|
|
4079
4016
|
e.anchorX,
|
|
@@ -4083,11 +4020,11 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4083
4020
|
return /* @__PURE__ */ $("div", {
|
|
4084
4021
|
ref: y,
|
|
4085
4022
|
id: "markup-thread-popover",
|
|
4086
|
-
class: Q("markup-popover",
|
|
4023
|
+
class: Q("markup-popover", T && "is-floating", O && "is-dragging", l && "is-hud-hidden"),
|
|
4087
4024
|
popover: "auto",
|
|
4088
4025
|
style: {
|
|
4089
|
-
"--markup-pop-x": `${
|
|
4090
|
-
"--markup-pop-y": `${
|
|
4026
|
+
"--markup-pop-x": `${T?.left ?? M.left}px`,
|
|
4027
|
+
"--markup-pop-y": `${T?.top ?? M.top}px`
|
|
4091
4028
|
},
|
|
4092
4029
|
role: "dialog",
|
|
4093
4030
|
"aria-label": "Markup thread",
|
|
@@ -4095,45 +4032,55 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4095
4032
|
children: [
|
|
4096
4033
|
/* @__PURE__ */ $("header", {
|
|
4097
4034
|
class: "markup-popover-header",
|
|
4098
|
-
onPointerDown:
|
|
4035
|
+
onPointerDown: D,
|
|
4099
4036
|
children: [/* @__PURE__ */ $("span", {
|
|
4100
4037
|
class: "markup-eyebrow",
|
|
4101
4038
|
children: [
|
|
4102
4039
|
"thread · ",
|
|
4103
|
-
|
|
4040
|
+
A.length,
|
|
4104
4041
|
" ",
|
|
4105
|
-
|
|
4042
|
+
A.length === 1 ? "comment" : "comments"
|
|
4106
4043
|
]
|
|
4107
4044
|
}), /* @__PURE__ */ $("div", {
|
|
4108
4045
|
class: "markup-popover-header-actions",
|
|
4109
4046
|
children: [
|
|
4110
4047
|
/* @__PURE__ */ $("div", {
|
|
4111
4048
|
class: "markup-thread-menu",
|
|
4112
|
-
ref:
|
|
4049
|
+
ref: (e) => {
|
|
4050
|
+
C.kind === "thread-menu" && (S.current = e);
|
|
4051
|
+
},
|
|
4113
4052
|
children: [/* @__PURE__ */ $("button", {
|
|
4114
4053
|
type: "button",
|
|
4115
|
-
class: Q("markup-icon-btn",
|
|
4054
|
+
class: Q("markup-icon-btn", C.kind === "thread-menu" && "is-open"),
|
|
4116
4055
|
title: "More options",
|
|
4117
|
-
onClick: () =>
|
|
4118
|
-
|
|
4119
|
-
|
|
4056
|
+
onClick: () => {
|
|
4057
|
+
w(C.kind === "thread-menu" ? { kind: "none" } : {
|
|
4058
|
+
kind: "thread-menu",
|
|
4059
|
+
confirmDelete: !1
|
|
4060
|
+
});
|
|
4061
|
+
},
|
|
4062
|
+
children: /* @__PURE__ */ $(sa, { size: 16 })
|
|
4063
|
+
}), C.kind === "thread-menu" ? /* @__PURE__ */ $("div", {
|
|
4120
4064
|
class: "markup-thread-menu-list",
|
|
4121
4065
|
children: [/* @__PURE__ */ $("button", {
|
|
4122
4066
|
type: "button",
|
|
4123
4067
|
class: "markup-thread-menu-item",
|
|
4124
4068
|
onClick: () => {
|
|
4125
4069
|
let t = new URL(e.url);
|
|
4126
|
-
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}),
|
|
4070
|
+
t.hash = `markup-thread=${e._id}`, navigator.clipboard.writeText(t.toString()).catch(() => {}), w({ kind: "none" });
|
|
4127
4071
|
},
|
|
4128
4072
|
children: "Copy link"
|
|
4129
4073
|
}), o ? /* @__PURE__ */ $("button", {
|
|
4130
4074
|
type: "button",
|
|
4131
|
-
class: Q("markup-thread-menu-item",
|
|
4075
|
+
class: Q("markup-thread-menu-item", C.confirmDelete && "is-danger"),
|
|
4132
4076
|
disabled: s,
|
|
4133
4077
|
onClick: () => {
|
|
4134
|
-
|
|
4078
|
+
C.kind === "thread-menu" && (C.confirmDelete ? (w({ kind: "none" }), v()) : w({
|
|
4079
|
+
...C,
|
|
4080
|
+
confirmDelete: !0
|
|
4081
|
+
}));
|
|
4135
4082
|
},
|
|
4136
|
-
children:
|
|
4083
|
+
children: C.confirmDelete ? "Confirm delete" : "Delete thread…"
|
|
4137
4084
|
}) : null]
|
|
4138
4085
|
}) : null]
|
|
4139
4086
|
}),
|
|
@@ -4143,23 +4090,23 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4143
4090
|
title: "Mark as resolved",
|
|
4144
4091
|
disabled: s,
|
|
4145
4092
|
onClick: _,
|
|
4146
|
-
children: /* @__PURE__ */ $(
|
|
4093
|
+
children: /* @__PURE__ */ $(ca, { size: 16 })
|
|
4147
4094
|
}) : null,
|
|
4148
4095
|
/* @__PURE__ */ $("button", {
|
|
4149
4096
|
type: "button",
|
|
4150
4097
|
class: "markup-icon-btn",
|
|
4151
4098
|
title: "Close thread",
|
|
4152
4099
|
onClick: f,
|
|
4153
|
-
children: /* @__PURE__ */ $(
|
|
4100
|
+
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
4154
4101
|
})
|
|
4155
4102
|
]
|
|
4156
4103
|
})]
|
|
4157
4104
|
}),
|
|
4158
4105
|
/* @__PURE__ */ $("ol", {
|
|
4159
|
-
ref:
|
|
4106
|
+
ref: b,
|
|
4160
4107
|
class: "markup-comments",
|
|
4161
|
-
children:
|
|
4162
|
-
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !
|
|
4108
|
+
children: A.map((t, r) => {
|
|
4109
|
+
let i = !t.fromDashboard && n != null && t.authorClientId === n, a = r === 0, o = i && !k && !t.deleted, c = i && !k && !t.deleted && !a, l = C.kind === "editing" && C.commentId === t._id, u = (o || c) && !l && !t.deleted, d = C.kind === "comment-menu" && C.commentId === t._id, f = d && C.confirmDelete, p = C.kind === "reaction-picker" && C.commentId === t._id, _ = p ? C.direction : "down", v = d ? C.direction : "down";
|
|
4163
4110
|
return /* @__PURE__ */ $("li", {
|
|
4164
4111
|
class: Q("markup-comment", t.fromDashboard && "is-team"),
|
|
4165
4112
|
children: [
|
|
@@ -4177,61 +4124,77 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4177
4124
|
/* @__PURE__ */ $("time", {
|
|
4178
4125
|
class: "markup-comment-time",
|
|
4179
4126
|
datetime: new Date(t.createdAt).toISOString(),
|
|
4180
|
-
title:
|
|
4181
|
-
children:
|
|
4127
|
+
title: Aa(t.createdAt),
|
|
4128
|
+
children: ka(t.createdAt)
|
|
4182
4129
|
}),
|
|
4183
4130
|
/* @__PURE__ */ $("div", {
|
|
4184
4131
|
class: "markup-thread-actions",
|
|
4185
|
-
children: [!
|
|
4132
|
+
children: [!k && !l ? /* @__PURE__ */ $(Ta, {
|
|
4186
4133
|
comment: t,
|
|
4187
|
-
pickerOpen:
|
|
4188
|
-
pickerDirection:
|
|
4134
|
+
pickerOpen: p,
|
|
4135
|
+
pickerDirection: _,
|
|
4189
4136
|
pickerRef: (e) => {
|
|
4190
|
-
|
|
4137
|
+
p && (S.current = e);
|
|
4191
4138
|
},
|
|
4192
4139
|
onPickerClick: (e) => {
|
|
4193
|
-
if (
|
|
4194
|
-
|
|
4140
|
+
if (p) {
|
|
4141
|
+
w({ kind: "none" });
|
|
4195
4142
|
return;
|
|
4196
4143
|
}
|
|
4197
|
-
let n = e.currentTarget.getBoundingClientRect(), r =
|
|
4198
|
-
|
|
4144
|
+
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect(), i = r ? r.bottom - n.bottom : Infinity;
|
|
4145
|
+
w({
|
|
4146
|
+
kind: "reaction-picker",
|
|
4147
|
+
commentId: t._id,
|
|
4148
|
+
direction: i < 44 ? "up" : "down"
|
|
4149
|
+
});
|
|
4199
4150
|
},
|
|
4200
4151
|
onPickerSelect: (e) => {
|
|
4201
|
-
|
|
4152
|
+
w({ kind: "none" }), g(t._id, e);
|
|
4202
4153
|
}
|
|
4203
4154
|
}) : null, u ? /* @__PURE__ */ $("div", {
|
|
4204
|
-
class: Q("markup-thread-menu markup-comment-menu", d && "is-open", d &&
|
|
4155
|
+
class: Q("markup-thread-menu markup-comment-menu", d && "is-open", d && v === "up" && "is-up"),
|
|
4205
4156
|
ref: (e) => {
|
|
4206
|
-
d && (
|
|
4157
|
+
d && (S.current = e);
|
|
4207
4158
|
},
|
|
4208
4159
|
children: [/* @__PURE__ */ $("button", {
|
|
4209
4160
|
type: "button",
|
|
4210
4161
|
class: Q("markup-icon-btn", d && "is-open"),
|
|
4211
4162
|
title: "More options",
|
|
4212
4163
|
onClick: (e) => {
|
|
4213
|
-
if (
|
|
4214
|
-
|
|
4164
|
+
if (d) {
|
|
4165
|
+
w({ kind: "none" });
|
|
4215
4166
|
return;
|
|
4216
4167
|
}
|
|
4217
|
-
let n = e.currentTarget.getBoundingClientRect(), r =
|
|
4218
|
-
|
|
4168
|
+
let n = e.currentTarget.getBoundingClientRect(), r = b.current?.getBoundingClientRect(), i = (+!!o + +!!c) * 32 + 8 + 6, a = r ? r.bottom - n.bottom : Infinity;
|
|
4169
|
+
w({
|
|
4170
|
+
kind: "comment-menu",
|
|
4171
|
+
commentId: t._id,
|
|
4172
|
+
direction: a < i ? "up" : "down",
|
|
4173
|
+
confirmDelete: !1
|
|
4174
|
+
});
|
|
4219
4175
|
},
|
|
4220
|
-
children: /* @__PURE__ */ $(
|
|
4176
|
+
children: /* @__PURE__ */ $(sa, { size: 16 })
|
|
4221
4177
|
}), d ? /* @__PURE__ */ $("div", {
|
|
4222
4178
|
class: "markup-thread-menu-list",
|
|
4223
4179
|
children: [o ? /* @__PURE__ */ $("button", {
|
|
4224
4180
|
type: "button",
|
|
4225
4181
|
class: "markup-thread-menu-item",
|
|
4226
4182
|
onClick: () => {
|
|
4227
|
-
|
|
4183
|
+
w({
|
|
4184
|
+
kind: "editing",
|
|
4185
|
+
commentId: t._id,
|
|
4186
|
+
draft: t.body
|
|
4187
|
+
});
|
|
4228
4188
|
},
|
|
4229
4189
|
children: "Edit"
|
|
4230
4190
|
}) : null, c ? /* @__PURE__ */ $("button", {
|
|
4231
4191
|
type: "button",
|
|
4232
4192
|
class: Q("markup-thread-menu-item", f && "is-danger"),
|
|
4233
4193
|
onClick: () => {
|
|
4234
|
-
|
|
4194
|
+
C.kind === "comment-menu" && (C.confirmDelete ? (w({ kind: "none" }), h(t._id)) : w({
|
|
4195
|
+
...C,
|
|
4196
|
+
confirmDelete: !0
|
|
4197
|
+
}));
|
|
4235
4198
|
},
|
|
4236
4199
|
children: f ? "Confirm delete" : "Delete…"
|
|
4237
4200
|
}) : null]
|
|
@@ -4240,23 +4203,29 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4240
4203
|
})
|
|
4241
4204
|
]
|
|
4242
4205
|
}),
|
|
4243
|
-
l ? /* @__PURE__ */ $("form", {
|
|
4206
|
+
l && C.kind === "editing" ? /* @__PURE__ */ $("form", {
|
|
4244
4207
|
class: "markup-comment-edit-form",
|
|
4245
4208
|
onSubmit: async (e) => {
|
|
4246
|
-
e.preventDefault();
|
|
4247
|
-
let n =
|
|
4209
|
+
if (e.preventDefault(), C.kind !== "editing") return;
|
|
4210
|
+
let n = C.draft.trim();
|
|
4248
4211
|
if (!n || n === t.body) {
|
|
4249
|
-
|
|
4212
|
+
w({ kind: "none" });
|
|
4250
4213
|
return;
|
|
4251
4214
|
}
|
|
4252
4215
|
try {
|
|
4253
|
-
await m(t._id, n),
|
|
4216
|
+
await m(t._id, n), w({ kind: "none" });
|
|
4254
4217
|
} catch {}
|
|
4255
4218
|
},
|
|
4256
4219
|
children: [/* @__PURE__ */ $("textarea", {
|
|
4257
4220
|
class: "markup-textarea",
|
|
4258
|
-
value:
|
|
4259
|
-
onInput: (e) =>
|
|
4221
|
+
value: C.draft,
|
|
4222
|
+
onInput: (e) => {
|
|
4223
|
+
let t = e.currentTarget.value;
|
|
4224
|
+
w((e) => e.kind === "editing" ? {
|
|
4225
|
+
...e,
|
|
4226
|
+
draft: t
|
|
4227
|
+
} : e);
|
|
4228
|
+
},
|
|
4260
4229
|
rows: 3,
|
|
4261
4230
|
autoFocus: !0,
|
|
4262
4231
|
disabled: s
|
|
@@ -4265,13 +4234,13 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4265
4234
|
children: [/* @__PURE__ */ $("button", {
|
|
4266
4235
|
type: "button",
|
|
4267
4236
|
class: "markup-btn markup-btn-ghost",
|
|
4268
|
-
onClick:
|
|
4237
|
+
onClick: () => w({ kind: "none" }),
|
|
4269
4238
|
disabled: s,
|
|
4270
4239
|
children: "Cancel"
|
|
4271
4240
|
}), /* @__PURE__ */ $("button", {
|
|
4272
4241
|
type: "submit",
|
|
4273
4242
|
class: "markup-btn markup-btn-primary",
|
|
4274
|
-
disabled: s ||
|
|
4243
|
+
disabled: s || C.draft.trim().length === 0,
|
|
4275
4244
|
children: "Save"
|
|
4276
4245
|
})]
|
|
4277
4246
|
})]
|
|
@@ -4280,19 +4249,19 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4280
4249
|
children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ $("time", {
|
|
4281
4250
|
class: "markup-comment-edited",
|
|
4282
4251
|
datetime: new Date(t.editedAt).toISOString(),
|
|
4283
|
-
title:
|
|
4252
|
+
title: Aa(t.editedAt),
|
|
4284
4253
|
children: [" ", "(edited)"]
|
|
4285
4254
|
})]
|
|
4286
4255
|
}),
|
|
4287
|
-
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(
|
|
4256
|
+
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(Ea, {
|
|
4288
4257
|
comment: t,
|
|
4289
|
-
isResolved:
|
|
4258
|
+
isResolved: k,
|
|
4290
4259
|
onToggle: (e) => g(t._id, e)
|
|
4291
4260
|
}) : null,
|
|
4292
4261
|
r === 0 && e.screenshotUrl ? /* @__PURE__ */ $("button", {
|
|
4293
4262
|
type: "button",
|
|
4294
4263
|
class: "markup-comment-screenshot",
|
|
4295
|
-
onClick: () =>
|
|
4264
|
+
onClick: () => x.current?.showModal(),
|
|
4296
4265
|
children: /* @__PURE__ */ $("img", {
|
|
4297
4266
|
src: e.screenshotUrl,
|
|
4298
4267
|
alt: "Screenshot"
|
|
@@ -4303,17 +4272,17 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4303
4272
|
})
|
|
4304
4273
|
}),
|
|
4305
4274
|
e.screenshotUrl ? /* @__PURE__ */ $("dialog", {
|
|
4306
|
-
ref:
|
|
4275
|
+
ref: x,
|
|
4307
4276
|
class: "markup-lightbox",
|
|
4308
|
-
onClick: () =>
|
|
4277
|
+
onClick: () => x.current?.close(),
|
|
4309
4278
|
children: [/* @__PURE__ */ $("button", {
|
|
4310
4279
|
type: "button",
|
|
4311
4280
|
class: "markup-lightbox-close markup-icon-btn",
|
|
4312
4281
|
"aria-label": "Close screenshot",
|
|
4313
4282
|
onClick: (e) => {
|
|
4314
|
-
e.stopPropagation(),
|
|
4283
|
+
e.stopPropagation(), x.current?.close();
|
|
4315
4284
|
},
|
|
4316
|
-
children: /* @__PURE__ */ $(
|
|
4285
|
+
children: /* @__PURE__ */ $(oa, { size: 16 })
|
|
4317
4286
|
}), /* @__PURE__ */ $("img", {
|
|
4318
4287
|
class: "markup-lightbox-img",
|
|
4319
4288
|
src: e.screenshotUrl,
|
|
@@ -4321,7 +4290,7 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4321
4290
|
onClick: (e) => e.stopPropagation()
|
|
4322
4291
|
})]
|
|
4323
4292
|
}) : null,
|
|
4324
|
-
t == null ? /* @__PURE__ */ $(
|
|
4293
|
+
t == null ? /* @__PURE__ */ $(ha, {
|
|
4325
4294
|
pending: s,
|
|
4326
4295
|
connecting: i,
|
|
4327
4296
|
signingIn: a,
|
|
@@ -4343,7 +4312,7 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4343
4312
|
children: "team"
|
|
4344
4313
|
}) : null
|
|
4345
4314
|
]
|
|
4346
|
-
}), /* @__PURE__ */ $(
|
|
4315
|
+
}), /* @__PURE__ */ $(_a, {
|
|
4347
4316
|
label: "Reply",
|
|
4348
4317
|
placeholder: "Write a reply…",
|
|
4349
4318
|
submitLabel: "Reply",
|
|
@@ -4356,7 +4325,7 @@ function Ca({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4356
4325
|
]
|
|
4357
4326
|
});
|
|
4358
4327
|
}
|
|
4359
|
-
function
|
|
4328
|
+
function Ta({ comment: e, pickerOpen: t, pickerDirection: n, pickerRef: r, onPickerClick: i, onPickerSelect: a }) {
|
|
4360
4329
|
return /* @__PURE__ */ $("div", {
|
|
4361
4330
|
class: Q("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up"),
|
|
4362
4331
|
ref: r,
|
|
@@ -4366,11 +4335,11 @@ function wa({ comment: e, pickerOpen: t, pickerDirection: n, pickerRef: r, onPic
|
|
|
4366
4335
|
title: "Add reaction",
|
|
4367
4336
|
"aria-label": "Add reaction",
|
|
4368
4337
|
onClick: i,
|
|
4369
|
-
children: /* @__PURE__ */ $(
|
|
4338
|
+
children: /* @__PURE__ */ $(da, { size: 16 })
|
|
4370
4339
|
}), t ? /* @__PURE__ */ $("div", {
|
|
4371
4340
|
class: "markup-reaction-picker",
|
|
4372
4341
|
role: "menu",
|
|
4373
|
-
children:
|
|
4342
|
+
children: Ca.map((t) => /* @__PURE__ */ $("button", {
|
|
4374
4343
|
type: "button",
|
|
4375
4344
|
role: "menuitem",
|
|
4376
4345
|
class: Q("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
|
|
@@ -4380,11 +4349,11 @@ function wa({ comment: e, pickerOpen: t, pickerDirection: n, pickerRef: r, onPic
|
|
|
4380
4349
|
}) : null]
|
|
4381
4350
|
});
|
|
4382
4351
|
}
|
|
4383
|
-
function
|
|
4352
|
+
function Ea({ comment: e, isResolved: t, onToggle: n }) {
|
|
4384
4353
|
return /* @__PURE__ */ $("div", {
|
|
4385
4354
|
class: "markup-reactions",
|
|
4386
4355
|
children: e.reactions.map((e) => {
|
|
4387
|
-
let r =
|
|
4356
|
+
let r = Da(e.reactors, e.mine, e.count, e.emoji);
|
|
4388
4357
|
return /* @__PURE__ */ $("button", {
|
|
4389
4358
|
type: "button",
|
|
4390
4359
|
class: Q("markup-reaction-chip", e.mine && "is-mine"),
|
|
@@ -4405,14 +4374,14 @@ function Ta({ comment: e, isResolved: t, onToggle: n }) {
|
|
|
4405
4374
|
})
|
|
4406
4375
|
});
|
|
4407
4376
|
}
|
|
4408
|
-
function
|
|
4377
|
+
function Da(e, t, n, r) {
|
|
4409
4378
|
let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
|
|
4410
4379
|
return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
|
|
4411
4380
|
}
|
|
4412
|
-
function
|
|
4381
|
+
function Oa(e, t, n) {
|
|
4413
4382
|
return Math.max(t, Math.min(n, e));
|
|
4414
4383
|
}
|
|
4415
|
-
function
|
|
4384
|
+
function ka(e) {
|
|
4416
4385
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
4417
4386
|
if (n < 60) return "just now";
|
|
4418
4387
|
let r = Math.floor(n / 60);
|
|
@@ -4429,7 +4398,7 @@ function Oa(e) {
|
|
|
4429
4398
|
year: "numeric"
|
|
4430
4399
|
});
|
|
4431
4400
|
}
|
|
4432
|
-
function
|
|
4401
|
+
function Aa(e) {
|
|
4433
4402
|
return new Date(e).toLocaleDateString([], {
|
|
4434
4403
|
month: "long",
|
|
4435
4404
|
day: "numeric",
|
|
@@ -4440,7 +4409,7 @@ function ka(e) {
|
|
|
4440
4409
|
}
|
|
4441
4410
|
//#endregion
|
|
4442
4411
|
//#region src/runtime/ui/app.tsx
|
|
4443
|
-
function
|
|
4412
|
+
function ja(e) {
|
|
4444
4413
|
return {
|
|
4445
4414
|
clientId: `markup_user_${e.identity.id}`,
|
|
4446
4415
|
name: e.identity.name,
|
|
@@ -4450,10 +4419,10 @@ function Aa(e) {
|
|
|
4450
4419
|
tokenExpiresAt: e.tokenExpiresAt ?? void 0
|
|
4451
4420
|
};
|
|
4452
4421
|
}
|
|
4453
|
-
function
|
|
4454
|
-
let [r, i] =
|
|
4422
|
+
function Ma({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
4423
|
+
let [r, i] = R(() => window.location.pathname), [a, o] = R([]), [s, c] = R(null), [l, u] = R(n), d = B(null);
|
|
4455
4424
|
d.current = s;
|
|
4456
|
-
let [f, p] =
|
|
4425
|
+
let [f, p] = R(0), m = Ce(() => Or({
|
|
4457
4426
|
apiUrl: e,
|
|
4458
4427
|
apiKey: t,
|
|
4459
4428
|
getToken: () => {
|
|
@@ -4477,8 +4446,8 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4477
4446
|
};
|
|
4478
4447
|
d.current = t, c(t), Mr(t), p((e) => e + 1);
|
|
4479
4448
|
}
|
|
4480
|
-
}), [e, t]), [h, g] =
|
|
4481
|
-
|
|
4449
|
+
}), [e, t]), [h, g] = R({ kind: "idle" }), [_, v] = R(!1), [y, b] = R(null), [x, S] = R(!1), [C, w] = R(!1), [, T] = R(0), E = B(null), D = s?.name ?? null, O = s?.isVerified ?? !1, k = s == null;
|
|
4450
|
+
z(() => {
|
|
4482
4451
|
let e = jr();
|
|
4483
4452
|
if (e?.anonToken || e?.isVerified) {
|
|
4484
4453
|
c(e);
|
|
@@ -4503,14 +4472,14 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4503
4472
|
t = !0, n && clearTimeout(n);
|
|
4504
4473
|
};
|
|
4505
4474
|
}, [m, f]);
|
|
4506
|
-
let [
|
|
4507
|
-
|
|
4475
|
+
let [A, j] = R(null);
|
|
4476
|
+
z(() => {
|
|
4508
4477
|
let e = !1, t = null;
|
|
4509
4478
|
async function n() {
|
|
4510
4479
|
try {
|
|
4511
4480
|
let r = await m.getSubscriptionToken();
|
|
4512
4481
|
if (e) return;
|
|
4513
|
-
|
|
4482
|
+
j(r.token);
|
|
4514
4483
|
let i = Math.max(6e4, r.expiresAt - Date.now() - 30 * 6e4);
|
|
4515
4484
|
t = setTimeout(n, i);
|
|
4516
4485
|
} catch {
|
|
@@ -4522,29 +4491,29 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4522
4491
|
e = !0, t && clearTimeout(t);
|
|
4523
4492
|
};
|
|
4524
4493
|
}, [m]);
|
|
4525
|
-
let [
|
|
4526
|
-
|
|
4494
|
+
let [M, N] = R(null);
|
|
4495
|
+
z(() => {
|
|
4527
4496
|
let t = new rr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
4528
|
-
return
|
|
4529
|
-
t.close(),
|
|
4497
|
+
return N(t), () => {
|
|
4498
|
+
t.close(), N((e) => e === t ? null : e);
|
|
4530
4499
|
};
|
|
4531
4500
|
}, [e]);
|
|
4532
|
-
let
|
|
4533
|
-
|
|
4534
|
-
if (!(!
|
|
4535
|
-
subscriptionToken:
|
|
4501
|
+
let ee = B(!1);
|
|
4502
|
+
z(() => {
|
|
4503
|
+
if (!(!M || !A)) return b(null), M.onUpdate(qt("widget/queries:subscribeThreadsForRoute"), {
|
|
4504
|
+
subscriptionToken: A,
|
|
4536
4505
|
route: r,
|
|
4537
4506
|
viewerClientId: s?.clientId ?? void 0
|
|
4538
4507
|
}, (e) => {
|
|
4539
4508
|
e !== void 0 && o(e);
|
|
4540
4509
|
});
|
|
4541
4510
|
}, [
|
|
4542
|
-
|
|
4543
|
-
|
|
4511
|
+
M,
|
|
4512
|
+
A,
|
|
4544
4513
|
r,
|
|
4545
4514
|
s?.clientId
|
|
4546
|
-
]),
|
|
4547
|
-
if (
|
|
4515
|
+
]), z(() => {
|
|
4516
|
+
if (ee.current) return;
|
|
4548
4517
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
4549
4518
|
if (e) {
|
|
4550
4519
|
let t = decodeURIComponent(e[1] ?? "");
|
|
@@ -4553,8 +4522,8 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4553
4522
|
threadId: t
|
|
4554
4523
|
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
4555
4524
|
}
|
|
4556
|
-
|
|
4557
|
-
}, [a]),
|
|
4525
|
+
ee.current = !0;
|
|
4526
|
+
}, [a]), z(() => {
|
|
4558
4527
|
let e = !0;
|
|
4559
4528
|
function t() {
|
|
4560
4529
|
e && i(window.location.pathname);
|
|
@@ -4568,12 +4537,12 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4568
4537
|
}, () => {
|
|
4569
4538
|
e = !1, window.removeEventListener("popstate", t);
|
|
4570
4539
|
};
|
|
4571
|
-
}, []),
|
|
4540
|
+
}, []), z(() => {
|
|
4572
4541
|
function e(e) {
|
|
4573
4542
|
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), S((e) => !e)));
|
|
4574
4543
|
}
|
|
4575
4544
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4576
|
-
}, []),
|
|
4545
|
+
}, []), z(() => {
|
|
4577
4546
|
if (!C) return;
|
|
4578
4547
|
if (!x) {
|
|
4579
4548
|
w(!1);
|
|
@@ -4581,7 +4550,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4581
4550
|
}
|
|
4582
4551
|
let e = window.setTimeout(() => w(!1), 5e3);
|
|
4583
4552
|
return () => window.clearTimeout(e);
|
|
4584
|
-
}, [C, x]),
|
|
4553
|
+
}, [C, x]), z(() => {
|
|
4585
4554
|
let e = null;
|
|
4586
4555
|
function t() {
|
|
4587
4556
|
e ??= requestAnimationFrame(() => {
|
|
@@ -4594,12 +4563,12 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4594
4563
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
4595
4564
|
};
|
|
4596
4565
|
}, []);
|
|
4597
|
-
let
|
|
4566
|
+
let te = V(() => {
|
|
4598
4567
|
b(null), g({ kind: "placing" });
|
|
4599
|
-
}, []),
|
|
4568
|
+
}, []), P = V(() => {
|
|
4600
4569
|
g({ kind: "idle" }), b(null);
|
|
4601
|
-
}, []),
|
|
4602
|
-
let r = t + window.scrollX, i = n + window.scrollY, a = ++
|
|
4570
|
+
}, []), ne = B(0), re = V((e, t, n) => {
|
|
4571
|
+
let r = t + window.scrollX, i = n + window.scrollY, a = ++ne.current;
|
|
4603
4572
|
g({
|
|
4604
4573
|
kind: "composing-new",
|
|
4605
4574
|
coords: e,
|
|
@@ -4618,7 +4587,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4618
4587
|
screenshotCapturing: !1
|
|
4619
4588
|
});
|
|
4620
4589
|
});
|
|
4621
|
-
}, []),
|
|
4590
|
+
}, []), ie = V((e, t) => {
|
|
4622
4591
|
if (!s) return;
|
|
4623
4592
|
let n = {
|
|
4624
4593
|
...s,
|
|
@@ -4626,11 +4595,11 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4626
4595
|
email: t
|
|
4627
4596
|
};
|
|
4628
4597
|
Mr(n), c(n);
|
|
4629
|
-
}, [s]), [ae, oe] =
|
|
4598
|
+
}, [s]), [ae, oe] = R(!1), se = V(async () => {
|
|
4630
4599
|
if (!ae) {
|
|
4631
4600
|
b(null), oe(!0);
|
|
4632
4601
|
try {
|
|
4633
|
-
let n =
|
|
4602
|
+
let n = ja(await Nr(e, t));
|
|
4634
4603
|
Mr(n), c(n);
|
|
4635
4604
|
} catch (e) {
|
|
4636
4605
|
b(e instanceof Error ? e.message : "Sign-in failed");
|
|
@@ -4642,7 +4611,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4642
4611
|
e,
|
|
4643
4612
|
t,
|
|
4644
4613
|
ae
|
|
4645
|
-
]), ce =
|
|
4614
|
+
]), ce = V(async (e, t) => {
|
|
4646
4615
|
if (!(h.kind !== "composing-new" || !s?.name)) {
|
|
4647
4616
|
v(!0), b(null);
|
|
4648
4617
|
try {
|
|
@@ -4688,7 +4657,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4688
4657
|
s,
|
|
4689
4658
|
h,
|
|
4690
4659
|
r
|
|
4691
|
-
]), le =
|
|
4660
|
+
]), le = V(async () => {
|
|
4692
4661
|
if (h.kind !== "thread") return;
|
|
4693
4662
|
let e = h.threadId;
|
|
4694
4663
|
v(!0), b(null);
|
|
@@ -4699,7 +4668,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4699
4668
|
} finally {
|
|
4700
4669
|
v(!1);
|
|
4701
4670
|
}
|
|
4702
|
-
}, [m, h]), ue =
|
|
4671
|
+
}, [m, h]), ue = V(async () => {
|
|
4703
4672
|
if (h.kind !== "thread") return;
|
|
4704
4673
|
let e = h.threadId;
|
|
4705
4674
|
v(!0), b(null);
|
|
@@ -4714,7 +4683,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4714
4683
|
m,
|
|
4715
4684
|
h,
|
|
4716
4685
|
s?.clientId
|
|
4717
|
-
]),
|
|
4686
|
+
]), de = V(async (e) => {
|
|
4718
4687
|
if (h.kind !== "thread" || !s?.name) return;
|
|
4719
4688
|
let t = h.threadId;
|
|
4720
4689
|
v(!0), b(null);
|
|
@@ -4734,7 +4703,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4734
4703
|
m,
|
|
4735
4704
|
s,
|
|
4736
4705
|
h
|
|
4737
|
-
]),
|
|
4706
|
+
]), F = V(async (e, t) => {
|
|
4738
4707
|
if (h.kind !== "thread" || !s) return;
|
|
4739
4708
|
let n = h.threadId;
|
|
4740
4709
|
v(!0), b(null);
|
|
@@ -4750,7 +4719,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4750
4719
|
m,
|
|
4751
4720
|
s,
|
|
4752
4721
|
h
|
|
4753
|
-
]),
|
|
4722
|
+
]), fe = V(async (e) => {
|
|
4754
4723
|
if (h.kind !== "thread" || !s) return;
|
|
4755
4724
|
let t = h.threadId;
|
|
4756
4725
|
v(!0), b(null);
|
|
@@ -4766,7 +4735,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4766
4735
|
m,
|
|
4767
4736
|
s,
|
|
4768
4737
|
h
|
|
4769
|
-
]),
|
|
4738
|
+
]), pe = V(async (e, t) => {
|
|
4770
4739
|
if (h.kind !== "thread" || !s) return;
|
|
4771
4740
|
let n = h.threadId;
|
|
4772
4741
|
b(null);
|
|
@@ -4783,13 +4752,13 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4783
4752
|
m,
|
|
4784
4753
|
s,
|
|
4785
4754
|
h
|
|
4786
|
-
]),
|
|
4787
|
-
return
|
|
4788
|
-
h.kind === "thread" &&
|
|
4755
|
+
]), I = h.kind === "thread" ? a.find((e) => e._id === h.threadId) ?? null : null, me = O || s?.clientId != null && s.clientId === I?.authorClientId;
|
|
4756
|
+
return z(() => {
|
|
4757
|
+
h.kind === "thread" && I == null && P();
|
|
4789
4758
|
}, [
|
|
4790
4759
|
h,
|
|
4791
|
-
|
|
4792
|
-
|
|
4760
|
+
I,
|
|
4761
|
+
P
|
|
4793
4762
|
]), /* @__PURE__ */ $("div", {
|
|
4794
4763
|
class: "markup-root",
|
|
4795
4764
|
ref: E,
|
|
@@ -4804,7 +4773,7 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4804
4773
|
anchorOffsetX: e.anchorOffsetX,
|
|
4805
4774
|
anchorOffsetY: e.anchorOffsetY
|
|
4806
4775
|
}), r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
4807
|
-
return /* @__PURE__ */ $(
|
|
4776
|
+
return /* @__PURE__ */ $(ba, {
|
|
4808
4777
|
pageX: n.pageX,
|
|
4809
4778
|
pageY: n.pageY,
|
|
4810
4779
|
count: r,
|
|
@@ -4814,66 +4783,66 @@ function ja({ apiUrl: e, apiKey: t, position: n = "bottom-right" }) {
|
|
|
4814
4783
|
threadId: e._id
|
|
4815
4784
|
})
|
|
4816
4785
|
}, e._id);
|
|
4817
|
-
}), h.kind === "composing-new" ? /* @__PURE__ */ $(
|
|
4786
|
+
}), h.kind === "composing-new" ? /* @__PURE__ */ $(xa, {
|
|
4818
4787
|
pageX: h.pageX,
|
|
4819
4788
|
pageY: h.pageY
|
|
4820
4789
|
}) : null]
|
|
4821
4790
|
}),
|
|
4822
|
-
h.kind === "placing" ? /* @__PURE__ */ $(
|
|
4823
|
-
onPlace:
|
|
4824
|
-
onCancel:
|
|
4791
|
+
h.kind === "placing" ? /* @__PURE__ */ $(Sa, {
|
|
4792
|
+
onPlace: re,
|
|
4793
|
+
onCancel: P
|
|
4825
4794
|
}) : null,
|
|
4826
|
-
h.kind === "thread" &&
|
|
4827
|
-
thread:
|
|
4795
|
+
h.kind === "thread" && I ? /* @__PURE__ */ $(wa, {
|
|
4796
|
+
thread: I,
|
|
4828
4797
|
authorName: D,
|
|
4829
4798
|
currentClientId: s?.clientId ?? null,
|
|
4830
4799
|
isVerified: O,
|
|
4831
|
-
identityResolving:
|
|
4800
|
+
identityResolving: k,
|
|
4832
4801
|
signingIn: ae,
|
|
4833
|
-
canDelete:
|
|
4802
|
+
canDelete: me,
|
|
4834
4803
|
pending: _,
|
|
4835
4804
|
error: y,
|
|
4836
4805
|
hidden: x,
|
|
4837
|
-
onAuthor:
|
|
4806
|
+
onAuthor: ie,
|
|
4838
4807
|
onSignIn: se,
|
|
4839
|
-
onClose:
|
|
4840
|
-
onReply:
|
|
4841
|
-
onEditComment:
|
|
4842
|
-
onDeleteComment:
|
|
4843
|
-
onToggleReaction:
|
|
4808
|
+
onClose: P,
|
|
4809
|
+
onReply: de,
|
|
4810
|
+
onEditComment: F,
|
|
4811
|
+
onDeleteComment: fe,
|
|
4812
|
+
onToggleReaction: pe,
|
|
4844
4813
|
onDelete: le,
|
|
4845
4814
|
onResolve: ue
|
|
4846
|
-
},
|
|
4847
|
-
h.kind === "composing-new" ? /* @__PURE__ */ $(
|
|
4815
|
+
}, I._id) : null,
|
|
4816
|
+
h.kind === "composing-new" ? /* @__PURE__ */ $(va, {
|
|
4848
4817
|
pageX: h.pageX,
|
|
4849
4818
|
pageY: h.pageY,
|
|
4850
4819
|
authorName: D,
|
|
4851
4820
|
isVerified: O,
|
|
4852
|
-
identityResolving:
|
|
4821
|
+
identityResolving: k,
|
|
4853
4822
|
signingIn: ae,
|
|
4854
4823
|
pending: _,
|
|
4855
4824
|
error: y,
|
|
4856
4825
|
screenshot: h.screenshot,
|
|
4857
4826
|
screenshotCapturing: h.screenshotCapturing,
|
|
4858
|
-
onAuthor:
|
|
4827
|
+
onAuthor: ie,
|
|
4859
4828
|
onSignIn: se,
|
|
4860
4829
|
onSubmit: ce,
|
|
4861
|
-
onClose:
|
|
4830
|
+
onClose: P
|
|
4862
4831
|
}) : null,
|
|
4863
|
-
!x || h.kind === "placing" || h.kind === "composing-new" ? /* @__PURE__ */ $(
|
|
4832
|
+
!x || h.kind === "placing" || h.kind === "composing-new" ? /* @__PURE__ */ $(fa, {
|
|
4864
4833
|
active: h.kind === "placing",
|
|
4865
|
-
onToggle: () => h.kind === "placing" ?
|
|
4834
|
+
onToggle: () => h.kind === "placing" ? P() : te(),
|
|
4866
4835
|
onHide: () => {
|
|
4867
4836
|
S(!0), w(!0);
|
|
4868
4837
|
},
|
|
4869
4838
|
position: l,
|
|
4870
4839
|
onPositionChange: u
|
|
4871
4840
|
}) : null,
|
|
4872
|
-
x && C ? /* @__PURE__ */ $(
|
|
4841
|
+
x && C ? /* @__PURE__ */ $(Na, { position: l }) : null
|
|
4873
4842
|
]
|
|
4874
4843
|
});
|
|
4875
4844
|
}
|
|
4876
|
-
function
|
|
4845
|
+
function Na({ position: e }) {
|
|
4877
4846
|
let t = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘" : "Ctrl";
|
|
4878
4847
|
return /* @__PURE__ */ $("div", {
|
|
4879
4848
|
class: Q("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : "markup-hud-hidden-toast-right"),
|
|
@@ -4895,7 +4864,7 @@ function Ma({ position: e }) {
|
|
|
4895
4864
|
}
|
|
4896
4865
|
//#endregion
|
|
4897
4866
|
//#region src/runtime/mount.tsx
|
|
4898
|
-
function
|
|
4867
|
+
function Pa(e, t) {
|
|
4899
4868
|
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
|
|
4900
4869
|
let n = t.theme ?? "auto";
|
|
4901
4870
|
n !== "auto" && (e.dataset.theme = n);
|
|
@@ -4904,23 +4873,23 @@ function Na(e, t) {
|
|
|
4904
4873
|
let a = document.createElement("div");
|
|
4905
4874
|
a.className = "markup-shadow-root", r.appendChild(a);
|
|
4906
4875
|
let { theme: o, ...s } = t;
|
|
4907
|
-
return le(/* @__PURE__ */ $(
|
|
4876
|
+
return le(/* @__PURE__ */ $(Ma, { ...s }), a), () => le(null, a);
|
|
4908
4877
|
}
|
|
4909
4878
|
//#endregion
|
|
4910
4879
|
//#region src/widget.ts
|
|
4911
|
-
var
|
|
4912
|
-
function
|
|
4913
|
-
|
|
4880
|
+
var Fa = null, Ia = null;
|
|
4881
|
+
function La(e) {
|
|
4882
|
+
Ra();
|
|
4914
4883
|
let t = document.createElement("div");
|
|
4915
|
-
return t.id = "markup-widget", document.body.appendChild(t),
|
|
4884
|
+
return t.id = "markup-widget", document.body.appendChild(t), Ia = t, Fa = Pa(t, e), Ra;
|
|
4916
4885
|
}
|
|
4917
|
-
function
|
|
4918
|
-
|
|
4886
|
+
function Ra() {
|
|
4887
|
+
Fa &&= (Fa(), null), Ia?.parentNode && Ia.parentNode.removeChild(Ia), Ia = null;
|
|
4919
4888
|
}
|
|
4920
4889
|
if (typeof document < "u") {
|
|
4921
4890
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
4922
4891
|
if (t && n) {
|
|
4923
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = () =>
|
|
4892
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = () => La({
|
|
4924
4893
|
apiUrl: t,
|
|
4925
4894
|
apiKey: n,
|
|
4926
4895
|
position: r,
|
|
@@ -4930,4 +4899,4 @@ if (typeof document < "u") {
|
|
|
4930
4899
|
}
|
|
4931
4900
|
}
|
|
4932
4901
|
//#endregion
|
|
4933
|
-
export {
|
|
4902
|
+
export { Ra as destroy, La as init };
|