@makefully/notefully 0.2.6 → 0.2.7

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