@sprig-technologies/sprig-bundled 2.42.0 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{conversational-ui-CHUc5Jnt.cjs → conversational-ui-B9SOjjQE.cjs} +1 -1
- package/dist/{conversational-ui-BXaXKhZ1.js → conversational-ui-WaAjNR3Q.js} +3 -3
- package/dist/conversational-v2-styles-D3WQxdro.cjs +1 -0
- package/dist/conversational-v2-styles-XFcJt3-u.js +4 -0
- package/dist/getAttributedUrl-CMu77L08.js +197 -0
- package/dist/getAttributedUrl-CkFVhnm0.cjs +12 -0
- package/dist/{index-CgIYh4S0.cjs → index-B2lKZafM.cjs} +15 -15
- package/dist/{index-AmryOSUY.js → index-Bbp8h_Ls.js} +700 -700
- package/dist/{index-D_BLw9q6.cjs → index-BnE-K_Xo.cjs} +1 -1
- package/dist/{index-BiSdDzId.js → index-CY9QSu7D.js} +5 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/view-CHBo6RQ4.js +1728 -0
- package/dist/view-s39eJCD9.cjs +1 -0
- package/package.json +1 -1
- package/dist/getAttributedUrl-5fGQLMl5.cjs +0 -12
- package/dist/getAttributedUrl-kWGm9GHO.js +0 -195
- package/dist/view-D1SzHpEx.js +0 -1720
- package/dist/view-DC9Y1r07.cjs +0 -1
|
@@ -46,20 +46,20 @@ var Id = Object.create, uo = Object.defineProperty, Cd = Object.getOwnPropertyDe
|
|
|
46
46
|
}
|
|
47
47
|
function l(c) {
|
|
48
48
|
if (c.callback === void 0) throw new Error("callback argument missing");
|
|
49
|
-
var u = !1, d = function(T,
|
|
50
|
-
u || (u = !0, c.callback(T,
|
|
49
|
+
var u = !1, d = function(T, R, S) {
|
|
50
|
+
u || (u = !0, c.callback(T, R, S));
|
|
51
51
|
};
|
|
52
52
|
function h() {
|
|
53
53
|
var T = void 0;
|
|
54
|
-
if (T = p.response ? p.response : p.responseText || function(
|
|
54
|
+
if (T = p.response ? p.response : p.responseText || function(R) {
|
|
55
55
|
try {
|
|
56
|
-
if (
|
|
57
|
-
var S =
|
|
58
|
-
if (
|
|
56
|
+
if (R.responseType === "document") return R.responseXML;
|
|
57
|
+
var S = R.responseXML && R.responseXML.documentElement.nodeName === "parsererror";
|
|
58
|
+
if (R.responseType === "" && !S) return R.responseXML;
|
|
59
59
|
} catch {
|
|
60
60
|
}
|
|
61
61
|
return null;
|
|
62
|
-
}(p),
|
|
62
|
+
}(p), M) try {
|
|
63
63
|
T = JSON.parse(T);
|
|
64
64
|
} catch {
|
|
65
65
|
}
|
|
@@ -68,31 +68,31 @@ var Id = Object.create, uo = Object.defineProperty, Cd = Object.getOwnPropertyDe
|
|
|
68
68
|
function f(T) {
|
|
69
69
|
return clearTimeout(g), T instanceof Error || (T = new Error("" + (T || "Unknown XMLHttpRequest Error"))), T.statusCode = 0, d(T, k);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function w() {
|
|
72
72
|
if (!m) {
|
|
73
73
|
var T;
|
|
74
74
|
clearTimeout(g), T = c.useXDR && p.status === void 0 ? 200 : p.status === 1223 ? 204 : p.status;
|
|
75
|
-
var
|
|
76
|
-
return T !== 0 ? (
|
|
75
|
+
var R = k, S = null;
|
|
76
|
+
return T !== 0 ? (R = { body: h(), statusCode: T, method: I, headers: {}, url: v, rawRequest: p }, p.getAllResponseHeaders && (R.headers = n(p.getAllResponseHeaders()))) : S = new Error("Internal XMLHttpRequest Error"), d(S, R, R.body);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
var p = c.xhr || null;
|
|
80
80
|
p || (p = c.cors || c.useXDR ? new o.XDomainRequest() : new o.XMLHttpRequest());
|
|
81
|
-
var
|
|
82
|
-
if ("json" in c && c.json !== !1 && (
|
|
83
|
-
p.readyState === 4 && setTimeout(
|
|
84
|
-
}, p.onload =
|
|
81
|
+
var C, m, g, v = p.url = c.uri || c.url, I = p.method = c.method || "GET", O = c.body || c.data, E = p.headers = c.headers || {}, A = !!c.sync, M = !1, k = { body: void 0, headers: {}, statusCode: 0, method: I, url: v, rawRequest: p };
|
|
82
|
+
if ("json" in c && c.json !== !1 && (M = !0, E.accept || E.Accept || (E.Accept = "application/json"), I !== "GET" && I !== "HEAD" && (E["content-type"] || E["Content-Type"] || (E["Content-Type"] = "application/json"), O = JSON.stringify(c.json === !0 ? O : c.json))), p.onreadystatechange = function() {
|
|
83
|
+
p.readyState === 4 && setTimeout(w, 0);
|
|
84
|
+
}, p.onload = w, p.onerror = f, p.onprogress = function() {
|
|
85
85
|
}, p.onabort = function() {
|
|
86
86
|
m = !0;
|
|
87
|
-
}, p.ontimeout = f, p.open(
|
|
87
|
+
}, p.ontimeout = f, p.open(I, v, !A, c.username, c.password), A || (p.withCredentials = !!c.withCredentials), !A && c.timeout > 0 && (g = setTimeout(function() {
|
|
88
88
|
if (!m) {
|
|
89
89
|
m = !0, p.abort("timeout");
|
|
90
90
|
var T = new Error("XMLHttpRequest timeout");
|
|
91
91
|
T.code = "ETIMEDOUT", f(T);
|
|
92
92
|
}
|
|
93
|
-
}, c.timeout)), p.setRequestHeader) for (
|
|
93
|
+
}, c.timeout)), p.setRequestHeader) for (C in E) E.hasOwnProperty(C) && p.setRequestHeader(C, E[C]);
|
|
94
94
|
else if (c.headers && !function(T) {
|
|
95
|
-
for (var
|
|
95
|
+
for (var R in T) if (T.hasOwnProperty(R)) return !1;
|
|
96
96
|
return !0;
|
|
97
97
|
}(c.headers)) throw new Error("Headers cannot be set on an XDomainRequest object");
|
|
98
98
|
return "responseType" in c && (p.responseType = c.responseType), "beforeSend" in c && typeof c.beforeSend == "function" && c.beforeSend(p), p.send(O || null), p;
|
|
@@ -116,7 +116,7 @@ function hl(e, t) {
|
|
|
116
116
|
function ml(e) {
|
|
117
117
|
return typeof e != "object" || e === null ? String(e) : Object.prototype.toString.call(e);
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var Me = typeof window < "u" ? window : typeof self < "u" ? self : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : void 0, dt = class {
|
|
120
120
|
constructor(e, t) {
|
|
121
121
|
this.code = e, this.message = t;
|
|
122
122
|
}
|
|
@@ -129,7 +129,7 @@ var Ae = typeof window < "u" ? window : typeof self < "u" ? self : typeof global
|
|
|
129
129
|
} catch {
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
}, Md = new
|
|
132
|
+
}, Md = new dt("W01", "Unable to initialize event under dispatching."), Ud = new dt("W02", "Assigning any falsy value to 'cancelBubble' property has no effect."), Dd = new dt("W03", "Assigning any truthy value to 'returnValue' property has no effect."), Pd = new dt("W04", "Unable to preventDefault on non-cancelable events."), _d = new dt("W05", "Unable to preventDefault inside passive event listener invocation."), Nd = new dt("W06", "An event listener wasn't added because it has been added already: %o, %o"), Js = new dt("W07", "The %o option value was abandoned because the event listener wasn't added as duplicated."), po = new dt("W08", "The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"), qe = class {
|
|
133
133
|
static get NONE() {
|
|
134
134
|
return ho;
|
|
135
135
|
}
|
|
@@ -230,10 +230,10 @@ function he(e, t = "this") {
|
|
|
230
230
|
function yo(e) {
|
|
231
231
|
e.inPassiveListenerFlag ? _d.warn() : e.cancelable ? e.canceledFlag = !0 : Pd.warn();
|
|
232
232
|
}
|
|
233
|
-
Object.defineProperty(
|
|
234
|
-
var Ks = Object.getOwnPropertyNames(
|
|
235
|
-
for (let e = 0; e < Ks.length; ++e) Ks[e] !== "constructor" && Object.defineProperty(
|
|
236
|
-
|
|
233
|
+
Object.defineProperty(qe, "NONE", { enumerable: !0 }), Object.defineProperty(qe, "CAPTURING_PHASE", { enumerable: !0 }), Object.defineProperty(qe, "AT_TARGET", { enumerable: !0 }), Object.defineProperty(qe, "BUBBLING_PHASE", { enumerable: !0 });
|
|
234
|
+
var Ks = Object.getOwnPropertyNames(qe.prototype);
|
|
235
|
+
for (let e = 0; e < Ks.length; ++e) Ks[e] !== "constructor" && Object.defineProperty(qe.prototype, Ks[e], { enumerable: !0 });
|
|
236
|
+
Me !== void 0 && Me.Event !== void 0 && Object.setPrototypeOf(qe.prototype, Me.Event.prototype);
|
|
237
237
|
var bt, wo = { INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 };
|
|
238
238
|
function bo(e) {
|
|
239
239
|
let t = Object.keys(wo);
|
|
@@ -242,7 +242,7 @@ function bo(e) {
|
|
|
242
242
|
Object.defineProperty(e, s, { get: () => n, configurable: !0, enumerable: !0 });
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
var ms = class extends
|
|
245
|
+
var ms = class extends qe {
|
|
246
246
|
static wrap(e) {
|
|
247
247
|
return new (gl(e))(e);
|
|
248
248
|
}
|
|
@@ -256,7 +256,7 @@ var ms = class extends Ye {
|
|
|
256
256
|
}
|
|
257
257
|
stopPropagation() {
|
|
258
258
|
super.stopPropagation();
|
|
259
|
-
let { original: e } =
|
|
259
|
+
let { original: e } = nt(this);
|
|
260
260
|
"stopPropagation" in e && e.stopPropagation();
|
|
261
261
|
}
|
|
262
262
|
get cancelBubble() {
|
|
@@ -264,12 +264,12 @@ var ms = class extends Ye {
|
|
|
264
264
|
}
|
|
265
265
|
set cancelBubble(e) {
|
|
266
266
|
super.cancelBubble = e;
|
|
267
|
-
let { original: t } =
|
|
267
|
+
let { original: t } = nt(this);
|
|
268
268
|
"cancelBubble" in t && (t.cancelBubble = e);
|
|
269
269
|
}
|
|
270
270
|
stopImmediatePropagation() {
|
|
271
271
|
super.stopImmediatePropagation();
|
|
272
|
-
let { original: e } =
|
|
272
|
+
let { original: e } = nt(this);
|
|
273
273
|
"stopImmediatePropagation" in e && e.stopImmediatePropagation();
|
|
274
274
|
}
|
|
275
275
|
get returnValue() {
|
|
@@ -277,20 +277,20 @@ var ms = class extends Ye {
|
|
|
277
277
|
}
|
|
278
278
|
set returnValue(e) {
|
|
279
279
|
super.returnValue = e;
|
|
280
|
-
let { original: t } =
|
|
280
|
+
let { original: t } = nt(this);
|
|
281
281
|
"returnValue" in t && (t.returnValue = e);
|
|
282
282
|
}
|
|
283
283
|
preventDefault() {
|
|
284
284
|
super.preventDefault();
|
|
285
|
-
let { original: e } =
|
|
285
|
+
let { original: e } = nt(this);
|
|
286
286
|
"preventDefault" in e && e.preventDefault();
|
|
287
287
|
}
|
|
288
288
|
get timeStamp() {
|
|
289
|
-
let { original: e } =
|
|
289
|
+
let { original: e } = nt(this);
|
|
290
290
|
return "timeStamp" in e ? e.timeStamp : super.timeStamp;
|
|
291
291
|
}
|
|
292
292
|
}, fl = /* @__PURE__ */ new WeakMap();
|
|
293
|
-
function
|
|
293
|
+
function nt(e) {
|
|
294
294
|
let t = fl.get(e);
|
|
295
295
|
return Ai(t != null, "'this' is expected an Event object, but got", e), t;
|
|
296
296
|
}
|
|
@@ -310,10 +310,10 @@ function gl(e) {
|
|
|
310
310
|
function yl(e, t) {
|
|
311
311
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
312
312
|
return { get() {
|
|
313
|
-
let s =
|
|
313
|
+
let s = nt(this).original, n = s[t];
|
|
314
314
|
return typeof n == "function" ? n.bind(s) : n;
|
|
315
315
|
}, set(s) {
|
|
316
|
-
|
|
316
|
+
nt(this).original[t] = s;
|
|
317
317
|
}, configurable: r.configurable, enumerable: r.enumerable };
|
|
318
318
|
}
|
|
319
319
|
function wl(e) {
|
|
@@ -357,30 +357,30 @@ function vl(e, t, r = !1) {
|
|
|
357
357
|
n.flags |= 8;
|
|
358
358
|
}(s), s.signal && s.signal.removeEventListener("abort", s.signalListener), e.cow && !r ? (e.cow = !1, e.listeners = e.listeners.filter((n, i) => i !== t), !1) : (e.listeners.splice(t, 1), !0);
|
|
359
359
|
}
|
|
360
|
-
fs.set(Object.prototype, ms),
|
|
360
|
+
fs.set(Object.prototype, ms), Me !== void 0 && Me.Event !== void 0 && fs.set(Me.Event.prototype, ms);
|
|
361
361
|
var Us = class {
|
|
362
362
|
constructor() {
|
|
363
363
|
Il.set(this, /* @__PURE__ */ Object.create(null));
|
|
364
364
|
}
|
|
365
365
|
addEventListener(e, t, r) {
|
|
366
|
-
let s = Zs(this), { callback: n, capture: i, once: a, passive: o, signal: l, type: c } = function(h, f,
|
|
366
|
+
let s = Zs(this), { callback: n, capture: i, once: a, passive: o, signal: l, type: c } = function(h, f, w) {
|
|
367
367
|
var p;
|
|
368
|
-
return Co(f), typeof
|
|
368
|
+
return Co(f), typeof w == "object" && w !== null ? { type: String(h), callback: f ?? void 0, capture: !!w.capture, passive: !!w.passive, once: !!w.once, signal: (p = w.signal) !== null && p !== void 0 ? p : void 0 } : { type: String(h), callback: f ?? void 0, capture: !!w, passive: !1, once: !1, signal: void 0 };
|
|
369
369
|
}(e, t, r);
|
|
370
370
|
if (n == null || l != null && l.aborted) return;
|
|
371
371
|
let u = function(h, f) {
|
|
372
|
-
var
|
|
373
|
-
return (
|
|
372
|
+
var w;
|
|
373
|
+
return (w = h[f]) !== null && w !== void 0 ? w : h[f] = { attrCallback: void 0, attrListener: void 0, cow: !1, listeners: [] };
|
|
374
374
|
}(s, c), d = bl(u, n, i);
|
|
375
|
-
d === -1 ? function(h, f,
|
|
375
|
+
d === -1 ? function(h, f, w, p, C, m) {
|
|
376
376
|
let g;
|
|
377
|
-
m && (g = Io.bind(null, h, f,
|
|
378
|
-
let v = function(
|
|
379
|
-
return { callback:
|
|
380
|
-
}(f,
|
|
377
|
+
m && (g = Io.bind(null, h, f, w), m.addEventListener("abort", g));
|
|
378
|
+
let v = function(I, O, E, A, M, k) {
|
|
379
|
+
return { callback: I, flags: (O ? 1 : 0) | (E ? 2 : 0) | (A ? 4 : 0), signal: M, signalListener: k };
|
|
380
|
+
}(f, w, p, C, m, g);
|
|
381
381
|
h.cow ? (h.cow = !1, h.listeners = [...h.listeners, v]) : h.listeners.push(v);
|
|
382
|
-
}(u, n, i, o, a, l) : function(h, f,
|
|
383
|
-
Nd.warn(wl(h) ? "capture" : "bubble", h.callback), vo(h) !== f && Js.warn("passive"), So(h) !==
|
|
382
|
+
}(u, n, i, o, a, l) : function(h, f, w, p) {
|
|
383
|
+
Nd.warn(wl(h) ? "capture" : "bubble", h.callback), vo(h) !== f && Js.warn("passive"), So(h) !== w && Js.warn("once"), h.signal !== p && Js.warn("signal");
|
|
384
384
|
}(u.listeners[d], o, a, l);
|
|
385
385
|
}
|
|
386
386
|
removeEventListener(e, t, r) {
|
|
@@ -392,8 +392,8 @@ var Us = class {
|
|
|
392
392
|
dispatchEvent(e) {
|
|
393
393
|
let t = Zs(this)[String(e.type)];
|
|
394
394
|
if (t == null) return !0;
|
|
395
|
-
let r = e instanceof
|
|
396
|
-
if (s.dispatchFlag) throw n = "This event has been in dispatching.",
|
|
395
|
+
let r = e instanceof qe ? e : ms.wrap(e), s = he(r, "event");
|
|
396
|
+
if (s.dispatchFlag) throw n = "This event has been in dispatching.", Me.DOMException ? new Me.DOMException(n, "InvalidStateError") : (bt == null && (bt = class Sl extends Error {
|
|
397
397
|
constructor(a) {
|
|
398
398
|
super(a), Error.captureStackTrace && Error.captureStackTrace(this, Sl);
|
|
399
399
|
}
|
|
@@ -429,7 +429,7 @@ function Co(e) {
|
|
|
429
429
|
}
|
|
430
430
|
var Xs = Object.getOwnPropertyNames(Us.prototype);
|
|
431
431
|
for (let e = 0; e < Xs.length; ++e) Xs[e] !== "constructor" && Object.defineProperty(Us.prototype, Xs[e], { enumerable: !0 });
|
|
432
|
-
|
|
432
|
+
Me !== void 0 && Me.EventTarget !== void 0 && Object.setPrototypeOf(Us.prototype, Me.EventTarget.prototype);
|
|
433
433
|
var ko, zd = ((e, t, r) => (r = e != null ? Id(Ed(e)) : {}, ((s, n, i, a) => {
|
|
434
434
|
if (n && typeof n == "object" || typeof n == "function") for (let o of kd(n)) !xd.call(s, o) && o !== i && uo(s, o, { get: () => n[o], enumerable: !(a = Cd(n, o)) || a.enumerable });
|
|
435
435
|
return s;
|
|
@@ -609,7 +609,7 @@ var ko, zd = ((e, t, r) => (r = e != null ? Id(Ed(e)) : {}, ((s, n, i, a) => {
|
|
|
609
609
|
if (e && (r = await this.sendChunkWithRetries(e)), this.success = !!t, this.success && r && this.dispatch("success"), !r) return;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
}, Gd = El.createUpload, Hd = Object.defineProperty,
|
|
612
|
+
}, Gd = El.createUpload, Hd = Object.defineProperty, x = (e, t, r) => ((s, n, i) => n in s ? Hd(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r), $d = Object.defineProperty, Eo = (e, t, r) => ((s, n, i) => n in s ? $d(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r), fe = ((e) => (e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment", e))(fe || {});
|
|
613
613
|
const xo = { Node: ["childNodes", "parentNode", "parentElement", "textContent"], ShadowRoot: ["host", "styleSheets"], Element: ["shadowRoot", "querySelector", "querySelectorAll"], MutationObserver: [] }, To = { Node: ["contains", "getRootNode"], ShadowRoot: ["getSelection"], Element: [], MutationObserver: ["constructor"] }, Sr = {};
|
|
614
614
|
function Mi(e) {
|
|
615
615
|
if (Sr[e]) return Sr[e];
|
|
@@ -633,7 +633,7 @@ function Mi(e) {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
const Qs = {};
|
|
636
|
-
function
|
|
636
|
+
function et(e, t, r) {
|
|
637
637
|
var s;
|
|
638
638
|
const n = `${e}.${String(r)}`;
|
|
639
639
|
if (Qs[n]) return Qs[n].call(t);
|
|
@@ -647,28 +647,28 @@ function Ro(e, t, r) {
|
|
|
647
647
|
const n = Mi(e)[r];
|
|
648
648
|
return typeof n != "function" ? t[r] : (en[s] = n, n.bind(t));
|
|
649
649
|
}
|
|
650
|
-
const
|
|
651
|
-
return
|
|
650
|
+
const ye = { childNodes: function(e) {
|
|
651
|
+
return et("Node", e, "childNodes");
|
|
652
652
|
}, parentNode: function(e) {
|
|
653
|
-
return
|
|
653
|
+
return et("Node", e, "parentNode");
|
|
654
654
|
}, parentElement: function(e) {
|
|
655
|
-
return
|
|
655
|
+
return et("Node", e, "parentElement");
|
|
656
656
|
}, textContent: function(e) {
|
|
657
|
-
return
|
|
657
|
+
return et("Node", e, "textContent");
|
|
658
658
|
}, contains: function(e, t) {
|
|
659
659
|
return Ro("Node", e, "contains")(t);
|
|
660
660
|
}, getRootNode: function(e) {
|
|
661
661
|
return Ro("Node", e, "getRootNode")();
|
|
662
662
|
}, host: function(e) {
|
|
663
|
-
return e && "host" in e ?
|
|
663
|
+
return e && "host" in e ? et("ShadowRoot", e, "host") : null;
|
|
664
664
|
}, styleSheets: function(e) {
|
|
665
665
|
return e.styleSheets;
|
|
666
666
|
}, shadowRoot: function(e) {
|
|
667
|
-
return e && "shadowRoot" in e ?
|
|
667
|
+
return e && "shadowRoot" in e ? et("Element", e, "shadowRoot") : null;
|
|
668
668
|
}, querySelector: function(e, t) {
|
|
669
|
-
return
|
|
669
|
+
return et("Element", e, "querySelector")(t);
|
|
670
670
|
}, querySelectorAll: function(e, t) {
|
|
671
|
-
return
|
|
671
|
+
return et("Element", e, "querySelectorAll")(t);
|
|
672
672
|
}, mutationObserver: function() {
|
|
673
673
|
return Mi("MutationObserver").constructor;
|
|
674
674
|
} };
|
|
@@ -676,8 +676,8 @@ function xl(e) {
|
|
|
676
676
|
return e.nodeType === e.ELEMENT_NODE;
|
|
677
677
|
}
|
|
678
678
|
function Zt(e) {
|
|
679
|
-
const t = e && "host" in e && "mode" in e &&
|
|
680
|
-
return !!(t && "shadowRoot" in t &&
|
|
679
|
+
const t = e && "host" in e && "mode" in e && ye.host(e) || null;
|
|
680
|
+
return !!(t && "shadowRoot" in t && ye.shadowRoot(t) === e);
|
|
681
681
|
}
|
|
682
682
|
function Xt(e) {
|
|
683
683
|
return Object.prototype.toString.call(e) === "[object ShadowRoot]";
|
|
@@ -864,20 +864,20 @@ function Al(e, t, r) {
|
|
|
864
864
|
}
|
|
865
865
|
function ys(e, t, r) {
|
|
866
866
|
if (!e) return !1;
|
|
867
|
-
if (e.nodeType !== e.ELEMENT_NODE) return !!r && ys(
|
|
867
|
+
if (e.nodeType !== e.ELEMENT_NODE) return !!r && ys(ye.parentNode(e), t, r);
|
|
868
868
|
for (let s = e.classList.length; s--; ) {
|
|
869
869
|
const n = e.classList[s];
|
|
870
870
|
if (t.test(n)) return !0;
|
|
871
871
|
}
|
|
872
|
-
return !!r && ys(
|
|
872
|
+
return !!r && ys(ye.parentNode(e), t, r);
|
|
873
873
|
}
|
|
874
874
|
function Ml(e, t, r, s) {
|
|
875
875
|
let n;
|
|
876
876
|
if (xl(e)) {
|
|
877
|
-
if (n = e, !
|
|
877
|
+
if (n = e, !ye.childNodes(n).length) return !1;
|
|
878
878
|
} else {
|
|
879
|
-
if (
|
|
880
|
-
n =
|
|
879
|
+
if (ye.parentElement(e) === null) return !1;
|
|
880
|
+
n = ye.parentElement(e);
|
|
881
881
|
}
|
|
882
882
|
try {
|
|
883
883
|
if (typeof t == "string") {
|
|
@@ -895,7 +895,7 @@ function Ml(e, t, r, s) {
|
|
|
895
895
|
return !1;
|
|
896
896
|
}
|
|
897
897
|
function rp(e, t) {
|
|
898
|
-
const { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: a, inlineStylesheet: o, maskInputOptions: l = {}, maskTextFn: c, maskInputFn: u, dataURLOptions: d = {}, inlineImages: h, recordCanvas: f, keepIframeSrcFn:
|
|
898
|
+
const { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: a, inlineStylesheet: o, maskInputOptions: l = {}, maskTextFn: c, maskInputFn: u, dataURLOptions: d = {}, inlineImages: h, recordCanvas: f, keepIframeSrcFn: w, newlyAddedElement: p = !1 } = t, C = function(m, g) {
|
|
899
899
|
if (!g.hasNode(m)) return;
|
|
900
900
|
const v = g.getId(m);
|
|
901
901
|
return v === 1 ? void 0 : v;
|
|
@@ -904,10 +904,10 @@ function rp(e, t) {
|
|
|
904
904
|
case e.DOCUMENT_NODE:
|
|
905
905
|
return e.compatMode !== "CSS1Compat" ? { type: fe.Document, childNodes: [], compatMode: e.compatMode } : { type: fe.Document, childNodes: [] };
|
|
906
906
|
case e.DOCUMENT_TYPE_NODE:
|
|
907
|
-
return { type: fe.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId:
|
|
907
|
+
return { type: fe.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: C };
|
|
908
908
|
case e.ELEMENT_NODE:
|
|
909
909
|
return function(m, g) {
|
|
910
|
-
const { doc: v, blockClass:
|
|
910
|
+
const { doc: v, blockClass: I, blockSelector: O, inlineStylesheet: E, maskInputOptions: A = {}, maskInputFn: M, dataURLOptions: k = {}, inlineImages: T, recordCanvas: R, keepIframeSrcFn: S, newlyAddedElement: P = !1, rootId: D } = g, b = function(L, _, te) {
|
|
911
911
|
try {
|
|
912
912
|
if (typeof _ == "string") {
|
|
913
913
|
if (L.classList.contains(_)) return !0;
|
|
@@ -919,43 +919,43 @@ function rp(e, t) {
|
|
|
919
919
|
} catch {
|
|
920
920
|
}
|
|
921
921
|
return !1;
|
|
922
|
-
}(m,
|
|
922
|
+
}(m, I, O), y = function(L) {
|
|
923
923
|
if (L instanceof HTMLFormElement) return "form";
|
|
924
924
|
const _ = ft(L.tagName);
|
|
925
925
|
return Xd.test(_) ? "div" : _;
|
|
926
926
|
}(m);
|
|
927
|
-
let
|
|
927
|
+
let U = {};
|
|
928
928
|
const F = m.attributes.length;
|
|
929
929
|
for (let L = 0; L < F; L++) {
|
|
930
930
|
const _ = m.attributes[L];
|
|
931
|
-
Al(y, _.name, _.value) || (
|
|
931
|
+
Al(y, _.name, _.value) || (U[_.name] = Ol(v, y, ft(_.name), _.value));
|
|
932
932
|
}
|
|
933
933
|
if (y === "link" && E) {
|
|
934
934
|
const L = Array.from(v.styleSheets).find((te) => te.href === m.href);
|
|
935
935
|
let _ = null;
|
|
936
|
-
L && (_ = qr(L)), _ && (delete
|
|
936
|
+
L && (_ = qr(L)), _ && (delete U.rel, delete U.href, U._cssText = _);
|
|
937
937
|
}
|
|
938
|
-
if (y === "style" && m.sheet && !(m.innerText ||
|
|
938
|
+
if (y === "style" && m.sheet && !(m.innerText || ye.textContent(m) || "").trim().length) {
|
|
939
939
|
const L = qr(m.sheet);
|
|
940
|
-
L && (
|
|
940
|
+
L && (U._cssText = L);
|
|
941
941
|
}
|
|
942
942
|
if (y === "input" || y === "textarea" || y === "select") {
|
|
943
943
|
const L = m.value, _ = m.checked;
|
|
944
|
-
|
|
944
|
+
U.type !== "radio" && U.type !== "checkbox" && U.type !== "submit" && U.type !== "button" && L ? U.value = Ui({ element: m, type: Di(m), tagName: y, value: L, maskInputOptions: A, maskInputFn: M }) : _ && (U.checked = _);
|
|
945
945
|
}
|
|
946
|
-
if (y === "option" && (m.selected && !
|
|
946
|
+
if (y === "option" && (m.selected && !A.select ? U.selected = !0 : delete U.selected), y === "dialog" && m.open && (U.rr_open_mode = m.matches("dialog:modal") ? "modal" : "non-modal"), y === "canvas" && R) {
|
|
947
947
|
if (m.__context === "2d") (function(L) {
|
|
948
948
|
const _ = L.getContext("2d");
|
|
949
949
|
if (!_) return !0;
|
|
950
950
|
for (let te = 0; te < L.width; te += 50) for (let q = 0; q < L.height; q += 50) {
|
|
951
|
-
const me = _.getImageData,
|
|
952
|
-
if (new Uint32Array(
|
|
951
|
+
const me = _.getImageData, _e = Lo in me ? me[Lo] : me;
|
|
952
|
+
if (new Uint32Array(_e.call(_, te, q, Math.min(50, L.width - te), Math.min(50, L.height - q)).data.buffer).some((we) => we !== 0)) return !1;
|
|
953
953
|
}
|
|
954
954
|
return !0;
|
|
955
|
-
})(m) || (
|
|
955
|
+
})(m) || (U.rr_dataURL = m.toDataURL(k.type, k.quality));
|
|
956
956
|
else if (!("__context" in m)) {
|
|
957
957
|
const L = m.toDataURL(k.type, k.quality), _ = v.createElement("canvas");
|
|
958
|
-
_.width = m.width, _.height = m.height, L !== _.toDataURL(k.type, k.quality) && (
|
|
958
|
+
_.width = m.width, _.height = m.height, L !== _.toDataURL(k.type, k.quality) && (U.rr_dataURL = L);
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
if (y === "img" && T) {
|
|
@@ -963,51 +963,51 @@ function rp(e, t) {
|
|
|
963
963
|
const L = m, _ = L.currentSrc || L.getAttribute("src") || "<unknown-src>", te = L.crossOrigin, q = () => {
|
|
964
964
|
L.removeEventListener("load", q);
|
|
965
965
|
try {
|
|
966
|
-
vt.width = L.naturalWidth, vt.height = L.naturalHeight, Ao.drawImage(L, 0, 0),
|
|
966
|
+
vt.width = L.naturalWidth, vt.height = L.naturalHeight, Ao.drawImage(L, 0, 0), U.rr_dataURL = vt.toDataURL(k.type, k.quality);
|
|
967
967
|
} catch (me) {
|
|
968
968
|
if (L.crossOrigin !== "anonymous") return L.crossOrigin = "anonymous", void (L.complete && L.naturalWidth !== 0 ? q() : L.addEventListener("load", q));
|
|
969
969
|
console.warn(`Cannot inline img src=${_}! Error: ${me}`);
|
|
970
970
|
}
|
|
971
|
-
L.crossOrigin === "anonymous" && (te ?
|
|
971
|
+
L.crossOrigin === "anonymous" && (te ? U.crossOrigin = te : L.removeAttribute("crossorigin"));
|
|
972
972
|
};
|
|
973
973
|
L.complete && L.naturalWidth !== 0 ? q() : L.addEventListener("load", q);
|
|
974
974
|
}
|
|
975
975
|
if (y === "audio" || y === "video") {
|
|
976
|
-
const L =
|
|
976
|
+
const L = U;
|
|
977
977
|
L.rr_mediaState = m.paused ? "paused" : "played", L.rr_mediaCurrentTime = m.currentTime, L.rr_mediaPlaybackRate = m.playbackRate, L.rr_mediaMuted = m.muted, L.rr_mediaLoop = m.loop, L.rr_mediaVolume = m.volume;
|
|
978
978
|
}
|
|
979
|
-
if (
|
|
979
|
+
if (P || (m.scrollLeft && (U.rr_scrollLeft = m.scrollLeft), m.scrollTop && (U.rr_scrollTop = m.scrollTop)), b) {
|
|
980
980
|
const { width: L, height: _ } = m.getBoundingClientRect();
|
|
981
|
-
|
|
981
|
+
U = { class: U.class, rr_width: `${L}px`, rr_height: `${_}px` };
|
|
982
982
|
}
|
|
983
|
-
y !== "iframe" || S(
|
|
983
|
+
y !== "iframe" || S(U.src) || (m.contentDocument || (U.rr_src = U.src), delete U.src);
|
|
984
984
|
let j;
|
|
985
985
|
try {
|
|
986
986
|
customElements.get(y) && (j = !0);
|
|
987
987
|
} catch {
|
|
988
988
|
}
|
|
989
|
-
return { type: fe.Element, tagName: y, attributes:
|
|
990
|
-
}(e, { doc: r, blockClass: n, blockSelector: i, inlineStylesheet: o, maskInputOptions: l, maskInputFn: u, dataURLOptions: d, inlineImages: h, recordCanvas: f, keepIframeSrcFn:
|
|
989
|
+
return { type: fe.Element, tagName: y, attributes: U, childNodes: [], isSVG: tp(m) || void 0, needBlock: b, rootId: D, isCustom: j };
|
|
990
|
+
}(e, { doc: r, blockClass: n, blockSelector: i, inlineStylesheet: o, maskInputOptions: l, maskInputFn: u, dataURLOptions: d, inlineImages: h, recordCanvas: f, keepIframeSrcFn: w, newlyAddedElement: p, rootId: C });
|
|
991
991
|
case e.TEXT_NODE:
|
|
992
992
|
return function(m, g) {
|
|
993
993
|
var v;
|
|
994
|
-
const { needsMask:
|
|
995
|
-
let k =
|
|
996
|
-
const T =
|
|
994
|
+
const { needsMask: I, maskTextFn: O, rootId: E } = g, A = ye.parentNode(m), M = A && A.tagName;
|
|
995
|
+
let k = ye.textContent(m);
|
|
996
|
+
const T = M === "STYLE" || void 0, R = M === "SCRIPT" || void 0;
|
|
997
997
|
if (T && k) {
|
|
998
998
|
try {
|
|
999
|
-
m.nextSibling || m.previousSibling || (v =
|
|
999
|
+
m.nextSibling || m.previousSibling || (v = A.sheet) != null && v.cssRules && (k = qr(A.sheet));
|
|
1000
1000
|
} catch (S) {
|
|
1001
1001
|
console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`, m);
|
|
1002
1002
|
}
|
|
1003
1003
|
k = gs(k, Pi(g.doc));
|
|
1004
1004
|
}
|
|
1005
|
-
return
|
|
1006
|
-
}(e, { doc: r, needsMask: a, maskTextFn: c, rootId:
|
|
1005
|
+
return R && (k = "SCRIPT_PLACEHOLDER"), !T && !R && k && I && (k = O ? O(k, ye.parentElement(m)) : k.replace(/[\S]/g, "*")), { type: fe.Text, textContent: k || "", isStyle: T, rootId: E };
|
|
1006
|
+
}(e, { doc: r, needsMask: a, maskTextFn: c, rootId: C });
|
|
1007
1007
|
case e.CDATA_SECTION_NODE:
|
|
1008
|
-
return { type: fe.CDATA, textContent: "", rootId:
|
|
1008
|
+
return { type: fe.CDATA, textContent: "", rootId: C };
|
|
1009
1009
|
case e.COMMENT_NODE:
|
|
1010
|
-
return { type: fe.Comment, textContent:
|
|
1010
|
+
return { type: fe.Comment, textContent: ye.textContent(e) || "", rootId: C };
|
|
1011
1011
|
default:
|
|
1012
1012
|
return !1;
|
|
1013
1013
|
}
|
|
@@ -1016,40 +1016,40 @@ function re(e) {
|
|
|
1016
1016
|
return e == null ? "" : e.toLowerCase();
|
|
1017
1017
|
}
|
|
1018
1018
|
function Et(e, t) {
|
|
1019
|
-
const { doc: r, mirror: s, blockClass: n, blockSelector: i, maskTextClass: a, maskTextSelector: o, skipChild: l = !1, inlineStylesheet: c = !0, maskInputOptions: u = {}, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions:
|
|
1020
|
-
let { needsMask:
|
|
1021
|
-
|
|
1022
|
-
const T = rp(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask:
|
|
1019
|
+
const { doc: r, mirror: s, blockClass: n, blockSelector: i, maskTextClass: a, maskTextSelector: o, skipChild: l = !1, inlineStylesheet: c = !0, maskInputOptions: u = {}, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w = {}, inlineImages: p = !1, recordCanvas: C = !1, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v = 5e3, onStylesheetLoad: I, stylesheetLoadTimeout: O = 5e3, keepIframeSrcFn: E = () => !1, newlyAddedElement: A = !1 } = t;
|
|
1020
|
+
let { needsMask: M } = t, { preserveWhiteSpace: k = !0 } = t;
|
|
1021
|
+
M || (M = Ml(e, a, o, M === void 0));
|
|
1022
|
+
const T = rp(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, dataURLOptions: w, inlineImages: p, recordCanvas: C, keepIframeSrcFn: E, newlyAddedElement: A });
|
|
1023
1023
|
if (!T) return console.warn(e, "not serialized"), null;
|
|
1024
|
-
let
|
|
1025
|
-
|
|
1026
|
-
return !!(y.comment &&
|
|
1024
|
+
let R;
|
|
1025
|
+
R = s.hasNode(e) ? s.getId(e) : !function(b, y) {
|
|
1026
|
+
return !!(y.comment && b.type === fe.Comment || b.type === fe.Element && (y.script && (b.tagName === "script" || b.tagName === "link" && (b.attributes.rel === "preload" || b.attributes.rel === "modulepreload") && b.attributes.as === "script" || b.tagName === "link" && b.attributes.rel === "prefetch" && typeof b.attributes.href == "string" && Oo(b.attributes.href) === "js") || y.headFavicon && (b.tagName === "link" && b.attributes.rel === "shortcut icon" || b.tagName === "meta" && (re(b.attributes.name).match(/^msapplication-tile(image|color)$/) || re(b.attributes.name) === "application-name" || re(b.attributes.rel) === "icon" || re(b.attributes.rel) === "apple-touch-icon" || re(b.attributes.rel) === "shortcut icon")) || b.tagName === "meta" && (y.headMetaDescKeywords && re(b.attributes.name).match(/^description|keywords$/) || y.headMetaSocial && (re(b.attributes.property).match(/^(og|twitter|fb):/) || re(b.attributes.name).match(/^(og|twitter):/) || re(b.attributes.name) === "pinterest") || y.headMetaRobots && (re(b.attributes.name) === "robots" || re(b.attributes.name) === "googlebot" || re(b.attributes.name) === "bingbot") || y.headMetaHttpEquiv && b.attributes["http-equiv"] !== void 0 || y.headMetaAuthorship && (re(b.attributes.name) === "author" || re(b.attributes.name) === "generator" || re(b.attributes.name) === "framework" || re(b.attributes.name) === "publisher" || re(b.attributes.name) === "progid" || re(b.attributes.property).match(/^article:/) || re(b.attributes.property).match(/^product:/)) || y.headMetaVerification && (re(b.attributes.name) === "google-site-verification" || re(b.attributes.name) === "yandex-verification" || re(b.attributes.name) === "csrf-token" || re(b.attributes.name) === "p:domain_verify" || re(b.attributes.name) === "verify-v1" || re(b.attributes.name) === "verification" || re(b.attributes.name) === "shopify-checkout-api-token"))));
|
|
1027
1027
|
}(T, f) && (k || T.type !== fe.Text || T.isStyle || T.textContent.replace(/^\s+|\s+$/gm, "").length) ? Ll() : -2;
|
|
1028
|
-
const S = Object.assign(T, { id:
|
|
1029
|
-
if (s.add(e, S),
|
|
1028
|
+
const S = Object.assign(T, { id: R });
|
|
1029
|
+
if (s.add(e, S), R === -2) return null;
|
|
1030
1030
|
m && m(e);
|
|
1031
|
-
let
|
|
1031
|
+
let P = !l;
|
|
1032
1032
|
if (S.type === fe.Element) {
|
|
1033
|
-
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1033
|
+
P = P && !S.needBlock, delete S.needBlock;
|
|
1034
|
+
const b = ye.shadowRoot(e);
|
|
1035
|
+
b && Xt(b) && (S.isShadowHost = !0);
|
|
1036
1036
|
}
|
|
1037
|
-
if ((S.type === fe.Document || S.type === fe.Element) &&
|
|
1037
|
+
if ((S.type === fe.Document || S.type === fe.Element) && P) {
|
|
1038
1038
|
f.headWhitespace && S.type === fe.Element && S.tagName === "head" && (k = !1);
|
|
1039
|
-
const
|
|
1040
|
-
if (!(S.type === fe.Element && S.tagName === "textarea" && S.attributes.value !== void 0)) for (const
|
|
1041
|
-
const F = Et(
|
|
1039
|
+
const b = { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: l, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E };
|
|
1040
|
+
if (!(S.type === fe.Element && S.tagName === "textarea" && S.attributes.value !== void 0)) for (const U of Array.from(ye.childNodes(e))) {
|
|
1041
|
+
const F = Et(U, b);
|
|
1042
1042
|
F && S.childNodes.push(F);
|
|
1043
1043
|
}
|
|
1044
1044
|
let y = null;
|
|
1045
|
-
if (xl(e) && (y =
|
|
1046
|
-
const F = Et(
|
|
1045
|
+
if (xl(e) && (y = ye.shadowRoot(e))) for (const U of Array.from(ye.childNodes(y))) {
|
|
1046
|
+
const F = Et(U, b);
|
|
1047
1047
|
F && (Xt(y) && (F.isShadow = !0), S.childNodes.push(F));
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1051
|
-
return
|
|
1052
|
-
const F =
|
|
1050
|
+
const D = ye.parentNode(e);
|
|
1051
|
+
return D && Zt(D) && Xt(D) && (S.isShadow = !0), S.type === fe.Element && S.tagName === "iframe" && function(b, y, U) {
|
|
1052
|
+
const F = b.contentWindow;
|
|
1053
1053
|
if (!F) return;
|
|
1054
1054
|
let j, L = !1;
|
|
1055
1055
|
try {
|
|
@@ -1060,38 +1060,38 @@ function Et(e, t) {
|
|
|
1060
1060
|
if (j !== "complete") {
|
|
1061
1061
|
const te = setTimeout(() => {
|
|
1062
1062
|
L || (y(), L = !0);
|
|
1063
|
-
},
|
|
1064
|
-
return void
|
|
1063
|
+
}, U);
|
|
1064
|
+
return void b.addEventListener("load", () => {
|
|
1065
1065
|
clearTimeout(te), L = !0, y();
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
1068
|
const _ = "about:blank";
|
|
1069
|
-
if (F.location.href !== _ ||
|
|
1070
|
-
|
|
1069
|
+
if (F.location.href !== _ || b.src === _ || b.src === "") return setTimeout(y, 0), b.addEventListener("load", y);
|
|
1070
|
+
b.addEventListener("load", y);
|
|
1071
1071
|
}(e, () => {
|
|
1072
|
-
const
|
|
1073
|
-
if (
|
|
1074
|
-
const y = Et(
|
|
1072
|
+
const b = e.contentDocument;
|
|
1073
|
+
if (b && g) {
|
|
1074
|
+
const y = Et(b, { doc: b, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: !1, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E });
|
|
1075
1075
|
y && g(e, y);
|
|
1076
1076
|
}
|
|
1077
|
-
}, v), S.type === fe.Element && S.tagName === "link" && typeof S.attributes.rel == "string" && (S.attributes.rel === "stylesheet" || S.attributes.rel === "preload" && typeof S.attributes.href == "string" && Oo(S.attributes.href) === "css") && function(
|
|
1077
|
+
}, v), S.type === fe.Element && S.tagName === "link" && typeof S.attributes.rel == "string" && (S.attributes.rel === "stylesheet" || S.attributes.rel === "preload" && typeof S.attributes.href == "string" && Oo(S.attributes.href) === "css") && function(b, y, U) {
|
|
1078
1078
|
let F, j = !1;
|
|
1079
1079
|
try {
|
|
1080
|
-
F =
|
|
1080
|
+
F = b.sheet;
|
|
1081
1081
|
} catch {
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
if (F) return;
|
|
1085
1085
|
const L = setTimeout(() => {
|
|
1086
1086
|
j || (y(), j = !0);
|
|
1087
|
-
},
|
|
1088
|
-
|
|
1087
|
+
}, U);
|
|
1088
|
+
b.addEventListener("load", () => {
|
|
1089
1089
|
clearTimeout(L), j = !0, y();
|
|
1090
1090
|
});
|
|
1091
1091
|
}(e, () => {
|
|
1092
|
-
if (
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1092
|
+
if (I) {
|
|
1093
|
+
const b = Et(e, { doc: r, mirror: s, blockClass: n, blockSelector: i, needsMask: M, maskTextClass: a, maskTextSelector: o, skipChild: !1, inlineStylesheet: c, maskInputOptions: u, maskTextFn: d, maskInputFn: h, slimDOMOptions: f, dataURLOptions: w, inlineImages: p, recordCanvas: C, preserveWhiteSpace: k, onSerialize: m, onIframeLoad: g, iframeLoadTimeout: v, onStylesheetLoad: I, stylesheetLoadTimeout: O, keepIframeSrcFn: E });
|
|
1094
|
+
b && I(e, b);
|
|
1095
1095
|
}
|
|
1096
1096
|
}, O), S;
|
|
1097
1097
|
}
|
|
@@ -1119,8 +1119,8 @@ var xn = { exports: {} }, ie = String, Uo = function() {
|
|
|
1119
1119
|
};
|
|
1120
1120
|
xn.exports = Uo(), xn.exports.createColors = Uo;
|
|
1121
1121
|
var ip = xn.exports;
|
|
1122
|
-
const
|
|
1123
|
-
let Do = ip, Po =
|
|
1122
|
+
const De = np(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
1123
|
+
let Do = ip, Po = De, Tn = class Ul extends Error {
|
|
1124
1124
|
constructor(t, r, s, n, i, a) {
|
|
1125
1125
|
super(t), this.name = "CssSyntaxError", this.reason = t, i && (this.file = i), n && (this.source = n), a && (this.plugin = a), r !== void 0 && s !== void 0 && (typeof r == "number" ? (this.line = r, this.column = s) : (this.line = r.line, this.column = r.column, this.endLine = s.line, this.endColumn = s.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Ul);
|
|
1126
1126
|
}
|
|
@@ -1491,7 +1491,7 @@ var pp = { nanoid: (e = 21) => {
|
|
|
1491
1491
|
for (; r--; ) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
1492
1492
|
return t;
|
|
1493
1493
|
} };
|
|
1494
|
-
let { SourceMapConsumer: No, SourceMapGenerator: Fo } =
|
|
1494
|
+
let { SourceMapConsumer: No, SourceMapGenerator: Fo } = De, { existsSync: hp, readFileSync: mp } = De, { dirname: tn, join: fp } = De, Un = class {
|
|
1495
1495
|
constructor(e, t) {
|
|
1496
1496
|
if (t.map === !1) return;
|
|
1497
1497
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
@@ -1558,7 +1558,7 @@ let { SourceMapConsumer: No, SourceMapGenerator: Fo } = Ue, { existsSync: hp, re
|
|
|
1558
1558
|
};
|
|
1559
1559
|
var Pl = Un;
|
|
1560
1560
|
Un.default = Un;
|
|
1561
|
-
let { SourceMapConsumer: gp, SourceMapGenerator: yp } =
|
|
1561
|
+
let { SourceMapConsumer: gp, SourceMapGenerator: yp } = De, { fileURLToPath: Bo, pathToFileURL: Cr } = De, { isAbsolute: Dn, resolve: Pn } = De, { nanoid: wp } = pp, rn = De, zo = _i, bp = Pl, sn = Symbol("fromOffsetCache"), vp = !!(gp && yp), jo = !!(Pn && Dn), Jr = class {
|
|
1562
1562
|
constructor(e, t = {}) {
|
|
1563
1563
|
if (e == null || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
1564
1564
|
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!jo || /^\w+:\/\//.test(t.from) || Dn(t.from) ? this.file = t.from : this.file = Pn(t.from)), jo && vp) {
|
|
@@ -1644,7 +1644,7 @@ let { SourceMapConsumer: gp, SourceMapGenerator: yp } = Ue, { fileURLToPath: Bo,
|
|
|
1644
1644
|
};
|
|
1645
1645
|
var Bs = Jr;
|
|
1646
1646
|
Jr.default = Jr, rn && rn.registerInput && rn.registerInput(Jr);
|
|
1647
|
-
let { SourceMapConsumer: _l, SourceMapGenerator: Kr } =
|
|
1647
|
+
let { SourceMapConsumer: _l, SourceMapGenerator: Kr } = De, { dirname: Zr, relative: Nl, resolve: Fl, sep: Bl } = De, { pathToFileURL: Wo } = De, Sp = Bs, Ip = !!(_l && Kr), Cp = !!(Zr && Fl && Nl && Bl);
|
|
1648
1648
|
var zl = class {
|
|
1649
1649
|
constructor(e, t, r, s) {
|
|
1650
1650
|
this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = s, this.originalCSS = s, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
@@ -1791,7 +1791,7 @@ function Yl(e) {
|
|
|
1791
1791
|
function ql(e) {
|
|
1792
1792
|
if (e[Vl] = !1, e.proxyOf.nodes) for (let t of e.proxyOf.nodes) ql(t);
|
|
1793
1793
|
}
|
|
1794
|
-
let
|
|
1794
|
+
let Je = class Jl extends Ep {
|
|
1795
1795
|
append(...t) {
|
|
1796
1796
|
for (let r of t) {
|
|
1797
1797
|
let s = this.normalize(r, this.last);
|
|
@@ -1937,19 +1937,19 @@ let qe = class Jl extends Ep {
|
|
|
1937
1937
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
1938
1938
|
}
|
|
1939
1939
|
};
|
|
1940
|
-
|
|
1940
|
+
Je.registerParse = (e) => {
|
|
1941
1941
|
jl = e;
|
|
1942
|
-
},
|
|
1942
|
+
}, Je.registerRule = (e) => {
|
|
1943
1943
|
Ni = e;
|
|
1944
|
-
},
|
|
1944
|
+
}, Je.registerAtRule = (e) => {
|
|
1945
1945
|
Fi = e;
|
|
1946
|
-
},
|
|
1946
|
+
}, Je.registerRoot = (e) => {
|
|
1947
1947
|
Wl = e;
|
|
1948
1948
|
};
|
|
1949
|
-
var yt =
|
|
1950
|
-
|
|
1949
|
+
var yt = Je;
|
|
1950
|
+
Je.default = Je, Je.rebuild = (e) => {
|
|
1951
1951
|
e.type === "atrule" ? Object.setPrototypeOf(e, Fi.prototype) : e.type === "rule" ? Object.setPrototypeOf(e, Ni.prototype) : e.type === "decl" ? Object.setPrototypeOf(e, Hl.prototype) : e.type === "comment" ? Object.setPrototypeOf(e, $l.prototype) : e.type === "root" && Object.setPrototypeOf(e, Wl.prototype), e[Gl] = !0, e.nodes && e.nodes.forEach((t) => {
|
|
1952
|
-
|
|
1952
|
+
Je.rebuild(t);
|
|
1953
1953
|
});
|
|
1954
1954
|
};
|
|
1955
1955
|
let Kl, Zl, xp = yt, or = class extends xp {
|
|
@@ -2066,18 +2066,18 @@ let nc = yt, Bp = sc, Qr = class extends nc {
|
|
|
2066
2066
|
var Wi = Qr;
|
|
2067
2067
|
Qr.default = Qr, nc.registerRule(Qr);
|
|
2068
2068
|
let zp = Fs, jp = function(e, t = {}) {
|
|
2069
|
-
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors,
|
|
2069
|
+
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors, w = h.length, p = 0, C = [], m = [];
|
|
2070
2070
|
function g(v) {
|
|
2071
2071
|
throw e.error("Unclosed " + v, p);
|
|
2072
2072
|
}
|
|
2073
2073
|
return { back: function(v) {
|
|
2074
2074
|
m.push(v);
|
|
2075
2075
|
}, endOfFile: function() {
|
|
2076
|
-
return m.length === 0 && p >=
|
|
2076
|
+
return m.length === 0 && p >= w;
|
|
2077
2077
|
}, nextToken: function(v) {
|
|
2078
2078
|
if (m.length) return m.pop();
|
|
2079
|
-
if (p >=
|
|
2080
|
-
let
|
|
2079
|
+
if (p >= w) return;
|
|
2080
|
+
let I = !!v && v.ignoreUnclosed;
|
|
2081
2081
|
switch (r = h.charCodeAt(p), r) {
|
|
2082
2082
|
case Er:
|
|
2083
2083
|
case Bt:
|
|
@@ -2102,11 +2102,11 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2102
2102
|
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
case Op:
|
|
2105
|
-
if (c =
|
|
2105
|
+
if (c = C.length ? C.pop()[1] : "", u = h.charCodeAt(p + 1), c === "url" && u !== nn && u !== Vo && u !== Bt && u !== Er && u !== Tr && u !== xr && u !== Rr) {
|
|
2106
2106
|
s = p;
|
|
2107
2107
|
do {
|
|
2108
2108
|
if (o = !1, s = h.indexOf(")", s + 1), s === -1) {
|
|
2109
|
-
if (f ||
|
|
2109
|
+
if (f || I) {
|
|
2110
2110
|
s = p;
|
|
2111
2111
|
break;
|
|
2112
2112
|
}
|
|
@@ -2122,7 +2122,7 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2122
2122
|
n = r === nn ? "'" : '"', s = p;
|
|
2123
2123
|
do {
|
|
2124
2124
|
if (o = !1, s = h.indexOf(n, s + 1), s === -1) {
|
|
2125
|
-
if (f ||
|
|
2125
|
+
if (f || I) {
|
|
2126
2126
|
s = p + 1;
|
|
2127
2127
|
break;
|
|
2128
2128
|
}
|
|
@@ -2144,7 +2144,7 @@ let zp = Fs, jp = function(e, t = {}) {
|
|
|
2144
2144
|
d = ["word", h.slice(p, s + 1), p, s], p = s;
|
|
2145
2145
|
break;
|
|
2146
2146
|
default:
|
|
2147
|
-
r === Go && h.charCodeAt(p + 1) === Pp ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f ||
|
|
2147
|
+
r === Go && h.charCodeAt(p + 1) === Pp ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f || I ? s = h.length : g("comment")), d = ["comment", h.slice(p, s + 1), p, s], p = s) : (Or.lastIndex = p + 1, Or.test(h), s = Or.lastIndex === 0 ? h.length - 1 : Or.lastIndex - 2, d = ["word", h.slice(p, s + 1), p, s], C.push(d), p = s);
|
|
2148
2148
|
}
|
|
2149
2149
|
return p++, d;
|
|
2150
2150
|
}, position: function() {
|
|
@@ -2408,7 +2408,7 @@ function es(e, t) {
|
|
|
2408
2408
|
}
|
|
2409
2409
|
var Vi = es;
|
|
2410
2410
|
es.default = es, $p.registerParse(es);
|
|
2411
|
-
let { isClean:
|
|
2411
|
+
let { isClean: Ne, my: Jp } = ir, Kp = zl, Zp = _s, Xp = yt, Qp = Bi, qo = zi, eh = Vi, th = gr;
|
|
2412
2412
|
const rh = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, sh = { AtRule: !0, AtRuleExit: !0, Comment: !0, CommentExit: !0, Declaration: !0, DeclarationExit: !0, Document: !0, DocumentExit: !0, Once: !0, OnceExit: !0, postcssPlugin: !0, prepare: !0, Root: !0, RootExit: !0, Rule: !0, RuleExit: !0 }, nh = { Once: !0, postcssPlugin: !0, prepare: !0 };
|
|
2413
2413
|
function zt(e) {
|
|
2414
2414
|
return typeof e == "object" && typeof e.then == "function";
|
|
@@ -2422,7 +2422,7 @@ function Jo(e) {
|
|
|
2422
2422
|
return t = e.type === "document" ? ["Document", 0, "DocumentExit"] : e.type === "root" ? ["Root", 0, "RootExit"] : ic(e), { eventIndex: 0, events: t, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
2423
2423
|
}
|
|
2424
2424
|
function Bn(e) {
|
|
2425
|
-
return e[
|
|
2425
|
+
return e[Ne] = !1, e.nodes && e.nodes.forEach((t) => Bn(t)), e;
|
|
2426
2426
|
}
|
|
2427
2427
|
let zn = {}, xt = class oc {
|
|
2428
2428
|
constructor(t, r, s) {
|
|
@@ -2486,8 +2486,8 @@ let zn = {}, xt = class oc {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
if (this.prepareVisitors(), this.hasListener) {
|
|
2488
2488
|
let t = this.result.root;
|
|
2489
|
-
for (; !t[
|
|
2490
|
-
t[
|
|
2489
|
+
for (; !t[Ne]; ) {
|
|
2490
|
+
t[Ne] = !0;
|
|
2491
2491
|
let r = [Jo(t)];
|
|
2492
2492
|
for (; r.length > 0; ) {
|
|
2493
2493
|
let s = this.visitTick(r);
|
|
@@ -2545,7 +2545,7 @@ let zn = {}, xt = class oc {
|
|
|
2545
2545
|
if (zt(this.runOnRoot(t))) throw this.getAsyncError();
|
|
2546
2546
|
if (this.prepareVisitors(), this.hasListener) {
|
|
2547
2547
|
let t = this.result.root;
|
|
2548
|
-
for (; !t[
|
|
2548
|
+
for (; !t[Ne]; ) t[Ne] = !0, this.walkSync(t);
|
|
2549
2549
|
if (this.listeners.OnceExit) if (t.type === "document") for (let r of t.nodes) this.visitSync(this.listeners.OnceExit, r);
|
|
2550
2550
|
else this.visitSync(this.listeners.OnceExit, t);
|
|
2551
2551
|
}
|
|
@@ -2584,22 +2584,22 @@ let zn = {}, xt = class oc {
|
|
|
2584
2584
|
}
|
|
2585
2585
|
if (r.iterator !== 0) {
|
|
2586
2586
|
let a, o = r.iterator;
|
|
2587
|
-
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[
|
|
2587
|
+
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[Ne]) return a[Ne] = !0, void t.push(Jo(a));
|
|
2588
2588
|
r.iterator = 0, delete s.indexes[o];
|
|
2589
2589
|
}
|
|
2590
2590
|
let i = r.events;
|
|
2591
2591
|
for (; r.eventIndex < i.length; ) {
|
|
2592
2592
|
let a = i[r.eventIndex];
|
|
2593
|
-
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[
|
|
2593
|
+
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[Ne] = !0, r.iterator = s.getIterator()));
|
|
2594
2594
|
if (this.listeners[a]) return void (r.visitors = this.listeners[a]);
|
|
2595
2595
|
}
|
|
2596
2596
|
t.pop();
|
|
2597
2597
|
}
|
|
2598
2598
|
walkSync(t) {
|
|
2599
|
-
t[
|
|
2599
|
+
t[Ne] = !0;
|
|
2600
2600
|
let r = ic(t);
|
|
2601
2601
|
for (let s of r) if (s === 0) t.nodes && t.each((n) => {
|
|
2602
|
-
n[
|
|
2602
|
+
n[Ne] || this.walkSync(n);
|
|
2603
2603
|
});
|
|
2604
2604
|
else {
|
|
2605
2605
|
let n = this.listeners[s];
|
|
@@ -2778,7 +2778,7 @@ var Dh = K;
|
|
|
2778
2778
|
K.default = K;
|
|
2779
2779
|
const le = sp(Dh);
|
|
2780
2780
|
le.stringify, le.fromJSON, le.plugin, le.parse, le.list, le.document, le.comment, le.atRule, le.rule, le.decl, le.root, le.CssSyntaxError, le.Declaration, le.Container, le.Processor, le.Document, le.Comment, le.Warning, le.AtRule, le.Result, le.Input, le.Rule, le.Root, le.Node;
|
|
2781
|
-
var Ph = Object.defineProperty,
|
|
2781
|
+
var Ph = Object.defineProperty, Re = (e, t, r) => ((s, n, i) => n in s ? Ph(s, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[n] = i)(e, typeof t != "symbol" ? t + "" : t, r);
|
|
2782
2782
|
function _h(e) {
|
|
2783
2783
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2784
2784
|
}
|
|
@@ -2803,8 +2803,8 @@ var Vn = { exports: {} }, oe = String, ra = function() {
|
|
|
2803
2803
|
};
|
|
2804
2804
|
Vn.exports = ra(), Vn.exports.createColors = ra;
|
|
2805
2805
|
var Fh = Vn.exports;
|
|
2806
|
-
const
|
|
2807
|
-
let sa = Fh, na =
|
|
2806
|
+
const Pe = Nh(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2807
|
+
let sa = Fh, na = Pe, Gn = class lc extends Error {
|
|
2808
2808
|
constructor(t, r, s, n, i, a) {
|
|
2809
2809
|
super(t), this.name = "CssSyntaxError", this.reason = t, i && (this.file = i), n && (this.source = n), a && (this.plugin = a), r !== void 0 && s !== void 0 && (typeof r == "number" ? (this.line = r, this.column = s) : (this.line = r.line, this.column = r.column, this.endLine = s.line, this.endColumn = s.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, lc);
|
|
2810
2810
|
}
|
|
@@ -3175,7 +3175,7 @@ var Hh = { nanoid: (e = 21) => {
|
|
|
3175
3175
|
for (; r--; ) t += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
3176
3176
|
return t;
|
|
3177
3177
|
} };
|
|
3178
|
-
let { SourceMapConsumer: oa, SourceMapGenerator: aa } =
|
|
3178
|
+
let { SourceMapConsumer: oa, SourceMapGenerator: aa } = Pe, { existsSync: $h, readFileSync: Yh } = Pe, { dirname: on, join: qh } = Pe, Kn = class {
|
|
3179
3179
|
constructor(e, t) {
|
|
3180
3180
|
if (t.map === !1) return;
|
|
3181
3181
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
@@ -3242,7 +3242,7 @@ let { SourceMapConsumer: oa, SourceMapGenerator: aa } = De, { existsSync: $h, re
|
|
|
3242
3242
|
};
|
|
3243
3243
|
var uc = Kn;
|
|
3244
3244
|
Kn.default = Kn;
|
|
3245
|
-
let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } =
|
|
3245
|
+
let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } = Pe, { fileURLToPath: la, pathToFileURL: Mr } = Pe, { isAbsolute: Zn, resolve: Xn } = Pe, { nanoid: Zh } = Hh, an = Pe, ca = Gi, Xh = uc, ln = Symbol("fromOffsetCache"), Qh = !!(Jh && Kh), ua = !!(Xn && Zn), ts = class {
|
|
3246
3246
|
constructor(e, t = {}) {
|
|
3247
3247
|
if (e == null || typeof e == "object" && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
3248
3248
|
if (this.css = e.toString(), this.css[0] === "\uFEFF" || this.css[0] === "" ? (this.hasBOM = !0, this.css = this.css.slice(1)) : this.hasBOM = !1, t.from && (!ua || /^\w+:\/\//.test(t.from) || Zn(t.from) ? this.file = t.from : this.file = Xn(t.from)), ua && Qh) {
|
|
@@ -3328,7 +3328,7 @@ let { SourceMapConsumer: Jh, SourceMapGenerator: Kh } = De, { fileURLToPath: la,
|
|
|
3328
3328
|
};
|
|
3329
3329
|
var Gs = ts;
|
|
3330
3330
|
ts.default = ts, an && an.registerInput && an.registerInput(ts);
|
|
3331
|
-
let { SourceMapConsumer: dc, SourceMapGenerator: rs } =
|
|
3331
|
+
let { SourceMapConsumer: dc, SourceMapGenerator: rs } = Pe, { dirname: ss, relative: pc, resolve: hc, sep: mc } = Pe, { pathToFileURL: da } = Pe, em = Gs, tm = !!(dc && rs), rm = !!(ss && hc && pc && mc);
|
|
3332
3332
|
var fc = class {
|
|
3333
3333
|
constructor(e, t, r, s) {
|
|
3334
3334
|
this.stringify = e, this.mapOpts = r.map || {}, this.root = t, this.opts = r, this.css = s, this.originalCSS = s, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
@@ -3475,7 +3475,7 @@ function Ic(e) {
|
|
|
3475
3475
|
function Cc(e) {
|
|
3476
3476
|
if (e[wc] = !1, e.proxyOf.nodes) for (let t of e.proxyOf.nodes) Cc(t);
|
|
3477
3477
|
}
|
|
3478
|
-
let
|
|
3478
|
+
let Ke = class kc extends nm {
|
|
3479
3479
|
append(...t) {
|
|
3480
3480
|
for (let r of t) {
|
|
3481
3481
|
let s = this.normalize(r, this.last);
|
|
@@ -3621,19 +3621,19 @@ let Je = class kc extends nm {
|
|
|
3621
3621
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
3622
3622
|
}
|
|
3623
3623
|
};
|
|
3624
|
-
|
|
3624
|
+
Ke.registerParse = (e) => {
|
|
3625
3625
|
gc = e;
|
|
3626
|
-
},
|
|
3626
|
+
}, Ke.registerRule = (e) => {
|
|
3627
3627
|
Hi = e;
|
|
3628
|
-
},
|
|
3628
|
+
}, Ke.registerAtRule = (e) => {
|
|
3629
3629
|
$i = e;
|
|
3630
|
-
},
|
|
3630
|
+
}, Ke.registerRoot = (e) => {
|
|
3631
3631
|
yc = e;
|
|
3632
3632
|
};
|
|
3633
|
-
var wt =
|
|
3634
|
-
|
|
3633
|
+
var wt = Ke;
|
|
3634
|
+
Ke.default = Ke, Ke.rebuild = (e) => {
|
|
3635
3635
|
e.type === "atrule" ? Object.setPrototypeOf(e, $i.prototype) : e.type === "rule" ? Object.setPrototypeOf(e, Hi.prototype) : e.type === "decl" ? Object.setPrototypeOf(e, vc.prototype) : e.type === "comment" ? Object.setPrototypeOf(e, Sc.prototype) : e.type === "root" && Object.setPrototypeOf(e, yc.prototype), e[bc] = !0, e.nodes && e.nodes.forEach((t) => {
|
|
3636
|
-
|
|
3636
|
+
Ke.rebuild(t);
|
|
3637
3637
|
});
|
|
3638
3638
|
};
|
|
3639
3639
|
let Ec, xc, im = wt, ur = class extends im {
|
|
@@ -3750,18 +3750,18 @@ let Uc = wt, wm = Mc, is = class extends Uc {
|
|
|
3750
3750
|
var Ki = is;
|
|
3751
3751
|
is.default = is, Uc.registerRule(is);
|
|
3752
3752
|
let bm = Vs, vm = function(e, t = {}) {
|
|
3753
|
-
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors,
|
|
3753
|
+
let r, s, n, i, a, o, l, c, u, d, h = e.css.valueOf(), f = t.ignoreErrors, w = h.length, p = 0, C = [], m = [];
|
|
3754
3754
|
function g(v) {
|
|
3755
3755
|
throw e.error("Unclosed " + v, p);
|
|
3756
3756
|
}
|
|
3757
3757
|
return { back: function(v) {
|
|
3758
3758
|
m.push(v);
|
|
3759
3759
|
}, endOfFile: function() {
|
|
3760
|
-
return m.length === 0 && p >=
|
|
3760
|
+
return m.length === 0 && p >= w;
|
|
3761
3761
|
}, nextToken: function(v) {
|
|
3762
3762
|
if (m.length) return m.pop();
|
|
3763
|
-
if (p >=
|
|
3764
|
-
let
|
|
3763
|
+
if (p >= w) return;
|
|
3764
|
+
let I = !!v && v.ignoreUnclosed;
|
|
3765
3765
|
switch (r = h.charCodeAt(p), r) {
|
|
3766
3766
|
case Dr:
|
|
3767
3767
|
case jt:
|
|
@@ -3786,11 +3786,11 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3786
3786
|
break;
|
|
3787
3787
|
}
|
|
3788
3788
|
case cm:
|
|
3789
|
-
if (c =
|
|
3789
|
+
if (c = C.length ? C.pop()[1] : "", u = h.charCodeAt(p + 1), c === "url" && u !== cn && u !== pa && u !== jt && u !== Dr && u !== _r && u !== Pr && u !== Nr) {
|
|
3790
3790
|
s = p;
|
|
3791
3791
|
do {
|
|
3792
3792
|
if (o = !1, s = h.indexOf(")", s + 1), s === -1) {
|
|
3793
|
-
if (f ||
|
|
3793
|
+
if (f || I) {
|
|
3794
3794
|
s = p;
|
|
3795
3795
|
break;
|
|
3796
3796
|
}
|
|
@@ -3806,7 +3806,7 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3806
3806
|
n = r === cn ? "'" : '"', s = p;
|
|
3807
3807
|
do {
|
|
3808
3808
|
if (o = !1, s = h.indexOf(n, s + 1), s === -1) {
|
|
3809
|
-
if (f ||
|
|
3809
|
+
if (f || I) {
|
|
3810
3810
|
s = p + 1;
|
|
3811
3811
|
break;
|
|
3812
3812
|
}
|
|
@@ -3828,7 +3828,7 @@ let bm = Vs, vm = function(e, t = {}) {
|
|
|
3828
3828
|
d = ["word", h.slice(p, s + 1), p, s], p = s;
|
|
3829
3829
|
break;
|
|
3830
3830
|
default:
|
|
3831
|
-
r === ha && h.charCodeAt(p + 1) === mm ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f ||
|
|
3831
|
+
r === ha && h.charCodeAt(p + 1) === mm ? (s = h.indexOf("*/", p + 2) + 1, s === 0 && (f || I ? s = h.length : g("comment")), d = ["comment", h.slice(p, s + 1), p, s], p = s) : (Br.lastIndex = p + 1, Br.test(h), s = Br.lastIndex === 0 ? h.length - 1 : Br.lastIndex - 2, d = ["word", h.slice(p, s + 1), p, s], C.push(d), p = s);
|
|
3832
3832
|
}
|
|
3833
3833
|
return p++, d;
|
|
3834
3834
|
}, position: function() {
|
|
@@ -4092,7 +4092,7 @@ function os(e, t) {
|
|
|
4092
4092
|
}
|
|
4093
4093
|
var Zi = os;
|
|
4094
4094
|
os.default = os, Em.registerParse(os);
|
|
4095
|
-
let { isClean:
|
|
4095
|
+
let { isClean: Fe, my: Rm } = cr, Lm = fc, Om = js, Am = wt, Mm = Yi, ya = qi, Um = Zi, Dm = yr;
|
|
4096
4096
|
const Pm = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, _m = { AtRule: !0, AtRuleExit: !0, Comment: !0, CommentExit: !0, Declaration: !0, DeclarationExit: !0, Document: !0, DocumentExit: !0, Once: !0, OnceExit: !0, postcssPlugin: !0, prepare: !0, Root: !0, RootExit: !0, Rule: !0, RuleExit: !0 }, Nm = { Once: !0, postcssPlugin: !0, prepare: !0 };
|
|
4097
4097
|
function Wt(e) {
|
|
4098
4098
|
return typeof e == "object" && typeof e.then == "function";
|
|
@@ -4106,7 +4106,7 @@ function wa(e) {
|
|
|
4106
4106
|
return t = e.type === "document" ? ["Document", 0, "DocumentExit"] : e.type === "root" ? ["Root", 0, "RootExit"] : Dc(e), { eventIndex: 0, events: t, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
4107
4107
|
}
|
|
4108
4108
|
function ri(e) {
|
|
4109
|
-
return e[
|
|
4109
|
+
return e[Fe] = !1, e.nodes && e.nodes.forEach((t) => ri(t)), e;
|
|
4110
4110
|
}
|
|
4111
4111
|
let si = {}, Tt = class Pc {
|
|
4112
4112
|
constructor(t, r, s) {
|
|
@@ -4170,8 +4170,8 @@ let si = {}, Tt = class Pc {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
if (this.prepareVisitors(), this.hasListener) {
|
|
4172
4172
|
let t = this.result.root;
|
|
4173
|
-
for (; !t[
|
|
4174
|
-
t[
|
|
4173
|
+
for (; !t[Fe]; ) {
|
|
4174
|
+
t[Fe] = !0;
|
|
4175
4175
|
let r = [wa(t)];
|
|
4176
4176
|
for (; r.length > 0; ) {
|
|
4177
4177
|
let s = this.visitTick(r);
|
|
@@ -4229,7 +4229,7 @@ let si = {}, Tt = class Pc {
|
|
|
4229
4229
|
if (Wt(this.runOnRoot(t))) throw this.getAsyncError();
|
|
4230
4230
|
if (this.prepareVisitors(), this.hasListener) {
|
|
4231
4231
|
let t = this.result.root;
|
|
4232
|
-
for (; !t[
|
|
4232
|
+
for (; !t[Fe]; ) t[Fe] = !0, this.walkSync(t);
|
|
4233
4233
|
if (this.listeners.OnceExit) if (t.type === "document") for (let r of t.nodes) this.visitSync(this.listeners.OnceExit, r);
|
|
4234
4234
|
else this.visitSync(this.listeners.OnceExit, t);
|
|
4235
4235
|
}
|
|
@@ -4268,22 +4268,22 @@ let si = {}, Tt = class Pc {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
if (r.iterator !== 0) {
|
|
4270
4270
|
let a, o = r.iterator;
|
|
4271
|
-
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[
|
|
4271
|
+
for (; a = s.nodes[s.indexes[o]]; ) if (s.indexes[o] += 1, !a[Fe]) return a[Fe] = !0, void t.push(wa(a));
|
|
4272
4272
|
r.iterator = 0, delete s.indexes[o];
|
|
4273
4273
|
}
|
|
4274
4274
|
let i = r.events;
|
|
4275
4275
|
for (; r.eventIndex < i.length; ) {
|
|
4276
4276
|
let a = i[r.eventIndex];
|
|
4277
|
-
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[
|
|
4277
|
+
if (r.eventIndex += 1, a === 0) return void (s.nodes && s.nodes.length && (s[Fe] = !0, r.iterator = s.getIterator()));
|
|
4278
4278
|
if (this.listeners[a]) return void (r.visitors = this.listeners[a]);
|
|
4279
4279
|
}
|
|
4280
4280
|
t.pop();
|
|
4281
4281
|
}
|
|
4282
4282
|
walkSync(t) {
|
|
4283
|
-
t[
|
|
4283
|
+
t[Fe] = !0;
|
|
4284
4284
|
let r = Dc(t);
|
|
4285
4285
|
for (let s of r) if (s === 0) t.nodes && t.each((n) => {
|
|
4286
|
-
n[
|
|
4286
|
+
n[Fe] || this.walkSync(n);
|
|
4287
4287
|
});
|
|
4288
4288
|
else {
|
|
4289
4289
|
let n = this.listeners[s];
|
|
@@ -4464,7 +4464,7 @@ const ce = _h(mf);
|
|
|
4464
4464
|
ce.stringify, ce.fromJSON, ce.plugin, ce.parse, ce.list, ce.document, ce.comment, ce.atRule, ce.rule, ce.decl, ce.root, ce.CssSyntaxError, ce.Declaration, ce.Container, ce.Processor, ce.Document, ce.Comment, ce.Warning, ce.AtRule, ce.Result, ce.Input, ce.Rule, ce.Root, ce.Node;
|
|
4465
4465
|
class Xi {
|
|
4466
4466
|
constructor(...t) {
|
|
4467
|
-
|
|
4467
|
+
Re(this, "parentElement", null), Re(this, "parentNode", null), Re(this, "ownerDocument"), Re(this, "firstChild", null), Re(this, "lastChild", null), Re(this, "previousSibling", null), Re(this, "nextSibling", null), Re(this, "ELEMENT_NODE", 1), Re(this, "TEXT_NODE", 3), Re(this, "nodeType"), Re(this, "nodeName"), Re(this, "RRNodeType");
|
|
4468
4468
|
}
|
|
4469
4469
|
get childNodes() {
|
|
4470
4470
|
const t = [];
|
|
@@ -4517,7 +4517,7 @@ function Qi(e) {
|
|
|
4517
4517
|
}
|
|
4518
4518
|
}
|
|
4519
4519
|
const un = {};
|
|
4520
|
-
function
|
|
4520
|
+
function tt(e, t, r) {
|
|
4521
4521
|
var s;
|
|
4522
4522
|
const n = `${e}.${String(r)}`;
|
|
4523
4523
|
if (un[n]) return un[n].call(t);
|
|
@@ -4534,28 +4534,28 @@ function Ta(e, t, r) {
|
|
|
4534
4534
|
function Nc() {
|
|
4535
4535
|
return Qi("MutationObserver").constructor;
|
|
4536
4536
|
}
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4537
|
+
const V = { childNodes: function(e) {
|
|
4538
|
+
return tt("Node", e, "childNodes");
|
|
4539
4539
|
}, parentNode: function(e) {
|
|
4540
|
-
return
|
|
4540
|
+
return tt("Node", e, "parentNode");
|
|
4541
4541
|
}, parentElement: function(e) {
|
|
4542
|
-
return
|
|
4542
|
+
return tt("Node", e, "parentElement");
|
|
4543
4543
|
}, textContent: function(e) {
|
|
4544
|
-
return
|
|
4544
|
+
return tt("Node", e, "textContent");
|
|
4545
4545
|
}, contains: function(e, t) {
|
|
4546
4546
|
return Ta("Node", e, "contains")(t);
|
|
4547
4547
|
}, getRootNode: function(e) {
|
|
4548
4548
|
return Ta("Node", e, "getRootNode")();
|
|
4549
4549
|
}, host: function(e) {
|
|
4550
|
-
return e && "host" in e ?
|
|
4550
|
+
return e && "host" in e ? tt("ShadowRoot", e, "host") : null;
|
|
4551
4551
|
}, styleSheets: function(e) {
|
|
4552
4552
|
return e.styleSheets;
|
|
4553
4553
|
}, shadowRoot: function(e) {
|
|
4554
|
-
return e && "shadowRoot" in e ?
|
|
4554
|
+
return e && "shadowRoot" in e ? tt("Element", e, "shadowRoot") : null;
|
|
4555
4555
|
}, querySelector: function(e, t) {
|
|
4556
|
-
return
|
|
4556
|
+
return tt("Element", e, "querySelector")(t);
|
|
4557
4557
|
}, querySelectorAll: function(e, t) {
|
|
4558
|
-
return
|
|
4558
|
+
return tt("Element", e, "querySelectorAll")(t);
|
|
4559
4559
|
}, mutationObserver: Nc };
|
|
4560
4560
|
function be(e, t, r = document) {
|
|
4561
4561
|
const s = { capture: !0, passive: !0 };
|
|
@@ -4606,7 +4606,7 @@ let ws = Date.now;
|
|
|
4606
4606
|
function Fc(e) {
|
|
4607
4607
|
var t, r, s, n;
|
|
4608
4608
|
const i = e.document;
|
|
4609
|
-
return { left: i.scrollingElement ? i.scrollingElement.scrollLeft : e.pageXOffset !== void 0 ? e.pageXOffset : i.documentElement.scrollLeft || (i == null ? void 0 : i.body) && ((t =
|
|
4609
|
+
return { left: i.scrollingElement ? i.scrollingElement.scrollLeft : e.pageXOffset !== void 0 ? e.pageXOffset : i.documentElement.scrollLeft || (i == null ? void 0 : i.body) && ((t = V.parentElement(i.body)) == null ? void 0 : t.scrollLeft) || ((r = i == null ? void 0 : i.body) == null ? void 0 : r.scrollLeft) || 0, top: i.scrollingElement ? i.scrollingElement.scrollTop : e.pageYOffset !== void 0 ? e.pageYOffset : (i == null ? void 0 : i.documentElement.scrollTop) || (i == null ? void 0 : i.body) && ((s = V.parentElement(i.body)) == null ? void 0 : s.scrollTop) || ((n = i == null ? void 0 : i.body) == null ? void 0 : n.scrollTop) || 0 };
|
|
4610
4610
|
}
|
|
4611
4611
|
function Bc() {
|
|
4612
4612
|
return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;
|
|
@@ -4615,7 +4615,7 @@ function zc() {
|
|
|
4615
4615
|
return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;
|
|
4616
4616
|
}
|
|
4617
4617
|
function jc(e) {
|
|
4618
|
-
return e ? e.nodeType === e.ELEMENT_NODE ? e :
|
|
4618
|
+
return e ? e.nodeType === e.ELEMENT_NODE ? e : V.parentElement(e) : null;
|
|
4619
4619
|
}
|
|
4620
4620
|
function Se(e, t, r, s) {
|
|
4621
4621
|
if (!e) return !1;
|
|
@@ -4636,7 +4636,7 @@ function Wc(e, t) {
|
|
|
4636
4636
|
if (Zt(e)) return !1;
|
|
4637
4637
|
const r = t.getId(e);
|
|
4638
4638
|
if (!t.has(r)) return !0;
|
|
4639
|
-
const s =
|
|
4639
|
+
const s = V.parentNode(e);
|
|
4640
4640
|
return (!s || s.nodeType !== e.DOCUMENT_NODE) && (!s || Wc(s, t));
|
|
4641
4641
|
}
|
|
4642
4642
|
function oi(e) {
|
|
@@ -4649,12 +4649,12 @@ function Gc(e, t) {
|
|
|
4649
4649
|
return !!(e.nodeName === "LINK" && e.nodeType === e.ELEMENT_NODE && e.getAttribute && e.getAttribute("rel") === "stylesheet" && t.getMeta(e));
|
|
4650
4650
|
}
|
|
4651
4651
|
function ai(e) {
|
|
4652
|
-
return !!e && (e instanceof Xi && "shadowRoot" in e ? !!e.shadowRoot : !!
|
|
4652
|
+
return !!e && (e instanceof Xi && "shadowRoot" in e ? !!e.shadowRoot : !!V.shadowRoot(e));
|
|
4653
4653
|
}
|
|
4654
4654
|
/[1-9][0-9]{12}/.test(Date.now().toString()) || (ws = () => (/* @__PURE__ */ new Date()).getTime());
|
|
4655
4655
|
class ff {
|
|
4656
4656
|
constructor() {
|
|
4657
|
-
|
|
4657
|
+
x(this, "id", 1), x(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), x(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
4658
4658
|
}
|
|
4659
4659
|
getId(t) {
|
|
4660
4660
|
return this.styleIDMap.get(t) ?? -1;
|
|
@@ -4680,7 +4680,7 @@ class ff {
|
|
|
4680
4680
|
function Hc(e) {
|
|
4681
4681
|
var t;
|
|
4682
4682
|
let r = null;
|
|
4683
|
-
return "getRootNode" in e && ((t =
|
|
4683
|
+
return "getRootNode" in e && ((t = V.getRootNode(e)) == null ? void 0 : t.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && V.host(V.getRootNode(e)) && (r = V.host(V.getRootNode(e))), r;
|
|
4684
4684
|
}
|
|
4685
4685
|
function gf(e) {
|
|
4686
4686
|
const t = e.ownerDocument;
|
|
@@ -4690,19 +4690,19 @@ function gf(e) {
|
|
|
4690
4690
|
for (; n = Hc(i); ) i = n;
|
|
4691
4691
|
return i;
|
|
4692
4692
|
}(e);
|
|
4693
|
-
return
|
|
4693
|
+
return V.contains(t, r);
|
|
4694
4694
|
}
|
|
4695
4695
|
function $c(e) {
|
|
4696
4696
|
const t = e.ownerDocument;
|
|
4697
|
-
return !!t && (
|
|
4697
|
+
return !!t && (V.contains(t, e) || gf(e));
|
|
4698
4698
|
}
|
|
4699
|
-
var Y = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(Y || {}), H = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e))(H || {}),
|
|
4699
|
+
var Y = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(Y || {}), H = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e))(H || {}), Ce = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(Ce || {}), He = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(He || {}), Ct = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(Ct || {}), kt = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(kt || {});
|
|
4700
4700
|
function La(e) {
|
|
4701
4701
|
return "__ln" in e;
|
|
4702
4702
|
}
|
|
4703
4703
|
class yf {
|
|
4704
4704
|
constructor() {
|
|
4705
|
-
|
|
4705
|
+
x(this, "length", 0), x(this, "head", null), x(this, "tail", null);
|
|
4706
4706
|
}
|
|
4707
4707
|
get(t) {
|
|
4708
4708
|
if (t >= this.length) throw new Error("Position outside of list range");
|
|
@@ -4729,36 +4729,36 @@ class yf {
|
|
|
4729
4729
|
const Oa = (e, t) => `${e}@${t}`;
|
|
4730
4730
|
class wf {
|
|
4731
4731
|
constructor() {
|
|
4732
|
-
|
|
4732
|
+
x(this, "frozen", !1), x(this, "locked", !1), x(this, "texts", []), x(this, "attributes", []), x(this, "attributeMap", /* @__PURE__ */ new WeakMap()), x(this, "removes", []), x(this, "mapRemoves", []), x(this, "movedMap", {}), x(this, "addedSet", /* @__PURE__ */ new Set()), x(this, "movedSet", /* @__PURE__ */ new Set()), x(this, "droppedSet", /* @__PURE__ */ new Set()), x(this, "mutationCb"), x(this, "blockClass"), x(this, "blockSelector"), x(this, "maskTextClass"), x(this, "maskTextSelector"), x(this, "inlineStylesheet"), x(this, "maskInputOptions"), x(this, "maskTextFn"), x(this, "maskInputFn"), x(this, "keepIframeSrcFn"), x(this, "recordCanvas"), x(this, "inlineImages"), x(this, "slimDOMOptions"), x(this, "dataURLOptions"), x(this, "doc"), x(this, "mirror"), x(this, "iframeManager"), x(this, "stylesheetManager"), x(this, "shadowDomManager"), x(this, "canvasManager"), x(this, "processedNodeManager"), x(this, "unattachedDoc"), x(this, "processMutations", (t) => {
|
|
4733
4733
|
t.forEach(this.processMutation), this.emit();
|
|
4734
|
-
}),
|
|
4734
|
+
}), x(this, "emit", () => {
|
|
4735
4735
|
if (this.frozen || this.locked) return;
|
|
4736
4736
|
const t = [], r = /* @__PURE__ */ new Set(), s = new yf(), n = (l) => {
|
|
4737
4737
|
let c = l, u = -2;
|
|
4738
4738
|
for (; u === -2; ) c = c && c.nextSibling, u = c && this.mirror.getId(c);
|
|
4739
4739
|
return u;
|
|
4740
4740
|
}, i = (l) => {
|
|
4741
|
-
const c =
|
|
4741
|
+
const c = V.parentNode(l);
|
|
4742
4742
|
if (!c || !$c(l) || c.tagName === "TEXTAREA") return;
|
|
4743
4743
|
const u = Zt(c) ? this.mirror.getId(Hc(l)) : this.mirror.getId(c), d = n(l);
|
|
4744
4744
|
if (u === -1 || d === -1) return s.addNode(l);
|
|
4745
4745
|
const h = Et(l, { doc: this.doc, mirror: this.mirror, blockClass: this.blockClass, blockSelector: this.blockSelector, maskTextClass: this.maskTextClass, maskTextSelector: this.maskTextSelector, skipChild: !0, newlyAddedElement: !0, inlineStylesheet: this.inlineStylesheet, maskInputOptions: this.maskInputOptions, maskTextFn: this.maskTextFn, maskInputFn: this.maskInputFn, slimDOMOptions: this.slimDOMOptions, dataURLOptions: this.dataURLOptions, recordCanvas: this.recordCanvas, inlineImages: this.inlineImages, onSerialize: (f) => {
|
|
4746
|
-
Vc(f, this.mirror) && this.iframeManager.addIframe(f), Gc(f, this.mirror) && this.stylesheetManager.trackLinkElement(f), ai(l) && this.shadowDomManager.addShadowRoot(
|
|
4747
|
-
}, onIframeLoad: (f,
|
|
4748
|
-
this.iframeManager.attachIframe(f,
|
|
4749
|
-
}, onStylesheetLoad: (f,
|
|
4750
|
-
this.stylesheetManager.attachLinkElement(f,
|
|
4746
|
+
Vc(f, this.mirror) && this.iframeManager.addIframe(f), Gc(f, this.mirror) && this.stylesheetManager.trackLinkElement(f), ai(l) && this.shadowDomManager.addShadowRoot(V.shadowRoot(l), this.doc);
|
|
4747
|
+
}, onIframeLoad: (f, w) => {
|
|
4748
|
+
this.iframeManager.attachIframe(f, w), this.shadowDomManager.observeAttachShadow(f);
|
|
4749
|
+
}, onStylesheetLoad: (f, w) => {
|
|
4750
|
+
this.stylesheetManager.attachLinkElement(f, w);
|
|
4751
4751
|
} });
|
|
4752
4752
|
h && (t.push({ parentId: u, nextId: d, node: h }), r.add(h.id));
|
|
4753
4753
|
};
|
|
4754
4754
|
for (; this.mapRemoves.length; ) this.mirror.removeNodeFromMap(this.mapRemoves.shift());
|
|
4755
|
-
for (const l of this.movedSet) Aa(this.removes, l, this.mirror) && !this.movedSet.has(
|
|
4755
|
+
for (const l of this.movedSet) Aa(this.removes, l, this.mirror) && !this.movedSet.has(V.parentNode(l)) || i(l);
|
|
4756
4756
|
for (const l of this.addedSet) Ma(this.droppedSet, l) || Aa(this.removes, l, this.mirror) ? Ma(this.movedSet, l) ? i(l) : this.droppedSet.add(l) : i(l);
|
|
4757
4757
|
let a = null;
|
|
4758
4758
|
for (; s.length; ) {
|
|
4759
4759
|
let l = null;
|
|
4760
4760
|
if (a) {
|
|
4761
|
-
const c = this.mirror.getId(
|
|
4761
|
+
const c = this.mirror.getId(V.parentNode(a.value)), u = n(a.value);
|
|
4762
4762
|
c !== -1 && u !== -1 && (l = a);
|
|
4763
4763
|
}
|
|
4764
4764
|
if (!l) {
|
|
@@ -4766,17 +4766,17 @@ class wf {
|
|
|
4766
4766
|
for (; c; ) {
|
|
4767
4767
|
const u = c;
|
|
4768
4768
|
if (c = c.previous, u) {
|
|
4769
|
-
const d = this.mirror.getId(
|
|
4769
|
+
const d = this.mirror.getId(V.parentNode(u.value));
|
|
4770
4770
|
if (n(u.value) === -1) continue;
|
|
4771
4771
|
if (d !== -1) {
|
|
4772
4772
|
l = u;
|
|
4773
4773
|
break;
|
|
4774
4774
|
}
|
|
4775
4775
|
{
|
|
4776
|
-
const h = u.value, f =
|
|
4776
|
+
const h = u.value, f = V.parentNode(h);
|
|
4777
4777
|
if (f && f.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
4778
|
-
const
|
|
4779
|
-
if (this.mirror.getId(
|
|
4778
|
+
const w = V.host(f);
|
|
4779
|
+
if (this.mirror.getId(w) !== -1) {
|
|
4780
4780
|
l = u;
|
|
4781
4781
|
break;
|
|
4782
4782
|
}
|
|
@@ -4792,7 +4792,7 @@ class wf {
|
|
|
4792
4792
|
a = l.previous, s.removeNode(l.value), i(l.value);
|
|
4793
4793
|
}
|
|
4794
4794
|
const o = { texts: this.texts.map((l) => {
|
|
4795
|
-
const c = l.node, u =
|
|
4795
|
+
const c = l.node, u = V.parentNode(c);
|
|
4796
4796
|
return u && u.tagName === "TEXTAREA" && this.genTextAreaValueMutation(u), { id: this.mirror.getId(c), value: l.value };
|
|
4797
4797
|
}).filter((l) => !r.has(l.id)).filter((l) => this.mirror.has(l.id)), attributes: this.attributes.map((l) => {
|
|
4798
4798
|
const { attributes: c } = l;
|
|
@@ -4803,13 +4803,13 @@ class wf {
|
|
|
4803
4803
|
return { id: this.mirror.getId(l.node), attributes: c };
|
|
4804
4804
|
}).filter((l) => !r.has(l.id)).filter((l) => this.mirror.has(l.id)), removes: this.removes, adds: t };
|
|
4805
4805
|
(o.texts.length || o.attributes.length || o.removes.length || o.adds.length) && (this.texts = [], this.attributes = [], this.attributeMap = /* @__PURE__ */ new WeakMap(), this.removes = [], this.addedSet = /* @__PURE__ */ new Set(), this.movedSet = /* @__PURE__ */ new Set(), this.droppedSet = /* @__PURE__ */ new Set(), this.movedMap = {}, this.mutationCb(o));
|
|
4806
|
-
}),
|
|
4806
|
+
}), x(this, "genTextAreaValueMutation", (t) => {
|
|
4807
4807
|
let r = this.attributeMap.get(t);
|
|
4808
|
-
r || (r = { node: t, attributes: {}, styleDiff: {}, _unchangedStyles: {} }, this.attributes.push(r), this.attributeMap.set(t, r)), r.attributes.value = Array.from(
|
|
4809
|
-
}),
|
|
4808
|
+
r || (r = { node: t, attributes: {}, styleDiff: {}, _unchangedStyles: {} }, this.attributes.push(r), this.attributeMap.set(t, r)), r.attributes.value = Array.from(V.childNodes(t), (s) => V.textContent(s) || "").join("");
|
|
4809
|
+
}), x(this, "processMutation", (t) => {
|
|
4810
4810
|
if (!pn(t.target, this.mirror, this.slimDOMOptions)) switch (t.type) {
|
|
4811
4811
|
case "characterData": {
|
|
4812
|
-
const r =
|
|
4812
|
+
const r = V.textContent(t.target);
|
|
4813
4813
|
Se(t.target, this.blockClass, this.blockSelector, !1) || r === t.oldValue || this.texts.push({ value: Ml(t.target, this.maskTextClass, this.maskTextSelector, !0) && r ? this.maskTextFn ? this.maskTextFn(r, jc(t.target)) : r.replace(/[\S]/g, "*") : r, node: t.target });
|
|
4814
4814
|
break;
|
|
4815
4815
|
}
|
|
@@ -4846,13 +4846,13 @@ class wf {
|
|
|
4846
4846
|
if (Se(t.target, this.blockClass, this.blockSelector, !0)) return;
|
|
4847
4847
|
if (t.target.tagName === "TEXTAREA") return void this.genTextAreaValueMutation(t.target);
|
|
4848
4848
|
t.addedNodes.forEach((r) => this.genAdds(r, t.target)), t.removedNodes.forEach((r) => {
|
|
4849
|
-
const s = this.mirror.getId(r), n = Zt(t.target) ? this.mirror.getId(
|
|
4849
|
+
const s = this.mirror.getId(r), n = Zt(t.target) ? this.mirror.getId(V.host(t.target)) : this.mirror.getId(t.target);
|
|
4850
4850
|
Se(t.target, this.blockClass, this.blockSelector, !1) || pn(r, this.mirror, this.slimDOMOptions) || !function(i, a) {
|
|
4851
4851
|
return a.getId(i) !== -1;
|
|
4852
4852
|
}(r, this.mirror) || (this.addedSet.has(r) ? (li(this.addedSet, r), this.droppedSet.add(r)) : this.addedSet.has(t.target) && s === -1 || Wc(t.target, this.mirror) || (this.movedSet.has(r) && this.movedMap[Oa(s, n)] ? li(this.movedSet, r) : this.removes.push({ parentId: n, id: s, isShadow: !(!Zt(t.target) || !Xt(t.target)) || void 0 })), this.mapRemoves.push(r));
|
|
4853
4853
|
});
|
|
4854
4854
|
}
|
|
4855
|
-
}),
|
|
4855
|
+
}), x(this, "genAdds", (t, r) => {
|
|
4856
4856
|
if (!this.processedNodeManager.inOtherBuffer(t, this) && !this.addedSet.has(t) && !this.movedSet.has(t)) {
|
|
4857
4857
|
if (this.mirror.hasNode(t)) {
|
|
4858
4858
|
if (pn(t, this.mirror, this.slimDOMOptions)) return;
|
|
@@ -4860,7 +4860,7 @@ class wf {
|
|
|
4860
4860
|
let s = null;
|
|
4861
4861
|
r && this.mirror.hasNode(r) && (s = this.mirror.getId(r)), s && s !== -1 && (this.movedMap[Oa(this.mirror.getId(t), s)] = !0);
|
|
4862
4862
|
} else this.addedSet.add(t), this.droppedSet.delete(t);
|
|
4863
|
-
Se(t, this.blockClass, this.blockSelector, !1) || (
|
|
4863
|
+
Se(t, this.blockClass, this.blockSelector, !1) || (V.childNodes(t).forEach((s) => this.genAdds(s)), ai(t) && V.childNodes(V.shadowRoot(t)).forEach((s) => {
|
|
4864
4864
|
this.processedNodeManager.add(s, this), this.genAdds(s, t);
|
|
4865
4865
|
}));
|
|
4866
4866
|
}
|
|
@@ -4891,15 +4891,15 @@ class wf {
|
|
|
4891
4891
|
}
|
|
4892
4892
|
}
|
|
4893
4893
|
function li(e, t) {
|
|
4894
|
-
e.delete(t),
|
|
4894
|
+
e.delete(t), V.childNodes(t).forEach((r) => li(e, r));
|
|
4895
4895
|
}
|
|
4896
4896
|
function Aa(e, t, r) {
|
|
4897
4897
|
return e.length !== 0 && function(s, n, i) {
|
|
4898
|
-
let a =
|
|
4898
|
+
let a = V.parentNode(n);
|
|
4899
4899
|
for (; a; ) {
|
|
4900
4900
|
const o = i.getId(a);
|
|
4901
4901
|
if (s.some((l) => l.id === o)) return !0;
|
|
4902
|
-
a =
|
|
4902
|
+
a = V.parentNode(a);
|
|
4903
4903
|
}
|
|
4904
4904
|
return !1;
|
|
4905
4905
|
}(e, t, r);
|
|
@@ -4908,7 +4908,7 @@ function Ma(e, t) {
|
|
|
4908
4908
|
return e.size !== 0 && Yc(e, t);
|
|
4909
4909
|
}
|
|
4910
4910
|
function Yc(e, t) {
|
|
4911
|
-
const r =
|
|
4911
|
+
const r = V.parentNode(t);
|
|
4912
4912
|
return !!r && (!!e.has(r) || Yc(e, r));
|
|
4913
4913
|
}
|
|
4914
4914
|
let Qt;
|
|
@@ -4941,38 +4941,38 @@ function bf({ mouseInteractionCb: e, doc: t, mirror: r, blockClass: s, blockSele
|
|
|
4941
4941
|
};
|
|
4942
4942
|
const a = i.mouseInteraction === !0 || i.mouseInteraction === void 0 ? {} : i.mouseInteraction, o = [];
|
|
4943
4943
|
let l = null;
|
|
4944
|
-
return Object.keys(
|
|
4944
|
+
return Object.keys(Ce).filter((c) => Number.isNaN(Number(c)) && !c.endsWith("_Departed") && a[c] !== !1).forEach((c) => {
|
|
4945
4945
|
let u = ft(c);
|
|
4946
4946
|
const d = /* @__PURE__ */ ((h) => (f) => {
|
|
4947
|
-
const
|
|
4948
|
-
if (Se(
|
|
4949
|
-
let p = null,
|
|
4947
|
+
const w = er(f);
|
|
4948
|
+
if (Se(w, s, n, !0)) return;
|
|
4949
|
+
let p = null, C = h;
|
|
4950
4950
|
if ("pointerType" in f) {
|
|
4951
4951
|
switch (f.pointerType) {
|
|
4952
4952
|
case "mouse":
|
|
4953
|
-
p =
|
|
4953
|
+
p = He.Mouse;
|
|
4954
4954
|
break;
|
|
4955
4955
|
case "touch":
|
|
4956
|
-
p =
|
|
4956
|
+
p = He.Touch;
|
|
4957
4957
|
break;
|
|
4958
4958
|
case "pen":
|
|
4959
|
-
p =
|
|
4959
|
+
p = He.Pen;
|
|
4960
4960
|
}
|
|
4961
|
-
p ===
|
|
4962
|
-
} else oi(f) && (p =
|
|
4963
|
-
p !== null ? (l = p, (
|
|
4961
|
+
p === He.Touch ? Ce[h] === Ce.MouseDown ? C = "TouchStart" : Ce[h] === Ce.MouseUp && (C = "TouchEnd") : He.Pen;
|
|
4962
|
+
} else oi(f) && (p = He.Touch);
|
|
4963
|
+
p !== null ? (l = p, (C.startsWith("Touch") && p === He.Touch || C.startsWith("Mouse") && p === He.Mouse) && (p = null)) : Ce[h] === Ce.Click && (p = l, l = null);
|
|
4964
4964
|
const m = oi(f) ? f.changedTouches[0] : f;
|
|
4965
4965
|
if (!m) return;
|
|
4966
|
-
const g = r.getId(
|
|
4967
|
-
$(e)({ type:
|
|
4966
|
+
const g = r.getId(w), { clientX: v, clientY: I } = m;
|
|
4967
|
+
$(e)({ type: Ce[C], id: g, x: v, y: I, ...p !== null && { pointerType: p } });
|
|
4968
4968
|
})(c);
|
|
4969
|
-
if (window.PointerEvent) switch (
|
|
4970
|
-
case
|
|
4971
|
-
case
|
|
4969
|
+
if (window.PointerEvent) switch (Ce[c]) {
|
|
4970
|
+
case Ce.MouseDown:
|
|
4971
|
+
case Ce.MouseUp:
|
|
4972
4972
|
u = u.replace("mouse", "pointer");
|
|
4973
4973
|
break;
|
|
4974
|
-
case
|
|
4975
|
-
case
|
|
4974
|
+
case Ce.TouchStart:
|
|
4975
|
+
case Ce.TouchEnd:
|
|
4976
4976
|
return;
|
|
4977
4977
|
}
|
|
4978
4978
|
o.push(be(u, d, t));
|
|
@@ -5004,14 +5004,14 @@ function jr(e) {
|
|
|
5004
5004
|
return r;
|
|
5005
5005
|
}(e, []);
|
|
5006
5006
|
}
|
|
5007
|
-
function
|
|
5007
|
+
function rt(e, t, r) {
|
|
5008
5008
|
let s, n;
|
|
5009
5009
|
return e ? (e.ownerNode ? s = t.getId(e.ownerNode) : n = r.getId(e), { styleId: n, id: s }) : {};
|
|
5010
5010
|
}
|
|
5011
5011
|
function Kc({ mirror: e, stylesheetManager: t }, r) {
|
|
5012
5012
|
var s, n, i;
|
|
5013
5013
|
let a = null;
|
|
5014
|
-
a = r.nodeName === "#document" ? e.getId(r) : e.getId(
|
|
5014
|
+
a = r.nodeName === "#document" ? e.getId(r) : e.getId(V.host(r));
|
|
5015
5015
|
const o = r.nodeName === "#document" ? (s = r.defaultView) == null ? void 0 : s.Document : (i = (n = r.ownerDocument) == null ? void 0 : n.defaultView) == null ? void 0 : i.ShadowRoot, l = o != null && o.prototype ? Object.getOwnPropertyDescriptor(o == null ? void 0 : o.prototype, "adoptedStyleSheets") : void 0;
|
|
5016
5016
|
return a !== null && a !== -1 && o && l ? (Object.defineProperty(r, "adoptedStyleSheets", { configurable: l.configurable, enumerable: l.enumerable, get() {
|
|
5017
5017
|
var c;
|
|
@@ -5035,73 +5035,73 @@ function Sf(e, t = {}) {
|
|
|
5035
5035
|
};
|
|
5036
5036
|
let s;
|
|
5037
5037
|
(function(m, g) {
|
|
5038
|
-
const { mutationCb: v, mousemoveCb:
|
|
5038
|
+
const { mutationCb: v, mousemoveCb: I, mouseInteractionCb: O, scrollCb: E, viewportResizeCb: A, inputCb: M, mediaInteractionCb: k, styleSheetRuleCb: T, styleDeclarationCb: R, canvasMutationCb: S, fontCb: P, selectionCb: D, customElementCb: b } = m;
|
|
5039
5039
|
m.mutationCb = (...y) => {
|
|
5040
5040
|
g.mutation && g.mutation(...y), v(...y);
|
|
5041
5041
|
}, m.mousemoveCb = (...y) => {
|
|
5042
|
-
g.mousemove && g.mousemove(...y),
|
|
5042
|
+
g.mousemove && g.mousemove(...y), I(...y);
|
|
5043
5043
|
}, m.mouseInteractionCb = (...y) => {
|
|
5044
5044
|
g.mouseInteraction && g.mouseInteraction(...y), O(...y);
|
|
5045
5045
|
}, m.scrollCb = (...y) => {
|
|
5046
5046
|
g.scroll && g.scroll(...y), E(...y);
|
|
5047
5047
|
}, m.viewportResizeCb = (...y) => {
|
|
5048
|
-
g.viewportResize && g.viewportResize(...y),
|
|
5048
|
+
g.viewportResize && g.viewportResize(...y), A(...y);
|
|
5049
5049
|
}, m.inputCb = (...y) => {
|
|
5050
|
-
g.input && g.input(...y),
|
|
5050
|
+
g.input && g.input(...y), M(...y);
|
|
5051
5051
|
}, m.mediaInteractionCb = (...y) => {
|
|
5052
5052
|
g.mediaInteaction && g.mediaInteaction(...y), k(...y);
|
|
5053
5053
|
}, m.styleSheetRuleCb = (...y) => {
|
|
5054
5054
|
g.styleSheetRule && g.styleSheetRule(...y), T(...y);
|
|
5055
5055
|
}, m.styleDeclarationCb = (...y) => {
|
|
5056
|
-
g.styleDeclaration && g.styleDeclaration(...y),
|
|
5056
|
+
g.styleDeclaration && g.styleDeclaration(...y), R(...y);
|
|
5057
5057
|
}, m.canvasMutationCb = (...y) => {
|
|
5058
5058
|
g.canvasMutation && g.canvasMutation(...y), S(...y);
|
|
5059
5059
|
}, m.fontCb = (...y) => {
|
|
5060
|
-
g.font && g.font(...y),
|
|
5060
|
+
g.font && g.font(...y), P(...y);
|
|
5061
5061
|
}, m.selectionCb = (...y) => {
|
|
5062
|
-
g.selection && g.selection(...y),
|
|
5062
|
+
g.selection && g.selection(...y), D(...y);
|
|
5063
5063
|
}, m.customElementCb = (...y) => {
|
|
5064
|
-
g.customElement && g.customElement(...y),
|
|
5064
|
+
g.customElement && g.customElement(...y), b(...y);
|
|
5065
5065
|
};
|
|
5066
5066
|
})(e, t), e.recordDOM && (s = qc(e, e.doc));
|
|
5067
|
-
const n = function({ mousemoveCb: m, sampling: g, doc: v, mirror:
|
|
5067
|
+
const n = function({ mousemoveCb: m, sampling: g, doc: v, mirror: I }) {
|
|
5068
5068
|
if (g.mousemove === !1) return () => {
|
|
5069
5069
|
};
|
|
5070
5070
|
const O = typeof g.mousemove == "number" ? g.mousemove : 50, E = typeof g.mousemoveCallback == "number" ? g.mousemoveCallback : 500;
|
|
5071
|
-
let
|
|
5071
|
+
let A, M = [];
|
|
5072
5072
|
const k = $t($((S) => {
|
|
5073
|
-
const
|
|
5074
|
-
m(
|
|
5073
|
+
const P = Date.now() - A;
|
|
5074
|
+
m(M.map((D) => (D.timeOffset -= P, D)), S), M = [], A = null;
|
|
5075
5075
|
}), E), T = $($t($((S) => {
|
|
5076
|
-
const
|
|
5077
|
-
|
|
5078
|
-
}), O, { trailing: !1 })),
|
|
5076
|
+
const P = er(S), { clientX: D, clientY: b } = oi(S) ? S.changedTouches[0] : S;
|
|
5077
|
+
A || (A = ws()), M.push({ x: D, y: b, id: I.getId(P), timeOffset: ws() - A }), k(typeof DragEvent < "u" && S instanceof DragEvent ? H.Drag : S instanceof MouseEvent ? H.MouseMove : H.TouchMove);
|
|
5078
|
+
}), O, { trailing: !1 })), R = [be("mousemove", T, v), be("touchmove", T, v), be("drag", T, v)];
|
|
5079
5079
|
return $(() => {
|
|
5080
|
-
|
|
5080
|
+
R.forEach((S) => S());
|
|
5081
5081
|
});
|
|
5082
5082
|
}(e), i = bf(e), a = Jc(e), o = function({ viewportResizeCb: m }, { win: g }) {
|
|
5083
|
-
let v = -1,
|
|
5083
|
+
let v = -1, I = -1;
|
|
5084
5084
|
return be("resize", $($t($(() => {
|
|
5085
5085
|
const O = Bc(), E = zc();
|
|
5086
|
-
v === O &&
|
|
5086
|
+
v === O && I === E || (m({ width: Number(E), height: Number(O) }), v = O, I = E);
|
|
5087
5087
|
}), 200)), g);
|
|
5088
|
-
}(e, { win: r }), l = function({ inputCb: m, doc: g, mirror: v, blockClass:
|
|
5088
|
+
}(e, { win: r }), l = function({ inputCb: m, doc: g, mirror: v, blockClass: I, blockSelector: O, ignoreClass: E, ignoreSelector: A, maskInputOptions: M, maskInputFn: k, sampling: T, userTriggeredOnInput: R }) {
|
|
5089
5089
|
function S(F) {
|
|
5090
5090
|
let j = er(F);
|
|
5091
5091
|
const L = F.isTrusted, _ = j && j.tagName;
|
|
5092
|
-
if (j && _ === "OPTION" && (j =
|
|
5092
|
+
if (j && _ === "OPTION" && (j = V.parentElement(j)), !j || !_ || vf.indexOf(_) < 0 || Se(j, I, O, !0) || j.classList.contains(E) || A && j.matches(A)) return;
|
|
5093
5093
|
let te = j.value, q = !1;
|
|
5094
5094
|
const me = Di(j) || "";
|
|
5095
|
-
me === "radio" || me === "checkbox" ? q = j.checked : (
|
|
5096
|
-
const
|
|
5097
|
-
me === "radio" &&
|
|
5098
|
-
if (
|
|
5099
|
-
const
|
|
5100
|
-
|
|
5095
|
+
me === "radio" || me === "checkbox" ? q = j.checked : (M[_.toLowerCase()] || M[me]) && (te = Ui({ element: j, maskInputOptions: M, tagName: _, type: me, value: te, maskInputFn: k })), P(j, R ? { text: te, isChecked: q, userTriggered: L } : { text: te, isChecked: q });
|
|
5096
|
+
const _e = j.name;
|
|
5097
|
+
me === "radio" && _e && q && g.querySelectorAll(`input[type="radio"][name="${_e}"]`).forEach((we) => {
|
|
5098
|
+
if (we !== j) {
|
|
5099
|
+
const G = we.value;
|
|
5100
|
+
P(we, R ? { text: G, isChecked: !q, userTriggered: !1 } : { text: G, isChecked: !q });
|
|
5101
5101
|
}
|
|
5102
5102
|
});
|
|
5103
5103
|
}
|
|
5104
|
-
function
|
|
5104
|
+
function P(F, j) {
|
|
5105
5105
|
const L = Ua.get(F);
|
|
5106
5106
|
if (!L || L.text !== j.text || L.isChecked !== j.isChecked) {
|
|
5107
5107
|
Ua.set(F, j);
|
|
@@ -5109,25 +5109,25 @@ function Sf(e, t = {}) {
|
|
|
5109
5109
|
$(m)({ ...j, id: _ });
|
|
5110
5110
|
}
|
|
5111
5111
|
}
|
|
5112
|
-
const
|
|
5113
|
-
if (!
|
|
5114
|
-
|
|
5112
|
+
const D = (T.input === "last" ? ["change"] : ["input", "change"]).map((F) => be(F, $(S), g)), b = g.defaultView;
|
|
5113
|
+
if (!b) return () => {
|
|
5114
|
+
D.forEach((F) => F());
|
|
5115
5115
|
};
|
|
5116
|
-
const y =
|
|
5117
|
-
return y && y.set &&
|
|
5116
|
+
const y = b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype, "value"), U = [[b.HTMLInputElement.prototype, "value"], [b.HTMLInputElement.prototype, "checked"], [b.HTMLSelectElement.prototype, "value"], [b.HTMLTextAreaElement.prototype, "value"], [b.HTMLSelectElement.prototype, "selectedIndex"], [b.HTMLOptionElement.prototype, "selected"]];
|
|
5117
|
+
return y && y.set && D.push(...U.map((F) => $s(F[0], F[1], { set() {
|
|
5118
5118
|
$(S)({ target: this, isTrusted: !1 });
|
|
5119
|
-
} }, !1,
|
|
5120
|
-
|
|
5119
|
+
} }, !1, b))), $(() => {
|
|
5120
|
+
D.forEach((F) => F());
|
|
5121
5121
|
});
|
|
5122
|
-
}(e), c = function({ mediaInteractionCb: m, blockClass: g, blockSelector: v, mirror:
|
|
5123
|
-
const
|
|
5124
|
-
const
|
|
5125
|
-
if (!
|
|
5126
|
-
const { currentTime: S, volume:
|
|
5127
|
-
m({ type: k, id:
|
|
5128
|
-
}), O.media || 500)),
|
|
5122
|
+
}(e), c = function({ mediaInteractionCb: m, blockClass: g, blockSelector: v, mirror: I, sampling: O, doc: E }) {
|
|
5123
|
+
const A = $((k) => $t($((T) => {
|
|
5124
|
+
const R = er(T);
|
|
5125
|
+
if (!R || Se(R, g, v, !0)) return;
|
|
5126
|
+
const { currentTime: S, volume: P, muted: D, playbackRate: b, loop: y } = R;
|
|
5127
|
+
m({ type: k, id: I.getId(R), currentTime: S, volume: P, muted: D, playbackRate: b, loop: y });
|
|
5128
|
+
}), O.media || 500)), M = [be("play", A(kt.Play), E), be("pause", A(kt.Pause), E), be("seeked", A(kt.Seeked), E), be("volumechange", A(kt.VolumeChange), E), be("ratechange", A(kt.RateChange), E)];
|
|
5129
5129
|
return $(() => {
|
|
5130
|
-
|
|
5130
|
+
M.forEach((k) => k());
|
|
5131
5131
|
});
|
|
5132
5132
|
}(e);
|
|
5133
5133
|
let u = () => {
|
|
@@ -5135,121 +5135,121 @@ function Sf(e, t = {}) {
|
|
|
5135
5135
|
}, h = () => {
|
|
5136
5136
|
}, f = () => {
|
|
5137
5137
|
};
|
|
5138
|
-
e.recordDOM && (u = function({ styleSheetRuleCb: m, mirror: g, stylesheetManager: v }, { win:
|
|
5139
|
-
if (!
|
|
5138
|
+
e.recordDOM && (u = function({ styleSheetRuleCb: m, mirror: g, stylesheetManager: v }, { win: I }) {
|
|
5139
|
+
if (!I.CSSStyleSheet || !I.CSSStyleSheet.prototype) return () => {
|
|
5140
5140
|
};
|
|
5141
|
-
const O =
|
|
5142
|
-
|
|
5143
|
-
const [
|
|
5144
|
-
return (y && y !== -1 ||
|
|
5145
|
-
}) }),
|
|
5146
|
-
const
|
|
5147
|
-
return
|
|
5141
|
+
const O = I.CSSStyleSheet.prototype.insertRule;
|
|
5142
|
+
I.CSSStyleSheet.prototype.insertRule = new Proxy(O, { apply: $((R, S, P) => {
|
|
5143
|
+
const [D, b] = P, { id: y, styleId: U } = rt(S, g, v.styleMirror);
|
|
5144
|
+
return (y && y !== -1 || U && U !== -1) && m({ id: y, styleId: U, adds: [{ rule: D, index: b }] }), R.apply(S, P);
|
|
5145
|
+
}) }), I.CSSStyleSheet.prototype.addRule = function(R, S, P = this.cssRules.length) {
|
|
5146
|
+
const D = `${R} { ${S} }`;
|
|
5147
|
+
return I.CSSStyleSheet.prototype.insertRule.apply(this, [D, P]);
|
|
5148
5148
|
};
|
|
5149
|
-
const E =
|
|
5150
|
-
let
|
|
5151
|
-
|
|
5152
|
-
const [
|
|
5153
|
-
return (
|
|
5154
|
-
}) }),
|
|
5155
|
-
return
|
|
5156
|
-
},
|
|
5157
|
-
const [
|
|
5158
|
-
return (
|
|
5159
|
-
}) })),
|
|
5160
|
-
const [
|
|
5161
|
-
return (
|
|
5149
|
+
const E = I.CSSStyleSheet.prototype.deleteRule;
|
|
5150
|
+
let A, M;
|
|
5151
|
+
I.CSSStyleSheet.prototype.deleteRule = new Proxy(E, { apply: $((R, S, P) => {
|
|
5152
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5153
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, removes: [{ index: D }] }), R.apply(S, P);
|
|
5154
|
+
}) }), I.CSSStyleSheet.prototype.removeRule = function(R) {
|
|
5155
|
+
return I.CSSStyleSheet.prototype.deleteRule.apply(this, [R]);
|
|
5156
|
+
}, I.CSSStyleSheet.prototype.replace && (A = I.CSSStyleSheet.prototype.replace, I.CSSStyleSheet.prototype.replace = new Proxy(A, { apply: $((R, S, P) => {
|
|
5157
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5158
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, replace: D }), R.apply(S, P);
|
|
5159
|
+
}) })), I.CSSStyleSheet.prototype.replaceSync && (M = I.CSSStyleSheet.prototype.replaceSync, I.CSSStyleSheet.prototype.replaceSync = new Proxy(M, { apply: $((R, S, P) => {
|
|
5160
|
+
const [D] = P, { id: b, styleId: y } = rt(S, g, v.styleMirror);
|
|
5161
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, replaceSync: D }), R.apply(S, P);
|
|
5162
5162
|
}) }));
|
|
5163
5163
|
const k = {};
|
|
5164
|
-
Vr("CSSGroupingRule") ? k.CSSGroupingRule =
|
|
5164
|
+
Vr("CSSGroupingRule") ? k.CSSGroupingRule = I.CSSGroupingRule : (Vr("CSSMediaRule") && (k.CSSMediaRule = I.CSSMediaRule), Vr("CSSConditionRule") && (k.CSSConditionRule = I.CSSConditionRule), Vr("CSSSupportsRule") && (k.CSSSupportsRule = I.CSSSupportsRule));
|
|
5165
5165
|
const T = {};
|
|
5166
|
-
return Object.entries(k).forEach(([
|
|
5167
|
-
T[
|
|
5168
|
-
const [y,
|
|
5169
|
-
return (F && F !== -1 || j && j !== -1) && m({ id: F, styleId: j, adds: [{ rule: y, index: [...jr(
|
|
5170
|
-
}) }), S.prototype.deleteRule = new Proxy(T[
|
|
5171
|
-
const [y] =
|
|
5172
|
-
return (
|
|
5166
|
+
return Object.entries(k).forEach(([R, S]) => {
|
|
5167
|
+
T[R] = { insertRule: S.prototype.insertRule, deleteRule: S.prototype.deleteRule }, S.prototype.insertRule = new Proxy(T[R].insertRule, { apply: $((P, D, b) => {
|
|
5168
|
+
const [y, U] = b, { id: F, styleId: j } = rt(D.parentStyleSheet, g, v.styleMirror);
|
|
5169
|
+
return (F && F !== -1 || j && j !== -1) && m({ id: F, styleId: j, adds: [{ rule: y, index: [...jr(D), U || 0] }] }), P.apply(D, b);
|
|
5170
|
+
}) }), S.prototype.deleteRule = new Proxy(T[R].deleteRule, { apply: $((P, D, b) => {
|
|
5171
|
+
const [y] = b, { id: U, styleId: F } = rt(D.parentStyleSheet, g, v.styleMirror);
|
|
5172
|
+
return (U && U !== -1 || F && F !== -1) && m({ id: U, styleId: F, removes: [{ index: [...jr(D), y] }] }), P.apply(D, b);
|
|
5173
5173
|
}) });
|
|
5174
5174
|
}), $(() => {
|
|
5175
|
-
|
|
5176
|
-
S.prototype.insertRule = T[
|
|
5175
|
+
I.CSSStyleSheet.prototype.insertRule = O, I.CSSStyleSheet.prototype.deleteRule = E, A && (I.CSSStyleSheet.prototype.replace = A), M && (I.CSSStyleSheet.prototype.replaceSync = M), Object.entries(k).forEach(([R, S]) => {
|
|
5176
|
+
S.prototype.insertRule = T[R].insertRule, S.prototype.deleteRule = T[R].deleteRule;
|
|
5177
5177
|
});
|
|
5178
5178
|
});
|
|
5179
|
-
}(e, { win: r }), d = Kc(e, e.doc), h = function({ styleDeclarationCb: m, mirror: g, ignoreCSSAttributes: v, stylesheetManager:
|
|
5179
|
+
}(e, { win: r }), d = Kc(e, e.doc), h = function({ styleDeclarationCb: m, mirror: g, ignoreCSSAttributes: v, stylesheetManager: I }, { win: O }) {
|
|
5180
5180
|
const E = O.CSSStyleDeclaration.prototype.setProperty;
|
|
5181
|
-
O.CSSStyleDeclaration.prototype.setProperty = new Proxy(E, { apply: $((
|
|
5182
|
-
var
|
|
5183
|
-
const [S,
|
|
5184
|
-
if (v.has(S)) return E.apply(k, [S,
|
|
5185
|
-
const { id:
|
|
5186
|
-
return (
|
|
5181
|
+
O.CSSStyleDeclaration.prototype.setProperty = new Proxy(E, { apply: $((M, k, T) => {
|
|
5182
|
+
var R;
|
|
5183
|
+
const [S, P, D] = T;
|
|
5184
|
+
if (v.has(S)) return E.apply(k, [S, P, D]);
|
|
5185
|
+
const { id: b, styleId: y } = rt((R = k.parentRule) == null ? void 0 : R.parentStyleSheet, g, I.styleMirror);
|
|
5186
|
+
return (b && b !== -1 || y && y !== -1) && m({ id: b, styleId: y, set: { property: S, value: P, priority: D }, index: jr(k.parentRule) }), M.apply(k, T);
|
|
5187
5187
|
}) });
|
|
5188
|
-
const
|
|
5189
|
-
return O.CSSStyleDeclaration.prototype.removeProperty = new Proxy(
|
|
5190
|
-
var
|
|
5188
|
+
const A = O.CSSStyleDeclaration.prototype.removeProperty;
|
|
5189
|
+
return O.CSSStyleDeclaration.prototype.removeProperty = new Proxy(A, { apply: $((M, k, T) => {
|
|
5190
|
+
var R;
|
|
5191
5191
|
const [S] = T;
|
|
5192
|
-
if (v.has(S)) return
|
|
5193
|
-
const { id:
|
|
5194
|
-
return (
|
|
5192
|
+
if (v.has(S)) return A.apply(k, [S]);
|
|
5193
|
+
const { id: P, styleId: D } = rt((R = k.parentRule) == null ? void 0 : R.parentStyleSheet, g, I.styleMirror);
|
|
5194
|
+
return (P && P !== -1 || D && D !== -1) && m({ id: P, styleId: D, remove: { property: S }, index: jr(k.parentRule) }), M.apply(k, T);
|
|
5195
5195
|
}) }), $(() => {
|
|
5196
|
-
O.CSSStyleDeclaration.prototype.setProperty = E, O.CSSStyleDeclaration.prototype.removeProperty =
|
|
5196
|
+
O.CSSStyleDeclaration.prototype.setProperty = E, O.CSSStyleDeclaration.prototype.removeProperty = A;
|
|
5197
5197
|
});
|
|
5198
5198
|
}(e, { win: r }), e.collectFonts && (f = function({ fontCb: m, doc: g }) {
|
|
5199
5199
|
const v = g.defaultView;
|
|
5200
5200
|
if (!v) return () => {
|
|
5201
5201
|
};
|
|
5202
|
-
const
|
|
5203
|
-
v.FontFace = function(
|
|
5204
|
-
const
|
|
5205
|
-
return O.set(
|
|
5202
|
+
const I = [], O = /* @__PURE__ */ new WeakMap(), E = v.FontFace;
|
|
5203
|
+
v.FontFace = function(M, k, T) {
|
|
5204
|
+
const R = new E(M, k, T);
|
|
5205
|
+
return O.set(R, { family: M, buffer: typeof k != "string", descriptors: T, fontSource: typeof k == "string" ? k : JSON.stringify(Array.from(new Uint8Array(k))) }), R;
|
|
5206
5206
|
};
|
|
5207
|
-
const
|
|
5207
|
+
const A = At(g.fonts, "add", function(M) {
|
|
5208
5208
|
return function(k) {
|
|
5209
5209
|
return setTimeout($(() => {
|
|
5210
5210
|
const T = O.get(k);
|
|
5211
5211
|
T && (m(T), O.delete(k));
|
|
5212
|
-
}), 0),
|
|
5212
|
+
}), 0), M.apply(this, [k]);
|
|
5213
5213
|
};
|
|
5214
5214
|
});
|
|
5215
|
-
return
|
|
5215
|
+
return I.push(() => {
|
|
5216
5216
|
v.FontFace = E;
|
|
5217
|
-
}),
|
|
5218
|
-
|
|
5217
|
+
}), I.push(A), $(() => {
|
|
5218
|
+
I.forEach((M) => M());
|
|
5219
5219
|
});
|
|
5220
5220
|
}(e)));
|
|
5221
|
-
const
|
|
5222
|
-
const { doc: g, mirror: v, blockClass:
|
|
5223
|
-
let
|
|
5224
|
-
const
|
|
5221
|
+
const w = function(m) {
|
|
5222
|
+
const { doc: g, mirror: v, blockClass: I, blockSelector: O, selectionCb: E } = m;
|
|
5223
|
+
let A = !0;
|
|
5224
|
+
const M = $(() => {
|
|
5225
5225
|
const k = g.getSelection();
|
|
5226
|
-
if (!k ||
|
|
5227
|
-
|
|
5228
|
-
const T = [],
|
|
5229
|
-
for (let S = 0; S <
|
|
5230
|
-
const
|
|
5231
|
-
Se(
|
|
5226
|
+
if (!k || A && (k != null && k.isCollapsed)) return;
|
|
5227
|
+
A = k.isCollapsed || !1;
|
|
5228
|
+
const T = [], R = k.rangeCount || 0;
|
|
5229
|
+
for (let S = 0; S < R; S++) {
|
|
5230
|
+
const P = k.getRangeAt(S), { startContainer: D, startOffset: b, endContainer: y, endOffset: U } = P;
|
|
5231
|
+
Se(D, I, O, !0) || Se(y, I, O, !0) || T.push({ start: v.getId(D), startOffset: b, end: v.getId(y), endOffset: U });
|
|
5232
5232
|
}
|
|
5233
5233
|
E({ ranges: T });
|
|
5234
5234
|
});
|
|
5235
|
-
return
|
|
5235
|
+
return M(), be("selectionchange", M);
|
|
5236
5236
|
}(e), p = function({ doc: m, customElementCb: g }) {
|
|
5237
5237
|
const v = m.defaultView;
|
|
5238
|
-
return v && v.customElements ? At(v.customElements, "define", function(
|
|
5239
|
-
return function(O, E,
|
|
5238
|
+
return v && v.customElements ? At(v.customElements, "define", function(I) {
|
|
5239
|
+
return function(O, E, A) {
|
|
5240
5240
|
try {
|
|
5241
5241
|
g({ define: { name: O } });
|
|
5242
5242
|
} catch {
|
|
5243
5243
|
console.warn(`Custom element callback failed for ${O}`);
|
|
5244
5244
|
}
|
|
5245
|
-
return
|
|
5245
|
+
return I.apply(this, [O, E, A]);
|
|
5246
5246
|
};
|
|
5247
5247
|
}) : () => {
|
|
5248
5248
|
};
|
|
5249
|
-
}(e),
|
|
5250
|
-
for (const m of e.plugins)
|
|
5249
|
+
}(e), C = [];
|
|
5250
|
+
for (const m of e.plugins) C.push(m.observer(m.callback, r, m.options));
|
|
5251
5251
|
return $(() => {
|
|
5252
|
-
mt.forEach((m) => m.reset()), s == null || s.disconnect(), n(), i(), a(), o(), l(), c(), u(), d(), h(), f(),
|
|
5252
|
+
mt.forEach((m) => m.reset()), s == null || s.disconnect(), n(), i(), a(), o(), l(), c(), u(), d(), h(), f(), w(), p(), C.forEach((m) => m());
|
|
5253
5253
|
});
|
|
5254
5254
|
}
|
|
5255
5255
|
function Wr(e) {
|
|
@@ -5260,7 +5260,7 @@ function Vr(e) {
|
|
|
5260
5260
|
}
|
|
5261
5261
|
class Da {
|
|
5262
5262
|
constructor(t) {
|
|
5263
|
-
|
|
5263
|
+
x(this, "iframeIdToRemoteIdMap", /* @__PURE__ */ new WeakMap()), x(this, "iframeRemoteIdToIdMap", /* @__PURE__ */ new WeakMap()), this.generateIdFn = t;
|
|
5264
5264
|
}
|
|
5265
5265
|
getId(t, r, s, n) {
|
|
5266
5266
|
const i = s || this.getIdToRemoteIdMap(t), a = n || this.getRemoteIdToIdMap(t);
|
|
@@ -5294,7 +5294,7 @@ class Da {
|
|
|
5294
5294
|
}
|
|
5295
5295
|
class If {
|
|
5296
5296
|
constructor(t) {
|
|
5297
|
-
|
|
5297
|
+
x(this, "iframes", /* @__PURE__ */ new WeakMap()), x(this, "crossOriginIframeMap", /* @__PURE__ */ new WeakMap()), x(this, "crossOriginIframeMirror", new Da(Ll)), x(this, "crossOriginIframeStyleMirror"), x(this, "crossOriginIframeRootIdMap", /* @__PURE__ */ new WeakMap()), x(this, "mirror"), x(this, "mutationCb"), x(this, "wrappedEmit"), x(this, "loadListener"), x(this, "stylesheetManager"), x(this, "recordCrossOriginIframes"), this.mutationCb = t.mutationCb, this.wrappedEmit = t.wrappedEmit, this.stylesheetManager = t.stylesheetManager, this.recordCrossOriginIframes = t.recordCrossOriginIframes, this.crossOriginIframeStyleMirror = new Da(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)), this.mirror = t.mirror, this.recordCrossOriginIframes && window.addEventListener("message", this.handleMessage.bind(this));
|
|
5298
5298
|
}
|
|
5299
5299
|
addIframe(t) {
|
|
5300
5300
|
this.iframes.set(t, !0), t.contentWindow && this.crossOriginIframeMap.set(t.contentWindow, t);
|
|
@@ -5398,7 +5398,7 @@ class If {
|
|
|
5398
5398
|
}
|
|
5399
5399
|
class Cf {
|
|
5400
5400
|
constructor(t) {
|
|
5401
|
-
|
|
5401
|
+
x(this, "shadowDoms", /* @__PURE__ */ new WeakSet()), x(this, "mutationCb"), x(this, "scrollCb"), x(this, "bypassOptions"), x(this, "mirror"), x(this, "restoreHandlers", []), this.mutationCb = t.mutationCb, this.scrollCb = t.scrollCb, this.bypassOptions = t.bypassOptions, this.mirror = t.mirror, this.init();
|
|
5402
5402
|
}
|
|
5403
5403
|
init() {
|
|
5404
5404
|
this.reset(), this.patchAttachShadow(Element, document);
|
|
@@ -5408,7 +5408,7 @@ class Cf {
|
|
|
5408
5408
|
this.shadowDoms.add(t);
|
|
5409
5409
|
const s = qc({ ...this.bypassOptions, doc: r, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }, t);
|
|
5410
5410
|
this.restoreHandlers.push(() => s.disconnect()), this.restoreHandlers.push(Jc({ ...this.bypassOptions, scrollCb: this.scrollCb, doc: t, mirror: this.mirror })), setTimeout(() => {
|
|
5411
|
-
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(
|
|
5411
|
+
t.adoptedStyleSheets && t.adoptedStyleSheets.length > 0 && this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets, this.mirror.getId(V.host(t))), this.restoreHandlers.push(Kc({ mirror: this.mirror, stylesheetManager: this.bypassOptions.stylesheetManager }, t));
|
|
5412
5412
|
}, 0);
|
|
5413
5413
|
}
|
|
5414
5414
|
observeAttachShadow(t) {
|
|
@@ -5418,7 +5418,7 @@ class Cf {
|
|
|
5418
5418
|
const s = this;
|
|
5419
5419
|
this.restoreHandlers.push(At(t.prototype, "attachShadow", function(n) {
|
|
5420
5420
|
return function(i) {
|
|
5421
|
-
const a = n.call(this, i), o =
|
|
5421
|
+
const a = n.call(this, i), o = V.shadowRoot(this);
|
|
5422
5422
|
return o && $c(this) && s.addShadowRoot(o, r), a;
|
|
5423
5423
|
};
|
|
5424
5424
|
}));
|
|
@@ -5495,8 +5495,8 @@ function Na(e, t, r, s, n, i) {
|
|
|
5495
5495
|
return function(...d) {
|
|
5496
5496
|
const h = u.apply(this, d);
|
|
5497
5497
|
if (Zc(h, i, this), "tagName" in this.canvas && !Se(this.canvas, s, n, !0)) {
|
|
5498
|
-
const f = Xc(d, i, this),
|
|
5499
|
-
r(this.canvas,
|
|
5498
|
+
const f = Xc(d, i, this), w = { type: t, property: l, args: f };
|
|
5499
|
+
r(this.canvas, w);
|
|
5500
5500
|
}
|
|
5501
5501
|
return h;
|
|
5502
5502
|
};
|
|
@@ -5528,7 +5528,7 @@ function Ef(e) {
|
|
|
5528
5528
|
}
|
|
5529
5529
|
class xf {
|
|
5530
5530
|
constructor(t) {
|
|
5531
|
-
|
|
5531
|
+
x(this, "pendingCanvasMutations", /* @__PURE__ */ new Map()), x(this, "rafStamps", { latestId: 0, invokeId: null }), x(this, "mirror"), x(this, "mutationCb"), x(this, "resetObservers"), x(this, "frozen", !1), x(this, "locked", !1), x(this, "processMutation", (l, c) => {
|
|
5532
5532
|
!(this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId) && this.rafStamps.invokeId || (this.rafStamps.invokeId = this.rafStamps.latestId), this.pendingCanvasMutations.has(l) || this.pendingCanvasMutations.set(l, []), this.pendingCanvasMutations.get(l).push(c);
|
|
5533
5533
|
});
|
|
5534
5534
|
const { sampling: r = "all", win: s, blockClass: n, blockSelector: i, recordCanvas: a, dataURLOptions: o } = t;
|
|
@@ -5552,29 +5552,29 @@ class xf {
|
|
|
5552
5552
|
initCanvasFPSObserver(t, r, s, n, i) {
|
|
5553
5553
|
const a = _a(r, s, n, !0), o = /* @__PURE__ */ new Map(), l = new Ef();
|
|
5554
5554
|
l.onmessage = (f) => {
|
|
5555
|
-
const { id:
|
|
5556
|
-
if (o.set(
|
|
5557
|
-
const { base64: p, type:
|
|
5558
|
-
this.mutationCb({ id:
|
|
5555
|
+
const { id: w } = f.data;
|
|
5556
|
+
if (o.set(w, !1), !("base64" in f.data)) return;
|
|
5557
|
+
const { base64: p, type: C, width: m, height: g } = f.data;
|
|
5558
|
+
this.mutationCb({ id: w, type: Ct["2D"], commands: [{ property: "clearRect", args: [0, 0, m, g] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: p }], type: C }] }, 0, 0] }] });
|
|
5559
5559
|
};
|
|
5560
5560
|
const c = 1e3 / t;
|
|
5561
5561
|
let u, d = 0;
|
|
5562
5562
|
const h = (f) => {
|
|
5563
5563
|
d && f - d < c || (d = f, (() => {
|
|
5564
|
-
const
|
|
5564
|
+
const w = [];
|
|
5565
5565
|
return r.document.querySelectorAll("canvas").forEach((p) => {
|
|
5566
|
-
Se(p, s, n, !0) ||
|
|
5567
|
-
}),
|
|
5568
|
-
})().forEach(async (
|
|
5566
|
+
Se(p, s, n, !0) || w.push(p);
|
|
5567
|
+
}), w;
|
|
5568
|
+
})().forEach(async (w) => {
|
|
5569
5569
|
var p;
|
|
5570
|
-
const
|
|
5571
|
-
if (o.get(
|
|
5572
|
-
if (o.set(
|
|
5573
|
-
const g =
|
|
5570
|
+
const C = this.mirror.getId(w);
|
|
5571
|
+
if (o.get(C) || w.width === 0 || w.height === 0) return;
|
|
5572
|
+
if (o.set(C, !0), ["webgl", "webgl2"].includes(w.__context)) {
|
|
5573
|
+
const g = w.getContext(w.__context);
|
|
5574
5574
|
((p = g == null ? void 0 : g.getContextAttributes()) == null ? void 0 : p.preserveDrawingBuffer) === !1 && g.clear(g.COLOR_BUFFER_BIT);
|
|
5575
5575
|
}
|
|
5576
|
-
const m = await createImageBitmap(
|
|
5577
|
-
l.postMessage({ id:
|
|
5576
|
+
const m = await createImageBitmap(w);
|
|
5577
|
+
l.postMessage({ id: C, bitmap: m, width: w.width, height: w.height, dataURLOptions: i.dataURLOptions }, [m]);
|
|
5578
5578
|
})), u = requestAnimationFrame(h);
|
|
5579
5579
|
};
|
|
5580
5580
|
u = requestAnimationFrame(h), this.resetObservers = () => {
|
|
@@ -5587,20 +5587,20 @@ class xf {
|
|
|
5587
5587
|
const d = [], h = Object.getOwnPropertyNames(l.CanvasRenderingContext2D.prototype);
|
|
5588
5588
|
for (const f of h) try {
|
|
5589
5589
|
if (typeof l.CanvasRenderingContext2D.prototype[f] != "function") continue;
|
|
5590
|
-
const
|
|
5591
|
-
return function(...
|
|
5590
|
+
const w = At(l.CanvasRenderingContext2D.prototype, f, function(p) {
|
|
5591
|
+
return function(...C) {
|
|
5592
5592
|
return Se(this.canvas, c, u, !0) || setTimeout(() => {
|
|
5593
|
-
const m = Xc(
|
|
5593
|
+
const m = Xc(C, l, this);
|
|
5594
5594
|
o(this.canvas, { type: Ct["2D"], property: f, args: m });
|
|
5595
|
-
}, 0), p.apply(this,
|
|
5595
|
+
}, 0), p.apply(this, C);
|
|
5596
5596
|
};
|
|
5597
5597
|
});
|
|
5598
|
-
d.push(
|
|
5598
|
+
d.push(w);
|
|
5599
5599
|
} catch {
|
|
5600
|
-
const
|
|
5600
|
+
const w = $s(l.CanvasRenderingContext2D.prototype, f, { set(p) {
|
|
5601
5601
|
o(this.canvas, { type: Ct["2D"], property: f, args: [p], setter: !0 });
|
|
5602
5602
|
} });
|
|
5603
|
-
d.push(
|
|
5603
|
+
d.push(w);
|
|
5604
5604
|
}
|
|
5605
5605
|
return () => {
|
|
5606
5606
|
d.forEach((f) => f());
|
|
@@ -5643,7 +5643,7 @@ class xf {
|
|
|
5643
5643
|
}
|
|
5644
5644
|
class Tf {
|
|
5645
5645
|
constructor(t) {
|
|
5646
|
-
|
|
5646
|
+
x(this, "trackedLinkElements", /* @__PURE__ */ new WeakSet()), x(this, "mutationCb"), x(this, "adoptedStyleSheetCb"), x(this, "styleMirror", new ff()), this.mutationCb = t.mutationCb, this.adoptedStyleSheetCb = t.adoptedStyleSheetCb;
|
|
5647
5647
|
}
|
|
5648
5648
|
attachLinkElement(t, r) {
|
|
5649
5649
|
"_cssText" in r.attributes && this.mutationCb({ adds: [], removes: [], texts: [], attributes: [{ id: r.id, attributes: r.attributes }] }), this.trackLinkElement(t);
|
|
@@ -5668,7 +5668,7 @@ class Tf {
|
|
|
5668
5668
|
}
|
|
5669
5669
|
class Rf {
|
|
5670
5670
|
constructor() {
|
|
5671
|
-
|
|
5671
|
+
x(this, "nodeMap", /* @__PURE__ */ new WeakMap()), x(this, "active", !1);
|
|
5672
5672
|
}
|
|
5673
5673
|
inOtherBuffer(t, r) {
|
|
5674
5674
|
const s = this.nodeMap.get(t);
|
|
@@ -5691,21 +5691,21 @@ try {
|
|
|
5691
5691
|
} catch (e) {
|
|
5692
5692
|
console.debug("Unable to override Array.from", e);
|
|
5693
5693
|
}
|
|
5694
|
-
const
|
|
5694
|
+
const Oe = new Rl();
|
|
5695
5695
|
function qt(e = {}) {
|
|
5696
|
-
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: s, blockClass: n = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", ignoreSelector: o = null, maskTextClass: l = "rr-mask", maskTextSelector: c = null, inlineStylesheet: u = !0, maskAllInputs: d, maskInputOptions: h, slimDOMOptions: f, maskInputFn:
|
|
5697
|
-
Qt =
|
|
5698
|
-
const y = !
|
|
5699
|
-
let
|
|
5696
|
+
const { emit: t, checkoutEveryNms: r, checkoutEveryNth: s, blockClass: n = "rr-block", blockSelector: i = null, ignoreClass: a = "rr-ignore", ignoreSelector: o = null, maskTextClass: l = "rr-mask", maskTextSelector: c = null, inlineStylesheet: u = !0, maskAllInputs: d, maskInputOptions: h, slimDOMOptions: f, maskInputFn: w, maskTextFn: p, hooks: C, packFn: m, sampling: g = {}, dataURLOptions: v = {}, mousemoveWait: I, recordDOM: O = !0, recordCanvas: E = !1, recordCrossOriginIframes: A = !1, recordAfter: M = e.recordAfter === "DOMContentLoaded" ? e.recordAfter : "load", userTriggeredOnInput: k = !1, collectFonts: T = !1, inlineImages: R = !1, plugins: S, keepIframeSrcFn: P = () => !1, ignoreCSSAttributes: D = /* @__PURE__ */ new Set([]), errorHandler: b } = e;
|
|
5697
|
+
Qt = b;
|
|
5698
|
+
const y = !A || window.parent === window;
|
|
5699
|
+
let U = !1;
|
|
5700
5700
|
if (!y) try {
|
|
5701
|
-
window.parent.document && (
|
|
5701
|
+
window.parent.document && (U = !1);
|
|
5702
5702
|
} catch {
|
|
5703
|
-
|
|
5703
|
+
U = !0;
|
|
5704
5704
|
}
|
|
5705
5705
|
if (y && !t) throw new Error("emit function is required");
|
|
5706
|
-
if (!y && !
|
|
5706
|
+
if (!y && !U) return () => {
|
|
5707
5707
|
};
|
|
5708
|
-
|
|
5708
|
+
I !== void 0 && g.mousemove === void 0 && (g.mousemove = I), Oe.reset();
|
|
5709
5709
|
const F = d === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : h !== void 0 ? h : { password: !0 }, j = f === !0 || f === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaVerification: !0, headMetaAuthorship: f === "all", headMetaDescKeywords: f === "all", headTitleMutations: f === "all" } : f || {};
|
|
5710
5710
|
let L;
|
|
5711
5711
|
(function(W = window) {
|
|
@@ -5713,73 +5713,73 @@ function qt(e = {}) {
|
|
|
5713
5713
|
})();
|
|
5714
5714
|
let _ = 0;
|
|
5715
5715
|
const te = (W) => {
|
|
5716
|
-
for (const
|
|
5717
|
-
return m && !
|
|
5716
|
+
for (const Ie of S || []) Ie.eventProcessor && (W = Ie.eventProcessor(W));
|
|
5717
|
+
return m && !U && (W = m(W)), W;
|
|
5718
5718
|
};
|
|
5719
|
-
ue = (W,
|
|
5719
|
+
ue = (W, Ie) => {
|
|
5720
5720
|
var ne;
|
|
5721
5721
|
const ae = W;
|
|
5722
|
-
if (ae.timestamp = ws(), !((ne = mt[0]) != null && ne.isFrozen()) || ae.type === Y.FullSnapshot || ae.type === Y.IncrementalSnapshot && ae.data.source === H.Mutation || mt.forEach((
|
|
5723
|
-
else if (
|
|
5724
|
-
const
|
|
5725
|
-
window.parent.postMessage(
|
|
5722
|
+
if (ae.timestamp = ws(), !((ne = mt[0]) != null && ne.isFrozen()) || ae.type === Y.FullSnapshot || ae.type === Y.IncrementalSnapshot && ae.data.source === H.Mutation || mt.forEach((Te) => Te.unfreeze()), y) t == null || t(te(ae), Ie);
|
|
5723
|
+
else if (U) {
|
|
5724
|
+
const Te = { type: "rrweb", event: te(ae), origin: window.location.origin, isCheckout: Ie };
|
|
5725
|
+
window.parent.postMessage(Te, "*");
|
|
5726
5726
|
}
|
|
5727
5727
|
if (ae.type === Y.FullSnapshot) L = ae, _ = 0;
|
|
5728
5728
|
else if (ae.type === Y.IncrementalSnapshot) {
|
|
5729
5729
|
if (ae.data.source === H.Mutation && ae.data.isAttachIframe) return;
|
|
5730
5730
|
_++;
|
|
5731
|
-
const
|
|
5732
|
-
(
|
|
5731
|
+
const Te = s && _ >= s, J = r && ae.timestamp - L.timestamp > r;
|
|
5732
|
+
(Te || J) && ls(!0);
|
|
5733
5733
|
}
|
|
5734
5734
|
};
|
|
5735
5735
|
const q = (W) => {
|
|
5736
5736
|
ue({ type: Y.IncrementalSnapshot, data: { source: H.Mutation, ...W } });
|
|
5737
|
-
}, me = (W) => ue({ type: Y.IncrementalSnapshot, data: { source: H.Scroll, ...W } }),
|
|
5738
|
-
for (const W of S || []) W.getMirror && W.getMirror({ nodeMirror:
|
|
5739
|
-
const
|
|
5740
|
-
hn = new xf({ recordCanvas: E, mutationCb:
|
|
5741
|
-
const
|
|
5737
|
+
}, me = (W) => ue({ type: Y.IncrementalSnapshot, data: { source: H.Scroll, ...W } }), _e = (W) => ue({ type: Y.IncrementalSnapshot, data: { source: H.CanvasMutation, ...W } }), we = new Tf({ mutationCb: q, adoptedStyleSheetCb: (W) => ue({ type: Y.IncrementalSnapshot, data: { source: H.AdoptedStyleSheet, ...W } }) }), G = new If({ mirror: Oe, mutationCb: q, stylesheetManager: we, recordCrossOriginIframes: A, wrappedEmit: ue });
|
|
5738
|
+
for (const W of S || []) W.getMirror && W.getMirror({ nodeMirror: Oe, crossOriginIframeMirror: G.crossOriginIframeMirror, crossOriginIframeStyleMirror: G.crossOriginIframeStyleMirror });
|
|
5739
|
+
const Le = new Rf();
|
|
5740
|
+
hn = new xf({ recordCanvas: E, mutationCb: _e, win: window, blockClass: n, blockSelector: i, mirror: Oe, sampling: g.canvas, dataURLOptions: v });
|
|
5741
|
+
const Qe = new Cf({ mutationCb: q, scrollCb: me, bypassOptions: { blockClass: n, blockSelector: i, maskTextClass: l, maskTextSelector: c, inlineStylesheet: u, maskInputOptions: F, dataURLOptions: v, maskTextFn: p, maskInputFn: w, recordCanvas: E, inlineImages: R, sampling: g, slimDOMOptions: j, iframeManager: G, stylesheetManager: we, canvasManager: hn, keepIframeSrcFn: P, processedNodeManager: Le }, mirror: Oe });
|
|
5742
5742
|
ls = (W = !1) => {
|
|
5743
5743
|
if (!O) return;
|
|
5744
|
-
ue({ type: Y.Meta, data: { href: window.location.href, width: zc(), height: Bc() } }, W),
|
|
5745
|
-
const
|
|
5746
|
-
const { mirror:
|
|
5747
|
-
return Et(ne, { doc: ne, mirror:
|
|
5748
|
-
}(document, { mirror:
|
|
5749
|
-
Vc(ne,
|
|
5744
|
+
ue({ type: Y.Meta, data: { href: window.location.href, width: zc(), height: Bc() } }, W), we.reset(), Qe.init(), mt.forEach((ne) => ne.lock());
|
|
5745
|
+
const Ie = function(ne, ae) {
|
|
5746
|
+
const { mirror: Te = new Rl(), blockClass: J = "rr-block", blockSelector: _t = null, maskTextClass: id = "rr-mask", maskTextSelector: od = null, inlineStylesheet: ad = !0, inlineImages: ld = !1, recordCanvas: cd = !1, maskAllInputs: qs = !1, maskTextFn: ud, maskInputFn: dd, slimDOM: Nt = !1, dataURLOptions: pd, preserveWhiteSpace: hd, onSerialize: md, onIframeLoad: fd, iframeLoadTimeout: gd, onStylesheetLoad: yd, stylesheetLoadTimeout: wd, keepIframeSrcFn: bd = () => !1 } = ae || {};
|
|
5747
|
+
return Et(ne, { doc: ne, mirror: Te, blockClass: J, blockSelector: _t, maskTextClass: id, maskTextSelector: od, skipChild: !1, inlineStylesheet: ad, maskInputOptions: qs === !0 ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0, password: !0 } : qs === !1 ? { password: !0 } : qs, maskTextFn: ud, maskInputFn: dd, slimDOMOptions: Nt === !0 || Nt === "all" ? { script: !0, comment: !0, headFavicon: !0, headWhitespace: !0, headMetaDescKeywords: Nt === "all", headMetaSocial: !0, headMetaRobots: !0, headMetaHttpEquiv: !0, headMetaAuthorship: !0, headMetaVerification: !0 } : Nt === !1 ? {} : Nt, dataURLOptions: pd, inlineImages: ld, recordCanvas: cd, preserveWhiteSpace: hd, onSerialize: md, onIframeLoad: fd, iframeLoadTimeout: gd, onStylesheetLoad: yd, stylesheetLoadTimeout: wd, keepIframeSrcFn: bd, newlyAddedElement: !1 });
|
|
5748
|
+
}(document, { mirror: Oe, blockClass: n, blockSelector: i, maskTextClass: l, maskTextSelector: c, inlineStylesheet: u, maskAllInputs: F, maskTextFn: p, maskInputFn: w, slimDOM: j, dataURLOptions: v, recordCanvas: E, inlineImages: R, onSerialize: (ne) => {
|
|
5749
|
+
Vc(ne, Oe) && G.addIframe(ne), Gc(ne, Oe) && we.trackLinkElement(ne), ai(ne) && Qe.addShadowRoot(V.shadowRoot(ne), document);
|
|
5750
5750
|
}, onIframeLoad: (ne, ae) => {
|
|
5751
|
-
|
|
5751
|
+
G.attachIframe(ne, ae), Qe.observeAttachShadow(ne);
|
|
5752
5752
|
}, onStylesheetLoad: (ne, ae) => {
|
|
5753
|
-
|
|
5754
|
-
}, keepIframeSrcFn:
|
|
5755
|
-
if (!
|
|
5756
|
-
ue({ type: Y.FullSnapshot, data: { node:
|
|
5753
|
+
we.attachLinkElement(ne, ae);
|
|
5754
|
+
}, keepIframeSrcFn: P });
|
|
5755
|
+
if (!Ie) return console.warn("Failed to snapshot the document");
|
|
5756
|
+
ue({ type: Y.FullSnapshot, data: { node: Ie, initialOffset: Fc(window) } }, W), mt.forEach((ne) => ne.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && we.adoptStyleSheets(document.adoptedStyleSheets, Oe.getId(document));
|
|
5757
5757
|
};
|
|
5758
5758
|
try {
|
|
5759
|
-
const W = [],
|
|
5760
|
-
var
|
|
5761
|
-
return $(Sf)({ mutationCb: q, mousemoveCb: (J, _t) => ue({ type: Y.IncrementalSnapshot, data: { source: _t, positions: J } }), mouseInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.MouseInteraction, ...J } }), scrollCb: me, viewportResizeCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.ViewportResize, ...J } }), inputCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.Input, ...J } }), mediaInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.MediaInteraction, ...J } }), styleSheetRuleCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.StyleSheetRule, ...J } }), styleDeclarationCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.StyleDeclaration, ...J } }), canvasMutationCb:
|
|
5759
|
+
const W = [], Ie = (ae) => {
|
|
5760
|
+
var Te;
|
|
5761
|
+
return $(Sf)({ mutationCb: q, mousemoveCb: (J, _t) => ue({ type: Y.IncrementalSnapshot, data: { source: _t, positions: J } }), mouseInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.MouseInteraction, ...J } }), scrollCb: me, viewportResizeCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.ViewportResize, ...J } }), inputCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.Input, ...J } }), mediaInteractionCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.MediaInteraction, ...J } }), styleSheetRuleCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.StyleSheetRule, ...J } }), styleDeclarationCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.StyleDeclaration, ...J } }), canvasMutationCb: _e, fontCb: (J) => ue({ type: Y.IncrementalSnapshot, data: { source: H.Font, ...J } }), selectionCb: (J) => {
|
|
5762
5762
|
ue({ type: Y.IncrementalSnapshot, data: { source: H.Selection, ...J } });
|
|
5763
5763
|
}, customElementCb: (J) => {
|
|
5764
5764
|
ue({ type: Y.IncrementalSnapshot, data: { source: H.CustomElement, ...J } });
|
|
5765
|
-
}, blockClass: n, ignoreClass: a, ignoreSelector: o, maskTextClass: l, maskTextSelector: c, maskInputOptions: F, inlineStylesheet: u, sampling: g, recordDOM: O, recordCanvas: E, inlineImages:
|
|
5765
|
+
}, blockClass: n, ignoreClass: a, ignoreSelector: o, maskTextClass: l, maskTextSelector: c, maskInputOptions: F, inlineStylesheet: u, sampling: g, recordDOM: O, recordCanvas: E, inlineImages: R, userTriggeredOnInput: k, collectFonts: T, doc: ae, maskInputFn: w, maskTextFn: p, keepIframeSrcFn: P, blockSelector: i, slimDOMOptions: j, dataURLOptions: v, mirror: Oe, iframeManager: G, stylesheetManager: we, shadowDomManager: Qe, processedNodeManager: Le, canvasManager: hn, ignoreCSSAttributes: D, plugins: ((Te = S == null ? void 0 : S.filter((J) => J.observer)) == null ? void 0 : Te.map((J) => ({ observer: J.observer, options: J.options, callback: (_t) => ue({ type: Y.Plugin, data: { plugin: J.name, payload: _t } }) }))) || [] }, C);
|
|
5766
5766
|
};
|
|
5767
|
-
|
|
5767
|
+
G.addLoadListener((ae) => {
|
|
5768
5768
|
try {
|
|
5769
|
-
W.push(
|
|
5770
|
-
} catch (
|
|
5771
|
-
console.warn(
|
|
5769
|
+
W.push(Ie(ae.contentDocument));
|
|
5770
|
+
} catch (Te) {
|
|
5771
|
+
console.warn(Te);
|
|
5772
5772
|
}
|
|
5773
5773
|
});
|
|
5774
5774
|
const ne = () => {
|
|
5775
|
-
ls(), W.push(
|
|
5775
|
+
ls(), W.push(Ie(document)), bs = !0;
|
|
5776
5776
|
};
|
|
5777
5777
|
return document.readyState === "interactive" || document.readyState === "complete" ? ne() : (W.push(be("DOMContentLoaded", () => {
|
|
5778
|
-
ue({ type: Y.DomContentLoaded, data: {} }),
|
|
5778
|
+
ue({ type: Y.DomContentLoaded, data: {} }), M === "DOMContentLoaded" && ne();
|
|
5779
5779
|
})), W.push(be("load", () => {
|
|
5780
|
-
ue({ type: Y.Load, data: {} }),
|
|
5780
|
+
ue({ type: Y.Load, data: {} }), M === "load" && ne();
|
|
5781
5781
|
}, window))), () => {
|
|
5782
|
-
W.forEach((ae) => ae()),
|
|
5782
|
+
W.forEach((ae) => ae()), Le.destroy(), bs = !1, Qt = void 0;
|
|
5783
5783
|
};
|
|
5784
5784
|
} catch (W) {
|
|
5785
5785
|
console.warn(W);
|
|
@@ -5794,8 +5794,8 @@ qt.addCustomEvent = (e, t) => {
|
|
|
5794
5794
|
}, qt.takeFullSnapshot = (e) => {
|
|
5795
5795
|
if (!bs) throw new Error("please take full snapshot after start recording");
|
|
5796
5796
|
ls(e);
|
|
5797
|
-
}, qt.mirror =
|
|
5798
|
-
var
|
|
5797
|
+
}, qt.mirror = Oe, (St = za || (za = {}))[St.NotStarted = 0] = "NotStarted", St[St.Running = 1] = "Running", St[St.Stopped = 2] = "Stopped";
|
|
5798
|
+
var Be = ((e) => (e.Closed = "close.click", e.Complete = "survey.completed", e.FeedbackClosed = "feedback.closed", e.PageChange = "page.change", e.API = "api", e.Override = "override", e))(Be || {}), B = ((e) => (e.ReplayCapture = "replay.capture", e.ReplayPaused = "replay.paused", e.ReplayResumed = "replay.resumed", e.FeedbackButtonLoaded = "feedback.button.loaded", e.SDKReady = "sdk.ready", e.SurveyAppeared = "survey.appeared", e.SurveyCloseRequested = "survey.closeRequested", e.SurveyClosed = "survey.closed", e.SurveyDimensions = "survey.dimensions", e.SurveyFadingOut = "survey.fadingOut", e.SurveyHeight = "survey.height", e.SurveyPresented = "survey.presented", e.SurveyLifeCycle = "survey.lifeCycle", e.SurveyWidth = "survey.width", e.SurveyWillClose = "survey.willClose", e.SurveyWillPresent = "survey.will.present", e.CloseSurveyOnOverlayClick = "close.survey.overlayClick", e.VisitorIDUpdated = "visitor.id.updated", e.QuestionAnswered = "question.answered", e))(B || {});
|
|
5799
5799
|
const hr = { FEEDBACK_BUTTON_LOADED: "feedback.button.loaded", SDK_READY: "sdk.ready", SURVEY_APPEARED: "survey.appeared", SURVEY_CLOSED: "survey.closed", SURVEY_DIMENSIONS: "survey.dimensions", SURVEY_FADING_OUT: "survey.fadingOut", SURVEY_HEIGHT: "survey.height", SURVEY_WIDTH: "survey.width", SURVEY_PRESENTED: "survey.presented", SURVEY_LIFE_CYCLE: "survey.lifeCycle", SURVEY_WILL_CLOSE: "survey.willClose", SURVEY_WILL_PRESENT: "survey.will.present", QUESTION_ANSWERED: "question.answered", REPLAY_CAPTURE: "replay.capture", CLOSE_SURVEY_ON_OVERLAY_CLICK: "close.survey.overlayClick", VISITOR_ID_UPDATED: "visitor.id.updated", DATA: { DISMISS_REASONS: { API: "api", CLOSED: "close.click", COMPLETE: "survey.completed", PAGE_CHANGE: "page.change", OVERRIDE: "override" }, SURVEY_ID: "survey.id" } };
|
|
5800
5800
|
let Hr;
|
|
5801
5801
|
const Lf = new Uint8Array(16);
|
|
@@ -5803,14 +5803,14 @@ function Of() {
|
|
|
5803
5803
|
if (!Hr && (Hr = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Hr)) throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
5804
5804
|
return Hr(Lf);
|
|
5805
5805
|
}
|
|
5806
|
-
const
|
|
5807
|
-
for (let e = 0; e < 256; ++e)
|
|
5806
|
+
const ge = [];
|
|
5807
|
+
for (let e = 0; e < 256; ++e) ge.push((e + 256).toString(16).slice(1));
|
|
5808
5808
|
const ja = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
5809
5809
|
function Ut(e, t, r) {
|
|
5810
5810
|
if (ja.randomUUID && !e) return ja.randomUUID();
|
|
5811
5811
|
const s = (e = e || {}).random || (e.rng || Of)();
|
|
5812
5812
|
return s[6] = 15 & s[6] | 64, s[8] = 63 & s[8] | 128, function(n, i = 0) {
|
|
5813
|
-
return
|
|
5813
|
+
return ge[n[i + 0]] + ge[n[i + 1]] + ge[n[i + 2]] + ge[n[i + 3]] + "-" + ge[n[i + 4]] + ge[n[i + 5]] + "-" + ge[n[i + 6]] + ge[n[i + 7]] + "-" + ge[n[i + 8]] + ge[n[i + 9]] + "-" + ge[n[i + 10]] + ge[n[i + 11]] + ge[n[i + 12]] + ge[n[i + 13]] + ge[n[i + 14]] + ge[n[i + 15]];
|
|
5814
5814
|
}(s);
|
|
5815
5815
|
}
|
|
5816
5816
|
const Jg = 360, Kg = "ul-app", Zg = "#e6e6e6", Xg = "#bd282a", Qg = 1030, N = new class {
|
|
@@ -6000,7 +6000,7 @@ class nu {
|
|
|
6000
6000
|
const ey = (e, t) => {
|
|
6001
6001
|
const r = [e[t]], s = e[t].groupId;
|
|
6002
6002
|
return s ? e.slice(t).reduce((n, i) => (i.groupId === s && n.push(i), n), []) : r;
|
|
6003
|
-
}, ty = (e) => e === "longFormSurvey", Q = new nu("sessionStorage"),
|
|
6003
|
+
}, ty = (e) => e === "longFormSurvey", Q = new nu("sessionStorage"), ut = new nu("localStorage");
|
|
6004
6004
|
class Uf {
|
|
6005
6005
|
constructor(t) {
|
|
6006
6006
|
de(this, "payload");
|
|
@@ -6028,8 +6028,8 @@ const _f = (e) => e._config && e._config.installationMethod ? e._config.installa
|
|
|
6028
6028
|
}, ci = (e = "") => {
|
|
6029
6029
|
iu = !0, ou = e;
|
|
6030
6030
|
};
|
|
6031
|
-
function
|
|
6032
|
-
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.
|
|
6031
|
+
function Ue(e = {}) {
|
|
6032
|
+
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.43.0", "x-ul-installation-method": _f(e), "sprig-modules": Df(), "x-ul-package-version": "2.43.0" };
|
|
6033
6033
|
if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
|
|
6034
6034
|
const r = JSON.parse(e.mobileHeadersJSON);
|
|
6035
6035
|
Object.assign(t, r);
|
|
@@ -6042,7 +6042,7 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
|
6042
6042
|
const r = new Uf(t);
|
|
6043
6043
|
return cs.push(r), r.promise;
|
|
6044
6044
|
}
|
|
6045
|
-
},
|
|
6045
|
+
}, Xe = async (e, t) => {
|
|
6046
6046
|
const { retries: r = 0, shouldDropOnRateLimit: s = !1, shouldRetryRequest: n = !1, ...i } = t, a = { url: e, options: i, retries: r, shouldDropOnRateLimit: s };
|
|
6047
6047
|
if ($r && !n) return Ha(a);
|
|
6048
6048
|
const o = { ok: !1, reportError: !1 };
|
|
@@ -6053,13 +6053,13 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
|
6053
6053
|
if (!$r && !s || n) {
|
|
6054
6054
|
$r = !0;
|
|
6055
6055
|
const c = l.headers.has("ratelimit-reset") ? Number(l.headers.get("ratelimit-reset")) : Pf;
|
|
6056
|
-
return await vs(1e3 * c),
|
|
6056
|
+
return await vs(1e3 * c), Xe(e, { ...i, shouldDropOnRateLimit: s, shouldRetryRequest: !0 });
|
|
6057
6057
|
}
|
|
6058
6058
|
return Ha(a);
|
|
6059
6059
|
}
|
|
6060
6060
|
if ($r = !1, cs.length && (cs.map((c) => {
|
|
6061
6061
|
const u = c.payload;
|
|
6062
|
-
|
|
6062
|
+
Xe(u.url, { ...u.options, retries: u.retries, shouldDropOnRateLimit: u.shouldDropOnRateLimit }).then((d) => {
|
|
6063
6063
|
c.resolveRequest(d);
|
|
6064
6064
|
});
|
|
6065
6065
|
}), cs = []), l.ok) {
|
|
@@ -6074,100 +6074,100 @@ const Ha = async ({ shouldDropOnRateLimit: e, ...t }) => {
|
|
|
6074
6074
|
return l;
|
|
6075
6075
|
} catch (l) {
|
|
6076
6076
|
const c = r + 1;
|
|
6077
|
-
return c > 5 || au ? { ok: !1, reportError: !1, error: l } : (await vs(1e3 * Math.pow(2, r)),
|
|
6077
|
+
return c > 5 || au ? { ok: !1, reportError: !1, error: l } : (await vs(1e3 * Math.pow(2, r)), Xe(e, { ...i, retries: c }));
|
|
6078
6078
|
}
|
|
6079
|
-
}, $a = "ul-view-sdk-script", Nf = /* @__PURE__ */ new Set(["ios", "android"]),
|
|
6080
|
-
async function
|
|
6079
|
+
}, $a = "ul-view-sdk-script", Nf = /* @__PURE__ */ new Set(["ios", "android"]), it = "visitors", ot = "environments";
|
|
6080
|
+
async function ze(e, t) {
|
|
6081
6081
|
var i, a, o;
|
|
6082
6082
|
const { shouldDropOnRateLimit: r, ...s } = t;
|
|
6083
|
-
s.headers = Object.assign(
|
|
6084
|
-
const n = await
|
|
6083
|
+
s.headers = Object.assign(Ue(window.UserLeap), s.headers);
|
|
6084
|
+
const n = await Xe(e, { ...s, shouldDropOnRateLimit: r });
|
|
6085
6085
|
if (n.ok) {
|
|
6086
6086
|
const l = (i = n.headers) == null ? void 0 : i.get("Authorization"), c = l ? l.split(" ") : void 0, u = c && c.length === 2 ? c[1] : void 0, d = (a = n.headers) == null ? void 0 : a.get("x-ul-visitor-id");
|
|
6087
6087
|
if (window.UserLeap.userId && d === window.UserLeap.visitorId) {
|
|
6088
|
-
const h =
|
|
6089
|
-
h && h[window.UserLeap.envId] === d && (delete h[window.UserLeap.envId],
|
|
6088
|
+
const h = ut.getItemObject("sprig.anon.env.vid.map");
|
|
6089
|
+
h && h[window.UserLeap.envId] === d && (delete h[window.UserLeap.envId], ut.setItemObject("sprig.anon.env.vid.map", h));
|
|
6090
6090
|
}
|
|
6091
|
-
u && d && (d !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (
|
|
6091
|
+
u && d && (d !== window.UserLeap.visitorId || window.UserLeap.token !== u) && (ke("token", u), ke("vid", d), z.emit(B.VisitorIDUpdated, { visitorId: d }), window.UserLeap.token = u, window.UserLeap.visitorId = d);
|
|
6092
6092
|
}
|
|
6093
6093
|
return (o = n.json) != null && o.logMessage && console.warn(`[Sprig] ${n.json.logMessage}`), n;
|
|
6094
6094
|
}
|
|
6095
|
-
function
|
|
6096
|
-
const r =
|
|
6095
|
+
function ke(e, t) {
|
|
6096
|
+
const r = ut.getItemObject("userleap.ids");
|
|
6097
6097
|
let s = r[window.UserLeap.envId];
|
|
6098
|
-
s ? s[e] = t : s = { [e]: t }, r[window.UserLeap.envId] = s,
|
|
6098
|
+
s ? s[e] = t : s = { [e]: t }, r[window.UserLeap.envId] = s, ut.setItemObject("userleap.ids", r);
|
|
6099
6099
|
}
|
|
6100
6100
|
function eo() {
|
|
6101
6101
|
return window.previewMode ? "0" : window.UserLeap.visitorId ?? "";
|
|
6102
6102
|
}
|
|
6103
|
-
function
|
|
6103
|
+
function Ae(e, t, r) {
|
|
6104
6104
|
const s = [window.UserLeap._API_URL, "sdk", e];
|
|
6105
6105
|
return t && t.forEach((n) => {
|
|
6106
|
-
s.push(n), n ===
|
|
6106
|
+
s.push(n), n === ot ? s.push(window.UserLeap.envId) : n === it && s.push(eo());
|
|
6107
6107
|
}), r && s.push(r), s.join("/");
|
|
6108
6108
|
}
|
|
6109
6109
|
const tr = async (e, t, r) => {
|
|
6110
|
-
var
|
|
6111
|
-
const { context: s, delay: n, avatars: i,
|
|
6112
|
-
if (
|
|
6110
|
+
var q, me, _e, we;
|
|
6111
|
+
const { context: s, delay: n, avatars: i, experimentFlags: a, forceBrandedLogo: o, endCard: l, isFeedback: c = !1, heatmap: u, locale: d, layout: h, previewMode: f, productConfig: w, questions: p, responseGroupUid: C, surveyId: m, uuid: g, vid: v, sessionReplay: I, studyType: O, surveyVisitorAttributes: E } = e, A = Ue(window.UserLeap), M = mr(A), k = Ys(A);
|
|
6112
|
+
if (I) if (M) z.emit(B.ReplayCapture, { responseGroupUid: C, hasQuestions: !!(p != null && p.length), surveyId: m, uploadId: I.uploadId, replayType: I.replayDurationType ?? "before", seconds: I.replayDurationSeconds, generateVideoUploadUrlPayload: { mediaRecordingUid: Ut(), mediaType: "screen", questionId: 1, responseGroupUid: C, surveyId: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), visitorId: window.UserLeap.visitorId, isReplay: !0 } });
|
|
6113
6113
|
else {
|
|
6114
6114
|
if (!se.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
|
|
6115
|
-
se.replay.scheduleOrCaptureReplay({ responseGroupId:
|
|
6115
|
+
se.replay.scheduleOrCaptureReplay({ responseGroupId: C, surveyId: m, visitorId: v, replayParams: I, completeUploadHeaders: A, apiUrl: window.UserLeap._API_URL, triggerTimestamp: Date.now(), isStandalone: p.length === 0 });
|
|
6116
6116
|
}
|
|
6117
|
-
if (
|
|
6117
|
+
if (u) {
|
|
6118
6118
|
if (!se.replay) return window.UserLeap.reportError("displayQuestions", new Error("Replay module not registered")), { success: !1, message: "Replay module not registered", surveyState: "no survey" };
|
|
6119
|
-
const { eventId:
|
|
6119
|
+
const { eventId: G, replayParams: Le, responseGroupUid: Qe, surveyId: W } = u;
|
|
6120
6120
|
await se.replay.initializeReplay({ maxReplayDurationSeconds: 300, maxInflightRequests: window.UserLeap.maxInflightReplayRequests, teardownAfter: !0, apiUrl: window.UserLeap._API_URL, replaySettings: r }), se.replay.tryReplayAction(() => {
|
|
6121
|
-
var
|
|
6122
|
-
return (
|
|
6121
|
+
var Ie;
|
|
6122
|
+
return (Ie = se.replay) == null ? void 0 : Ie.scheduleCapture({ apiUrl: window.UserLeap._API_URL, completeUploadHeaders: A, eventId: G, isHeatmap: !0, replayParams: Le, responseGroupId: Qe, surveyId: W, triggerTimestamp: Date.now(), visitorId: v });
|
|
6123
6123
|
}, "Error in scheduling/capturing replay");
|
|
6124
6124
|
}
|
|
6125
|
-
if (
|
|
6126
|
-
if (Ff(
|
|
6125
|
+
if (v == null || !(p != null && p.length)) return N.info("CannotDisplaySurvey", { vid: v }), { success: !1, message: "[Sprig] no survey found", surveyState: window.UserLeap.container ? "previous survey ready" : "no survey" };
|
|
6126
|
+
if (Ff(p)) return { success: !1, message: "[Sprig] bundled version does not support video voice", surveyState: "no survey" };
|
|
6127
6127
|
if (window.UserLeap.container) {
|
|
6128
6128
|
N.info("AlreadyDisplayingSurvey");
|
|
6129
|
-
const
|
|
6130
|
-
return console.warn(
|
|
6131
|
-
}
|
|
6132
|
-
if (
|
|
6133
|
-
const
|
|
6134
|
-
return window.UserLeap.reportError("DisplaySurvey", new Error(
|
|
6135
|
-
}
|
|
6136
|
-
N.info("ShowingSurvey", { surveyId:
|
|
6137
|
-
let
|
|
6138
|
-
const
|
|
6139
|
-
const { "view.version":
|
|
6140
|
-
|
|
6129
|
+
const G = "[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";
|
|
6130
|
+
return console.warn(G), { success: !1, message: G, surveyState: "previous survey ready" };
|
|
6131
|
+
}
|
|
6132
|
+
if (v !== window.UserLeap.visitorId && g !== window.UserLeap.visitorId && !window.previewMode) {
|
|
6133
|
+
const G = "Attempted to display survey to a different visitor";
|
|
6134
|
+
return window.UserLeap.reportError("DisplaySurvey", new Error(G)), { success: !1, message: G, surveyState: "no survey" };
|
|
6135
|
+
}
|
|
6136
|
+
N.info("ShowingSurvey", { surveyId: m }), (q = se.replay) == null || q.RecordSurveyShown({ id: m, userAgent: window.navigator.userAgent }), Af.disable(), z.emit(B.SurveyWillPresent, { name: B.SurveyWillPresent, "survey.id": m, layout: h });
|
|
6137
|
+
let T, R, S, P, D = document.createElement("div");
|
|
6138
|
+
const b = (G) => {
|
|
6139
|
+
const { "view.version": Le } = G;
|
|
6140
|
+
Le !== A["x-ul-sdk-version"] && cu(), z.removeListener("verify.view.version", b);
|
|
6141
6141
|
};
|
|
6142
|
-
z.on("verify.view.version",
|
|
6143
|
-
const
|
|
6144
|
-
return
|
|
6145
|
-
})() && (lu(
|
|
6146
|
-
const
|
|
6147
|
-
z.once(B.CloseSurveyOnOverlayClick,
|
|
6148
|
-
}, context: s, endCard:
|
|
6149
|
-
(
|
|
6150
|
-
const
|
|
6151
|
-
|
|
6152
|
-
const
|
|
6153
|
-
|
|
6154
|
-
const
|
|
6155
|
-
const
|
|
6156
|
-
return window.UserLeap.isMobileSDK ||
|
|
6157
|
-
}(),
|
|
6142
|
+
z.on("verify.view.version", b), window.UserLeap.useMobileStyling = k, su(A) ? (T = "ul-direct-embeded-frame", R = document.head, S = window, P = !1, (() => {
|
|
6143
|
+
const G = Ue(window.UserLeap), Le = mr(G), Qe = window.UserLeap.forceDirectEmbed, W = G["userleap-platform"] === "web";
|
|
6144
|
+
return Le || Qe && W;
|
|
6145
|
+
})() && (lu(m, c), D.id = T, window.UserLeap.container.appendChild(D), uu(), z.emit(B.SurveyLifeCycle, { state: "presented" }), z.emit(B.SurveyPresented, { name: B.SurveyPresented, "survey.id": m }))) : { frameId: T, contentWinDocHead: R, contentWindow: S, hasOverlay: P, iframe: D } = jf({ productConfig: w, useMobileStyling: k, surveyId: m, isFeedback: c, enableCspTrustedTypes: (me = window.UserLeap._config) == null ? void 0 : me.enableCspTrustedTypes }), window.UserLeap.frameId = T;
|
|
6146
|
+
const y = { apiURL: window.UserLeap._API_URL, avatars: i, cards: p, configureExitOnOverlayClick: (G) => {
|
|
6147
|
+
z.once(B.CloseSurveyOnOverlayClick, G);
|
|
6148
|
+
}, context: s, endCard: l, envId: window.UserLeap.envId, eventEmitFn: z.emit.bind(z), experimentFlags: a, fontFamily: window.UserLeap.fontFamily, fontFamilyURL: window.UserLeap.fontFamilyURL, forceBrandedLogo: o, frame: D, headers: A, layout: h, locale: d, mobileSDKVersion: window.UserLeap.mobileSDKVersion, previewKey: Q.getItem("sprig.previewKey"), previewMode: f || !!window.previewMode, productConfig: { framePosition: w == null ? void 0 : w.framePosition, desktopDisplay: w == null ? void 0 : w.desktopDisplay, placement: w == null ? void 0 : w.placement }, responseGroupUid: C, startingQuestionIdx: (_e = window.UserLeap.config) == null ? void 0 : _e.startingQuestionIdx, studyType: O, styleNonce: window.UserLeap.styleNonce, surveyId: m, tabTitle: document.title, trackPageViewUrl: t, ulEvents: hr, upchunkLibraryURL: window.UserLeap.upchunkLibraryURL, useMobileStyling: k, userId: g, viewDocument: S == null ? void 0 : S.document, viewWindow: S, visitorAttributes: { externalUserId: window.UserLeap.userId, email: window.UserLeap.email }, surveyVisitorAttributes: E || {}, ...window.UserLeap._config };
|
|
6149
|
+
(we = window.UserLeap._config) != null && we.startingQuestionIdx && (window.UserLeap._config = { ...window.UserLeap._config, startingQuestionIdx: null });
|
|
6150
|
+
const U = (c ? window.UserLeap.feedbackCustomStyles : window.UserLeap.customStyles) ?? w.customStyles;
|
|
6151
|
+
y.customStyles = U, S && (S.__cfg = y);
|
|
6152
|
+
const F = window.UserLeap.viewSDKURL ? window.UserLeap.viewSDKURL : y.path, j = document.getElementById($a);
|
|
6153
|
+
j && j.remove();
|
|
6154
|
+
const L = function() {
|
|
6155
|
+
const G = document.createElement("script");
|
|
6156
|
+
return window.UserLeap.isMobileSDK || G.setAttribute("type", "module"), window.UserLeap.nonce && G.setAttribute("nonce", window.UserLeap.nonce), G.id = $a, G;
|
|
6157
|
+
}(), _ = () => {
|
|
6158
6158
|
window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
|
|
6159
6159
|
};
|
|
6160
|
-
if (
|
|
6161
|
-
const { default:
|
|
6162
|
-
|
|
6163
|
-
} else
|
|
6164
|
-
window.UserLeap.container &&
|
|
6165
|
-
}),
|
|
6166
|
-
|
|
6160
|
+
if (y.installationMethod === "web-npm" || y.installationMethod === "web-npm-bundled") {
|
|
6161
|
+
const { default: G } = await import("./view-CHBo6RQ4.js").then((Le) => Le.z);
|
|
6162
|
+
G.configure(y), P && window.UserLeap.container && _();
|
|
6163
|
+
} else F && (L.src = `${F}${window.UserLeap.isMobileSDK ? "" : `?t=${Date.now()}`}`, P && L.addEventListener("load", () => {
|
|
6164
|
+
window.UserLeap.container && _();
|
|
6165
|
+
}), S == null || S.addEventListener("error", (G) => {
|
|
6166
|
+
G.target instanceof HTMLScriptElement && G.target.src === F && window.UserLeap.reportError("loadFrameScript", new Error("Frame script failed to load"));
|
|
6167
6167
|
}, { capture: !0, once: !0 }));
|
|
6168
|
-
|
|
6169
|
-
const
|
|
6170
|
-
return window.UserLeap.isMobileSDK && n && (
|
|
6168
|
+
R == null || R.appendChild(L);
|
|
6169
|
+
const te = { success: !0, surveyState: "ready", surveyId: m, responseGroupUid: C };
|
|
6170
|
+
return window.UserLeap.isMobileSDK && n && (te.delay = n), te;
|
|
6171
6171
|
};
|
|
6172
6172
|
function Ys(e) {
|
|
6173
6173
|
var r;
|
|
@@ -6205,7 +6205,7 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6205
6205
|
Vf();
|
|
6206
6206
|
const r = globalThis.UserLeap.container;
|
|
6207
6207
|
if (r) try {
|
|
6208
|
-
(s = r.parentNode) == null || s.removeChild(r), globalThis.UserLeap.container = null,
|
|
6208
|
+
(s = r.parentNode) == null || s.removeChild(r), globalThis.UserLeap.container = null, ke("trackStartUrl", null), z.emit(B.SurveyLifeCycle, { state: "dismissed" }), z.emit(B.SurveyClosed, { name: B.SurveyClosed, initiator: e, "survey.id": parseInt(r.dataset.studyId), ...t && { studyType: t } });
|
|
6209
6209
|
} catch (n) {
|
|
6210
6210
|
console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${e} ` + r), n instanceof Error && globalThis.UserLeap.reportError("dismissActiveSurvey", n);
|
|
6211
6211
|
}
|
|
@@ -6241,11 +6241,11 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6241
6241
|
}
|
|
6242
6242
|
}
|
|
6243
6243
|
return c && ((h, f) => {
|
|
6244
|
-
const
|
|
6245
|
-
|
|
6244
|
+
const w = { position: "fixed", overflow: "auto", top: "0px", left: "0px", display: "none", height: "100%", width: "100%", transition: "background-color 0.3s ease-out", zIndex: 2147483646 }, p = f ? h.overlayStyleMobile : h.overlayStyle;
|
|
6245
|
+
w["background-color"] = p === "light" ? "rgba(255,255,255, 0.95)" : "rgba(0,0,0,0.9)", f || (w.margin = "auto"), globalThis.UserLeap.container && Object.assign(globalThis.UserLeap.container.style, w);
|
|
6246
6246
|
})(i, r), Object.assign(e.style, n, l), c;
|
|
6247
6247
|
}, jf = ({ productConfig: e, useMobileStyling: t, surveyId: r, isFeedback: s, enableCspTrustedTypes: n }) => {
|
|
6248
|
-
var f,
|
|
6248
|
+
var f, w;
|
|
6249
6249
|
const i = ro, a = s && e.desktopDisplay === "slider";
|
|
6250
6250
|
lu(r, s, a), Wf();
|
|
6251
6251
|
const o = document.createElement("iframe");
|
|
@@ -6262,7 +6262,7 @@ const mn = "0px", lu = (e, t, r) => {
|
|
|
6262
6262
|
}, (f = globalThis.UserLeap.container) == null || f.appendChild(o), e && (t ? e.exitOnOverlayClickMobile : e.exitOnOverlayClick) && globalThis.UserLeap.container && (globalThis.UserLeap.container.onclick = () => {
|
|
6263
6263
|
z.emit(B.CloseSurveyOnOverlayClick);
|
|
6264
6264
|
}), z.emit(B.SurveyLifeCycle, { state: "presented" }), z.emit(B.SurveyPresented, { name: B.SurveyPresented, "survey.id": r });
|
|
6265
|
-
const d = (
|
|
6265
|
+
const d = (w = o.contentWindow) == null ? void 0 : w.document;
|
|
6266
6266
|
if (d && (d.open("text/html", "replace"), d.write(to("<!doctype html><head></head><body></body></html>", n, o.contentWindow)), d.close(), !t)) {
|
|
6267
6267
|
const p = d.body;
|
|
6268
6268
|
p.style.display = "flex", p.style.alignItems = "center";
|
|
@@ -6294,26 +6294,26 @@ function so(e, t) {
|
|
|
6294
6294
|
const pu = (e) => {
|
|
6295
6295
|
const { pageUrlEvents: t } = window.UserLeap._config, r = t == null ? void 0 : t.find((s) => s.id === e);
|
|
6296
6296
|
return !!r && so(r, window.location.href);
|
|
6297
|
-
},
|
|
6297
|
+
}, st = (e) => !!e && e.nodeType === Node.ELEMENT_NODE, Ja = (e) => e instanceof HTMLElement || e instanceof SVGElement, Ss = ({ document: e, elementId: t, styleString: r, nonce: s }) => {
|
|
6298
6298
|
const n = e.getElementById(t);
|
|
6299
6299
|
if (n) return void (n.textContent = r);
|
|
6300
6300
|
const i = e.createElement("style");
|
|
6301
6301
|
s && (i.nonce = s), i.textContent = r, i.id = t, e.head.appendChild(i);
|
|
6302
6302
|
}, Ka = (e, t) => {
|
|
6303
6303
|
const r = t.querySelector(e);
|
|
6304
|
-
if (!
|
|
6304
|
+
if (!st(r)) return 0;
|
|
6305
6305
|
const s = getComputedStyle(r);
|
|
6306
6306
|
return parseFloat(s.paddingLeft) + parseFloat(s.paddingRight) + (parseFloat(s.marginLeft) + parseFloat(s.marginRight)) + (parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth));
|
|
6307
6307
|
}, Gf = (e, t, r) => {
|
|
6308
6308
|
const s = e.querySelector(".ul-card__container"), n = e.querySelector(".ul-app");
|
|
6309
6309
|
let i = 600, a = 360;
|
|
6310
|
-
if (
|
|
6310
|
+
if (st(s) && st(n)) {
|
|
6311
6311
|
const o = s.querySelector(".ul-card--matrix_grid"), l = !o && t && r;
|
|
6312
6312
|
try {
|
|
6313
6313
|
l && (n.style.width = "360px"), i = s.scrollHeight, i += ((d) => {
|
|
6314
|
-
const h = d.querySelector(".sprig-question-body"), f = d.querySelector(".ul-card"),
|
|
6314
|
+
const h = d.querySelector(".sprig-question-body"), f = d.querySelector(".ul-card"), w = d.querySelector(".ul-card-main-content"), p = d.querySelector(".ul-footer"), C = d.querySelector(".sprig-container");
|
|
6315
6315
|
let m = 0;
|
|
6316
|
-
return
|
|
6316
|
+
return st(f) && (m += f.scrollHeight - f.clientHeight), st(w) && (m += w.scrollHeight - w.clientHeight), st(h) && (m += h.scrollHeight - h.clientHeight), st(p) && st(C) && C.clientHeight === 0 && (m += p.clientHeight), m;
|
|
6317
6317
|
})(e);
|
|
6318
6318
|
const c = getComputedStyle(s), u = parseFloat(c.marginTop) + parseFloat(c.marginBottom);
|
|
6319
6319
|
i += u + (parseFloat(c.borderTopWidth) + parseFloat(c.borderBottomWidth)), o && (a = o.scrollWidth, a += Ka(".ul-card__container", e), a += Ka(".sprig-question-body", e));
|
|
@@ -6326,7 +6326,7 @@ const pu = (e) => {
|
|
|
6326
6326
|
const t = e.querySelector(".ul-card__container");
|
|
6327
6327
|
t && (t.scrollTop = 0);
|
|
6328
6328
|
}, hu = () => X, Rt = () => document.getElementById("sprig-feedback-container"), ui = () => document.getElementById("sprig-feedback-loading-animation"), mu = () => !!document.getElementById(ro);
|
|
6329
|
-
let Za = !1, X = null,
|
|
6329
|
+
let Za = !1, X = null, je = null, no = !1, rr = null, pt = null;
|
|
6330
6330
|
const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is = () => {
|
|
6331
6331
|
var t;
|
|
6332
6332
|
const e = window.UserLeap.container;
|
|
@@ -6346,9 +6346,9 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6346
6346
|
}
|
|
6347
6347
|
return !1;
|
|
6348
6348
|
}, Jt = () => {
|
|
6349
|
-
if (!X || !
|
|
6349
|
+
if (!X || !je) return;
|
|
6350
6350
|
const e = ui();
|
|
6351
|
-
e && e.remove(), X.style.height = "auto", X.style.width = "auto",
|
|
6351
|
+
e && e.remove(), X.style.height = "auto", X.style.width = "auto", je.disabled = !1, no = !1;
|
|
6352
6352
|
}, di = () => {
|
|
6353
6353
|
if (X && !ui()) {
|
|
6354
6354
|
const e = (() => {
|
|
@@ -6367,7 +6367,7 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6367
6367
|
e && (X.style.height = "300px", X.style.width = "360px", X.appendChild(e));
|
|
6368
6368
|
}
|
|
6369
6369
|
}, Xa = () => {
|
|
6370
|
-
X &&
|
|
6370
|
+
X && je && (Cs(0), je.disabled = !0, no = !0);
|
|
6371
6371
|
}, yu = async (e, t, r) => {
|
|
6372
6372
|
const { buttonTheme: s, customStyles: n, eventId: i, placement: a, desktopDisplay: o, feedbackLabel: l, surveyUuid: c, surveyId: u } = e;
|
|
6373
6373
|
window.UserLeap.feedbackCustomStyles = void 0;
|
|
@@ -6380,36 +6380,36 @@ const Hf = ["bottom-left", "bottom-right", "center-left", "center-right"], Is =
|
|
|
6380
6380
|
const [h, f] = a.split("-");
|
|
6381
6381
|
((m) => {
|
|
6382
6382
|
if (Rt() || !Hf.includes(m)) return;
|
|
6383
|
-
const [g, v] = m.split("-"),
|
|
6384
|
-
|
|
6385
|
-
})(a), d = Rt(),
|
|
6386
|
-
const
|
|
6387
|
-
|
|
6383
|
+
const [g, v] = m.split("-"), I = document.createElement("div");
|
|
6384
|
+
I.id = "sprig-feedback-container", I.classList.add(`sprig-feedback-container-${v}`, `sprig-feedback-container-${g}`), document.body.appendChild(I);
|
|
6385
|
+
})(a), d = Rt(), je = document.createElement("button");
|
|
6386
|
+
const w = document.createElement("div");
|
|
6387
|
+
w.className = "sprig-feedback-button-label", w.innerText = l, je.appendChild(w), je.id = "sprig-feedback-button", je.classList.add(`sprig-feedback-button-${f}`, `sprig-feedback-button-${h}`, `sprig-feedback-button-${s}`, "fade-in-transition"), z.on(hr.SURVEY_FADING_OUT, fn), je.addEventListener("click", async () => {
|
|
6388
6388
|
const m = document.getElementById("sprig-feedback-error-container");
|
|
6389
6389
|
if (mu() || fu()) {
|
|
6390
6390
|
if (fn()) {
|
|
6391
|
-
z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator:
|
|
6391
|
+
z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator: Be.FeedbackClosed, studyType: "feedbackButton", "survey.id": u }), z.emit(B.SurveyWillClose, { name: B.SurveyWillClose, initiator: Be.FeedbackClosed, studyType: "feedbackButton", "survey.id": u });
|
|
6392
6392
|
const v = Rt();
|
|
6393
6393
|
m && v && (v.remove(), rr = null, X = null);
|
|
6394
6394
|
}
|
|
6395
6395
|
return;
|
|
6396
6396
|
}
|
|
6397
|
-
if (Ys(
|
|
6397
|
+
if (Ys(Ue(window.UserLeap)) || no || Xa(), t) return X && X.classList.add("sprig-feedback-loading-container-previews"), await tr(t), void Jt();
|
|
6398
6398
|
const g = await (async (v) => {
|
|
6399
|
-
const
|
|
6400
|
-
return
|
|
6399
|
+
const I = await ze(Ae("1", [it], "startFeedbackStudy"), { body: JSON.stringify({ surveyUuid: v }), method: "POST" });
|
|
6400
|
+
return I.ok ? I.json : null;
|
|
6401
6401
|
})(c);
|
|
6402
6402
|
if (g) z.once(B.SurveyAppeared, Jt), tr({ ...g, studyType: "feedbackButton" }, r);
|
|
6403
6403
|
else if (X) {
|
|
6404
6404
|
const v = $f();
|
|
6405
6405
|
X.appendChild(v), Jt(), X.style.height = "300px", X.style.width = "360px";
|
|
6406
6406
|
}
|
|
6407
|
-
}), d == null || d.appendChild(
|
|
6408
|
-
const { useMobileStyling: p, _config: { border:
|
|
6407
|
+
}), d == null || d.appendChild(je), z.emit(B.FeedbackButtonLoaded, { name: B.FeedbackButtonLoaded, "survey.id": u });
|
|
6408
|
+
const { useMobileStyling: p, _config: { border: C } } = window.UserLeap;
|
|
6409
6409
|
if (Za || p) Cs(0);
|
|
6410
6410
|
else {
|
|
6411
6411
|
const m = document.createElement("div");
|
|
6412
|
-
m.id = "sprig-feedback-loading-container", m.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${f}`, m.style.setProperty("--feedback-border",
|
|
6412
|
+
m.id = "sprig-feedback-loading-container", m.className = `sprig-feedback-loading-container sprig-feedback-loading-container-${f}`, m.style.setProperty("--feedback-border", C), X = m, di(), d == null || d.appendChild(m);
|
|
6413
6413
|
const g = gu();
|
|
6414
6414
|
Cs(-g);
|
|
6415
6415
|
}
|
|
@@ -6563,12 +6563,12 @@ class Jf {
|
|
|
6563
6563
|
return r.type === "max" ? t > r.value : r.type === "min" && t < r.value;
|
|
6564
6564
|
}
|
|
6565
6565
|
}
|
|
6566
|
-
const wr = {},
|
|
6566
|
+
const wr = {}, Ve = (e) => {
|
|
6567
6567
|
const t = new Jf(e);
|
|
6568
6568
|
return wr[e] = t, t;
|
|
6569
6569
|
}, bu = (e, t) => {
|
|
6570
6570
|
let r = wr[e];
|
|
6571
|
-
return r || (r =
|
|
6571
|
+
return r || (r = Ve(e)), r.report(t);
|
|
6572
6572
|
}, Kf = ({ reportingIntervalSeconds: e, postMetrics: t }) => {
|
|
6573
6573
|
e ? setInterval(() => {
|
|
6574
6574
|
(async (r) => {
|
|
@@ -6621,7 +6621,7 @@ const Yr = (e, t = 1) => {
|
|
|
6621
6621
|
}, Xf = (e) => e.forEach(Zf), Qf = () => {
|
|
6622
6622
|
ks.report(ht[ks.name] || 0), Es.report(ht[Es.name] || 0), xs.report(ht[xs.name] || 0), Ts.report(ht[Ts.name] || 0), ht = {};
|
|
6623
6623
|
}, eg = (e = 1e3) => {
|
|
6624
|
-
ks =
|
|
6624
|
+
ks = Ve("sdk_mutations_nodes_added"), Es = Ve("sdk_mutations_nodes_removed"), xs = Ve("sdk_mutations_attributes_changed"), Ts = Ve("sdk_mutations_character_data"), el = new MutationObserver(Xf), el.observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), setInterval(Qf, e);
|
|
6625
6625
|
}, tg = ({ isWeb: e, reportingIntervalSeconds: t, thresholds: r, postMetrics: s }) => {
|
|
6626
6626
|
((n, i) => {
|
|
6627
6627
|
Kt = {}, hi = !1, n == null || n.forEach((a) => {
|
|
@@ -6635,10 +6635,10 @@ const Yr = (e, t = 1) => {
|
|
|
6635
6635
|
(o = se.replay) == null || o.disableRecording("Threshold violated", new Error(l), { reportError: !1 }), window.UserLeap.reportError("Sdk Performance Metric threshold violated", new Error("Sdk Performance Metric threshold violated"), { metricName: i.metric, type: i.type, value: i.value }, { metricName: i.metric }), hi = !0;
|
|
6636
6636
|
}
|
|
6637
6637
|
}), Kf({ reportingIntervalSeconds: t, postMetrics: s }), e && (((n = 1e3) => {
|
|
6638
|
-
const i =
|
|
6638
|
+
const i = Ve("sdk_event_queue_latency_seconds");
|
|
6639
6639
|
gi(n, i);
|
|
6640
6640
|
})(), ((n = 1e4) => {
|
|
6641
|
-
vu =
|
|
6641
|
+
vu = Ve("sdk_dom_nodes_count"), Su = Ve("sdk_page_html_characters"), Qa(), setInterval(Qa, n);
|
|
6642
6642
|
})(), eg());
|
|
6643
6643
|
}, rg = "test", sg = ["popState", "pushState", "replaceState"];
|
|
6644
6644
|
let io, sr;
|
|
@@ -6658,7 +6658,7 @@ function nr(e) {
|
|
|
6658
6658
|
})(), Q.getItem("sprig.isCapturingHeatmap") && ((l = (o = se.replay) == null ? void 0 : o.checkPendingHeatmapsUrl()) == null || l.then((c) => {
|
|
6659
6659
|
var u;
|
|
6660
6660
|
c && ((u = se.replay) == null || u.uploadReadyPendingCaptures(!0));
|
|
6661
|
-
})), !Is() && s && a && a !== globalThis.location.href && e && sg.includes(e.type) && globalThis.UserLeap("dismissActiveSurvey",
|
|
6661
|
+
})), !Is() && s && a && a !== globalThis.location.href && e && sg.includes(e.type) && globalThis.UserLeap("dismissActiveSurvey", Be.PageChange);
|
|
6662
6662
|
}
|
|
6663
6663
|
const ku = { capture: !0 }, ng = () => {
|
|
6664
6664
|
const e = globalThis.UserLeap._config.interactiveEvents.filter((r) => so(r, globalThis.location.href)).map((r) => {
|
|
@@ -6676,13 +6676,13 @@ const ku = { capture: !0 }, ng = () => {
|
|
|
6676
6676
|
globalThis.UserLeap._config.interactiveEventsHandler && globalThis.removeEventListener("click", globalThis.UserLeap._config.interactiveEventsHandler, ku), delete globalThis.UserLeap._config.interactiveEventsHandler;
|
|
6677
6677
|
};
|
|
6678
6678
|
function xu() {
|
|
6679
|
-
const e =
|
|
6679
|
+
const e = ut.getItemObject("userleap.ids");
|
|
6680
6680
|
return (e == null ? void 0 : e[globalThis.UserLeap.envId]) || {};
|
|
6681
6681
|
}
|
|
6682
6682
|
function Tu() {
|
|
6683
6683
|
if (globalThis.previewMode) return;
|
|
6684
|
-
const e =
|
|
6685
|
-
globalThis.UserLeap.visitorId = t || Ut(), N.info("NewVid", { vid: globalThis.UserLeap.visitorId }),
|
|
6684
|
+
const e = ut.getItemObject("sprig.anon.env.vid.map") || {}, t = e[globalThis.UserLeap.envId];
|
|
6685
|
+
globalThis.UserLeap.visitorId = t || Ut(), N.info("NewVid", { vid: globalThis.UserLeap.visitorId }), ke("vid", globalThis.UserLeap.visitorId), t || (e[globalThis.UserLeap.envId] = globalThis.UserLeap.visitorId, ut.setItemObject("sprig.anon.env.vid.map", e)), z.emit(B.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId });
|
|
6686
6686
|
}
|
|
6687
6687
|
function Ru(e, t, r, s) {
|
|
6688
6688
|
var n, i;
|
|
@@ -6716,8 +6716,8 @@ function ig() {
|
|
|
6716
6716
|
async function yn(e, t) {
|
|
6717
6717
|
const r = eo();
|
|
6718
6718
|
e && !t && (globalThis.UserLeap._config.mode = rg);
|
|
6719
|
-
const s = Ys(
|
|
6720
|
-
const a = new URL(
|
|
6719
|
+
const s = Ys(Ue(globalThis.UserLeap)), n = await ze(function(i) {
|
|
6720
|
+
const a = new URL(Ae("1", [ot], "questions"));
|
|
6721
6721
|
return Object.entries(i || {}).forEach(([o, l]) => {
|
|
6722
6722
|
l && a.searchParams.append(o, String(l));
|
|
6723
6723
|
}), a.toString();
|
|
@@ -6746,7 +6746,7 @@ function og(e) {
|
|
|
6746
6746
|
const ag = function(e) {
|
|
6747
6747
|
if (!globalThis.UserLeap) return;
|
|
6748
6748
|
const t = async (n = {}) => {
|
|
6749
|
-
var m, g, v,
|
|
6749
|
+
var m, g, v, I, O;
|
|
6750
6750
|
const { userId: i, anonymousId: a, metadata: o = {}, properties: l, showSurveyCallback: c } = n;
|
|
6751
6751
|
let { eventName: u } = n;
|
|
6752
6752
|
if (globalThis.UserLeap.debugMode && u !== Cu && console.info("[DEBUG] Sprig track", n), e.mode === "test") return;
|
|
@@ -6761,33 +6761,33 @@ const ag = function(e) {
|
|
|
6761
6761
|
return console.warn(E), { success: !1, message: E, surveyState: "no survey" };
|
|
6762
6762
|
}
|
|
6763
6763
|
const h = sr ?? globalThis.location.href;
|
|
6764
|
-
o.url || (o.url = h),
|
|
6765
|
-
const f = globalThis.UserLeap.delayingSurvey || mu() ? await
|
|
6764
|
+
o.url || (o.url = h), ke("trackStartUrl", h), (g = (m = globalThis.UserLeap) == null ? void 0 : m._config) != null && g.optimizelyEnabled && (mr(Ue(globalThis.UserLeap)) || us.getAndSetWebOptimizelyExperiments(), o.optimizelyExperiments = Object.assign({}, us.getAllOptimizelyExperiments())), (I = (v = globalThis.UserLeap) == null ? void 0 : v._config) != null && I.launchDarklyEnabled && (o.launchDarklyFlags = pi.getAllLaunchDarklyVariations()), i && (globalThis.UserLeap.userId = i), a && (globalThis.UserLeap.partnerAnonymousId = a), l && (o.eventProperties = l), (O = se.replay) == null || O.RecordEvent({ name: u, url: o.url }), N.info("TrackEvent", { eventName: u });
|
|
6765
|
+
const f = globalThis.UserLeap.delayingSurvey || mu() ? await ze(Ae("1", [it], "events/batch"), { body: JSON.stringify({ events: [{ event: u, metadata: o }], previewKey: d }), method: "POST", shouldDropOnRateLimit: !0 }) : await ze(Ae("1", [it], "events"), { body: JSON.stringify({ event: u, metadata: o, previewKey: d }), method: "POST", shouldDropOnRateLimit: !0 });
|
|
6766
6766
|
if (!f.ok) {
|
|
6767
6767
|
const E = "[Sprig] (ERR-421) Failed to track event";
|
|
6768
6768
|
return f.reportError && (console.warn(E, f.error), f.error && globalThis.UserLeap.reportError("track", f.error)), { success: !1, message: E, error: f.error, surveyState: "no survey" };
|
|
6769
6769
|
}
|
|
6770
|
-
i &&
|
|
6771
|
-
const
|
|
6772
|
-
|
|
6770
|
+
i && ke("uid", i), a && ke("aid", a);
|
|
6771
|
+
const w = f.json;
|
|
6772
|
+
w.invalidPreviewKey && Q.removeItem("sprig.previewKey");
|
|
6773
6773
|
const p = o.trackPageView ? o.url : void 0;
|
|
6774
|
-
return
|
|
6774
|
+
return w != null && w.feedbackButton && yu(w.feedbackButton, void 0, p), await async function(E, A) {
|
|
6775
6775
|
var k, T;
|
|
6776
|
-
let
|
|
6777
|
-
return !(
|
|
6776
|
+
let M = !0;
|
|
6777
|
+
return !(A && ((k = E == null ? void 0 : E.json) != null && k.surveyId) && (globalThis.UserLeap.delayingSurvey = !0, M = await A(E.json.surveyId), globalThis.UserLeap.delayingSurvey = !1, !M)) && ((T = E == null ? void 0 : E.json) != null && T.delay && !globalThis.UserLeap.isMobileSDK && (globalThis.UserLeap.delayingSurvey = !0, await vs(E.json.delay), globalThis.UserLeap.delayingSurvey = !1), M);
|
|
6778
6778
|
}(f, c) ? function(E) {
|
|
6779
6779
|
if (!globalThis.UserLeap._config.dismissOnPageChange) return !0;
|
|
6780
|
-
const
|
|
6781
|
-
return
|
|
6782
|
-
}(h) ? tr(
|
|
6780
|
+
const A = new URL(E), M = new URL(sr ?? globalThis.location.href);
|
|
6781
|
+
return A.hostname === M.hostname && A.pathname === M.pathname;
|
|
6782
|
+
}(h) ? tr(w, p, io) : { success: !1, message: "Study should not be displayed after page navigation", surveyState: "no survey" } : { success: !1, message: "[Sprig] Callback returned false, aborting rendering of survey", surveyState: "no survey" };
|
|
6783
6783
|
}, r = (n, i) => {
|
|
6784
6784
|
var o;
|
|
6785
6785
|
const a = (o = n == null ? void 0 : n.querySelector(`[id="${ro}"]`)) == null ? void 0 : o.contentDocument;
|
|
6786
6786
|
a && Ss({ document: a, elementId: "ul-custom-style", styleString: i });
|
|
6787
|
-
}, s = { displaySurvey: async (n) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), globalThis.UserLeap("dismissActiveSurvey",
|
|
6788
|
-
globalThis.UserLeap("dismissActiveSurvey",
|
|
6787
|
+
}, s = { displaySurvey: async (n) => (console.warn("[Sprig] displaySurvey should only be used to debug your studies; not intended for production usage."), globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyId: n }, !0)), _previewSurvey(n) {
|
|
6788
|
+
globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyTemplateId: n }, !1);
|
|
6789
6789
|
}, _reviewSurvey(n) {
|
|
6790
|
-
globalThis.UserLeap("dismissActiveSurvey",
|
|
6790
|
+
globalThis.UserLeap("dismissActiveSurvey", Be.Override), yn({ surveyId: n }, !1);
|
|
6791
6791
|
}, previewSurvey(n) {
|
|
6792
6792
|
s._previewSurvey(n);
|
|
6793
6793
|
}, reviewSurvey(n) {
|
|
@@ -6798,8 +6798,8 @@ const ag = function(e) {
|
|
|
6798
6798
|
globalThis.UserLeap._queue.unpause();
|
|
6799
6799
|
}, setVisitorToken() {
|
|
6800
6800
|
console.warn("[Sprig] setVisitorToken is deprecated.");
|
|
6801
|
-
}, dismissActiveSurvey(n =
|
|
6802
|
-
globalThis.UserLeap.container && (n ===
|
|
6801
|
+
}, dismissActiveSurvey(n = Be.API) {
|
|
6802
|
+
globalThis.UserLeap.container && (n === Be.Closed && globalThis.Sprig.trackHistory && globalThis.Sprig.trackHistory({ event: "closed" }), z.emit(B.SurveyCloseRequested, { name: B.SurveyCloseRequested, initiator: n, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }), z.emit(B.SurveyWillClose, { name: B.SurveyWillClose, initiator: n, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }));
|
|
6803
6803
|
}, async setAttribute(n, i) {
|
|
6804
6804
|
if (!n || !i && i !== 0 && i !== !1) {
|
|
6805
6805
|
const a = "[Sprig] - Disregarding empty attribute / value provided";
|
|
@@ -6831,7 +6831,7 @@ const ag = function(e) {
|
|
|
6831
6831
|
if (!(o && Object.keys(o).length !== 0 || i && globalThis.UserLeap.userId !== i || a && globalThis.UserLeap.partnerAnonymousId !== a)) return { success: !0 };
|
|
6832
6832
|
const l = {};
|
|
6833
6833
|
let c;
|
|
6834
|
-
return i && (l.userId = globalThis.UserLeap.userId = i), a && (l.partnerAnonymousId = globalThis.UserLeap.partnerAnonymousId = a), o && Object.keys(o).length > 0 ? (c = await
|
|
6834
|
+
return i && (l.userId = globalThis.UserLeap.userId = i), a && (l.partnerAnonymousId = globalThis.UserLeap.partnerAnonymousId = a), o && Object.keys(o).length > 0 ? (c = await ze(Ae("1", [ot, it], "attributes"), { body: JSON.stringify(o), method: "PUT" }), c.ok ? Object.assign(Rs, o) : c.reportError && (console.warn("[Sprig] (ERR-432) identifyAndSetAttributes failed", c.error), c.error && globalThis.UserLeap.reportError("identifyAndSetAttributes", c.error))) : c = await ze(Ae("1", [ot, it]), { body: JSON.stringify(l), method: "PUT" }), o && o[Vt] && (globalThis.UserLeap.email = o[Vt]), c.ok && (i && ke("uid", i), a && ke("aid", a)), { success: !!c.ok };
|
|
6835
6835
|
}, async removeAttributes(n) {
|
|
6836
6836
|
if (globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig removeAttributes", n), e.mode === "test") return;
|
|
6837
6837
|
if (n == null || n.length === 0) {
|
|
@@ -6842,7 +6842,7 @@ const ag = function(e) {
|
|
|
6842
6842
|
const a = "[Sprig] - Skipping tracking without userId";
|
|
6843
6843
|
return console.warn(a), { success: !1, message: a };
|
|
6844
6844
|
}
|
|
6845
|
-
const i = await
|
|
6845
|
+
const i = await ze(Ae("1", [ot, it], "attributes"), { body: JSON.stringify({ delete: n }), method: "DELETE" });
|
|
6846
6846
|
return !i.ok && i.reportError && (console.warn("[Sprig] (ERR-433) Remove attributes failed", i.error), i.error && globalThis.UserLeap.reportError("removeAttributes", i.error)), { success: !!i.ok };
|
|
6847
6847
|
}, async addSurveyListener(n) {
|
|
6848
6848
|
z.on(B.SurveyLifeCycle, n);
|
|
@@ -6864,14 +6864,14 @@ const ag = function(e) {
|
|
|
6864
6864
|
}
|
|
6865
6865
|
if (e.mode === "test" || n === globalThis.UserLeap.userId) return;
|
|
6866
6866
|
globalThis.UserLeap.userId = n;
|
|
6867
|
-
const i = globalThis.UserLeap.visitorId, a = await
|
|
6868
|
-
a.ok ? (i !== globalThis.UserLeap.visitorId && ((o = se.replay) == null || o.clearUserReplayData()),
|
|
6867
|
+
const i = globalThis.UserLeap.visitorId, a = await ze(Ae("1", [ot, it]), { body: JSON.stringify({ userId: n }), method: "PUT" });
|
|
6868
|
+
a.ok ? (i !== globalThis.UserLeap.visitorId && ((o = se.replay) == null || o.clearUserReplayData()), ke("uid", n)) : a.reportError && (console.warn("[Sprig] (ERR-420) Failed to set user id", a.error), a.error && globalThis.UserLeap.reportError("setUserId", a.error));
|
|
6869
6869
|
}, async setPartnerAnonymousId(n) {
|
|
6870
6870
|
if (globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig setPartnerAnonymousId", n), n == null) {
|
|
6871
6871
|
const i = `[Sprig] - Invalid partnerAnonymousId ${n}`;
|
|
6872
6872
|
return console.warn(i), { success: !1, message: i };
|
|
6873
6873
|
}
|
|
6874
|
-
return globalThis.UserLeap.partnerAnonymousId = n,
|
|
6874
|
+
return globalThis.UserLeap.partnerAnonymousId = n, ke("aid", n), { success: !0 };
|
|
6875
6875
|
}, track: async (n, i, a = {}, o = void 0) => t({ eventName: n, properties: i, metadata: a, showSurveyCallback: o }), identifyAndTrack: async (n) => await t(n), trackPageView(n, i = void 0, a = void 0, o = !0) {
|
|
6876
6876
|
sr = n, Ru(n, i, a, o);
|
|
6877
6877
|
}, applyFeedbackStyles({ button: n = "", view: i = "" }) {
|
|
@@ -6882,15 +6882,15 @@ const ag = function(e) {
|
|
|
6882
6882
|
var h, f;
|
|
6883
6883
|
const a = typeof n == "string" ? parseInt(n, 10) : n, o = typeof i == "string" ? parseInt(i, 10) : i;
|
|
6884
6884
|
isNaN(a) || isNaN(o) || (globalThis.UserLeap.windowDimensions = { width: a, height: o });
|
|
6885
|
-
const l =
|
|
6885
|
+
const l = Ue(globalThis.UserLeap), c = Ys(l), u = l["userleap-platform"] === "web";
|
|
6886
6886
|
if (!globalThis.UserLeap.frameId) return;
|
|
6887
6887
|
const d = document.getElementById(globalThis.UserLeap.frameId);
|
|
6888
6888
|
d && (globalThis.UserLeap.useMobileStyling && ((h = globalThis.UserLeap.windowDimensions) != null && h.width && (d.style.width = `${globalThis.UserLeap.windowDimensions.width}px`), (f = globalThis.UserLeap.windowDimensions) != null && f.height && (d.style.maxHeight = globalThis.UserLeap.windowDimensions.height - 20 + "px"), d.contentDocument && (d.style.height = String(Gf(d.contentDocument, u && !c, su(l))[0]) + "px")), z.emit(B.SurveyDimensions, { name: B.SurveyDimensions, contentFrameWidth: d.clientWidth, contentFrameHeight: d.clientHeight, "survey.id": parseInt(globalThis.UserLeap.container.dataset.studyId) }));
|
|
6889
6889
|
}, logoutUser() {
|
|
6890
6890
|
var n;
|
|
6891
|
-
globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), N.info("LogOut", { vid: globalThis.UserLeap.visitorId, userId: globalThis.UserLeap.userId }), globalThis.UserLeap.visitorId = null, globalThis.UserLeap.userId = null, globalThis.UserLeap.partnerAnonymousId = null, globalThis.UserLeap.token = null, globalThis.UserLeap.email = null,
|
|
6891
|
+
globalThis.UserLeap.debugMode && console.info("[DEBUG] Sprig logout"), N.info("LogOut", { vid: globalThis.UserLeap.visitorId, userId: globalThis.UserLeap.userId }), globalThis.UserLeap.visitorId = null, globalThis.UserLeap.userId = null, globalThis.UserLeap.partnerAnonymousId = null, globalThis.UserLeap.token = null, globalThis.UserLeap.email = null, ut.removeItem("userleap.ids"), globalThis.UserLeap._queue.isPaused() && globalThis.UserLeap._queue.empty(), Tu(), (n = se.replay) == null || n.clearUserReplayData(), globalThis.UserLeap._queue.unpause();
|
|
6892
6892
|
}, teardown() {
|
|
6893
|
-
["hashchange", "popstate"].forEach((n) => globalThis.removeEventListener(n, nr, !0)), globalThis.UserLeap._config.interactiveEvents && Eu(), globalThis.UserLeap("dismissActiveSurvey",
|
|
6893
|
+
["hashchange", "popstate"].forEach((n) => globalThis.removeEventListener(n, nr, !0)), globalThis.UserLeap._config.interactiveEvents && Eu(), globalThis.UserLeap("dismissActiveSurvey", Be.API), delete globalThis.UserLeap, delete globalThis.Sprig, delete globalThis._Sprig;
|
|
6894
6894
|
}, integrateOptimizely(n, i = !0) {
|
|
6895
6895
|
var a, o;
|
|
6896
6896
|
if ((o = (a = globalThis.UserLeap) == null ? void 0 : a._config) != null && o.optimizelyEnabled) try {
|
|
@@ -6928,7 +6928,7 @@ const ag = function(e) {
|
|
|
6928
6928
|
bu(n, i);
|
|
6929
6929
|
}, _completeSessionReplay: async ({ surveyId: n, responseGroupUuid: i, eventDigest: a }) => {
|
|
6930
6930
|
var o;
|
|
6931
|
-
return se.replay ? (o = se.replay) == null ? void 0 : o._completeSessionReplay({ surveyId: n, responseGroupUuid: i, eventDigest: a, headers:
|
|
6931
|
+
return se.replay ? (o = se.replay) == null ? void 0 : o._completeSessionReplay({ surveyId: n, responseGroupUuid: i, eventDigest: a, headers: Ue(globalThis.UserLeap) }) : (globalThis.UserLeap.reportError("_completeSessionReplay", new Error("Replay module not registered")), !1);
|
|
6932
6932
|
}, pauseReplayRecording() {
|
|
6933
6933
|
var n, i, a, o;
|
|
6934
6934
|
(i = (n = se.replay) == null ? void 0 : n.isReplayPaused) != null && i.call(n) || ((o = (a = se.replay) == null ? void 0 : a.recordReplayPaused) == null || o.call(a));
|
|
@@ -6941,16 +6941,16 @@ const ag = function(e) {
|
|
|
6941
6941
|
async function lg(e, t, r = {}, s = {}) {
|
|
6942
6942
|
var u;
|
|
6943
6943
|
const n = (u = globalThis.__cfg) == null ? void 0 : u.mode, i = eo(), a = globalThis.UserLeap.envId, o = globalThis.document.documentElement, l = { mode: n, screenWidth: globalThis.screen.width, screenHeight: globalThis.screen.height, clientWidth: o.clientWidth, clientHeight: o.clientHeight, location: sr ?? globalThis.location.href, language: globalThis.navigator.language, ...r }, c = { action: e, breadcrumbs: N.breadcrumbs, err: { message: `${t == null ? void 0 : t.name} - ${t == null ? void 0 : t.message}`, stack: t == null ? void 0 : t.stack }, meta: l, vid: i, envId: a, ...s };
|
|
6944
|
-
(await
|
|
6944
|
+
(await ze(Ae("1", null, "errors"), { method: "POST", headers: { "x-ul-error": globalThis.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(c), shouldDropOnRateLimit: !0 })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", t);
|
|
6945
6945
|
}
|
|
6946
6946
|
function cg(e = {}) {
|
|
6947
6947
|
var s;
|
|
6948
6948
|
(s = globalThis.SprigLoggerCallback) == null || s.call(globalThis, "Initializing Sprig");
|
|
6949
6949
|
const t = new URLSearchParams(globalThis.location.search).get("sprigPreviewKey") ?? "";
|
|
6950
6950
|
async function r() {
|
|
6951
|
-
var d, h, f,
|
|
6951
|
+
var d, h, f, w, p;
|
|
6952
6952
|
if (globalThis.UserLeap.loaded) return;
|
|
6953
|
-
if ((d = globalThis.SprigLoggerCallback) == null || d.call(globalThis, "Loading Sprig"), globalThis.UserLeap.reportError = lg, globalThis.UserLeap.loaded = !0, globalThis.UserLeap._config = Object.assign({}, e, globalThis.UserLeap.config), globalThis.UserLeap.delayingSurvey = !1, globalThis.UserLeap._config && typeof globalThis.UserLeap._config == "object") for (const
|
|
6953
|
+
if ((d = globalThis.SprigLoggerCallback) == null || d.call(globalThis, "Loading Sprig"), globalThis.UserLeap.reportError = lg, globalThis.UserLeap.loaded = !0, globalThis.UserLeap._config = Object.assign({}, e, globalThis.UserLeap.config), globalThis.UserLeap.delayingSurvey = !1, globalThis.UserLeap._config && typeof globalThis.UserLeap._config == "object") for (const C in globalThis.UserLeap._config) globalThis.UserLeap[C] = globalThis.UserLeap._config[C];
|
|
6954
6954
|
if (globalThis.Sprig.outstandingTransactionLimit !== void 0 && (e.outstandingTransactionLimit = globalThis.Sprig.outstandingTransactionLimit), !globalThis.UserLeap.envId) {
|
|
6955
6955
|
if (!globalThis.UserLeap.appId) throw new Error("Missing Environment id");
|
|
6956
6956
|
globalThis.UserLeap.envId = globalThis.UserLeap.appId;
|
|
@@ -6959,34 +6959,34 @@ function cg(e = {}) {
|
|
|
6959
6959
|
const n = xu(), i = globalThis.UserLeap.sampleRate;
|
|
6960
6960
|
let a = n.sampled;
|
|
6961
6961
|
if (i) {
|
|
6962
|
-
if (a === null && (a = Math.random() < i,
|
|
6963
|
-
} else a !== null &&
|
|
6962
|
+
if (a === null && (a = Math.random() < i, ke("sampled", a)), !a) return;
|
|
6963
|
+
} else a !== null && ke("sampled", null);
|
|
6964
6964
|
globalThis.UserLeap._API_URL || (globalThis.UserLeap._API_URL = "https://api.sprig.com");
|
|
6965
6965
|
const o = [...globalThis.UserLeap._queue];
|
|
6966
6966
|
globalThis.UserLeap._queue = new Yf(globalThis.UserLeap, []), globalThis.UserLeap._queue.pause();
|
|
6967
|
-
for (let
|
|
6967
|
+
for (let C = 0; C < o.length; C++) globalThis.UserLeap._queue.push(o[C]);
|
|
6968
6968
|
const l = n.token;
|
|
6969
6969
|
l ? (globalThis.UserLeap.token = l, globalThis.UserLeap.visitorId = n.vid ?? null, globalThis.UserLeap.userId = n.uid ?? null, globalThis.UserLeap.partnerAnonymousId = n.aid ?? null) : Tu();
|
|
6970
|
-
const c = mr(
|
|
6970
|
+
const c = mr(Ue(globalThis.UserLeap));
|
|
6971
6971
|
(h = globalThis.SprigLoggerCallback) == null || h.call(globalThis, "Sprig fetching config");
|
|
6972
|
-
const u = await async function(
|
|
6973
|
-
var
|
|
6974
|
-
const m =
|
|
6972
|
+
const u = await async function(C) {
|
|
6973
|
+
var I, O;
|
|
6974
|
+
const m = Ue(globalThis.UserLeap);
|
|
6975
6975
|
document.addEventListener("securitypolicyviolation", Ga);
|
|
6976
|
-
const g = await
|
|
6977
|
-
if (document.removeEventListener("securitypolicyviolation", Ga), !g.ok) return (
|
|
6976
|
+
const g = await Xe(Ae("1", [ot], "config"), { headers: m });
|
|
6977
|
+
if (document.removeEventListener("securitypolicyviolation", Ga), !g.ok) return (I = globalThis.SprigLoggerCallback) == null || I.call(globalThis, "Sprig config fetch failed"), g.reportError && (console.warn("[Sprig] (ERR-422) Failed to load configuration", g.error), g.error && globalThis.UserLeap.reportError("applyRemoteConfig", g.error)), ci("Disabled: failed to fetch configuration"), C;
|
|
6978
6978
|
const v = g.json;
|
|
6979
|
-
return v != null && v.disabled ? ((O = globalThis.SprigLoggerCallback) == null || O.call(globalThis, "Sprig config fetch disabled"), ci(`Disabled: ${v.disabled}`), { disabled: v.disabled }) : Object.assign({}, v,
|
|
6979
|
+
return v != null && v.disabled ? ((O = globalThis.SprigLoggerCallback) == null || O.call(globalThis, "Sprig config fetch disabled"), ci(`Disabled: ${v.disabled}`), { disabled: v.disabled }) : Object.assign({}, v, C);
|
|
6980
6980
|
}(e);
|
|
6981
|
-
if ((f = globalThis.SprigLoggerCallback) == null || f.call(globalThis, "Sprig fetched config"), tg({ isWeb: !c, reportingIntervalSeconds: u.metricsReportingEnabled || u.mobileMetricsReportingEnabled ? u.metricsReportingIntervalSeconds : 0, thresholds: u.metricThresholds, postMetrics: async (
|
|
6981
|
+
if ((f = globalThis.SprigLoggerCallback) == null || f.call(globalThis, "Sprig fetched config"), tg({ isWeb: !c, reportingIntervalSeconds: u.metricsReportingEnabled || u.mobileMetricsReportingEnabled ? u.metricsReportingIntervalSeconds : 0, thresholds: u.metricThresholds, postMetrics: async (C) => {
|
|
6982
6982
|
var m;
|
|
6983
|
-
await
|
|
6983
|
+
await ze(Ae("1", [ot], "metrics"), { body: C, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = se.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
|
|
6984
6984
|
} }), !c) {
|
|
6985
|
-
const
|
|
6986
|
-
await ((
|
|
6985
|
+
const C = u.alwaysOnReplay ? { userAgent: globalThis.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.43.0", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
|
|
6986
|
+
await ((w = se.replay) == null ? void 0 : w.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: globalThis.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: globalThis.UserLeap._API_URL, alwaysOnConfig: C })), io = u.replaySettings;
|
|
6987
6987
|
}
|
|
6988
6988
|
ag(u), await og(u), globalThis.UserLeap._queue.unpause(), (p = globalThis.SprigLoggerCallback) == null || p.call(globalThis, "SdkReady"), z.emit(B.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), z.emit(B.VisitorIDUpdated, { visitorId: globalThis.UserLeap.visitorId }), z.on(B.VisitorIDUpdated, () => {
|
|
6989
|
-
for (const
|
|
6989
|
+
for (const C in Rs) delete Rs[C];
|
|
6990
6990
|
});
|
|
6991
6991
|
}
|
|
6992
6992
|
globalThis.UserLeap.UPDATES = hr, globalThis.UserLeap("setPreviewKey", t), document.readyState === "complete" ? r() : globalThis.attachEvent ? globalThis.attachEvent("onload", r) : globalThis.addEventListener("load", () => {
|
|
@@ -7102,7 +7102,7 @@ const sy = { configure: (e) => {
|
|
|
7102
7102
|
const t = globalThis.Sprig;
|
|
7103
7103
|
return t.appId = e.envId, t._queue = [], globalThis.UserLeap = t, cg(e), globalThis.Sprig;
|
|
7104
7104
|
} }, ny = new yi();
|
|
7105
|
-
var
|
|
7105
|
+
var at = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(at || {}), $e = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e))($e || {});
|
|
7106
7106
|
const wi = (e, t) => t.some((r) => e instanceof r);
|
|
7107
7107
|
let rl, sl;
|
|
7108
7108
|
const bi = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap();
|
|
@@ -7111,16 +7111,16 @@ let vi = { get(e, t, r) {
|
|
|
7111
7111
|
if (t === "done") return bi.get(e);
|
|
7112
7112
|
if (t === "store") return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0]);
|
|
7113
7113
|
}
|
|
7114
|
-
return
|
|
7114
|
+
return lt(e[t]);
|
|
7115
7115
|
}, set: (e, t, r) => (e[t] = r, !0), has: (e, t) => e instanceof IDBTransaction && (t === "done" || t === "store") || t in e };
|
|
7116
7116
|
function Lu(e) {
|
|
7117
7117
|
vi = e(vi);
|
|
7118
7118
|
}
|
|
7119
7119
|
function ug(e) {
|
|
7120
7120
|
return (sl || (sl = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])).includes(e) ? function(...t) {
|
|
7121
|
-
return e.apply(Si(this), t),
|
|
7121
|
+
return e.apply(Si(this), t), lt(this.request);
|
|
7122
7122
|
} : function(...t) {
|
|
7123
|
-
return
|
|
7123
|
+
return lt(e.apply(Si(this), t));
|
|
7124
7124
|
};
|
|
7125
7125
|
}
|
|
7126
7126
|
function dg(e) {
|
|
@@ -7137,11 +7137,11 @@ function dg(e) {
|
|
|
7137
7137
|
bi.set(t, r);
|
|
7138
7138
|
}(e), wi(e, rl || (rl = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])) ? new Proxy(e, vi) : e);
|
|
7139
7139
|
}
|
|
7140
|
-
function
|
|
7140
|
+
function lt(e) {
|
|
7141
7141
|
if (e instanceof IDBRequest) return function(r) {
|
|
7142
7142
|
const s = new Promise((n, i) => {
|
|
7143
7143
|
r.onsuccess = () => {
|
|
7144
|
-
n(
|
|
7144
|
+
n(lt(r.result));
|
|
7145
7145
|
}, r.onerror = () => {
|
|
7146
7146
|
i(r.error);
|
|
7147
7147
|
};
|
|
@@ -7155,7 +7155,7 @@ function at(e) {
|
|
|
7155
7155
|
const Si = (e) => Ls.get(e);
|
|
7156
7156
|
function Ii(e, { blocked: t } = {}) {
|
|
7157
7157
|
const r = indexedDB.deleteDatabase(e);
|
|
7158
|
-
return t && (r.onblocked = (s) => t(s.oldVersion, s)),
|
|
7158
|
+
return t && (r.onblocked = (s) => t(s.oldVersion, s)), lt(r).then(() => {
|
|
7159
7159
|
});
|
|
7160
7160
|
}
|
|
7161
7161
|
const pg = ["get", "getKey", "getAll", "getAllKeys", "count"], hg = ["put", "add", "delete", "clear"], bn = /* @__PURE__ */ new Map();
|
|
@@ -7219,7 +7219,7 @@ const yg = "sprigReplayIframeLoaded", wg = "sprigReplayIframeSettings", bg = "sp
|
|
|
7219
7219
|
var u;
|
|
7220
7220
|
if (!l && !r && !s) return void N.error("UploadErr", { isMobile: l, uploadId: r, etags: s });
|
|
7221
7221
|
N.info("MarkUploadComplete", { surveyId: t });
|
|
7222
|
-
const c = await
|
|
7222
|
+
const c = await Xe(`${e}/sdk/1/completeSessionReplay`, { method: "POST", body: JSON.stringify({ etags: s, uploadId: r, responseGroupUuid: i, surveyId: t, replayDuration: a, eventDigest: o, userAgent: (u = window == null ? void 0 : window.navigator) == null ? void 0 : u.userAgent }), headers: n, shouldRetryRequest: !0 });
|
|
7223
7223
|
return N.info("MarkUploadDone", { surveyId: t }), c;
|
|
7224
7224
|
}, Sg = (e) => {
|
|
7225
7225
|
if (e instanceof Attr) return null;
|
|
@@ -7256,8 +7256,8 @@ const yg = "sprigReplayIframeLoaded", wg = "sprigReplayIframeSettings", bg = "sp
|
|
|
7256
7256
|
return (s) => {
|
|
7257
7257
|
clearTimeout(r), r = window.setTimeout(() => e(s), t);
|
|
7258
7258
|
};
|
|
7259
|
-
},
|
|
7260
|
-
let Os = !1,
|
|
7259
|
+
}, We = { capture: !0, passive: !0 }, Cg = ["a", "button", "input", "option", "li", "link"], kg = ["Escape", "Enter", "Backspace", "F5", "Tab"];
|
|
7260
|
+
let Os = !1, xe = null, ds = null;
|
|
7261
7261
|
const al = (e) => {
|
|
7262
7262
|
var r;
|
|
7263
7263
|
if (((r = e.tagName) == null ? void 0 : r.toLowerCase()) === "html") return { element: "html" };
|
|
@@ -7280,16 +7280,16 @@ const al = (e) => {
|
|
|
7280
7280
|
var n, i;
|
|
7281
7281
|
let r = t.target;
|
|
7282
7282
|
var s;
|
|
7283
|
-
t.target === ((n = window.document) == null ? void 0 : n.body) && window.Sprig.pointerDownTarget && (r = window.Sprig.pointerDownTarget), s = { x: t.x, y: t.y, type: e, elementAttributes: Eg(r), windowHeight: window.innerHeight, windowWidth: window.innerWidth, ...r instanceof HTMLElement || r instanceof SVGElement || r instanceof MathMLElement ? { rect: r == null ? void 0 : r.getBoundingClientRect(), xPath: Uu(r) } : {} }, (i = s == null ? void 0 : s.elementAttributes) != null && i.text && (s.elementAttributes.text = ao(s.elementAttributes.text)),
|
|
7283
|
+
t.target === ((n = window.document) == null ? void 0 : n.body) && window.Sprig.pointerDownTarget && (r = window.Sprig.pointerDownTarget), s = { x: t.x, y: t.y, type: e, elementAttributes: Eg(r), windowHeight: window.innerHeight, windowWidth: window.innerWidth, ...r instanceof HTMLElement || r instanceof SVGElement || r instanceof MathMLElement ? { rect: r == null ? void 0 : r.getBoundingClientRect(), xPath: Uu(r) } : {} }, (i = s == null ? void 0 : s.elementAttributes) != null && i.text && (s.elementAttributes.text = ao(s.elementAttributes.text)), xe == null || xe("Sprig_Click", s);
|
|
7284
7284
|
}, Pu = (e) => {
|
|
7285
7285
|
var t;
|
|
7286
|
-
kg.includes(e.key) && (t = { key: e.key },
|
|
7286
|
+
kg.includes(e.key) && (t = { key: e.key }, xe == null || xe("Sprig_Keystroke", t));
|
|
7287
7287
|
}, xg = () => {
|
|
7288
7288
|
var e;
|
|
7289
|
-
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && (e = { url: window.location.href, currentPageTitle: document.title },
|
|
7289
|
+
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("reload") && (e = { url: window.location.href, currentPageTitle: document.title }, xe == null || xe("Sprig_Refresh", e));
|
|
7290
7290
|
}, Tg = () => {
|
|
7291
7291
|
var e;
|
|
7292
|
-
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && ((e = { curUrl: window.location.href, fromUrl: document.referrer, currentPageTitle: document.title }).currentPageTitle && (e.currentPageTitle = ao(e.currentPageTitle)),
|
|
7292
|
+
window.performance.getEntriesByType("navigation").map((t) => t.type).includes("back_forward") && ((e = { curUrl: window.location.href, fromUrl: document.referrer, currentPageTitle: document.title }).currentPageTitle && (e.currentPageTitle = ao(e.currentPageTitle)), xe == null || xe("Sprig_BackForward", e));
|
|
7293
7293
|
}, _u = Ig((e) => {
|
|
7294
7294
|
if (!(e.target instanceof HTMLElement || e.target instanceof Document)) return;
|
|
7295
7295
|
let t = e.target;
|
|
@@ -7308,39 +7308,39 @@ const Fu = (e) => {
|
|
|
7308
7308
|
return N.info("GeneratedSessionID", { uuid: t }), t;
|
|
7309
7309
|
})(), ki = () => {
|
|
7310
7310
|
Q.setItem("sprig.disableReplayRecording", "disabled");
|
|
7311
|
-
},
|
|
7311
|
+
}, Ge = () => !!Q.getItem("sprig.disableReplayRecording"), As = () => !!Q.getItem("sprig.isReplayPaused");
|
|
7312
7312
|
var dl;
|
|
7313
7313
|
(dl = globalThis.addEventListener) == null || dl.call(globalThis, "beforeunload", () => {
|
|
7314
7314
|
N.info("BeforeUnload", { sessionId: ve }), Q.setItem("sprig.sessionId", ve);
|
|
7315
7315
|
});
|
|
7316
|
-
const
|
|
7316
|
+
const Ye = (e, t) => {
|
|
7317
7317
|
var r, s;
|
|
7318
|
-
if (!
|
|
7318
|
+
if (!Ge() && pe.isRecording && !As()) try {
|
|
7319
7319
|
(s = (r = globalThis.rrwebRecord) == null ? void 0 : r.addCustomEvent) == null || s.call(r, e, t);
|
|
7320
7320
|
} catch (n) {
|
|
7321
7321
|
br("Error recording custom event", n);
|
|
7322
7322
|
}
|
|
7323
7323
|
}, Rg = async (e) => {
|
|
7324
7324
|
const { x: t, xPath: r, y: s } = e, n = pe.scrollEventUuids[r];
|
|
7325
|
-
if (n) return
|
|
7325
|
+
if (n) return Ee(async () => {
|
|
7326
7326
|
var o, l, c, u;
|
|
7327
7327
|
const i = await ee.openDB(), a = await i.get("events", n);
|
|
7328
7328
|
if (a != null && a.event) {
|
|
7329
7329
|
const d = JSON.parse(a.event), h = t > ((l = (o = d.data) == null ? void 0 : o.payload) == null ? void 0 : l.x), f = s > ((u = (c = d.data) == null ? void 0 : c.payload) == null ? void 0 : u.y);
|
|
7330
7330
|
if (!h && !f) return null;
|
|
7331
7331
|
h && (d.data.payload.x = t), f && (d.data.payload.y = s), d.data.payload.elementAttributes = e.elementAttributes, a.event = JSON.stringify(d), await i.put("events", a);
|
|
7332
|
-
} else
|
|
7332
|
+
} else Ye("Sprig_Scroll", e);
|
|
7333
7333
|
}, "Error updating scroll event");
|
|
7334
|
-
|
|
7334
|
+
Ye("Sprig_Scroll", e);
|
|
7335
7335
|
}, ju = () => {
|
|
7336
7336
|
pe.stopRecording && (pe.stopRecording(), pe.stopRecording = void 0), pe.isRecording = !1, ["cleanupInterval", "inactivityInterval", "pendingCheckInterval"].forEach((e) => {
|
|
7337
7337
|
pe[e] && (clearInterval(pe[e]), pe[e] = void 0);
|
|
7338
|
-
}), Os && (window.removeEventListener("click", Nu,
|
|
7338
|
+
}), Os && (window.removeEventListener("click", Nu, We), window.removeEventListener("pointerdown", Bu, We), window.removeEventListener("mousedown", Fu, We), window.removeEventListener("keydown", Pu, We), window.removeEventListener("scroll", _u, We), Os = !1), oo.forEach((e) => {
|
|
7339
7339
|
var t;
|
|
7340
7340
|
(t = e.source) == null || t.postMessage({ type: vg }, { targetOrigin: e.origin });
|
|
7341
7341
|
});
|
|
7342
7342
|
}, Lg = ["did not allow mutations", "called in an invalid security context"], Og = (e, t, { reportError: r = !0, extraInfo: s = {} }) => {
|
|
7343
|
-
if (!
|
|
7343
|
+
if (!Ge() && t instanceof Error) {
|
|
7344
7344
|
if (ki(), t.name === "VersionError") return N.error("VersionErr", { message: e }), void ee.deleteDB();
|
|
7345
7345
|
((n) => {
|
|
7346
7346
|
if (!n) return !0;
|
|
@@ -7350,14 +7350,14 @@ const $e = (e, t) => {
|
|
|
7350
7350
|
}
|
|
7351
7351
|
}, br = (e, t, { reportError: r } = { reportError: !0 }) => {
|
|
7352
7352
|
ju(), N.error("ReplayErr", { code: t.code, name: t.name }), Og(e, t, { reportError: r });
|
|
7353
|
-
},
|
|
7353
|
+
}, Ee = async (e, t) => {
|
|
7354
7354
|
try {
|
|
7355
7355
|
return await e();
|
|
7356
7356
|
} catch (r) {
|
|
7357
7357
|
br(t, r);
|
|
7358
7358
|
}
|
|
7359
7359
|
}, Ei = () => {
|
|
7360
|
-
pe.isRecording && (
|
|
7360
|
+
pe.isRecording && (Ee(() => {
|
|
7361
7361
|
var e, t;
|
|
7362
7362
|
return (t = (e = globalThis.rrwebRecord) == null ? void 0 : e.takeFullSnapshot) == null ? void 0 : t.call(e, !0);
|
|
7363
7363
|
}, "Error recording full snapshot"), oo.forEach((e) => {
|
|
@@ -7387,9 +7387,9 @@ const ee = new class {
|
|
|
7387
7387
|
}
|
|
7388
7388
|
openDB() {
|
|
7389
7389
|
return function(e, t, { blocked: r, upgrade: s, blocking: n, terminated: i } = {}) {
|
|
7390
|
-
const a = indexedDB.open(e, t), o =
|
|
7390
|
+
const a = indexedDB.open(e, t), o = lt(a);
|
|
7391
7391
|
return s && (a.onupgradeneeded = (l) => {
|
|
7392
|
-
s(
|
|
7392
|
+
s(lt(a.result), l.oldVersion, l.newVersion, lt(a.transaction), l);
|
|
7393
7393
|
}), r && (a.onblocked = (l) => r(l.oldVersion, l.newVersion, l)), o.then((l) => {
|
|
7394
7394
|
i && (l.onclose = () => i()), n && (l.onversionchange = (c) => n(c.oldVersion, c.newVersion, c));
|
|
7395
7395
|
}).catch(() => {
|
|
@@ -7479,16 +7479,16 @@ const ee = new class {
|
|
|
7479
7479
|
}
|
|
7480
7480
|
await r.done;
|
|
7481
7481
|
}
|
|
7482
|
-
}(),
|
|
7482
|
+
}(), Ze = [];
|
|
7483
7483
|
let vr, Wu, gt = [], Dt = !1, Mt = 0, ps = !1, Vu = !1;
|
|
7484
7484
|
const lo = [];
|
|
7485
7485
|
let Ms, Gu, hs, Hu, Sn = !1;
|
|
7486
7486
|
const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, triggerSnapshot: r, forceInit: s = !1 }) => {
|
|
7487
|
-
ps && !s || (Q.isStorageAvailable ? (gt = [], lo.splice(0),
|
|
7488
|
-
}, Mg = [
|
|
7487
|
+
ps && !s || (Q.isStorageAvailable ? (gt = [], lo.splice(0), Ze.splice(0), Mt = 0, hs = r, Wu = e, vr = { responseGroupUuid: t.responseGroupUuid, surveyId: t.surveyId, userAgent: t.userAgent, sdkVersion: t.sdkVersion }, Gu = t.maxDurationSeconds, Pg(), ps || (Hu = globalThis.setInterval(Dg, 500)), ps = !0) : Dt = !0);
|
|
7488
|
+
}, Mg = [$e.Drag, $e.Input, $e.MediaInteraction, $e.MouseInteraction, $e.MouseMove, $e.Scroll, $e.Selection, $e.TouchMove], Ug = (e) => e.type === at.Custom || e.type === at.IncrementalSnapshot && Mg.includes(e.data.source), co = (e) => e.some(Ug), Dg = async () => {
|
|
7489
7489
|
if (!Pt()) return void globalThis.clearInterval(Hu);
|
|
7490
|
-
if ($u(), !co(
|
|
7491
|
-
const e =
|
|
7490
|
+
if ($u(), !co(Ze)) return;
|
|
7491
|
+
const e = Ze[0].timestamp;
|
|
7492
7492
|
Date.now() - e > 35e3 && (hs == null || hs());
|
|
7493
7493
|
}, $u = async () => {
|
|
7494
7494
|
if (gt.length || Sn) return;
|
|
@@ -7523,12 +7523,12 @@ const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, tr
|
|
|
7523
7523
|
const n = new TextEncoder(), i = new CompressionStream("gzip"), a = i.writable.getWriter(), o = n.encode(JSON.stringify(s));
|
|
7524
7524
|
return a.write(o), a.close(), new Uint8Array(await new Response(i.readable).arrayBuffer());
|
|
7525
7525
|
})(t);
|
|
7526
|
-
N.info("Uploading always-on events with presigned url"), await Yu(() =>
|
|
7526
|
+
N.info("Uploading always-on events with presigned url"), await Yu(() => Xe(e, { body: r, method: "PUT" }), "uploading always-on with presigned url");
|
|
7527
7527
|
}, Ng = async () => {
|
|
7528
7528
|
if (!Pt()) return;
|
|
7529
7529
|
const { surveyId: e, responseGroupUuid: t } = vr, r = { responseGroupUuid: t, surveyId: e, index: Mt + 1 };
|
|
7530
7530
|
N.info("Fetching always-on upload urls", r);
|
|
7531
|
-
const s = await Yu(() =>
|
|
7531
|
+
const s = await Yu(() => Xe(`${Wu}/sdk/1/replayUrls`, { method: "POST", body: JSON.stringify(r), headers: Ue(globalThis.UserLeap) }), "fetching always-on signed urls");
|
|
7532
7532
|
if (!s) return;
|
|
7533
7533
|
const n = s.json.signedUrls;
|
|
7534
7534
|
return N.info("Fetched more always-on upload urls", { body: r, urls: n }), n;
|
|
@@ -7541,21 +7541,21 @@ const Pt = () => ps && !Dt && Date.now() <= Ms, Ag = ({ apiUrl: e, config: t, tr
|
|
|
7541
7541
|
}, Ku = (e) => {
|
|
7542
7542
|
var n, i, a;
|
|
7543
7543
|
const t = e.length ? e[e.length - 1].timestamp : Date.now(), r = Mt, s = ((i = (n = globalThis.UserLeap) == null ? void 0 : n.config) == null ? void 0 : i.customMetadata) ?? ((a = globalThis.__cfg) == null ? void 0 : a.customMetadata);
|
|
7544
|
-
Mt++, e.push({ timestamp: t, type:
|
|
7544
|
+
Mt++, e.push({ timestamp: t, type: at.Custom, data: { tag: "Sprig_Meta", payload: { ...vr, index: r, visitorId: globalThis.UserLeap.visitorId ?? "", timestamp: t, customMetadata: s } } });
|
|
7545
7545
|
}, Fg = (e, t) => {
|
|
7546
|
-
Pt() && !Vu && (e ||
|
|
7547
|
-
const r =
|
|
7546
|
+
Pt() && !Vu && (e || Ze.length) && (e && Ze.length && (async () => {
|
|
7547
|
+
const r = Ze.splice(0);
|
|
7548
7548
|
if (!co(r)) return;
|
|
7549
7549
|
N.info("Capturing always-on event array to upload"), Ku(r);
|
|
7550
7550
|
const s = await Ju();
|
|
7551
7551
|
s && await qu(s, r);
|
|
7552
|
-
})(),
|
|
7552
|
+
})(), Ze.push(t));
|
|
7553
7553
|
};
|
|
7554
7554
|
var pl;
|
|
7555
7555
|
(pl = globalThis.addEventListener) == null || pl.call(globalThis, "beforeunload", async () => {
|
|
7556
7556
|
Vu = !0, Pt() && (N.info("Always On handle page unload"), (() => {
|
|
7557
7557
|
let e;
|
|
7558
|
-
|
|
7558
|
+
Ze.length && (e = Ze[0].timestamp);
|
|
7559
7559
|
const t = { disabled: Dt, metadata: vr, uploadUrls: gt, currentIndex: Mt, pendingEventTimestamp: e, expirationTimestamp: Ms };
|
|
7560
7560
|
N.info("Storing session state on unload", t), Q.setItem("sprig.alwayson.info", JSON.stringify(t));
|
|
7561
7561
|
})());
|
|
@@ -7568,7 +7568,7 @@ const Zu = async (e, t) => {
|
|
|
7568
7568
|
} finally {
|
|
7569
7569
|
const n = performance.now() - r;
|
|
7570
7570
|
let i = wr[t];
|
|
7571
|
-
i || (i =
|
|
7571
|
+
i || (i = Ve(t)), i.report(n / 1e3);
|
|
7572
7572
|
}
|
|
7573
7573
|
return s;
|
|
7574
7574
|
}, Xu = (e, t) => {
|
|
@@ -7578,10 +7578,10 @@ const Zu = async (e, t) => {
|
|
|
7578
7578
|
} finally {
|
|
7579
7579
|
const s = performance.now() - r;
|
|
7580
7580
|
let n = wr[t];
|
|
7581
|
-
n || (n =
|
|
7581
|
+
n || (n = Ve(t)), n.report(s / 1e3);
|
|
7582
7582
|
}
|
|
7583
7583
|
};
|
|
7584
|
-
let Qu = 5e3, xi = 6e4, Ti = 0,
|
|
7584
|
+
let Qu = 5e3, xi = 6e4, Ti = 0, ct, Ri = !1, Li = [];
|
|
7585
7585
|
const Bg = (e) => {
|
|
7586
7586
|
var t, r, s, n;
|
|
7587
7587
|
if ((t = e.event) != null && t.includes("Sprig_Scroll")) {
|
|
@@ -7592,25 +7592,25 @@ const Bg = (e) => {
|
|
|
7592
7592
|
Li.push(e), Ri || zg();
|
|
7593
7593
|
}, zg = () => {
|
|
7594
7594
|
Ri = !0, setTimeout(async () => {
|
|
7595
|
-
if (
|
|
7595
|
+
if (Ge() || As()) return;
|
|
7596
7596
|
const e = Li;
|
|
7597
7597
|
Li = [], Ri = !1, Xu(async () => {
|
|
7598
7598
|
await (async (t) => {
|
|
7599
7599
|
const r = t.map((s) => ({ ...s, sessionId: s.sessionId ?? ve }));
|
|
7600
|
-
if (r.length !== 0) return
|
|
7600
|
+
if (r.length !== 0) return Ee(() => ee.bulkAdd("events", r), "Error storing replay events");
|
|
7601
7601
|
})(e);
|
|
7602
7602
|
}, "sdk_replay_add_event_batch_seconds");
|
|
7603
7603
|
}, 500);
|
|
7604
7604
|
}, jg = (e, t, r) => {
|
|
7605
7605
|
pe.cleanupInterval = window.setInterval(() => {
|
|
7606
7606
|
const s = Date.now();
|
|
7607
|
-
Zu(() =>
|
|
7608
|
-
|
|
7607
|
+
Zu(() => Ee(async () => {
|
|
7608
|
+
Ge() || await Promise.all([ee.deleteRowsBefore("events", s - 1e3 * e, (n) => n.expiredAt === void 0 || n.expiredAt < s - 1e3 * e), ee.deleteRowsBefore("chunkUploads", s - 1e3 * t), ee.deleteRowsBefore("pendingCaptures", s - 1e3 * r, (n) => !n.canUpload)]);
|
|
7609
7609
|
}, "Error deleting table rows"), "sdk_replay_cleanup_seconds"), N.debug("CleanupComplete");
|
|
7610
7610
|
}, 3e4);
|
|
7611
7611
|
}, Wg = () => {
|
|
7612
7612
|
pe.pendingCheckInterval = window.setInterval(async () => {
|
|
7613
|
-
|
|
7613
|
+
Ee(async () => {
|
|
7614
7614
|
await Oi();
|
|
7615
7615
|
}, "Error initiating pending captures");
|
|
7616
7616
|
}, 5e3);
|
|
@@ -7619,10 +7619,10 @@ let In = !1;
|
|
|
7619
7619
|
const Oi = async (e = !1) => {
|
|
7620
7620
|
if (!In) try {
|
|
7621
7621
|
In = !0;
|
|
7622
|
-
const t = parseInt(
|
|
7622
|
+
const t = parseInt(ct ?? "0");
|
|
7623
7623
|
if (t === 0) return;
|
|
7624
7624
|
const r = await ee.getPendingCaptures({ beforePresent: !0, isBeforeType: e }), s = await ee.openDB();
|
|
7625
|
-
await Promise.all(r.map(async (n) => (await s.delete("pendingCaptures", n.uuid), rd(n.captureParams, n.canUpload)))),
|
|
7625
|
+
await Promise.all(r.map(async (n) => (await s.delete("pendingCaptures", n.uuid), rd(n.captureParams, n.canUpload)))), ct = (t - r.length).toString(), Q.setItem("sprig.pendingCount", ct);
|
|
7626
7626
|
} finally {
|
|
7627
7627
|
In = !1;
|
|
7628
7628
|
}
|
|
@@ -7643,7 +7643,7 @@ const Oi = async (e = !1) => {
|
|
|
7643
7643
|
const r = await (async (s) => Au.execute(async () => {
|
|
7644
7644
|
var a;
|
|
7645
7645
|
N.info("UploadChunkStart", { chunkIndex: s.chunkIndex, surveyId: s.surveyId });
|
|
7646
|
-
const n = await
|
|
7646
|
+
const n = await Xe(s.uploadUrl, { body: s.data, method: "PUT" });
|
|
7647
7647
|
N.http("UploadChunkEnd", { url: s.uploadUrl, method: "PUT", status_code: n.status, reason: n.statusText ?? "OK", chunkIndex: s.chunkIndex, surveyId: s.surveyId });
|
|
7648
7648
|
const i = (a = n.headers) == null ? void 0 : a.get("ETag");
|
|
7649
7649
|
if (!i) throw new Error(`Upload response did not include etag for upload ${s.uploadId}, part ${s.chunkIndex}`);
|
|
@@ -7658,7 +7658,7 @@ const Oi = async (e = !1) => {
|
|
|
7658
7658
|
const s = r.map((i) => ({ ETag: i.etag, PartNumber: i.chunkIndex })).filter((i) => i.ETag !== null), n = r[0];
|
|
7659
7659
|
await Mu({ apiUrl: n.apiUrl, surveyId: n.surveyId, uploadId: e, responseGroupUuid: n.responseGroupId, etags: s, headers: n.completeUploadHeaders, replayDuration: n.replayDuration }), await ee.deleteChunkUploads("UploadComplete", e);
|
|
7660
7660
|
}, Gg = () => {
|
|
7661
|
-
|
|
7661
|
+
Ee(async () => {
|
|
7662
7662
|
const e = await ee.getChunkUploadsByStatus({ sessionId: ve, status: "ReadyForUpload" });
|
|
7663
7663
|
if (!(e != null && e.length)) return;
|
|
7664
7664
|
const t = await ed(e);
|
|
@@ -7679,40 +7679,40 @@ const Oi = async (e = !1) => {
|
|
|
7679
7679
|
continue;
|
|
7680
7680
|
}
|
|
7681
7681
|
d === 0 && (d = f[0].timestamp), h = f[f.length - 1].timestamp;
|
|
7682
|
-
const
|
|
7683
|
-
|
|
7684
|
-
const m = `${c ? "," : "["}${
|
|
7682
|
+
const C = f.map((v) => v.event);
|
|
7683
|
+
C.push(`{"timestamp":${n}}`);
|
|
7684
|
+
const m = `${c ? "," : "["}${C}`, g = i.encode(m);
|
|
7685
7685
|
Xu(() => {
|
|
7686
7686
|
l.write(g);
|
|
7687
7687
|
}, "sdk_replay_compression_seconds"), c = !0;
|
|
7688
7688
|
}
|
|
7689
7689
|
if (h - d < Qu) return N.debug("ReplayTooShort"), null;
|
|
7690
|
-
const
|
|
7691
|
-
return l.write(
|
|
7690
|
+
const w = i.encode("]");
|
|
7691
|
+
return l.write(w), l.close(), a = new Uint8Array(await new Response(o.readable).arrayBuffer()), a;
|
|
7692
7692
|
})(r - e, r);
|
|
7693
7693
|
}, cl = async (e) => {
|
|
7694
7694
|
const { surveyId: t, responseGroupId: r, visitorId: s, apiUrl: n, completeUploadHeaders: i, replayParams: a, triggerTimestamp: o } = e, l = await Hg(1e3 * a.replayDurationSeconds, o);
|
|
7695
7695
|
if (!(l != null && l.length)) return void N.info("FileDataEmpty", { surveyId: t });
|
|
7696
7696
|
const c = ((d, h, f) => {
|
|
7697
|
-
const
|
|
7697
|
+
const w = d.length, p = 1024 * h * 1024, C = Math.ceil(w / f), m = Math.max(p, C), g = [];
|
|
7698
7698
|
let v = 0;
|
|
7699
|
-
for (; v <
|
|
7699
|
+
for (; v < w; ) g.push(d.slice(v, v + m)), v += m;
|
|
7700
7700
|
return g;
|
|
7701
7701
|
})(l, a.minimumChunkSizeMb, a.signedUrls.length), u = await Promise.all(c.map(async (d, h) => {
|
|
7702
|
-
const f = Ut(),
|
|
7703
|
-
return await (await ee.openDB()).add("chunkUploads", { ...
|
|
7702
|
+
const f = Ut(), w = { apiUrl: n, chunkIndex: h + 1, completeUploadHeaders: i, etag: null, responseGroupId: r, status: "ReadyForUpload", surveyId: t, timestamp: o, totalChunks: c.length, data: d, uploadId: a.uploadId, uploadUrl: a.signedUrls[h].url, uuid: f, visitorId: s };
|
|
7703
|
+
return await (await ee.openDB()).add("chunkUploads", { ...w, sessionId: w.sessionId ?? ve }), w;
|
|
7704
7704
|
}));
|
|
7705
7705
|
await (async (d, h) => {
|
|
7706
7706
|
await ed(h), await Promise.all(d.map((f) => td(f)));
|
|
7707
7707
|
})([a.uploadId], u);
|
|
7708
7708
|
}, rd = async (e, t) => {
|
|
7709
|
-
if (
|
|
7709
|
+
if (Ge()) return N.debug("ReplayDisabled-ScheduleOrCapture");
|
|
7710
7710
|
const { isHeatmap: r, isStandalone: s, replayParams: n, triggerTimestamp: i, responseGroupId: a } = e, o = async () => {
|
|
7711
|
-
setTimeout(() => z.removeListener(B.QuestionAnswered, o), 0),
|
|
7711
|
+
setTimeout(() => z.removeListener(B.QuestionAnswered, o), 0), Ee(async () => {
|
|
7712
7712
|
n.replayDurationType === "before" ? await cl(e) : await ee.markPendingCaptureToCanUpload(a);
|
|
7713
7713
|
}, "Error in schedule/capture callback");
|
|
7714
7714
|
};
|
|
7715
|
-
|
|
7715
|
+
Ee(async () => {
|
|
7716
7716
|
if (n.replayDurationType === "after" || n.replayDurationType === "beforeAndAfter")
|
|
7717
7717
|
return !s && !r && z.on(B.QuestionAnswered, o), void await nd(e);
|
|
7718
7718
|
if (s || r || t) await cl(e), r && $g();
|
|
@@ -7722,39 +7722,39 @@ const Oi = async (e = !1) => {
|
|
|
7722
7722
|
}
|
|
7723
7723
|
}, "Error in scheduling/capturing replay");
|
|
7724
7724
|
}, $g = async () => {
|
|
7725
|
-
parseInt(
|
|
7726
|
-
}, sd = async () =>
|
|
7725
|
+
parseInt(ct ?? "0") || Q.removeItem("sprig.isCapturingHeatmap"), Q.getItem("sprig.teardownAfterCapture") && (ju(), sd(), Q.removeItem("sprig.teardownAfterCapture"));
|
|
7726
|
+
}, sd = async () => Ge() ? N.debug("ReplayDisabled-ClearData") : Promise.all([ee.deleteBySessionId("events", ve), ee.deleteBySessionId("pendingCaptures", ve)]).catch((e) => {
|
|
7727
7727
|
br("Error clearing user replay data", e);
|
|
7728
7728
|
}), nd = async (e) => {
|
|
7729
|
-
if (
|
|
7729
|
+
if (Ge()) return;
|
|
7730
7730
|
const { isHeatmap: t, surveyId: r } = e, s = await ee.getPendingCaptures(), n = s == null ? void 0 : s.filter((l) => l.captureParams.surveyId === r);
|
|
7731
7731
|
if (n != null && n.length) return void N.info("PendingCaptureExists", { surveyId: r });
|
|
7732
7732
|
t && (Ei(), Q.setItem("sprig.isCapturingHeatmap", "true"), Ti = Date.now(), pe.inactivityInterval || (pe.inactivityInterval = window.setInterval(() => {
|
|
7733
7733
|
var l;
|
|
7734
|
-
l = Ti, Date.now() - l >= 3e4 &&
|
|
7734
|
+
l = Ti, Date.now() - l >= 3e4 && Ee(() => ee.markPendingHeatmapsReady(), "Error in heatmap inactivity");
|
|
7735
7735
|
}, 1e3)));
|
|
7736
7736
|
const i = { ...e, replayParams: { ...e.replayParams } };
|
|
7737
7737
|
e.replayParams.replayDurationType === "beforeAndAfter" && (i.replayParams.replayDurationSeconds *= 2), i.replayParams.replayDurationType = "before";
|
|
7738
7738
|
const a = e.triggerTimestamp + 1e3 * e.replayParams.replayDurationSeconds;
|
|
7739
|
-
i.triggerTimestamp = a,
|
|
7739
|
+
i.triggerTimestamp = a, ct = (parseInt(ct ?? "0") + 1).toString(), Q.setItem("sprig.pendingCount", ct), await (await ee.openDB()).add("pendingCaptures", { canUpload: !1, captureParams: i, sessionId: ve, targetTimestamp: a, timestamp: Date.now(), uuid: Ut() });
|
|
7740
7740
|
}, Yg = Object.freeze(Object.defineProperty({ __proto__: null, RecordEvent: (e) => {
|
|
7741
|
-
|
|
7741
|
+
Ye("Sprig_TrackEvent", e);
|
|
7742
7742
|
}, RecordPageView: (e) => {
|
|
7743
|
-
e.description && (e.description = ao(e.description)),
|
|
7743
|
+
e.description && (e.description = ao(e.description)), Ye("Sprig_PageView", e);
|
|
7744
7744
|
}, RecordSurveyShown: (e) => {
|
|
7745
|
-
|
|
7745
|
+
Ye("Sprig_ShowSurvey", e);
|
|
7746
7746
|
}, _completeSessionReplay: async ({ surveyId: e, responseGroupUuid: t, eventDigest: r, headers: s }) => {
|
|
7747
7747
|
if (!e || !t) return !1;
|
|
7748
7748
|
const n = globalThis.UserLeap._API_URL, i = await Mu({ surveyId: e, responseGroupUuid: t, eventDigest: r, apiUrl: n, headers: s }, !0);
|
|
7749
7749
|
return !(i != null && i.error);
|
|
7750
|
-
}, checkPendingHeatmapsUrl: () =>
|
|
7750
|
+
}, checkPendingHeatmapsUrl: () => Ge() ? N.debug("ReplayDisabled-PendingHeatmaps") : Ee(async () => {
|
|
7751
7751
|
const e = (await ee.getPendingCaptures({ isHeatmap: !0 })).map((t) => ({ eventId: t.captureParams.eventId, uuid: t.uuid })).filter(({ eventId: t }) => !pu(t)).map(({ uuid: t }) => t);
|
|
7752
7752
|
return N.info("PendingHeatmapsToComplete", { count: e.length }), e.length && (await ee.markPendingHeatmapsReady(e), N.info("MarkedPendingHeatmapsReady")), e.length;
|
|
7753
7753
|
}, "Error marking pending heatmaps ready"), clearUserReplayData: sd, disableRecording: br, initializeReplay: async ({ maxReplayDurationSeconds: e, maxInflightRequests: t = 2, replaySettings: r, teardownAfter: s = !1, apiUrl: n, alwaysOnConfig: i }) => {
|
|
7754
7754
|
if (i && Ag({ apiUrl: n, config: i, triggerSnapshot: () => {
|
|
7755
7755
|
Ei();
|
|
7756
|
-
} }),
|
|
7757
|
-
if (s && Q.setItem("sprig.teardownAfterCapture", "true"),
|
|
7756
|
+
} }), ct = Q.getItem("sprig.pendingCount"), pe.isRecording) return;
|
|
7757
|
+
if (s && Q.setItem("sprig.teardownAfterCapture", "true"), Ge()) return N.debug("ReplayDisabled");
|
|
7758
7758
|
if (await (async () => {
|
|
7759
7759
|
var l;
|
|
7760
7760
|
if (!zu()) return !0;
|
|
@@ -7772,43 +7772,43 @@ const Oi = async (e = !1) => {
|
|
|
7772
7772
|
} catch (l) {
|
|
7773
7773
|
return N.error("ReplayOpenErr", { name: l.name }), l.name === "VersionError" && ee.deleteDB(), ki();
|
|
7774
7774
|
}
|
|
7775
|
-
|
|
7775
|
+
Ee(async () => {
|
|
7776
7776
|
await Oi(!0);
|
|
7777
7777
|
}, "Error uploading ready pending captures");
|
|
7778
7778
|
const a = Pt() ? 30 : 0, o = Math.max(e ?? 0, a);
|
|
7779
7779
|
if (!o) return N.debug("MissingDuration");
|
|
7780
|
-
N.debug("ReplayInit"), await
|
|
7780
|
+
N.debug("ReplayInit"), await Ee(async () => {
|
|
7781
7781
|
var l;
|
|
7782
7782
|
r != null && r.minDuration && (Qu = r.minDuration), r != null && r.batchDuration && (xi = r.batchDuration), l = t, Au.setLimit(l), Gg(), jg(o + 35, 1800, o + 35), Wg();
|
|
7783
7783
|
const c = window.UserLeap.replayLibraryURL ?? "https://cdn.sprig.com/dependencies/record.min.js", u = window.rrwebRecord;
|
|
7784
7784
|
if (!u) return N.error("RecordScriptFailed");
|
|
7785
7785
|
let d = !0, h = 0;
|
|
7786
7786
|
const f = { checkoutEveryNms: 3e4, sampling: { input: "last", scroll: 250, media: 800 }, ...r, mutationQueueEnabled: r == null ? void 0 : r.enableMutationQueue };
|
|
7787
|
-
var
|
|
7788
|
-
pe.stopRecording = u({ emit: (
|
|
7789
|
-
if (
|
|
7790
|
-
if (m &&
|
|
7791
|
-
else if (m && h &&
|
|
7787
|
+
var w, p;
|
|
7788
|
+
pe.stopRecording = u({ emit: (C, m) => {
|
|
7789
|
+
if (C.type === at.Custom && (Ti = Date.now()), Ge() || As()) return;
|
|
7790
|
+
if (m && C.type === at.Meta) h = performance.now();
|
|
7791
|
+
else if (m && h && C.type === at.FullSnapshot) {
|
|
7792
7792
|
const v = performance.now() - h;
|
|
7793
7793
|
bu("sdk_replay_snapshot_seconds", v / 1e3);
|
|
7794
7794
|
}
|
|
7795
|
-
const g = d || !!m &&
|
|
7796
|
-
d = !1, Fg(g,
|
|
7797
|
-
}, ...f }), pe.isRecording = !!pe.stopRecording, pe.isRecording && (((
|
|
7795
|
+
const g = d || !!m && C.type === at.Meta;
|
|
7796
|
+
d = !1, Fg(g, C), Bg({ uuid: Ut(), event: JSON.stringify(C), isValidStart: g, timestamp: Date.now() });
|
|
7797
|
+
}, ...f }), pe.isRecording = !!pe.stopRecording, pe.isRecording && (((C, m) => {
|
|
7798
7798
|
window.addEventListener("message", (g) => {
|
|
7799
7799
|
var v;
|
|
7800
|
-
g.data.type === yg && (oo.push({ source: g.source, origin: g.origin }), (v = g.source) == null || v.postMessage({ type: wg, settings:
|
|
7800
|
+
g.data.type === yg && (oo.push({ source: g.source, origin: g.origin }), (v = g.source) == null || v.postMessage({ type: wg, settings: C, replayLibraryUrl: m }, { targetOrigin: g.origin }));
|
|
7801
7801
|
});
|
|
7802
|
-
})(f, c), z.on("survey.complete", (
|
|
7802
|
+
})(f, c), z.on("survey.complete", (C) => {
|
|
7803
7803
|
var m;
|
|
7804
|
-
m = { id:
|
|
7805
|
-
}),
|
|
7804
|
+
m = { id: C, userAgent: window.navigator.userAgent }, Ye("Sprig_SubmitSurvey", m);
|
|
7805
|
+
}), w = Ye, p = Rg, Os || (xe = w, ds = p, window.addEventListener("click", Nu, We), window.addEventListener("pointerdown", Bu, We), window.addEventListener("mousedown", Fu, We), window.addEventListener("keydown", Pu, We), window.addEventListener("scroll", _u, We), Os = !0, xg(), Tg()));
|
|
7806
7806
|
}, "Error initializing replay");
|
|
7807
7807
|
}, isReplayPaused: As, isReplayRecording: () => pe.isRecording, recordFullSnapshot: Ei, recordReplayPaused: () => {
|
|
7808
|
-
|
|
7808
|
+
Ye("Sprig_ReplayPaused", { timestamp: Date.now() }), Q.setItem("sprig.isReplayPaused", "true");
|
|
7809
7809
|
}, recordReplayResumed: () => {
|
|
7810
|
-
Q.removeItem("sprig.isReplayPaused"),
|
|
7811
|
-
}, scheduleCapture: nd, scheduleOrCaptureReplay: rd, tryReplayAction:
|
|
7810
|
+
Q.removeItem("sprig.isReplayPaused"), Ye("Sprig_ReplayResumed", { timestamp: Date.now() });
|
|
7811
|
+
}, scheduleCapture: nd, scheduleOrCaptureReplay: rd, tryReplayAction: Ee, uploadReadyPendingCaptures: Oi }, Symbol.toStringTag, { value: "Module" }));
|
|
7812
7812
|
((e) => {
|
|
7813
7813
|
se.replay = e;
|
|
7814
7814
|
})(Yg), window.UpChunk = { createUpload: Gd }, window.rrwebRecord = qt;
|
|
@@ -7818,22 +7818,22 @@ export {
|
|
|
7818
7818
|
Jg as D,
|
|
7819
7819
|
Xg as E,
|
|
7820
7820
|
B as S,
|
|
7821
|
-
|
|
7821
|
+
Xe as a,
|
|
7822
7822
|
N as b,
|
|
7823
7823
|
Gf as c,
|
|
7824
|
-
|
|
7824
|
+
Be as d,
|
|
7825
7825
|
z as e,
|
|
7826
7826
|
Ss as f,
|
|
7827
7827
|
ey as g,
|
|
7828
7828
|
Zg as h,
|
|
7829
7829
|
ty as i,
|
|
7830
7830
|
to as j,
|
|
7831
|
-
|
|
7831
|
+
st as k,
|
|
7832
7832
|
Ig as l,
|
|
7833
7833
|
Qg as m,
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7834
|
+
ny as n,
|
|
7835
|
+
yi as o,
|
|
7836
|
+
sy as p,
|
|
7837
7837
|
ry as r,
|
|
7838
7838
|
su as s,
|
|
7839
7839
|
Ut as v
|