@pluno/product-agent-web 0.1.115 → 0.1.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/product-agent-widget.js +332 -253
- package/dist/widget.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { PlunoProductAgent as Si, getProductAgentOriginAccessErrorMessage as Ci } from "./product-agent-sdk.js";
|
|
2
|
-
const Ei = "#7c3aed", kt = "M547 151 C516 151 493 169 485 199 L382 606 C373 641 396 666 431 666 L523 666 C552 666 568 684 563 713 L491 1028 C486 1054 510 1067 527 1044 L894 487 C915 455 894 432 856 432 L815 432 C784 432 773 411 789 382 L904 205 C922 171 901 145 859 145 Z", Lt = "#2c2a1e",
|
|
2
|
+
const Ei = "#7c3aed", kt = "M547 151 C516 151 493 169 485 199 L382 606 C373 641 396 666 431 666 L523 666 C552 666 568 684 563 713 L491 1028 C486 1054 510 1067 527 1044 L894 487 C915 455 894 432 856 432 L815 432 C784 432 773 411 789 382 L904 205 C922 171 901 145 859 145 Z", Lt = "#2c2a1e", $n = [253, 250, 241], qn = 3.5;
|
|
3
3
|
function Lo(e) {
|
|
4
4
|
const t = To(e);
|
|
5
|
-
if (
|
|
5
|
+
if (jn(st(t), $n) >= qn)
|
|
6
6
|
return t;
|
|
7
|
-
let i =
|
|
8
|
-
const o =
|
|
7
|
+
let i = st(t);
|
|
8
|
+
const o = st(Lt);
|
|
9
9
|
for (let r = 0; r < 6; r += 1)
|
|
10
|
-
if (i = Ti(i, o, 0.22),
|
|
10
|
+
if (i = Ti(i, o, 0.22), jn(i, $n) >= qn)
|
|
11
11
|
return dn(i);
|
|
12
12
|
return dn(i);
|
|
13
13
|
}
|
|
@@ -20,7 +20,7 @@ function ki() {
|
|
|
20
20
|
return n;
|
|
21
21
|
}
|
|
22
22
|
function Li(e) {
|
|
23
|
-
const t = To(e), n = cn(
|
|
23
|
+
const t = To(e), n = cn(st(t));
|
|
24
24
|
return n > 0.86 ? {
|
|
25
25
|
top: "#ffffff",
|
|
26
26
|
middle: "#f6f6f6",
|
|
@@ -44,23 +44,23 @@ function Li(e) {
|
|
|
44
44
|
inner: "#4b4b4b",
|
|
45
45
|
shadow: "#000000"
|
|
46
46
|
} : {
|
|
47
|
-
top:
|
|
48
|
-
middle:
|
|
49
|
-
bottom:
|
|
50
|
-
edgeStart:
|
|
51
|
-
edgeMiddle:
|
|
52
|
-
edgeEnd:
|
|
53
|
-
glow:
|
|
54
|
-
highlight:
|
|
55
|
-
inner:
|
|
56
|
-
shadow:
|
|
47
|
+
top: pe(t, 0.28, -0.03),
|
|
48
|
+
middle: pe(t, 0.08, 0.04),
|
|
49
|
+
bottom: pe(t, -0.1, 0.02),
|
|
50
|
+
edgeStart: pe(t, 0.08, 0.08),
|
|
51
|
+
edgeMiddle: pe(t, -0.08, 0.08),
|
|
52
|
+
edgeEnd: pe(t, -0.18, 0.05),
|
|
53
|
+
glow: pe(t, 0.32, -0.12),
|
|
54
|
+
highlight: pe(t, 0.38, -0.18),
|
|
55
|
+
inner: pe(t, 0.24, -0.1),
|
|
56
|
+
shadow: pe(t, -0.25, -0.08)
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function To(e) {
|
|
60
60
|
const t = e.trim();
|
|
61
61
|
return /^#[0-9a-f]{6}$/i.test(t) ? t.toLowerCase() : /^#[0-9a-f]{3}$/i.test(t) ? `#${t.slice(1).split("").map((n) => n + n).join("").toLowerCase()}` : Ei;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function st(e) {
|
|
64
64
|
return [
|
|
65
65
|
Number.parseInt(e.slice(1, 3), 16),
|
|
66
66
|
Number.parseInt(e.slice(3, 5), 16),
|
|
@@ -78,7 +78,7 @@ function cn([e, t, n]) {
|
|
|
78
78
|
};
|
|
79
79
|
return 0.2126 * i(e) + 0.7152 * i(t) + 0.0722 * i(n);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function jn(e, t) {
|
|
82
82
|
const n = cn(e), i = cn(t), [o, r] = n > i ? [n, i] : [i, n];
|
|
83
83
|
return (o + 0.05) / (r + 0.05);
|
|
84
84
|
}
|
|
@@ -90,8 +90,8 @@ function Ti(e, t, n) {
|
|
|
90
90
|
e[2] + (t[2] - e[2]) * i
|
|
91
91
|
];
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
const [i, o, r] = Ai(
|
|
93
|
+
function pe(e, t, n) {
|
|
94
|
+
const [i, o, r] = Ai(st(e));
|
|
95
95
|
return dn(Ii(i, un(o + n), un(r + t)));
|
|
96
96
|
}
|
|
97
97
|
function Ai([e, t, n]) {
|
|
@@ -124,10 +124,10 @@ function Pi(e) {
|
|
|
124
124
|
const n = e[t];
|
|
125
125
|
if (n.role !== "tool" || n.toolName !== Ao)
|
|
126
126
|
continue;
|
|
127
|
-
const i =
|
|
127
|
+
const i = Kn(e, t, "assistant");
|
|
128
128
|
if (!i)
|
|
129
129
|
return null;
|
|
130
|
-
const o =
|
|
130
|
+
const o = Kn(e, i.index, "user");
|
|
131
131
|
return o ? {
|
|
132
132
|
id: `share:${n.callId ?? n.id}`,
|
|
133
133
|
userPrompt: o.content,
|
|
@@ -142,7 +142,7 @@ function Ni(e) {
|
|
|
142
142
|
t ^= n.charCodeAt(0), t = Math.imul(t, 16777619);
|
|
143
143
|
return (t >>> 0) % 2 === 0 ? "referral" : "social";
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Kn(e, t, n) {
|
|
146
146
|
for (let i = t - 1; i >= 0; i -= 1) {
|
|
147
147
|
const o = e[i];
|
|
148
148
|
if (o.role === n && o.content.trim())
|
|
@@ -150,7 +150,7 @@ function jn(e, t, n) {
|
|
|
150
150
|
}
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
|
-
const Ri = "https://app.pluno.ai",
|
|
153
|
+
const Ri = "https://app.pluno.ai", zi = "/api/product-agent/embed/active-users", Mi = 1800, Di = 15e3, Oi = 250, Ui = 1e3, Bi = 3e4;
|
|
154
154
|
function Fi(e, t = {}) {
|
|
155
155
|
let n = !1, i = null, o = null, r = null;
|
|
156
156
|
const l = () => {
|
|
@@ -170,7 +170,7 @@ function Fi(e, t = {}) {
|
|
|
170
170
|
l();
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
const v = Math.min(1, (performance.now() - m) /
|
|
173
|
+
const v = Math.min(1, (performance.now() - m) / Mi);
|
|
174
174
|
i = Math.round(h + (g - h) * $i(v)), e(i), v >= 1 && (i = g, e(g), l());
|
|
175
175
|
}, Oi);
|
|
176
176
|
}, c = async () => {
|
|
@@ -190,18 +190,18 @@ function Fi(e, t = {}) {
|
|
|
190
190
|
async function Wi(e) {
|
|
191
191
|
if (e.loader)
|
|
192
192
|
return e.loader();
|
|
193
|
-
const n = await (e.fetcher ?? fetch)(new URL(
|
|
193
|
+
const n = await (e.fetcher ?? fetch)(new URL(zi, Hi(e.backendUrl ?? Ri)).toString(), {
|
|
194
194
|
cache: "no-store",
|
|
195
195
|
credentials: "omit"
|
|
196
196
|
});
|
|
197
197
|
if (!n.ok)
|
|
198
198
|
throw new Error("Failed to load active users");
|
|
199
|
-
const i = await n.json(), o =
|
|
199
|
+
const i = await n.json(), o = Vn(i.count), r = Vn(i.refreshAfterMs ?? i.refresh_after_ms);
|
|
200
200
|
if (o === null || r === null)
|
|
201
201
|
throw new Error("Invalid active users response");
|
|
202
202
|
return { count: o, refreshAfterMs: r };
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Vn(e) {
|
|
205
205
|
return typeof e != "number" || !Number.isFinite(e) || e < 0 ? null : Math.round(e);
|
|
206
206
|
}
|
|
207
207
|
function Hi(e) {
|
|
@@ -268,7 +268,7 @@ function Zi(e) {
|
|
|
268
268
|
}
|
|
269
269
|
const r = o.match(/^[ \t]{0,3}(`{3,}|~{3,})/);
|
|
270
270
|
if (r) {
|
|
271
|
-
t +=
|
|
271
|
+
t += Yn(n) + o, n = "", i = {
|
|
272
272
|
marker: r[1][0],
|
|
273
273
|
length: r[1].length
|
|
274
274
|
};
|
|
@@ -276,19 +276,19 @@ function Zi(e) {
|
|
|
276
276
|
}
|
|
277
277
|
n += o;
|
|
278
278
|
}
|
|
279
|
-
return t +
|
|
279
|
+
return t + Yn(n);
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Yn(e) {
|
|
282
282
|
let t = "", n = 0;
|
|
283
283
|
for (const i of e.matchAll(Xi)) {
|
|
284
284
|
const o = i.index ?? 0;
|
|
285
|
-
t +=
|
|
285
|
+
t += Xn(
|
|
286
286
|
e.slice(n, o)
|
|
287
287
|
), t += i[0], n = o + i[0].length;
|
|
288
288
|
}
|
|
289
|
-
return t +
|
|
289
|
+
return t + Xn(e.slice(n));
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Xn(e) {
|
|
292
292
|
return e.replace(
|
|
293
293
|
/\[([^\]\n]*\S[^\]\n]*)\][ \t]+\(([^)\s]+)\)/g,
|
|
294
294
|
(t, n, i, o, r) => r[o - 1] === "!" || Ji(r, o) || Qi(r, o, n) ? t : `[${n}](${i})`
|
|
@@ -309,7 +309,7 @@ function Qi(e, t, n) {
|
|
|
309
309
|
e.slice(i, t)
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
|
-
const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-connect", oa = "product-agent:sdk-preview-socket-send", ia = "product-agent:sdk-preview-socket-close", aa = "product-agent:sdk-preview-socket-open", ra = "product-agent:sdk-preview-socket-message", la = "product-agent:sdk-preview-socket-error",
|
|
312
|
+
const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-connect", oa = "product-agent:sdk-preview-socket-send", ia = "product-agent:sdk-preview-socket-close", aa = "product-agent:sdk-preview-socket-open", ra = "product-agent:sdk-preview-socket-message", la = "product-agent:sdk-preview-socket-error", pa = "product-agent:sdk-preview-socket-closed", Zn = "product-agent:sdk-preview-socket-id", sa = "data-pluno-sdk-preview-channel", Po = "data-pluno-auto-mounted", be = "__plunoProductAgentAutoMountOwner", da = 1e4, ca = "Failed to load Pluno widget token", Jn = "Timed out loading Pluno widget token", ua = "pluno.productAgent.widgetClientId.", Jt = /* @__PURE__ */ new Set(), ga = "product-agent:preview-diagnostic", No = "pluno.productAgent.sharePromptsDisabled", ha = 3, Qn = 'dialog[open], [aria-modal="true"], [role="dialog"]', ma = 400, fa = 5e3, wa = 500, eo = "Close the page's popup to chat", ba = "No recent chats for this page yet.", _e = {
|
|
313
313
|
launcherLabel: "Ask for anything...",
|
|
314
314
|
accentColor: "#7c3aed",
|
|
315
315
|
colorScheme: "light",
|
|
@@ -317,7 +317,7 @@ const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-conne
|
|
|
317
317
|
scribbleStyle: !0,
|
|
318
318
|
position: "bottom-right",
|
|
319
319
|
movableLauncher: !0
|
|
320
|
-
}, _a = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive',
|
|
320
|
+
}, _a = '"Architects Daughter", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", "Comic Sans", "Segoe Print", cursive', to = "pluno-pa-scribble-font", Ro = 190, zo = 41, no = 22, xa = 1, ya = 48, Sn = 420, va = 520, Sa = 0.24, Cn = 680, Ca = 800, Ea = 0.76, N = 8, Ue = 50, Mo = "http://www.w3.org/2000/svg", gn = 26, hn = 8, ka = 36, mn = 16, La = 4, oo = [
|
|
321
321
|
{
|
|
322
322
|
ellipseCx: "17.5",
|
|
323
323
|
ellipseCy: "24.5",
|
|
@@ -355,7 +355,7 @@ const Io = 100, ea = 1e4, ta = 5e3, na = "product-agent:sdk-preview-socket-conne
|
|
|
355
355
|
pathStrokeWidth: "2.45"
|
|
356
356
|
}
|
|
357
357
|
], Ta = 11, Aa = 13, fn = 4, Do = 10, Oo = 40, Ia = "movable-launcher-position-v2", Uo = "pluno-pa-widget-styles", Bo = "data-pluno-pa-widget-styles";
|
|
358
|
-
let
|
|
358
|
+
let io = 0;
|
|
359
359
|
function Pa(e) {
|
|
360
360
|
return (t) => new xe(t, e);
|
|
361
361
|
}
|
|
@@ -431,12 +431,12 @@ async function Na(e = {}) {
|
|
|
431
431
|
);
|
|
432
432
|
const n = document.createElement("div");
|
|
433
433
|
n.className = "pluno-pa-widget-host", n.setAttribute("data-pluno-product-agent-ui", "widget"), n.setAttribute("data-pluno-product-agent-layout", t.layout), t.sdkPreviewChannelId && n.setAttribute(
|
|
434
|
-
|
|
434
|
+
sa,
|
|
435
435
|
t.sdkPreviewChannelId
|
|
436
436
|
);
|
|
437
437
|
const i = n.attachShadow({ mode: "open" }), o = document.createElement("div");
|
|
438
438
|
o.className = `pluno-pa-widget pluno-pa-widget--${t.position}`, o.classList.add(`pluno-pa-widget--layout-${t.layout}`), o.setAttribute("data-pluno-product-agent-ui-root", "widget");
|
|
439
|
-
let r =
|
|
439
|
+
let r = ao(
|
|
440
440
|
t.accentColor,
|
|
441
441
|
t.scribbleStyle
|
|
442
442
|
);
|
|
@@ -457,7 +457,7 @@ async function Na(e = {}) {
|
|
|
457
457
|
s,
|
|
458
458
|
t.position
|
|
459
459
|
)
|
|
460
|
-
)), vo(i, t.accentColor),
|
|
460
|
+
)), vo(i, t.accentColor), ro(o, r, {
|
|
461
461
|
accentColor: t.accentColor,
|
|
462
462
|
colorScheme: t.colorScheme,
|
|
463
463
|
fontFamily: t.fontFamily,
|
|
@@ -473,7 +473,7 @@ async function Na(e = {}) {
|
|
|
473
473
|
".pluno-pa-widget__launcher-minimize"
|
|
474
474
|
), w = o.querySelector(".pluno-pa-widget__panel"), R = o.querySelector(
|
|
475
475
|
".pluno-pa-widget__scribble-spirals--panel"
|
|
476
|
-
),
|
|
476
|
+
), M = Array.from(
|
|
477
477
|
o.querySelectorAll(".pluno-pa-widget__resize-handle")
|
|
478
478
|
), L = o.querySelector(
|
|
479
479
|
".pluno-pa-widget__close"
|
|
@@ -509,7 +509,7 @@ async function Na(e = {}) {
|
|
|
509
509
|
".pluno-pa-widget__timeline-jump"
|
|
510
510
|
), ge = o.querySelector(
|
|
511
511
|
".pluno-pa-widget__active-users-counter"
|
|
512
|
-
),
|
|
512
|
+
), z = o.querySelector(
|
|
513
513
|
".pluno-pa-widget__timeline"
|
|
514
514
|
), Xe = o.querySelector(
|
|
515
515
|
".pluno-pa-widget__timeline-bottom-sentinel"
|
|
@@ -528,11 +528,11 @@ async function Na(e = {}) {
|
|
|
528
528
|
), ne = o.querySelector(
|
|
529
529
|
".pluno-pa-widget__tab-groups-suggestion-dismiss"
|
|
530
530
|
);
|
|
531
|
-
if (!E || !u || !w || !L || !te || !W || !Ye || !Be || !ce || !U || !y || !B || !$ || !X || !Le || !K || !ct || !Te || !ue || !ge || !
|
|
531
|
+
if (!E || !u || !w || !L || !te || !W || !Ye || !Be || !ce || !U || !y || !B || !$ || !X || !Le || !K || !ct || !Te || !ue || !ge || !z || !Xe)
|
|
532
532
|
throw new Error("Failed to mount Pluno widget");
|
|
533
533
|
if (t.movableLauncher && !O)
|
|
534
534
|
throw new Error("Failed to mount Pluno widget drag handle");
|
|
535
|
-
U.hidden = !t.attachmentsEnabled, ce.disabled = !t.attachmentsEnabled,
|
|
535
|
+
U.hidden = !t.attachmentsEnabled, ce.disabled = !t.attachmentsEnabled, mo(u), mo(y);
|
|
536
536
|
let b = [], k = null;
|
|
537
537
|
const q = () => Yi(
|
|
538
538
|
y,
|
|
@@ -547,15 +547,15 @@ async function Na(e = {}) {
|
|
|
547
547
|
), Fe(), D(_.getState()), j(), q();
|
|
548
548
|
}
|
|
549
549
|
);
|
|
550
|
-
},
|
|
551
|
-
if (!t.loginRequired && !t.signupRequired && !t.token && !
|
|
550
|
+
}, Tn = t.loginRequired || t.signupRequired || t.token || t.webSocketFactory ? void 0 : t.tokenProvider ?? (t.tokenEndpoint ? async () => ni(t.tokenEndpoint) : void 0);
|
|
551
|
+
if (!t.loginRequired && !t.signupRequired && !t.token && !Tn && !t.webSocketFactory)
|
|
552
552
|
throw new Error("Pluno widget requires token or tokenEndpoint");
|
|
553
553
|
const ii = window.fetch.bind(window), Pt = ol(t.clientId);
|
|
554
554
|
let _;
|
|
555
555
|
try {
|
|
556
556
|
const a = {
|
|
557
557
|
token: t.token,
|
|
558
|
-
tokenProvider:
|
|
558
|
+
tokenProvider: Tn,
|
|
559
559
|
backendUrl: t.backendUrl,
|
|
560
560
|
metadata: () => ({
|
|
561
561
|
...t.metadata ?? {},
|
|
@@ -592,7 +592,7 @@ async function Na(e = {}) {
|
|
|
592
592
|
), Ze = new Set(Pe);
|
|
593
593
|
let Rt = l.sharePromptsDisabled || await al(t), oe = null, V = !1, ut = !(t.loginRequired || t.signupRequired), ve = !1, Ne = {
|
|
594
594
|
enabled: !0
|
|
595
|
-
}, Re = 0,
|
|
595
|
+
}, Re = 0, An = "", Y = !1, he = !1, Se = [], zt = null, Je = null;
|
|
596
596
|
const ie = (a, d) => {
|
|
597
597
|
Ne = { enabled: a, reason: d };
|
|
598
598
|
}, ae = () => {
|
|
@@ -600,7 +600,7 @@ async function Na(e = {}) {
|
|
|
600
600
|
}, ai = () => {
|
|
601
601
|
ue.hidden = !1;
|
|
602
602
|
}, ri = (a = "jump") => {
|
|
603
|
-
ie(!0, a), ae(),
|
|
603
|
+
ie(!0, a), ae(), pt(z, () => Ne.enabled), Re = z.scrollTop;
|
|
604
604
|
}, me = () => {
|
|
605
605
|
if (X.hidden = t.layout === "page" || t.loginRequired, Le.hidden = !Y, X.setAttribute("aria-expanded", String(Y)), K.classList.toggle(
|
|
606
606
|
"pluno-pa-widget__history-list--center",
|
|
@@ -629,12 +629,12 @@ async function Na(e = {}) {
|
|
|
629
629
|
a.className = "pluno-pa-widget__history-loading pluno-pa-widget__history-loading--inline", a.textContent = "Loading...", K.appendChild(a);
|
|
630
630
|
}
|
|
631
631
|
Te.textContent = Je ?? (!he && Se.length === 0 ? "No recent chats for this page yet." : ""), Te.hidden = Te.textContent.length === 0;
|
|
632
|
-
},
|
|
632
|
+
}, In = async (a) => {
|
|
633
633
|
if (!he) {
|
|
634
634
|
he = !0, Je = null, me();
|
|
635
635
|
try {
|
|
636
636
|
const d = await _.listSessions({ cursor: a, limit: 20 });
|
|
637
|
-
Se = a ? [...Se, ...d.sessions] : d.sessions,
|
|
637
|
+
Se = a ? [...Se, ...d.sessions] : d.sessions, zt = d.nextCursor;
|
|
638
638
|
} catch (d) {
|
|
639
639
|
Z(
|
|
640
640
|
"web-sdk.widget",
|
|
@@ -648,14 +648,14 @@ async function Na(e = {}) {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
}, li = () => {
|
|
651
|
-
!
|
|
652
|
-
},
|
|
651
|
+
!zt || he || K.scrollHeight - K.scrollTop - K.clientHeight <= 24 && In(zt);
|
|
652
|
+
}, Pn = () => {
|
|
653
653
|
V || typeof document > "u" || (vo(i, t.accentColor), n.isConnected || (t.mountTarget?.isConnected ? t.mountTarget.appendChild(n) : t.mountTarget || v.body?.appendChild(n)));
|
|
654
|
-
},
|
|
655
|
-
|
|
654
|
+
}, Nn = new MutationObserver(Pn);
|
|
655
|
+
Nn.observe(v.documentElement, {
|
|
656
656
|
childList: !0,
|
|
657
657
|
subtree: !0
|
|
658
|
-
}),
|
|
658
|
+
}), Pn();
|
|
659
659
|
const Qe = (a = !0) => {
|
|
660
660
|
const d = Tt(o, a);
|
|
661
661
|
return wn(
|
|
@@ -700,8 +700,8 @@ async function Na(e = {}) {
|
|
|
700
700
|
s,
|
|
701
701
|
t.position
|
|
702
702
|
)
|
|
703
|
-
),
|
|
704
|
-
},
|
|
703
|
+
), uo(o), H(), d && gt("minimized");
|
|
704
|
+
}, ze = (a, d = {}) => {
|
|
705
705
|
qa(a, {
|
|
706
706
|
debugVersion: Ia,
|
|
707
707
|
launcherPosition: s,
|
|
@@ -724,12 +724,12 @@ async function Na(e = {}) {
|
|
|
724
724
|
if (!s)
|
|
725
725
|
return Oe(o, null), Qe(a);
|
|
726
726
|
const d = Qe(a);
|
|
727
|
-
return Oe(o, d),
|
|
727
|
+
return Oe(o, d), ze("Applied stored closed launcher position", {
|
|
728
728
|
visibleLauncherPosition: d
|
|
729
729
|
}), d;
|
|
730
|
-
},
|
|
730
|
+
}, Mt = (a, d) => {
|
|
731
731
|
if (!a || !d) {
|
|
732
|
-
|
|
732
|
+
uo(o);
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
735
|
$a(o, {
|
|
@@ -739,7 +739,7 @@ async function Na(e = {}) {
|
|
|
739
739
|
}, Dt = () => {
|
|
740
740
|
const a = Ve(g).width;
|
|
741
741
|
return t.layout === "page" && w.getBoundingClientRect().width || a;
|
|
742
|
-
},
|
|
742
|
+
}, Rn = () => {
|
|
743
743
|
if (o.classList.contains("pluno-pa-widget--minimized")) {
|
|
744
744
|
Oe(
|
|
745
745
|
o,
|
|
@@ -768,18 +768,18 @@ async function Na(e = {}) {
|
|
|
768
768
|
),
|
|
769
769
|
d
|
|
770
770
|
);
|
|
771
|
-
|
|
771
|
+
Mt(f, a), ze(
|
|
772
772
|
"Applied open panel position after viewport resize",
|
|
773
773
|
{ openPanelPosition: f }
|
|
774
774
|
);
|
|
775
|
-
} else s &&
|
|
775
|
+
} else s && ze(
|
|
776
776
|
"Applied visible launcher position after viewport resize",
|
|
777
777
|
{ visibleLauncherPosition: a }
|
|
778
778
|
);
|
|
779
779
|
};
|
|
780
|
-
let
|
|
780
|
+
let zn = () => {
|
|
781
781
|
};
|
|
782
|
-
window.addEventListener("resize",
|
|
782
|
+
window.addEventListener("resize", Rn), t.movableLauncher && O ? (tt(), zn = Oa({
|
|
783
783
|
root: o,
|
|
784
784
|
launcher: E,
|
|
785
785
|
launcherDragHandle: O,
|
|
@@ -790,18 +790,18 @@ async function Na(e = {}) {
|
|
|
790
790
|
a,
|
|
791
791
|
f
|
|
792
792
|
);
|
|
793
|
-
s =
|
|
793
|
+
s = co(
|
|
794
794
|
C,
|
|
795
795
|
f
|
|
796
|
-
), Oe(o, C),
|
|
796
|
+
), Oe(o, C), ze("Dragging closed launcher", {
|
|
797
797
|
requestedPosition: d
|
|
798
798
|
});
|
|
799
799
|
},
|
|
800
800
|
persist: () => {
|
|
801
|
-
c = !0, H(),
|
|
801
|
+
c = !0, H(), ze("Persisted closed launcher drag position");
|
|
802
802
|
}
|
|
803
803
|
})) : Oe(o, null), Qt(o, g);
|
|
804
|
-
const
|
|
804
|
+
const pi = () => {
|
|
805
805
|
const a = Ve(g), d = Qe();
|
|
806
806
|
return {
|
|
807
807
|
position: Et(
|
|
@@ -815,7 +815,7 @@ async function Na(e = {}) {
|
|
|
815
815
|
),
|
|
816
816
|
size: a
|
|
817
817
|
};
|
|
818
|
-
},
|
|
818
|
+
}, si = (a) => {
|
|
819
819
|
g = At(a.size), Qt(o, g), an(
|
|
820
820
|
R,
|
|
821
821
|
Dt()
|
|
@@ -824,17 +824,17 @@ async function Na(e = {}) {
|
|
|
824
824
|
a.position,
|
|
825
825
|
Ve(g)
|
|
826
826
|
);
|
|
827
|
-
h =
|
|
827
|
+
h = co(
|
|
828
828
|
d,
|
|
829
829
|
Ve(g)
|
|
830
830
|
);
|
|
831
831
|
const f = Qe();
|
|
832
|
-
|
|
833
|
-
}, di =
|
|
832
|
+
Mt(d, f);
|
|
833
|
+
}, di = M.length > 0 ? Ua({
|
|
834
834
|
root: o,
|
|
835
|
-
handles:
|
|
836
|
-
getBounds:
|
|
837
|
-
setBounds:
|
|
835
|
+
handles: M,
|
|
836
|
+
getBounds: pi,
|
|
837
|
+
setBounds: si,
|
|
838
838
|
persist: H
|
|
839
839
|
}) : () => {
|
|
840
840
|
};
|
|
@@ -846,7 +846,7 @@ async function Na(e = {}) {
|
|
|
846
846
|
const a = await t.billingStatusLoader();
|
|
847
847
|
if (V)
|
|
848
848
|
return;
|
|
849
|
-
|
|
849
|
+
wo(
|
|
850
850
|
t.billingStatus,
|
|
851
851
|
a,
|
|
852
852
|
_.getState().lastErrorCode
|
|
@@ -876,20 +876,20 @@ async function Na(e = {}) {
|
|
|
876
876
|
t.position,
|
|
877
877
|
g
|
|
878
878
|
);
|
|
879
|
-
if (
|
|
879
|
+
if (Mt(I, C), ze("Opening launcher at clamped open panel position", {
|
|
880
880
|
openPanelPosition: I,
|
|
881
881
|
visibleLauncherPosition: C
|
|
882
882
|
}), ie(!0, "open"), ae(), !d) {
|
|
883
|
-
o.classList.add("pluno-pa-widget--open"), E.hidden = !0, a && (y.value = a, lt(y)),
|
|
883
|
+
o.classList.add("pluno-pa-widget--open"), E.hidden = !0, a && (y.value = a, lt(y)), pt(z, () => Ne.enabled), Re = z.scrollTop, f && (y.focus(), y.setSelectionRange(y.value.length, y.value.length)), H(), gt("shown"), t.onPanelOpenChange?.(!0);
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
886
|
window.requestAnimationFrame(() => {
|
|
887
|
-
o.classList.add("pluno-pa-widget--open"), a && (y.value = a, lt(y)),
|
|
888
|
-
E.hidden = !0,
|
|
887
|
+
o.classList.add("pluno-pa-widget--open"), a && (y.value = a, lt(y)), pt(z, () => Ne.enabled), Re = z.scrollTop, f && (y.focus(), y.setSelectionRange(y.value.length, y.value.length)), H(), gt("shown"), t.onPanelOpenChange?.(!0), oe = window.setTimeout(() => {
|
|
888
|
+
E.hidden = !0, pt(z, () => Ne.enabled), Re = z.scrollTop;
|
|
889
889
|
}, 220);
|
|
890
890
|
});
|
|
891
891
|
}, Ut = () => {
|
|
892
|
-
oe !== null && (window.clearTimeout(oe), oe = null), E.hidden = !1, s && (tt(!1),
|
|
892
|
+
oe !== null && (window.clearTimeout(oe), oe = null), E.hidden = !1, s && (tt(!1), ze("Closing launcher at stored position")), o.classList.remove("pluno-pa-widget--open"), o.classList.add("pluno-pa-widget--closing"), H(), t.onPanelOpenChange?.(!1), oe = window.setTimeout(() => {
|
|
893
893
|
w.hidden = !0, L.hidden = !0, h = null, o.classList.remove("pluno-pa-widget--closing");
|
|
894
894
|
}, 220);
|
|
895
895
|
};
|
|
@@ -907,13 +907,13 @@ async function Na(e = {}) {
|
|
|
907
907
|
const a = u.value;
|
|
908
908
|
fe(a), u.value = "";
|
|
909
909
|
});
|
|
910
|
-
let Bt = null, ht = null,
|
|
911
|
-
const
|
|
910
|
+
let Bt = null, ht = null, Me = null;
|
|
911
|
+
const Dn = (a) => a === u || a === y, ci = (a) => {
|
|
912
912
|
if (!(a instanceof Element) || a.getRootNode() === o.getRootNode())
|
|
913
913
|
return null;
|
|
914
914
|
let d = a;
|
|
915
915
|
for (; d; ) {
|
|
916
|
-
const f = d.closest(
|
|
916
|
+
const f = d.closest(Qn);
|
|
917
917
|
if (f)
|
|
918
918
|
return f;
|
|
919
919
|
const C = d.getRootNode();
|
|
@@ -921,7 +921,7 @@ async function Na(e = {}) {
|
|
|
921
921
|
}
|
|
922
922
|
return null;
|
|
923
923
|
}, ui = (a) => {
|
|
924
|
-
if (!a.isConnected || !a.matches(
|
|
924
|
+
if (!a.isConnected || !a.matches(Qn))
|
|
925
925
|
return !1;
|
|
926
926
|
if (!(a instanceof HTMLElement))
|
|
927
927
|
return !0;
|
|
@@ -931,21 +931,21 @@ async function Na(e = {}) {
|
|
|
931
931
|
return a.checkVisibility();
|
|
932
932
|
const d = window.getComputedStyle(a);
|
|
933
933
|
return d.display !== "none" && d.visibility !== "hidden";
|
|
934
|
-
},
|
|
934
|
+
}, On = (a) => {
|
|
935
935
|
We !== a && (We = a, o.classList.toggle(
|
|
936
936
|
"pluno-pa-widget--host-modal-conflict",
|
|
937
937
|
a !== null
|
|
938
|
-
), De(), a !== null ?
|
|
938
|
+
), De(), a !== null ? Me = window.setInterval(() => {
|
|
939
939
|
const d = We;
|
|
940
|
-
(!d || !ui(d)) &&
|
|
941
|
-
}, wa) :
|
|
940
|
+
(!d || !ui(d)) && On(null);
|
|
941
|
+
}, wa) : Me !== null && (window.clearInterval(Me), Me = null, ht = null));
|
|
942
942
|
}, gi = () => {
|
|
943
|
-
|
|
943
|
+
Me !== null && (window.clearInterval(Me), Me = null);
|
|
944
944
|
};
|
|
945
945
|
o.addEventListener("focusin", (a) => {
|
|
946
|
-
|
|
946
|
+
Dn(a.target) && (Bt = Date.now(), H());
|
|
947
947
|
}), o.addEventListener("focusout", (a) => {
|
|
948
|
-
if (!
|
|
948
|
+
if (!Dn(a.target) || We !== null)
|
|
949
949
|
return;
|
|
950
950
|
const d = Bt;
|
|
951
951
|
if (Bt = null, d === null || Date.now() - d > ma)
|
|
@@ -955,7 +955,7 @@ async function Na(e = {}) {
|
|
|
955
955
|
return;
|
|
956
956
|
const C = Date.now();
|
|
957
957
|
if (ht !== null && C - ht <= fa) {
|
|
958
|
-
|
|
958
|
+
On(f);
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
961
|
ht = C;
|
|
@@ -965,23 +965,23 @@ async function Na(e = {}) {
|
|
|
965
965
|
a.stopPropagation();
|
|
966
966
|
}), F?.addEventListener("click", (a) => {
|
|
967
967
|
a.preventDefault(), a.stopPropagation(), et("minimized");
|
|
968
|
-
}), L.addEventListener("click", Ut),
|
|
969
|
-
|
|
968
|
+
}), L.addEventListener("click", Ut), z.addEventListener("scroll", () => {
|
|
969
|
+
z.scrollTop < Re - 1 && ie(!1, "userScroll"), Re = z.scrollTop;
|
|
970
970
|
}), ue.addEventListener("click", () => {
|
|
971
971
|
ri();
|
|
972
972
|
});
|
|
973
|
-
const
|
|
973
|
+
const Un = typeof IntersectionObserver > "u" ? null : new IntersectionObserver(
|
|
974
974
|
([a]) => {
|
|
975
975
|
a?.isIntersecting && (ie(!0, "bottom"), ae());
|
|
976
976
|
},
|
|
977
|
-
{ root:
|
|
977
|
+
{ root: z, threshold: 0 }
|
|
978
978
|
);
|
|
979
|
-
|
|
979
|
+
Un?.observe(Xe);
|
|
980
980
|
const nt = () => t.loginRequired || t.signupRequired;
|
|
981
981
|
let We = null, ot = !1;
|
|
982
982
|
const re = () => ut || _.getState().status !== "connected", De = () => {
|
|
983
983
|
const a = nt(), d = We !== null;
|
|
984
|
-
u.readOnly = !1, y.readOnly = !1, u.placeholder = d ?
|
|
984
|
+
u.readOnly = !1, y.readOnly = !1, u.placeholder = d ? eo : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : ot ? "New update" : t.launcherLabel, y.placeholder = d ? eo : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : _e.launcherLabel, te.hidden = a;
|
|
985
985
|
}, j = () => {
|
|
986
986
|
B.disabled = re() || le(t.billingStatus) || !_.getState().isThinking && y.value.trim().length === 0 && b.length === 0, U.disabled = nt() || re() || le(t.billingStatus);
|
|
987
987
|
};
|
|
@@ -1103,7 +1103,7 @@ async function Na(e = {}) {
|
|
|
1103
1103
|
yt
|
|
1104
1104
|
), Fe(), j(), D(_.getState()), a && q();
|
|
1105
1105
|
}), X.addEventListener("click", () => {
|
|
1106
|
-
Y = !Y, Je = null, me(), Y && Se.length === 0 &&
|
|
1106
|
+
Y = !Y, Je = null, me(), Y && Se.length === 0 && In(null), Y || q();
|
|
1107
1107
|
}), ct.addEventListener("click", () => {
|
|
1108
1108
|
Y = !1, me(), q();
|
|
1109
1109
|
}), K.addEventListener("scroll", li), y.addEventListener("input", () => {
|
|
@@ -1146,15 +1146,15 @@ async function Na(e = {}) {
|
|
|
1146
1146
|
a.key !== "Escape" || !Y || (Y = !1, me(), q());
|
|
1147
1147
|
}), l.composerValue && (y.value = l.composerValue, lt(y)), t.layout === "page" ? fe(y.value, !1) : p === "minimized" ? et("minimized", !1) : t.initialDisplayState === void 0 && l.isOpen && fe(y.value, !1, !1), Ka(l, o, u, y);
|
|
1148
1148
|
const mt = () => r;
|
|
1149
|
-
let $t = _.getState().appearance !== null, ft = null, at = null,
|
|
1149
|
+
let $t = _.getState().appearance !== null, ft = null, at = null, Bn = _.getState().isThinking, He = null;
|
|
1150
1150
|
const rt = t.taskNotifications;
|
|
1151
1151
|
let Ge = null, $e = !1;
|
|
1152
|
-
const
|
|
1152
|
+
const Fn = () => {
|
|
1153
1153
|
Ge !== null && (window.clearTimeout(Ge), Ge = null);
|
|
1154
1154
|
}, wt = () => {
|
|
1155
1155
|
Ae && (Ae.hidden = !0);
|
|
1156
|
-
},
|
|
1157
|
-
if (!rt || !Ae || $e || V || !_.getState().isThinking ||
|
|
1156
|
+
}, Wn = () => _.getState().assistantDraft.trim().length > 0, wi = async () => {
|
|
1157
|
+
if (!rt || !Ae || $e || V || !_.getState().isThinking || Wn())
|
|
1158
1158
|
return;
|
|
1159
1159
|
let a;
|
|
1160
1160
|
try {
|
|
@@ -1162,7 +1162,7 @@ async function Na(e = {}) {
|
|
|
1162
1162
|
} catch {
|
|
1163
1163
|
return;
|
|
1164
1164
|
}
|
|
1165
|
-
a.enabled || a.neverSuggest || !_.getState().isThinking ||
|
|
1165
|
+
a.enabled || a.neverSuggest || !_.getState().isThinking || Wn() || $e || V || (Ae.hidden = !1);
|
|
1166
1166
|
};
|
|
1167
1167
|
Ie?.addEventListener("click", () => {
|
|
1168
1168
|
$e = !0, wt(), rt?.enable().catch(() => {
|
|
@@ -1192,10 +1192,10 @@ async function Na(e = {}) {
|
|
|
1192
1192
|
qe = !1, _t();
|
|
1193
1193
|
});
|
|
1194
1194
|
}), _t();
|
|
1195
|
-
let je = null,
|
|
1195
|
+
let je = null, Hn = () => {
|
|
1196
1196
|
};
|
|
1197
1197
|
const bi = !!(t.sdkPreviewChannelId && t.referralLinkLoader), qt = /* @__PURE__ */ new Map(), jt = () => y.value.trim().length > 0 || b.length > 0, _i = () => {
|
|
1198
|
-
const a = je !== null &&
|
|
1198
|
+
const a = je !== null && pn(_.getState(), jt());
|
|
1199
1199
|
ge.hidden = !a, a && je !== null && Wo(ge, je);
|
|
1200
1200
|
};
|
|
1201
1201
|
let Ke = null;
|
|
@@ -1228,13 +1228,13 @@ async function Na(e = {}) {
|
|
|
1228
1228
|
!1
|
|
1229
1229
|
), Ke.addEventListener("click", () => Kt()), $.insertBefore(Ke, X));
|
|
1230
1230
|
}, D = (a) => {
|
|
1231
|
-
if (me(),
|
|
1231
|
+
if (me(), kn(a.lastErrorCode) ? He = a.lastErrorCode : t.billingStatus?.creditsUsed !== null && !le(t.billingStatus) && (He = null), ln(
|
|
1232
1232
|
Ye,
|
|
1233
1233
|
t.billingStatus,
|
|
1234
1234
|
He
|
|
1235
1235
|
), t.loginRequired) {
|
|
1236
1236
|
qt.clear(), xo(
|
|
1237
|
-
|
|
1237
|
+
z,
|
|
1238
1238
|
B,
|
|
1239
1239
|
Vt,
|
|
1240
1240
|
mt,
|
|
@@ -1247,7 +1247,7 @@ async function Na(e = {}) {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
if (t.signupRequired) {
|
|
1249
1249
|
qt.clear(), xo(
|
|
1250
|
-
|
|
1250
|
+
z,
|
|
1251
1251
|
B,
|
|
1252
1252
|
Vt,
|
|
1253
1253
|
mt,
|
|
@@ -1258,18 +1258,18 @@ async function Na(e = {}) {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
return;
|
|
1260
1260
|
}
|
|
1261
|
-
const d = Ya(a), f = d !==
|
|
1262
|
-
|
|
1261
|
+
const d = Ya(a), f = d !== An;
|
|
1262
|
+
An = d;
|
|
1263
1263
|
const C = ve || Ne.enabled;
|
|
1264
1264
|
ve = !1, Ir(
|
|
1265
|
-
|
|
1265
|
+
z,
|
|
1266
1266
|
Xe,
|
|
1267
1267
|
B,
|
|
1268
1268
|
Vt,
|
|
1269
1269
|
ge,
|
|
1270
1270
|
a,
|
|
1271
1271
|
je,
|
|
1272
|
-
je !== null &&
|
|
1272
|
+
je !== null && pn(a, jt()),
|
|
1273
1273
|
C,
|
|
1274
1274
|
() => Ne.enabled,
|
|
1275
1275
|
Nt,
|
|
@@ -1317,8 +1317,8 @@ async function Na(e = {}) {
|
|
|
1317
1317
|
Rt = !0, Pe.add(I.id), Ze.add(I.id), H(), rl(t, !0), at = null, D(_.getState());
|
|
1318
1318
|
}
|
|
1319
1319
|
} : void 0
|
|
1320
|
-
), C ? (Re =
|
|
1321
|
-
},
|
|
1320
|
+
), C ? (Re = z.scrollTop, ae()) : f && Xa(a) && ai();
|
|
1321
|
+
}, Gn = async (a) => {
|
|
1322
1322
|
if (!t.integrationAuthStatusLoader)
|
|
1323
1323
|
return;
|
|
1324
1324
|
const d = a.messages.map((f) => f.integrationAuthRequest).filter(
|
|
@@ -1346,9 +1346,9 @@ async function Na(e = {}) {
|
|
|
1346
1346
|
})
|
|
1347
1347
|
);
|
|
1348
1348
|
};
|
|
1349
|
-
return
|
|
1349
|
+
return Hn = Fi(
|
|
1350
1350
|
(a) => {
|
|
1351
|
-
je = a, !V &&
|
|
1351
|
+
je = a, !V && pn(_.getState(), jt()) && D(_.getState());
|
|
1352
1352
|
},
|
|
1353
1353
|
{
|
|
1354
1354
|
backendUrl: t.backendUrl,
|
|
@@ -1357,10 +1357,10 @@ async function Na(e = {}) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
), _.on("state", (a) => {
|
|
1359
1359
|
_t();
|
|
1360
|
-
const d =
|
|
1361
|
-
|
|
1360
|
+
const d = Bn && !a.isThinking;
|
|
1361
|
+
Bn = a.isThinking, a.isThinking && !a.assistantDraft.trim() && rt && !$e && Ge === null && Ae?.hidden !== !1 && (Ge = window.setTimeout(() => {
|
|
1362
1362
|
Ge = null, wi();
|
|
1363
|
-
}, ea)), (!a.isThinking || a.assistantDraft.trim()) && (
|
|
1363
|
+
}, ea)), (!a.isThinking || a.assistantDraft.trim()) && (Fn(), wt()), d && !o.classList.contains("pluno-pa-widget--open") && (ot = !0), Ft(), a.appearance ? ($t = !0, Z(
|
|
1364
1364
|
"web-sdk.widget",
|
|
1365
1365
|
"Agent state supplied appearance",
|
|
1366
1366
|
{
|
|
@@ -1374,8 +1374,8 @@ async function Na(e = {}) {
|
|
|
1374
1374
|
fallbackColorScheme: t.colorScheme,
|
|
1375
1375
|
fallbackFontFamily: t.fontFamily
|
|
1376
1376
|
}
|
|
1377
|
-
), Yt({}, "agent.state.appearance-cleared")), D(a),
|
|
1378
|
-
}), D(_.getState()),
|
|
1377
|
+
), Yt({}, "agent.state.appearance-cleared")), D(a), Gn(a), j(), d && Mn();
|
|
1378
|
+
}), D(_.getState()), Gn(_.getState()), j(), Wt(), {
|
|
1379
1379
|
agent: _,
|
|
1380
1380
|
startNewChat: Kt,
|
|
1381
1381
|
host: n,
|
|
@@ -1384,7 +1384,7 @@ async function Na(e = {}) {
|
|
|
1384
1384
|
},
|
|
1385
1385
|
updateBillingStatus: (a) => {
|
|
1386
1386
|
const d = a ?? null;
|
|
1387
|
-
|
|
1387
|
+
wo(
|
|
1388
1388
|
t.billingStatus,
|
|
1389
1389
|
d,
|
|
1390
1390
|
He
|
|
@@ -1414,7 +1414,7 @@ async function Na(e = {}) {
|
|
|
1414
1414
|
t.morningReport = a ?? null, D(_.getState());
|
|
1415
1415
|
},
|
|
1416
1416
|
destroy: () => {
|
|
1417
|
-
V || (H(), V = !0,
|
|
1417
|
+
V || (H(), V = !0, Nn.disconnect(), Un?.disconnect(), gi(), window.removeEventListener("resize", Rn), zn(), di(), k !== null && window.clearTimeout(k), Fn(), Hn(), _.destroy(), Pt.release(), n.remove());
|
|
1418
1418
|
}
|
|
1419
1419
|
};
|
|
1420
1420
|
async function yi(a) {
|
|
@@ -1452,10 +1452,10 @@ async function Na(e = {}) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
function Yt(a, d) {
|
|
1454
1454
|
const f = a.accentColor ?? t.accentColor, C = a.colorScheme ?? t.colorScheme, I = a.fontFamily ?? t.fontFamily, Xt = a.scribbleStyle ?? t.scribbleStyle;
|
|
1455
|
-
r =
|
|
1455
|
+
r = ao(
|
|
1456
1456
|
f,
|
|
1457
1457
|
Xt
|
|
1458
|
-
),
|
|
1458
|
+
), ro(o, r, {
|
|
1459
1459
|
accentColor: f,
|
|
1460
1460
|
colorScheme: C,
|
|
1461
1461
|
fontFamily: I,
|
|
@@ -1471,14 +1471,14 @@ async function Na(e = {}) {
|
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function ao(e, t) {
|
|
1475
1475
|
return { accentColor: e, scribbleStyle: t };
|
|
1476
1476
|
}
|
|
1477
1477
|
function Ra(e) {
|
|
1478
|
-
const t =
|
|
1479
|
-
return t === null ? "#fafafa" :
|
|
1478
|
+
const t = za(e);
|
|
1479
|
+
return t === null ? "#fafafa" : Ma(t) > 0.5 ? "#18181b" : "#fafaf9";
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function za(e) {
|
|
1482
1482
|
const t = e.trim();
|
|
1483
1483
|
return /^#[0-9a-f]{6}$/i.test(t) ? [
|
|
1484
1484
|
Number.parseInt(t.slice(1, 3), 16),
|
|
@@ -1490,14 +1490,14 @@ function Ma(e) {
|
|
|
1490
1490
|
Number.parseInt(t[3] + t[3], 16)
|
|
1491
1491
|
] : null;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function Ma([e, t, n]) {
|
|
1494
1494
|
const i = (o) => {
|
|
1495
1495
|
const r = o / 255;
|
|
1496
1496
|
return r <= 0.03928 ? r / 12.92 : ((r + 0.055) / 1.055) ** 2.4;
|
|
1497
1497
|
};
|
|
1498
1498
|
return 0.2126 * i(e) + 0.7152 * i(t) + 0.0722 * i(n);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function ro(e, t, n) {
|
|
1501
1501
|
e.classList.toggle(
|
|
1502
1502
|
"pluno-pa-widget--dark",
|
|
1503
1503
|
n.colorScheme === "dark"
|
|
@@ -1522,10 +1522,10 @@ function ao(e, t, n) {
|
|
|
1522
1522
|
);
|
|
1523
1523
|
}
|
|
1524
1524
|
function Da(e) {
|
|
1525
|
-
if (e.getElementById(
|
|
1525
|
+
if (e.getElementById(to))
|
|
1526
1526
|
return;
|
|
1527
1527
|
const t = e.createElement("style");
|
|
1528
|
-
t.id =
|
|
1528
|
+
t.id = to, t.textContent = `@font-face {
|
|
1529
1529
|
font-family: "Architects Daughter";
|
|
1530
1530
|
font-style: normal;
|
|
1531
1531
|
font-weight: 400;
|
|
@@ -1550,8 +1550,8 @@ function Oa({
|
|
|
1550
1550
|
if (l !== w.pointerId || !p || !s)
|
|
1551
1551
|
return;
|
|
1552
1552
|
w.preventDefault();
|
|
1553
|
-
const R = w.clientX - p.x,
|
|
1554
|
-
!c && Math.hypot(R,
|
|
1553
|
+
const R = w.clientX - p.x, M = w.clientY - p.y;
|
|
1554
|
+
!c && Math.hypot(R, M) < fn || (c = !0, e.classList.add("pluno-pa-widget--dragging"), o({ x: s.x + R, y: s.y + M }));
|
|
1555
1555
|
}, E = (w) => {
|
|
1556
1556
|
l === w.pointerId && (w.preventDefault(), w.stopPropagation(), c && (g = { x: w.clientX, y: w.clientY }, r()), h());
|
|
1557
1557
|
}, O = (w) => {
|
|
@@ -1567,9 +1567,9 @@ function Oa({
|
|
|
1567
1567
|
}, F = (w) => {
|
|
1568
1568
|
if (e.classList.contains("pluno-pa-widget--open") || e.classList.contains("pluno-pa-widget--closing"))
|
|
1569
1569
|
return;
|
|
1570
|
-
const R = w.shiftKey ? Oo : Do,
|
|
1570
|
+
const R = w.shiftKey ? Oo : Do, M = i();
|
|
1571
1571
|
let L = null;
|
|
1572
|
-
w.key === "ArrowUp" ? L = { x:
|
|
1572
|
+
w.key === "ArrowUp" ? L = { x: M.x, y: M.y - R } : w.key === "ArrowDown" ? L = { x: M.x, y: M.y + R } : w.key === "ArrowLeft" ? L = { x: M.x - R, y: M.y } : w.key === "ArrowRight" && (L = { x: M.x + R, y: M.y }), L && (w.preventDefault(), w.stopPropagation(), o(L), r());
|
|
1573
1573
|
};
|
|
1574
1574
|
return t.addEventListener("pointerdown", m), t.addEventListener("pointermove", v), t.addEventListener("pointerup", E), t.addEventListener("pointercancel", O), t.addEventListener("click", u, !0), n.addEventListener("keydown", F), () => {
|
|
1575
1575
|
t.removeEventListener("pointerdown", m), t.removeEventListener("pointermove", v), t.removeEventListener("pointerup", E), t.removeEventListener("pointercancel", O), t.removeEventListener("click", u, !0), n.removeEventListener("keydown", F);
|
|
@@ -1587,23 +1587,23 @@ function Ua({
|
|
|
1587
1587
|
r = null, l = null, p = null, s = null, c = !1, e.classList.remove("pluno-pa-widget--resizing");
|
|
1588
1588
|
}, h = (u) => {
|
|
1589
1589
|
const F = u.currentTarget, w = F.dataset.resizeDirection;
|
|
1590
|
-
!e.classList.contains("pluno-pa-widget--open") || !
|
|
1590
|
+
!e.classList.contains("pluno-pa-widget--open") || !lo(w) || (u.preventDefault(), u.stopPropagation(), r = u.pointerId, l = w, p = { x: u.clientX, y: u.clientY }, s = n(), c = !1, F.setPointerCapture?.(u.pointerId));
|
|
1591
1591
|
}, m = (u) => {
|
|
1592
1592
|
if (r !== u.pointerId || !l || !p || !s)
|
|
1593
1593
|
return;
|
|
1594
1594
|
u.preventDefault(), u.stopPropagation();
|
|
1595
1595
|
const F = u.clientX - p.x, w = u.clientY - p.y;
|
|
1596
1596
|
!c && Math.hypot(F, w) < fn || (c = !0, e.classList.add("pluno-pa-widget--resizing"), i(
|
|
1597
|
-
|
|
1597
|
+
po(s, l, F, w)
|
|
1598
1598
|
));
|
|
1599
1599
|
}, v = (u) => {
|
|
1600
1600
|
r === u.pointerId && (u.preventDefault(), u.stopPropagation(), c && o(), g());
|
|
1601
1601
|
}, E = (u) => {
|
|
1602
1602
|
r === u.pointerId && (u.preventDefault(), g());
|
|
1603
1603
|
}, O = (u) => {
|
|
1604
|
-
const w = u.currentTarget.dataset.resizeDirection, R = u.shiftKey ? Oo : Do,
|
|
1604
|
+
const w = u.currentTarget.dataset.resizeDirection, R = u.shiftKey ? Oo : Do, M = n();
|
|
1605
1605
|
let L = 0, te = 0;
|
|
1606
|
-
|
|
1606
|
+
lo(w) && (u.key === "ArrowLeft" ? L = -R : u.key === "ArrowRight" ? L = R : u.key === "ArrowUp" ? te = -R : u.key === "ArrowDown" && (te = R), !(L === 0 && te === 0) && (u.preventDefault(), u.stopPropagation(), i(po(M, w, L, te)), o()));
|
|
1607
1607
|
};
|
|
1608
1608
|
for (const u of t)
|
|
1609
1609
|
u.addEventListener("pointerdown", h), u.addEventListener("pointermove", m), u.addEventListener("pointerup", v), u.addEventListener("pointercancel", E), u.addEventListener("keydown", O);
|
|
@@ -1612,10 +1612,10 @@ function Ua({
|
|
|
1612
1612
|
u.removeEventListener("pointerdown", h), u.removeEventListener("pointermove", m), u.removeEventListener("pointerup", v), u.removeEventListener("pointercancel", E), u.removeEventListener("keydown", O);
|
|
1613
1613
|
};
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function lo(e) {
|
|
1616
1616
|
return e === "left" || e === "right" || e === "top" || e === "bottom" || e === "top-left" || e === "top-right" || e === "bottom-left" || e === "bottom-right";
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function po(e, t, n, i) {
|
|
1619
1619
|
const o = ee(), r = so({
|
|
1620
1620
|
leading: e.position.x,
|
|
1621
1621
|
length: e.size.width,
|
|
@@ -1625,7 +1625,7 @@ function lo(e, t, n, i) {
|
|
|
1625
1625
|
minLeading: N,
|
|
1626
1626
|
maxTrailing: o.width - N,
|
|
1627
1627
|
minLength: Math.min(
|
|
1628
|
-
|
|
1628
|
+
Sn,
|
|
1629
1629
|
o.width - N * 2
|
|
1630
1630
|
)
|
|
1631
1631
|
}), l = so({
|
|
@@ -1637,7 +1637,7 @@ function lo(e, t, n, i) {
|
|
|
1637
1637
|
minLeading: Ue,
|
|
1638
1638
|
maxTrailing: o.height - N,
|
|
1639
1639
|
minLength: Math.min(
|
|
1640
|
-
|
|
1640
|
+
Cn,
|
|
1641
1641
|
o.height - Ue - N
|
|
1642
1642
|
)
|
|
1643
1643
|
});
|
|
@@ -1696,11 +1696,11 @@ function so({
|
|
|
1696
1696
|
function Tt(e, t = !0) {
|
|
1697
1697
|
const n = ee();
|
|
1698
1698
|
if (e.classList.contains("pluno-pa-widget--minimized"))
|
|
1699
|
-
return { width:
|
|
1699
|
+
return { width: no, height: no };
|
|
1700
1700
|
const i = e.getBoundingClientRect(), o = !e.classList.contains("pluno-pa-widget--open") && !e.classList.contains("pluno-pa-widget--closing");
|
|
1701
1701
|
return {
|
|
1702
1702
|
width: t && o && i.width > 0 ? i.width : Math.min(Ro, n.width - 36),
|
|
1703
|
-
height: t && o && i.height > 0 ? i.height : e.classList.contains("pluno-pa-widget--scribble") ? ya :
|
|
1703
|
+
height: t && o && i.height > 0 ? i.height : e.classList.contains("pluno-pa-widget--scribble") ? ya : zo
|
|
1704
1704
|
};
|
|
1705
1705
|
}
|
|
1706
1706
|
function Ba() {
|
|
@@ -1709,7 +1709,7 @@ function Ba() {
|
|
|
1709
1709
|
width: Math.min(
|
|
1710
1710
|
Q(
|
|
1711
1711
|
e.width * Sa,
|
|
1712
|
-
|
|
1712
|
+
Sn,
|
|
1713
1713
|
va
|
|
1714
1714
|
),
|
|
1715
1715
|
e.width - N * 2
|
|
@@ -1717,7 +1717,7 @@ function Ba() {
|
|
|
1717
1717
|
height: Math.min(
|
|
1718
1718
|
Q(
|
|
1719
1719
|
e.height * Ea,
|
|
1720
|
-
|
|
1720
|
+
Cn,
|
|
1721
1721
|
Ca
|
|
1722
1722
|
),
|
|
1723
1723
|
e.height - Ue - N
|
|
@@ -1733,7 +1733,7 @@ function At(e) {
|
|
|
1733
1733
|
width: Q(
|
|
1734
1734
|
e.width,
|
|
1735
1735
|
Math.min(
|
|
1736
|
-
|
|
1736
|
+
Sn,
|
|
1737
1737
|
t.width - N * 2
|
|
1738
1738
|
),
|
|
1739
1739
|
Math.max(
|
|
@@ -1744,7 +1744,7 @@ function At(e) {
|
|
|
1744
1744
|
height: Q(
|
|
1745
1745
|
e.height,
|
|
1746
1746
|
Math.min(
|
|
1747
|
-
|
|
1747
|
+
Cn,
|
|
1748
1748
|
t.height - Ue - N
|
|
1749
1749
|
),
|
|
1750
1750
|
Math.max(
|
|
@@ -1818,7 +1818,7 @@ function Ct(e, t) {
|
|
|
1818
1818
|
y: e.anchor.startsWith("bottom") ? n.height - t.height - e.y : e.y
|
|
1819
1819
|
};
|
|
1820
1820
|
}
|
|
1821
|
-
function
|
|
1821
|
+
function co(e, t) {
|
|
1822
1822
|
const n = Ha(e, t), i = ee();
|
|
1823
1823
|
return {
|
|
1824
1824
|
anchor: n,
|
|
@@ -1871,13 +1871,13 @@ function Oe(e, t) {
|
|
|
1871
1871
|
function $a(e, t) {
|
|
1872
1872
|
e.style.setProperty("--pluno-pa-panel-offset-x", `${t.x}px`), e.style.setProperty("--pluno-pa-panel-offset-y", `${t.y}px`);
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1874
|
+
function uo(e) {
|
|
1875
1875
|
e.style.removeProperty("--pluno-pa-panel-offset-x"), e.style.removeProperty("--pluno-pa-panel-offset-y");
|
|
1876
1876
|
}
|
|
1877
1877
|
function ee() {
|
|
1878
1878
|
return {
|
|
1879
1879
|
width: window.innerWidth || document.documentElement.clientWidth || Ro + N * 2,
|
|
1880
|
-
height: window.innerHeight || document.documentElement.clientHeight ||
|
|
1880
|
+
height: window.innerHeight || document.documentElement.clientHeight || zo + N * 2
|
|
1881
1881
|
};
|
|
1882
1882
|
}
|
|
1883
1883
|
function nn(e) {
|
|
@@ -1932,7 +1932,7 @@ function Va(e) {
|
|
|
1932
1932
|
function lt(e) {
|
|
1933
1933
|
e.style.height = "0px", e.style.height = `${e.scrollHeight}px`, e.style.overflowY = e.scrollHeight > e.clientHeight ? "auto" : "hidden";
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function pt(e, t = () => !0) {
|
|
1936
1936
|
e.scrollTop = e.scrollHeight, window.requestAnimationFrame(() => {
|
|
1937
1937
|
t() && (e.scrollTop = e.scrollHeight);
|
|
1938
1938
|
});
|
|
@@ -2170,15 +2170,15 @@ function Wo(e, t) {
|
|
|
2170
2170
|
);
|
|
2171
2171
|
}
|
|
2172
2172
|
function ke(e, t) {
|
|
2173
|
-
const n = `pluno-pa-character-${
|
|
2174
|
-
|
|
2175
|
-
const i = t.scribbleStyle ?
|
|
2173
|
+
const n = `pluno-pa-character-${io}`;
|
|
2174
|
+
io += 1;
|
|
2175
|
+
const i = t.scribbleStyle ? sr(t.accentColor, n) : pr(t.accentColor, n), o = e.split(/\s+/).filter(Boolean);
|
|
2176
2176
|
return i.setAttribute(
|
|
2177
2177
|
"class",
|
|
2178
2178
|
o.includes("pluno-pa-widget__character") ? e : `pluno-pa-widget__character ${e}`
|
|
2179
2179
|
), i.setAttribute("aria-hidden", "true"), i.setAttribute("focusable", "false"), i.removeAttribute("role"), i.removeAttribute("aria-label"), i;
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function pr(e, t) {
|
|
2182
2182
|
const n = Li(e), i = {
|
|
2183
2183
|
boltFill: `${t}-boltFill`,
|
|
2184
2184
|
boltEdge: `${t}-boltEdge`,
|
|
@@ -2353,7 +2353,7 @@ function sr(e, t) {
|
|
|
2353
2353
|
opacity: "0.48"
|
|
2354
2354
|
});
|
|
2355
2355
|
const R = x(o, "g", { filter: J(i.eyeShadow) });
|
|
2356
|
-
return
|
|
2356
|
+
return go(
|
|
2357
2357
|
R,
|
|
2358
2358
|
"rotate(-2 528 463)",
|
|
2359
2359
|
"528",
|
|
@@ -2363,7 +2363,7 @@ function sr(e, t) {
|
|
|
2363
2363
|
"557",
|
|
2364
2364
|
"447",
|
|
2365
2365
|
i
|
|
2366
|
-
),
|
|
2366
|
+
), go(
|
|
2367
2367
|
R,
|
|
2368
2368
|
"rotate(2 717 462)",
|
|
2369
2369
|
"717",
|
|
@@ -2375,7 +2375,7 @@ function sr(e, t) {
|
|
|
2375
2375
|
i
|
|
2376
2376
|
), o;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2378
|
+
function sr(e, t) {
|
|
2379
2379
|
const n = Lo(e), i = {
|
|
2380
2380
|
clip: `${t}-scribbleBoltClip`,
|
|
2381
2381
|
wobble: `${t}-scribbleBoltWobble`
|
|
@@ -2420,7 +2420,7 @@ function pr(e, t) {
|
|
|
2420
2420
|
stroke: Lt,
|
|
2421
2421
|
"stroke-width": "18",
|
|
2422
2422
|
"stroke-linejoin": "round"
|
|
2423
|
-
}),
|
|
2423
|
+
}), ho(
|
|
2424
2424
|
s,
|
|
2425
2425
|
"rotate(-2 528 463)",
|
|
2426
2426
|
"528",
|
|
@@ -2429,7 +2429,7 @@ function pr(e, t) {
|
|
|
2429
2429
|
"473",
|
|
2430
2430
|
"557",
|
|
2431
2431
|
"447"
|
|
2432
|
-
),
|
|
2432
|
+
), ho(
|
|
2433
2433
|
s,
|
|
2434
2434
|
"rotate(2 717 462)",
|
|
2435
2435
|
"717",
|
|
@@ -2442,11 +2442,11 @@ function pr(e, t) {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
function Ho() {
|
|
2444
2444
|
return A("svg", {
|
|
2445
|
-
xmlns:
|
|
2445
|
+
xmlns: Mo,
|
|
2446
2446
|
viewBox: "0 0 1254 1254"
|
|
2447
2447
|
});
|
|
2448
2448
|
}
|
|
2449
|
-
function
|
|
2449
|
+
function go(e, t, n, i, o, r, l, p, s) {
|
|
2450
2450
|
const c = x(e, "g", { transform: t });
|
|
2451
2451
|
x(c, "ellipse", {
|
|
2452
2452
|
cx: n,
|
|
@@ -2468,7 +2468,7 @@ function uo(e, t, n, i, o, r, l, p, s) {
|
|
|
2468
2468
|
fill: "#ffffff"
|
|
2469
2469
|
});
|
|
2470
2470
|
}
|
|
2471
|
-
function
|
|
2471
|
+
function ho(e, t, n, i, o, r, l, p) {
|
|
2472
2472
|
const s = x(e, "g", { transform: t });
|
|
2473
2473
|
x(s, "ellipse", {
|
|
2474
2474
|
cx: n,
|
|
@@ -2552,7 +2552,7 @@ function $o(e, t) {
|
|
|
2552
2552
|
`0 0 ${n} ${ka}`
|
|
2553
2553
|
), e.replaceChildren();
|
|
2554
2554
|
for (let i = 0; i < t; i += 1) {
|
|
2555
|
-
const o =
|
|
2555
|
+
const o = oo[i % oo.length], r = A("g", {
|
|
2556
2556
|
transform: `translate(${hn + i * gn} 0)`
|
|
2557
2557
|
});
|
|
2558
2558
|
r.appendChild(
|
|
@@ -2776,12 +2776,12 @@ function de(e, t, n, i, o, r) {
|
|
|
2776
2776
|
return o && (l.stroke = o, l["stroke-linecap"] = "round", l["stroke-linejoin"] = "round"), r && (l["stroke-width"] = r), A("svg", l);
|
|
2777
2777
|
}
|
|
2778
2778
|
function A(e, t = {}) {
|
|
2779
|
-
const n = document.createElementNS(
|
|
2779
|
+
const n = document.createElementNS(Mo, e);
|
|
2780
2780
|
for (const [i, o] of Object.entries(t))
|
|
2781
2781
|
n.setAttribute(i, o);
|
|
2782
2782
|
return n;
|
|
2783
2783
|
}
|
|
2784
|
-
function
|
|
2784
|
+
function mo(e) {
|
|
2785
2785
|
for (const t of ["keydown", "keypress", "keyup"])
|
|
2786
2786
|
e.addEventListener(t, (n) => {
|
|
2787
2787
|
n.stopPropagation();
|
|
@@ -2799,28 +2799,28 @@ function xr(e, t, n) {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
function yr(e) {
|
|
2802
|
-
const t =
|
|
2802
|
+
const t = En(e), n = jo(e);
|
|
2803
2803
|
if (t === "image" && n) {
|
|
2804
2804
|
const i = document.createElement("img");
|
|
2805
2805
|
return i.src = n, i.alt = "", i.setAttribute("aria-hidden", "true"), i.addEventListener(
|
|
2806
2806
|
"error",
|
|
2807
|
-
() => i.replaceWith(
|
|
2807
|
+
() => i.replaceWith(se(e))
|
|
2808
2808
|
), i;
|
|
2809
2809
|
}
|
|
2810
2810
|
if (t === "video" && n) {
|
|
2811
2811
|
const i = document.createElement("video");
|
|
2812
2812
|
return i.src = n, i.muted = !0, i.preload = "metadata", i.setAttribute("aria-hidden", "true"), i.addEventListener(
|
|
2813
2813
|
"error",
|
|
2814
|
-
() => i.replaceWith(
|
|
2814
|
+
() => i.replaceWith(se(e))
|
|
2815
2815
|
), i.addEventListener(
|
|
2816
2816
|
"stalled",
|
|
2817
|
-
() => i.replaceWith(
|
|
2817
|
+
() => i.replaceWith(se(e))
|
|
2818
2818
|
), i;
|
|
2819
2819
|
}
|
|
2820
|
-
return
|
|
2820
|
+
return se(e);
|
|
2821
2821
|
}
|
|
2822
2822
|
function vr(e, t) {
|
|
2823
|
-
const n =
|
|
2823
|
+
const n = En(e), i = jo(e);
|
|
2824
2824
|
if (n === "image" && i) {
|
|
2825
2825
|
const o = document.createElement("img");
|
|
2826
2826
|
o.className = "pluno-pa-widget__message-attachment-preview", o.alt = e.name;
|
|
@@ -2828,7 +2828,7 @@ function vr(e, t) {
|
|
|
2828
2828
|
o.addEventListener(
|
|
2829
2829
|
"error",
|
|
2830
2830
|
() => o.replaceWith(
|
|
2831
|
-
|
|
2831
|
+
se(e, "message")
|
|
2832
2832
|
),
|
|
2833
2833
|
{ once: !0 }
|
|
2834
2834
|
), o.src = l ?? i;
|
|
@@ -2843,42 +2843,42 @@ function vr(e, t) {
|
|
|
2843
2843
|
return o.className = "pluno-pa-widget__message-attachment-preview pluno-pa-widget__message-attachment-preview--pdf", o.data = i, o.type = "application/pdf", o.setAttribute("aria-label", e.name), o.addEventListener(
|
|
2844
2844
|
"error",
|
|
2845
2845
|
() => o.replaceWith(
|
|
2846
|
-
|
|
2846
|
+
se(e, "message")
|
|
2847
2847
|
)
|
|
2848
|
-
), o.appendChild(
|
|
2848
|
+
), o.appendChild(se(e, "message")), o;
|
|
2849
2849
|
}
|
|
2850
2850
|
if (n === "video" && i) {
|
|
2851
2851
|
const o = document.createElement("video");
|
|
2852
2852
|
return o.className = "pluno-pa-widget__message-attachment-preview", o.src = i, o.muted = !0, o.preload = "metadata", o.addEventListener(
|
|
2853
2853
|
"error",
|
|
2854
|
-
() => o.replaceWith(
|
|
2854
|
+
() => o.replaceWith(se(e, "message"))
|
|
2855
2855
|
), o.addEventListener(
|
|
2856
2856
|
"stalled",
|
|
2857
|
-
() => o.replaceWith(
|
|
2857
|
+
() => o.replaceWith(se(e, "message"))
|
|
2858
2858
|
), o;
|
|
2859
2859
|
}
|
|
2860
|
-
return
|
|
2860
|
+
return se(e, "message");
|
|
2861
2861
|
}
|
|
2862
|
-
function
|
|
2862
|
+
function se(e, t = "composer") {
|
|
2863
2863
|
if (t === "composer") {
|
|
2864
2864
|
const r = document.createElement("span");
|
|
2865
|
-
return r.className = "pluno-pa-widget__attachment-file", r.textContent =
|
|
2865
|
+
return r.className = "pluno-pa-widget__attachment-file", r.textContent = fo(e), r;
|
|
2866
2866
|
}
|
|
2867
2867
|
const n = document.createElement("div");
|
|
2868
2868
|
n.className = "pluno-pa-widget__message-attachment-file";
|
|
2869
2869
|
const i = document.createElement("span");
|
|
2870
|
-
i.textContent =
|
|
2870
|
+
i.textContent = fo(e);
|
|
2871
2871
|
const o = document.createElement("strong");
|
|
2872
2872
|
return o.textContent = e.name, n.append(i, o), n;
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2874
|
+
function En(e) {
|
|
2875
2875
|
return e.mimeType.startsWith("image/") ? "image" : e.mimeType === "application/pdf" ? "pdf" : e.mimeType.startsWith("video/") ? "video" : "file";
|
|
2876
2876
|
}
|
|
2877
2877
|
function jo(e) {
|
|
2878
2878
|
return "previewUrl" in e && e.previewUrl ? e.previewUrl : e.fileUrl ?? "";
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2881
|
-
const t =
|
|
2880
|
+
function fo(e) {
|
|
2881
|
+
const t = En(e);
|
|
2882
2882
|
return t === "image" ? "IMG" : t === "pdf" ? "PDF" : t === "video" ? "VID" : "FILE";
|
|
2883
2883
|
}
|
|
2884
2884
|
function Sr(e, t) {
|
|
@@ -2898,23 +2898,30 @@ function ln(e, t, n = null) {
|
|
|
2898
2898
|
e && (e.hidden = !0, e.replaceChildren());
|
|
2899
2899
|
return;
|
|
2900
2900
|
}
|
|
2901
|
-
e.hidden = !1, e.replaceChildren(), e.className = "pluno-pa-widget__billing-status", le(t) ||
|
|
2901
|
+
e.hidden = !1, e.replaceChildren(), e.className = "pluno-pa-widget__billing-status", le(t) || kn(n) ? e.appendChild(
|
|
2902
2902
|
Er(t, n)
|
|
2903
2903
|
) : Ko(t) && e.appendChild(kr(t));
|
|
2904
2904
|
}
|
|
2905
2905
|
function Er(e, t) {
|
|
2906
2906
|
const n = document.createElement("div");
|
|
2907
2907
|
n.className = "pluno-pa-widget__billing-action-card";
|
|
2908
|
-
const i = e.limitExceeded || t === "limit_exceeded", o = document.createElement("strong");
|
|
2909
|
-
|
|
2910
|
-
const
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
"
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2908
|
+
const i = e.limitExceeded || t === "limit_exceeded", o = i && e.onboardingIncomplete === !0, r = document.createElement("strong");
|
|
2909
|
+
r.textContent = o ? "Complete onboarding" : i ? "Credits used up" : "Billing needs attention", n.appendChild(r);
|
|
2910
|
+
const l = document.createElement("span");
|
|
2911
|
+
if (l.textContent = o ? "Complete onboarding to unlock credits and start using Pluno." : i ? "Earn bonus credits or upgrade to keep using Pluno on this product." : e.paymentIssue ?? "Open billing to keep using Pluno.", n.appendChild(l), o) {
|
|
2912
|
+
const p = document.createElement("div");
|
|
2913
|
+
p.className = "pluno-pa-widget__billing-action-card-actions", p.appendChild(
|
|
2914
|
+
xn("Complete onboarding", e.onboardingUrl ?? "")
|
|
2915
|
+
), n.appendChild(p);
|
|
2916
|
+
} else
|
|
2917
|
+
n.appendChild(
|
|
2918
|
+
Vo(
|
|
2919
|
+
e,
|
|
2920
|
+
"Upgrade plan",
|
|
2921
|
+
"pluno-pa-widget__billing-action-card-actions"
|
|
2922
|
+
)
|
|
2923
|
+
);
|
|
2924
|
+
return n;
|
|
2918
2925
|
}
|
|
2919
2926
|
function kr(e) {
|
|
2920
2927
|
const t = document.createElement("div");
|
|
@@ -2931,9 +2938,9 @@ function kr(e) {
|
|
|
2931
2938
|
), t;
|
|
2932
2939
|
}
|
|
2933
2940
|
function _n(e, t) {
|
|
2934
|
-
return e !== null && (le(e) || Ko(e) ||
|
|
2941
|
+
return e !== null && (le(e) || Ko(e) || kn(t));
|
|
2935
2942
|
}
|
|
2936
|
-
function
|
|
2943
|
+
function wo(e, t, n) {
|
|
2937
2944
|
return _n(t, n) || Lr(t) ? !0 : !_n(e, n);
|
|
2938
2945
|
}
|
|
2939
2946
|
function Lr(e) {
|
|
@@ -2942,7 +2949,7 @@ function Lr(e) {
|
|
|
2942
2949
|
function le(e) {
|
|
2943
2950
|
return e?.limitExceeded === !0 || !!e?.paymentIssue;
|
|
2944
2951
|
}
|
|
2945
|
-
function
|
|
2952
|
+
function kn(e) {
|
|
2946
2953
|
return e === "limit_exceeded" || e === "subscription_required" || e === "subscription_inactive" || e === "payment_issue" || e === "subscription_invalid" || e === "payment_required";
|
|
2947
2954
|
}
|
|
2948
2955
|
function Ko(e) {
|
|
@@ -2959,12 +2966,12 @@ function Ar(e) {
|
|
|
2959
2966
|
function Vo(e, t, n) {
|
|
2960
2967
|
const i = document.createElement("div");
|
|
2961
2968
|
return i.className = n, i.appendChild(
|
|
2962
|
-
|
|
2969
|
+
xn(t, e.pricingUrl)
|
|
2963
2970
|
), i.appendChild(
|
|
2964
|
-
|
|
2971
|
+
xn("Earn credits", e.earnCreditsUrl)
|
|
2965
2972
|
), i;
|
|
2966
2973
|
}
|
|
2967
|
-
function
|
|
2974
|
+
function xn(e, t) {
|
|
2968
2975
|
const n = document.createElement("button");
|
|
2969
2976
|
if (n.type = "button", e === "Earn credits") {
|
|
2970
2977
|
const i = document.createElement("span");
|
|
@@ -2975,13 +2982,13 @@ function wo(e, t) {
|
|
|
2975
2982
|
t.trim().length !== 0 && window.open(t, "_blank", "noopener,noreferrer");
|
|
2976
2983
|
}), n;
|
|
2977
2984
|
}
|
|
2978
|
-
function
|
|
2985
|
+
function pn(e, t) {
|
|
2979
2986
|
return e.messages.filter(
|
|
2980
2987
|
(i) => !Xo(i)
|
|
2981
2988
|
).length === 0 && !e.assistantDraft && !e.lastError && !e.isThinking && !t;
|
|
2982
2989
|
}
|
|
2983
|
-
function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R,
|
|
2984
|
-
const te =
|
|
2990
|
+
function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, M, L) {
|
|
2991
|
+
const te = Mr(r), W = Dr(
|
|
2985
2992
|
te.filter((S) => !Xo(S))
|
|
2986
2993
|
), Ye = e.scrollTop, Be = [], ce = /* @__PURE__ */ new Set(), U = (S) => {
|
|
2987
2994
|
Be.push(S);
|
|
@@ -3026,7 +3033,7 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3026
3033
|
return;
|
|
3027
3034
|
}
|
|
3028
3035
|
let B = null, $ = null, X = [], Le = [];
|
|
3029
|
-
const K = W.length - 1, ct = K >= 0 &&
|
|
3036
|
+
const K = W.length - 1, ct = K >= 0 && yn(W[K]), Te = Or(W);
|
|
3030
3037
|
let ue = !1;
|
|
3031
3038
|
const ge = () => {
|
|
3032
3039
|
if (X.length === 0)
|
|
@@ -3041,22 +3048,22 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3041
3048
|
v()
|
|
3042
3049
|
);
|
|
3043
3050
|
return U(T), B = null, $ = T, X = [], ue = S, !0;
|
|
3044
|
-
},
|
|
3051
|
+
}, z = () => {
|
|
3045
3052
|
for (const S of Le)
|
|
3046
3053
|
U(S), B = null, $ = S;
|
|
3047
3054
|
Le = [];
|
|
3048
3055
|
};
|
|
3049
3056
|
for (let S = 0; S < W.length; S += 1) {
|
|
3050
3057
|
const T = W[S];
|
|
3051
|
-
if (T.role === "tool" && T.integrationAuthRequest &&
|
|
3058
|
+
if (T.role === "tool" && T.integrationAuthRequest && M) {
|
|
3052
3059
|
const b = Pr(
|
|
3053
3060
|
T.integrationAuthRequest,
|
|
3054
|
-
|
|
3061
|
+
M.states.get(
|
|
3055
3062
|
T.integrationAuthRequest.authRequestId
|
|
3056
3063
|
) ?? {
|
|
3057
|
-
status:
|
|
3064
|
+
status: M.initialStatus
|
|
3058
3065
|
},
|
|
3059
|
-
|
|
3066
|
+
M.onConnect
|
|
3060
3067
|
);
|
|
3061
3068
|
Le.push(b);
|
|
3062
3069
|
continue;
|
|
@@ -3065,7 +3072,7 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3065
3072
|
X.push(T);
|
|
3066
3073
|
continue;
|
|
3067
3074
|
}
|
|
3068
|
-
if (
|
|
3075
|
+
if (yn(T)) {
|
|
3069
3076
|
if (S !== K)
|
|
3070
3077
|
continue;
|
|
3071
3078
|
if (ge()) {
|
|
@@ -3083,18 +3090,18 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3083
3090
|
if (T.dataType === "run_error" || T.dataType === "run_status") {
|
|
3084
3091
|
ge();
|
|
3085
3092
|
const b = document.createElement("div"), k = T.dataType === "run_error";
|
|
3086
|
-
if (b.className = k ? "pluno-pa-widget__error" : "pluno-pa-widget__status pluno-pa-widget__run-status", b.textContent =
|
|
3093
|
+
if (b.className = k ? "pluno-pa-widget__error" : "pluno-pa-widget__status pluno-pa-widget__run-status", b.textContent = vn(
|
|
3087
3094
|
T.content
|
|
3088
3095
|
), k && T.securitySettingsUrl) {
|
|
3089
3096
|
const q = document.createElement("a");
|
|
3090
3097
|
q.className = "pluno-pa-widget__error-retry", q.href = T.securitySettingsUrl, q.target = "_blank", q.rel = "noreferrer", q.textContent = "Security settings", b.appendChild(q);
|
|
3091
3098
|
}
|
|
3092
|
-
U(b), B = k ? b : null, $ = k ? null : b,
|
|
3099
|
+
U(b), B = k ? b : null, $ = k ? null : b, z();
|
|
3093
3100
|
}
|
|
3094
3101
|
continue;
|
|
3095
3102
|
}
|
|
3096
|
-
T.role === "user" &&
|
|
3097
|
-
const P = ge(), ye =
|
|
3103
|
+
T.role === "user" && z();
|
|
3104
|
+
const P = ge(), ye = vn(T.content);
|
|
3098
3105
|
if (T.role === "assistant" && !P) {
|
|
3099
3106
|
const b = Jo(v());
|
|
3100
3107
|
U(b), B = null, $ = b;
|
|
@@ -3106,7 +3113,7 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3106
3113
|
ce,
|
|
3107
3114
|
R
|
|
3108
3115
|
);
|
|
3109
|
-
U(ne), B = ne, $ = null, T.role === "assistant" &&
|
|
3116
|
+
U(ne), B = ne, $ = null, T.role === "assistant" && z();
|
|
3110
3117
|
}
|
|
3111
3118
|
const Xe = ge(), Ae = W[W.length - 1]?.role === "assistant";
|
|
3112
3119
|
if (r.isThinking && !Ae && !ct)
|
|
@@ -3150,14 +3157,14 @@ function Ir(e, t, n, i, o, r, l, p, s, c, g, h, m, v, E, O, u, F, w, R, z, L) {
|
|
|
3150
3157
|
});
|
|
3151
3158
|
U(S), L.onSeen(Ie), B = null, $ = S;
|
|
3152
3159
|
}
|
|
3153
|
-
|
|
3160
|
+
z(), B?.classList.add(
|
|
3154
3161
|
"pluno-pa-widget__message--bottom-reserve"
|
|
3155
3162
|
), $?.classList.add(
|
|
3156
3163
|
"pluno-pa-widget__bottom-reserve-compact"
|
|
3157
|
-
), U(t),
|
|
3164
|
+
), U(t), zr(
|
|
3158
3165
|
h,
|
|
3159
3166
|
ce
|
|
3160
|
-
), bo(e, Be), s ?
|
|
3167
|
+
), bo(e, Be), s ? pt(e, c) : e.scrollTop = Ye;
|
|
3161
3168
|
}
|
|
3162
3169
|
function Pr(e, t, n) {
|
|
3163
3170
|
const i = document.createElement("section");
|
|
@@ -3213,7 +3220,7 @@ function Rr(e, t) {
|
|
|
3213
3220
|
})
|
|
3214
3221
|
});
|
|
3215
3222
|
}
|
|
3216
|
-
function
|
|
3223
|
+
function zr(e, t) {
|
|
3217
3224
|
for (const n of e.keys())
|
|
3218
3225
|
t.has(n) || e.delete(n);
|
|
3219
3226
|
}
|
|
@@ -3231,7 +3238,7 @@ function bo(e, t) {
|
|
|
3231
3238
|
n = n.nextSibling, e.removeChild(i);
|
|
3232
3239
|
}
|
|
3233
3240
|
}
|
|
3234
|
-
function
|
|
3241
|
+
function Mr(e) {
|
|
3235
3242
|
if (!e.assistantDraft)
|
|
3236
3243
|
return [...e.messages];
|
|
3237
3244
|
const t = {
|
|
@@ -3252,7 +3259,7 @@ function zr(e) {
|
|
|
3252
3259
|
if (n === -1)
|
|
3253
3260
|
return [...e.messages, t];
|
|
3254
3261
|
const i = e.messages.findIndex(
|
|
3255
|
-
(r, l) => l > n && r.role !== "user" && r.respondsToUserMessageId === t.respondsToUserMessageId && _o(r, t) &&
|
|
3262
|
+
(r, l) => l > n && r.role !== "user" && r.respondsToUserMessageId === t.respondsToUserMessageId && _o(r, t) && yn(r)
|
|
3256
3263
|
);
|
|
3257
3264
|
if (i !== -1)
|
|
3258
3265
|
return [
|
|
@@ -3294,7 +3301,7 @@ function Br(e) {
|
|
|
3294
3301
|
function Yo(e, t) {
|
|
3295
3302
|
return e.respondsToUserMessageId && t.respondsToUserMessageId ? e.respondsToUserMessageId === t.respondsToUserMessageId : e.runId && t.runId ? e.runId === t.runId : e.id === t.id;
|
|
3296
3303
|
}
|
|
3297
|
-
function
|
|
3304
|
+
function yn(e) {
|
|
3298
3305
|
return e.role === "system" && e.dataType === "run_status" && e.loading === !0;
|
|
3299
3306
|
}
|
|
3300
3307
|
function _o(e, t) {
|
|
@@ -3416,7 +3423,7 @@ function $r(e) {
|
|
|
3416
3423
|
function Xo(e) {
|
|
3417
3424
|
return e.role === "tool" && e.toolName === Ao;
|
|
3418
3425
|
}
|
|
3419
|
-
function
|
|
3426
|
+
function vn(e) {
|
|
3420
3427
|
return e.replace(/\uE200[^\uE201]*(?:\uE201|$)/g, "");
|
|
3421
3428
|
}
|
|
3422
3429
|
function qr(e, t, n, i, o) {
|
|
@@ -3456,7 +3463,7 @@ function jr(e, t) {
|
|
|
3456
3463
|
r.className = "pluno-pa-widget__tool-line", r.dataset.eventType = o.phase === "commentary" ? "commentary" : "tool";
|
|
3457
3464
|
const l = document.createElement("span");
|
|
3458
3465
|
l.className = "pluno-pa-widget__tool-line-text";
|
|
3459
|
-
const p =
|
|
3466
|
+
const p = vn(o.content) || (o.phase === "commentary" ? "" : "Run tool"), s = o.phase === "commentary" ? p : Zo(p);
|
|
3460
3467
|
t && o === i && o.phase !== "commentary" && (l.classList.add("pluno-pa-widget__tool-line-text--loading"), l.dataset.loadingText = s), l.textContent = s, r.appendChild(l), n.appendChild(r);
|
|
3461
3468
|
}
|
|
3462
3469
|
return n;
|
|
@@ -3496,7 +3503,7 @@ function Vr() {
|
|
|
3496
3503
|
function Qo(e, t) {
|
|
3497
3504
|
e.setAttribute("aria-label", t ? "Stop" : "Send"), e.classList.toggle("pluno-pa-widget__send--stop", t), e.replaceChildren(t ? wr() : qo());
|
|
3498
3505
|
}
|
|
3499
|
-
function
|
|
3506
|
+
function sn(e) {
|
|
3500
3507
|
let t = e.trim();
|
|
3501
3508
|
if (!t.includes("|"))
|
|
3502
3509
|
return null;
|
|
@@ -3515,7 +3522,7 @@ function Yr(e) {
|
|
|
3515
3522
|
return t.startsWith(":") && t.endsWith(":") ? "center" : t.endsWith(":") ? "right" : t.startsWith(":") ? "left" : null;
|
|
3516
3523
|
}
|
|
3517
3524
|
function Xr(e, t) {
|
|
3518
|
-
const n =
|
|
3525
|
+
const n = sn(e[t] ?? ""), i = sn(e[t + 1] ?? "");
|
|
3519
3526
|
if (!n || !i || n.length !== i.length)
|
|
3520
3527
|
return null;
|
|
3521
3528
|
const o = [];
|
|
@@ -3535,7 +3542,7 @@ function Xr(e, t) {
|
|
|
3535
3542
|
const c = document.createElement("tbody");
|
|
3536
3543
|
let g = t + 2;
|
|
3537
3544
|
for (; g < e.length && e[g].trim(); ) {
|
|
3538
|
-
const h =
|
|
3545
|
+
const h = sn(e[g]);
|
|
3539
3546
|
if (!h)
|
|
3540
3547
|
break;
|
|
3541
3548
|
const m = document.createElement("tr");
|
|
@@ -5399,8 +5406,18 @@ function vo(e, t) {
|
|
|
5399
5406
|
}
|
|
5400
5407
|
.pluno-pa-widget__empty-state--morning-report {
|
|
5401
5408
|
--pluno-pa-starter-edge-gap: 18px;
|
|
5402
|
-
|
|
5403
|
-
|
|
5409
|
+
position: relative;
|
|
5410
|
+
isolation: isolate;
|
|
5411
|
+
box-sizing: border-box;
|
|
5412
|
+
width: calc(100% - 12px);
|
|
5413
|
+
max-width: 380px;
|
|
5414
|
+
margin: auto 6px;
|
|
5415
|
+
gap: var(--pluno-pa-starter-edge-gap);
|
|
5416
|
+
padding: 52px 22px 22px;
|
|
5417
|
+
border: 1px solid var(--pluno-pa-divider);
|
|
5418
|
+
border-radius: 4px;
|
|
5419
|
+
background: var(--pluno-pa-surface);
|
|
5420
|
+
box-shadow: 0 18px 36px rgba(24, 24, 27, 0.14);
|
|
5404
5421
|
}
|
|
5405
5422
|
.pluno-pa-widget__error-retry {
|
|
5406
5423
|
display: block;
|
|
@@ -5421,6 +5438,19 @@ function vo(e, t) {
|
|
|
5421
5438
|
line-height: 1.34;
|
|
5422
5439
|
text-align: left;
|
|
5423
5440
|
}
|
|
5441
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__empty-hero {
|
|
5442
|
+
position: absolute;
|
|
5443
|
+
top: -42px;
|
|
5444
|
+
left: 16px;
|
|
5445
|
+
z-index: 2;
|
|
5446
|
+
transform: rotate(-5deg);
|
|
5447
|
+
}
|
|
5448
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__morning-report-title {
|
|
5449
|
+
width: 100%;
|
|
5450
|
+
font-size: 22px;
|
|
5451
|
+
font-weight: 600;
|
|
5452
|
+
line-height: 1.36;
|
|
5453
|
+
}
|
|
5424
5454
|
.pluno-pa-widget__morning-report-snooze {
|
|
5425
5455
|
justify-self: end;
|
|
5426
5456
|
margin-top: calc(var(--pluno-pa-starter-edge-gap) * -0.55);
|
|
@@ -5434,7 +5464,7 @@ function vo(e, t) {
|
|
|
5434
5464
|
cursor: pointer;
|
|
5435
5465
|
}
|
|
5436
5466
|
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__morning-report-snooze {
|
|
5437
|
-
margin-top:
|
|
5467
|
+
margin-top: 0;
|
|
5438
5468
|
}
|
|
5439
5469
|
.pluno-pa-widget__empty-hero {
|
|
5440
5470
|
display: inline-flex;
|
|
@@ -5498,7 +5528,25 @@ function vo(e, t) {
|
|
|
5498
5528
|
width: 100%;
|
|
5499
5529
|
}
|
|
5500
5530
|
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompts {
|
|
5501
|
-
gap:
|
|
5531
|
+
gap: 4px;
|
|
5532
|
+
}
|
|
5533
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt {
|
|
5534
|
+
position: relative;
|
|
5535
|
+
padding: 10px 8px 10px 30px;
|
|
5536
|
+
border-bottom: 1px dashed color-mix(in srgb, var(--pluno-pa-divider) 70%, transparent);
|
|
5537
|
+
border-radius: 4px;
|
|
5538
|
+
transition: color 120ms ease, background 120ms ease, transform 120ms ease;
|
|
5539
|
+
}
|
|
5540
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt::before {
|
|
5541
|
+
content: "→";
|
|
5542
|
+
position: absolute;
|
|
5543
|
+
left: 8px;
|
|
5544
|
+
top: 10px;
|
|
5545
|
+
color: var(--pluno-pa-text);
|
|
5546
|
+
}
|
|
5547
|
+
.pluno-pa-widget__empty-state--morning-report .pluno-pa-widget__starter-prompt:hover {
|
|
5548
|
+
background: color-mix(in srgb, var(--pluno-pa-accent-soft) 68%, transparent);
|
|
5549
|
+
transform: translateX(2px);
|
|
5502
5550
|
}
|
|
5503
5551
|
.pluno-pa-widget__starter-prompts--empty {
|
|
5504
5552
|
pointer-events: none;
|
|
@@ -5704,6 +5752,37 @@ function vo(e, t) {
|
|
|
5704
5752
|
width: 96px;
|
|
5705
5753
|
height: 96px;
|
|
5706
5754
|
}
|
|
5755
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report {
|
|
5756
|
+
border: 2px solid var(--pluno-pa-divider);
|
|
5757
|
+
border-radius: 3px 1px 4px 2px;
|
|
5758
|
+
background: #fffdf5;
|
|
5759
|
+
box-shadow:
|
|
5760
|
+
6px 8px 0 rgba(44, 42, 30, 0.09),
|
|
5761
|
+
0 18px 30px rgba(44, 42, 30, 0.14);
|
|
5762
|
+
transform: rotate(-0.3deg);
|
|
5763
|
+
}
|
|
5764
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::before,
|
|
5765
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::after {
|
|
5766
|
+
content: "";
|
|
5767
|
+
position: absolute;
|
|
5768
|
+
z-index: 3;
|
|
5769
|
+
width: 72px;
|
|
5770
|
+
height: 20px;
|
|
5771
|
+
border: 1px solid rgba(113, 91, 45, 0.18);
|
|
5772
|
+
background: rgba(224, 199, 139, 0.72);
|
|
5773
|
+
box-shadow: 0 2px 3px rgba(44, 42, 30, 0.08);
|
|
5774
|
+
pointer-events: none;
|
|
5775
|
+
}
|
|
5776
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::before {
|
|
5777
|
+
top: -7px;
|
|
5778
|
+
right: -17px;
|
|
5779
|
+
transform: rotate(34deg);
|
|
5780
|
+
}
|
|
5781
|
+
.pluno-pa-widget--scribble .pluno-pa-widget__empty-state--morning-report::after {
|
|
5782
|
+
bottom: -8px;
|
|
5783
|
+
left: -18px;
|
|
5784
|
+
transform: rotate(39deg);
|
|
5785
|
+
}
|
|
5707
5786
|
.pluno-pa-widget--scribble .pluno-pa-widget__character--tool-group {
|
|
5708
5787
|
width: 60px;
|
|
5709
5788
|
height: 60px;
|
|
@@ -6056,11 +6135,11 @@ async function tl() {
|
|
|
6056
6135
|
t.observe(document.documentElement, { childList: !0 });
|
|
6057
6136
|
});
|
|
6058
6137
|
}
|
|
6059
|
-
function
|
|
6138
|
+
function Ln(e) {
|
|
6060
6139
|
return `pluno.productAgent.widgetState.${location.origin}.${e.backendUrl ?? ""}.${e.tokenEndpoint ?? ""}.${e.position ?? ""}`;
|
|
6061
6140
|
}
|
|
6062
6141
|
function ti(e) {
|
|
6063
|
-
return `${
|
|
6142
|
+
return `${Ln(e)}.displayState`;
|
|
6064
6143
|
}
|
|
6065
6144
|
function nl(e) {
|
|
6066
6145
|
try {
|
|
@@ -6108,7 +6187,7 @@ function ol(e) {
|
|
|
6108
6187
|
}
|
|
6109
6188
|
function il(e) {
|
|
6110
6189
|
try {
|
|
6111
|
-
const t = window.localStorage.getItem(
|
|
6190
|
+
const t = window.localStorage.getItem(Ln(e));
|
|
6112
6191
|
if (!t)
|
|
6113
6192
|
return Co();
|
|
6114
6193
|
const n = JSON.parse(t);
|
|
@@ -6120,8 +6199,8 @@ function il(e) {
|
|
|
6120
6199
|
openToolGroupKeys: Array.isArray(n.openToolGroupKeys) ? n.openToolGroupKeys.filter(
|
|
6121
6200
|
(i) => typeof i == "string"
|
|
6122
6201
|
) : [],
|
|
6123
|
-
launcherPosition:
|
|
6124
|
-
panelSize:
|
|
6202
|
+
launcherPosition: pl(n.launcherPosition) ? n.launcherPosition : null,
|
|
6203
|
+
panelSize: sl(n.panelSize) ? At(n.panelSize) : null,
|
|
6125
6204
|
seenShareCandidateIds: Array.isArray(n.seenShareCandidateIds) ? n.seenShareCandidateIds.filter((i) => typeof i == "string").slice(-Io) : [],
|
|
6126
6205
|
sharePromptsDisabled: n.sharePromptsDisabled === !0
|
|
6127
6206
|
};
|
|
@@ -6168,20 +6247,20 @@ function Co() {
|
|
|
6168
6247
|
function ll(e, t) {
|
|
6169
6248
|
try {
|
|
6170
6249
|
window.localStorage.setItem(
|
|
6171
|
-
|
|
6250
|
+
Ln(e),
|
|
6172
6251
|
JSON.stringify(t)
|
|
6173
6252
|
);
|
|
6174
6253
|
} catch {
|
|
6175
6254
|
return;
|
|
6176
6255
|
}
|
|
6177
6256
|
}
|
|
6178
|
-
function
|
|
6257
|
+
function pl(e) {
|
|
6179
6258
|
if (!e || typeof e != "object")
|
|
6180
6259
|
return !1;
|
|
6181
6260
|
const t = e;
|
|
6182
6261
|
return Number.isFinite(t.x) && Number.isFinite(t.y) && (t.anchor === "top-left" || t.anchor === "top-right" || t.anchor === "bottom-left" || t.anchor === "bottom-right");
|
|
6183
6262
|
}
|
|
6184
|
-
function
|
|
6263
|
+
function sl(e) {
|
|
6185
6264
|
if (!e || typeof e != "object")
|
|
6186
6265
|
return !1;
|
|
6187
6266
|
const t = e;
|
|
@@ -6214,7 +6293,7 @@ function dl(e) {
|
|
|
6214
6293
|
let r = !1;
|
|
6215
6294
|
const l = new Promise((p, s) => {
|
|
6216
6295
|
const c = window.setTimeout(() => {
|
|
6217
|
-
r = !0, o.abort(), s(new Error(
|
|
6296
|
+
r = !0, o.abort(), s(new Error(Jn));
|
|
6218
6297
|
}, da);
|
|
6219
6298
|
o.signal.addEventListener(
|
|
6220
6299
|
"abort",
|
|
@@ -6229,7 +6308,7 @@ function dl(e) {
|
|
|
6229
6308
|
]);
|
|
6230
6309
|
return o.abort(), p;
|
|
6231
6310
|
} catch (p) {
|
|
6232
|
-
throw o.abort(), r ? new Error(
|
|
6311
|
+
throw o.abort(), r ? new Error(Jn) : p instanceof Error && p.message.startsWith("Pluno widget blocked on ") ? p : new Error(ca);
|
|
6233
6312
|
}
|
|
6234
6313
|
};
|
|
6235
6314
|
return {
|
|
@@ -6275,7 +6354,7 @@ class xe extends EventTarget {
|
|
|
6275
6354
|
);
|
|
6276
6355
|
}), this.addPreviewListener(la, () => {
|
|
6277
6356
|
this.readyState = xe.CLOSED, this.dispatchEvent(new Event("error")), this.cleanup();
|
|
6278
|
-
}), this.addPreviewListener(
|
|
6357
|
+
}), this.addPreviewListener(pa, (i) => {
|
|
6279
6358
|
const o = i;
|
|
6280
6359
|
this.readyState = xe.CLOSED, this.dispatchEvent(
|
|
6281
6360
|
new CloseEvent("close", {
|
|
@@ -6354,12 +6433,12 @@ class xe extends EventTarget {
|
|
|
6354
6433
|
}
|
|
6355
6434
|
function gl() {
|
|
6356
6435
|
const e = window.sessionStorage.getItem(
|
|
6357
|
-
|
|
6436
|
+
Zn
|
|
6358
6437
|
);
|
|
6359
6438
|
if (e)
|
|
6360
6439
|
return e;
|
|
6361
6440
|
const t = crypto.randomUUID();
|
|
6362
|
-
return window.sessionStorage.setItem(
|
|
6441
|
+
return window.sessionStorage.setItem(Zn, t), t;
|
|
6363
6442
|
}
|
|
6364
6443
|
function St(e, t) {
|
|
6365
6444
|
return `${e}:${t}`;
|