@makefully/notefully 0.2.16 → 0.2.17

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 jt = {
1
+ const Pt = {
2
2
  "launcher.open": "Leave a note…",
3
3
  "tool.crop": "Crop",
4
4
  "tool.resetCrop": "Reset crop",
@@ -70,16 +70,18 @@ const jt = {
70
70
  "diag.language": "Language",
71
71
  "diag.timezone": "Timezone",
72
72
  "diag.viewport": "Viewport",
73
- "diag.user": "User"
74
- }, Pt = {
75
- "en-US": jt
76
- }, _t = {
73
+ "diag.screen": "Screen",
74
+ "diag.user": "User",
75
+ "diag.platform": "Platform"
76
+ }, Lt = {
77
+ "en-US": Pt
78
+ }, Gt = {
77
79
  en: "en-US",
78
80
  no: "nb",
79
81
  tl: "fil",
80
82
  "zh-Hans": "zh-CN",
81
83
  "zh-Hant": "zh-TW"
82
- }, Ha = {
84
+ }, Za = {
83
85
  "es-MX": ["es-419", "es"],
84
86
  "es-AR": ["es-419", "es"],
85
87
  "es-CL": ["es-419", "es"],
@@ -99,34 +101,34 @@ const jt = {
99
101
  "es-DO": ["es-419", "es"],
100
102
  "es-PR": ["es-419", "es"],
101
103
  "es-CU": ["es-419", "es"]
102
- }, _a = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
103
- let yt = "en-US", Xe = {};
104
- function w(t, e) {
105
- !t || !e || typeof e != "object" || (Pt[String(t)] = e);
104
+ }, Ya = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
105
+ let vt = "en-US", ta = {};
106
+ function k(t, e) {
107
+ !t || !e || typeof e != "object" || (Lt[String(t)] = e);
106
108
  }
107
- function pt(t) {
109
+ function gt(t) {
108
110
  return String(t || "").trim().replace(/_/g, "-");
109
111
  }
110
- function Ga(t) {
111
- const e = pt(t);
112
+ function Xa(t) {
113
+ const e = gt(t);
112
114
  if (!e)
113
115
  return ["en-US"];
114
- const a = e, o = _t[a] || _t[a.toLowerCase()] || a, i = [], n = (l) => {
116
+ const a = e, o = Gt[a] || Gt[a.toLowerCase()] || a, i = [], n = (l) => {
115
117
  l && !i.includes(l) && i.push(l);
116
118
  };
117
119
  n(o);
118
- for (const [l, c] of Object.entries(Ha))
120
+ for (const [l, c] of Object.entries(Za))
119
121
  l.toLowerCase() === o.toLowerCase() && c.forEach(n);
120
- const s = o.split("-");
121
- for (let l = s.length - 1; l >= 1; l -= 1)
122
- n(s.slice(0, l).join("-"));
123
- return n(_t[s[0]] || s[0]), n("en-US"), i;
124
- }
125
- function qa(t) {
126
- for (const e of Ga(t)) {
127
- if (Pt[e])
122
+ const r = o.split("-");
123
+ for (let l = r.length - 1; l >= 1; l -= 1)
124
+ n(r.slice(0, l).join("-"));
125
+ return n(Gt[r[0]] || r[0]), n("en-US"), i;
126
+ }
127
+ function Ja(t) {
128
+ for (const e of Xa(t)) {
129
+ if (Lt[e])
128
130
  return e;
129
- const a = Object.keys(Pt).find(
131
+ const a = Object.keys(Lt).find(
130
132
  (o) => o.toLowerCase() === e.toLowerCase()
131
133
  );
132
134
  if (a)
@@ -134,36 +136,36 @@ function qa(t) {
134
136
  }
135
137
  return "en-US";
136
138
  }
137
- function Wa(t = {}) {
139
+ function Qa(t = {}) {
138
140
  var e;
139
141
  if (t.locale != null && String(t.locale).trim())
140
- return pt(t.locale);
142
+ return gt(t.locale);
141
143
  if (typeof document < "u") {
142
144
  const a = (e = document.documentElement) == null ? void 0 : e.lang;
143
145
  if (a && String(a).trim())
144
- return pt(a);
146
+ return gt(a);
145
147
  }
146
- return typeof navigator < "u" && navigator.language ? pt(navigator.language) : "en-US";
148
+ return typeof navigator < "u" && navigator.language ? gt(navigator.language) : "en-US";
147
149
  }
148
- function Za(t, e) {
149
- return t != null && (yt = pt(t) || "en-US"), yt;
150
+ function to(t, e) {
151
+ return t != null && (vt = gt(t) || "en-US"), vt;
150
152
  }
151
- function Ya(t) {
152
- Xe = t && typeof t == "object" ? { ...t } : {};
153
+ function eo(t) {
154
+ ta = t && typeof t == "object" ? { ...t } : {};
153
155
  }
154
- function Lt() {
155
- return yt;
156
+ function xt() {
157
+ return vt;
156
158
  }
157
- function Xa(t = yt) {
158
- const e = pt(t).split("-")[0].toLowerCase();
159
- return _a.has(e) ? "rtl" : "ltr";
159
+ function ao(t = vt) {
160
+ const e = gt(t).split("-")[0].toLowerCase();
161
+ return Ya.has(e) ? "rtl" : "ltr";
160
162
  }
161
- function g(t, e) {
162
- const a = String(t || ""), o = qa(yt), i = Pt[o] || jt;
163
- let n = Xe[a] ?? i[a] ?? jt[a] ?? a;
164
- return e && typeof e == "object" && (n = String(n).replace(/\{(\w+)\}/g, (s, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(n);
163
+ function m(t, e) {
164
+ const a = String(t || ""), o = Ja(vt), i = Lt[o] || Pt;
165
+ let n = ta[a] ?? i[a] ?? Pt[a] ?? a;
166
+ return e && typeof e == "object" && (n = String(n).replace(/\{(\w+)\}/g, (r, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(n);
165
167
  }
166
- const Ja = {
168
+ const oo = {
167
169
  "launcher.open": "Оставете бележка...",
168
170
  "tool.crop": "Реколта",
169
171
  "tool.resetCrop": "Нулиране на изрязването",
@@ -220,7 +222,7 @@ const Ja = {
220
222
  "diag.timezone": "Часова зона",
221
223
  "diag.viewport": "Изгледна плоча",
222
224
  "diag.user": "Потребител"
223
- }, Qa = {
225
+ }, io = {
224
226
  "launcher.open": "Deixa una nota...",
225
227
  "tool.crop": "Cultiu",
226
228
  "tool.resetCrop": "Restablir el cultiu",
@@ -277,7 +279,7 @@ const Ja = {
277
279
  "diag.timezone": "Zona horària",
278
280
  "diag.viewport": "Porta de vista",
279
281
  "diag.user": "Usuari"
280
- }, to = {
282
+ }, no = {
281
283
  "launcher.open": "Zanechte poznámku...",
282
284
  "tool.crop": "Oříznout",
283
285
  "tool.resetCrop": "Obnovit oříznutí",
@@ -334,7 +336,7 @@ const Ja = {
334
336
  "diag.timezone": "Časové pásmo",
335
337
  "diag.viewport": "Výřez",
336
338
  "diag.user": "Uživatel"
337
- }, eo = {
339
+ }, ro = {
338
340
  "launcher.open": "Efterlad en note...",
339
341
  "tool.crop": "Afgrøde",
340
342
  "tool.resetCrop": "Nulstil afgrøde",
@@ -391,7 +393,7 @@ const Ja = {
391
393
  "diag.timezone": "Tidszone",
392
394
  "diag.viewport": "Viewport",
393
395
  "diag.user": "Bruger"
394
- }, ao = {
396
+ }, so = {
395
397
  "launcher.open": "Hinterlassen Sie eine Notiz...",
396
398
  "tool.crop": "Ernte",
397
399
  "tool.resetCrop": "Zuschnitt zurücksetzen",
@@ -448,7 +450,7 @@ const Ja = {
448
450
  "diag.timezone": "Zeitzone",
449
451
  "diag.viewport": "Sichtfenster",
450
452
  "diag.user": "Nutzer"
451
- }, oo = {
453
+ }, lo = {
452
454
  "launcher.open": "Αφήστε ένα σημείωμα...",
453
455
  "tool.crop": "Καλλιέργεια",
454
456
  "tool.resetCrop": "Επαναφορά της καλλιέργειας",
@@ -505,7 +507,7 @@ const Ja = {
505
507
  "diag.timezone": "Ζώνη ώρας",
506
508
  "diag.viewport": "Θύρα προβολής",
507
509
  "diag.user": "Χρήστης"
508
- }, io = {
510
+ }, co = {
509
511
  "launcher.open": "Leave a note…",
510
512
  "tool.crop": "Crop",
511
513
  "tool.resetCrop": "Reset crop",
@@ -578,7 +580,7 @@ const Ja = {
578
580
  "diag.timezone": "Timezone",
579
581
  "diag.viewport": "Viewport",
580
582
  "diag.user": "User"
581
- }, no = {
583
+ }, uo = {
582
584
  "launcher.open": "Deja una nota...",
583
585
  "tool.crop": "Cultivo",
584
586
  "tool.resetCrop": "Restablecer cultivo",
@@ -635,7 +637,7 @@ const Ja = {
635
637
  "diag.timezone": "Zona horaria",
636
638
  "diag.viewport": "Ventana",
637
639
  "diag.user": "Usuario"
638
- }, ro = {
640
+ }, po = {
639
641
  "launcher.open": "Deja una nota...",
640
642
  "tool.crop": "Cultivo",
641
643
  "tool.resetCrop": "Restablecer recorte",
@@ -692,7 +694,7 @@ const Ja = {
692
694
  "diag.timezone": "Zona horaria",
693
695
  "diag.viewport": "ViEWPORT",
694
696
  "diag.user": "Usuario"
695
- }, so = {
697
+ }, go = {
696
698
  "launcher.open": "Jäta märkus...",
697
699
  "tool.crop": "Põllukultuur",
698
700
  "tool.resetCrop": "Lähtesta põllukultuur",
@@ -749,7 +751,7 @@ const Ja = {
749
751
  "diag.timezone": "Ajavöönd",
750
752
  "diag.viewport": "Vaatenurk",
751
753
  "diag.user": "Kasutaja"
752
- }, lo = {
754
+ }, mo = {
753
755
  "launcher.open": "Jätä muistiinpano...",
754
756
  "tool.crop": "Viljely",
755
757
  "tool.resetCrop": "Nollaa rajaus",
@@ -806,7 +808,7 @@ const Ja = {
806
808
  "diag.timezone": "Aikavyöhyke",
807
809
  "diag.viewport": "Näyttöikkuna",
808
810
  "diag.user": "Käyttäjä"
809
- }, co = {
811
+ }, ho = {
810
812
  "launcher.open": "Laissez un message...",
811
813
  "tool.crop": "Récolte",
812
814
  "tool.resetCrop": "Réinitialiser la récolte",
@@ -863,7 +865,7 @@ const Ja = {
863
865
  "diag.timezone": "Fuseau horaire",
864
866
  "diag.viewport": "Viewport",
865
867
  "diag.user": "Utilisateur"
866
- }, uo = {
868
+ }, fo = {
867
869
  "launcher.open": "एक नोट छोड़ें...",
868
870
  "tool.crop": "क्रॉप",
869
871
  "tool.resetCrop": "क्रॉप रीसेट करें",
@@ -920,7 +922,7 @@ const Ja = {
920
922
  "diag.timezone": "टाइमज़ोन",
921
923
  "diag.viewport": "व्यूपोर्ट",
922
924
  "diag.user": "यूज़र"
923
- }, po = {
925
+ }, yo = {
924
926
  "launcher.open": "Ostavite poruku...",
925
927
  "tool.crop": "Usjev",
926
928
  "tool.resetCrop": "Resetirajte obrezivanje",
@@ -977,7 +979,7 @@ const Ja = {
977
979
  "diag.timezone": "Vremenska zona",
978
980
  "diag.viewport": "Prikaznica",
979
981
  "diag.user": "Korisnik"
980
- }, go = {
982
+ }, vo = {
981
983
  "launcher.open": "Hagyjon egy jegyzetet...",
982
984
  "tool.crop": "Termés",
983
985
  "tool.resetCrop": "Vágás visszaállítása",
@@ -1034,7 +1036,7 @@ const Ja = {
1034
1036
  "diag.timezone": "Időzóna",
1035
1037
  "diag.viewport": "Nézetablak",
1036
1038
  "diag.user": "Felhasználó"
1037
- }, mo = {
1039
+ }, bo = {
1038
1040
  "launcher.open": "Tinggalkan catatan...",
1039
1041
  "tool.crop": "Panas",
1040
1042
  "tool.resetCrop": "Setel ulang tanaman",
@@ -1091,7 +1093,7 @@ const Ja = {
1091
1093
  "diag.timezone": "Zona Waktu",
1092
1094
  "diag.viewport": "Pintu pandang",
1093
1095
  "diag.user": "Pengguna"
1094
- }, ho = {
1096
+ }, ko = {
1095
1097
  "launcher.open": "Lascia una nota...",
1096
1098
  "tool.crop": "Ritaglia",
1097
1099
  "tool.resetCrop": "Reimposta il ritaglio",
@@ -1148,7 +1150,7 @@ const Ja = {
1148
1150
  "diag.timezone": "Fuso orario",
1149
1151
  "diag.viewport": "Viewport",
1150
1152
  "diag.user": "Utente"
1151
- }, fo = {
1153
+ }, wo = {
1152
1154
  "launcher.open": "メモを残してください...",
1153
1155
  "tool.crop": "クロップ",
1154
1156
  "tool.resetCrop": "トリミングをリセット",
@@ -1205,7 +1207,7 @@ const Ja = {
1205
1207
  "diag.timezone": "タイムゾーン",
1206
1208
  "diag.viewport": "ビューポート",
1207
1209
  "diag.user": "ユーザ"
1208
- }, yo = {
1210
+ }, So = {
1209
1211
  "launcher.open": "메모 남기기...",
1210
1212
  "tool.crop": "크롭",
1211
1213
  "tool.resetCrop": "크롭 재설정",
@@ -1262,7 +1264,7 @@ const Ja = {
1262
1264
  "diag.timezone": "타임존",
1263
1265
  "diag.viewport": "뷰포트",
1264
1266
  "diag.user": "사용자"
1265
- }, vo = {
1267
+ }, Ao = {
1266
1268
  "launcher.open": "Palikite pastabą...",
1267
1269
  "tool.crop": "Apkarpyti",
1268
1270
  "tool.resetCrop": "Iš naujo nustatyti apkarpymą",
@@ -1319,7 +1321,7 @@ const Ja = {
1319
1321
  "diag.timezone": "Laiko juosta",
1320
1322
  "diag.viewport": "Peržiūros sritis",
1321
1323
  "diag.user": "Vartotojas"
1322
- }, ko = {
1324
+ }, Co = {
1323
1325
  "launcher.open": "Atstājiet piezīmi...",
1324
1326
  "tool.crop": "Kultūraugs",
1325
1327
  "tool.resetCrop": "Atiestatīt apgriešanu",
@@ -1376,7 +1378,7 @@ const Ja = {
1376
1378
  "diag.timezone": "Laika josla",
1377
1379
  "diag.viewport": "Skatu laukums",
1378
1380
  "diag.user": "Lietotājs"
1379
- }, bo = {
1381
+ }, Eo = {
1380
1382
  "launcher.open": "Legg igjen et notat...",
1381
1383
  "tool.crop": "Beskjæring",
1382
1384
  "tool.resetCrop": "Tilbakestill beskjæring",
@@ -1433,7 +1435,7 @@ const Ja = {
1433
1435
  "diag.timezone": "Tidssone",
1434
1436
  "diag.viewport": "Visningsport",
1435
1437
  "diag.user": "Bruker"
1436
- }, wo = {
1438
+ }, zo = {
1437
1439
  "launcher.open": "Laat een briefje achter...",
1438
1440
  "tool.crop": "Gewas",
1439
1441
  "tool.resetCrop": "Bijsnijden opnieuw instellen",
@@ -1490,7 +1492,7 @@ const Ja = {
1490
1492
  "diag.timezone": "Tijdzone",
1491
1493
  "diag.viewport": "Viewport",
1492
1494
  "diag.user": "Gebruiker"
1493
- }, So = {
1495
+ }, Ro = {
1494
1496
  "launcher.open": "Zostaw notatkę...",
1495
1497
  "tool.crop": "Uprawa",
1496
1498
  "tool.resetCrop": "Resetuj kadrowanie",
@@ -1547,7 +1549,7 @@ const Ja = {
1547
1549
  "diag.timezone": "Strefa czasowa",
1548
1550
  "diag.viewport": "rzutnia",
1549
1551
  "diag.user": "Użytkownik"
1550
- }, Ao = {
1552
+ }, jo = {
1551
1553
  "launcher.open": "Deixe uma nota...",
1552
1554
  "tool.crop": "Colheita",
1553
1555
  "tool.resetCrop": "Redefinir o corte",
@@ -1604,7 +1606,7 @@ const Ja = {
1604
1606
  "diag.timezone": "Fuso horário",
1605
1607
  "diag.viewport": "Janela de visualização",
1606
1608
  "diag.user": "Usuário"
1607
- }, Co = {
1609
+ }, Po = {
1608
1610
  "launcher.open": "Deixe uma nota...",
1609
1611
  "tool.crop": "Colheita",
1610
1612
  "tool.resetCrop": "Redefinir o recorte",
@@ -1661,7 +1663,7 @@ const Ja = {
1661
1663
  "diag.timezone": "Fuso horário",
1662
1664
  "diag.viewport": "Viewport",
1663
1665
  "diag.user": "Utilizador"
1664
- }, Eo = {
1666
+ }, Lo = {
1665
1667
  "launcher.open": "Lăsați o notă...",
1666
1668
  "tool.crop": "Cultură",
1667
1669
  "tool.resetCrop": "Resetați recolta",
@@ -1718,7 +1720,7 @@ const Ja = {
1718
1720
  "diag.timezone": "Fus orar",
1719
1721
  "diag.viewport": "Portul de vizualizare",
1720
1722
  "diag.user": "Utilizator"
1721
- }, zo = {
1723
+ }, xo = {
1722
1724
  "launcher.open": "Оставьте заметку...",
1723
1725
  "tool.crop": "урожай",
1724
1726
  "tool.resetCrop": "Сбросить урожай",
@@ -1775,7 +1777,7 @@ const Ja = {
1775
1777
  "diag.timezone": "Часовой пояс",
1776
1778
  "diag.viewport": "окно просмотра",
1777
1779
  "diag.user": "Пользователь"
1778
- }, Ro = {
1780
+ }, Uo = {
1779
1781
  "launcher.open": "Zanechať poznámku...",
1780
1782
  "tool.crop": "Oplodina",
1781
1783
  "tool.resetCrop": "Obnoviť orezanie",
@@ -1832,7 +1834,7 @@ const Ja = {
1832
1834
  "diag.timezone": "Časové pásmo",
1833
1835
  "diag.viewport": "Zobrazenie",
1834
1836
  "diag.user": "Používateľ"
1835
- }, jo = {
1837
+ }, Fo = {
1836
1838
  "launcher.open": "Pustite opombo...",
1837
1839
  "tool.crop": "Pridelek",
1838
1840
  "tool.resetCrop": "Ponastavi obrezovanje",
@@ -1889,7 +1891,7 @@ const Ja = {
1889
1891
  "diag.timezone": "Časovni pas",
1890
1892
  "diag.viewport": "Razgledna plošča",
1891
1893
  "diag.user": "Uporabnik"
1892
- }, Po = {
1894
+ }, To = {
1893
1895
  "launcher.open": "Ostavite belešku...",
1894
1896
  "tool.crop": "Usjev",
1895
1897
  "tool.resetCrop": "Resetujte usev",
@@ -1946,7 +1948,7 @@ const Ja = {
1946
1948
  "diag.timezone": "Vremenska zona",
1947
1949
  "diag.viewport": "Viedport",
1948
1950
  "diag.user": "Korisnik"
1949
- }, Lo = {
1951
+ }, Mo = {
1950
1952
  "launcher.open": "Lämna en anteckning...",
1951
1953
  "tool.crop": "Skörda",
1952
1954
  "tool.resetCrop": "Återställ beskärning",
@@ -2003,7 +2005,7 @@ const Ja = {
2003
2005
  "diag.timezone": "Tidszon",
2004
2006
  "diag.viewport": "Viewport",
2005
2007
  "diag.user": "Användare"
2006
- }, xo = {
2008
+ }, Oo = {
2007
2009
  "launcher.open": "Mag-iwan ng tala...",
2008
2010
  "tool.crop": "Pag-ani",
2009
2011
  "tool.resetCrop": "I-reset ang panani",
@@ -2060,7 +2062,7 @@ const Ja = {
2060
2062
  "diag.timezone": "Timesone",
2061
2063
  "diag.viewport": "Viewport",
2062
2064
  "diag.user": "Gumagamit"
2063
- }, Uo = {
2065
+ }, Do = {
2064
2066
  "launcher.open": "ทิ้งหมายเหตุ...",
2065
2067
  "tool.crop": "พืชผล",
2066
2068
  "tool.resetCrop": "รีเซ็ตการตัดพืช",
@@ -2117,7 +2119,7 @@ const Ja = {
2117
2119
  "diag.timezone": "เขตเวลา",
2118
2120
  "diag.viewport": "พอร์ตมุมมอง",
2119
2121
  "diag.user": "ผู้ใช้"
2120
- }, To = {
2122
+ }, Io = {
2121
2123
  "launcher.open": "Bir not bırakın...",
2122
2124
  "tool.crop": "Mahsul",
2123
2125
  "tool.resetCrop": "Kırpmayı sıfırla",
@@ -2174,7 +2176,7 @@ const Ja = {
2174
2176
  "diag.timezone": "Saat dilimi",
2175
2177
  "diag.viewport": "Görünüm noktası",
2176
2178
  "diag.user": "Kullanıcı"
2177
- }, Fo = {
2179
+ }, $o = {
2178
2180
  "launcher.open": "Залиште записку...",
2179
2181
  "tool.crop": "Урожай",
2180
2182
  "tool.resetCrop": "Скинути обрізку",
@@ -2231,7 +2233,7 @@ const Ja = {
2231
2233
  "diag.timezone": "Часовий пояс",
2232
2234
  "diag.viewport": "Вигляд",
2233
2235
  "diag.user": "Користувач"
2234
- }, Mo = {
2236
+ }, Vo = {
2235
2237
  "launcher.open": "Để lại một ghi chú...",
2236
2238
  "tool.crop": "Cây trồng",
2237
2239
  "tool.resetCrop": "Đặt lại cây trồng",
@@ -2288,7 +2290,7 @@ const Ja = {
2288
2290
  "diag.timezone": "Múi giờ",
2289
2291
  "diag.viewport": "Cổng quan sát",
2290
2292
  "diag.user": "Người dùng"
2291
- }, Do = {
2293
+ }, Bo = {
2292
2294
  "launcher.open": "留个笔记...",
2293
2295
  "tool.crop": "作物",
2294
2296
  "tool.resetCrop": "重置裁剪",
@@ -2345,7 +2347,7 @@ const Ja = {
2345
2347
  "diag.timezone": "时区",
2346
2348
  "diag.viewport": "视口",
2347
2349
  "diag.user": "用户"
2348
- }, Io = {
2350
+ }, No = {
2349
2351
  "launcher.open": "留下筆記...",
2350
2352
  "tool.crop": "作物",
2351
2353
  "tool.resetCrop": "重設裁切",
@@ -2403,47 +2405,47 @@ const Ja = {
2403
2405
  "diag.viewport": "視埠",
2404
2406
  "diag.user": "使用者"
2405
2407
  };
2406
- w("en-US", jt);
2407
- w("bg", Ja);
2408
- w("ca", Qa);
2409
- w("cs", to);
2410
- w("da", eo);
2411
- w("de", ao);
2412
- w("el", oo);
2413
- w("en-GB", io);
2414
- w("es", no);
2415
- w("es-419", ro);
2416
- w("et", so);
2417
- w("fi", lo);
2418
- w("fr", co);
2419
- w("hi", uo);
2420
- w("hr", po);
2421
- w("hu", go);
2422
- w("id", mo);
2423
- w("it", ho);
2424
- w("ja", fo);
2425
- w("ko", yo);
2426
- w("lt", vo);
2427
- w("lv", ko);
2428
- w("nb", bo);
2429
- w("nl", wo);
2430
- w("pl", So);
2431
- w("pt-BR", Ao);
2432
- w("pt-PT", Co);
2433
- w("ro", Eo);
2434
- w("ru", zo);
2435
- w("sk", Ro);
2436
- w("sl", jo);
2437
- w("sr", Po);
2438
- w("sv", Lo);
2439
- w("fil", xo);
2440
- w("th", Uo);
2441
- w("tr", To);
2442
- w("uk", Fo);
2443
- w("vi", Mo);
2444
- w("zh-CN", Do);
2445
- w("zh-TW", Io);
2446
- function Oo(t, e) {
2408
+ k("en-US", Pt);
2409
+ k("bg", oo);
2410
+ k("ca", io);
2411
+ k("cs", no);
2412
+ k("da", ro);
2413
+ k("de", so);
2414
+ k("el", lo);
2415
+ k("en-GB", co);
2416
+ k("es", uo);
2417
+ k("es-419", po);
2418
+ k("et", go);
2419
+ k("fi", mo);
2420
+ k("fr", ho);
2421
+ k("hi", fo);
2422
+ k("hr", yo);
2423
+ k("hu", vo);
2424
+ k("id", bo);
2425
+ k("it", ko);
2426
+ k("ja", wo);
2427
+ k("ko", So);
2428
+ k("lt", Ao);
2429
+ k("lv", Co);
2430
+ k("nb", Eo);
2431
+ k("nl", zo);
2432
+ k("pl", Ro);
2433
+ k("pt-BR", jo);
2434
+ k("pt-PT", Po);
2435
+ k("ro", Lo);
2436
+ k("ru", xo);
2437
+ k("sk", Uo);
2438
+ k("sl", Fo);
2439
+ k("sr", To);
2440
+ k("sv", Mo);
2441
+ k("fil", Oo);
2442
+ k("th", Do);
2443
+ k("tr", Io);
2444
+ k("uk", $o);
2445
+ k("vi", Vo);
2446
+ k("zh-CN", Bo);
2447
+ k("zh-TW", No);
2448
+ function Ko(t, e) {
2447
2449
  if (t.match(/^[a-z]+:\/\//i))
2448
2450
  return t;
2449
2451
  if (t.match(/^\/\//))
@@ -2453,7 +2455,7 @@ function Oo(t, e) {
2453
2455
  const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), i = a.createElement("a");
2454
2456
  return a.head.appendChild(o), a.body.appendChild(i), e && (o.href = e), i.href = t, i.href;
2455
2457
  }
2456
- const $o = /* @__PURE__ */ (() => {
2458
+ const Ho = /* @__PURE__ */ (() => {
2457
2459
  let t = 0;
2458
2460
  const e = () => (
2459
2461
  // eslint-disable-next-line no-bitwise
@@ -2467,27 +2469,27 @@ function et(t) {
2467
2469
  e.push(t[a]);
2468
2470
  return e;
2469
2471
  }
2470
- let st = null;
2471
- function Je(t = {}) {
2472
- return st || (t.includeStyleProperties ? (st = t.includeStyleProperties, st) : (st = et(window.getComputedStyle(document.documentElement)), st));
2472
+ let lt = null;
2473
+ function ea(t = {}) {
2474
+ return lt || (t.includeStyleProperties ? (lt = t.includeStyleProperties, lt) : (lt = et(window.getComputedStyle(document.documentElement)), lt));
2473
2475
  }
2474
- function xt(t, e) {
2476
+ function Ut(t, e) {
2475
2477
  const o = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
2476
2478
  return o ? parseFloat(o.replace("px", "")) : 0;
2477
2479
  }
2478
- function Vo(t) {
2479
- const e = xt(t, "border-left-width"), a = xt(t, "border-right-width");
2480
+ function _o(t) {
2481
+ const e = Ut(t, "border-left-width"), a = Ut(t, "border-right-width");
2480
2482
  return t.clientWidth + e + a;
2481
2483
  }
2482
- function Bo(t) {
2483
- const e = xt(t, "border-top-width"), a = xt(t, "border-bottom-width");
2484
+ function Go(t) {
2485
+ const e = Ut(t, "border-top-width"), a = Ut(t, "border-bottom-width");
2484
2486
  return t.clientHeight + e + a;
2485
2487
  }
2486
- function Qe(t, e = {}) {
2487
- const a = e.width || Vo(t), o = e.height || Bo(t);
2488
+ function aa(t, e = {}) {
2489
+ const a = e.width || _o(t), o = e.height || Go(t);
2488
2490
  return { width: a, height: o };
2489
2491
  }
2490
- function No() {
2492
+ function qo() {
2491
2493
  let t, e;
2492
2494
  try {
2493
2495
  e = process;
@@ -2496,11 +2498,11 @@ function No() {
2496
2498
  const a = e && e.env ? e.env.devicePixelRatio : null;
2497
2499
  return a && (t = parseInt(a, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
2498
2500
  }
2499
- const F = 16384;
2500
- function Ko(t) {
2501
- (t.width > F || t.height > F) && (t.width > F && t.height > F ? t.width > t.height ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F) : t.width > F ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F));
2501
+ const M = 16384;
2502
+ function Wo(t) {
2503
+ (t.width > M || t.height > M) && (t.width > M && t.height > M ? t.width > t.height ? (t.height *= M / t.width, t.width = M) : (t.width *= M / t.height, t.height = M) : t.width > M ? (t.height *= M / t.width, t.width = M) : (t.width *= M / t.height, t.height = M));
2502
2504
  }
2503
- function Ut(t) {
2505
+ function Ft(t) {
2504
2506
  return new Promise((e, a) => {
2505
2507
  const o = new Image();
2506
2508
  o.onload = () => {
@@ -2510,12 +2512,12 @@ function Ut(t) {
2510
2512
  }, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = t;
2511
2513
  });
2512
2514
  }
2513
- async function Ho(t) {
2515
+ async function Zo(t) {
2514
2516
  return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
2515
2517
  }
2516
- async function _o(t, e, a) {
2518
+ async function Yo(t, e, a) {
2517
2519
  const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), n = document.createElementNS(o, "foreignObject");
2518
- return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("externalResourcesRequired", "true"), i.appendChild(n), n.appendChild(t), Ho(i);
2520
+ return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("externalResourcesRequired", "true"), i.appendChild(n), n.appendChild(t), Zo(i);
2519
2521
  }
2520
2522
  const T = (t, e) => {
2521
2523
  if (t instanceof e)
@@ -2523,162 +2525,162 @@ const T = (t, e) => {
2523
2525
  const a = Object.getPrototypeOf(t);
2524
2526
  return a === null ? !1 : a.constructor.name === e.name || T(a, e);
2525
2527
  };
2526
- function Go(t) {
2528
+ function Xo(t) {
2527
2529
  const e = t.getPropertyValue("content");
2528
2530
  return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
2529
2531
  }
2530
- function qo(t, e) {
2531
- return Je(e).map((a) => {
2532
+ function Jo(t, e) {
2533
+ return ea(e).map((a) => {
2532
2534
  const o = t.getPropertyValue(a), i = t.getPropertyPriority(a);
2533
2535
  return `${a}: ${o}${i ? " !important" : ""};`;
2534
2536
  }).join(" ");
2535
2537
  }
2536
- function Wo(t, e, a, o) {
2537
- const i = `.${t}:${e}`, n = a.cssText ? Go(a) : qo(a, o);
2538
+ function Qo(t, e, a, o) {
2539
+ const i = `.${t}:${e}`, n = a.cssText ? Xo(a) : Jo(a, o);
2538
2540
  return document.createTextNode(`${i}{${n}}`);
2539
2541
  }
2540
- function we(t, e, a, o) {
2542
+ function Ae(t, e, a, o) {
2541
2543
  const i = window.getComputedStyle(t, a), n = i.getPropertyValue("content");
2542
2544
  if (n === "" || n === "none")
2543
2545
  return;
2544
- const s = $o();
2546
+ const r = Ho();
2545
2547
  try {
2546
- e.className = `${e.className} ${s}`;
2548
+ e.className = `${e.className} ${r}`;
2547
2549
  } catch {
2548
2550
  return;
2549
2551
  }
2550
2552
  const l = document.createElement("style");
2551
- l.appendChild(Wo(s, a, i, o)), e.appendChild(l);
2553
+ l.appendChild(Qo(r, a, i, o)), e.appendChild(l);
2552
2554
  }
2553
- function Zo(t, e, a) {
2554
- we(t, e, ":before", a), we(t, e, ":after", a);
2555
+ function ti(t, e, a) {
2556
+ Ae(t, e, ":before", a), Ae(t, e, ":after", a);
2555
2557
  }
2556
- const Se = "application/font-woff", Ae = "image/jpeg", Yo = {
2557
- woff: Se,
2558
- woff2: Se,
2558
+ const Ce = "application/font-woff", Ee = "image/jpeg", ei = {
2559
+ woff: Ce,
2560
+ woff2: Ce,
2559
2561
  ttf: "application/font-truetype",
2560
2562
  eot: "application/vnd.ms-fontobject",
2561
2563
  png: "image/png",
2562
- jpg: Ae,
2563
- jpeg: Ae,
2564
+ jpg: Ee,
2565
+ jpeg: Ee,
2564
2566
  gif: "image/gif",
2565
2567
  tiff: "image/tiff",
2566
2568
  svg: "image/svg+xml",
2567
2569
  webp: "image/webp"
2568
2570
  };
2569
- function Xo(t) {
2571
+ function ai(t) {
2570
2572
  const e = /\.([^./]*?)$/g.exec(t);
2571
2573
  return e ? e[1] : "";
2572
2574
  }
2573
- function re(t) {
2574
- const e = Xo(t).toLowerCase();
2575
- return Yo[e] || "";
2575
+ function le(t) {
2576
+ const e = ai(t).toLowerCase();
2577
+ return ei[e] || "";
2576
2578
  }
2577
- function Jo(t) {
2579
+ function oi(t) {
2578
2580
  return t.split(/,/)[1];
2579
2581
  }
2580
- function Xt(t) {
2582
+ function Jt(t) {
2581
2583
  return t.search(/^(data:)/) !== -1;
2582
2584
  }
2583
- function Qo(t, e) {
2585
+ function ii(t, e) {
2584
2586
  return `data:${e};base64,${t}`;
2585
2587
  }
2586
- async function ta(t, e, a) {
2588
+ async function oa(t, e, a) {
2587
2589
  const o = await fetch(t, e);
2588
2590
  if (o.status === 404)
2589
2591
  throw new Error(`Resource "${o.url}" not found`);
2590
2592
  const i = await o.blob();
2591
- return new Promise((n, s) => {
2593
+ return new Promise((n, r) => {
2592
2594
  const l = new FileReader();
2593
- l.onerror = s, l.onloadend = () => {
2595
+ l.onerror = r, l.onloadend = () => {
2594
2596
  try {
2595
2597
  n(a({ res: o, result: l.result }));
2596
2598
  } catch (c) {
2597
- s(c);
2599
+ r(c);
2598
2600
  }
2599
2601
  }, l.readAsDataURL(i);
2600
2602
  });
2601
2603
  }
2602
- const Gt = {};
2603
- function ti(t, e, a) {
2604
+ const qt = {};
2605
+ function ni(t, e, a) {
2604
2606
  let o = t.replace(/\?.*/, "");
2605
2607
  return a && (o = t), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), e ? `[${e}]${o}` : o;
2606
2608
  }
2607
- async function se(t, e, a) {
2608
- const o = ti(t, e, a.includeQueryParams);
2609
- if (Gt[o] != null)
2610
- return Gt[o];
2609
+ async function ce(t, e, a) {
2610
+ const o = ni(t, e, a.includeQueryParams);
2611
+ if (qt[o] != null)
2612
+ return qt[o];
2611
2613
  a.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
2612
2614
  let i;
2613
2615
  try {
2614
- const n = await ta(t, a.fetchRequestInit, ({ res: s, result: l }) => (e || (e = s.headers.get("Content-Type") || ""), Jo(l)));
2615
- i = Qo(n, e);
2616
+ const n = await oa(t, a.fetchRequestInit, ({ res: r, result: l }) => (e || (e = r.headers.get("Content-Type") || ""), oi(l)));
2617
+ i = ii(n, e);
2616
2618
  } catch (n) {
2617
2619
  i = a.imagePlaceholder || "";
2618
- let s = `Failed to fetch resource: ${t}`;
2619
- n && (s = typeof n == "string" ? n : n.message), s && console.warn(s);
2620
+ let r = `Failed to fetch resource: ${t}`;
2621
+ n && (r = typeof n == "string" ? n : n.message), r && console.warn(r);
2620
2622
  }
2621
- return Gt[o] = i, i;
2623
+ return qt[o] = i, i;
2622
2624
  }
2623
- async function ei(t) {
2625
+ async function ri(t) {
2624
2626
  const e = t.toDataURL();
2625
- return e === "data:," ? t.cloneNode(!1) : Ut(e);
2627
+ return e === "data:," ? t.cloneNode(!1) : Ft(e);
2626
2628
  }
2627
- async function ai(t, e) {
2629
+ async function si(t, e) {
2628
2630
  if (t.currentSrc) {
2629
- const n = document.createElement("canvas"), s = n.getContext("2d");
2630
- n.width = t.clientWidth, n.height = t.clientHeight, s == null || s.drawImage(t, 0, 0, n.width, n.height);
2631
+ const n = document.createElement("canvas"), r = n.getContext("2d");
2632
+ n.width = t.clientWidth, n.height = t.clientHeight, r == null || r.drawImage(t, 0, 0, n.width, n.height);
2631
2633
  const l = n.toDataURL();
2632
- return Ut(l);
2634
+ return Ft(l);
2633
2635
  }
2634
- const a = t.poster, o = re(a), i = await se(a, o, e);
2635
- return Ut(i);
2636
+ const a = t.poster, o = le(a), i = await ce(a, o, e);
2637
+ return Ft(i);
2636
2638
  }
2637
- async function oi(t, e) {
2639
+ async function li(t, e) {
2638
2640
  var a;
2639
2641
  try {
2640
2642
  if (!((a = t == null ? void 0 : t.contentDocument) === null || a === void 0) && a.body)
2641
- return await Bt(t.contentDocument.body, e, !0);
2643
+ return await Nt(t.contentDocument.body, e, !0);
2642
2644
  } catch {
2643
2645
  }
2644
2646
  return t.cloneNode(!1);
2645
2647
  }
2646
- async function ii(t, e) {
2647
- return T(t, HTMLCanvasElement) ? ei(t) : T(t, HTMLVideoElement) ? ai(t, e) : T(t, HTMLIFrameElement) ? oi(t, e) : t.cloneNode(ea(t));
2648
+ async function ci(t, e) {
2649
+ return T(t, HTMLCanvasElement) ? ri(t) : T(t, HTMLVideoElement) ? si(t, e) : T(t, HTMLIFrameElement) ? li(t, e) : t.cloneNode(ia(t));
2648
2650
  }
2649
- const ni = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", ea = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
2650
- async function ri(t, e, a) {
2651
+ const ui = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", ia = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
2652
+ async function di(t, e, a) {
2651
2653
  var o, i;
2652
- if (ea(e))
2654
+ if (ia(e))
2653
2655
  return e;
2654
2656
  let n = [];
2655
- return ni(t) && t.assignedNodes ? n = et(t.assignedNodes()) : T(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? n = et(t.contentDocument.body.childNodes) : n = et(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), n.length === 0 || T(t, HTMLVideoElement) || await n.reduce((s, l) => s.then(() => Bt(l, a)).then((c) => {
2657
+ return ui(t) && t.assignedNodes ? n = et(t.assignedNodes()) : T(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? n = et(t.contentDocument.body.childNodes) : n = et(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), n.length === 0 || T(t, HTMLVideoElement) || await n.reduce((r, l) => r.then(() => Nt(l, a)).then((c) => {
2656
2658
  c && e.appendChild(c);
2657
2659
  }), Promise.resolve()), e;
2658
2660
  }
2659
- function si(t, e, a) {
2661
+ function pi(t, e, a) {
2660
2662
  const o = e.style;
2661
2663
  if (!o)
2662
2664
  return;
2663
2665
  const i = window.getComputedStyle(t);
2664
- i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Je(a).forEach((n) => {
2665
- let s = i.getPropertyValue(n);
2666
- n === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), T(t, HTMLIFrameElement) && n === "display" && s === "inline" && (s = "block"), n === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`), o.setProperty(n, s, i.getPropertyPriority(n));
2666
+ i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : ea(a).forEach((n) => {
2667
+ let r = i.getPropertyValue(n);
2668
+ n === "font-size" && r.endsWith("px") && (r = `${Math.floor(parseFloat(r.substring(0, r.length - 2))) - 0.1}px`), T(t, HTMLIFrameElement) && n === "display" && r === "inline" && (r = "block"), n === "d" && e.getAttribute("d") && (r = `path(${e.getAttribute("d")})`), o.setProperty(n, r, i.getPropertyPriority(n));
2667
2669
  });
2668
2670
  }
2669
- function li(t, e) {
2671
+ function gi(t, e) {
2670
2672
  T(t, HTMLTextAreaElement) && (e.innerHTML = t.value), T(t, HTMLInputElement) && e.setAttribute("value", t.value);
2671
2673
  }
2672
- function ci(t, e) {
2674
+ function mi(t, e) {
2673
2675
  if (T(t, HTMLSelectElement)) {
2674
2676
  const o = Array.from(e.children).find((i) => t.value === i.getAttribute("value"));
2675
2677
  o && o.setAttribute("selected", "");
2676
2678
  }
2677
2679
  }
2678
- function ui(t, e, a) {
2679
- return T(e, Element) && (si(t, e, a), Zo(t, e, a), li(t, e), ci(t, e)), e;
2680
+ function hi(t, e, a) {
2681
+ return T(e, Element) && (pi(t, e, a), ti(t, e, a), gi(t, e), mi(t, e)), e;
2680
2682
  }
2681
- async function di(t, e) {
2683
+ async function fi(t, e) {
2682
2684
  const a = t.querySelectorAll ? t.querySelectorAll("use") : [];
2683
2685
  if (a.length === 0)
2684
2686
  return t;
@@ -2687,46 +2689,46 @@ async function di(t, e) {
2687
2689
  const l = a[n].getAttribute("xlink:href");
2688
2690
  if (l) {
2689
2691
  const c = t.querySelector(l), d = document.querySelector(l);
2690
- !c && d && !o[l] && (o[l] = await Bt(d, e, !0));
2692
+ !c && d && !o[l] && (o[l] = await Nt(d, e, !0));
2691
2693
  }
2692
2694
  }
2693
2695
  const i = Object.values(o);
2694
2696
  if (i.length) {
2695
- const n = "http://www.w3.org/1999/xhtml", s = document.createElementNS(n, "svg");
2696
- s.setAttribute("xmlns", n), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
2697
+ const n = "http://www.w3.org/1999/xhtml", r = document.createElementNS(n, "svg");
2698
+ r.setAttribute("xmlns", n), r.style.position = "absolute", r.style.width = "0", r.style.height = "0", r.style.overflow = "hidden", r.style.display = "none";
2697
2699
  const l = document.createElementNS(n, "defs");
2698
- s.appendChild(l);
2700
+ r.appendChild(l);
2699
2701
  for (let c = 0; c < i.length; c++)
2700
2702
  l.appendChild(i[c]);
2701
- t.appendChild(s);
2703
+ t.appendChild(r);
2702
2704
  }
2703
2705
  return t;
2704
2706
  }
2705
- async function Bt(t, e, a) {
2706
- return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => ii(o, e)).then((o) => ri(t, o, e)).then((o) => ui(t, o, e)).then((o) => di(o, e));
2707
+ async function Nt(t, e, a) {
2708
+ return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => ci(o, e)).then((o) => di(t, o, e)).then((o) => hi(t, o, e)).then((o) => fi(o, e));
2707
2709
  }
2708
- const aa = /url\((['"]?)([^'"]+?)\1\)/g, pi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2709
- function mi(t) {
2710
+ const na = /url\((['"]?)([^'"]+?)\1\)/g, yi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, vi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
2711
+ function bi(t) {
2710
2712
  const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
2711
2713
  return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
2712
2714
  }
2713
- function hi(t) {
2715
+ function ki(t) {
2714
2716
  const e = [];
2715
- return t.replace(aa, (a, o, i) => (e.push(i), a)), e.filter((a) => !Xt(a));
2717
+ return t.replace(na, (a, o, i) => (e.push(i), a)), e.filter((a) => !Jt(a));
2716
2718
  }
2717
- async function fi(t, e, a, o, i) {
2719
+ async function wi(t, e, a, o, i) {
2718
2720
  try {
2719
- const n = a ? Oo(e, a) : e, s = re(e);
2721
+ const n = a ? Ko(e, a) : e, r = le(e);
2720
2722
  let l;
2721
- return i || (l = await se(n, s, o)), t.replace(mi(e), `$1${l}$3`);
2723
+ return i || (l = await ce(n, r, o)), t.replace(bi(e), `$1${l}$3`);
2722
2724
  } catch {
2723
2725
  }
2724
2726
  return t;
2725
2727
  }
2726
- function yi(t, { preferredFontFormat: e }) {
2727
- return e ? t.replace(gi, (a) => {
2728
+ function Si(t, { preferredFontFormat: e }) {
2729
+ return e ? t.replace(vi, (a) => {
2728
2730
  for (; ; ) {
2729
- const [o, , i] = pi.exec(a) || [];
2731
+ const [o, , i] = yi.exec(a) || [];
2730
2732
  if (!i)
2731
2733
  return "";
2732
2734
  if (i === e)
@@ -2734,52 +2736,52 @@ function yi(t, { preferredFontFormat: e }) {
2734
2736
  }
2735
2737
  }) : t;
2736
2738
  }
2737
- function oa(t) {
2738
- return t.search(aa) !== -1;
2739
+ function ra(t) {
2740
+ return t.search(na) !== -1;
2739
2741
  }
2740
- async function ia(t, e, a) {
2741
- if (!oa(t))
2742
+ async function sa(t, e, a) {
2743
+ if (!ra(t))
2742
2744
  return t;
2743
- const o = yi(t, a);
2744
- return hi(o).reduce((n, s) => n.then((l) => fi(l, s, e, a)), Promise.resolve(o));
2745
+ const o = Si(t, a);
2746
+ return ki(o).reduce((n, r) => n.then((l) => wi(l, r, e, a)), Promise.resolve(o));
2745
2747
  }
2746
- async function lt(t, e, a) {
2748
+ async function ct(t, e, a) {
2747
2749
  var o;
2748
2750
  const i = (o = e.style) === null || o === void 0 ? void 0 : o.getPropertyValue(t);
2749
2751
  if (i) {
2750
- const n = await ia(i, null, a);
2752
+ const n = await sa(i, null, a);
2751
2753
  return e.style.setProperty(t, n, e.style.getPropertyPriority(t)), !0;
2752
2754
  }
2753
2755
  return !1;
2754
2756
  }
2755
- async function vi(t, e) {
2756
- await lt("background", t, e) || await lt("background-image", t, e), await lt("mask", t, e) || await lt("-webkit-mask", t, e) || await lt("mask-image", t, e) || await lt("-webkit-mask-image", t, e);
2757
+ async function Ai(t, e) {
2758
+ await ct("background", t, e) || await ct("background-image", t, e), await ct("mask", t, e) || await ct("-webkit-mask", t, e) || await ct("mask-image", t, e) || await ct("-webkit-mask-image", t, e);
2757
2759
  }
2758
- async function ki(t, e) {
2760
+ async function Ci(t, e) {
2759
2761
  const a = T(t, HTMLImageElement);
2760
- if (!(a && !Xt(t.src)) && !(T(t, SVGImageElement) && !Xt(t.href.baseVal)))
2762
+ if (!(a && !Jt(t.src)) && !(T(t, SVGImageElement) && !Jt(t.href.baseVal)))
2761
2763
  return;
2762
- const o = a ? t.src : t.href.baseVal, i = await se(o, re(o), e);
2763
- await new Promise((n, s) => {
2764
+ const o = a ? t.src : t.href.baseVal, i = await ce(o, le(o), e);
2765
+ await new Promise((n, r) => {
2764
2766
  t.onload = n, t.onerror = e.onImageErrorHandler ? (...c) => {
2765
2767
  try {
2766
2768
  n(e.onImageErrorHandler(...c));
2767
2769
  } catch (d) {
2768
- s(d);
2770
+ r(d);
2769
2771
  }
2770
- } : s;
2772
+ } : r;
2771
2773
  const l = t;
2772
2774
  l.decode && (l.decode = n), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
2773
2775
  });
2774
2776
  }
2775
- async function bi(t, e) {
2776
- const o = et(t.childNodes).map((i) => na(i, e));
2777
+ async function Ei(t, e) {
2778
+ const o = et(t.childNodes).map((i) => la(i, e));
2777
2779
  await Promise.all(o).then(() => t);
2778
2780
  }
2779
- async function na(t, e) {
2780
- T(t, Element) && (await vi(t, e), await ki(t, e), await bi(t, e));
2781
+ async function la(t, e) {
2782
+ T(t, Element) && (await Ai(t, e), await Ci(t, e), await Ei(t, e));
2781
2783
  }
2782
- function wi(t, e) {
2784
+ function zi(t, e) {
2783
2785
  const { style: a } = t;
2784
2786
  e.backgroundColor && (a.backgroundColor = e.backgroundColor), e.width && (a.width = `${e.width}px`), e.height && (a.height = `${e.height}px`);
2785
2787
  const o = e.style;
@@ -2787,23 +2789,23 @@ function wi(t, e) {
2787
2789
  a[i] = o[i];
2788
2790
  }), t;
2789
2791
  }
2790
- const Ce = {};
2791
- async function Ee(t) {
2792
- let e = Ce[t];
2792
+ const ze = {};
2793
+ async function Re(t) {
2794
+ let e = ze[t];
2793
2795
  if (e != null)
2794
2796
  return e;
2795
2797
  const o = await (await fetch(t)).text();
2796
- return e = { url: t, cssText: o }, Ce[t] = e, e;
2798
+ return e = { url: t, cssText: o }, ze[t] = e, e;
2797
2799
  }
2798
- async function ze(t, e) {
2800
+ async function je(t, e) {
2799
2801
  let a = t.cssText;
2800
- const o = /url\(["']?([^"')]+)["']?\)/g, n = (a.match(/url\([^)]+\)/g) || []).map(async (s) => {
2801
- let l = s.replace(o, "$1");
2802
- return l.startsWith("https://") || (l = new URL(l, t.url).href), ta(l, e.fetchRequestInit, ({ result: c }) => (a = a.replace(s, `url(${c})`), [s, c]));
2802
+ const o = /url\(["']?([^"')]+)["']?\)/g, n = (a.match(/url\([^)]+\)/g) || []).map(async (r) => {
2803
+ let l = r.replace(o, "$1");
2804
+ return l.startsWith("https://") || (l = new URL(l, t.url).href), oa(l, e.fetchRequestInit, ({ result: c }) => (a = a.replace(r, `url(${c})`), [r, c]));
2803
2805
  });
2804
2806
  return Promise.all(n).then(() => a);
2805
2807
  }
2806
- function Re(t) {
2808
+ function Pe(t) {
2807
2809
  if (t == null)
2808
2810
  return [];
2809
2811
  const e = [], a = /(\/\*[\s\S]*?\*\/)/gi;
@@ -2816,7 +2818,7 @@ function Re(t) {
2816
2818
  e.push(c[0]);
2817
2819
  }
2818
2820
  o = o.replace(i, "");
2819
- const n = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(s, "gi");
2821
+ const n = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, r = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(r, "gi");
2820
2822
  for (; ; ) {
2821
2823
  let c = n.exec(o);
2822
2824
  if (c === null) {
@@ -2829,15 +2831,15 @@ function Re(t) {
2829
2831
  }
2830
2832
  return e;
2831
2833
  }
2832
- async function Si(t, e) {
2834
+ async function Ri(t, e) {
2833
2835
  const a = [], o = [];
2834
2836
  return t.forEach((i) => {
2835
2837
  if ("cssRules" in i)
2836
2838
  try {
2837
- et(i.cssRules || []).forEach((n, s) => {
2839
+ et(i.cssRules || []).forEach((n, r) => {
2838
2840
  if (n.type === CSSRule.IMPORT_RULE) {
2839
- let l = s + 1;
2840
- const c = n.href, d = Ee(c).then((m) => ze(m, e)).then((m) => Re(m).forEach((S) => {
2841
+ let l = r + 1;
2842
+ const c = n.href, d = Re(c).then((h) => je(h, e)).then((h) => Pe(h).forEach((S) => {
2841
2843
  try {
2842
2844
  i.insertRule(S, S.startsWith("@import") ? l += 1 : i.cssRules.length);
2843
2845
  } catch (v) {
@@ -2846,16 +2848,16 @@ async function Si(t, e) {
2846
2848
  error: v
2847
2849
  });
2848
2850
  }
2849
- })).catch((m) => {
2850
- console.error("Error loading remote css", m.toString());
2851
+ })).catch((h) => {
2852
+ console.error("Error loading remote css", h.toString());
2851
2853
  });
2852
2854
  o.push(d);
2853
2855
  }
2854
2856
  });
2855
2857
  } catch (n) {
2856
- const s = t.find((l) => l.href == null) || document.styleSheets[0];
2857
- i.href != null && o.push(Ee(i.href).then((l) => ze(l, e)).then((l) => Re(l).forEach((c) => {
2858
- s.insertRule(c, s.cssRules.length);
2858
+ const r = t.find((l) => l.href == null) || document.styleSheets[0];
2859
+ i.href != null && o.push(Re(i.href).then((l) => je(l, e)).then((l) => Pe(l).forEach((c) => {
2860
+ r.insertRule(c, r.cssRules.length);
2859
2861
  })).catch((l) => {
2860
2862
  console.error("Error loading remote stylesheet", l);
2861
2863
  })), console.error("Error inlining remote css file", n);
@@ -2871,60 +2873,60 @@ async function Si(t, e) {
2871
2873
  }
2872
2874
  }), a));
2873
2875
  }
2874
- function Ai(t) {
2875
- return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => oa(e.style.getPropertyValue("src")));
2876
+ function ji(t) {
2877
+ return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => ra(e.style.getPropertyValue("src")));
2876
2878
  }
2877
- async function Ci(t, e) {
2879
+ async function Pi(t, e) {
2878
2880
  if (t.ownerDocument == null)
2879
2881
  throw new Error("Provided element is not within a Document");
2880
- const a = et(t.ownerDocument.styleSheets), o = await Si(a, e);
2881
- return Ai(o);
2882
+ const a = et(t.ownerDocument.styleSheets), o = await Ri(a, e);
2883
+ return ji(o);
2882
2884
  }
2883
- function ra(t) {
2885
+ function ca(t) {
2884
2886
  return t.trim().replace(/["']/g, "");
2885
2887
  }
2886
- function Ei(t) {
2888
+ function Li(t) {
2887
2889
  const e = /* @__PURE__ */ new Set();
2888
2890
  function a(o) {
2889
2891
  (o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((n) => {
2890
- e.add(ra(n));
2892
+ e.add(ca(n));
2891
2893
  }), Array.from(o.children).forEach((n) => {
2892
2894
  n instanceof HTMLElement && a(n);
2893
2895
  });
2894
2896
  }
2895
2897
  return a(t), e;
2896
2898
  }
2897
- async function zi(t, e) {
2898
- const a = await Ci(t, e), o = Ei(t);
2899
- return (await Promise.all(a.filter((n) => o.has(ra(n.style.fontFamily))).map((n) => {
2900
- const s = n.parentStyleSheet ? n.parentStyleSheet.href : null;
2901
- return ia(n.cssText, s, e);
2899
+ async function xi(t, e) {
2900
+ const a = await Pi(t, e), o = Li(t);
2901
+ return (await Promise.all(a.filter((n) => o.has(ca(n.style.fontFamily))).map((n) => {
2902
+ const r = n.parentStyleSheet ? n.parentStyleSheet.href : null;
2903
+ return sa(n.cssText, r, e);
2902
2904
  }))).join(`
2903
2905
  `);
2904
2906
  }
2905
- async function Ri(t, e) {
2906
- const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await zi(t, e);
2907
+ async function Ui(t, e) {
2908
+ const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await xi(t, e);
2907
2909
  if (a) {
2908
2910
  const o = document.createElement("style"), i = document.createTextNode(a);
2909
2911
  o.appendChild(i), t.firstChild ? t.insertBefore(o, t.firstChild) : t.appendChild(o);
2910
2912
  }
2911
2913
  }
2912
- async function ji(t, e = {}) {
2913
- const { width: a, height: o } = Qe(t, e), i = await Bt(t, e, !0);
2914
- return await Ri(i, e), await na(i, e), wi(i, e), await _o(i, a, o);
2914
+ async function Fi(t, e = {}) {
2915
+ const { width: a, height: o } = aa(t, e), i = await Nt(t, e, !0);
2916
+ return await Ui(i, e), await la(i, e), zi(i, e), await Yo(i, a, o);
2915
2917
  }
2916
- async function Pi(t, e = {}) {
2917
- const { width: a, height: o } = Qe(t, e), i = await ji(t, e), n = await Ut(i), s = document.createElement("canvas"), l = s.getContext("2d"), c = e.pixelRatio || No(), d = e.canvasWidth || a, m = e.canvasHeight || o;
2918
- return s.width = d * c, s.height = m * c, e.skipAutoScale || Ko(s), s.style.width = `${d}`, s.style.height = `${m}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, s.width, s.height)), l.drawImage(n, 0, 0, s.width, s.height), s;
2918
+ async function Ti(t, e = {}) {
2919
+ const { width: a, height: o } = aa(t, e), i = await Fi(t, e), n = await Ft(i), r = document.createElement("canvas"), l = r.getContext("2d"), c = e.pixelRatio || qo(), d = e.canvasWidth || a, h = e.canvasHeight || o;
2920
+ return r.width = d * c, r.height = h * c, e.skipAutoScale || Wo(r), r.style.width = `${d}`, r.style.height = `${h}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, r.width, r.height)), l.drawImage(n, 0, 0, r.width, r.height), r;
2919
2921
  }
2920
- async function je(t, e = {}) {
2921
- return (await Pi(t, e)).toDataURL();
2922
+ async function Le(t, e = {}) {
2923
+ return (await Ti(t, e)).toDataURL();
2922
2924
  }
2923
- const Tt = "data-nf-capture-chrome", Li = "data-nf-canvas-snap", xi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2924
- function sa(t) {
2925
+ const Tt = "data-nf-capture-chrome", Mi = "data-nf-canvas-snap", Oi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
2926
+ function ua(t) {
2925
2927
  return t instanceof Element && (t.hasAttribute(Tt) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
2926
2928
  }
2927
- function Ui() {
2929
+ function Di() {
2928
2930
  const t = [];
2929
2931
  return Array.from(document.styleSheets).forEach((e) => {
2930
2932
  try {
@@ -2948,7 +2950,7 @@ function Ui() {
2948
2950
  });
2949
2951
  };
2950
2952
  }
2951
- function Ti() {
2953
+ function Ii() {
2952
2954
  const t = [];
2953
2955
  return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
2954
2956
  const o = a.getBoundingClientRect(), i = document.createElement("div");
@@ -2964,17 +2966,17 @@ function Ti() {
2964
2966
  ].join(";"), document.body.appendChild(i), t.push(i);
2965
2967
  }), () => t.forEach((a) => a.remove());
2966
2968
  }
2967
- function Fi() {
2969
+ function $i() {
2968
2970
  const t = document.querySelector(`[${Tt}]`);
2969
2971
  if (t)
2970
2972
  return t;
2971
2973
  const e = document.createElement("div");
2972
- return e.setAttribute(Tt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${g("status.capturing")}</span>`, document.body.appendChild(e), e;
2974
+ return e.setAttribute(Tt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${m("status.capturing")}</span>`, document.body.appendChild(e), e;
2973
2975
  }
2974
- function Mi() {
2976
+ function Vi() {
2975
2977
  document.querySelectorAll(`[${Tt}]`).forEach((t) => t.remove());
2976
2978
  }
2977
- function Jt() {
2979
+ function Qt() {
2978
2980
  return new Promise((t) => {
2979
2981
  requestAnimationFrame(() => requestAnimationFrame(t));
2980
2982
  });
@@ -2985,7 +2987,7 @@ function at(t) {
2985
2987
  const e = t.indexOf(",");
2986
2988
  return e > 0 && e < t.length - 1;
2987
2989
  }
2988
- function Di() {
2990
+ function Bi() {
2989
2991
  const t = document.documentElement, e = document.body, a = Math.max(
2990
2992
  window.innerWidth || 0,
2991
2993
  (t == null ? void 0 : t.clientWidth) || 0,
@@ -3001,10 +3003,10 @@ function Di() {
3001
3003
  );
3002
3004
  return { width: a, height: o };
3003
3005
  }
3004
- async function Ii() {
3006
+ async function Ni() {
3005
3007
  const t = [], e = Array.from(document.querySelectorAll("canvas"));
3006
3008
  for (const a of e) {
3007
- if (a.closest("#notefully") || sa(a))
3009
+ if (a.closest("#notefully") || ua(a))
3008
3010
  continue;
3009
3011
  let o = "";
3010
3012
  try {
@@ -3015,7 +3017,7 @@ async function Ii() {
3015
3017
  if (!o || o === "data:,")
3016
3018
  continue;
3017
3019
  const i = document.createElement("img"), n = getComputedStyle(a);
3018
- i.setAttribute(Li, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = n.width, i.style.height = n.height, i.style.maxWidth = n.maxWidth, i.style.maxHeight = n.maxHeight, i.style.objectFit = "fill", i.style.display = n.display === "inline" ? "inline-block" : n.display, a.replaceWith(i), t.push({ canvas: a, img: i });
3020
+ i.setAttribute(Mi, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = n.width, i.style.height = n.height, i.style.maxWidth = n.maxWidth, i.style.maxHeight = n.maxHeight, i.style.objectFit = "fill", i.style.display = n.display === "inline" ? "inline-block" : n.display, a.replaceWith(i), t.push({ canvas: a, img: i });
3019
3021
  }
3020
3022
  return await Promise.all(t.map(({ img: a }) => {
3021
3023
  if (!a.complete)
@@ -3031,7 +3033,7 @@ async function Ii() {
3031
3033
  });
3032
3034
  };
3033
3035
  }
3034
- async function Oi(t) {
3036
+ async function Ki(t) {
3035
3037
  if (!t)
3036
3038
  return null;
3037
3039
  if (typeof t == "string")
@@ -3044,12 +3046,12 @@ async function Oi(t) {
3044
3046
  return null;
3045
3047
  }
3046
3048
  if (typeof Blob < "u" && t instanceof Blob) {
3047
- const e = await $i(t);
3049
+ const e = await Hi(t);
3048
3050
  return at(e) ? e : null;
3049
3051
  }
3050
3052
  return null;
3051
3053
  }
3052
- async function $i(t) {
3054
+ async function Hi(t) {
3053
3055
  if (typeof FileReader == "function")
3054
3056
  return new Promise((o, i) => {
3055
3057
  const n = new FileReader();
@@ -3058,10 +3060,10 @@ async function $i(t) {
3058
3060
  const e = Buffer.from(await t.arrayBuffer());
3059
3061
  return `data:${t.type || "application/octet-stream"};base64,${e.toString("base64")}`;
3060
3062
  }
3061
- async function Vi() {
3063
+ async function _i() {
3062
3064
  var e;
3063
3065
  if (!((e = navigator.mediaDevices) != null && e.getDisplayMedia))
3064
- throw new Error(g("status.screenUnsupported"));
3066
+ throw new Error(m("status.screenUnsupported"));
3065
3067
  const t = await navigator.mediaDevices.getDisplayMedia({
3066
3068
  video: { displaySurface: "browser" },
3067
3069
  audio: !1,
@@ -3072,74 +3074,74 @@ async function Vi() {
3072
3074
  const a = document.createElement("video");
3073
3075
  a.muted = !0, a.playsInline = !0, a.srcObject = t, await a.play(), a.videoWidth || await new Promise((l) => {
3074
3076
  a.onloadedmetadata = () => l();
3075
- }), await Jt();
3077
+ }), await Qt();
3076
3078
  const o = a.videoWidth || 1, i = a.videoHeight || 1, n = document.createElement("canvas");
3077
3079
  n.width = o, n.height = i, n.getContext("2d").drawImage(a, 0, 0, o, i);
3078
- const s = n.toDataURL("image/png");
3079
- if (!at(s))
3080
- throw new Error(g("status.screenEmpty"));
3081
- return s;
3080
+ const r = n.toDataURL("image/png");
3081
+ if (!at(r))
3082
+ throw new Error(m("status.screenEmpty"));
3083
+ return r;
3082
3084
  } finally {
3083
3085
  t.getTracks().forEach((a) => a.stop());
3084
3086
  }
3085
3087
  }
3086
- async function la(t = {}) {
3087
- const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = Fi(), i = Ui();
3088
+ async function da(t = {}) {
3089
+ const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = $i(), i = Di();
3088
3090
  let n = () => {
3089
3091
  };
3090
3092
  e && (e.style.display = "none");
3091
- const s = Ti();
3093
+ const r = Ii();
3092
3094
  try {
3093
- if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await Jt(), typeof t.capture == "function") {
3094
- const S = await Oi(await t.capture());
3095
+ if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await Qt(), typeof t.capture == "function") {
3096
+ const S = await Ki(await t.capture());
3095
3097
  if (S)
3096
3098
  return S;
3097
3099
  }
3098
- n = await Ii(), await Jt();
3099
- const { width: l, height: c } = Di(), d = {
3100
+ n = await Ni(), await Qt();
3101
+ const { width: l, height: c } = Bi(), d = {
3100
3102
  cacheBust: !0,
3101
3103
  width: l,
3102
3104
  height: c,
3103
3105
  pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
3104
- filter: (S) => !sa(S),
3106
+ filter: (S) => !ua(S),
3105
3107
  // 404 / CORS images must not abort the whole capture.
3106
- imagePlaceholder: xi,
3108
+ imagePlaceholder: Oi,
3107
3109
  onImageErrorHandler: () => {
3108
3110
  }
3109
3111
  };
3110
- let m = "";
3112
+ let h = "";
3111
3113
  try {
3112
- m = await je(document.body, d);
3114
+ h = await Le(document.body, d);
3113
3115
  } catch {
3114
- m = await je(document.body, { ...d, skipFonts: !0 });
3116
+ h = await Le(document.body, { ...d, skipFonts: !0 });
3115
3117
  }
3116
- if (!at(m))
3117
- throw new Error(g("status.captureEmpty"));
3118
- return m;
3118
+ if (!at(h))
3119
+ throw new Error(m("status.captureEmpty"));
3120
+ return h;
3119
3121
  } finally {
3120
3122
  try {
3121
3123
  n();
3122
3124
  } catch {
3123
3125
  }
3124
- s(), i(), o.remove(), Mi(), e && (e.style.display = a);
3126
+ r(), i(), o.remove(), Vi(), e && (e.style.display = a);
3125
3127
  }
3126
3128
  }
3127
- function Bi(t = "") {
3129
+ function Gi(t = "") {
3128
3130
  const e = String(t || "");
3129
3131
  return e ? /Windows NT/i.test(e) ? "Windows" : /iPhone|iPad|iPod/i.test(e) ? "iOS" : /Mac OS X|Macintosh/i.test(e) ? "macOS" : /Android/i.test(e) ? "Android" : /CrOS/i.test(e) ? "ChromeOS" : /Linux/i.test(e) ? "Linux" : "Other" : "";
3130
3132
  }
3131
- function Ni(t = "") {
3133
+ function qi(t = "") {
3132
3134
  const e = String(t || "");
3133
3135
  return e ? /Edg\//i.test(e) ? "Edge" : /OPR\/|Opera/i.test(e) ? "Opera" : /Firefox\//i.test(e) ? "Firefox" : /Chrome\//i.test(e) || /CriOS\//i.test(e) ? "Chrome" : /Safari\//i.test(e) ? "Safari" : "Other" : "";
3134
3136
  }
3135
- function Ki(t = {}) {
3137
+ function Wi(t = {}) {
3136
3138
  const e = navigator.userAgent;
3137
3139
  return {
3138
3140
  url: location.href,
3139
3141
  title: document.title,
3140
3142
  userAgent: e,
3141
- os: Bi(e),
3142
- browser: Ni(e),
3143
+ os: Gi(e),
3144
+ browser: qi(e),
3143
3145
  language: navigator.language,
3144
3146
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
3145
3147
  viewport: {
@@ -3159,11 +3161,72 @@ function Ki(t = {}) {
3159
3161
  }
3160
3162
  };
3161
3163
  }
3162
- const Pe = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Le = {
3164
+ function Zi(t = {}) {
3165
+ const e = Wi(t), a = {};
3166
+ for (const [o, i] of Object.entries(e))
3167
+ a[o] = { value: i };
3168
+ return a;
3169
+ }
3170
+ const pa = [
3171
+ "url",
3172
+ "title",
3173
+ "userAgent",
3174
+ "os",
3175
+ "browser",
3176
+ "language",
3177
+ "timezone",
3178
+ "viewport",
3179
+ "screen",
3180
+ "user"
3181
+ ], Yi = /* @__PURE__ */ new Set([
3182
+ "console",
3183
+ "author",
3184
+ "screenshotMeta",
3185
+ "screenshotError"
3186
+ ]);
3187
+ function Xi(t) {
3188
+ const e = String(t || "").trim();
3189
+ return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (a) => a.toUpperCase()) : "";
3190
+ }
3191
+ function te(t, e = {}) {
3192
+ const a = e.warn || Ji, o = {};
3193
+ if (t == null)
3194
+ return o;
3195
+ if (typeof t != "object" || Array.isArray(t))
3196
+ return a("Notefully fields: expected a plain object of field/value pairs."), o;
3197
+ for (const [i, n] of Object.entries(t)) {
3198
+ const r = String(i || "").trim();
3199
+ if (r) {
3200
+ if (Yi.has(r)) {
3201
+ a(`Notefully fields: ignoring reserved key "${r}".`);
3202
+ continue;
3203
+ }
3204
+ if (n != null && typeof n == "object" && !Array.isArray(n) && Object.prototype.hasOwnProperty.call(n, "value")) {
3205
+ const l = n.label == null ? void 0 : String(n.label);
3206
+ o[r] = l ? { value: n.value, label: l } : { value: n.value };
3207
+ continue;
3208
+ }
3209
+ o[r] = { value: n };
3210
+ }
3211
+ }
3212
+ return o;
3213
+ }
3214
+ function xe(t = {}, e = {}) {
3215
+ const a = { ...t, ...e }, o = {};
3216
+ for (const i of pa)
3217
+ Object.prototype.hasOwnProperty.call(a, i) && (o[i] = a[i]);
3218
+ for (const i of Object.keys(a))
3219
+ Object.prototype.hasOwnProperty.call(o, i) || (o[i] = a[i]);
3220
+ return o;
3221
+ }
3222
+ function Ji(t) {
3223
+ typeof console < "u" && typeof console.warn == "function" && console.warn(t);
3224
+ }
3225
+ const Ue = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Fe = {
3163
3226
  id: "userId",
3164
3227
  username: "displayName",
3165
3228
  name: "displayName"
3166
- }, xe = /* @__PURE__ */ new Set([
3229
+ }, Te = /* @__PURE__ */ new Set([
3167
3230
  "endpoint",
3168
3231
  "projectKey",
3169
3232
  "version",
@@ -3184,8 +3247,9 @@ const Pe = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Le = {
3184
3247
  "onClose",
3185
3248
  "displayLink",
3186
3249
  "locale",
3187
- "translations"
3188
- ]), Ue = {
3250
+ "translations",
3251
+ "fields"
3252
+ ]), Me = {
3189
3253
  slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
3190
3254
  projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
3191
3255
  project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
@@ -3194,40 +3258,40 @@ const Pe = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Le = {
3194
3258
  email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
3195
3259
  displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
3196
3260
  };
3197
- function Hi(t = {}, e = {}) {
3198
- const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = {}, n = [];
3199
- for (const s of Pe)
3200
- Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s]);
3201
- for (const [s, l] of Object.entries(Le))
3202
- Object.prototype.hasOwnProperty.call(o, s) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[s]));
3203
- for (const s of Object.keys(o))
3204
- Pe.has(s) || Object.prototype.hasOwnProperty.call(Le, s) || n.push(s);
3261
+ function Qi(t = {}, e = {}) {
3262
+ const a = e.warn || ga, o = t && typeof t == "object" ? t : {}, i = {}, n = [];
3263
+ for (const r of Ue)
3264
+ Object.prototype.hasOwnProperty.call(o, r) && (i[r] = o[r]);
3265
+ for (const [r, l] of Object.entries(Fe))
3266
+ Object.prototype.hasOwnProperty.call(o, r) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[r]));
3267
+ for (const r of Object.keys(o))
3268
+ Ue.has(r) || Object.prototype.hasOwnProperty.call(Fe, r) || n.push(r);
3205
3269
  if (n.length) {
3206
- const s = n.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3270
+ const r = n.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
3207
3271
  a(
3208
- `Notefully.identify: ignoring unknown key(s): ${n.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + s
3272
+ `Notefully.identify: ignoring unknown key(s): ${n.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + r
3209
3273
  );
3210
3274
  }
3211
3275
  return i;
3212
3276
  }
3213
- function _i(t = {}, e = {}) {
3214
- const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((n) => !xe.has(n));
3277
+ function tn(t = {}, e = {}) {
3278
+ const a = e.warn || ga, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((n) => !Te.has(n));
3215
3279
  if (i.length)
3216
3280
  for (const n of i) {
3217
- if (Ue[n]) {
3218
- a(`Notefully.init: ignoring "${n}". ${Ue[n]}`);
3281
+ if (Me[n]) {
3282
+ a(`Notefully.init: ignoring "${n}". ${Me[n]}`);
3219
3283
  continue;
3220
3284
  }
3221
3285
  a(
3222
- `Notefully.init: ignoring unknown key "${n}". Supported: ${[...xe].join(", ")}.`
3286
+ `Notefully.init: ignoring unknown key "${n}". Supported: ${[...Te].join(", ")}.`
3223
3287
  );
3224
3288
  }
3225
3289
  }
3226
- function ca(t) {
3290
+ function ga(t) {
3227
3291
  typeof console < "u" && typeof console.warn == "function" && console.warn(t);
3228
3292
  }
3229
- const Te = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Gi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3230
- function Fe(t) {
3293
+ const Oe = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, en = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
3294
+ function De(t) {
3231
3295
  if (t instanceof Error)
3232
3296
  return t.stack || t.message || String(t);
3233
3297
  if (typeof t == "string")
@@ -3238,54 +3302,54 @@ function Fe(t) {
3238
3302
  return String(t);
3239
3303
  }
3240
3304
  }
3241
- function le(t) {
3305
+ function ue(t) {
3242
3306
  if (!t || typeof t != "string")
3243
3307
  return "";
3244
3308
  let e = t.replace(/[\u0000-\u001F\u007F]/g, "").trim();
3245
- return e ? (Te.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Te.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
3309
+ return e ? (Oe.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Oe.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
3246
3310
  }
3247
- function qi(t = []) {
3311
+ function an(t = []) {
3248
3312
  if (!t.length)
3249
3313
  return { text: "", segments: [{ text: "", style: null }] };
3250
3314
  const e = t[0];
3251
3315
  if (typeof e != "string" || !e.includes("%c")) {
3252
- const s = t.map(Fe).join(" ");
3253
- return { text: s, segments: [{ text: s, style: null }] };
3316
+ const r = t.map(De).join(" ");
3317
+ return { text: r, segments: [{ text: r, style: null }] };
3254
3318
  }
3255
3319
  const a = e.split("%c"), o = [];
3256
3320
  let i = 1;
3257
- for (let s = 0; s < a.length; s++) {
3258
- const l = a[s];
3259
- if (s === 0) {
3321
+ for (let r = 0; r < a.length; r++) {
3322
+ const l = a[r];
3323
+ if (r === 0) {
3260
3324
  l && o.push({ text: l, style: null });
3261
3325
  continue;
3262
3326
  }
3263
- const c = i < t.length ? String(t[i++] ?? "") : "", d = le(c) || null;
3327
+ const c = i < t.length ? String(t[i++] ?? "") : "", d = ue(c) || null;
3264
3328
  o.push({ text: l, style: d });
3265
3329
  }
3266
3330
  if (i < t.length) {
3267
- const s = t.slice(i).map(Fe).join(" ");
3268
- s && o.push({
3269
- text: (o.length ? " " : "") + s,
3331
+ const r = t.slice(i).map(De).join(" ");
3332
+ r && o.push({
3333
+ text: (o.length ? " " : "") + r,
3270
3334
  style: null
3271
3335
  });
3272
3336
  }
3273
3337
  return {
3274
- text: o.map((s) => s.text).join(""),
3338
+ text: o.map((r) => r.text).join(""),
3275
3339
  segments: o.length ? o : [{ text: "", style: null }]
3276
3340
  };
3277
3341
  }
3278
- function Wi(t) {
3342
+ function on(t) {
3279
3343
  const e = String(t ?? "");
3280
3344
  if (!e.includes("%c"))
3281
3345
  return [{ text: e, style: null }];
3282
- const a = e.split("%c"), o = a[a.length - 1], i = o.match(Gi);
3346
+ const a = e.split("%c"), o = a[a.length - 1], i = o.match(en);
3283
3347
  let n = "";
3284
3348
  if (i) {
3285
3349
  const c = i.index, d = /\s/.test(o[c]) ? c + 1 : c;
3286
3350
  /^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), n = o.slice(d).trim());
3287
3351
  }
3288
- const s = le(n) || null, l = [];
3352
+ const r = ue(n) || null, l = [];
3289
3353
  for (let c = 0; c < a.length; c++) {
3290
3354
  const d = a[c];
3291
3355
  if (c === 0) {
@@ -3294,53 +3358,53 @@ function Wi(t) {
3294
3358
  }
3295
3359
  l.push({
3296
3360
  text: d,
3297
- style: c === 1 ? s : null
3361
+ style: c === 1 ? r : null
3298
3362
  });
3299
3363
  }
3300
3364
  return l.length ? l : [{ text: e, style: null }];
3301
3365
  }
3302
- function ua(t = {}) {
3366
+ function ma(t = {}) {
3303
3367
  return Array.isArray(t.segments) && t.segments.length ? t.segments.map((e) => ({
3304
3368
  text: String((e == null ? void 0 : e.text) ?? ""),
3305
- style: le(e == null ? void 0 : e.style) || null
3306
- })) : Wi(t.text);
3369
+ style: ue(e == null ? void 0 : e.style) || null
3370
+ })) : on(t.text);
3307
3371
  }
3308
- function Zi(t = {}) {
3309
- return ua(t).map((a) => a.text).join("");
3372
+ function nn(t = {}) {
3373
+ return ma(t).map((a) => a.text).join("");
3310
3374
  }
3311
- function Me(t) {
3375
+ function Ie(t) {
3312
3376
  return String(t ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3313
3377
  }
3314
- function Yi(t = {}) {
3315
- return ua(t).map((e) => {
3316
- const a = Me(e.text);
3317
- return e.style ? `<span class="nf-console-styled" style="${Me(e.style)}">${a}</span>` : a;
3378
+ function rn(t = {}) {
3379
+ return ma(t).map((e) => {
3380
+ const a = Ie(e.text);
3381
+ return e.style ? `<span class="nf-console-styled" style="${Ie(e.style)}">${a}</span>` : a;
3318
3382
  }).join("");
3319
3383
  }
3320
- const Xi = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g, Ji = /\bBearer\s+[A-Za-z0-9\-._~+/]+=*/gi, Qi = /(Authorization:\s*)(\S+)/gi, tn = /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, en = /\b[a-f0-9]{32,}\b/gi, an = /\b[A-Za-z0-9+/]{40,}={0,2}\b/g, ct = "[redacted]";
3321
- function De(t) {
3322
- return !t || typeof t != "string" ? t == null ? "" : String(t) : t.replace(Ji, `Bearer ${ct}`).replace(Qi, `$1${ct}`).replace(tn, ct).replace(Xi, ct).replace(en, ct).replace(an, ct);
3384
+ const sn = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g, ln = /\bBearer\s+[A-Za-z0-9\-._~+/]+=*/gi, cn = /(Authorization:\s*)(\S+)/gi, un = /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, dn = /\b[a-f0-9]{32,}\b/gi, pn = /\b[A-Za-z0-9+/]{40,}={0,2}\b/g, ut = "[redacted]";
3385
+ function $e(t) {
3386
+ return !t || typeof t != "string" ? t == null ? "" : String(t) : t.replace(ln, `Bearer ${ut}`).replace(cn, `$1${ut}`).replace(un, ut).replace(sn, ut).replace(dn, ut).replace(pn, ut);
3323
3387
  }
3324
- function Ft(t) {
3388
+ function Mt(t) {
3325
3389
  if (!t || typeof t != "object")
3326
3390
  return t;
3327
- const e = { ...t, text: De(t.text || "") };
3391
+ const e = { ...t, text: $e(t.text || "") };
3328
3392
  return Array.isArray(t.segments) && t.segments.length && (e.segments = t.segments.map((a) => ({
3329
3393
  ...a,
3330
- text: De(a.text || "")
3394
+ text: $e(a.text || "")
3331
3395
  }))), e;
3332
3396
  }
3333
- const on = 60, nn = 20, ut = 2e3, Mt = ["log", "info", "warn", "error"], rn = ["debug", "trace", "assert"], da = [...Mt, ...rn], sn = /* @__PURE__ */ new Set(["warn", "error", "assert"]), ln = /* @__PURE__ */ new Set(["SCRIPT", "LINK", "IMG", "VIDEO", "AUDIO"]);
3334
- function Qt(t) {
3335
- return sn.has(t);
3397
+ const gn = 60, mn = 20, dt = 2e3, Ot = ["log", "info", "warn", "error"], hn = ["debug", "trace", "assert"], ha = [...Ot, ...hn], fn = /* @__PURE__ */ new Set(["warn", "error", "assert"]), yn = /* @__PURE__ */ new Set(["SCRIPT", "LINK", "IMG", "VIDEO", "AUDIO"]);
3398
+ function ee(t) {
3399
+ return fn.has(t);
3336
3400
  }
3337
- function Ie() {
3401
+ function Ve() {
3338
3402
  return Date.now();
3339
3403
  }
3340
- function Oe() {
3404
+ function Be() {
3341
3405
  return typeof performance < "u" && typeof performance.now == "function" ? performance.now() : 0;
3342
3406
  }
3343
- function cn(t, e = 2) {
3407
+ function vn(t, e = 2) {
3344
3408
  if (!t || typeof t != "string")
3345
3409
  return "";
3346
3410
  const a = t.split(`
@@ -3348,173 +3412,173 @@ function cn(t, e = 2) {
3348
3412
  return a.slice(o + e).join(`
3349
3413
  `).trim();
3350
3414
  }
3351
- function un(t) {
3415
+ function bn(t) {
3352
3416
  return (t || []).some((e) => e instanceof Error);
3353
3417
  }
3354
- function pa(t) {
3418
+ function fa(t) {
3355
3419
  const e = t && t.target;
3356
3420
  if (!e || typeof e.tagName != "string" || e === (typeof window < "u" ? window : null))
3357
3421
  return null;
3358
3422
  const a = String(e.tagName || "").toUpperCase();
3359
- if (!ln.has(a))
3423
+ if (!yn.has(a))
3360
3424
  return null;
3361
3425
  const o = String(e.src || e.href || "").trim();
3362
3426
  return o ? `Failed to load <${a.toLowerCase()}> ${o}` : null;
3363
3427
  }
3364
- function dn(t) {
3365
- const e = pa(t);
3428
+ function kn(t) {
3429
+ const e = fa(t);
3366
3430
  if (e)
3367
3431
  return e;
3368
- const a = String((t == null ? void 0 : t.message) || "").trim(), o = t == null ? void 0 : t.error, i = String((t == null ? void 0 : t.filename) || "").trim(), n = t == null ? void 0 : t.lineno, s = t == null ? void 0 : t.colno, l = !!i || Number.isFinite(n) && n > 0 || Number.isFinite(s) && s > 0;
3432
+ const a = String((t == null ? void 0 : t.message) || "").trim(), o = t == null ? void 0 : t.error, i = String((t == null ? void 0 : t.filename) || "").trim(), n = t == null ? void 0 : t.lineno, r = t == null ? void 0 : t.colno, l = !!i || Number.isFinite(n) && n > 0 || Number.isFinite(r) && r > 0;
3369
3433
  if ((!a || a === "Script error.") && !o) {
3370
- const m = ["Script error. (cross-origin; enable CORS for stack details)"];
3371
- return l && m.push($e(i, n, s)), m.join(" ");
3434
+ const h = ["Script error. (cross-origin; enable CORS for stack details)"];
3435
+ return l && h.push(Ne(i, n, r)), h.join(" ");
3372
3436
  }
3373
3437
  const d = [];
3374
- return a ? d.push(a) : o && o.message ? d.push(String(o.message)) : d.push("window.error"), l && d.push($e(i, n, s)), o instanceof Error && o.stack && d.push(o.stack), d.join(`
3438
+ return a ? d.push(a) : o && o.message ? d.push(String(o.message)) : d.push("window.error"), l && d.push(Ne(i, n, r)), o instanceof Error && o.stack && d.push(o.stack), d.join(`
3375
3439
  `);
3376
3440
  }
3377
- function $e(t, e, a) {
3441
+ function Ne(t, e, a) {
3378
3442
  const o = t || "(unknown)", i = Number.isFinite(e) ? e : "?", n = Number.isFinite(a) ? a : "?";
3379
3443
  return `at ${o}:${i}:${n}`;
3380
3444
  }
3381
- function pn(t) {
3445
+ function wn(t) {
3382
3446
  const e = t == null ? void 0 : t.reason;
3383
3447
  return e instanceof Error ? [e] : e == null ? ["unhandledrejection"] : typeof e == "string" ? [`Unhandled rejection: ${e}`] : ["Unhandled rejection:", e];
3384
3448
  }
3385
- function gn(t) {
3449
+ function Sn(t) {
3386
3450
  const e = (t == null ? void 0 : t.effectiveDirective) || (t == null ? void 0 : t.violatedDirective) || "unknown", a = (t == null ? void 0 : t.blockedURI) || "", o = (t == null ? void 0 : t.disposition) || "", i = [`CSP violation: ${e}`];
3387
3451
  return a && i.push(`blocked ${a}`), o && i.push(`(${o})`), i.join(" ");
3388
3452
  }
3389
- function te(t, e) {
3453
+ function ae(t, e) {
3390
3454
  const a = [...t, ...e];
3391
3455
  return a.sort((o, i) => {
3392
3456
  const n = (o.at || 0) - (i.at || 0);
3393
3457
  return n !== 0 ? n : (o.t || 0) - (i.t || 0);
3394
3458
  }), a;
3395
3459
  }
3396
- function mn(t, e, a) {
3397
- const o = te(t, e);
3460
+ function An(t, e, a) {
3461
+ const o = ae(t, e);
3398
3462
  if (a == null || !Number.isFinite(a) || a < 0)
3399
3463
  return o;
3400
3464
  if (a === 0)
3401
3465
  return [];
3402
3466
  if (o.length <= a)
3403
3467
  return o;
3404
- const i = o.slice(-a), n = new Set(i), s = e.filter((c) => !n.has(c));
3405
- if (!s.length)
3468
+ const i = o.slice(-a), n = new Set(i), r = e.filter((c) => !n.has(c));
3469
+ if (!r.length)
3406
3470
  return i;
3407
3471
  const l = i.slice();
3408
- for (const c of s.slice().reverse()) {
3409
- const d = l.findIndex((m) => !Qt(m.level));
3472
+ for (const c of r.slice().reverse()) {
3473
+ const d = l.findIndex((h) => !ee(h.level));
3410
3474
  if (d === -1)
3411
3475
  break;
3412
3476
  l.splice(d, 1), l.push(c);
3413
3477
  }
3414
- return te(l, []);
3478
+ return ae(l, []);
3415
3479
  }
3416
- function ce(t) {
3417
- const e = Array.isArray(t) && t.length ? t : Mt, a = new Set(da), o = [];
3480
+ function de(t) {
3481
+ const e = Array.isArray(t) && t.length ? t : Ot, a = new Set(ha), o = [];
3418
3482
  for (const i of e) {
3419
3483
  const n = String(i || "").trim();
3420
3484
  !a.has(n) || o.includes(n) || o.push(n);
3421
3485
  }
3422
- return o.length ? o : Mt.slice();
3486
+ return o.length ? o : Ot.slice();
3423
3487
  }
3424
- function hn() {
3488
+ function Cn() {
3425
3489
  const t = [], e = [], a = {};
3426
- let o = !1, i = Mt.slice(), n = Ft, s = null, l = null, c = null;
3427
- const d = (u) => Qt(u) ? e : t, m = (u) => Qt(u) ? nn : on, S = (u) => {
3428
- let h = {
3490
+ let o = !1, i = Ot.slice(), n = Mt, r = null, l = null, c = null;
3491
+ const d = (u) => ee(u) ? e : t, h = (u) => ee(u) ? mn : gn, S = (u) => {
3492
+ let f = {
3429
3493
  level: u.level || "log",
3430
3494
  text: String(u.text || ""),
3431
- at: Number.isFinite(u.at) ? u.at : Ie(),
3432
- t: Number.isFinite(u.t) ? u.t : Oe()
3495
+ at: Number.isFinite(u.at) ? u.at : Ve(),
3496
+ t: Number.isFinite(u.t) ? u.t : Be()
3433
3497
  };
3434
- if (u.truncated && (h.truncated = !0), Number.isFinite(u.count) && u.count > 1 && (h.count = u.count), Array.isArray(u.segments) && u.segments.length && (h.segments = u.segments), typeof n == "function")
3498
+ if (u.truncated && (f.truncated = !0), Number.isFinite(u.count) && u.count > 1 && (f.count = u.count), Array.isArray(u.segments) && u.segments.length && (f.segments = u.segments), typeof n == "function")
3435
3499
  try {
3436
- const C = n(h);
3437
- if (C == null)
3500
+ const U = n(f);
3501
+ if (U == null)
3438
3502
  return;
3439
- h = C;
3503
+ f = U;
3440
3504
  } catch {
3441
3505
  }
3442
- h.text = String(h.text || "").slice(0, ut), Array.isArray(h.segments) && (h.segments = h.segments.map((C) => ({
3443
- text: String(C.text || "").slice(0, ut),
3444
- style: C.style || null
3506
+ f.text = String(f.text || "").slice(0, dt), Array.isArray(f.segments) && (f.segments = f.segments.map((U) => ({
3507
+ text: String(U.text || "").slice(0, dt),
3508
+ style: U.style || null
3445
3509
  })));
3446
- const R = d(h.level), k = R[R.length - 1];
3447
- if (k && k.level === h.level && k.text === h.text) {
3448
- k.count = (k.count || 1) + 1, k.at = h.at, k.t = h.t, h.truncated && (k.truncated = !0);
3510
+ const A = d(f.level), g = A[A.length - 1];
3511
+ if (g && g.level === f.level && g.text === f.text) {
3512
+ g.count = (g.count || 1) + 1, g.at = f.at, g.t = f.t, f.truncated && (g.truncated = !0);
3449
3513
  return;
3450
3514
  }
3451
- R.push(h);
3452
- const f = m(h.level);
3453
- for (; R.length > f; )
3454
- R.shift();
3455
- }, v = (u, h, R = {}) => {
3456
- let k = "", f = null;
3515
+ A.push(f);
3516
+ const C = h(f.level);
3517
+ for (; A.length > C; )
3518
+ A.shift();
3519
+ }, v = (u, f, A = {}) => {
3520
+ let g = "", C = null;
3457
3521
  try {
3458
- const $ = qi(h);
3459
- k = $.text, f = $.segments;
3522
+ const V = an(f);
3523
+ g = V.text, C = V.segments;
3460
3524
  } catch {
3461
- k = String((h == null ? void 0 : h[0]) ?? ""), f = [{ text: k, style: null }];
3525
+ g = String((f == null ? void 0 : f[0]) ?? ""), C = [{ text: g, style: null }];
3462
3526
  }
3463
- if (R.captureStack !== !1 && (u === "warn" || u === "error") && !un(h)) {
3464
- const $ = cn(new Error().stack || "", 2);
3465
- $ && (k = k ? `${k}
3466
- ${$}` : $);
3527
+ if (A.captureStack !== !1 && (u === "warn" || u === "error") && !bn(f)) {
3528
+ const V = vn(new Error().stack || "", 2);
3529
+ V && (g = g ? `${g}
3530
+ ${V}` : V);
3467
3531
  }
3468
- const Z = k.length > ut, Y = {
3532
+ const F = g.length > dt, _t = {
3469
3533
  level: u,
3470
- text: k.slice(0, ut),
3471
- at: Ie(),
3472
- t: Oe()
3534
+ text: g.slice(0, dt),
3535
+ at: Ve(),
3536
+ t: Be()
3473
3537
  };
3474
- Z && (Y.truncated = !0), f && f.some(($) => $.style) && (Y.segments = f.map(($) => ({
3475
- text: String($.text || "").slice(0, ut),
3476
- style: $.style || null
3477
- }))), S(Y);
3478
- }, A = () => {
3479
- for (const u of da)
3538
+ F && (_t.truncated = !0), C && C.some((V) => V.style) && (_t.segments = C.map((V) => ({
3539
+ text: String(V.text || "").slice(0, dt),
3540
+ style: V.style || null
3541
+ }))), S(_t);
3542
+ }, w = () => {
3543
+ for (const u of ha)
3480
3544
  a[u] && (console[u] = a[u], delete a[u]);
3481
3545
  for (const u of i)
3482
3546
  if (typeof console[u] == "function") {
3483
3547
  if (a[u] = console[u].bind(console), u === "assert") {
3484
- console.assert = (h, ...R) => {
3485
- a.assert(h, ...R), h || v("assert", R.length ? R : ["Assertion failed"], { captureStack: !1 });
3548
+ console.assert = (f, ...A) => {
3549
+ a.assert(f, ...A), f || v("assert", A.length ? A : ["Assertion failed"], { captureStack: !1 });
3486
3550
  };
3487
3551
  continue;
3488
3552
  }
3489
- console[u] = (...h) => {
3490
- v(u, h), a[u](...h);
3553
+ console[u] = (...f) => {
3554
+ v(u, f), a[u](...f);
3491
3555
  };
3492
3556
  }
3493
3557
  };
3494
3558
  return {
3495
3559
  hook: () => {
3496
- o || typeof window > "u" || (o = !0, A(), s = (u) => {
3497
- const h = u == null ? void 0 : u.target;
3498
- if (!!(h && typeof h.tagName == "string" && h !== window)) {
3499
- const k = pa(u);
3500
- if (!k)
3560
+ o || typeof window > "u" || (o = !0, w(), r = (u) => {
3561
+ const f = u == null ? void 0 : u.target;
3562
+ if (!!(f && typeof f.tagName == "string" && f !== window)) {
3563
+ const g = fa(u);
3564
+ if (!g)
3501
3565
  return;
3502
- v("error", [k], { captureStack: !1 });
3566
+ v("error", [g], { captureStack: !1 });
3503
3567
  return;
3504
3568
  }
3505
- v("error", [dn(u)], { captureStack: !1 });
3569
+ v("error", [kn(u)], { captureStack: !1 });
3506
3570
  }, l = (u) => {
3507
- v("error", pn(u), { captureStack: !1 });
3571
+ v("error", wn(u), { captureStack: !1 });
3508
3572
  }, c = (u) => {
3509
- v("error", [gn(u)], { captureStack: !1 });
3510
- }, window.addEventListener("error", s, !0), window.addEventListener("unhandledrejection", l), window.addEventListener("securitypolicyviolation", c));
3573
+ v("error", [Sn(u)], { captureStack: !1 });
3574
+ }, window.addEventListener("error", r, !0), window.addEventListener("unhandledrejection", l), window.addEventListener("securitypolicyviolation", c));
3511
3575
  },
3512
3576
  unhook: () => {
3513
3577
  if (o) {
3514
3578
  o = !1;
3515
3579
  for (const u of Object.keys(a))
3516
3580
  console[u] = a[u], delete a[u];
3517
- typeof window < "u" && (s && window.removeEventListener("error", s, !0), l && window.removeEventListener("unhandledrejection", l), c && window.removeEventListener("securitypolicyviolation", c)), s = null, l = null, c = null;
3581
+ typeof window < "u" && (r && window.removeEventListener("error", r, !0), l && window.removeEventListener("unhandledrejection", l), c && window.removeEventListener("securitypolicyviolation", c)), r = null, l = null, c = null;
3518
3582
  }
3519
3583
  },
3520
3584
  push: v,
@@ -3524,13 +3588,13 @@ ${$}` : $);
3524
3588
  pushEntry(u) {
3525
3589
  if (!u || typeof u != "object")
3526
3590
  return;
3527
- const h = String(u.text ?? "");
3591
+ const f = String(u.text ?? "");
3528
3592
  S({
3529
3593
  level: u.level || "log",
3530
- text: h,
3594
+ text: f,
3531
3595
  at: u.at,
3532
3596
  t: u.t,
3533
- truncated: u.truncated || h.length > ut,
3597
+ truncated: u.truncated || f.length > dt,
3534
3598
  count: u.count,
3535
3599
  segments: u.segments
3536
3600
  });
@@ -3539,27 +3603,27 @@ ${$}` : $);
3539
3603
  * @param {string[]} next
3540
3604
  */
3541
3605
  setConsoleMethods(u) {
3542
- i = ce(u), o && A();
3606
+ i = de(u), o && w();
3543
3607
  },
3544
3608
  /**
3545
3609
  * @param {(entry: object) => object|null|undefined} [fn]
3546
3610
  */
3547
3611
  setScrubLog(u) {
3548
- n = typeof u == "function" ? u : Ft;
3612
+ n = typeof u == "function" ? u : Mt;
3549
3613
  },
3550
3614
  /**
3551
3615
  * Full merged buffer (both rings).
3552
3616
  * @returns {object[]}
3553
3617
  */
3554
3618
  snapshot() {
3555
- return te(t, e);
3619
+ return ae(t, e);
3556
3620
  },
3557
3621
  /**
3558
3622
  * @param {number} limit
3559
3623
  * @returns {object[]}
3560
3624
  */
3561
3625
  snapshotForReport(u) {
3562
- return mn(t, e, u);
3626
+ return An(t, e, u);
3563
3627
  },
3564
3628
  /**
3565
3629
  * @returns {{general: object[], priority: object[]}}
@@ -3569,14 +3633,14 @@ ${$}` : $);
3569
3633
  }
3570
3634
  };
3571
3635
  }
3572
- function fn(t, e = {}) {
3636
+ function En(t, e = {}) {
3573
3637
  const a = window.SpeechRecognition || window.webkitSpeechRecognition, o = typeof e.onActiveChange == "function" ? e.onActiveChange : null;
3574
3638
  let i = null, n = !1;
3575
- const s = (d) => {
3576
- const m = !!d;
3577
- n !== m && (n = m, o == null || o(n));
3639
+ const r = (d) => {
3640
+ const h = !!d;
3641
+ n !== h && (n = h, o == null || o(n));
3578
3642
  }, l = () => {
3579
- if (s(!1), i)
3643
+ if (r(!1), i)
3580
3644
  try {
3581
3645
  i.stop();
3582
3646
  } catch {
@@ -3585,33 +3649,33 @@ function fn(t, e = {}) {
3585
3649
  return {
3586
3650
  start: (d = {}) => {
3587
3651
  if (!a)
3588
- throw new Error(g("status.speechUnsupported"));
3589
- return n ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (m) => {
3652
+ throw new Error(m("status.speechUnsupported"));
3653
+ return n ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (h) => {
3590
3654
  let S = "";
3591
- for (let v = m.resultIndex; v < m.results.length; v += 1)
3592
- m.results[v].isFinal && (S += m.results[v][0].transcript);
3655
+ for (let v = h.resultIndex; v < h.results.length; v += 1)
3656
+ h.results[v].isFinal && (S += h.results[v][0].transcript);
3593
3657
  S && t(S);
3594
3658
  }, i.onerror = () => {
3595
- s(!1);
3659
+ r(!1);
3596
3660
  }, i.onend = () => {
3597
- s(!1);
3598
- }, i.start(), s(!0), !0);
3661
+ r(!1);
3662
+ }, i.start(), r(!0), !0);
3599
3663
  },
3600
3664
  stop: l,
3601
3665
  isSupported: () => !!a,
3602
3666
  isActive: () => n
3603
3667
  };
3604
3668
  }
3605
- const yn = 60 * 1e3;
3606
- function vn({ onStart: t, onStop: e, onError: a }) {
3607
- let o = null, i = null, n = [], s = null;
3669
+ const zn = 60 * 1e3;
3670
+ function Rn({ onStart: t, onStop: e, onError: a }) {
3671
+ let o = null, i = null, n = [], r = null;
3608
3672
  const l = () => {
3609
- if (s && (clearTimeout(s), s = null), i && i.state !== "inactive")
3673
+ if (r && (clearTimeout(r), r = null), i && i.state !== "inactive")
3610
3674
  try {
3611
3675
  i.stop();
3612
3676
  } catch {
3613
3677
  }
3614
- o && (o.getTracks().forEach((m) => m.stop()), o = null);
3678
+ o && (o.getTracks().forEach((h) => h.stop()), o = null);
3615
3679
  }, c = () => {
3616
3680
  if (i && i.state === "recording") {
3617
3681
  i.stop();
@@ -3620,8 +3684,8 @@ function vn({ onStart: t, onStop: e, onError: a }) {
3620
3684
  l(), e(null);
3621
3685
  };
3622
3686
  return { start: async () => {
3623
- var m, S;
3624
- if (!((m = navigator.mediaDevices) != null && m.getDisplayMedia))
3687
+ var h, S;
3688
+ if (!((h = navigator.mediaDevices) != null && h.getDisplayMedia))
3625
3689
  throw new Error("Screen recording is not supported in this browser.");
3626
3690
  o = await navigator.mediaDevices.getDisplayMedia({
3627
3691
  video: { displaySurface: "browser" },
@@ -3635,10 +3699,10 @@ function vn({ onStart: t, onStop: e, onError: a }) {
3635
3699
  }, i.onstop = () => {
3636
3700
  const v = n.length ? new Blob(n, { type: i.mimeType || "video/webm" }) : null;
3637
3701
  l(), e(v);
3638
- }, (S = o.getVideoTracks()[0]) == null || S.addEventListener("ended", () => c()), i.start(), s = setTimeout(c, yn), t();
3702
+ }, (S = o.getVideoTracks()[0]) == null || S.addEventListener("ended", () => c()), i.start(), r = setTimeout(c, zn), t();
3639
3703
  }, stop: c };
3640
3704
  }
3641
- function kn() {
3705
+ function jn() {
3642
3706
  const t = /* @__PURE__ */ new Set();
3643
3707
  return {
3644
3708
  alloc() {
@@ -3656,24 +3720,24 @@ function kn() {
3656
3720
  }
3657
3721
  };
3658
3722
  }
3659
- const qt = { x: 0, y: 0, w: 1, h: 1 };
3660
- function ue() {
3661
- const t = kn();
3662
- let e = [], a = { ...qt }, o = 1;
3723
+ const Wt = { x: 0, y: 0, w: 1, h: 1 };
3724
+ function pe() {
3725
+ const t = jn();
3726
+ let e = [], a = { ...Wt }, o = 1;
3663
3727
  return {
3664
- list: () => e.filter((n) => Sn(n, a)),
3728
+ list: () => e.filter((n) => xn(n, a)),
3665
3729
  all: () => e.slice(),
3666
3730
  crop: () => ({ ...a }),
3667
3731
  setCrop(n) {
3668
- return a = wn(n), a;
3732
+ return a = Ln(n), a;
3669
3733
  },
3670
3734
  resetCrop() {
3671
- return a = { ...qt }, a;
3735
+ return a = { ...Wt }, a;
3672
3736
  },
3673
3737
  isCropped() {
3674
3738
  return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
3675
3739
  },
3676
- add(n, s) {
3740
+ add(n, r) {
3677
3741
  const l = {
3678
3742
  id: `s${o++}`,
3679
3743
  type: n,
@@ -3684,49 +3748,49 @@ function ue() {
3684
3748
  h: n === "arrow" ? 0.05 : 0.16,
3685
3749
  x2: 0.4,
3686
3750
  y2: 0.28,
3687
- ...s
3751
+ ...r
3688
3752
  };
3689
3753
  return e.push(l), l;
3690
3754
  },
3691
- update(n, s) {
3755
+ update(n, r) {
3692
3756
  const l = e.find((c) => c.id === n);
3693
- return l ? (Object.assign(l, s), l) : null;
3757
+ return l ? (Object.assign(l, r), l) : null;
3694
3758
  },
3695
3759
  remove(n) {
3696
- const s = e.findIndex((c) => c.id === n);
3697
- if (s < 0)
3760
+ const r = e.findIndex((c) => c.id === n);
3761
+ if (r < 0)
3698
3762
  return null;
3699
- const [l] = e.splice(s, 1);
3763
+ const [l] = e.splice(r, 1);
3700
3764
  return t.free(l.number), l;
3701
3765
  },
3702
3766
  reset() {
3703
- for (e = [], a = { ...qt }, o = 1; t.peekUsed().length; )
3767
+ for (e = [], a = { ...Wt }, o = 1; t.peekUsed().length; )
3704
3768
  t.free(t.peekUsed()[0]);
3705
3769
  }
3706
3770
  };
3707
3771
  }
3708
- function bn(t, e) {
3772
+ function Pn(t, e) {
3709
3773
  const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0, n = Number(e == null ? void 0 : e.y) || 0;
3710
- return (Array.isArray(t) ? t : []).map((s) => {
3774
+ return (Array.isArray(t) ? t : []).map((r) => {
3711
3775
  const l = {
3712
- ...s,
3713
- x: (s.x - i) / a,
3714
- y: (s.y - n) / o,
3715
- w: (s.w || 0) / a,
3716
- h: (s.h || 0) / o
3776
+ ...r,
3777
+ x: (r.x - i) / a,
3778
+ y: (r.y - n) / o,
3779
+ w: (r.w || 0) / a,
3780
+ h: (r.h || 0) / o
3717
3781
  };
3718
- return Number.isFinite(s.x2) && (l.x2 = (s.x2 - i) / a), Number.isFinite(s.y2) && (l.y2 = (s.y2 - n) / o), l;
3782
+ return Number.isFinite(r.x2) && (l.x2 = (r.x2 - i) / a), Number.isFinite(r.y2) && (l.y2 = (r.y2 - n) / o), l;
3719
3783
  });
3720
3784
  }
3721
- function wn(t) {
3785
+ function Ln(t) {
3722
3786
  const e = Math.min(Math.max(t.x, 0), 0.95), a = Math.min(Math.max(t.y, 0), 0.95), o = Math.min(Math.max(t.w, 0.05), 1 - e), i = Math.min(Math.max(t.h, 0.05), 1 - a);
3723
3787
  return { x: e, y: a, w: o, h: i };
3724
3788
  }
3725
- function Sn(t, e) {
3789
+ function xn(t, e) {
3726
3790
  const a = t.type === "arrow" ? (t.x + (t.x2 ?? t.x)) / 2 : t.x + (t.w || 0) / 2, o = t.type === "arrow" ? (t.y + (t.y2 ?? t.y)) / 2 : t.y + (t.h || 0) / 2;
3727
3791
  return a >= e.x && o >= e.y && a <= e.x + e.w && o <= e.y + e.h;
3728
3792
  }
3729
- function ga(t) {
3793
+ function ya(t) {
3730
3794
  const e = Math.max(1, Number(t) || 1);
3731
3795
  return {
3732
3796
  stroke: Math.max(2, e * 75e-4),
@@ -3736,55 +3800,55 @@ function ga(t) {
3736
3800
  arrowHeadAngle: 0.4
3737
3801
  };
3738
3802
  }
3739
- function An(t, e, a, o, i) {
3740
- const n = Math.atan2(o - e, a - t), s = i.arrowHead, l = Math.min(i.stroke, s * 0.2), c = a, d = o, m = a - Math.cos(n) * s, S = o - Math.sin(n) * s, v = {
3741
- x: c - s * Math.cos(n - i.arrowHeadAngle),
3742
- y: d - s * Math.sin(n - i.arrowHeadAngle)
3743
- }, A = {
3744
- x: c - s * Math.cos(n + i.arrowHeadAngle),
3745
- y: d - s * Math.sin(n + i.arrowHeadAngle)
3746
- }, E = {
3803
+ function Un(t, e, a, o, i) {
3804
+ const n = Math.atan2(o - e, a - t), r = i.arrowHead, l = Math.min(i.stroke, r * 0.2), c = a, d = o, h = a - Math.cos(n) * r, S = o - Math.sin(n) * r, v = {
3805
+ x: c - r * Math.cos(n - i.arrowHeadAngle),
3806
+ y: d - r * Math.sin(n - i.arrowHeadAngle)
3807
+ }, w = {
3808
+ x: c - r * Math.cos(n + i.arrowHeadAngle),
3809
+ y: d - r * Math.sin(n + i.arrowHeadAngle)
3810
+ }, j = {
3747
3811
  x: a - Math.cos(n) * l,
3748
3812
  y: o - Math.sin(n) * l
3749
3813
  };
3750
- return { angle: n, tipX: c, tipY: d, baseX: m, baseY: S, left: v, right: A, shaftEnd: E };
3751
- }
3752
- async function Ve(t, e = {}) {
3753
- const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, n = await Rn(t), s = Math.round(a.x * n.width), l = Math.round(a.y * n.height), c = Math.max(1, Math.round(a.w * n.width)), d = Math.max(1, Math.round(a.h * n.height)), m = Cn(c, d, o), S = m.width, v = m.height, A = document.createElement("canvas");
3754
- A.width = S, A.height = v, A.getContext("2d").drawImage(n, s, l, c, d, 0, 0, S, v);
3755
- const P = await Be(A, "image/webp", i);
3756
- if (P && P.size > 0 && P.type === "image/webp")
3757
- return { blob: P, width: S, height: v, mime: "image/webp", ext: "webp" };
3758
- const u = await Be(A, "image/png");
3814
+ return { angle: n, tipX: c, tipY: d, baseX: h, baseY: S, left: v, right: w, shaftEnd: j };
3815
+ }
3816
+ async function Ke(t, e = {}) {
3817
+ const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, n = await On(t), r = Math.round(a.x * n.width), l = Math.round(a.y * n.height), c = Math.max(1, Math.round(a.w * n.width)), d = Math.max(1, Math.round(a.h * n.height)), h = Fn(c, d, o), S = h.width, v = h.height, w = document.createElement("canvas");
3818
+ w.width = S, w.height = v, w.getContext("2d").drawImage(n, r, l, c, d, 0, 0, S, v);
3819
+ const R = await He(w, "image/webp", i);
3820
+ if (R && R.size > 0 && R.type === "image/webp")
3821
+ return { blob: R, width: S, height: v, mime: "image/webp", ext: "webp" };
3822
+ const u = await He(w, "image/png");
3759
3823
  if (!u || !u.size)
3760
3824
  throw new Error("Could not encode screenshot");
3761
3825
  return { blob: u, width: S, height: v, mime: "image/png", ext: "png" };
3762
3826
  }
3763
- function Cn(t, e, a = 2048) {
3764
- const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), n = Math.max(1, Number(a) || 2048), s = Math.min(1, n / Math.max(o, i));
3827
+ function Fn(t, e, a = 2048) {
3828
+ const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), n = Math.max(1, Number(a) || 2048), r = Math.min(1, n / Math.max(o, i));
3765
3829
  return {
3766
- width: Math.max(1, Math.round(o * s)),
3767
- height: Math.max(1, Math.round(i * s)),
3768
- scale: s
3830
+ width: Math.max(1, Math.round(o * r)),
3831
+ height: Math.max(1, Math.round(i * r)),
3832
+ scale: r
3769
3833
  };
3770
3834
  }
3771
- function En(t = 2048) {
3835
+ function Tn(t = 2048) {
3772
3836
  const e = Math.floor(Number(t) / 2);
3773
3837
  return Math.max(1, Math.min(1024, e || 1024));
3774
3838
  }
3775
- function zn(t, e = null) {
3839
+ function Mn(t, e = null) {
3776
3840
  if ((e == null ? void 0 : e.code) === "payload_too_large" || Number(e == null ? void 0 : e.status) === 413 || Number(t == null ? void 0 : t.status) === 413)
3777
3841
  return !0;
3778
3842
  const a = String((t == null ? void 0 : t.message) || t || (e == null ? void 0 : e.error) || "").toLowerCase();
3779
3843
  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(t == null ? void 0 : t.status) === 413;
3780
3844
  }
3781
- function Rn(t) {
3845
+ function On(t) {
3782
3846
  return new Promise((e, a) => {
3783
3847
  const o = new Image();
3784
3848
  o.onload = () => e(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = t;
3785
3849
  });
3786
3850
  }
3787
- function Be(t, e, a) {
3851
+ function He(t, e, a) {
3788
3852
  return new Promise((o) => {
3789
3853
  try {
3790
3854
  t.toBlob((i) => o(i), e, a);
@@ -3793,34 +3857,53 @@ function Be(t, e, a) {
3793
3857
  }
3794
3858
  });
3795
3859
  }
3796
- const jn = [
3797
- "url",
3798
- "title",
3799
- "userAgent",
3800
- "os",
3801
- "browser",
3802
- "language",
3803
- "timezone",
3804
- "viewport",
3805
- "user"
3806
- ];
3807
- function Pn(t) {
3860
+ function Dn(t) {
3808
3861
  return !t || typeof t != "object" ? !1 : !!(t.userId || t.email || t.displayName);
3809
3862
  }
3810
- function Ln(t = {}) {
3811
- const e = [];
3812
- for (const a of jn) {
3813
- const o = t[a];
3814
- o == null || o === "" || a === "user" && !Pn(o) || e.push({
3815
- key: a,
3816
- label: g(`diag.${a}`),
3817
- value: o,
3863
+ function In(t, e) {
3864
+ if (e != null && String(e).trim() !== "")
3865
+ return String(e).trim();
3866
+ const a = `diag.${t}`, o = m(a);
3867
+ return o !== a ? o : Xi(t) || t;
3868
+ }
3869
+ function $n(t = {}, e = {}) {
3870
+ const a = e.customFields || {};
3871
+ let o;
3872
+ if (Vn(t))
3873
+ o = xe(t, a);
3874
+ else {
3875
+ const n = {};
3876
+ for (const [l, c] of Object.entries(t || {}))
3877
+ n[l] = { value: c };
3878
+ const r = {};
3879
+ for (const l of pa)
3880
+ Object.prototype.hasOwnProperty.call(n, l) && (r[l] = n[l]);
3881
+ for (const l of Object.keys(n))
3882
+ Object.prototype.hasOwnProperty.call(r, l) || (r[l] = n[l]);
3883
+ o = xe(r, a);
3884
+ }
3885
+ const i = [];
3886
+ for (const [n, r] of Object.entries(o)) {
3887
+ const l = r == null ? void 0 : r.value;
3888
+ l == null || l === "" || n === "user" && !Dn(l) || n === "screen" && Bn(l) || i.push({
3889
+ key: n,
3890
+ label: In(n, r == null ? void 0 : r.label),
3891
+ value: l,
3818
3892
  redacted: !1
3819
3893
  });
3820
3894
  }
3821
- return e;
3895
+ return i;
3896
+ }
3897
+ function Vn(t) {
3898
+ if (!t || typeof t != "object" || Array.isArray(t))
3899
+ return !1;
3900
+ const e = Object.values(t);
3901
+ return e.length ? e.every((a) => a != null && typeof a == "object" && !Array.isArray(a) && Object.prototype.hasOwnProperty.call(a, "value")) : !1;
3902
+ }
3903
+ function Bn(t) {
3904
+ return !t || typeof t != "object" ? !0 : t.width == null && t.height == null;
3822
3905
  }
3823
- function xn(t = []) {
3906
+ function Nn(t = []) {
3824
3907
  return t.map((e, a) => {
3825
3908
  const o = {
3826
3909
  id: `log-${a}-${e.at || 0}`,
@@ -3832,7 +3915,7 @@ function xn(t = []) {
3832
3915
  return Number.isFinite(e.t) && (o.t = e.t), e.truncated && (o.truncated = !0), Number.isFinite(e.count) && e.count > 1 && (o.count = e.count), Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
3833
3916
  });
3834
3917
  }
3835
- function Un(t = []) {
3918
+ function Kn(t = []) {
3836
3919
  if (!t.length)
3837
3920
  return { checked: !0, indeterminate: !1 };
3838
3921
  const e = t.filter((a) => !a.redacted).length;
@@ -3843,11 +3926,11 @@ function Dt(t, e) {
3843
3926
  a.redacted = !!e;
3844
3927
  });
3845
3928
  }
3846
- function Tn(t = {}) {
3929
+ function Hn(t = {}) {
3847
3930
  const e = t.diagnostics || [], a = t.logs || [], o = e.some((n) => !n.redacted), i = a.length > 0 && a.some((n) => !n.redacted);
3848
- return o && i ? g("privacy.disclosure.both") : o ? g("privacy.disclosure.diagnostics") : i ? g("privacy.disclosure.logs") : "";
3931
+ return o && i ? m("privacy.disclosure.both") : o ? m("privacy.disclosure.diagnostics") : i ? m("privacy.disclosure.logs") : "";
3849
3932
  }
3850
- function Fn(t) {
3933
+ function _n(t) {
3851
3934
  if (t == null)
3852
3935
  return "";
3853
3936
  if (typeof t == "string" || typeof t == "number" || typeof t == "boolean")
@@ -3858,7 +3941,7 @@ function Fn(t) {
3858
3941
  return String(t);
3859
3942
  }
3860
3943
  }
3861
- function Mn(t = {}) {
3944
+ function Gn(t = {}) {
3862
3945
  const e = {};
3863
3946
  t.author != null && t.author !== "" && (e.author = t.author);
3864
3947
  for (const o of t.diagnostics || [])
@@ -3878,57 +3961,57 @@ const Q = [
3878
3961
  { id: "idea", label: "Idea" },
3879
3962
  { id: "other", label: "Other" }
3880
3963
  ];
3881
- function Ne(t) {
3964
+ function _e(t) {
3882
3965
  return String(t || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
3883
3966
  }
3884
- function Rt(t) {
3967
+ function jt(t) {
3885
3968
  const e = String(t || "").trim();
3886
3969
  return e ? e.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
3887
3970
  }
3888
- function Dn(t) {
3971
+ function qn(t) {
3889
3972
  if (!Array.isArray(t) || !t.length)
3890
3973
  return Q.map((o) => ({ ...o }));
3891
3974
  const e = /* @__PURE__ */ new Set(), a = [];
3892
3975
  for (const o of t) {
3893
- let i = "", n = "", s = "", l = "";
3894
- if (typeof o == "string" || typeof o == "number" ? (i = Ne(o), n = Rt(i)) : o && typeof o == "object" && (i = Ne(o.id ?? o.value ?? o.kind), n = String(o.label || o.name || Rt(i)).trim() || Rt(i), s = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
3976
+ let i = "", n = "", r = "", l = "";
3977
+ if (typeof o == "string" || typeof o == "number" ? (i = _e(o), n = jt(i)) : o && typeof o == "object" && (i = _e(o.id ?? o.value ?? o.kind), n = String(o.label || o.name || jt(i)).trim() || jt(i), r = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
3895
3978
  continue;
3896
3979
  e.add(i);
3897
3980
  const c = { id: i, label: n };
3898
- s && (c.title = s), l && (c.description = l), a.push(c);
3981
+ r && (c.title = r), l && (c.description = l), a.push(c);
3899
3982
  }
3900
3983
  return a.length ? a : Q.map((o) => ({ ...o }));
3901
3984
  }
3902
- function Nt(t) {
3985
+ function Kt(t) {
3903
3986
  var a;
3904
3987
  return ((a = (Array.isArray(t) && t.length ? t : Q)[0]) == null ? void 0 : a.id) || "other";
3905
3988
  }
3906
- const In = ["maker", "all-business", "brighter-day", "quiet-night"], ma = "maker", On = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), ee = 0.02, Ke = 0.05, $n = `
3989
+ const Wn = ["maker", "all-business", "brighter-day", "quiet-night"], va = "maker", Zn = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), oe = 0.02, Ge = 0.05, Yn = `
3907
3990
  <svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
3908
3991
  <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"/>
3909
3992
  <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"/>
3910
3993
  </svg>
3911
3994
  `;
3912
- function M(t) {
3995
+ function O(t) {
3913
3996
  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">${t}</svg>`;
3914
3997
  }
3915
- const U = {
3916
- crop: M('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
3917
- resetCrop: M('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
3918
- arrow: M('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
3919
- rect: M('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
3920
- circle: M('<circle cx="12" cy="12" r="8"/>'),
3921
- discard: M('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
3922
- recapture: M('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
3923
- privacy: M('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
3924
- audio: M('<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"/>'),
3925
- video: M('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3998
+ const x = {
3999
+ crop: O('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
4000
+ resetCrop: O('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
4001
+ arrow: O('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
4002
+ rect: O('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
4003
+ circle: O('<circle cx="12" cy="12" r="8"/>'),
4004
+ discard: O('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
4005
+ recapture: O('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
4006
+ privacy: O('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
4007
+ audio: O('<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"/>'),
4008
+ video: O('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
3926
4009
  stop: '<svg class="nf-icon" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><rect x="7" y="7" width="10" height="10" rx="1.5"/></svg>',
3927
- openArrow: M('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
3928
- close: M('<path d="M6 6l12 12M18 6 6 18"/>')
3929
- }, ot = hn();
4010
+ openArrow: O('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
4011
+ close: O('<path d="M6 6l12 12M18 6 6 18"/>')
4012
+ }, ot = Cn();
3930
4013
  ot.hook();
3931
- const ha = 10, Vn = 80, fa = "notefully.author", ya = "notefully.kind", va = "notefully.launcherCorner", ka = "notefully.redactSections", dt = 48, Bn = 6, At = ["tl", "tr", "bl", "br"];
4014
+ const ba = 10, Xn = 80, ka = "notefully.author", wa = "notefully.kind", Sa = "notefully.launcherCorner", Aa = "notefully.redactSections", pt = 48, Jn = 6, Ct = ["tl", "tr", "bl", "br"];
3932
4015
  let p = {
3933
4016
  endpoint: "",
3934
4017
  projectKey: "",
@@ -3938,11 +4021,11 @@ let p = {
3938
4021
  hideLauncher: !1,
3939
4022
  /** Initial dock corner when localStorage has none: tl | tr | bl | br */
3940
4023
  launcherCorner: null,
3941
- theme: ma,
4024
+ theme: va,
3942
4025
  video: !1,
3943
- consoleLogLimit: ha,
3944
- consoleMethods: ce(),
3945
- scrubLog: Ft,
4026
+ consoleLogLimit: ba,
4027
+ consoleMethods: de(),
4028
+ scrubLog: Mt,
3946
4029
  logSources: null,
3947
4030
  kinds: Q.map((t) => ({ ...t })),
3948
4031
  kindsCustom: !1,
@@ -3952,27 +4035,28 @@ let p = {
3952
4035
  onClose: null,
3953
4036
  displayLink: !1,
3954
4037
  locale: null,
3955
- translations: null
3956
- }, vt = !1, Wt = !1, _ = {}, b = null, r = {}, j = ue(), W = "", gt = "", G = null, q = Nt(Q), tt = null, V = null, x = null, L = null, zt = null, X = null, N = null, it = !1, D = null, ae = !1, ft = { w: 0, h: 0 }, Zt = !1, kt = !1, bt = !1, H = [], K = [], J = !1;
4038
+ translations: null,
4039
+ fields: null
4040
+ }, bt = !1, Zt = !1, G = {}, J = {}, b = null, s = {}, z = pe(), Z = "", mt = "", q = null, W = Kt(Q), tt = null, B = null, L = null, P = null, Rt = null, Y = null, K = null, it = !1, D = null, ie = !1, yt = { w: 0, h: 0 }, Yt = !1, kt = !1, wt = !1, _ = [], H = [], X = !1;
3957
4041
  function y(t) {
3958
4042
  return b.querySelector(t);
3959
4043
  }
3960
- function ba(t) {
4044
+ function Ca(t) {
3961
4045
  const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
3962
- return In.includes(e) ? e : ma;
4046
+ return Wn.includes(e) ? e : va;
3963
4047
  }
3964
- function z(t, e = !1) {
3965
- r.status && (r.status.textContent = t || "", zt && (clearTimeout(zt), zt = null), t && !e && (zt = setTimeout(() => {
3966
- r.status.textContent = "";
4048
+ function E(t, e = !1) {
4049
+ s.status && (s.status.textContent = t || "", Rt && (clearTimeout(Rt), Rt = null), t && !e && (Rt = setTimeout(() => {
4050
+ s.status.textContent = "";
3967
4051
  }, 4e3)));
3968
4052
  }
3969
- function de() {
4053
+ function ge() {
3970
4054
  return b && document.body.contains(b) || (b = document.createElement("div"), b.id = "notefully", b.innerHTML = `
3971
- <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${$n}</button>
4055
+ <button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${Yn}</button>
3972
4056
  <div class="nf-dialog" hidden>
3973
4057
  <div class="nf-panel">
3974
4058
  <div class="nf-pill nf-close-pill">
3975
- <button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${U.close}</button>
4059
+ <button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${x.close}</button>
3976
4060
  </div>
3977
4061
  <div class="nf-panel-body">
3978
4062
  <div class="nf-heading">
@@ -3986,15 +4070,15 @@ function de() {
3986
4070
  <div class="nf-canvas"></div>
3987
4071
  <div class="nf-palette">
3988
4072
  <div class="nf-palette-tools">
3989
- <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${U.crop}</button>
3990
- <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${U.resetCrop}</button>
3991
- <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${U.arrow}</button>
3992
- <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${U.rect}</button>
3993
- <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${U.circle}</button>
4073
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${x.crop}</button>
4074
+ <button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${x.resetCrop}</button>
4075
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${x.arrow}</button>
4076
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${x.rect}</button>
4077
+ <button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${x.circle}</button>
3994
4078
  </div>
3995
4079
  <div class="nf-palette-shot">
3996
- <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${U.recapture}</button>
3997
- <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${U.discard}</button>
4080
+ <button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${x.recapture}</button>
4081
+ <button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${x.discard}</button>
3998
4082
  </div>
3999
4083
  </div>
4000
4084
  </div>
@@ -4007,7 +4091,7 @@ function de() {
4007
4091
  <div class="nf-privacy-summary">
4008
4092
  <span class="nf-privacy-text"></span>
4009
4093
  <div class="nf-pill nf-privacy-toggle-pill">
4010
- <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${U.privacy}</button>
4094
+ <button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${x.privacy}</button>
4011
4095
  </div>
4012
4096
  </div>
4013
4097
  </div>
@@ -4018,10 +4102,10 @@ function de() {
4018
4102
  </div>
4019
4103
  </div>
4020
4104
  <div class="nf-actions">
4021
- <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${U.resetCrop}</button>
4105
+ <button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${x.resetCrop}</button>
4022
4106
  <div class="nf-actions-media">
4023
- <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${U.audio}</button>
4024
- <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${U.video}</button>
4107
+ <button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${x.audio}</button>
4108
+ <button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${x.video}</button>
4025
4109
  </div>
4026
4110
  <div class="nf-pill nf-submit-pill">
4027
4111
  <button class="nf-submit" type="button" data-i18n-text="form.submit"></button>
@@ -4033,12 +4117,12 @@ function de() {
4033
4117
  <p class="nf-success-msg" hidden aria-live="polite" data-i18n-text="form.success"></p>
4034
4118
  <a class="nf-success-link" hidden target="_blank" rel="noopener noreferrer" data-i18n-aria="form.viewReport">
4035
4119
  <span class="nf-success-link-label" data-i18n-text="form.viewReport"></span>
4036
- ${U.openArrow}
4120
+ ${x.openArrow}
4037
4121
  </a>
4038
4122
  </div>
4039
4123
  </div>
4040
- <button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${U.stop}</button>
4041
- `, document.body.appendChild(b), r = {
4124
+ <button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${x.stop}</button>
4125
+ `, document.body.appendChild(b), s = {
4042
4126
  launcher: y(".nf-launcher"),
4043
4127
  dialog: y(".nf-dialog"),
4044
4128
  panel: y(".nf-panel"),
@@ -4078,142 +4162,142 @@ function de() {
4078
4162
  resetCrop: y(".nf-reset-crop"),
4079
4163
  submit: y(".nf-submit"),
4080
4164
  shot: null
4081
- }, Xn(), mt()), b;
4165
+ }, lr(), ht()), b;
4082
4166
  }
4083
- function mt() {
4167
+ function ht() {
4084
4168
  var t;
4085
- b && (wa(), b.dataset.theme = ba(p.theme), b.lang = Lt(), b.dir = Xa(Lt()), p.hideLauncher ? b.setAttribute("data-nf-hidden-launcher", "") : b.removeAttribute("data-nf-hidden-launcher"), r.video && (r.video.hidden = !p.video), Nn(), H.length && H.forEach((e) => {
4086
- e.label = g(`diag.${e.key}`);
4087
- }), Ea(), J ? be() : ke(), ge(Aa()), (t = r.dialog) != null && t.hidden && It());
4169
+ b && (Ea(), b.dataset.theme = Ca(p.theme), b.lang = xt(), b.dir = ao(xt()), p.hideLauncher ? b.setAttribute("data-nf-hidden-launcher", "") : b.removeAttribute("data-nf-hidden-launcher"), s.video && (s.video.hidden = !p.video), Qn(), _.length && _.forEach((e) => {
4170
+ e.label = m(`diag.${e.key}`);
4171
+ }), Pa(), X ? Se() : we(), he(Ra()), (t = s.dialog) != null && t.hidden && It());
4088
4172
  }
4089
- function wa() {
4090
- const t = Wa({
4173
+ function Ea() {
4174
+ const t = Qa({
4091
4175
  locale: p.locale == null ? void 0 : p.locale
4092
4176
  });
4093
- Ya(p.translations), Za(t);
4177
+ eo(p.translations), to(t);
4094
4178
  }
4095
- function Nn() {
4179
+ function Qn() {
4096
4180
  if (b) {
4097
4181
  if (b.querySelectorAll("[data-i18n-title]").forEach((t) => {
4098
- t.title = g(t.getAttribute("data-i18n-title"));
4182
+ t.title = m(t.getAttribute("data-i18n-title"));
4099
4183
  }), b.querySelectorAll("[data-i18n-aria]").forEach((t) => {
4100
- t.setAttribute("aria-label", g(t.getAttribute("data-i18n-aria")));
4184
+ t.setAttribute("aria-label", m(t.getAttribute("data-i18n-aria")));
4101
4185
  }), b.querySelectorAll("[data-i18n-placeholder]").forEach((t) => {
4102
- t.setAttribute("placeholder", g(t.getAttribute("data-i18n-placeholder")));
4186
+ t.setAttribute("placeholder", m(t.getAttribute("data-i18n-placeholder")));
4103
4187
  }), b.querySelectorAll("[data-i18n-text]").forEach((t) => {
4104
- t.textContent = g(t.getAttribute("data-i18n-text"));
4105
- }), r.audio) {
4106
- const t = r.audio.dataset.active === "true";
4107
- St(t);
4188
+ t.textContent = m(t.getAttribute("data-i18n-text"));
4189
+ }), s.audio) {
4190
+ const t = s.audio.dataset.active === "true";
4191
+ At(t);
4108
4192
  }
4109
- he();
4193
+ ye();
4110
4194
  }
4111
4195
  }
4112
- function Sa(t) {
4196
+ function za(t) {
4113
4197
  if (p.kindsCustom)
4114
4198
  return t.label;
4115
- const e = `kind.${t.id}`, a = g(e);
4199
+ const e = `kind.${t.id}`, a = m(e);
4116
4200
  return a === e ? t.label : a;
4117
4201
  }
4118
4202
  function It() {
4119
- r.launcher && (r.launcher.hidden = !!p.hideLauncher);
4203
+ s.launcher && (s.launcher.hidden = !!p.hideLauncher);
4120
4204
  }
4121
- function pe(t) {
4205
+ function me(t) {
4122
4206
  const e = String(t || "").trim().toLowerCase();
4123
- return At.includes(e) ? e : "";
4207
+ return Ct.includes(e) ? e : "";
4124
4208
  }
4125
- function Kn() {
4209
+ function tr() {
4126
4210
  try {
4127
- return pe(localStorage.getItem(va));
4211
+ return me(localStorage.getItem(Sa));
4128
4212
  } catch {
4129
4213
  return "";
4130
4214
  }
4131
4215
  }
4132
- function Hn(t) {
4133
- if (At.includes(t))
4216
+ function er(t) {
4217
+ if (Ct.includes(t))
4134
4218
  try {
4135
- localStorage.setItem(va, t);
4219
+ localStorage.setItem(Sa, t);
4136
4220
  } catch {
4137
4221
  }
4138
4222
  }
4139
- function Aa() {
4140
- return Kn() || pe(p.launcherCorner) || "bl";
4223
+ function Ra() {
4224
+ return tr() || me(p.launcherCorner) || "bl";
4141
4225
  }
4142
- function ge(t, e = !1) {
4143
- !r.launcher || !At.includes(t) || (r.launcher.dataset.corner = t, e && Hn(t));
4226
+ function he(t, e = !1) {
4227
+ !s.launcher || !Ct.includes(t) || (s.launcher.dataset.corner = t, e && er(t));
4144
4228
  }
4145
- function _n() {
4146
- if (!r.launcher)
4229
+ function ar() {
4230
+ if (!s.launcher)
4147
4231
  return 16;
4148
- const t = getComputedStyle(r.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(b).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
4232
+ const t = getComputedStyle(s.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(b).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
4149
4233
  return Number.isFinite(e) ? e : 16;
4150
4234
  }
4151
- function Gn(t) {
4152
- const e = _n(), a = window.innerWidth, o = window.innerHeight;
4235
+ function or(t) {
4236
+ const e = ar(), a = window.innerWidth, o = window.innerHeight;
4153
4237
  switch (t) {
4154
4238
  case "tl":
4155
4239
  return { x: e, y: e };
4156
4240
  case "tr":
4157
- return { x: a - e - dt, y: e };
4241
+ return { x: a - e - pt, y: e };
4158
4242
  case "br":
4159
- return { x: a - e - dt, y: o - e - dt };
4243
+ return { x: a - e - pt, y: o - e - pt };
4160
4244
  case "bl":
4161
4245
  default:
4162
- return { x: e, y: o - e - dt };
4246
+ return { x: e, y: o - e - pt };
4163
4247
  }
4164
4248
  }
4165
- function qn(t, e) {
4249
+ function ir(t, e) {
4166
4250
  var i;
4167
- let a = ((i = r.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
4168
- for (const n of At) {
4169
- const s = Gn(n), l = Math.hypot(t.x - s.x, t.y - s.y), c = Math.hypot(e.x - s.x, e.y - s.y), d = l - c;
4251
+ let a = ((i = s.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
4252
+ for (const n of Ct) {
4253
+ const r = or(n), l = Math.hypot(t.x - r.x, t.y - r.y), c = Math.hypot(e.x - r.x, e.y - r.y), d = l - c;
4170
4254
  d > o && (o = d, a = n);
4171
4255
  }
4172
4256
  return a;
4173
4257
  }
4174
- function Ca() {
4175
- r.launcher && (r.launcher.style.left = "", r.launcher.style.top = "", r.launcher.style.right = "", r.launcher.style.bottom = "", r.launcher.style.transform = "", r.launcher.style.transition = "");
4258
+ function ja() {
4259
+ s.launcher && (s.launcher.style.left = "", s.launcher.style.top = "", s.launcher.style.right = "", s.launcher.style.bottom = "", s.launcher.style.transform = "", s.launcher.style.transition = "");
4176
4260
  }
4177
- function Wn(t, e) {
4178
- if (!r.launcher)
4261
+ function nr(t, e) {
4262
+ if (!s.launcher)
4179
4263
  return;
4180
- const a = Math.max(0, window.innerWidth - dt), o = Math.max(0, window.innerHeight - dt), i = Math.min(a, Math.max(0, t)), n = Math.min(o, Math.max(0, e));
4181
- r.launcher.style.right = "auto", r.launcher.style.bottom = "auto", r.launcher.style.left = `${i}px`, r.launcher.style.top = `${n}px`;
4264
+ const a = Math.max(0, window.innerWidth - pt), o = Math.max(0, window.innerHeight - pt), i = Math.min(a, Math.max(0, t)), n = Math.min(o, Math.max(0, e));
4265
+ s.launcher.style.right = "auto", s.launcher.style.bottom = "auto", s.launcher.style.left = `${i}px`, s.launcher.style.top = `${n}px`;
4182
4266
  }
4183
- function Zn(t) {
4184
- const e = r.launcher;
4185
- if (!e || !At.includes(t))
4267
+ function rr(t) {
4268
+ const e = s.launcher;
4269
+ if (!e || !Ct.includes(t))
4186
4270
  return;
4187
4271
  const a = e.getBoundingClientRect();
4188
- Ca(), ge(t, !0);
4272
+ ja(), he(t, !0);
4189
4273
  const o = e.getBoundingClientRect(), i = a.left - o.left, n = a.top - o.top;
4190
4274
  Math.abs(i) < 0.5 && Math.abs(n) < 0.5 || (e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.getBoundingClientRect(), requestAnimationFrame(() => {
4191
4275
  e.style.transition = "transform 0.42s cubic-bezier(0.22, 1, 0.36, 1)", e.style.transform = "";
4192
- const s = (l) => {
4193
- l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend", s), e.style.transition = "", e.style.transform = "");
4276
+ const r = (l) => {
4277
+ l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend", r), e.style.transition = "", e.style.transform = "");
4194
4278
  };
4195
- e.addEventListener("transitionend", s), window.setTimeout(s, 500);
4279
+ e.addEventListener("transitionend", r), window.setTimeout(r, 500);
4196
4280
  }));
4197
4281
  }
4198
- function He(t) {
4199
- if (!D || !r.launcher)
4282
+ function qe(t) {
4283
+ if (!D || !s.launcher)
4200
4284
  return;
4201
4285
  const e = D;
4202
- D = null, r.launcher.dataset.dragging = "false";
4286
+ D = null, s.launcher.dataset.dragging = "false";
4203
4287
  try {
4204
- r.launcher.releasePointerCapture(e.pointerId);
4288
+ s.launcher.releasePointerCapture(e.pointerId);
4205
4289
  } catch {
4206
4290
  }
4207
4291
  if (!e.moved) {
4208
- Ca();
4292
+ ja();
4209
4293
  return;
4210
4294
  }
4211
- ae = !0;
4212
- const a = r.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, n = qn(i, o);
4213
- Zn(n);
4295
+ ie = !0;
4296
+ const a = s.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, n = ir(i, o);
4297
+ rr(n);
4214
4298
  }
4215
- function Yn() {
4216
- const t = r.launcher;
4299
+ function sr() {
4300
+ const t = s.launcher;
4217
4301
  !t || t.dataset.nfDragBound === "true" || (t.dataset.nfDragBound = "true", t.addEventListener("pointerdown", (e) => {
4218
4302
  if (e.button != null && e.button !== 0 || p.hideLauncher || t.hidden)
4219
4303
  return;
@@ -4231,205 +4315,205 @@ function Yn() {
4231
4315
  return;
4232
4316
  const a = e.clientX - D.startX, o = e.clientY - D.startY;
4233
4317
  if (!D.moved) {
4234
- if (Math.hypot(a, o) < Bn)
4318
+ if (Math.hypot(a, o) < Jn)
4235
4319
  return;
4236
4320
  D.moved = !0, t.dataset.dragging = "true";
4237
4321
  }
4238
- Wn(D.originX + a, D.originY + o);
4239
- }), t.addEventListener("pointerup", He), t.addEventListener("pointercancel", He));
4322
+ nr(D.originX + a, D.originY + o);
4323
+ }), t.addEventListener("pointerup", qe), t.addEventListener("pointercancel", qe));
4240
4324
  }
4241
- function Xn() {
4325
+ function lr() {
4242
4326
  var e;
4243
- r.launcher.addEventListener("click", (a) => {
4244
- if (ae) {
4245
- a.preventDefault(), a.stopPropagation(), ae = !1;
4327
+ s.launcher.addEventListener("click", (a) => {
4328
+ if (ie) {
4329
+ a.preventDefault(), a.stopPropagation(), ie = !1;
4246
4330
  return;
4247
4331
  }
4248
- Ba();
4249
- }), Yn(), ge(Aa()), y(".nf-dialog").addEventListener("click", (a) => {
4250
- kt && !bt || a.target === r.dialog && nt();
4251
- }), (e = r.close) == null || e.addEventListener("click", () => {
4252
- kt && !bt || nt();
4253
- }), document.addEventListener("keydown", Ia), b.querySelectorAll(".nf-tool").forEach((a) => {
4254
- a.addEventListener("click", () => wt(a.dataset.tool));
4255
- }), r.resetCrop.addEventListener("click", cr), r.canvas.addEventListener("pointerdown", ir), r.canvas.addEventListener("dragstart", (a) => a.preventDefault());
4332
+ _a();
4333
+ }), sr(), he(Ra()), y(".nf-dialog").addEventListener("click", (a) => {
4334
+ kt && !wt || a.target === s.dialog && nt();
4335
+ }), (e = s.close) == null || e.addEventListener("click", () => {
4336
+ kt && !wt || nt();
4337
+ }), document.addEventListener("keydown", Ba), b.querySelectorAll(".nf-tool").forEach((a) => {
4338
+ a.addEventListener("click", () => St(a.dataset.tool));
4339
+ }), s.resetCrop.addEventListener("click", kr), s.canvas.addEventListener("pointerdown", hr), s.canvas.addEventListener("dragstart", (a) => a.preventDefault());
4256
4340
  const t = y(".nf-kind");
4257
4341
  t && t.addEventListener("click", (a) => {
4258
4342
  const o = a.target.closest("[data-kind]");
4259
- o && me(o.dataset.kind);
4260
- }), r.discard.addEventListener("click", ur), r.recapture.addEventListener("click", () => {
4261
- pr().catch((a) => z(a.message || g("status.recaptureFailed")));
4262
- }), r.restore.addEventListener("click", dr), r.audio.addEventListener("click", gr), r.video.addEventListener("click", () => {
4263
- mr().catch((a) => z((a == null ? void 0 : a.message) || g("status.screenUnsupported")));
4264
- }), r.stop.addEventListener("click", () => N == null ? void 0 : N.stop()), r.privacyChange.addEventListener("click", () => ve(!J)), r.privacyScroll.addEventListener("change", Mr), y(".nf-submit").addEventListener("click", () => {
4265
- Ka().catch((a) => z(a.message || g("status.submitFailed")));
4266
- }), Ea(), wt(null);
4343
+ o && fe(o.dataset.kind);
4344
+ }), s.discard.addEventListener("click", wr), s.recapture.addEventListener("click", () => {
4345
+ Ar().catch((a) => E(a.message || m("status.recaptureFailed")));
4346
+ }), s.restore.addEventListener("click", Sr), s.audio.addEventListener("click", Cr), s.video.addEventListener("click", () => {
4347
+ Er().catch((a) => E((a == null ? void 0 : a.message) || m("status.screenUnsupported")));
4348
+ }), s.stop.addEventListener("click", () => K == null ? void 0 : K.stop()), s.privacyChange.addEventListener("click", () => ke(!X)), s.privacyScroll.addEventListener("change", Gr), y(".nf-submit").addEventListener("click", () => {
4349
+ Wa().catch((a) => E(a.message || m("status.submitFailed")));
4350
+ }), Pa(), St(null);
4267
4351
  }
4268
4352
  function I(t) {
4269
4353
  return String(t || "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4270
4354
  }
4271
- function Ea() {
4355
+ function Pa() {
4272
4356
  const t = b == null ? void 0 : b.querySelector(".nf-kind");
4273
4357
  if (!t)
4274
4358
  return;
4275
4359
  const e = Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q;
4276
- t.innerHTML = e.map((i) => `<button type="button" data-kind="${I(i.id)}">${I(Sa(i))}</button>`).join("");
4277
- const o = e.map((i) => i.id).includes(q) ? q : Nt(e);
4278
- me(o);
4360
+ t.innerHTML = e.map((i) => `<button type="button" data-kind="${I(i.id)}">${I(za(i))}</button>`).join("");
4361
+ const o = e.map((i) => i.id).includes(W) ? W : Kt(e);
4362
+ fe(o);
4279
4363
  }
4280
- function me(t) {
4281
- q = (p.kinds || Q).map((a) => a.id).includes(t) ? t : Nt(p.kinds), b == null || b.querySelectorAll("[data-kind]").forEach((a) => {
4282
- a.dataset.active = String(a.dataset.kind === q);
4283
- }), er(q), he();
4364
+ function fe(t) {
4365
+ W = (p.kinds || Q).map((a) => a.id).includes(t) ? t : Kt(p.kinds), b == null || b.querySelectorAll("[data-kind]").forEach((a) => {
4366
+ a.dataset.active = String(a.dataset.kind === W);
4367
+ }), pr(W), ye();
4284
4368
  }
4285
- function Jn() {
4286
- return (Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q).find((e) => e.id === q) || null;
4369
+ function cr() {
4370
+ return (Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q).find((e) => e.id === W) || null;
4287
4371
  }
4288
- function Qn() {
4289
- const t = Jn(), e = (t == null ? void 0 : t.id) || q || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || g(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || g(a ? `form.intro.${e}` : "form.intro.other"), n = a ? g(`form.placeholder.${e}`) : g("form.placeholder.custom", {
4290
- kind: t ? Sa(t) : Rt(e)
4372
+ function ur() {
4373
+ const t = cr(), e = (t == null ? void 0 : t.id) || W || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || m(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || m(a ? `form.intro.${e}` : "form.intro.other"), n = a ? m(`form.placeholder.${e}`) : m("form.placeholder.custom", {
4374
+ kind: t ? za(t) : jt(e)
4291
4375
  });
4292
4376
  return { title: o, intro: i, placeholder: n };
4293
4377
  }
4294
- function he() {
4295
- if (!r.title && !r.intro && !r.text)
4378
+ function ye() {
4379
+ if (!s.title && !s.intro && !s.text)
4296
4380
  return;
4297
- const t = Qn(), e = B() ? ` ${g("form.screenshotNote")}` : "";
4298
- r.title && (r.title.textContent = t.title), r.intro && (r.intro.textContent = `${t.intro}${e}`), r.text && r.text.setAttribute("placeholder", t.placeholder);
4381
+ const t = ur(), e = N() ? ` ${m("form.screenshotNote")}` : "";
4382
+ s.title && (s.title.textContent = t.title), s.intro && (s.intro.textContent = `${t.intro}${e}`), s.text && s.text.setAttribute("placeholder", t.placeholder);
4299
4383
  }
4300
- function tr() {
4384
+ function dr() {
4301
4385
  try {
4302
- return String(localStorage.getItem(ya) || "").trim().toLowerCase();
4386
+ return String(localStorage.getItem(wa) || "").trim().toLowerCase();
4303
4387
  } catch {
4304
4388
  return "";
4305
4389
  }
4306
4390
  }
4307
- function er(t) {
4391
+ function pr(t) {
4308
4392
  const e = String(t || "").trim().toLowerCase();
4309
4393
  if (e)
4310
4394
  try {
4311
- localStorage.setItem(ya, e);
4395
+ localStorage.setItem(wa, e);
4312
4396
  } catch {
4313
4397
  }
4314
4398
  }
4315
- function ar() {
4316
- const t = (p.kinds || Q).map((a) => a.id), e = tr();
4317
- return e && t.includes(e) ? e : Nt(p.kinds);
4399
+ function gr() {
4400
+ const t = (p.kinds || Q).map((a) => a.id), e = dr();
4401
+ return e && t.includes(e) ? e : Kt(p.kinds);
4318
4402
  }
4319
- function wt(t) {
4320
- tt = On.has(t) ? t : null, V = null, b.querySelectorAll(".nf-tool").forEach((e) => {
4403
+ function St(t) {
4404
+ tt = Zn.has(t) ? t : null, B = null, b.querySelectorAll(".nf-tool").forEach((e) => {
4321
4405
  e.dataset.active = String(e.dataset.tool === tt);
4322
- }), r.canvas && (r.canvas.dataset.draw = tt ? "true" : "false"), B() && O();
4406
+ }), s.canvas && (s.canvas.dataset.draw = tt ? "true" : "false"), N() && $();
4323
4407
  }
4324
- function _e(t) {
4408
+ function We(t) {
4325
4409
  return Math.min(1, Math.max(0, t));
4326
4410
  }
4327
- function Ct() {
4328
- return r.shot || r.canvas;
4411
+ function Et() {
4412
+ return s.shot || s.canvas;
4329
4413
  }
4330
- function Ot(t) {
4331
- const e = Ct().getBoundingClientRect();
4414
+ function $t(t) {
4415
+ const e = Et().getBoundingClientRect();
4332
4416
  return {
4333
- x: _e((t.clientX - e.left) / Math.max(e.width, 1)),
4334
- y: _e((t.clientY - e.top) / Math.max(e.height, 1))
4417
+ x: We((t.clientX - e.left) / Math.max(e.width, 1)),
4418
+ y: We((t.clientY - e.top) / Math.max(e.height, 1))
4335
4419
  };
4336
4420
  }
4337
- function or(t) {
4338
- const e = Ct().getBoundingClientRect();
4421
+ function mr(t) {
4422
+ const e = Et().getBoundingClientRect();
4339
4423
  return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
4340
4424
  }
4341
- function za(t) {
4342
- const e = Ot(t), a = j.crop();
4425
+ function La(t) {
4426
+ const e = $t(t), a = z.crop();
4343
4427
  return {
4344
4428
  x: a.x + e.x * a.w,
4345
4429
  y: a.y + e.y * a.h
4346
4430
  };
4347
4431
  }
4348
- function Kt(t, e) {
4432
+ function Ht(t, e) {
4349
4433
  const a = Math.min(t.x, e.x), o = Math.min(t.y, e.y);
4350
4434
  return {
4351
4435
  x: a,
4352
4436
  y: o,
4353
- w: Math.max(ee, Math.abs(e.x - t.x)),
4354
- h: Math.max(ee, Math.abs(e.y - t.y))
4437
+ w: Math.max(oe, Math.abs(e.x - t.x)),
4438
+ h: Math.max(oe, Math.abs(e.y - t.y))
4355
4439
  };
4356
4440
  }
4357
- function fe(t) {
4441
+ function ve(t) {
4358
4442
  b && (t ? b.dataset.grabbing = "true" : delete b.dataset.grabbing);
4359
4443
  }
4360
- function Yt(t) {
4444
+ function Xt(t) {
4361
4445
  try {
4362
- r.canvas.setPointerCapture(t.pointerId);
4446
+ s.canvas.setPointerCapture(t.pointerId);
4363
4447
  } catch {
4364
4448
  }
4365
4449
  }
4366
- function oe() {
4367
- window.addEventListener("pointermove", ja), window.addEventListener("pointerup", $t), window.addEventListener("pointercancel", $t);
4450
+ function ne() {
4451
+ window.addEventListener("pointermove", Ua), window.addEventListener("pointerup", Vt), window.addEventListener("pointercancel", Vt);
4368
4452
  }
4369
- function Ra() {
4370
- window.removeEventListener("pointermove", ja), window.removeEventListener("pointerup", $t), window.removeEventListener("pointercancel", $t);
4453
+ function xa() {
4454
+ window.removeEventListener("pointermove", Ua), window.removeEventListener("pointerup", Vt), window.removeEventListener("pointercancel", Vt);
4371
4455
  }
4372
- function ir(t) {
4373
- if (t.button !== 0 || !B())
4456
+ function hr(t) {
4457
+ if (t.button !== 0 || !N())
4374
4458
  return;
4375
- if (!t.target.closest(".nf-sticker") && !or(t)) {
4376
- V = null, O();
4459
+ if (!t.target.closest(".nf-sticker") && !mr(t)) {
4460
+ B = null, $();
4377
4461
  return;
4378
4462
  }
4379
4463
  const e = t.target.closest(".nf-handle"), a = t.target.closest(".nf-sticker");
4380
4464
  if (a && a.dataset.preview !== "true") {
4381
- t.preventDefault(), t.stopPropagation(), V = a.dataset.id, Yt(t), nr({
4465
+ t.preventDefault(), t.stopPropagation(), B = a.dataset.id, Xt(t), fr({
4382
4466
  kind: "sticker",
4383
- id: V,
4467
+ id: B,
4384
4468
  dir: (e == null ? void 0 : e.dataset.dir) || "move"
4385
- }, t), O();
4469
+ }, t), $();
4386
4470
  return;
4387
4471
  }
4388
- if (V = null, tt === "crop") {
4389
- t.preventDefault(), Yt(t), x = { kind: "crop", start: Ot(t), current: Ot(t) }, oe(), O();
4472
+ if (B = null, tt === "crop") {
4473
+ t.preventDefault(), Xt(t), L = { kind: "crop", start: $t(t), current: $t(t) }, ne(), $();
4390
4474
  return;
4391
4475
  }
4392
4476
  if (tt === "arrow" || tt === "rect" || tt === "circle") {
4393
- t.preventDefault(), Yt(t);
4394
- const o = za(t);
4395
- x = { kind: "sticker", type: tt, start: o, current: o }, oe(), O();
4477
+ t.preventDefault(), Xt(t);
4478
+ const o = La(t);
4479
+ L = { kind: "sticker", type: tt, start: o, current: o }, ne(), $();
4396
4480
  return;
4397
4481
  }
4398
- O();
4482
+ $();
4399
4483
  }
4400
- function nr(t, e) {
4484
+ function fr(t, e) {
4401
4485
  e.preventDefault(), e.stopPropagation();
4402
- const a = Ct().getBoundingClientRect(), o = j.list().find((i) => i.id === t.id);
4403
- L = {
4486
+ const a = Et().getBoundingClientRect(), o = z.list().find((i) => i.id === t.id);
4487
+ P = {
4404
4488
  ...t,
4405
4489
  startX: e.clientX,
4406
4490
  startY: e.clientY,
4407
- crop: j.crop(),
4491
+ crop: z.crop(),
4408
4492
  sticker: o ? { ...o } : null,
4409
4493
  rect: a
4410
- }, fe(t.dir === "move" || t.dir === "start" || t.dir === "end"), oe();
4494
+ }, ve(t.dir === "move" || t.dir === "start" || t.dir === "end"), ne();
4411
4495
  }
4412
- function ja(t) {
4413
- if (x) {
4414
- x.current = x.kind === "crop" ? Ot(t) : za(t), O();
4496
+ function Ua(t) {
4497
+ if (L) {
4498
+ L.current = L.kind === "crop" ? $t(t) : La(t), $();
4415
4499
  return;
4416
4500
  }
4417
- if (!L)
4501
+ if (!P)
4418
4502
  return;
4419
- const e = (t.clientX - L.startX) / L.rect.width * L.crop.w, a = (t.clientY - L.startY) / L.rect.height * L.crop.h, o = L.sticker;
4503
+ const e = (t.clientX - P.startX) / P.rect.width * P.crop.w, a = (t.clientY - P.startY) / P.rect.height * P.crop.h, o = P.sticker;
4420
4504
  if (o) {
4421
- if (L.dir === "end")
4422
- j.update(o.id, {
4505
+ if (P.dir === "end")
4506
+ z.update(o.id, {
4423
4507
  x2: o.x2 + e,
4424
4508
  y2: o.y2 + a
4425
4509
  });
4426
- else if (L.dir === "start")
4427
- j.update(o.id, {
4510
+ else if (P.dir === "start")
4511
+ z.update(o.id, {
4428
4512
  x: o.x + e,
4429
4513
  y: o.y + a
4430
4514
  });
4431
- else if (L.dir === "move")
4432
- j.update(o.id, {
4515
+ else if (P.dir === "move")
4516
+ z.update(o.id, {
4433
4517
  x: o.x + e,
4434
4518
  y: o.y + a,
4435
4519
  x2: (o.x2 || o.x) + e,
@@ -4437,12 +4521,12 @@ function ja(t) {
4437
4521
  });
4438
4522
  else {
4439
4523
  const i = { x: o.x, y: o.y, w: o.w, h: o.h };
4440
- rr(i, L.dir, e, a), j.update(o.id, i);
4524
+ yr(i, P.dir, e, a), z.update(o.id, i);
4441
4525
  }
4442
- O();
4526
+ $();
4443
4527
  }
4444
4528
  }
4445
- function rr(t, e, a, o) {
4529
+ function yr(t, e, a, o) {
4446
4530
  if (e.includes("e") && (t.w = Math.max(0.04, t.w + a)), e.includes("s") && (t.h = Math.max(0.04, t.h + o)), e.includes("w")) {
4447
4531
  const i = Math.max(0.04, t.w - a);
4448
4532
  t.x += t.w - i, t.w = i;
@@ -4452,52 +4536,52 @@ function rr(t, e, a, o) {
4452
4536
  t.y += t.h - i, t.h = i;
4453
4537
  }
4454
4538
  }
4455
- function $t(t) {
4456
- if (Ra(), fe(!1), x) {
4457
- sr();
4539
+ function Vt(t) {
4540
+ if (xa(), ve(!1), L) {
4541
+ vr();
4458
4542
  return;
4459
4543
  }
4460
- if (L) {
4461
- if (L.kind === "sticker") {
4462
- const e = r.canvas.getBoundingClientRect();
4463
- (t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (j.remove(L.id), V = null);
4544
+ if (P) {
4545
+ if (P.kind === "sticker") {
4546
+ const e = s.canvas.getBoundingClientRect();
4547
+ (t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (z.remove(P.id), B = null);
4464
4548
  }
4465
- L = null, O();
4549
+ P = null, $();
4466
4550
  }
4467
4551
  }
4468
- function sr() {
4469
- const t = x;
4470
- if (x = null, !t)
4552
+ function vr() {
4553
+ const t = L;
4554
+ if (L = null, !t)
4471
4555
  return;
4472
4556
  if (t.kind === "crop") {
4473
- const a = Kt(t.start, t.current);
4474
- if (Math.abs(t.current.x - t.start.x) < Ke || Math.abs(t.current.y - t.start.y) < Ke) {
4475
- O();
4557
+ const a = Ht(t.start, t.current);
4558
+ if (Math.abs(t.current.x - t.start.x) < Ge || Math.abs(t.current.y - t.start.y) < Ge) {
4559
+ $();
4476
4560
  return;
4477
4561
  }
4478
- const i = j.crop();
4479
- j.setCrop({
4562
+ const i = z.crop();
4563
+ z.setCrop({
4480
4564
  x: i.x + a.x * i.w,
4481
4565
  y: i.y + a.y * i.h,
4482
4566
  w: a.w * i.w,
4483
4567
  h: a.h * i.h
4484
- }), rt();
4568
+ }), st();
4485
4569
  return;
4486
4570
  }
4487
- const e = lr(t);
4488
- e && (V = e.id), O();
4571
+ const e = br(t);
4572
+ e && (B = e.id), $();
4489
4573
  }
4490
- function lr(t) {
4574
+ function br(t) {
4491
4575
  if (t.type === "arrow") {
4492
4576
  const e = t.current.x - t.start.x, a = t.current.y - t.start.y;
4493
- return Math.hypot(e, a) < ee ? j.add("arrow", {
4577
+ return Math.hypot(e, a) < oe ? z.add("arrow", {
4494
4578
  x: t.start.x,
4495
4579
  y: t.start.y,
4496
4580
  x2: t.start.x + 0.12,
4497
4581
  y2: t.start.y,
4498
4582
  w: 0.12,
4499
4583
  h: 0.02
4500
- }) : j.add("arrow", {
4584
+ }) : z.add("arrow", {
4501
4585
  x: t.start.x,
4502
4586
  y: t.start.y,
4503
4587
  x2: t.current.x,
@@ -4506,174 +4590,174 @@ function lr(t) {
4506
4590
  h: Math.abs(a)
4507
4591
  });
4508
4592
  }
4509
- return j.add(t.type, Kt(t.start, t.current));
4593
+ return z.add(t.type, Ht(t.start, t.current));
4510
4594
  }
4511
- function cr() {
4512
- j.resetCrop(), V = null, rt();
4595
+ function kr() {
4596
+ z.resetCrop(), B = null, st();
4513
4597
  }
4514
- function Vt() {
4515
- r.resetCrop && (r.resetCrop.hidden = !j.isCropped());
4598
+ function Bt() {
4599
+ s.resetCrop && (s.resetCrop.hidden = !z.isCropped());
4516
4600
  }
4517
- function St(t) {
4518
- if (!r.audio)
4601
+ function At(t) {
4602
+ if (!s.audio)
4519
4603
  return;
4520
- const e = !!t, a = g(e ? "tool.audioStop" : "tool.audio");
4521
- r.audio.title = a, r.audio.setAttribute("aria-label", a), r.audio.dataset.active = String(e), r.audio.innerHTML = e ? U.stop : U.audio;
4604
+ const e = !!t, a = m(e ? "tool.audioStop" : "tool.audio");
4605
+ s.audio.title = a, s.audio.setAttribute("aria-label", a), s.audio.dataset.active = String(e), s.audio.innerHTML = e ? x.stop : x.audio;
4522
4606
  }
4523
- function ht(t) {
4524
- if (it = !!t, r.video) {
4525
- const e = g(it ? "tool.stopVideo" : "tool.video");
4526
- r.video.title = e, r.video.setAttribute("aria-label", e), r.video.dataset.active = String(it), r.video.innerHTML = it ? U.stop : U.video;
4607
+ function ft(t) {
4608
+ if (it = !!t, s.video) {
4609
+ const e = m(it ? "tool.stopVideo" : "tool.video");
4610
+ s.video.title = e, s.video.setAttribute("aria-label", e), s.video.dataset.active = String(it), s.video.innerHTML = it ? x.stop : x.video;
4527
4611
  }
4528
- if (r.stop) {
4529
- const e = g("tool.stopVideo");
4530
- r.stop.title = e, r.stop.setAttribute("aria-label", e), r.stop.innerHTML = U.stop, r.stop.dataset.active = "true";
4612
+ if (s.stop) {
4613
+ const e = m("tool.stopVideo");
4614
+ s.stop.title = e, s.stop.setAttribute("aria-label", e), s.stop.innerHTML = x.stop, s.stop.dataset.active = "true";
4531
4615
  }
4532
4616
  }
4533
- function B() {
4534
- return at(W);
4617
+ function N() {
4618
+ return at(Z);
4535
4619
  }
4536
- function Et() {
4537
- if (!r.stage || !r.palette || !r.actions || !r.recapture)
4620
+ function zt() {
4621
+ if (!s.stage || !s.palette || !s.actions || !s.recapture)
4538
4622
  return;
4539
- const t = B();
4540
- r.stage.hidden = !t && !G, r.palette.hidden = !t, r.discard && (r.discard.hidden = !t), r.restore && (r.restore.hidden = t || !gt), t && r.paletteShot ? (r.paletteShot.appendChild(r.recapture), r.paletteShot.appendChild(r.discard)) : r.actionsMedia ? r.actionsMedia.after(r.recapture) : r.audio ? r.audio.after(r.recapture) : r.actions.insertBefore(r.recapture, r.submit || null), r.recapture.hidden = !1, he();
4623
+ const t = N();
4624
+ s.stage.hidden = !t && !q, s.palette.hidden = !t, s.discard && (s.discard.hidden = !t), s.restore && (s.restore.hidden = t || !mt), t && s.paletteShot ? (s.paletteShot.appendChild(s.recapture), s.paletteShot.appendChild(s.discard)) : s.actionsMedia ? s.actionsMedia.after(s.recapture) : s.audio ? s.audio.after(s.recapture) : s.actions.insertBefore(s.recapture, s.submit || null), s.recapture.hidden = !1, ye();
4541
4625
  }
4542
- function ur() {
4543
- B() && (gt = W), W = "", wt(null), Et(), rt();
4626
+ function wr() {
4627
+ N() && (mt = Z), Z = "", St(null), zt(), st();
4544
4628
  }
4545
- function dr() {
4546
- at(gt) && (W = gt, Et(), rt());
4629
+ function Sr() {
4630
+ at(mt) && (Z = mt, zt(), st());
4547
4631
  }
4548
- function Pa() {
4632
+ function Fa() {
4549
4633
  return {
4550
4634
  capture: typeof p.capture == "function" ? p.capture : void 0,
4551
4635
  onBeforeCapture: typeof p.onBeforeCapture == "function" ? p.onBeforeCapture : void 0
4552
4636
  };
4553
4637
  }
4554
- function La(t) {
4638
+ function Ta(t) {
4555
4639
  if (!at(t))
4556
- throw new Error(g("status.screenshotFailed"));
4557
- W = t, gt = t, j = ue(), ft = { w: 0, h: 0 }, V = null, x = null, L = null, wt(null);
4640
+ throw new Error(m("status.screenshotFailed"));
4641
+ Z = t, mt = t, z = pe(), yt = { w: 0, h: 0 }, B = null, L = null, P = null, St(null);
4558
4642
  }
4559
- async function pr() {
4560
- if (!(Wt || !r.dialog || r.dialog.hidden)) {
4561
- Wt = !0, r.recapture.disabled = !0, z(g("status.capturing"), !0), r.dialog.hidden = !0;
4643
+ async function Ar() {
4644
+ if (!(Zt || !s.dialog || s.dialog.hidden)) {
4645
+ Zt = !0, s.recapture.disabled = !0, E(m("status.capturing"), !0), s.dialog.hidden = !0;
4562
4646
  try {
4563
4647
  let t = "";
4564
4648
  try {
4565
- t = await Vi();
4649
+ t = await _i();
4566
4650
  } catch {
4567
- t = await la(Pa());
4651
+ t = await da(Fa());
4568
4652
  }
4569
- La(t), z("");
4653
+ Ta(t), E("");
4570
4654
  } catch (t) {
4571
- z((t == null ? void 0 : t.message) || g("status.screenshotFailed"));
4655
+ E((t == null ? void 0 : t.message) || m("status.screenshotFailed"));
4572
4656
  } finally {
4573
- r.dialog.hidden = !1, r.recapture.disabled = !1, Wt = !1, Et(), rt();
4657
+ s.dialog.hidden = !1, s.recapture.disabled = !1, Zt = !1, zt(), st();
4574
4658
  }
4575
4659
  }
4576
4660
  }
4577
- function gr() {
4661
+ function Cr() {
4578
4662
  try {
4579
- if (X || (X = fn((e) => {
4580
- const a = r.text.value.trim();
4581
- r.text.value = a ? `${a} ${e}` : e;
4663
+ if (Y || (Y = En((e) => {
4664
+ const a = s.text.value.trim();
4665
+ s.text.value = a ? `${a} ${e}` : e;
4582
4666
  }, {
4583
4667
  onActiveChange(e) {
4584
- St(e), e || z("");
4668
+ At(e), e || E("");
4585
4669
  }
4586
- })), !X.isSupported()) {
4587
- z(g("status.audioUnsupported"));
4670
+ })), !Y.isSupported()) {
4671
+ E(m("status.audioUnsupported"));
4588
4672
  return;
4589
4673
  }
4590
- if (X.isActive()) {
4591
- X.stop();
4674
+ if (Y.isActive()) {
4675
+ Y.stop();
4592
4676
  return;
4593
4677
  }
4594
- const t = X.start({ lang: Lt() });
4595
- St(t), z(t ? g("status.listening") : "");
4678
+ const t = Y.start({ lang: xt() });
4679
+ At(t), E(t ? m("status.listening") : "");
4596
4680
  } catch (t) {
4597
- z(t.message);
4681
+ E(t.message);
4598
4682
  }
4599
4683
  }
4600
- async function mr() {
4684
+ async function Er() {
4601
4685
  if (it) {
4602
- N == null || N.stop();
4686
+ K == null || K.stop();
4603
4687
  return;
4604
4688
  }
4605
- await hr();
4689
+ await zr();
4606
4690
  }
4607
- async function hr() {
4691
+ async function zr() {
4608
4692
  if (!p.video) {
4609
- z(g("status.videoDisabled"));
4693
+ E(m("status.videoDisabled"));
4610
4694
  return;
4611
4695
  }
4612
4696
  if (!it) {
4613
- r.dialog.hidden = !0, r.stop.hidden = !1, mt(), r.launcher.hidden = !0, N = vn({
4697
+ s.dialog.hidden = !0, s.stop.hidden = !1, ht(), s.launcher.hidden = !0, K = Rn({
4614
4698
  onStart() {
4615
- ht(!0);
4699
+ ft(!0);
4616
4700
  },
4617
4701
  onStop(t) {
4618
- G = t, ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, Et(), rt(), z(g(t ? "status.videoAttached" : "status.recordingCancelled"));
4702
+ q = t, ft(!1), s.stop.hidden = !0, It(), s.dialog.hidden = !1, zt(), st(), E(m(t ? "status.videoAttached" : "status.recordingCancelled"));
4619
4703
  },
4620
4704
  onError(t) {
4621
- ht(!1), z(t.message);
4705
+ ft(!1), E(t.message);
4622
4706
  }
4623
4707
  });
4624
4708
  try {
4625
- await N.start();
4709
+ await K.start();
4626
4710
  } catch (t) {
4627
- ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, z(t.message);
4711
+ ft(!1), s.stop.hidden = !0, It(), s.dialog.hidden = !1, E(t.message);
4628
4712
  }
4629
4713
  }
4630
4714
  }
4631
- function fr() {
4715
+ function Rr() {
4632
4716
  var e;
4633
- const t = r.shotBlock || r.canvas;
4634
- t == null || t.style.removeProperty("--nf-shot-aspect"), (e = r.canvas) == null || e.style.removeProperty("aspect-ratio");
4717
+ const t = s.shotBlock || s.canvas;
4718
+ t == null || t.style.removeProperty("--nf-shot-aspect"), (e = s.canvas) == null || e.style.removeProperty("aspect-ratio");
4635
4719
  }
4636
- function yr(t, e) {
4720
+ function jr(t, e) {
4637
4721
  if (!(t > 0) || !(e > 0))
4638
4722
  return;
4639
- const a = r.shotBlock || r.canvas, o = t / e;
4640
- a == null || a.style.setProperty("--nf-shot-aspect", String(o)), r.canvas && (r.canvas.style.aspectRatio = `${t} / ${e}`);
4723
+ const a = s.shotBlock || s.canvas, o = t / e;
4724
+ a == null || a.style.setProperty("--nf-shot-aspect", String(o)), s.canvas && (s.canvas.style.aspectRatio = `${t} / ${e}`);
4641
4725
  }
4642
- function vr(t) {
4643
- if (!r.shot || !r.canvas || !(t > 0))
4726
+ function Pr(t) {
4727
+ if (!s.shot || !s.canvas || !(t > 0))
4644
4728
  return;
4645
- const e = r.canvas.clientWidth, a = r.canvas.clientHeight;
4729
+ const e = s.canvas.clientWidth, a = s.canvas.clientHeight;
4646
4730
  if (!(e > 0) || !(a > 0)) {
4647
- r.shot.style.left = "0", r.shot.style.top = "0", r.shot.style.width = "100%", r.shot.style.height = "100%";
4731
+ s.shot.style.left = "0", s.shot.style.top = "0", s.shot.style.width = "100%", s.shot.style.height = "100%";
4648
4732
  return;
4649
4733
  }
4650
4734
  const o = e / a, i = Math.min(1, t / o), n = Math.min(1, o / t);
4651
- r.shot.style.left = `${(1 - i) / 2 * 100}%`, r.shot.style.top = `${(1 - n) / 2 * 100}%`, r.shot.style.width = `${i * 100}%`, r.shot.style.height = `${n * 100}%`;
4735
+ s.shot.style.left = `${(1 - i) / 2 * 100}%`, s.shot.style.top = `${(1 - n) / 2 * 100}%`, s.shot.style.width = `${i * 100}%`, s.shot.style.height = `${n * 100}%`;
4652
4736
  }
4653
- function rt() {
4654
- if (r.shot = null, !B()) {
4655
- fr(), r.canvas.innerHTML = G ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(G)}"></video>` : "", Vt();
4737
+ function st() {
4738
+ if (s.shot = null, !N()) {
4739
+ Rr(), s.canvas.innerHTML = q ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(q)}"></video>` : "", Bt();
4656
4740
  return;
4657
4741
  }
4658
- r.canvas.innerHTML = `<div class="nf-shot"><img alt="${I(g("shot.alt"))}" src="${W}" draggable="false"></div>`, r.shot = r.canvas.querySelector(".nf-shot");
4659
- const t = r.shot.querySelector("img");
4742
+ s.canvas.innerHTML = `<div class="nf-shot"><img alt="${I(m("shot.alt"))}" src="${Z}" draggable="false"></div>`, s.shot = s.canvas.querySelector(".nf-shot");
4743
+ const t = s.shot.querySelector("img");
4660
4744
  t.draggable = !1, t.addEventListener("dragstart", (a) => a.preventDefault());
4661
4745
  const e = () => {
4662
- kr(t), O();
4746
+ Lr(t), $();
4663
4747
  };
4664
- t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Vt();
4748
+ t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Bt();
4665
4749
  }
4666
- function kr(t) {
4667
- const e = t.naturalWidth || ft.w, a = t.naturalHeight || ft.h;
4668
- if (!r.shot || !(e > 0) || !(a > 0))
4750
+ function Lr(t) {
4751
+ const e = t.naturalWidth || yt.w, a = t.naturalHeight || yt.h;
4752
+ if (!s.shot || !(e > 0) || !(a > 0))
4669
4753
  return;
4670
- ft = { w: e, h: a };
4671
- const o = j.crop(), i = o.w * e, n = o.h * a, s = i / n;
4672
- yr(i, n), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
4673
- const l = () => vr(s);
4754
+ yt = { w: e, h: a };
4755
+ const o = z.crop(), i = o.w * e, n = o.h * a, r = i / n;
4756
+ jr(i, n), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
4757
+ const l = () => Pr(r);
4674
4758
  l(), requestAnimationFrame(l);
4675
4759
  }
4676
- function br(t) {
4760
+ function xr(t) {
4677
4761
  return t.type === "arrow" ? {
4678
4762
  id: "preview",
4679
4763
  type: "arrow",
@@ -4688,66 +4772,66 @@ function br(t) {
4688
4772
  id: "preview",
4689
4773
  type: t.type,
4690
4774
  number: "",
4691
- ...Kt(t.start, t.current)
4775
+ ...Ht(t.start, t.current)
4692
4776
  };
4693
4777
  }
4694
- function O() {
4695
- if ((r.shot || r.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((n) => n.remove()), !B() || !r.shot) {
4696
- Vt();
4778
+ function $() {
4779
+ if ((s.shot || s.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((n) => n.remove()), !N() || !s.shot) {
4780
+ Bt();
4697
4781
  return;
4698
4782
  }
4699
- const e = j.crop(), a = Ct(), o = ga(a.clientWidth || 400);
4700
- if (r.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), r.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), r.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), r.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (x == null ? void 0 : x.kind) === "crop") {
4783
+ const e = z.crop(), a = Et(), o = ya(a.clientWidth || 400);
4784
+ if (s.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), s.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), s.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), s.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (L == null ? void 0 : L.kind) === "crop") {
4701
4785
  const n = document.createElement("div");
4702
- n.className = "nf-crop", Ge(n, Kt(x.start, x.current), { x: 0, y: 0, w: 1, h: 1 }), r.shot.appendChild(n);
4786
+ n.className = "nf-crop", Ze(n, Ht(L.start, L.current), { x: 0, y: 0, w: 1, h: 1 }), s.shot.appendChild(n);
4703
4787
  }
4704
- const i = j.list().slice();
4705
- if ((x == null ? void 0 : x.kind) === "sticker" && i.push(br(x)), i.forEach((n) => {
4706
- const s = n.id === "preview", l = !s && n.id === V, c = document.createElement("div");
4707
- if (c.className = `nf-sticker nf-${n.type}`, c.dataset.id = n.id, l && (c.dataset.selected = "true"), s && (c.dataset.preview = "true"), n.type === "arrow" ? wr(c, n, e, l, o) : (Ge(c, n, e), l && ["nw", "ne", "sw", "se"].forEach((d) => ie(c, d))), !s && n.number) {
4788
+ const i = z.list().slice();
4789
+ if ((L == null ? void 0 : L.kind) === "sticker" && i.push(xr(L)), i.forEach((n) => {
4790
+ const r = n.id === "preview", l = !r && n.id === B, c = document.createElement("div");
4791
+ if (c.className = `nf-sticker nf-${n.type}`, c.dataset.id = n.id, l && (c.dataset.selected = "true"), r && (c.dataset.preview = "true"), n.type === "arrow" ? Ur(c, n, e, l, o) : (Ze(c, n, e), l && ["nw", "ne", "sw", "se"].forEach((d) => re(c, d))), !r && n.number) {
4708
4792
  const d = document.createElement("span");
4709
4793
  d.className = "nf-badge", d.textContent = String(n.number), c.appendChild(d);
4710
4794
  }
4711
- r.shot.appendChild(c);
4712
- }), r.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((n) => n.remove()), G) {
4795
+ s.shot.appendChild(c);
4796
+ }), s.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((n) => n.remove()), q) {
4713
4797
  const n = document.createElement("video");
4714
- n.className = "nf-recording-preview", n.controls = !0, n.src = URL.createObjectURL(G), n.style.position = "absolute", n.style.right = "8px", n.style.bottom = "8px", n.style.width = "160px", r.canvas.appendChild(n);
4798
+ n.className = "nf-recording-preview", n.controls = !0, n.src = URL.createObjectURL(q), n.style.position = "absolute", n.style.right = "8px", n.style.bottom = "8px", n.style.width = "160px", s.canvas.appendChild(n);
4715
4799
  }
4716
- Vt();
4800
+ Bt();
4717
4801
  }
4718
- function wr(t, e, a, o, i = ga(400)) {
4719
- const n = Ct(), s = n.clientWidth, l = n.clientHeight, c = (e.x - a.x) / a.w * s, d = (e.y - a.y) / a.h * l, m = ((e.x2 ?? e.x + e.w) - a.x) / a.w * s, S = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), A = Math.min(c, m) - v, E = Math.min(d, S) - v, P = Math.max(2, Math.abs(m - c)) + v * 2, u = Math.max(2, Math.abs(S - d)) + v * 2, h = c - A, R = d - E, k = m - A, f = S - E, C = An(h, R, k, f, i), Z = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4720
- t.style.left = `${A}px`, t.style.top = `${E}px`, t.style.width = `${P}px`, t.style.height = `${u}px`, Z.setAttribute("class", "nf-arrow-svg"), Z.setAttribute("viewBox", `0 0 ${P} ${u}`), Z.setAttribute("width", String(P)), Z.setAttribute("height", String(u)), Z.innerHTML = `
4721
- <line class="nf-arrow-hit" x1="${h}" y1="${R}" x2="${k}" y2="${f}" />
4722
- <line class="nf-arrow-shaft" x1="${h}" y1="${R}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
4723
- <polygon class="nf-arrow-head" points="${C.tipX},${C.tipY} ${C.left.x},${C.left.y} ${C.right.x},${C.right.y}" />
4724
- `, t.appendChild(Z), o && (ie(t, "start", { left: h - 5, top: R - 5 }), ie(t, "end", { left: k - 5, top: f - 5 }));
4802
+ function Ur(t, e, a, o, i = ya(400)) {
4803
+ const n = Et(), r = n.clientWidth, l = n.clientHeight, c = (e.x - a.x) / a.w * r, d = (e.y - a.y) / a.h * l, h = ((e.x2 ?? e.x + e.w) - a.x) / a.w * r, S = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), w = Math.min(c, h) - v, j = Math.min(d, S) - v, R = Math.max(2, Math.abs(h - c)) + v * 2, u = Math.max(2, Math.abs(S - d)) + v * 2, f = c - w, A = d - j, g = h - w, C = S - j, U = Un(f, A, g, C, i), F = document.createElementNS("http://www.w3.org/2000/svg", "svg");
4804
+ t.style.left = `${w}px`, t.style.top = `${j}px`, t.style.width = `${R}px`, t.style.height = `${u}px`, F.setAttribute("class", "nf-arrow-svg"), F.setAttribute("viewBox", `0 0 ${R} ${u}`), F.setAttribute("width", String(R)), F.setAttribute("height", String(u)), F.innerHTML = `
4805
+ <line class="nf-arrow-hit" x1="${f}" y1="${A}" x2="${g}" y2="${C}" />
4806
+ <line class="nf-arrow-shaft" x1="${f}" y1="${A}" x2="${U.shaftEnd.x}" y2="${U.shaftEnd.y}" />
4807
+ <polygon class="nf-arrow-head" points="${U.tipX},${U.tipY} ${U.left.x},${U.left.y} ${U.right.x},${U.right.y}" />
4808
+ `, t.appendChild(F), o && (re(t, "start", { left: f - 5, top: A - 5 }), re(t, "end", { left: g - 5, top: C - 5 }));
4725
4809
  }
4726
- function ie(t, e, a) {
4810
+ function re(t, e, a) {
4727
4811
  const o = document.createElement("span");
4728
4812
  o.className = "nf-handle", o.dataset.dir = e, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), t.appendChild(o);
4729
4813
  }
4730
- function Ge(t, e, a) {
4814
+ function Ze(t, e, a) {
4731
4815
  t.style.left = `${(e.x - a.x) / a.w * 100}%`, t.style.top = `${(e.y - a.y) / a.h * 100}%`, t.style.width = `${e.w / a.w * 100}%`, t.style.height = `${e.h / a.h * 100}%`;
4732
4816
  }
4733
- function xa() {
4817
+ function Ma() {
4734
4818
  try {
4735
- return String(localStorage.getItem(fa) || "").trim();
4819
+ return String(localStorage.getItem(ka) || "").trim();
4736
4820
  } catch {
4737
4821
  return "";
4738
4822
  }
4739
4823
  }
4740
- function Sr(t) {
4824
+ function Fr(t) {
4741
4825
  const e = String(t || "").trim();
4742
- if (!(!e || e === ne()))
4826
+ if (!(!e || e === se()))
4743
4827
  try {
4744
- localStorage.setItem(fa, e);
4828
+ localStorage.setItem(ka, e);
4745
4829
  } catch {
4746
4830
  }
4747
4831
  }
4748
- function Ua() {
4832
+ function Oa() {
4749
4833
  try {
4750
- const t = localStorage.getItem(ka);
4834
+ const t = localStorage.getItem(Aa);
4751
4835
  if (!t)
4752
4836
  return { diagnostics: !1, logs: !1 };
4753
4837
  const e = JSON.parse(t);
@@ -4759,68 +4843,68 @@ function Ua() {
4759
4843
  return { diagnostics: !1, logs: !1 };
4760
4844
  }
4761
4845
  }
4762
- function qe(t = {}) {
4846
+ function Ye(t = {}) {
4763
4847
  const e = {
4764
- ...Ua(),
4848
+ ...Oa(),
4765
4849
  ...t
4766
4850
  };
4767
4851
  try {
4768
- localStorage.setItem(ka, JSON.stringify({
4852
+ localStorage.setItem(Aa, JSON.stringify({
4769
4853
  diagnostics: !!e.diagnostics,
4770
4854
  logs: !!e.logs
4771
4855
  }));
4772
4856
  } catch {
4773
4857
  }
4774
4858
  }
4775
- function Ta() {
4776
- return !!(String(_.userId || "").trim() || String(_.email || "").trim() || String(_.displayName || "").trim());
4859
+ function Da() {
4860
+ return !!(String(G.userId || "").trim() || String(G.email || "").trim() || String(G.displayName || "").trim());
4777
4861
  }
4778
- function Fa() {
4862
+ function Ia() {
4779
4863
  return String(
4780
- _.displayName || _.email || _.userId || ""
4864
+ G.displayName || G.email || G.userId || ""
4781
4865
  ).trim();
4782
4866
  }
4783
- function ne() {
4784
- return g("form.authorPlaceholder");
4867
+ function se() {
4868
+ return m("form.authorPlaceholder");
4785
4869
  }
4786
- function Ar() {
4870
+ function Tr() {
4787
4871
  var e;
4788
- if (Ta())
4789
- return Fa() || ne();
4790
- const t = String(((e = r.author) == null ? void 0 : e.value) || "").trim();
4791
- return t ? (Sr(t), t) : ne();
4872
+ if (Da())
4873
+ return Ia() || se();
4874
+ const t = String(((e = s.author) == null ? void 0 : e.value) || "").trim();
4875
+ return t ? (Fr(t), t) : se();
4792
4876
  }
4793
- function Ma() {
4794
- if (!r.author)
4877
+ function $a() {
4878
+ if (!s.author)
4795
4879
  return;
4796
- const t = Ta();
4797
- if (r.author.hidden = t, t) {
4798
- r.author.value = "";
4880
+ const t = Da();
4881
+ if (s.author.hidden = t, t) {
4882
+ s.author.value = "";
4799
4883
  return;
4800
4884
  }
4801
- r.author.value = xa();
4885
+ s.author.value = Ma();
4802
4886
  }
4803
- function Da(t, e = ha) {
4887
+ function Va(t, e = ba) {
4804
4888
  const a = Number(t);
4805
- return Number.isFinite(a) ? Math.min(Vn, Math.max(0, Math.floor(a))) : e;
4889
+ return Number.isFinite(a) ? Math.min(Xn, Math.max(0, Math.floor(a))) : e;
4806
4890
  }
4807
- function Cr(t, e = null) {
4891
+ function Mr(t, e = null) {
4808
4892
  return t === void 0 ? e : t == null ? null : Array.isArray(t) ? t.filter((a) => typeof a == "function") : e;
4809
4893
  }
4810
- function Er() {
4894
+ function Or() {
4811
4895
  ot.setConsoleMethods(p.consoleMethods), ot.setScrubLog(p.scrubLog);
4812
4896
  }
4813
- function zr() {
4814
- const t = Da(p.consoleLogLimit), e = ot.snapshotForReport(t), a = p.logSources;
4897
+ function Dr() {
4898
+ const t = Va(p.consoleLogLimit), e = ot.snapshotForReport(t), a = p.logSources;
4815
4899
  if (!a || !a.length)
4816
4900
  return e;
4817
4901
  const o = [];
4818
4902
  for (const n of a)
4819
4903
  try {
4820
- const s = n();
4821
- if (!Array.isArray(s))
4904
+ const r = n();
4905
+ if (!Array.isArray(r))
4822
4906
  continue;
4823
- for (const l of s)
4907
+ for (const l of r)
4824
4908
  !l || typeof l != "object" || o.push({
4825
4909
  level: l.level || "log",
4826
4910
  text: String(l.text || ""),
@@ -4834,13 +4918,13 @@ function zr() {
4834
4918
  }
4835
4919
  if (!o.length)
4836
4920
  return e;
4837
- const i = [...e, ...o].sort((n, s) => {
4838
- const l = (n.at || 0) - (s.at || 0);
4839
- return l !== 0 ? l : (n.t || 0) - (s.t || 0);
4921
+ const i = [...e, ...o].sort((n, r) => {
4922
+ const l = (n.at || 0) - (r.at || 0);
4923
+ return l !== 0 ? l : (n.t || 0) - (r.t || 0);
4840
4924
  });
4841
4925
  return t === 0 ? [] : i.slice(-t);
4842
4926
  }
4843
- function Rr(t, ...e) {
4927
+ function Ir(t, ...e) {
4844
4928
  if (t && typeof t == "object" && !Array.isArray(t)) {
4845
4929
  ot.pushEntry(t);
4846
4930
  return;
@@ -4850,11 +4934,11 @@ function Rr(t, ...e) {
4850
4934
  captureStack: a === "warn" || a === "error"
4851
4935
  });
4852
4936
  }
4853
- function Ia(t) {
4854
- t.key !== "Escape" || !r.dialog || r.dialog.hidden || kt && !bt || nt();
4937
+ function Ba(t) {
4938
+ t.key !== "Escape" || !s.dialog || s.dialog.hidden || kt && !wt || nt();
4855
4939
  }
4856
- function Oa(t = {}) {
4857
- _i(t);
4940
+ function Na(t = {}) {
4941
+ tn(t);
4858
4942
  const e = Object.prototype.hasOwnProperty.call(t, "kinds");
4859
4943
  p = {
4860
4944
  ...p,
@@ -4864,14 +4948,14 @@ function Oa(t = {}) {
4864
4948
  name: t.name == null ? p.name : String(t.name || ""),
4865
4949
  targets: t.targets === void 0 ? p.targets : t.targets,
4866
4950
  hideLauncher: t.hideLauncher == null ? p.hideLauncher : !!t.hideLauncher,
4867
- launcherCorner: t.launcherCorner === void 0 ? p.launcherCorner : pe(t.launcherCorner) || null,
4868
- theme: ba(t.theme ?? p.theme),
4951
+ launcherCorner: t.launcherCorner === void 0 ? p.launcherCorner : me(t.launcherCorner) || null,
4952
+ theme: Ca(t.theme ?? p.theme),
4869
4953
  video: t.video == null ? p.video : !!t.video,
4870
- consoleLogLimit: t.consoleLogLimit == null ? p.consoleLogLimit : Da(t.consoleLogLimit, p.consoleLogLimit),
4871
- consoleMethods: t.consoleMethods === void 0 ? p.consoleMethods : ce(t.consoleMethods),
4872
- scrubLog: t.scrubLog === void 0 ? p.scrubLog : typeof t.scrubLog == "function" ? t.scrubLog : Ft,
4873
- logSources: t.logSources === void 0 ? p.logSources : Cr(t.logSources, p.logSources),
4874
- kinds: e ? Dn(t.kinds) : p.kinds,
4954
+ consoleLogLimit: t.consoleLogLimit == null ? p.consoleLogLimit : Va(t.consoleLogLimit, p.consoleLogLimit),
4955
+ consoleMethods: t.consoleMethods === void 0 ? p.consoleMethods : de(t.consoleMethods),
4956
+ scrubLog: t.scrubLog === void 0 ? p.scrubLog : typeof t.scrubLog == "function" ? t.scrubLog : Mt,
4957
+ logSources: t.logSources === void 0 ? p.logSources : Mr(t.logSources, p.logSources),
4958
+ kinds: e ? qn(t.kinds) : p.kinds,
4875
4959
  kindsCustom: e ? !0 : p.kindsCustom,
4876
4960
  capture: t.capture === void 0 ? p.capture : t.capture,
4877
4961
  onBeforeCapture: t.onBeforeCapture === void 0 ? p.onBeforeCapture : t.onBeforeCapture,
@@ -4879,10 +4963,14 @@ function Oa(t = {}) {
4879
4963
  onClose: t.onClose === void 0 ? p.onClose : t.onClose,
4880
4964
  displayLink: t.displayLink == null ? p.displayLink : !!t.displayLink,
4881
4965
  locale: t.locale === void 0 ? p.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
4882
- translations: t.translations === void 0 ? p.translations : t.translations && typeof t.translations == "object" ? t.translations : null
4883
- }, Er();
4884
- }
4885
- function $a(t) {
4966
+ translations: t.translations === void 0 ? p.translations : t.translations && typeof t.translations == "object" ? t.translations : null,
4967
+ fields: t.fields === void 0 ? p.fields : t.fields
4968
+ }, t.fields !== void 0 && (J = {
4969
+ ...J,
4970
+ ...te(t.fields)
4971
+ }), Or();
4972
+ }
4973
+ function Ka(t) {
4886
4974
  const e = p[t];
4887
4975
  if (typeof e == "function")
4888
4976
  try {
@@ -4891,53 +4979,53 @@ function $a(t) {
4891
4979
  console.warn(`Notefully.${t} failed:`, a);
4892
4980
  }
4893
4981
  }
4894
- function jr() {
4895
- return vt;
4982
+ function $r() {
4983
+ return bt;
4896
4984
  }
4897
- function Pr() {
4898
- return Lt();
4985
+ function Vr() {
4986
+ return xt();
4899
4987
  }
4900
- function Lr(t, e) {
4901
- return p.locale = t == null || t === "" ? null : String(t), e !== void 0 && (p.translations = e && typeof e == "object" ? e : null), b ? mt() : wa(), Ht;
4988
+ function Br(t, e) {
4989
+ return p.locale = t == null || t === "" ? null : String(t), e !== void 0 && (p.translations = e && typeof e == "object" ? e : null), b ? ht() : Ea(), rt;
4902
4990
  }
4903
- function ye(t = {}) {
4904
- return Oa(t), b && mt(), Ht;
4991
+ function be(t = {}) {
4992
+ return Na(t), b && ht(), rt;
4905
4993
  }
4906
- function xr(t = {}) {
4907
- return ot.hook(), Oa(t), de(), mt(), Ht;
4994
+ function Nr(t = {}) {
4995
+ return ot.hook(), Na(t), ge(), ht(), rt;
4908
4996
  }
4909
- function Ur(t) {
4910
- return ye({ theme: t });
4997
+ function Kr(t) {
4998
+ return be({ theme: t });
4911
4999
  }
4912
- function Tr(t) {
5000
+ function Hr(t) {
4913
5001
  const e = !!t;
4914
- return !e && b && r.dialog && !r.dialog.hidden && nt(), ye({ hideLauncher: !e });
5002
+ return !e && b && s.dialog && !s.dialog.hidden && nt(), be({ hideLauncher: !e });
4915
5003
  }
4916
- function Fr() {
4917
- const t = Fa() || xa() || void 0, e = Ki({
4918
- ..._,
4919
- displayName: _.displayName || t
5004
+ function _r() {
5005
+ const t = Ia() || Ma() || void 0, e = Zi({
5006
+ ...G,
5007
+ displayName: G.displayName || t
4920
5008
  });
4921
- H = Ln(e), K = xn(zr());
4922
- const a = Ua();
4923
- a.diagnostics && Dt(H, !0), a.logs && K.length && Dt(K, !0), J = !1;
5009
+ _ = $n(e, { customFields: J }), H = Nn(Dr());
5010
+ const a = Oa();
5011
+ a.diagnostics && Dt(_, !0), a.logs && H.length && Dt(H, !0), X = !1;
4924
5012
  }
4925
- function ve(t) {
4926
- J = !!t, r.privacyPanel && (r.privacyPanel.hidden = !J), r.privacyStack && (r.privacyStack.dataset.open = String(J)), r.privacyChange && (r.privacyChange.setAttribute("aria-expanded", J ? "true" : "false"), r.privacyChange.dataset.active = String(J)), J && be();
5013
+ function ke(t) {
5014
+ X = !!t, s.privacyPanel && (s.privacyPanel.hidden = !X), s.privacyStack && (s.privacyStack.dataset.open = String(X)), s.privacyChange && (s.privacyChange.setAttribute("aria-expanded", X ? "true" : "false"), s.privacyChange.dataset.active = String(X)), X && Se();
4927
5015
  }
4928
- function ke() {
4929
- if (!r.privacy || !r.privacyText || !r.privacyChange)
5016
+ function we() {
5017
+ if (!s.privacy || !s.privacyText || !s.privacyChange)
4930
5018
  return;
4931
- const t = Tn({
4932
- diagnostics: H,
4933
- logs: K
5019
+ const t = Hn({
5020
+ diagnostics: _,
5021
+ logs: H
4934
5022
  });
4935
- r.privacyText.textContent = t, r.privacyText.hidden = !t;
4936
- const e = H.length === 0 && K.length === 0;
4937
- r.privacySummary && (r.privacySummary.hidden = e), r.privacy.hidden = e, r.privacyChange.hidden = !1;
5023
+ s.privacyText.textContent = t, s.privacyText.hidden = !t;
5024
+ const e = _.length === 0 && H.length === 0;
5025
+ s.privacySummary && (s.privacySummary.hidden = e), s.privacy.hidden = e, s.privacyChange.hidden = !1;
4938
5026
  }
4939
- function Va(t, e, a) {
4940
- const i = `${g(t ? "privacy.included" : "privacy.redacted")} ${a}`;
5027
+ function Ha(t, e, a) {
5028
+ const i = `${m(t ? "privacy.included" : "privacy.redacted")} ${a}`;
4941
5029
  return `<label class="pill-switch nf-privacy-toggle" data-included="${t ? "true" : "false"}">
4942
5030
  <input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${I(i)}" aria-checked="${t ? "true" : "false"}">
4943
5031
  <span class="pill-switch-track" aria-hidden="true">
@@ -4946,264 +5034,280 @@ function Va(t, e, a) {
4946
5034
  </span>
4947
5035
  </label>`;
4948
5036
  }
4949
- function We(t, e, a, o, i, n = null) {
4950
- const s = Va(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), c = i ? I(l) : n ?? I(l), d = l ? `${a}: ${l}` : a;
5037
+ function Xe(t, e, a, o, i, n = null) {
5038
+ const r = Ha(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), c = i ? I(l) : n ?? I(l), d = l ? `${a}: ${l}` : a;
4951
5039
  return `<div class="nf-privacy-row" data-kind="${I(t)}" data-id="${I(e)}"${i ? ' data-redacted="true"' : ""}>
4952
- ${s}
5040
+ ${r}
4953
5041
  <div class="nf-privacy-row-text"${i ? ` title="${I(d)}"` : ""}>
4954
5042
  <span class="nf-privacy-row-title">${I(a)}</span>
4955
5043
  <span class="nf-privacy-row-detail">${c}</span>
4956
5044
  </div>
4957
5045
  </div>`;
4958
5046
  }
4959
- function Ze(t, e, a, o) {
5047
+ function Je(t, e, a, o) {
4960
5048
  if (!a.length)
4961
5049
  return "";
4962
- const i = Un(a), n = !i.checked && !i.indeterminate;
5050
+ const i = Kn(a), n = !i.checked && !i.indeterminate;
4963
5051
  return `<section class="nf-privacy-section" data-section="${I(t)}"${n ? ' data-redacted="true"' : ""}>
4964
5052
  <div class="nf-privacy-section-head">
4965
- ${Va(i.checked, i.indeterminate, e)}
5053
+ ${Ha(i.checked, i.indeterminate, e)}
4966
5054
  <h3 class="nf-privacy-section-title">${I(e)}</h3>
4967
5055
  </div>
4968
5056
  <div class="nf-privacy-rows"${n ? " hidden" : ""}>${o}</div>
4969
5057
  </section>`;
4970
5058
  }
4971
- function be() {
4972
- if (!r.privacyScroll)
5059
+ function Se() {
5060
+ if (!s.privacyScroll)
4973
5061
  return;
4974
- const t = H.map((a) => We(
5062
+ const t = _.map((a) => Xe(
4975
5063
  "diagnostic",
4976
5064
  a.key,
4977
5065
  a.label,
4978
- Fn(a.value),
5066
+ _n(a.value),
4979
5067
  a.redacted
4980
- )).join(""), e = K.map((a) => {
4981
- const o = Zi(a), i = Number.isFinite(a.count) && a.count > 1 ? ` ×${a.count}` : "", n = `${a.level}${i}`, s = a.redacted ? null : `${Yi(a)}${a.truncated ? '<span class="nf-console-truncated">…</span>' : ""}`;
4982
- return We(
5068
+ )).join(""), e = H.map((a) => {
5069
+ const o = nn(a), i = Number.isFinite(a.count) && a.count > 1 ? ` ×${a.count}` : "", n = `${a.level}${i}`, r = a.redacted ? null : `${rn(a)}${a.truncated ? '<span class="nf-console-truncated">…</span>' : ""}`;
5070
+ return Xe(
4983
5071
  "log",
4984
5072
  a.id,
4985
5073
  n,
4986
5074
  o,
4987
5075
  a.redacted,
4988
- s
5076
+ r
4989
5077
  );
4990
5078
  }).join("");
4991
- r.privacyScroll.innerHTML = [
4992
- Ze("diagnostics", g("privacy.section.diagnostics"), H, t),
4993
- K.length ? Ze("logs", g("privacy.section.logs"), K, e) : ""
4994
- ].join(""), r.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
5079
+ s.privacyScroll.innerHTML = [
5080
+ Je("diagnostics", m("privacy.section.diagnostics"), _, t),
5081
+ H.length ? Je("logs", m("privacy.section.logs"), H, e) : ""
5082
+ ].join(""), s.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
4995
5083
  a.indeterminate = !0, a.removeAttribute("data-indeterminate");
4996
- }), ke();
5084
+ }), we();
4997
5085
  }
4998
- function Mr(t) {
5086
+ function Gr(t) {
4999
5087
  const e = t.target;
5000
5088
  if (!(e instanceof HTMLInputElement) || e.type !== "checkbox")
5001
5089
  return;
5002
5090
  const a = e.closest("[data-section]"), o = e.closest(".nf-privacy-row"), i = !e.checked;
5003
5091
  if (o) {
5004
- const n = o.dataset.kind, s = o.dataset.id;
5092
+ const n = o.dataset.kind, r = o.dataset.id;
5005
5093
  if (n === "diagnostic") {
5006
- const l = H.find((c) => c.key === s);
5094
+ const l = _.find((c) => c.key === r);
5007
5095
  l && (l.redacted = i);
5008
5096
  } else if (n === "log") {
5009
- const l = K.find((c) => c.id === s);
5097
+ const l = H.find((c) => c.id === r);
5010
5098
  l && (l.redacted = i);
5011
5099
  }
5012
5100
  } else if (a) {
5013
5101
  const n = a.dataset.section;
5014
- n === "diagnostics" ? (Dt(H, i), qe({ diagnostics: i })) : n === "logs" && (Dt(K, i), qe({ logs: i }));
5102
+ n === "diagnostics" ? (Dt(_, i), Ye({ diagnostics: i })) : n === "logs" && (Dt(H, i), Ye({ logs: i }));
5015
5103
  } else
5016
5104
  return;
5017
- be();
5105
+ Se();
5018
5106
  }
5019
- async function Ba() {
5020
- de(), vt || (vt = !0, $a("onOpen")), Na(), mt(), r.launcher.hidden = !0, j = ue(), ft = { w: 0, h: 0 }, G = null, W = "", gt = "", V = null, x = null, L = null, q = ar(), me(q), wt(null), St(!1), r.text.value = "", Ma(), z(""), Fr();
5107
+ async function _a() {
5108
+ ge(), bt || (bt = !0, Ka("onOpen")), Ga(), ht(), s.launcher.hidden = !0, z = pe(), yt = { w: 0, h: 0 }, q = null, Z = "", mt = "", B = null, L = null, P = null, W = gr(), fe(W), St(null), At(!1), s.text.value = "", $a(), E(""), _r();
5021
5109
  try {
5022
- La(await la(Pa())), z("");
5110
+ Ta(await da(Fa())), E("");
5023
5111
  } catch (e) {
5024
- W = "", z((e == null ? void 0 : e.message) || g("status.screenshotFailed"));
5112
+ Z = "", E((e == null ? void 0 : e.message) || m("status.screenshotFailed"));
5025
5113
  }
5026
- Et(), ve(!1), ke(), r.dialog.hidden = !1, rt(), r.text.focus();
5114
+ zt(), ke(!1), we(), s.dialog.hidden = !1, st(), s.text.focus();
5027
5115
  }
5028
5116
  function nt() {
5029
5117
  if (!b)
5030
5118
  return;
5031
- const t = vt;
5032
- X == null || X.stop(), St(!1), it && (N == null || N.stop()), ht(!1), Ra(), x = null, L = null, fe(!1), Na(), ve(!1), r.dialog.hidden = !0, r.stop.hidden = !0, It(), t && (vt = !1, $a("onClose"));
5119
+ const t = bt;
5120
+ Y == null || Y.stop(), At(!1), it && (K == null || K.stop()), ft(!1), xa(), L = null, P = null, ve(!1), Ga(), ke(!1), s.dialog.hidden = !0, s.stop.hidden = !0, It(), t && (bt = !1, Ka("onClose"));
5033
5121
  }
5034
- function Dr(t = "") {
5035
- const e = r.dialog, a = r.panel, o = r.panelBody, i = r.successMsg, n = r.successLink, s = String(t || "").trim(), l = !!(p.displayLink && s);
5122
+ function qr(t = "") {
5123
+ const e = s.dialog, a = s.panel, o = s.panelBody, i = s.successMsg, n = s.successLink, r = String(t || "").trim(), l = !!(p.displayLink && r);
5036
5124
  if (!e || !a || !o || !i)
5037
5125
  return Promise.resolve(!1);
5038
- kt = !0, bt = l, z("");
5126
+ kt = !0, wt = l, E("");
5039
5127
  const c = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
5040
- if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", n && (l ? (n.hidden = !1, n.href = s) : (n.hidden = !0, n.removeAttribute("href"))), l) {
5128
+ if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", n && (l ? (n.hidden = !1, n.href = r) : (n.hidden = !0, n.removeAttribute("href"))), l) {
5041
5129
  if (c)
5042
5130
  return Promise.resolve(!0);
5043
- const A = a.getBoundingClientRect(), E = A.width > 0 ? d.width / A.width : 1, P = A.height > 0 ? d.height / A.height : 1;
5044
- return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${E}, ${P})`, a.getBoundingClientRect(), new Promise((u) => {
5045
- let h = !1;
5046
- const R = () => {
5047
- h || (h = !0, a.removeEventListener("transitionend", k), u(!0));
5048
- }, k = (f) => {
5049
- f.target !== a || f.propertyName !== "transform" || R();
5131
+ const w = a.getBoundingClientRect(), j = w.width > 0 ? d.width / w.width : 1, R = w.height > 0 ? d.height / w.height : 1;
5132
+ return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${j}, ${R})`, a.getBoundingClientRect(), new Promise((u) => {
5133
+ let f = !1;
5134
+ const A = () => {
5135
+ f || (f = !0, a.removeEventListener("transitionend", g), u(!0));
5136
+ }, g = (C) => {
5137
+ C.target !== a || C.propertyName !== "transform" || A();
5050
5138
  };
5051
- a.addEventListener("transitionend", k), requestAnimationFrame(() => {
5139
+ a.addEventListener("transitionend", g), requestAnimationFrame(() => {
5052
5140
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
5053
- }), window.setTimeout(R, 700);
5141
+ }), window.setTimeout(A, 700);
5054
5142
  });
5055
5143
  }
5056
5144
  if (c)
5057
- return new Promise((A) => {
5058
- window.setTimeout(() => A(!1), 1e3);
5145
+ return new Promise((w) => {
5146
+ window.setTimeout(() => w(!1), 1e3);
5059
5147
  });
5060
- const m = a.getBoundingClientRect(), S = m.width > 0 ? d.width / m.width : 1, v = m.height > 0 ? d.height / m.height : 1;
5061
- return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${S}, ${v})`, a.getBoundingClientRect(), new Promise((A) => {
5062
- let E = !1;
5063
- const P = () => {
5064
- E || (E = !0, a.removeEventListener("transitionend", u), window.setTimeout(() => {
5065
- e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => A(!1), 280);
5148
+ const h = a.getBoundingClientRect(), S = h.width > 0 ? d.width / h.width : 1, v = h.height > 0 ? d.height / h.height : 1;
5149
+ return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${S}, ${v})`, a.getBoundingClientRect(), new Promise((w) => {
5150
+ let j = !1;
5151
+ const R = () => {
5152
+ j || (j = !0, a.removeEventListener("transitionend", u), window.setTimeout(() => {
5153
+ e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => w(!1), 280);
5066
5154
  }, 1e3));
5067
- }, u = (h) => {
5068
- h.target !== a || h.propertyName !== "transform" || P();
5155
+ }, u = (f) => {
5156
+ f.target !== a || f.propertyName !== "transform" || R();
5069
5157
  };
5070
5158
  a.addEventListener("transitionend", u), requestAnimationFrame(() => {
5071
5159
  a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
5072
- }), window.setTimeout(P, 700);
5160
+ }), window.setTimeout(R, 700);
5073
5161
  });
5074
5162
  }
5075
- function Na() {
5076
- kt = !1, bt = !1, r.dialog && (r.dialog.classList.remove("nf-success", "nf-success-sticky"), r.dialog.style.opacity = "", r.dialog.style.transition = "", r.panel && (r.panel.style.transform = "", r.panel.style.transition = "", r.panel.style.transformOrigin = ""), r.panelBody && (r.panelBody.hidden = !1), r.successMsg && (r.successMsg.hidden = !0), r.successLink && (r.successLink.hidden = !0, r.successLink.removeAttribute("href")));
5163
+ function Ga() {
5164
+ kt = !1, wt = !1, s.dialog && (s.dialog.classList.remove("nf-success", "nf-success-sticky"), s.dialog.style.opacity = "", s.dialog.style.transition = "", s.panel && (s.panel.style.transform = "", s.panel.style.transition = "", s.panel.style.transformOrigin = ""), s.panelBody && (s.panelBody.hidden = !1), s.successMsg && (s.successMsg.hidden = !0), s.successLink && (s.successLink.hidden = !0, s.successLink.removeAttribute("href")));
5165
+ }
5166
+ function Wr(t = {}) {
5167
+ G = { ...G, ...Qi(t) }, $a();
5168
+ }
5169
+ function qa(t, e) {
5170
+ return t != null && typeof t == "object" && !Array.isArray(t) ? (J = {
5171
+ ...J,
5172
+ ...te(t)
5173
+ }, rt) : (J = {
5174
+ ...J,
5175
+ ...te({ [String(t)]: e })
5176
+ }, rt);
5077
5177
  }
5078
- function Ir(t = {}) {
5079
- _ = { ..._, ...Hi(t) }, Ma();
5178
+ function Zr(t) {
5179
+ return qa(t);
5080
5180
  }
5081
- async function Ka() {
5181
+ function Yr() {
5182
+ return J = {}, rt;
5183
+ }
5184
+ async function Wa() {
5082
5185
  var e, a;
5083
- if (de(), Zt)
5186
+ if (ge(), Yt)
5084
5187
  return null;
5085
- const t = r.text.value.trim();
5086
- if (!t && !B() && !G)
5087
- return z(g("status.emptyReport")), null;
5188
+ const t = s.text.value.trim();
5189
+ if (!t && !N() && !q)
5190
+ return E(m("status.emptyReport")), null;
5088
5191
  if (!p.endpoint || !p.projectKey)
5089
- return z(g("status.missingConfig")), null;
5090
- Zt = !0, Ye(!0), z(g("status.submitting"), !0);
5192
+ return E(m("status.missingConfig")), null;
5193
+ Yt = !0, Qe(!0), E(m("status.submitting"), !0);
5091
5194
  try {
5092
- const o = Ar(), i = j.crop(), n = j.list(), s = j.isCropped(), l = s ? bn(n, i) : n, c = s ? { x: 0, y: 0, w: 1, h: 1 } : i, d = Mn({
5195
+ const o = Tr(), i = z.crop(), n = z.list(), r = z.isCropped(), l = r ? Pn(n, i) : n, c = r ? { x: 0, y: 0, w: 1, h: 1 } : i, d = Gn({
5093
5196
  author: o,
5094
- diagnostics: H,
5095
- logs: K
5096
- }), m = {
5097
- width: typeof screen < "u" ? screen.width : null,
5098
- height: typeof screen < "u" ? screen.height : null,
5099
- dpr: window.devicePixelRatio || 1
5100
- }, S = [];
5101
- let v = 2048, A = null, E = null;
5102
- B() && (E = await Ve(W, {
5103
- crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
5104
- maxEdge: v
5197
+ diagnostics: _,
5198
+ logs: H
5199
+ }), h = [];
5200
+ let S = 2048, v = null, w = null;
5201
+ N() && (w = await Ke(Z, {
5202
+ crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
5203
+ maxEdge: S
5105
5204
  }));
5106
- for (let P = 1; P <= 3; P += 1) {
5107
- const u = P === 3 || !E, h = u ? {
5108
- ...E ? { width: E.width, height: E.height, mime: E.mime } : {},
5109
- attempt: P,
5205
+ for (let j = 1; j <= 3; j += 1) {
5206
+ const R = j === 3 || !w, u = R ? {
5207
+ ...w ? { width: w.width, height: w.height, mime: w.mime } : {},
5208
+ attempt: j,
5110
5209
  omitted: !0
5111
5210
  } : {
5112
- width: E.width,
5113
- height: E.height,
5114
- mime: E.mime,
5115
- attempt: P
5116
- }, R = {
5211
+ width: w.width,
5212
+ height: w.height,
5213
+ mime: w.mime,
5214
+ attempt: j
5215
+ }, f = {
5117
5216
  ...d,
5118
- screen: m,
5119
- screenshotMeta: h
5217
+ screenshotMeta: u
5120
5218
  };
5121
- u && B() && (R.screenshotError = {
5122
- message: (A == null ? void 0 : A.message) || "Screenshot omitted after failed uploads",
5123
- attempts: [...S]
5219
+ R && N() && (f.screenshotError = {
5220
+ message: (v == null ? void 0 : v.message) || "Screenshot omitted after failed uploads",
5221
+ attempts: [...h]
5124
5222
  });
5125
- const k = new FormData();
5126
- k.append("message", t), k.append("kind", q), k.append("version", p.version || "0.0.0"), k.append("author", o), p.name && k.append("name", p.name), k.append("context", JSON.stringify(R)), k.append("annotations", JSON.stringify(l)), k.append("crop", JSON.stringify(c)), Array.isArray(p.targets) && k.append("targets", JSON.stringify(p.targets)), !u && E && k.append("screenshot", E.blob, `screenshot.${E.ext}`), G && k.append("recording", G, "recording.webm");
5223
+ const A = new FormData();
5224
+ A.append("message", t), A.append("kind", W), A.append("version", p.version || "0.0.0"), A.append("author", o), p.name && A.append("name", p.name), A.append("context", JSON.stringify(f)), A.append("annotations", JSON.stringify(l)), A.append("crop", JSON.stringify(c)), Array.isArray(p.targets) && A.append("targets", JSON.stringify(p.targets)), !R && w && A.append("screenshot", w.blob, `screenshot.${w.ext}`), q && A.append("recording", q, "recording.webm");
5127
5225
  try {
5128
- const f = await fetch(`${p.endpoint}/v1/reports`, {
5226
+ const g = await fetch(`${p.endpoint}/v1/reports`, {
5129
5227
  method: "POST",
5130
5228
  headers: {
5131
5229
  "X-Notefully-Key": p.projectKey
5132
5230
  },
5133
- body: k
5231
+ body: A
5134
5232
  });
5135
5233
  let C = null;
5136
5234
  try {
5137
- C = await f.json();
5235
+ C = await g.json();
5138
5236
  } catch {
5139
5237
  C = null;
5140
5238
  }
5141
- if (!f.ok) {
5142
- const Y = new Error((C == null ? void 0 : C.error) || `${g("status.submitFailed")} (${f.status})`);
5143
- throw Y.status = f.status, Y.code = C == null ? void 0 : C.code, Y.json = C, Y;
5239
+ if (!g.ok) {
5240
+ const F = new Error((C == null ? void 0 : C.error) || `${m("status.submitFailed")} (${g.status})`);
5241
+ throw F.status = g.status, F.code = C == null ? void 0 : C.code, F.json = C, F;
5144
5242
  }
5145
- return u && B() && z(g("status.submitWithoutImage"), !0), await Dr((C == null ? void 0 : C.trackerUrl) || "") || nt(), C;
5146
- } catch (f) {
5147
- if (A = f, S.push({
5148
- attempt: P,
5149
- maxEdge: u ? null : v,
5150
- status: (f == null ? void 0 : f.status) || null,
5151
- code: (f == null ? void 0 : f.code) || null,
5152
- message: String((f == null ? void 0 : f.message) || f)
5153
- }), u || !E)
5154
- throw z(((e = f == null ? void 0 : f.json) == null ? void 0 : e.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
5155
- if (!zn(f, (f == null ? void 0 : f.json) || null))
5156
- throw z(((a = f == null ? void 0 : f.json) == null ? void 0 : a.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
5157
- if (P === 1) {
5158
- z(g("status.submitTooLarge"), !0), v = En(v), E = await Ve(W, {
5159
- crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
5160
- maxEdge: v
5243
+ return R && N() && E(m("status.submitWithoutImage"), !0), await qr((C == null ? void 0 : C.trackerUrl) || "") || nt(), C;
5244
+ } catch (g) {
5245
+ if (v = g, h.push({
5246
+ attempt: j,
5247
+ maxEdge: R ? null : S,
5248
+ status: (g == null ? void 0 : g.status) || null,
5249
+ code: (g == null ? void 0 : g.code) || null,
5250
+ message: String((g == null ? void 0 : g.message) || g)
5251
+ }), R || !w)
5252
+ throw E(((e = g == null ? void 0 : g.json) == null ? void 0 : e.error) || (g == null ? void 0 : g.message) || m("status.submitFailed")), g;
5253
+ if (!Mn(g, (g == null ? void 0 : g.json) || null))
5254
+ throw E(((a = g == null ? void 0 : g.json) == null ? void 0 : a.error) || (g == null ? void 0 : g.message) || m("status.submitFailed")), g;
5255
+ if (j === 1) {
5256
+ E(m("status.submitTooLarge"), !0), S = Tn(S), w = await Ke(Z, {
5257
+ crop: r ? i : { x: 0, y: 0, w: 1, h: 1 },
5258
+ maxEdge: S
5161
5259
  });
5162
5260
  continue;
5163
5261
  }
5164
- z(g("status.submitTooLarge"), !0), E = null;
5262
+ E(m("status.submitTooLarge"), !0), w = null;
5165
5263
  }
5166
5264
  }
5167
- throw A || new Error(g("status.submitFailed"));
5265
+ throw v || new Error(m("status.submitFailed"));
5168
5266
  } finally {
5169
- Zt = !1, Ye(!1);
5267
+ Yt = !1, Qe(!1);
5170
5268
  }
5171
5269
  }
5172
- function Ye(t) {
5173
- r.submit && (r.submit.disabled = !!t, r.submit.setAttribute("aria-busy", t ? "true" : "false"));
5270
+ function Qe(t) {
5271
+ s.submit && (s.submit.disabled = !!t, s.submit.setAttribute("aria-busy", t ? "true" : "false"));
5174
5272
  }
5175
- function Or() {
5176
- nt(), document.removeEventListener("keydown", Ia), b == null || b.remove(), b = null, r = {}, ot.unhook();
5177
- }
5178
- const Ht = {
5179
- init: xr,
5180
- configure: ye,
5181
- setTheme: Ur,
5182
- setVisible: Tr,
5183
- open: Ba,
5273
+ function Xr() {
5274
+ nt(), document.removeEventListener("keydown", Ba), b == null || b.remove(), b = null, s = {}, J = {}, ot.unhook();
5275
+ }
5276
+ const rt = {
5277
+ init: Nr,
5278
+ configure: be,
5279
+ setTheme: Kr,
5280
+ setVisible: Hr,
5281
+ open: _a,
5184
5282
  close: nt,
5185
- isOpen: jr,
5186
- getLocale: Pr,
5187
- setLocale: Lr,
5188
- identify: Ir,
5189
- log: Rr,
5190
- submit: Ka,
5191
- destroy: Or
5283
+ isOpen: $r,
5284
+ getLocale: Vr,
5285
+ setLocale: Br,
5286
+ identify: Wr,
5287
+ setField: qa,
5288
+ setFields: Zr,
5289
+ clearFields: Yr,
5290
+ log: Ir,
5291
+ submit: Wa,
5292
+ destroy: Xr
5192
5293
  };
5193
- typeof window < "u" && (window.Notefully = Ht);
5294
+ typeof window < "u" && (window.Notefully = rt);
5194
5295
  export {
5296
+ Yr as clearFields,
5195
5297
  nt as close,
5196
- ye as configure,
5197
- Ht as default,
5198
- Or as destroy,
5199
- Pr as getLocaleTag,
5200
- Ir as identify,
5201
- xr as init,
5202
- jr as isOpen,
5203
- Rr as log,
5204
- Ba as open,
5205
- Lr as setLocale,
5206
- Ur as setTheme,
5207
- Tr as setVisible,
5208
- Ka as submit
5298
+ be as configure,
5299
+ rt as default,
5300
+ Xr as destroy,
5301
+ Vr as getLocaleTag,
5302
+ Wr as identify,
5303
+ Nr as init,
5304
+ $r as isOpen,
5305
+ Ir as log,
5306
+ _a as open,
5307
+ qa as setField,
5308
+ Zr as setFields,
5309
+ Br as setLocale,
5310
+ Kr as setTheme,
5311
+ Hr as setVisible,
5312
+ Wa as submit
5209
5313
  };