@makefully/notefully 0.1.7 → 0.1.9
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 +1 -0
- package/dist/notefully.css +1 -1
- package/dist/notefully.iife.js +17 -21
- package/dist/notefully.js +835 -767
- package/package.json +1 -1
package/dist/notefully.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function fe(t, e) {
|
|
2
2
|
if (t.match(/^[a-z]+:\/\//i))
|
|
3
3
|
return t;
|
|
4
4
|
if (t.match(/^\/\//))
|
|
5
5
|
return window.location.protocol + t;
|
|
6
6
|
if (t.match(/^[a-z]+:/i))
|
|
7
7
|
return t;
|
|
8
|
-
const
|
|
9
|
-
return
|
|
8
|
+
const n = document.implementation.createHTMLDocument(), r = n.createElement("base"), o = n.createElement("a");
|
|
9
|
+
return n.head.appendChild(r), n.body.appendChild(o), e && (r.href = e), o.href = t, o.href;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const he = /* @__PURE__ */ (() => {
|
|
12
12
|
let t = 0;
|
|
13
13
|
const e = () => (
|
|
14
14
|
// eslint-disable-next-line no-bitwise
|
|
@@ -16,515 +16,526 @@ const ue = /* @__PURE__ */ (() => {
|
|
|
16
16
|
);
|
|
17
17
|
return () => (t += 1, `u${e()}${t}`);
|
|
18
18
|
})();
|
|
19
|
-
function
|
|
19
|
+
function H(t) {
|
|
20
20
|
const e = [];
|
|
21
|
-
for (let
|
|
22
|
-
e.push(t[
|
|
21
|
+
for (let n = 0, r = t.length; n < r; n++)
|
|
22
|
+
e.push(t[n]);
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
25
|
let _ = null;
|
|
26
|
-
function
|
|
27
|
-
return _ || (t.includeStyleProperties ? (_ = t.includeStyleProperties, _) : (_ =
|
|
26
|
+
function Nt(t = {}) {
|
|
27
|
+
return _ || (t.includeStyleProperties ? (_ = t.includeStyleProperties, _) : (_ = H(window.getComputedStyle(document.documentElement)), _));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
return
|
|
29
|
+
function K(t, e) {
|
|
30
|
+
const r = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
31
|
+
return r ? parseFloat(r.replace("px", "")) : 0;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const e =
|
|
35
|
-
return t.clientWidth + e +
|
|
33
|
+
function pe(t) {
|
|
34
|
+
const e = K(t, "border-left-width"), n = K(t, "border-right-width");
|
|
35
|
+
return t.clientWidth + e + n;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const e =
|
|
39
|
-
return t.clientHeight + e +
|
|
37
|
+
function me(t) {
|
|
38
|
+
const e = K(t, "border-top-width"), n = K(t, "border-bottom-width");
|
|
39
|
+
return t.clientHeight + e + n;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return { width:
|
|
41
|
+
function Wt(t, e = {}) {
|
|
42
|
+
const n = e.width || pe(t), r = e.height || me(t);
|
|
43
|
+
return { width: n, height: r };
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ye() {
|
|
46
46
|
let t, e;
|
|
47
47
|
try {
|
|
48
48
|
e = process;
|
|
49
49
|
} catch {
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
return
|
|
51
|
+
const n = e && e.env ? e.env.devicePixelRatio : null;
|
|
52
|
+
return n && (t = parseInt(n, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
(t.width >
|
|
54
|
+
const E = 16384;
|
|
55
|
+
function ge(t) {
|
|
56
|
+
(t.width > E || t.height > E) && (t.width > E && t.height > E ? t.width > t.height ? (t.height *= E / t.width, t.width = E) : (t.width *= E / t.height, t.height = E) : t.width > E ? (t.height *= E / t.width, t.width = E) : (t.width *= E / t.height, t.height = E));
|
|
57
57
|
}
|
|
58
58
|
function Y(t) {
|
|
59
|
-
return new Promise((e,
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
requestAnimationFrame(() => e(
|
|
59
|
+
return new Promise((e, n) => {
|
|
60
|
+
const r = new Image();
|
|
61
|
+
r.onload = () => {
|
|
62
|
+
r.decode().then(() => {
|
|
63
|
+
requestAnimationFrame(() => e(r));
|
|
64
64
|
});
|
|
65
|
-
},
|
|
65
|
+
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = t;
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
68
|
+
async function we(t) {
|
|
69
69
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
70
70
|
}
|
|
71
|
-
async function
|
|
72
|
-
const
|
|
73
|
-
return
|
|
71
|
+
async function be(t, e, n) {
|
|
72
|
+
const r = "http://www.w3.org/2000/svg", o = document.createElementNS(r, "svg"), i = document.createElementNS(r, "foreignObject");
|
|
73
|
+
return o.setAttribute("width", `${e}`), o.setAttribute("height", `${n}`), o.setAttribute("viewBox", `0 0 ${e} ${n}`), i.setAttribute("width", "100%"), i.setAttribute("height", "100%"), i.setAttribute("x", "0"), i.setAttribute("y", "0"), i.setAttribute("externalResourcesRequired", "true"), o.appendChild(i), i.appendChild(t), we(o);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const x = (t, e) => {
|
|
76
76
|
if (t instanceof e)
|
|
77
77
|
return !0;
|
|
78
|
-
const
|
|
79
|
-
return
|
|
78
|
+
const n = Object.getPrototypeOf(t);
|
|
79
|
+
return n === null ? !1 : n.constructor.name === e.name || x(n, e);
|
|
80
80
|
};
|
|
81
|
-
function
|
|
81
|
+
function ve(t) {
|
|
82
82
|
const e = t.getPropertyValue("content");
|
|
83
83
|
return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
87
|
-
const
|
|
88
|
-
return `${
|
|
85
|
+
function Se(t, e) {
|
|
86
|
+
return Nt(e).map((n) => {
|
|
87
|
+
const r = t.getPropertyValue(n), o = t.getPropertyPriority(n);
|
|
88
|
+
return `${n}: ${r}${o ? " !important" : ""};`;
|
|
89
89
|
}).join(" ");
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
return document.createTextNode(`${
|
|
91
|
+
function xe(t, e, n, r) {
|
|
92
|
+
const o = `.${t}:${e}`, i = n.cssText ? ve(n) : Se(n, r);
|
|
93
|
+
return document.createTextNode(`${o}{${i}}`);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
if (
|
|
95
|
+
function $t(t, e, n, r) {
|
|
96
|
+
const o = window.getComputedStyle(t, n), i = o.getPropertyValue("content");
|
|
97
|
+
if (i === "" || i === "none")
|
|
98
98
|
return;
|
|
99
|
-
const
|
|
99
|
+
const a = he();
|
|
100
100
|
try {
|
|
101
|
-
e.className = `${e.className} ${
|
|
101
|
+
e.className = `${e.className} ${a}`;
|
|
102
102
|
} catch {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
const s = document.createElement("style");
|
|
106
|
-
s.appendChild(
|
|
106
|
+
s.appendChild(xe(a, n, o, r)), e.appendChild(s);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
|
|
108
|
+
function Ee(t, e, n) {
|
|
109
|
+
$t(t, e, ":before", n), $t(t, e, ":after", n);
|
|
110
110
|
}
|
|
111
|
-
const
|
|
112
|
-
woff:
|
|
113
|
-
woff2:
|
|
111
|
+
const Rt = "application/font-woff", Pt = "image/jpeg", Ce = {
|
|
112
|
+
woff: Rt,
|
|
113
|
+
woff2: Rt,
|
|
114
114
|
ttf: "application/font-truetype",
|
|
115
115
|
eot: "application/vnd.ms-fontobject",
|
|
116
116
|
png: "image/png",
|
|
117
|
-
jpg:
|
|
118
|
-
jpeg:
|
|
117
|
+
jpg: Pt,
|
|
118
|
+
jpeg: Pt,
|
|
119
119
|
gif: "image/gif",
|
|
120
120
|
tiff: "image/tiff",
|
|
121
121
|
svg: "image/svg+xml",
|
|
122
122
|
webp: "image/webp"
|
|
123
123
|
};
|
|
124
|
-
function
|
|
124
|
+
function Me(t) {
|
|
125
125
|
const e = /\.([^./]*?)$/g.exec(t);
|
|
126
126
|
return e ? e[1] : "";
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
const e =
|
|
130
|
-
return
|
|
128
|
+
function St(t) {
|
|
129
|
+
const e = Me(t).toLowerCase();
|
|
130
|
+
return Ce[e] || "";
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Le(t) {
|
|
133
133
|
return t.split(/,/)[1];
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function dt(t) {
|
|
136
136
|
return t.search(/^(data:)/) !== -1;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function $e(t, e) {
|
|
139
139
|
return `data:${e};base64,${t}`;
|
|
140
140
|
}
|
|
141
|
-
async function
|
|
142
|
-
const
|
|
143
|
-
if (
|
|
144
|
-
throw new Error(`Resource "${
|
|
145
|
-
const
|
|
146
|
-
return new Promise((
|
|
141
|
+
async function qt(t, e, n) {
|
|
142
|
+
const r = await fetch(t, e);
|
|
143
|
+
if (r.status === 404)
|
|
144
|
+
throw new Error(`Resource "${r.url}" not found`);
|
|
145
|
+
const o = await r.blob();
|
|
146
|
+
return new Promise((i, a) => {
|
|
147
147
|
const s = new FileReader();
|
|
148
|
-
s.onerror =
|
|
148
|
+
s.onerror = a, s.onloadend = () => {
|
|
149
149
|
try {
|
|
150
|
-
|
|
150
|
+
i(n({ res: r, result: s.result }));
|
|
151
151
|
} catch (l) {
|
|
152
|
-
|
|
152
|
+
a(l);
|
|
153
153
|
}
|
|
154
|
-
}, s.readAsDataURL(
|
|
154
|
+
}, s.readAsDataURL(o);
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
const
|
|
158
|
-
function
|
|
159
|
-
let
|
|
160
|
-
return
|
|
161
|
-
}
|
|
162
|
-
async function xt(t, e,
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
let
|
|
157
|
+
const st = {};
|
|
158
|
+
function Re(t, e, n) {
|
|
159
|
+
let r = t.replace(/\?.*/, "");
|
|
160
|
+
return n && (r = t), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), e ? `[${e}]${r}` : r;
|
|
161
|
+
}
|
|
162
|
+
async function xt(t, e, n) {
|
|
163
|
+
const r = Re(t, e, n.includeQueryParams);
|
|
164
|
+
if (st[r] != null)
|
|
165
|
+
return st[r];
|
|
166
|
+
n.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
167
|
+
let o;
|
|
168
168
|
try {
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
} catch (
|
|
172
|
-
|
|
173
|
-
let
|
|
174
|
-
|
|
169
|
+
const i = await qt(t, n.fetchRequestInit, ({ res: a, result: s }) => (e || (e = a.headers.get("Content-Type") || ""), Le(s)));
|
|
170
|
+
o = $e(i, e);
|
|
171
|
+
} catch (i) {
|
|
172
|
+
o = n.imagePlaceholder || "";
|
|
173
|
+
let a = `Failed to fetch resource: ${t}`;
|
|
174
|
+
i && (a = typeof i == "string" ? i : i.message), a && console.warn(a);
|
|
175
175
|
}
|
|
176
|
-
return
|
|
176
|
+
return st[r] = o, o;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function Pe(t) {
|
|
179
179
|
const e = t.toDataURL();
|
|
180
180
|
return e === "data:," ? t.cloneNode(!1) : Y(e);
|
|
181
181
|
}
|
|
182
|
-
async function
|
|
182
|
+
async function Ae(t, e) {
|
|
183
183
|
if (t.currentSrc) {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
const s =
|
|
184
|
+
const i = document.createElement("canvas"), a = i.getContext("2d");
|
|
185
|
+
i.width = t.clientWidth, i.height = t.clientHeight, a == null || a.drawImage(t, 0, 0, i.width, i.height);
|
|
186
|
+
const s = i.toDataURL();
|
|
187
187
|
return Y(s);
|
|
188
188
|
}
|
|
189
|
-
const
|
|
190
|
-
return Y(
|
|
189
|
+
const n = t.poster, r = St(n), o = await xt(n, r, e);
|
|
190
|
+
return Y(o);
|
|
191
191
|
}
|
|
192
|
-
async function
|
|
193
|
-
var
|
|
192
|
+
async function Te(t, e) {
|
|
193
|
+
var n;
|
|
194
194
|
try {
|
|
195
|
-
if (!((
|
|
195
|
+
if (!((n = t == null ? void 0 : t.contentDocument) === null || n === void 0) && n.body)
|
|
196
196
|
return await et(t.contentDocument.body, e, !0);
|
|
197
197
|
} catch {
|
|
198
198
|
}
|
|
199
199
|
return t.cloneNode(!1);
|
|
200
200
|
}
|
|
201
|
-
async function
|
|
202
|
-
return
|
|
201
|
+
async function ke(t, e) {
|
|
202
|
+
return x(t, HTMLCanvasElement) ? Pe(t) : x(t, HTMLVideoElement) ? Ae(t, e) : x(t, HTMLIFrameElement) ? Te(t, e) : t.cloneNode(zt(t));
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
async function
|
|
206
|
-
var
|
|
207
|
-
if (
|
|
204
|
+
const Ie = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", zt = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
|
|
205
|
+
async function Oe(t, e, n) {
|
|
206
|
+
var r, o;
|
|
207
|
+
if (zt(e))
|
|
208
208
|
return e;
|
|
209
|
-
let
|
|
210
|
-
return
|
|
209
|
+
let i = [];
|
|
210
|
+
return Ie(t) && t.assignedNodes ? i = H(t.assignedNodes()) : x(t, HTMLIFrameElement) && (!((r = t.contentDocument) === null || r === void 0) && r.body) ? i = H(t.contentDocument.body.childNodes) : i = H(((o = t.shadowRoot) !== null && o !== void 0 ? o : t).childNodes), i.length === 0 || x(t, HTMLVideoElement) || await i.reduce((a, s) => a.then(() => et(s, n)).then((l) => {
|
|
211
211
|
l && e.appendChild(l);
|
|
212
212
|
}), Promise.resolve()), e;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
if (!
|
|
214
|
+
function He(t, e, n) {
|
|
215
|
+
const r = e.style;
|
|
216
|
+
if (!r)
|
|
217
217
|
return;
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
let
|
|
221
|
-
|
|
218
|
+
const o = window.getComputedStyle(t);
|
|
219
|
+
o.cssText ? (r.cssText = o.cssText, r.transformOrigin = o.transformOrigin) : Nt(n).forEach((i) => {
|
|
220
|
+
let a = o.getPropertyValue(i);
|
|
221
|
+
i === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - 0.1}px`), x(t, HTMLIFrameElement) && i === "display" && a === "inline" && (a = "block"), i === "d" && e.getAttribute("d") && (a = `path(${e.getAttribute("d")})`), r.setProperty(i, a, o.getPropertyPriority(i));
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
function Ie(t, e) {
|
|
225
|
-
C(t, HTMLTextAreaElement) && (e.innerHTML = t.value), C(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
226
|
-
}
|
|
227
224
|
function De(t, e) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
x(t, HTMLTextAreaElement) && (e.innerHTML = t.value), x(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
226
|
+
}
|
|
227
|
+
function Fe(t, e) {
|
|
228
|
+
if (x(t, HTMLSelectElement)) {
|
|
229
|
+
const r = Array.from(e.children).find((o) => t.value === o.getAttribute("value"));
|
|
230
|
+
r && r.setAttribute("selected", "");
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return
|
|
233
|
+
function je(t, e, n) {
|
|
234
|
+
return x(e, Element) && (He(t, e, n), Ee(t, e, n), De(t, e), Fe(t, e)), e;
|
|
235
235
|
}
|
|
236
|
-
async function
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
236
|
+
async function Ue(t, e) {
|
|
237
|
+
const n = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
238
|
+
if (n.length === 0)
|
|
239
239
|
return t;
|
|
240
|
-
const
|
|
241
|
-
for (let
|
|
242
|
-
const s =
|
|
240
|
+
const r = {};
|
|
241
|
+
for (let i = 0; i < n.length; i++) {
|
|
242
|
+
const s = n[i].getAttribute("xlink:href");
|
|
243
243
|
if (s) {
|
|
244
|
-
const l = t.querySelector(s),
|
|
245
|
-
!l &&
|
|
244
|
+
const l = t.querySelector(s), u = document.querySelector(s);
|
|
245
|
+
!l && u && !r[s] && (r[s] = await et(u, e, !0));
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
const s = document.createElementNS(
|
|
253
|
-
|
|
254
|
-
for (let l = 0; l <
|
|
255
|
-
s.appendChild(
|
|
256
|
-
t.appendChild(
|
|
248
|
+
const o = Object.values(r);
|
|
249
|
+
if (o.length) {
|
|
250
|
+
const i = "http://www.w3.org/1999/xhtml", a = document.createElementNS(i, "svg");
|
|
251
|
+
a.setAttribute("xmlns", i), a.style.position = "absolute", a.style.width = "0", a.style.height = "0", a.style.overflow = "hidden", a.style.display = "none";
|
|
252
|
+
const s = document.createElementNS(i, "defs");
|
|
253
|
+
a.appendChild(s);
|
|
254
|
+
for (let l = 0; l < o.length; l++)
|
|
255
|
+
s.appendChild(o[l]);
|
|
256
|
+
t.appendChild(a);
|
|
257
257
|
}
|
|
258
258
|
return t;
|
|
259
259
|
}
|
|
260
|
-
async function et(t, e,
|
|
261
|
-
return !
|
|
260
|
+
async function et(t, e, n) {
|
|
261
|
+
return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((r) => ke(r, e)).then((r) => Oe(t, r, e)).then((r) => je(t, r, e)).then((r) => Ue(r, e));
|
|
262
262
|
}
|
|
263
|
-
const
|
|
264
|
-
function
|
|
263
|
+
const Xt = /url\((['"]?)([^'"]+?)\1\)/g, _e = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Be = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
264
|
+
function Ve(t) {
|
|
265
265
|
const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
266
266
|
return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Ne(t) {
|
|
269
269
|
const e = [];
|
|
270
|
-
return t.replace(
|
|
270
|
+
return t.replace(Xt, (n, r, o) => (e.push(o), n)), e.filter((n) => !dt(n));
|
|
271
271
|
}
|
|
272
|
-
async function
|
|
272
|
+
async function We(t, e, n, r, o) {
|
|
273
273
|
try {
|
|
274
|
-
const
|
|
274
|
+
const i = n ? fe(e, n) : e, a = St(e);
|
|
275
275
|
let s;
|
|
276
|
-
return
|
|
276
|
+
return o || (s = await xt(i, a, r)), t.replace(Ve(e), `$1${s}$3`);
|
|
277
277
|
} catch {
|
|
278
278
|
}
|
|
279
279
|
return t;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return e ? t.replace(
|
|
281
|
+
function qe(t, { preferredFontFormat: e }) {
|
|
282
|
+
return e ? t.replace(Be, (n) => {
|
|
283
283
|
for (; ; ) {
|
|
284
|
-
const [
|
|
285
|
-
if (!
|
|
284
|
+
const [r, , o] = _e.exec(n) || [];
|
|
285
|
+
if (!o)
|
|
286
286
|
return "";
|
|
287
|
-
if (
|
|
288
|
-
return `src: ${
|
|
287
|
+
if (o === e)
|
|
288
|
+
return `src: ${r};`;
|
|
289
289
|
}
|
|
290
290
|
}) : t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return t.search(
|
|
292
|
+
function Kt(t) {
|
|
293
|
+
return t.search(Xt) !== -1;
|
|
294
294
|
}
|
|
295
|
-
async function
|
|
296
|
-
if (!
|
|
295
|
+
async function Yt(t, e, n) {
|
|
296
|
+
if (!Kt(t))
|
|
297
297
|
return t;
|
|
298
|
-
const
|
|
299
|
-
return
|
|
298
|
+
const r = qe(t, n);
|
|
299
|
+
return Ne(r).reduce((i, a) => i.then((s) => We(s, a, e, n)), Promise.resolve(r));
|
|
300
300
|
}
|
|
301
|
-
async function
|
|
302
|
-
var
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
const
|
|
306
|
-
return e.style.setProperty(t,
|
|
301
|
+
async function B(t, e, n) {
|
|
302
|
+
var r;
|
|
303
|
+
const o = (r = e.style) === null || r === void 0 ? void 0 : r.getPropertyValue(t);
|
|
304
|
+
if (o) {
|
|
305
|
+
const i = await Yt(o, null, n);
|
|
306
|
+
return e.style.setProperty(t, i, e.style.getPropertyPriority(t)), !0;
|
|
307
307
|
}
|
|
308
308
|
return !1;
|
|
309
309
|
}
|
|
310
|
-
async function
|
|
311
|
-
await
|
|
310
|
+
async function ze(t, e) {
|
|
311
|
+
await B("background", t, e) || await B("background-image", t, e), await B("mask", t, e) || await B("-webkit-mask", t, e) || await B("mask-image", t, e) || await B("-webkit-mask-image", t, e);
|
|
312
312
|
}
|
|
313
|
-
async function
|
|
314
|
-
const
|
|
315
|
-
if (!(
|
|
313
|
+
async function Xe(t, e) {
|
|
314
|
+
const n = x(t, HTMLImageElement);
|
|
315
|
+
if (!(n && !dt(t.src)) && !(x(t, SVGImageElement) && !dt(t.href.baseVal)))
|
|
316
316
|
return;
|
|
317
|
-
const
|
|
318
|
-
await new Promise((
|
|
319
|
-
t.onload =
|
|
317
|
+
const r = n ? t.src : t.href.baseVal, o = await xt(r, St(r), e);
|
|
318
|
+
await new Promise((i, a) => {
|
|
319
|
+
t.onload = i, t.onerror = e.onImageErrorHandler ? (...l) => {
|
|
320
320
|
try {
|
|
321
|
-
|
|
322
|
-
} catch (
|
|
323
|
-
|
|
321
|
+
i(e.onImageErrorHandler(...l));
|
|
322
|
+
} catch (u) {
|
|
323
|
+
a(u);
|
|
324
324
|
}
|
|
325
|
-
} :
|
|
325
|
+
} : a;
|
|
326
326
|
const s = t;
|
|
327
|
-
s.decode && (s.decode =
|
|
327
|
+
s.decode && (s.decode = i), s.loading === "lazy" && (s.loading = "eager"), n ? (t.srcset = "", t.src = o) : t.href.baseVal = o;
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
async function
|
|
331
|
-
const
|
|
332
|
-
await Promise.all(
|
|
333
|
-
}
|
|
334
|
-
async function
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
function
|
|
338
|
-
const { style:
|
|
339
|
-
e.backgroundColor && (
|
|
340
|
-
const
|
|
341
|
-
return
|
|
342
|
-
|
|
330
|
+
async function Ke(t, e) {
|
|
331
|
+
const r = H(t.childNodes).map((o) => Gt(o, e));
|
|
332
|
+
await Promise.all(r).then(() => t);
|
|
333
|
+
}
|
|
334
|
+
async function Gt(t, e) {
|
|
335
|
+
x(t, Element) && (await ze(t, e), await Xe(t, e), await Ke(t, e));
|
|
336
|
+
}
|
|
337
|
+
function Ye(t, e) {
|
|
338
|
+
const { style: n } = t;
|
|
339
|
+
e.backgroundColor && (n.backgroundColor = e.backgroundColor), e.width && (n.width = `${e.width}px`), e.height && (n.height = `${e.height}px`);
|
|
340
|
+
const r = e.style;
|
|
341
|
+
return r != null && Object.keys(r).forEach((o) => {
|
|
342
|
+
n[o] = r[o];
|
|
343
343
|
}), t;
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
async function
|
|
347
|
-
let e =
|
|
345
|
+
const At = {};
|
|
346
|
+
async function Tt(t) {
|
|
347
|
+
let e = At[t];
|
|
348
348
|
if (e != null)
|
|
349
349
|
return e;
|
|
350
|
-
const
|
|
351
|
-
return e = { url: t, cssText:
|
|
352
|
-
}
|
|
353
|
-
async function
|
|
354
|
-
let
|
|
355
|
-
const
|
|
356
|
-
let s =
|
|
357
|
-
return s.startsWith("https://") || (s = new URL(s, t.url).href),
|
|
350
|
+
const r = await (await fetch(t)).text();
|
|
351
|
+
return e = { url: t, cssText: r }, At[t] = e, e;
|
|
352
|
+
}
|
|
353
|
+
async function kt(t, e) {
|
|
354
|
+
let n = t.cssText;
|
|
355
|
+
const r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (a) => {
|
|
356
|
+
let s = a.replace(r, "$1");
|
|
357
|
+
return s.startsWith("https://") || (s = new URL(s, t.url).href), qt(s, e.fetchRequestInit, ({ result: l }) => (n = n.replace(a, `url(${l})`), [a, l]));
|
|
358
358
|
});
|
|
359
|
-
return Promise.all(
|
|
359
|
+
return Promise.all(i).then(() => n);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function It(t) {
|
|
362
362
|
if (t == null)
|
|
363
363
|
return [];
|
|
364
|
-
const e = [],
|
|
365
|
-
let
|
|
366
|
-
const
|
|
364
|
+
const e = [], n = /(\/\*[\s\S]*?\*\/)/gi;
|
|
365
|
+
let r = t.replace(n, "");
|
|
366
|
+
const o = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
367
367
|
for (; ; ) {
|
|
368
|
-
const l =
|
|
368
|
+
const l = o.exec(r);
|
|
369
369
|
if (l === null)
|
|
370
370
|
break;
|
|
371
371
|
e.push(l[0]);
|
|
372
372
|
}
|
|
373
|
-
|
|
374
|
-
const
|
|
373
|
+
r = r.replace(o, "");
|
|
374
|
+
const i = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, a = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", s = new RegExp(a, "gi");
|
|
375
375
|
for (; ; ) {
|
|
376
|
-
let l =
|
|
376
|
+
let l = i.exec(r);
|
|
377
377
|
if (l === null) {
|
|
378
|
-
if (l = s.exec(
|
|
378
|
+
if (l = s.exec(r), l === null)
|
|
379
379
|
break;
|
|
380
|
-
|
|
380
|
+
i.lastIndex = s.lastIndex;
|
|
381
381
|
} else
|
|
382
|
-
s.lastIndex =
|
|
382
|
+
s.lastIndex = i.lastIndex;
|
|
383
383
|
e.push(l[0]);
|
|
384
384
|
}
|
|
385
385
|
return e;
|
|
386
386
|
}
|
|
387
|
-
async function
|
|
388
|
-
const
|
|
389
|
-
return t.forEach((
|
|
390
|
-
if ("cssRules" in
|
|
387
|
+
async function Ge(t, e) {
|
|
388
|
+
const n = [], r = [];
|
|
389
|
+
return t.forEach((o) => {
|
|
390
|
+
if ("cssRules" in o)
|
|
391
391
|
try {
|
|
392
|
-
|
|
393
|
-
if (
|
|
394
|
-
let s =
|
|
395
|
-
const l =
|
|
392
|
+
H(o.cssRules || []).forEach((i, a) => {
|
|
393
|
+
if (i.type === CSSRule.IMPORT_RULE) {
|
|
394
|
+
let s = a + 1;
|
|
395
|
+
const l = i.href, u = Tt(l).then((d) => kt(d, e)).then((d) => It(d).forEach((p) => {
|
|
396
396
|
try {
|
|
397
|
-
|
|
398
|
-
} catch (
|
|
397
|
+
o.insertRule(p, p.startsWith("@import") ? s += 1 : o.cssRules.length);
|
|
398
|
+
} catch (m) {
|
|
399
399
|
console.error("Error inserting rule from remote css", {
|
|
400
400
|
rule: p,
|
|
401
|
-
error:
|
|
401
|
+
error: m
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
})).catch((
|
|
405
|
-
console.error("Error loading remote css",
|
|
404
|
+
})).catch((d) => {
|
|
405
|
+
console.error("Error loading remote css", d.toString());
|
|
406
406
|
});
|
|
407
|
-
|
|
407
|
+
r.push(u);
|
|
408
408
|
}
|
|
409
409
|
});
|
|
410
|
-
} catch (
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
410
|
+
} catch (i) {
|
|
411
|
+
const a = t.find((s) => s.href == null) || document.styleSheets[0];
|
|
412
|
+
o.href != null && r.push(Tt(o.href).then((s) => kt(s, e)).then((s) => It(s).forEach((l) => {
|
|
413
|
+
a.insertRule(l, a.cssRules.length);
|
|
414
414
|
})).catch((s) => {
|
|
415
415
|
console.error("Error loading remote stylesheet", s);
|
|
416
|
-
})), console.error("Error inlining remote css file",
|
|
416
|
+
})), console.error("Error inlining remote css file", i);
|
|
417
417
|
}
|
|
418
|
-
}), Promise.all(
|
|
419
|
-
if ("cssRules" in
|
|
418
|
+
}), Promise.all(r).then(() => (t.forEach((o) => {
|
|
419
|
+
if ("cssRules" in o)
|
|
420
420
|
try {
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
H(o.cssRules || []).forEach((i) => {
|
|
422
|
+
n.push(i);
|
|
423
423
|
});
|
|
424
|
-
} catch (
|
|
425
|
-
console.error(`Error while reading CSS rules from ${
|
|
424
|
+
} catch (i) {
|
|
425
|
+
console.error(`Error while reading CSS rules from ${o.href}`, i);
|
|
426
426
|
}
|
|
427
|
-
}),
|
|
427
|
+
}), n));
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
429
|
+
function Je(t) {
|
|
430
|
+
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Kt(e.style.getPropertyValue("src")));
|
|
431
431
|
}
|
|
432
|
-
async function
|
|
432
|
+
async function Qe(t, e) {
|
|
433
433
|
if (t.ownerDocument == null)
|
|
434
434
|
throw new Error("Provided element is not within a Document");
|
|
435
|
-
const
|
|
436
|
-
return
|
|
435
|
+
const n = H(t.ownerDocument.styleSheets), r = await Ge(n, e);
|
|
436
|
+
return Je(r);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function Jt(t) {
|
|
439
439
|
return t.trim().replace(/["']/g, "");
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Ze(t) {
|
|
442
442
|
const e = /* @__PURE__ */ new Set();
|
|
443
|
-
function r
|
|
444
|
-
(
|
|
445
|
-
e.add(
|
|
446
|
-
}), Array.from(
|
|
447
|
-
|
|
443
|
+
function n(r) {
|
|
444
|
+
(r.style.fontFamily || getComputedStyle(r).fontFamily).split(",").forEach((i) => {
|
|
445
|
+
e.add(Jt(i));
|
|
446
|
+
}), Array.from(r.children).forEach((i) => {
|
|
447
|
+
i instanceof HTMLElement && n(i);
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
return
|
|
450
|
+
return n(t), e;
|
|
451
451
|
}
|
|
452
|
-
async function
|
|
453
|
-
const
|
|
454
|
-
return (await Promise.all(
|
|
455
|
-
const
|
|
456
|
-
return
|
|
452
|
+
async function tn(t, e) {
|
|
453
|
+
const n = await Qe(t, e), r = Ze(t);
|
|
454
|
+
return (await Promise.all(n.filter((i) => r.has(Jt(i.style.fontFamily))).map((i) => {
|
|
455
|
+
const a = i.parentStyleSheet ? i.parentStyleSheet.href : null;
|
|
456
|
+
return Yt(i.cssText, a, e);
|
|
457
457
|
}))).join(`
|
|
458
458
|
`);
|
|
459
459
|
}
|
|
460
|
-
async function
|
|
461
|
-
const
|
|
462
|
-
if (
|
|
463
|
-
const
|
|
464
|
-
|
|
460
|
+
async function en(t, e) {
|
|
461
|
+
const n = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await tn(t, e);
|
|
462
|
+
if (n) {
|
|
463
|
+
const r = document.createElement("style"), o = document.createTextNode(n);
|
|
464
|
+
r.appendChild(o), t.firstChild ? t.insertBefore(r, t.firstChild) : t.appendChild(r);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
async function
|
|
468
|
-
const { width:
|
|
469
|
-
return await
|
|
467
|
+
async function nn(t, e = {}) {
|
|
468
|
+
const { width: n, height: r } = Wt(t, e), o = await et(t, e, !0);
|
|
469
|
+
return await en(o, e), await Gt(o, e), Ye(o, e), await be(o, n, r);
|
|
470
470
|
}
|
|
471
|
-
async function
|
|
472
|
-
const { width:
|
|
473
|
-
return
|
|
471
|
+
async function rn(t, e = {}) {
|
|
472
|
+
const { width: n, height: r } = Wt(t, e), o = await nn(t, e), i = await Y(o), a = document.createElement("canvas"), s = a.getContext("2d"), l = e.pixelRatio || ye(), u = e.canvasWidth || n, d = e.canvasHeight || r;
|
|
473
|
+
return a.width = u * l, a.height = d * l, e.skipAutoScale || ge(a), a.style.width = `${u}`, a.style.height = `${d}`, e.backgroundColor && (s.fillStyle = e.backgroundColor, s.fillRect(0, 0, a.width, a.height)), s.drawImage(i, 0, 0, a.width, a.height), a;
|
|
474
474
|
}
|
|
475
|
-
async function
|
|
476
|
-
return (await
|
|
475
|
+
async function on(t, e = {}) {
|
|
476
|
+
return (await rn(t, e)).toDataURL();
|
|
477
477
|
}
|
|
478
478
|
const G = "data-nf-capture-chrome";
|
|
479
|
-
function
|
|
479
|
+
function an(t) {
|
|
480
480
|
return t instanceof Element && (t.hasAttribute(G) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function sn() {
|
|
483
483
|
const t = [];
|
|
484
|
-
return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((
|
|
485
|
-
const
|
|
486
|
-
|
|
484
|
+
return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((n) => {
|
|
485
|
+
const r = n.getBoundingClientRect(), o = document.createElement("div");
|
|
486
|
+
o.setAttribute("data-nf-mask-cover", "1"), o.style.cssText = [
|
|
487
487
|
"position:fixed",
|
|
488
|
-
`left:${
|
|
489
|
-
`top:${
|
|
490
|
-
`width:${Math.max(
|
|
491
|
-
`height:${Math.max(
|
|
488
|
+
`left:${r.left}px`,
|
|
489
|
+
`top:${r.top}px`,
|
|
490
|
+
`width:${Math.max(r.width, 4)}px`,
|
|
491
|
+
`height:${Math.max(r.height, 4)}px`,
|
|
492
492
|
"background:#111",
|
|
493
493
|
"z-index:2147483646",
|
|
494
494
|
"pointer-events:none"
|
|
495
|
-
].join(";"), document.body.appendChild(
|
|
496
|
-
}), () => t.forEach((
|
|
495
|
+
].join(";"), document.body.appendChild(o), t.push(o);
|
|
496
|
+
}), () => t.forEach((n) => n.remove());
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function cn() {
|
|
499
499
|
const t = document.querySelector(`[${G}]`);
|
|
500
500
|
if (t)
|
|
501
501
|
return t;
|
|
502
502
|
const e = document.createElement("div");
|
|
503
503
|
return e.setAttribute(G, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = '<span class="nf-capture-chrome-pill">Capturing…</span>', document.body.appendChild(e), e;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function ln() {
|
|
506
506
|
document.querySelectorAll(`[${G}]`).forEach((t) => t.remove());
|
|
507
507
|
}
|
|
508
|
-
async function
|
|
509
|
-
const t = document.getElementById("notefully"), e = t ? t.style.display : "",
|
|
508
|
+
async function un() {
|
|
509
|
+
const t = document.getElementById("notefully"), e = t ? t.style.display : "", n = cn();
|
|
510
510
|
t && (t.style.display = "none");
|
|
511
|
-
const
|
|
512
|
-
await new Promise((
|
|
511
|
+
const r = sn();
|
|
512
|
+
await new Promise((o) => requestAnimationFrame(() => requestAnimationFrame(o)));
|
|
513
513
|
try {
|
|
514
|
-
return await
|
|
514
|
+
return await on(document.body, {
|
|
515
515
|
cacheBust: !0,
|
|
516
516
|
pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
|
|
517
|
-
filter: (
|
|
517
|
+
filter: (o) => !an(o)
|
|
518
518
|
});
|
|
519
519
|
} finally {
|
|
520
|
-
|
|
520
|
+
r(), n.remove(), ln(), t && (t.style.display = e);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function dn(t = "") {
|
|
524
|
+
const e = String(t || "");
|
|
525
|
+
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" : "";
|
|
526
|
+
}
|
|
527
|
+
function fn(t = "") {
|
|
528
|
+
const e = String(t || "");
|
|
529
|
+
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" : "";
|
|
530
|
+
}
|
|
531
|
+
function hn(t = {}) {
|
|
532
|
+
const e = navigator.userAgent;
|
|
524
533
|
return {
|
|
525
534
|
url: location.href,
|
|
526
535
|
title: document.title,
|
|
527
|
-
userAgent:
|
|
536
|
+
userAgent: e,
|
|
537
|
+
os: dn(e),
|
|
538
|
+
browser: fn(e),
|
|
528
539
|
language: navigator.language,
|
|
529
540
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
530
541
|
viewport: {
|
|
@@ -539,7 +550,7 @@ function cn(t = {}) {
|
|
|
539
550
|
}
|
|
540
551
|
};
|
|
541
552
|
}
|
|
542
|
-
const
|
|
553
|
+
const Ot = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Ht = {
|
|
543
554
|
id: "userId",
|
|
544
555
|
username: "displayName",
|
|
545
556
|
name: "displayName"
|
|
@@ -551,7 +562,8 @@ const At = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), It = {
|
|
|
551
562
|
"targets",
|
|
552
563
|
"hideLauncher",
|
|
553
564
|
"theme",
|
|
554
|
-
"video"
|
|
565
|
+
"video",
|
|
566
|
+
"consoleLogLimit"
|
|
555
567
|
]), Ft = {
|
|
556
568
|
slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
|
|
557
569
|
projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
|
|
@@ -561,65 +573,65 @@ const At = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), It = {
|
|
|
561
573
|
email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
|
|
562
574
|
displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
|
|
563
575
|
};
|
|
564
|
-
function
|
|
565
|
-
const
|
|
566
|
-
for (const
|
|
567
|
-
Object.prototype.hasOwnProperty.call(
|
|
568
|
-
for (const [
|
|
569
|
-
Object.prototype.hasOwnProperty.call(
|
|
570
|
-
for (const
|
|
571
|
-
|
|
572
|
-
if (
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
`Notefully.identify: ignoring unknown key(s): ${
|
|
576
|
+
function pn(t = {}, e = {}) {
|
|
577
|
+
const n = e.warn || Qt, r = t && typeof t == "object" ? t : {}, o = {}, i = [];
|
|
578
|
+
for (const a of Ot)
|
|
579
|
+
Object.prototype.hasOwnProperty.call(r, a) && (o[a] = r[a]);
|
|
580
|
+
for (const [a, s] of Object.entries(Ht))
|
|
581
|
+
Object.prototype.hasOwnProperty.call(r, a) && (Object.prototype.hasOwnProperty.call(o, s) || (o[s] = r[a]));
|
|
582
|
+
for (const a of Object.keys(r))
|
|
583
|
+
Ot.has(a) || Object.prototype.hasOwnProperty.call(Ht, a) || i.push(a);
|
|
584
|
+
if (i.length) {
|
|
585
|
+
const a = i.some((s) => s === "name" || s === "slug" || s === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
|
|
586
|
+
n(
|
|
587
|
+
`Notefully.identify: ignoring unknown key(s): ${i.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + a
|
|
576
588
|
);
|
|
577
589
|
}
|
|
578
|
-
return
|
|
579
|
-
}
|
|
580
|
-
function
|
|
581
|
-
const
|
|
582
|
-
if (
|
|
583
|
-
for (const
|
|
584
|
-
if (Ft[
|
|
585
|
-
|
|
590
|
+
return o;
|
|
591
|
+
}
|
|
592
|
+
function mn(t = {}, e = {}) {
|
|
593
|
+
const n = e.warn || Qt, r = t && typeof t == "object" ? t : {}, o = Object.keys(r).filter((i) => !Dt.has(i));
|
|
594
|
+
if (o.length)
|
|
595
|
+
for (const i of o) {
|
|
596
|
+
if (Ft[i]) {
|
|
597
|
+
n(`Notefully.init: ignoring "${i}". ${Ft[i]}`);
|
|
586
598
|
continue;
|
|
587
599
|
}
|
|
588
|
-
|
|
589
|
-
`Notefully.init: ignoring unknown key "${
|
|
600
|
+
n(
|
|
601
|
+
`Notefully.init: ignoring unknown key "${i}". Supported: ${[...Dt].join(", ")}.`
|
|
590
602
|
);
|
|
591
603
|
}
|
|
592
604
|
}
|
|
593
|
-
function
|
|
605
|
+
function Qt(t) {
|
|
594
606
|
typeof console < "u" && typeof console.warn == "function" && console.warn(t);
|
|
595
607
|
}
|
|
596
|
-
const
|
|
597
|
-
function
|
|
608
|
+
const yn = 80;
|
|
609
|
+
function gn() {
|
|
598
610
|
const t = [], e = {};
|
|
599
|
-
let
|
|
600
|
-
const
|
|
611
|
+
let n = !1;
|
|
612
|
+
const r = (i, a) => {
|
|
601
613
|
let s = "";
|
|
602
614
|
try {
|
|
603
|
-
s =
|
|
615
|
+
s = a.map((l) => l instanceof Error ? l.stack || l.message : typeof l == "string" ? l : JSON.stringify(l)).join(" ");
|
|
604
616
|
} catch {
|
|
605
|
-
s = String(
|
|
617
|
+
s = String(a[0]);
|
|
606
618
|
}
|
|
607
619
|
t.push({
|
|
608
|
-
level:
|
|
620
|
+
level: i,
|
|
609
621
|
text: s.slice(0, 2e3),
|
|
610
622
|
at: Date.now()
|
|
611
|
-
}), t.length >
|
|
623
|
+
}), t.length > yn && t.shift();
|
|
612
624
|
};
|
|
613
625
|
return {
|
|
614
626
|
hook: () => {
|
|
615
|
-
|
|
616
|
-
e[
|
|
617
|
-
|
|
627
|
+
n || typeof window > "u" || (n = !0, ["log", "info", "warn", "error"].forEach((i) => {
|
|
628
|
+
e[i] = console[i].bind(console), console[i] = (...a) => {
|
|
629
|
+
r(i, a), e[i](...a);
|
|
618
630
|
};
|
|
619
|
-
}), window.addEventListener("error", (
|
|
620
|
-
|
|
621
|
-
}), window.addEventListener("unhandledrejection", (
|
|
622
|
-
|
|
631
|
+
}), window.addEventListener("error", (i) => {
|
|
632
|
+
r("error", [i.message || "window.error"]);
|
|
633
|
+
}), window.addEventListener("unhandledrejection", (i) => {
|
|
634
|
+
r("error", [i.reason || "unhandledrejection"]);
|
|
623
635
|
}));
|
|
624
636
|
},
|
|
625
637
|
snapshot() {
|
|
@@ -627,13 +639,13 @@ function fn() {
|
|
|
627
639
|
}
|
|
628
640
|
};
|
|
629
641
|
}
|
|
630
|
-
function
|
|
642
|
+
function wn(t) {
|
|
631
643
|
const e = window.SpeechRecognition || window.webkitSpeechRecognition;
|
|
632
|
-
let
|
|
633
|
-
const
|
|
634
|
-
if (
|
|
644
|
+
let n = null, r = !1;
|
|
645
|
+
const o = () => {
|
|
646
|
+
if (r = !1, n)
|
|
635
647
|
try {
|
|
636
|
-
|
|
648
|
+
n.stop();
|
|
637
649
|
} catch {
|
|
638
650
|
}
|
|
639
651
|
};
|
|
@@ -641,59 +653,59 @@ function hn(t) {
|
|
|
641
653
|
start: () => {
|
|
642
654
|
if (!e)
|
|
643
655
|
throw new Error("Speech recognition is not supported in this browser.");
|
|
644
|
-
return
|
|
656
|
+
return r ? (o(), !1) : (n = new e(), n.continuous = !0, n.interimResults = !0, n.lang = navigator.language || "en-US", n.onresult = (a) => {
|
|
645
657
|
let s = "";
|
|
646
|
-
for (let l =
|
|
647
|
-
|
|
658
|
+
for (let l = a.resultIndex; l < a.results.length; l += 1)
|
|
659
|
+
a.results[l].isFinal && (s += a.results[l][0].transcript);
|
|
648
660
|
s && t(s);
|
|
649
|
-
},
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
|
|
653
|
-
},
|
|
661
|
+
}, n.onerror = () => {
|
|
662
|
+
r = !1;
|
|
663
|
+
}, n.onend = () => {
|
|
664
|
+
r = !1;
|
|
665
|
+
}, n.start(), r = !0, !0);
|
|
654
666
|
},
|
|
655
|
-
stop:
|
|
667
|
+
stop: o,
|
|
656
668
|
isSupported: () => !!e,
|
|
657
|
-
isActive: () =>
|
|
669
|
+
isActive: () => r
|
|
658
670
|
};
|
|
659
671
|
}
|
|
660
|
-
const
|
|
661
|
-
function
|
|
662
|
-
let
|
|
672
|
+
const bn = 60 * 1e3;
|
|
673
|
+
function vn({ onStart: t, onStop: e, onError: n }) {
|
|
674
|
+
let r = null, o = null, i = [], a = null;
|
|
663
675
|
const s = () => {
|
|
664
|
-
if (
|
|
676
|
+
if (a && (clearTimeout(a), a = null), o && o.state !== "inactive")
|
|
665
677
|
try {
|
|
666
|
-
|
|
678
|
+
o.stop();
|
|
667
679
|
} catch {
|
|
668
680
|
}
|
|
669
|
-
|
|
681
|
+
r && (r.getTracks().forEach((d) => d.stop()), r = null);
|
|
670
682
|
}, l = () => {
|
|
671
|
-
if (
|
|
672
|
-
|
|
683
|
+
if (o && o.state === "recording") {
|
|
684
|
+
o.stop();
|
|
673
685
|
return;
|
|
674
686
|
}
|
|
675
687
|
s(), e(null);
|
|
676
688
|
};
|
|
677
689
|
return { start: async () => {
|
|
678
|
-
var
|
|
679
|
-
if (!((
|
|
690
|
+
var d, p;
|
|
691
|
+
if (!((d = navigator.mediaDevices) != null && d.getDisplayMedia))
|
|
680
692
|
throw new Error("Screen recording is not supported in this browser.");
|
|
681
|
-
|
|
693
|
+
r = await navigator.mediaDevices.getDisplayMedia({
|
|
682
694
|
video: { displaySurface: "browser" },
|
|
683
695
|
audio: !1,
|
|
684
696
|
preferCurrentTab: !0,
|
|
685
697
|
selfBrowserSurface: "include"
|
|
686
|
-
}),
|
|
698
|
+
}), i = [], o = new MediaRecorder(r, {
|
|
687
699
|
mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm"
|
|
688
|
-
}),
|
|
689
|
-
|
|
690
|
-
},
|
|
691
|
-
const
|
|
692
|
-
s(), e(
|
|
693
|
-
}, (p =
|
|
700
|
+
}), o.ondataavailable = (m) => {
|
|
701
|
+
m.data && m.data.size && i.push(m.data);
|
|
702
|
+
}, o.onstop = () => {
|
|
703
|
+
const m = i.length ? new Blob(i, { type: o.mimeType || "video/webm" }) : null;
|
|
704
|
+
s(), e(m);
|
|
705
|
+
}, (p = r.getVideoTracks()[0]) == null || p.addEventListener("ended", () => l()), o.start(), a = setTimeout(l, bn);
|
|
694
706
|
}, stop: l };
|
|
695
707
|
}
|
|
696
|
-
function
|
|
708
|
+
function Sn() {
|
|
697
709
|
const t = /* @__PURE__ */ new Set();
|
|
698
710
|
return {
|
|
699
711
|
alloc() {
|
|
@@ -703,178 +715,233 @@ function yn() {
|
|
|
703
715
|
return t.add(e), e;
|
|
704
716
|
},
|
|
705
717
|
free(e) {
|
|
706
|
-
const
|
|
707
|
-
Number.isInteger(
|
|
718
|
+
const n = Number(e);
|
|
719
|
+
Number.isInteger(n) && n > 0 && t.delete(n);
|
|
708
720
|
},
|
|
709
721
|
peekUsed() {
|
|
710
|
-
return [...t].sort((e,
|
|
722
|
+
return [...t].sort((e, n) => e - n);
|
|
711
723
|
}
|
|
712
724
|
};
|
|
713
725
|
}
|
|
714
|
-
const
|
|
715
|
-
function
|
|
716
|
-
const t =
|
|
717
|
-
let e = [],
|
|
726
|
+
const ct = { x: 0, y: 0, w: 1, h: 1 };
|
|
727
|
+
function Zt() {
|
|
728
|
+
const t = Sn();
|
|
729
|
+
let e = [], n = { ...ct }, r = 1;
|
|
718
730
|
return {
|
|
719
|
-
list: () => e.filter((
|
|
731
|
+
list: () => e.filter((i) => En(i, n)),
|
|
720
732
|
all: () => e.slice(),
|
|
721
|
-
crop: () => ({ ...
|
|
722
|
-
setCrop(
|
|
723
|
-
return
|
|
733
|
+
crop: () => ({ ...n }),
|
|
734
|
+
setCrop(i) {
|
|
735
|
+
return n = xn(i), n;
|
|
724
736
|
},
|
|
725
737
|
resetCrop() {
|
|
726
|
-
return
|
|
738
|
+
return n = { ...ct }, n;
|
|
727
739
|
},
|
|
728
740
|
isCropped() {
|
|
729
|
-
return
|
|
741
|
+
return n.x > 1e-6 || n.y > 1e-6 || n.w < 1 - 1e-6 || n.h < 1 - 1e-6;
|
|
730
742
|
},
|
|
731
|
-
add(
|
|
743
|
+
add(i, a) {
|
|
732
744
|
const s = {
|
|
733
|
-
id: `s${
|
|
734
|
-
type:
|
|
745
|
+
id: `s${r++}`,
|
|
746
|
+
type: i,
|
|
735
747
|
number: t.alloc(),
|
|
736
748
|
x: 0.2,
|
|
737
749
|
y: 0.2,
|
|
738
|
-
w:
|
|
739
|
-
h:
|
|
750
|
+
w: i === "arrow" ? 0.2 : 0.22,
|
|
751
|
+
h: i === "arrow" ? 0.05 : 0.16,
|
|
740
752
|
x2: 0.4,
|
|
741
753
|
y2: 0.28,
|
|
742
|
-
...
|
|
754
|
+
...a
|
|
743
755
|
};
|
|
744
756
|
return e.push(s), s;
|
|
745
757
|
},
|
|
746
|
-
update(
|
|
747
|
-
const s = e.find((l) => l.id ===
|
|
748
|
-
return s ? (Object.assign(s,
|
|
758
|
+
update(i, a) {
|
|
759
|
+
const s = e.find((l) => l.id === i);
|
|
760
|
+
return s ? (Object.assign(s, a), s) : null;
|
|
749
761
|
},
|
|
750
|
-
remove(
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
762
|
+
remove(i) {
|
|
763
|
+
const a = e.findIndex((l) => l.id === i);
|
|
764
|
+
if (a < 0)
|
|
753
765
|
return null;
|
|
754
|
-
const [s] = e.splice(
|
|
766
|
+
const [s] = e.splice(a, 1);
|
|
755
767
|
return t.free(s.number), s;
|
|
756
768
|
},
|
|
757
769
|
reset() {
|
|
758
|
-
for (e = [],
|
|
770
|
+
for (e = [], n = { ...ct }, r = 1; t.peekUsed().length; )
|
|
759
771
|
t.free(t.peekUsed()[0]);
|
|
760
772
|
}
|
|
761
773
|
};
|
|
762
774
|
}
|
|
763
|
-
function
|
|
764
|
-
const e = Math.min(Math.max(t.x, 0), 0.95),
|
|
765
|
-
return { x: e, y:
|
|
766
|
-
}
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
return
|
|
770
|
-
}
|
|
771
|
-
function
|
|
772
|
-
const
|
|
773
|
-
return
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
const T = dt(m.x, e, p), k = ft(m.y, e, g), A = m.w / e.w * p, U = m.h / e.h * g;
|
|
781
|
-
if (m.type === "rect")
|
|
782
|
-
f.strokeRect(T, k, A, U);
|
|
783
|
-
else if (m.type === "circle")
|
|
784
|
-
f.beginPath(), f.ellipse(T + A / 2, k + U / 2, A / 2, U / 2, 0, 0, Math.PI * 2), f.stroke();
|
|
785
|
-
else if (m.type === "arrow") {
|
|
786
|
-
const se = dt(m.x2 ?? m.x + m.w, e, p), ce = ft(m.y2 ?? m.y, e, g);
|
|
787
|
-
xn(f, T, k, se, ce);
|
|
788
|
-
}
|
|
789
|
-
const B = vn(m, e, p, g, T, k, A), I = String(m.number);
|
|
790
|
-
f.beginPath(), f.arc(B.x, B.y, 11, 0, Math.PI * 2), f.fill(), f.fillStyle = a, f.textAlign = "center", f.textBaseline = "middle", f.fillText(I, B.x, B.y), f.fillStyle = i;
|
|
791
|
-
}), P.toBlob((m) => {
|
|
792
|
-
if (!m) {
|
|
793
|
-
s(new Error("Could not encode screenshot"));
|
|
794
|
-
return;
|
|
795
|
-
}
|
|
796
|
-
o(m);
|
|
797
|
-
}, "image/png");
|
|
798
|
-
}, l.onerror = () => s(new Error("Could not load screenshot")), l.src = t;
|
|
799
|
-
});
|
|
775
|
+
function xn(t) {
|
|
776
|
+
const e = Math.min(Math.max(t.x, 0), 0.95), n = Math.min(Math.max(t.y, 0), 0.95), r = Math.min(Math.max(t.w, 0.05), 1 - e), o = Math.min(Math.max(t.h, 0.05), 1 - n);
|
|
777
|
+
return { x: e, y: n, w: r, h: o };
|
|
778
|
+
}
|
|
779
|
+
function En(t, e) {
|
|
780
|
+
const n = t.type === "arrow" ? (t.x + (t.x2 ?? t.x)) / 2 : t.x + (t.w || 0) / 2, r = t.type === "arrow" ? (t.y + (t.y2 ?? t.y)) / 2 : t.y + (t.h || 0) / 2;
|
|
781
|
+
return n >= e.x && r >= e.y && n <= e.x + e.w && r <= e.y + e.h;
|
|
782
|
+
}
|
|
783
|
+
function Et(t) {
|
|
784
|
+
const e = Math.max(1, Number(t) || 1);
|
|
785
|
+
return {
|
|
786
|
+
stroke: Math.max(2, e * 75e-4),
|
|
787
|
+
badgeRadius: Math.max(8, e * 0.025),
|
|
788
|
+
fontSize: Math.max(10, e * 0.0275),
|
|
789
|
+
arrowHead: Math.max(8, e * 0.035),
|
|
790
|
+
arrowHeadAngle: 0.4
|
|
791
|
+
};
|
|
800
792
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
793
|
+
function Cn(t, {
|
|
794
|
+
stickers: e = [],
|
|
795
|
+
crop: n = { x: 0, y: 0, w: 1, h: 1 },
|
|
796
|
+
width: r,
|
|
797
|
+
height: o,
|
|
798
|
+
colors: i = {}
|
|
799
|
+
}) {
|
|
800
|
+
const a = i.mark || "#fdd341", s = i.markText || "#2a2140", l = Et(r);
|
|
801
|
+
t.save(), t.lineWidth = l.stroke, t.lineCap = "round", t.lineJoin = "round", t.strokeStyle = a, t.fillStyle = a, t.font = `700 ${Math.round(l.fontSize)}px ui-sans-serif, system-ui, sans-serif`, e.forEach((u) => {
|
|
802
|
+
const d = ft(u.x, n, r), p = ht(u.y, n, o), m = u.w / n.w * r, C = u.h / n.h * o, L = l.stroke / 2;
|
|
803
|
+
if (u.type === "rect")
|
|
804
|
+
t.strokeRect(
|
|
805
|
+
d + L,
|
|
806
|
+
p + L,
|
|
807
|
+
Math.max(0, m - l.stroke),
|
|
808
|
+
Math.max(0, C - l.stroke)
|
|
809
|
+
);
|
|
810
|
+
else if (u.type === "circle")
|
|
811
|
+
t.beginPath(), t.ellipse(
|
|
812
|
+
d + m / 2,
|
|
813
|
+
p + C / 2,
|
|
814
|
+
Math.max(0.5, m / 2 - L),
|
|
815
|
+
Math.max(0.5, C / 2 - L),
|
|
816
|
+
0,
|
|
817
|
+
0,
|
|
818
|
+
Math.PI * 2
|
|
819
|
+
), t.stroke();
|
|
820
|
+
else if (u.type === "arrow") {
|
|
821
|
+
const F = ft(u.x2 ?? u.x + u.w, n, r), j = ht(u.y2 ?? u.y, n, o);
|
|
822
|
+
Ln(t, d, p, F, j, l);
|
|
823
|
+
}
|
|
824
|
+
if (u.number == null || u.number === "")
|
|
825
|
+
return;
|
|
826
|
+
const P = Mn(u, n, r, o, d, p, m), V = String(u.number);
|
|
827
|
+
t.beginPath(), t.arc(P.x, P.y, l.badgeRadius, 0, Math.PI * 2), t.fillStyle = a, t.fill(), t.fillStyle = s, t.textAlign = "center", t.textBaseline = "middle", t.fillText(V, P.x, P.y + 0.5), t.fillStyle = a;
|
|
828
|
+
}), t.restore();
|
|
829
|
+
}
|
|
830
|
+
function ft(t, e, n) {
|
|
831
|
+
return (t - e.x) / e.w * n;
|
|
803
832
|
}
|
|
804
|
-
function
|
|
805
|
-
return (t - e.y) / e.h *
|
|
833
|
+
function ht(t, e, n) {
|
|
834
|
+
return (t - e.y) / e.h * n;
|
|
806
835
|
}
|
|
807
|
-
function
|
|
836
|
+
function Mn(t, e, n, r, o, i, a) {
|
|
808
837
|
if (t.type === "arrow") {
|
|
809
|
-
const s =
|
|
838
|
+
const s = ft(t.x2 ?? t.x + t.w, e, n), l = ht(t.y2 ?? t.y, e, r);
|
|
810
839
|
return {
|
|
811
|
-
x: (
|
|
812
|
-
y: (
|
|
840
|
+
x: (o + s) / 2,
|
|
841
|
+
y: (i + l) / 2
|
|
813
842
|
};
|
|
814
843
|
}
|
|
815
|
-
return { x:
|
|
816
|
-
}
|
|
817
|
-
function
|
|
818
|
-
const
|
|
819
|
-
|
|
844
|
+
return { x: o + a / 2, y: i };
|
|
845
|
+
}
|
|
846
|
+
function te(t, e, n, r, o) {
|
|
847
|
+
const i = Math.atan2(r - e, n - t), a = o.arrowHead, s = Math.min(o.stroke, a * 0.2), l = n, u = r, d = n - Math.cos(i) * a, p = r - Math.sin(i) * a, m = {
|
|
848
|
+
x: l - a * Math.cos(i - o.arrowHeadAngle),
|
|
849
|
+
y: u - a * Math.sin(i - o.arrowHeadAngle)
|
|
850
|
+
}, C = {
|
|
851
|
+
x: l - a * Math.cos(i + o.arrowHeadAngle),
|
|
852
|
+
y: u - a * Math.sin(i + o.arrowHeadAngle)
|
|
853
|
+
}, L = {
|
|
854
|
+
x: n - Math.cos(i) * s,
|
|
855
|
+
y: r - Math.sin(i) * s
|
|
856
|
+
};
|
|
857
|
+
return { angle: i, tipX: l, tipY: u, baseX: d, baseY: p, left: m, right: C, shaftEnd: L };
|
|
858
|
+
}
|
|
859
|
+
function Ln(t, e, n, r, o, i) {
|
|
860
|
+
const a = te(e, n, r, o, i);
|
|
861
|
+
t.beginPath(), t.moveTo(e, n), t.lineTo(a.shaftEnd.x, a.shaftEnd.y), t.stroke(), t.beginPath(), t.moveTo(a.tipX, a.tipY), t.lineTo(a.left.x, a.left.y), t.lineTo(a.right.x, a.right.y), t.closePath(), t.fill();
|
|
862
|
+
}
|
|
863
|
+
function $n(t, e, n, r = {}) {
|
|
864
|
+
return new Promise((o, i) => {
|
|
865
|
+
const a = new Image();
|
|
866
|
+
a.onload = () => {
|
|
867
|
+
const s = Math.round(e.x * a.width), l = Math.round(e.y * a.height), u = Math.max(1, Math.round(e.w * a.width)), d = Math.max(1, Math.round(e.h * a.height)), p = document.createElement("canvas");
|
|
868
|
+
p.width = u, p.height = d;
|
|
869
|
+
const m = p.getContext("2d");
|
|
870
|
+
m.drawImage(a, s, l, u, d, 0, 0, u, d), Cn(m, {
|
|
871
|
+
stickers: n,
|
|
872
|
+
crop: e,
|
|
873
|
+
width: u,
|
|
874
|
+
height: d,
|
|
875
|
+
colors: r
|
|
876
|
+
}), p.toBlob((C) => {
|
|
877
|
+
if (!C) {
|
|
878
|
+
i(new Error("Could not encode screenshot"));
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
o(C);
|
|
882
|
+
}, "image/png");
|
|
883
|
+
}, a.onerror = () => i(new Error("Could not load screenshot")), a.src = t;
|
|
884
|
+
});
|
|
820
885
|
}
|
|
821
|
-
const
|
|
886
|
+
const Rn = ["bug", "idea", "other"], Pn = ["maker", "all-business", "brighter-day", "quiet-night"], ee = "maker", An = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), pt = 0.02, jt = 0.05, Tn = `
|
|
822
887
|
<svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
|
|
823
888
|
<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"/>
|
|
824
889
|
<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"/>
|
|
825
890
|
</svg>
|
|
826
891
|
`;
|
|
827
|
-
function
|
|
892
|
+
function T(t) {
|
|
828
893
|
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>`;
|
|
829
894
|
}
|
|
830
|
-
const
|
|
831
|
-
crop:
|
|
832
|
-
resetCrop:
|
|
833
|
-
arrow:
|
|
834
|
-
rect:
|
|
835
|
-
circle:
|
|
836
|
-
discard:
|
|
837
|
-
audio:
|
|
838
|
-
video:
|
|
839
|
-
},
|
|
840
|
-
|
|
841
|
-
|
|
895
|
+
const k = {
|
|
896
|
+
crop: T('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
|
|
897
|
+
resetCrop: T('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
|
|
898
|
+
arrow: T('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
|
|
899
|
+
rect: T('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
|
|
900
|
+
circle: T('<circle cx="12" cy="12" r="8"/>'),
|
|
901
|
+
discard: T('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
|
|
902
|
+
audio: T('<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"/>'),
|
|
903
|
+
video: T('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>')
|
|
904
|
+
}, ne = gn();
|
|
905
|
+
ne.hook();
|
|
906
|
+
const re = 10, kn = 80;
|
|
907
|
+
let f = {
|
|
842
908
|
endpoint: "",
|
|
843
909
|
projectKey: "",
|
|
844
910
|
version: "0.0.0",
|
|
845
911
|
name: "",
|
|
846
912
|
targets: null,
|
|
847
913
|
hideLauncher: !1,
|
|
848
|
-
theme:
|
|
849
|
-
video: !1
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
914
|
+
theme: ee,
|
|
915
|
+
video: !1,
|
|
916
|
+
consoleLogLimit: re
|
|
917
|
+
}, mt = {}, h = null, c = {}, y = Zt(), S = "", W = "", R = null, J = "bug", O = null, $ = null, w = null, g = null, X = null, D = null, N = null, I = { w: 0, h: 0 }, lt = !1;
|
|
918
|
+
function v(t) {
|
|
919
|
+
return h.querySelector(t);
|
|
920
|
+
}
|
|
921
|
+
function ie(t) {
|
|
855
922
|
const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
856
|
-
return
|
|
923
|
+
return Pn.includes(e) ? e : ee;
|
|
857
924
|
}
|
|
858
|
-
function
|
|
859
|
-
return
|
|
925
|
+
function Ut(t, e) {
|
|
926
|
+
return h && getComputedStyle(h).getPropertyValue(t).trim() || e;
|
|
860
927
|
}
|
|
861
|
-
function
|
|
862
|
-
c.status && (c.status.textContent = t || "",
|
|
928
|
+
function b(t, e = !1) {
|
|
929
|
+
c.status && (c.status.textContent = t || "", X && (clearTimeout(X), X = null), t && !e && (X = setTimeout(() => {
|
|
863
930
|
c.status.textContent = "";
|
|
864
931
|
}, 4e3)));
|
|
865
932
|
}
|
|
866
|
-
function
|
|
867
|
-
return
|
|
868
|
-
<button class="nf-launcher" type="button" title="Leave a note…" aria-label="Leave a note…">${
|
|
933
|
+
function Ct() {
|
|
934
|
+
return h && document.body.contains(h) || (h = document.createElement("div"), h.id = "notefully", h.innerHTML = `
|
|
935
|
+
<button class="nf-launcher" type="button" title="Leave a note…" aria-label="Leave a note…">${Tn}</button>
|
|
869
936
|
<div class="nf-dialog" hidden>
|
|
870
937
|
<div class="nf-panel">
|
|
871
938
|
<div class="nf-stage">
|
|
872
939
|
<div class="nf-palette">
|
|
873
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="crop" title="Crop" aria-label="Crop">${
|
|
874
|
-
<button class="nf-reset-crop nf-icon-btn" type="button" title="Reset crop" aria-label="Reset crop" hidden>${
|
|
875
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" title="Arrow" aria-label="Arrow">${
|
|
876
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="rect" title="Rectangle" aria-label="Rectangle">${
|
|
877
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="circle" title="Circle" aria-label="Circle">${
|
|
940
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="crop" title="Crop" aria-label="Crop">${k.crop}</button>
|
|
941
|
+
<button class="nf-reset-crop nf-icon-btn" type="button" title="Reset crop" aria-label="Reset crop" hidden>${k.resetCrop}</button>
|
|
942
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" title="Arrow" aria-label="Arrow">${k.arrow}</button>
|
|
943
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="rect" title="Rectangle" aria-label="Rectangle">${k.rect}</button>
|
|
944
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="circle" title="Circle" aria-label="Circle">${k.circle}</button>
|
|
878
945
|
</div>
|
|
879
946
|
<div class="nf-canvas"></div>
|
|
880
947
|
</div>
|
|
@@ -885,9 +952,9 @@ function St() {
|
|
|
885
952
|
<button type="button" data-kind="other">Other</button>
|
|
886
953
|
</div>
|
|
887
954
|
<div class="nf-actions">
|
|
888
|
-
<button class="nf-discard-shot nf-icon-btn" type="button" title="Discard screenshot" aria-label="Discard screenshot">${
|
|
889
|
-
<button class="nf-audio nf-icon-btn" type="button" title="Record audio" aria-label="Record audio">${
|
|
890
|
-
<button class="nf-video nf-icon-btn" type="button" title="Record video" aria-label="Record video">${
|
|
955
|
+
<button class="nf-discard-shot nf-icon-btn" type="button" title="Discard screenshot" aria-label="Discard screenshot">${k.discard}</button>
|
|
956
|
+
<button class="nf-audio nf-icon-btn" type="button" title="Record audio" aria-label="Record audio">${k.audio}</button>
|
|
957
|
+
<button class="nf-video nf-icon-btn" type="button" title="Record video" aria-label="Record video">${k.video}</button>
|
|
891
958
|
<button class="nf-submit" type="button">Submit</button>
|
|
892
959
|
</div>
|
|
893
960
|
<button class="nf-restore" type="button" hidden>Restore screenshot</button>
|
|
@@ -895,313 +962,313 @@ function St() {
|
|
|
895
962
|
</div>
|
|
896
963
|
</div>
|
|
897
964
|
<button class="nf-stop-video" type="button" hidden>Stop</button>
|
|
898
|
-
`, document.body.appendChild(
|
|
899
|
-
launcher:
|
|
900
|
-
dialog:
|
|
901
|
-
stage:
|
|
902
|
-
canvas:
|
|
903
|
-
text:
|
|
904
|
-
restore:
|
|
905
|
-
status:
|
|
906
|
-
audio:
|
|
907
|
-
video:
|
|
908
|
-
discard:
|
|
909
|
-
stop:
|
|
910
|
-
resetCrop:
|
|
911
|
-
submit:
|
|
965
|
+
`, document.body.appendChild(h), c = {
|
|
966
|
+
launcher: v(".nf-launcher"),
|
|
967
|
+
dialog: v(".nf-dialog"),
|
|
968
|
+
stage: v(".nf-stage"),
|
|
969
|
+
canvas: v(".nf-canvas"),
|
|
970
|
+
text: v(".nf-text"),
|
|
971
|
+
restore: v(".nf-restore"),
|
|
972
|
+
status: v(".nf-status"),
|
|
973
|
+
audio: v(".nf-audio"),
|
|
974
|
+
video: v(".nf-video"),
|
|
975
|
+
discard: v(".nf-discard-shot"),
|
|
976
|
+
stop: v(".nf-stop-video"),
|
|
977
|
+
resetCrop: v(".nf-reset-crop"),
|
|
978
|
+
submit: v(".nf-submit"),
|
|
912
979
|
shot: null
|
|
913
|
-
},
|
|
980
|
+
}, In(), nt()), h;
|
|
914
981
|
}
|
|
915
982
|
function nt() {
|
|
916
983
|
var t;
|
|
917
|
-
|
|
918
|
-
}
|
|
919
|
-
function
|
|
920
|
-
c.launcher && (c.launcher.hidden = !!
|
|
921
|
-
}
|
|
922
|
-
function
|
|
923
|
-
c.launcher.addEventListener("click", () =>
|
|
924
|
-
t.target === c.dialog &&
|
|
925
|
-
}),
|
|
926
|
-
t.addEventListener("click", () =>
|
|
927
|
-
}), c.resetCrop.addEventListener("click",
|
|
928
|
-
t.addEventListener("click", () =>
|
|
929
|
-
}), c.discard.addEventListener("click",
|
|
930
|
-
|
|
931
|
-
}),
|
|
932
|
-
}
|
|
933
|
-
function
|
|
934
|
-
J =
|
|
984
|
+
h && (h.dataset.theme = ie(f.theme), f.hideLauncher ? h.setAttribute("data-nf-hidden-launcher", "") : h.removeAttribute("data-nf-hidden-launcher"), c.video && (c.video.hidden = !f.video), (t = c.dialog) != null && t.hidden && Q());
|
|
985
|
+
}
|
|
986
|
+
function Q() {
|
|
987
|
+
c.launcher && (c.launcher.hidden = !!f.hideLauncher);
|
|
988
|
+
}
|
|
989
|
+
function In() {
|
|
990
|
+
c.launcher.addEventListener("click", () => le()), v(".nf-dialog").addEventListener("click", (t) => {
|
|
991
|
+
t.target === c.dialog && it();
|
|
992
|
+
}), h.querySelectorAll(".nf-tool").forEach((t) => {
|
|
993
|
+
t.addEventListener("click", () => gt(t.dataset.tool));
|
|
994
|
+
}), c.resetCrop.addEventListener("click", _n), c.canvas.addEventListener("pointerdown", Hn), c.canvas.addEventListener("dragstart", (t) => t.preventDefault()), h.querySelectorAll("[data-kind]").forEach((t) => {
|
|
995
|
+
t.addEventListener("click", () => yt(t.dataset.kind));
|
|
996
|
+
}), c.discard.addEventListener("click", Bn), c.restore.addEventListener("click", Vn), c.audio.addEventListener("click", Nn), c.video.addEventListener("click", Wn), c.stop.addEventListener("click", () => N == null ? void 0 : N.stop()), v(".nf-submit").addEventListener("click", () => {
|
|
997
|
+
ue().catch((t) => b(t.message || "Submit failed."));
|
|
998
|
+
}), yt("bug"), gt(null);
|
|
999
|
+
}
|
|
1000
|
+
function yt(t) {
|
|
1001
|
+
J = Rn.includes(t) ? t : "bug", h.querySelectorAll("[data-kind]").forEach((e) => {
|
|
935
1002
|
e.dataset.active = String(e.dataset.kind === J);
|
|
936
1003
|
});
|
|
937
1004
|
}
|
|
938
|
-
function
|
|
939
|
-
|
|
940
|
-
e.dataset.active = String(e.dataset.tool ===
|
|
941
|
-
}), c.canvas && (c.canvas.dataset.draw =
|
|
1005
|
+
function gt(t) {
|
|
1006
|
+
O = An.has(t) ? t : null, $ = null, h.querySelectorAll(".nf-tool").forEach((e) => {
|
|
1007
|
+
e.dataset.active = String(e.dataset.tool === O);
|
|
1008
|
+
}), c.canvas && (c.canvas.dataset.draw = O ? "true" : "false"), S && M();
|
|
942
1009
|
}
|
|
943
|
-
function
|
|
1010
|
+
function _t(t) {
|
|
944
1011
|
return Math.min(1, Math.max(0, t));
|
|
945
1012
|
}
|
|
946
|
-
function
|
|
1013
|
+
function q() {
|
|
947
1014
|
return c.shot || c.canvas;
|
|
948
1015
|
}
|
|
949
|
-
function
|
|
950
|
-
const e =
|
|
1016
|
+
function Z(t) {
|
|
1017
|
+
const e = q().getBoundingClientRect();
|
|
951
1018
|
return {
|
|
952
|
-
x:
|
|
953
|
-
y:
|
|
1019
|
+
x: _t((t.clientX - e.left) / Math.max(e.width, 1)),
|
|
1020
|
+
y: _t((t.clientY - e.top) / Math.max(e.height, 1))
|
|
954
1021
|
};
|
|
955
1022
|
}
|
|
956
|
-
function
|
|
957
|
-
const e =
|
|
1023
|
+
function On(t) {
|
|
1024
|
+
const e = q().getBoundingClientRect();
|
|
958
1025
|
return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
|
|
959
1026
|
}
|
|
960
|
-
function
|
|
961
|
-
const e =
|
|
1027
|
+
function oe(t) {
|
|
1028
|
+
const e = Z(t), n = y.crop();
|
|
962
1029
|
return {
|
|
963
|
-
x:
|
|
964
|
-
y:
|
|
1030
|
+
x: n.x + e.x * n.w,
|
|
1031
|
+
y: n.y + e.y * n.h
|
|
965
1032
|
};
|
|
966
1033
|
}
|
|
967
|
-
function
|
|
968
|
-
const
|
|
1034
|
+
function rt(t, e) {
|
|
1035
|
+
const n = Math.min(t.x, e.x), r = Math.min(t.y, e.y);
|
|
969
1036
|
return {
|
|
970
|
-
x:
|
|
971
|
-
y:
|
|
972
|
-
w: Math.max(
|
|
973
|
-
h: Math.max(
|
|
1037
|
+
x: n,
|
|
1038
|
+
y: r,
|
|
1039
|
+
w: Math.max(pt, Math.abs(e.x - t.x)),
|
|
1040
|
+
h: Math.max(pt, Math.abs(e.y - t.y))
|
|
974
1041
|
};
|
|
975
1042
|
}
|
|
976
|
-
function
|
|
977
|
-
|
|
1043
|
+
function Mt(t) {
|
|
1044
|
+
h && (t ? h.dataset.grabbing = "true" : delete h.dataset.grabbing);
|
|
978
1045
|
}
|
|
979
|
-
function
|
|
1046
|
+
function ut(t) {
|
|
980
1047
|
try {
|
|
981
1048
|
c.canvas.setPointerCapture(t.pointerId);
|
|
982
1049
|
} catch {
|
|
983
1050
|
}
|
|
984
1051
|
}
|
|
985
|
-
function
|
|
986
|
-
window.addEventListener("pointermove",
|
|
1052
|
+
function wt() {
|
|
1053
|
+
window.addEventListener("pointermove", se), window.addEventListener("pointerup", tt), window.addEventListener("pointercancel", tt);
|
|
987
1054
|
}
|
|
988
|
-
function
|
|
989
|
-
window.removeEventListener("pointermove",
|
|
1055
|
+
function ae() {
|
|
1056
|
+
window.removeEventListener("pointermove", se), window.removeEventListener("pointerup", tt), window.removeEventListener("pointercancel", tt);
|
|
990
1057
|
}
|
|
991
|
-
function
|
|
992
|
-
if (t.button !== 0 || !
|
|
1058
|
+
function Hn(t) {
|
|
1059
|
+
if (t.button !== 0 || !S)
|
|
993
1060
|
return;
|
|
994
|
-
if (!t.target.closest(".nf-sticker") && !
|
|
995
|
-
|
|
1061
|
+
if (!t.target.closest(".nf-sticker") && !On(t)) {
|
|
1062
|
+
$ = null, M();
|
|
996
1063
|
return;
|
|
997
1064
|
}
|
|
998
|
-
const e = t.target.closest(".nf-handle"),
|
|
999
|
-
if (
|
|
1000
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1065
|
+
const e = t.target.closest(".nf-handle"), n = t.target.closest(".nf-sticker");
|
|
1066
|
+
if (n && n.dataset.preview !== "true") {
|
|
1067
|
+
t.preventDefault(), t.stopPropagation(), $ = n.dataset.id, ut(t), Dn({
|
|
1001
1068
|
kind: "sticker",
|
|
1002
|
-
id:
|
|
1069
|
+
id: $,
|
|
1003
1070
|
dir: (e == null ? void 0 : e.dataset.dir) || "move"
|
|
1004
|
-
}, t),
|
|
1071
|
+
}, t), M();
|
|
1005
1072
|
return;
|
|
1006
1073
|
}
|
|
1007
|
-
if (
|
|
1008
|
-
t.preventDefault(),
|
|
1074
|
+
if ($ = null, O === "crop") {
|
|
1075
|
+
t.preventDefault(), ut(t), w = { kind: "crop", start: Z(t), current: Z(t) }, wt(), M();
|
|
1009
1076
|
return;
|
|
1010
1077
|
}
|
|
1011
|
-
if (
|
|
1012
|
-
t.preventDefault(),
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1078
|
+
if (O === "arrow" || O === "rect" || O === "circle") {
|
|
1079
|
+
t.preventDefault(), ut(t);
|
|
1080
|
+
const r = oe(t);
|
|
1081
|
+
w = { kind: "sticker", type: O, start: r, current: r }, wt(), M();
|
|
1015
1082
|
return;
|
|
1016
1083
|
}
|
|
1017
|
-
|
|
1084
|
+
M();
|
|
1018
1085
|
}
|
|
1019
|
-
function
|
|
1086
|
+
function Dn(t, e) {
|
|
1020
1087
|
e.preventDefault(), e.stopPropagation();
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1088
|
+
const n = q().getBoundingClientRect(), r = y.list().find((o) => o.id === t.id);
|
|
1089
|
+
g = {
|
|
1023
1090
|
...t,
|
|
1024
1091
|
startX: e.clientX,
|
|
1025
1092
|
startY: e.clientY,
|
|
1026
|
-
crop:
|
|
1027
|
-
sticker:
|
|
1028
|
-
rect:
|
|
1029
|
-
},
|
|
1030
|
-
}
|
|
1031
|
-
function
|
|
1032
|
-
if (
|
|
1033
|
-
|
|
1093
|
+
crop: y.crop(),
|
|
1094
|
+
sticker: r ? { ...r } : null,
|
|
1095
|
+
rect: n
|
|
1096
|
+
}, Mt(t.dir === "move" || t.dir === "start" || t.dir === "end"), wt();
|
|
1097
|
+
}
|
|
1098
|
+
function se(t) {
|
|
1099
|
+
if (w) {
|
|
1100
|
+
w.current = w.kind === "crop" ? Z(t) : oe(t), M();
|
|
1034
1101
|
return;
|
|
1035
1102
|
}
|
|
1036
|
-
if (!
|
|
1103
|
+
if (!g)
|
|
1037
1104
|
return;
|
|
1038
|
-
const e = (t.clientX -
|
|
1039
|
-
if (
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
x2:
|
|
1043
|
-
y2:
|
|
1105
|
+
const e = (t.clientX - g.startX) / g.rect.width * g.crop.w, n = (t.clientY - g.startY) / g.rect.height * g.crop.h, r = g.sticker;
|
|
1106
|
+
if (r) {
|
|
1107
|
+
if (g.dir === "end")
|
|
1108
|
+
y.update(r.id, {
|
|
1109
|
+
x2: r.x2 + e,
|
|
1110
|
+
y2: r.y2 + n
|
|
1044
1111
|
});
|
|
1045
|
-
else if (
|
|
1046
|
-
|
|
1047
|
-
x:
|
|
1048
|
-
y:
|
|
1112
|
+
else if (g.dir === "start")
|
|
1113
|
+
y.update(r.id, {
|
|
1114
|
+
x: r.x + e,
|
|
1115
|
+
y: r.y + n
|
|
1049
1116
|
});
|
|
1050
|
-
else if (
|
|
1051
|
-
|
|
1052
|
-
x:
|
|
1053
|
-
y:
|
|
1054
|
-
x2: (
|
|
1055
|
-
y2: (
|
|
1117
|
+
else if (g.dir === "move")
|
|
1118
|
+
y.update(r.id, {
|
|
1119
|
+
x: r.x + e,
|
|
1120
|
+
y: r.y + n,
|
|
1121
|
+
x2: (r.x2 || r.x) + e,
|
|
1122
|
+
y2: (r.y2 || r.y) + n
|
|
1056
1123
|
});
|
|
1057
1124
|
else {
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1125
|
+
const o = { x: r.x, y: r.y, w: r.w, h: r.h };
|
|
1126
|
+
Fn(o, g.dir, e, n), y.update(r.id, o);
|
|
1060
1127
|
}
|
|
1061
|
-
|
|
1128
|
+
M();
|
|
1062
1129
|
}
|
|
1063
1130
|
}
|
|
1064
|
-
function
|
|
1065
|
-
if (e.includes("e") && (t.w = Math.max(0.04, t.w +
|
|
1066
|
-
const
|
|
1067
|
-
t.x += t.w -
|
|
1131
|
+
function Fn(t, e, n, r) {
|
|
1132
|
+
if (e.includes("e") && (t.w = Math.max(0.04, t.w + n)), e.includes("s") && (t.h = Math.max(0.04, t.h + r)), e.includes("w")) {
|
|
1133
|
+
const o = Math.max(0.04, t.w - n);
|
|
1134
|
+
t.x += t.w - o, t.w = o;
|
|
1068
1135
|
}
|
|
1069
1136
|
if (e.includes("n")) {
|
|
1070
|
-
const
|
|
1071
|
-
t.y += t.h -
|
|
1137
|
+
const o = Math.max(0.04, t.h - r);
|
|
1138
|
+
t.y += t.h - o, t.h = o;
|
|
1072
1139
|
}
|
|
1073
1140
|
}
|
|
1074
1141
|
function tt(t) {
|
|
1075
|
-
if (
|
|
1076
|
-
|
|
1142
|
+
if (ae(), Mt(!1), w) {
|
|
1143
|
+
jn();
|
|
1077
1144
|
return;
|
|
1078
1145
|
}
|
|
1079
|
-
if (
|
|
1080
|
-
if (
|
|
1146
|
+
if (g) {
|
|
1147
|
+
if (g.kind === "sticker") {
|
|
1081
1148
|
const e = c.canvas.getBoundingClientRect();
|
|
1082
|
-
(t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (
|
|
1149
|
+
(t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (y.remove(g.id), $ = null);
|
|
1083
1150
|
}
|
|
1084
|
-
|
|
1151
|
+
g = null, M();
|
|
1085
1152
|
}
|
|
1086
1153
|
}
|
|
1087
|
-
function
|
|
1088
|
-
const t =
|
|
1089
|
-
if (
|
|
1154
|
+
function jn() {
|
|
1155
|
+
const t = w;
|
|
1156
|
+
if (w = null, !t)
|
|
1090
1157
|
return;
|
|
1091
1158
|
if (t.kind === "crop") {
|
|
1092
|
-
const
|
|
1093
|
-
if (Math.abs(t.current.x - t.start.x) <
|
|
1094
|
-
|
|
1159
|
+
const n = rt(t.start, t.current);
|
|
1160
|
+
if (Math.abs(t.current.x - t.start.x) < jt || Math.abs(t.current.y - t.start.y) < jt) {
|
|
1161
|
+
M();
|
|
1095
1162
|
return;
|
|
1096
1163
|
}
|
|
1097
|
-
const
|
|
1098
|
-
|
|
1099
|
-
x:
|
|
1100
|
-
y:
|
|
1101
|
-
w:
|
|
1102
|
-
h:
|
|
1164
|
+
const o = y.crop();
|
|
1165
|
+
y.setCrop({
|
|
1166
|
+
x: o.x + n.x * o.w,
|
|
1167
|
+
y: o.y + n.y * o.h,
|
|
1168
|
+
w: n.w * o.w,
|
|
1169
|
+
h: n.h * o.h
|
|
1103
1170
|
}), z();
|
|
1104
1171
|
return;
|
|
1105
1172
|
}
|
|
1106
|
-
const e =
|
|
1107
|
-
e && (
|
|
1173
|
+
const e = Un(t);
|
|
1174
|
+
e && ($ = e.id), M();
|
|
1108
1175
|
}
|
|
1109
|
-
function
|
|
1176
|
+
function Un(t) {
|
|
1110
1177
|
if (t.type === "arrow") {
|
|
1111
|
-
const e = t.current.x - t.start.x,
|
|
1112
|
-
return Math.hypot(e,
|
|
1178
|
+
const e = t.current.x - t.start.x, n = t.current.y - t.start.y;
|
|
1179
|
+
return Math.hypot(e, n) < pt ? y.add("arrow", {
|
|
1113
1180
|
x: t.start.x,
|
|
1114
1181
|
y: t.start.y,
|
|
1115
1182
|
x2: t.start.x + 0.12,
|
|
1116
1183
|
y2: t.start.y,
|
|
1117
1184
|
w: 0.12,
|
|
1118
1185
|
h: 0.02
|
|
1119
|
-
}) :
|
|
1186
|
+
}) : y.add("arrow", {
|
|
1120
1187
|
x: t.start.x,
|
|
1121
1188
|
y: t.start.y,
|
|
1122
1189
|
x2: t.current.x,
|
|
1123
1190
|
y2: t.current.y,
|
|
1124
1191
|
w: Math.abs(e),
|
|
1125
|
-
h: Math.abs(
|
|
1192
|
+
h: Math.abs(n)
|
|
1126
1193
|
});
|
|
1127
1194
|
}
|
|
1128
|
-
return
|
|
1195
|
+
return y.add(t.type, rt(t.start, t.current));
|
|
1129
1196
|
}
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1197
|
+
function _n() {
|
|
1198
|
+
y.resetCrop(), $ = null, z();
|
|
1132
1199
|
}
|
|
1133
|
-
function
|
|
1134
|
-
c.resetCrop && (c.resetCrop.hidden = !
|
|
1200
|
+
function bt() {
|
|
1201
|
+
c.resetCrop && (c.resetCrop.hidden = !y.isCropped());
|
|
1135
1202
|
}
|
|
1136
|
-
function
|
|
1203
|
+
function Lt(t) {
|
|
1137
1204
|
if (!c.audio)
|
|
1138
1205
|
return;
|
|
1139
1206
|
const e = t ? "Stop audio" : "Record audio";
|
|
1140
1207
|
c.audio.title = e, c.audio.setAttribute("aria-label", e), c.audio.dataset.active = String(!!t);
|
|
1141
1208
|
}
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1209
|
+
function Bn() {
|
|
1210
|
+
S && (W = S), S = "", c.stage.hidden = !0, c.restore.hidden = !W;
|
|
1144
1211
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1212
|
+
function Vn() {
|
|
1213
|
+
W && (S = W, c.stage.hidden = !1, c.restore.hidden = !0, z());
|
|
1147
1214
|
}
|
|
1148
|
-
function
|
|
1215
|
+
function Nn() {
|
|
1149
1216
|
try {
|
|
1150
|
-
if (
|
|
1151
|
-
const
|
|
1152
|
-
c.text.value =
|
|
1153
|
-
})), !
|
|
1154
|
-
|
|
1217
|
+
if (D || (D = wn((e) => {
|
|
1218
|
+
const n = c.text.value.trim();
|
|
1219
|
+
c.text.value = n ? `${n} ${e}` : e;
|
|
1220
|
+
})), !D.isSupported()) {
|
|
1221
|
+
b("Audio-to-text is not supported in this browser.");
|
|
1155
1222
|
return;
|
|
1156
1223
|
}
|
|
1157
|
-
const t =
|
|
1158
|
-
|
|
1224
|
+
const t = D.start();
|
|
1225
|
+
Lt(t), b(t ? "Listening…" : "");
|
|
1159
1226
|
} catch (t) {
|
|
1160
|
-
|
|
1227
|
+
b(t.message);
|
|
1161
1228
|
}
|
|
1162
1229
|
}
|
|
1163
|
-
async function
|
|
1164
|
-
if (!
|
|
1165
|
-
|
|
1230
|
+
async function Wn() {
|
|
1231
|
+
if (!f.video) {
|
|
1232
|
+
b("Video is disabled on this host.");
|
|
1166
1233
|
return;
|
|
1167
1234
|
}
|
|
1168
|
-
c.dialog.hidden = !0, c.stop.hidden = !1, nt(), c.launcher.hidden = !0,
|
|
1235
|
+
c.dialog.hidden = !0, c.stop.hidden = !1, nt(), c.launcher.hidden = !0, N = vn({
|
|
1169
1236
|
onStart() {
|
|
1170
1237
|
},
|
|
1171
1238
|
onStop(t) {
|
|
1172
|
-
|
|
1239
|
+
R = t, c.stop.hidden = !0, Q(), c.dialog.hidden = !1, z(), b(t ? "Video attached." : "Recording cancelled.");
|
|
1173
1240
|
},
|
|
1174
1241
|
onError(t) {
|
|
1175
|
-
|
|
1242
|
+
b(t.message);
|
|
1176
1243
|
}
|
|
1177
1244
|
});
|
|
1178
1245
|
try {
|
|
1179
|
-
await
|
|
1246
|
+
await N.start();
|
|
1180
1247
|
} catch (t) {
|
|
1181
|
-
c.stop.hidden = !0,
|
|
1248
|
+
c.stop.hidden = !0, Q(), c.dialog.hidden = !1, b(t.message);
|
|
1182
1249
|
}
|
|
1183
1250
|
}
|
|
1184
1251
|
function z() {
|
|
1185
|
-
if (c.shot = null, !
|
|
1186
|
-
c.canvas.style.removeProperty("--nf-shot-aspect"), c.canvas.style.removeProperty("aspect-ratio"), c.canvas.innerHTML =
|
|
1252
|
+
if (c.shot = null, !S) {
|
|
1253
|
+
c.canvas.style.removeProperty("--nf-shot-aspect"), c.canvas.style.removeProperty("aspect-ratio"), c.canvas.innerHTML = R ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(R)}"></video>` : "", bt();
|
|
1187
1254
|
return;
|
|
1188
1255
|
}
|
|
1189
|
-
c.canvas.innerHTML = `<div class="nf-shot"><img alt="Screenshot" src="${
|
|
1256
|
+
c.canvas.innerHTML = `<div class="nf-shot"><img alt="Screenshot" src="${S}" draggable="false"></div>`, c.shot = c.canvas.querySelector(".nf-shot");
|
|
1190
1257
|
const t = c.shot.querySelector("img");
|
|
1191
|
-
t.draggable = !1, t.addEventListener("dragstart", (
|
|
1258
|
+
t.draggable = !1, t.addEventListener("dragstart", (n) => n.preventDefault());
|
|
1192
1259
|
const e = () => {
|
|
1193
|
-
|
|
1260
|
+
qn(t), M();
|
|
1194
1261
|
};
|
|
1195
1262
|
t.addEventListener("load", e), t.complete && t.naturalWidth && e();
|
|
1196
1263
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const e = t.naturalWidth ||
|
|
1199
|
-
if (e &&
|
|
1264
|
+
function qn(t) {
|
|
1265
|
+
const e = t.naturalWidth || I.w, n = t.naturalHeight || I.h;
|
|
1266
|
+
if (e && n && (I = { w: e, h: n }, c.canvas.style.setProperty("--nf-shot-aspect", String(e / n)), c.canvas.style.aspectRatio = `${e} / ${n}`), !c.shot || !I.w || !I.h)
|
|
1200
1267
|
return;
|
|
1201
|
-
const
|
|
1202
|
-
c.shot.style.left = `${(1 -
|
|
1268
|
+
const r = y.crop(), o = I.w / I.h, i = r.w / r.h * o, a = Math.min(1, i / o), s = Math.min(1, o / i);
|
|
1269
|
+
c.shot.style.left = `${(1 - a) / 2 * 100}%`, c.shot.style.top = `${(1 - s) / 2 * 100}%`, c.shot.style.width = `${a * 100}%`, c.shot.style.height = `${s * 100}%`, t.style.width = `${100 / r.w}%`, t.style.height = `${100 / r.h}%`, t.style.left = `${-r.x / r.w * 100}%`, t.style.top = `${-r.y / r.h * 100}%`;
|
|
1203
1270
|
}
|
|
1204
|
-
function
|
|
1271
|
+
function zn(t) {
|
|
1205
1272
|
return t.type === "arrow" ? {
|
|
1206
1273
|
id: "preview",
|
|
1207
1274
|
type: "arrow",
|
|
@@ -1216,141 +1283,142 @@ function Un(t) {
|
|
|
1216
1283
|
id: "preview",
|
|
1217
1284
|
type: t.type,
|
|
1218
1285
|
number: "",
|
|
1219
|
-
...
|
|
1286
|
+
...rt(t.start, t.current)
|
|
1220
1287
|
};
|
|
1221
1288
|
}
|
|
1222
|
-
function
|
|
1223
|
-
if ((c.shot || c.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((
|
|
1224
|
-
|
|
1289
|
+
function M() {
|
|
1290
|
+
if ((c.shot || c.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((i) => i.remove()), !S || !c.shot) {
|
|
1291
|
+
bt();
|
|
1225
1292
|
return;
|
|
1226
1293
|
}
|
|
1227
|
-
const e =
|
|
1228
|
-
if ((
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1294
|
+
const e = y.crop(), n = q(), r = Et(n.clientWidth || 400);
|
|
1295
|
+
if (c.shot.style.setProperty("--nf-anno-stroke", `${r.stroke}px`), c.shot.style.setProperty("--nf-anno-badge", `${r.badgeRadius * 2}px`), c.shot.style.setProperty("--nf-anno-badge-font", `${r.fontSize}px`), c.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, r.stroke * 2.5)}px`), (w == null ? void 0 : w.kind) === "crop") {
|
|
1296
|
+
const i = document.createElement("div");
|
|
1297
|
+
i.className = "nf-crop", Bt(i, rt(w.start, w.current), { x: 0, y: 0, w: 1, h: 1 }), c.shot.appendChild(i);
|
|
1231
1298
|
}
|
|
1232
|
-
const
|
|
1233
|
-
if ((
|
|
1234
|
-
const
|
|
1235
|
-
if (
|
|
1236
|
-
const
|
|
1237
|
-
|
|
1299
|
+
const o = y.list().slice();
|
|
1300
|
+
if ((w == null ? void 0 : w.kind) === "sticker" && o.push(zn(w)), o.forEach((i) => {
|
|
1301
|
+
const a = i.id === "preview", s = !a && i.id === $, l = document.createElement("div");
|
|
1302
|
+
if (l.className = `nf-sticker nf-${i.type}`, l.dataset.id = i.id, s && (l.dataset.selected = "true"), a && (l.dataset.preview = "true"), i.type === "arrow" ? Xn(l, i, e, s, r) : (Bt(l, i, e), s && ["nw", "ne", "sw", "se"].forEach((u) => vt(l, u))), !a && i.number) {
|
|
1303
|
+
const u = document.createElement("span");
|
|
1304
|
+
u.className = "nf-badge", u.textContent = String(i.number), l.appendChild(u);
|
|
1238
1305
|
}
|
|
1239
|
-
c.shot.appendChild(
|
|
1240
|
-
}), c.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1306
|
+
c.shot.appendChild(l);
|
|
1307
|
+
}), c.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((i) => i.remove()), R) {
|
|
1308
|
+
const i = document.createElement("video");
|
|
1309
|
+
i.className = "nf-recording-preview", i.controls = !0, i.src = URL.createObjectURL(R), i.style.position = "absolute", i.style.right = "8px", i.style.bottom = "8px", i.style.width = "160px", c.canvas.appendChild(i);
|
|
1243
1310
|
}
|
|
1244
|
-
|
|
1245
|
-
}
|
|
1246
|
-
function
|
|
1247
|
-
const i =
|
|
1248
|
-
t.style.left = `${
|
|
1249
|
-
<
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
}
|
|
1258
|
-
function
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
function
|
|
1266
|
-
return
|
|
1267
|
-
...
|
|
1268
|
-
endpoint: String(t.endpoint ||
|
|
1269
|
-
projectKey: t.projectKey == null ?
|
|
1270
|
-
version: t.version == null ?
|
|
1271
|
-
name: t.name == null ?
|
|
1272
|
-
targets: t.targets === void 0 ?
|
|
1273
|
-
hideLauncher: t.hideLauncher == null ?
|
|
1274
|
-
theme:
|
|
1275
|
-
video: t.video == null ?
|
|
1276
|
-
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1311
|
+
bt();
|
|
1312
|
+
}
|
|
1313
|
+
function Xn(t, e, n, r, o = Et(400)) {
|
|
1314
|
+
const i = q(), a = i.clientWidth, s = i.clientHeight, l = (e.x - n.x) / n.w * a, u = (e.y - n.y) / n.h * s, d = ((e.x2 ?? e.x + e.w) - n.x) / n.w * a, p = ((e.y2 ?? e.y) - n.y) / n.h * s, m = Math.max(18, o.arrowHead + o.stroke * 2), C = Math.min(l, d) - m, L = Math.min(u, p) - m, P = Math.max(2, Math.abs(d - l)) + m * 2, V = Math.max(2, Math.abs(p - u)) + m * 2, F = l - C, j = u - L, ot = d - C, at = p - L, A = te(F, j, ot, at, o), U = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1315
|
+
t.style.left = `${C}px`, t.style.top = `${L}px`, t.style.width = `${P}px`, t.style.height = `${V}px`, U.setAttribute("class", "nf-arrow-svg"), U.setAttribute("viewBox", `0 0 ${P} ${V}`), U.setAttribute("width", String(P)), U.setAttribute("height", String(V)), U.innerHTML = `
|
|
1316
|
+
<line class="nf-arrow-hit" x1="${F}" y1="${j}" x2="${ot}" y2="${at}" />
|
|
1317
|
+
<line class="nf-arrow-shaft" x1="${F}" y1="${j}" x2="${A.shaftEnd.x}" y2="${A.shaftEnd.y}" />
|
|
1318
|
+
<polygon class="nf-arrow-head" points="${A.tipX},${A.tipY} ${A.left.x},${A.left.y} ${A.right.x},${A.right.y}" />
|
|
1319
|
+
`, t.appendChild(U), r && (vt(t, "start", { left: F - 5, top: j - 5 }), vt(t, "end", { left: ot - 5, top: at - 5 }));
|
|
1320
|
+
}
|
|
1321
|
+
function vt(t, e, n) {
|
|
1322
|
+
const r = document.createElement("span");
|
|
1323
|
+
r.className = "nf-handle", r.dataset.dir = e, n && (r.style.left = `${n.left}px`, r.style.top = `${n.top}px`), t.appendChild(r);
|
|
1324
|
+
}
|
|
1325
|
+
function Bt(t, e, n) {
|
|
1326
|
+
t.style.left = `${(e.x - n.x) / n.w * 100}%`, t.style.top = `${(e.y - n.y) / n.h * 100}%`, t.style.width = `${e.w / n.w * 100}%`, t.style.height = `${e.h / n.h * 100}%`;
|
|
1327
|
+
}
|
|
1328
|
+
function ce(t, e = re) {
|
|
1329
|
+
const n = Number(t);
|
|
1330
|
+
return Number.isFinite(n) ? Math.min(kn, Math.max(0, Math.floor(n))) : e;
|
|
1331
|
+
}
|
|
1332
|
+
function Kn(t = {}) {
|
|
1333
|
+
return mn(t), f = {
|
|
1334
|
+
...f,
|
|
1335
|
+
endpoint: String(t.endpoint || f.endpoint || "").replace(/\/$/, ""),
|
|
1336
|
+
projectKey: t.projectKey == null ? f.projectKey : String(t.projectKey),
|
|
1337
|
+
version: t.version == null ? f.version : String(t.version),
|
|
1338
|
+
name: t.name == null ? f.name : String(t.name || ""),
|
|
1339
|
+
targets: t.targets === void 0 ? f.targets : t.targets,
|
|
1340
|
+
hideLauncher: t.hideLauncher == null ? f.hideLauncher : !!t.hideLauncher,
|
|
1341
|
+
theme: ie(t.theme ?? f.theme),
|
|
1342
|
+
video: t.video == null ? f.video : !!t.video,
|
|
1343
|
+
consoleLogLimit: t.consoleLogLimit == null ? f.consoleLogLimit : ce(t.consoleLogLimit, f.consoleLogLimit)
|
|
1344
|
+
}, Ct(), nt(), de;
|
|
1345
|
+
}
|
|
1346
|
+
async function le() {
|
|
1347
|
+
Ct(), nt(), c.launcher.hidden = !0, y = Zt(), I = { w: 0, h: 0 }, R = null, $ = null, w = null, g = null, J = "bug", yt("bug"), gt(null), Lt(!1), c.text.value = "", b("");
|
|
1280
1348
|
try {
|
|
1281
|
-
|
|
1349
|
+
S = await un(), W = S, c.stage.hidden = !1, c.restore.hidden = !0, b("");
|
|
1282
1350
|
} catch {
|
|
1283
|
-
|
|
1351
|
+
S = "", b("Screenshot failed; you can still send text.");
|
|
1284
1352
|
}
|
|
1285
1353
|
c.dialog.hidden = !1, z(), c.text.focus();
|
|
1286
1354
|
}
|
|
1287
|
-
function
|
|
1288
|
-
|
|
1355
|
+
function it() {
|
|
1356
|
+
h && (D == null || D.stop(), Lt(!1), ae(), w = null, g = null, Mt(!1), c.dialog.hidden = !0, c.stop.hidden = !0, Q());
|
|
1289
1357
|
}
|
|
1290
|
-
function
|
|
1291
|
-
|
|
1358
|
+
function Yn(t = {}) {
|
|
1359
|
+
mt = { ...mt, ...pn(t) };
|
|
1292
1360
|
}
|
|
1293
|
-
async function
|
|
1294
|
-
if (
|
|
1361
|
+
async function ue() {
|
|
1362
|
+
if (Ct(), lt)
|
|
1295
1363
|
return null;
|
|
1296
1364
|
const t = c.text.value.trim();
|
|
1297
|
-
if (!t && !
|
|
1298
|
-
return
|
|
1299
|
-
if (!
|
|
1300
|
-
return
|
|
1301
|
-
|
|
1365
|
+
if (!t && !S && !R)
|
|
1366
|
+
return b("Add a note, screenshot, or video first."), null;
|
|
1367
|
+
if (!f.endpoint || !f.projectKey)
|
|
1368
|
+
return b("Notefully is missing endpoint or projectKey."), null;
|
|
1369
|
+
lt = !0, Vt(!0), b("Submitting…", !0);
|
|
1302
1370
|
try {
|
|
1303
1371
|
const e = new FormData();
|
|
1304
|
-
if (e.append("message", t), e.append("kind", J), e.append("version",
|
|
1305
|
-
...
|
|
1306
|
-
console:
|
|
1307
|
-
})), e.append("annotations", JSON.stringify(
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1372
|
+
if (e.append("message", t), e.append("kind", J), e.append("version", f.version || "0.0.0"), f.name && e.append("name", f.name), e.append("context", JSON.stringify({
|
|
1373
|
+
...hn(mt),
|
|
1374
|
+
console: ne.snapshot().slice(-ce(f.consoleLogLimit))
|
|
1375
|
+
})), e.append("annotations", JSON.stringify(y.list())), Array.isArray(f.targets) && e.append("targets", JSON.stringify(f.targets)), S) {
|
|
1376
|
+
const o = await $n(
|
|
1377
|
+
S,
|
|
1378
|
+
y.crop(),
|
|
1379
|
+
y.list(),
|
|
1312
1380
|
{
|
|
1313
|
-
mark:
|
|
1314
|
-
markText:
|
|
1381
|
+
mark: Ut("--nf-mark", "#fdd341"),
|
|
1382
|
+
markText: Ut("--nf-mark-text", "#2a2140")
|
|
1315
1383
|
}
|
|
1316
1384
|
);
|
|
1317
|
-
e.append("screenshot",
|
|
1385
|
+
e.append("screenshot", o, "screenshot.png");
|
|
1318
1386
|
}
|
|
1319
|
-
|
|
1320
|
-
const
|
|
1387
|
+
R && e.append("recording", R, "recording.webm");
|
|
1388
|
+
const n = await fetch(`${f.endpoint}/v1/reports`, {
|
|
1321
1389
|
method: "POST",
|
|
1322
1390
|
headers: {
|
|
1323
|
-
"X-Notefully-Key":
|
|
1391
|
+
"X-Notefully-Key": f.projectKey
|
|
1324
1392
|
},
|
|
1325
1393
|
body: e
|
|
1326
1394
|
});
|
|
1327
|
-
let
|
|
1395
|
+
let r = null;
|
|
1328
1396
|
try {
|
|
1329
|
-
|
|
1397
|
+
r = await n.json();
|
|
1330
1398
|
} catch {
|
|
1331
|
-
|
|
1399
|
+
r = null;
|
|
1332
1400
|
}
|
|
1333
|
-
if (!
|
|
1334
|
-
throw
|
|
1335
|
-
return
|
|
1401
|
+
if (!n.ok)
|
|
1402
|
+
throw b((r == null ? void 0 : r.error) || "Submit failed."), new Error((r == null ? void 0 : r.error) || `Submit failed (${n.status})`);
|
|
1403
|
+
return b("Sent. Thank you."), it(), r;
|
|
1336
1404
|
} finally {
|
|
1337
|
-
|
|
1405
|
+
lt = !1, Vt(!1);
|
|
1338
1406
|
}
|
|
1339
1407
|
}
|
|
1340
|
-
function
|
|
1408
|
+
function Vt(t) {
|
|
1341
1409
|
c.submit && (c.submit.disabled = !!t, c.submit.setAttribute("aria-busy", t ? "true" : "false"));
|
|
1342
1410
|
}
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1411
|
+
function Gn() {
|
|
1412
|
+
it(), h == null || h.remove(), h = null, c = {};
|
|
1345
1413
|
}
|
|
1346
|
-
const
|
|
1347
|
-
typeof window < "u" && (window.Notefully =
|
|
1414
|
+
const de = { init: Kn, open: le, close: it, identify: Yn, submit: ue, destroy: Gn };
|
|
1415
|
+
typeof window < "u" && (window.Notefully = de);
|
|
1348
1416
|
export {
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1417
|
+
it as close,
|
|
1418
|
+
de as default,
|
|
1419
|
+
Gn as destroy,
|
|
1420
|
+
Yn as identify,
|
|
1421
|
+
Kn as init,
|
|
1422
|
+
le as open,
|
|
1423
|
+
ue as submit
|
|
1356
1424
|
};
|