@makefully/notefully 0.2.3 → 0.2.4

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/notefully.js CHANGED
@@ -1,4 +1,4 @@
1
- const he = {
1
+ const ve = {
2
2
  "launcher.open": "Leave a note…",
3
3
  "tool.crop": "Crop",
4
4
  "tool.resetCrop": "Reset crop",
@@ -14,9 +14,21 @@ const he = {
14
14
  "tool.video": "Record video",
15
15
  "tool.stopVideo": "Stop",
16
16
  "form.messagePlaceholder": "Describe the bug or the change you want…",
17
+ "form.placeholder.bug": "What did you expect to happen and what happened instead?",
18
+ "form.placeholder.idea": "What's your idea?",
19
+ "form.placeholder.other": "Describe what you are reporting in detail.",
20
+ "form.placeholder.custom": "{kind}: Describe what you are reporting in detail.",
21
+ "form.title.bug": "Report a Problem",
22
+ "form.title.idea": "Share an Idea",
23
+ "form.title.other": "Send Feedback",
24
+ "form.intro.bug": "Tell us what went wrong.",
25
+ "form.intro.idea": "Tell us what we could improve.",
26
+ "form.intro.other": "Let us know what you think.",
27
+ "form.screenshotNote": "A screenshot of this page is attached. Use the image tools to crop, annotate, remove, or retake the screenshot.",
17
28
  "form.author": "Author",
18
29
  "form.authorPlaceholder": "Anonymous",
19
- "form.submit": "Submit",
30
+ "form.submit": "Send Report",
31
+ "form.close": "Close",
20
32
  "form.done": "Done",
21
33
  "form.success": "Submitted!",
22
34
  "form.viewReport": "View Report",
@@ -57,15 +69,15 @@ const he = {
57
69
  "diag.timezone": "Timezone",
58
70
  "diag.viewport": "Viewport",
59
71
  "diag.user": "User"
60
- }, fe = {
61
- "en-US": he
62
- }, Fe = {
72
+ }, ke = {
73
+ "en-US": ve
74
+ }, De = {
63
75
  en: "en-US",
64
76
  no: "nb",
65
77
  tl: "fil",
66
78
  "zh-Hans": "zh-CN",
67
79
  "zh-Hant": "zh-TW"
68
- }, fa = {
80
+ }, va = {
69
81
  "es-MX": ["es-419", "es"],
70
82
  "es-AR": ["es-419", "es"],
71
83
  "es-CL": ["es-419", "es"],
@@ -85,34 +97,34 @@ const he = {
85
97
  "es-DO": ["es-419", "es"],
86
98
  "es-PR": ["es-419", "es"],
87
99
  "es-CU": ["es-419", "es"]
88
- }, ya = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
89
- let ue = "en-US", Rt = {};
90
- function h(e, t) {
91
- !e || !t || typeof t != "object" || (fe[String(e)] = t);
100
+ }, ka = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
101
+ let ue = "en-US", Pt = {};
102
+ function f(e, t) {
103
+ !e || !t || typeof t != "object" || (ke[String(e)] = t);
92
104
  }
93
- function oe(e) {
105
+ function ie(e) {
94
106
  return String(e || "").trim().replace(/_/g, "-");
95
107
  }
96
- function va(e) {
97
- const t = oe(e);
108
+ function ba(e) {
109
+ const t = ie(e);
98
110
  if (!t)
99
111
  return ["en-US"];
100
- const a = t, o = Fe[a] || Fe[a.toLowerCase()] || a, s = [], i = (l) => {
112
+ const a = t, o = De[a] || De[a.toLowerCase()] || a, s = [], i = (l) => {
101
113
  l && !s.includes(l) && s.push(l);
102
114
  };
103
115
  i(o);
104
- for (const [l, u] of Object.entries(fa))
116
+ for (const [l, u] of Object.entries(va))
105
117
  l.toLowerCase() === o.toLowerCase() && u.forEach(i);
106
118
  const r = o.split("-");
107
119
  for (let l = r.length - 1; l >= 1; l -= 1)
108
120
  i(r.slice(0, l).join("-"));
109
- return i(Fe[r[0]] || r[0]), i("en-US"), s;
121
+ return i(De[r[0]] || r[0]), i("en-US"), s;
110
122
  }
111
- function ka(e) {
112
- for (const t of va(e)) {
113
- if (fe[t])
123
+ function wa(e) {
124
+ for (const t of ba(e)) {
125
+ if (ke[t])
114
126
  return t;
115
- const a = Object.keys(fe).find(
127
+ const a = Object.keys(ke).find(
116
128
  (o) => o.toLowerCase() === t.toLowerCase()
117
129
  );
118
130
  if (a)
@@ -120,36 +132,36 @@ function ka(e) {
120
132
  }
121
133
  return "en-US";
122
134
  }
123
- function ba(e = {}) {
135
+ function Sa(e = {}) {
124
136
  var t;
125
137
  if (e.locale != null && String(e.locale).trim())
126
- return oe(e.locale);
138
+ return ie(e.locale);
127
139
  if (typeof document < "u") {
128
140
  const a = (t = document.documentElement) == null ? void 0 : t.lang;
129
141
  if (a && String(a).trim())
130
- return oe(a);
142
+ return ie(a);
131
143
  }
132
- return typeof navigator < "u" && navigator.language ? oe(navigator.language) : "en-US";
144
+ return typeof navigator < "u" && navigator.language ? ie(navigator.language) : "en-US";
133
145
  }
134
- function wa(e, t) {
135
- return e != null && (ue = oe(e) || "en-US"), ue;
146
+ function Aa(e, t) {
147
+ return e != null && (ue = ie(e) || "en-US"), ue;
136
148
  }
137
- function Sa(e) {
138
- Rt = e && typeof e == "object" ? { ...e } : {};
149
+ function Ca(e) {
150
+ Pt = e && typeof e == "object" ? { ...e } : {};
139
151
  }
140
- function ye() {
152
+ function be() {
141
153
  return ue;
142
154
  }
143
- function Aa(e = ue) {
144
- const t = oe(e).split("-")[0].toLowerCase();
145
- return ya.has(t) ? "rtl" : "ltr";
155
+ function za(e = ue) {
156
+ const t = ie(e).split("-")[0].toLowerCase();
157
+ return ka.has(t) ? "rtl" : "ltr";
146
158
  }
147
159
  function p(e, t) {
148
- const a = String(e || ""), o = ka(ue), s = fe[o] || he;
149
- let i = Rt[a] ?? s[a] ?? he[a] ?? a;
150
- return String(i);
160
+ const a = String(e || ""), o = wa(ue), s = ke[o] || ve;
161
+ let i = Pt[a] ?? s[a] ?? ve[a] ?? a;
162
+ return t && typeof t == "object" && (i = String(i).replace(/\{(\w+)\}/g, (r, l) => t[l] == null ? `{${l}}` : String(t[l]))), String(i);
151
163
  }
152
- const Ca = {
164
+ const Ea = {
153
165
  "launcher.open": "Оставете бележка...",
154
166
  "tool.crop": "Реколта",
155
167
  "tool.resetCrop": "Нулиране на изрязването",
@@ -206,7 +218,7 @@ const Ca = {
206
218
  "diag.timezone": "Часова зона",
207
219
  "diag.viewport": "Изгледна плоча",
208
220
  "diag.user": "Потребител"
209
- }, za = {
221
+ }, ja = {
210
222
  "launcher.open": "Deixa una nota...",
211
223
  "tool.crop": "Cultiu",
212
224
  "tool.resetCrop": "Restablir el cultiu",
@@ -263,7 +275,7 @@ const Ca = {
263
275
  "diag.timezone": "Zona horària",
264
276
  "diag.viewport": "Porta de vista",
265
277
  "diag.user": "Usuari"
266
- }, Ea = {
278
+ }, Ra = {
267
279
  "launcher.open": "Zanechte poznámku...",
268
280
  "tool.crop": "Oříznout",
269
281
  "tool.resetCrop": "Obnovit oříznutí",
@@ -320,7 +332,7 @@ const Ca = {
320
332
  "diag.timezone": "Časové pásmo",
321
333
  "diag.viewport": "Výřez",
322
334
  "diag.user": "Uživatel"
323
- }, ja = {
335
+ }, Pa = {
324
336
  "launcher.open": "Efterlad en note...",
325
337
  "tool.crop": "Afgrøde",
326
338
  "tool.resetCrop": "Nulstil afgrøde",
@@ -377,7 +389,7 @@ const Ca = {
377
389
  "diag.timezone": "Tidszone",
378
390
  "diag.viewport": "Viewport",
379
391
  "diag.user": "Bruger"
380
- }, Ra = {
392
+ }, xa = {
381
393
  "launcher.open": "Hinterlassen Sie eine Notiz...",
382
394
  "tool.crop": "Ernte",
383
395
  "tool.resetCrop": "Zuschnitt zurücksetzen",
@@ -434,7 +446,7 @@ const Ca = {
434
446
  "diag.timezone": "Zeitzone",
435
447
  "diag.viewport": "Sichtfenster",
436
448
  "diag.user": "Nutzer"
437
- }, Pa = {
449
+ }, La = {
438
450
  "launcher.open": "Αφήστε ένα σημείωμα...",
439
451
  "tool.crop": "Καλλιέργεια",
440
452
  "tool.resetCrop": "Επαναφορά της καλλιέργειας",
@@ -491,7 +503,7 @@ const Ca = {
491
503
  "diag.timezone": "Ζώνη ώρας",
492
504
  "diag.viewport": "Θύρα προβολής",
493
505
  "diag.user": "Χρήστης"
494
- }, xa = {
506
+ }, Ua = {
495
507
  "launcher.open": "Leave a note…",
496
508
  "tool.crop": "Crop",
497
509
  "tool.resetCrop": "Reset crop",
@@ -507,9 +519,21 @@ const Ca = {
507
519
  "tool.video": "Record video",
508
520
  "tool.stopVideo": "Stop",
509
521
  "form.messagePlaceholder": "Describe the bug or the change you want…",
522
+ "form.placeholder.bug": "What did you expect to happen and what happened instead?",
523
+ "form.placeholder.idea": "What's your idea?",
524
+ "form.placeholder.other": "Describe what you are reporting in detail.",
525
+ "form.placeholder.custom": "{kind}: Describe what you are reporting in detail.",
526
+ "form.title.bug": "Report a Problem",
527
+ "form.title.idea": "Share an Idea",
528
+ "form.title.other": "Send Feedback",
529
+ "form.intro.bug": "Tell us what went wrong.",
530
+ "form.intro.idea": "Tell us what we could improve.",
531
+ "form.intro.other": "Let us know what you think.",
532
+ "form.screenshotNote": "A screenshot of this page is attached. Use the image tools to crop, annotate, remove, or retake the screenshot.",
510
533
  "form.author": "Author",
511
534
  "form.authorPlaceholder": "Anonymous",
512
- "form.submit": "Submit",
535
+ "form.submit": "Send Report",
536
+ "form.close": "Close",
513
537
  "form.done": "Done",
514
538
  "form.success": "Submitted!",
515
539
  "form.viewReport": "View Report",
@@ -550,7 +574,7 @@ const Ca = {
550
574
  "diag.timezone": "Timezone",
551
575
  "diag.viewport": "Viewport",
552
576
  "diag.user": "User"
553
- }, La = {
577
+ }, Ta = {
554
578
  "launcher.open": "Deja una nota...",
555
579
  "tool.crop": "Cultivo",
556
580
  "tool.resetCrop": "Restablecer cultivo",
@@ -607,7 +631,7 @@ const Ca = {
607
631
  "diag.timezone": "Zona horaria",
608
632
  "diag.viewport": "Ventana",
609
633
  "diag.user": "Usuario"
610
- }, Ua = {
634
+ }, Fa = {
611
635
  "launcher.open": "Deja una nota...",
612
636
  "tool.crop": "Cultivo",
613
637
  "tool.resetCrop": "Restablecer recorte",
@@ -664,7 +688,7 @@ const Ca = {
664
688
  "diag.timezone": "Zona horaria",
665
689
  "diag.viewport": "ViEWPORT",
666
690
  "diag.user": "Usuario"
667
- }, Ta = {
691
+ }, Da = {
668
692
  "launcher.open": "Jäta märkus...",
669
693
  "tool.crop": "Põllukultuur",
670
694
  "tool.resetCrop": "Lähtesta põllukultuur",
@@ -721,7 +745,7 @@ const Ca = {
721
745
  "diag.timezone": "Ajavöönd",
722
746
  "diag.viewport": "Vaatenurk",
723
747
  "diag.user": "Kasutaja"
724
- }, Fa = {
748
+ }, Oa = {
725
749
  "launcher.open": "Jätä muistiinpano...",
726
750
  "tool.crop": "Viljely",
727
751
  "tool.resetCrop": "Nollaa rajaus",
@@ -778,7 +802,7 @@ const Ca = {
778
802
  "diag.timezone": "Aikavyöhyke",
779
803
  "diag.viewport": "Näyttöikkuna",
780
804
  "diag.user": "Käyttäjä"
781
- }, Oa = {
805
+ }, Ma = {
782
806
  "launcher.open": "Laissez un message...",
783
807
  "tool.crop": "Récolte",
784
808
  "tool.resetCrop": "Réinitialiser la récolte",
@@ -835,7 +859,7 @@ const Ca = {
835
859
  "diag.timezone": "Fuseau horaire",
836
860
  "diag.viewport": "Viewport",
837
861
  "diag.user": "Utilisateur"
838
- }, Da = {
862
+ }, Ia = {
839
863
  "launcher.open": "एक नोट छोड़ें...",
840
864
  "tool.crop": "क्रॉप",
841
865
  "tool.resetCrop": "क्रॉप रीसेट करें",
@@ -892,7 +916,7 @@ const Ca = {
892
916
  "diag.timezone": "टाइमज़ोन",
893
917
  "diag.viewport": "व्यूपोर्ट",
894
918
  "diag.user": "यूज़र"
895
- }, Ma = {
919
+ }, Va = {
896
920
  "launcher.open": "Ostavite poruku...",
897
921
  "tool.crop": "Usjev",
898
922
  "tool.resetCrop": "Resetirajte obrezivanje",
@@ -949,7 +973,7 @@ const Ca = {
949
973
  "diag.timezone": "Vremenska zona",
950
974
  "diag.viewport": "Prikaznica",
951
975
  "diag.user": "Korisnik"
952
- }, Ia = {
976
+ }, $a = {
953
977
  "launcher.open": "Hagyjon egy jegyzetet...",
954
978
  "tool.crop": "Termés",
955
979
  "tool.resetCrop": "Vágás visszaállítása",
@@ -1006,7 +1030,7 @@ const Ca = {
1006
1030
  "diag.timezone": "Időzóna",
1007
1031
  "diag.viewport": "Nézetablak",
1008
1032
  "diag.user": "Felhasználó"
1009
- }, Va = {
1033
+ }, Ba = {
1010
1034
  "launcher.open": "Tinggalkan catatan...",
1011
1035
  "tool.crop": "Panas",
1012
1036
  "tool.resetCrop": "Setel ulang tanaman",
@@ -1063,7 +1087,7 @@ const Ca = {
1063
1087
  "diag.timezone": "Zona Waktu",
1064
1088
  "diag.viewport": "Pintu pandang",
1065
1089
  "diag.user": "Pengguna"
1066
- }, $a = {
1090
+ }, Na = {
1067
1091
  "launcher.open": "Lascia una nota...",
1068
1092
  "tool.crop": "Ritaglia",
1069
1093
  "tool.resetCrop": "Reimposta il ritaglio",
@@ -1120,7 +1144,7 @@ const Ca = {
1120
1144
  "diag.timezone": "Fuso orario",
1121
1145
  "diag.viewport": "Viewport",
1122
1146
  "diag.user": "Utente"
1123
- }, Ba = {
1147
+ }, Ka = {
1124
1148
  "launcher.open": "メモを残してください...",
1125
1149
  "tool.crop": "クロップ",
1126
1150
  "tool.resetCrop": "トリミングをリセット",
@@ -1177,7 +1201,7 @@ const Ca = {
1177
1201
  "diag.timezone": "タイムゾーン",
1178
1202
  "diag.viewport": "ビューポート",
1179
1203
  "diag.user": "ユーザ"
1180
- }, Na = {
1204
+ }, Ha = {
1181
1205
  "launcher.open": "메모 남기기...",
1182
1206
  "tool.crop": "크롭",
1183
1207
  "tool.resetCrop": "크롭 재설정",
@@ -1234,7 +1258,7 @@ const Ca = {
1234
1258
  "diag.timezone": "타임존",
1235
1259
  "diag.viewport": "뷰포트",
1236
1260
  "diag.user": "사용자"
1237
- }, Ka = {
1261
+ }, Ga = {
1238
1262
  "launcher.open": "Palikite pastabą...",
1239
1263
  "tool.crop": "Apkarpyti",
1240
1264
  "tool.resetCrop": "Iš naujo nustatyti apkarpymą",
@@ -1291,7 +1315,7 @@ const Ca = {
1291
1315
  "diag.timezone": "Laiko juosta",
1292
1316
  "diag.viewport": "Peržiūros sritis",
1293
1317
  "diag.user": "Vartotojas"
1294
- }, Ha = {
1318
+ }, qa = {
1295
1319
  "launcher.open": "Atstājiet piezīmi...",
1296
1320
  "tool.crop": "Kultūraugs",
1297
1321
  "tool.resetCrop": "Atiestatīt apgriešanu",
@@ -1348,7 +1372,7 @@ const Ca = {
1348
1372
  "diag.timezone": "Laika josla",
1349
1373
  "diag.viewport": "Skatu laukums",
1350
1374
  "diag.user": "Lietotājs"
1351
- }, Ga = {
1375
+ }, _a = {
1352
1376
  "launcher.open": "Legg igjen et notat...",
1353
1377
  "tool.crop": "Beskjæring",
1354
1378
  "tool.resetCrop": "Tilbakestill beskjæring",
@@ -1405,7 +1429,7 @@ const Ca = {
1405
1429
  "diag.timezone": "Tidssone",
1406
1430
  "diag.viewport": "Visningsport",
1407
1431
  "diag.user": "Bruker"
1408
- }, qa = {
1432
+ }, Wa = {
1409
1433
  "launcher.open": "Laat een briefje achter...",
1410
1434
  "tool.crop": "Gewas",
1411
1435
  "tool.resetCrop": "Bijsnijden opnieuw instellen",
@@ -1462,7 +1486,7 @@ const Ca = {
1462
1486
  "diag.timezone": "Tijdzone",
1463
1487
  "diag.viewport": "Viewport",
1464
1488
  "diag.user": "Gebruiker"
1465
- }, _a = {
1489
+ }, Za = {
1466
1490
  "launcher.open": "Zostaw notatkę...",
1467
1491
  "tool.crop": "Uprawa",
1468
1492
  "tool.resetCrop": "Resetuj kadrowanie",
@@ -1519,7 +1543,7 @@ const Ca = {
1519
1543
  "diag.timezone": "Strefa czasowa",
1520
1544
  "diag.viewport": "rzutnia",
1521
1545
  "diag.user": "Użytkownik"
1522
- }, Wa = {
1546
+ }, Ja = {
1523
1547
  "launcher.open": "Deixe uma nota...",
1524
1548
  "tool.crop": "Colheita",
1525
1549
  "tool.resetCrop": "Redefinir o corte",
@@ -1576,7 +1600,7 @@ const Ca = {
1576
1600
  "diag.timezone": "Fuso horário",
1577
1601
  "diag.viewport": "Janela de visualização",
1578
1602
  "diag.user": "Usuário"
1579
- }, Za = {
1603
+ }, Ya = {
1580
1604
  "launcher.open": "Deixe uma nota...",
1581
1605
  "tool.crop": "Colheita",
1582
1606
  "tool.resetCrop": "Redefinir o recorte",
@@ -1633,7 +1657,7 @@ const Ca = {
1633
1657
  "diag.timezone": "Fuso horário",
1634
1658
  "diag.viewport": "Viewport",
1635
1659
  "diag.user": "Utilizador"
1636
- }, Ja = {
1660
+ }, Xa = {
1637
1661
  "launcher.open": "Lăsați o notă...",
1638
1662
  "tool.crop": "Cultură",
1639
1663
  "tool.resetCrop": "Resetați recolta",
@@ -1690,7 +1714,7 @@ const Ca = {
1690
1714
  "diag.timezone": "Fus orar",
1691
1715
  "diag.viewport": "Portul de vizualizare",
1692
1716
  "diag.user": "Utilizator"
1693
- }, Ya = {
1717
+ }, Qa = {
1694
1718
  "launcher.open": "Оставьте заметку...",
1695
1719
  "tool.crop": "урожай",
1696
1720
  "tool.resetCrop": "Сбросить урожай",
@@ -1747,7 +1771,7 @@ const Ca = {
1747
1771
  "diag.timezone": "Часовой пояс",
1748
1772
  "diag.viewport": "окно просмотра",
1749
1773
  "diag.user": "Пользователь"
1750
- }, Xa = {
1774
+ }, eo = {
1751
1775
  "launcher.open": "Zanechať poznámku...",
1752
1776
  "tool.crop": "Oplodina",
1753
1777
  "tool.resetCrop": "Obnoviť orezanie",
@@ -1804,7 +1828,7 @@ const Ca = {
1804
1828
  "diag.timezone": "Časové pásmo",
1805
1829
  "diag.viewport": "Zobrazenie",
1806
1830
  "diag.user": "Používateľ"
1807
- }, Qa = {
1831
+ }, to = {
1808
1832
  "launcher.open": "Pustite opombo...",
1809
1833
  "tool.crop": "Pridelek",
1810
1834
  "tool.resetCrop": "Ponastavi obrezovanje",
@@ -1861,7 +1885,7 @@ const Ca = {
1861
1885
  "diag.timezone": "Časovni pas",
1862
1886
  "diag.viewport": "Razgledna plošča",
1863
1887
  "diag.user": "Uporabnik"
1864
- }, eo = {
1888
+ }, ao = {
1865
1889
  "launcher.open": "Ostavite belešku...",
1866
1890
  "tool.crop": "Usjev",
1867
1891
  "tool.resetCrop": "Resetujte usev",
@@ -1918,7 +1942,7 @@ const Ca = {
1918
1942
  "diag.timezone": "Vremenska zona",
1919
1943
  "diag.viewport": "Viedport",
1920
1944
  "diag.user": "Korisnik"
1921
- }, to = {
1945
+ }, oo = {
1922
1946
  "launcher.open": "Lämna en anteckning...",
1923
1947
  "tool.crop": "Skörda",
1924
1948
  "tool.resetCrop": "Återställ beskärning",
@@ -1975,7 +1999,7 @@ const Ca = {
1975
1999
  "diag.timezone": "Tidszon",
1976
2000
  "diag.viewport": "Viewport",
1977
2001
  "diag.user": "Användare"
1978
- }, ao = {
2002
+ }, io = {
1979
2003
  "launcher.open": "Mag-iwan ng tala...",
1980
2004
  "tool.crop": "Pag-ani",
1981
2005
  "tool.resetCrop": "I-reset ang panani",
@@ -2032,7 +2056,7 @@ const Ca = {
2032
2056
  "diag.timezone": "Timesone",
2033
2057
  "diag.viewport": "Viewport",
2034
2058
  "diag.user": "Gumagamit"
2035
- }, oo = {
2059
+ }, so = {
2036
2060
  "launcher.open": "ทิ้งหมายเหตุ...",
2037
2061
  "tool.crop": "พืชผล",
2038
2062
  "tool.resetCrop": "รีเซ็ตการตัดพืช",
@@ -2089,7 +2113,7 @@ const Ca = {
2089
2113
  "diag.timezone": "เขตเวลา",
2090
2114
  "diag.viewport": "พอร์ตมุมมอง",
2091
2115
  "diag.user": "ผู้ใช้"
2092
- }, io = {
2116
+ }, ro = {
2093
2117
  "launcher.open": "Bir not bırakın...",
2094
2118
  "tool.crop": "Mahsul",
2095
2119
  "tool.resetCrop": "Kırpmayı sıfırla",
@@ -2146,7 +2170,7 @@ const Ca = {
2146
2170
  "diag.timezone": "Saat dilimi",
2147
2171
  "diag.viewport": "Görünüm noktası",
2148
2172
  "diag.user": "Kullanıcı"
2149
- }, so = {
2173
+ }, no = {
2150
2174
  "launcher.open": "Залиште записку...",
2151
2175
  "tool.crop": "Урожай",
2152
2176
  "tool.resetCrop": "Скинути обрізку",
@@ -2203,7 +2227,7 @@ const Ca = {
2203
2227
  "diag.timezone": "Часовий пояс",
2204
2228
  "diag.viewport": "Вигляд",
2205
2229
  "diag.user": "Користувач"
2206
- }, ro = {
2230
+ }, lo = {
2207
2231
  "launcher.open": "Để lại một ghi chú...",
2208
2232
  "tool.crop": "Cây trồng",
2209
2233
  "tool.resetCrop": "Đặt lại cây trồng",
@@ -2260,7 +2284,7 @@ const Ca = {
2260
2284
  "diag.timezone": "Múi giờ",
2261
2285
  "diag.viewport": "Cổng quan sát",
2262
2286
  "diag.user": "Người dùng"
2263
- }, no = {
2287
+ }, uo = {
2264
2288
  "launcher.open": "留个笔记...",
2265
2289
  "tool.crop": "作物",
2266
2290
  "tool.resetCrop": "重置裁剪",
@@ -2317,7 +2341,7 @@ const Ca = {
2317
2341
  "diag.timezone": "时区",
2318
2342
  "diag.viewport": "视口",
2319
2343
  "diag.user": "用户"
2320
- }, lo = {
2344
+ }, co = {
2321
2345
  "launcher.open": "留下筆記...",
2322
2346
  "tool.crop": "作物",
2323
2347
  "tool.resetCrop": "重設裁切",
@@ -2375,47 +2399,47 @@ const Ca = {
2375
2399
  "diag.viewport": "視埠",
2376
2400
  "diag.user": "使用者"
2377
2401
  };
2378
- h("en-US", he);
2379
- h("bg", Ca);
2380
- h("ca", za);
2381
- h("cs", Ea);
2382
- h("da", ja);
2383
- h("de", Ra);
2384
- h("el", Pa);
2385
- h("en-GB", xa);
2386
- h("es", La);
2387
- h("es-419", Ua);
2388
- h("et", Ta);
2389
- h("fi", Fa);
2390
- h("fr", Oa);
2391
- h("hi", Da);
2392
- h("hr", Ma);
2393
- h("hu", Ia);
2394
- h("id", Va);
2395
- h("it", $a);
2396
- h("ja", Ba);
2397
- h("ko", Na);
2398
- h("lt", Ka);
2399
- h("lv", Ha);
2400
- h("nb", Ga);
2401
- h("nl", qa);
2402
- h("pl", _a);
2403
- h("pt-BR", Wa);
2404
- h("pt-PT", Za);
2405
- h("ro", Ja);
2406
- h("ru", Ya);
2407
- h("sk", Xa);
2408
- h("sl", Qa);
2409
- h("sr", eo);
2410
- h("sv", to);
2411
- h("fil", ao);
2412
- h("th", oo);
2413
- h("tr", io);
2414
- h("uk", so);
2415
- h("vi", ro);
2416
- h("zh-CN", no);
2417
- h("zh-TW", lo);
2418
- function uo(e, t) {
2402
+ f("en-US", ve);
2403
+ f("bg", Ea);
2404
+ f("ca", ja);
2405
+ f("cs", Ra);
2406
+ f("da", Pa);
2407
+ f("de", xa);
2408
+ f("el", La);
2409
+ f("en-GB", Ua);
2410
+ f("es", Ta);
2411
+ f("es-419", Fa);
2412
+ f("et", Da);
2413
+ f("fi", Oa);
2414
+ f("fr", Ma);
2415
+ f("hi", Ia);
2416
+ f("hr", Va);
2417
+ f("hu", $a);
2418
+ f("id", Ba);
2419
+ f("it", Na);
2420
+ f("ja", Ka);
2421
+ f("ko", Ha);
2422
+ f("lt", Ga);
2423
+ f("lv", qa);
2424
+ f("nb", _a);
2425
+ f("nl", Wa);
2426
+ f("pl", Za);
2427
+ f("pt-BR", Ja);
2428
+ f("pt-PT", Ya);
2429
+ f("ro", Xa);
2430
+ f("ru", Qa);
2431
+ f("sk", eo);
2432
+ f("sl", to);
2433
+ f("sr", ao);
2434
+ f("sv", oo);
2435
+ f("fil", io);
2436
+ f("th", so);
2437
+ f("tr", ro);
2438
+ f("uk", no);
2439
+ f("vi", lo);
2440
+ f("zh-CN", uo);
2441
+ f("zh-TW", co);
2442
+ function po(e, t) {
2419
2443
  if (e.match(/^[a-z]+:\/\//i))
2420
2444
  return e;
2421
2445
  if (e.match(/^\/\//))
@@ -2425,7 +2449,7 @@ function uo(e, t) {
2425
2449
  const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), s = a.createElement("a");
2426
2450
  return a.head.appendChild(o), a.body.appendChild(s), t && (o.href = t), s.href = e, s.href;
2427
2451
  }
2428
- const co = /* @__PURE__ */ (() => {
2452
+ const go = /* @__PURE__ */ (() => {
2429
2453
  let e = 0;
2430
2454
  const t = () => (
2431
2455
  // eslint-disable-next-line no-bitwise
@@ -2433,33 +2457,33 @@ const co = /* @__PURE__ */ (() => {
2433
2457
  );
2434
2458
  return () => (e += 1, `u${t()}${e}`);
2435
2459
  })();
2436
- function W(e) {
2460
+ function J(e) {
2437
2461
  const t = [];
2438
2462
  for (let a = 0, o = e.length; a < o; a++)
2439
2463
  t.push(e[a]);
2440
2464
  return t;
2441
2465
  }
2442
- let te = null;
2443
- function Pt(e = {}) {
2444
- return te || (e.includeStyleProperties ? (te = e.includeStyleProperties, te) : (te = W(window.getComputedStyle(document.documentElement)), te));
2466
+ let ae = null;
2467
+ function xt(e = {}) {
2468
+ return ae || (e.includeStyleProperties ? (ae = e.includeStyleProperties, ae) : (ae = J(window.getComputedStyle(document.documentElement)), ae));
2445
2469
  }
2446
- function ve(e, t) {
2470
+ function we(e, t) {
2447
2471
  const o = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
2448
2472
  return o ? parseFloat(o.replace("px", "")) : 0;
2449
2473
  }
2450
- function po(e) {
2451
- const t = ve(e, "border-left-width"), a = ve(e, "border-right-width");
2474
+ function mo(e) {
2475
+ const t = we(e, "border-left-width"), a = we(e, "border-right-width");
2452
2476
  return e.clientWidth + t + a;
2453
2477
  }
2454
- function go(e) {
2455
- const t = ve(e, "border-top-width"), a = ve(e, "border-bottom-width");
2478
+ function ho(e) {
2479
+ const t = we(e, "border-top-width"), a = we(e, "border-bottom-width");
2456
2480
  return e.clientHeight + t + a;
2457
2481
  }
2458
- function xt(e, t = {}) {
2459
- const a = t.width || po(e), o = t.height || go(e);
2482
+ function Lt(e, t = {}) {
2483
+ const a = t.width || mo(e), o = t.height || ho(e);
2460
2484
  return { width: a, height: o };
2461
2485
  }
2462
- function mo() {
2486
+ function fo() {
2463
2487
  let e, t;
2464
2488
  try {
2465
2489
  t = process;
@@ -2469,10 +2493,10 @@ function mo() {
2469
2493
  return a && (e = parseInt(a, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
2470
2494
  }
2471
2495
  const U = 16384;
2472
- function ho(e) {
2496
+ function yo(e) {
2473
2497
  (e.width > U || e.height > U) && (e.width > U && e.height > U ? e.width > e.height ? (e.height *= U / e.width, e.width = U) : (e.width *= U / e.height, e.height = U) : e.width > U ? (e.height *= U / e.width, e.width = U) : (e.width *= U / e.height, e.height = U));
2474
2498
  }
2475
- function ke(e) {
2499
+ function Se(e) {
2476
2500
  return new Promise((t, a) => {
2477
2501
  const o = new Image();
2478
2502
  o.onload = () => {
@@ -2482,12 +2506,12 @@ function ke(e) {
2482
2506
  }, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = e;
2483
2507
  });
2484
2508
  }
2485
- async function fo(e) {
2509
+ async function vo(e) {
2486
2510
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((t) => `data:image/svg+xml;charset=utf-8,${t}`);
2487
2511
  }
2488
- async function yo(e, t, a) {
2512
+ async function ko(e, t, a) {
2489
2513
  const o = "http://www.w3.org/2000/svg", s = document.createElementNS(o, "svg"), i = document.createElementNS(o, "foreignObject");
2490
- return s.setAttribute("width", `${t}`), s.setAttribute("height", `${a}`), s.setAttribute("viewBox", `0 0 ${t} ${a}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), s.appendChild(i), i.appendChild(e), fo(s);
2514
+ return s.setAttribute("width", `${t}`), s.setAttribute("height", `${a}`), s.setAttribute("viewBox", `0 0 ${t} ${a}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), s.appendChild(i), i.appendChild(e), vo(s);
2491
2515
  }
2492
2516
  const L = (e, t) => {
2493
2517
  if (e instanceof t)
@@ -2495,67 +2519,67 @@ const L = (e, t) => {
2495
2519
  const a = Object.getPrototypeOf(e);
2496
2520
  return a === null ? !1 : a.constructor.name === t.name || L(a, t);
2497
2521
  };
2498
- function vo(e) {
2522
+ function bo(e) {
2499
2523
  const t = e.getPropertyValue("content");
2500
2524
  return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
2501
2525
  }
2502
- function ko(e, t) {
2503
- return Pt(t).map((a) => {
2526
+ function wo(e, t) {
2527
+ return xt(t).map((a) => {
2504
2528
  const o = e.getPropertyValue(a), s = e.getPropertyPriority(a);
2505
2529
  return `${a}: ${o}${s ? " !important" : ""};`;
2506
2530
  }).join(" ");
2507
2531
  }
2508
- function bo(e, t, a, o) {
2509
- const s = `.${e}:${t}`, i = a.cssText ? vo(a) : ko(a, o);
2532
+ function So(e, t, a, o) {
2533
+ const s = `.${e}:${t}`, i = a.cssText ? bo(a) : wo(a, o);
2510
2534
  return document.createTextNode(`${s}{${i}}`);
2511
2535
  }
2512
- function ot(e, t, a, o) {
2536
+ function it(e, t, a, o) {
2513
2537
  const s = window.getComputedStyle(e, a), i = s.getPropertyValue("content");
2514
2538
  if (i === "" || i === "none")
2515
2539
  return;
2516
- const r = co();
2540
+ const r = go();
2517
2541
  try {
2518
2542
  t.className = `${t.className} ${r}`;
2519
2543
  } catch {
2520
2544
  return;
2521
2545
  }
2522
2546
  const l = document.createElement("style");
2523
- l.appendChild(bo(r, a, s, o)), t.appendChild(l);
2547
+ l.appendChild(So(r, a, s, o)), t.appendChild(l);
2524
2548
  }
2525
- function wo(e, t, a) {
2526
- ot(e, t, ":before", a), ot(e, t, ":after", a);
2549
+ function Ao(e, t, a) {
2550
+ it(e, t, ":before", a), it(e, t, ":after", a);
2527
2551
  }
2528
- const it = "application/font-woff", st = "image/jpeg", So = {
2529
- woff: it,
2530
- woff2: it,
2552
+ const st = "application/font-woff", rt = "image/jpeg", Co = {
2553
+ woff: st,
2554
+ woff2: st,
2531
2555
  ttf: "application/font-truetype",
2532
2556
  eot: "application/vnd.ms-fontobject",
2533
2557
  png: "image/png",
2534
- jpg: st,
2535
- jpeg: st,
2558
+ jpg: rt,
2559
+ jpeg: rt,
2536
2560
  gif: "image/gif",
2537
2561
  tiff: "image/tiff",
2538
2562
  svg: "image/svg+xml",
2539
2563
  webp: "image/webp"
2540
2564
  };
2541
- function Ao(e) {
2565
+ function zo(e) {
2542
2566
  const t = /\.([^./]*?)$/g.exec(e);
2543
2567
  return t ? t[1] : "";
2544
2568
  }
2545
2569
  function _e(e) {
2546
- const t = Ao(e).toLowerCase();
2547
- return So[t] || "";
2570
+ const t = zo(e).toLowerCase();
2571
+ return Co[t] || "";
2548
2572
  }
2549
- function Co(e) {
2573
+ function Eo(e) {
2550
2574
  return e.split(/,/)[1];
2551
2575
  }
2552
2576
  function Be(e) {
2553
2577
  return e.search(/^(data:)/) !== -1;
2554
2578
  }
2555
- function zo(e, t) {
2579
+ function jo(e, t) {
2556
2580
  return `data:${t};base64,${e}`;
2557
2581
  }
2558
- async function Lt(e, t, a) {
2582
+ async function Ut(e, t, a) {
2559
2583
  const o = await fetch(e, t);
2560
2584
  if (o.status === 404)
2561
2585
  throw new Error(`Resource "${o.url}" not found`);
@@ -2572,19 +2596,19 @@ async function Lt(e, t, a) {
2572
2596
  });
2573
2597
  }
2574
2598
  const Oe = {};
2575
- function Eo(e, t, a) {
2599
+ function Ro(e, t, a) {
2576
2600
  let o = e.replace(/\?.*/, "");
2577
2601
  return a && (o = e), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), t ? `[${t}]${o}` : o;
2578
2602
  }
2579
2603
  async function We(e, t, a) {
2580
- const o = Eo(e, t, a.includeQueryParams);
2604
+ const o = Ro(e, t, a.includeQueryParams);
2581
2605
  if (Oe[o] != null)
2582
2606
  return Oe[o];
2583
2607
  a.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
2584
2608
  let s;
2585
2609
  try {
2586
- const i = await Lt(e, a.fetchRequestInit, ({ res: r, result: l }) => (t || (t = r.headers.get("Content-Type") || ""), Co(l)));
2587
- s = zo(i, t);
2610
+ const i = await Ut(e, a.fetchRequestInit, ({ res: r, result: l }) => (t || (t = r.headers.get("Content-Type") || ""), Eo(l)));
2611
+ s = jo(i, t);
2588
2612
  } catch (i) {
2589
2613
  s = a.imagePlaceholder || "";
2590
2614
  let r = `Failed to fetch resource: ${e}`;
@@ -2592,65 +2616,65 @@ async function We(e, t, a) {
2592
2616
  }
2593
2617
  return Oe[o] = s, s;
2594
2618
  }
2595
- async function jo(e) {
2619
+ async function Po(e) {
2596
2620
  const t = e.toDataURL();
2597
- return t === "data:," ? e.cloneNode(!1) : ke(t);
2621
+ return t === "data:," ? e.cloneNode(!1) : Se(t);
2598
2622
  }
2599
- async function Ro(e, t) {
2623
+ async function xo(e, t) {
2600
2624
  if (e.currentSrc) {
2601
2625
  const i = document.createElement("canvas"), r = i.getContext("2d");
2602
2626
  i.width = e.clientWidth, i.height = e.clientHeight, r == null || r.drawImage(e, 0, 0, i.width, i.height);
2603
2627
  const l = i.toDataURL();
2604
- return ke(l);
2628
+ return Se(l);
2605
2629
  }
2606
2630
  const a = e.poster, o = _e(a), s = await We(a, o, t);
2607
- return ke(s);
2631
+ return Se(s);
2608
2632
  }
2609
- async function Po(e, t) {
2633
+ async function Lo(e, t) {
2610
2634
  var a;
2611
2635
  try {
2612
2636
  if (!((a = e == null ? void 0 : e.contentDocument) === null || a === void 0) && a.body)
2613
- return await je(e.contentDocument.body, t, !0);
2637
+ return await xe(e.contentDocument.body, t, !0);
2614
2638
  } catch {
2615
2639
  }
2616
2640
  return e.cloneNode(!1);
2617
2641
  }
2618
- async function xo(e, t) {
2619
- return L(e, HTMLCanvasElement) ? jo(e) : L(e, HTMLVideoElement) ? Ro(e, t) : L(e, HTMLIFrameElement) ? Po(e, t) : e.cloneNode(Ut(e));
2642
+ async function Uo(e, t) {
2643
+ return L(e, HTMLCanvasElement) ? Po(e) : L(e, HTMLVideoElement) ? xo(e, t) : L(e, HTMLIFrameElement) ? Lo(e, t) : e.cloneNode(Tt(e));
2620
2644
  }
2621
- const Lo = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Ut = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
2622
- async function Uo(e, t, a) {
2645
+ const To = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Tt = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
2646
+ async function Fo(e, t, a) {
2623
2647
  var o, s;
2624
- if (Ut(t))
2648
+ if (Tt(t))
2625
2649
  return t;
2626
2650
  let i = [];
2627
- return Lo(e) && e.assignedNodes ? i = W(e.assignedNodes()) : L(e, HTMLIFrameElement) && (!((o = e.contentDocument) === null || o === void 0) && o.body) ? i = W(e.contentDocument.body.childNodes) : i = W(((s = e.shadowRoot) !== null && s !== void 0 ? s : e).childNodes), i.length === 0 || L(e, HTMLVideoElement) || await i.reduce((r, l) => r.then(() => je(l, a)).then((u) => {
2651
+ return To(e) && e.assignedNodes ? i = J(e.assignedNodes()) : L(e, HTMLIFrameElement) && (!((o = e.contentDocument) === null || o === void 0) && o.body) ? i = J(e.contentDocument.body.childNodes) : i = J(((s = e.shadowRoot) !== null && s !== void 0 ? s : e).childNodes), i.length === 0 || L(e, HTMLVideoElement) || await i.reduce((r, l) => r.then(() => xe(l, a)).then((u) => {
2628
2652
  u && t.appendChild(u);
2629
2653
  }), Promise.resolve()), t;
2630
2654
  }
2631
- function To(e, t, a) {
2655
+ function Do(e, t, a) {
2632
2656
  const o = t.style;
2633
2657
  if (!o)
2634
2658
  return;
2635
2659
  const s = window.getComputedStyle(e);
2636
- s.cssText ? (o.cssText = s.cssText, o.transformOrigin = s.transformOrigin) : Pt(a).forEach((i) => {
2660
+ s.cssText ? (o.cssText = s.cssText, o.transformOrigin = s.transformOrigin) : xt(a).forEach((i) => {
2637
2661
  let r = s.getPropertyValue(i);
2638
2662
  i === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), L(e, HTMLIFrameElement) && i === "display" && r === "inline" && (r = "block"), i === "d" && t.getAttribute("d") && (r = `path(${t.getAttribute("d")})`), o.setProperty(i, r, s.getPropertyPriority(i));
2639
2663
  });
2640
2664
  }
2641
- function Fo(e, t) {
2665
+ function Oo(e, t) {
2642
2666
  L(e, HTMLTextAreaElement) && (t.innerHTML = e.value), L(e, HTMLInputElement) && t.setAttribute("value", e.value);
2643
2667
  }
2644
- function Oo(e, t) {
2668
+ function Mo(e, t) {
2645
2669
  if (L(e, HTMLSelectElement)) {
2646
2670
  const o = Array.from(t.children).find((s) => e.value === s.getAttribute("value"));
2647
2671
  o && o.setAttribute("selected", "");
2648
2672
  }
2649
2673
  }
2650
- function Do(e, t, a) {
2651
- return L(t, Element) && (To(e, t, a), wo(e, t, a), Fo(e, t), Oo(e, t)), t;
2674
+ function Io(e, t, a) {
2675
+ return L(t, Element) && (Do(e, t, a), Ao(e, t, a), Oo(e, t), Mo(e, t)), t;
2652
2676
  }
2653
- async function Mo(e, t) {
2677
+ async function Vo(e, t) {
2654
2678
  const a = e.querySelectorAll ? e.querySelectorAll("use") : [];
2655
2679
  if (a.length === 0)
2656
2680
  return e;
@@ -2659,7 +2683,7 @@ async function Mo(e, t) {
2659
2683
  const l = a[i].getAttribute("xlink:href");
2660
2684
  if (l) {
2661
2685
  const u = e.querySelector(l), c = document.querySelector(l);
2662
- !u && c && !o[l] && (o[l] = await je(c, t, !0));
2686
+ !u && c && !o[l] && (o[l] = await xe(c, t, !0));
2663
2687
  }
2664
2688
  }
2665
2689
  const s = Object.values(o);
@@ -2674,31 +2698,31 @@ async function Mo(e, t) {
2674
2698
  }
2675
2699
  return e;
2676
2700
  }
2677
- async function je(e, t, a) {
2678
- return !a && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((o) => xo(o, t)).then((o) => Uo(e, o, t)).then((o) => Do(e, o, t)).then((o) => Mo(o, t));
2701
+ async function xe(e, t, a) {
2702
+ return !a && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((o) => Uo(o, t)).then((o) => Fo(e, o, t)).then((o) => Io(e, o, t)).then((o) => Vo(o, t));
2679
2703
  }
2680
- const Tt = /url\((['"]?)([^'"]+?)\1\)/g, Io = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Vo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2681
- function $o(e) {
2704
+ const Ft = /url\((['"]?)([^'"]+?)\1\)/g, $o = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Bo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2705
+ function No(e) {
2682
2706
  const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
2683
2707
  return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
2684
2708
  }
2685
- function Bo(e) {
2709
+ function Ko(e) {
2686
2710
  const t = [];
2687
- return e.replace(Tt, (a, o, s) => (t.push(s), a)), t.filter((a) => !Be(a));
2711
+ return e.replace(Ft, (a, o, s) => (t.push(s), a)), t.filter((a) => !Be(a));
2688
2712
  }
2689
- async function No(e, t, a, o, s) {
2713
+ async function Ho(e, t, a, o, s) {
2690
2714
  try {
2691
- const i = a ? uo(t, a) : t, r = _e(t);
2715
+ const i = a ? po(t, a) : t, r = _e(t);
2692
2716
  let l;
2693
- return s || (l = await We(i, r, o)), e.replace($o(t), `$1${l}$3`);
2717
+ return s || (l = await We(i, r, o)), e.replace(No(t), `$1${l}$3`);
2694
2718
  } catch {
2695
2719
  }
2696
2720
  return e;
2697
2721
  }
2698
- function Ko(e, { preferredFontFormat: t }) {
2699
- return t ? e.replace(Vo, (a) => {
2722
+ function Go(e, { preferredFontFormat: t }) {
2723
+ return t ? e.replace(Bo, (a) => {
2700
2724
  for (; ; ) {
2701
- const [o, , s] = Io.exec(a) || [];
2725
+ const [o, , s] = $o.exec(a) || [];
2702
2726
  if (!s)
2703
2727
  return "";
2704
2728
  if (s === t)
@@ -2706,16 +2730,16 @@ function Ko(e, { preferredFontFormat: t }) {
2706
2730
  }
2707
2731
  }) : e;
2708
2732
  }
2709
- function Ft(e) {
2710
- return e.search(Tt) !== -1;
2733
+ function Dt(e) {
2734
+ return e.search(Ft) !== -1;
2711
2735
  }
2712
2736
  async function Ot(e, t, a) {
2713
- if (!Ft(e))
2737
+ if (!Dt(e))
2714
2738
  return e;
2715
- const o = Ko(e, a);
2716
- return Bo(o).reduce((i, r) => i.then((l) => No(l, r, t, a)), Promise.resolve(o));
2739
+ const o = Go(e, a);
2740
+ return Ko(o).reduce((i, r) => i.then((l) => Ho(l, r, t, a)), Promise.resolve(o));
2717
2741
  }
2718
- async function ae(e, t, a) {
2742
+ async function oe(e, t, a) {
2719
2743
  var o;
2720
2744
  const s = (o = t.style) === null || o === void 0 ? void 0 : o.getPropertyValue(e);
2721
2745
  if (s) {
@@ -2724,10 +2748,10 @@ async function ae(e, t, a) {
2724
2748
  }
2725
2749
  return !1;
2726
2750
  }
2727
- async function Ho(e, t) {
2728
- await ae("background", e, t) || await ae("background-image", e, t), await ae("mask", e, t) || await ae("-webkit-mask", e, t) || await ae("mask-image", e, t) || await ae("-webkit-mask-image", e, t);
2751
+ async function qo(e, t) {
2752
+ await oe("background", e, t) || await oe("background-image", e, t), await oe("mask", e, t) || await oe("-webkit-mask", e, t) || await oe("mask-image", e, t) || await oe("-webkit-mask-image", e, t);
2729
2753
  }
2730
- async function Go(e, t) {
2754
+ async function _o(e, t) {
2731
2755
  const a = L(e, HTMLImageElement);
2732
2756
  if (!(a && !Be(e.src)) && !(L(e, SVGImageElement) && !Be(e.href.baseVal)))
2733
2757
  return;
@@ -2744,14 +2768,14 @@ async function Go(e, t) {
2744
2768
  l.decode && (l.decode = i), l.loading === "lazy" && (l.loading = "eager"), a ? (e.srcset = "", e.src = s) : e.href.baseVal = s;
2745
2769
  });
2746
2770
  }
2747
- async function qo(e, t) {
2748
- const o = W(e.childNodes).map((s) => Dt(s, t));
2771
+ async function Wo(e, t) {
2772
+ const o = J(e.childNodes).map((s) => Mt(s, t));
2749
2773
  await Promise.all(o).then(() => e);
2750
2774
  }
2751
- async function Dt(e, t) {
2752
- L(e, Element) && (await Ho(e, t), await Go(e, t), await qo(e, t));
2775
+ async function Mt(e, t) {
2776
+ L(e, Element) && (await qo(e, t), await _o(e, t), await Wo(e, t));
2753
2777
  }
2754
- function _o(e, t) {
2778
+ function Zo(e, t) {
2755
2779
  const { style: a } = e;
2756
2780
  t.backgroundColor && (a.backgroundColor = t.backgroundColor), t.width && (a.width = `${t.width}px`), t.height && (a.height = `${t.height}px`);
2757
2781
  const o = t.style;
@@ -2759,23 +2783,23 @@ function _o(e, t) {
2759
2783
  a[s] = o[s];
2760
2784
  }), e;
2761
2785
  }
2762
- const rt = {};
2763
- async function nt(e) {
2764
- let t = rt[e];
2786
+ const nt = {};
2787
+ async function lt(e) {
2788
+ let t = nt[e];
2765
2789
  if (t != null)
2766
2790
  return t;
2767
2791
  const o = await (await fetch(e)).text();
2768
- return t = { url: e, cssText: o }, rt[e] = t, t;
2792
+ return t = { url: e, cssText: o }, nt[e] = t, t;
2769
2793
  }
2770
- async function lt(e, t) {
2794
+ async function ut(e, t) {
2771
2795
  let a = e.cssText;
2772
2796
  const o = /url\(["']?([^"')]+)["']?\)/g, i = (a.match(/url\([^)]+\)/g) || []).map(async (r) => {
2773
2797
  let l = r.replace(o, "$1");
2774
- return l.startsWith("https://") || (l = new URL(l, e.url).href), Lt(l, t.fetchRequestInit, ({ result: u }) => (a = a.replace(r, `url(${u})`), [r, u]));
2798
+ return l.startsWith("https://") || (l = new URL(l, e.url).href), Ut(l, t.fetchRequestInit, ({ result: u }) => (a = a.replace(r, `url(${u})`), [r, u]));
2775
2799
  });
2776
2800
  return Promise.all(i).then(() => a);
2777
2801
  }
2778
- function ut(e) {
2802
+ function ct(e) {
2779
2803
  if (e == null)
2780
2804
  return [];
2781
2805
  const t = [], a = /(\/\*[\s\S]*?\*\/)/gi;
@@ -2801,15 +2825,15 @@ function ut(e) {
2801
2825
  }
2802
2826
  return t;
2803
2827
  }
2804
- async function Wo(e, t) {
2828
+ async function Jo(e, t) {
2805
2829
  const a = [], o = [];
2806
2830
  return e.forEach((s) => {
2807
2831
  if ("cssRules" in s)
2808
2832
  try {
2809
- W(s.cssRules || []).forEach((i, r) => {
2833
+ J(s.cssRules || []).forEach((i, r) => {
2810
2834
  if (i.type === CSSRule.IMPORT_RULE) {
2811
2835
  let l = r + 1;
2812
- const u = i.href, c = nt(u).then((g) => lt(g, t)).then((g) => ut(g).forEach((v) => {
2836
+ const u = i.href, c = lt(u).then((g) => ut(g, t)).then((g) => ct(g).forEach((v) => {
2813
2837
  try {
2814
2838
  s.insertRule(v, v.startsWith("@import") ? l += 1 : s.cssRules.length);
2815
2839
  } catch (k) {
@@ -2826,7 +2850,7 @@ async function Wo(e, t) {
2826
2850
  });
2827
2851
  } catch (i) {
2828
2852
  const r = e.find((l) => l.href == null) || document.styleSheets[0];
2829
- s.href != null && o.push(nt(s.href).then((l) => lt(l, t)).then((l) => ut(l).forEach((u) => {
2853
+ s.href != null && o.push(lt(s.href).then((l) => ut(l, t)).then((l) => ct(l).forEach((u) => {
2830
2854
  r.insertRule(u, r.cssRules.length);
2831
2855
  })).catch((l) => {
2832
2856
  console.error("Error loading remote stylesheet", l);
@@ -2835,7 +2859,7 @@ async function Wo(e, t) {
2835
2859
  }), Promise.all(o).then(() => (e.forEach((s) => {
2836
2860
  if ("cssRules" in s)
2837
2861
  try {
2838
- W(s.cssRules || []).forEach((i) => {
2862
+ J(s.cssRules || []).forEach((i) => {
2839
2863
  a.push(i);
2840
2864
  });
2841
2865
  } catch (i) {
@@ -2843,60 +2867,60 @@ async function Wo(e, t) {
2843
2867
  }
2844
2868
  }), a));
2845
2869
  }
2846
- function Zo(e) {
2847
- return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => Ft(t.style.getPropertyValue("src")));
2870
+ function Yo(e) {
2871
+ return e.filter((t) => t.type === CSSRule.FONT_FACE_RULE).filter((t) => Dt(t.style.getPropertyValue("src")));
2848
2872
  }
2849
- async function Jo(e, t) {
2873
+ async function Xo(e, t) {
2850
2874
  if (e.ownerDocument == null)
2851
2875
  throw new Error("Provided element is not within a Document");
2852
- const a = W(e.ownerDocument.styleSheets), o = await Wo(a, t);
2853
- return Zo(o);
2876
+ const a = J(e.ownerDocument.styleSheets), o = await Jo(a, t);
2877
+ return Yo(o);
2854
2878
  }
2855
- function Mt(e) {
2879
+ function It(e) {
2856
2880
  return e.trim().replace(/["']/g, "");
2857
2881
  }
2858
- function Yo(e) {
2882
+ function Qo(e) {
2859
2883
  const t = /* @__PURE__ */ new Set();
2860
2884
  function a(o) {
2861
2885
  (o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((i) => {
2862
- t.add(Mt(i));
2886
+ t.add(It(i));
2863
2887
  }), Array.from(o.children).forEach((i) => {
2864
2888
  i instanceof HTMLElement && a(i);
2865
2889
  });
2866
2890
  }
2867
2891
  return a(e), t;
2868
2892
  }
2869
- async function Xo(e, t) {
2870
- const a = await Jo(e, t), o = Yo(e);
2871
- return (await Promise.all(a.filter((i) => o.has(Mt(i.style.fontFamily))).map((i) => {
2893
+ async function ei(e, t) {
2894
+ const a = await Xo(e, t), o = Qo(e);
2895
+ return (await Promise.all(a.filter((i) => o.has(It(i.style.fontFamily))).map((i) => {
2872
2896
  const r = i.parentStyleSheet ? i.parentStyleSheet.href : null;
2873
2897
  return Ot(i.cssText, r, t);
2874
2898
  }))).join(`
2875
2899
  `);
2876
2900
  }
2877
- async function Qo(e, t) {
2878
- const a = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await Xo(e, t);
2901
+ async function ti(e, t) {
2902
+ const a = t.fontEmbedCSS != null ? t.fontEmbedCSS : t.skipFonts ? null : await ei(e, t);
2879
2903
  if (a) {
2880
2904
  const o = document.createElement("style"), s = document.createTextNode(a);
2881
2905
  o.appendChild(s), e.firstChild ? e.insertBefore(o, e.firstChild) : e.appendChild(o);
2882
2906
  }
2883
2907
  }
2884
- async function ei(e, t = {}) {
2885
- const { width: a, height: o } = xt(e, t), s = await je(e, t, !0);
2886
- return await Qo(s, t), await Dt(s, t), _o(s, t), await yo(s, a, o);
2908
+ async function ai(e, t = {}) {
2909
+ const { width: a, height: o } = Lt(e, t), s = await xe(e, t, !0);
2910
+ return await ti(s, t), await Mt(s, t), Zo(s, t), await ko(s, a, o);
2887
2911
  }
2888
- async function ti(e, t = {}) {
2889
- const { width: a, height: o } = xt(e, t), s = await ei(e, t), i = await ke(s), r = document.createElement("canvas"), l = r.getContext("2d"), u = t.pixelRatio || mo(), c = t.canvasWidth || a, g = t.canvasHeight || o;
2890
- return r.width = c * u, r.height = g * u, t.skipAutoScale || ho(r), r.style.width = `${c}`, r.style.height = `${g}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, r.width, r.height)), l.drawImage(i, 0, 0, r.width, r.height), r;
2912
+ async function oi(e, t = {}) {
2913
+ const { width: a, height: o } = Lt(e, t), s = await ai(e, t), i = await Se(s), r = document.createElement("canvas"), l = r.getContext("2d"), u = t.pixelRatio || fo(), c = t.canvasWidth || a, g = t.canvasHeight || o;
2914
+ return r.width = c * u, r.height = g * u, t.skipAutoScale || yo(r), r.style.width = `${c}`, r.style.height = `${g}`, t.backgroundColor && (l.fillStyle = t.backgroundColor, l.fillRect(0, 0, r.width, r.height)), l.drawImage(i, 0, 0, r.width, r.height), r;
2891
2915
  }
2892
- async function ct(e, t = {}) {
2893
- return (await ti(e, t)).toDataURL();
2916
+ async function dt(e, t = {}) {
2917
+ return (await oi(e, t)).toDataURL();
2894
2918
  }
2895
- const be = "data-nf-capture-chrome", ai = "data-nf-canvas-snap", oi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2896
- function It(e) {
2897
- return e instanceof Element && (e.hasAttribute(be) || e.hasAttribute("data-nf-mask-cover") || e.id === "notefully");
2919
+ const Ae = "data-nf-capture-chrome", ii = "data-nf-canvas-snap", si = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2920
+ function Vt(e) {
2921
+ return e instanceof Element && (e.hasAttribute(Ae) || e.hasAttribute("data-nf-mask-cover") || e.id === "notefully");
2898
2922
  }
2899
- function ii() {
2923
+ function ri() {
2900
2924
  const e = [];
2901
2925
  return Array.from(document.styleSheets).forEach((t) => {
2902
2926
  try {
@@ -2920,7 +2944,7 @@ function ii() {
2920
2944
  });
2921
2945
  };
2922
2946
  }
2923
- function si() {
2947
+ function ni() {
2924
2948
  const e = [];
2925
2949
  return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
2926
2950
  const o = a.getBoundingClientRect(), s = document.createElement("div");
@@ -2936,28 +2960,28 @@ function si() {
2936
2960
  ].join(";"), document.body.appendChild(s), e.push(s);
2937
2961
  }), () => e.forEach((a) => a.remove());
2938
2962
  }
2939
- function ri() {
2940
- const e = document.querySelector(`[${be}]`);
2963
+ function li() {
2964
+ const e = document.querySelector(`[${Ae}]`);
2941
2965
  if (e)
2942
2966
  return e;
2943
2967
  const t = document.createElement("div");
2944
- return t.setAttribute(be, "1"), t.className = "nf-capture-chrome", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.innerHTML = `<span class="nf-capture-chrome-pill">${p("status.capturing")}</span>`, document.body.appendChild(t), t;
2968
+ return t.setAttribute(Ae, "1"), t.className = "nf-capture-chrome", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.innerHTML = `<span class="nf-capture-chrome-pill">${p("status.capturing")}</span>`, document.body.appendChild(t), t;
2945
2969
  }
2946
- function ni() {
2947
- document.querySelectorAll(`[${be}]`).forEach((e) => e.remove());
2970
+ function ui() {
2971
+ document.querySelectorAll(`[${Ae}]`).forEach((e) => e.remove());
2948
2972
  }
2949
2973
  function Ne() {
2950
2974
  return new Promise((e) => {
2951
2975
  requestAnimationFrame(() => requestAnimationFrame(e));
2952
2976
  });
2953
2977
  }
2954
- function Z(e) {
2978
+ function Y(e) {
2955
2979
  if (typeof e != "string" || !e.startsWith("data:image/"))
2956
2980
  return !1;
2957
2981
  const t = e.indexOf(",");
2958
2982
  return t > 0 && t < e.length - 1;
2959
2983
  }
2960
- function li() {
2984
+ function ci() {
2961
2985
  const e = document.documentElement, t = document.body, a = Math.max(
2962
2986
  window.innerWidth || 0,
2963
2987
  (e == null ? void 0 : e.clientWidth) || 0,
@@ -2973,10 +2997,10 @@ function li() {
2973
2997
  );
2974
2998
  return { width: a, height: o };
2975
2999
  }
2976
- async function ui() {
3000
+ async function di() {
2977
3001
  const e = [], t = Array.from(document.querySelectorAll("canvas"));
2978
3002
  for (const a of t) {
2979
- if (a.closest("#notefully") || It(a))
3003
+ if (a.closest("#notefully") || Vt(a))
2980
3004
  continue;
2981
3005
  let o = "";
2982
3006
  try {
@@ -2987,7 +3011,7 @@ async function ui() {
2987
3011
  if (!o || o === "data:,")
2988
3012
  continue;
2989
3013
  const s = document.createElement("img"), i = getComputedStyle(a);
2990
- s.setAttribute(ai, "1"), s.alt = "", s.src = o, s.className = a.className, s.style.cssText = a.style.cssText, s.style.width = i.width, s.style.height = i.height, s.style.maxWidth = i.maxWidth, s.style.maxHeight = i.maxHeight, s.style.objectFit = "fill", s.style.display = i.display === "inline" ? "inline-block" : i.display, a.replaceWith(s), e.push({ canvas: a, img: s });
3014
+ s.setAttribute(ii, "1"), s.alt = "", s.src = o, s.className = a.className, s.style.cssText = a.style.cssText, s.style.width = i.width, s.style.height = i.height, s.style.maxWidth = i.maxWidth, s.style.maxHeight = i.maxHeight, s.style.objectFit = "fill", s.style.display = i.display === "inline" ? "inline-block" : i.display, a.replaceWith(s), e.push({ canvas: a, img: s });
2991
3015
  }
2992
3016
  return await Promise.all(e.map(({ img: a }) => {
2993
3017
  if (!a.complete)
@@ -3003,25 +3027,25 @@ async function ui() {
3003
3027
  });
3004
3028
  };
3005
3029
  }
3006
- async function ci(e) {
3030
+ async function pi(e) {
3007
3031
  if (!e)
3008
3032
  return null;
3009
3033
  if (typeof e == "string")
3010
- return Z(e) ? e : null;
3034
+ return Y(e) ? e : null;
3011
3035
  if (typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement)
3012
3036
  try {
3013
3037
  const t = e.toDataURL("image/png");
3014
- return Z(t) ? t : null;
3038
+ return Y(t) ? t : null;
3015
3039
  } catch {
3016
3040
  return null;
3017
3041
  }
3018
3042
  if (typeof Blob < "u" && e instanceof Blob) {
3019
- const t = await di(e);
3020
- return Z(t) ? t : null;
3043
+ const t = await gi(e);
3044
+ return Y(t) ? t : null;
3021
3045
  }
3022
3046
  return null;
3023
3047
  }
3024
- async function di(e) {
3048
+ async function gi(e) {
3025
3049
  if (typeof FileReader == "function")
3026
3050
  return new Promise((o, s) => {
3027
3051
  const i = new FileReader();
@@ -3030,7 +3054,7 @@ async function di(e) {
3030
3054
  const t = Buffer.from(await e.arrayBuffer());
3031
3055
  return `data:${e.type || "application/octet-stream"};base64,${t.toString("base64")}`;
3032
3056
  }
3033
- async function pi() {
3057
+ async function mi() {
3034
3058
  var t;
3035
3059
  if (!((t = navigator.mediaDevices) != null && t.getDisplayMedia))
3036
3060
  throw new Error(p("status.screenUnsupported"));
@@ -3048,44 +3072,44 @@ async function pi() {
3048
3072
  const o = a.videoWidth || 1, s = a.videoHeight || 1, i = document.createElement("canvas");
3049
3073
  i.width = o, i.height = s, i.getContext("2d").drawImage(a, 0, 0, o, s);
3050
3074
  const r = i.toDataURL("image/png");
3051
- if (!Z(r))
3075
+ if (!Y(r))
3052
3076
  throw new Error(p("status.screenEmpty"));
3053
3077
  return r;
3054
3078
  } finally {
3055
3079
  e.getTracks().forEach((a) => a.stop());
3056
3080
  }
3057
3081
  }
3058
- async function Vt(e = {}) {
3059
- const t = document.getElementById("notefully"), a = t ? t.style.display : "", o = ri(), s = ii();
3082
+ async function $t(e = {}) {
3083
+ const t = document.getElementById("notefully"), a = t ? t.style.display : "", o = li(), s = ri();
3060
3084
  let i = () => {
3061
3085
  };
3062
3086
  t && (t.style.display = "none");
3063
- const r = si();
3087
+ const r = ni();
3064
3088
  try {
3065
3089
  if (typeof e.onBeforeCapture == "function" && await e.onBeforeCapture(), await Ne(), typeof e.capture == "function") {
3066
- const v = await ci(await e.capture());
3090
+ const v = await pi(await e.capture());
3067
3091
  if (v)
3068
3092
  return v;
3069
3093
  }
3070
- i = await ui(), await Ne();
3071
- const { width: l, height: u } = li(), c = {
3094
+ i = await di(), await Ne();
3095
+ const { width: l, height: u } = ci(), c = {
3072
3096
  cacheBust: !0,
3073
3097
  width: l,
3074
3098
  height: u,
3075
3099
  pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
3076
- filter: (v) => !It(v),
3100
+ filter: (v) => !Vt(v),
3077
3101
  // 404 / CORS images must not abort the whole capture.
3078
- imagePlaceholder: oi,
3102
+ imagePlaceholder: si,
3079
3103
  onImageErrorHandler: () => {
3080
3104
  }
3081
3105
  };
3082
3106
  let g = "";
3083
3107
  try {
3084
- g = await ct(document.body, c);
3108
+ g = await dt(document.body, c);
3085
3109
  } catch {
3086
- g = await ct(document.body, { ...c, skipFonts: !0 });
3110
+ g = await dt(document.body, { ...c, skipFonts: !0 });
3087
3111
  }
3088
- if (!Z(g))
3112
+ if (!Y(g))
3089
3113
  throw new Error(p("status.captureEmpty"));
3090
3114
  return g;
3091
3115
  } finally {
@@ -3093,25 +3117,25 @@ async function Vt(e = {}) {
3093
3117
  i();
3094
3118
  } catch {
3095
3119
  }
3096
- r(), s(), o.remove(), ni(), t && (t.style.display = a);
3120
+ r(), s(), o.remove(), ui(), t && (t.style.display = a);
3097
3121
  }
3098
3122
  }
3099
- function gi(e = "") {
3123
+ function hi(e = "") {
3100
3124
  const t = String(e || "");
3101
3125
  return t ? /Windows NT/i.test(t) ? "Windows" : /iPhone|iPad|iPod/i.test(t) ? "iOS" : /Mac OS X|Macintosh/i.test(t) ? "macOS" : /Android/i.test(t) ? "Android" : /CrOS/i.test(t) ? "ChromeOS" : /Linux/i.test(t) ? "Linux" : "Other" : "";
3102
3126
  }
3103
- function mi(e = "") {
3127
+ function fi(e = "") {
3104
3128
  const t = String(e || "");
3105
3129
  return t ? /Edg\//i.test(t) ? "Edge" : /OPR\/|Opera/i.test(t) ? "Opera" : /Firefox\//i.test(t) ? "Firefox" : /Chrome\//i.test(t) || /CriOS\//i.test(t) ? "Chrome" : /Safari\//i.test(t) ? "Safari" : "Other" : "";
3106
3130
  }
3107
- function hi(e = {}) {
3131
+ function yi(e = {}) {
3108
3132
  const t = navigator.userAgent;
3109
3133
  return {
3110
3134
  url: location.href,
3111
3135
  title: document.title,
3112
3136
  userAgent: t,
3113
- os: gi(t),
3114
- browser: mi(t),
3137
+ os: hi(t),
3138
+ browser: fi(t),
3115
3139
  language: navigator.language,
3116
3140
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
3117
3141
  viewport: {
@@ -3131,11 +3155,11 @@ function hi(e = {}) {
3131
3155
  }
3132
3156
  };
3133
3157
  }
3134
- const dt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), pt = {
3158
+ const pt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), gt = {
3135
3159
  id: "userId",
3136
3160
  username: "displayName",
3137
3161
  name: "displayName"
3138
- }, gt = /* @__PURE__ */ new Set([
3162
+ }, mt = /* @__PURE__ */ new Set([
3139
3163
  "endpoint",
3140
3164
  "projectKey",
3141
3165
  "version",
@@ -3153,7 +3177,7 @@ const dt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), pt = {
3153
3177
  "displayLink",
3154
3178
  "locale",
3155
3179
  "translations"
3156
- ]), mt = {
3180
+ ]), ht = {
3157
3181
  slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
3158
3182
  projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
3159
3183
  project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
@@ -3162,14 +3186,14 @@ const dt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), pt = {
3162
3186
  email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
3163
3187
  displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
3164
3188
  };
3165
- function fi(e = {}, t = {}) {
3166
- const a = t.warn || $t, o = e && typeof e == "object" ? e : {}, s = {}, i = [];
3167
- for (const r of dt)
3189
+ function vi(e = {}, t = {}) {
3190
+ const a = t.warn || Bt, o = e && typeof e == "object" ? e : {}, s = {}, i = [];
3191
+ for (const r of pt)
3168
3192
  Object.prototype.hasOwnProperty.call(o, r) && (s[r] = o[r]);
3169
- for (const [r, l] of Object.entries(pt))
3193
+ for (const [r, l] of Object.entries(gt))
3170
3194
  Object.prototype.hasOwnProperty.call(o, r) && (Object.prototype.hasOwnProperty.call(s, l) || (s[l] = o[r]));
3171
3195
  for (const r of Object.keys(o))
3172
- dt.has(r) || Object.prototype.hasOwnProperty.call(pt, r) || i.push(r);
3196
+ pt.has(r) || Object.prototype.hasOwnProperty.call(gt, r) || i.push(r);
3173
3197
  if (i.length) {
3174
3198
  const r = i.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3175
3199
  a(
@@ -3178,24 +3202,24 @@ function fi(e = {}, t = {}) {
3178
3202
  }
3179
3203
  return s;
3180
3204
  }
3181
- function yi(e = {}, t = {}) {
3182
- const a = t.warn || $t, o = e && typeof e == "object" ? e : {}, s = Object.keys(o).filter((i) => !gt.has(i));
3205
+ function ki(e = {}, t = {}) {
3206
+ const a = t.warn || Bt, o = e && typeof e == "object" ? e : {}, s = Object.keys(o).filter((i) => !mt.has(i));
3183
3207
  if (s.length)
3184
3208
  for (const i of s) {
3185
- if (mt[i]) {
3186
- a(`Notefully.init: ignoring "${i}". ${mt[i]}`);
3209
+ if (ht[i]) {
3210
+ a(`Notefully.init: ignoring "${i}". ${ht[i]}`);
3187
3211
  continue;
3188
3212
  }
3189
3213
  a(
3190
- `Notefully.init: ignoring unknown key "${i}". Supported: ${[...gt].join(", ")}.`
3214
+ `Notefully.init: ignoring unknown key "${i}". Supported: ${[...mt].join(", ")}.`
3191
3215
  );
3192
3216
  }
3193
3217
  }
3194
- function $t(e) {
3218
+ function Bt(e) {
3195
3219
  typeof console < "u" && typeof console.warn == "function" && console.warn(e);
3196
3220
  }
3197
- const ht = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, vi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3198
- function ft(e) {
3221
+ const ft = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, bi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3222
+ function yt(e) {
3199
3223
  if (e instanceof Error)
3200
3224
  return e.stack || e.message || String(e);
3201
3225
  if (typeof e == "string")
@@ -3210,14 +3234,14 @@ function Ze(e) {
3210
3234
  if (!e || typeof e != "string")
3211
3235
  return "";
3212
3236
  let t = e.replace(/[\u0000-\u001F\u007F]/g, "").trim();
3213
- return t ? (ht.test(t) && (t = t.split(";").map((a) => a.trim()).filter((a) => a && !ht.test(a)).join("; "), t && !t.endsWith(";") && (t += ";")), t.slice(0, 500)) : "";
3237
+ return t ? (ft.test(t) && (t = t.split(";").map((a) => a.trim()).filter((a) => a && !ft.test(a)).join("; "), t && !t.endsWith(";") && (t += ";")), t.slice(0, 500)) : "";
3214
3238
  }
3215
- function ki(e = []) {
3239
+ function wi(e = []) {
3216
3240
  if (!e.length)
3217
3241
  return { text: "", segments: [{ text: "", style: null }] };
3218
3242
  const t = e[0];
3219
3243
  if (typeof t != "string" || !t.includes("%c")) {
3220
- const r = e.map(ft).join(" ");
3244
+ const r = e.map(yt).join(" ");
3221
3245
  return { text: r, segments: [{ text: r, style: null }] };
3222
3246
  }
3223
3247
  const a = t.split("%c"), o = [];
@@ -3232,7 +3256,7 @@ function ki(e = []) {
3232
3256
  o.push({ text: l, style: c });
3233
3257
  }
3234
3258
  if (s < e.length) {
3235
- const r = e.slice(s).map(ft).join(" ");
3259
+ const r = e.slice(s).map(yt).join(" ");
3236
3260
  r && o.push({
3237
3261
  text: (o.length ? " " : "") + r,
3238
3262
  style: null
@@ -3243,11 +3267,11 @@ function ki(e = []) {
3243
3267
  segments: o.length ? o : [{ text: "", style: null }]
3244
3268
  };
3245
3269
  }
3246
- function bi(e) {
3270
+ function Si(e) {
3247
3271
  const t = String(e ?? "");
3248
3272
  if (!t.includes("%c"))
3249
3273
  return [{ text: t, style: null }];
3250
- const a = t.split("%c"), o = a[a.length - 1], s = o.match(vi);
3274
+ const a = t.split("%c"), o = a[a.length - 1], s = o.match(bi);
3251
3275
  let i = "";
3252
3276
  if (s) {
3253
3277
  const u = s.index, c = /\s/.test(o[u]) ? u + 1 : u;
@@ -3267,32 +3291,32 @@ function bi(e) {
3267
3291
  }
3268
3292
  return l.length ? l : [{ text: t, style: null }];
3269
3293
  }
3270
- function Bt(e = {}) {
3294
+ function Nt(e = {}) {
3271
3295
  return Array.isArray(e.segments) && e.segments.length ? e.segments.map((t) => ({
3272
3296
  text: String((t == null ? void 0 : t.text) ?? ""),
3273
3297
  style: Ze(t == null ? void 0 : t.style) || null
3274
- })) : bi(e.text);
3298
+ })) : Si(e.text);
3275
3299
  }
3276
- function wi(e = {}) {
3277
- return Bt(e).map((a) => a.text).join("");
3300
+ function Ai(e = {}) {
3301
+ return Nt(e).map((a) => a.text).join("");
3278
3302
  }
3279
- function yt(e) {
3303
+ function vt(e) {
3280
3304
  return String(e ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3281
3305
  }
3282
- function Si(e = {}) {
3283
- return Bt(e).map((t) => {
3284
- const a = yt(t.text);
3285
- return t.style ? `<span class="nf-console-styled" style="${yt(t.style)}">${a}</span>` : a;
3306
+ function Ci(e = {}) {
3307
+ return Nt(e).map((t) => {
3308
+ const a = vt(t.text);
3309
+ return t.style ? `<span class="nf-console-styled" style="${vt(t.style)}">${a}</span>` : a;
3286
3310
  }).join("");
3287
3311
  }
3288
- const Ai = 80;
3289
- function Ci() {
3312
+ const zi = 80;
3313
+ function Ei() {
3290
3314
  const e = [], t = {};
3291
3315
  let a = !1;
3292
3316
  const o = (i, r) => {
3293
3317
  let l = "", u = null;
3294
3318
  try {
3295
- const g = ki(r);
3319
+ const g = wi(r);
3296
3320
  l = g.text, u = g.segments;
3297
3321
  } catch {
3298
3322
  l = String(r[0]), u = [{ text: l, style: null }];
@@ -3305,7 +3329,7 @@ function Ci() {
3305
3329
  u && u.some((g) => g.style) && (c.segments = u.map((g) => ({
3306
3330
  text: String(g.text || "").slice(0, 2e3),
3307
3331
  style: g.style || null
3308
- }))), e.push(c), e.length > Ai && e.shift();
3332
+ }))), e.push(c), e.length > zi && e.shift();
3309
3333
  };
3310
3334
  return {
3311
3335
  hook: () => {
@@ -3324,7 +3348,7 @@ function Ci() {
3324
3348
  }
3325
3349
  };
3326
3350
  }
3327
- function zi(e) {
3351
+ function ji(e) {
3328
3352
  const t = window.SpeechRecognition || window.webkitSpeechRecognition;
3329
3353
  let a = null, o = !1;
3330
3354
  const s = () => {
@@ -3354,8 +3378,8 @@ function zi(e) {
3354
3378
  isActive: () => o
3355
3379
  };
3356
3380
  }
3357
- const Ei = 60 * 1e3;
3358
- function ji({ onStart: e, onStop: t, onError: a }) {
3381
+ const Ri = 60 * 1e3;
3382
+ function Pi({ onStart: e, onStop: t, onError: a }) {
3359
3383
  let o = null, s = null, i = [], r = null;
3360
3384
  const l = () => {
3361
3385
  if (r && (clearTimeout(r), r = null), s && s.state !== "inactive")
@@ -3387,10 +3411,10 @@ function ji({ onStart: e, onStop: t, onError: a }) {
3387
3411
  }, s.onstop = () => {
3388
3412
  const k = i.length ? new Blob(i, { type: s.mimeType || "video/webm" }) : null;
3389
3413
  l(), t(k);
3390
- }, (v = o.getVideoTracks()[0]) == null || v.addEventListener("ended", () => u()), s.start(), r = setTimeout(u, Ei);
3414
+ }, (v = o.getVideoTracks()[0]) == null || v.addEventListener("ended", () => u()), s.start(), r = setTimeout(u, Ri);
3391
3415
  }, stop: u };
3392
3416
  }
3393
- function Ri() {
3417
+ function xi() {
3394
3418
  const e = /* @__PURE__ */ new Set();
3395
3419
  return {
3396
3420
  alloc() {
@@ -3408,19 +3432,19 @@ function Ri() {
3408
3432
  }
3409
3433
  };
3410
3434
  }
3411
- const De = { x: 0, y: 0, w: 1, h: 1 };
3435
+ const Me = { x: 0, y: 0, w: 1, h: 1 };
3412
3436
  function Je() {
3413
- const e = Ri();
3414
- let t = [], a = { ...De }, o = 1;
3437
+ const e = xi();
3438
+ let t = [], a = { ...Me }, o = 1;
3415
3439
  return {
3416
- list: () => t.filter((i) => Li(i, a)),
3440
+ list: () => t.filter((i) => Ti(i, a)),
3417
3441
  all: () => t.slice(),
3418
3442
  crop: () => ({ ...a }),
3419
3443
  setCrop(i) {
3420
- return a = xi(i), a;
3444
+ return a = Ui(i), a;
3421
3445
  },
3422
3446
  resetCrop() {
3423
- return a = { ...De }, a;
3447
+ return a = { ...Me }, a;
3424
3448
  },
3425
3449
  isCropped() {
3426
3450
  return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
@@ -3452,12 +3476,12 @@ function Je() {
3452
3476
  return e.free(l.number), l;
3453
3477
  },
3454
3478
  reset() {
3455
- for (t = [], a = { ...De }, o = 1; e.peekUsed().length; )
3479
+ for (t = [], a = { ...Me }, o = 1; e.peekUsed().length; )
3456
3480
  e.free(e.peekUsed()[0]);
3457
3481
  }
3458
3482
  };
3459
3483
  }
3460
- function Pi(e, t) {
3484
+ function Li(e, t) {
3461
3485
  const a = Number(t == null ? void 0 : t.w) || 1, o = Number(t == null ? void 0 : t.h) || 1, s = Number(t == null ? void 0 : t.x) || 0, i = Number(t == null ? void 0 : t.y) || 0;
3462
3486
  return (Array.isArray(e) ? e : []).map((r) => {
3463
3487
  const l = {
@@ -3470,15 +3494,15 @@ function Pi(e, t) {
3470
3494
  return Number.isFinite(r.x2) && (l.x2 = (r.x2 - s) / a), Number.isFinite(r.y2) && (l.y2 = (r.y2 - i) / o), l;
3471
3495
  });
3472
3496
  }
3473
- function xi(e) {
3497
+ function Ui(e) {
3474
3498
  const t = Math.min(Math.max(e.x, 0), 0.95), a = Math.min(Math.max(e.y, 0), 0.95), o = Math.min(Math.max(e.w, 0.05), 1 - t), s = Math.min(Math.max(e.h, 0.05), 1 - a);
3475
3499
  return { x: t, y: a, w: o, h: s };
3476
3500
  }
3477
- function Li(e, t) {
3501
+ function Ti(e, t) {
3478
3502
  const a = e.type === "arrow" ? (e.x + (e.x2 ?? e.x)) / 2 : e.x + (e.w || 0) / 2, o = e.type === "arrow" ? (e.y + (e.y2 ?? e.y)) / 2 : e.y + (e.h || 0) / 2;
3479
3503
  return a >= t.x && o >= t.y && a <= t.x + t.w && o <= t.y + t.h;
3480
3504
  }
3481
- function Nt(e) {
3505
+ function Kt(e) {
3482
3506
  const t = Math.max(1, Number(e) || 1);
3483
3507
  return {
3484
3508
  stroke: Math.max(2, t * 75e-4),
@@ -3488,7 +3512,7 @@ function Nt(e) {
3488
3512
  arrowHeadAngle: 0.4
3489
3513
  };
3490
3514
  }
3491
- function Ui(e, t, a, o, s) {
3515
+ function Fi(e, t, a, o, s) {
3492
3516
  const i = Math.atan2(o - t, a - e), r = s.arrowHead, l = Math.min(s.stroke, r * 0.2), u = a, c = o, g = a - Math.cos(i) * r, v = o - Math.sin(i) * r, k = {
3493
3517
  x: u - r * Math.cos(i - s.arrowHeadAngle),
3494
3518
  y: c - r * Math.sin(i - s.arrowHeadAngle)
@@ -3501,18 +3525,18 @@ function Ui(e, t, a, o, s) {
3501
3525
  };
3502
3526
  return { angle: i, tipX: u, tipY: c, baseX: g, baseY: v, left: k, right: w, shaftEnd: b };
3503
3527
  }
3504
- async function vt(e, t = {}) {
3505
- const a = t.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(t.maxEdge) || 2048), s = t.webpQuality ?? 0.82, i = await Di(e), r = Math.round(a.x * i.width), l = Math.round(a.y * i.height), u = Math.max(1, Math.round(a.w * i.width)), c = Math.max(1, Math.round(a.h * i.height)), g = Ti(u, c, o), v = g.width, k = g.height, w = document.createElement("canvas");
3528
+ async function kt(e, t = {}) {
3529
+ const a = t.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(t.maxEdge) || 2048), s = t.webpQuality ?? 0.82, i = await Ii(e), r = Math.round(a.x * i.width), l = Math.round(a.y * i.height), u = Math.max(1, Math.round(a.w * i.width)), c = Math.max(1, Math.round(a.h * i.height)), g = Di(u, c, o), v = g.width, k = g.height, w = document.createElement("canvas");
3506
3530
  w.width = v, w.height = k, w.getContext("2d").drawImage(i, r, l, u, c, 0, 0, v, k);
3507
- const z = await kt(w, "image/webp", s);
3531
+ const z = await bt(w, "image/webp", s);
3508
3532
  if (z && z.size > 0 && z.type === "image/webp")
3509
3533
  return { blob: z, width: v, height: k, mime: "image/webp", ext: "webp" };
3510
- const R = await kt(w, "image/png");
3534
+ const R = await bt(w, "image/png");
3511
3535
  if (!R || !R.size)
3512
3536
  throw new Error("Could not encode screenshot");
3513
3537
  return { blob: R, width: v, height: k, mime: "image/png", ext: "png" };
3514
3538
  }
3515
- function Ti(e, t, a = 2048) {
3539
+ function Di(e, t, a = 2048) {
3516
3540
  const o = Math.max(1, Number(e) || 1), s = Math.max(1, Number(t) || 1), i = Math.max(1, Number(a) || 2048), r = Math.min(1, i / Math.max(o, s));
3517
3541
  return {
3518
3542
  width: Math.max(1, Math.round(o * r)),
@@ -3520,23 +3544,23 @@ function Ti(e, t, a = 2048) {
3520
3544
  scale: r
3521
3545
  };
3522
3546
  }
3523
- function Fi(e = 2048) {
3547
+ function Oi(e = 2048) {
3524
3548
  const t = Math.floor(Number(e) / 2);
3525
3549
  return Math.max(1, Math.min(1024, t || 1024));
3526
3550
  }
3527
- function Oi(e, t = null) {
3551
+ function Mi(e, t = null) {
3528
3552
  if ((t == null ? void 0 : t.code) === "payload_too_large" || Number(t == null ? void 0 : t.status) === 413 || Number(e == null ? void 0 : e.status) === 413)
3529
3553
  return !0;
3530
3554
  const a = String((e == null ? void 0 : e.message) || e || (t == null ? void 0 : t.error) || "").toLowerCase();
3531
3555
  return a.includes("failed to fetch") || a.includes("networkerror") || a.includes("load failed") || a.includes("too large") || a.includes("payload") || a.includes("entity too large") ? !0 : Number(e == null ? void 0 : e.status) === 413;
3532
3556
  }
3533
- function Di(e) {
3557
+ function Ii(e) {
3534
3558
  return new Promise((t, a) => {
3535
3559
  const o = new Image();
3536
3560
  o.onload = () => t(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = e;
3537
3561
  });
3538
3562
  }
3539
- function kt(e, t, a) {
3563
+ function bt(e, t, a) {
3540
3564
  return new Promise((o) => {
3541
3565
  try {
3542
3566
  e.toBlob((s) => o(s), t, a);
@@ -3545,7 +3569,7 @@ function kt(e, t, a) {
3545
3569
  }
3546
3570
  });
3547
3571
  }
3548
- const Mi = [
3572
+ const Vi = [
3549
3573
  "url",
3550
3574
  "title",
3551
3575
  "userAgent",
@@ -3556,14 +3580,14 @@ const Mi = [
3556
3580
  "viewport",
3557
3581
  "user"
3558
3582
  ];
3559
- function Ii(e) {
3583
+ function $i(e) {
3560
3584
  return !e || typeof e != "object" ? !1 : !!(e.userId || e.email || e.displayName);
3561
3585
  }
3562
- function Vi(e = {}) {
3586
+ function Bi(e = {}) {
3563
3587
  const t = [];
3564
- for (const a of Mi) {
3588
+ for (const a of Vi) {
3565
3589
  const o = e[a];
3566
- o == null || o === "" || a === "user" && !Ii(o) || t.push({
3590
+ o == null || o === "" || a === "user" && !$i(o) || t.push({
3567
3591
  key: a,
3568
3592
  label: p(`diag.${a}`),
3569
3593
  value: o,
@@ -3572,7 +3596,7 @@ function Vi(e = {}) {
3572
3596
  }
3573
3597
  return t;
3574
3598
  }
3575
- function $i(e = []) {
3599
+ function Ni(e = []) {
3576
3600
  return e.map((t, a) => {
3577
3601
  const o = {
3578
3602
  id: `log-${a}-${t.at || 0}`,
@@ -3584,22 +3608,22 @@ function $i(e = []) {
3584
3608
  return Array.isArray(t.segments) && t.segments.length && (o.segments = t.segments), o;
3585
3609
  });
3586
3610
  }
3587
- function Bi(e = []) {
3611
+ function Ki(e = []) {
3588
3612
  if (!e.length)
3589
3613
  return { checked: !1, indeterminate: !1 };
3590
3614
  const t = e.filter((a) => a.redacted).length;
3591
3615
  return t === 0 ? { checked: !1, indeterminate: !1 } : t === e.length ? { checked: !0, indeterminate: !1 } : { checked: !1, indeterminate: !0 };
3592
3616
  }
3593
- function we(e, t) {
3617
+ function Ce(e, t) {
3594
3618
  e.forEach((a) => {
3595
3619
  a.redacted = !!t;
3596
3620
  });
3597
3621
  }
3598
- function Ni(e = {}) {
3622
+ function Hi(e = {}) {
3599
3623
  const t = e.diagnostics || [], a = e.logs || [], o = t.some((i) => !i.redacted), s = a.length > 0 && a.some((i) => !i.redacted);
3600
3624
  return o && s ? p("privacy.disclosure.both") : o ? p("privacy.disclosure.diagnostics") : s ? p("privacy.disclosure.logs") : "";
3601
3625
  }
3602
- function Ki(e) {
3626
+ function Gi(e) {
3603
3627
  if (e == null)
3604
3628
  return "";
3605
3629
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
@@ -3610,7 +3634,7 @@ function Ki(e) {
3610
3634
  return String(e);
3611
3635
  }
3612
3636
  }
3613
- function Hi(e = {}) {
3637
+ function qi(e = {}) {
3614
3638
  const t = {};
3615
3639
  e.author != null && e.author !== "" && (t.author = e.author);
3616
3640
  for (const o of e.diagnostics || [])
@@ -3625,34 +3649,38 @@ function Hi(e = {}) {
3625
3649
  });
3626
3650
  return t.console = a, t;
3627
3651
  }
3628
- const Y = [
3652
+ const _ = [
3629
3653
  { id: "bug", label: "Bug" },
3630
3654
  { id: "idea", label: "Idea" },
3631
3655
  { id: "other", label: "Other" }
3632
3656
  ];
3633
- function bt(e) {
3657
+ function wt(e) {
3634
3658
  return String(e || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
3635
3659
  }
3636
- function Me(e) {
3660
+ function ye(e) {
3637
3661
  const t = String(e || "").trim();
3638
3662
  return t ? t.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
3639
3663
  }
3640
- function Gi(e) {
3664
+ function _i(e) {
3641
3665
  if (!Array.isArray(e) || !e.length)
3642
- return Y.map((o) => ({ ...o }));
3666
+ return _.map((o) => ({ ...o }));
3643
3667
  const t = /* @__PURE__ */ new Set(), a = [];
3644
3668
  for (const o of e) {
3645
- let s = "", i = "";
3646
- typeof o == "string" || typeof o == "number" ? (s = bt(o), i = Me(s)) : o && typeof o == "object" && (s = bt(o.id ?? o.value ?? o.kind), i = String(o.label || o.name || Me(s)).trim() || Me(s)), !(!s || t.has(s)) && (t.add(s), a.push({ id: s, label: i }));
3669
+ let s = "", i = "", r = "", l = "";
3670
+ if (typeof o == "string" || typeof o == "number" ? (s = wt(o), i = ye(s)) : o && typeof o == "object" && (s = wt(o.id ?? o.value ?? o.kind), i = String(o.label || o.name || ye(s)).trim() || ye(s), r = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !s || t.has(s))
3671
+ continue;
3672
+ t.add(s);
3673
+ const u = { id: s, label: i };
3674
+ r && (u.title = r), l && (u.description = l), a.push(u);
3647
3675
  }
3648
- return a.length ? a : Y.map((o) => ({ ...o }));
3676
+ return a.length ? a : _.map((o) => ({ ...o }));
3649
3677
  }
3650
- function Re(e) {
3678
+ function Le(e) {
3651
3679
  var a;
3652
- const t = Array.isArray(e) && e.length ? e : Y;
3680
+ const t = Array.isArray(e) && e.length ? e : _;
3653
3681
  return t.some((o) => o.id === "bug") ? "bug" : ((a = t[0]) == null ? void 0 : a.id) || "other";
3654
3682
  }
3655
- const qi = ["maker", "all-business", "brighter-day", "quiet-night"], Kt = "maker", _i = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), Ke = 0.02, wt = 0.05, Wi = `
3683
+ const Wi = ["maker", "all-business", "brighter-day", "quiet-night"], Ht = "maker", Zi = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), Ke = 0.02, St = 0.05, Ji = `
3656
3684
  <svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
3657
3685
  <path fill="currentColor" d="M5.2 2.8h9.1A2.7 2.7 0 0 1 17 5.5v8.2c0 .4-.3.7-.7.7h-.1a.7.7 0 0 1-.7-.7V5.5c0-.7-.6-1.3-1.3-1.3H5.2c-.7 0-1.3.6-1.3 1.3v12.2c0 .7.6 1.3 1.3 1.3h6.4a.7.7 0 0 1 0 1.4H5.2A2.7 2.7 0 0 1 2.5 17.7V5.5A2.7 2.7 0 0 1 5.2 2.8zm1.6 4.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h3.6a.7.7 0 0 0 0-1.4H6.8z"/>
3658
3686
  <path fill="currentColor" d="M14.7 13.05 20.2 7.55a1.55 1.55 0 0 1 2.2 2.2l-5.5 5.5-.45 1.9a.6.6 0 0 1-.72.45l-1.9-.45.87-1.9z"/>
@@ -3661,7 +3689,7 @@ const qi = ["maker", "all-business", "brighter-day", "quiet-night"], Kt = "maker
3661
3689
  function D(e) {
3662
3690
  return `<svg class="nf-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`;
3663
3691
  }
3664
- const F = {
3692
+ const T = {
3665
3693
  crop: D('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
3666
3694
  resetCrop: D('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
3667
3695
  arrow: D('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
@@ -3672,10 +3700,11 @@ const F = {
3672
3700
  privacy: D('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
3673
3701
  audio: D('<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0"/><path d="M12 18v3"/>'),
3674
3702
  video: D('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3675
- openArrow: D('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>')
3676
- }, Ht = Ci();
3677
- Ht.hook();
3678
- const Gt = 10, Zi = 80, qt = "notefully.author", _t = "notefully.kind", Wt = "notefully.redactSections";
3703
+ openArrow: D('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
3704
+ close: D('<path d="M6 6l12 12M18 6 6 18"/>')
3705
+ }, Gt = Ei();
3706
+ Gt.hook();
3707
+ const qt = 10, Yi = 80, _t = "notefully.author", Wt = "notefully.kind", Zt = "notefully.redactSections";
3679
3708
  let d = {
3680
3709
  endpoint: "",
3681
3710
  projectKey: "",
@@ -3683,10 +3712,10 @@ let d = {
3683
3712
  name: "",
3684
3713
  targets: null,
3685
3714
  hideLauncher: !1,
3686
- theme: Kt,
3715
+ theme: Ht,
3687
3716
  video: !1,
3688
- consoleLogLimit: Gt,
3689
- kinds: Y.map((e) => ({ ...e })),
3717
+ consoleLogLimit: qt,
3718
+ kinds: _.map((e) => ({ ...e })),
3690
3719
  kindsCustom: !1,
3691
3720
  capture: null,
3692
3721
  onBeforeCapture: null,
@@ -3695,44 +3724,55 @@ let d = {
3695
3724
  displayLink: !1,
3696
3725
  locale: null,
3697
3726
  translations: null
3698
- }, ce = !1, Ie = !1, N = {}, f = null, n = {}, A = Je(), H = "", ie = "", K = null, J = Re(Y), q = null, M = null, j = null, E = null, me = null, Q = null, le = null, G = { w: 0, h: 0 }, Ve = !1, Pe = !1, xe = !1, V = [], I = [], _ = !1;
3699
- function y(e) {
3700
- return f.querySelector(e);
3727
+ }, ce = !1, Ie = !1, N = {}, y = null, n = {}, A = Je(), G = "", se = "", K = null, H = Le(_), W = null, M = null, j = null, E = null, fe = null, Q = null, le = null, q = { w: 0, h: 0 }, Ve = !1, de = !1, pe = !1, $ = [], V = [], Z = !1;
3728
+ function h(e) {
3729
+ return y.querySelector(e);
3701
3730
  }
3702
- function Zt(e) {
3731
+ function Jt(e) {
3703
3732
  const t = String(e || "").trim().toLowerCase().replace(/\s+/g, "-");
3704
- return qi.includes(t) ? t : Kt;
3733
+ return Wi.includes(t) ? t : Ht;
3705
3734
  }
3706
3735
  function S(e, t = !1) {
3707
- n.status && (n.status.textContent = e || "", me && (clearTimeout(me), me = null), e && !t && (me = setTimeout(() => {
3736
+ n.status && (n.status.textContent = e || "", fe && (clearTimeout(fe), fe = null), e && !t && (fe = setTimeout(() => {
3708
3737
  n.status.textContent = "";
3709
3738
  }, 4e3)));
3710
3739
  }
3711
3740
  function Ye() {
3712
- return f && document.body.contains(f) || (f = document.createElement("div"), f.id = "notefully", f.innerHTML = `
3713
- <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${Wi}</button>
3741
+ return y && document.body.contains(y) || (y = document.createElement("div"), y.id = "notefully", y.innerHTML = `
3742
+ <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${Ji}</button>
3714
3743
  <div class="nf-dialog" hidden>
3715
3744
  <div class="nf-panel">
3745
+ <button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${T.close}</button>
3716
3746
  <div class="nf-panel-body">
3747
+ <div class="nf-heading">
3748
+ <h2 class="nf-title"></h2>
3749
+ <p class="nf-intro"></p>
3750
+ </div>
3717
3751
  <div class="nf-stage" hidden>
3718
- <div class="nf-palette">
3719
- <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${F.crop}</button>
3720
- <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${F.resetCrop}</button>
3721
- <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${F.arrow}</button>
3722
- <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${F.rect}</button>
3723
- <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${F.circle}</button>
3724
- <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${F.discard}</button>
3725
- <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${F.recapture}</button>
3752
+ <div class="nf-shot-block">
3753
+ <div class="nf-canvas"></div>
3754
+ <div class="nf-palette">
3755
+ <div class="nf-palette-tools">
3756
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${T.crop}</button>
3757
+ <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${T.resetCrop}</button>
3758
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${T.arrow}</button>
3759
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${T.rect}</button>
3760
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${T.circle}</button>
3761
+ </div>
3762
+ <div class="nf-palette-shot">
3763
+ <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${T.recapture}</button>
3764
+ <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${T.discard}</button>
3765
+ </div>
3766
+ </div>
3726
3767
  </div>
3727
- <div class="nf-canvas"></div>
3728
3768
  </div>
3729
- <textarea class="nf-text" data-i18n-placeholder="form.messagePlaceholder"></textarea>
3769
+ <textarea class="nf-text"></textarea>
3730
3770
  <input class="nf-author" type="text" name="author" autocomplete="nickname" data-i18n-placeholder="form.authorPlaceholder" data-i18n-aria="form.author">
3731
3771
  <div class="nf-kind-row">
3732
3772
  <div class="nf-kind"></div>
3733
3773
  <div class="nf-privacy-summary">
3734
3774
  <span class="nf-privacy-text"></span>
3735
- <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${F.privacy}</button>
3775
+ <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${T.privacy}</button>
3736
3776
  </div>
3737
3777
  </div>
3738
3778
  <div class="nf-privacy">
@@ -3742,9 +3782,9 @@ function Ye() {
3742
3782
  </div>
3743
3783
  </div>
3744
3784
  <div class="nf-actions">
3745
- <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${F.resetCrop}</button>
3746
- <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${F.audio}</button>
3747
- <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${F.video}</button>
3785
+ <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${T.resetCrop}</button>
3786
+ <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${T.audio}</button>
3787
+ <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${T.video}</button>
3748
3788
  <button class="nf-submit" type="button" data-i18n-text="form.submit"></button>
3749
3789
  </div>
3750
3790
  <div class="nf-status"></div>
@@ -3752,162 +3792,190 @@ function Ye() {
3752
3792
  <p class="nf-success-msg" hidden aria-live="polite" data-i18n-text="form.success"></p>
3753
3793
  <a class="nf-success-link" hidden target="_blank" rel="noopener noreferrer" data-i18n-aria="form.viewReport">
3754
3794
  <span class="nf-success-link-label" data-i18n-text="form.viewReport"></span>
3755
- ${F.openArrow}
3795
+ ${T.openArrow}
3756
3796
  </a>
3757
3797
  </div>
3758
3798
  </div>
3759
3799
  <button class="nf-stop-video" type="button" hidden data-i18n-text="tool.stopVideo"></button>
3760
- `, document.body.appendChild(f), n = {
3761
- launcher: y(".nf-launcher"),
3762
- dialog: y(".nf-dialog"),
3763
- panel: y(".nf-panel"),
3764
- panelBody: y(".nf-panel-body"),
3765
- successMsg: y(".nf-success-msg"),
3766
- successLink: y(".nf-success-link"),
3767
- stage: y(".nf-stage"),
3768
- palette: y(".nf-palette"),
3769
- canvas: y(".nf-canvas"),
3770
- text: y(".nf-text"),
3771
- author: y(".nf-author"),
3772
- kindRow: y(".nf-kind-row"),
3773
- kind: y(".nf-kind"),
3774
- privacy: y(".nf-privacy"),
3775
- privacySummary: y(".nf-privacy-summary"),
3776
- privacyText: y(".nf-privacy-text"),
3777
- privacyChange: y(".nf-privacy-change"),
3778
- privacyPanel: y(".nf-privacy-panel"),
3779
- privacyScroll: y(".nf-privacy-scroll"),
3780
- privacyDone: y(".nf-privacy-done"),
3781
- actions: y(".nf-actions"),
3782
- restore: y(".nf-restore"),
3783
- status: y(".nf-status"),
3784
- audio: y(".nf-audio"),
3785
- video: y(".nf-video"),
3786
- discard: y(".nf-discard-shot"),
3787
- recapture: y(".nf-recapture"),
3788
- stop: y(".nf-stop-video"),
3789
- resetCrop: y(".nf-reset-crop"),
3790
- submit: y(".nf-submit"),
3800
+ `, document.body.appendChild(y), n = {
3801
+ launcher: h(".nf-launcher"),
3802
+ dialog: h(".nf-dialog"),
3803
+ panel: h(".nf-panel"),
3804
+ close: h(".nf-close"),
3805
+ panelBody: h(".nf-panel-body"),
3806
+ heading: h(".nf-heading"),
3807
+ title: h(".nf-title"),
3808
+ intro: h(".nf-intro"),
3809
+ successMsg: h(".nf-success-msg"),
3810
+ successLink: h(".nf-success-link"),
3811
+ stage: h(".nf-stage"),
3812
+ shotBlock: h(".nf-shot-block"),
3813
+ palette: h(".nf-palette"),
3814
+ paletteTools: h(".nf-palette-tools"),
3815
+ paletteShot: h(".nf-palette-shot"),
3816
+ canvas: h(".nf-canvas"),
3817
+ text: h(".nf-text"),
3818
+ author: h(".nf-author"),
3819
+ kindRow: h(".nf-kind-row"),
3820
+ kind: h(".nf-kind"),
3821
+ privacy: h(".nf-privacy"),
3822
+ privacySummary: h(".nf-privacy-summary"),
3823
+ privacyText: h(".nf-privacy-text"),
3824
+ privacyChange: h(".nf-privacy-change"),
3825
+ privacyPanel: h(".nf-privacy-panel"),
3826
+ privacyScroll: h(".nf-privacy-scroll"),
3827
+ privacyDone: h(".nf-privacy-done"),
3828
+ actions: h(".nf-actions"),
3829
+ restore: h(".nf-restore"),
3830
+ status: h(".nf-status"),
3831
+ audio: h(".nf-audio"),
3832
+ video: h(".nf-video"),
3833
+ discard: h(".nf-discard-shot"),
3834
+ recapture: h(".nf-recapture"),
3835
+ stop: h(".nf-stop-video"),
3836
+ resetCrop: h(".nf-reset-crop"),
3837
+ submit: h(".nf-submit"),
3791
3838
  shot: null
3792
- }, Xi(), se()), f;
3839
+ }, Qi(), re()), y;
3793
3840
  }
3794
- function se() {
3841
+ function re() {
3795
3842
  var e;
3796
- f && (Jt(), f.dataset.theme = Zt(d.theme), f.lang = ye(), f.dir = Aa(ye()), d.hideLauncher ? f.setAttribute("data-nf-hidden-launcher", "") : f.removeAttribute("data-nf-hidden-launcher"), n.video && (n.video.hidden = !d.video), Ji(), V.length && V.forEach((t) => {
3843
+ y && (Yt(), y.dataset.theme = Jt(d.theme), y.lang = be(), y.dir = za(be()), d.hideLauncher ? y.setAttribute("data-nf-hidden-launcher", "") : y.removeAttribute("data-nf-hidden-launcher"), n.video && (n.video.hidden = !d.video), Xi(), $.length && $.forEach((t) => {
3797
3844
  t.label = p(`diag.${t.key}`);
3798
- }), Yt(), _ ? at() : tt(), (e = n.dialog) != null && e.hidden && Se());
3845
+ }), Qt(), Z ? ot() : at(), (e = n.dialog) != null && e.hidden && ze());
3799
3846
  }
3800
- function Jt() {
3801
- const e = ba({
3847
+ function Yt() {
3848
+ const e = Sa({
3802
3849
  locale: d.locale == null ? void 0 : d.locale
3803
3850
  });
3804
- Sa(d.translations), wa(e);
3805
- }
3806
- function Ji() {
3807
- if (f && (f.querySelectorAll("[data-i18n-title]").forEach((e) => {
3808
- e.title = p(e.getAttribute("data-i18n-title"));
3809
- }), f.querySelectorAll("[data-i18n-aria]").forEach((e) => {
3810
- e.setAttribute("aria-label", p(e.getAttribute("data-i18n-aria")));
3811
- }), f.querySelectorAll("[data-i18n-placeholder]").forEach((e) => {
3812
- e.setAttribute("placeholder", p(e.getAttribute("data-i18n-placeholder")));
3813
- }), f.querySelectorAll("[data-i18n-text]").forEach((e) => {
3814
- e.textContent = p(e.getAttribute("data-i18n-text"));
3815
- }), n.audio)) {
3816
- const e = n.audio.dataset.active === "true";
3817
- Ue(e);
3851
+ Ca(d.translations), Aa(e);
3852
+ }
3853
+ function Xi() {
3854
+ if (y) {
3855
+ if (y.querySelectorAll("[data-i18n-title]").forEach((e) => {
3856
+ e.title = p(e.getAttribute("data-i18n-title"));
3857
+ }), y.querySelectorAll("[data-i18n-aria]").forEach((e) => {
3858
+ e.setAttribute("aria-label", p(e.getAttribute("data-i18n-aria")));
3859
+ }), y.querySelectorAll("[data-i18n-placeholder]").forEach((e) => {
3860
+ e.setAttribute("placeholder", p(e.getAttribute("data-i18n-placeholder")));
3861
+ }), y.querySelectorAll("[data-i18n-text]").forEach((e) => {
3862
+ e.textContent = p(e.getAttribute("data-i18n-text"));
3863
+ }), n.audio) {
3864
+ const e = n.audio.dataset.active === "true";
3865
+ Te(e);
3866
+ }
3867
+ Qe();
3818
3868
  }
3819
3869
  }
3820
- function Yi(e) {
3870
+ function Xt(e) {
3821
3871
  if (d.kindsCustom)
3822
3872
  return e.label;
3823
3873
  const t = `kind.${e.id}`, a = p(t);
3824
3874
  return a === t ? e.label : a;
3825
3875
  }
3826
- function Se() {
3876
+ function ze() {
3827
3877
  n.launcher && (n.launcher.hidden = !!d.hideLauncher);
3828
3878
  }
3829
- function Xi() {
3830
- n.launcher.addEventListener("click", () => ga()), y(".nf-dialog").addEventListener("click", (t) => {
3831
- Pe && !xe || t.target === n.dialog && re();
3832
- }), document.addEventListener("keydown", ua), f.querySelectorAll(".nf-tool").forEach((t) => {
3833
- t.addEventListener("click", () => de(t.dataset.tool));
3834
- }), n.resetCrop.addEventListener("click", ls), n.canvas.addEventListener("pointerdown", os), n.canvas.addEventListener("dragstart", (t) => t.preventDefault());
3835
- const e = y(".nf-kind");
3836
- e && e.addEventListener("click", (t) => {
3837
- const a = t.target.closest("[data-kind]");
3838
- a && Xe(a.dataset.kind);
3839
- }), n.discard.addEventListener("click", us), n.recapture.addEventListener("click", () => {
3840
- ds().catch((t) => S(t.message || p("status.recaptureFailed")));
3841
- }), n.restore.addEventListener("click", cs), n.audio.addEventListener("click", ps), n.video.addEventListener("click", gs), n.stop.addEventListener("click", () => le == null ? void 0 : le.stop()), n.privacyChange.addEventListener("click", () => Ee(!_)), n.privacyDone.addEventListener("click", () => Ee(!1)), n.privacyScroll.addEventListener("change", Es), y(".nf-submit").addEventListener("click", () => {
3842
- ha().catch((t) => S(t.message || p("status.submitFailed")));
3843
- }), Yt(), de(null);
3879
+ function Qi() {
3880
+ var t;
3881
+ n.launcher.addEventListener("click", () => ha()), h(".nf-dialog").addEventListener("click", (a) => {
3882
+ de && !pe || a.target === n.dialog && ee();
3883
+ }), (t = n.close) == null || t.addEventListener("click", () => {
3884
+ de && !pe || ee();
3885
+ }), document.addEventListener("keydown", da), y.querySelectorAll(".nf-tool").forEach((a) => {
3886
+ a.addEventListener("click", () => ge(a.dataset.tool));
3887
+ }), n.resetCrop.addEventListener("click", ds), n.canvas.addEventListener("pointerdown", rs), n.canvas.addEventListener("dragstart", (a) => a.preventDefault());
3888
+ const e = h(".nf-kind");
3889
+ e && e.addEventListener("click", (a) => {
3890
+ const o = a.target.closest("[data-kind]");
3891
+ o && Xe(o.dataset.kind);
3892
+ }), n.discard.addEventListener("click", ps), n.recapture.addEventListener("click", () => {
3893
+ ms().catch((a) => S(a.message || p("status.recaptureFailed")));
3894
+ }), n.restore.addEventListener("click", gs), n.audio.addEventListener("click", hs), n.video.addEventListener("click", fs), n.stop.addEventListener("click", () => le == null ? void 0 : le.stop()), n.privacyChange.addEventListener("click", () => Pe(!Z)), n.privacyDone.addEventListener("click", () => Pe(!1)), n.privacyScroll.addEventListener("change", Ps), h(".nf-submit").addEventListener("click", () => {
3895
+ ya().catch((a) => S(a.message || p("status.submitFailed")));
3896
+ }), Qt(), ge(null);
3844
3897
  }
3845
3898
  function x(e) {
3846
3899
  return String(e || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3847
3900
  }
3848
- function Yt() {
3849
- const e = f == null ? void 0 : f.querySelector(".nf-kind");
3901
+ function Qt() {
3902
+ const e = y == null ? void 0 : y.querySelector(".nf-kind");
3850
3903
  if (!e)
3851
3904
  return;
3852
- const t = Array.isArray(d.kinds) && d.kinds.length ? d.kinds : Y;
3853
- e.innerHTML = t.map((s) => `<button type="button" data-kind="${x(s.id)}">${x(Yi(s))}</button>`).join("");
3854
- const o = t.map((s) => s.id).includes(J) ? J : Re(t);
3905
+ const t = Array.isArray(d.kinds) && d.kinds.length ? d.kinds : _;
3906
+ e.innerHTML = t.map((s) => `<button type="button" data-kind="${x(s.id)}">${x(Xt(s))}</button>`).join("");
3907
+ const o = t.map((s) => s.id).includes(H) ? H : Le(t);
3855
3908
  Xe(o);
3856
3909
  }
3857
3910
  function Xe(e) {
3858
- J = (d.kinds || Y).map((a) => a.id).includes(e) ? e : Re(d.kinds), f == null || f.querySelectorAll("[data-kind]").forEach((a) => {
3859
- a.dataset.active = String(a.dataset.kind === J);
3860
- }), es(J);
3911
+ H = (d.kinds || _).map((a) => a.id).includes(e) ? e : Le(d.kinds), y == null || y.querySelectorAll("[data-kind]").forEach((a) => {
3912
+ a.dataset.active = String(a.dataset.kind === H);
3913
+ }), os(H), Qe();
3861
3914
  }
3862
- function Qi() {
3915
+ function es() {
3916
+ return (Array.isArray(d.kinds) && d.kinds.length ? d.kinds : _).find((t) => t.id === H) || null;
3917
+ }
3918
+ function ts() {
3919
+ const e = es(), t = (e == null ? void 0 : e.id) || H || "other", a = t === "bug" || t === "idea" || t === "other", o = (e == null ? void 0 : e.title) && String(e.title).trim() || p(a ? `form.title.${t}` : "form.title.other"), s = (e == null ? void 0 : e.description) && String(e.description).trim() || p(a ? `form.intro.${t}` : "form.intro.other"), i = a ? p(`form.placeholder.${t}`) : p("form.placeholder.custom", {
3920
+ kind: e ? Xt(e) : ye(t)
3921
+ });
3922
+ return { title: o, intro: s, placeholder: i };
3923
+ }
3924
+ function Qe() {
3925
+ if (!n.title && !n.intro && !n.text)
3926
+ return;
3927
+ const e = ts(), t = I() ? ` ${p("form.screenshotNote")}` : "";
3928
+ n.title && (n.title.textContent = e.title), n.intro && (n.intro.textContent = `${e.intro}${t}`), n.text && n.text.setAttribute("placeholder", e.placeholder);
3929
+ }
3930
+ function as() {
3863
3931
  try {
3864
- return String(localStorage.getItem(_t) || "").trim().toLowerCase();
3932
+ return String(localStorage.getItem(Wt) || "").trim().toLowerCase();
3865
3933
  } catch {
3866
3934
  return "";
3867
3935
  }
3868
3936
  }
3869
- function es(e) {
3937
+ function os(e) {
3870
3938
  const t = String(e || "").trim().toLowerCase();
3871
3939
  if (t)
3872
3940
  try {
3873
- localStorage.setItem(_t, t);
3941
+ localStorage.setItem(Wt, t);
3874
3942
  } catch {
3875
3943
  }
3876
3944
  }
3877
- function ts() {
3878
- const e = (d.kinds || Y).map((a) => a.id), t = Qi();
3879
- return t && e.includes(t) ? t : Re(d.kinds);
3945
+ function is() {
3946
+ const e = (d.kinds || _).map((a) => a.id), t = as();
3947
+ return t && e.includes(t) ? t : Le(d.kinds);
3880
3948
  }
3881
- function de(e) {
3882
- q = _i.has(e) ? e : null, M = null, f.querySelectorAll(".nf-tool").forEach((t) => {
3883
- t.dataset.active = String(t.dataset.tool === q);
3884
- }), n.canvas && (n.canvas.dataset.draw = q ? "true" : "false"), B() && O();
3949
+ function ge(e) {
3950
+ W = Zi.has(e) ? e : null, M = null, y.querySelectorAll(".nf-tool").forEach((t) => {
3951
+ t.dataset.active = String(t.dataset.tool === W);
3952
+ }), n.canvas && (n.canvas.dataset.draw = W ? "true" : "false"), I() && O();
3885
3953
  }
3886
- function St(e) {
3954
+ function At(e) {
3887
3955
  return Math.min(1, Math.max(0, e));
3888
3956
  }
3889
- function pe() {
3957
+ function me() {
3890
3958
  return n.shot || n.canvas;
3891
3959
  }
3892
- function Ae(e) {
3893
- const t = pe().getBoundingClientRect();
3960
+ function Ee(e) {
3961
+ const t = me().getBoundingClientRect();
3894
3962
  return {
3895
- x: St((e.clientX - t.left) / Math.max(t.width, 1)),
3896
- y: St((e.clientY - t.top) / Math.max(t.height, 1))
3963
+ x: At((e.clientX - t.left) / Math.max(t.width, 1)),
3964
+ y: At((e.clientY - t.top) / Math.max(t.height, 1))
3897
3965
  };
3898
3966
  }
3899
- function as(e) {
3900
- const t = pe().getBoundingClientRect();
3967
+ function ss(e) {
3968
+ const t = me().getBoundingClientRect();
3901
3969
  return e.clientX >= t.left && e.clientX <= t.right && e.clientY >= t.top && e.clientY <= t.bottom;
3902
3970
  }
3903
- function Xt(e) {
3904
- const t = Ae(e), a = A.crop();
3971
+ function ea(e) {
3972
+ const t = Ee(e), a = A.crop();
3905
3973
  return {
3906
3974
  x: a.x + t.x * a.w,
3907
3975
  y: a.y + t.y * a.h
3908
3976
  };
3909
3977
  }
3910
- function Le(e, t) {
3978
+ function Ue(e, t) {
3911
3979
  const a = Math.min(e.x, t.x), o = Math.min(e.y, t.y);
3912
3980
  return {
3913
3981
  x: a,
@@ -3916,8 +3984,8 @@ function Le(e, t) {
3916
3984
  h: Math.max(Ke, Math.abs(t.y - e.y))
3917
3985
  };
3918
3986
  }
3919
- function Qe(e) {
3920
- f && (e ? f.dataset.grabbing = "true" : delete f.dataset.grabbing);
3987
+ function et(e) {
3988
+ y && (e ? y.dataset.grabbing = "true" : delete y.dataset.grabbing);
3921
3989
  }
3922
3990
  function $e(e) {
3923
3991
  try {
@@ -3926,42 +3994,42 @@ function $e(e) {
3926
3994
  }
3927
3995
  }
3928
3996
  function He() {
3929
- window.addEventListener("pointermove", ea), window.addEventListener("pointerup", Ce), window.addEventListener("pointercancel", Ce);
3997
+ window.addEventListener("pointermove", aa), window.addEventListener("pointerup", je), window.addEventListener("pointercancel", je);
3930
3998
  }
3931
- function Qt() {
3932
- window.removeEventListener("pointermove", ea), window.removeEventListener("pointerup", Ce), window.removeEventListener("pointercancel", Ce);
3999
+ function ta() {
4000
+ window.removeEventListener("pointermove", aa), window.removeEventListener("pointerup", je), window.removeEventListener("pointercancel", je);
3933
4001
  }
3934
- function os(e) {
3935
- if (e.button !== 0 || !B())
4002
+ function rs(e) {
4003
+ if (e.button !== 0 || !I())
3936
4004
  return;
3937
- if (!e.target.closest(".nf-sticker") && !as(e)) {
4005
+ if (!e.target.closest(".nf-sticker") && !ss(e)) {
3938
4006
  M = null, O();
3939
4007
  return;
3940
4008
  }
3941
4009
  const t = e.target.closest(".nf-handle"), a = e.target.closest(".nf-sticker");
3942
4010
  if (a && a.dataset.preview !== "true") {
3943
- e.preventDefault(), e.stopPropagation(), M = a.dataset.id, $e(e), is({
4011
+ e.preventDefault(), e.stopPropagation(), M = a.dataset.id, $e(e), ns({
3944
4012
  kind: "sticker",
3945
4013
  id: M,
3946
4014
  dir: (t == null ? void 0 : t.dataset.dir) || "move"
3947
4015
  }, e), O();
3948
4016
  return;
3949
4017
  }
3950
- if (M = null, q === "crop") {
3951
- e.preventDefault(), $e(e), j = { kind: "crop", start: Ae(e), current: Ae(e) }, He(), O();
4018
+ if (M = null, W === "crop") {
4019
+ e.preventDefault(), $e(e), j = { kind: "crop", start: Ee(e), current: Ee(e) }, He(), O();
3952
4020
  return;
3953
4021
  }
3954
- if (q === "arrow" || q === "rect" || q === "circle") {
4022
+ if (W === "arrow" || W === "rect" || W === "circle") {
3955
4023
  e.preventDefault(), $e(e);
3956
- const o = Xt(e);
3957
- j = { kind: "sticker", type: q, start: o, current: o }, He(), O();
4024
+ const o = ea(e);
4025
+ j = { kind: "sticker", type: W, start: o, current: o }, He(), O();
3958
4026
  return;
3959
4027
  }
3960
4028
  O();
3961
4029
  }
3962
- function is(e, t) {
4030
+ function ns(e, t) {
3963
4031
  t.preventDefault(), t.stopPropagation();
3964
- const a = pe().getBoundingClientRect(), o = A.list().find((s) => s.id === e.id);
4032
+ const a = me().getBoundingClientRect(), o = A.list().find((s) => s.id === e.id);
3965
4033
  E = {
3966
4034
  ...e,
3967
4035
  startX: t.clientX,
@@ -3969,11 +4037,11 @@ function is(e, t) {
3969
4037
  crop: A.crop(),
3970
4038
  sticker: o ? { ...o } : null,
3971
4039
  rect: a
3972
- }, Qe(e.dir === "move" || e.dir === "start" || e.dir === "end"), He();
4040
+ }, et(e.dir === "move" || e.dir === "start" || e.dir === "end"), He();
3973
4041
  }
3974
- function ea(e) {
4042
+ function aa(e) {
3975
4043
  if (j) {
3976
- j.current = j.kind === "crop" ? Ae(e) : Xt(e), O();
4044
+ j.current = j.kind === "crop" ? Ee(e) : ea(e), O();
3977
4045
  return;
3978
4046
  }
3979
4047
  if (!E)
@@ -3999,12 +4067,12 @@ function ea(e) {
3999
4067
  });
4000
4068
  else {
4001
4069
  const s = { x: o.x, y: o.y, w: o.w, h: o.h };
4002
- ss(s, E.dir, t, a), A.update(o.id, s);
4070
+ ls(s, E.dir, t, a), A.update(o.id, s);
4003
4071
  }
4004
4072
  O();
4005
4073
  }
4006
4074
  }
4007
- function ss(e, t, a, o) {
4075
+ function ls(e, t, a, o) {
4008
4076
  if (t.includes("e") && (e.w = Math.max(0.04, e.w + a)), t.includes("s") && (e.h = Math.max(0.04, e.h + o)), t.includes("w")) {
4009
4077
  const s = Math.max(0.04, e.w - a);
4010
4078
  e.x += e.w - s, e.w = s;
@@ -4014,9 +4082,9 @@ function ss(e, t, a, o) {
4014
4082
  e.y += e.h - s, e.h = s;
4015
4083
  }
4016
4084
  }
4017
- function Ce(e) {
4018
- if (Qt(), Qe(!1), j) {
4019
- rs();
4085
+ function je(e) {
4086
+ if (ta(), et(!1), j) {
4087
+ us();
4020
4088
  return;
4021
4089
  }
4022
4090
  if (E) {
@@ -4027,13 +4095,13 @@ function Ce(e) {
4027
4095
  E = null, O();
4028
4096
  }
4029
4097
  }
4030
- function rs() {
4098
+ function us() {
4031
4099
  const e = j;
4032
4100
  if (j = null, !e)
4033
4101
  return;
4034
4102
  if (e.kind === "crop") {
4035
- const a = Le(e.start, e.current);
4036
- if (Math.abs(e.current.x - e.start.x) < wt || Math.abs(e.current.y - e.start.y) < wt) {
4103
+ const a = Ue(e.start, e.current);
4104
+ if (Math.abs(e.current.x - e.start.x) < St || Math.abs(e.current.y - e.start.y) < St) {
4037
4105
  O();
4038
4106
  return;
4039
4107
  }
@@ -4043,13 +4111,13 @@ function rs() {
4043
4111
  y: s.y + a.y * s.h,
4044
4112
  w: a.w * s.w,
4045
4113
  h: a.h * s.h
4046
- }), ee();
4114
+ }), te();
4047
4115
  return;
4048
4116
  }
4049
- const t = ns(e);
4117
+ const t = cs(e);
4050
4118
  t && (M = t.id), O();
4051
4119
  }
4052
- function ns(e) {
4120
+ function cs(e) {
4053
4121
  if (e.type === "arrow") {
4054
4122
  const t = e.current.x - e.start.x, a = e.current.y - e.start.y;
4055
4123
  return Math.hypot(t, a) < Ke ? A.add("arrow", {
@@ -4068,89 +4136,89 @@ function ns(e) {
4068
4136
  h: Math.abs(a)
4069
4137
  });
4070
4138
  }
4071
- return A.add(e.type, Le(e.start, e.current));
4139
+ return A.add(e.type, Ue(e.start, e.current));
4072
4140
  }
4073
- function ls() {
4074
- A.resetCrop(), M = null, ee();
4141
+ function ds() {
4142
+ A.resetCrop(), M = null, te();
4075
4143
  }
4076
- function ze() {
4144
+ function Re() {
4077
4145
  n.resetCrop && (n.resetCrop.hidden = !A.isCropped());
4078
4146
  }
4079
- function Ue(e) {
4147
+ function Te(e) {
4080
4148
  if (!n.audio)
4081
4149
  return;
4082
4150
  const t = p(e ? "tool.audioStop" : "tool.audio");
4083
4151
  n.audio.title = t, n.audio.setAttribute("aria-label", t), n.audio.dataset.active = String(!!e);
4084
4152
  }
4085
- function B() {
4086
- return Z(H);
4153
+ function I() {
4154
+ return Y(G);
4087
4155
  }
4088
- function ge() {
4156
+ function he() {
4089
4157
  if (!n.stage || !n.palette || !n.actions || !n.recapture)
4090
4158
  return;
4091
- const e = B();
4092
- n.stage.hidden = !e && !K, n.palette.hidden = !e, n.discard && (n.discard.hidden = !e), n.restore && (n.restore.hidden = e || !ie), e ? (n.palette.appendChild(n.discard), n.palette.appendChild(n.recapture)) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1;
4159
+ const e = I();
4160
+ n.stage.hidden = !e && !K, n.palette.hidden = !e, n.discard && (n.discard.hidden = !e), n.restore && (n.restore.hidden = e || !se), e && n.paletteShot ? (n.paletteShot.appendChild(n.recapture), n.paletteShot.appendChild(n.discard)) : n.audio ? n.audio.after(n.recapture) : n.actions.insertBefore(n.recapture, n.submit || null), n.recapture.hidden = !1, Qe();
4093
4161
  }
4094
- function us() {
4095
- B() && (ie = H), H = "", de(null), ge(), ee();
4162
+ function ps() {
4163
+ I() && (se = G), G = "", ge(null), he(), te();
4096
4164
  }
4097
- function cs() {
4098
- Z(ie) && (H = ie, ge(), ee());
4165
+ function gs() {
4166
+ Y(se) && (G = se, he(), te());
4099
4167
  }
4100
- function ta() {
4168
+ function oa() {
4101
4169
  return {
4102
4170
  capture: typeof d.capture == "function" ? d.capture : void 0,
4103
4171
  onBeforeCapture: typeof d.onBeforeCapture == "function" ? d.onBeforeCapture : void 0
4104
4172
  };
4105
4173
  }
4106
- function aa(e) {
4107
- if (!Z(e))
4174
+ function ia(e) {
4175
+ if (!Y(e))
4108
4176
  throw new Error(p("status.screenshotFailed"));
4109
- H = e, ie = e, A = Je(), G = { w: 0, h: 0 }, M = null, j = null, E = null, de(null);
4177
+ G = e, se = e, A = Je(), q = { w: 0, h: 0 }, M = null, j = null, E = null, ge(null);
4110
4178
  }
4111
- async function ds() {
4179
+ async function ms() {
4112
4180
  if (!(Ie || !n.dialog || n.dialog.hidden)) {
4113
4181
  Ie = !0, n.recapture.disabled = !0, S(p("status.capturing"), !0), n.dialog.hidden = !0;
4114
4182
  try {
4115
4183
  let e = "";
4116
4184
  try {
4117
- e = await pi();
4185
+ e = await mi();
4118
4186
  } catch {
4119
- e = await Vt(ta());
4187
+ e = await $t(oa());
4120
4188
  }
4121
- aa(e), S("");
4189
+ ia(e), S("");
4122
4190
  } catch (e) {
4123
4191
  S((e == null ? void 0 : e.message) || p("status.screenshotFailed"));
4124
4192
  } finally {
4125
- n.dialog.hidden = !1, n.recapture.disabled = !1, Ie = !1, ge(), ee();
4193
+ n.dialog.hidden = !1, n.recapture.disabled = !1, Ie = !1, he(), te();
4126
4194
  }
4127
4195
  }
4128
4196
  }
4129
- function ps() {
4197
+ function hs() {
4130
4198
  try {
4131
- if (Q || (Q = zi((t) => {
4199
+ if (Q || (Q = ji((t) => {
4132
4200
  const a = n.text.value.trim();
4133
4201
  n.text.value = a ? `${a} ${t}` : t;
4134
4202
  })), !Q.isSupported()) {
4135
4203
  S(p("status.audioUnsupported"));
4136
4204
  return;
4137
4205
  }
4138
- const e = Q.start({ lang: ye() });
4139
- Ue(e), S(e ? p("status.listening") : "");
4206
+ const e = Q.start({ lang: be() });
4207
+ Te(e), S(e ? p("status.listening") : "");
4140
4208
  } catch (e) {
4141
4209
  S(e.message);
4142
4210
  }
4143
4211
  }
4144
- async function gs() {
4212
+ async function fs() {
4145
4213
  if (!d.video) {
4146
4214
  S(p("status.videoDisabled"));
4147
4215
  return;
4148
4216
  }
4149
- n.dialog.hidden = !0, n.stop.hidden = !1, se(), n.launcher.hidden = !0, le = ji({
4217
+ n.dialog.hidden = !0, n.stop.hidden = !1, re(), n.launcher.hidden = !0, le = Pi({
4150
4218
  onStart() {
4151
4219
  },
4152
4220
  onStop(e) {
4153
- K = e, n.stop.hidden = !0, Se(), n.dialog.hidden = !1, ge(), ee(), S(p(e ? "status.videoAttached" : "status.recordingCancelled"));
4221
+ K = e, n.stop.hidden = !0, ze(), n.dialog.hidden = !1, he(), te(), S(p(e ? "status.videoAttached" : "status.recordingCancelled"));
4154
4222
  },
4155
4223
  onError(e) {
4156
4224
  S(e.message);
@@ -4159,30 +4227,30 @@ async function gs() {
4159
4227
  try {
4160
4228
  await le.start();
4161
4229
  } catch (e) {
4162
- n.stop.hidden = !0, Se(), n.dialog.hidden = !1, S(e.message);
4230
+ n.stop.hidden = !0, ze(), n.dialog.hidden = !1, S(e.message);
4163
4231
  }
4164
4232
  }
4165
- function ee() {
4166
- if (n.shot = null, !B()) {
4167
- n.canvas.style.removeProperty("--nf-shot-aspect"), n.canvas.style.removeProperty("aspect-ratio"), n.canvas.innerHTML = K ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(K)}"></video>` : "", ze();
4233
+ function te() {
4234
+ if (n.shot = null, !I()) {
4235
+ n.canvas.style.removeProperty("--nf-shot-aspect"), n.canvas.style.removeProperty("aspect-ratio"), n.canvas.innerHTML = K ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(K)}"></video>` : "", Re();
4168
4236
  return;
4169
4237
  }
4170
- n.canvas.innerHTML = `<div class="nf-shot"><img alt="${x(p("shot.alt"))}" src="${H}" draggable="false"></div>`, n.shot = n.canvas.querySelector(".nf-shot");
4238
+ n.canvas.innerHTML = `<div class="nf-shot"><img alt="${x(p("shot.alt"))}" src="${G}" draggable="false"></div>`, n.shot = n.canvas.querySelector(".nf-shot");
4171
4239
  const e = n.shot.querySelector("img");
4172
4240
  e.draggable = !1, e.addEventListener("dragstart", (a) => a.preventDefault());
4173
4241
  const t = () => {
4174
- ms(e), O();
4242
+ ys(e), O();
4175
4243
  };
4176
- e.addEventListener("load", t), e.complete && e.naturalWidth && t(), ze();
4244
+ e.addEventListener("load", t), e.complete && e.naturalWidth && t(), Re();
4177
4245
  }
4178
- function ms(e) {
4179
- const t = e.naturalWidth || G.w, a = e.naturalHeight || G.h;
4180
- if (t && a && (G = { w: t, h: a }, n.canvas.style.setProperty("--nf-shot-aspect", String(t / a)), n.canvas.style.aspectRatio = `${t} / ${a}`), !n.shot || !G.w || !G.h)
4246
+ function ys(e) {
4247
+ const t = e.naturalWidth || q.w, a = e.naturalHeight || q.h;
4248
+ if (t && a && (q = { w: t, h: a }, n.canvas.style.setProperty("--nf-shot-aspect", String(t / a)), n.canvas.style.aspectRatio = `${t} / ${a}`), !n.shot || !q.w || !q.h)
4181
4249
  return;
4182
- const o = A.crop(), s = G.w / G.h, i = o.w / o.h * s, r = Math.min(1, i / s), l = Math.min(1, s / i);
4250
+ const o = A.crop(), s = q.w / q.h, i = o.w / o.h * s, r = Math.min(1, i / s), l = Math.min(1, s / i);
4183
4251
  n.shot.style.left = `${(1 - r) / 2 * 100}%`, n.shot.style.top = `${(1 - l) / 2 * 100}%`, n.shot.style.width = `${r * 100}%`, n.shot.style.height = `${l * 100}%`, e.style.width = `${100 / o.w}%`, e.style.height = `${100 / o.h}%`, e.style.left = `${-o.x / o.w * 100}%`, e.style.top = `${-o.y / o.h * 100}%`;
4184
4252
  }
4185
- function hs(e) {
4253
+ function vs(e) {
4186
4254
  return e.type === "arrow" ? {
4187
4255
  id: "preview",
4188
4256
  type: "arrow",
@@ -4197,23 +4265,23 @@ function hs(e) {
4197
4265
  id: "preview",
4198
4266
  type: e.type,
4199
4267
  number: "",
4200
- ...Le(e.start, e.current)
4268
+ ...Ue(e.start, e.current)
4201
4269
  };
4202
4270
  }
4203
4271
  function O() {
4204
- if ((n.shot || n.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((i) => i.remove()), !B() || !n.shot) {
4205
- ze();
4272
+ if ((n.shot || n.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((i) => i.remove()), !I() || !n.shot) {
4273
+ Re();
4206
4274
  return;
4207
4275
  }
4208
- const t = A.crop(), a = pe(), o = Nt(a.clientWidth || 400);
4276
+ const t = A.crop(), a = me(), o = Kt(a.clientWidth || 400);
4209
4277
  if (n.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), n.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), n.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), n.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (j == null ? void 0 : j.kind) === "crop") {
4210
4278
  const i = document.createElement("div");
4211
- i.className = "nf-crop", At(i, Le(j.start, j.current), { x: 0, y: 0, w: 1, h: 1 }), n.shot.appendChild(i);
4279
+ i.className = "nf-crop", Ct(i, Ue(j.start, j.current), { x: 0, y: 0, w: 1, h: 1 }), n.shot.appendChild(i);
4212
4280
  }
4213
4281
  const s = A.list().slice();
4214
- if ((j == null ? void 0 : j.kind) === "sticker" && s.push(hs(j)), s.forEach((i) => {
4282
+ if ((j == null ? void 0 : j.kind) === "sticker" && s.push(vs(j)), s.forEach((i) => {
4215
4283
  const r = i.id === "preview", l = !r && i.id === M, u = document.createElement("div");
4216
- if (u.className = `nf-sticker nf-${i.type}`, u.dataset.id = i.id, l && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), i.type === "arrow" ? fs(u, i, t, l, o) : (At(u, i, t), l && ["nw", "ne", "sw", "se"].forEach((c) => Ge(u, c))), !r && i.number) {
4284
+ if (u.className = `nf-sticker nf-${i.type}`, u.dataset.id = i.id, l && (u.dataset.selected = "true"), r && (u.dataset.preview = "true"), i.type === "arrow" ? ks(u, i, t, l, o) : (Ct(u, i, t), l && ["nw", "ne", "sw", "se"].forEach((c) => Ge(u, c))), !r && i.number) {
4217
4285
  const c = document.createElement("span");
4218
4286
  c.className = "nf-badge", c.textContent = String(i.number), u.appendChild(c);
4219
4287
  }
@@ -4222,41 +4290,41 @@ function O() {
4222
4290
  const i = document.createElement("video");
4223
4291
  i.className = "nf-recording-preview", i.controls = !0, i.src = URL.createObjectURL(K), i.style.position = "absolute", i.style.right = "8px", i.style.bottom = "8px", i.style.width = "160px", n.canvas.appendChild(i);
4224
4292
  }
4225
- ze();
4293
+ Re();
4226
4294
  }
4227
- function fs(e, t, a, o, s = Nt(400)) {
4228
- const i = pe(), r = i.clientWidth, l = i.clientHeight, u = (t.x - a.x) / a.w * r, c = (t.y - a.y) / a.h * l, g = ((t.x2 ?? t.x + t.w) - a.x) / a.w * r, v = ((t.y2 ?? t.y) - a.y) / a.h * l, k = Math.max(18, s.arrowHead + s.stroke * 2), w = Math.min(u, g) - k, b = Math.min(c, v) - k, z = Math.max(2, Math.abs(g - u)) + k * 2, R = Math.max(2, Math.abs(v - c)) + k * 2, T = u - w, $ = c - b, P = g - w, m = v - b, C = Ui(T, $, P, m, s), X = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4295
+ function ks(e, t, a, o, s = Kt(400)) {
4296
+ const i = me(), r = i.clientWidth, l = i.clientHeight, u = (t.x - a.x) / a.w * r, c = (t.y - a.y) / a.h * l, g = ((t.x2 ?? t.x + t.w) - a.x) / a.w * r, v = ((t.y2 ?? t.y) - a.y) / a.h * l, k = Math.max(18, s.arrowHead + s.stroke * 2), w = Math.min(u, g) - k, b = Math.min(c, v) - k, z = Math.max(2, Math.abs(g - u)) + k * 2, R = Math.max(2, Math.abs(v - c)) + k * 2, F = u - w, B = c - b, P = g - w, m = v - b, C = Fi(F, B, P, m, s), X = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4229
4297
  e.style.left = `${w}px`, e.style.top = `${b}px`, e.style.width = `${z}px`, e.style.height = `${R}px`, X.setAttribute("class", "nf-arrow-svg"), X.setAttribute("viewBox", `0 0 ${z} ${R}`), X.setAttribute("width", String(z)), X.setAttribute("height", String(R)), X.innerHTML = `
4230
- <line class="nf-arrow-hit" x1="${T}" y1="${$}" x2="${P}" y2="${m}" />
4231
- <line class="nf-arrow-shaft" x1="${T}" y1="${$}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
4298
+ <line class="nf-arrow-hit" x1="${F}" y1="${B}" x2="${P}" y2="${m}" />
4299
+ <line class="nf-arrow-shaft" x1="${F}" y1="${B}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
4232
4300
  <polygon class="nf-arrow-head" points="${C.tipX},${C.tipY} ${C.left.x},${C.left.y} ${C.right.x},${C.right.y}" />
4233
- `, e.appendChild(X), o && (Ge(e, "start", { left: T - 5, top: $ - 5 }), Ge(e, "end", { left: P - 5, top: m - 5 }));
4301
+ `, e.appendChild(X), o && (Ge(e, "start", { left: F - 5, top: B - 5 }), Ge(e, "end", { left: P - 5, top: m - 5 }));
4234
4302
  }
4235
4303
  function Ge(e, t, a) {
4236
4304
  const o = document.createElement("span");
4237
4305
  o.className = "nf-handle", o.dataset.dir = t, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), e.appendChild(o);
4238
4306
  }
4239
- function At(e, t, a) {
4307
+ function Ct(e, t, a) {
4240
4308
  e.style.left = `${(t.x - a.x) / a.w * 100}%`, e.style.top = `${(t.y - a.y) / a.h * 100}%`, e.style.width = `${t.w / a.w * 100}%`, e.style.height = `${t.h / a.h * 100}%`;
4241
4309
  }
4242
- function oa() {
4310
+ function sa() {
4243
4311
  try {
4244
- return String(localStorage.getItem(qt) || "").trim();
4312
+ return String(localStorage.getItem(_t) || "").trim();
4245
4313
  } catch {
4246
4314
  return "";
4247
4315
  }
4248
4316
  }
4249
- function ys(e) {
4317
+ function bs(e) {
4250
4318
  const t = String(e || "").trim();
4251
4319
  if (!(!t || t === qe()))
4252
4320
  try {
4253
- localStorage.setItem(qt, t);
4321
+ localStorage.setItem(_t, t);
4254
4322
  } catch {
4255
4323
  }
4256
4324
  }
4257
- function ia() {
4325
+ function ra() {
4258
4326
  try {
4259
- const e = localStorage.getItem(Wt);
4327
+ const e = localStorage.getItem(Zt);
4260
4328
  if (!e)
4261
4329
  return { diagnostics: !1, logs: !1 };
4262
4330
  const t = JSON.parse(e);
@@ -4268,23 +4336,23 @@ function ia() {
4268
4336
  return { diagnostics: !1, logs: !1 };
4269
4337
  }
4270
4338
  }
4271
- function Ct(e = {}) {
4339
+ function zt(e = {}) {
4272
4340
  const t = {
4273
- ...ia(),
4341
+ ...ra(),
4274
4342
  ...e
4275
4343
  };
4276
4344
  try {
4277
- localStorage.setItem(Wt, JSON.stringify({
4345
+ localStorage.setItem(Zt, JSON.stringify({
4278
4346
  diagnostics: !!t.diagnostics,
4279
4347
  logs: !!t.logs
4280
4348
  }));
4281
4349
  } catch {
4282
4350
  }
4283
4351
  }
4284
- function sa() {
4352
+ function na() {
4285
4353
  return !!(String(N.userId || "").trim() || String(N.email || "").trim() || String(N.displayName || "").trim());
4286
4354
  }
4287
- function ra() {
4355
+ function la() {
4288
4356
  return String(
4289
4357
  N.displayName || N.email || N.userId || ""
4290
4358
  ).trim();
@@ -4292,32 +4360,32 @@ function ra() {
4292
4360
  function qe() {
4293
4361
  return p("form.authorPlaceholder");
4294
4362
  }
4295
- function vs() {
4363
+ function ws() {
4296
4364
  var t;
4297
- if (sa())
4298
- return ra() || qe();
4365
+ if (na())
4366
+ return la() || qe();
4299
4367
  const e = String(((t = n.author) == null ? void 0 : t.value) || "").trim();
4300
- return e ? (ys(e), e) : qe();
4368
+ return e ? (bs(e), e) : qe();
4301
4369
  }
4302
- function na() {
4370
+ function ua() {
4303
4371
  if (!n.author)
4304
4372
  return;
4305
- const e = sa();
4373
+ const e = na();
4306
4374
  if (n.author.hidden = e, e) {
4307
4375
  n.author.value = "";
4308
4376
  return;
4309
4377
  }
4310
- n.author.value = oa();
4378
+ n.author.value = sa();
4311
4379
  }
4312
- function la(e, t = Gt) {
4380
+ function ca(e, t = qt) {
4313
4381
  const a = Number(e);
4314
- return Number.isFinite(a) ? Math.min(Zi, Math.max(0, Math.floor(a))) : t;
4382
+ return Number.isFinite(a) ? Math.min(Yi, Math.max(0, Math.floor(a))) : t;
4315
4383
  }
4316
- function ua(e) {
4317
- e.key !== "Escape" || !n.dialog || n.dialog.hidden || Pe && !xe || re();
4384
+ function da(e) {
4385
+ e.key !== "Escape" || !n.dialog || n.dialog.hidden || de && !pe || ee();
4318
4386
  }
4319
- function ca(e = {}) {
4320
- yi(e);
4387
+ function pa(e = {}) {
4388
+ ki(e);
4321
4389
  const t = Object.prototype.hasOwnProperty.call(e, "kinds");
4322
4390
  d = {
4323
4391
  ...d,
@@ -4327,10 +4395,10 @@ function ca(e = {}) {
4327
4395
  name: e.name == null ? d.name : String(e.name || ""),
4328
4396
  targets: e.targets === void 0 ? d.targets : e.targets,
4329
4397
  hideLauncher: e.hideLauncher == null ? d.hideLauncher : !!e.hideLauncher,
4330
- theme: Zt(e.theme ?? d.theme),
4398
+ theme: Jt(e.theme ?? d.theme),
4331
4399
  video: e.video == null ? d.video : !!e.video,
4332
- consoleLogLimit: e.consoleLogLimit == null ? d.consoleLogLimit : la(e.consoleLogLimit, d.consoleLogLimit),
4333
- kinds: t ? Gi(e.kinds) : d.kinds,
4400
+ consoleLogLimit: e.consoleLogLimit == null ? d.consoleLogLimit : ca(e.consoleLogLimit, d.consoleLogLimit),
4401
+ kinds: t ? _i(e.kinds) : d.kinds,
4334
4402
  kindsCustom: t ? !0 : d.kindsCustom,
4335
4403
  capture: e.capture === void 0 ? d.capture : e.capture,
4336
4404
  onBeforeCapture: e.onBeforeCapture === void 0 ? d.onBeforeCapture : e.onBeforeCapture,
@@ -4341,7 +4409,7 @@ function ca(e = {}) {
4341
4409
  translations: e.translations === void 0 ? d.translations : e.translations && typeof e.translations == "object" ? e.translations : null
4342
4410
  };
4343
4411
  }
4344
- function da(e) {
4412
+ function ga(e) {
4345
4413
  const t = d[e];
4346
4414
  if (typeof t == "function")
4347
4415
  try {
@@ -4350,61 +4418,61 @@ function da(e) {
4350
4418
  console.warn(`Notefully.${e} failed:`, a);
4351
4419
  }
4352
4420
  }
4353
- function ks() {
4421
+ function Ss() {
4354
4422
  return ce;
4355
4423
  }
4356
- function bs() {
4357
- return ye();
4424
+ function As() {
4425
+ return be();
4358
4426
  }
4359
- function ws(e, t) {
4360
- return d.locale = e == null || e === "" ? null : String(e), t !== void 0 && (d.translations = t && typeof t == "object" ? t : null), f ? se() : Jt(), Te;
4427
+ function Cs(e, t) {
4428
+ return d.locale = e == null || e === "" ? null : String(e), t !== void 0 && (d.translations = t && typeof t == "object" ? t : null), y ? re() : Yt(), Fe;
4361
4429
  }
4362
- function et(e = {}) {
4363
- return ca(e), f && se(), Te;
4430
+ function tt(e = {}) {
4431
+ return pa(e), y && re(), Fe;
4364
4432
  }
4365
- function Ss(e = {}) {
4366
- return ca(e), Ye(), se(), Te;
4433
+ function zs(e = {}) {
4434
+ return pa(e), Ye(), re(), Fe;
4367
4435
  }
4368
- function As(e) {
4369
- return et({ theme: e });
4436
+ function Es(e) {
4437
+ return tt({ theme: e });
4370
4438
  }
4371
- function Cs(e) {
4439
+ function js(e) {
4372
4440
  const t = !!e;
4373
- return !t && f && n.dialog && !n.dialog.hidden && re(), et({ hideLauncher: !t });
4441
+ return !t && y && n.dialog && !n.dialog.hidden && ee(), tt({ hideLauncher: !t });
4374
4442
  }
4375
- function zs() {
4376
- const e = ra() || oa() || void 0, t = hi({
4443
+ function Rs() {
4444
+ const e = la() || sa() || void 0, t = yi({
4377
4445
  ...N,
4378
4446
  displayName: N.displayName || e
4379
4447
  });
4380
- V = Vi(t), I = $i(
4381
- Ht.snapshot().slice(-la(d.consoleLogLimit))
4448
+ $ = Bi(t), V = Ni(
4449
+ Gt.snapshot().slice(-ca(d.consoleLogLimit))
4382
4450
  );
4383
- const a = ia();
4384
- a.diagnostics && we(V, !0), a.logs && I.length && we(I, !0), _ = !1;
4451
+ const a = ra();
4452
+ a.diagnostics && Ce($, !0), a.logs && V.length && Ce(V, !0), Z = !1;
4385
4453
  }
4386
- function Ee(e) {
4387
- _ = !!e, n.privacyPanel && (n.privacyPanel.hidden = !_), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", _ ? "true" : "false"), n.privacyChange.dataset.active = String(_)), _ && at();
4454
+ function Pe(e) {
4455
+ Z = !!e, n.privacyPanel && (n.privacyPanel.hidden = !Z), n.privacyChange && (n.privacyChange.setAttribute("aria-expanded", Z ? "true" : "false"), n.privacyChange.dataset.active = String(Z)), Z && ot();
4388
4456
  }
4389
- function tt() {
4457
+ function at() {
4390
4458
  if (!n.privacy || !n.privacyText || !n.privacyChange)
4391
4459
  return;
4392
- const e = Ni({
4393
- diagnostics: V,
4394
- logs: I
4460
+ const e = Hi({
4461
+ diagnostics: $,
4462
+ logs: V
4395
4463
  });
4396
4464
  n.privacyText.textContent = e, n.privacyText.hidden = !e;
4397
- const t = V.length === 0 && I.length === 0;
4465
+ const t = $.length === 0 && V.length === 0;
4398
4466
  n.privacySummary && (n.privacySummary.hidden = t), n.privacy.hidden = t, n.privacyChange.hidden = !1;
4399
4467
  }
4400
- function pa(e, t, a) {
4468
+ function ma(e, t, a) {
4401
4469
  return `<label class="nf-privacy-toggle">
4402
4470
  <span class="nf-privacy-toggle-label">${x(p("privacy.redact"))}</span>
4403
4471
  <input type="checkbox" ${e ? "checked" : ""} ${t ? 'data-indeterminate="true"' : ""} aria-label="${x(a)}">
4404
4472
  </label>`;
4405
4473
  }
4406
- function zt(e, t, a, o, s, i = null) {
4407
- const r = pa(s, !1, `${p("privacy.redact")} ${a}`), l = typeof o == "string" ? o : String(o || "");
4474
+ function Et(e, t, a, o, s, i = null) {
4475
+ const r = ma(s, !1, `${p("privacy.redact")} ${a}`), l = typeof o == "string" ? o : String(o || "");
4408
4476
  if (s) {
4409
4477
  const c = l ? `${a}: ${l}` : a;
4410
4478
  return `<div class="nf-privacy-row" data-kind="${x(e)}" data-id="${x(t)}" data-redacted="true">
@@ -4423,46 +4491,46 @@ function zt(e, t, a, o, s, i = null) {
4423
4491
  ${r}
4424
4492
  </div>`;
4425
4493
  }
4426
- function Et(e, t, a, o) {
4494
+ function jt(e, t, a, o) {
4427
4495
  if (!a.length)
4428
4496
  return "";
4429
- const s = Bi(a), i = s.checked && !s.indeterminate;
4497
+ const s = Ki(a), i = s.checked && !s.indeterminate;
4430
4498
  return `<section class="nf-privacy-section" data-section="${x(e)}"${i ? ' data-redacted="true"' : ""}>
4431
4499
  <div class="nf-privacy-section-head">
4432
4500
  <h3 class="nf-privacy-section-title">${x(t)}</h3>
4433
- ${pa(s.checked, s.indeterminate, `${p("privacy.redact")} ${t}`)}
4501
+ ${ma(s.checked, s.indeterminate, `${p("privacy.redact")} ${t}`)}
4434
4502
  </div>
4435
4503
  <div class="nf-privacy-rows"${i ? " hidden" : ""}>${o}</div>
4436
4504
  </section>`;
4437
4505
  }
4438
- function at() {
4506
+ function ot() {
4439
4507
  if (!n.privacyScroll)
4440
4508
  return;
4441
- const e = V.map((a) => zt(
4509
+ const e = $.map((a) => Et(
4442
4510
  "diagnostic",
4443
4511
  a.key,
4444
4512
  a.label,
4445
- Ki(a.value),
4513
+ Gi(a.value),
4446
4514
  a.redacted
4447
- )).join(""), t = I.map((a) => {
4448
- const o = wi(a);
4449
- return zt(
4515
+ )).join(""), t = V.map((a) => {
4516
+ const o = Ai(a);
4517
+ return Et(
4450
4518
  "log",
4451
4519
  a.id,
4452
4520
  a.level,
4453
4521
  o,
4454
4522
  a.redacted,
4455
- a.redacted ? null : Si(a)
4523
+ a.redacted ? null : Ci(a)
4456
4524
  );
4457
4525
  }).join("");
4458
4526
  n.privacyScroll.innerHTML = [
4459
- Et("diagnostics", p("privacy.section.diagnostics"), V, e),
4460
- I.length ? Et("logs", p("privacy.section.logs"), I, t) : ""
4527
+ jt("diagnostics", p("privacy.section.diagnostics"), $, e),
4528
+ V.length ? jt("logs", p("privacy.section.logs"), V, t) : ""
4461
4529
  ].join(""), n.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4462
4530
  a.indeterminate = !0, a.removeAttribute("data-indeterminate");
4463
- }), tt();
4531
+ }), at();
4464
4532
  }
4465
- function Es(e) {
4533
+ function Ps(e) {
4466
4534
  const t = e.target;
4467
4535
  if (!(t instanceof HTMLInputElement) || t.type !== "checkbox")
4468
4536
  return;
@@ -4470,54 +4538,54 @@ function Es(e) {
4470
4538
  if (o) {
4471
4539
  const i = o.dataset.kind, r = o.dataset.id;
4472
4540
  if (i === "diagnostic") {
4473
- const l = V.find((u) => u.key === r);
4541
+ const l = $.find((u) => u.key === r);
4474
4542
  l && (l.redacted = s);
4475
4543
  } else if (i === "log") {
4476
- const l = I.find((u) => u.id === r);
4544
+ const l = V.find((u) => u.id === r);
4477
4545
  l && (l.redacted = s);
4478
4546
  }
4479
4547
  } else if (a) {
4480
4548
  const i = a.dataset.section;
4481
- i === "diagnostics" ? (we(V, s), Ct({ diagnostics: s })) : i === "logs" && (we(I, s), Ct({ logs: s }));
4549
+ i === "diagnostics" ? (Ce($, s), zt({ diagnostics: s })) : i === "logs" && (Ce(V, s), zt({ logs: s }));
4482
4550
  } else
4483
4551
  return;
4484
- at();
4552
+ ot();
4485
4553
  }
4486
- async function ga() {
4487
- Ye(), ce || (ce = !0, da("onOpen")), ma(), se(), n.launcher.hidden = !0, A = Je(), G = { w: 0, h: 0 }, K = null, H = "", ie = "", M = null, j = null, E = null, J = ts(), Xe(J), de(null), Ue(!1), n.text.value = "", na(), S(""), zs();
4554
+ async function ha() {
4555
+ Ye(), ce || (ce = !0, ga("onOpen")), fa(), re(), n.launcher.hidden = !0, A = Je(), q = { w: 0, h: 0 }, K = null, G = "", se = "", M = null, j = null, E = null, H = is(), Xe(H), ge(null), Te(!1), n.text.value = "", ua(), S(""), Rs();
4488
4556
  try {
4489
- aa(await Vt(ta())), S("");
4557
+ ia(await $t(oa())), S("");
4490
4558
  } catch (t) {
4491
- H = "", S((t == null ? void 0 : t.message) || p("status.screenshotFailed"));
4559
+ G = "", S((t == null ? void 0 : t.message) || p("status.screenshotFailed"));
4492
4560
  }
4493
- ge(), Ee(!1), tt(), n.dialog.hidden = !1, ee(), n.text.focus();
4561
+ he(), Pe(!1), at(), n.dialog.hidden = !1, te(), n.text.focus();
4494
4562
  }
4495
- function re() {
4496
- if (!f)
4563
+ function ee() {
4564
+ if (!y)
4497
4565
  return;
4498
4566
  const e = ce;
4499
- Q == null || Q.stop(), Ue(!1), Qt(), j = null, E = null, Qe(!1), ma(), Ee(!1), n.dialog.hidden = !0, n.stop.hidden = !0, Se(), e && (ce = !1, da("onClose"));
4567
+ Q == null || Q.stop(), Te(!1), ta(), j = null, E = null, et(!1), fa(), Pe(!1), n.dialog.hidden = !0, n.stop.hidden = !0, ze(), e && (ce = !1, ga("onClose"));
4500
4568
  }
4501
- function js(e = "") {
4569
+ function xs(e = "") {
4502
4570
  const t = n.dialog, a = n.panel, o = n.panelBody, s = n.successMsg, i = n.successLink, r = String(e || "").trim(), l = !!(d.displayLink && r);
4503
4571
  if (!t || !a || !o || !s)
4504
4572
  return Promise.resolve(!1);
4505
- Pe = !0, xe = l, S("");
4573
+ de = !0, pe = l, S("");
4506
4574
  const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, c = a.getBoundingClientRect();
4507
4575
  if (o.hidden = !0, s.hidden = !1, t.classList.add("nf-success"), t.classList.toggle("nf-success-sticky", l), t.style.opacity = "1", i && (l ? (i.hidden = !1, i.href = r) : (i.hidden = !0, i.removeAttribute("href"))), l) {
4508
4576
  if (u)
4509
4577
  return Promise.resolve(!0);
4510
4578
  const w = a.getBoundingClientRect(), b = w.width > 0 ? c.width / w.width : 1, z = w.height > 0 ? c.height / w.height : 1;
4511
4579
  return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${b}, ${z})`, a.getBoundingClientRect(), new Promise((R) => {
4512
- let T = !1;
4513
- const $ = () => {
4514
- T || (T = !0, a.removeEventListener("transitionend", P), R(!0));
4580
+ let F = !1;
4581
+ const B = () => {
4582
+ F || (F = !0, a.removeEventListener("transitionend", P), R(!0));
4515
4583
  }, P = (m) => {
4516
- m.target !== a || m.propertyName !== "transform" || $();
4584
+ m.target !== a || m.propertyName !== "transform" || B();
4517
4585
  };
4518
4586
  a.addEventListener("transitionend", P), requestAnimationFrame(() => {
4519
4587
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
4520
- }), window.setTimeout($, 700);
4588
+ }), window.setTimeout(B, 700);
4521
4589
  });
4522
4590
  }
4523
4591
  if (u)
@@ -4531,47 +4599,47 @@ function js(e = "") {
4531
4599
  b || (b = !0, a.removeEventListener("transitionend", R), window.setTimeout(() => {
4532
4600
  t.style.transition = "opacity 0.28s ease", t.style.opacity = "0", window.setTimeout(() => w(!1), 280);
4533
4601
  }, 1e3));
4534
- }, R = (T) => {
4535
- T.target !== a || T.propertyName !== "transform" || z();
4602
+ }, R = (F) => {
4603
+ F.target !== a || F.propertyName !== "transform" || z();
4536
4604
  };
4537
4605
  a.addEventListener("transitionend", R), requestAnimationFrame(() => {
4538
4606
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
4539
4607
  }), window.setTimeout(z, 700);
4540
4608
  });
4541
4609
  }
4542
- function ma() {
4543
- Pe = !1, xe = !1, n.dialog && (n.dialog.classList.remove("nf-success", "nf-success-sticky"), n.dialog.style.opacity = "", n.dialog.style.transition = "", n.panel && (n.panel.style.transform = "", n.panel.style.transition = "", n.panel.style.transformOrigin = ""), n.panelBody && (n.panelBody.hidden = !1), n.successMsg && (n.successMsg.hidden = !0), n.successLink && (n.successLink.hidden = !0, n.successLink.removeAttribute("href")));
4610
+ function fa() {
4611
+ de = !1, pe = !1, n.dialog && (n.dialog.classList.remove("nf-success", "nf-success-sticky"), n.dialog.style.opacity = "", n.dialog.style.transition = "", n.panel && (n.panel.style.transform = "", n.panel.style.transition = "", n.panel.style.transformOrigin = ""), n.panelBody && (n.panelBody.hidden = !1), n.successMsg && (n.successMsg.hidden = !0), n.successLink && (n.successLink.hidden = !0, n.successLink.removeAttribute("href")));
4544
4612
  }
4545
- function Rs(e = {}) {
4546
- N = { ...N, ...fi(e) }, na();
4613
+ function Ls(e = {}) {
4614
+ N = { ...N, ...vi(e) }, ua();
4547
4615
  }
4548
- async function ha() {
4616
+ async function ya() {
4549
4617
  var t, a;
4550
4618
  if (Ye(), Ve)
4551
4619
  return null;
4552
4620
  const e = n.text.value.trim();
4553
- if (!e && !B() && !K)
4621
+ if (!e && !I() && !K)
4554
4622
  return S(p("status.emptyReport")), null;
4555
4623
  if (!d.endpoint || !d.projectKey)
4556
4624
  return S(p("status.missingConfig")), null;
4557
- Ve = !0, jt(!0), S(p("status.submitting"), !0);
4625
+ Ve = !0, Rt(!0), S(p("status.submitting"), !0);
4558
4626
  try {
4559
- const o = vs(), s = A.crop(), i = A.list(), r = A.isCropped(), l = r ? Pi(i, s) : i, u = r ? { x: 0, y: 0, w: 1, h: 1 } : s, c = Hi({
4627
+ const o = ws(), s = A.crop(), i = A.list(), r = A.isCropped(), l = r ? Li(i, s) : i, u = r ? { x: 0, y: 0, w: 1, h: 1 } : s, c = qi({
4560
4628
  author: o,
4561
- diagnostics: V,
4562
- logs: I
4629
+ diagnostics: $,
4630
+ logs: V
4563
4631
  }), g = {
4564
4632
  width: typeof screen < "u" ? screen.width : null,
4565
4633
  height: typeof screen < "u" ? screen.height : null,
4566
4634
  dpr: window.devicePixelRatio || 1
4567
4635
  }, v = [];
4568
4636
  let k = 2048, w = null, b = null;
4569
- B() && (b = await vt(H, {
4637
+ I() && (b = await kt(G, {
4570
4638
  crop: r ? s : { x: 0, y: 0, w: 1, h: 1 },
4571
4639
  maxEdge: k
4572
4640
  }));
4573
4641
  for (let z = 1; z <= 3; z += 1) {
4574
- const R = z === 3 || !b, T = R ? {
4642
+ const R = z === 3 || !b, F = R ? {
4575
4643
  ...b ? { width: b.width, height: b.height, mime: b.mime } : {},
4576
4644
  attempt: z,
4577
4645
  omitted: !0
@@ -4580,17 +4648,17 @@ async function ha() {
4580
4648
  height: b.height,
4581
4649
  mime: b.mime,
4582
4650
  attempt: z
4583
- }, $ = {
4651
+ }, B = {
4584
4652
  ...c,
4585
4653
  screen: g,
4586
- screenshotMeta: T
4654
+ screenshotMeta: F
4587
4655
  };
4588
- R && B() && ($.screenshotError = {
4656
+ R && I() && (B.screenshotError = {
4589
4657
  message: (w == null ? void 0 : w.message) || "Screenshot omitted after failed uploads",
4590
4658
  attempts: [...v]
4591
4659
  });
4592
4660
  const P = new FormData();
4593
- P.append("message", e), P.append("kind", J), P.append("version", d.version || "0.0.0"), P.append("author", o), d.name && P.append("name", d.name), P.append("context", JSON.stringify($)), P.append("annotations", JSON.stringify(l)), P.append("crop", JSON.stringify(u)), Array.isArray(d.targets) && P.append("targets", JSON.stringify(d.targets)), !R && b && P.append("screenshot", b.blob, `screenshot.${b.ext}`), K && P.append("recording", K, "recording.webm");
4661
+ P.append("message", e), P.append("kind", H), P.append("version", d.version || "0.0.0"), P.append("author", o), d.name && P.append("name", d.name), P.append("context", JSON.stringify(B)), P.append("annotations", JSON.stringify(l)), P.append("crop", JSON.stringify(u)), Array.isArray(d.targets) && P.append("targets", JSON.stringify(d.targets)), !R && b && P.append("screenshot", b.blob, `screenshot.${b.ext}`), K && P.append("recording", K, "recording.webm");
4594
4662
  try {
4595
4663
  const m = await fetch(`${d.endpoint}/v1/reports`, {
4596
4664
  method: "POST",
@@ -4609,7 +4677,7 @@ async function ha() {
4609
4677
  const ne = new Error((C == null ? void 0 : C.error) || `${p("status.submitFailed")} (${m.status})`);
4610
4678
  throw ne.status = m.status, ne.code = C == null ? void 0 : C.code, ne.json = C, ne;
4611
4679
  }
4612
- return R && B() && S(p("status.submitWithoutImage"), !0), await js((C == null ? void 0 : C.trackerUrl) || "") || re(), C;
4680
+ return R && I() && S(p("status.submitWithoutImage"), !0), await xs((C == null ? void 0 : C.trackerUrl) || "") || ee(), C;
4613
4681
  } catch (m) {
4614
4682
  if (w = m, v.push({
4615
4683
  attempt: z,
@@ -4619,10 +4687,10 @@ async function ha() {
4619
4687
  message: String((m == null ? void 0 : m.message) || m)
4620
4688
  }), R || !b)
4621
4689
  throw S(((t = m == null ? void 0 : m.json) == null ? void 0 : t.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
4622
- if (!Oi(m, (m == null ? void 0 : m.json) || null))
4690
+ if (!Mi(m, (m == null ? void 0 : m.json) || null))
4623
4691
  throw S(((a = m == null ? void 0 : m.json) == null ? void 0 : a.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
4624
4692
  if (z === 1) {
4625
- S(p("status.submitTooLarge"), !0), k = Fi(k), b = await vt(H, {
4693
+ S(p("status.submitTooLarge"), !0), k = Oi(k), b = await kt(G, {
4626
4694
  crop: r ? s : { x: 0, y: 0, w: 1, h: 1 },
4627
4695
  maxEdge: k
4628
4696
  });
@@ -4633,42 +4701,42 @@ async function ha() {
4633
4701
  }
4634
4702
  throw w || new Error(p("status.submitFailed"));
4635
4703
  } finally {
4636
- Ve = !1, jt(!1);
4704
+ Ve = !1, Rt(!1);
4637
4705
  }
4638
4706
  }
4639
- function jt(e) {
4707
+ function Rt(e) {
4640
4708
  n.submit && (n.submit.disabled = !!e, n.submit.setAttribute("aria-busy", e ? "true" : "false"));
4641
4709
  }
4642
- function Ps() {
4643
- re(), document.removeEventListener("keydown", ua), f == null || f.remove(), f = null, n = {};
4644
- }
4645
- const Te = {
4646
- init: Ss,
4647
- configure: et,
4648
- setTheme: As,
4649
- setVisible: Cs,
4650
- open: ga,
4651
- close: re,
4652
- isOpen: ks,
4653
- getLocale: bs,
4654
- setLocale: ws,
4655
- identify: Rs,
4656
- submit: ha,
4657
- destroy: Ps
4710
+ function Us() {
4711
+ ee(), document.removeEventListener("keydown", da), y == null || y.remove(), y = null, n = {};
4712
+ }
4713
+ const Fe = {
4714
+ init: zs,
4715
+ configure: tt,
4716
+ setTheme: Es,
4717
+ setVisible: js,
4718
+ open: ha,
4719
+ close: ee,
4720
+ isOpen: Ss,
4721
+ getLocale: As,
4722
+ setLocale: Cs,
4723
+ identify: Ls,
4724
+ submit: ya,
4725
+ destroy: Us
4658
4726
  };
4659
- typeof window < "u" && (window.Notefully = Te);
4727
+ typeof window < "u" && (window.Notefully = Fe);
4660
4728
  export {
4661
- re as close,
4662
- et as configure,
4663
- Te as default,
4664
- Ps as destroy,
4665
- bs as getLocaleTag,
4666
- Rs as identify,
4667
- Ss as init,
4668
- ks as isOpen,
4669
- ga as open,
4670
- ws as setLocale,
4671
- As as setTheme,
4672
- Cs as setVisible,
4673
- ha as submit
4729
+ ee as close,
4730
+ tt as configure,
4731
+ Fe as default,
4732
+ Us as destroy,
4733
+ As as getLocaleTag,
4734
+ Ls as identify,
4735
+ zs as init,
4736
+ Ss as isOpen,
4737
+ ha as open,
4738
+ Cs as setLocale,
4739
+ Es as setTheme,
4740
+ js as setVisible,
4741
+ ya as submit
4674
4742
  };