@pixelmatters/markup 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -6
- package/dist/widget.d.ts +10 -0
- package/dist/widget.js +922 -819
- 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), te(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) {
|
|
@@ -65,13 +65,13 @@ function O() {
|
|
|
65
65
|
}
|
|
66
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 = 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 =
|
|
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 = te(e, p, f, i, a, o, s, c, l, u), g = p.__e, p.ref && f.ref != p.ref && (f.ref && F(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
71
|
function A(e, t, n, r, i) {
|
|
72
72
|
var a, o, s, c, l, u = n.length, d = u, f = 0;
|
|
73
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
|
-
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)),
|
|
74
|
+
if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = w(s)), oe(s, s));
|
|
75
75
|
return r;
|
|
76
76
|
}
|
|
77
77
|
function j(e, t, n, r) {
|
|
@@ -97,7 +97,7 @@ function M(e, t, n, r) {
|
|
|
97
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 P(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 {
|
|
@@ -114,7 +114,7 @@ function ee(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 ee(e) {
|
|
118
118
|
return function(n) {
|
|
119
119
|
if (this.l) {
|
|
120
120
|
var r = this.l[n.type + e];
|
|
@@ -124,12 +124,12 @@ function te(e) {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function te(e, n, r, i, a, o, s, c, l, u) {
|
|
128
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
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 =
|
|
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 = se), 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
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) {
|
|
@@ -145,26 +145,26 @@ function ne(e, n, r, i, a, o, s, c, l, u) {
|
|
|
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
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 ?
|
|
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
154
|
for (M = o.length; M--;) y(o[M]);
|
|
155
|
-
|
|
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
|
-
else o == null && n.__v == r.__v ? (n.__k = r.__k, n.__e = r.__e) : c = n.__e =
|
|
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
|
|
167
|
-
for (var i = 0; i < r.length; i++)
|
|
166
|
+
function re(e, n, r) {
|
|
167
|
+
for (var i = 0; i < r.length; i++) F(r[i], r[++i], r[++i]);
|
|
168
168
|
t.__c && t.__c(n, e), e.some(function(n) {
|
|
169
169
|
try {
|
|
170
170
|
e = n.__h, n.__h = [], e.some(function(e) {
|
|
@@ -175,10 +175,10 @@ 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
|
-
function
|
|
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;
|
|
183
183
|
if (C == "svg" ? o = "http://www.w3.org/2000/svg" : C == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o ||= "http://www.w3.org/1999/xhtml", s != null) {
|
|
184
184
|
for (d = 0; d < s.length; d++) if ((g = s[d]) && "setAttribute" in g == !!C && (C ? g.localName == C : g.nodeType == 3)) {
|
|
@@ -193,15 +193,15 @@ function oe(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 || P(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 || P(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
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]) &&
|
|
200
|
+
l || (d = "value", C == "progress" && v == null ? n.removeAttribute("value") : v != null && (v !== n[d] || C == "progress" && !v || C == "option" && v != x[d]) && P(n, d, v, x[d], o), d = "checked", b != null && b != n[d] && P(n, d, b, x[d], o));
|
|
201
201
|
}
|
|
202
202
|
return n;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function F(e, n, r) {
|
|
205
205
|
try {
|
|
206
206
|
if (typeof e == "function") {
|
|
207
207
|
var i = typeof e.__u == "function";
|
|
@@ -211,9 +211,9 @@ function se(e, n, r) {
|
|
|
211
211
|
t.__e(e, r);
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function oe(e, n, r) {
|
|
215
215
|
var i, a;
|
|
216
|
-
if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e ||
|
|
216
|
+
if (t.unmount && t.unmount(e), (i = e.ref) && (i.current && i.current != e.__e || F(i, null, n)), (i = e.__c) != null) {
|
|
217
217
|
if (i.componentWillUnmount) try {
|
|
218
218
|
i.componentWillUnmount();
|
|
219
219
|
} catch (e) {
|
|
@@ -221,15 +221,15 @@ function ce(e, n, r) {
|
|
|
221
221
|
}
|
|
222
222
|
i.base = i.__P = null;
|
|
223
223
|
}
|
|
224
|
-
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] &&
|
|
224
|
+
if (i = e.__k) for (a = 0; a < i.length; a++) i[a] && oe(i[a], n, r || typeof e.type != "function");
|
|
225
225
|
r || y(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function se(e, t, n) {
|
|
228
228
|
return this.constructor(e, n);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ce(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 = [], te(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 = ee(!1), p = ee(!0);
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region src/styles.css?inline
|
|
251
|
-
var de = ":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-fab.is-icon-only{gap:0;padding:9px}.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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.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}}", fe, P, pe, me, he = 0, ge = [], F = t, _e = F.__b, I = F.__r, ve = F.diffed, ye = F.__c, be = F.unmount, xe = F.__;
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
-
var n =
|
|
251
|
+
var le = ":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-fab.is-icon-only{gap:0;padding:9px}.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)}.markup-comment-menu.is-side .markup-thread-menu-list{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}@keyframes markup-menu-in-side{0%{opacity:0;transform:translate(4px)}to{opacity:1;transform:translate(0)}}@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-wrap.is-side .markup-reaction-picker{animation-name:markup-menu-in-side;top:-4px;right:calc(100% + 2px)}.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-screenshot-redacted{font-family:var(--markup-font-mono);color:var(--markup-muted);margin-top:4px;font-size:10px}.markup-screenshot-redacted-chip{cursor:pointer;color:var(--markup-muted);font:inherit;background:0 0;border:none;align-items:center;gap:3px;padding:0;display:inline-flex}.markup-screenshot-redacted-chip:hover{color:var(--markup-ink)}.markup-screenshot-redacted-arrow{font-style:normal}.markup-screenshot-redacted-list{margin-top:3px;padding-left:10px}.markup-screenshot-redacted-selector{font-family:var(--markup-font-mono);color:var(--markup-muted);font-size:9px;display:block}.markup-screenshot-help{font-family:var(--markup-font-mono);color:var(--markup-muted);margin:5px 0 0;font-size:10px;line-height:1.5}.markup-screenshot-help-code{font-family:var(--markup-font-mono);color:var(--markup-ink)}.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}}", ue, I, de, fe, pe = 0, me = [], L = t, he = L.__b, ge = L.__r, R = L.diffed, _e = L.__c, ve = L.unmount, ye = L.__;
|
|
252
|
+
function be(e, t) {
|
|
253
|
+
L.__h && L.__h(I, e, pe || t), pe = 0;
|
|
254
|
+
var n = I.__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 z(e) {
|
|
261
|
+
return pe = 1, xe(ke, e);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
var r =
|
|
265
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) :
|
|
263
|
+
function xe(e, t, n) {
|
|
264
|
+
var r = be(ue++, 2);
|
|
265
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ke(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 = I, !I.__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 Ce(e, t, n) {
|
|
|
282
282
|
}
|
|
283
283
|
}), a && a.call(this, e, t, n) || o;
|
|
284
284
|
};
|
|
285
|
-
|
|
286
|
-
var a =
|
|
287
|
-
|
|
285
|
+
I.__f = !0;
|
|
286
|
+
var a = I.shouldComponentUpdate, o = I.componentWillUpdate;
|
|
287
|
+
I.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
|
+
}, I.shouldComponentUpdate = i;
|
|
294
294
|
}
|
|
295
295
|
return r.__N || r.__;
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
var n =
|
|
299
|
-
!
|
|
297
|
+
function B(e, t) {
|
|
298
|
+
var n = be(ue++, 3);
|
|
299
|
+
!L.__s && Oe(n.__H, t) && (n.__ = e, n.u = t, I.__H.__h.push(n));
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
return
|
|
301
|
+
function V(e) {
|
|
302
|
+
return pe = 5, Se(function() {
|
|
303
303
|
return { current: e };
|
|
304
304
|
}, []);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
var n =
|
|
308
|
-
return
|
|
306
|
+
function Se(e, t) {
|
|
307
|
+
var n = be(ue++, 7);
|
|
308
|
+
return Oe(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
return
|
|
310
|
+
function H(e, t) {
|
|
311
|
+
return pe = 8, Se(function() {
|
|
312
312
|
return e;
|
|
313
313
|
}, t);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
for (var e; e =
|
|
315
|
+
function Ce() {
|
|
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(Ee), t.__h.some(De), 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
|
+
I = null, he && he(e);
|
|
327
|
+
}, L.__ = function(e, t) {
|
|
328
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ye && ye(e, t);
|
|
329
|
+
}, L.__r = function(e) {
|
|
330
|
+
ge && ge(e), ue = 0;
|
|
331
|
+
var t = (I = e.__c).__H;
|
|
332
|
+
t && (de === I ? (t.__h = [], I.__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(Ee), t.__h.some(De), t.__h = [], ue = 0)), de = I;
|
|
335
|
+
}, L.diffed = function(e) {
|
|
336
|
+
R && R(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 && fe === L.requestAnimationFrame || ((fe = L.requestAnimationFrame) || Te)(Ce)), t.__H.__.some(function(e) {
|
|
339
339
|
e.u && (e.__H = e.u), e.u = void 0;
|
|
340
|
-
})),
|
|
341
|
-
},
|
|
340
|
+
})), de = I = 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(Ee), e.__h = e.__h.filter(function(e) {
|
|
345
|
+
return !e.__ || De(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
|
+
}), _e && _e(e, t);
|
|
353
|
+
}, L.unmount = function(e) {
|
|
354
|
+
ve && ve(e);
|
|
355
355
|
var t, n = e.__c;
|
|
356
356
|
n && n.__H && (n.__H.__.some(function(e) {
|
|
357
357
|
try {
|
|
358
|
-
|
|
358
|
+
Ee(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 we = typeof requestAnimationFrame == "function";
|
|
365
|
+
function Te(e) {
|
|
366
366
|
var t, n = function() {
|
|
367
|
-
clearTimeout(r),
|
|
367
|
+
clearTimeout(r), we && cancelAnimationFrame(t), setTimeout(e);
|
|
368
368
|
}, r = setTimeout(n, 35);
|
|
369
|
-
|
|
369
|
+
we && (t = requestAnimationFrame(n));
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
var t =
|
|
373
|
-
typeof n == "function" && (e.__c = void 0, n()),
|
|
371
|
+
function Ee(e) {
|
|
372
|
+
var t = I, n = e.__c;
|
|
373
|
+
typeof n == "function" && (e.__c = void 0, n()), I = t;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
var t =
|
|
377
|
-
e.__c = e.__(),
|
|
375
|
+
function De(e) {
|
|
376
|
+
var t = I;
|
|
377
|
+
e.__c = e.__(), I = t;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Oe(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 ke(e, t) {
|
|
385
385
|
return typeof t == "function" ? t(e) : t;
|
|
386
386
|
}
|
|
387
|
-
for (var
|
|
388
|
-
|
|
389
|
-
function
|
|
387
|
+
for (var Ae = "1.37.0", U = [], W = [], je = Uint8Array, Me = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ne = 0, Pe = Me.length; Ne < Pe; ++Ne) U[Ne] = Me[Ne], W[Me.charCodeAt(Ne)] = Ne;
|
|
388
|
+
W[45] = 62, W[95] = 63;
|
|
389
|
+
function Fe(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,33 +394,33 @@ function Le(e) {
|
|
|
394
394
|
var r = n === t ? 0 : 4 - n % 4;
|
|
395
395
|
return [n, r];
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Ie(e, t, n) {
|
|
398
398
|
return (t + n) * 3 / 4 - n;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
var t, n =
|
|
402
|
-
for (c = 0; c < s; c += 4) t =
|
|
403
|
-
return i === 2 && (t =
|
|
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
404
|
}
|
|
405
|
-
function
|
|
406
|
-
return
|
|
405
|
+
function Re(e) {
|
|
406
|
+
return U[e >> 18 & 63] + U[e >> 12 & 63] + U[e >> 6 & 63] + U[e & 63];
|
|
407
407
|
}
|
|
408
|
-
function
|
|
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(
|
|
408
|
+
function ze(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(Re(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 Be(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(ze(e, o, o + a > s ? s : o + a));
|
|
414
|
+
return r === 1 ? (t = e[n - 1], i.push(U[t >> 2] + U[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(U[t >> 10] + U[t >> 4 & 63] + U[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 Ve(e) {
|
|
419
419
|
if (e === void 0) return {};
|
|
420
|
-
if (!
|
|
420
|
+
if (!Ue(e)) throw Error(`The arguments to a Convex function must be an object. Received: ${e}`);
|
|
421
421
|
return e;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function He(e) {
|
|
424
424
|
if (e === void 0) throw Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");
|
|
425
425
|
if (typeof e != "string") throw Error(`Invalid deployment address: found ${e}".`);
|
|
426
426
|
if (!(e.startsWith("http:") || e.startsWith("https:"))) throw Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);
|
|
@@ -431,146 +431,146 @@ function Ue(e) {
|
|
|
431
431
|
}
|
|
432
432
|
if (e.endsWith(".convex.site")) throw Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`);
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Ue(e) {
|
|
435
435
|
let t = typeof e == "object", n = Object.getPrototypeOf(e), r = n === null || n === Object.prototype || n?.constructor?.name === "Object";
|
|
436
436
|
return t && r;
|
|
437
437
|
}
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/values/value.js
|
|
440
|
-
var
|
|
441
|
-
function
|
|
440
|
+
var We = !0, Ge = BigInt("-9223372036854775808"), Ke = BigInt("9223372036854775807"), qe = BigInt("0"), Je = BigInt("8"), Ye = BigInt("256");
|
|
441
|
+
function Xe(e) {
|
|
442
442
|
return Number.isNaN(e) || !Number.isFinite(e) || Object.is(e, -0);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
e <
|
|
444
|
+
function Ze(e) {
|
|
445
|
+
e < qe && (e -= Ge + Ge);
|
|
446
446
|
let t = e.toString(16);
|
|
447
447
|
t.length % 2 == 1 && (t = "0" + t);
|
|
448
448
|
let n = new Uint8Array(/* @__PURE__ */ new ArrayBuffer(8)), r = 0;
|
|
449
|
-
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>=
|
|
450
|
-
return
|
|
449
|
+
for (let i of t.match(/.{2}/g).reverse()) n.set([parseInt(i, 16)], r++), e >>= Je;
|
|
450
|
+
return Be(n);
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
let t =
|
|
452
|
+
function Qe(e) {
|
|
453
|
+
let t = Le(e);
|
|
454
454
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);
|
|
455
|
-
let n =
|
|
456
|
-
for (let e of t) n += BigInt(e) *
|
|
457
|
-
return n >
|
|
455
|
+
let n = qe, r = qe;
|
|
456
|
+
for (let e of t) n += BigInt(e) * Ye ** r, r++;
|
|
457
|
+
return n > Ke && (n += Ge + Ge), n;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
if (e <
|
|
459
|
+
function $e(e) {
|
|
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), Be(new Uint8Array(t));
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
let t =
|
|
464
|
+
function et(e) {
|
|
465
|
+
let t = Le(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
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
471
|
-
if (e.length >
|
|
469
|
+
var tt = DataView.prototype.setBigInt64 ? $e : Ze, nt = DataView.prototype.getBigInt64 ? et : Qe, rt = 1024;
|
|
470
|
+
function it(e) {
|
|
471
|
+
if (e.length > rt) throw Error(`Field name ${e} exceeds maximum field name length ${rt}.`);
|
|
472
472
|
if (e.startsWith("$")) throw Error(`Field name ${e} starts with a '$', which is reserved.`);
|
|
473
473
|
for (let t = 0; t < e.length; t += 1) {
|
|
474
474
|
let n = e.charCodeAt(t);
|
|
475
475
|
if (n < 32 || n >= 127) throw Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function at(e) {
|
|
479
479
|
if (e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string") return e;
|
|
480
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
480
|
+
if (Array.isArray(e)) return e.map((e) => at(e));
|
|
481
481
|
if (typeof e != "object") throw Error(`Unexpected type of ${e}`);
|
|
482
482
|
let t = Object.entries(e);
|
|
483
483
|
if (t.length === 1) {
|
|
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 Le(e.$bytes).buffer;
|
|
488
488
|
}
|
|
489
489
|
if (n === "$integer") {
|
|
490
490
|
if (typeof e.$integer != "string") throw Error(`Malformed $integer field on ${e}`);
|
|
491
|
-
return
|
|
491
|
+
return nt(e.$integer);
|
|
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 = Le(e.$float);
|
|
496
496
|
if (t.byteLength !== 8) throw Error(`Received ${t.byteLength} bytes, expected 8 for $float`);
|
|
497
|
-
let n = new DataView(t.buffer).getFloat64(0,
|
|
498
|
-
if (!
|
|
497
|
+
let n = new DataView(t.buffer).getFloat64(0, We);
|
|
498
|
+
if (!Xe(n)) throw Error(`Float ${n} should be encoded as a number`);
|
|
499
499
|
return n;
|
|
500
500
|
}
|
|
501
501
|
if (n === "$set") throw Error("Received a Set which is no longer supported as a Convex type.");
|
|
502
502
|
if (n === "$map") throw Error("Received a Map which is no longer supported as a Convex type.");
|
|
503
503
|
}
|
|
504
504
|
let n = {};
|
|
505
|
-
for (let [t, r] of Object.entries(e))
|
|
505
|
+
for (let [t, r] of Object.entries(e)) it(t), n[t] = at(r);
|
|
506
506
|
return n;
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
508
|
+
var ot = 16384;
|
|
509
|
+
function st(e) {
|
|
510
510
|
let t = JSON.stringify(e, (e, t) => t === void 0 ? "undefined" : typeof t == "bigint" ? `${t.toString()}n` : t);
|
|
511
|
-
if (t.length >
|
|
512
|
-
let e =
|
|
511
|
+
if (t.length > ot) {
|
|
512
|
+
let e = ot - 14, n = t.codePointAt(e - 1);
|
|
513
513
|
return n !== void 0 && n > 65535 && --e, t.substring(0, e) + "[...truncated]";
|
|
514
514
|
}
|
|
515
515
|
return t;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function ct(e, t, n, r) {
|
|
518
518
|
if (e === void 0) {
|
|
519
|
-
let e = n && ` (present at path ${n} in original object ${
|
|
519
|
+
let e = n && ` (present at path ${n} in original object ${st(t)})`;
|
|
520
520
|
throw Error(`undefined is not a valid Convex value${e}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`);
|
|
521
521
|
}
|
|
522
522
|
if (e === null) return e;
|
|
523
523
|
if (typeof e == "bigint") {
|
|
524
|
-
if (e <
|
|
525
|
-
return { $integer:
|
|
524
|
+
if (e < Ge || Ke < e) throw Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);
|
|
525
|
+
return { $integer: tt(e) };
|
|
526
526
|
}
|
|
527
|
-
if (typeof e == "number") if (
|
|
527
|
+
if (typeof e == "number") if (Xe(e)) {
|
|
528
528
|
let t = /* @__PURE__ */ new ArrayBuffer(8);
|
|
529
|
-
return new DataView(t).setFloat64(0, e,
|
|
529
|
+
return new DataView(t).setFloat64(0, e, We), { $float: Be(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:
|
|
533
|
-
if (Array.isArray(e)) return e.map((e, r) =>
|
|
534
|
-
if (e instanceof Set) throw Error(
|
|
535
|
-
if (e instanceof Map) throw Error(
|
|
536
|
-
if (!
|
|
532
|
+
if (e instanceof ArrayBuffer) return { $bytes: Be(new Uint8Array(e)) };
|
|
533
|
+
if (Array.isArray(e)) return e.map((e, r) => ct(e, t, n + `[${r}]`, !1));
|
|
534
|
+
if (e instanceof Set) throw Error(lt(n, "Set", [...e], t));
|
|
535
|
+
if (e instanceof Map) throw Error(lt(n, "Map", [...e], t));
|
|
536
|
+
if (!Ue(e)) {
|
|
537
537
|
let r = e?.constructor?.name, i = r ? `${r} ` : "";
|
|
538
|
-
throw Error(
|
|
538
|
+
throw Error(lt(n, i, e, t));
|
|
539
539
|
}
|
|
540
540
|
let i = {}, a = Object.entries(e);
|
|
541
541
|
a.sort(([e, t], [n, r]) => e === n ? 0 : e < n ? -1 : 1);
|
|
542
|
-
for (let [e, o] of a) o === void 0 ? r && (
|
|
542
|
+
for (let [e, o] of a) o === void 0 ? r && (it(e), i[e] = ut(o, t, n + `.${e}`)) : (it(e), i[e] = ct(o, t, n + `.${e}`, !1));
|
|
543
543
|
return i;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
546
|
-
return e ? `${t}${
|
|
545
|
+
function lt(e, t, n, r) {
|
|
546
|
+
return e ? `${t}${st(n)} is not a supported Convex type (present at path ${e} in original object ${st(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${t}${st(n)} is not a supported Convex type.`;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function ut(e, t, n) {
|
|
549
549
|
if (e === void 0) return { $undefined: null };
|
|
550
|
-
if (t === void 0) throw Error(`Programming error. Current value is ${
|
|
551
|
-
return
|
|
550
|
+
if (t === void 0) throw Error(`Programming error. Current value is ${st(e)} but original value is undefined`);
|
|
551
|
+
return ct(e, t, n, !1);
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
return
|
|
553
|
+
function dt(e) {
|
|
554
|
+
return ct(e, e, "", !1);
|
|
555
555
|
}
|
|
556
556
|
//#endregion
|
|
557
557
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/values/errors.js
|
|
558
|
-
var
|
|
558
|
+
var ft = Object.defineProperty, pt = (e, t, n) => t in e ? ft(e, t, {
|
|
559
559
|
enumerable: !0,
|
|
560
560
|
configurable: !0,
|
|
561
561
|
writable: !0,
|
|
562
562
|
value: n
|
|
563
|
-
}) : e[t] = n,
|
|
563
|
+
}) : e[t] = n, mt = (e, t, n) => pt(e, typeof t == "symbol" ? t : t + "", n), ht, gt, _t = Symbol.for("ConvexError"), vt = class extends (gt = Error, ht = _t, gt) {
|
|
564
564
|
constructor(e) {
|
|
565
|
-
super(typeof e == "string" ? e :
|
|
565
|
+
super(typeof e == "string" ? e : st(e)), mt(this, "name", "ConvexError"), mt(this, "data"), mt(this, ht, !0), this.data = e;
|
|
566
566
|
}
|
|
567
|
-
},
|
|
567
|
+
}, yt = Object.defineProperty, bt = (e, t, n) => t in e ? yt(e, t, {
|
|
568
568
|
enumerable: !0,
|
|
569
569
|
configurable: !0,
|
|
570
570
|
writable: !0,
|
|
571
571
|
value: n
|
|
572
|
-
}) : e[t] = n,
|
|
573
|
-
function
|
|
572
|
+
}) : e[t] = n, xt = (e, t, n) => bt(e, typeof t == "symbol" ? t : t + "", n), St = "color:rgb(0, 145, 255)";
|
|
573
|
+
function Ct(e) {
|
|
574
574
|
switch (e) {
|
|
575
575
|
case "query": return "Q";
|
|
576
576
|
case "mutation": return "M";
|
|
@@ -578,9 +578,9 @@ function wt(e) {
|
|
|
578
578
|
case "any": return "?";
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
var
|
|
581
|
+
var wt = class {
|
|
582
582
|
constructor(e) {
|
|
583
|
-
|
|
583
|
+
xt(this, "_onLogLineFuncs"), xt(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
584
584
|
}
|
|
585
585
|
addLogLineListener(e) {
|
|
586
586
|
let t = Math.random().toString(36).substring(2, 15);
|
|
@@ -602,8 +602,8 @@ var Tt = class {
|
|
|
602
602
|
for (let t of Object.values(this._onLogLineFuncs)) t("error", ...e);
|
|
603
603
|
}
|
|
604
604
|
};
|
|
605
|
-
function
|
|
606
|
-
let t = new
|
|
605
|
+
function Tt(e) {
|
|
606
|
+
let t = new wt(e);
|
|
607
607
|
return t.addLogLineListener((e, ...t) => {
|
|
608
608
|
switch (e) {
|
|
609
609
|
case "debug":
|
|
@@ -622,11 +622,11 @@ function Et(e) {
|
|
|
622
622
|
}
|
|
623
623
|
}), t;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
return new
|
|
625
|
+
function Et(e) {
|
|
626
|
+
return new wt(e);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
let a =
|
|
628
|
+
function Dt(e, t, n, r, i) {
|
|
629
|
+
let a = Ct(n);
|
|
630
630
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), t === "info") {
|
|
631
631
|
let t = i.match(/^\[.*?\] /);
|
|
632
632
|
if (t === null) {
|
|
@@ -634,57 +634,57 @@ function Ot(e, t, n, r, i) {
|
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
636
|
let n = i.slice(1, t[0].length - 2), o = i.slice(t[0].length);
|
|
637
|
-
e.log(`%c[CONVEX ${a}(${r})] [${n}]`,
|
|
637
|
+
e.log(`%c[CONVEX ${a}(${r})] [${n}]`, St, o);
|
|
638
638
|
} else e.error(`[CONVEX ${a}(${r})] ${i}`);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Ot(e, t) {
|
|
641
641
|
let n = `[CONVEX FATAL ERROR] ${t}`;
|
|
642
642
|
return e.error(n), Error(n);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return `[CONVEX ${
|
|
644
|
+
function kt(e, t, n) {
|
|
645
|
+
return `[CONVEX ${Ct(e)}(${t})] ${n.errorMessage}
|
|
646
646
|
Called by client`;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function At(e, t) {
|
|
649
649
|
return t.data = e.errorData, t;
|
|
650
650
|
}
|
|
651
651
|
//#endregion
|
|
652
652
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/udf_path_utils.js
|
|
653
|
-
function
|
|
653
|
+
function jt(e) {
|
|
654
654
|
let t = e.split(":"), n, r;
|
|
655
655
|
return t.length === 1 ? (n = t[0], r = "default") : (n = t.slice(0, t.length - 1).join(":"), r = t[t.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Mt(e, t) {
|
|
658
658
|
return JSON.stringify({
|
|
659
|
-
udfPath:
|
|
660
|
-
args:
|
|
659
|
+
udfPath: jt(e),
|
|
660
|
+
args: dt(t)
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Nt(e, t, n) {
|
|
664
664
|
let { initialNumItems: r, id: i } = n;
|
|
665
665
|
return JSON.stringify({
|
|
666
666
|
type: "paginated",
|
|
667
|
-
udfPath:
|
|
668
|
-
args:
|
|
669
|
-
options:
|
|
667
|
+
udfPath: jt(e),
|
|
668
|
+
args: dt(t),
|
|
669
|
+
options: dt({
|
|
670
670
|
initialNumItems: r,
|
|
671
671
|
id: i
|
|
672
672
|
})
|
|
673
673
|
});
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Pt(e) {
|
|
676
676
|
return JSON.parse(e).type === "paginated";
|
|
677
677
|
}
|
|
678
678
|
//#endregion
|
|
679
679
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/local_state.js
|
|
680
|
-
var
|
|
680
|
+
var Ft = Object.defineProperty, It = (e, t, n) => t in e ? Ft(e, t, {
|
|
681
681
|
enumerable: !0,
|
|
682
682
|
configurable: !0,
|
|
683
683
|
writable: !0,
|
|
684
684
|
value: n
|
|
685
|
-
}) : e[t] = n,
|
|
685
|
+
}) : e[t] = n, G = (e, t, n) => It(e, typeof t == "symbol" ? t : t + "", n), Lt = class {
|
|
686
686
|
constructor() {
|
|
687
|
-
|
|
687
|
+
G(this, "nextQueryId"), G(this, "querySetVersion"), G(this, "querySet"), G(this, "queryIdToToken"), G(this, "identityVersion"), G(this, "auth"), G(this, "outstandingQueriesOlderThanRestart"), G(this, "outstandingAuthOlderThanRestart"), G(this, "paused"), G(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
688
688
|
}
|
|
689
689
|
hasSyncedPastLastReconnect() {
|
|
690
690
|
return this.outstandingQueriesOlderThanRestart.size === 0 && !this.outstandingAuthOlderThanRestart;
|
|
@@ -693,7 +693,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
693
693
|
this.outstandingAuthOlderThanRestart = !1;
|
|
694
694
|
}
|
|
695
695
|
subscribe(e, t, n, r) {
|
|
696
|
-
let i =
|
|
696
|
+
let i = jt(e), a = Mt(i, t), o = this.querySet.get(a);
|
|
697
697
|
if (o !== void 0) return o.numSubscribers += 1, {
|
|
698
698
|
queryToken: a,
|
|
699
699
|
modification: null,
|
|
@@ -713,7 +713,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
713
713
|
type: "Add",
|
|
714
714
|
queryId: e,
|
|
715
715
|
udfPath: i,
|
|
716
|
-
args: [
|
|
716
|
+
args: [dt(t)],
|
|
717
717
|
journal: n,
|
|
718
718
|
componentPath: r
|
|
719
719
|
};
|
|
@@ -748,7 +748,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
queryId(e, t) {
|
|
751
|
-
let n =
|
|
751
|
+
let n = Mt(jt(e), t), r = this.querySet.get(n);
|
|
752
752
|
return r === void 0 ? null : r.id;
|
|
753
753
|
}
|
|
754
754
|
isCurrentOrNewerAuthVersion(e) {
|
|
@@ -820,7 +820,7 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
820
820
|
type: "Add",
|
|
821
821
|
queryId: t.id,
|
|
822
822
|
udfPath: t.canonicalizedUdfPath,
|
|
823
|
-
args: [
|
|
823
|
+
args: [dt(t.args)],
|
|
824
824
|
journal: t.journal,
|
|
825
825
|
componentPath: t.componentPath
|
|
826
826
|
};
|
|
@@ -878,14 +878,14 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
878
878
|
};
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
},
|
|
881
|
+
}, Rt = Object.defineProperty, zt = (e, t, n) => t in e ? Rt(e, t, {
|
|
882
882
|
enumerable: !0,
|
|
883
883
|
configurable: !0,
|
|
884
884
|
writable: !0,
|
|
885
885
|
value: n
|
|
886
|
-
}) : e[t] = n,
|
|
886
|
+
}) : e[t] = n, Bt = (e, t, n) => zt(e, typeof t == "symbol" ? t : t + "", n), Vt = class {
|
|
887
887
|
constructor(e, t) {
|
|
888
|
-
this.logger = e, this.markConnectionStateDirty = t,
|
|
888
|
+
this.logger = e, this.markConnectionStateDirty = t, Bt(this, "inflightRequests"), Bt(this, "requestsOlderThanRestart"), Bt(this, "inflightMutationsCount", 0), Bt(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
889
889
|
}
|
|
890
890
|
request(e, t) {
|
|
891
891
|
let n = new Promise((n) => {
|
|
@@ -905,19 +905,19 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
905
905
|
let t = this.inflightRequests.get(e.requestId);
|
|
906
906
|
if (t === void 0 || t.status.status === "Completed") return null;
|
|
907
907
|
let n = t.message.type === "Mutation" ? "mutation" : "action", r = t.message.udfPath;
|
|
908
|
-
for (let t of e.logLines)
|
|
908
|
+
for (let t of e.logLines) Dt(this.logger, "info", n, r, t);
|
|
909
909
|
let i = t.status, a, o;
|
|
910
910
|
if (e.success) a = {
|
|
911
911
|
success: !0,
|
|
912
912
|
logLines: e.logLines,
|
|
913
|
-
value:
|
|
913
|
+
value: at(e.result)
|
|
914
914
|
}, o = () => i.onResult(a);
|
|
915
915
|
else {
|
|
916
916
|
let t = e.result, { errorData: s } = e;
|
|
917
|
-
|
|
917
|
+
Dt(this.logger, "error", n, r, t), a = {
|
|
918
918
|
success: !1,
|
|
919
919
|
errorMessage: t,
|
|
920
|
-
errorData: s === void 0 ? void 0 :
|
|
920
|
+
errorData: s === void 0 ? void 0 : at(s),
|
|
921
921
|
logLines: e.logLines
|
|
922
922
|
}, o = () => i.onResult(a);
|
|
923
923
|
}
|
|
@@ -989,19 +989,19 @@ var It = Object.defineProperty, Lt = (e, t, n) => t in e ? It(e, t, {
|
|
|
989
989
|
inflightActions() {
|
|
990
990
|
return this.inflightActionsCount;
|
|
991
991
|
}
|
|
992
|
-
},
|
|
993
|
-
function
|
|
994
|
-
return e[
|
|
992
|
+
}, Ht = Symbol.for("functionName"), Ut = Symbol.for("toReferencePath");
|
|
993
|
+
function Wt(e) {
|
|
994
|
+
return e[Ut] ?? null;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Gt(e) {
|
|
997
997
|
return e.startsWith("function://");
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function Kt(e) {
|
|
1000
1000
|
let t;
|
|
1001
|
-
if (typeof e == "string") t =
|
|
1002
|
-
else if (e[
|
|
1001
|
+
if (typeof e == "string") t = Gt(e) ? { functionHandle: e } : { name: e };
|
|
1002
|
+
else if (e[Ht]) t = { name: e[Ht] };
|
|
1003
1003
|
else {
|
|
1004
|
-
let n =
|
|
1004
|
+
let n = Wt(e);
|
|
1005
1005
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1006
1006
|
t = { reference: n };
|
|
1007
1007
|
}
|
|
@@ -1009,21 +1009,21 @@ function qt(e) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
//#endregion
|
|
1011
1011
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/server/api.js
|
|
1012
|
-
function
|
|
1013
|
-
let t =
|
|
1012
|
+
function K(e) {
|
|
1013
|
+
let t = Kt(e);
|
|
1014
1014
|
if (t.name === void 0) throw t.functionHandle === void 0 ? t.reference === void 0 ? Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`) : Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`) : Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`);
|
|
1015
1015
|
if (typeof e == "string") return e;
|
|
1016
|
-
let n = e[
|
|
1016
|
+
let n = e[Ht];
|
|
1017
1017
|
if (!n) throw Error(`${e} is not a functionReference`);
|
|
1018
1018
|
return n;
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return { [
|
|
1020
|
+
function qt(e) {
|
|
1021
|
+
return { [Ht]: e };
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Jt(e = []) {
|
|
1024
1024
|
return new Proxy({}, { get(t, n) {
|
|
1025
|
-
if (typeof n == "string") return
|
|
1026
|
-
if (n ===
|
|
1025
|
+
if (typeof n == "string") return Jt([...e, n]);
|
|
1026
|
+
if (n === Ht) {
|
|
1027
1027
|
if (e.length < 2) {
|
|
1028
1028
|
let t = ["api", ...e].join(".");
|
|
1029
1029
|
throw Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${t}\``);
|
|
@@ -1034,32 +1034,32 @@ function Yt(e = []) {
|
|
|
1034
1034
|
else return;
|
|
1035
1035
|
} });
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1037
|
+
Jt();
|
|
1038
1038
|
//#endregion
|
|
1039
1039
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/optimistic_updates_impl.js
|
|
1040
|
-
var
|
|
1040
|
+
var Yt = Object.defineProperty, Xt = (e, t, n) => t in e ? Yt(e, t, {
|
|
1041
1041
|
enumerable: !0,
|
|
1042
1042
|
configurable: !0,
|
|
1043
1043
|
writable: !0,
|
|
1044
1044
|
value: n
|
|
1045
|
-
}) : e[t] = n,
|
|
1045
|
+
}) : e[t] = n, Zt = (e, t, n) => Xt(e, typeof t == "symbol" ? t : t + "", n), Qt = class e {
|
|
1046
1046
|
constructor(e) {
|
|
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 = Ve(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) {
|
|
1054
|
-
let n = [], r =
|
|
1055
|
-
for (let t of this.queryResults.values()) t.udfPath ===
|
|
1054
|
+
let n = [], r = K(t);
|
|
1055
|
+
for (let t of this.queryResults.values()) t.udfPath === jt(r) && n.push({
|
|
1056
1056
|
args: t.args,
|
|
1057
1057
|
value: e.queryValue(t.result)
|
|
1058
1058
|
});
|
|
1059
1059
|
return n;
|
|
1060
1060
|
}
|
|
1061
1061
|
setQuery(e, t, n) {
|
|
1062
|
-
let r =
|
|
1062
|
+
let r = Ve(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,
|
|
@@ -1075,15 +1075,15 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1075
1075
|
static queryValue(e) {
|
|
1076
1076
|
if (e !== void 0 && e.success) return e.value;
|
|
1077
1077
|
}
|
|
1078
|
-
},
|
|
1078
|
+
}, $t = class {
|
|
1079
1079
|
constructor() {
|
|
1080
|
-
|
|
1080
|
+
Zt(this, "queryResults"), Zt(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1081
1081
|
}
|
|
1082
1082
|
ingestQueryResultsFromServer(e, t) {
|
|
1083
1083
|
this.optimisticUpdates = this.optimisticUpdates.filter((e) => !t.has(e.mutationId));
|
|
1084
1084
|
let n = this.queryResults;
|
|
1085
1085
|
this.queryResults = new Map(e);
|
|
1086
|
-
let r = new
|
|
1086
|
+
let r = new Qt(this.queryResults);
|
|
1087
1087
|
for (let e of this.optimisticUpdates) e.update(r);
|
|
1088
1088
|
let i = [];
|
|
1089
1089
|
for (let [e, t] of this.queryResults) {
|
|
@@ -1097,7 +1097,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1097
1097
|
update: e,
|
|
1098
1098
|
mutationId: t
|
|
1099
1099
|
});
|
|
1100
|
-
let n = new
|
|
1100
|
+
let n = new Qt(this.queryResults);
|
|
1101
1101
|
return e(n), n.modifiedQueries;
|
|
1102
1102
|
}
|
|
1103
1103
|
rawQueryResult(e) {
|
|
@@ -1110,7 +1110,7 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1110
1110
|
let n = t.result;
|
|
1111
1111
|
if (n !== void 0) {
|
|
1112
1112
|
if (n.success) return n.value;
|
|
1113
|
-
throw n.errorData === void 0 ? Error(
|
|
1113
|
+
throw n.errorData === void 0 ? Error(kt("query", t.udfPath, n)) : At(n, new vt(kt("query", t.udfPath, n)));
|
|
1114
1114
|
}
|
|
1115
1115
|
}
|
|
1116
1116
|
hasQueryResult(e) {
|
|
@@ -1119,14 +1119,14 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1119
1119
|
queryLogs(e) {
|
|
1120
1120
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1121
1121
|
}
|
|
1122
|
-
},
|
|
1122
|
+
}, en = Object.defineProperty, tn = (e, t, n) => t in e ? en(e, t, {
|
|
1123
1123
|
enumerable: !0,
|
|
1124
1124
|
configurable: !0,
|
|
1125
1125
|
writable: !0,
|
|
1126
1126
|
value: n
|
|
1127
|
-
}) : e[t] = n,
|
|
1127
|
+
}) : e[t] = n, nn = (e, t, n) => tn(e, typeof t == "symbol" ? t : t + "", n), rn = class e {
|
|
1128
1128
|
constructor(e, t) {
|
|
1129
|
-
|
|
1129
|
+
nn(this, "low"), nn(this, "high"), nn(this, "__isUnsignedLong__"), this.low = e | 0, this.high = t | 0, this.__isUnsignedLong__ = !0;
|
|
1130
1130
|
}
|
|
1131
1131
|
static isLong(e) {
|
|
1132
1132
|
return (e && e.__isUnsignedLong__) === !0;
|
|
@@ -1148,10 +1148,10 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1148
1148
|
];
|
|
1149
1149
|
}
|
|
1150
1150
|
static fromNumber(t) {
|
|
1151
|
-
return isNaN(t) || t < 0 ?
|
|
1151
|
+
return isNaN(t) || t < 0 ? an : t >= cn ? ln : new e(t % sn | 0, t / sn | 0);
|
|
1152
1152
|
}
|
|
1153
1153
|
toString() {
|
|
1154
|
-
return (BigInt(this.high) * BigInt(
|
|
1154
|
+
return (BigInt(this.high) * BigInt(sn) + BigInt(this.low)).toString();
|
|
1155
1155
|
}
|
|
1156
1156
|
equals(t) {
|
|
1157
1157
|
return e.isLong(t) || (t = e.fromValue(t)), this.high >>> 31 == 1 && t.high >>> 31 == 1 ? !1 : this.high === t.high && this.low === t.low;
|
|
@@ -1168,16 +1168,16 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1168
1168
|
static fromValue(t) {
|
|
1169
1169
|
return typeof t == "number" ? e.fromNumber(t) : new e(t.low, t.high);
|
|
1170
1170
|
}
|
|
1171
|
-
},
|
|
1171
|
+
}, an = new rn(0, 0), on = 65536, sn = on * on, cn = sn * sn, ln = new rn(-1, -1), un = Object.defineProperty, dn = (e, t, n) => t in e ? un(e, t, {
|
|
1172
1172
|
enumerable: !0,
|
|
1173
1173
|
configurable: !0,
|
|
1174
1174
|
writable: !0,
|
|
1175
1175
|
value: n
|
|
1176
|
-
}) : e[t] = n,
|
|
1176
|
+
}) : e[t] = n, fn = (e, t, n) => dn(e, typeof t == "symbol" ? t : t + "", n), pn = class {
|
|
1177
1177
|
constructor(e, t) {
|
|
1178
|
-
|
|
1178
|
+
fn(this, "version"), fn(this, "remoteQuerySet"), fn(this, "queryPath"), fn(this, "logger"), this.version = {
|
|
1179
1179
|
querySet: 0,
|
|
1180
|
-
ts:
|
|
1180
|
+
ts: rn.fromNumber(0),
|
|
1181
1181
|
identity: 0
|
|
1182
1182
|
}, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = t;
|
|
1183
1183
|
}
|
|
@@ -1187,8 +1187,8 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1187
1187
|
for (let t of e.modifications) switch (t.type) {
|
|
1188
1188
|
case "QueryUpdated": {
|
|
1189
1189
|
let e = this.queryPath(t.queryId);
|
|
1190
|
-
if (e) for (let n of t.logLines)
|
|
1191
|
-
let n =
|
|
1190
|
+
if (e) for (let n of t.logLines) Dt(this.logger, "info", "query", e, n);
|
|
1191
|
+
let n = at(t.value ?? null);
|
|
1192
1192
|
this.remoteQuerySet.set(t.queryId, {
|
|
1193
1193
|
success: !0,
|
|
1194
1194
|
value: n,
|
|
@@ -1198,12 +1198,12 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
case "QueryFailed": {
|
|
1200
1200
|
let e = this.queryPath(t.queryId);
|
|
1201
|
-
if (e) for (let n of t.logLines)
|
|
1201
|
+
if (e) for (let n of t.logLines) Dt(this.logger, "info", "query", e, n);
|
|
1202
1202
|
let { errorData: n } = t;
|
|
1203
1203
|
this.remoteQuerySet.set(t.queryId, {
|
|
1204
1204
|
success: !1,
|
|
1205
1205
|
errorMessage: t.errorMessage,
|
|
1206
|
-
errorData: n === void 0 ? void 0 :
|
|
1206
|
+
errorData: n === void 0 ? void 0 : at(n),
|
|
1207
1207
|
logLines: t.logLines
|
|
1208
1208
|
});
|
|
1209
1209
|
break;
|
|
@@ -1224,14 +1224,14 @@ var Xt = Object.defineProperty, Zt = (e, t, n) => t in e ? Xt(e, t, {
|
|
|
1224
1224
|
};
|
|
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
|
+
function mn(e) {
|
|
1228
|
+
let t = Le(e);
|
|
1229
|
+
return rn.fromBytesLE(Array.from(t));
|
|
1230
|
+
}
|
|
1227
1231
|
function hn(e) {
|
|
1228
|
-
|
|
1229
|
-
return an.fromBytesLE(Array.from(t));
|
|
1232
|
+
return Be(new Uint8Array(e.toBytesLE()));
|
|
1230
1233
|
}
|
|
1231
1234
|
function gn(e) {
|
|
1232
|
-
return He(new Uint8Array(e.toBytesLE()));
|
|
1233
|
-
}
|
|
1234
|
-
function _n(e) {
|
|
1235
1235
|
switch (e.type) {
|
|
1236
1236
|
case "FatalError":
|
|
1237
1237
|
case "AuthError":
|
|
@@ -1240,23 +1240,23 @@ function _n(e) {
|
|
|
1240
1240
|
case "Ping": return { ...e };
|
|
1241
1241
|
case "MutationResponse": return e.success ? {
|
|
1242
1242
|
...e,
|
|
1243
|
-
ts:
|
|
1243
|
+
ts: mn(e.ts)
|
|
1244
1244
|
} : { ...e };
|
|
1245
1245
|
case "Transition": return {
|
|
1246
1246
|
...e,
|
|
1247
1247
|
startVersion: {
|
|
1248
1248
|
...e.startVersion,
|
|
1249
|
-
ts:
|
|
1249
|
+
ts: mn(e.startVersion.ts)
|
|
1250
1250
|
},
|
|
1251
1251
|
endVersion: {
|
|
1252
1252
|
...e.endVersion,
|
|
1253
|
-
ts:
|
|
1253
|
+
ts: mn(e.endVersion.ts)
|
|
1254
1254
|
}
|
|
1255
1255
|
};
|
|
1256
1256
|
default:
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function _n(e) {
|
|
1260
1260
|
switch (e.type) {
|
|
1261
1261
|
case "Authenticate":
|
|
1262
1262
|
case "ModifyQuerySet":
|
|
@@ -1268,26 +1268,26 @@ function vn(e) {
|
|
|
1268
1268
|
maxObservedTimestamp: void 0
|
|
1269
1269
|
} : {
|
|
1270
1270
|
...e,
|
|
1271
|
-
maxObservedTimestamp:
|
|
1271
|
+
maxObservedTimestamp: hn(e.maxObservedTimestamp)
|
|
1272
1272
|
};
|
|
1273
1273
|
default:
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
1276
|
//#endregion
|
|
1277
1277
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/web_socket_manager.js
|
|
1278
|
-
var
|
|
1278
|
+
var vn = Object.defineProperty, yn = (e, t, n) => t in e ? vn(e, t, {
|
|
1279
1279
|
enumerable: !0,
|
|
1280
1280
|
configurable: !0,
|
|
1281
1281
|
writable: !0,
|
|
1282
1282
|
value: n
|
|
1283
|
-
}) : e[t] = n,
|
|
1284
|
-
function
|
|
1285
|
-
return
|
|
1283
|
+
}) : e[t] = n, q = (e, t, n) => yn(e, typeof t == "symbol" ? t : t + "", n), bn = 1e3, xn = 1001, Sn = 1005, Cn = 4040, wn;
|
|
1284
|
+
function Tn() {
|
|
1285
|
+
return wn === void 0 && (wn = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(wn + performance.now());
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1288
|
-
return `t=${Math.round((
|
|
1287
|
+
function En() {
|
|
1288
|
+
return `t=${Math.round((Tn() - wn) / 100) / 10}s`;
|
|
1289
1289
|
}
|
|
1290
|
-
var
|
|
1290
|
+
var Dn = {
|
|
1291
1291
|
InternalServerError: { timeout: 1e3 },
|
|
1292
1292
|
SubscriptionsWorkerFullError: { timeout: 3e3 },
|
|
1293
1293
|
TooManyConcurrentRequests: { timeout: 3e3 },
|
|
@@ -1303,14 +1303,14 @@ var On = {
|
|
|
1303
1303
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1304
1304
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1305
1305
|
};
|
|
1306
|
-
function
|
|
1306
|
+
function On(e) {
|
|
1307
1307
|
if (e === void 0) return "Unknown";
|
|
1308
|
-
for (let t of Object.keys(
|
|
1308
|
+
for (let t of Object.keys(Dn)) if (e.startsWith(t)) return t;
|
|
1309
1309
|
return "Unknown";
|
|
1310
1310
|
}
|
|
1311
|
-
var
|
|
1311
|
+
var kn = class {
|
|
1312
1312
|
constructor(e, t, n, r, i, a) {
|
|
1313
|
-
this.markConnectionStateDirty = i, this.debug = a,
|
|
1313
|
+
this.markConnectionStateDirty = i, this.debug = a, q(this, "socket"), q(this, "connectionCount"), q(this, "_hasEverConnected", !1), q(this, "lastCloseReason"), q(this, "transitionChunkBuffer", null), q(this, "defaultInitialBackoff"), q(this, "maxBackoff"), q(this, "retries"), q(this, "serverInactivityThreshold"), q(this, "reconnectDueToServerInactivityTimeout"), q(this, "scheduledReconnect", null), q(this, "networkOnlineHandler", null), q(this, "pendingNetworkRecoveryInfo", null), q(this, "uri"), q(this, "onOpen"), q(this, "onResume"), q(this, "onMessage"), q(this, "webSocketConstructor"), q(this, "logger"), q(this, "onServerDisconnectError"), this.webSocketConstructor = n, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = t.onOpen, this.onResume = t.onResume, this.onMessage = t.onMessage, this.onServerDisconnectError = t.onServerDisconnectError, this.logger = r, this.setupNetworkListener(), this.connect();
|
|
1314
1314
|
}
|
|
1315
1315
|
setSocketState(e) {
|
|
1316
1316
|
this.socket = e, this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused" in this.socket ? this.socket.paused : void 0}`), this.markConnectionStateDirty();
|
|
@@ -1336,7 +1336,7 @@ var An = class {
|
|
|
1336
1336
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1337
1337
|
let e = this.transitionChunkBuffer.chunks.join("");
|
|
1338
1338
|
this.transitionChunkBuffer = null;
|
|
1339
|
-
let t =
|
|
1339
|
+
let t = gn(JSON.parse(e));
|
|
1340
1340
|
if (t.type !== "Transition") throw Error(`Expected Transition, got ${t.type} after assembling chunks`);
|
|
1341
1341
|
return t;
|
|
1342
1342
|
}
|
|
@@ -1359,8 +1359,8 @@ var An = class {
|
|
|
1359
1359
|
}), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
|
|
1360
1360
|
connectionCount: this.connectionCount,
|
|
1361
1361
|
lastCloseReason: this.lastCloseReason,
|
|
1362
|
-
clientTs:
|
|
1363
|
-
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at",
|
|
1362
|
+
clientTs: Tn()
|
|
1363
|
+
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log("WebSocket reconnected at", En(), "after disconnect due to", this.lastCloseReason) : this.logger.log("WebSocket reconnected at", En())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1364
1364
|
let { timeSavedMs: e } = this.pendingNetworkRecoveryInfo;
|
|
1365
1365
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1366
1366
|
type: "Event",
|
|
@@ -1374,7 +1374,7 @@ var An = class {
|
|
|
1374
1374
|
t && this.logger.log(`WebSocket error message: ${t}`);
|
|
1375
1375
|
}, e.onmessage = (e) => {
|
|
1376
1376
|
this.resetServerInactivityTimeout();
|
|
1377
|
-
let t = e.data.length, n =
|
|
1377
|
+
let t = e.data.length, n = gn(JSON.parse(e.data));
|
|
1378
1378
|
if (this._logVerbose(`received ws message with type ${n.type}`), n.type !== "Ping") {
|
|
1379
1379
|
if (n.type === "TransitionChunk") {
|
|
1380
1380
|
let e = this.assembleTransition(n);
|
|
@@ -1387,11 +1387,11 @@ var An = class {
|
|
|
1387
1387
|
}), this.onMessage(n).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1388
1388
|
}
|
|
1389
1389
|
}, e.onclose = (e) => {
|
|
1390
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !==
|
|
1390
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = e.reason || `closed with code ${e.code}`), e.code !== bn && e.code !== xn && e.code !== Sn && e.code !== Cn) {
|
|
1391
1391
|
let t = `WebSocket closed with code ${e.code}`;
|
|
1392
1392
|
e.reason && (t += `: ${e.reason}`), this.logger.log(t), this.onServerDisconnectError && e.reason && this.onServerDisconnectError(t);
|
|
1393
1393
|
}
|
|
1394
|
-
let t =
|
|
1394
|
+
let t = On(e.reason);
|
|
1395
1395
|
this.scheduleReconnect(t);
|
|
1396
1396
|
};
|
|
1397
1397
|
}
|
|
@@ -1404,7 +1404,7 @@ var An = class {
|
|
|
1404
1404
|
...e.type === "Authenticate" && e.tokenType === "User" ? { value: `...${e.value.slice(-7)}` } : {}
|
|
1405
1405
|
};
|
|
1406
1406
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1407
|
-
let n =
|
|
1407
|
+
let n = _n(e), r = JSON.stringify(n), i = !1;
|
|
1408
1408
|
try {
|
|
1409
1409
|
this.socket.ws.send(r), i = !0;
|
|
1410
1410
|
} catch (e) {
|
|
@@ -1423,7 +1423,7 @@ var An = class {
|
|
|
1423
1423
|
this.scheduledReconnect &&= (clearTimeout(this.scheduledReconnect.timeout), null), this.socket = { state: "disconnected" };
|
|
1424
1424
|
let t = this.nextBackoff(e);
|
|
1425
1425
|
this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(t)}ms`);
|
|
1426
|
-
let n =
|
|
1426
|
+
let n = Tn(), r = setTimeout(() => {
|
|
1427
1427
|
this.scheduledReconnect?.timeout === r && (this.scheduledReconnect = null, this.connect());
|
|
1428
1428
|
}, t);
|
|
1429
1429
|
this.scheduledReconnect = {
|
|
@@ -1541,7 +1541,7 @@ var An = class {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
let e = null;
|
|
1543
1543
|
if (this.scheduledReconnect) {
|
|
1544
|
-
let t =
|
|
1544
|
+
let t = Tn() - this.scheduledReconnect.scheduledAt;
|
|
1545
1545
|
e = Math.max(0, this.scheduledReconnect.backoffMs - t), this._logVerbose(`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(t)}ms)`), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
|
|
1546
1546
|
}
|
|
1547
1547
|
this.logger.log("Network recovery detected, reconnecting immediately"), this.pendingNetworkRecoveryInfo = e === null ? null : { timeSavedMs: e }, this.connect();
|
|
@@ -1561,7 +1561,7 @@ var An = class {
|
|
|
1561
1561
|
}, this._hasEverConnected = !0, this.onOpen({
|
|
1562
1562
|
connectionCount: this.connectionCount,
|
|
1563
1563
|
lastCloseReason: this.lastCloseReason,
|
|
1564
|
-
clientTs:
|
|
1564
|
+
clientTs: Tn()
|
|
1565
1565
|
})) : this.socket.paused === "yes" && (this.socket = {
|
|
1566
1566
|
...this.socket,
|
|
1567
1567
|
paused: "no"
|
|
@@ -1586,14 +1586,14 @@ var An = class {
|
|
|
1586
1586
|
this.logger.logVerbose(e);
|
|
1587
1587
|
}
|
|
1588
1588
|
nextBackoff(e) {
|
|
1589
|
-
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
1589
|
+
let t = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : Dn[e].timeout) * 2 ** this.retries;
|
|
1590
1590
|
this.retries += 1;
|
|
1591
1591
|
let n = Math.min(t, this.maxBackoff);
|
|
1592
1592
|
return n + n * (Math.random() - .5);
|
|
1593
1593
|
}
|
|
1594
1594
|
reportLargeTransition({ transition: e, messageLength: t }) {
|
|
1595
1595
|
if (e.clientClockSkew === void 0 || e.serverTs === void 0) return;
|
|
1596
|
-
let n =
|
|
1596
|
+
let n = Tn() - e.clientClockSkew - e.serverTs / 1e6, r = `${Math.round(n)}ms`, i = `${Math.round(t / 1e4) / 100}MB`, a = t / (n / 1e3), o = `${Math.round(a / 1e4) / 100}MB per second`;
|
|
1597
1597
|
this._logVerbose(`received ${i} transition in ${r} at ${o}`), t > 2e7 ? this.logger.log(`received query results totaling more that 20MB (${i}) which will take a long time to download on slower connections`) : n > 2e4 && this.logger.log(`received query results totaling ${i} which took more than 20s to arrive (${r})`), this.debug && this.sendMessage({
|
|
1598
1598
|
type: "Event",
|
|
1599
1599
|
eventType: "ClientReceivedTransition",
|
|
@@ -1606,10 +1606,10 @@ var An = class {
|
|
|
1606
1606
|
};
|
|
1607
1607
|
//#endregion
|
|
1608
1608
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/session.js
|
|
1609
|
-
function
|
|
1610
|
-
return
|
|
1609
|
+
function An() {
|
|
1610
|
+
return jn();
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function jn() {
|
|
1613
1613
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
|
|
1614
1614
|
let t = Math.random() * 16 | 0;
|
|
1615
1615
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
@@ -1617,15 +1617,15 @@ function Mn() {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
//#endregion
|
|
1619
1619
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/vendor/jwt-decode/index.js
|
|
1620
|
-
var
|
|
1621
|
-
|
|
1622
|
-
function
|
|
1620
|
+
var Mn = class extends Error {};
|
|
1621
|
+
Mn.prototype.name = "InvalidTokenError";
|
|
1622
|
+
function Nn(e) {
|
|
1623
1623
|
return decodeURIComponent(atob(e).replace(/(.)/g, (e, t) => {
|
|
1624
1624
|
let n = t.charCodeAt(0).toString(16).toUpperCase();
|
|
1625
1625
|
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
1626
1626
|
}));
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function Pn(e) {
|
|
1629
1629
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
1630
1630
|
switch (t.length % 4) {
|
|
1631
1631
|
case 0: break;
|
|
@@ -1638,38 +1638,38 @@ function Fn(e) {
|
|
|
1638
1638
|
default: throw Error("base64 string is not of the correct length");
|
|
1639
1639
|
}
|
|
1640
1640
|
try {
|
|
1641
|
-
return
|
|
1641
|
+
return Nn(t);
|
|
1642
1642
|
} catch {
|
|
1643
1643
|
return atob(t);
|
|
1644
1644
|
}
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1647
|
-
if (typeof e != "string") throw new
|
|
1646
|
+
function Fn(e, t) {
|
|
1647
|
+
if (typeof e != "string") throw new Mn("Invalid token specified: must be a string");
|
|
1648
1648
|
t ||= {};
|
|
1649
1649
|
let n = t.header === !0 ? 0 : 1, r = e.split(".")[n];
|
|
1650
|
-
if (typeof r != "string") throw new
|
|
1650
|
+
if (typeof r != "string") throw new Mn(`Invalid token specified: missing part #${n + 1}`);
|
|
1651
1651
|
let i;
|
|
1652
1652
|
try {
|
|
1653
|
-
i =
|
|
1653
|
+
i = Pn(r);
|
|
1654
1654
|
} catch (e) {
|
|
1655
|
-
throw new
|
|
1655
|
+
throw new Mn(`Invalid token specified: invalid base64 for part #${n + 1} (${e.message})`);
|
|
1656
1656
|
}
|
|
1657
1657
|
try {
|
|
1658
1658
|
return JSON.parse(i);
|
|
1659
1659
|
} catch (e) {
|
|
1660
|
-
throw new
|
|
1660
|
+
throw new Mn(`Invalid token specified: invalid json for part #${n + 1} (${e.message})`);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
1663
1663
|
//#endregion
|
|
1664
1664
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/authentication_manager.js
|
|
1665
|
-
var
|
|
1665
|
+
var In = Object.defineProperty, Ln = (e, t, n) => t in e ? In(e, t, {
|
|
1666
1666
|
enumerable: !0,
|
|
1667
1667
|
configurable: !0,
|
|
1668
1668
|
writable: !0,
|
|
1669
1669
|
value: n
|
|
1670
|
-
}) : e[t] = n,
|
|
1670
|
+
}) : e[t] = n, J = (e, t, n) => Ln(e, typeof t == "symbol" ? t : t + "", n), Rn = 480 * 60 * 60 * 1e3, zn = 2, Bn = class {
|
|
1671
1671
|
constructor(e, t, n) {
|
|
1672
|
-
|
|
1672
|
+
J(this, "authState", { state: "noAuth" }), J(this, "configVersion", 0), J(this, "syncState"), J(this, "authenticate"), J(this, "stopSocket"), J(this, "tryRestartSocket"), J(this, "pauseSocket"), J(this, "resumeSocket"), J(this, "clearAuth"), J(this, "logger"), J(this, "refreshTokenLeewaySeconds"), J(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = t.authenticate, this.stopSocket = t.stopSocket, this.tryRestartSocket = t.tryRestartSocket, this.pauseSocket = t.pauseSocket, this.resumeSocket = t.resumeSocket, this.clearAuth = t.clearAuth, this.logger = n.logger, this.refreshTokenLeewaySeconds = n.refreshTokenLeewaySeconds;
|
|
1673
1673
|
}
|
|
1674
1674
|
async setConfig(e, t) {
|
|
1675
1675
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -1711,11 +1711,11 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
|
|
|
1711
1711
|
this.tryToReauthenticate(e);
|
|
1712
1712
|
}
|
|
1713
1713
|
async tryToReauthenticate(e) {
|
|
1714
|
-
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
1714
|
+
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), this.authState.state === "noAuth" || this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= zn) {
|
|
1715
1715
|
this.logger.error(`Failed to authenticate: "${e.error}", check your server auth config`), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
1716
1716
|
return;
|
|
1717
1717
|
}
|
|
1718
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${
|
|
1718
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(`retrying reauthentication, ${zn - this.tokenConfirmationAttempts} attempts remaining`)), await this.stopSocket();
|
|
1719
1719
|
let t = await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken, { forceRefreshToken: !0 });
|
|
1720
1720
|
t.isFromOutdatedConfig || (t.value && this.syncState.isNewAuth(t.value) ? (this.authenticate(t.value), this.setAuthState({
|
|
1721
1721
|
state: "waitingForServerConfirmationOfFreshToken",
|
|
@@ -1755,7 +1755,7 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
|
|
|
1755
1755
|
this.logger.error("Auth token does not live long enough, cannot refetch the token");
|
|
1756
1756
|
return;
|
|
1757
1757
|
}
|
|
1758
|
-
let a = Math.min(
|
|
1758
|
+
let a = Math.min(Rn, (i - this.refreshTokenLeewaySeconds) * 1e3);
|
|
1759
1759
|
a <= 0 && (this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${i}s`), a = 0);
|
|
1760
1760
|
let o = setTimeout(() => {
|
|
1761
1761
|
this._logVerbose("running scheduled token refetch"), this.refetchToken();
|
|
@@ -1805,7 +1805,7 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
decodeToken(e) {
|
|
1807
1807
|
try {
|
|
1808
|
-
return
|
|
1808
|
+
return Fn(e);
|
|
1809
1809
|
} catch (e) {
|
|
1810
1810
|
return this._logVerbose(`Error decoding token: ${e instanceof Error ? e.message : "Unknown error"}`), null;
|
|
1811
1811
|
}
|
|
@@ -1813,41 +1813,41 @@ var Ln = Object.defineProperty, Rn = (e, t, n) => t in e ? Ln(e, t, {
|
|
|
1813
1813
|
_logVerbose(e) {
|
|
1814
1814
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
1815
1815
|
}
|
|
1816
|
-
},
|
|
1816
|
+
}, Vn = [
|
|
1817
1817
|
"convexClientConstructed",
|
|
1818
1818
|
"convexWebSocketOpen",
|
|
1819
1819
|
"convexFirstMessageReceived"
|
|
1820
1820
|
];
|
|
1821
|
-
function
|
|
1821
|
+
function Hn(e, t) {
|
|
1822
1822
|
let n = { sessionId: t };
|
|
1823
1823
|
typeof performance > "u" || !performance.mark || performance.mark(e, { detail: n });
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function Un(e) {
|
|
1826
1826
|
let t = e.name.slice(6);
|
|
1827
1827
|
return t = t.charAt(0).toLowerCase() + t.slice(1), {
|
|
1828
1828
|
name: t,
|
|
1829
1829
|
startTime: e.startTime
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function Wn(e) {
|
|
1833
1833
|
if (typeof performance > "u" || !performance.getEntriesByName) return [];
|
|
1834
1834
|
let t = [];
|
|
1835
|
-
for (let n of
|
|
1835
|
+
for (let n of Vn) {
|
|
1836
1836
|
let r = performance.getEntriesByName(n).filter((e) => e.entryType === "mark").filter((t) => t.detail.sessionId === e);
|
|
1837
1837
|
t.push(...r);
|
|
1838
1838
|
}
|
|
1839
|
-
return t.map(
|
|
1839
|
+
return t.map(Un);
|
|
1840
1840
|
}
|
|
1841
1841
|
//#endregion
|
|
1842
1842
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/client.js
|
|
1843
|
-
var
|
|
1843
|
+
var Gn = Object.defineProperty, Kn = (e, t, n) => t in e ? Gn(e, t, {
|
|
1844
1844
|
enumerable: !0,
|
|
1845
1845
|
configurable: !0,
|
|
1846
1846
|
writable: !0,
|
|
1847
1847
|
value: n
|
|
1848
|
-
}) : e[t] = n,
|
|
1848
|
+
}) : e[t] = n, Y = (e, t, n) => Kn(e, typeof t == "symbol" ? t : t + "", n), qn = class {
|
|
1849
1849
|
constructor(e, t, n) {
|
|
1850
|
-
if (
|
|
1850
|
+
if (Y(this, "address"), Y(this, "state"), Y(this, "requestManager"), Y(this, "webSocketManager"), Y(this, "authenticationManager"), Y(this, "remoteQuerySet"), Y(this, "optimisticQueryResults"), Y(this, "_transitionHandlerCounter", 0), Y(this, "_nextRequestId"), Y(this, "_onTransitionFns", /* @__PURE__ */ new Map()), Y(this, "_sessionId"), Y(this, "firstMessageReceived", !1), Y(this, "debug"), Y(this, "logger"), Y(this, "maxObservedTimestamp"), Y(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), Y(this, "nextConnectionStateSubscriberId", 0), Y(this, "_lastPublishedConnectionState"), Y(this, "markConnectionStateDirty", () => {
|
|
1851
1851
|
Promise.resolve().then(() => {
|
|
1852
1852
|
let e = this.connectionState();
|
|
1853
1853
|
if (JSON.stringify(e) !== JSON.stringify(this._lastPublishedConnectionState)) {
|
|
@@ -1855,25 +1855,25 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
1855
1855
|
for (let t of this.connectionStateSubscribers.values()) t(e);
|
|
1856
1856
|
}
|
|
1857
1857
|
});
|
|
1858
|
-
}),
|
|
1859
|
-
this.debug &&
|
|
1858
|
+
}), Y(this, "mark", (e) => {
|
|
1859
|
+
this.debug && Hn(e, this.sessionId);
|
|
1860
1860
|
}), typeof e == "object") throw Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");
|
|
1861
|
-
n?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
1861
|
+
n?.skipConvexDeploymentUrlCheck !== !0 && He(e), n = { ...n };
|
|
1862
1862
|
let r = n.authRefreshTokenLeewaySeconds ?? 10, i = n.webSocketConstructor;
|
|
1863
1863
|
if (!i && typeof WebSocket > "u") throw Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");
|
|
1864
|
-
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ?
|
|
1864
|
+
i ||= WebSocket, this.debug = n.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = n.logger === !1 ? Et({ verbose: n.verbose ?? !1 }) : n.logger !== !0 && n.logger ? n.logger : Tt({ verbose: n.verbose ?? !1 });
|
|
1865
1865
|
let a = e.search("://");
|
|
1866
1866
|
if (a === -1) throw Error("Provided address was not an absolute URL.");
|
|
1867
1867
|
let o = e.substring(a + 3), s = e.substring(0, a), c;
|
|
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/${
|
|
1872
|
-
this.state = new
|
|
1871
|
+
let l = `${c}://${o}/api/${Ae}/sync`;
|
|
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();
|
|
1875
1875
|
};
|
|
1876
|
-
this.authenticationManager = new
|
|
1876
|
+
this.authenticationManager = new Bn(this.state, {
|
|
1877
1877
|
authenticate: (e) => {
|
|
1878
1878
|
let t = this.state.setAuth(e);
|
|
1879
1879
|
return this.webSocketManager.sendMessage(t), t.baseVersion;
|
|
@@ -1888,9 +1888,9 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
1888
1888
|
}, {
|
|
1889
1889
|
logger: this.logger,
|
|
1890
1890
|
refreshTokenLeewaySeconds: r
|
|
1891
|
-
}), this.optimisticQueryResults = new
|
|
1891
|
+
}), this.optimisticQueryResults = new $t(), this.addOnTransitionHandler((e) => {
|
|
1892
1892
|
t(e.queries.map((e) => e.token));
|
|
1893
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
1893
|
+
}), this._nextRequestId = 0, this._sessionId = An();
|
|
1894
1894
|
let { unsavedChangesWarning: d } = n;
|
|
1895
1895
|
if (typeof window > "u" || window.addEventListener === void 0) {
|
|
1896
1896
|
if (d === !0) throw Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.");
|
|
@@ -1901,14 +1901,14 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
1901
1901
|
return (e || window.event).returnValue = t, t;
|
|
1902
1902
|
}
|
|
1903
1903
|
});
|
|
1904
|
-
this.webSocketManager = new
|
|
1904
|
+
this.webSocketManager = new kn(l, {
|
|
1905
1905
|
onOpen: (e) => {
|
|
1906
1906
|
this.mark("convexWebSocketOpen"), this.webSocketManager.sendMessage({
|
|
1907
1907
|
...e,
|
|
1908
1908
|
type: "Connect",
|
|
1909
1909
|
sessionId: this._sessionId,
|
|
1910
1910
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
1911
|
-
}), this.remoteQuerySet = new
|
|
1911
|
+
}), this.remoteQuerySet = new pn((e) => this.state.queryPath(e), this.logger);
|
|
1912
1912
|
let [t, n] = this.state.restart();
|
|
1913
1913
|
n && this.webSocketManager.sendMessage(n), this.webSocketManager.sendMessage(t);
|
|
1914
1914
|
for (let e of this.requestManager.restart()) this.webSocketManager.sendMessage(e);
|
|
@@ -1939,7 +1939,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
1939
1939
|
this.authenticationManager.onAuthError(e);
|
|
1940
1940
|
break;
|
|
1941
1941
|
case "FatalError": {
|
|
1942
|
-
let t =
|
|
1942
|
+
let t = Ot(this.logger, e.error);
|
|
1943
1943
|
throw this.webSocketManager.terminate(), t;
|
|
1944
1944
|
}
|
|
1945
1945
|
default:
|
|
@@ -1997,7 +1997,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
1997
1997
|
getCurrentAuthClaims() {
|
|
1998
1998
|
let e = this.state.getAuth(), t = {};
|
|
1999
1999
|
if (e && e.tokenType === "User") try {
|
|
2000
|
-
t = e ?
|
|
2000
|
+
t = e ? Fn(e.value) : {};
|
|
2001
2001
|
} catch {
|
|
2002
2002
|
t = {};
|
|
2003
2003
|
}
|
|
@@ -2022,7 +2022,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2022
2022
|
this.webSocketManager.sendMessage(e);
|
|
2023
2023
|
}
|
|
2024
2024
|
subscribe(e, t, n) {
|
|
2025
|
-
let r =
|
|
2025
|
+
let r = Ve(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 Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
2034
|
localQueryResult(e, t) {
|
|
2035
|
-
let n =
|
|
2035
|
+
let n = Mt(e, Ve(t));
|
|
2036
2036
|
return this.optimisticQueryResults.queryResult(n);
|
|
2037
2037
|
}
|
|
2038
2038
|
localQueryResultByToken(e) {
|
|
@@ -2042,11 +2042,11 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2042
2042
|
return this.optimisticQueryResults.hasQueryResult(e);
|
|
2043
2043
|
}
|
|
2044
2044
|
localQueryLogs(e, t) {
|
|
2045
|
-
let n =
|
|
2045
|
+
let n = Mt(e, Ve(t));
|
|
2046
2046
|
return this.optimisticQueryResults.queryLogs(n);
|
|
2047
2047
|
}
|
|
2048
2048
|
queryJournal(e, t) {
|
|
2049
|
-
let n =
|
|
2049
|
+
let n = Mt(e, Ve(t));
|
|
2050
2050
|
return this.state.queryJournal(n);
|
|
2051
2051
|
}
|
|
2052
2052
|
connectionState() {
|
|
@@ -2070,7 +2070,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
async mutation(e, t, n) {
|
|
2072
2072
|
let r = await this.mutationInternal(e, t, n);
|
|
2073
|
-
if (!r.success) throw r.errorData === void 0 ? Error(
|
|
2073
|
+
if (!r.success) throw r.errorData === void 0 ? Error(kt("mutation", e, r)) : At(r, new vt(kt("mutation", e, r)));
|
|
2074
2074
|
return r.value;
|
|
2075
2075
|
}
|
|
2076
2076
|
async mutationInternal(e, t, n, r) {
|
|
@@ -2078,7 +2078,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2078
2078
|
return i;
|
|
2079
2079
|
}
|
|
2080
2080
|
enqueueMutation(e, t, n, r) {
|
|
2081
|
-
let i =
|
|
2081
|
+
let i = Ve(t);
|
|
2082
2082
|
this.tryReportLongDisconnect();
|
|
2083
2083
|
let a = this.nextRequestId;
|
|
2084
2084
|
if (this._nextRequestId++, n !== void 0) {
|
|
@@ -2112,7 +2112,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2112
2112
|
requestId: a,
|
|
2113
2113
|
udfPath: e,
|
|
2114
2114
|
componentPath: r,
|
|
2115
|
-
args: [
|
|
2115
|
+
args: [dt(i)]
|
|
2116
2116
|
}, s = this.webSocketManager.sendMessage(o);
|
|
2117
2117
|
return {
|
|
2118
2118
|
requestId: a,
|
|
@@ -2121,18 +2121,18 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
async action(e, t) {
|
|
2123
2123
|
let n = await this.actionInternal(e, t);
|
|
2124
|
-
if (!n.success) throw n.errorData === void 0 ? Error(
|
|
2124
|
+
if (!n.success) throw n.errorData === void 0 ? Error(kt("action", e, n)) : At(n, new vt(kt("action", e, n)));
|
|
2125
2125
|
return n.value;
|
|
2126
2126
|
}
|
|
2127
2127
|
async actionInternal(e, t, n) {
|
|
2128
|
-
let r =
|
|
2128
|
+
let r = Ve(t), i = this.nextRequestId;
|
|
2129
2129
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
2130
2130
|
let a = {
|
|
2131
2131
|
type: "Action",
|
|
2132
2132
|
requestId: i,
|
|
2133
2133
|
udfPath: e,
|
|
2134
2134
|
componentPath: n,
|
|
2135
|
-
args: [
|
|
2135
|
+
args: [dt(r)]
|
|
2136
2136
|
}, o = this.webSocketManager.sendMessage(a);
|
|
2137
2137
|
return this.requestManager.request(a, o);
|
|
2138
2138
|
}
|
|
@@ -2150,7 +2150,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
reportMarks() {
|
|
2152
2152
|
if (this.debug) {
|
|
2153
|
-
let e =
|
|
2153
|
+
let e = Wn(this.sessionId);
|
|
2154
2154
|
this.webSocketManager.sendMessage({
|
|
2155
2155
|
type: "Event",
|
|
2156
2156
|
eventType: "ClientConnect",
|
|
@@ -2167,7 +2167,7 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2167
2167
|
method: "POST",
|
|
2168
2168
|
headers: {
|
|
2169
2169
|
"Content-Type": "application/json",
|
|
2170
|
-
"Convex-Client": `npm-${
|
|
2170
|
+
"Convex-Client": `npm-${Ae}`
|
|
2171
2171
|
},
|
|
2172
2172
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
2173
2173
|
}).then((e) => {
|
|
@@ -2179,23 +2179,23 @@ var Kn = Object.defineProperty, qn = (e, t, n) => t in e ? Kn(e, t, {
|
|
|
2179
2179
|
};
|
|
2180
2180
|
//#endregion
|
|
2181
2181
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/pagination.js
|
|
2182
|
-
function
|
|
2182
|
+
function Jn(e) {
|
|
2183
2183
|
if (typeof e != "object" || !e || !Array.isArray(e.page) || typeof e.isDone != "boolean" || typeof e.continueCursor != "string") throw Error(`Not a valid paginated query result: ${e?.toString()}`);
|
|
2184
2184
|
return e;
|
|
2185
2185
|
}
|
|
2186
2186
|
//#endregion
|
|
2187
2187
|
//#region ../../node_modules/.pnpm/convex@1.37.0_react@19.2.6/node_modules/convex/dist/esm/browser/sync/paginated_query_client.js
|
|
2188
|
-
var
|
|
2188
|
+
var Yn = Object.defineProperty, Xn = (e, t, n) => t in e ? Yn(e, t, {
|
|
2189
2189
|
enumerable: !0,
|
|
2190
2190
|
configurable: !0,
|
|
2191
2191
|
writable: !0,
|
|
2192
2192
|
value: n
|
|
2193
|
-
}) : e[t] = n,
|
|
2193
|
+
}) : e[t] = n, Zn = (e, t, n) => Xn(e, typeof t == "symbol" ? t : t + "", n), Qn = class {
|
|
2194
2194
|
constructor(e, t) {
|
|
2195
|
-
this.client = e, this.onTransition = t,
|
|
2195
|
+
this.client = e, this.onTransition = t, Zn(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), Zn(this, "lastTransitionTs"), this.lastTransitionTs = rn.fromNumber(0), this.client.addOnTransitionHandler((e) => this.onBaseTransition(e));
|
|
2196
2196
|
}
|
|
2197
2197
|
subscribe(e, t, n) {
|
|
2198
|
-
let r =
|
|
2198
|
+
let r = jt(e), i = Nt(r, t, n), a = () => this.removePaginatedQuerySubscriber(i), o = this.paginatedQuerySet.get(i);
|
|
2199
2199
|
return o ? (o.numSubscribers += 1, {
|
|
2200
2200
|
paginatedQueryToken: i,
|
|
2201
2201
|
unsubscribe: a
|
|
@@ -2217,7 +2217,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2217
2217
|
});
|
|
2218
2218
|
}
|
|
2219
2219
|
localQueryResult(e, t, n) {
|
|
2220
|
-
let r =
|
|
2220
|
+
let r = Nt(jt(e), t, n);
|
|
2221
2221
|
return this.localQueryResultByToken(r);
|
|
2222
2222
|
}
|
|
2223
2223
|
localQueryResultByToken(e) {
|
|
@@ -2236,7 +2236,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2236
2236
|
i = !0, a = !1;
|
|
2237
2237
|
continue;
|
|
2238
2238
|
}
|
|
2239
|
-
let n =
|
|
2239
|
+
let n = Jn(t);
|
|
2240
2240
|
r = r.concat(n.page), a = !!n.isDone;
|
|
2241
2241
|
}
|
|
2242
2242
|
let o;
|
|
@@ -2265,7 +2265,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2265
2265
|
this.mustGetPaginatedQuery(e);
|
|
2266
2266
|
let n = this.queryTokenForLastPageOfPaginatedQuery(e), r = this.client.localQueryResultByToken(n);
|
|
2267
2267
|
if (!r) return !1;
|
|
2268
|
-
let i =
|
|
2268
|
+
let i = Jn(r);
|
|
2269
2269
|
if (i.isDone) return !1;
|
|
2270
2270
|
this.addPageToPaginatedQuery(e, i.continueCursor, t);
|
|
2271
2271
|
let a = {
|
|
@@ -2299,7 +2299,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2299
2299
|
if (r.has(n)) continue;
|
|
2300
2300
|
let a = i.get(n).queryToken, o = t(a);
|
|
2301
2301
|
if (!o) continue;
|
|
2302
|
-
let s =
|
|
2302
|
+
let s = Jn(o);
|
|
2303
2303
|
s.splitCursor && (s.pageStatus === "SplitRecommended" || s.pageStatus === "SplitRequired" || s.page.length > e.options.initialNumItems * 2) && this.splitPaginatedQueryPage(e, n, s.splitCursor, s.continueCursor);
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
@@ -2368,16 +2368,16 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2368
2368
|
if (!t) throw Error("paginated query no longer exists for token " + e);
|
|
2369
2369
|
return t;
|
|
2370
2370
|
}
|
|
2371
|
-
},
|
|
2371
|
+
}, $n = Object.defineProperty, er = (e, t, n) => t in e ? $n(e, t, {
|
|
2372
2372
|
enumerable: !0,
|
|
2373
2373
|
configurable: !0,
|
|
2374
2374
|
writable: !0,
|
|
2375
2375
|
value: n
|
|
2376
|
-
}) : e[t] = n,
|
|
2376
|
+
}) : e[t] = n, tr = (e, t, n) => er(e, typeof t == "symbol" ? t : t + "", n), nr, rr = class {
|
|
2377
2377
|
constructor(e, t = {}) {
|
|
2378
|
-
|
|
2378
|
+
tr(this, "listeners"), tr(this, "_client"), tr(this, "_paginatedClient"), tr(this, "callNewListenersWithCurrentValuesTimer"), tr(this, "_closed"), tr(this, "_disabled"), t.skipConvexDeploymentUrlCheck !== !0 && He(e);
|
|
2379
2379
|
let { disabled: n, ...r } = t;
|
|
2380
|
-
this._closed = !1, this._disabled = !!n,
|
|
2380
|
+
this._closed = !1, this._disabled = !!n, nr && !("webSocketConstructor" in r) && typeof WebSocket > "u" && (r.webSocketConstructor = nr), typeof window > "u" && !("unsavedChangesWarning" in r) && (r.unsavedChangesWarning = !1), this.disabled || (this._client = new qn(e, () => {}, r), this._paginatedClient = new Qn(this._client, (e) => this._transition(e))), this.listeners = /* @__PURE__ */ new Set();
|
|
2381
2381
|
}
|
|
2382
2382
|
get closed() {
|
|
2383
2383
|
return this._closed;
|
|
@@ -2395,7 +2395,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
onUpdate(e, t, n, r) {
|
|
2397
2397
|
if (this.disabled) return this.createDisabledUnsubscribe();
|
|
2398
|
-
let { queryToken: i, unsubscribe: a } = this.client.subscribe(
|
|
2398
|
+
let { queryToken: i, unsubscribe: a } = this.client.subscribe(K(e), t), o = {
|
|
2399
2399
|
queryToken: i,
|
|
2400
2400
|
callback: n,
|
|
2401
2401
|
onError: r,
|
|
@@ -2420,7 +2420,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2420
2420
|
let a = {
|
|
2421
2421
|
initialNumItems: n.initialNumItems,
|
|
2422
2422
|
id: -1
|
|
2423
|
-
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(
|
|
2423
|
+
}, { paginatedQueryToken: o, unsubscribe: s } = this.paginatedClient.subscribe(K(e), t, a), c = {
|
|
2424
2424
|
queryToken: o,
|
|
2425
2425
|
callback: r,
|
|
2426
2426
|
onError: i,
|
|
@@ -2435,7 +2435,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2435
2435
|
unsubscribe: () => {
|
|
2436
2436
|
this.closed || (this.listeners.delete(c), s());
|
|
2437
2437
|
},
|
|
2438
|
-
getCurrentValue: () => this.paginatedClient.localQueryResult(
|
|
2438
|
+
getCurrentValue: () => this.paginatedClient.localQueryResult(K(e), t, a),
|
|
2439
2439
|
getQueryLogs: () => []
|
|
2440
2440
|
}, u = l.unsubscribe;
|
|
2441
2441
|
return Object.assign(u, l), u;
|
|
@@ -2473,7 +2473,7 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2473
2473
|
_transition({ queries: e, paginatedQueries: t }, n = !1) {
|
|
2474
2474
|
let r = [...e.map((e) => e.token), ...t.map((e) => e.token)];
|
|
2475
2475
|
for (let e of this.listeners) {
|
|
2476
|
-
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s =
|
|
2476
|
+
let { callback: t, queryToken: i, onError: a, hasEverRun: o } = e, s = Pt(i), c = s ? !!this.paginatedClient.localQueryResultByToken(i) : this.client.hasLocalQueryResultByToken(i);
|
|
2477
2477
|
if (r.includes(i) || n && !o && c) {
|
|
2478
2478
|
e.hasEverRun = !0;
|
|
2479
2479
|
let n;
|
|
@@ -2490,15 +2490,15 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2490
2490
|
}
|
|
2491
2491
|
async mutation(e, t, n) {
|
|
2492
2492
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2493
|
-
return await this.client.mutation(
|
|
2493
|
+
return await this.client.mutation(K(e), t, n);
|
|
2494
2494
|
}
|
|
2495
2495
|
async action(e, t) {
|
|
2496
2496
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2497
|
-
return await this.client.action(
|
|
2497
|
+
return await this.client.action(K(e), t);
|
|
2498
2498
|
}
|
|
2499
2499
|
async query(e, t) {
|
|
2500
2500
|
if (this.disabled) throw Error("ConvexClient is disabled");
|
|
2501
|
-
let n = this.client.localQueryResult(
|
|
2501
|
+
let n = this.client.localQueryResult(K(e), t);
|
|
2502
2502
|
return n === void 0 ? new Promise((n, r) => {
|
|
2503
2503
|
let { unsubscribe: i } = this.onUpdate(e, t, (e) => {
|
|
2504
2504
|
i(), n(e);
|
|
@@ -2514,37 +2514,37 @@ var Xn = Object.defineProperty, Zn = (e, t, n) => t in e ? Xn(e, t, {
|
|
|
2514
2514
|
subscribeToConnectionState(e) {
|
|
2515
2515
|
return this.disabled ? () => {} : this.client.subscribeToConnectionState(e);
|
|
2516
2516
|
}
|
|
2517
|
-
},
|
|
2517
|
+
}, ir = new Set([
|
|
2518
2518
|
"role",
|
|
2519
2519
|
"name",
|
|
2520
2520
|
"aria-label",
|
|
2521
2521
|
"rel",
|
|
2522
2522
|
"href"
|
|
2523
2523
|
]);
|
|
2524
|
-
function
|
|
2525
|
-
let n =
|
|
2526
|
-
n ||= e.startsWith("data-") &&
|
|
2527
|
-
let r =
|
|
2528
|
-
return r ||= t.startsWith("#") &&
|
|
2524
|
+
function ar(e, t) {
|
|
2525
|
+
let n = ir.has(e);
|
|
2526
|
+
n ||= e.startsWith("data-") && dr(e);
|
|
2527
|
+
let r = dr(t) && t.length < 100;
|
|
2528
|
+
return r ||= t.startsWith("#") && dr(t.slice(1)), n && r;
|
|
2529
|
+
}
|
|
2530
|
+
function or(e) {
|
|
2531
|
+
return dr(e);
|
|
2529
2532
|
}
|
|
2530
2533
|
function sr(e) {
|
|
2531
|
-
return
|
|
2534
|
+
return dr(e);
|
|
2532
2535
|
}
|
|
2533
2536
|
function cr(e) {
|
|
2534
|
-
return fr(e);
|
|
2535
|
-
}
|
|
2536
|
-
function lr(e) {
|
|
2537
2537
|
return !0;
|
|
2538
2538
|
}
|
|
2539
|
-
function
|
|
2539
|
+
function lr(e, t) {
|
|
2540
2540
|
if (e.nodeType !== Node.ELEMENT_NODE) throw Error("Can't generate CSS selector for non-element node type.");
|
|
2541
2541
|
if (e.tagName.toLowerCase() === "html") return "html";
|
|
2542
2542
|
let n = {
|
|
2543
2543
|
root: document.body,
|
|
2544
|
-
idName:
|
|
2545
|
-
className:
|
|
2546
|
-
tagName:
|
|
2547
|
-
attr:
|
|
2544
|
+
idName: or,
|
|
2545
|
+
className: sr,
|
|
2546
|
+
tagName: cr,
|
|
2547
|
+
attr: ar,
|
|
2548
2548
|
timeoutMs: 1e3,
|
|
2549
2549
|
seedMinLength: 3,
|
|
2550
2550
|
optimizedMinLength: 2,
|
|
@@ -2552,37 +2552,37 @@ function ur(e, t) {
|
|
|
2552
2552
|
}, r = /* @__PURE__ */ new Date(), i = {
|
|
2553
2553
|
...n,
|
|
2554
2554
|
...t
|
|
2555
|
-
}, a =
|
|
2556
|
-
for (let t of
|
|
2555
|
+
}, a = xr(i.root, n), o, s = 0;
|
|
2556
|
+
for (let t of ur(e, i, a)) {
|
|
2557
2557
|
if ((/* @__PURE__ */ new Date()).getTime() - r.getTime() > i.timeoutMs || s >= i.maxNumberOfPathChecks) {
|
|
2558
|
-
let t =
|
|
2558
|
+
let t = _r(e, a);
|
|
2559
2559
|
if (!t) throw Error(`Timeout: Can't find a unique selector after ${i.timeoutMs}ms`);
|
|
2560
|
-
return
|
|
2560
|
+
return pr(t);
|
|
2561
2561
|
}
|
|
2562
|
-
if (s++,
|
|
2562
|
+
if (s++, Sr(t, a)) {
|
|
2563
2563
|
o = t;
|
|
2564
2564
|
break;
|
|
2565
2565
|
}
|
|
2566
2566
|
}
|
|
2567
2567
|
if (!o) throw Error("Selector was not found.");
|
|
2568
|
-
let c = [...
|
|
2569
|
-
return c.sort(
|
|
2568
|
+
let c = [...Cr(o, e, i, a, r)];
|
|
2569
|
+
return c.sort(hr), c.length > 0 ? pr(c[0]) : pr(o);
|
|
2570
2570
|
}
|
|
2571
|
-
function*
|
|
2571
|
+
function* ur(e, t, n) {
|
|
2572
2572
|
let r = [], i = [], a = e, o = 0;
|
|
2573
2573
|
for (; a && a !== n;) {
|
|
2574
|
-
let e =
|
|
2574
|
+
let e = fr(a, t);
|
|
2575
2575
|
for (let t of e) t.level = o;
|
|
2576
|
-
if (r.push(e), a = a.parentElement, o++, i.push(...
|
|
2577
|
-
i.sort(
|
|
2576
|
+
if (r.push(e), a = a.parentElement, o++, i.push(...br(r)), o >= t.seedMinLength) {
|
|
2577
|
+
i.sort(hr);
|
|
2578
2578
|
for (let e of i) yield e;
|
|
2579
2579
|
i = [];
|
|
2580
2580
|
}
|
|
2581
2581
|
}
|
|
2582
|
-
i.sort(
|
|
2582
|
+
i.sort(hr);
|
|
2583
2583
|
for (let e of i) yield e;
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function dr(e) {
|
|
2586
2586
|
if (/^[a-z\-]{3,}$/i.test(e)) {
|
|
2587
2587
|
let t = e.split(/-|[A-Z]/);
|
|
2588
2588
|
for (let e of t) if (e.length <= 2 || /[^aeiou]{4,}/i.test(e)) return !1;
|
|
@@ -2590,7 +2590,7 @@ function fr(e) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
return !1;
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2593
|
+
function fr(e, t) {
|
|
2594
2594
|
let n = [], r = e.getAttribute("id");
|
|
2595
2595
|
r && t.idName(r) && n.push({
|
|
2596
2596
|
name: "#" + CSS.escape(r),
|
|
@@ -2616,19 +2616,19 @@ function pr(e, t) {
|
|
|
2616
2616
|
name: i,
|
|
2617
2617
|
penalty: 5
|
|
2618
2618
|
});
|
|
2619
|
-
let t =
|
|
2619
|
+
let t = gr(e, i);
|
|
2620
2620
|
t !== void 0 && n.push({
|
|
2621
|
-
name:
|
|
2621
|
+
name: yr(i, t),
|
|
2622
2622
|
penalty: 10
|
|
2623
2623
|
});
|
|
2624
2624
|
}
|
|
2625
|
-
let a =
|
|
2625
|
+
let a = gr(e);
|
|
2626
2626
|
return a !== void 0 && n.push({
|
|
2627
|
-
name:
|
|
2627
|
+
name: vr(i, a),
|
|
2628
2628
|
penalty: 50
|
|
2629
2629
|
}), n;
|
|
2630
2630
|
}
|
|
2631
|
-
function
|
|
2631
|
+
function pr(e) {
|
|
2632
2632
|
let t = e[0], n = t.name;
|
|
2633
2633
|
for (let r = 1; r < e.length; r++) {
|
|
2634
2634
|
let i = e[r].level || 0;
|
|
@@ -2636,13 +2636,13 @@ function mr(e) {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
return n;
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2639
|
+
function mr(e) {
|
|
2640
2640
|
return e.map((e) => e.penalty).reduce((e, t) => e + t, 0);
|
|
2641
2641
|
}
|
|
2642
|
-
function
|
|
2643
|
-
return
|
|
2642
|
+
function hr(e, t) {
|
|
2643
|
+
return mr(e) - mr(t);
|
|
2644
2644
|
}
|
|
2645
|
-
function
|
|
2645
|
+
function gr(e, t) {
|
|
2646
2646
|
let n = e.parentNode;
|
|
2647
2647
|
if (!n) return;
|
|
2648
2648
|
let r = n.firstChild;
|
|
@@ -2651,51 +2651,51 @@ function _r(e, t) {
|
|
|
2651
2651
|
for (; r && (r.nodeType === Node.ELEMENT_NODE && (t === void 0 || r.tagName.toLowerCase() === t) && i++, r !== e);) r = r.nextSibling;
|
|
2652
2652
|
return i;
|
|
2653
2653
|
}
|
|
2654
|
-
function
|
|
2654
|
+
function _r(e, t) {
|
|
2655
2655
|
let n = 0, r = e, i = [];
|
|
2656
2656
|
for (; r && r !== t;) {
|
|
2657
|
-
let e = r.tagName.toLowerCase(), t =
|
|
2657
|
+
let e = r.tagName.toLowerCase(), t = gr(r, e);
|
|
2658
2658
|
if (t === void 0) return;
|
|
2659
2659
|
i.push({
|
|
2660
|
-
name:
|
|
2660
|
+
name: yr(e, t),
|
|
2661
2661
|
penalty: NaN,
|
|
2662
2662
|
level: n
|
|
2663
2663
|
}), r = r.parentElement, n++;
|
|
2664
2664
|
}
|
|
2665
|
-
if (
|
|
2665
|
+
if (Sr(i, t)) return i;
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2667
|
+
function vr(e, t) {
|
|
2668
2668
|
return e === "html" ? "html" : `${e}:nth-child(${t})`;
|
|
2669
2669
|
}
|
|
2670
|
-
function
|
|
2670
|
+
function yr(e, t) {
|
|
2671
2671
|
return e === "html" ? "html" : `${e}:nth-of-type(${t})`;
|
|
2672
2672
|
}
|
|
2673
|
-
function*
|
|
2674
|
-
if (e.length > 0) for (let n of e[0]) yield*
|
|
2673
|
+
function* br(e, t = []) {
|
|
2674
|
+
if (e.length > 0) for (let n of e[0]) yield* br(e.slice(1, e.length), t.concat(n));
|
|
2675
2675
|
else yield t;
|
|
2676
2676
|
}
|
|
2677
|
-
function
|
|
2677
|
+
function xr(e, t) {
|
|
2678
2678
|
return e.nodeType === Node.DOCUMENT_NODE ? e : e === t.root ? e.ownerDocument : e;
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2681
|
-
let n =
|
|
2680
|
+
function Sr(e, t) {
|
|
2681
|
+
let n = pr(e);
|
|
2682
2682
|
switch (t.querySelectorAll(n).length) {
|
|
2683
2683
|
case 0: throw Error(`Can't select any node with this selector: ${n}`);
|
|
2684
2684
|
case 1: return !0;
|
|
2685
2685
|
default: return !1;
|
|
2686
2686
|
}
|
|
2687
2687
|
}
|
|
2688
|
-
function*
|
|
2688
|
+
function* Cr(e, t, n, r, i) {
|
|
2689
2689
|
if (e.length > 2 && e.length > n.optimizedMinLength) for (let a = 1; a < e.length - 1; a++) {
|
|
2690
2690
|
if ((/* @__PURE__ */ new Date()).getTime() - i.getTime() > n.timeoutMs) return;
|
|
2691
2691
|
let o = [...e];
|
|
2692
|
-
o.splice(a, 1),
|
|
2692
|
+
o.splice(a, 1), Sr(o, r) && r.querySelector(pr(o)) === t && (yield o, yield* Cr(o, t, n, r, i));
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
2695
|
//#endregion
|
|
2696
2696
|
//#region src/runtime/anchor.ts
|
|
2697
|
-
function
|
|
2698
|
-
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ?
|
|
2697
|
+
function wr(e, t) {
|
|
2698
|
+
let n = document.documentElement, r = Math.max(n.scrollWidth, n.clientWidth), i = Math.max(n.scrollHeight, n.clientHeight), a = e.clientX + window.scrollX, o = e.clientY + window.scrollY, s = t === void 0 ? e.target instanceof Element ? e.target : null : t, c = s ? Er(s) : void 0, l, u;
|
|
2699
2699
|
if (s) {
|
|
2700
2700
|
let t = s.getBoundingClientRect();
|
|
2701
2701
|
t.width > 0 && t.height > 0 && (l = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), u = Math.max(0, Math.min(1, (e.clientY - t.top) / t.height)));
|
|
@@ -2704,13 +2704,13 @@ function Tr(e, t) {
|
|
|
2704
2704
|
anchorX: r > 0 ? a / r : 0,
|
|
2705
2705
|
anchorY: i > 0 ? o / i : 0,
|
|
2706
2706
|
viewportW: window.innerWidth,
|
|
2707
|
-
viewportY: window.
|
|
2707
|
+
viewportY: window.innerHeight,
|
|
2708
2708
|
anchorSelector: c,
|
|
2709
2709
|
anchorOffsetX: l,
|
|
2710
2710
|
anchorOffsetY: u
|
|
2711
2711
|
};
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2713
|
+
function Tr(e) {
|
|
2714
2714
|
if (e.anchorSelector) try {
|
|
2715
2715
|
let t = document.querySelector(e.anchorSelector);
|
|
2716
2716
|
if (t) {
|
|
@@ -2727,22 +2727,22 @@ function Er(e) {
|
|
|
2727
2727
|
pageY: e.anchorY * r
|
|
2728
2728
|
};
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function Er(e) {
|
|
2731
2731
|
try {
|
|
2732
|
-
return
|
|
2732
|
+
return lr(e, { timeoutMs: 1e3 });
|
|
2733
2733
|
} catch {
|
|
2734
2734
|
return;
|
|
2735
2735
|
}
|
|
2736
2736
|
}
|
|
2737
2737
|
//#endregion
|
|
2738
2738
|
//#region src/runtime/api.ts
|
|
2739
|
-
var
|
|
2739
|
+
var Dr = class extends Error {
|
|
2740
2740
|
status;
|
|
2741
2741
|
constructor(e, t) {
|
|
2742
2742
|
super(e), this.name = "WidgetApiError", this.status = t;
|
|
2743
2743
|
}
|
|
2744
2744
|
};
|
|
2745
|
-
function
|
|
2745
|
+
function Or(e) {
|
|
2746
2746
|
let t = e.apiUrl.replace(/\/+$/, "");
|
|
2747
2747
|
async function n(n, r = {}) {
|
|
2748
2748
|
let i = {
|
|
@@ -2756,8 +2756,8 @@ function kr(e) {
|
|
|
2756
2756
|
let c = await fetch(`${t}${n}`, {
|
|
2757
2757
|
...r,
|
|
2758
2758
|
headers: i
|
|
2759
|
-
}), l = await c.text(), u = l ?
|
|
2760
|
-
if (!c.ok) throw c.status === 401 && o && e.onUnauthorized?.(), new
|
|
2759
|
+
}), l = await c.text(), u = l ? kr(l) : null;
|
|
2760
|
+
if (!c.ok) throw c.status === 401 && o && e.onUnauthorized?.(), new Dr((u && typeof u == "object" && "error" in u && typeof u.error == "string" ? u.error : null) ?? `Request failed with ${c.status}`, c.status);
|
|
2761
2761
|
return u;
|
|
2762
2762
|
}
|
|
2763
2763
|
return {
|
|
@@ -2811,7 +2811,7 @@ function kr(e) {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
};
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2814
|
+
function kr(e) {
|
|
2815
2815
|
try {
|
|
2816
2816
|
return JSON.parse(e);
|
|
2817
2817
|
} catch {
|
|
@@ -2820,48 +2820,48 @@ function Ar(e) {
|
|
|
2820
2820
|
}
|
|
2821
2821
|
//#endregion
|
|
2822
2822
|
//#region src/runtime/history-observer.ts
|
|
2823
|
-
var
|
|
2824
|
-
function
|
|
2823
|
+
var Ar = "__markup_history_observer__", jr = "__markup_history_listeners__";
|
|
2824
|
+
function Mr(e) {
|
|
2825
2825
|
e.forEach((e) => e());
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2827
|
+
function Nr() {
|
|
2828
2828
|
let e = history.pushState;
|
|
2829
|
-
if (e[
|
|
2829
|
+
if (e[Ar]) return e[jr];
|
|
2830
2830
|
let t = /* @__PURE__ */ new Set(), n = history.pushState, r = history.replaceState;
|
|
2831
2831
|
function i(...e) {
|
|
2832
|
-
n.apply(this, e),
|
|
2832
|
+
n.apply(this, e), Mr(t);
|
|
2833
2833
|
}
|
|
2834
2834
|
function a(...e) {
|
|
2835
|
-
r.apply(this, e),
|
|
2835
|
+
r.apply(this, e), Mr(t);
|
|
2836
2836
|
}
|
|
2837
|
-
return Object.defineProperty(i,
|
|
2837
|
+
return Object.defineProperty(i, Ar, { value: 1 }), Object.defineProperty(i, jr, { value: t }), Object.defineProperty(a, Ar, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", () => Mr(t)), t;
|
|
2838
2838
|
}
|
|
2839
|
-
var
|
|
2840
|
-
function
|
|
2841
|
-
return
|
|
2839
|
+
var Pr = null;
|
|
2840
|
+
function Fr(e) {
|
|
2841
|
+
return Pr ||= Nr(), Pr.add(e), () => Pr.delete(e);
|
|
2842
2842
|
}
|
|
2843
2843
|
//#endregion
|
|
2844
2844
|
//#region src/runtime/identity-store.ts
|
|
2845
|
-
var
|
|
2846
|
-
function
|
|
2845
|
+
var Ir = "markup.identity";
|
|
2846
|
+
function Lr() {
|
|
2847
2847
|
try {
|
|
2848
|
-
let e = localStorage.getItem(
|
|
2848
|
+
let e = localStorage.getItem(Ir);
|
|
2849
2849
|
return e ? JSON.parse(e) : null;
|
|
2850
2850
|
} catch {
|
|
2851
2851
|
return null;
|
|
2852
2852
|
}
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2854
|
+
function Rr(e) {
|
|
2855
2855
|
try {
|
|
2856
2856
|
if (e == null) {
|
|
2857
|
-
localStorage.removeItem(
|
|
2857
|
+
localStorage.removeItem(Ir);
|
|
2858
2858
|
return;
|
|
2859
2859
|
}
|
|
2860
|
-
localStorage.setItem(
|
|
2860
|
+
localStorage.setItem(Ir, JSON.stringify(e));
|
|
2861
2861
|
} catch {}
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2864
|
-
let e =
|
|
2863
|
+
function zr() {
|
|
2864
|
+
let e = Lr(), t = {
|
|
2865
2865
|
name: e?.name,
|
|
2866
2866
|
email: e?.email
|
|
2867
2867
|
};
|
|
@@ -2896,10 +2896,10 @@ function Br() {
|
|
|
2896
2896
|
preserved: t
|
|
2897
2897
|
};
|
|
2898
2898
|
}
|
|
2899
|
-
function
|
|
2899
|
+
function Br(e) {
|
|
2900
2900
|
switch (e.kind) {
|
|
2901
2901
|
case "verified":
|
|
2902
|
-
|
|
2902
|
+
Rr({
|
|
2903
2903
|
clientId: e.identity.clientId,
|
|
2904
2904
|
token: e.identity.token,
|
|
2905
2905
|
tokenExpiresAt: e.identity.tokenExpiresAt,
|
|
@@ -2909,7 +2909,7 @@ function Vr(e) {
|
|
|
2909
2909
|
});
|
|
2910
2910
|
return;
|
|
2911
2911
|
case "anon":
|
|
2912
|
-
|
|
2912
|
+
Rr({
|
|
2913
2913
|
clientId: e.identity.clientId,
|
|
2914
2914
|
anonToken: e.identity.anonToken,
|
|
2915
2915
|
name: e.identity.name,
|
|
@@ -2917,23 +2917,23 @@ function Vr(e) {
|
|
|
2917
2917
|
});
|
|
2918
2918
|
return;
|
|
2919
2919
|
case "recovering":
|
|
2920
|
-
|
|
2920
|
+
Rr({
|
|
2921
2921
|
name: e.preserved.name,
|
|
2922
2922
|
email: e.preserved.email
|
|
2923
2923
|
});
|
|
2924
2924
|
return;
|
|
2925
2925
|
case "unresolved":
|
|
2926
|
-
|
|
2926
|
+
Rr(null);
|
|
2927
2927
|
return;
|
|
2928
2928
|
}
|
|
2929
2929
|
}
|
|
2930
|
-
function
|
|
2930
|
+
function Vr(e) {
|
|
2931
2931
|
if (e.kind === "anon" || e.kind === "verified") return e.identity.clientId;
|
|
2932
2932
|
}
|
|
2933
|
-
function
|
|
2933
|
+
function Hr(e) {
|
|
2934
2934
|
return e.kind === "anon" ? e.identity.name ?? null : e.kind === "verified" ? e.identity.name : null;
|
|
2935
2935
|
}
|
|
2936
|
-
function
|
|
2936
|
+
function Ur(e) {
|
|
2937
2937
|
if (e.kind === "anon") {
|
|
2938
2938
|
let t = e.identity.name;
|
|
2939
2939
|
return t ? {
|
|
@@ -2948,7 +2948,7 @@ function Wr(e) {
|
|
|
2948
2948
|
}
|
|
2949
2949
|
//#endregion
|
|
2950
2950
|
//#region src/runtime/popup-auth.ts
|
|
2951
|
-
async function
|
|
2951
|
+
async function Wr(e, t) {
|
|
2952
2952
|
let n = new URL(e).origin, r;
|
|
2953
2953
|
try {
|
|
2954
2954
|
let n = await fetch(`${e.replace(/\/+$/, "")}/widget/popup-exchange`, {
|
|
@@ -2989,25 +2989,25 @@ async function Gr(e, t) {
|
|
|
2989
2989
|
}
|
|
2990
2990
|
//#endregion
|
|
2991
2991
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
|
|
2992
|
-
function
|
|
2992
|
+
function Gr(e, t) {
|
|
2993
2993
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
2994
2994
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
2995
2995
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
2996
2996
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
2997
2997
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
2998
2998
|
}
|
|
2999
|
-
var
|
|
2999
|
+
var Kr = (() => {
|
|
3000
3000
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
3001
3001
|
return () => (e += 1, `u${t()}${e}`);
|
|
3002
3002
|
})();
|
|
3003
|
-
function
|
|
3003
|
+
function qr(e) {
|
|
3004
3004
|
let t = [];
|
|
3005
3005
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
3006
3006
|
return t;
|
|
3007
3007
|
}
|
|
3008
3008
|
var Jr = null;
|
|
3009
3009
|
function Yr(e = {}) {
|
|
3010
|
-
return Jr || (e.includeStyleProperties ? (Jr = e.includeStyleProperties, Jr) : (Jr =
|
|
3010
|
+
return Jr || (e.includeStyleProperties ? (Jr = e.includeStyleProperties, Jr) : (Jr = qr(window.getComputedStyle(document.documentElement)), Jr));
|
|
3011
3011
|
}
|
|
3012
3012
|
function Xr(e, t) {
|
|
3013
3013
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
@@ -3077,7 +3077,7 @@ function si(e, t, n, r) {
|
|
|
3077
3077
|
function ci(e, t, n, r) {
|
|
3078
3078
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
3079
3079
|
if (a === "" || a === "none") return;
|
|
3080
|
-
let o =
|
|
3080
|
+
let o = Kr();
|
|
3081
3081
|
try {
|
|
3082
3082
|
t.className = `${t.className} ${o}`;
|
|
3083
3083
|
} catch {
|
|
@@ -3186,7 +3186,7 @@ var Ei = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Di = (e
|
|
|
3186
3186
|
async function Oi(e, t, n) {
|
|
3187
3187
|
if (Di(t)) return t;
|
|
3188
3188
|
let r = [];
|
|
3189
|
-
return r = Ei(e) && e.assignedNodes ?
|
|
3189
|
+
return r = Ei(e) && e.assignedNodes ? qr(e.assignedNodes()) : Z(e, HTMLIFrameElement) && e.contentDocument?.body ? qr(e.contentDocument.body.childNodes) : qr((e.shadowRoot ?? e).childNodes), r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Pi(r, n)).then((e) => {
|
|
3190
3190
|
e && t.appendChild(e);
|
|
3191
3191
|
}), Promise.resolve()), t;
|
|
3192
3192
|
}
|
|
@@ -3249,7 +3249,7 @@ function zi(e) {
|
|
|
3249
3249
|
}
|
|
3250
3250
|
async function Bi(e, t, n, r, i) {
|
|
3251
3251
|
try {
|
|
3252
|
-
let a = n ?
|
|
3252
|
+
let a = n ? Gr(t, n) : t, o = mi(t), s;
|
|
3253
3253
|
return s = i ? _i(await i(a), o) : await xi(a, o, r), e.replace(Ri(t), `$1${s}$3`);
|
|
3254
3254
|
} catch {}
|
|
3255
3255
|
return e;
|
|
@@ -3301,7 +3301,7 @@ async function Ki(e, t) {
|
|
|
3301
3301
|
});
|
|
3302
3302
|
}
|
|
3303
3303
|
async function qi(e, t) {
|
|
3304
|
-
let n =
|
|
3304
|
+
let n = qr(e.childNodes).map((e) => Ji(e, t));
|
|
3305
3305
|
await Promise.all(n).then(() => e);
|
|
3306
3306
|
}
|
|
3307
3307
|
async function Ji(e, t) {
|
|
@@ -3358,7 +3358,7 @@ async function ea(e, t) {
|
|
|
3358
3358
|
let n = [], r = [];
|
|
3359
3359
|
return e.forEach((n) => {
|
|
3360
3360
|
if ("cssRules" in n) try {
|
|
3361
|
-
|
|
3361
|
+
qr(n.cssRules || []).forEach((e, i) => {
|
|
3362
3362
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3363
3363
|
let a = i + 1, o = e.href, s = Zi(o).then((e) => Qi(e, t)).then((e) => $i(e).forEach((e) => {
|
|
3364
3364
|
try {
|
|
@@ -3385,7 +3385,7 @@ async function ea(e, t) {
|
|
|
3385
3385
|
}
|
|
3386
3386
|
}), Promise.all(r).then(() => (e.forEach((e) => {
|
|
3387
3387
|
if ("cssRules" in e) try {
|
|
3388
|
-
|
|
3388
|
+
qr(e.cssRules || []).forEach((e) => {
|
|
3389
3389
|
n.push(e);
|
|
3390
3390
|
});
|
|
3391
3391
|
} catch (t) {
|
|
@@ -3398,7 +3398,7 @@ function ta(e) {
|
|
|
3398
3398
|
}
|
|
3399
3399
|
async function na(e, t) {
|
|
3400
3400
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3401
|
-
return ta(await ea(
|
|
3401
|
+
return ta(await ea(qr(e.ownerDocument.styleSheets), t));
|
|
3402
3402
|
}
|
|
3403
3403
|
function ra(e) {
|
|
3404
3404
|
return e.trim().replace(/["']/g, "");
|
|
@@ -3440,41 +3440,85 @@ async function ca(e, t = {}) {
|
|
|
3440
3440
|
}
|
|
3441
3441
|
//#endregion
|
|
3442
3442
|
//#region src/runtime/screenshot.ts
|
|
3443
|
-
var la = 2 * 1024 * 1024;
|
|
3444
|
-
|
|
3443
|
+
var la = 2 * 1024 * 1024, ua = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", da = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
|
|
3444
|
+
function fa(e) {
|
|
3445
|
+
let t = e.parentElement;
|
|
3446
|
+
for (; t;) {
|
|
3447
|
+
if (t.hasAttribute("data-markup-safe")) return !0;
|
|
3448
|
+
t = t.parentElement;
|
|
3449
|
+
}
|
|
3450
|
+
return !1;
|
|
3451
|
+
}
|
|
3452
|
+
function pa(e) {
|
|
3453
|
+
let t = /* @__PURE__ */ new Set(), n = [];
|
|
3454
|
+
function r(e) {
|
|
3455
|
+
t.has(e) || (t.add(e), n.push(e));
|
|
3456
|
+
}
|
|
3457
|
+
for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
|
|
3458
|
+
for (let e of document.querySelectorAll(da)) fa(e) || r(e);
|
|
3459
|
+
if (e.redactSelector) try {
|
|
3460
|
+
for (let t of document.querySelectorAll(e.redactSelector)) fa(t) || r(t);
|
|
3461
|
+
} catch {}
|
|
3462
|
+
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) fa(e) || r(e);
|
|
3463
|
+
return n;
|
|
3464
|
+
}
|
|
3465
|
+
function ma(e) {
|
|
3466
|
+
let t = e.getAttribute("style");
|
|
3467
|
+
return e.setAttribute("style", t ? `${t};${ua}` : ua), () => {
|
|
3468
|
+
t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
|
|
3469
|
+
};
|
|
3470
|
+
}
|
|
3471
|
+
function ha(e) {
|
|
3472
|
+
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
3473
|
+
let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
|
|
3474
|
+
return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
|
|
3475
|
+
}
|
|
3476
|
+
async function ga(e, t, n) {
|
|
3445
3477
|
try {
|
|
3446
|
-
|
|
3447
|
-
|
|
3478
|
+
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? pa(n) : [], s = o.map(ha), c = o.map(ma), l;
|
|
3479
|
+
try {
|
|
3480
|
+
l = await ca(document.documentElement, {
|
|
3481
|
+
width: r,
|
|
3482
|
+
height: i,
|
|
3483
|
+
cacheBust: !0,
|
|
3484
|
+
backgroundColor: "#ffffff",
|
|
3485
|
+
pixelRatio: a,
|
|
3486
|
+
filter(t) {
|
|
3487
|
+
return !(e && (t === e || e.contains(t)) || t instanceof Element && t.hasAttribute("data-markup-skip"));
|
|
3488
|
+
},
|
|
3489
|
+
style: {
|
|
3490
|
+
transform: `translateY(-${window.scrollY}px)`,
|
|
3491
|
+
transformOrigin: "top left"
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
} finally {
|
|
3495
|
+
for (let e of c) e();
|
|
3448
3496
|
}
|
|
3449
|
-
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = await ca(document.documentElement, {
|
|
3450
|
-
width: r,
|
|
3451
|
-
height: i,
|
|
3452
|
-
cacheBust: !0,
|
|
3453
|
-
backgroundColor: "#ffffff",
|
|
3454
|
-
pixelRatio: a,
|
|
3455
|
-
filter: n,
|
|
3456
|
-
style: {
|
|
3457
|
-
transform: `translateY(-${window.scrollY}px)`,
|
|
3458
|
-
transformOrigin: "top left"
|
|
3459
|
-
}
|
|
3460
|
-
});
|
|
3461
3497
|
if (t) {
|
|
3462
|
-
let e =
|
|
3463
|
-
e &&
|
|
3498
|
+
let e = l.getContext("2d");
|
|
3499
|
+
e && va(e, t.x, t.y, a);
|
|
3464
3500
|
}
|
|
3465
|
-
let
|
|
3466
|
-
if (!
|
|
3467
|
-
if (
|
|
3468
|
-
|
|
3469
|
-
|
|
3501
|
+
let u = await _a(l, .85);
|
|
3502
|
+
if (!u) return null;
|
|
3503
|
+
if (u.size <= la) return {
|
|
3504
|
+
blob: u,
|
|
3505
|
+
redactedCount: s.length,
|
|
3506
|
+
redactedSelectors: s
|
|
3507
|
+
};
|
|
3508
|
+
let d = await _a(l, .5);
|
|
3509
|
+
return !d || d.size > la ? null : {
|
|
3510
|
+
blob: d,
|
|
3511
|
+
redactedCount: s.length,
|
|
3512
|
+
redactedSelectors: s
|
|
3513
|
+
};
|
|
3470
3514
|
} catch {
|
|
3471
3515
|
return null;
|
|
3472
3516
|
}
|
|
3473
3517
|
}
|
|
3474
|
-
function
|
|
3518
|
+
function _a(e, t) {
|
|
3475
3519
|
return new Promise((n) => e.toBlob(n, "image/jpeg", t));
|
|
3476
3520
|
}
|
|
3477
|
-
function
|
|
3521
|
+
function va(e, t, n, r) {
|
|
3478
3522
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
3479
3523
|
e.save();
|
|
3480
3524
|
let l = 2 * i;
|
|
@@ -3497,12 +3541,12 @@ function Q(...e) {
|
|
|
3497
3541
|
}
|
|
3498
3542
|
//#endregion
|
|
3499
3543
|
//#region src/runtime/use-drag.ts
|
|
3500
|
-
function
|
|
3501
|
-
let t =
|
|
3544
|
+
function ya(e) {
|
|
3545
|
+
let t = V(e);
|
|
3502
3546
|
t.current = e;
|
|
3503
|
-
let [n, r] =
|
|
3547
|
+
let [n, r] = z(!1), i = V(!1);
|
|
3504
3548
|
return {
|
|
3505
|
-
onPointerDown:
|
|
3549
|
+
onPointerDown: H((e) => {
|
|
3506
3550
|
let n = t.current;
|
|
3507
3551
|
if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
3508
3552
|
let a = e.currentTarget;
|
|
@@ -3526,8 +3570,8 @@ function pa(e) {
|
|
|
3526
3570
|
g = !0, i.current = !0, r(!0), t.current.onStart?.();
|
|
3527
3571
|
}
|
|
3528
3572
|
let o = Math.max(m, window.innerWidth - d - m), v = Math.max(m, window.innerHeight - f - m), y = {
|
|
3529
|
-
left:
|
|
3530
|
-
top:
|
|
3573
|
+
left: ba(l + n, m, o),
|
|
3574
|
+
top: ba(u + a, m, v)
|
|
3531
3575
|
};
|
|
3532
3576
|
_ = y, t.current.onMove(y);
|
|
3533
3577
|
}
|
|
@@ -3540,15 +3584,15 @@ function pa(e) {
|
|
|
3540
3584
|
a.addEventListener("pointermove", y), a.addEventListener("pointerup", b), a.addEventListener("pointercancel", x);
|
|
3541
3585
|
}, []),
|
|
3542
3586
|
isDragging: n,
|
|
3543
|
-
consumeClickIfDragged:
|
|
3587
|
+
consumeClickIfDragged: H(() => i.current ? (i.current = !1, !0) : !1, [])
|
|
3544
3588
|
};
|
|
3545
3589
|
}
|
|
3546
|
-
function
|
|
3590
|
+
function ba(e, t, n) {
|
|
3547
3591
|
return Math.max(t, Math.min(n, e));
|
|
3548
3592
|
}
|
|
3549
3593
|
//#endregion
|
|
3550
3594
|
//#region ../../node_modules/.pnpm/preact@10.29.1/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
3551
|
-
var
|
|
3595
|
+
var xa = 0;
|
|
3552
3596
|
Array.isArray;
|
|
3553
3597
|
function $(e, n, r, i, a, o) {
|
|
3554
3598
|
n ||= {};
|
|
@@ -3565,7 +3609,7 @@ function $(e, n, r, i, a, o) {
|
|
|
3565
3609
|
__e: null,
|
|
3566
3610
|
__c: null,
|
|
3567
3611
|
constructor: void 0,
|
|
3568
|
-
__v: --
|
|
3612
|
+
__v: --xa,
|
|
3569
3613
|
__i: -1,
|
|
3570
3614
|
__u: 0,
|
|
3571
3615
|
__source: a,
|
|
@@ -3576,7 +3620,7 @@ function $(e, n, r, i, a, o) {
|
|
|
3576
3620
|
}
|
|
3577
3621
|
//#endregion
|
|
3578
3622
|
//#region src/runtime/ui/icons.tsx
|
|
3579
|
-
function
|
|
3623
|
+
function Sa({ size: e = 16 }) {
|
|
3580
3624
|
return /* @__PURE__ */ $("svg", {
|
|
3581
3625
|
width: e,
|
|
3582
3626
|
height: e,
|
|
@@ -3586,7 +3630,7 @@ function ga({ size: e = 16 }) {
|
|
|
3586
3630
|
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" })
|
|
3587
3631
|
});
|
|
3588
3632
|
}
|
|
3589
|
-
function
|
|
3633
|
+
function Ca({ size: e = 16 }) {
|
|
3590
3634
|
return /* @__PURE__ */ $("svg", {
|
|
3591
3635
|
width: e,
|
|
3592
3636
|
height: e,
|
|
@@ -3595,7 +3639,7 @@ function _a({ size: e = 16 }) {
|
|
|
3595
3639
|
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" })
|
|
3596
3640
|
});
|
|
3597
3641
|
}
|
|
3598
|
-
function
|
|
3642
|
+
function wa({ size: e = 16 }) {
|
|
3599
3643
|
return /* @__PURE__ */ $("svg", {
|
|
3600
3644
|
width: e,
|
|
3601
3645
|
height: e,
|
|
@@ -3604,7 +3648,7 @@ function va({ size: e = 16 }) {
|
|
|
3604
3648
|
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" })
|
|
3605
3649
|
});
|
|
3606
3650
|
}
|
|
3607
|
-
function
|
|
3651
|
+
function Ta({ size: e = 16 }) {
|
|
3608
3652
|
return /* @__PURE__ */ $("svg", {
|
|
3609
3653
|
width: e,
|
|
3610
3654
|
height: e,
|
|
@@ -3617,7 +3661,7 @@ function ya({ size: e = 16 }) {
|
|
|
3617
3661
|
})
|
|
3618
3662
|
});
|
|
3619
3663
|
}
|
|
3620
|
-
function
|
|
3664
|
+
function Ea({ size: e = 16 }) {
|
|
3621
3665
|
return /* @__PURE__ */ $("svg", {
|
|
3622
3666
|
width: e,
|
|
3623
3667
|
height: e,
|
|
@@ -3631,7 +3675,7 @@ function ba({ size: e = 16 }) {
|
|
|
3631
3675
|
})
|
|
3632
3676
|
});
|
|
3633
3677
|
}
|
|
3634
|
-
function
|
|
3678
|
+
function Da({ size: e = 16 }) {
|
|
3635
3679
|
return /* @__PURE__ */ $("svg", {
|
|
3636
3680
|
width: e,
|
|
3637
3681
|
height: e,
|
|
@@ -3640,7 +3684,7 @@ function xa({ size: e = 16 }) {
|
|
|
3640
3684
|
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" })
|
|
3641
3685
|
});
|
|
3642
3686
|
}
|
|
3643
|
-
function
|
|
3687
|
+
function Oa({ size: e = 16 }) {
|
|
3644
3688
|
return /* @__PURE__ */ $("svg", {
|
|
3645
3689
|
width: e,
|
|
3646
3690
|
height: e,
|
|
@@ -3652,8 +3696,8 @@ function Sa({ size: e = 16 }) {
|
|
|
3652
3696
|
}
|
|
3653
3697
|
//#endregion
|
|
3654
3698
|
//#region src/runtime/ui/fab.tsx
|
|
3655
|
-
function
|
|
3656
|
-
let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", [c, l] =
|
|
3699
|
+
function ka({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i, variant: a = "default" }) {
|
|
3700
|
+
let o = a === "icon-only", s = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", [c, l] = z(null), { onPointerDown: u, isDragging: d, consumeClickIfDragged: f } = ya({
|
|
3657
3701
|
preventDefault: !0,
|
|
3658
3702
|
stopPropagation: !0,
|
|
3659
3703
|
onMove: l,
|
|
@@ -3685,7 +3729,7 @@ function Ca({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", o
|
|
|
3685
3729
|
"aria-pressed": e,
|
|
3686
3730
|
children: [/* @__PURE__ */ $("span", {
|
|
3687
3731
|
class: "markup-fab-icon",
|
|
3688
|
-
children: $(e ?
|
|
3732
|
+
children: $(e ? Ca : Sa, { size: 16 })
|
|
3689
3733
|
}), o ? null : /* @__PURE__ */ $("span", {
|
|
3690
3734
|
class: "markup-fab-label",
|
|
3691
3735
|
children: e ? "Cancel" : "Markup"
|
|
@@ -3694,7 +3738,7 @@ function Ca({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", o
|
|
|
3694
3738
|
}
|
|
3695
3739
|
//#endregion
|
|
3696
3740
|
//#region src/runtime/use-focus-trap.ts
|
|
3697
|
-
var
|
|
3741
|
+
var Aa = [
|
|
3698
3742
|
"a[href]",
|
|
3699
3743
|
"button:not([disabled])",
|
|
3700
3744
|
"input:not([disabled])",
|
|
@@ -3702,14 +3746,14 @@ var wa = [
|
|
|
3702
3746
|
"textarea:not([disabled])",
|
|
3703
3747
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
3704
3748
|
].join(",");
|
|
3705
|
-
function
|
|
3706
|
-
|
|
3749
|
+
function ja(e, t) {
|
|
3750
|
+
B(() => {
|
|
3707
3751
|
if (!t) return;
|
|
3708
3752
|
let n = e.current;
|
|
3709
3753
|
if (!n) return;
|
|
3710
3754
|
function r(e) {
|
|
3711
3755
|
if (e.key !== "Tab") return;
|
|
3712
|
-
let t = Array.from(n.querySelectorAll(
|
|
3756
|
+
let t = Array.from(n.querySelectorAll(Aa)), r = t[0], i = t[t.length - 1];
|
|
3713
3757
|
if (!r || !i) return;
|
|
3714
3758
|
let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
|
|
3715
3759
|
(e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
|
|
@@ -3719,9 +3763,9 @@ function Ta(e, t) {
|
|
|
3719
3763
|
}
|
|
3720
3764
|
//#endregion
|
|
3721
3765
|
//#region src/runtime/use-object-url.ts
|
|
3722
|
-
function
|
|
3723
|
-
let [t, n] =
|
|
3724
|
-
return
|
|
3766
|
+
function Ma(e) {
|
|
3767
|
+
let [t, n] = z(null);
|
|
3768
|
+
return B(() => {
|
|
3725
3769
|
if (!e) {
|
|
3726
3770
|
n(null);
|
|
3727
3771
|
return;
|
|
@@ -3732,9 +3776,9 @@ function Ea(e) {
|
|
|
3732
3776
|
}
|
|
3733
3777
|
//#endregion
|
|
3734
3778
|
//#region src/runtime/ui/author-prompt.tsx
|
|
3735
|
-
function
|
|
3736
|
-
let [o, s] =
|
|
3737
|
-
|
|
3779
|
+
function Na({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, onCancel: i, onSignIn: a }) {
|
|
3780
|
+
let [o, s] = z(""), [c, l] = z(""), u = V(null);
|
|
3781
|
+
B(() => {
|
|
3738
3782
|
u.current?.focus();
|
|
3739
3783
|
}, []);
|
|
3740
3784
|
function d(n) {
|
|
@@ -3811,18 +3855,18 @@ function Da({ pending: e, connecting: t = !1, signingIn: n = !1, onSubmit: r, on
|
|
|
3811
3855
|
}
|
|
3812
3856
|
//#endregion
|
|
3813
3857
|
//#region src/runtime/ui/composer.tsx
|
|
3814
|
-
var
|
|
3815
|
-
function
|
|
3816
|
-
let [s, c] =
|
|
3817
|
-
|
|
3858
|
+
var Pa = 4e3;
|
|
3859
|
+
function Fa({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, pending: i, error: a, onSubmit: o }) {
|
|
3860
|
+
let [s, c] = z(""), l = V(null), u = V(!1);
|
|
3861
|
+
B(() => {
|
|
3818
3862
|
r && l.current?.focus();
|
|
3819
|
-
}, [r]),
|
|
3863
|
+
}, [r]), B(() => {
|
|
3820
3864
|
let e = l.current;
|
|
3821
3865
|
e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
|
|
3822
|
-
}, [s]),
|
|
3866
|
+
}, [s]), B(() => {
|
|
3823
3867
|
u.current && !i && !a && (c(""), l.current?.focus()), u.current = i;
|
|
3824
3868
|
}, [i, a]);
|
|
3825
|
-
let d =
|
|
3869
|
+
let d = Pa - s.length, f = d < 0;
|
|
3826
3870
|
function p(e) {
|
|
3827
3871
|
e?.preventDefault();
|
|
3828
3872
|
let t = s.trim();
|
|
@@ -3840,7 +3884,7 @@ function ka({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3840
3884
|
"aria-label": i ? "Sending…" : n,
|
|
3841
3885
|
title: i ? "Sending…" : n,
|
|
3842
3886
|
tabIndex: e,
|
|
3843
|
-
children: /* @__PURE__ */ $(
|
|
3887
|
+
children: /* @__PURE__ */ $(Da, { size: 14 })
|
|
3844
3888
|
});
|
|
3845
3889
|
}
|
|
3846
3890
|
return /* @__PURE__ */ $("form", {
|
|
@@ -3853,7 +3897,7 @@ function ka({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3853
3897
|
class: "markup-composer-input",
|
|
3854
3898
|
placeholder: t,
|
|
3855
3899
|
rows: h ? 2 : 1,
|
|
3856
|
-
maxLength:
|
|
3900
|
+
maxLength: Pa + 100,
|
|
3857
3901
|
value: s,
|
|
3858
3902
|
onInput: (e) => c(e.currentTarget.value),
|
|
3859
3903
|
onKeyDown: m,
|
|
@@ -3889,39 +3933,39 @@ function ka({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
3889
3933
|
}
|
|
3890
3934
|
//#endregion
|
|
3891
3935
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
3892
|
-
function
|
|
3893
|
-
let
|
|
3894
|
-
|
|
3895
|
-
let [
|
|
3896
|
-
targetRef:
|
|
3936
|
+
function Ia({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolving: i, signingIn: a, pending: o, error: s, screenshot: c, screenshotCapturing: l, screenshotRedactedCount: u, screenshotRedactedSelectors: d, onAuthor: f, onSignIn: p, onSubmit: m, onClose: h }) {
|
|
3937
|
+
let g = V(null);
|
|
3938
|
+
ja(g, !0);
|
|
3939
|
+
let [_, v] = z(!1), [y, b] = z(!1), x = Ma(c), [C, w] = z(null), { onPointerDown: T, isDragging: E } = ya({
|
|
3940
|
+
targetRef: g,
|
|
3897
3941
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
3898
|
-
onMove:
|
|
3942
|
+
onMove: w
|
|
3899
3943
|
});
|
|
3900
|
-
|
|
3901
|
-
let e =
|
|
3944
|
+
B(() => {
|
|
3945
|
+
let e = g.current;
|
|
3902
3946
|
if (!e) return;
|
|
3903
3947
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
3904
3948
|
e.showPopover();
|
|
3905
3949
|
} catch {}
|
|
3906
3950
|
function t(e) {
|
|
3907
|
-
e.newState === "closed" &&
|
|
3951
|
+
e.newState === "closed" && h();
|
|
3908
3952
|
}
|
|
3909
3953
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
3910
|
-
}, [
|
|
3911
|
-
let
|
|
3954
|
+
}, [h]);
|
|
3955
|
+
let D = La(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), O = La(t - window.scrollY - 16, 12, window.innerHeight - 220), k = c != null, A = l || k;
|
|
3912
3956
|
return /* @__PURE__ */ $("div", {
|
|
3913
|
-
ref:
|
|
3914
|
-
class: Q("markup-popover",
|
|
3957
|
+
ref: g,
|
|
3958
|
+
class: Q("markup-popover", C && "is-floating", E && "is-dragging"),
|
|
3915
3959
|
popover: "auto",
|
|
3916
3960
|
style: {
|
|
3917
|
-
"--markup-pop-x": `${
|
|
3918
|
-
"--markup-pop-y": `${
|
|
3961
|
+
"--markup-pop-x": `${C?.left ?? D}px`,
|
|
3962
|
+
"--markup-pop-y": `${C?.top ?? O}px`
|
|
3919
3963
|
},
|
|
3920
3964
|
role: "dialog",
|
|
3921
3965
|
"aria-label": "New markup",
|
|
3922
3966
|
children: [/* @__PURE__ */ $("header", {
|
|
3923
3967
|
class: "markup-popover-header",
|
|
3924
|
-
onPointerDown:
|
|
3968
|
+
onPointerDown: T,
|
|
3925
3969
|
children: [/* @__PURE__ */ $("span", {
|
|
3926
3970
|
class: "markup-eyebrow",
|
|
3927
3971
|
children: "new · markup"
|
|
@@ -3929,16 +3973,16 @@ function Aa({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3929
3973
|
type: "button",
|
|
3930
3974
|
class: "markup-icon-btn",
|
|
3931
3975
|
"aria-label": "Discard pin",
|
|
3932
|
-
onClick:
|
|
3933
|
-
children: /* @__PURE__ */ $(
|
|
3976
|
+
onClick: h,
|
|
3977
|
+
children: /* @__PURE__ */ $(Ca, { size: 16 })
|
|
3934
3978
|
})]
|
|
3935
|
-
}), n == null ? /* @__PURE__ */ $(
|
|
3979
|
+
}), n == null ? /* @__PURE__ */ $(Na, {
|
|
3936
3980
|
pending: o,
|
|
3937
3981
|
connecting: i,
|
|
3938
3982
|
signingIn: a,
|
|
3939
|
-
onSubmit:
|
|
3940
|
-
onCancel:
|
|
3941
|
-
onSignIn:
|
|
3983
|
+
onSubmit: f,
|
|
3984
|
+
onCancel: h,
|
|
3985
|
+
onSignIn: p
|
|
3942
3986
|
}) : /* @__PURE__ */ $("div", {
|
|
3943
3987
|
class: "markup-popover-body",
|
|
3944
3988
|
children: [
|
|
@@ -3956,17 +4000,17 @@ function Aa({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3956
4000
|
}) : null
|
|
3957
4001
|
]
|
|
3958
4002
|
}),
|
|
3959
|
-
/* @__PURE__ */ $(
|
|
4003
|
+
/* @__PURE__ */ $(Fa, {
|
|
3960
4004
|
label: "Feedback",
|
|
3961
4005
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
3962
4006
|
submitLabel: "Post markup",
|
|
3963
4007
|
pending: o,
|
|
3964
4008
|
error: s,
|
|
3965
|
-
onSubmit: (e) =>
|
|
4009
|
+
onSubmit: (e) => m(e, _ && k)
|
|
3966
4010
|
}),
|
|
3967
|
-
|
|
4011
|
+
A ? /* @__PURE__ */ $("div", {
|
|
3968
4012
|
class: "markup-screenshot-row",
|
|
3969
|
-
children: l ? /* @__PURE__ */ $("span", {
|
|
4013
|
+
children: [l ? /* @__PURE__ */ $("span", {
|
|
3970
4014
|
class: "markup-screenshot-status",
|
|
3971
4015
|
children: [
|
|
3972
4016
|
/* @__PURE__ */ $("input", {
|
|
@@ -3974,7 +4018,7 @@ function Aa({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3974
4018
|
class: "markup-screenshot-checkbox",
|
|
3975
4019
|
disabled: !0
|
|
3976
4020
|
}),
|
|
3977
|
-
/* @__PURE__ */ $(
|
|
4021
|
+
/* @__PURE__ */ $(Ea, { size: 12 }),
|
|
3978
4022
|
/* @__PURE__ */ $("span", { children: "Capturing…" })
|
|
3979
4023
|
]
|
|
3980
4024
|
}) : /* @__PURE__ */ $("label", {
|
|
@@ -3983,29 +4027,63 @@ function Aa({ pageX: e, pageY: t, authorName: n, isVerified: r, identityResolvin
|
|
|
3983
4027
|
/* @__PURE__ */ $("input", {
|
|
3984
4028
|
type: "checkbox",
|
|
3985
4029
|
class: "markup-screenshot-checkbox",
|
|
3986
|
-
checked:
|
|
3987
|
-
onChange: (e) =>
|
|
4030
|
+
checked: _,
|
|
4031
|
+
onChange: (e) => v(e.currentTarget.checked)
|
|
3988
4032
|
}),
|
|
3989
|
-
/* @__PURE__ */ $(
|
|
4033
|
+
/* @__PURE__ */ $(Ea, { size: 12 }),
|
|
3990
4034
|
/* @__PURE__ */ $("span", { children: "Attach screenshot" }),
|
|
3991
|
-
|
|
4035
|
+
x && _ ? /* @__PURE__ */ $("img", {
|
|
3992
4036
|
class: "markup-screenshot-thumb",
|
|
3993
|
-
src:
|
|
4037
|
+
src: x,
|
|
3994
4038
|
alt: "Screenshot preview"
|
|
3995
4039
|
}) : null
|
|
3996
4040
|
]
|
|
3997
|
-
})
|
|
4041
|
+
}), _ && k ? /* @__PURE__ */ $(S, { children: [u > 0 ? /* @__PURE__ */ $("div", {
|
|
4042
|
+
class: "markup-screenshot-redacted",
|
|
4043
|
+
children: [/* @__PURE__ */ $("button", {
|
|
4044
|
+
type: "button",
|
|
4045
|
+
class: "markup-screenshot-redacted-chip",
|
|
4046
|
+
onClick: () => b((e) => !e),
|
|
4047
|
+
children: [
|
|
4048
|
+
/* @__PURE__ */ $("em", {
|
|
4049
|
+
class: "markup-screenshot-redacted-arrow",
|
|
4050
|
+
children: y ? "▾" : "▸"
|
|
4051
|
+
}),
|
|
4052
|
+
u,
|
|
4053
|
+
" ",
|
|
4054
|
+
u === 1 ? "field" : "fields",
|
|
4055
|
+
" redacted"
|
|
4056
|
+
]
|
|
4057
|
+
}), y ? /* @__PURE__ */ $("div", {
|
|
4058
|
+
class: "markup-screenshot-redacted-list",
|
|
4059
|
+
children: d.map((e) => /* @__PURE__ */ $("code", {
|
|
4060
|
+
class: "markup-screenshot-redacted-selector",
|
|
4061
|
+
children: e
|
|
4062
|
+
}, e))
|
|
4063
|
+
}) : null]
|
|
4064
|
+
}) : null, /* @__PURE__ */ $("p", {
|
|
4065
|
+
class: "markup-screenshot-help",
|
|
4066
|
+
children: [
|
|
4067
|
+
"Password and credit-card fields are blacked out automatically. Add",
|
|
4068
|
+
" ",
|
|
4069
|
+
/* @__PURE__ */ $("code", {
|
|
4070
|
+
class: "markup-screenshot-help-code",
|
|
4071
|
+
children: "data-markup-private"
|
|
4072
|
+
}),
|
|
4073
|
+
" to mask anything else."
|
|
4074
|
+
]
|
|
4075
|
+
})] }) : null]
|
|
3998
4076
|
}) : null
|
|
3999
4077
|
]
|
|
4000
4078
|
})]
|
|
4001
4079
|
});
|
|
4002
4080
|
}
|
|
4003
|
-
function
|
|
4081
|
+
function La(e, t, n) {
|
|
4004
4082
|
return Math.max(t, Math.min(n, e));
|
|
4005
4083
|
}
|
|
4006
4084
|
//#endregion
|
|
4007
4085
|
//#region src/runtime/ui/pin.tsx
|
|
4008
|
-
function
|
|
4086
|
+
function Ra({ pageX: e, pageY: t, count: n, active: r, onClick: i }) {
|
|
4009
4087
|
let a = t - window.scrollY, o = e - window.scrollX;
|
|
4010
4088
|
return /* @__PURE__ */ $("button", {
|
|
4011
4089
|
type: "button",
|
|
@@ -4028,7 +4106,7 @@ function Ma({ pageX: e, pageY: t, count: n, active: r, onClick: i }) {
|
|
|
4028
4106
|
}) : null]
|
|
4029
4107
|
});
|
|
4030
4108
|
}
|
|
4031
|
-
function
|
|
4109
|
+
function za({ pageX: e, pageY: t }) {
|
|
4032
4110
|
let n = t - window.scrollY, r = e - window.scrollX;
|
|
4033
4111
|
return /* @__PURE__ */ $("div", {
|
|
4034
4112
|
class: "markup-pin markup-pin-ghost is-anchor",
|
|
@@ -4044,15 +4122,15 @@ function Na({ pageX: e, pageY: t }) {
|
|
|
4044
4122
|
}
|
|
4045
4123
|
//#endregion
|
|
4046
4124
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
4047
|
-
function
|
|
4048
|
-
|
|
4125
|
+
function Ba({ onPlace: e, onCancel: t }) {
|
|
4126
|
+
B(() => {
|
|
4049
4127
|
function e(e) {
|
|
4050
4128
|
e.key === "Escape" && t();
|
|
4051
4129
|
}
|
|
4052
4130
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4053
4131
|
}, [t]);
|
|
4054
4132
|
function n(t) {
|
|
4055
|
-
t.stopPropagation(), t.preventDefault(), e(
|
|
4133
|
+
t.stopPropagation(), t.preventDefault(), e(wr(t, document.elementsFromPoint(t.clientX, t.clientY).find((e) => !e.shadowRoot) ?? null), t.clientX, t.clientY);
|
|
4056
4134
|
}
|
|
4057
4135
|
function r(e) {
|
|
4058
4136
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -4070,7 +4148,7 @@ function Pa({ onPlace: e, onCancel: t }) {
|
|
|
4070
4148
|
}
|
|
4071
4149
|
//#endregion
|
|
4072
4150
|
//#region src/runtime/ui/thread-popover.tsx
|
|
4073
|
-
var
|
|
4151
|
+
var Va = [
|
|
4074
4152
|
"👍",
|
|
4075
4153
|
"❤️",
|
|
4076
4154
|
"🎉",
|
|
@@ -4078,28 +4156,28 @@ var Fa = [
|
|
|
4078
4156
|
"😄",
|
|
4079
4157
|
"❓"
|
|
4080
4158
|
];
|
|
4081
|
-
function
|
|
4082
|
-
let y =
|
|
4159
|
+
function Ha({ 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 }) {
|
|
4160
|
+
let y = V(null), b = V(null), x = V(null), S = V(null), [C, w] = z({ kind: "none" }), [T, E] = z(null), { onPointerDown: D, isDragging: O } = ya({
|
|
4083
4161
|
targetRef: y,
|
|
4084
4162
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
4085
4163
|
onMove: E
|
|
4086
4164
|
});
|
|
4087
|
-
|
|
4088
|
-
let k = e.resolvedAt != null, A =
|
|
4089
|
-
|
|
4165
|
+
ja(y, !0);
|
|
4166
|
+
let k = e.resolvedAt != null, A = Se(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
4167
|
+
B(() => {
|
|
4090
4168
|
if (C.kind === "none" || C.kind === "editing") return;
|
|
4091
4169
|
function e(e) {
|
|
4092
4170
|
let t = S.current;
|
|
4093
4171
|
t && !e.composedPath().includes(t) && w({ kind: "none" });
|
|
4094
4172
|
}
|
|
4095
4173
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
4096
|
-
}, [C.kind]),
|
|
4174
|
+
}, [C.kind]), B(() => {
|
|
4097
4175
|
if (C.kind !== "editing") return;
|
|
4098
4176
|
let t = e.comments.find((e) => e._id === C.commentId);
|
|
4099
4177
|
(!t || t.deleted) && w({ kind: "none" });
|
|
4100
4178
|
}, [e.comments, C]);
|
|
4101
|
-
let j =
|
|
4102
|
-
|
|
4179
|
+
let j = V(!0);
|
|
4180
|
+
B(() => {
|
|
4103
4181
|
let e = b.current;
|
|
4104
4182
|
if (e) {
|
|
4105
4183
|
if (j.current) {
|
|
@@ -4108,7 +4186,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4108
4186
|
}
|
|
4109
4187
|
e.scrollHeight - e.scrollTop - e.clientHeight < 80 && (e.scrollTop = e.scrollHeight);
|
|
4110
4188
|
}
|
|
4111
|
-
}, [A.length]),
|
|
4189
|
+
}, [A.length]), B(() => {
|
|
4112
4190
|
let e = y.current;
|
|
4113
4191
|
if (!e) return;
|
|
4114
4192
|
if (typeof e.showPopover == "function" && !e.matches(":popover-open")) try {
|
|
@@ -4119,15 +4197,15 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4119
4197
|
}
|
|
4120
4198
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
4121
4199
|
}, [f]);
|
|
4122
|
-
let M =
|
|
4123
|
-
let t =
|
|
4200
|
+
let M = Se(() => {
|
|
4201
|
+
let t = Tr({
|
|
4124
4202
|
anchorX: e.anchorX,
|
|
4125
4203
|
anchorY: e.anchorY,
|
|
4126
4204
|
anchorSelector: e.anchorSelector
|
|
4127
4205
|
});
|
|
4128
4206
|
return {
|
|
4129
|
-
left:
|
|
4130
|
-
top:
|
|
4207
|
+
left: Ka(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
|
|
4208
|
+
top: Ka(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
|
|
4131
4209
|
};
|
|
4132
4210
|
}, [
|
|
4133
4211
|
e.anchorX,
|
|
@@ -4176,7 +4254,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4176
4254
|
confirmDelete: !1
|
|
4177
4255
|
});
|
|
4178
4256
|
},
|
|
4179
|
-
children: /* @__PURE__ */ $(
|
|
4257
|
+
children: /* @__PURE__ */ $(wa, { size: 16 })
|
|
4180
4258
|
}), C.kind === "thread-menu" ? /* @__PURE__ */ $("div", {
|
|
4181
4259
|
class: "markup-thread-menu-list",
|
|
4182
4260
|
children: [/* @__PURE__ */ $("button", {
|
|
@@ -4207,14 +4285,14 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4207
4285
|
title: "Mark as resolved",
|
|
4208
4286
|
disabled: s,
|
|
4209
4287
|
onClick: _,
|
|
4210
|
-
children: /* @__PURE__ */ $(
|
|
4288
|
+
children: /* @__PURE__ */ $(Ta, { size: 16 })
|
|
4211
4289
|
}) : null,
|
|
4212
4290
|
/* @__PURE__ */ $("button", {
|
|
4213
4291
|
type: "button",
|
|
4214
4292
|
class: "markup-icon-btn",
|
|
4215
4293
|
title: "Close thread",
|
|
4216
4294
|
onClick: f,
|
|
4217
|
-
children: /* @__PURE__ */ $(
|
|
4295
|
+
children: /* @__PURE__ */ $(Ca, { size: 16 })
|
|
4218
4296
|
})
|
|
4219
4297
|
]
|
|
4220
4298
|
})]
|
|
@@ -4241,12 +4319,12 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4241
4319
|
/* @__PURE__ */ $("time", {
|
|
4242
4320
|
class: "markup-comment-time",
|
|
4243
4321
|
datetime: new Date(t.createdAt).toISOString(),
|
|
4244
|
-
title:
|
|
4245
|
-
children:
|
|
4322
|
+
title: Ja(t.createdAt),
|
|
4323
|
+
children: qa(t.createdAt)
|
|
4246
4324
|
}),
|
|
4247
4325
|
/* @__PURE__ */ $("div", {
|
|
4248
4326
|
class: "markup-thread-actions",
|
|
4249
|
-
children: [!k && !l ? /* @__PURE__ */ $(
|
|
4327
|
+
children: [!k && !l ? /* @__PURE__ */ $(Ua, {
|
|
4250
4328
|
comment: t,
|
|
4251
4329
|
pickerOpen: p,
|
|
4252
4330
|
pickerDirection: _,
|
|
@@ -4308,7 +4386,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4308
4386
|
confirmDelete: !1
|
|
4309
4387
|
});
|
|
4310
4388
|
},
|
|
4311
|
-
children: /* @__PURE__ */ $(
|
|
4389
|
+
children: /* @__PURE__ */ $(wa, { size: 16 })
|
|
4312
4390
|
}), d ? /* @__PURE__ */ $("div", {
|
|
4313
4391
|
class: "markup-thread-menu-list",
|
|
4314
4392
|
children: [o ? /* @__PURE__ */ $("button", {
|
|
@@ -4384,7 +4462,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4384
4462
|
children: [t.body, t.editedAt == null ? null : /* @__PURE__ */ $("time", {
|
|
4385
4463
|
class: "markup-comment-edited",
|
|
4386
4464
|
datetime: new Date(t.editedAt).toISOString(),
|
|
4387
|
-
title:
|
|
4465
|
+
title: Ja(t.editedAt),
|
|
4388
4466
|
children: [" ", "(edited)"]
|
|
4389
4467
|
})]
|
|
4390
4468
|
}),
|
|
@@ -4397,7 +4475,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4397
4475
|
alt: "Screenshot"
|
|
4398
4476
|
})
|
|
4399
4477
|
}) : null,
|
|
4400
|
-
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(
|
|
4478
|
+
!l && t.reactions.length > 0 ? /* @__PURE__ */ $(Wa, {
|
|
4401
4479
|
comment: t,
|
|
4402
4480
|
isResolved: k,
|
|
4403
4481
|
onToggle: (e) => g(t._id, e)
|
|
@@ -4417,7 +4495,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4417
4495
|
onClick: (e) => {
|
|
4418
4496
|
e.stopPropagation(), x.current?.close();
|
|
4419
4497
|
},
|
|
4420
|
-
children: /* @__PURE__ */ $(
|
|
4498
|
+
children: /* @__PURE__ */ $(Ca, { size: 16 })
|
|
4421
4499
|
}), /* @__PURE__ */ $("img", {
|
|
4422
4500
|
class: "markup-lightbox-img",
|
|
4423
4501
|
src: e.screenshotUrl,
|
|
@@ -4425,7 +4503,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4425
4503
|
onClick: (e) => e.stopPropagation()
|
|
4426
4504
|
})]
|
|
4427
4505
|
}) : null,
|
|
4428
|
-
t == null ? /* @__PURE__ */ $(
|
|
4506
|
+
t == null ? /* @__PURE__ */ $(Na, {
|
|
4429
4507
|
pending: s,
|
|
4430
4508
|
connecting: i,
|
|
4431
4509
|
signingIn: a,
|
|
@@ -4447,7 +4525,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4447
4525
|
children: "team"
|
|
4448
4526
|
}) : null
|
|
4449
4527
|
]
|
|
4450
|
-
}), /* @__PURE__ */ $(
|
|
4528
|
+
}), /* @__PURE__ */ $(Fa, {
|
|
4451
4529
|
label: "Reply",
|
|
4452
4530
|
placeholder: "Write a reply…",
|
|
4453
4531
|
submitLabel: "Reply",
|
|
@@ -4460,7 +4538,7 @@ function Ia({ thread: e, authorName: t, currentClientId: n, isVerified: r, ident
|
|
|
4460
4538
|
]
|
|
4461
4539
|
});
|
|
4462
4540
|
}
|
|
4463
|
-
function
|
|
4541
|
+
function Ua({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
|
|
4464
4542
|
return /* @__PURE__ */ $("div", {
|
|
4465
4543
|
class: Q("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
|
|
4466
4544
|
ref: i,
|
|
@@ -4470,11 +4548,11 @@ function La({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
4470
4548
|
title: "Add reaction",
|
|
4471
4549
|
"aria-label": "Add reaction",
|
|
4472
4550
|
onClick: a,
|
|
4473
|
-
children: /* @__PURE__ */ $(
|
|
4551
|
+
children: /* @__PURE__ */ $(Oa, { size: 16 })
|
|
4474
4552
|
}), t ? /* @__PURE__ */ $("div", {
|
|
4475
4553
|
class: "markup-reaction-picker",
|
|
4476
4554
|
role: "menu",
|
|
4477
|
-
children:
|
|
4555
|
+
children: Va.map((t) => /* @__PURE__ */ $("button", {
|
|
4478
4556
|
type: "button",
|
|
4479
4557
|
role: "menuitem",
|
|
4480
4558
|
class: Q("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
|
|
@@ -4484,11 +4562,11 @@ function La({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
4484
4562
|
}) : null]
|
|
4485
4563
|
});
|
|
4486
4564
|
}
|
|
4487
|
-
function
|
|
4565
|
+
function Wa({ comment: e, isResolved: t, onToggle: n }) {
|
|
4488
4566
|
return /* @__PURE__ */ $("div", {
|
|
4489
4567
|
class: "markup-reactions",
|
|
4490
4568
|
children: e.reactions.map((e) => {
|
|
4491
|
-
let r =
|
|
4569
|
+
let r = Ga(e.reactors, e.mine, e.count, e.emoji);
|
|
4492
4570
|
return /* @__PURE__ */ $("button", {
|
|
4493
4571
|
type: "button",
|
|
4494
4572
|
class: Q("markup-reaction-chip", e.mine && "is-mine"),
|
|
@@ -4509,14 +4587,14 @@ function Ra({ comment: e, isResolved: t, onToggle: n }) {
|
|
|
4509
4587
|
})
|
|
4510
4588
|
});
|
|
4511
4589
|
}
|
|
4512
|
-
function
|
|
4590
|
+
function Ga(e, t, n, r) {
|
|
4513
4591
|
let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
|
|
4514
4592
|
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}`;
|
|
4515
4593
|
}
|
|
4516
|
-
function
|
|
4594
|
+
function Ka(e, t, n) {
|
|
4517
4595
|
return Math.max(t, Math.min(n, e));
|
|
4518
4596
|
}
|
|
4519
|
-
function
|
|
4597
|
+
function qa(e) {
|
|
4520
4598
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
4521
4599
|
if (n < 60) return "just now";
|
|
4522
4600
|
let r = Math.floor(n / 60);
|
|
@@ -4533,7 +4611,7 @@ function Va(e) {
|
|
|
4533
4611
|
year: "numeric"
|
|
4534
4612
|
});
|
|
4535
4613
|
}
|
|
4536
|
-
function
|
|
4614
|
+
function Ja(e) {
|
|
4537
4615
|
return new Date(e).toLocaleDateString([], {
|
|
4538
4616
|
month: "long",
|
|
4539
4617
|
day: "numeric",
|
|
@@ -4544,7 +4622,7 @@ function Ha(e) {
|
|
|
4544
4622
|
}
|
|
4545
4623
|
//#endregion
|
|
4546
4624
|
//#region src/runtime/ui/app.tsx
|
|
4547
|
-
function
|
|
4625
|
+
function Ya(e) {
|
|
4548
4626
|
return !e.token || e.tokenExpiresAt == null ? null : {
|
|
4549
4627
|
clientId: `markup_user_${e.identity.id}`,
|
|
4550
4628
|
token: e.token,
|
|
@@ -4553,28 +4631,28 @@ function Ua(e) {
|
|
|
4553
4631
|
email: e.identity.email
|
|
4554
4632
|
};
|
|
4555
4633
|
}
|
|
4556
|
-
function
|
|
4634
|
+
function Xa() {
|
|
4557
4635
|
return window.location.host + window.location.pathname;
|
|
4558
4636
|
}
|
|
4559
|
-
function
|
|
4560
|
-
let [
|
|
4561
|
-
|
|
4562
|
-
let [
|
|
4637
|
+
function Za({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "default", screenshots: i }) {
|
|
4638
|
+
let [a, o] = z(Xa), [s, c] = z([]), [l, u] = z(!1), [d, f] = z({ kind: "unresolved" }), [p, m] = z(n), h = V(d);
|
|
4639
|
+
h.current = d;
|
|
4640
|
+
let [g, _] = z(0), v = Se(() => Or({
|
|
4563
4641
|
apiUrl: e,
|
|
4564
4642
|
apiKey: t,
|
|
4565
4643
|
getToken: () => {
|
|
4566
|
-
let e =
|
|
4644
|
+
let e = h.current;
|
|
4567
4645
|
return e.kind === "verified" ? {
|
|
4568
4646
|
token: e.identity.token,
|
|
4569
4647
|
expiresAt: e.identity.tokenExpiresAt
|
|
4570
4648
|
} : null;
|
|
4571
4649
|
},
|
|
4572
4650
|
getAnonToken: () => {
|
|
4573
|
-
let e =
|
|
4651
|
+
let e = h.current;
|
|
4574
4652
|
return e.kind === "anon" ? e.identity.anonToken : null;
|
|
4575
4653
|
},
|
|
4576
4654
|
onUnauthorized: () => {
|
|
4577
|
-
let e =
|
|
4655
|
+
let e = h.current;
|
|
4578
4656
|
if (e.kind !== "verified") return;
|
|
4579
4657
|
let t = {
|
|
4580
4658
|
kind: "recovering",
|
|
@@ -4583,18 +4661,18 @@ function Ga({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4583
4661
|
email: e.identity.email
|
|
4584
4662
|
}
|
|
4585
4663
|
};
|
|
4586
|
-
|
|
4664
|
+
h.current = t, f(t), Br(t), _((e) => e + 1);
|
|
4587
4665
|
}
|
|
4588
|
-
}), [e, t]), [
|
|
4589
|
-
|
|
4590
|
-
let { state: e, preserved: t } =
|
|
4666
|
+
}), [e, t]), [y, b] = z({ kind: "idle" }), [x, S] = z(!1), [C, w] = z(null), [T, E] = z(!1), [D, O] = z(!1), [, k] = z(0), A = V(null), j = Hr(d), M = d.kind === "verified", N = d.kind === "unresolved" || d.kind === "recovering", P = Vr(d);
|
|
4667
|
+
B(() => {
|
|
4668
|
+
let { state: e, preserved: t } = zr();
|
|
4591
4669
|
if (e.kind === "anon" || e.kind === "verified") {
|
|
4592
|
-
|
|
4670
|
+
f(e);
|
|
4593
4671
|
return;
|
|
4594
4672
|
}
|
|
4595
4673
|
let n = !1, r = null, i = 1e3;
|
|
4596
4674
|
function a() {
|
|
4597
|
-
|
|
4675
|
+
v.mintAnonIdentity().then(({ clientId: e, token: r }) => {
|
|
4598
4676
|
if (n) return;
|
|
4599
4677
|
let i = {
|
|
4600
4678
|
kind: "anon",
|
|
@@ -4605,7 +4683,7 @@ function Ga({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4605
4683
|
email: t.email
|
|
4606
4684
|
}
|
|
4607
4685
|
};
|
|
4608
|
-
|
|
4686
|
+
Br(i), f(i);
|
|
4609
4687
|
}).catch(() => {
|
|
4610
4688
|
n || (r = setTimeout(a, Math.min(i, 3e4)), i = Math.min(i * 2, 3e4));
|
|
4611
4689
|
});
|
|
@@ -4613,13 +4691,13 @@ function Ga({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4613
4691
|
return a(), () => {
|
|
4614
4692
|
n = !0, r && clearTimeout(r);
|
|
4615
4693
|
};
|
|
4616
|
-
}, [
|
|
4617
|
-
let [ee, te] =
|
|
4618
|
-
|
|
4694
|
+
}, [v, g]);
|
|
4695
|
+
let [ee, te] = z(null);
|
|
4696
|
+
B(() => {
|
|
4619
4697
|
let e = !1, t = null;
|
|
4620
4698
|
async function n() {
|
|
4621
4699
|
try {
|
|
4622
|
-
let r = await
|
|
4700
|
+
let r = await v.getSubscriptionToken();
|
|
4623
4701
|
if (e) return;
|
|
4624
4702
|
te(r.token);
|
|
4625
4703
|
let i = Math.max(6e4, r.expiresAt - Date.now() - 30 * 6e4);
|
|
@@ -4632,57 +4710,57 @@ function Ga({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4632
4710
|
return n(), () => {
|
|
4633
4711
|
e = !0, t && clearTimeout(t);
|
|
4634
4712
|
};
|
|
4635
|
-
}, [
|
|
4636
|
-
let [ne, re] =
|
|
4637
|
-
|
|
4638
|
-
let t = new
|
|
4713
|
+
}, [v]);
|
|
4714
|
+
let [ne, re] = z(null);
|
|
4715
|
+
B(() => {
|
|
4716
|
+
let t = new rr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
4639
4717
|
return re(t), () => {
|
|
4640
4718
|
t.close(), re((e) => e === t ? null : e);
|
|
4641
4719
|
};
|
|
4642
4720
|
}, [e]);
|
|
4643
|
-
let ie =
|
|
4644
|
-
|
|
4645
|
-
if (!(!ne || !ee)) return
|
|
4721
|
+
let ie = V(!1);
|
|
4722
|
+
B(() => {
|
|
4723
|
+
if (!(!ne || !ee)) return w(null), ne.onUpdate(qt("widget/queries:subscribeThreadsForRoute"), {
|
|
4646
4724
|
subscriptionToken: ee,
|
|
4647
|
-
route:
|
|
4648
|
-
viewerClientId:
|
|
4725
|
+
route: a,
|
|
4726
|
+
viewerClientId: P
|
|
4649
4727
|
}, (e) => {
|
|
4650
|
-
e !== void 0 && (
|
|
4728
|
+
e !== void 0 && (c(e), u(!0));
|
|
4651
4729
|
});
|
|
4652
4730
|
}, [
|
|
4653
4731
|
ne,
|
|
4654
4732
|
ee,
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
]),
|
|
4658
|
-
if (ie.current || !
|
|
4733
|
+
a,
|
|
4734
|
+
P
|
|
4735
|
+
]), B(() => {
|
|
4736
|
+
if (ie.current || !l) return;
|
|
4659
4737
|
let e = window.location.hash.match(/^#markup-thread=(.+)$/);
|
|
4660
4738
|
if (e) {
|
|
4661
4739
|
let t = decodeURIComponent(e[1] ?? "");
|
|
4662
|
-
|
|
4740
|
+
s.find((e) => e._id === t) && b({
|
|
4663
4741
|
kind: "thread",
|
|
4664
4742
|
threadId: t
|
|
4665
4743
|
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
4666
4744
|
}
|
|
4667
4745
|
ie.current = !0;
|
|
4668
|
-
}, [
|
|
4746
|
+
}, [s, l]), B(() => Fr(() => o(Xa())), []), B(() => {
|
|
4669
4747
|
function e(e) {
|
|
4670
|
-
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(),
|
|
4748
|
+
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), E((e) => !e)));
|
|
4671
4749
|
}
|
|
4672
4750
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
4673
|
-
}, []),
|
|
4674
|
-
if (!
|
|
4675
|
-
if (!
|
|
4676
|
-
|
|
4751
|
+
}, []), B(() => {
|
|
4752
|
+
if (!D) return;
|
|
4753
|
+
if (!T) {
|
|
4754
|
+
O(!1);
|
|
4677
4755
|
return;
|
|
4678
4756
|
}
|
|
4679
|
-
let e = window.setTimeout(() =>
|
|
4757
|
+
let e = window.setTimeout(() => O(!1), 5e3);
|
|
4680
4758
|
return () => window.clearTimeout(e);
|
|
4681
|
-
}, [
|
|
4759
|
+
}, [D, T]), B(() => {
|
|
4682
4760
|
let e = null;
|
|
4683
4761
|
function t() {
|
|
4684
4762
|
e ??= requestAnimationFrame(() => {
|
|
4685
|
-
e = null,
|
|
4763
|
+
e = null, k((e) => e + 1);
|
|
4686
4764
|
});
|
|
4687
4765
|
}
|
|
4688
4766
|
window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t);
|
|
@@ -4691,301 +4769,326 @@ function Ga({ apiUrl: e, apiKey: t, position: n = "bottom-right", fab: r = "defa
|
|
|
4691
4769
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n.disconnect(), e != null && cancelAnimationFrame(e);
|
|
4692
4770
|
};
|
|
4693
4771
|
}, []);
|
|
4694
|
-
let ae =
|
|
4695
|
-
|
|
4696
|
-
}, []),
|
|
4697
|
-
|
|
4698
|
-
}, []),
|
|
4699
|
-
let r = t + window.scrollX,
|
|
4700
|
-
|
|
4772
|
+
let ae = H(() => {
|
|
4773
|
+
w(null), b({ kind: "placing" });
|
|
4774
|
+
}, []), F = H(() => {
|
|
4775
|
+
b({ kind: "idle" }), w(null);
|
|
4776
|
+
}, []), oe = V(0), se = H((e, t, n) => {
|
|
4777
|
+
let r = t + window.scrollX, a = n + window.scrollY, o = ++oe.current;
|
|
4778
|
+
if (i?.enabled === !1) {
|
|
4779
|
+
b({
|
|
4780
|
+
kind: "composing-new",
|
|
4781
|
+
coords: e,
|
|
4782
|
+
pageX: r,
|
|
4783
|
+
pageY: a,
|
|
4784
|
+
screenshot: null,
|
|
4785
|
+
screenshotCapturing: !1,
|
|
4786
|
+
screenshotRedactedCount: 0,
|
|
4787
|
+
screenshotRedactedSelectors: [],
|
|
4788
|
+
captureToken: o
|
|
4789
|
+
});
|
|
4790
|
+
return;
|
|
4791
|
+
}
|
|
4792
|
+
b({
|
|
4701
4793
|
kind: "composing-new",
|
|
4702
4794
|
coords: e,
|
|
4703
4795
|
pageX: r,
|
|
4704
|
-
pageY:
|
|
4796
|
+
pageY: a,
|
|
4705
4797
|
screenshot: null,
|
|
4706
4798
|
screenshotCapturing: !0,
|
|
4707
|
-
|
|
4708
|
-
|
|
4799
|
+
screenshotRedactedCount: 0,
|
|
4800
|
+
screenshotRedactedSelectors: [],
|
|
4801
|
+
captureToken: o
|
|
4802
|
+
});
|
|
4803
|
+
let s = A.current != null && A.current.getRootNode() instanceof ShadowRoot ? A.current.getRootNode().host : null, c = {
|
|
4804
|
+
strictScrub: i?.strictScrub,
|
|
4805
|
+
redactSelector: i?.redactSelector
|
|
4806
|
+
};
|
|
4807
|
+
ga(s, {
|
|
4709
4808
|
x: t,
|
|
4710
4809
|
y: n
|
|
4711
|
-
}).then((e) => {
|
|
4712
|
-
|
|
4810
|
+
}, c).then((e) => {
|
|
4811
|
+
b((t) => t.kind !== "composing-new" || t.captureToken !== o ? t : {
|
|
4713
4812
|
...t,
|
|
4714
|
-
screenshot: e,
|
|
4715
|
-
screenshotCapturing: !1
|
|
4813
|
+
screenshot: e?.blob ?? null,
|
|
4814
|
+
screenshotCapturing: !1,
|
|
4815
|
+
screenshotRedactedCount: e?.redactedCount ?? 0,
|
|
4816
|
+
screenshotRedactedSelectors: e?.redactedSelectors ?? []
|
|
4716
4817
|
});
|
|
4717
4818
|
});
|
|
4718
|
-
}, []),
|
|
4719
|
-
if (
|
|
4819
|
+
}, [i]), ce = H((e, t) => {
|
|
4820
|
+
if (d.kind !== "anon") return;
|
|
4720
4821
|
let n = {
|
|
4721
4822
|
kind: "anon",
|
|
4722
4823
|
identity: {
|
|
4723
|
-
...
|
|
4824
|
+
...d.identity,
|
|
4724
4825
|
name: e,
|
|
4725
4826
|
email: t
|
|
4726
4827
|
}
|
|
4727
4828
|
};
|
|
4728
|
-
|
|
4729
|
-
}, [
|
|
4730
|
-
if (!
|
|
4731
|
-
|
|
4829
|
+
Br(n), f(n);
|
|
4830
|
+
}, [d]), [le, ue] = z(!1), I = H(async () => {
|
|
4831
|
+
if (!le) {
|
|
4832
|
+
w(null), ue(!0);
|
|
4732
4833
|
try {
|
|
4733
|
-
let n =
|
|
4834
|
+
let n = Ya(await Wr(e, t));
|
|
4734
4835
|
if (!n) throw Error("Sign-in did not return a verified token");
|
|
4735
4836
|
let r = {
|
|
4736
4837
|
kind: "verified",
|
|
4737
4838
|
identity: n
|
|
4738
4839
|
};
|
|
4739
|
-
|
|
4840
|
+
Br(r), f(r);
|
|
4740
4841
|
} catch (e) {
|
|
4741
|
-
|
|
4842
|
+
w(e instanceof Error ? e.message : "Sign-in failed");
|
|
4742
4843
|
} finally {
|
|
4743
|
-
|
|
4844
|
+
ue(!1);
|
|
4744
4845
|
}
|
|
4745
4846
|
}
|
|
4746
4847
|
}, [
|
|
4747
4848
|
e,
|
|
4748
4849
|
t,
|
|
4749
|
-
|
|
4750
|
-
]),
|
|
4751
|
-
if (
|
|
4752
|
-
let n =
|
|
4850
|
+
le
|
|
4851
|
+
]), de = H(async (e, t) => {
|
|
4852
|
+
if (y.kind !== "composing-new") return;
|
|
4853
|
+
let n = Ur(d);
|
|
4753
4854
|
if (n) {
|
|
4754
|
-
|
|
4855
|
+
S(!0), w(null);
|
|
4755
4856
|
try {
|
|
4756
4857
|
let r;
|
|
4757
|
-
if (t &&
|
|
4758
|
-
let { uploadUrl: e } = await
|
|
4858
|
+
if (t && y.screenshot) {
|
|
4859
|
+
let { uploadUrl: e } = await v.getScreenshotUploadUrl(), t = await fetch(e, {
|
|
4759
4860
|
method: "POST",
|
|
4760
|
-
headers: { "Content-Type":
|
|
4761
|
-
body:
|
|
4861
|
+
headers: { "Content-Type": y.screenshot.type || "image/png" },
|
|
4862
|
+
body: y.screenshot
|
|
4762
4863
|
});
|
|
4763
4864
|
if (!t.ok) throw Error(`Screenshot upload failed (${t.status})`);
|
|
4764
4865
|
let { storageId: n } = await t.json();
|
|
4765
4866
|
r = n;
|
|
4766
4867
|
}
|
|
4767
|
-
let
|
|
4868
|
+
let i = await v.createThread({
|
|
4768
4869
|
url: window.location.href,
|
|
4769
|
-
route:
|
|
4770
|
-
anchorSelector:
|
|
4771
|
-
anchorX:
|
|
4772
|
-
anchorY:
|
|
4773
|
-
anchorOffsetX:
|
|
4774
|
-
anchorOffsetY:
|
|
4775
|
-
viewportW:
|
|
4776
|
-
viewportY:
|
|
4870
|
+
route: a,
|
|
4871
|
+
anchorSelector: y.coords.anchorSelector,
|
|
4872
|
+
anchorX: y.coords.anchorX,
|
|
4873
|
+
anchorY: y.coords.anchorY,
|
|
4874
|
+
anchorOffsetX: y.coords.anchorOffsetX,
|
|
4875
|
+
anchorOffsetY: y.coords.anchorOffsetY,
|
|
4876
|
+
viewportW: y.coords.viewportW,
|
|
4877
|
+
viewportY: y.coords.viewportY,
|
|
4777
4878
|
userAgent: navigator.userAgent,
|
|
4778
4879
|
authorName: n.name,
|
|
4779
4880
|
authorEmail: n.email,
|
|
4780
4881
|
body: e,
|
|
4781
4882
|
screenshotStorageId: r
|
|
4782
4883
|
});
|
|
4783
|
-
|
|
4884
|
+
c((e) => [...e, i.thread]), b({
|
|
4784
4885
|
kind: "thread",
|
|
4785
|
-
threadId:
|
|
4886
|
+
threadId: i.thread._id
|
|
4786
4887
|
});
|
|
4787
4888
|
} catch (e) {
|
|
4788
|
-
|
|
4889
|
+
w(e instanceof Error ? e.message : "Failed to post");
|
|
4789
4890
|
} finally {
|
|
4790
|
-
|
|
4891
|
+
S(!1);
|
|
4791
4892
|
}
|
|
4792
4893
|
}
|
|
4793
4894
|
}, [
|
|
4794
|
-
_,
|
|
4795
|
-
u,
|
|
4796
4895
|
v,
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4896
|
+
d,
|
|
4897
|
+
y,
|
|
4898
|
+
a
|
|
4899
|
+
]), fe = H(async () => {
|
|
4900
|
+
if (y.kind !== "thread") return;
|
|
4901
|
+
let e = y.threadId;
|
|
4902
|
+
S(!0), w(null);
|
|
4802
4903
|
try {
|
|
4803
|
-
await
|
|
4904
|
+
await v.deleteThread(e), c((t) => t.filter((t) => t._id !== e)), b({ kind: "idle" });
|
|
4804
4905
|
} catch (e) {
|
|
4805
|
-
|
|
4906
|
+
w(e instanceof Error ? e.message : "Failed to delete");
|
|
4806
4907
|
} finally {
|
|
4807
|
-
|
|
4908
|
+
S(!1);
|
|
4808
4909
|
}
|
|
4809
|
-
}, [
|
|
4810
|
-
if (
|
|
4811
|
-
let e =
|
|
4812
|
-
|
|
4910
|
+
}, [v, y]), pe = H(async () => {
|
|
4911
|
+
if (y.kind !== "thread") return;
|
|
4912
|
+
let e = y.threadId;
|
|
4913
|
+
S(!0), w(null);
|
|
4813
4914
|
try {
|
|
4814
|
-
await
|
|
4915
|
+
await v.resolveThread(e, P), c((t) => t.filter((t) => t._id !== e)), b({ kind: "idle" });
|
|
4815
4916
|
} catch (e) {
|
|
4816
|
-
|
|
4917
|
+
w(e instanceof Error ? e.message : "Failed to resolve");
|
|
4817
4918
|
} finally {
|
|
4818
|
-
|
|
4919
|
+
S(!1);
|
|
4819
4920
|
}
|
|
4820
4921
|
}, [
|
|
4821
|
-
_,
|
|
4822
4922
|
v,
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4923
|
+
y,
|
|
4924
|
+
P
|
|
4925
|
+
]), me = H(async (e) => {
|
|
4926
|
+
if (y.kind !== "thread") return;
|
|
4927
|
+
let t = Ur(d);
|
|
4827
4928
|
if (!t) return;
|
|
4828
|
-
let n =
|
|
4829
|
-
|
|
4929
|
+
let n = y.threadId;
|
|
4930
|
+
S(!0), w(null);
|
|
4830
4931
|
try {
|
|
4831
|
-
let r = await
|
|
4932
|
+
let r = await v.addComment(n, {
|
|
4832
4933
|
body: e,
|
|
4833
4934
|
authorName: t.name,
|
|
4834
4935
|
authorEmail: t.email
|
|
4835
4936
|
});
|
|
4836
|
-
|
|
4937
|
+
c((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4837
4938
|
} catch (e) {
|
|
4838
|
-
|
|
4939
|
+
w(e instanceof Error ? e.message : "Failed to reply");
|
|
4839
4940
|
} finally {
|
|
4840
|
-
|
|
4941
|
+
S(!1);
|
|
4841
4942
|
}
|
|
4842
4943
|
}, [
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
]),
|
|
4847
|
-
if (
|
|
4848
|
-
let n =
|
|
4849
|
-
|
|
4944
|
+
v,
|
|
4945
|
+
d,
|
|
4946
|
+
y
|
|
4947
|
+
]), L = H(async (e, t) => {
|
|
4948
|
+
if (y.kind !== "thread" || d.kind !== "anon" && d.kind !== "verified") return;
|
|
4949
|
+
let n = y.threadId;
|
|
4950
|
+
S(!0), w(null);
|
|
4850
4951
|
try {
|
|
4851
|
-
let r = await
|
|
4852
|
-
|
|
4952
|
+
let r = await v.editComment(n, e, { body: t });
|
|
4953
|
+
c((e) => e.map((e) => e._id === n ? r.thread : e));
|
|
4853
4954
|
} catch (e) {
|
|
4854
|
-
throw
|
|
4955
|
+
throw w(e instanceof Error ? e.message : "Failed to edit"), e;
|
|
4855
4956
|
} finally {
|
|
4856
|
-
|
|
4957
|
+
S(!1);
|
|
4857
4958
|
}
|
|
4858
4959
|
}, [
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
]),
|
|
4863
|
-
if (
|
|
4864
|
-
let t =
|
|
4865
|
-
|
|
4960
|
+
v,
|
|
4961
|
+
d,
|
|
4962
|
+
y
|
|
4963
|
+
]), he = H(async (e) => {
|
|
4964
|
+
if (y.kind !== "thread" || d.kind !== "anon" && d.kind !== "verified") return;
|
|
4965
|
+
let t = y.threadId;
|
|
4966
|
+
S(!0), w(null);
|
|
4866
4967
|
try {
|
|
4867
|
-
let n = await
|
|
4868
|
-
|
|
4968
|
+
let n = await v.deleteComment(t, e);
|
|
4969
|
+
c((e) => e.map((e) => e._id === t ? n.thread : e));
|
|
4869
4970
|
} catch (e) {
|
|
4870
|
-
|
|
4971
|
+
w(e instanceof Error ? e.message : "Failed to delete");
|
|
4871
4972
|
} finally {
|
|
4872
|
-
|
|
4973
|
+
S(!1);
|
|
4873
4974
|
}
|
|
4874
4975
|
}, [
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
]),
|
|
4879
|
-
if (
|
|
4880
|
-
let n =
|
|
4976
|
+
v,
|
|
4977
|
+
d,
|
|
4978
|
+
y
|
|
4979
|
+
]), ge = H(async (e, t) => {
|
|
4980
|
+
if (y.kind !== "thread") return;
|
|
4981
|
+
let n = Ur(d);
|
|
4881
4982
|
if (!n) return;
|
|
4882
|
-
let r =
|
|
4883
|
-
|
|
4983
|
+
let r = y.threadId;
|
|
4984
|
+
w(null);
|
|
4884
4985
|
try {
|
|
4885
|
-
let i = await
|
|
4986
|
+
let i = await v.toggleReaction(e, {
|
|
4886
4987
|
emoji: t,
|
|
4887
4988
|
authorName: n.name
|
|
4888
4989
|
});
|
|
4889
|
-
|
|
4990
|
+
c((e) => e.map((e) => e._id === r ? i.thread : e));
|
|
4890
4991
|
} catch (e) {
|
|
4891
|
-
|
|
4992
|
+
w(e instanceof Error ? e.message : "Failed to react");
|
|
4892
4993
|
}
|
|
4893
|
-
}, [
|
|
4894
|
-
_,
|
|
4895
|
-
u,
|
|
4896
|
-
v
|
|
4897
|
-
]), I = v.kind === "thread" ? o.find((e) => e._id === v.threadId) ?? null : null, ve = j || N != null && N === I?.authorClientId;
|
|
4898
|
-
return R(() => {
|
|
4899
|
-
v.kind === "thread" && I == null && oe();
|
|
4900
4994
|
}, [
|
|
4901
4995
|
v,
|
|
4902
|
-
|
|
4903
|
-
|
|
4996
|
+
d,
|
|
4997
|
+
y
|
|
4998
|
+
]), R = y.kind === "thread" ? s.find((e) => e._id === y.threadId) ?? null : null, _e = M || P != null && P === R?.authorClientId;
|
|
4999
|
+
return B(() => {
|
|
5000
|
+
y.kind === "thread" && R == null && F();
|
|
5001
|
+
}, [
|
|
5002
|
+
y,
|
|
5003
|
+
R,
|
|
5004
|
+
F
|
|
4904
5005
|
]), /* @__PURE__ */ $("div", {
|
|
4905
5006
|
class: "markup-root",
|
|
4906
|
-
ref:
|
|
5007
|
+
ref: A,
|
|
4907
5008
|
children: [
|
|
4908
|
-
|
|
5009
|
+
y.kind === "placing" ? null : /* @__PURE__ */ $("div", {
|
|
4909
5010
|
class: "markup-pins-layer",
|
|
4910
|
-
children: [
|
|
4911
|
-
let t =
|
|
5011
|
+
children: [T ? null : s.map((e) => {
|
|
5012
|
+
let t = y.kind === "thread" && y.threadId === e._id, n = Tr({
|
|
4912
5013
|
anchorX: e.anchorX,
|
|
4913
5014
|
anchorY: e.anchorY,
|
|
4914
5015
|
anchorSelector: e.anchorSelector,
|
|
4915
5016
|
anchorOffsetX: e.anchorOffsetX,
|
|
4916
5017
|
anchorOffsetY: e.anchorOffsetY
|
|
4917
5018
|
}), r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
4918
|
-
return /* @__PURE__ */ $(
|
|
5019
|
+
return /* @__PURE__ */ $(Ra, {
|
|
4919
5020
|
pageX: n.pageX,
|
|
4920
5021
|
pageY: n.pageY,
|
|
4921
5022
|
count: r,
|
|
4922
5023
|
active: t,
|
|
4923
|
-
onClick: () =>
|
|
5024
|
+
onClick: () => b({
|
|
4924
5025
|
kind: "thread",
|
|
4925
5026
|
threadId: e._id
|
|
4926
5027
|
})
|
|
4927
5028
|
}, e._id);
|
|
4928
|
-
}),
|
|
4929
|
-
pageX:
|
|
4930
|
-
pageY:
|
|
5029
|
+
}), y.kind === "composing-new" ? /* @__PURE__ */ $(za, {
|
|
5030
|
+
pageX: y.pageX,
|
|
5031
|
+
pageY: y.pageY
|
|
4931
5032
|
}) : null]
|
|
4932
5033
|
}),
|
|
4933
|
-
|
|
4934
|
-
onPlace:
|
|
4935
|
-
onCancel:
|
|
5034
|
+
y.kind === "placing" ? /* @__PURE__ */ $(Ba, {
|
|
5035
|
+
onPlace: se,
|
|
5036
|
+
onCancel: F
|
|
4936
5037
|
}) : null,
|
|
4937
|
-
|
|
4938
|
-
thread:
|
|
4939
|
-
authorName:
|
|
4940
|
-
currentClientId:
|
|
4941
|
-
isVerified:
|
|
4942
|
-
identityResolving:
|
|
4943
|
-
signingIn:
|
|
4944
|
-
canDelete:
|
|
4945
|
-
pending:
|
|
4946
|
-
error:
|
|
4947
|
-
hidden:
|
|
4948
|
-
onAuthor:
|
|
4949
|
-
onSignIn:
|
|
4950
|
-
onClose:
|
|
4951
|
-
onReply:
|
|
4952
|
-
onEditComment:
|
|
4953
|
-
onDeleteComment:
|
|
4954
|
-
onToggleReaction:
|
|
4955
|
-
onDelete:
|
|
4956
|
-
onResolve:
|
|
4957
|
-
},
|
|
4958
|
-
|
|
4959
|
-
pageX:
|
|
4960
|
-
pageY:
|
|
4961
|
-
authorName:
|
|
4962
|
-
isVerified:
|
|
4963
|
-
identityResolving:
|
|
4964
|
-
signingIn:
|
|
4965
|
-
pending:
|
|
4966
|
-
error:
|
|
4967
|
-
screenshot:
|
|
4968
|
-
screenshotCapturing:
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
5038
|
+
y.kind === "thread" && R ? /* @__PURE__ */ $(Ha, {
|
|
5039
|
+
thread: R,
|
|
5040
|
+
authorName: j,
|
|
5041
|
+
currentClientId: P ?? null,
|
|
5042
|
+
isVerified: M,
|
|
5043
|
+
identityResolving: N,
|
|
5044
|
+
signingIn: le,
|
|
5045
|
+
canDelete: _e,
|
|
5046
|
+
pending: x,
|
|
5047
|
+
error: C,
|
|
5048
|
+
hidden: T,
|
|
5049
|
+
onAuthor: ce,
|
|
5050
|
+
onSignIn: I,
|
|
5051
|
+
onClose: F,
|
|
5052
|
+
onReply: me,
|
|
5053
|
+
onEditComment: L,
|
|
5054
|
+
onDeleteComment: he,
|
|
5055
|
+
onToggleReaction: ge,
|
|
5056
|
+
onDelete: fe,
|
|
5057
|
+
onResolve: pe
|
|
5058
|
+
}, R._id) : null,
|
|
5059
|
+
y.kind === "composing-new" ? /* @__PURE__ */ $(Ia, {
|
|
5060
|
+
pageX: y.pageX,
|
|
5061
|
+
pageY: y.pageY,
|
|
5062
|
+
authorName: j,
|
|
5063
|
+
isVerified: M,
|
|
5064
|
+
identityResolving: N,
|
|
5065
|
+
signingIn: le,
|
|
5066
|
+
pending: x,
|
|
5067
|
+
error: C,
|
|
5068
|
+
screenshot: y.screenshot,
|
|
5069
|
+
screenshotCapturing: y.screenshotCapturing,
|
|
5070
|
+
screenshotRedactedCount: y.screenshotRedactedCount,
|
|
5071
|
+
screenshotRedactedSelectors: y.screenshotRedactedSelectors,
|
|
5072
|
+
onAuthor: ce,
|
|
5073
|
+
onSignIn: I,
|
|
5074
|
+
onSubmit: de,
|
|
5075
|
+
onClose: F
|
|
4973
5076
|
}) : null,
|
|
4974
|
-
!
|
|
4975
|
-
active:
|
|
4976
|
-
onToggle: () =>
|
|
5077
|
+
!T || y.kind === "placing" || y.kind === "composing-new" ? /* @__PURE__ */ $(ka, {
|
|
5078
|
+
active: y.kind === "placing",
|
|
5079
|
+
onToggle: () => y.kind === "placing" ? F() : ae(),
|
|
4977
5080
|
onHide: () => {
|
|
4978
|
-
|
|
5081
|
+
E(!0), O(!0);
|
|
4979
5082
|
},
|
|
4980
|
-
position:
|
|
4981
|
-
onPositionChange:
|
|
5083
|
+
position: p,
|
|
5084
|
+
onPositionChange: m,
|
|
4982
5085
|
variant: r
|
|
4983
5086
|
}) : null,
|
|
4984
|
-
|
|
5087
|
+
T && D ? /* @__PURE__ */ $(Qa, { position: p }) : null
|
|
4985
5088
|
]
|
|
4986
5089
|
});
|
|
4987
5090
|
}
|
|
4988
|
-
function
|
|
5091
|
+
function Qa({ position: e }) {
|
|
4989
5092
|
let t = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? "⌘" : "Ctrl";
|
|
4990
5093
|
return /* @__PURE__ */ $("div", {
|
|
4991
5094
|
class: Q("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : "markup-hud-hidden-toast-right"),
|
|
@@ -5007,33 +5110,33 @@ function Ka({ position: e }) {
|
|
|
5007
5110
|
}
|
|
5008
5111
|
//#endregion
|
|
5009
5112
|
//#region src/runtime/mount.tsx
|
|
5010
|
-
function
|
|
5113
|
+
function $a(e, t) {
|
|
5011
5114
|
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none";
|
|
5012
5115
|
let n = t.theme ?? "auto";
|
|
5013
5116
|
n !== "auto" && (e.dataset.theme = n);
|
|
5014
5117
|
let r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
5015
|
-
i.textContent =
|
|
5118
|
+
i.textContent = le, r.appendChild(i);
|
|
5016
5119
|
let a = document.createElement("div");
|
|
5017
5120
|
a.className = "markup-shadow-root", r.appendChild(a);
|
|
5018
5121
|
let { theme: o, ...s } = t;
|
|
5019
|
-
return
|
|
5122
|
+
return ce(/* @__PURE__ */ $(Za, { ...s }), a), () => ce(null, a);
|
|
5020
5123
|
}
|
|
5021
5124
|
//#endregion
|
|
5022
5125
|
//#region src/widget.ts
|
|
5023
|
-
var
|
|
5024
|
-
function
|
|
5126
|
+
var eo = null, to = null;
|
|
5127
|
+
function no(e) {
|
|
5025
5128
|
if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey — widget not mounted"), () => {};
|
|
5026
|
-
|
|
5129
|
+
ro();
|
|
5027
5130
|
let t = document.createElement("div");
|
|
5028
|
-
return t.id = "markup-widget", document.body.appendChild(t),
|
|
5131
|
+
return t.id = "markup-widget", document.body.appendChild(t), to = t, eo = $a(t, e), ro;
|
|
5029
5132
|
}
|
|
5030
|
-
function
|
|
5031
|
-
|
|
5133
|
+
function ro() {
|
|
5134
|
+
eo &&= (eo(), null), to?.parentNode && to.parentNode.removeChild(to), to = null;
|
|
5032
5135
|
}
|
|
5033
5136
|
if (typeof document < "u") {
|
|
5034
5137
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
5035
5138
|
if (t && n) {
|
|
5036
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () =>
|
|
5139
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = () => no({
|
|
5037
5140
|
apiUrl: t,
|
|
5038
5141
|
apiKey: n,
|
|
5039
5142
|
position: r,
|
|
@@ -5044,4 +5147,4 @@ if (typeof document < "u") {
|
|
|
5044
5147
|
}
|
|
5045
5148
|
}
|
|
5046
5149
|
//#endregion
|
|
5047
|
-
export {
|
|
5150
|
+
export { ro as destroy, no as init };
|