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