@sailfish-ai/recorder 1.8.10 → 1.8.11
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/index.js +1 -0
- package/dist/recorder.cjs +795 -779
- package/dist/recorder.js +801 -783
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +795 -779
- package/dist/session.js +42 -5
- package/dist/types/index.d.ts +1 -0
- package/dist/websocket.js +6 -4
- package/package.json +1 -1
package/dist/recorder.js
CHANGED
|
@@ -325,9 +325,23 @@ async function deleteNotifyMessageById(e) {
|
|
|
325
325
|
a.delete(e);
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
|
-
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
|
|
328
|
+
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis, Q = "sailfishSessionId", ee = "__sailfish_refresh__";
|
|
329
|
+
let te = null;
|
|
329
330
|
function getOrSetSessionId() {
|
|
330
|
-
|
|
331
|
+
if (!H) return v4();
|
|
332
|
+
if (te) return te;
|
|
333
|
+
const e = window.name.startsWith(ee);
|
|
334
|
+
if (e && (window.name = window.name.substring(20)), e) {
|
|
335
|
+
const e2 = window.sessionStorage.getItem(Q);
|
|
336
|
+
if (e2) return te = e2, e2;
|
|
337
|
+
}
|
|
338
|
+
const a = v4();
|
|
339
|
+
te = a;
|
|
340
|
+
try {
|
|
341
|
+
window.sessionStorage.setItem(Q, a);
|
|
342
|
+
} catch (e2) {
|
|
343
|
+
}
|
|
344
|
+
return a;
|
|
331
345
|
}
|
|
332
346
|
function buildBatches(e, a, u) {
|
|
333
347
|
const m2 = {};
|
|
@@ -350,32 +364,35 @@ function buildBatches(e, a, u) {
|
|
|
350
364
|
function eventSize(e) {
|
|
351
365
|
return new Blob([JSON.stringify(e)]).size;
|
|
352
366
|
}
|
|
353
|
-
|
|
367
|
+
H && window.addEventListener("beforeunload", () => {
|
|
368
|
+
window.name = ee + window.name;
|
|
369
|
+
});
|
|
370
|
+
let ne = Date.now;
|
|
354
371
|
function withAppUrlMetadata(e) {
|
|
355
372
|
var _a2;
|
|
356
373
|
return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
357
374
|
}
|
|
358
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
359
|
-
const
|
|
360
|
-
let
|
|
375
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (ne = () => (/* @__PURE__ */ new Date()).getTime());
|
|
376
|
+
const re = readDebugFlag(), oe = "per_session", se = "sailfish_funcspan_global_state";
|
|
377
|
+
let ie = null, le = false, ce = null, pe = null;
|
|
361
378
|
function saveGlobalFuncSpanState(e, a) {
|
|
362
379
|
try {
|
|
363
380
|
if ("undefined" == typeof localStorage) return;
|
|
364
381
|
const u = { enabled: e, expirationTimestampMs: a };
|
|
365
|
-
localStorage.setItem(
|
|
382
|
+
localStorage.setItem(se, JSON.stringify(u)), re && console.log("[Sailfish] Saved global function span state to localStorage:", u);
|
|
366
383
|
} catch (e2) {
|
|
367
|
-
|
|
384
|
+
re && console.warn("[Sailfish] Failed to save global function span state to localStorage:", e2);
|
|
368
385
|
}
|
|
369
386
|
}
|
|
370
387
|
function clearGlobalFuncSpanState() {
|
|
371
388
|
try {
|
|
372
389
|
if ("undefined" == typeof localStorage) return;
|
|
373
|
-
localStorage.removeItem(
|
|
390
|
+
localStorage.removeItem(se), re && console.log("[Sailfish] Cleared global function span state from localStorage");
|
|
374
391
|
} catch (e) {
|
|
375
|
-
|
|
392
|
+
re && console.warn("[Sailfish] Failed to clear global function span state from localStorage:", e);
|
|
376
393
|
}
|
|
377
394
|
}
|
|
378
|
-
let
|
|
395
|
+
let de = false, he = null, me = null, ge = false, ye = null, we = null;
|
|
379
396
|
function isWebSocketOpen(e) {
|
|
380
397
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
381
398
|
}
|
|
@@ -386,15 +403,15 @@ async function flushNotifyQueue() {
|
|
|
386
403
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
387
404
|
})) ?? [];
|
|
388
405
|
})();
|
|
389
|
-
if (isWebSocketOpen(
|
|
390
|
-
for (const a of e)
|
|
406
|
+
if (isWebSocketOpen(ie)) try {
|
|
407
|
+
for (const a of e) ie.send(a.value), await deleteNotifyMessageById(a.id);
|
|
391
408
|
} catch (e2) {
|
|
392
409
|
}
|
|
393
410
|
}
|
|
394
411
|
async function flushBufferedEvents() {
|
|
395
|
-
if (isWebSocketOpen(
|
|
412
|
+
if (isWebSocketOpen(ie)) if (ce) await ce;
|
|
396
413
|
else {
|
|
397
|
-
|
|
414
|
+
ce = (async () => {
|
|
398
415
|
var _a2, _b;
|
|
399
416
|
const e = await (async function getAllIndexedEvents() {
|
|
400
417
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -409,33 +426,33 @@ async function flushBufferedEvents() {
|
|
|
409
426
|
for (const e2 of Object.values(a)) {
|
|
410
427
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
411
428
|
for (const e3 of a2) {
|
|
412
|
-
if (!isWebSocketOpen(
|
|
429
|
+
if (!isWebSocketOpen(ie)) break;
|
|
413
430
|
const a3 = e3.map((e4) => {
|
|
414
431
|
var _a3, _b2;
|
|
415
432
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
416
433
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
417
434
|
try {
|
|
418
435
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
419
|
-
|
|
436
|
+
ie.send(e4), await deleteEventsByIds(u);
|
|
420
437
|
} catch (e4) {
|
|
421
438
|
}
|
|
422
439
|
}
|
|
423
440
|
}
|
|
424
441
|
})();
|
|
425
442
|
try {
|
|
426
|
-
await
|
|
443
|
+
await ce;
|
|
427
444
|
} finally {
|
|
428
|
-
|
|
445
|
+
ce = null;
|
|
429
446
|
}
|
|
430
447
|
}
|
|
431
448
|
}
|
|
432
449
|
function sendEvent(e) {
|
|
433
450
|
var _a2;
|
|
434
451
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
435
|
-
if (
|
|
452
|
+
if (le || !isWebSocketOpen(ie)) return void saveEventToIDB(a);
|
|
436
453
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
437
454
|
try {
|
|
438
|
-
|
|
455
|
+
ie.send(u);
|
|
439
456
|
} catch (e2) {
|
|
440
457
|
saveEventToIDB(a);
|
|
441
458
|
}
|
|
@@ -445,83 +462,83 @@ function initializeWebSocket(e, a, u) {
|
|
|
445
462
|
const a2 = document.createElement("a");
|
|
446
463
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
447
464
|
})(e), w2 = new URL(e).protocol;
|
|
448
|
-
return
|
|
449
|
-
|
|
465
|
+
return ie = new $(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.11`, [], { connectionTimeout: 3e4 }), ie.addEventListener("open", () => {
|
|
466
|
+
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (de ? "ENABLED" : "DISABLED"))), (async () => {
|
|
450
467
|
try {
|
|
451
|
-
|
|
468
|
+
le = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
452
469
|
} finally {
|
|
453
|
-
|
|
470
|
+
le = false;
|
|
454
471
|
}
|
|
455
|
-
null !=
|
|
472
|
+
null != pe && clearInterval(pe), pe = window.setInterval(() => {
|
|
456
473
|
flushBufferedEvents();
|
|
457
474
|
}, 2e3);
|
|
458
475
|
})();
|
|
459
|
-
}),
|
|
460
|
-
|
|
461
|
-
}),
|
|
476
|
+
}), ie.addEventListener("close", () => {
|
|
477
|
+
re && console.log("[Sailfish] WebSocket closed");
|
|
478
|
+
}), ie.addEventListener("message", (e2) => {
|
|
462
479
|
try {
|
|
463
480
|
const a2 = JSON.parse(e2.data);
|
|
464
|
-
if ("funcSpanTrackingControl" === a2.type) if (
|
|
481
|
+
if ("funcSpanTrackingControl" === a2.type) if (re && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== he && (window.clearTimeout(he), he = null), de = a2.enabled, ge = false, re && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
465
482
|
if (a2.expirationTimestampMs) {
|
|
466
|
-
|
|
467
|
-
const e3 = Date.now(), u2 =
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}, u2)) : (
|
|
483
|
+
me = a2.expirationTimestampMs;
|
|
484
|
+
const e3 = Date.now(), u2 = me - e3;
|
|
485
|
+
re && console.log(`[Sailfish] Server expiration timestamp: ${me}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, me), he = window.setTimeout(() => {
|
|
486
|
+
ge || (de = false, me = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"));
|
|
487
|
+
}, u2)) : (de = false, me = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
471
488
|
} else {
|
|
472
489
|
const e3 = a2.timeoutSeconds || 3600;
|
|
473
|
-
e3 > 0 && (
|
|
474
|
-
|
|
490
|
+
e3 > 0 && (me = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, me), he = window.setTimeout(() => {
|
|
491
|
+
ge || (de = false, me = null, clearGlobalFuncSpanState(), re && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`));
|
|
475
492
|
}, 1e3 * e3));
|
|
476
493
|
}
|
|
477
494
|
try {
|
|
478
495
|
const e3 = getOrSetSessionId();
|
|
479
|
-
|
|
496
|
+
ie.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), re && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
480
497
|
} catch (e3) {
|
|
481
|
-
|
|
498
|
+
re && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
482
499
|
}
|
|
483
|
-
} else
|
|
500
|
+
} else me = null, clearGlobalFuncSpanState();
|
|
484
501
|
} catch (e3) {
|
|
485
502
|
}
|
|
486
|
-
}),
|
|
503
|
+
}), ie;
|
|
487
504
|
}
|
|
488
505
|
function sendMessage(e) {
|
|
489
506
|
var _a2;
|
|
490
507
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
491
508
|
const a = JSON.stringify({ ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
|
|
492
|
-
if (isWebSocketOpen(
|
|
493
|
-
|
|
509
|
+
if (le || !isWebSocketOpen(ie)) saveNotifyMessageToIDB(a);
|
|
510
|
+
else try {
|
|
511
|
+
ie.send(a);
|
|
494
512
|
} catch (e2) {
|
|
495
513
|
saveNotifyMessageToIDB(a);
|
|
496
514
|
}
|
|
497
|
-
else saveNotifyMessageToIDB(a);
|
|
498
515
|
}
|
|
499
516
|
function enableFunctionSpanTracking() {
|
|
500
|
-
if (
|
|
501
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType:
|
|
502
|
-
|
|
517
|
+
if (re && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), de && !ge && (ye = he, we = me, re && console.log("[Sailfish] Saved global tracking state while switching to local mode")), de = true, ge = true, me = null, he = null, isWebSocketOpen(ie)) try {
|
|
518
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: oe };
|
|
519
|
+
ie.send(JSON.stringify(e));
|
|
503
520
|
} catch (e) {
|
|
504
521
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
505
522
|
}
|
|
506
|
-
else
|
|
523
|
+
else re && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
507
524
|
}
|
|
508
525
|
function disableFunctionSpanTracking() {
|
|
509
|
-
if (
|
|
510
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType:
|
|
511
|
-
|
|
526
|
+
if (re && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(ie)) try {
|
|
527
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: oe };
|
|
528
|
+
ie.send(JSON.stringify(e));
|
|
512
529
|
} catch (e) {
|
|
513
530
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
514
531
|
}
|
|
515
532
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
516
|
-
|
|
533
|
+
ge && (ge = false, null !== ye || null !== we ? (de = true, me = we, he = ye, re && console.log("[Sailfish] LOCAL tracking mode disabled, restored GLOBAL tracking state"), ye = null, we = null) : (de = false, me = null, he = null, re && console.log("[Sailfish] LOCAL tracking mode disabled, no global tracking to restore")));
|
|
517
534
|
}
|
|
518
535
|
function isFunctionSpanTrackingEnabled() {
|
|
519
|
-
return
|
|
536
|
+
return de;
|
|
520
537
|
}
|
|
521
538
|
function getFuncSpanHeader() {
|
|
522
|
-
if (!
|
|
523
|
-
if (null !==
|
|
524
|
-
if (Date.now() >=
|
|
539
|
+
if (!de) return null;
|
|
540
|
+
if (null !== me) {
|
|
541
|
+
if (Date.now() >= me) return de = false, me = null, re && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
525
542
|
}
|
|
526
543
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
527
544
|
}
|
|
@@ -529,34 +546,34 @@ function getFuncSpanHeader() {
|
|
|
529
546
|
const e = (function loadGlobalFuncSpanState() {
|
|
530
547
|
try {
|
|
531
548
|
if ("undefined" == typeof localStorage) return null;
|
|
532
|
-
const e2 = localStorage.getItem(
|
|
549
|
+
const e2 = localStorage.getItem(se);
|
|
533
550
|
if (!e2) return null;
|
|
534
551
|
const a = JSON.parse(e2);
|
|
535
|
-
return a.enabled && a.expirationTimestampMs && Date.now() >= a.expirationTimestampMs ? (
|
|
552
|
+
return a.enabled && a.expirationTimestampMs && Date.now() >= a.expirationTimestampMs ? (re && console.log("[Sailfish] Stored global function span state has expired, clearing"), localStorage.removeItem(se), null) : (re && console.log("[Sailfish] Loaded global function span state from localStorage:", a), a);
|
|
536
553
|
} catch (e2) {
|
|
537
|
-
return
|
|
554
|
+
return re && console.warn("[Sailfish] Failed to load global function span state from localStorage:", e2), null;
|
|
538
555
|
}
|
|
539
556
|
})();
|
|
540
|
-
e && e.enabled && (
|
|
557
|
+
e && e.enabled && (de = true, me = e.expirationTimestampMs, ge = false, re && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTimestampMs: me }));
|
|
541
558
|
})();
|
|
542
|
-
const
|
|
543
|
-
var
|
|
559
|
+
const be = Object.freeze(Object.defineProperty({ __proto__: null, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
560
|
+
var ve, Ce, ke = {}, xe = {}, Me = {}, Ie = {};
|
|
544
561
|
function requireBase64() {
|
|
545
|
-
if (
|
|
546
|
-
|
|
562
|
+
if (ve) return Ie;
|
|
563
|
+
ve = 1;
|
|
547
564
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
548
|
-
return
|
|
565
|
+
return Ie.encode = function(a) {
|
|
549
566
|
if (0 <= a && a < e.length) return e[a];
|
|
550
567
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
551
|
-
},
|
|
568
|
+
}, Ie.decode = function(e2) {
|
|
552
569
|
return 65 <= e2 && e2 <= 90 ? e2 - 65 : 97 <= e2 && e2 <= 122 ? e2 - 97 + 26 : 48 <= e2 && e2 <= 57 ? e2 - 48 + 52 : 43 == e2 ? 62 : 47 == e2 ? 63 : -1;
|
|
553
|
-
},
|
|
570
|
+
}, Ie;
|
|
554
571
|
}
|
|
555
572
|
function requireBase64Vlq() {
|
|
556
|
-
if (
|
|
557
|
-
|
|
573
|
+
if (Ce) return Me;
|
|
574
|
+
Ce = 1;
|
|
558
575
|
var e = requireBase64();
|
|
559
|
-
return
|
|
576
|
+
return Me.encode = function base64VLQ_encode(a) {
|
|
560
577
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
561
578
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
562
579
|
})(a);
|
|
@@ -564,7 +581,7 @@ function requireBase64Vlq() {
|
|
|
564
581
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
565
582
|
} while (w2 > 0);
|
|
566
583
|
return m2;
|
|
567
|
-
},
|
|
584
|
+
}, Me.decode = function base64VLQ_decode(a, u, m2) {
|
|
568
585
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
569
586
|
do {
|
|
570
587
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -575,11 +592,11 @@ function requireBase64Vlq() {
|
|
|
575
592
|
var a2 = e2 >> 1;
|
|
576
593
|
return 1 & ~e2 ? a2 : -a2;
|
|
577
594
|
})(x2), m2.rest = u;
|
|
578
|
-
},
|
|
595
|
+
}, Me;
|
|
579
596
|
}
|
|
580
|
-
var
|
|
597
|
+
var Oe, Ee = {};
|
|
581
598
|
function requireUtil() {
|
|
582
|
-
return
|
|
599
|
+
return Oe || (Oe = 1, (function(e) {
|
|
583
600
|
e.getArg = function getArg(e2, a2, u2) {
|
|
584
601
|
if (a2 in e2) return e2[a2];
|
|
585
602
|
if (3 === arguments.length) return u2;
|
|
@@ -691,12 +708,12 @@ function requireUtil() {
|
|
|
691
708
|
}
|
|
692
709
|
return m2(a2);
|
|
693
710
|
};
|
|
694
|
-
})(
|
|
711
|
+
})(Ee)), Ee;
|
|
695
712
|
}
|
|
696
|
-
var
|
|
713
|
+
var Le, Ae = {};
|
|
697
714
|
function requireArraySet() {
|
|
698
|
-
if (
|
|
699
|
-
|
|
715
|
+
if (Le) return Ae;
|
|
716
|
+
Le = 1;
|
|
700
717
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
701
718
|
function ArraySet() {
|
|
702
719
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -727,12 +744,12 @@ function requireArraySet() {
|
|
|
727
744
|
throw new Error("No element indexed by " + e2);
|
|
728
745
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
729
746
|
return this._array.slice();
|
|
730
|
-
},
|
|
747
|
+
}, Ae.ArraySet = ArraySet, Ae;
|
|
731
748
|
}
|
|
732
|
-
var
|
|
749
|
+
var Te, De, Ue = {};
|
|
733
750
|
function requireMappingList() {
|
|
734
|
-
if (
|
|
735
|
-
|
|
751
|
+
if (Te) return Ue;
|
|
752
|
+
Te = 1;
|
|
736
753
|
var e = requireUtil();
|
|
737
754
|
function MappingList() {
|
|
738
755
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -746,11 +763,11 @@ function requireMappingList() {
|
|
|
746
763
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
747
764
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
748
765
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
749
|
-
},
|
|
766
|
+
}, Ue.MappingList = MappingList, Ue;
|
|
750
767
|
}
|
|
751
768
|
function requireSourceMapGenerator() {
|
|
752
|
-
if (
|
|
753
|
-
|
|
769
|
+
if (De) return xe;
|
|
770
|
+
De = 1;
|
|
754
771
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
755
772
|
function SourceMapGenerator(e2) {
|
|
756
773
|
e2 || (e2 = {}), this._file = a.getArg(e2, "file", null), this._sourceRoot = a.getArg(e2, "sourceRoot", null), this._skipValidation = a.getArg(e2, "skipValidation", false), this._ignoreInvalidMapping = a.getArg(e2, "ignoreInvalidMapping", false), this._sources = new u(), this._names = new u(), this._mappings = new m2(), this._sourcesContents = null;
|
|
@@ -827,11 +844,11 @@ function requireSourceMapGenerator() {
|
|
|
827
844
|
return null != this._file && (e2.file = this._file), null != this._sourceRoot && (e2.sourceRoot = this._sourceRoot), this._sourcesContents && (e2.sourcesContent = this._generateSourcesContent(e2.sources, e2.sourceRoot)), e2;
|
|
828
845
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
829
846
|
return JSON.stringify(this.toJSON());
|
|
830
|
-
},
|
|
847
|
+
}, xe.SourceMapGenerator = SourceMapGenerator, xe;
|
|
831
848
|
}
|
|
832
|
-
var
|
|
849
|
+
var Be, je = {}, Ge = {};
|
|
833
850
|
function requireBinarySearch() {
|
|
834
|
-
return
|
|
851
|
+
return Be || (Be = 1, (function(e) {
|
|
835
852
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
836
853
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
837
854
|
return 0 === I2 ? x2 : I2 > 0 ? u - x2 > 1 ? recursiveSearch(x2, u, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? u < w2.length ? u : -1 : x2 : x2 - a > 1 ? recursiveSearch(a, x2, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? x2 : a < 0 ? -1 : a;
|
|
@@ -843,11 +860,11 @@ function requireBinarySearch() {
|
|
|
843
860
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
844
861
|
return b2;
|
|
845
862
|
};
|
|
846
|
-
})(
|
|
863
|
+
})(Ge)), Ge;
|
|
847
864
|
}
|
|
848
|
-
var
|
|
865
|
+
var Ve, qe, He = {};
|
|
849
866
|
function requireQuickSort() {
|
|
850
|
-
if (
|
|
867
|
+
if (Ve) return He;
|
|
851
868
|
function SortTemplate(e2) {
|
|
852
869
|
function swap(e3, a, u) {
|
|
853
870
|
var m2 = e3[a];
|
|
@@ -866,21 +883,21 @@ function requireQuickSort() {
|
|
|
866
883
|
}
|
|
867
884
|
};
|
|
868
885
|
}
|
|
869
|
-
|
|
886
|
+
Ve = 1;
|
|
870
887
|
let e = /* @__PURE__ */ new WeakMap();
|
|
871
|
-
return
|
|
888
|
+
return He.quickSort = function(a, u, m2 = 0) {
|
|
872
889
|
let w2 = e.get(u);
|
|
873
890
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
874
891
|
let a2 = SortTemplate.toString();
|
|
875
892
|
return new Function(`return ${a2}`)()(e2);
|
|
876
893
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
877
|
-
},
|
|
894
|
+
}, He;
|
|
878
895
|
}
|
|
879
|
-
var
|
|
880
|
-
var
|
|
881
|
-
return
|
|
882
|
-
if (
|
|
883
|
-
|
|
896
|
+
var Je, Ye, Xe = {};
|
|
897
|
+
var Qe = (function requireSourceMap() {
|
|
898
|
+
return Ye || (Ye = 1, ke.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, ke.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
899
|
+
if (qe) return je;
|
|
900
|
+
qe = 1;
|
|
884
901
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
885
902
|
function SourceMapConsumer(a2, u2) {
|
|
886
903
|
var m3 = a2;
|
|
@@ -937,7 +954,7 @@ var Je = (function requireSourceMap() {
|
|
|
937
954
|
else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e.getArg(x2, "generatedLine", null), column: e.getArg(x2, "generatedColumn", null), lastColumn: e.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
|
|
938
955
|
}
|
|
939
956
|
return b3;
|
|
940
|
-
},
|
|
957
|
+
}, je.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
941
958
|
var u2, m3 = a2;
|
|
942
959
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
943
960
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1054,7 +1071,7 @@ var Je = (function requireSourceMap() {
|
|
|
1054
1071
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1055
1072
|
}
|
|
1056
1073
|
return { line: null, column: null, lastColumn: null };
|
|
1057
|
-
},
|
|
1074
|
+
}, je.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1058
1075
|
for (var e2 = [], a2 = 0; a2 < this._sections.length; a2++) for (var u2 = 0; u2 < this._sections[a2].consumer.sources.length; u2++) e2.push(this._sections[a2].consumer.sources[u2]);
|
|
1059
1076
|
return e2;
|
|
1060
1077
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1093,10 +1110,10 @@ var Je = (function requireSourceMap() {
|
|
|
1093
1110
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1094
1111
|
}
|
|
1095
1112
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1096
|
-
},
|
|
1097
|
-
})().SourceMapConsumer,
|
|
1098
|
-
if (
|
|
1099
|
-
|
|
1113
|
+
}, je.IndexedSourceMapConsumer = IndexedSourceMapConsumer, je;
|
|
1114
|
+
})().SourceMapConsumer, ke.SourceNode = (function requireSourceNode() {
|
|
1115
|
+
if (Je) return Xe;
|
|
1116
|
+
Je = 1;
|
|
1100
1117
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1101
1118
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1102
1119
|
this.children = [], this.sourceContents = {}, this.line = null == e2 ? null : e2, this.column = null == a2 ? null : a2, this.source = null == u2 ? null : u2, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
|
|
@@ -1180,20 +1197,20 @@ var Je = (function requireSourceMap() {
|
|
|
1180
1197
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1181
1198
|
m3.setSourceContent(e2, a3);
|
|
1182
1199
|
}), { code: u2.code, map: m3 };
|
|
1183
|
-
},
|
|
1184
|
-
})().SourceNode),
|
|
1200
|
+
}, Xe.SourceNode = SourceNode, Xe;
|
|
1201
|
+
})().SourceNode), ke;
|
|
1185
1202
|
})();
|
|
1186
|
-
const
|
|
1203
|
+
const et = /* @__PURE__ */ new Map(), nt = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1187
1204
|
async function getConsumerFor(e, a) {
|
|
1188
1205
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1189
1206
|
for (const e2 of m2) try {
|
|
1190
|
-
if (
|
|
1207
|
+
if (et.has(e2)) return et.get(e2);
|
|
1191
1208
|
const a2 = await fetch(e2);
|
|
1192
1209
|
if (!a2.ok) continue;
|
|
1193
1210
|
const u2 = await a2.json();
|
|
1194
1211
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1195
|
-
const m3 = await new
|
|
1196
|
-
return
|
|
1212
|
+
const m3 = await new Qe.SourceMapConsumer(u2);
|
|
1213
|
+
return et.set(e2, m3), m3;
|
|
1197
1214
|
} catch {
|
|
1198
1215
|
}
|
|
1199
1216
|
return null;
|
|
@@ -1205,7 +1222,7 @@ async function captureError(e, a = false) {
|
|
|
1205
1222
|
if (!e2) return ["No stack trace available"];
|
|
1206
1223
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1207
1224
|
for (const e3 of a2) {
|
|
1208
|
-
const a3 = e3.match(
|
|
1225
|
+
const a3 = e3.match(nt);
|
|
1209
1226
|
if (!a3) {
|
|
1210
1227
|
u2.push(e3);
|
|
1211
1228
|
continue;
|
|
@@ -1220,8 +1237,8 @@ async function captureError(e, a = false) {
|
|
|
1220
1237
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1221
1238
|
continue;
|
|
1222
1239
|
}
|
|
1223
|
-
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias:
|
|
1224
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias:
|
|
1240
|
+
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias: Qe.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1241
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias: Qe.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1225
1242
|
if (O2.source && null != O2.line) {
|
|
1226
1243
|
const e4 = O2.name || "anonymous";
|
|
1227
1244
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1231,11 +1248,11 @@ async function captureError(e, a = false) {
|
|
|
1231
1248
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), C2 = b2.length > 0 ? b2 : w2, x2 = Date.now();
|
|
1232
1249
|
sendMessage({ type: "event", event: { type: 6, timestamp: x2, data: { payload: { message: u, stack: m2, trace: C2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: x2, level: "error" } } } });
|
|
1233
1250
|
}
|
|
1234
|
-
const
|
|
1235
|
-
const
|
|
1251
|
+
const ot = readDebugFlag();
|
|
1252
|
+
const st = readDebugFlag();
|
|
1236
1253
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1237
1254
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1238
|
-
return
|
|
1255
|
+
return st && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1239
1256
|
let b3 = 0;
|
|
1240
1257
|
const attemptRequest = async () => {
|
|
1241
1258
|
try {
|
|
@@ -1243,12 +1260,12 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1243
1260
|
} catch (e3) {
|
|
1244
1261
|
if (b3++, b3 > u2) throw e3;
|
|
1245
1262
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1246
|
-
return
|
|
1263
|
+
return ot && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1247
1264
|
}
|
|
1248
1265
|
};
|
|
1249
1266
|
return attemptRequest();
|
|
1250
1267
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1251
|
-
if (
|
|
1268
|
+
if (st && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1252
1269
|
return e2.json();
|
|
1253
1270
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1254
1271
|
}
|
|
@@ -1264,9 +1281,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1264
1281
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1265
1282
|
return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ", { apiKey: e, recordingSessionId: u, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a });
|
|
1266
1283
|
}
|
|
1267
|
-
const
|
|
1284
|
+
const it = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, at = { shortcuts: { ...it }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1268
1285
|
} };
|
|
1269
|
-
let
|
|
1286
|
+
let lt = null, ct = { mode: "lookback", description: "" }, ut = null, pt = null, dt = null, ht = false;
|
|
1270
1287
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1271
1288
|
return (function isMacPlatform() {
|
|
1272
1289
|
const e = navigator.userAgentData;
|
|
@@ -1279,11 +1296,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1279
1296
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1280
1297
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1281
1298
|
})(e2.key)), a.map((e3) => `<span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; padding: 0 4px; font-weight: 500; font-size: 12px; color: #94A3B8; line-height: 16px;">${e3}</span>`).join(e2.requireCmdCtrl ? " + " : "");
|
|
1282
|
-
})(
|
|
1299
|
+
})(at.shortcuts[e]);
|
|
1283
1300
|
}
|
|
1284
1301
|
function setupIssueReporting(e) {
|
|
1285
|
-
|
|
1286
|
-
const a2 = { ...
|
|
1302
|
+
at.apiKey = e.apiKey, at.backendApi = e.backendApi, at.resolveSessionId = e.getSessionId, e.customBaseUrl && (at.triageBaseUrl = e.customBaseUrl), at.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1303
|
+
const a2 = { ...it };
|
|
1287
1304
|
if (!e2) return a2;
|
|
1288
1305
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1289
1306
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1293,7 +1310,7 @@ function setupIssueReporting(e) {
|
|
|
1293
1310
|
}
|
|
1294
1311
|
return a2;
|
|
1295
1312
|
})(e.shortcuts);
|
|
1296
|
-
const { shortcuts: a } =
|
|
1313
|
+
const { shortcuts: a } = at;
|
|
1297
1314
|
window.addEventListener("keydown", (e2) => {
|
|
1298
1315
|
const u = (function isTypingInInput() {
|
|
1299
1316
|
const e3 = document.activeElement;
|
|
@@ -1303,23 +1320,23 @@ function setupIssueReporting(e) {
|
|
|
1303
1320
|
} : injectModalHTML;
|
|
1304
1321
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1305
1322
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1306
|
-
if (b2 && !
|
|
1323
|
+
if (b2 && !ht && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1307
1324
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1308
1325
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1309
1326
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1310
1327
|
}
|
|
1311
|
-
if (
|
|
1312
|
-
if (b2 && "startnow" ===
|
|
1328
|
+
if (ht && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1329
|
+
if (b2 && "startnow" === ct.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1313
1330
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1314
1331
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1315
1332
|
}
|
|
1316
1333
|
});
|
|
1317
1334
|
}
|
|
1318
1335
|
function openReportIssueModal() {
|
|
1319
|
-
|
|
1336
|
+
ht ? stopRecording() : (injectModalHTML(), lt && document.body.appendChild(lt));
|
|
1320
1337
|
}
|
|
1321
1338
|
function closeModal() {
|
|
1322
|
-
|
|
1339
|
+
at.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (lt == null ? void 0 : lt.parentNode) && lt.parentNode.removeChild(lt), lt = null, ht || (ct = { mode: "lookback", description: "", occurredInThisTab: true }, ut = null, pt = null), dt && clearInterval(dt);
|
|
1323
1340
|
}
|
|
1324
1341
|
function activateModalIsolation(e) {
|
|
1325
1342
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1378,9 +1395,9 @@ function activateModalIsolation(e) {
|
|
|
1378
1395
|
};
|
|
1379
1396
|
}
|
|
1380
1397
|
function injectModalHTML(e = "lookback") {
|
|
1381
|
-
|
|
1398
|
+
lt && (lt.remove(), lt = null), lt = document.createElement("div"), lt.id = "sf-report-issue-modal";
|
|
1382
1399
|
const a = "startnow" === e;
|
|
1383
|
-
|
|
1400
|
+
lt.innerHTML = `
|
|
1384
1401
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1385
1402
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1386
1403
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1428,7 +1445,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1428
1445
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1429
1446
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1430
1447
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1431
|
-
resize:none; outline:none;">${
|
|
1448
|
+
resize:none; outline:none;">${ct.description}</textarea>
|
|
1432
1449
|
|
|
1433
1450
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1434
1451
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1516,8 +1533,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1516
1533
|
<a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>
|
|
1517
1534
|
</div>
|
|
1518
1535
|
</div>
|
|
1519
|
-
`,
|
|
1520
|
-
const e2 =
|
|
1536
|
+
`, ct.mode = e, document.body.appendChild(lt), (function bindListeners() {
|
|
1537
|
+
const e2 = lt == null ? void 0 : lt.querySelectorAll(".sf-issue-tab"), a2 = document.getElementById("sf-start-recording-btn"), u = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
|
|
1521
1538
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1522
1539
|
e3.addEventListener("click", (e4) => {
|
|
1523
1540
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1525,11 +1542,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1525
1542
|
});
|
|
1526
1543
|
}), u && (u.onclick = closeModal);
|
|
1527
1544
|
w2 && w2.addEventListener("change", () => {
|
|
1528
|
-
"lookback" ===
|
|
1545
|
+
"lookback" === ct.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1529
1546
|
});
|
|
1530
1547
|
a2 && (a2.onclick = () => {
|
|
1531
1548
|
const e3 = document.getElementById("sf-issue-description");
|
|
1532
|
-
e3 && (
|
|
1549
|
+
e3 && (ct.description = e3.value), (function startCountdownThenRecord() {
|
|
1533
1550
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1534
1551
|
const e4 = document.createElement("div");
|
|
1535
1552
|
e4.id = "sf-countdown-overlay", e4.style.cssText = "\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";
|
|
@@ -1538,9 +1555,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1538
1555
|
const u2 = setInterval(async () => {
|
|
1539
1556
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1540
1557
|
else {
|
|
1541
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1558
|
+
clearInterval(u2), document.body.removeChild(e4), ut = Date.now(), ht = true;
|
|
1542
1559
|
try {
|
|
1543
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1560
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => be);
|
|
1544
1561
|
e5();
|
|
1545
1562
|
} catch (e5) {
|
|
1546
1563
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1566,8 +1583,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1566
1583
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1567
1584
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1568
1585
|
if (!a4) return;
|
|
1569
|
-
|
|
1570
|
-
const e6 = Date.now() - (
|
|
1586
|
+
dt = setInterval(() => {
|
|
1587
|
+
const e6 = Date.now() - (ut ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1571
1588
|
a4.textContent = `${u3}:${m3}`;
|
|
1572
1589
|
}, 1e3);
|
|
1573
1590
|
})();
|
|
@@ -1575,12 +1592,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1575
1592
|
}, 1e3);
|
|
1576
1593
|
})();
|
|
1577
1594
|
});
|
|
1578
|
-
|
|
1595
|
+
lt == null ? void 0 : lt.addEventListener("click", (e3) => {
|
|
1579
1596
|
var _a2;
|
|
1580
1597
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1581
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1598
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = ct.mode;
|
|
1582
1599
|
let u2, m3;
|
|
1583
|
-
if (
|
|
1600
|
+
if (ct.description = e4, "startnow" === a3) u2 = ut ?? Date.now() - 3e5, m3 = pt ?? Date.now();
|
|
1584
1601
|
else {
|
|
1585
1602
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1586
1603
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1589,9 +1606,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1589
1606
|
var _a3, _b;
|
|
1590
1607
|
try {
|
|
1591
1608
|
showTriageStatusModal(true);
|
|
1592
|
-
const m4 = await createTriageFromRecorder(
|
|
1593
|
-
if (!
|
|
1594
|
-
return
|
|
1609
|
+
const m4 = await createTriageFromRecorder(at.apiKey, at.backendApi, (function getSessionIdSafely() {
|
|
1610
|
+
if (!at.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1611
|
+
return at.resolveSessionId();
|
|
1595
1612
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1596
1613
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1597
1614
|
} catch (e6) {
|
|
@@ -1600,29 +1617,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1600
1617
|
})(`${u2}`, `${m3}`, e4);
|
|
1601
1618
|
}
|
|
1602
1619
|
});
|
|
1603
|
-
})(),
|
|
1620
|
+
})(), at.deactivateIsolation = activateModalIsolation(lt);
|
|
1604
1621
|
}
|
|
1605
1622
|
function setActiveTab(e) {
|
|
1606
|
-
|
|
1607
|
-
const a =
|
|
1623
|
+
ct.mode = e;
|
|
1624
|
+
const a = lt == null ? void 0 : lt.querySelector("#sf-tab-lookback"), u = lt == null ? void 0 : lt.querySelector("#sf-tab-startnow");
|
|
1608
1625
|
"lookback" === e ? (a.style.background = "white", a.style.color = "#0F172A", u.style.background = "transparent", u.style.color = "#64748B") : (u.style.background = "white", u.style.color = "#0F172A", a.style.background = "transparent", a.style.color = "#64748B");
|
|
1609
1626
|
}
|
|
1610
1627
|
function updateModeSpecificUI(e) {
|
|
1611
1628
|
const a = document.querySelector("#sf-issue-mode-info div"), u = document.getElementById("sf-issue-submit-btn"), m2 = document.getElementById("sf-record-button-container"), w2 = document.getElementById("sf-recording-timer-label"), b2 = document.getElementById("sf-recording-timer-display"), C2 = document.getElementById("sf-modal-footer"), x2 = document.getElementById("sf-lookback-container");
|
|
1612
1629
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1613
1630
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1614
|
-
const e2 = null !==
|
|
1615
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1616
|
-
const e3 = Math.floor((
|
|
1631
|
+
const e2 = null !== ut && null !== pt;
|
|
1632
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", ut && pt) {
|
|
1633
|
+
const e3 = Math.floor((pt - ut) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1617
1634
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1618
1635
|
} else w2.style.display = "none";
|
|
1619
1636
|
} else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a.textContent = "Something already happened. Capture the past few minutes.", u.disabled = false, u.style.opacity = "1", u.style.cursor = "pointer";
|
|
1620
1637
|
}
|
|
1621
1638
|
async function stopRecording() {
|
|
1622
1639
|
var _a2;
|
|
1623
|
-
|
|
1640
|
+
pt = Date.now(), ht = false, dt && clearInterval(dt), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1624
1641
|
try {
|
|
1625
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1642
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => be);
|
|
1626
1643
|
e();
|
|
1627
1644
|
} catch (e) {
|
|
1628
1645
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1635,17 +1652,17 @@ async function stopRecording() {
|
|
|
1635
1652
|
a2 && (a2.textContent = "Re-record");
|
|
1636
1653
|
}
|
|
1637
1654
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1638
|
-
if (a && u &&
|
|
1639
|
-
const e2 = Math.floor((
|
|
1655
|
+
if (a && u && ut && pt) {
|
|
1656
|
+
const e2 = Math.floor((pt - ut) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1640
1657
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1641
1658
|
}
|
|
1642
1659
|
const m2 = document.getElementById("sf-issue-description");
|
|
1643
|
-
m2 && (m2.value =
|
|
1660
|
+
m2 && (m2.value = ct.description);
|
|
1644
1661
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1645
1662
|
w2 && (w2.checked = true);
|
|
1646
1663
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1647
1664
|
if (b2 && C2) {
|
|
1648
|
-
const e2 = Math.floor(((
|
|
1665
|
+
const e2 = Math.floor(((pt ?? 0) - (ut ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1649
1666
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1650
1667
|
}
|
|
1651
1668
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1658,7 +1675,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1658
1675
|
var _a3, _b;
|
|
1659
1676
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1660
1677
|
})();
|
|
1661
|
-
const u = a ? `${
|
|
1678
|
+
const u = a ? `${at.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1662
1679
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1663
1680
|
const w2 = e ? "Reporting Issue..." : "Issue reported!", b2 = e ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e ? '<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>' : "", x2 = e ? "" : '<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';
|
|
1664
1681
|
m2.innerHTML = `
|
|
@@ -1720,7 +1737,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1720
1737
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1721
1738
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1722
1739
|
}
|
|
1723
|
-
var
|
|
1740
|
+
var gt = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? gt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), yt = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? yt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), wt = ((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))(wt || {});
|
|
1724
1741
|
function vr(e) {
|
|
1725
1742
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1726
1743
|
}
|
|
@@ -1762,7 +1779,7 @@ function kr(e) {
|
|
|
1762
1779
|
})(e.cssText);
|
|
1763
1780
|
return a || e.cssText;
|
|
1764
1781
|
}
|
|
1765
|
-
let
|
|
1782
|
+
let St = class {
|
|
1766
1783
|
constructor() {
|
|
1767
1784
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1768
1785
|
}
|
|
@@ -1814,7 +1831,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1814
1831
|
function fe(e) {
|
|
1815
1832
|
return e.toLowerCase();
|
|
1816
1833
|
}
|
|
1817
|
-
const
|
|
1834
|
+
const bt = "__rrweb_original__";
|
|
1818
1835
|
function Yt(e) {
|
|
1819
1836
|
const a = e.type;
|
|
1820
1837
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1829,19 +1846,19 @@ function xr(e, a) {
|
|
|
1829
1846
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1830
1847
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1831
1848
|
}
|
|
1832
|
-
let
|
|
1833
|
-
const
|
|
1849
|
+
let vt = 1;
|
|
1850
|
+
const Ct = new RegExp("[^a-z0-9-_:]");
|
|
1834
1851
|
function Ir() {
|
|
1835
|
-
return
|
|
1852
|
+
return vt++;
|
|
1836
1853
|
}
|
|
1837
|
-
let
|
|
1838
|
-
const
|
|
1854
|
+
let kt, xt;
|
|
1855
|
+
const Mt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, It = /^(?:[a-z+]+:)?\/\//i, Et = /^www\..*/i, Lt = /^(data:)([^,]*),(.*)/i;
|
|
1839
1856
|
function Pt(e, a) {
|
|
1840
|
-
return (e || "").replace(
|
|
1857
|
+
return (e || "").replace(Mt, (e2, u, m2, w2, b2, C2) => {
|
|
1841
1858
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1842
1859
|
if (!x2) return e2;
|
|
1843
|
-
if (
|
|
1844
|
-
if (
|
|
1860
|
+
if (It.test(x2) || Et.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1861
|
+
if (Lt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1845
1862
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1846
1863
|
let a2 = "";
|
|
1847
1864
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1852,8 +1869,8 @@ function Pt(e, a) {
|
|
|
1852
1869
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1853
1870
|
});
|
|
1854
1871
|
}
|
|
1855
|
-
const
|
|
1856
|
-
const
|
|
1872
|
+
const Rt = /^[^ \t\n\r\u000c]+/, Dt = /^[, \t\n\r\u000c]+/;
|
|
1873
|
+
const Ft = /* @__PURE__ */ new WeakMap();
|
|
1857
1874
|
function At(e, a) {
|
|
1858
1875
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1859
1876
|
}
|
|
@@ -1861,8 +1878,8 @@ function Fi(e) {
|
|
|
1861
1878
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1862
1879
|
}
|
|
1863
1880
|
function $t(e, a) {
|
|
1864
|
-
let u =
|
|
1865
|
-
if (u || (u = e.createElement("a"),
|
|
1881
|
+
let u = Ft.get(e);
|
|
1882
|
+
if (u || (u = e.createElement("a"), Ft.set(e, u)), a) {
|
|
1866
1883
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1867
1884
|
} else a = "";
|
|
1868
1885
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1877,8 +1894,8 @@ function Mr(e, a, u, m2) {
|
|
|
1877
1894
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1878
1895
|
}
|
|
1879
1896
|
const m3 = [];
|
|
1880
|
-
for (; n(
|
|
1881
|
-
let w2 = n(
|
|
1897
|
+
for (; n(Dt), !(u2 >= a2.length); ) {
|
|
1898
|
+
let w2 = n(Rt);
|
|
1882
1899
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1883
1900
|
else {
|
|
1884
1901
|
let b2 = "";
|
|
@@ -1948,9 +1965,9 @@ function zi(e, a) {
|
|
|
1948
1965
|
})(u, m2);
|
|
1949
1966
|
switch (e.nodeType) {
|
|
1950
1967
|
case e.DOCUMENT_NODE:
|
|
1951
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1968
|
+
return "CSS1Compat" !== e.compatMode ? { type: wt.Document, childNodes: [], compatMode: e.compatMode } : { type: wt.Document, childNodes: [] };
|
|
1952
1969
|
case e.DOCUMENT_TYPE_NODE:
|
|
1953
|
-
return { type:
|
|
1970
|
+
return { type: wt.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1954
1971
|
case e.ELEMENT_NODE:
|
|
1955
1972
|
return (function Vi(e2, a2) {
|
|
1956
1973
|
const { doc: u2, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a2, U3 = (function Ui(e3, a3, u3) {
|
|
@@ -1968,7 +1985,7 @@ function zi(e, a) {
|
|
|
1968
1985
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1969
1986
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1970
1987
|
const a3 = fe(e3.tagName);
|
|
1971
|
-
return
|
|
1988
|
+
return Ct.test(a3) ? "div" : a3;
|
|
1972
1989
|
})(e2);
|
|
1973
1990
|
let $3 = {};
|
|
1974
1991
|
const z2 = e2.attributes.length;
|
|
@@ -1997,7 +2014,7 @@ function zi(e, a) {
|
|
|
1997
2014
|
const a3 = e3.getContext("2d");
|
|
1998
2015
|
if (!a3) return true;
|
|
1999
2016
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
2000
|
-
const w4 = a3.getImageData, b4 =
|
|
2017
|
+
const w4 = a3.getImageData, b4 = bt in w4 ? w4[bt] : w4;
|
|
2001
2018
|
if (new Uint32Array(b4.call(a3, u3, m4, Math.min(50, e3.width - u3), Math.min(50, e3.height - m4)).data.buffer).some((e4) => 0 !== e4)) return false;
|
|
2002
2019
|
}
|
|
2003
2020
|
return true;
|
|
@@ -2009,11 +2026,11 @@ function zi(e, a) {
|
|
|
2009
2026
|
}
|
|
2010
2027
|
}
|
|
2011
2028
|
if ("img" === B3 && _3) {
|
|
2012
|
-
|
|
2029
|
+
kt || (kt = u2.createElement("canvas"), xt = kt.getContext("2d"));
|
|
2013
2030
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
2014
2031
|
a3.removeEventListener("load", A);
|
|
2015
2032
|
try {
|
|
2016
|
-
|
|
2033
|
+
kt.width = a3.naturalWidth, kt.height = a3.naturalHeight, xt.drawImage(a3, 0, 0), $3.rr_dataURL = kt.toDataURL(I3.type, I3.quality);
|
|
2017
2034
|
} catch (e3) {
|
|
2018
2035
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
2019
2036
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2036,7 +2053,7 @@ function zi(e, a) {
|
|
|
2036
2053
|
customElements.get(B3) && (j2 = true);
|
|
2037
2054
|
} catch {
|
|
2038
2055
|
}
|
|
2039
|
-
return { type:
|
|
2056
|
+
return { type: wt.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2040
2057
|
})(e, { doc: u, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
|
|
2041
2058
|
case e.TEXT_NODE:
|
|
2042
2059
|
return (function ji(e2, a2) {
|
|
@@ -2052,12 +2069,12 @@ function zi(e, a) {
|
|
|
2052
2069
|
}
|
|
2053
2070
|
x3 = Pt(x3, $t(a2.doc));
|
|
2054
2071
|
}
|
|
2055
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2072
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: wt.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2056
2073
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2057
2074
|
case e.CDATA_SECTION_NODE:
|
|
2058
|
-
return { type:
|
|
2075
|
+
return { type: wt.CDATA, textContent: "", rootId: $2 };
|
|
2059
2076
|
case e.COMMENT_NODE:
|
|
2060
|
-
return { type:
|
|
2077
|
+
return { type: wt.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2061
2078
|
default:
|
|
2062
2079
|
return false;
|
|
2063
2080
|
}
|
|
@@ -2073,21 +2090,21 @@ function Se(e, a) {
|
|
|
2073
2090
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2074
2091
|
let te2;
|
|
2075
2092
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2076
|
-
return !!(a2.comment && e2.type ===
|
|
2077
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2093
|
+
return !!(a2.comment && e2.type === wt.Comment || e2.type === wt.Element && (a2.script && ("script" === e2.tagName || "link" === e2.tagName && ("preload" === e2.attributes.rel || "modulepreload" === e2.attributes.rel) && "script" === e2.attributes.as || "link" === e2.tagName && "prefetch" === e2.attributes.rel && "string" == typeof e2.attributes.href && "js" === xr(e2.attributes.href)) || a2.headFavicon && ("link" === e2.tagName && "shortcut icon" === e2.attributes.rel || "meta" === e2.tagName && (N(e2.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e2.attributes.name) || "icon" === N(e2.attributes.rel) || "apple-touch-icon" === N(e2.attributes.rel) || "shortcut icon" === N(e2.attributes.rel))) || "meta" === e2.tagName && (a2.headMetaDescKeywords && N(e2.attributes.name).match(/^description|keywords$/) || a2.headMetaSocial && (N(e2.attributes.property).match(/^(og|twitter|fb):/) || N(e2.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e2.attributes.name)) || a2.headMetaRobots && ("robots" === N(e2.attributes.name) || "googlebot" === N(e2.attributes.name) || "bingbot" === N(e2.attributes.name)) || a2.headMetaHttpEquiv && void 0 !== e2.attributes["http-equiv"] || a2.headMetaAuthorship && ("author" === N(e2.attributes.name) || "generator" === N(e2.attributes.name) || "framework" === N(e2.attributes.name) || "publisher" === N(e2.attributes.name) || "progid" === N(e2.attributes.name) || N(e2.attributes.property).match(/^article:/) || N(e2.attributes.property).match(/^product:/)) || a2.headMetaVerification && ("google-site-verification" === N(e2.attributes.name) || "yandex-verification" === N(e2.attributes.name) || "csrf-token" === N(e2.attributes.name) || "p:domain_verify" === N(e2.attributes.name) || "verify-v1" === N(e2.attributes.name) || "verification" === N(e2.attributes.name) || "shopify-checkout-api-token" === N(e2.attributes.name)))));
|
|
2094
|
+
})(ee2, F2) || !Q2 && ee2.type === wt.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2078
2095
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2079
2096
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2080
2097
|
z2 && z2(e);
|
|
2081
2098
|
let re2 = !I2;
|
|
2082
|
-
if (ne2.type ===
|
|
2099
|
+
if (ne2.type === wt.Element) {
|
|
2083
2100
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2084
2101
|
const a2 = e.shadowRoot;
|
|
2085
2102
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2086
2103
|
}
|
|
2087
|
-
if ((ne2.type ===
|
|
2088
|
-
F2.headWhitespace && ne2.type ===
|
|
2104
|
+
if ((ne2.type === wt.Document || ne2.type === wt.Element) && re2) {
|
|
2105
|
+
F2.headWhitespace && ne2.type === wt.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2089
2106
|
const a2 = { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 };
|
|
2090
|
-
if (ne2.type !==
|
|
2107
|
+
if (ne2.type !== wt.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2091
2108
|
const e2 = Se(u2, a2);
|
|
2092
2109
|
e2 && ne2.childNodes.push(e2);
|
|
2093
2110
|
}
|
|
@@ -2096,7 +2113,7 @@ function Se(e, a) {
|
|
|
2096
2113
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2097
2114
|
}
|
|
2098
2115
|
}
|
|
2099
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2116
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === wt.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2100
2117
|
const m3 = e2.contentWindow;
|
|
2101
2118
|
if (!m3) return;
|
|
2102
2119
|
let w3, b3 = false;
|
|
@@ -2122,7 +2139,7 @@ function Se(e, a) {
|
|
|
2122
2139
|
const u2 = Se(a2, { doc: a2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 });
|
|
2123
2140
|
u2 && j2(e, u2);
|
|
2124
2141
|
}
|
|
2125
|
-
}, V2), ne2.type ===
|
|
2142
|
+
}, V2), ne2.type === wt.Element && "link" === ne2.tagName && "string" == typeof ne2.attributes.rel && ("stylesheet" === ne2.attributes.rel || "preload" === ne2.attributes.rel && "string" == typeof ne2.attributes.href && "css" === xr(ne2.attributes.href)) && (function Wi(e2, a2, u2) {
|
|
2126
2143
|
let m3, w3 = false;
|
|
2127
2144
|
try {
|
|
2128
2145
|
m3 = e2.sheet;
|
|
@@ -2162,13 +2179,13 @@ function $i(e) {
|
|
|
2162
2179
|
} });
|
|
2163
2180
|
}), u;
|
|
2164
2181
|
}
|
|
2165
|
-
var
|
|
2166
|
-
return { isColorSupported: false, reset:
|
|
2182
|
+
var Ut = { exports: {} }, Bt = String, Rr = function() {
|
|
2183
|
+
return { isColorSupported: false, reset: Bt, bold: Bt, dim: Bt, italic: Bt, underline: Bt, inverse: Bt, hidden: Bt, strikethrough: Bt, black: Bt, red: Bt, green: Bt, yellow: Bt, blue: Bt, magenta: Bt, cyan: Bt, white: Bt, gray: Bt, bgBlack: Bt, bgRed: Bt, bgGreen: Bt, bgYellow: Bt, bgBlue: Bt, bgMagenta: Bt, bgCyan: Bt, bgWhite: Bt, blackBright: Bt, redBright: Bt, greenBright: Bt, yellowBright: Bt, blueBright: Bt, magentaBright: Bt, cyanBright: Bt, whiteBright: Bt, bgBlackBright: Bt, bgRedBright: Bt, bgGreenBright: Bt, bgYellowBright: Bt, bgBlueBright: Bt, bgMagentaBright: Bt, bgCyanBright: Bt, bgWhiteBright: Bt };
|
|
2167
2184
|
};
|
|
2168
|
-
|
|
2169
|
-
var
|
|
2170
|
-
const
|
|
2171
|
-
let
|
|
2185
|
+
Ut.exports = Rr(), Ut.exports.createColors = Rr;
|
|
2186
|
+
var Wt = Ut.exports;
|
|
2187
|
+
const jt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2188
|
+
let Vt = Wt, Ht = jt, Kt = class Lr extends Error {
|
|
2172
2189
|
constructor(e, a, u, m2, w2, b2) {
|
|
2173
2190
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
|
|
2174
2191
|
}
|
|
@@ -2178,11 +2195,11 @@ let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
|
2178
2195
|
showSourceCode(e) {
|
|
2179
2196
|
if (!this.source) return "";
|
|
2180
2197
|
let a = this.source;
|
|
2181
|
-
null == e && (e =
|
|
2198
|
+
null == e && (e = Vt.isColorSupported);
|
|
2182
2199
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2183
2200
|
if (e) {
|
|
2184
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2185
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2201
|
+
let { bold: e2, gray: a2, red: u2 } = Vt.createColors(true);
|
|
2202
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Ht && (i = (e3) => Ht(e3));
|
|
2186
2203
|
}
|
|
2187
2204
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
2188
2205
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2203,10 +2220,10 @@ let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
|
2203
2220
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2204
2221
|
}
|
|
2205
2222
|
};
|
|
2206
|
-
var
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2209
|
-
let
|
|
2223
|
+
var Jt = Kt;
|
|
2224
|
+
Kt.default = Kt;
|
|
2225
|
+
const Xt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2226
|
+
let Qt = class {
|
|
2210
2227
|
constructor(e) {
|
|
2211
2228
|
this.builder = e;
|
|
2212
2229
|
}
|
|
@@ -2258,7 +2275,7 @@ let Kt = class {
|
|
|
2258
2275
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2259
2276
|
let w2 = e.parent;
|
|
2260
2277
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2261
|
-
if (!w2) return
|
|
2278
|
+
if (!w2) return Xt[u];
|
|
2262
2279
|
let b2 = e.root();
|
|
2263
2280
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2264
2281
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2270,7 +2287,7 @@ let Kt = class {
|
|
|
2270
2287
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2271
2288
|
});
|
|
2272
2289
|
}
|
|
2273
|
-
return typeof m2 > "u" && (m2 =
|
|
2290
|
+
return typeof m2 > "u" && (m2 = Xt[u]), b2.rawCache[u] = m2, m2;
|
|
2274
2291
|
}
|
|
2275
2292
|
rawBeforeClose(e) {
|
|
2276
2293
|
let a;
|
|
@@ -2346,17 +2363,17 @@ let Kt = class {
|
|
|
2346
2363
|
this[e.type](e, a);
|
|
2347
2364
|
}
|
|
2348
2365
|
};
|
|
2349
|
-
var
|
|
2350
|
-
|
|
2351
|
-
let
|
|
2366
|
+
var en = Qt;
|
|
2367
|
+
Qt.default = Qt;
|
|
2368
|
+
let tn = en;
|
|
2352
2369
|
function ks(e, a) {
|
|
2353
|
-
new
|
|
2370
|
+
new tn(a).stringify(e);
|
|
2354
2371
|
}
|
|
2355
|
-
var
|
|
2372
|
+
var nn = ks;
|
|
2356
2373
|
ks.default = ks;
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
let
|
|
2374
|
+
var rn = {};
|
|
2375
|
+
rn.isClean = Symbol("isClean"), rn.my = Symbol("my");
|
|
2376
|
+
let on = Jt, sn = en, an = nn, { isClean: ln, my: cn } = rn;
|
|
2360
2377
|
function Cs(e, a) {
|
|
2361
2378
|
let u = new e.constructor();
|
|
2362
2379
|
for (let m2 in e) {
|
|
@@ -2378,12 +2395,12 @@ function Pe(e, a) {
|
|
|
2378
2395
|
}
|
|
2379
2396
|
return w2;
|
|
2380
2397
|
}
|
|
2381
|
-
let
|
|
2398
|
+
let un = class {
|
|
2382
2399
|
get proxyOf() {
|
|
2383
2400
|
return this;
|
|
2384
2401
|
}
|
|
2385
2402
|
constructor(e = {}) {
|
|
2386
|
-
this.raws = {}, this[
|
|
2403
|
+
this.raws = {}, this[ln] = false, this[cn] = true;
|
|
2387
2404
|
for (let a in e) if ("nodes" === a) {
|
|
2388
2405
|
this.nodes = [];
|
|
2389
2406
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2427,19 +2444,19 @@ let an = class {
|
|
|
2427
2444
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2428
2445
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2429
2446
|
}
|
|
2430
|
-
return new
|
|
2447
|
+
return new on(e);
|
|
2431
2448
|
}
|
|
2432
2449
|
getProxyProcessor() {
|
|
2433
2450
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
2434
2451
|
}
|
|
2435
2452
|
markClean() {
|
|
2436
|
-
this[
|
|
2453
|
+
this[ln] = true;
|
|
2437
2454
|
}
|
|
2438
2455
|
markDirty() {
|
|
2439
|
-
if (this[
|
|
2440
|
-
this[
|
|
2456
|
+
if (this[ln]) {
|
|
2457
|
+
this[ln] = false;
|
|
2441
2458
|
let e = this;
|
|
2442
|
-
for (; e = e.parent; ) e[
|
|
2459
|
+
for (; e = e.parent; ) e[ln] = false;
|
|
2443
2460
|
}
|
|
2444
2461
|
}
|
|
2445
2462
|
next() {
|
|
@@ -2475,7 +2492,7 @@ let an = class {
|
|
|
2475
2492
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
2476
2493
|
}
|
|
2477
2494
|
raw(e, a) {
|
|
2478
|
-
return new
|
|
2495
|
+
return new sn().raw(this, e, a);
|
|
2479
2496
|
}
|
|
2480
2497
|
remove() {
|
|
2481
2498
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2512,7 +2529,7 @@ let an = class {
|
|
|
2512
2529
|
toProxy() {
|
|
2513
2530
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2514
2531
|
}
|
|
2515
|
-
toString(e =
|
|
2532
|
+
toString(e = an) {
|
|
2516
2533
|
e.stringify && (e = e.stringify);
|
|
2517
2534
|
let a = "";
|
|
2518
2535
|
return e(this, (e2) => {
|
|
@@ -2525,16 +2542,16 @@ let an = class {
|
|
|
2525
2542
|
return e.warn(a, m2);
|
|
2526
2543
|
}
|
|
2527
2544
|
};
|
|
2528
|
-
var
|
|
2529
|
-
|
|
2530
|
-
let
|
|
2545
|
+
var pn = un;
|
|
2546
|
+
un.default = un;
|
|
2547
|
+
let dn = pn, hn = class extends dn {
|
|
2531
2548
|
constructor(e) {
|
|
2532
2549
|
super(e), this.type = "comment";
|
|
2533
2550
|
}
|
|
2534
2551
|
};
|
|
2535
|
-
var
|
|
2536
|
-
|
|
2537
|
-
let
|
|
2552
|
+
var fn = hn;
|
|
2553
|
+
hn.default = hn;
|
|
2554
|
+
let mn = pn, gn = class extends mn {
|
|
2538
2555
|
get variable() {
|
|
2539
2556
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2540
2557
|
}
|
|
@@ -2542,16 +2559,16 @@ let dn = ln, hn = class extends dn {
|
|
|
2542
2559
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2543
2560
|
}
|
|
2544
2561
|
};
|
|
2545
|
-
var
|
|
2546
|
-
|
|
2547
|
-
let
|
|
2562
|
+
var yn = gn;
|
|
2563
|
+
gn.default = gn;
|
|
2564
|
+
let wn, Sn, bn, Mn, In = fn, _n = yn, On = pn, { isClean: En, my: Ln } = rn;
|
|
2548
2565
|
function _r(e) {
|
|
2549
2566
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2550
2567
|
}
|
|
2551
2568
|
function Wr(e) {
|
|
2552
|
-
if (e[
|
|
2569
|
+
if (e[En] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2553
2570
|
}
|
|
2554
|
-
let
|
|
2571
|
+
let Rn = class zr extends On {
|
|
2555
2572
|
get first() {
|
|
2556
2573
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2557
2574
|
}
|
|
@@ -2603,7 +2620,7 @@ let On = class zr extends Mn {
|
|
|
2603
2620
|
return this.markDirty(), this;
|
|
2604
2621
|
}
|
|
2605
2622
|
normalize(e, a) {
|
|
2606
|
-
if ("string" == typeof e) e = _r(
|
|
2623
|
+
if ("string" == typeof e) e = _r(Sn(e).nodes);
|
|
2607
2624
|
else if (typeof e > "u") e = [];
|
|
2608
2625
|
else if (Array.isArray(e)) {
|
|
2609
2626
|
e = e.slice(0);
|
|
@@ -2614,14 +2631,14 @@ let On = class zr extends Mn {
|
|
|
2614
2631
|
} else if (e.type) e = [e];
|
|
2615
2632
|
else if (e.prop) {
|
|
2616
2633
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2617
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2618
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2619
|
-
else if (e.name) e = [new
|
|
2634
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new _n(e)];
|
|
2635
|
+
} else if (e.selector || e.selectors) e = [new Mn(e)];
|
|
2636
|
+
else if (e.name) e = [new wn(e)];
|
|
2620
2637
|
else {
|
|
2621
2638
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2622
|
-
e = [new
|
|
2639
|
+
e = [new In(e)];
|
|
2623
2640
|
}
|
|
2624
|
-
return e.map((e2) => (e2[
|
|
2641
|
+
return e.map((e2) => (e2[Ln] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[En] && Wr(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
2625
2642
|
}
|
|
2626
2643
|
prepend(...e) {
|
|
2627
2644
|
e = e.reverse();
|
|
@@ -2697,22 +2714,22 @@ let On = class zr extends Mn {
|
|
|
2697
2714
|
}));
|
|
2698
2715
|
}
|
|
2699
2716
|
};
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
},
|
|
2717
|
+
Rn.registerParse = (e) => {
|
|
2718
|
+
Sn = e;
|
|
2719
|
+
}, Rn.registerRule = (e) => {
|
|
2720
|
+
Mn = e;
|
|
2721
|
+
}, Rn.registerAtRule = (e) => {
|
|
2703
2722
|
wn = e;
|
|
2704
|
-
},
|
|
2705
|
-
|
|
2706
|
-
}, On.registerRoot = (e) => {
|
|
2707
|
-
yn = e;
|
|
2723
|
+
}, Rn.registerRoot = (e) => {
|
|
2724
|
+
bn = e;
|
|
2708
2725
|
};
|
|
2709
|
-
var
|
|
2710
|
-
|
|
2711
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2712
|
-
|
|
2726
|
+
var An = Rn;
|
|
2727
|
+
Rn.default = Rn, Rn.rebuild = (e) => {
|
|
2728
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, wn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Mn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, _n.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, In.prototype) : "root" === e.type && Object.setPrototypeOf(e, bn.prototype), e[Ln] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2729
|
+
Rn.rebuild(e2);
|
|
2713
2730
|
});
|
|
2714
2731
|
};
|
|
2715
|
-
let
|
|
2732
|
+
let Tn = An, Nn = class extends Tn {
|
|
2716
2733
|
constructor(e) {
|
|
2717
2734
|
super(e), this.type = "atrule";
|
|
2718
2735
|
}
|
|
@@ -2723,38 +2740,38 @@ let Ln = En, Rn = class extends Ln {
|
|
|
2723
2740
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2724
2741
|
}
|
|
2725
2742
|
};
|
|
2726
|
-
var
|
|
2727
|
-
|
|
2728
|
-
let
|
|
2743
|
+
var Pn = Nn;
|
|
2744
|
+
Nn.default = Nn, Tn.registerAtRule(Nn);
|
|
2745
|
+
let Dn, Fn, Un = An, Bn = class extends Un {
|
|
2729
2746
|
constructor(e) {
|
|
2730
2747
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2731
2748
|
}
|
|
2732
2749
|
toResult(e = {}) {
|
|
2733
|
-
return new
|
|
2750
|
+
return new Dn(new Fn(), this, e).stringify();
|
|
2734
2751
|
}
|
|
2735
2752
|
};
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
},
|
|
2739
|
-
|
|
2753
|
+
Bn.registerLazyResult = (e) => {
|
|
2754
|
+
Dn = e;
|
|
2755
|
+
}, Bn.registerProcessor = (e) => {
|
|
2756
|
+
Fn = e;
|
|
2740
2757
|
};
|
|
2741
|
-
var
|
|
2742
|
-
|
|
2743
|
-
var
|
|
2758
|
+
var Wn = Bn;
|
|
2759
|
+
Bn.default = Bn;
|
|
2760
|
+
var zn = { nanoid: (e = 21) => {
|
|
2744
2761
|
let a = "", u = 0 | e;
|
|
2745
2762
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2746
2763
|
return a;
|
|
2747
2764
|
} };
|
|
2748
|
-
let { existsSync:
|
|
2749
|
-
let
|
|
2765
|
+
let { existsSync: jn, readFileSync: Vn } = jt, { dirname: qn, join: Zn } = jt, { SourceMapConsumer: Kn, SourceMapGenerator: Qn } = jt;
|
|
2766
|
+
let nr = class {
|
|
2750
2767
|
constructor(e, a) {
|
|
2751
2768
|
if (false === a.map) return;
|
|
2752
2769
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2753
2770
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2754
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2771
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = qn(this.mapFile)), m2 && (this.text = m2);
|
|
2755
2772
|
}
|
|
2756
2773
|
consumer() {
|
|
2757
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2774
|
+
return this.consumerCache || (this.consumerCache = new Kn(this.text)), this.consumerCache;
|
|
2758
2775
|
}
|
|
2759
2776
|
decodeInline(e) {
|
|
2760
2777
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2779,15 +2796,15 @@ let Zn = class {
|
|
|
2779
2796
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2780
2797
|
}
|
|
2781
2798
|
loadFile(e) {
|
|
2782
|
-
if (this.root =
|
|
2799
|
+
if (this.root = qn(e), jn(e)) return this.mapFile = e, Vn(e, "utf-8").toString().trim();
|
|
2783
2800
|
}
|
|
2784
2801
|
loadMap(e, a) {
|
|
2785
2802
|
if (false === a) return false;
|
|
2786
2803
|
if (a) {
|
|
2787
2804
|
if ("string" == typeof a) return a;
|
|
2788
2805
|
if ("function" != typeof a) {
|
|
2789
|
-
if (a instanceof
|
|
2790
|
-
if (a instanceof
|
|
2806
|
+
if (a instanceof Kn) return Qn.fromSourceMap(a).toString();
|
|
2807
|
+
if (a instanceof Qn) return a.toString();
|
|
2791
2808
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2792
2809
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2793
2810
|
}
|
|
@@ -2803,7 +2820,7 @@ let Zn = class {
|
|
|
2803
2820
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2804
2821
|
if (this.annotation) {
|
|
2805
2822
|
let a2 = this.annotation;
|
|
2806
|
-
return e && (a2 =
|
|
2823
|
+
return e && (a2 = Zn(qn(e), a2)), this.loadFile(a2);
|
|
2807
2824
|
}
|
|
2808
2825
|
}
|
|
2809
2826
|
}
|
|
@@ -2814,23 +2831,23 @@ let Zn = class {
|
|
|
2814
2831
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2815
2832
|
}
|
|
2816
2833
|
};
|
|
2817
|
-
var
|
|
2818
|
-
|
|
2819
|
-
let { nanoid:
|
|
2834
|
+
var rr = nr;
|
|
2835
|
+
nr.default = nr;
|
|
2836
|
+
let { nanoid: or } = zn, { isAbsolute: sr, resolve: ir } = jt, { SourceMapConsumer: ar, SourceMapGenerator: lr } = jt, { fileURLToPath: cr, pathToFileURL: ur } = jt, pr = Jt, dr = rr, hr = jt, fr = Symbol("fromOffsetCache"), mr = !(!ar || !lr), gr = !(!ir || !sr), yr = class {
|
|
2820
2837
|
get from() {
|
|
2821
2838
|
return this.file || this.id;
|
|
2822
2839
|
}
|
|
2823
2840
|
constructor(e, a = {}) {
|
|
2824
2841
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2825
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
2826
|
-
let e2 = new
|
|
2842
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!gr || /^\w+:\/\//.test(a.from) || sr(a.from) ? this.file = a.from : this.file = ir(a.from)), gr && mr) {
|
|
2843
|
+
let e2 = new dr(this.css, a);
|
|
2827
2844
|
if (e2.text) {
|
|
2828
2845
|
this.map = e2;
|
|
2829
2846
|
let a2 = e2.consumer().file;
|
|
2830
2847
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2831
2848
|
}
|
|
2832
2849
|
}
|
|
2833
|
-
this.file || (this.id = "<input css " +
|
|
2850
|
+
this.file || (this.id = "<input css " + or(6) + ">"), this.map && (this.map.file = this.from);
|
|
2834
2851
|
}
|
|
2835
2852
|
error(e, a, u, m2 = {}) {
|
|
2836
2853
|
let w2, b2, C2;
|
|
@@ -2849,17 +2866,17 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2849
2866
|
a = e2.line, u = e2.col;
|
|
2850
2867
|
}
|
|
2851
2868
|
let x2 = this.origin(a, u, b2, w2);
|
|
2852
|
-
return C2 = x2 ? new
|
|
2869
|
+
return C2 = x2 ? new pr(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new pr(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (ur && (C2.input.url = ur(this.file).toString()), C2.input.file = this.file), C2;
|
|
2853
2870
|
}
|
|
2854
2871
|
fromOffset(e) {
|
|
2855
2872
|
let a, u;
|
|
2856
|
-
if (this[
|
|
2873
|
+
if (this[fr]) u = this[fr];
|
|
2857
2874
|
else {
|
|
2858
2875
|
let e2 = this.css.split("\n");
|
|
2859
2876
|
u = new Array(e2.length);
|
|
2860
2877
|
let a2 = 0;
|
|
2861
2878
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2862
|
-
this[
|
|
2879
|
+
this[fr] = u;
|
|
2863
2880
|
}
|
|
2864
2881
|
a = u[u.length - 1];
|
|
2865
2882
|
let m2 = 0;
|
|
@@ -2878,17 +2895,17 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2878
2895
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2879
2896
|
}
|
|
2880
2897
|
mapResolve(e) {
|
|
2881
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2898
|
+
return /^\w+:\/\//.test(e) ? e : ir(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2882
2899
|
}
|
|
2883
2900
|
origin(e, a, u, m2) {
|
|
2884
2901
|
if (!this.map) return false;
|
|
2885
2902
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2886
2903
|
if (!x2.source) return false;
|
|
2887
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2904
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = sr(x2.source) ? ur(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ur(this.map.mapFile));
|
|
2888
2905
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2889
2906
|
if ("file:" === b2.protocol) {
|
|
2890
|
-
if (!
|
|
2891
|
-
I2.file =
|
|
2907
|
+
if (!cr) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2908
|
+
I2.file = cr(b2);
|
|
2892
2909
|
}
|
|
2893
2910
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2894
2911
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2899,9 +2916,9 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2899
2916
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2900
2917
|
}
|
|
2901
2918
|
};
|
|
2902
|
-
var
|
|
2903
|
-
|
|
2904
|
-
let
|
|
2919
|
+
var wr = yr;
|
|
2920
|
+
yr.default = yr, hr && hr.registerInput && hr.registerInput(yr);
|
|
2921
|
+
let Sr, Cr, Ar = An, Tr = class extends Ar {
|
|
2905
2922
|
constructor(e) {
|
|
2906
2923
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2907
2924
|
}
|
|
@@ -2918,29 +2935,29 @@ let gr, yr, wr = En, Sr = class extends wr {
|
|
|
2918
2935
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2919
2936
|
}
|
|
2920
2937
|
toResult(e = {}) {
|
|
2921
|
-
return new
|
|
2938
|
+
return new Sr(new Cr(), this, e).stringify();
|
|
2922
2939
|
}
|
|
2923
2940
|
};
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
},
|
|
2927
|
-
|
|
2941
|
+
Tr.registerLazyResult = (e) => {
|
|
2942
|
+
Sr = e;
|
|
2943
|
+
}, Tr.registerProcessor = (e) => {
|
|
2944
|
+
Cr = e;
|
|
2928
2945
|
};
|
|
2929
|
-
var
|
|
2930
|
-
|
|
2931
|
-
let
|
|
2946
|
+
var Nr = Tr;
|
|
2947
|
+
Tr.default = Tr, Ar.registerRoot(Tr);
|
|
2948
|
+
let Pr = { comma: (e) => Pr.split(e, [","], true), space(e) {
|
|
2932
2949
|
let a = [" ", "\n", " "];
|
|
2933
|
-
return
|
|
2950
|
+
return Pr.split(e, a);
|
|
2934
2951
|
}, split(e, a, u) {
|
|
2935
2952
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2936
2953
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
2937
2954
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2938
2955
|
} };
|
|
2939
|
-
var
|
|
2940
|
-
|
|
2941
|
-
let
|
|
2956
|
+
var Dr = Pr;
|
|
2957
|
+
Pr.default = Pr;
|
|
2958
|
+
let Fr = An, Ur = Dr, Br = class extends Fr {
|
|
2942
2959
|
get selectors() {
|
|
2943
|
-
return
|
|
2960
|
+
return Ur.comma(this.selector);
|
|
2944
2961
|
}
|
|
2945
2962
|
set selectors(e) {
|
|
2946
2963
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2950,34 +2967,34 @@ let Nr = En, Pr = Tr, Dr = class extends Nr {
|
|
|
2950
2967
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2951
2968
|
}
|
|
2952
2969
|
};
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2955
|
-
let
|
|
2970
|
+
var $r = Br;
|
|
2971
|
+
Br.default = Br, Fr.registerRule(Br);
|
|
2972
|
+
let jr = Pn, Gr = fn, Vr = yn, qr = wr, Hr = rr, Zr = Nr, Kr = $r;
|
|
2956
2973
|
function Ze(e, a) {
|
|
2957
2974
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2958
2975
|
let { inputs: u, ...m2 } = e;
|
|
2959
2976
|
if (u) {
|
|
2960
2977
|
a = [];
|
|
2961
2978
|
for (let e2 of u) {
|
|
2962
|
-
let u2 = { ...e2, __proto__:
|
|
2963
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
2979
|
+
let u2 = { ...e2, __proto__: qr.prototype };
|
|
2980
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Hr.prototype }), a.push(u2);
|
|
2964
2981
|
}
|
|
2965
2982
|
}
|
|
2966
2983
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2967
2984
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2968
2985
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2969
2986
|
}
|
|
2970
|
-
if ("root" === m2.type) return new
|
|
2971
|
-
if ("decl" === m2.type) return new
|
|
2972
|
-
if ("rule" === m2.type) return new
|
|
2973
|
-
if ("comment" === m2.type) return new
|
|
2974
|
-
if ("atrule" === m2.type) return new
|
|
2987
|
+
if ("root" === m2.type) return new Zr(m2);
|
|
2988
|
+
if ("decl" === m2.type) return new Vr(m2);
|
|
2989
|
+
if ("rule" === m2.type) return new Kr(m2);
|
|
2990
|
+
if ("comment" === m2.type) return new Gr(m2);
|
|
2991
|
+
if ("atrule" === m2.type) return new jr(m2);
|
|
2975
2992
|
throw new Error("Unknown node type: " + e.type);
|
|
2976
2993
|
}
|
|
2977
|
-
var
|
|
2994
|
+
var Jr = Ze;
|
|
2978
2995
|
Ze.default = Ze;
|
|
2979
|
-
let { dirname:
|
|
2980
|
-
var
|
|
2996
|
+
let { dirname: Yr, relative: Xr, resolve: Qr, sep: eo } = jt, { SourceMapConsumer: to, SourceMapGenerator: oo } = jt, { pathToFileURL: io } = jt, ao = wr, lo = !(!to || !oo), co = !!(Yr && Qr && Xr && eo);
|
|
2997
|
+
var uo = class {
|
|
2981
2998
|
constructor(e, a, u, m2) {
|
|
2982
2999
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
2983
3000
|
}
|
|
@@ -2989,8 +3006,8 @@ var ao = class {
|
|
|
2989
3006
|
}
|
|
2990
3007
|
applyPrevMaps() {
|
|
2991
3008
|
for (let e of this.previous()) {
|
|
2992
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
2993
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
3009
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Yr(e.file);
|
|
3010
|
+
false === this.mapOpts.sourcesContent ? (a = new to(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
2994
3011
|
}
|
|
2995
3012
|
}
|
|
2996
3013
|
clearAnnotation() {
|
|
@@ -3000,7 +3017,7 @@ var ao = class {
|
|
|
3000
3017
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
3001
3018
|
}
|
|
3002
3019
|
generate() {
|
|
3003
|
-
if (this.clearAnnotation(),
|
|
3020
|
+
if (this.clearAnnotation(), co && lo && this.isMap()) return this.generateMap();
|
|
3004
3021
|
{
|
|
3005
3022
|
let e = "";
|
|
3006
3023
|
return this.stringify(this.root, (a) => {
|
|
@@ -3012,12 +3029,12 @@ var ao = class {
|
|
|
3012
3029
|
if (this.root) this.generateString();
|
|
3013
3030
|
else if (1 === this.previous().length) {
|
|
3014
3031
|
let e = this.previous()[0].consumer();
|
|
3015
|
-
e.file = this.outputFile(), this.map =
|
|
3016
|
-
} else this.map = new
|
|
3032
|
+
e.file = this.outputFile(), this.map = oo.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3033
|
+
} else this.map = new oo({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
3017
3034
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
3018
3035
|
}
|
|
3019
3036
|
generateString() {
|
|
3020
|
-
this.css = "", this.map = new
|
|
3037
|
+
this.css = "", this.map = new oo({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
3021
3038
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
3022
3039
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
3023
3040
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -3047,9 +3064,9 @@ var ao = class {
|
|
|
3047
3064
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3048
3065
|
let a = this.memoizedPaths.get(e);
|
|
3049
3066
|
if (a) return a;
|
|
3050
|
-
let u = this.opts.to ?
|
|
3051
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
3052
|
-
let m2 =
|
|
3067
|
+
let u = this.opts.to ? Yr(this.opts.to) : ".";
|
|
3068
|
+
"string" == typeof this.mapOpts.annotation && (u = Yr(Qr(u, this.mapOpts.annotation)));
|
|
3069
|
+
let m2 = Xr(u, e);
|
|
3053
3070
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3054
3071
|
}
|
|
3055
3072
|
previous() {
|
|
@@ -3060,7 +3077,7 @@ var ao = class {
|
|
|
3060
3077
|
}
|
|
3061
3078
|
});
|
|
3062
3079
|
else {
|
|
3063
|
-
let e = new
|
|
3080
|
+
let e = new ao(this.originalCSS, this.opts);
|
|
3064
3081
|
e.map && this.previousMaps.push(e.map);
|
|
3065
3082
|
}
|
|
3066
3083
|
return this.previousMaps;
|
|
@@ -3091,8 +3108,8 @@ var ao = class {
|
|
|
3091
3108
|
toFileUrl(e) {
|
|
3092
3109
|
let a = this.memoizedFileURLs.get(e);
|
|
3093
3110
|
if (a) return a;
|
|
3094
|
-
if (
|
|
3095
|
-
let a2 =
|
|
3111
|
+
if (io) {
|
|
3112
|
+
let a2 = io(e).toString();
|
|
3096
3113
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3097
3114
|
}
|
|
3098
3115
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3100,13 +3117,13 @@ var ao = class {
|
|
|
3100
3117
|
toUrl(e) {
|
|
3101
3118
|
let a = this.memoizedURLs.get(e);
|
|
3102
3119
|
if (a) return a;
|
|
3103
|
-
"\\" ===
|
|
3120
|
+
"\\" === eo && (e = e.replace(/\\/g, "/"));
|
|
3104
3121
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3105
3122
|
return this.memoizedURLs.set(e, u), u;
|
|
3106
3123
|
}
|
|
3107
3124
|
};
|
|
3108
|
-
const
|
|
3109
|
-
let
|
|
3125
|
+
const ho = /[\t\n\f\r "#'()/;[\\\]{}]/g, Mo = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, _o = /.[\r\n"'(/\\]/, Ao = /[\da-f]/i;
|
|
3126
|
+
let No = Pn, Po = fn, Do = yn, Fo = Nr, Uo = $r, Xa = function(e, a = {}) {
|
|
3110
3127
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
3111
3128
|
function y2(a2) {
|
|
3112
3129
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3156,7 +3173,7 @@ let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
|
3156
3173
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3157
3174
|
} while (I2);
|
|
3158
3175
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3159
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3176
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || _o.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3160
3177
|
break;
|
|
3161
3178
|
case 39:
|
|
3162
3179
|
case 34:
|
|
@@ -3174,31 +3191,31 @@ let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
|
3174
3191
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3175
3192
|
break;
|
|
3176
3193
|
case 64:
|
|
3177
|
-
|
|
3194
|
+
ho.lastIndex = B2 + 1, ho.test(D2), b2 = 0 === ho.lastIndex ? D2.length - 1 : ho.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3178
3195
|
break;
|
|
3179
3196
|
case 92:
|
|
3180
3197
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3181
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3182
|
-
for (;
|
|
3198
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, Ao.test(D2.charAt(b2)))) {
|
|
3199
|
+
for (; Ao.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3183
3200
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3184
3201
|
}
|
|
3185
3202
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3186
3203
|
break;
|
|
3187
3204
|
default:
|
|
3188
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
3205
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (Mo.lastIndex = B2 + 1, Mo.test(D2), b2 = 0 === Mo.lastIndex ? D2.length - 1 : Mo.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3189
3206
|
}
|
|
3190
3207
|
return B2++, x2;
|
|
3191
3208
|
}, position: function S() {
|
|
3192
3209
|
return B2;
|
|
3193
3210
|
} };
|
|
3194
3211
|
};
|
|
3195
|
-
const
|
|
3196
|
-
var
|
|
3212
|
+
const $o = { empty: true, space: true };
|
|
3213
|
+
var jo = class {
|
|
3197
3214
|
constructor(e) {
|
|
3198
|
-
this.input = e, this.root = new
|
|
3215
|
+
this.input = e, this.root = new Fo(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3199
3216
|
}
|
|
3200
3217
|
atrule(e) {
|
|
3201
|
-
let a = new
|
|
3218
|
+
let a = new No();
|
|
3202
3219
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3203
3220
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3204
3221
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3250,7 +3267,7 @@ var Fo = class {
|
|
|
3250
3267
|
return false;
|
|
3251
3268
|
}
|
|
3252
3269
|
comment(e) {
|
|
3253
|
-
let a = new
|
|
3270
|
+
let a = new Po();
|
|
3254
3271
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3255
3272
|
let u = e[1].slice(2, -2);
|
|
3256
3273
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3263,7 +3280,7 @@ var Fo = class {
|
|
|
3263
3280
|
this.tokenizer = Xa(this.input);
|
|
3264
3281
|
}
|
|
3265
3282
|
decl(e, a) {
|
|
3266
|
-
let u = new
|
|
3283
|
+
let u = new Do();
|
|
3267
3284
|
this.init(u, e[0][2]);
|
|
3268
3285
|
let m2, w2 = e[e.length - 1];
|
|
3269
3286
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3312,7 +3329,7 @@ var Fo = class {
|
|
|
3312
3329
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3313
3330
|
}
|
|
3314
3331
|
emptyRule(e) {
|
|
3315
|
-
let a = new
|
|
3332
|
+
let a = new Uo();
|
|
3316
3333
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3317
3334
|
}
|
|
3318
3335
|
end(e) {
|
|
@@ -3388,7 +3405,7 @@ var Fo = class {
|
|
|
3388
3405
|
}
|
|
3389
3406
|
raw(e, a, u, m2) {
|
|
3390
3407
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3391
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
3408
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", $o[x2] || $o[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3392
3409
|
if (!O2) {
|
|
3393
3410
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3394
3411
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3397,7 +3414,7 @@ var Fo = class {
|
|
|
3397
3414
|
}
|
|
3398
3415
|
rule(e) {
|
|
3399
3416
|
e.pop();
|
|
3400
|
-
let a = new
|
|
3417
|
+
let a = new Uo();
|
|
3401
3418
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3402
3419
|
}
|
|
3403
3420
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3437,9 +3454,9 @@ var Fo = class {
|
|
|
3437
3454
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3438
3455
|
}
|
|
3439
3456
|
};
|
|
3440
|
-
let
|
|
3457
|
+
let Go = An, Vo = wr, qo = jo;
|
|
3441
3458
|
function _t(e, a) {
|
|
3442
|
-
let u = new
|
|
3459
|
+
let u = new Vo(e, a), m2 = new qo(u);
|
|
3443
3460
|
try {
|
|
3444
3461
|
m2.parse();
|
|
3445
3462
|
} catch (e2) {
|
|
@@ -3447,9 +3464,9 @@ function _t(e, a) {
|
|
|
3447
3464
|
}
|
|
3448
3465
|
return m2.root;
|
|
3449
3466
|
}
|
|
3450
|
-
var
|
|
3451
|
-
_t.default = _t,
|
|
3452
|
-
let
|
|
3467
|
+
var Ho = _t;
|
|
3468
|
+
_t.default = _t, Go.registerParse(_t);
|
|
3469
|
+
let Zo = class {
|
|
3453
3470
|
constructor(e, a = {}) {
|
|
3454
3471
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3455
3472
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3461,9 +3478,9 @@ let Vo = class {
|
|
|
3461
3478
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
3462
3479
|
}
|
|
3463
3480
|
};
|
|
3464
|
-
var
|
|
3465
|
-
|
|
3466
|
-
let
|
|
3481
|
+
var Ko = Zo;
|
|
3482
|
+
Zo.default = Zo;
|
|
3483
|
+
let Jo = Ko, Yo = class {
|
|
3467
3484
|
get content() {
|
|
3468
3485
|
return this.css;
|
|
3469
3486
|
}
|
|
@@ -3475,26 +3492,26 @@ let Ho = qo, Zo = class {
|
|
|
3475
3492
|
}
|
|
3476
3493
|
warn(e, a = {}) {
|
|
3477
3494
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3478
|
-
let u = new
|
|
3495
|
+
let u = new Jo(e, a);
|
|
3479
3496
|
return this.messages.push(u), u;
|
|
3480
3497
|
}
|
|
3481
3498
|
warnings() {
|
|
3482
3499
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3483
3500
|
}
|
|
3484
3501
|
};
|
|
3485
|
-
var
|
|
3486
|
-
|
|
3487
|
-
let
|
|
3502
|
+
var Xo = Yo;
|
|
3503
|
+
Yo.default = Yo;
|
|
3504
|
+
let Qo = {};
|
|
3488
3505
|
var so = function(e) {
|
|
3489
|
-
|
|
3506
|
+
Qo[e] || (Qo[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3490
3507
|
};
|
|
3491
|
-
let
|
|
3492
|
-
const
|
|
3508
|
+
let es = An, ts = Wn, ns = uo, rs = Ho, os = Xo, ss = Nr, is = nn, { isClean: as, my: ls } = rn, cs = so;
|
|
3509
|
+
const us = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, ps = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, ds = { Once: true, postcssPlugin: true, prepare: true };
|
|
3493
3510
|
function Ne(e) {
|
|
3494
3511
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3495
3512
|
}
|
|
3496
3513
|
function no(e) {
|
|
3497
|
-
let a = false, u =
|
|
3514
|
+
let a = false, u = us[e.type];
|
|
3498
3515
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
3499
3516
|
}
|
|
3500
3517
|
function Gn(e) {
|
|
@@ -3502,9 +3519,9 @@ function Gn(e) {
|
|
|
3502
3519
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : no(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
3503
3520
|
}
|
|
3504
3521
|
function Ps(e) {
|
|
3505
|
-
return e[
|
|
3522
|
+
return e[as] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3506
3523
|
}
|
|
3507
|
-
let
|
|
3524
|
+
let hs = {}, ms = class ro {
|
|
3508
3525
|
get content() {
|
|
3509
3526
|
return this.stringify().content;
|
|
3510
3527
|
}
|
|
@@ -3531,19 +3548,19 @@ let us = {}, ps = class ro {
|
|
|
3531
3548
|
}
|
|
3532
3549
|
constructor(e, a, u) {
|
|
3533
3550
|
let m2;
|
|
3534
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3551
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof os) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3535
3552
|
else {
|
|
3536
|
-
let e2 =
|
|
3553
|
+
let e2 = rs;
|
|
3537
3554
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3538
3555
|
try {
|
|
3539
3556
|
m2 = e2(a, u);
|
|
3540
3557
|
} catch (e3) {
|
|
3541
3558
|
this.processed = true, this.error = e3;
|
|
3542
3559
|
}
|
|
3543
|
-
m2 && !m2[
|
|
3560
|
+
m2 && !m2[ls] && es.rebuild(m2);
|
|
3544
3561
|
}
|
|
3545
3562
|
else m2 = Ps(a);
|
|
3546
|
-
this.result = new
|
|
3563
|
+
this.result = new os(e, m2, u), this.helpers = { ...hs, postcss: hs, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3547
3564
|
}
|
|
3548
3565
|
async() {
|
|
3549
3566
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3577,8 +3594,8 @@ let us = {}, ps = class ro {
|
|
|
3577
3594
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3578
3595
|
};
|
|
3579
3596
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3580
|
-
if (!
|
|
3581
|
-
if (!
|
|
3597
|
+
if (!ps[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3598
|
+
if (!ds[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3582
3599
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3583
3600
|
}
|
|
3584
3601
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3595,8 +3612,8 @@ let us = {}, ps = class ro {
|
|
|
3595
3612
|
}
|
|
3596
3613
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3597
3614
|
let e = this.result.root;
|
|
3598
|
-
for (; !e[
|
|
3599
|
-
e[
|
|
3615
|
+
for (; !e[as]; ) {
|
|
3616
|
+
e[as] = true;
|
|
3600
3617
|
let a = [Gn(e)];
|
|
3601
3618
|
for (; a.length > 0; ) {
|
|
3602
3619
|
let e2 = this.visitTick(a);
|
|
@@ -3641,9 +3658,9 @@ let us = {}, ps = class ro {
|
|
|
3641
3658
|
if (this.error) throw this.error;
|
|
3642
3659
|
if (this.stringified) return this.result;
|
|
3643
3660
|
this.stringified = true, this.sync();
|
|
3644
|
-
let e = this.result.opts, a =
|
|
3661
|
+
let e = this.result.opts, a = is;
|
|
3645
3662
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3646
|
-
let u = new
|
|
3663
|
+
let u = new ns(a, this.result.root, this.result.opts).generate();
|
|
3647
3664
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3648
3665
|
}
|
|
3649
3666
|
sync() {
|
|
@@ -3655,14 +3672,14 @@ let us = {}, ps = class ro {
|
|
|
3655
3672
|
}
|
|
3656
3673
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3657
3674
|
let e = this.result.root;
|
|
3658
|
-
for (; !e[
|
|
3675
|
+
for (; !e[as]; ) e[as] = true, this.walkSync(e);
|
|
3659
3676
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3660
3677
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3661
3678
|
}
|
|
3662
3679
|
return this.result;
|
|
3663
3680
|
}
|
|
3664
3681
|
then(e, a) {
|
|
3665
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3682
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || cs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
3666
3683
|
}
|
|
3667
3684
|
toString() {
|
|
3668
3685
|
return this.css;
|
|
@@ -3694,22 +3711,22 @@ let us = {}, ps = class ro {
|
|
|
3694
3711
|
}
|
|
3695
3712
|
if (0 !== a.iterator) {
|
|
3696
3713
|
let m3, w3 = a.iterator;
|
|
3697
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3714
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[as]) return m3[as] = true, void e.push(Gn(m3));
|
|
3698
3715
|
a.iterator = 0, delete u.indexes[w3];
|
|
3699
3716
|
}
|
|
3700
3717
|
let w2 = a.events;
|
|
3701
3718
|
for (; a.eventIndex < w2.length; ) {
|
|
3702
3719
|
let e2 = w2[a.eventIndex];
|
|
3703
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3720
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[as] = true, a.iterator = u.getIterator()));
|
|
3704
3721
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3705
3722
|
}
|
|
3706
3723
|
e.pop();
|
|
3707
3724
|
}
|
|
3708
3725
|
walkSync(e) {
|
|
3709
|
-
e[
|
|
3726
|
+
e[as] = true;
|
|
3710
3727
|
let a = no(e);
|
|
3711
3728
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3712
|
-
e2[
|
|
3729
|
+
e2[as] || this.walkSync(e2);
|
|
3713
3730
|
});
|
|
3714
3731
|
else {
|
|
3715
3732
|
let a2 = this.listeners[u];
|
|
@@ -3720,14 +3737,14 @@ let us = {}, ps = class ro {
|
|
|
3720
3737
|
return this.sync().warnings();
|
|
3721
3738
|
}
|
|
3722
3739
|
};
|
|
3723
|
-
|
|
3724
|
-
|
|
3740
|
+
ms.registerPostcss = (e) => {
|
|
3741
|
+
hs = e;
|
|
3725
3742
|
};
|
|
3726
|
-
var
|
|
3727
|
-
|
|
3728
|
-
let
|
|
3729
|
-
const
|
|
3730
|
-
let
|
|
3743
|
+
var gs = ms;
|
|
3744
|
+
ms.default = ms, ss.registerLazyResult(ms), ts.registerLazyResult(ms);
|
|
3745
|
+
let ys = uo, ws = Ho;
|
|
3746
|
+
const Ss = Xo;
|
|
3747
|
+
let bs = nn, vs = so, xs = class {
|
|
3731
3748
|
get content() {
|
|
3732
3749
|
return this.result.css;
|
|
3733
3750
|
}
|
|
@@ -3748,7 +3765,7 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3748
3765
|
}
|
|
3749
3766
|
get root() {
|
|
3750
3767
|
if (this._root) return this._root;
|
|
3751
|
-
let e, a =
|
|
3768
|
+
let e, a = ws;
|
|
3752
3769
|
try {
|
|
3753
3770
|
e = a(this._css, this._opts);
|
|
3754
3771
|
} catch (e2) {
|
|
@@ -3762,11 +3779,11 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3762
3779
|
}
|
|
3763
3780
|
constructor(e, a, u) {
|
|
3764
3781
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3765
|
-
let m2, w2 =
|
|
3766
|
-
this.result = new
|
|
3782
|
+
let m2, w2 = bs;
|
|
3783
|
+
this.result = new Ss(this._processor, m2, this._opts), this.result.css = a;
|
|
3767
3784
|
let b2 = this;
|
|
3768
3785
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3769
|
-
let C2 = new
|
|
3786
|
+
let C2 = new ys(w2, m2, this._opts, a);
|
|
3770
3787
|
if (C2.isMap()) {
|
|
3771
3788
|
let [e2, a2] = C2.generate();
|
|
3772
3789
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3786,7 +3803,7 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3786
3803
|
return this.result;
|
|
3787
3804
|
}
|
|
3788
3805
|
then(e, a) {
|
|
3789
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3806
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || vs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
3790
3807
|
}
|
|
3791
3808
|
toString() {
|
|
3792
3809
|
return this._css;
|
|
@@ -3795,9 +3812,9 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3795
3812
|
return [];
|
|
3796
3813
|
}
|
|
3797
3814
|
};
|
|
3798
|
-
var
|
|
3799
|
-
|
|
3800
|
-
let
|
|
3815
|
+
var Ms = xs;
|
|
3816
|
+
xs.default = xs;
|
|
3817
|
+
let Is = Wn, _s = gs, Os = Ms, Es = Nr, Ls = class {
|
|
3801
3818
|
constructor(e = []) {
|
|
3802
3819
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3803
3820
|
}
|
|
@@ -3813,43 +3830,43 @@ let vs = Fn, xs = ds, Ms = bs, Is = Cr, _s = class {
|
|
|
3813
3830
|
return a;
|
|
3814
3831
|
}
|
|
3815
3832
|
process(e, a = {}) {
|
|
3816
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3833
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new _s(this, e, a) : new Os(this, e, a);
|
|
3817
3834
|
}
|
|
3818
3835
|
use(e) {
|
|
3819
3836
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3820
3837
|
}
|
|
3821
3838
|
};
|
|
3822
|
-
var
|
|
3823
|
-
|
|
3824
|
-
let
|
|
3839
|
+
var Rs = Ls;
|
|
3840
|
+
Ls.default = Ls, Es.registerProcessor(Ls), Is.registerProcessor(Ls);
|
|
3841
|
+
let As = Pn, Ts = fn, Ns = An, $s = Jt, Ws = yn, js = Wn, Gs = Jr, Vs = wr, qs = gs, Hs = Dr, Zs = pn, Ks = Ho, Ys = Rs, Xs = Xo, Qs = Nr, ei = $r, ti = nn, si = Ko;
|
|
3825
3842
|
function L$1(...e) {
|
|
3826
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3843
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Ys(e);
|
|
3827
3844
|
}
|
|
3828
3845
|
L$1.plugin = function(e, a) {
|
|
3829
3846
|
let u, m2 = false;
|
|
3830
3847
|
function n(...u2) {
|
|
3831
3848
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
3832
3849
|
let w2 = a(...u2);
|
|
3833
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3850
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Ys().version, w2;
|
|
3834
3851
|
}
|
|
3835
3852
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3836
3853
|
return L$1([n(u2)]).process(e2, a2);
|
|
3837
3854
|
}, n;
|
|
3838
|
-
}, L$1.stringify =
|
|
3839
|
-
var
|
|
3855
|
+
}, L$1.stringify = ti, L$1.parse = Ks, L$1.fromJSON = Gs, L$1.list = Hs, L$1.comment = (e) => new Ts(e), L$1.atRule = (e) => new As(e), L$1.decl = (e) => new Ws(e), L$1.rule = (e) => new ei(e), L$1.root = (e) => new Qs(e), L$1.document = (e) => new js(e), L$1.CssSyntaxError = $s, L$1.Declaration = Ws, L$1.Container = Ns, L$1.Processor = Ys, L$1.Document = js, L$1.Comment = Ts, L$1.Warning = si, L$1.AtRule = As, L$1.Result = Xs, L$1.Input = Vs, L$1.Rule = ei, L$1.Root = Qs, L$1.Node = Zs, qs.registerPostcss(L$1);
|
|
3856
|
+
var ii = L$1;
|
|
3840
3857
|
L$1.default = L$1;
|
|
3841
|
-
const
|
|
3842
|
-
|
|
3843
|
-
var
|
|
3858
|
+
const ai = Yi(ii);
|
|
3859
|
+
ai.stringify, ai.fromJSON, ai.plugin, ai.parse, ai.list, ai.document, ai.comment, ai.atRule, ai.rule, ai.decl, ai.root, ai.CssSyntaxError, ai.Declaration, ai.Container, ai.Processor, ai.Document, ai.Comment, ai.Warning, ai.AtRule, ai.Result, ai.Input, ai.Rule, ai.Root, ai.Node;
|
|
3860
|
+
var li = ((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[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(li || {}), ci = ((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.Typing = 17] = "Typing", e))(ci || {}), ui = ((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))(ui || {}), pi = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(pi || {}), di = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(di || {}), hi = ((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))(hi || {});
|
|
3844
3861
|
function G(e, a, u = document) {
|
|
3845
3862
|
const m2 = { capture: true, passive: true };
|
|
3846
3863
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3847
3864
|
}
|
|
3848
|
-
const
|
|
3849
|
-
let
|
|
3850
|
-
console.error(
|
|
3851
|
-
}, has: () => (console.error(
|
|
3852
|
-
console.error(
|
|
3865
|
+
const fi = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
|
|
3866
|
+
let mi = { map: {}, getId: () => (console.error(fi), -1), getNode: () => (console.error(fi), null), removeNodeFromMap() {
|
|
3867
|
+
console.error(fi);
|
|
3868
|
+
}, has: () => (console.error(fi), false), reset() {
|
|
3869
|
+
console.error(fi);
|
|
3853
3870
|
} };
|
|
3854
3871
|
function $e(e, a, u = {}) {
|
|
3855
3872
|
let m2 = null, w2 = 0;
|
|
@@ -3883,8 +3900,8 @@ function Re(e, a, u) {
|
|
|
3883
3900
|
};
|
|
3884
3901
|
}
|
|
3885
3902
|
}
|
|
3886
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3887
|
-
let
|
|
3903
|
+
typeof window < "u" && window.Proxy && window.Reflect && (mi = new Proxy(mi, { get: (e, a, u) => ("map" === a && console.error(fi), Reflect.get(e, a, u)) }));
|
|
3904
|
+
let gi, yi = Date.now;
|
|
3888
3905
|
function po(e) {
|
|
3889
3906
|
var a, u, m2, w2, b2, C2;
|
|
3890
3907
|
const x2 = e.document;
|
|
@@ -3931,7 +3948,7 @@ function bo(e, a) {
|
|
|
3931
3948
|
function Fs(e) {
|
|
3932
3949
|
return !(null == e || !e.shadowRoot);
|
|
3933
3950
|
}
|
|
3934
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3951
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (yi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3935
3952
|
class _l {
|
|
3936
3953
|
constructor() {
|
|
3937
3954
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3976,11 +3993,11 @@ function vo(e) {
|
|
|
3976
3993
|
const a = e.ownerDocument;
|
|
3977
3994
|
return !!a && (a.contains(e) || zl(e));
|
|
3978
3995
|
}
|
|
3979
|
-
const M = (e) =>
|
|
3996
|
+
const M = (e) => gi ? (...a) => {
|
|
3980
3997
|
try {
|
|
3981
3998
|
return e(...a);
|
|
3982
3999
|
} catch (e2) {
|
|
3983
|
-
if (
|
|
4000
|
+
if (gi && true === gi(e2)) return;
|
|
3984
4001
|
throw e2;
|
|
3985
4002
|
}
|
|
3986
4003
|
} : e;
|
|
@@ -4039,22 +4056,22 @@ class Vl {
|
|
|
4039
4056
|
transformCrossOriginEvent(e, a) {
|
|
4040
4057
|
var u;
|
|
4041
4058
|
switch (a.type) {
|
|
4042
|
-
case
|
|
4059
|
+
case li.FullSnapshot: {
|
|
4043
4060
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4044
4061
|
const u2 = a.data.node.id;
|
|
4045
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4062
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: li.IncrementalSnapshot, data: { source: ci.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4046
4063
|
}
|
|
4047
|
-
case
|
|
4048
|
-
case
|
|
4049
|
-
case
|
|
4064
|
+
case li.Meta:
|
|
4065
|
+
case li.Load:
|
|
4066
|
+
case li.DomContentLoaded:
|
|
4050
4067
|
return false;
|
|
4051
|
-
case
|
|
4068
|
+
case li.Plugin:
|
|
4052
4069
|
return a;
|
|
4053
|
-
case
|
|
4070
|
+
case li.Custom:
|
|
4054
4071
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4055
|
-
case
|
|
4072
|
+
case li.IncrementalSnapshot:
|
|
4056
4073
|
switch (a.data.source) {
|
|
4057
|
-
case
|
|
4074
|
+
case ci.Mutation:
|
|
4058
4075
|
return a.data.adds.forEach((a2) => {
|
|
4059
4076
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4060
4077
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4066,30 +4083,30 @@ class Vl {
|
|
|
4066
4083
|
}), a.data.texts.forEach((a2) => {
|
|
4067
4084
|
this.replaceIds(a2, e, ["id"]);
|
|
4068
4085
|
}), a;
|
|
4069
|
-
case
|
|
4070
|
-
case
|
|
4071
|
-
case
|
|
4086
|
+
case ci.Drag:
|
|
4087
|
+
case ci.TouchMove:
|
|
4088
|
+
case ci.MouseMove:
|
|
4072
4089
|
return a.data.positions.forEach((a2) => {
|
|
4073
4090
|
this.replaceIds(a2, e, ["id"]);
|
|
4074
4091
|
}), a;
|
|
4075
|
-
case
|
|
4092
|
+
case ci.ViewportResize:
|
|
4076
4093
|
return false;
|
|
4077
|
-
case
|
|
4078
|
-
case
|
|
4079
|
-
case
|
|
4080
|
-
case
|
|
4081
|
-
case
|
|
4094
|
+
case ci.MediaInteraction:
|
|
4095
|
+
case ci.MouseInteraction:
|
|
4096
|
+
case ci.Scroll:
|
|
4097
|
+
case ci.CanvasMutation:
|
|
4098
|
+
case ci.Input:
|
|
4082
4099
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4083
|
-
case
|
|
4084
|
-
case
|
|
4100
|
+
case ci.StyleSheetRule:
|
|
4101
|
+
case ci.StyleDeclaration:
|
|
4085
4102
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4086
|
-
case
|
|
4103
|
+
case ci.Font:
|
|
4087
4104
|
return a;
|
|
4088
|
-
case
|
|
4105
|
+
case ci.Selection:
|
|
4089
4106
|
return a.data.ranges.forEach((a2) => {
|
|
4090
4107
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4091
4108
|
}), a;
|
|
4092
|
-
case
|
|
4109
|
+
case ci.AdoptedStyleSheet:
|
|
4093
4110
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4094
4111
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4095
4112
|
}), a;
|
|
@@ -4113,7 +4130,7 @@ class Vl {
|
|
|
4113
4130
|
});
|
|
4114
4131
|
}
|
|
4115
4132
|
patchRootIdOnNode(e, a) {
|
|
4116
|
-
e.type !==
|
|
4133
|
+
e.type !== wt.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4117
4134
|
this.patchRootIdOnNode(e2, a);
|
|
4118
4135
|
});
|
|
4119
4136
|
}
|
|
@@ -4331,7 +4348,7 @@ function ko(e, a) {
|
|
|
4331
4348
|
const { parentNode: u } = a;
|
|
4332
4349
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4333
4350
|
}
|
|
4334
|
-
const
|
|
4351
|
+
const Mi = [];
|
|
4335
4352
|
function tt(e) {
|
|
4336
4353
|
try {
|
|
4337
4354
|
if ("composedPath" in e) {
|
|
@@ -4345,7 +4362,7 @@ function tt(e) {
|
|
|
4345
4362
|
function Co(e, a) {
|
|
4346
4363
|
var u, m2;
|
|
4347
4364
|
const w2 = new Zl();
|
|
4348
|
-
|
|
4365
|
+
Mi.push(w2), w2.init(e);
|
|
4349
4366
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4350
4367
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4351
4368
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4357,7 +4374,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4357
4374
|
};
|
|
4358
4375
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4359
4376
|
let I2 = null;
|
|
4360
|
-
return Object.keys(
|
|
4377
|
+
return Object.keys(ui).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4361
4378
|
let C3 = fe(b3);
|
|
4362
4379
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4363
4380
|
const C4 = tt(b4);
|
|
@@ -4366,29 +4383,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4366
4383
|
if ("pointerType" in b4) {
|
|
4367
4384
|
switch (b4.pointerType) {
|
|
4368
4385
|
case "mouse":
|
|
4369
|
-
x3 =
|
|
4386
|
+
x3 = pi.Mouse;
|
|
4370
4387
|
break;
|
|
4371
4388
|
case "touch":
|
|
4372
|
-
x3 =
|
|
4389
|
+
x3 = pi.Touch;
|
|
4373
4390
|
break;
|
|
4374
4391
|
case "pen":
|
|
4375
|
-
x3 =
|
|
4392
|
+
x3 = pi.Pen;
|
|
4376
4393
|
}
|
|
4377
|
-
x3 ===
|
|
4378
|
-
} else Ds(b4) && (x3 =
|
|
4379
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4394
|
+
x3 === pi.Touch ? ui[a2] === ui.MouseDown ? _3 = "TouchStart" : ui[a2] === ui.MouseUp && (_3 = "TouchEnd") : pi.Pen;
|
|
4395
|
+
} else Ds(b4) && (x3 = pi.Touch);
|
|
4396
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === pi.Touch || _3.startsWith("Mouse") && x3 === pi.Mouse) && (x3 = null)) : ui[a2] === ui.Click && (x3 = I2, I2 = null);
|
|
4380
4397
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4381
4398
|
if (!O2) return;
|
|
4382
4399
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4383
|
-
M(e)({ type:
|
|
4400
|
+
M(e)({ type: ui[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4384
4401
|
})(b3);
|
|
4385
|
-
if (window.PointerEvent) switch (
|
|
4386
|
-
case
|
|
4387
|
-
case
|
|
4402
|
+
if (window.PointerEvent) switch (ui[b3]) {
|
|
4403
|
+
case ui.MouseDown:
|
|
4404
|
+
case ui.MouseUp:
|
|
4388
4405
|
C3 = C3.replace("mouse", "pointer");
|
|
4389
4406
|
break;
|
|
4390
|
-
case
|
|
4391
|
-
case
|
|
4407
|
+
case ui.TouchStart:
|
|
4408
|
+
case ui.TouchEnd:
|
|
4392
4409
|
return;
|
|
4393
4410
|
}
|
|
4394
4411
|
x2.push(G(C3, _2, a));
|
|
@@ -4407,7 +4424,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4407
4424
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4408
4425
|
}), b2.scroll || 100)), a);
|
|
4409
4426
|
}
|
|
4410
|
-
const
|
|
4427
|
+
const Ii = ["INPUT", "TEXTAREA", "SELECT"], Li = /* @__PURE__ */ new WeakMap();
|
|
4411
4428
|
function ql({ deviceChangeCb: e }) {
|
|
4412
4429
|
const t = (a2, u2) => {
|
|
4413
4430
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4527,7 +4544,7 @@ function au(e, a = {}) {
|
|
|
4527
4544
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4528
4545
|
}), b3), _3 = M($e(M((e3) => {
|
|
4529
4546
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4530
|
-
C3 || (C3 =
|
|
4547
|
+
C3 || (C3 = yi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: yi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ci.Drag : e3 instanceof MouseEvent ? ci.MouseMove : ci.TouchMove);
|
|
4531
4548
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4532
4549
|
return M(() => {
|
|
4533
4550
|
O3.forEach((e3) => e3());
|
|
@@ -4543,7 +4560,7 @@ function au(e, a = {}) {
|
|
|
4543
4560
|
function p(e3) {
|
|
4544
4561
|
let u3 = tt(e3);
|
|
4545
4562
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4546
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4563
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || Ii.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4547
4564
|
let D4 = u3.value, F4 = false;
|
|
4548
4565
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4549
4566
|
D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u3.checked), f2(u3, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
|
|
@@ -4556,9 +4573,9 @@ function au(e, a = {}) {
|
|
|
4556
4573
|
});
|
|
4557
4574
|
}
|
|
4558
4575
|
function f2(a3, m4) {
|
|
4559
|
-
const w4 =
|
|
4576
|
+
const w4 = Li.get(a3);
|
|
4560
4577
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4561
|
-
|
|
4578
|
+
Li.set(a3, m4);
|
|
4562
4579
|
const w5 = u2.getId(a3);
|
|
4563
4580
|
M(e2)({ ...m4, id: w5 });
|
|
4564
4581
|
}
|
|
@@ -4583,7 +4600,7 @@ function au(e, a = {}) {
|
|
|
4583
4600
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4584
4601
|
_3 = e3, b3 = a4;
|
|
4585
4602
|
}
|
|
4586
|
-
e2({ source:
|
|
4603
|
+
e2({ source: ci.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4587
4604
|
var a4;
|
|
4588
4605
|
const u3 = [];
|
|
4589
4606
|
for (; e3; ) {
|
|
@@ -4611,7 +4628,7 @@ function au(e, a = {}) {
|
|
|
4611
4628
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4612
4629
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4613
4630
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4614
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4631
|
+
}), w3.media || 500)), x3 = [G("play", C3(hi.Play), b3), G("pause", C3(hi.Pause), b3), G("seeked", C3(hi.Seeked), b3), G("volumechange", C3(hi.VolumeChange), b3), G("ratechange", C3(hi.RateChange), b3)];
|
|
4615
4632
|
return M(() => {
|
|
4616
4633
|
x3.forEach((e3) => e3());
|
|
4617
4634
|
});
|
|
@@ -4732,7 +4749,7 @@ function au(e, a = {}) {
|
|
|
4732
4749
|
})(e), U2 = [];
|
|
4733
4750
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4734
4751
|
return M(() => {
|
|
4735
|
-
|
|
4752
|
+
Mi.forEach((e2) => e2.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d2(), g2(), h(), D2(), F2(), O2(), U2.forEach((e2) => e2());
|
|
4736
4753
|
});
|
|
4737
4754
|
}
|
|
4738
4755
|
function ft(e) {
|
|
@@ -4741,29 +4758,29 @@ function ft(e) {
|
|
|
4741
4758
|
function mt(e) {
|
|
4742
4759
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4743
4760
|
}
|
|
4744
|
-
const
|
|
4745
|
-
var
|
|
4761
|
+
const Ri = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Ai = typeof self < "u" && self.Blob && new Blob([(Ti = Ri, Uint8Array.from(atob(Ti), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4762
|
+
var Ti;
|
|
4746
4763
|
function uu(e) {
|
|
4747
4764
|
let a;
|
|
4748
4765
|
try {
|
|
4749
|
-
if (a =
|
|
4766
|
+
if (a = Ai && (self.URL || self.webkitURL).createObjectURL(Ai), !a) throw "";
|
|
4750
4767
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4751
4768
|
return u.addEventListener("error", () => {
|
|
4752
4769
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4753
4770
|
}), u;
|
|
4754
4771
|
} catch {
|
|
4755
|
-
return new Worker("data:text/javascript;base64," +
|
|
4772
|
+
return new Worker("data:text/javascript;base64," + Ri, { name: null == e ? void 0 : e.name });
|
|
4756
4773
|
} finally {
|
|
4757
4774
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4758
4775
|
}
|
|
4759
4776
|
}
|
|
4760
|
-
for (var
|
|
4761
|
-
const
|
|
4777
|
+
for (var Ni = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Pi = typeof Uint8Array > "u" ? [] : new Uint8Array(256), qi = 0; qi < 64; qi++) Pi[Ni.charCodeAt(qi)] = qi;
|
|
4778
|
+
const Hi = /* @__PURE__ */ new Map();
|
|
4762
4779
|
const Oo = (e, a, u) => {
|
|
4763
4780
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4764
4781
|
const m2 = (function pu(e2, a2) {
|
|
4765
|
-
let u2 =
|
|
4766
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4782
|
+
let u2 = Hi.get(e2);
|
|
4783
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Hi.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4767
4784
|
})(u, e.constructor.name);
|
|
4768
4785
|
let w2 = m2.indexOf(e);
|
|
4769
4786
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4775,7 +4792,7 @@ function Ot(e, a, u) {
|
|
|
4775
4792
|
if (e instanceof ArrayBuffer) {
|
|
4776
4793
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4777
4794
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4778
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4795
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Ni[u3[a3] >> 2], w2 += Ni[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Ni[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Ni[63 & u3[a3 + 2]];
|
|
4779
4796
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4780
4797
|
})(e);
|
|
4781
4798
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4872,7 +4889,7 @@ class gu {
|
|
|
4872
4889
|
const { id: a2 } = e2.data;
|
|
4873
4890
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4874
4891
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4875
|
-
this.mutationCb({ id: a2, type:
|
|
4892
|
+
this.mutationCb({ id: a2, type: di["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u2 }], type: m3 }] }, 0, 0] }] });
|
|
4876
4893
|
};
|
|
4877
4894
|
const I2 = 1e3 / e;
|
|
4878
4895
|
let _2, O2 = 0;
|
|
@@ -4908,14 +4925,14 @@ class gu {
|
|
|
4908
4925
|
return function(...b5) {
|
|
4909
4926
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4910
4927
|
const u3 = Eo(b5, a2, this);
|
|
4911
|
-
e2(this.canvas, { type:
|
|
4928
|
+
e2(this.canvas, { type: di["2D"], property: C2, args: u3 });
|
|
4912
4929
|
}, 0), w4.apply(this, b5);
|
|
4913
4930
|
};
|
|
4914
4931
|
});
|
|
4915
4932
|
w3.push(b4);
|
|
4916
4933
|
} catch {
|
|
4917
4934
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4918
|
-
e2(this.canvas, { type:
|
|
4935
|
+
e2(this.canvas, { type: di["2D"], property: C2, args: [a3], setter: true });
|
|
4919
4936
|
} });
|
|
4920
4937
|
w3.push(u3);
|
|
4921
4938
|
}
|
|
@@ -4924,7 +4941,7 @@ class gu {
|
|
|
4924
4941
|
};
|
|
4925
4942
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4926
4943
|
const w3 = [];
|
|
4927
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4944
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, di.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, di.WebGL2, e2, u2, m3, a2)), () => {
|
|
4928
4945
|
w3.forEach((e3) => e3());
|
|
4929
4946
|
};
|
|
4930
4947
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5035,23 +5052,23 @@ class bu {
|
|
|
5035
5052
|
trackStylesheetInLinkElement(e) {
|
|
5036
5053
|
}
|
|
5037
5054
|
}
|
|
5038
|
-
let
|
|
5039
|
-
var
|
|
5055
|
+
let Ji, Xi, Qi, ea = false;
|
|
5056
|
+
var ta;
|
|
5040
5057
|
try {
|
|
5041
5058
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5042
5059
|
const e = document.createElement("iframe");
|
|
5043
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5060
|
+
document.body.appendChild(e), Array.from = (null == (ta = e.contentWindow) ? void 0 : ta.Array.from) || Array.from, document.body.removeChild(e);
|
|
5044
5061
|
}
|
|
5045
|
-
} catch (
|
|
5046
|
-
console.debug("Unable to override Array.from",
|
|
5062
|
+
} catch (Ti2) {
|
|
5063
|
+
console.debug("Unable to override Array.from", Ti2);
|
|
5047
5064
|
}
|
|
5048
|
-
const
|
|
5049
|
-
return new
|
|
5065
|
+
const na = (function Ci() {
|
|
5066
|
+
return new St();
|
|
5050
5067
|
})();
|
|
5051
5068
|
function ae(e = {}) {
|
|
5052
5069
|
const { emit: a, checkoutEveryNms: u, checkoutEveryNth: m2, blockClass: w2 = "rr-block", blockSelector: b2 = null, ignoreClass: C2 = "rr-ignore", ignoreSelector: x2 = null, maskTextClass: I2 = "rr-mask", maskTextSelector: _2 = null, inlineStylesheet: O2 = true, maskAllInputs: E2, maskInputOptions: D2, slimDOMOptions: F2, maskInputFn: U2, maskTextFn: B2, hooks: $2, packFn: z2, sampling: j2 = {}, dataURLOptions: V2 = {}, mousemoveWait: q2, recordDOM: H2 = true, recordCanvas: J2 = false, recordCrossOriginIframes: Y2 = false, recordAfter: X2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e;
|
|
5053
5070
|
!(function Bl(e2) {
|
|
5054
|
-
|
|
5071
|
+
gi = e2;
|
|
5055
5072
|
})(se2);
|
|
5056
5073
|
const ie2 = !Y2 || window.parent === window;
|
|
5057
5074
|
let le2 = false;
|
|
@@ -5063,7 +5080,7 @@ function ae(e = {}) {
|
|
|
5063
5080
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5064
5081
|
if (!ie2 && !le2) return () => {
|
|
5065
5082
|
};
|
|
5066
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5083
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), na.reset();
|
|
5067
5084
|
const ce2 = true === E2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== D2 ? D2 : { password: true }, pe2 = true === F2 || "all" === F2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === F2, headMetaDescKeywords: "all" === F2, headTitleMutations: "all" === F2 } : F2 || {};
|
|
5068
5085
|
!(function Ul(e2 = window) {
|
|
5069
5086
|
"NodeList" in e2 && !e2.NodeList.prototype.forEach && (e2.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e2 && !e2.DOMTokenList.prototype.forEach && (e2.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e3) => {
|
|
@@ -5080,57 +5097,57 @@ function ae(e = {}) {
|
|
|
5080
5097
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5081
5098
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5082
5099
|
};
|
|
5083
|
-
|
|
5100
|
+
Ji = (e2, w3) => {
|
|
5084
5101
|
var b3;
|
|
5085
5102
|
const C3 = e2;
|
|
5086
|
-
if (C3.timestamp =
|
|
5103
|
+
if (C3.timestamp = yi(), null != (b3 = Mi[0]) && b3.isFrozen() && C3.type !== li.FullSnapshot && !(C3.type === li.IncrementalSnapshot && C3.data.source === ci.Mutation) && Mi.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5087
5104
|
else if (le2) {
|
|
5088
5105
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5089
5106
|
window.parent.postMessage(e3, "*");
|
|
5090
5107
|
}
|
|
5091
|
-
if (C3.type ===
|
|
5092
|
-
else if (C3.type ===
|
|
5093
|
-
if (C3.data.source ===
|
|
5108
|
+
if (C3.type === li.FullSnapshot) de2 = C3, he2 = 0;
|
|
5109
|
+
else if (C3.type === li.IncrementalSnapshot) {
|
|
5110
|
+
if (C3.data.source === ci.Mutation && C3.data.isAttachIframe) return;
|
|
5094
5111
|
he2++;
|
|
5095
5112
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5096
|
-
(e3 || a2) &&
|
|
5113
|
+
(e3 || a2) && Xi(true);
|
|
5097
5114
|
}
|
|
5098
5115
|
};
|
|
5099
5116
|
const rt = (e2) => {
|
|
5100
|
-
|
|
5101
|
-
}, kn = (e2) =>
|
|
5102
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5117
|
+
Ji({ type: li.IncrementalSnapshot, data: { source: ci.Mutation, ...e2 } });
|
|
5118
|
+
}, kn = (e2) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.Scroll, ...e2 } }), Cn = (e2) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: na, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Ji });
|
|
5119
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: na, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5103
5120
|
const ye2 = new yu();
|
|
5104
|
-
|
|
5105
|
-
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager:
|
|
5106
|
-
|
|
5121
|
+
Qi = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: na, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5122
|
+
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager: Qi, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: na });
|
|
5123
|
+
Xi = (e2 = false) => {
|
|
5107
5124
|
if (!H2) return;
|
|
5108
|
-
|
|
5125
|
+
Ji({ type: li.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), Mi.forEach((e3) => e3.lock());
|
|
5109
5126
|
const a2 = (function Zi(e3, a3) {
|
|
5110
|
-
const { mirror: u2 = new
|
|
5127
|
+
const { mirror: u2 = new St(), blockClass: m3 = "rr-block", blockSelector: w3 = null, maskTextClass: b3 = "rr-mask", maskTextSelector: C3 = null, inlineStylesheet: x3 = true, inlineImages: I3 = false, recordCanvas: _3 = false, maskAllInputs: O3 = false, maskTextFn: E3, maskInputFn: D3, slimDOM: F3 = false, dataURLOptions: U3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3 = () => false } = a3 || {};
|
|
5111
5128
|
return Se(e3, { doc: e3, mirror: u2, blockClass: m3, blockSelector: w3, maskTextClass: b3, maskTextSelector: C3, skipChild: false, inlineStylesheet: x3, maskInputOptions: true === O3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === O3 ? { password: true } : O3, maskTextFn: E3, maskInputFn: D3, slimDOMOptions: true === F3 || "all" === F3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === F3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === F3 ? {} : F3, dataURLOptions: U3, inlineImages: I3, recordCanvas: _3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3, newlyAddedElement: false });
|
|
5112
|
-
})(document, { mirror:
|
|
5113
|
-
wo(e3,
|
|
5129
|
+
})(document, { mirror: na, blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskAllInputs: ce2, maskTextFn: B2, maskInputFn: U2, slimDOM: pe2, dataURLOptions: V2, recordCanvas: J2, inlineImages: te2, onSerialize: (e3) => {
|
|
5130
|
+
wo(e3, na) && ge2.addIframe(e3), bo(e3, na) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5114
5131
|
}, onIframeLoad: (e3, a3) => {
|
|
5115
5132
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5116
5133
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5117
5134
|
me2.attachLinkElement(e3, a3);
|
|
5118
5135
|
}, keepIframeSrcFn: re2 });
|
|
5119
5136
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5120
|
-
|
|
5137
|
+
Ji({ type: li.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), Mi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, na.getId(document));
|
|
5121
5138
|
};
|
|
5122
5139
|
try {
|
|
5123
5140
|
const e2 = [], K = (e3) => {
|
|
5124
5141
|
var a2;
|
|
5125
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5126
|
-
|
|
5142
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => Ji({ type: li.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.ViewportResize, ...e4 } }), inputCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.Input, ...e4 } }), mediaInteractionCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => Ji({ type: li.IncrementalSnapshot, data: { source: ci.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5143
|
+
Ji({ type: li.IncrementalSnapshot, data: { source: ci.Selection, ...e4 } });
|
|
5127
5144
|
}, customElementCb: (e4) => {
|
|
5128
|
-
|
|
5145
|
+
Ji({ type: li.IncrementalSnapshot, data: { source: ci.CustomElement, ...e4 } });
|
|
5129
5146
|
}, typingCb: (e4) => {
|
|
5130
|
-
|
|
5147
|
+
Ji({ type: li.IncrementalSnapshot, data: { ...e4 } });
|
|
5131
5148
|
}, deviceChangeCb: (e4) => {
|
|
5132
|
-
|
|
5133
|
-
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror:
|
|
5149
|
+
Ji({ type: li.Device, data: { ...e4 } });
|
|
5150
|
+
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: na, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Qi, ignoreCSSAttributes: oe2, plugins: (null == (a2 = null == ne2 ? void 0 : ne2.filter((e4) => e4.observer)) ? void 0 : a2.map((e4) => ({ observer: e4.observer, options: e4.options, callback: (a3) => Ji({ type: li.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5134
5151
|
};
|
|
5135
5152
|
ge2.addLoadListener((a2) => {
|
|
5136
5153
|
try {
|
|
@@ -5140,15 +5157,15 @@ function ae(e = {}) {
|
|
|
5140
5157
|
}
|
|
5141
5158
|
});
|
|
5142
5159
|
const W = () => {
|
|
5143
|
-
|
|
5160
|
+
Xi(), e2.push(K(document)), ea = true;
|
|
5144
5161
|
};
|
|
5145
5162
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5146
|
-
|
|
5163
|
+
Ji({ type: li.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5147
5164
|
})), e2.push(G("load", () => {
|
|
5148
|
-
|
|
5165
|
+
Ji({ type: li.Load, data: {} }), "load" === X2 && W();
|
|
5149
5166
|
}, window))), () => {
|
|
5150
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5151
|
-
|
|
5167
|
+
e2.forEach((e3) => e3()), ye2.destroy(), ea = false, (function jl() {
|
|
5168
|
+
gi = void 0;
|
|
5152
5169
|
})();
|
|
5153
5170
|
};
|
|
5154
5171
|
} catch (e2) {
|
|
@@ -5175,24 +5192,24 @@ function vu(e) {
|
|
|
5175
5192
|
}), u;
|
|
5176
5193
|
}
|
|
5177
5194
|
ae.addCustomEvent = (e, a) => {
|
|
5178
|
-
if (!
|
|
5179
|
-
|
|
5195
|
+
if (!ea) throw new Error("please add custom event after start recording");
|
|
5196
|
+
Ji({ type: li.Custom, data: { tag: e, payload: a } });
|
|
5180
5197
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5181
|
-
if (!
|
|
5182
|
-
|
|
5198
|
+
if (!ea) throw new Error("please add Sailfish event after start recording");
|
|
5199
|
+
Ji({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5183
5200
|
}, ae.freezePage = () => {
|
|
5184
|
-
|
|
5201
|
+
Mi.forEach((e) => e.freeze());
|
|
5185
5202
|
}, ae.takeFullSnapshot = (e) => {
|
|
5186
|
-
if (!
|
|
5187
|
-
|
|
5188
|
-
}, ae.mirror =
|
|
5189
|
-
var
|
|
5190
|
-
return { isColorSupported: false, reset:
|
|
5203
|
+
if (!ea) throw new Error("please take full snapshot after start recording");
|
|
5204
|
+
Xi(e);
|
|
5205
|
+
}, ae.mirror = na;
|
|
5206
|
+
var ra = { exports: {} }, oa = String, Lo = function() {
|
|
5207
|
+
return { isColorSupported: false, reset: oa, bold: oa, dim: oa, italic: oa, underline: oa, inverse: oa, hidden: oa, strikethrough: oa, black: oa, red: oa, green: oa, yellow: oa, blue: oa, magenta: oa, cyan: oa, white: oa, gray: oa, bgBlack: oa, bgRed: oa, bgGreen: oa, bgYellow: oa, bgBlue: oa, bgMagenta: oa, bgCyan: oa, bgWhite: oa, blackBright: oa, redBright: oa, greenBright: oa, yellowBright: oa, blueBright: oa, magentaBright: oa, cyanBright: oa, whiteBright: oa, bgBlackBright: oa, bgRedBright: oa, bgGreenBright: oa, bgYellowBright: oa, bgBlueBright: oa, bgMagentaBright: oa, bgCyanBright: oa, bgWhiteBright: oa };
|
|
5191
5208
|
};
|
|
5192
|
-
|
|
5193
|
-
var
|
|
5194
|
-
const
|
|
5195
|
-
let
|
|
5209
|
+
ra.exports = Lo(), ra.exports.createColors = Lo;
|
|
5210
|
+
var sa = ra.exports;
|
|
5211
|
+
const ia = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5212
|
+
let aa = sa, la = ia, ca = class To extends Error {
|
|
5196
5213
|
constructor(e, a, u, m2, w2, b2) {
|
|
5197
5214
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
|
|
5198
5215
|
}
|
|
@@ -5202,11 +5219,11 @@ let oa = na, sa = ra, ia = class To extends Error {
|
|
|
5202
5219
|
showSourceCode(e) {
|
|
5203
5220
|
if (!this.source) return "";
|
|
5204
5221
|
let a = this.source;
|
|
5205
|
-
null == e && (e =
|
|
5222
|
+
null == e && (e = aa.isColorSupported);
|
|
5206
5223
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5207
5224
|
if (e) {
|
|
5208
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5209
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5225
|
+
let { bold: e2, gray: a2, red: u2 } = aa.createColors(true);
|
|
5226
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), la && (i = (e3) => la(e3));
|
|
5210
5227
|
}
|
|
5211
5228
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
5212
5229
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5227,10 +5244,10 @@ let oa = na, sa = ra, ia = class To extends Error {
|
|
|
5227
5244
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5228
5245
|
}
|
|
5229
5246
|
};
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
const
|
|
5233
|
-
let
|
|
5247
|
+
var ua = ca;
|
|
5248
|
+
ca.default = ca;
|
|
5249
|
+
const pa = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5250
|
+
let ha = class {
|
|
5234
5251
|
constructor(e) {
|
|
5235
5252
|
this.builder = e;
|
|
5236
5253
|
}
|
|
@@ -5282,7 +5299,7 @@ let ca = class {
|
|
|
5282
5299
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5283
5300
|
let w2 = e.parent;
|
|
5284
5301
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5285
|
-
if (!w2) return
|
|
5302
|
+
if (!w2) return pa[u];
|
|
5286
5303
|
let b2 = e.root();
|
|
5287
5304
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5288
5305
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5294,7 +5311,7 @@ let ca = class {
|
|
|
5294
5311
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5295
5312
|
});
|
|
5296
5313
|
}
|
|
5297
|
-
return typeof m2 > "u" && (m2 =
|
|
5314
|
+
return typeof m2 > "u" && (m2 = pa[u]), b2.rawCache[u] = m2, m2;
|
|
5298
5315
|
}
|
|
5299
5316
|
rawBeforeClose(e) {
|
|
5300
5317
|
let a;
|
|
@@ -5370,17 +5387,17 @@ let ca = class {
|
|
|
5370
5387
|
this[e.type](e, a);
|
|
5371
5388
|
}
|
|
5372
5389
|
};
|
|
5373
|
-
var
|
|
5374
|
-
|
|
5375
|
-
let
|
|
5390
|
+
var fa = ha;
|
|
5391
|
+
ha.default = ha;
|
|
5392
|
+
let ma = fa;
|
|
5376
5393
|
function zs(e, a) {
|
|
5377
|
-
new
|
|
5394
|
+
new ma(a).stringify(e);
|
|
5378
5395
|
}
|
|
5379
|
-
var
|
|
5396
|
+
var ga = zs;
|
|
5380
5397
|
zs.default = zs;
|
|
5381
|
-
var
|
|
5382
|
-
|
|
5383
|
-
let
|
|
5398
|
+
var ya = {};
|
|
5399
|
+
ya.isClean = Symbol("isClean"), ya.my = Symbol("my");
|
|
5400
|
+
let wa = ua, Sa = fa, ba = ga, { isClean: va, my: Ca } = ya;
|
|
5384
5401
|
function Bs(e, a) {
|
|
5385
5402
|
let u = new e.constructor();
|
|
5386
5403
|
for (let m2 in e) {
|
|
@@ -5402,12 +5419,12 @@ function Fe(e, a) {
|
|
|
5402
5419
|
}
|
|
5403
5420
|
return w2;
|
|
5404
5421
|
}
|
|
5405
|
-
let
|
|
5422
|
+
let ka = class {
|
|
5406
5423
|
get proxyOf() {
|
|
5407
5424
|
return this;
|
|
5408
5425
|
}
|
|
5409
5426
|
constructor(e = {}) {
|
|
5410
|
-
this.raws = {}, this[
|
|
5427
|
+
this.raws = {}, this[va] = false, this[Ca] = true;
|
|
5411
5428
|
for (let a in e) if ("nodes" === a) {
|
|
5412
5429
|
this.nodes = [];
|
|
5413
5430
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5451,19 +5468,19 @@ let ba = class {
|
|
|
5451
5468
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5452
5469
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5453
5470
|
}
|
|
5454
|
-
return new
|
|
5471
|
+
return new wa(e);
|
|
5455
5472
|
}
|
|
5456
5473
|
getProxyProcessor() {
|
|
5457
5474
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
5458
5475
|
}
|
|
5459
5476
|
markClean() {
|
|
5460
|
-
this[
|
|
5477
|
+
this[va] = true;
|
|
5461
5478
|
}
|
|
5462
5479
|
markDirty() {
|
|
5463
|
-
if (this[
|
|
5464
|
-
this[
|
|
5480
|
+
if (this[va]) {
|
|
5481
|
+
this[va] = false;
|
|
5465
5482
|
let e = this;
|
|
5466
|
-
for (; e = e.parent; ) e[
|
|
5483
|
+
for (; e = e.parent; ) e[va] = false;
|
|
5467
5484
|
}
|
|
5468
5485
|
}
|
|
5469
5486
|
next() {
|
|
@@ -5499,7 +5516,7 @@ let ba = class {
|
|
|
5499
5516
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
5500
5517
|
}
|
|
5501
5518
|
raw(e, a) {
|
|
5502
|
-
return new
|
|
5519
|
+
return new Sa().raw(this, e, a);
|
|
5503
5520
|
}
|
|
5504
5521
|
remove() {
|
|
5505
5522
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5536,7 +5553,7 @@ let ba = class {
|
|
|
5536
5553
|
toProxy() {
|
|
5537
5554
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5538
5555
|
}
|
|
5539
|
-
toString(e =
|
|
5556
|
+
toString(e = ba) {
|
|
5540
5557
|
e.stringify && (e = e.stringify);
|
|
5541
5558
|
let a = "";
|
|
5542
5559
|
return e(this, (e2) => {
|
|
@@ -5549,16 +5566,16 @@ let ba = class {
|
|
|
5549
5566
|
return e.warn(a, m2);
|
|
5550
5567
|
}
|
|
5551
5568
|
};
|
|
5552
|
-
var
|
|
5553
|
-
|
|
5554
|
-
let
|
|
5569
|
+
var xa = ka;
|
|
5570
|
+
ka.default = ka;
|
|
5571
|
+
let Ma = xa, Ia = class extends Ma {
|
|
5555
5572
|
constructor(e) {
|
|
5556
5573
|
super(e), this.type = "comment";
|
|
5557
5574
|
}
|
|
5558
5575
|
};
|
|
5559
|
-
var
|
|
5560
|
-
|
|
5561
|
-
let
|
|
5576
|
+
var _a = Ia;
|
|
5577
|
+
Ia.default = Ia;
|
|
5578
|
+
let Oa = xa, Ea = class extends Oa {
|
|
5562
5579
|
get variable() {
|
|
5563
5580
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5564
5581
|
}
|
|
@@ -5566,16 +5583,16 @@ let Ma = va, Ia = class extends Ma {
|
|
|
5566
5583
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5567
5584
|
}
|
|
5568
5585
|
};
|
|
5569
|
-
var
|
|
5570
|
-
|
|
5571
|
-
let
|
|
5586
|
+
var La = Ea;
|
|
5587
|
+
Ea.default = Ea;
|
|
5588
|
+
let Ra, Aa, Ta, Na, Pa = _a, Da = La, Fa = xa, { isClean: Ua, my: Ba } = ya;
|
|
5572
5589
|
function Wo(e) {
|
|
5573
5590
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5574
5591
|
}
|
|
5575
5592
|
function zo(e) {
|
|
5576
|
-
if (e[
|
|
5593
|
+
if (e[Ua] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5577
5594
|
}
|
|
5578
|
-
let
|
|
5595
|
+
let $a = class Bo extends Fa {
|
|
5579
5596
|
get first() {
|
|
5580
5597
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5581
5598
|
}
|
|
@@ -5627,7 +5644,7 @@ let Fa = class Bo extends Na {
|
|
|
5627
5644
|
return this.markDirty(), this;
|
|
5628
5645
|
}
|
|
5629
5646
|
normalize(e, a) {
|
|
5630
|
-
if ("string" == typeof e) e = Wo(
|
|
5647
|
+
if ("string" == typeof e) e = Wo(Aa(e).nodes);
|
|
5631
5648
|
else if (typeof e > "u") e = [];
|
|
5632
5649
|
else if (Array.isArray(e)) {
|
|
5633
5650
|
e = e.slice(0);
|
|
@@ -5638,14 +5655,14 @@ let Fa = class Bo extends Na {
|
|
|
5638
5655
|
} else if (e.type) e = [e];
|
|
5639
5656
|
else if (e.prop) {
|
|
5640
5657
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5641
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5642
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5643
|
-
else if (e.name) e = [new
|
|
5658
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Da(e)];
|
|
5659
|
+
} else if (e.selector || e.selectors) e = [new Na(e)];
|
|
5660
|
+
else if (e.name) e = [new Ra(e)];
|
|
5644
5661
|
else {
|
|
5645
5662
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5646
|
-
e = [new
|
|
5663
|
+
e = [new Pa(e)];
|
|
5647
5664
|
}
|
|
5648
|
-
return e.map((e2) => (e2[
|
|
5665
|
+
return e.map((e2) => (e2[Ba] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Ua] && zo(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
5649
5666
|
}
|
|
5650
5667
|
prepend(...e) {
|
|
5651
5668
|
e = e.reverse();
|
|
@@ -5721,22 +5738,22 @@ let Fa = class Bo extends Na {
|
|
|
5721
5738
|
}));
|
|
5722
5739
|
}
|
|
5723
5740
|
};
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
},
|
|
5741
|
+
$a.registerParse = (e) => {
|
|
5742
|
+
Aa = e;
|
|
5743
|
+
}, $a.registerRule = (e) => {
|
|
5744
|
+
Na = e;
|
|
5745
|
+
}, $a.registerAtRule = (e) => {
|
|
5727
5746
|
Ra = e;
|
|
5728
|
-
},
|
|
5729
|
-
|
|
5730
|
-
}, Fa.registerRoot = (e) => {
|
|
5731
|
-
La = e;
|
|
5747
|
+
}, $a.registerRoot = (e) => {
|
|
5748
|
+
Ta = e;
|
|
5732
5749
|
};
|
|
5733
|
-
var
|
|
5734
|
-
|
|
5735
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5736
|
-
|
|
5750
|
+
var Wa = $a;
|
|
5751
|
+
$a.default = $a, $a.rebuild = (e) => {
|
|
5752
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, Ra.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Na.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Da.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Pa.prototype) : "root" === e.type && Object.setPrototypeOf(e, Ta.prototype), e[Ba] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5753
|
+
$a.rebuild(e2);
|
|
5737
5754
|
});
|
|
5738
5755
|
};
|
|
5739
|
-
let
|
|
5756
|
+
let za = Wa, ja = class extends za {
|
|
5740
5757
|
constructor(e) {
|
|
5741
5758
|
super(e), this.type = "atrule";
|
|
5742
5759
|
}
|
|
@@ -5747,38 +5764,38 @@ let Ba = Ua, $a = class extends Ba {
|
|
|
5747
5764
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5748
5765
|
}
|
|
5749
5766
|
};
|
|
5750
|
-
var
|
|
5751
|
-
|
|
5752
|
-
let
|
|
5767
|
+
var Ga = ja;
|
|
5768
|
+
ja.default = ja, za.registerAtRule(ja);
|
|
5769
|
+
let Va, qa, Za = Wa, Ka = class extends Za {
|
|
5753
5770
|
constructor(e) {
|
|
5754
5771
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5755
5772
|
}
|
|
5756
5773
|
toResult(e = {}) {
|
|
5757
|
-
return new
|
|
5774
|
+
return new Va(new qa(), this, e).stringify();
|
|
5758
5775
|
}
|
|
5759
5776
|
};
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
},
|
|
5763
|
-
|
|
5777
|
+
Ka.registerLazyResult = (e) => {
|
|
5778
|
+
Va = e;
|
|
5779
|
+
}, Ka.registerProcessor = (e) => {
|
|
5780
|
+
qa = e;
|
|
5764
5781
|
};
|
|
5765
|
-
var
|
|
5766
|
-
|
|
5767
|
-
var
|
|
5782
|
+
var Ja = Ka;
|
|
5783
|
+
Ka.default = Ka;
|
|
5784
|
+
var Ya = { nanoid: (e = 21) => {
|
|
5768
5785
|
let a = "", u = 0 | e;
|
|
5769
5786
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5770
5787
|
return a;
|
|
5771
5788
|
} };
|
|
5772
|
-
let { existsSync:
|
|
5773
|
-
let
|
|
5789
|
+
let { existsSync: Qa, readFileSync: el } = ia, { dirname: tl, join: nl } = ia, { SourceMapConsumer: rl, SourceMapGenerator: ol } = ia;
|
|
5790
|
+
let sl = class {
|
|
5774
5791
|
constructor(e, a) {
|
|
5775
5792
|
if (false === a.map) return;
|
|
5776
5793
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5777
5794
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5778
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5795
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = tl(this.mapFile)), m2 && (this.text = m2);
|
|
5779
5796
|
}
|
|
5780
5797
|
consumer() {
|
|
5781
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5798
|
+
return this.consumerCache || (this.consumerCache = new rl(this.text)), this.consumerCache;
|
|
5782
5799
|
}
|
|
5783
5800
|
decodeInline(e) {
|
|
5784
5801
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5803,15 +5820,15 @@ let nl = class {
|
|
|
5803
5820
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5804
5821
|
}
|
|
5805
5822
|
loadFile(e) {
|
|
5806
|
-
if (this.root =
|
|
5823
|
+
if (this.root = tl(e), Qa(e)) return this.mapFile = e, el(e, "utf-8").toString().trim();
|
|
5807
5824
|
}
|
|
5808
5825
|
loadMap(e, a) {
|
|
5809
5826
|
if (false === a) return false;
|
|
5810
5827
|
if (a) {
|
|
5811
5828
|
if ("string" == typeof a) return a;
|
|
5812
5829
|
if ("function" != typeof a) {
|
|
5813
|
-
if (a instanceof
|
|
5814
|
-
if (a instanceof
|
|
5830
|
+
if (a instanceof rl) return ol.fromSourceMap(a).toString();
|
|
5831
|
+
if (a instanceof ol) return a.toString();
|
|
5815
5832
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5816
5833
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5817
5834
|
}
|
|
@@ -5827,7 +5844,7 @@ let nl = class {
|
|
|
5827
5844
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5828
5845
|
if (this.annotation) {
|
|
5829
5846
|
let a2 = this.annotation;
|
|
5830
|
-
return e && (a2 =
|
|
5847
|
+
return e && (a2 = nl(tl(e), a2)), this.loadFile(a2);
|
|
5831
5848
|
}
|
|
5832
5849
|
}
|
|
5833
5850
|
}
|
|
@@ -5838,23 +5855,23 @@ let nl = class {
|
|
|
5838
5855
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5839
5856
|
}
|
|
5840
5857
|
};
|
|
5841
|
-
var
|
|
5842
|
-
|
|
5843
|
-
let { nanoid:
|
|
5858
|
+
var il = sl;
|
|
5859
|
+
sl.default = sl;
|
|
5860
|
+
let { nanoid: al } = Ya, { isAbsolute: ll, resolve: cl } = ia, { SourceMapConsumer: ul, SourceMapGenerator: pl } = ia, { fileURLToPath: dl, pathToFileURL: hl } = ia, fl = ua, ml = il, gl = ia, yl = Symbol("fromOffsetCache"), wl = !(!ul || !pl), Sl = !(!cl || !ll), bl = class {
|
|
5844
5861
|
get from() {
|
|
5845
5862
|
return this.file || this.id;
|
|
5846
5863
|
}
|
|
5847
5864
|
constructor(e, a = {}) {
|
|
5848
5865
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5849
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
5850
|
-
let e2 = new
|
|
5866
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!Sl || /^\w+:\/\//.test(a.from) || ll(a.from) ? this.file = a.from : this.file = cl(a.from)), Sl && wl) {
|
|
5867
|
+
let e2 = new ml(this.css, a);
|
|
5851
5868
|
if (e2.text) {
|
|
5852
5869
|
this.map = e2;
|
|
5853
5870
|
let a2 = e2.consumer().file;
|
|
5854
5871
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5855
5872
|
}
|
|
5856
5873
|
}
|
|
5857
|
-
this.file || (this.id = "<input css " +
|
|
5874
|
+
this.file || (this.id = "<input css " + al(6) + ">"), this.map && (this.map.file = this.from);
|
|
5858
5875
|
}
|
|
5859
5876
|
error(e, a, u, m2 = {}) {
|
|
5860
5877
|
let w2, b2, C2;
|
|
@@ -5873,17 +5890,17 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5873
5890
|
a = e2.line, u = e2.col;
|
|
5874
5891
|
}
|
|
5875
5892
|
let x2 = this.origin(a, u, b2, w2);
|
|
5876
|
-
return C2 = x2 ? new
|
|
5893
|
+
return C2 = x2 ? new fl(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new fl(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (hl && (C2.input.url = hl(this.file).toString()), C2.input.file = this.file), C2;
|
|
5877
5894
|
}
|
|
5878
5895
|
fromOffset(e) {
|
|
5879
5896
|
let a, u;
|
|
5880
|
-
if (this[
|
|
5897
|
+
if (this[yl]) u = this[yl];
|
|
5881
5898
|
else {
|
|
5882
5899
|
let e2 = this.css.split("\n");
|
|
5883
5900
|
u = new Array(e2.length);
|
|
5884
5901
|
let a2 = 0;
|
|
5885
5902
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5886
|
-
this[
|
|
5903
|
+
this[yl] = u;
|
|
5887
5904
|
}
|
|
5888
5905
|
a = u[u.length - 1];
|
|
5889
5906
|
let m2 = 0;
|
|
@@ -5902,17 +5919,17 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5902
5919
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5903
5920
|
}
|
|
5904
5921
|
mapResolve(e) {
|
|
5905
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5922
|
+
return /^\w+:\/\//.test(e) ? e : cl(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5906
5923
|
}
|
|
5907
5924
|
origin(e, a, u, m2) {
|
|
5908
5925
|
if (!this.map) return false;
|
|
5909
5926
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5910
5927
|
if (!x2.source) return false;
|
|
5911
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5928
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = ll(x2.source) ? hl(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || hl(this.map.mapFile));
|
|
5912
5929
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5913
5930
|
if ("file:" === b2.protocol) {
|
|
5914
|
-
if (!
|
|
5915
|
-
I2.file =
|
|
5931
|
+
if (!dl) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5932
|
+
I2.file = dl(b2);
|
|
5916
5933
|
}
|
|
5917
5934
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5918
5935
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5923,9 +5940,9 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5923
5940
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5924
5941
|
}
|
|
5925
5942
|
};
|
|
5926
|
-
var
|
|
5927
|
-
|
|
5928
|
-
let
|
|
5943
|
+
var vl = bl;
|
|
5944
|
+
bl.default = bl, gl && gl.registerInput && gl.registerInput(bl);
|
|
5945
|
+
let Cl, kl, xl = Wa, Ml = class extends xl {
|
|
5929
5946
|
constructor(e) {
|
|
5930
5947
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5931
5948
|
}
|
|
@@ -5942,29 +5959,29 @@ let Sl, bl, vl = Ua, Cl = class extends vl {
|
|
|
5942
5959
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5943
5960
|
}
|
|
5944
5961
|
toResult(e = {}) {
|
|
5945
|
-
return new
|
|
5962
|
+
return new Cl(new kl(), this, e).stringify();
|
|
5946
5963
|
}
|
|
5947
5964
|
};
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
},
|
|
5951
|
-
|
|
5965
|
+
Ml.registerLazyResult = (e) => {
|
|
5966
|
+
Cl = e;
|
|
5967
|
+
}, Ml.registerProcessor = (e) => {
|
|
5968
|
+
kl = e;
|
|
5952
5969
|
};
|
|
5953
|
-
var
|
|
5954
|
-
|
|
5955
|
-
let
|
|
5970
|
+
var Il = Ml;
|
|
5971
|
+
Ml.default = Ml, xl.registerRoot(Ml);
|
|
5972
|
+
let Ol = { comma: (e) => Ol.split(e, [","], true), space(e) {
|
|
5956
5973
|
let a = [" ", "\n", " "];
|
|
5957
|
-
return
|
|
5974
|
+
return Ol.split(e, a);
|
|
5958
5975
|
}, split(e, a, u) {
|
|
5959
5976
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5960
5977
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
5961
5978
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5962
5979
|
} };
|
|
5963
|
-
var
|
|
5964
|
-
|
|
5965
|
-
let
|
|
5980
|
+
var El = Ol;
|
|
5981
|
+
Ol.default = Ol;
|
|
5982
|
+
let Ll = Wa, Rl = El, Al = class extends Ll {
|
|
5966
5983
|
get selectors() {
|
|
5967
|
-
return
|
|
5984
|
+
return Rl.comma(this.selector);
|
|
5968
5985
|
}
|
|
5969
5986
|
set selectors(e) {
|
|
5970
5987
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5974,34 +5991,34 @@ let Il = Ua, Ol = Ml, El = class extends Il {
|
|
|
5974
5991
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5975
5992
|
}
|
|
5976
5993
|
};
|
|
5977
|
-
var
|
|
5978
|
-
|
|
5979
|
-
let
|
|
5994
|
+
var Tl = Al;
|
|
5995
|
+
Al.default = Al, Ll.registerRule(Al);
|
|
5996
|
+
let Nl = Ga, Pl = _a, Dl = La, Jl = vl, ec = il, tc = Il, nc = Tl;
|
|
5980
5997
|
function Ke(e, a) {
|
|
5981
5998
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
5982
5999
|
let { inputs: u, ...m2 } = e;
|
|
5983
6000
|
if (u) {
|
|
5984
6001
|
a = [];
|
|
5985
6002
|
for (let e2 of u) {
|
|
5986
|
-
let u2 = { ...e2, __proto__:
|
|
5987
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
6003
|
+
let u2 = { ...e2, __proto__: Jl.prototype };
|
|
6004
|
+
u2.map && (u2.map = { ...u2.map, __proto__: ec.prototype }), a.push(u2);
|
|
5988
6005
|
}
|
|
5989
6006
|
}
|
|
5990
6007
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
5991
6008
|
let { inputId: e2, ...u2 } = m2.source;
|
|
5992
6009
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
5993
6010
|
}
|
|
5994
|
-
if ("root" === m2.type) return new
|
|
5995
|
-
if ("decl" === m2.type) return new
|
|
5996
|
-
if ("rule" === m2.type) return new
|
|
5997
|
-
if ("comment" === m2.type) return new
|
|
5998
|
-
if ("atrule" === m2.type) return new
|
|
6011
|
+
if ("root" === m2.type) return new tc(m2);
|
|
6012
|
+
if ("decl" === m2.type) return new Dl(m2);
|
|
6013
|
+
if ("rule" === m2.type) return new nc(m2);
|
|
6014
|
+
if ("comment" === m2.type) return new Pl(m2);
|
|
6015
|
+
if ("atrule" === m2.type) return new Nl(m2);
|
|
5999
6016
|
throw new Error("Unknown node type: " + e.type);
|
|
6000
6017
|
}
|
|
6001
|
-
var
|
|
6018
|
+
var rc = Ke;
|
|
6002
6019
|
Ke.default = Ke;
|
|
6003
|
-
let { dirname:
|
|
6004
|
-
var
|
|
6020
|
+
let { dirname: oc, relative: sc, resolve: ic, sep: ac } = ia, { SourceMapConsumer: lc, SourceMapGenerator: cc } = ia, { pathToFileURL: uc } = ia, pc = vl, dc = !(!lc || !cc), hc = !!(oc && ic && sc && ac);
|
|
6021
|
+
var fc = class {
|
|
6005
6022
|
constructor(e, a, u, m2) {
|
|
6006
6023
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
6007
6024
|
}
|
|
@@ -6013,8 +6030,8 @@ var pc = class {
|
|
|
6013
6030
|
}
|
|
6014
6031
|
applyPrevMaps() {
|
|
6015
6032
|
for (let e of this.previous()) {
|
|
6016
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
6017
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6033
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || oc(e.file);
|
|
6034
|
+
false === this.mapOpts.sourcesContent ? (a = new lc(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
6018
6035
|
}
|
|
6019
6036
|
}
|
|
6020
6037
|
clearAnnotation() {
|
|
@@ -6024,7 +6041,7 @@ var pc = class {
|
|
|
6024
6041
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
6025
6042
|
}
|
|
6026
6043
|
generate() {
|
|
6027
|
-
if (this.clearAnnotation(),
|
|
6044
|
+
if (this.clearAnnotation(), hc && dc && this.isMap()) return this.generateMap();
|
|
6028
6045
|
{
|
|
6029
6046
|
let e = "";
|
|
6030
6047
|
return this.stringify(this.root, (a) => {
|
|
@@ -6036,12 +6053,12 @@ var pc = class {
|
|
|
6036
6053
|
if (this.root) this.generateString();
|
|
6037
6054
|
else if (1 === this.previous().length) {
|
|
6038
6055
|
let e = this.previous()[0].consumer();
|
|
6039
|
-
e.file = this.outputFile(), this.map =
|
|
6040
|
-
} else this.map = new
|
|
6056
|
+
e.file = this.outputFile(), this.map = cc.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6057
|
+
} else this.map = new cc({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
6041
6058
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
6042
6059
|
}
|
|
6043
6060
|
generateString() {
|
|
6044
|
-
this.css = "", this.map = new
|
|
6061
|
+
this.css = "", this.map = new cc({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6045
6062
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6046
6063
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6047
6064
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -6071,9 +6088,9 @@ var pc = class {
|
|
|
6071
6088
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6072
6089
|
let a = this.memoizedPaths.get(e);
|
|
6073
6090
|
if (a) return a;
|
|
6074
|
-
let u = this.opts.to ?
|
|
6075
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
6076
|
-
let m2 =
|
|
6091
|
+
let u = this.opts.to ? oc(this.opts.to) : ".";
|
|
6092
|
+
"string" == typeof this.mapOpts.annotation && (u = oc(ic(u, this.mapOpts.annotation)));
|
|
6093
|
+
let m2 = sc(u, e);
|
|
6077
6094
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6078
6095
|
}
|
|
6079
6096
|
previous() {
|
|
@@ -6084,7 +6101,7 @@ var pc = class {
|
|
|
6084
6101
|
}
|
|
6085
6102
|
});
|
|
6086
6103
|
else {
|
|
6087
|
-
let e = new
|
|
6104
|
+
let e = new pc(this.originalCSS, this.opts);
|
|
6088
6105
|
e.map && this.previousMaps.push(e.map);
|
|
6089
6106
|
}
|
|
6090
6107
|
return this.previousMaps;
|
|
@@ -6115,8 +6132,8 @@ var pc = class {
|
|
|
6115
6132
|
toFileUrl(e) {
|
|
6116
6133
|
let a = this.memoizedFileURLs.get(e);
|
|
6117
6134
|
if (a) return a;
|
|
6118
|
-
if (
|
|
6119
|
-
let a2 =
|
|
6135
|
+
if (uc) {
|
|
6136
|
+
let a2 = uc(e).toString();
|
|
6120
6137
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6121
6138
|
}
|
|
6122
6139
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6124,13 +6141,13 @@ var pc = class {
|
|
|
6124
6141
|
toUrl(e) {
|
|
6125
6142
|
let a = this.memoizedURLs.get(e);
|
|
6126
6143
|
if (a) return a;
|
|
6127
|
-
"\\" ===
|
|
6144
|
+
"\\" === ac && (e = e.replace(/\\/g, "/"));
|
|
6128
6145
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6129
6146
|
return this.memoizedURLs.set(e, u), u;
|
|
6130
6147
|
}
|
|
6131
6148
|
};
|
|
6132
|
-
const
|
|
6133
|
-
let
|
|
6149
|
+
const mc = /[\t\n\f\r "#'()/;[\\\]{}]/g, gc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, yc = /.[\r\n"'(/\\]/, wc = /[\da-f]/i;
|
|
6150
|
+
let Sc = Ga, bc = _a, vc = La, xc = Il, Mc = Tl, kc = function(e, a = {}) {
|
|
6134
6151
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
6135
6152
|
function y2(a2) {
|
|
6136
6153
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6180,7 +6197,7 @@ let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
|
6180
6197
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6181
6198
|
} while (I2);
|
|
6182
6199
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6183
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6200
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || yc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6184
6201
|
break;
|
|
6185
6202
|
case 39:
|
|
6186
6203
|
case 34:
|
|
@@ -6198,31 +6215,31 @@ let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
|
6198
6215
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6199
6216
|
break;
|
|
6200
6217
|
case 64:
|
|
6201
|
-
|
|
6218
|
+
mc.lastIndex = B2 + 1, mc.test(D2), b2 = 0 === mc.lastIndex ? D2.length - 1 : mc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6202
6219
|
break;
|
|
6203
6220
|
case 92:
|
|
6204
6221
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6205
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6206
|
-
for (;
|
|
6222
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, wc.test(D2.charAt(b2)))) {
|
|
6223
|
+
for (; wc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6207
6224
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6208
6225
|
}
|
|
6209
6226
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6210
6227
|
break;
|
|
6211
6228
|
default:
|
|
6212
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
6229
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (gc.lastIndex = B2 + 1, gc.test(D2), b2 = 0 === gc.lastIndex ? D2.length - 1 : gc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6213
6230
|
}
|
|
6214
6231
|
return B2++, x2;
|
|
6215
6232
|
}, position: function S() {
|
|
6216
6233
|
return B2;
|
|
6217
6234
|
} };
|
|
6218
6235
|
};
|
|
6219
|
-
const
|
|
6220
|
-
var
|
|
6236
|
+
const Ic = { empty: true, space: true };
|
|
6237
|
+
var _c = class {
|
|
6221
6238
|
constructor(e) {
|
|
6222
|
-
this.input = e, this.root = new
|
|
6239
|
+
this.input = e, this.root = new xc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6223
6240
|
}
|
|
6224
6241
|
atrule(e) {
|
|
6225
|
-
let a = new
|
|
6242
|
+
let a = new Sc();
|
|
6226
6243
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6227
6244
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6228
6245
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6274,7 +6291,7 @@ var xc = class {
|
|
|
6274
6291
|
return false;
|
|
6275
6292
|
}
|
|
6276
6293
|
comment(e) {
|
|
6277
|
-
let a = new
|
|
6294
|
+
let a = new bc();
|
|
6278
6295
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6279
6296
|
let u = e[1].slice(2, -2);
|
|
6280
6297
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6287,7 +6304,7 @@ var xc = class {
|
|
|
6287
6304
|
this.tokenizer = kc(this.input);
|
|
6288
6305
|
}
|
|
6289
6306
|
decl(e, a) {
|
|
6290
|
-
let u = new
|
|
6307
|
+
let u = new vc();
|
|
6291
6308
|
this.init(u, e[0][2]);
|
|
6292
6309
|
let m2, w2 = e[e.length - 1];
|
|
6293
6310
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6336,7 +6353,7 @@ var xc = class {
|
|
|
6336
6353
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6337
6354
|
}
|
|
6338
6355
|
emptyRule(e) {
|
|
6339
|
-
let a = new
|
|
6356
|
+
let a = new Mc();
|
|
6340
6357
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6341
6358
|
}
|
|
6342
6359
|
end(e) {
|
|
@@ -6412,7 +6429,7 @@ var xc = class {
|
|
|
6412
6429
|
}
|
|
6413
6430
|
raw(e, a, u, m2) {
|
|
6414
6431
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6415
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
6432
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Ic[x2] || Ic[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6416
6433
|
if (!O2) {
|
|
6417
6434
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6418
6435
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6421,7 +6438,7 @@ var xc = class {
|
|
|
6421
6438
|
}
|
|
6422
6439
|
rule(e) {
|
|
6423
6440
|
e.pop();
|
|
6424
|
-
let a = new
|
|
6441
|
+
let a = new Mc();
|
|
6425
6442
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6426
6443
|
}
|
|
6427
6444
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6461,9 +6478,9 @@ var xc = class {
|
|
|
6461
6478
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6462
6479
|
}
|
|
6463
6480
|
};
|
|
6464
|
-
let
|
|
6481
|
+
let Oc = Wa, Ec = vl, Lc = _c;
|
|
6465
6482
|
function Gt(e, a) {
|
|
6466
|
-
let u = new
|
|
6483
|
+
let u = new Ec(e, a), m2 = new Lc(u);
|
|
6467
6484
|
try {
|
|
6468
6485
|
m2.parse();
|
|
6469
6486
|
} catch (e2) {
|
|
@@ -6471,9 +6488,9 @@ function Gt(e, a) {
|
|
|
6471
6488
|
}
|
|
6472
6489
|
return m2.root;
|
|
6473
6490
|
}
|
|
6474
|
-
var
|
|
6475
|
-
Gt.default = Gt,
|
|
6476
|
-
let
|
|
6491
|
+
var Rc = Gt;
|
|
6492
|
+
Gt.default = Gt, Oc.registerParse(Gt);
|
|
6493
|
+
let Ac = class {
|
|
6477
6494
|
constructor(e, a = {}) {
|
|
6478
6495
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6479
6496
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6485,9 +6502,9 @@ let Ec = class {
|
|
|
6485
6502
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
6486
6503
|
}
|
|
6487
6504
|
};
|
|
6488
|
-
var
|
|
6489
|
-
|
|
6490
|
-
let
|
|
6505
|
+
var Tc = Ac;
|
|
6506
|
+
Ac.default = Ac;
|
|
6507
|
+
let Nc = Tc, Pc = class {
|
|
6491
6508
|
get content() {
|
|
6492
6509
|
return this.css;
|
|
6493
6510
|
}
|
|
@@ -6499,26 +6516,26 @@ let Rc = Lc, Ac = class {
|
|
|
6499
6516
|
}
|
|
6500
6517
|
warn(e, a = {}) {
|
|
6501
6518
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6502
|
-
let u = new
|
|
6519
|
+
let u = new Nc(e, a);
|
|
6503
6520
|
return this.messages.push(u), u;
|
|
6504
6521
|
}
|
|
6505
6522
|
warnings() {
|
|
6506
6523
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6507
6524
|
}
|
|
6508
6525
|
};
|
|
6509
|
-
var
|
|
6510
|
-
|
|
6511
|
-
let
|
|
6526
|
+
var Dc = Pc;
|
|
6527
|
+
Pc.default = Pc;
|
|
6528
|
+
let Fc = {};
|
|
6512
6529
|
var ni = function(e) {
|
|
6513
|
-
|
|
6530
|
+
Fc[e] || (Fc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6514
6531
|
};
|
|
6515
|
-
let
|
|
6516
|
-
const
|
|
6532
|
+
let Uc = Wa, Bc = Ja, $c = fc, Wc = Rc, zc = Dc, jc = Il, Gc = ga, { isClean: Vc, my: qc } = ya, Hc = ni;
|
|
6533
|
+
const Zc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Kc = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Jc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6517
6534
|
function _e(e) {
|
|
6518
6535
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6519
6536
|
}
|
|
6520
6537
|
function ri(e) {
|
|
6521
|
-
let a = false, u =
|
|
6538
|
+
let a = false, u = Zc[e.type];
|
|
6522
6539
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
6523
6540
|
}
|
|
6524
6541
|
function br(e) {
|
|
@@ -6526,9 +6543,9 @@ function br(e) {
|
|
|
6526
6543
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : ri(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
6527
6544
|
}
|
|
6528
6545
|
function Js(e) {
|
|
6529
|
-
return e[
|
|
6546
|
+
return e[Vc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6530
6547
|
}
|
|
6531
|
-
let
|
|
6548
|
+
let Yc = {}, Xc = class oi {
|
|
6532
6549
|
get content() {
|
|
6533
6550
|
return this.stringify().content;
|
|
6534
6551
|
}
|
|
@@ -6555,19 +6572,19 @@ let Zc = {}, Kc = class oi {
|
|
|
6555
6572
|
}
|
|
6556
6573
|
constructor(e, a, u) {
|
|
6557
6574
|
let m2;
|
|
6558
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6575
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof zc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6559
6576
|
else {
|
|
6560
|
-
let e2 =
|
|
6577
|
+
let e2 = Wc;
|
|
6561
6578
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6562
6579
|
try {
|
|
6563
6580
|
m2 = e2(a, u);
|
|
6564
6581
|
} catch (e3) {
|
|
6565
6582
|
this.processed = true, this.error = e3;
|
|
6566
6583
|
}
|
|
6567
|
-
m2 && !m2[
|
|
6584
|
+
m2 && !m2[qc] && Uc.rebuild(m2);
|
|
6568
6585
|
}
|
|
6569
6586
|
else m2 = Js(a);
|
|
6570
|
-
this.result = new
|
|
6587
|
+
this.result = new zc(e, m2, u), this.helpers = { ...Yc, postcss: Yc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6571
6588
|
}
|
|
6572
6589
|
async() {
|
|
6573
6590
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6601,8 +6618,8 @@ let Zc = {}, Kc = class oi {
|
|
|
6601
6618
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6602
6619
|
};
|
|
6603
6620
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6604
|
-
if (!
|
|
6605
|
-
if (!
|
|
6621
|
+
if (!Kc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6622
|
+
if (!Jc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6606
6623
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6607
6624
|
}
|
|
6608
6625
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6619,8 +6636,8 @@ let Zc = {}, Kc = class oi {
|
|
|
6619
6636
|
}
|
|
6620
6637
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6621
6638
|
let e = this.result.root;
|
|
6622
|
-
for (; !e[
|
|
6623
|
-
e[
|
|
6639
|
+
for (; !e[Vc]; ) {
|
|
6640
|
+
e[Vc] = true;
|
|
6624
6641
|
let a = [br(e)];
|
|
6625
6642
|
for (; a.length > 0; ) {
|
|
6626
6643
|
let e2 = this.visitTick(a);
|
|
@@ -6665,9 +6682,9 @@ let Zc = {}, Kc = class oi {
|
|
|
6665
6682
|
if (this.error) throw this.error;
|
|
6666
6683
|
if (this.stringified) return this.result;
|
|
6667
6684
|
this.stringified = true, this.sync();
|
|
6668
|
-
let e = this.result.opts, a =
|
|
6685
|
+
let e = this.result.opts, a = Gc;
|
|
6669
6686
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6670
|
-
let u = new
|
|
6687
|
+
let u = new $c(a, this.result.root, this.result.opts).generate();
|
|
6671
6688
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6672
6689
|
}
|
|
6673
6690
|
sync() {
|
|
@@ -6679,14 +6696,14 @@ let Zc = {}, Kc = class oi {
|
|
|
6679
6696
|
}
|
|
6680
6697
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6681
6698
|
let e = this.result.root;
|
|
6682
|
-
for (; !e[
|
|
6699
|
+
for (; !e[Vc]; ) e[Vc] = true, this.walkSync(e);
|
|
6683
6700
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6684
6701
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6685
6702
|
}
|
|
6686
6703
|
return this.result;
|
|
6687
6704
|
}
|
|
6688
6705
|
then(e, a) {
|
|
6689
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6706
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Hc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
6690
6707
|
}
|
|
6691
6708
|
toString() {
|
|
6692
6709
|
return this.css;
|
|
@@ -6718,22 +6735,22 @@ let Zc = {}, Kc = class oi {
|
|
|
6718
6735
|
}
|
|
6719
6736
|
if (0 !== a.iterator) {
|
|
6720
6737
|
let m3, w3 = a.iterator;
|
|
6721
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6738
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[Vc]) return m3[Vc] = true, void e.push(br(m3));
|
|
6722
6739
|
a.iterator = 0, delete u.indexes[w3];
|
|
6723
6740
|
}
|
|
6724
6741
|
let w2 = a.events;
|
|
6725
6742
|
for (; a.eventIndex < w2.length; ) {
|
|
6726
6743
|
let e2 = w2[a.eventIndex];
|
|
6727
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6744
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[Vc] = true, a.iterator = u.getIterator()));
|
|
6728
6745
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6729
6746
|
}
|
|
6730
6747
|
e.pop();
|
|
6731
6748
|
}
|
|
6732
6749
|
walkSync(e) {
|
|
6733
|
-
e[
|
|
6750
|
+
e[Vc] = true;
|
|
6734
6751
|
let a = ri(e);
|
|
6735
6752
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6736
|
-
e2[
|
|
6753
|
+
e2[Vc] || this.walkSync(e2);
|
|
6737
6754
|
});
|
|
6738
6755
|
else {
|
|
6739
6756
|
let a2 = this.listeners[u];
|
|
@@ -6744,14 +6761,14 @@ let Zc = {}, Kc = class oi {
|
|
|
6744
6761
|
return this.sync().warnings();
|
|
6745
6762
|
}
|
|
6746
6763
|
};
|
|
6747
|
-
|
|
6748
|
-
|
|
6764
|
+
Xc.registerPostcss = (e) => {
|
|
6765
|
+
Yc = e;
|
|
6749
6766
|
};
|
|
6750
|
-
var
|
|
6751
|
-
|
|
6752
|
-
let
|
|
6753
|
-
const
|
|
6754
|
-
let
|
|
6767
|
+
var Qc = Xc;
|
|
6768
|
+
Xc.default = Xc, jc.registerLazyResult(Xc), Bc.registerLazyResult(Xc);
|
|
6769
|
+
let lu = fc, cu = Rc;
|
|
6770
|
+
const hu = Dc;
|
|
6771
|
+
let Cu = ga, ku = ni, xu = class {
|
|
6755
6772
|
get content() {
|
|
6756
6773
|
return this.result.css;
|
|
6757
6774
|
}
|
|
@@ -6772,7 +6789,7 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6772
6789
|
}
|
|
6773
6790
|
get root() {
|
|
6774
6791
|
if (this._root) return this._root;
|
|
6775
|
-
let e, a =
|
|
6792
|
+
let e, a = cu;
|
|
6776
6793
|
try {
|
|
6777
6794
|
e = a(this._css, this._opts);
|
|
6778
6795
|
} catch (e2) {
|
|
@@ -6786,11 +6803,11 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6786
6803
|
}
|
|
6787
6804
|
constructor(e, a, u) {
|
|
6788
6805
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6789
|
-
let m2, w2 =
|
|
6790
|
-
this.result = new
|
|
6806
|
+
let m2, w2 = Cu;
|
|
6807
|
+
this.result = new hu(this._processor, m2, this._opts), this.result.css = a;
|
|
6791
6808
|
let b2 = this;
|
|
6792
6809
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6793
|
-
let C2 = new
|
|
6810
|
+
let C2 = new lu(w2, m2, this._opts, a);
|
|
6794
6811
|
if (C2.isMap()) {
|
|
6795
6812
|
let [e2, a2] = C2.generate();
|
|
6796
6813
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6810,7 +6827,7 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6810
6827
|
return this.result;
|
|
6811
6828
|
}
|
|
6812
6829
|
then(e, a) {
|
|
6813
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6830
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || ku("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
6814
6831
|
}
|
|
6815
6832
|
toString() {
|
|
6816
6833
|
return this._css;
|
|
@@ -6819,9 +6836,9 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6819
6836
|
return [];
|
|
6820
6837
|
}
|
|
6821
6838
|
};
|
|
6822
|
-
var
|
|
6823
|
-
|
|
6824
|
-
let
|
|
6839
|
+
var Mu = xu;
|
|
6840
|
+
xu.default = xu;
|
|
6841
|
+
let _u = Ja, Ou = Qc, Eu = Mu, Lu = Il, Ru = class {
|
|
6825
6842
|
constructor(e = []) {
|
|
6826
6843
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6827
6844
|
}
|
|
@@ -6837,39 +6854,39 @@ let ku = qa, xu = Jc, Mu = Cu, _u = kl, Ou = class {
|
|
|
6837
6854
|
return a;
|
|
6838
6855
|
}
|
|
6839
6856
|
process(e, a = {}) {
|
|
6840
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6857
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Ou(this, e, a) : new Eu(this, e, a);
|
|
6841
6858
|
}
|
|
6842
6859
|
use(e) {
|
|
6843
6860
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6844
6861
|
}
|
|
6845
6862
|
};
|
|
6846
|
-
var
|
|
6847
|
-
|
|
6848
|
-
let
|
|
6863
|
+
var Au = Ru;
|
|
6864
|
+
Ru.default = Ru, Lu.registerProcessor(Ru), _u.registerProcessor(Ru);
|
|
6865
|
+
let Tu = Ga, Nu = _a, Pu = Wa, Du = ua, Fu = La, Uu = Ja, $u = rc, Wu = vl, zu = Qc, ju = El, Gu = xa, Vu = Rc, qu = Au, Hu = Dc, Zu = Il, Ku = Tl, Ju = ga, Yu = Tc;
|
|
6849
6866
|
function T$1(...e) {
|
|
6850
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6867
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new qu(e);
|
|
6851
6868
|
}
|
|
6852
6869
|
T$1.plugin = function(e, a) {
|
|
6853
6870
|
let u, m2 = false;
|
|
6854
6871
|
function n(...u2) {
|
|
6855
6872
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
6856
6873
|
let w2 = a(...u2);
|
|
6857
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6874
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new qu().version, w2;
|
|
6858
6875
|
}
|
|
6859
6876
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6860
6877
|
return T$1([n(u2)]).process(e2, a2);
|
|
6861
6878
|
}, n;
|
|
6862
|
-
}, T$1.stringify =
|
|
6863
|
-
var
|
|
6879
|
+
}, T$1.stringify = Ju, T$1.parse = Vu, T$1.fromJSON = $u, T$1.list = ju, T$1.comment = (e) => new Nu(e), T$1.atRule = (e) => new Tu(e), T$1.decl = (e) => new Fu(e), T$1.rule = (e) => new Ku(e), T$1.root = (e) => new Zu(e), T$1.document = (e) => new Uu(e), T$1.CssSyntaxError = Du, T$1.Declaration = Fu, T$1.Container = Pu, T$1.Processor = qu, T$1.Document = Uu, T$1.Comment = Nu, T$1.Warning = Yu, T$1.AtRule = Tu, T$1.Result = Hu, T$1.Input = Wu, T$1.Rule = Ku, T$1.Root = Zu, T$1.Node = Gu, zu.registerPostcss(T$1);
|
|
6880
|
+
var Xu = T$1;
|
|
6864
6881
|
T$1.default = T$1;
|
|
6865
|
-
const
|
|
6866
|
-
var
|
|
6867
|
-
|
|
6882
|
+
const Qu = Su(Xu);
|
|
6883
|
+
var ep;
|
|
6884
|
+
Qu.stringify, Qu.fromJSON, Qu.plugin, Qu.parse, Qu.list, Qu.document, Qu.comment, Qu.atRule, Qu.rule, Qu.decl, Qu.root, Qu.CssSyntaxError, Qu.Declaration, Qu.Container, Qu.Processor, Qu.Document, Qu.Comment, Qu.Warning, Qu.AtRule, Qu.Result, Qu.Input, Qu.Rule, Qu.Root, Qu.Node, (function(e) {
|
|
6868
6885
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6869
|
-
})(
|
|
6870
|
-
const { addCustomEvent:
|
|
6871
|
-
var
|
|
6872
|
-
let
|
|
6886
|
+
})(ep || (ep = {}));
|
|
6887
|
+
const { addCustomEvent: tp } = ae, { addSailfishEvent: np } = ae, { freezePage: rp } = ae, { takeFullSnapshot: op } = ae;
|
|
6888
|
+
var sp = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? sp(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6889
|
+
let ip = class d {
|
|
6873
6890
|
constructor(e) {
|
|
6874
6891
|
y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e.fileName || "", this.functionName = e.functionName || "", this.lineNumber = e.lineNumber, this.columnNumber = e.columnNumber;
|
|
6875
6892
|
}
|
|
@@ -6878,8 +6895,8 @@ let rp = class d {
|
|
|
6878
6895
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6879
6896
|
}
|
|
6880
6897
|
};
|
|
6881
|
-
const
|
|
6882
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6898
|
+
const ap = /(^|@)\S+:\d+/, lp = /^\s*at .*(\S+:\d+|\(native\))/m, cp = /^(eval@)?(\[native code])?$/, up = { parse: function(e) {
|
|
6899
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(lp) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6883
6900
|
}, extractLocation: function(e) {
|
|
6884
6901
|
if (-1 === e.indexOf(":")) return [e];
|
|
6885
6902
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6887,23 +6904,23 @@ const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)
|
|
|
6887
6904
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6888
6905
|
}, parseV8OrIE: function(e) {
|
|
6889
6906
|
return e.stack.split("\n").filter(function(e2) {
|
|
6890
|
-
return !!e2.match(
|
|
6907
|
+
return !!e2.match(lp);
|
|
6891
6908
|
}, this).map(function(e2) {
|
|
6892
6909
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6893
6910
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6894
6911
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6895
6912
|
a = u ? a.replace(u[0], "") : a;
|
|
6896
6913
|
const m2 = a.split(/\s+/).slice(1), w2 = this.extractLocation(u ? u[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
|
|
6897
|
-
return new
|
|
6914
|
+
return new ip({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6898
6915
|
}, this);
|
|
6899
6916
|
}, parseFFOrSafari: function(e) {
|
|
6900
6917
|
return e.stack.split("\n").filter(function(e2) {
|
|
6901
|
-
return !e2.match(
|
|
6918
|
+
return !e2.match(cp);
|
|
6902
6919
|
}, this).map(function(e2) {
|
|
6903
|
-
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new
|
|
6920
|
+
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new ip({ functionName: e2 });
|
|
6904
6921
|
{
|
|
6905
6922
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6906
|
-
return new
|
|
6923
|
+
return new ip({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6907
6924
|
}
|
|
6908
6925
|
}, this);
|
|
6909
6926
|
}, parseOpera: function(e) {
|
|
@@ -6912,22 +6929,22 @@ const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)
|
|
|
6912
6929
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6913
6930
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6914
6931
|
const w3 = a.exec(u[e2]);
|
|
6915
|
-
w3 && m2.push(new
|
|
6932
|
+
w3 && m2.push(new ip({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6916
6933
|
}
|
|
6917
6934
|
return m2;
|
|
6918
6935
|
}, parseOpera10: function(e) {
|
|
6919
6936
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6920
6937
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6921
6938
|
const w3 = a.exec(u[e2]);
|
|
6922
|
-
w3 && m2.push(new
|
|
6939
|
+
w3 && m2.push(new ip({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6923
6940
|
}
|
|
6924
6941
|
return m2;
|
|
6925
6942
|
}, parseOpera11: function(e) {
|
|
6926
6943
|
return e.stack.split("\n").filter(function(e2) {
|
|
6927
|
-
return !!e2.match(
|
|
6944
|
+
return !!e2.match(ap) && !e2.match(/^Error created at/);
|
|
6928
6945
|
}, this).map(function(e2) {
|
|
6929
6946
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6930
|
-
return new
|
|
6947
|
+
return new ip({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6931
6948
|
}, this);
|
|
6932
6949
|
} };
|
|
6933
6950
|
function T(e) {
|
|
@@ -6984,9 +7001,9 @@ function g(e, a) {
|
|
|
6984
7001
|
return a2 instanceof Node ? a2 instanceof HTMLElement ? a2 ? a2.outerHTML : "" : a2.nodeName : a2 instanceof Error ? a2.stack ? a2.stack + "\nEnd of stack for Error object" : a2.name + ": " + a2.message : a2;
|
|
6985
7002
|
});
|
|
6986
7003
|
}
|
|
6987
|
-
const
|
|
7004
|
+
const pp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
6988
7005
|
function R(e, a, u) {
|
|
6989
|
-
const m2 = u ? Object.assign({},
|
|
7006
|
+
const m2 = u ? Object.assign({}, pp, u) : pp, w2 = m2.logger;
|
|
6990
7007
|
if (!w2) return () => {
|
|
6991
7008
|
};
|
|
6992
7009
|
let b2;
|
|
@@ -6995,7 +7012,7 @@ function R(e, a, u) {
|
|
|
6995
7012
|
const I2 = [];
|
|
6996
7013
|
if (m2.level.includes("error")) {
|
|
6997
7014
|
const l = (a2) => {
|
|
6998
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
7015
|
+
const u2 = a2.message, w3 = a2.error, b3 = up.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
6999
7016
|
e({ level: "error", trace: b3, payload: C3 });
|
|
7000
7017
|
};
|
|
7001
7018
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -7004,7 +7021,7 @@ function R(e, a, u) {
|
|
|
7004
7021
|
const f = (a2) => {
|
|
7005
7022
|
let u2, w3;
|
|
7006
7023
|
a2.reason instanceof Error ? (u2 = a2.reason, w3 = [g(`Uncaught (in promise) ${u2.name}: ${u2.message}`, m2.stringifyOptions)]) : (u2 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a2.reason, m2.stringifyOptions)]);
|
|
7007
|
-
const b3 =
|
|
7024
|
+
const b3 = up.parse(u2).map((e2) => e2.toString());
|
|
7008
7025
|
e({ level: "error", trace: b3, payload: w3 });
|
|
7009
7026
|
};
|
|
7010
7027
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7032,7 +7049,7 @@ function R(e, a, u) {
|
|
|
7032
7049
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
7033
7050
|
x2 = true;
|
|
7034
7051
|
try {
|
|
7035
|
-
const a4 =
|
|
7052
|
+
const a4 = up.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7036
7053
|
C2++, C2 < m2.lengthThreshold ? e({ level: u2, trace: a4, payload: b3 }) : C2 === m2.lengthThreshold && e({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
|
|
7037
7054
|
} catch (e2) {
|
|
7038
7055
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7044,7 +7061,7 @@ function R(e, a, u) {
|
|
|
7044
7061
|
};
|
|
7045
7062
|
}
|
|
7046
7063
|
}
|
|
7047
|
-
var
|
|
7064
|
+
var dp = ((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[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(dp || {});
|
|
7048
7065
|
function suppressConsoleLogsDuringCall(e) {
|
|
7049
7066
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7050
7067
|
console.log = () => {
|
|
@@ -7057,7 +7074,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7057
7074
|
console.log = a, console.warn = u, console.error = m2;
|
|
7058
7075
|
}
|
|
7059
7076
|
}
|
|
7060
|
-
const
|
|
7077
|
+
const hp = "zendesk_chat", fp = "Zendesk";
|
|
7061
7078
|
function zE_safe(...e) {
|
|
7062
7079
|
try {
|
|
7063
7080
|
if ((function hasZendesk() {
|
|
@@ -7096,7 +7113,7 @@ function initializeDomContentEvents(e) {
|
|
|
7096
7113
|
function initializeConsolePlugin(e, a) {
|
|
7097
7114
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7098
7115
|
m2((e2) => {
|
|
7099
|
-
sendEvent({ type:
|
|
7116
|
+
sendEvent({ type: dp.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7100
7117
|
}, window, e);
|
|
7101
7118
|
}
|
|
7102
7119
|
async function initializeRecording(e, a, u, m2) {
|
|
@@ -7116,11 +7133,11 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7116
7133
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7117
7134
|
});
|
|
7118
7135
|
const handleWidgetOpen = () => {
|
|
7119
|
-
ae.addSailfishEvent(
|
|
7136
|
+
ae.addSailfishEvent(dp.SailfishCustom, { action: "customer support chat opened", element_id: hp, provider: fp });
|
|
7120
7137
|
}, handleWidgetClose = () => {
|
|
7121
|
-
ae.addSailfishEvent(
|
|
7138
|
+
ae.addSailfishEvent(dp.SailfishCustom, { action: "customer support chat closed", element_id: hp, provider: fp });
|
|
7122
7139
|
}, handleUnreadMessages = (e2) => {
|
|
7123
|
-
ae.addSailfishEvent(
|
|
7140
|
+
ae.addSailfishEvent(dp.SailfishCustom, { action: "zendesk unreadmessages", element_id: hp, provider: fp });
|
|
7124
7141
|
};
|
|
7125
7142
|
suppressConsoleLogsDuringCall(() => {
|
|
7126
7143
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7131,19 +7148,19 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7131
7148
|
}
|
|
7132
7149
|
return w2;
|
|
7133
7150
|
}
|
|
7134
|
-
let
|
|
7151
|
+
let mp = null, gp = null;
|
|
7135
7152
|
function identify(e, a = {}, u = false) {
|
|
7136
7153
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7137
|
-
|
|
7154
|
+
mp && mp.userId === e && JSON.stringify(mp.traits) === JSON.stringify(a) || (mp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7138
7155
|
}
|
|
7139
7156
|
function addOrUpdateMetadata(e) {
|
|
7140
7157
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7141
|
-
|
|
7158
|
+
gp && JSON.stringify(gp) === JSON.stringify(e) || (gp = e, sendMessage(a));
|
|
7142
7159
|
}
|
|
7143
7160
|
function trackingEvent(e) {
|
|
7144
|
-
sendMessage({ type: "trackingEvent", trackingData: e, timestamp:
|
|
7161
|
+
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: ne() });
|
|
7145
7162
|
}
|
|
7146
|
-
const
|
|
7163
|
+
const yp = readDebugFlag(), wp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], Sp = [400, 403], bp = "CORS", vp = 1, Cp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, kp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7147
7164
|
function trackDomainChangesOnce() {
|
|
7148
7165
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7149
7166
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7210,7 +7227,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7210
7227
|
return true;
|
|
7211
7228
|
}
|
|
7212
7229
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7213
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7230
|
+
return !!matchUrlWithWildcard(e, [...wp, ...a]);
|
|
7214
7231
|
}
|
|
7215
7232
|
function setupFetchInterceptor(e = []) {
|
|
7216
7233
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7245,7 +7262,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7245
7262
|
F2[e3] = a4;
|
|
7246
7263
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7247
7264
|
} catch (e3) {
|
|
7248
|
-
|
|
7265
|
+
yp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7249
7266
|
}
|
|
7250
7267
|
delete F2[b];
|
|
7251
7268
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7255,16 +7272,16 @@ function setupFetchInterceptor(e = []) {
|
|
|
7255
7272
|
const I4 = getFuncSpanHeader();
|
|
7256
7273
|
if (u3 instanceof Request) {
|
|
7257
7274
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7258
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7275
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), yp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7259
7276
|
const E3 = new Request(_3, { headers: O3 });
|
|
7260
7277
|
return await e3.call(a4, E3, m4);
|
|
7261
7278
|
}
|
|
7262
7279
|
{
|
|
7263
7280
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7264
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7281
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), yp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u3 ? u3 : u3.href, header: I4.name })), _3.headers = O3, await e3.call(a4, u3, _3);
|
|
7265
7282
|
}
|
|
7266
7283
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7267
|
-
|
|
7284
|
+
Sp.includes(U3.status) && (yp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7268
7285
|
try {
|
|
7269
7286
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7270
7287
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7280,7 +7297,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7280
7297
|
}
|
|
7281
7298
|
return e3.apply(a4, u3);
|
|
7282
7299
|
} catch (e4) {
|
|
7283
|
-
throw
|
|
7300
|
+
throw yp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7284
7301
|
}
|
|
7285
7302
|
})(e2, a3, u2, x3), B2 = true);
|
|
7286
7303
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7289,7 +7306,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7289
7306
|
const e3 = U3.clone();
|
|
7290
7307
|
q2 = await e3.text();
|
|
7291
7308
|
} catch (e3) {
|
|
7292
|
-
|
|
7309
|
+
yp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7293
7310
|
}
|
|
7294
7311
|
let H2 = null;
|
|
7295
7312
|
try {
|
|
@@ -7297,12 +7314,12 @@ function setupFetchInterceptor(e = []) {
|
|
|
7297
7314
|
H2[a4] = e3;
|
|
7298
7315
|
});
|
|
7299
7316
|
} catch (e3) {
|
|
7300
|
-
|
|
7317
|
+
yp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7301
7318
|
}
|
|
7302
7319
|
return sendEvent({ type: 27, timestamp: $2, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: $2, response_code: z2, success: j2, error: V2, method: O2, url: x3, retry_without_trace_id: B2, request_headers: F2, request_body: D2, response_headers: H2, response_body: q2 }, ..._2 }), U3;
|
|
7303
7320
|
} catch (m4) {
|
|
7304
7321
|
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7305
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7322
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(bp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7306
7323
|
throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: b2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7307
7324
|
}
|
|
7308
7325
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
@@ -7336,7 +7353,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7336
7353
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7337
7354
|
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7338
7355
|
else {
|
|
7339
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7356
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(kp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7340
7357
|
window.addEventListener("error", (e2) => {
|
|
7341
7358
|
captureError(e2.error || e2.message);
|
|
7342
7359
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7344,7 +7361,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7344
7361
|
});
|
|
7345
7362
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7346
7363
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7347
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...
|
|
7364
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...wp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7348
7365
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7349
7366
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7350
7367
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7362,9 +7379,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7362
7379
|
}
|
|
7363
7380
|
const _3 = getFuncSpanHeader();
|
|
7364
7381
|
if (_3) try {
|
|
7365
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7382
|
+
this.setRequestHeader(_3.name, _3.value), yp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7366
7383
|
} catch (e3) {
|
|
7367
|
-
|
|
7384
|
+
yp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7368
7385
|
}
|
|
7369
7386
|
const O3 = Date.now();
|
|
7370
7387
|
let E3 = false;
|
|
@@ -7392,7 +7409,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7392
7409
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7393
7410
|
});
|
|
7394
7411
|
} catch (e4) {
|
|
7395
|
-
|
|
7412
|
+
yp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7396
7413
|
}
|
|
7397
7414
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7398
7415
|
else {
|
|
@@ -7408,7 +7425,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7408
7425
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7409
7426
|
})();
|
|
7410
7427
|
try {
|
|
7411
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7428
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || Cp;
|
|
7412
7429
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7413
7430
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7414
7431
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
@@ -7444,7 +7461,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7444
7461
|
const e = document.visibilityState, a = Date.now();
|
|
7445
7462
|
"visible" === e && getOrSetSessionId();
|
|
7446
7463
|
try {
|
|
7447
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7464
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), yp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7448
7465
|
} catch (e2) {
|
|
7449
7466
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7450
7467
|
}
|
|
@@ -7462,9 +7479,9 @@ const initRecorder = async (e) => {
|
|
|
7462
7479
|
})), a.initPromise);
|
|
7463
7480
|
};
|
|
7464
7481
|
export {
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7482
|
+
Cp as DEFAULT_CAPTURE_SETTINGS,
|
|
7483
|
+
kp as DEFAULT_CONSOLE_RECORDING_SETTINGS,
|
|
7484
|
+
vp as STORAGE_VERSION,
|
|
7468
7485
|
addOrUpdateMetadata,
|
|
7469
7486
|
buildBatches,
|
|
7470
7487
|
createTriageFromRecorder,
|
|
@@ -7474,6 +7491,7 @@ export {
|
|
|
7474
7491
|
fetchCaptureSettings,
|
|
7475
7492
|
flushBufferedEvents,
|
|
7476
7493
|
getFuncSpanHeader,
|
|
7494
|
+
getOrSetSessionId,
|
|
7477
7495
|
getUrlAndStoredUuids,
|
|
7478
7496
|
identify,
|
|
7479
7497
|
initRecorder,
|
|
@@ -7483,7 +7501,7 @@ export {
|
|
|
7483
7501
|
initializeWebSocket,
|
|
7484
7502
|
isFunctionSpanTrackingEnabled,
|
|
7485
7503
|
matchUrlWithWildcard,
|
|
7486
|
-
|
|
7504
|
+
ne as nowTimestamp,
|
|
7487
7505
|
openReportIssueModal,
|
|
7488
7506
|
sendDomainsToNotPropagateHeaderTo,
|
|
7489
7507
|
sendEvent,
|