@sailfish-ai/recorder 1.8.12 → 1.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphql.js +7 -0
- package/dist/index.js +30 -4
- package/dist/recorder.cjs +801 -771
- package/dist/recorder.js +804 -771
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +801 -771
- package/dist/types/graphql.d.ts +2 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/websocket.d.ts +10 -0
- package/dist/websocket.js +142 -64
- package/package.json +1 -1
package/dist/recorder.js
CHANGED
|
@@ -373,26 +373,29 @@ function withAppUrlMetadata(e) {
|
|
|
373
373
|
return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
374
374
|
}
|
|
375
375
|
/[1-9][0-9]{12}/.test(Date.now().toString()) || (ne = () => (/* @__PURE__ */ new Date()).getTime());
|
|
376
|
-
const re = readDebugFlag(), oe = "per_session"
|
|
377
|
-
let
|
|
376
|
+
const re = readDebugFlag(), oe = "per_session";
|
|
377
|
+
let se = null, ie = false, le = null, ce = null, pe = false, de = null, he = null, me = false;
|
|
378
|
+
const ge = "sailfish_funcspan_global_state";
|
|
378
379
|
function saveGlobalFuncSpanState(e, a) {
|
|
379
380
|
try {
|
|
380
381
|
if ("undefined" == typeof localStorage) return;
|
|
381
|
-
const u = { enabled: e, expirationTimestampMs: a };
|
|
382
|
-
localStorage.setItem(
|
|
382
|
+
const u = { enabled: e, expirationTimestampMs: a, savedAt: Date.now() };
|
|
383
|
+
localStorage.setItem(ge, JSON.stringify(u)), re && console.log("[Sailfish] Saved funcSpan state to localStorage:", u);
|
|
383
384
|
} catch (e2) {
|
|
384
|
-
re && console.warn("[Sailfish] Failed to save
|
|
385
|
+
re && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e2);
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
388
|
function clearGlobalFuncSpanState() {
|
|
388
389
|
try {
|
|
389
390
|
if ("undefined" == typeof localStorage) return;
|
|
390
|
-
localStorage.removeItem(
|
|
391
|
+
localStorage.removeItem(ge), re && console.log("[Sailfish] Cleared funcSpan state from localStorage");
|
|
391
392
|
} catch (e) {
|
|
392
|
-
re && console.warn("[Sailfish] Failed to clear
|
|
393
|
+
re && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e);
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
|
|
396
|
+
function clearStaleFuncSpanState() {
|
|
397
|
+
pe = false, he = null, me = false, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
|
|
398
|
+
}
|
|
396
399
|
function isWebSocketOpen(e) {
|
|
397
400
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
398
401
|
}
|
|
@@ -403,15 +406,15 @@ async function flushNotifyQueue() {
|
|
|
403
406
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
404
407
|
})) ?? [];
|
|
405
408
|
})();
|
|
406
|
-
if (isWebSocketOpen(
|
|
407
|
-
for (const a of e)
|
|
409
|
+
if (isWebSocketOpen(se)) try {
|
|
410
|
+
for (const a of e) se.send(a.value), await deleteNotifyMessageById(a.id);
|
|
408
411
|
} catch (e2) {
|
|
409
412
|
}
|
|
410
413
|
}
|
|
411
414
|
async function flushBufferedEvents() {
|
|
412
|
-
if (isWebSocketOpen(
|
|
415
|
+
if (isWebSocketOpen(se)) if (le) await le;
|
|
413
416
|
else {
|
|
414
|
-
|
|
417
|
+
le = (async () => {
|
|
415
418
|
var _a2, _b;
|
|
416
419
|
const e = await (async function getAllIndexedEvents() {
|
|
417
420
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -426,33 +429,33 @@ async function flushBufferedEvents() {
|
|
|
426
429
|
for (const e2 of Object.values(a)) {
|
|
427
430
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
428
431
|
for (const e3 of a2) {
|
|
429
|
-
if (!isWebSocketOpen(
|
|
432
|
+
if (!isWebSocketOpen(se)) break;
|
|
430
433
|
const a3 = e3.map((e4) => {
|
|
431
434
|
var _a3, _b2;
|
|
432
435
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
433
436
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
434
437
|
try {
|
|
435
438
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
436
|
-
|
|
439
|
+
se.send(e4), await deleteEventsByIds(u);
|
|
437
440
|
} catch (e4) {
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
})();
|
|
442
445
|
try {
|
|
443
|
-
await
|
|
446
|
+
await le;
|
|
444
447
|
} finally {
|
|
445
|
-
|
|
448
|
+
le = null;
|
|
446
449
|
}
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
function sendEvent(e) {
|
|
450
453
|
var _a2;
|
|
451
454
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
452
|
-
if (
|
|
455
|
+
if (ie || !isWebSocketOpen(se)) return void saveEventToIDB(a);
|
|
453
456
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
454
457
|
try {
|
|
455
|
-
|
|
458
|
+
se.send(u);
|
|
456
459
|
} catch (e2) {
|
|
457
460
|
saveEventToIDB(a);
|
|
458
461
|
}
|
|
@@ -462,85 +465,102 @@ function initializeWebSocket(e, a, u, m2) {
|
|
|
462
465
|
const a2 = document.createElement("a");
|
|
463
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
464
467
|
})(e);
|
|
465
|
-
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.13`;
|
|
466
469
|
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
467
|
-
return
|
|
468
|
-
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (
|
|
470
|
+
return se = new $(b2, [], { connectionTimeout: 3e4 }), se.addEventListener("open", () => {
|
|
471
|
+
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (pe ? "ENABLED" : "DISABLED"))), (async () => {
|
|
469
472
|
try {
|
|
470
|
-
|
|
473
|
+
ie = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
471
474
|
} finally {
|
|
472
|
-
|
|
475
|
+
ie = false;
|
|
473
476
|
}
|
|
474
|
-
null !=
|
|
477
|
+
null != ce && clearInterval(ce), ce = window.setInterval(() => {
|
|
475
478
|
flushBufferedEvents();
|
|
476
479
|
}, 2e3);
|
|
477
480
|
})();
|
|
478
|
-
}),
|
|
481
|
+
}), se.addEventListener("close", () => {
|
|
479
482
|
re && console.log("[Sailfish] WebSocket closed");
|
|
480
|
-
}),
|
|
483
|
+
}), se.addEventListener("message", (e2) => {
|
|
481
484
|
try {
|
|
482
485
|
const a2 = JSON.parse(e2.data);
|
|
483
|
-
if ("funcSpanTrackingControl" === a2.type) if (re && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !==
|
|
486
|
+
if ("funcSpanTrackingControl" === a2.type) if (re && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== de && (window.clearTimeout(de), de = null), pe = a2.enabled, me = false, re && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
484
487
|
if (a2.expirationTimestampMs) {
|
|
485
|
-
|
|
486
|
-
const e3 = Date.now(), u2 =
|
|
487
|
-
re && console.log(`[Sailfish] Server expiration timestamp: ${
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
he = a2.expirationTimestampMs;
|
|
489
|
+
const e3 = Date.now(), u2 = he - e3;
|
|
490
|
+
re && console.log(`[Sailfish] Server expiration timestamp: ${he}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, he), de = window.setTimeout(() => {
|
|
491
|
+
if (!me) {
|
|
492
|
+
pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
|
|
493
|
+
try {
|
|
494
|
+
isWebSocketOpen(se) && (se.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), re && console.log("[Sailfish] Notified backend that function span tracking expired"));
|
|
495
|
+
} catch (e4) {
|
|
496
|
+
re && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, u2)) : (pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
490
500
|
} else {
|
|
491
501
|
const e3 = a2.timeoutSeconds || 3600;
|
|
492
|
-
e3 > 0 && (
|
|
493
|
-
|
|
502
|
+
e3 > 0 && (he = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, he), de = window.setTimeout(() => {
|
|
503
|
+
if (!me) {
|
|
504
|
+
pe = false, he = null, clearGlobalFuncSpanState(), re && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
|
|
505
|
+
try {
|
|
506
|
+
isWebSocketOpen(se) && (se.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), re && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
|
|
507
|
+
} catch (e4) {
|
|
508
|
+
re && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
494
511
|
}, 1e3 * e3));
|
|
495
512
|
}
|
|
496
513
|
try {
|
|
497
514
|
const e3 = getOrSetSessionId();
|
|
498
|
-
|
|
515
|
+
se.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), re && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
499
516
|
} catch (e3) {
|
|
500
517
|
re && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
501
518
|
}
|
|
502
|
-
} else
|
|
519
|
+
} else he = null, clearGlobalFuncSpanState();
|
|
503
520
|
} catch (e3) {
|
|
504
521
|
}
|
|
505
|
-
}),
|
|
522
|
+
}), se;
|
|
506
523
|
}
|
|
507
524
|
function sendMessage(e) {
|
|
508
525
|
var _a2;
|
|
509
526
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
510
527
|
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) });
|
|
511
|
-
if (
|
|
528
|
+
if (ie || !isWebSocketOpen(se)) saveNotifyMessageToIDB(a);
|
|
512
529
|
else try {
|
|
513
|
-
|
|
530
|
+
se.send(a);
|
|
514
531
|
} catch (e2) {
|
|
515
532
|
saveNotifyMessageToIDB(a);
|
|
516
533
|
}
|
|
517
534
|
}
|
|
518
535
|
function enableFunctionSpanTracking() {
|
|
519
|
-
if (re && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"),
|
|
536
|
+
if (re && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), pe = true, me = true, he = null, null !== de && (window.clearTimeout(de), de = null), isWebSocketOpen(se)) try {
|
|
520
537
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: oe };
|
|
521
|
-
|
|
538
|
+
se.send(JSON.stringify(e));
|
|
522
539
|
} catch (e) {
|
|
523
540
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
524
541
|
}
|
|
525
542
|
else re && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
526
543
|
}
|
|
527
544
|
function disableFunctionSpanTracking() {
|
|
528
|
-
if (re && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(
|
|
545
|
+
if (re && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(se)) try {
|
|
529
546
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: oe };
|
|
530
|
-
|
|
547
|
+
se.send(JSON.stringify(e));
|
|
531
548
|
} catch (e) {
|
|
532
549
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
533
550
|
}
|
|
534
551
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
535
|
-
|
|
552
|
+
me && (pe = false, me = false, he = null, re && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== de && (window.clearTimeout(de), de = null);
|
|
536
553
|
}
|
|
537
554
|
function isFunctionSpanTrackingEnabled() {
|
|
538
|
-
return
|
|
555
|
+
return pe;
|
|
556
|
+
}
|
|
557
|
+
function initializeFunctionSpanTrackingFromApi(e) {
|
|
558
|
+
e && !pe ? (pe = true, me = false, he = null, re && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && pe && (pe = false, me = false, he = null, re && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
|
|
539
559
|
}
|
|
540
560
|
function getFuncSpanHeader() {
|
|
541
|
-
if (!
|
|
542
|
-
if (null !==
|
|
543
|
-
if (Date.now() >=
|
|
561
|
+
if (!pe) return null;
|
|
562
|
+
if (null !== he) {
|
|
563
|
+
if (Date.now() >= he) return pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
544
564
|
}
|
|
545
565
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
546
566
|
}
|
|
@@ -548,34 +568,36 @@ function getFuncSpanHeader() {
|
|
|
548
568
|
const e = (function loadGlobalFuncSpanState() {
|
|
549
569
|
try {
|
|
550
570
|
if ("undefined" == typeof localStorage) return null;
|
|
551
|
-
const e2 = localStorage.getItem(
|
|
571
|
+
const e2 = localStorage.getItem(ge);
|
|
552
572
|
if (!e2) return null;
|
|
553
573
|
const a = JSON.parse(e2);
|
|
554
|
-
return
|
|
574
|
+
return re && console.log("[Sailfish] Loaded funcSpan state from localStorage:", a), a;
|
|
555
575
|
} catch (e2) {
|
|
556
|
-
return re && console.warn("[Sailfish] Failed to load
|
|
576
|
+
return re && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e2), null;
|
|
557
577
|
}
|
|
558
578
|
})();
|
|
559
|
-
e && e.enabled
|
|
579
|
+
if (e && e.enabled) if (pe = true, he = e.expirationTimestampMs, me = false, re && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: he }), null !== he) {
|
|
580
|
+
Date.now() >= he ? (pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : re && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
|
|
581
|
+
} else re && console.log("[Sailfish] Module init: Function span tracking is active (no expiration, temporary until WebSocket confirms)");
|
|
560
582
|
})();
|
|
561
|
-
const
|
|
562
|
-
var
|
|
583
|
+
const ye = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
584
|
+
var we, be, ve = {}, Ce = {}, ke = {}, xe = {};
|
|
563
585
|
function requireBase64() {
|
|
564
|
-
if (
|
|
565
|
-
|
|
586
|
+
if (we) return xe;
|
|
587
|
+
we = 1;
|
|
566
588
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
567
|
-
return
|
|
589
|
+
return xe.encode = function(a) {
|
|
568
590
|
if (0 <= a && a < e.length) return e[a];
|
|
569
591
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
570
|
-
},
|
|
592
|
+
}, xe.decode = function(e2) {
|
|
571
593
|
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;
|
|
572
|
-
},
|
|
594
|
+
}, xe;
|
|
573
595
|
}
|
|
574
596
|
function requireBase64Vlq() {
|
|
575
|
-
if (
|
|
576
|
-
|
|
597
|
+
if (be) return ke;
|
|
598
|
+
be = 1;
|
|
577
599
|
var e = requireBase64();
|
|
578
|
-
return
|
|
600
|
+
return ke.encode = function base64VLQ_encode(a) {
|
|
579
601
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
580
602
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
581
603
|
})(a);
|
|
@@ -583,7 +605,7 @@ function requireBase64Vlq() {
|
|
|
583
605
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
584
606
|
} while (w2 > 0);
|
|
585
607
|
return m2;
|
|
586
|
-
},
|
|
608
|
+
}, ke.decode = function base64VLQ_decode(a, u, m2) {
|
|
587
609
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
588
610
|
do {
|
|
589
611
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -594,11 +616,11 @@ function requireBase64Vlq() {
|
|
|
594
616
|
var a2 = e2 >> 1;
|
|
595
617
|
return 1 & ~e2 ? a2 : -a2;
|
|
596
618
|
})(x2), m2.rest = u;
|
|
597
|
-
},
|
|
619
|
+
}, ke;
|
|
598
620
|
}
|
|
599
|
-
var
|
|
621
|
+
var Me, Ie = {};
|
|
600
622
|
function requireUtil() {
|
|
601
|
-
return
|
|
623
|
+
return Me || (Me = 1, (function(e) {
|
|
602
624
|
e.getArg = function getArg(e2, a2, u2) {
|
|
603
625
|
if (a2 in e2) return e2[a2];
|
|
604
626
|
if (3 === arguments.length) return u2;
|
|
@@ -710,12 +732,12 @@ function requireUtil() {
|
|
|
710
732
|
}
|
|
711
733
|
return m2(a2);
|
|
712
734
|
};
|
|
713
|
-
})(
|
|
735
|
+
})(Ie)), Ie;
|
|
714
736
|
}
|
|
715
|
-
var
|
|
737
|
+
var Oe, Ee = {};
|
|
716
738
|
function requireArraySet() {
|
|
717
|
-
if (
|
|
718
|
-
|
|
739
|
+
if (Oe) return Ee;
|
|
740
|
+
Oe = 1;
|
|
719
741
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
720
742
|
function ArraySet() {
|
|
721
743
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -746,12 +768,12 @@ function requireArraySet() {
|
|
|
746
768
|
throw new Error("No element indexed by " + e2);
|
|
747
769
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
748
770
|
return this._array.slice();
|
|
749
|
-
},
|
|
771
|
+
}, Ee.ArraySet = ArraySet, Ee;
|
|
750
772
|
}
|
|
751
|
-
var
|
|
773
|
+
var Le, Ae, Te = {};
|
|
752
774
|
function requireMappingList() {
|
|
753
|
-
if (
|
|
754
|
-
|
|
775
|
+
if (Le) return Te;
|
|
776
|
+
Le = 1;
|
|
755
777
|
var e = requireUtil();
|
|
756
778
|
function MappingList() {
|
|
757
779
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -765,11 +787,11 @@ function requireMappingList() {
|
|
|
765
787
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
766
788
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
767
789
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
768
|
-
},
|
|
790
|
+
}, Te.MappingList = MappingList, Te;
|
|
769
791
|
}
|
|
770
792
|
function requireSourceMapGenerator() {
|
|
771
|
-
if (
|
|
772
|
-
|
|
793
|
+
if (Ae) return Ce;
|
|
794
|
+
Ae = 1;
|
|
773
795
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
774
796
|
function SourceMapGenerator(e2) {
|
|
775
797
|
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;
|
|
@@ -846,11 +868,11 @@ function requireSourceMapGenerator() {
|
|
|
846
868
|
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;
|
|
847
869
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
848
870
|
return JSON.stringify(this.toJSON());
|
|
849
|
-
},
|
|
871
|
+
}, Ce.SourceMapGenerator = SourceMapGenerator, Ce;
|
|
850
872
|
}
|
|
851
|
-
var
|
|
873
|
+
var De, Ue = {}, Be = {};
|
|
852
874
|
function requireBinarySearch() {
|
|
853
|
-
return
|
|
875
|
+
return De || (De = 1, (function(e) {
|
|
854
876
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
855
877
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
856
878
|
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;
|
|
@@ -862,11 +884,11 @@ function requireBinarySearch() {
|
|
|
862
884
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
863
885
|
return b2;
|
|
864
886
|
};
|
|
865
|
-
})(
|
|
887
|
+
})(Be)), Be;
|
|
866
888
|
}
|
|
867
|
-
var
|
|
889
|
+
var je, Ge, Ve = {};
|
|
868
890
|
function requireQuickSort() {
|
|
869
|
-
if (
|
|
891
|
+
if (je) return Ve;
|
|
870
892
|
function SortTemplate(e2) {
|
|
871
893
|
function swap(e3, a, u) {
|
|
872
894
|
var m2 = e3[a];
|
|
@@ -885,21 +907,21 @@ function requireQuickSort() {
|
|
|
885
907
|
}
|
|
886
908
|
};
|
|
887
909
|
}
|
|
888
|
-
|
|
910
|
+
je = 1;
|
|
889
911
|
let e = /* @__PURE__ */ new WeakMap();
|
|
890
|
-
return
|
|
912
|
+
return Ve.quickSort = function(a, u, m2 = 0) {
|
|
891
913
|
let w2 = e.get(u);
|
|
892
914
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
893
915
|
let a2 = SortTemplate.toString();
|
|
894
916
|
return new Function(`return ${a2}`)()(e2);
|
|
895
917
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
896
|
-
},
|
|
918
|
+
}, Ve;
|
|
897
919
|
}
|
|
898
|
-
var
|
|
899
|
-
var
|
|
900
|
-
return
|
|
901
|
-
if (
|
|
902
|
-
|
|
920
|
+
var qe, He, Je = {};
|
|
921
|
+
var Ye = (function requireSourceMap() {
|
|
922
|
+
return He || (He = 1, ve.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, ve.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
923
|
+
if (Ge) return Ue;
|
|
924
|
+
Ge = 1;
|
|
903
925
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
904
926
|
function SourceMapConsumer(a2, u2) {
|
|
905
927
|
var m3 = a2;
|
|
@@ -956,7 +978,7 @@ var Qe = (function requireSourceMap() {
|
|
|
956
978
|
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];
|
|
957
979
|
}
|
|
958
980
|
return b3;
|
|
959
|
-
},
|
|
981
|
+
}, Ue.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
960
982
|
var u2, m3 = a2;
|
|
961
983
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
962
984
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1073,7 +1095,7 @@ var Qe = (function requireSourceMap() {
|
|
|
1073
1095
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1074
1096
|
}
|
|
1075
1097
|
return { line: null, column: null, lastColumn: null };
|
|
1076
|
-
},
|
|
1098
|
+
}, Ue.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1077
1099
|
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]);
|
|
1078
1100
|
return e2;
|
|
1079
1101
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1112,10 +1134,10 @@ var Qe = (function requireSourceMap() {
|
|
|
1112
1134
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1113
1135
|
}
|
|
1114
1136
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1115
|
-
},
|
|
1116
|
-
})().SourceMapConsumer,
|
|
1117
|
-
if (
|
|
1118
|
-
|
|
1137
|
+
}, Ue.IndexedSourceMapConsumer = IndexedSourceMapConsumer, Ue;
|
|
1138
|
+
})().SourceMapConsumer, ve.SourceNode = (function requireSourceNode() {
|
|
1139
|
+
if (qe) return Je;
|
|
1140
|
+
qe = 1;
|
|
1119
1141
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1120
1142
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1121
1143
|
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);
|
|
@@ -1199,20 +1221,20 @@ var Qe = (function requireSourceMap() {
|
|
|
1199
1221
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1200
1222
|
m3.setSourceContent(e2, a3);
|
|
1201
1223
|
}), { code: u2.code, map: m3 };
|
|
1202
|
-
},
|
|
1203
|
-
})().SourceNode),
|
|
1224
|
+
}, Je.SourceNode = SourceNode, Je;
|
|
1225
|
+
})().SourceNode), ve;
|
|
1204
1226
|
})();
|
|
1205
|
-
const
|
|
1227
|
+
const Xe = /* @__PURE__ */ new Map(), Qe = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1206
1228
|
async function getConsumerFor(e, a) {
|
|
1207
1229
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1208
1230
|
for (const e2 of m2) try {
|
|
1209
|
-
if (
|
|
1231
|
+
if (Xe.has(e2)) return Xe.get(e2);
|
|
1210
1232
|
const a2 = await fetch(e2);
|
|
1211
1233
|
if (!a2.ok) continue;
|
|
1212
1234
|
const u2 = await a2.json();
|
|
1213
1235
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1214
|
-
const m3 = await new
|
|
1215
|
-
return
|
|
1236
|
+
const m3 = await new Ye.SourceMapConsumer(u2);
|
|
1237
|
+
return Xe.set(e2, m3), m3;
|
|
1216
1238
|
} catch {
|
|
1217
1239
|
}
|
|
1218
1240
|
return null;
|
|
@@ -1224,7 +1246,7 @@ async function captureError(e, a = false) {
|
|
|
1224
1246
|
if (!e2) return ["No stack trace available"];
|
|
1225
1247
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1226
1248
|
for (const e3 of a2) {
|
|
1227
|
-
const a3 = e3.match(
|
|
1249
|
+
const a3 = e3.match(Qe);
|
|
1228
1250
|
if (!a3) {
|
|
1229
1251
|
u2.push(e3);
|
|
1230
1252
|
continue;
|
|
@@ -1239,8 +1261,8 @@ async function captureError(e, a = false) {
|
|
|
1239
1261
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1240
1262
|
continue;
|
|
1241
1263
|
}
|
|
1242
|
-
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias:
|
|
1243
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias:
|
|
1264
|
+
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias: Ye.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1265
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias: Ye.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1244
1266
|
if (O2.source && null != O2.line) {
|
|
1245
1267
|
const e4 = O2.name || "anonymous";
|
|
1246
1268
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1250,11 +1272,11 @@ async function captureError(e, a = false) {
|
|
|
1250
1272
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), C2 = b2.length > 0 ? b2 : w2, x2 = Date.now();
|
|
1251
1273
|
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" } } } });
|
|
1252
1274
|
}
|
|
1253
|
-
const
|
|
1254
|
-
const
|
|
1275
|
+
const et = readDebugFlag();
|
|
1276
|
+
const nt = readDebugFlag();
|
|
1255
1277
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1256
1278
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1257
|
-
return
|
|
1279
|
+
return nt && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1258
1280
|
let b3 = 0;
|
|
1259
1281
|
const attemptRequest = async () => {
|
|
1260
1282
|
try {
|
|
@@ -1262,18 +1284,21 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1262
1284
|
} catch (e3) {
|
|
1263
1285
|
if (b3++, b3 > u2) throw e3;
|
|
1264
1286
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1265
|
-
return
|
|
1287
|
+
return et && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1266
1288
|
}
|
|
1267
1289
|
};
|
|
1268
1290
|
return attemptRequest();
|
|
1269
1291
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1270
|
-
if (
|
|
1292
|
+
if (nt && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1271
1293
|
return e2.json();
|
|
1272
1294
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1273
1295
|
}
|
|
1274
1296
|
function fetchCaptureSettings(e, a) {
|
|
1275
1297
|
return sendGraphQLRequest("GetCaptureSettingsFromApiKey", "\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ", { apiKey: e, backendApi: a });
|
|
1276
1298
|
}
|
|
1299
|
+
function fetchFunctionSpanTrackingEnabled(e, a) {
|
|
1300
|
+
return sendGraphQLRequest("GetFunctionSpanTrackingEnabledFromApiKey", "\n query GetFunctionSpanTrackingEnabledFromApiKey($apiKey: String!) {\n isFunctionSpanTrackingEnabledFromApiKey(apiKey: $apiKey)\n }\n ", { apiKey: e, backendApi: a });
|
|
1301
|
+
}
|
|
1277
1302
|
function startRecordingSession(e, a, u, m2, w2, b2, C2, x2, I2) {
|
|
1278
1303
|
return sendGraphQLRequest("StartSession", "mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }", { apiKey: e, recordingSessionId: a, backendApi: u, serviceIdentifier: m2, serviceVersion: w2, mapUuid: b2, gitSha: C2, library: x2, serviceAdditionalMetadata: I2, startRecordingFilePath: null, startRecordingLineNumber: null });
|
|
1279
1304
|
}
|
|
@@ -1283,9 +1308,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1283
1308
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1284
1309
|
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 });
|
|
1285
1310
|
}
|
|
1286
|
-
const
|
|
1311
|
+
const ot = { 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 } }, st = { shortcuts: { ...ot }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1287
1312
|
} };
|
|
1288
|
-
let
|
|
1313
|
+
let it = null, at = { mode: "lookback", description: "" }, lt = null, ct = null, ut = null, pt = false;
|
|
1289
1314
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1290
1315
|
return (function isMacPlatform() {
|
|
1291
1316
|
const e = navigator.userAgentData;
|
|
@@ -1298,11 +1323,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1298
1323
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1299
1324
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1300
1325
|
})(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 ? " + " : "");
|
|
1301
|
-
})(
|
|
1326
|
+
})(st.shortcuts[e]);
|
|
1302
1327
|
}
|
|
1303
1328
|
function setupIssueReporting(e) {
|
|
1304
|
-
|
|
1305
|
-
const a2 = { ...
|
|
1329
|
+
st.apiKey = e.apiKey, st.backendApi = e.backendApi, st.resolveSessionId = e.getSessionId, e.customBaseUrl && (st.triageBaseUrl = e.customBaseUrl), st.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1330
|
+
const a2 = { ...ot };
|
|
1306
1331
|
if (!e2) return a2;
|
|
1307
1332
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1308
1333
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1312,7 +1337,7 @@ function setupIssueReporting(e) {
|
|
|
1312
1337
|
}
|
|
1313
1338
|
return a2;
|
|
1314
1339
|
})(e.shortcuts);
|
|
1315
|
-
const { shortcuts: a } =
|
|
1340
|
+
const { shortcuts: a } = st;
|
|
1316
1341
|
window.addEventListener("keydown", (e2) => {
|
|
1317
1342
|
const u = (function isTypingInInput() {
|
|
1318
1343
|
const e3 = document.activeElement;
|
|
@@ -1322,23 +1347,23 @@ function setupIssueReporting(e) {
|
|
|
1322
1347
|
} : injectModalHTML;
|
|
1323
1348
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1324
1349
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1325
|
-
if (b2 && !
|
|
1350
|
+
if (b2 && !pt && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1326
1351
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1327
1352
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1328
1353
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1329
1354
|
}
|
|
1330
|
-
if (
|
|
1331
|
-
if (b2 && "startnow" ===
|
|
1355
|
+
if (pt && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1356
|
+
if (b2 && "startnow" === at.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1332
1357
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1333
1358
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1334
1359
|
}
|
|
1335
1360
|
});
|
|
1336
1361
|
}
|
|
1337
1362
|
function openReportIssueModal() {
|
|
1338
|
-
|
|
1363
|
+
pt ? stopRecording() : (injectModalHTML(), it && document.body.appendChild(it));
|
|
1339
1364
|
}
|
|
1340
1365
|
function closeModal() {
|
|
1341
|
-
|
|
1366
|
+
st.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (it == null ? void 0 : it.parentNode) && it.parentNode.removeChild(it), it = null, pt || (at = { mode: "lookback", description: "", occurredInThisTab: true }, lt = null, ct = null), ut && clearInterval(ut);
|
|
1342
1367
|
}
|
|
1343
1368
|
function activateModalIsolation(e) {
|
|
1344
1369
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1397,9 +1422,9 @@ function activateModalIsolation(e) {
|
|
|
1397
1422
|
};
|
|
1398
1423
|
}
|
|
1399
1424
|
function injectModalHTML(e = "lookback") {
|
|
1400
|
-
|
|
1425
|
+
it && (it.remove(), it = null), it = document.createElement("div"), it.id = "sf-report-issue-modal";
|
|
1401
1426
|
const a = "startnow" === e;
|
|
1402
|
-
|
|
1427
|
+
it.innerHTML = `
|
|
1403
1428
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1404
1429
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1405
1430
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1447,7 +1472,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1447
1472
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1448
1473
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1449
1474
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1450
|
-
resize:none; outline:none;">${
|
|
1475
|
+
resize:none; outline:none;">${at.description}</textarea>
|
|
1451
1476
|
|
|
1452
1477
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1453
1478
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1535,8 +1560,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1535
1560
|
<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>
|
|
1536
1561
|
</div>
|
|
1537
1562
|
</div>
|
|
1538
|
-
`,
|
|
1539
|
-
const e2 =
|
|
1563
|
+
`, at.mode = e, document.body.appendChild(it), (function bindListeners() {
|
|
1564
|
+
const e2 = it == null ? void 0 : it.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");
|
|
1540
1565
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1541
1566
|
e3.addEventListener("click", (e4) => {
|
|
1542
1567
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1544,11 +1569,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1544
1569
|
});
|
|
1545
1570
|
}), u && (u.onclick = closeModal);
|
|
1546
1571
|
w2 && w2.addEventListener("change", () => {
|
|
1547
|
-
"lookback" ===
|
|
1572
|
+
"lookback" === at.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1548
1573
|
});
|
|
1549
1574
|
a2 && (a2.onclick = () => {
|
|
1550
1575
|
const e3 = document.getElementById("sf-issue-description");
|
|
1551
|
-
e3 && (
|
|
1576
|
+
e3 && (at.description = e3.value), (function startCountdownThenRecord() {
|
|
1552
1577
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1553
1578
|
const e4 = document.createElement("div");
|
|
1554
1579
|
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 ";
|
|
@@ -1557,9 +1582,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1557
1582
|
const u2 = setInterval(async () => {
|
|
1558
1583
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1559
1584
|
else {
|
|
1560
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1585
|
+
clearInterval(u2), document.body.removeChild(e4), lt = Date.now(), pt = true;
|
|
1561
1586
|
try {
|
|
1562
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1587
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => ye);
|
|
1563
1588
|
e5();
|
|
1564
1589
|
} catch (e5) {
|
|
1565
1590
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1585,8 +1610,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1585
1610
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1586
1611
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1587
1612
|
if (!a4) return;
|
|
1588
|
-
|
|
1589
|
-
const e6 = Date.now() - (
|
|
1613
|
+
ut = setInterval(() => {
|
|
1614
|
+
const e6 = Date.now() - (lt ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1590
1615
|
a4.textContent = `${u3}:${m3}`;
|
|
1591
1616
|
}, 1e3);
|
|
1592
1617
|
})();
|
|
@@ -1594,12 +1619,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1594
1619
|
}, 1e3);
|
|
1595
1620
|
})();
|
|
1596
1621
|
});
|
|
1597
|
-
|
|
1622
|
+
it == null ? void 0 : it.addEventListener("click", (e3) => {
|
|
1598
1623
|
var _a2;
|
|
1599
1624
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1600
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1625
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = at.mode;
|
|
1601
1626
|
let u2, m3;
|
|
1602
|
-
if (
|
|
1627
|
+
if (at.description = e4, "startnow" === a3) u2 = lt ?? Date.now() - 3e5, m3 = ct ?? Date.now();
|
|
1603
1628
|
else {
|
|
1604
1629
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1605
1630
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1608,9 +1633,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1608
1633
|
var _a3, _b;
|
|
1609
1634
|
try {
|
|
1610
1635
|
showTriageStatusModal(true);
|
|
1611
|
-
const m4 = await createTriageFromRecorder(
|
|
1612
|
-
if (!
|
|
1613
|
-
return
|
|
1636
|
+
const m4 = await createTriageFromRecorder(st.apiKey, st.backendApi, (function getSessionIdSafely() {
|
|
1637
|
+
if (!st.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1638
|
+
return st.resolveSessionId();
|
|
1614
1639
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1615
1640
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1616
1641
|
} catch (e6) {
|
|
@@ -1619,29 +1644,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1619
1644
|
})(`${u2}`, `${m3}`, e4);
|
|
1620
1645
|
}
|
|
1621
1646
|
});
|
|
1622
|
-
})(),
|
|
1647
|
+
})(), st.deactivateIsolation = activateModalIsolation(it);
|
|
1623
1648
|
}
|
|
1624
1649
|
function setActiveTab(e) {
|
|
1625
|
-
|
|
1626
|
-
const a =
|
|
1650
|
+
at.mode = e;
|
|
1651
|
+
const a = it == null ? void 0 : it.querySelector("#sf-tab-lookback"), u = it == null ? void 0 : it.querySelector("#sf-tab-startnow");
|
|
1627
1652
|
"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");
|
|
1628
1653
|
}
|
|
1629
1654
|
function updateModeSpecificUI(e) {
|
|
1630
1655
|
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");
|
|
1631
1656
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1632
1657
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1633
|
-
const e2 = null !==
|
|
1634
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1635
|
-
const e3 = Math.floor((
|
|
1658
|
+
const e2 = null !== lt && null !== ct;
|
|
1659
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", lt && ct) {
|
|
1660
|
+
const e3 = Math.floor((ct - lt) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1636
1661
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1637
1662
|
} else w2.style.display = "none";
|
|
1638
1663
|
} 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";
|
|
1639
1664
|
}
|
|
1640
1665
|
async function stopRecording() {
|
|
1641
1666
|
var _a2;
|
|
1642
|
-
|
|
1667
|
+
ct = Date.now(), pt = false, ut && clearInterval(ut), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1643
1668
|
try {
|
|
1644
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1669
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => ye);
|
|
1645
1670
|
e();
|
|
1646
1671
|
} catch (e) {
|
|
1647
1672
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1654,17 +1679,17 @@ async function stopRecording() {
|
|
|
1654
1679
|
a2 && (a2.textContent = "Re-record");
|
|
1655
1680
|
}
|
|
1656
1681
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1657
|
-
if (a && u &&
|
|
1658
|
-
const e2 = Math.floor((
|
|
1682
|
+
if (a && u && lt && ct) {
|
|
1683
|
+
const e2 = Math.floor((ct - lt) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1659
1684
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1660
1685
|
}
|
|
1661
1686
|
const m2 = document.getElementById("sf-issue-description");
|
|
1662
|
-
m2 && (m2.value =
|
|
1687
|
+
m2 && (m2.value = at.description);
|
|
1663
1688
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1664
1689
|
w2 && (w2.checked = true);
|
|
1665
1690
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1666
1691
|
if (b2 && C2) {
|
|
1667
|
-
const e2 = Math.floor(((
|
|
1692
|
+
const e2 = Math.floor(((ct ?? 0) - (lt ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1668
1693
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1669
1694
|
}
|
|
1670
1695
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1677,7 +1702,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1677
1702
|
var _a3, _b;
|
|
1678
1703
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1679
1704
|
})();
|
|
1680
|
-
const u = a ? `${
|
|
1705
|
+
const u = a ? `${st.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1681
1706
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1682
1707
|
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>';
|
|
1683
1708
|
m2.innerHTML = `
|
|
@@ -1739,7 +1764,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1739
1764
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1740
1765
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1741
1766
|
}
|
|
1742
|
-
var
|
|
1767
|
+
var dt = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? dt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ht = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? ht(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), gt = ((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))(gt || {});
|
|
1743
1768
|
function vr(e) {
|
|
1744
1769
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1745
1770
|
}
|
|
@@ -1781,7 +1806,7 @@ function kr(e) {
|
|
|
1781
1806
|
})(e.cssText);
|
|
1782
1807
|
return a || e.cssText;
|
|
1783
1808
|
}
|
|
1784
|
-
let
|
|
1809
|
+
let yt = class {
|
|
1785
1810
|
constructor() {
|
|
1786
1811
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1787
1812
|
}
|
|
@@ -1833,7 +1858,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1833
1858
|
function fe(e) {
|
|
1834
1859
|
return e.toLowerCase();
|
|
1835
1860
|
}
|
|
1836
|
-
const
|
|
1861
|
+
const wt = "__rrweb_original__";
|
|
1837
1862
|
function Yt(e) {
|
|
1838
1863
|
const a = e.type;
|
|
1839
1864
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1848,19 +1873,19 @@ function xr(e, a) {
|
|
|
1848
1873
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1849
1874
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1850
1875
|
}
|
|
1851
|
-
let
|
|
1852
|
-
const
|
|
1876
|
+
let St = 1;
|
|
1877
|
+
const bt = new RegExp("[^a-z0-9-_:]");
|
|
1853
1878
|
function Ir() {
|
|
1854
|
-
return
|
|
1879
|
+
return St++;
|
|
1855
1880
|
}
|
|
1856
|
-
let
|
|
1857
|
-
const
|
|
1881
|
+
let vt, Ct;
|
|
1882
|
+
const kt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, xt = /^(?:[a-z+]+:)?\/\//i, Mt = /^www\..*/i, It = /^(data:)([^,]*),(.*)/i;
|
|
1858
1883
|
function Pt(e, a) {
|
|
1859
|
-
return (e || "").replace(
|
|
1884
|
+
return (e || "").replace(kt, (e2, u, m2, w2, b2, C2) => {
|
|
1860
1885
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1861
1886
|
if (!x2) return e2;
|
|
1862
|
-
if (
|
|
1863
|
-
if (
|
|
1887
|
+
if (xt.test(x2) || Mt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1888
|
+
if (It.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1864
1889
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1865
1890
|
let a2 = "";
|
|
1866
1891
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1871,8 +1896,8 @@ function Pt(e, a) {
|
|
|
1871
1896
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1872
1897
|
});
|
|
1873
1898
|
}
|
|
1874
|
-
const
|
|
1875
|
-
const
|
|
1899
|
+
const Et = /^[^ \t\n\r\u000c]+/, Lt = /^[, \t\n\r\u000c]+/;
|
|
1900
|
+
const Rt = /* @__PURE__ */ new WeakMap();
|
|
1876
1901
|
function At(e, a) {
|
|
1877
1902
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1878
1903
|
}
|
|
@@ -1880,8 +1905,8 @@ function Fi(e) {
|
|
|
1880
1905
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1881
1906
|
}
|
|
1882
1907
|
function $t(e, a) {
|
|
1883
|
-
let u =
|
|
1884
|
-
if (u || (u = e.createElement("a"),
|
|
1908
|
+
let u = Rt.get(e);
|
|
1909
|
+
if (u || (u = e.createElement("a"), Rt.set(e, u)), a) {
|
|
1885
1910
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1886
1911
|
} else a = "";
|
|
1887
1912
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1896,8 +1921,8 @@ function Mr(e, a, u, m2) {
|
|
|
1896
1921
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1897
1922
|
}
|
|
1898
1923
|
const m3 = [];
|
|
1899
|
-
for (; n(
|
|
1900
|
-
let w2 = n(
|
|
1924
|
+
for (; n(Lt), !(u2 >= a2.length); ) {
|
|
1925
|
+
let w2 = n(Et);
|
|
1901
1926
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1902
1927
|
else {
|
|
1903
1928
|
let b2 = "";
|
|
@@ -1967,9 +1992,9 @@ function zi(e, a) {
|
|
|
1967
1992
|
})(u, m2);
|
|
1968
1993
|
switch (e.nodeType) {
|
|
1969
1994
|
case e.DOCUMENT_NODE:
|
|
1970
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1995
|
+
return "CSS1Compat" !== e.compatMode ? { type: gt.Document, childNodes: [], compatMode: e.compatMode } : { type: gt.Document, childNodes: [] };
|
|
1971
1996
|
case e.DOCUMENT_TYPE_NODE:
|
|
1972
|
-
return { type:
|
|
1997
|
+
return { type: gt.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1973
1998
|
case e.ELEMENT_NODE:
|
|
1974
1999
|
return (function Vi(e2, a2) {
|
|
1975
2000
|
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) {
|
|
@@ -1987,7 +2012,7 @@ function zi(e, a) {
|
|
|
1987
2012
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1988
2013
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1989
2014
|
const a3 = fe(e3.tagName);
|
|
1990
|
-
return
|
|
2015
|
+
return bt.test(a3) ? "div" : a3;
|
|
1991
2016
|
})(e2);
|
|
1992
2017
|
let $3 = {};
|
|
1993
2018
|
const z2 = e2.attributes.length;
|
|
@@ -2016,7 +2041,7 @@ function zi(e, a) {
|
|
|
2016
2041
|
const a3 = e3.getContext("2d");
|
|
2017
2042
|
if (!a3) return true;
|
|
2018
2043
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
2019
|
-
const w4 = a3.getImageData, b4 =
|
|
2044
|
+
const w4 = a3.getImageData, b4 = wt in w4 ? w4[wt] : w4;
|
|
2020
2045
|
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;
|
|
2021
2046
|
}
|
|
2022
2047
|
return true;
|
|
@@ -2028,11 +2053,11 @@ function zi(e, a) {
|
|
|
2028
2053
|
}
|
|
2029
2054
|
}
|
|
2030
2055
|
if ("img" === B3 && _3) {
|
|
2031
|
-
|
|
2056
|
+
vt || (vt = u2.createElement("canvas"), Ct = vt.getContext("2d"));
|
|
2032
2057
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
2033
2058
|
a3.removeEventListener("load", A);
|
|
2034
2059
|
try {
|
|
2035
|
-
|
|
2060
|
+
vt.width = a3.naturalWidth, vt.height = a3.naturalHeight, Ct.drawImage(a3, 0, 0), $3.rr_dataURL = vt.toDataURL(I3.type, I3.quality);
|
|
2036
2061
|
} catch (e3) {
|
|
2037
2062
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
2038
2063
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2055,7 +2080,7 @@ function zi(e, a) {
|
|
|
2055
2080
|
customElements.get(B3) && (j2 = true);
|
|
2056
2081
|
} catch {
|
|
2057
2082
|
}
|
|
2058
|
-
return { type:
|
|
2083
|
+
return { type: gt.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2059
2084
|
})(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 });
|
|
2060
2085
|
case e.TEXT_NODE:
|
|
2061
2086
|
return (function ji(e2, a2) {
|
|
@@ -2071,12 +2096,12 @@ function zi(e, a) {
|
|
|
2071
2096
|
}
|
|
2072
2097
|
x3 = Pt(x3, $t(a2.doc));
|
|
2073
2098
|
}
|
|
2074
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2099
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: gt.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2075
2100
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2076
2101
|
case e.CDATA_SECTION_NODE:
|
|
2077
|
-
return { type:
|
|
2102
|
+
return { type: gt.CDATA, textContent: "", rootId: $2 };
|
|
2078
2103
|
case e.COMMENT_NODE:
|
|
2079
|
-
return { type:
|
|
2104
|
+
return { type: gt.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2080
2105
|
default:
|
|
2081
2106
|
return false;
|
|
2082
2107
|
}
|
|
@@ -2092,21 +2117,21 @@ function Se(e, a) {
|
|
|
2092
2117
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2093
2118
|
let te2;
|
|
2094
2119
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2095
|
-
return !!(a2.comment && e2.type ===
|
|
2096
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2120
|
+
return !!(a2.comment && e2.type === gt.Comment || e2.type === gt.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)))));
|
|
2121
|
+
})(ee2, F2) || !Q2 && ee2.type === gt.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2097
2122
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2098
2123
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2099
2124
|
z2 && z2(e);
|
|
2100
2125
|
let re2 = !I2;
|
|
2101
|
-
if (ne2.type ===
|
|
2126
|
+
if (ne2.type === gt.Element) {
|
|
2102
2127
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2103
2128
|
const a2 = e.shadowRoot;
|
|
2104
2129
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2105
2130
|
}
|
|
2106
|
-
if ((ne2.type ===
|
|
2107
|
-
F2.headWhitespace && ne2.type ===
|
|
2131
|
+
if ((ne2.type === gt.Document || ne2.type === gt.Element) && re2) {
|
|
2132
|
+
F2.headWhitespace && ne2.type === gt.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2108
2133
|
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 };
|
|
2109
|
-
if (ne2.type !==
|
|
2134
|
+
if (ne2.type !== gt.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2110
2135
|
const e2 = Se(u2, a2);
|
|
2111
2136
|
e2 && ne2.childNodes.push(e2);
|
|
2112
2137
|
}
|
|
@@ -2115,7 +2140,7 @@ function Se(e, a) {
|
|
|
2115
2140
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2116
2141
|
}
|
|
2117
2142
|
}
|
|
2118
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2143
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === gt.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2119
2144
|
const m3 = e2.contentWindow;
|
|
2120
2145
|
if (!m3) return;
|
|
2121
2146
|
let w3, b3 = false;
|
|
@@ -2141,7 +2166,7 @@ function Se(e, a) {
|
|
|
2141
2166
|
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 });
|
|
2142
2167
|
u2 && j2(e, u2);
|
|
2143
2168
|
}
|
|
2144
|
-
}, V2), ne2.type ===
|
|
2169
|
+
}, V2), ne2.type === gt.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) {
|
|
2145
2170
|
let m3, w3 = false;
|
|
2146
2171
|
try {
|
|
2147
2172
|
m3 = e2.sheet;
|
|
@@ -2181,13 +2206,13 @@ function $i(e) {
|
|
|
2181
2206
|
} });
|
|
2182
2207
|
}), u;
|
|
2183
2208
|
}
|
|
2184
|
-
var
|
|
2185
|
-
return { isColorSupported: false, reset:
|
|
2209
|
+
var Dt = { exports: {} }, Ft = String, Rr = function() {
|
|
2210
|
+
return { isColorSupported: false, reset: Ft, bold: Ft, dim: Ft, italic: Ft, underline: Ft, inverse: Ft, hidden: Ft, strikethrough: Ft, black: Ft, red: Ft, green: Ft, yellow: Ft, blue: Ft, magenta: Ft, cyan: Ft, white: Ft, gray: Ft, bgBlack: Ft, bgRed: Ft, bgGreen: Ft, bgYellow: Ft, bgBlue: Ft, bgMagenta: Ft, bgCyan: Ft, bgWhite: Ft, blackBright: Ft, redBright: Ft, greenBright: Ft, yellowBright: Ft, blueBright: Ft, magentaBright: Ft, cyanBright: Ft, whiteBright: Ft, bgBlackBright: Ft, bgRedBright: Ft, bgGreenBright: Ft, bgYellowBright: Ft, bgBlueBright: Ft, bgMagentaBright: Ft, bgCyanBright: Ft, bgWhiteBright: Ft };
|
|
2186
2211
|
};
|
|
2187
|
-
|
|
2188
|
-
var
|
|
2189
|
-
const
|
|
2190
|
-
let
|
|
2212
|
+
Dt.exports = Rr(), Dt.exports.createColors = Rr;
|
|
2213
|
+
var Ut = Dt.exports;
|
|
2214
|
+
const Bt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2215
|
+
let Wt = Ut, jt = Bt, Vt = class Lr extends Error {
|
|
2191
2216
|
constructor(e, a, u, m2, w2, b2) {
|
|
2192
2217
|
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);
|
|
2193
2218
|
}
|
|
@@ -2197,11 +2222,11 @@ let Vt = Wt, Ht = jt, Kt = class Lr extends Error {
|
|
|
2197
2222
|
showSourceCode(e) {
|
|
2198
2223
|
if (!this.source) return "";
|
|
2199
2224
|
let a = this.source;
|
|
2200
|
-
null == e && (e =
|
|
2225
|
+
null == e && (e = Wt.isColorSupported);
|
|
2201
2226
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2202
2227
|
if (e) {
|
|
2203
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2204
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2228
|
+
let { bold: e2, gray: a2, red: u2 } = Wt.createColors(true);
|
|
2229
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), jt && (i = (e3) => jt(e3));
|
|
2205
2230
|
}
|
|
2206
2231
|
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;
|
|
2207
2232
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2222,10 +2247,10 @@ let Vt = Wt, Ht = jt, Kt = class Lr extends Error {
|
|
|
2222
2247
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2223
2248
|
}
|
|
2224
2249
|
};
|
|
2225
|
-
var
|
|
2226
|
-
|
|
2227
|
-
const
|
|
2228
|
-
let
|
|
2250
|
+
var Ht = Vt;
|
|
2251
|
+
Vt.default = Vt;
|
|
2252
|
+
const Kt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2253
|
+
let Jt = class {
|
|
2229
2254
|
constructor(e) {
|
|
2230
2255
|
this.builder = e;
|
|
2231
2256
|
}
|
|
@@ -2277,7 +2302,7 @@ let Qt = class {
|
|
|
2277
2302
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2278
2303
|
let w2 = e.parent;
|
|
2279
2304
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2280
|
-
if (!w2) return
|
|
2305
|
+
if (!w2) return Kt[u];
|
|
2281
2306
|
let b2 = e.root();
|
|
2282
2307
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2283
2308
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2289,7 +2314,7 @@ let Qt = class {
|
|
|
2289
2314
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2290
2315
|
});
|
|
2291
2316
|
}
|
|
2292
|
-
return typeof m2 > "u" && (m2 =
|
|
2317
|
+
return typeof m2 > "u" && (m2 = Kt[u]), b2.rawCache[u] = m2, m2;
|
|
2293
2318
|
}
|
|
2294
2319
|
rawBeforeClose(e) {
|
|
2295
2320
|
let a;
|
|
@@ -2365,17 +2390,17 @@ let Qt = class {
|
|
|
2365
2390
|
this[e.type](e, a);
|
|
2366
2391
|
}
|
|
2367
2392
|
};
|
|
2368
|
-
var
|
|
2369
|
-
|
|
2370
|
-
let
|
|
2393
|
+
var Xt = Jt;
|
|
2394
|
+
Jt.default = Jt;
|
|
2395
|
+
let Qt = Xt;
|
|
2371
2396
|
function ks(e, a) {
|
|
2372
|
-
new
|
|
2397
|
+
new Qt(a).stringify(e);
|
|
2373
2398
|
}
|
|
2374
|
-
var
|
|
2399
|
+
var en = ks;
|
|
2375
2400
|
ks.default = ks;
|
|
2376
|
-
var
|
|
2377
|
-
|
|
2378
|
-
let
|
|
2401
|
+
var tn = {};
|
|
2402
|
+
tn.isClean = Symbol("isClean"), tn.my = Symbol("my");
|
|
2403
|
+
let nn = Ht, rn = Xt, on = en, { isClean: sn, my: an } = tn;
|
|
2379
2404
|
function Cs(e, a) {
|
|
2380
2405
|
let u = new e.constructor();
|
|
2381
2406
|
for (let m2 in e) {
|
|
@@ -2397,12 +2422,12 @@ function Pe(e, a) {
|
|
|
2397
2422
|
}
|
|
2398
2423
|
return w2;
|
|
2399
2424
|
}
|
|
2400
|
-
let
|
|
2425
|
+
let ln = class {
|
|
2401
2426
|
get proxyOf() {
|
|
2402
2427
|
return this;
|
|
2403
2428
|
}
|
|
2404
2429
|
constructor(e = {}) {
|
|
2405
|
-
this.raws = {}, this[
|
|
2430
|
+
this.raws = {}, this[sn] = false, this[an] = true;
|
|
2406
2431
|
for (let a in e) if ("nodes" === a) {
|
|
2407
2432
|
this.nodes = [];
|
|
2408
2433
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2446,19 +2471,19 @@ let un = class {
|
|
|
2446
2471
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2447
2472
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2448
2473
|
}
|
|
2449
|
-
return new
|
|
2474
|
+
return new nn(e);
|
|
2450
2475
|
}
|
|
2451
2476
|
getProxyProcessor() {
|
|
2452
2477
|
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) };
|
|
2453
2478
|
}
|
|
2454
2479
|
markClean() {
|
|
2455
|
-
this[
|
|
2480
|
+
this[sn] = true;
|
|
2456
2481
|
}
|
|
2457
2482
|
markDirty() {
|
|
2458
|
-
if (this[
|
|
2459
|
-
this[
|
|
2483
|
+
if (this[sn]) {
|
|
2484
|
+
this[sn] = false;
|
|
2460
2485
|
let e = this;
|
|
2461
|
-
for (; e = e.parent; ) e[
|
|
2486
|
+
for (; e = e.parent; ) e[sn] = false;
|
|
2462
2487
|
}
|
|
2463
2488
|
}
|
|
2464
2489
|
next() {
|
|
@@ -2494,7 +2519,7 @@ let un = class {
|
|
|
2494
2519
|
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 };
|
|
2495
2520
|
}
|
|
2496
2521
|
raw(e, a) {
|
|
2497
|
-
return new
|
|
2522
|
+
return new rn().raw(this, e, a);
|
|
2498
2523
|
}
|
|
2499
2524
|
remove() {
|
|
2500
2525
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2531,7 +2556,7 @@ let un = class {
|
|
|
2531
2556
|
toProxy() {
|
|
2532
2557
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2533
2558
|
}
|
|
2534
|
-
toString(e =
|
|
2559
|
+
toString(e = on) {
|
|
2535
2560
|
e.stringify && (e = e.stringify);
|
|
2536
2561
|
let a = "";
|
|
2537
2562
|
return e(this, (e2) => {
|
|
@@ -2544,16 +2569,16 @@ let un = class {
|
|
|
2544
2569
|
return e.warn(a, m2);
|
|
2545
2570
|
}
|
|
2546
2571
|
};
|
|
2547
|
-
var
|
|
2548
|
-
|
|
2549
|
-
let
|
|
2572
|
+
var cn = ln;
|
|
2573
|
+
ln.default = ln;
|
|
2574
|
+
let un = cn, pn = class extends un {
|
|
2550
2575
|
constructor(e) {
|
|
2551
2576
|
super(e), this.type = "comment";
|
|
2552
2577
|
}
|
|
2553
2578
|
};
|
|
2554
|
-
var
|
|
2555
|
-
|
|
2556
|
-
let
|
|
2579
|
+
var dn = pn;
|
|
2580
|
+
pn.default = pn;
|
|
2581
|
+
let hn = cn, fn = class extends hn {
|
|
2557
2582
|
get variable() {
|
|
2558
2583
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2559
2584
|
}
|
|
@@ -2561,16 +2586,16 @@ let mn = pn, gn = class extends mn {
|
|
|
2561
2586
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2562
2587
|
}
|
|
2563
2588
|
};
|
|
2564
|
-
var
|
|
2565
|
-
|
|
2566
|
-
let
|
|
2589
|
+
var mn = fn;
|
|
2590
|
+
fn.default = fn;
|
|
2591
|
+
let gn, yn, wn, Sn, bn = dn, Mn = mn, In = cn, { isClean: _n, my: On } = tn;
|
|
2567
2592
|
function _r(e) {
|
|
2568
2593
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2569
2594
|
}
|
|
2570
2595
|
function Wr(e) {
|
|
2571
|
-
if (e[
|
|
2596
|
+
if (e[_n] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2572
2597
|
}
|
|
2573
|
-
let
|
|
2598
|
+
let En = class zr extends In {
|
|
2574
2599
|
get first() {
|
|
2575
2600
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2576
2601
|
}
|
|
@@ -2622,7 +2647,7 @@ let Rn = class zr extends On {
|
|
|
2622
2647
|
return this.markDirty(), this;
|
|
2623
2648
|
}
|
|
2624
2649
|
normalize(e, a) {
|
|
2625
|
-
if ("string" == typeof e) e = _r(
|
|
2650
|
+
if ("string" == typeof e) e = _r(yn(e).nodes);
|
|
2626
2651
|
else if (typeof e > "u") e = [];
|
|
2627
2652
|
else if (Array.isArray(e)) {
|
|
2628
2653
|
e = e.slice(0);
|
|
@@ -2633,14 +2658,14 @@ let Rn = class zr extends On {
|
|
|
2633
2658
|
} else if (e.type) e = [e];
|
|
2634
2659
|
else if (e.prop) {
|
|
2635
2660
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2636
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2637
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2638
|
-
else if (e.name) e = [new
|
|
2661
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Mn(e)];
|
|
2662
|
+
} else if (e.selector || e.selectors) e = [new Sn(e)];
|
|
2663
|
+
else if (e.name) e = [new gn(e)];
|
|
2639
2664
|
else {
|
|
2640
2665
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2641
|
-
e = [new
|
|
2666
|
+
e = [new bn(e)];
|
|
2642
2667
|
}
|
|
2643
|
-
return e.map((e2) => (e2[
|
|
2668
|
+
return e.map((e2) => (e2[On] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[_n] && 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));
|
|
2644
2669
|
}
|
|
2645
2670
|
prepend(...e) {
|
|
2646
2671
|
e = e.reverse();
|
|
@@ -2716,22 +2741,22 @@ let Rn = class zr extends On {
|
|
|
2716
2741
|
}));
|
|
2717
2742
|
}
|
|
2718
2743
|
};
|
|
2719
|
-
|
|
2744
|
+
En.registerParse = (e) => {
|
|
2745
|
+
yn = e;
|
|
2746
|
+
}, En.registerRule = (e) => {
|
|
2720
2747
|
Sn = e;
|
|
2721
|
-
},
|
|
2722
|
-
|
|
2723
|
-
},
|
|
2748
|
+
}, En.registerAtRule = (e) => {
|
|
2749
|
+
gn = e;
|
|
2750
|
+
}, En.registerRoot = (e) => {
|
|
2724
2751
|
wn = e;
|
|
2725
|
-
}, Rn.registerRoot = (e) => {
|
|
2726
|
-
bn = e;
|
|
2727
2752
|
};
|
|
2728
|
-
var
|
|
2729
|
-
|
|
2730
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2731
|
-
|
|
2753
|
+
var Ln = En;
|
|
2754
|
+
En.default = En, En.rebuild = (e) => {
|
|
2755
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, gn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Sn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Mn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, bn.prototype) : "root" === e.type && Object.setPrototypeOf(e, wn.prototype), e[On] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2756
|
+
En.rebuild(e2);
|
|
2732
2757
|
});
|
|
2733
2758
|
};
|
|
2734
|
-
let
|
|
2759
|
+
let Rn = Ln, An = class extends Rn {
|
|
2735
2760
|
constructor(e) {
|
|
2736
2761
|
super(e), this.type = "atrule";
|
|
2737
2762
|
}
|
|
@@ -2742,38 +2767,38 @@ let Tn = An, Nn = class extends Tn {
|
|
|
2742
2767
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2743
2768
|
}
|
|
2744
2769
|
};
|
|
2745
|
-
var
|
|
2746
|
-
|
|
2747
|
-
let
|
|
2770
|
+
var Tn = An;
|
|
2771
|
+
An.default = An, Rn.registerAtRule(An);
|
|
2772
|
+
let Nn, Pn, Dn = Ln, Fn = class extends Dn {
|
|
2748
2773
|
constructor(e) {
|
|
2749
2774
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2750
2775
|
}
|
|
2751
2776
|
toResult(e = {}) {
|
|
2752
|
-
return new
|
|
2777
|
+
return new Nn(new Pn(), this, e).stringify();
|
|
2753
2778
|
}
|
|
2754
2779
|
};
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2780
|
+
Fn.registerLazyResult = (e) => {
|
|
2781
|
+
Nn = e;
|
|
2782
|
+
}, Fn.registerProcessor = (e) => {
|
|
2783
|
+
Pn = e;
|
|
2759
2784
|
};
|
|
2760
|
-
var
|
|
2761
|
-
|
|
2762
|
-
var
|
|
2785
|
+
var Un = Fn;
|
|
2786
|
+
Fn.default = Fn;
|
|
2787
|
+
var Bn = { nanoid: (e = 21) => {
|
|
2763
2788
|
let a = "", u = 0 | e;
|
|
2764
2789
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2765
2790
|
return a;
|
|
2766
2791
|
} };
|
|
2767
|
-
let { existsSync:
|
|
2768
|
-
let
|
|
2792
|
+
let { existsSync: Wn, readFileSync: zn } = Bt, { dirname: jn, join: Vn } = Bt, { SourceMapConsumer: qn, SourceMapGenerator: Zn } = Bt;
|
|
2793
|
+
let Kn = class {
|
|
2769
2794
|
constructor(e, a) {
|
|
2770
2795
|
if (false === a.map) return;
|
|
2771
2796
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2772
2797
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2773
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2798
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = jn(this.mapFile)), m2 && (this.text = m2);
|
|
2774
2799
|
}
|
|
2775
2800
|
consumer() {
|
|
2776
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2801
|
+
return this.consumerCache || (this.consumerCache = new qn(this.text)), this.consumerCache;
|
|
2777
2802
|
}
|
|
2778
2803
|
decodeInline(e) {
|
|
2779
2804
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2798,15 +2823,15 @@ let nr = class {
|
|
|
2798
2823
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2799
2824
|
}
|
|
2800
2825
|
loadFile(e) {
|
|
2801
|
-
if (this.root =
|
|
2826
|
+
if (this.root = jn(e), Wn(e)) return this.mapFile = e, zn(e, "utf-8").toString().trim();
|
|
2802
2827
|
}
|
|
2803
2828
|
loadMap(e, a) {
|
|
2804
2829
|
if (false === a) return false;
|
|
2805
2830
|
if (a) {
|
|
2806
2831
|
if ("string" == typeof a) return a;
|
|
2807
2832
|
if ("function" != typeof a) {
|
|
2808
|
-
if (a instanceof
|
|
2809
|
-
if (a instanceof
|
|
2833
|
+
if (a instanceof qn) return Zn.fromSourceMap(a).toString();
|
|
2834
|
+
if (a instanceof Zn) return a.toString();
|
|
2810
2835
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2811
2836
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2812
2837
|
}
|
|
@@ -2822,7 +2847,7 @@ let nr = class {
|
|
|
2822
2847
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2823
2848
|
if (this.annotation) {
|
|
2824
2849
|
let a2 = this.annotation;
|
|
2825
|
-
return e && (a2 =
|
|
2850
|
+
return e && (a2 = Vn(jn(e), a2)), this.loadFile(a2);
|
|
2826
2851
|
}
|
|
2827
2852
|
}
|
|
2828
2853
|
}
|
|
@@ -2833,23 +2858,23 @@ let nr = class {
|
|
|
2833
2858
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2834
2859
|
}
|
|
2835
2860
|
};
|
|
2836
|
-
var
|
|
2837
|
-
|
|
2838
|
-
let { nanoid:
|
|
2861
|
+
var Qn = Kn;
|
|
2862
|
+
Kn.default = Kn;
|
|
2863
|
+
let { nanoid: nr } = Bn, { isAbsolute: rr, resolve: or } = Bt, { SourceMapConsumer: sr, SourceMapGenerator: ir } = Bt, { fileURLToPath: ar, pathToFileURL: lr } = Bt, cr = Ht, ur = Qn, pr = Bt, dr = Symbol("fromOffsetCache"), hr = !(!sr || !ir), fr = !(!or || !rr), mr = class {
|
|
2839
2864
|
get from() {
|
|
2840
2865
|
return this.file || this.id;
|
|
2841
2866
|
}
|
|
2842
2867
|
constructor(e, a = {}) {
|
|
2843
2868
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2844
|
-
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 && (!
|
|
2845
|
-
let e2 = new
|
|
2869
|
+
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 && (!fr || /^\w+:\/\//.test(a.from) || rr(a.from) ? this.file = a.from : this.file = or(a.from)), fr && hr) {
|
|
2870
|
+
let e2 = new ur(this.css, a);
|
|
2846
2871
|
if (e2.text) {
|
|
2847
2872
|
this.map = e2;
|
|
2848
2873
|
let a2 = e2.consumer().file;
|
|
2849
2874
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2850
2875
|
}
|
|
2851
2876
|
}
|
|
2852
|
-
this.file || (this.id = "<input css " +
|
|
2877
|
+
this.file || (this.id = "<input css " + nr(6) + ">"), this.map && (this.map.file = this.from);
|
|
2853
2878
|
}
|
|
2854
2879
|
error(e, a, u, m2 = {}) {
|
|
2855
2880
|
let w2, b2, C2;
|
|
@@ -2868,17 +2893,17 @@ let { nanoid: or } = zn, { isAbsolute: sr, resolve: ir } = jt, { SourceMapConsum
|
|
|
2868
2893
|
a = e2.line, u = e2.col;
|
|
2869
2894
|
}
|
|
2870
2895
|
let x2 = this.origin(a, u, b2, w2);
|
|
2871
|
-
return C2 = x2 ? new
|
|
2896
|
+
return C2 = x2 ? new cr(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 cr(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 && (lr && (C2.input.url = lr(this.file).toString()), C2.input.file = this.file), C2;
|
|
2872
2897
|
}
|
|
2873
2898
|
fromOffset(e) {
|
|
2874
2899
|
let a, u;
|
|
2875
|
-
if (this[
|
|
2900
|
+
if (this[dr]) u = this[dr];
|
|
2876
2901
|
else {
|
|
2877
2902
|
let e2 = this.css.split("\n");
|
|
2878
2903
|
u = new Array(e2.length);
|
|
2879
2904
|
let a2 = 0;
|
|
2880
2905
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2881
|
-
this[
|
|
2906
|
+
this[dr] = u;
|
|
2882
2907
|
}
|
|
2883
2908
|
a = u[u.length - 1];
|
|
2884
2909
|
let m2 = 0;
|
|
@@ -2897,17 +2922,17 @@ let { nanoid: or } = zn, { isAbsolute: sr, resolve: ir } = jt, { SourceMapConsum
|
|
|
2897
2922
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2898
2923
|
}
|
|
2899
2924
|
mapResolve(e) {
|
|
2900
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2925
|
+
return /^\w+:\/\//.test(e) ? e : or(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2901
2926
|
}
|
|
2902
2927
|
origin(e, a, u, m2) {
|
|
2903
2928
|
if (!this.map) return false;
|
|
2904
2929
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2905
2930
|
if (!x2.source) return false;
|
|
2906
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2931
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = rr(x2.source) ? lr(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || lr(this.map.mapFile));
|
|
2907
2932
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2908
2933
|
if ("file:" === b2.protocol) {
|
|
2909
|
-
if (!
|
|
2910
|
-
I2.file =
|
|
2934
|
+
if (!ar) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2935
|
+
I2.file = ar(b2);
|
|
2911
2936
|
}
|
|
2912
2937
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2913
2938
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2918,9 +2943,9 @@ let { nanoid: or } = zn, { isAbsolute: sr, resolve: ir } = jt, { SourceMapConsum
|
|
|
2918
2943
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2919
2944
|
}
|
|
2920
2945
|
};
|
|
2921
|
-
var
|
|
2922
|
-
|
|
2923
|
-
let
|
|
2946
|
+
var gr = mr;
|
|
2947
|
+
mr.default = mr, pr && pr.registerInput && pr.registerInput(mr);
|
|
2948
|
+
let yr, wr, Sr = Ln, Cr = class extends Sr {
|
|
2924
2949
|
constructor(e) {
|
|
2925
2950
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2926
2951
|
}
|
|
@@ -2937,29 +2962,29 @@ let Sr, Cr, Ar = An, Tr = class extends Ar {
|
|
|
2937
2962
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2938
2963
|
}
|
|
2939
2964
|
toResult(e = {}) {
|
|
2940
|
-
return new
|
|
2965
|
+
return new yr(new wr(), this, e).stringify();
|
|
2941
2966
|
}
|
|
2942
2967
|
};
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
},
|
|
2946
|
-
|
|
2968
|
+
Cr.registerLazyResult = (e) => {
|
|
2969
|
+
yr = e;
|
|
2970
|
+
}, Cr.registerProcessor = (e) => {
|
|
2971
|
+
wr = e;
|
|
2947
2972
|
};
|
|
2948
|
-
var
|
|
2949
|
-
|
|
2950
|
-
let
|
|
2973
|
+
var Ar = Cr;
|
|
2974
|
+
Cr.default = Cr, Sr.registerRoot(Cr);
|
|
2975
|
+
let Tr = { comma: (e) => Tr.split(e, [","], true), space(e) {
|
|
2951
2976
|
let a = [" ", "\n", " "];
|
|
2952
|
-
return
|
|
2977
|
+
return Tr.split(e, a);
|
|
2953
2978
|
}, split(e, a, u) {
|
|
2954
2979
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2955
2980
|
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;
|
|
2956
2981
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2957
2982
|
} };
|
|
2958
|
-
var
|
|
2959
|
-
|
|
2960
|
-
let
|
|
2983
|
+
var Nr = Tr;
|
|
2984
|
+
Tr.default = Tr;
|
|
2985
|
+
let Pr = Ln, Dr = Nr, Fr = class extends Pr {
|
|
2961
2986
|
get selectors() {
|
|
2962
|
-
return
|
|
2987
|
+
return Dr.comma(this.selector);
|
|
2963
2988
|
}
|
|
2964
2989
|
set selectors(e) {
|
|
2965
2990
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2969,34 +2994,34 @@ let Fr = An, Ur = Dr, Br = class extends Fr {
|
|
|
2969
2994
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2970
2995
|
}
|
|
2971
2996
|
};
|
|
2972
|
-
var
|
|
2973
|
-
|
|
2974
|
-
let
|
|
2997
|
+
var Ur = Fr;
|
|
2998
|
+
Fr.default = Fr, Pr.registerRule(Fr);
|
|
2999
|
+
let Br = Tn, $r = dn, jr = mn, Gr = gr, Vr = Qn, qr = Ar, Hr = Ur;
|
|
2975
3000
|
function Ze(e, a) {
|
|
2976
3001
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2977
3002
|
let { inputs: u, ...m2 } = e;
|
|
2978
3003
|
if (u) {
|
|
2979
3004
|
a = [];
|
|
2980
3005
|
for (let e2 of u) {
|
|
2981
|
-
let u2 = { ...e2, __proto__:
|
|
2982
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
3006
|
+
let u2 = { ...e2, __proto__: Gr.prototype };
|
|
3007
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Vr.prototype }), a.push(u2);
|
|
2983
3008
|
}
|
|
2984
3009
|
}
|
|
2985
3010
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2986
3011
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2987
3012
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2988
3013
|
}
|
|
2989
|
-
if ("root" === m2.type) return new
|
|
2990
|
-
if ("decl" === m2.type) return new
|
|
2991
|
-
if ("rule" === m2.type) return new
|
|
2992
|
-
if ("comment" === m2.type) return new
|
|
2993
|
-
if ("atrule" === m2.type) return new
|
|
3014
|
+
if ("root" === m2.type) return new qr(m2);
|
|
3015
|
+
if ("decl" === m2.type) return new jr(m2);
|
|
3016
|
+
if ("rule" === m2.type) return new Hr(m2);
|
|
3017
|
+
if ("comment" === m2.type) return new $r(m2);
|
|
3018
|
+
if ("atrule" === m2.type) return new Br(m2);
|
|
2994
3019
|
throw new Error("Unknown node type: " + e.type);
|
|
2995
3020
|
}
|
|
2996
|
-
var
|
|
3021
|
+
var Zr = Ze;
|
|
2997
3022
|
Ze.default = Ze;
|
|
2998
|
-
let { dirname:
|
|
2999
|
-
var
|
|
3023
|
+
let { dirname: Kr, relative: Jr, resolve: Yr, sep: Xr } = Bt, { SourceMapConsumer: Qr, SourceMapGenerator: eo } = Bt, { pathToFileURL: to } = Bt, oo = gr, io = !(!Qr || !eo), ao = !!(Kr && Yr && Jr && Xr);
|
|
3024
|
+
var lo = class {
|
|
3000
3025
|
constructor(e, a, u, m2) {
|
|
3001
3026
|
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();
|
|
3002
3027
|
}
|
|
@@ -3008,8 +3033,8 @@ var uo = class {
|
|
|
3008
3033
|
}
|
|
3009
3034
|
applyPrevMaps() {
|
|
3010
3035
|
for (let e of this.previous()) {
|
|
3011
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
3012
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
3036
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Kr(e.file);
|
|
3037
|
+
false === this.mapOpts.sourcesContent ? (a = new Qr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
3013
3038
|
}
|
|
3014
3039
|
}
|
|
3015
3040
|
clearAnnotation() {
|
|
@@ -3019,7 +3044,7 @@ var uo = class {
|
|
|
3019
3044
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
3020
3045
|
}
|
|
3021
3046
|
generate() {
|
|
3022
|
-
if (this.clearAnnotation(),
|
|
3047
|
+
if (this.clearAnnotation(), ao && io && this.isMap()) return this.generateMap();
|
|
3023
3048
|
{
|
|
3024
3049
|
let e = "";
|
|
3025
3050
|
return this.stringify(this.root, (a) => {
|
|
@@ -3031,12 +3056,12 @@ var uo = class {
|
|
|
3031
3056
|
if (this.root) this.generateString();
|
|
3032
3057
|
else if (1 === this.previous().length) {
|
|
3033
3058
|
let e = this.previous()[0].consumer();
|
|
3034
|
-
e.file = this.outputFile(), this.map =
|
|
3035
|
-
} else this.map = new
|
|
3059
|
+
e.file = this.outputFile(), this.map = eo.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3060
|
+
} else this.map = new eo({ 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>" });
|
|
3036
3061
|
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];
|
|
3037
3062
|
}
|
|
3038
3063
|
generateString() {
|
|
3039
|
-
this.css = "", this.map = new
|
|
3064
|
+
this.css = "", this.map = new eo({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
3040
3065
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
3041
3066
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
3042
3067
|
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) {
|
|
@@ -3066,9 +3091,9 @@ var uo = class {
|
|
|
3066
3091
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3067
3092
|
let a = this.memoizedPaths.get(e);
|
|
3068
3093
|
if (a) return a;
|
|
3069
|
-
let u = this.opts.to ?
|
|
3070
|
-
"string" == typeof this.mapOpts.annotation && (u = Yr(
|
|
3071
|
-
let m2 =
|
|
3094
|
+
let u = this.opts.to ? Kr(this.opts.to) : ".";
|
|
3095
|
+
"string" == typeof this.mapOpts.annotation && (u = Kr(Yr(u, this.mapOpts.annotation)));
|
|
3096
|
+
let m2 = Jr(u, e);
|
|
3072
3097
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3073
3098
|
}
|
|
3074
3099
|
previous() {
|
|
@@ -3079,7 +3104,7 @@ var uo = class {
|
|
|
3079
3104
|
}
|
|
3080
3105
|
});
|
|
3081
3106
|
else {
|
|
3082
|
-
let e = new
|
|
3107
|
+
let e = new oo(this.originalCSS, this.opts);
|
|
3083
3108
|
e.map && this.previousMaps.push(e.map);
|
|
3084
3109
|
}
|
|
3085
3110
|
return this.previousMaps;
|
|
@@ -3110,8 +3135,8 @@ var uo = class {
|
|
|
3110
3135
|
toFileUrl(e) {
|
|
3111
3136
|
let a = this.memoizedFileURLs.get(e);
|
|
3112
3137
|
if (a) return a;
|
|
3113
|
-
if (
|
|
3114
|
-
let a2 =
|
|
3138
|
+
if (to) {
|
|
3139
|
+
let a2 = to(e).toString();
|
|
3115
3140
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3116
3141
|
}
|
|
3117
3142
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3119,13 +3144,13 @@ var uo = class {
|
|
|
3119
3144
|
toUrl(e) {
|
|
3120
3145
|
let a = this.memoizedURLs.get(e);
|
|
3121
3146
|
if (a) return a;
|
|
3122
|
-
"\\" ===
|
|
3147
|
+
"\\" === Xr && (e = e.replace(/\\/g, "/"));
|
|
3123
3148
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3124
3149
|
return this.memoizedURLs.set(e, u), u;
|
|
3125
3150
|
}
|
|
3126
3151
|
};
|
|
3127
|
-
const
|
|
3128
|
-
let
|
|
3152
|
+
const co = /[\t\n\f\r "#'()/;[\\\]{}]/g, uo = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, ho = /.[\r\n"'(/\\]/, Mo = /[\da-f]/i;
|
|
3153
|
+
let _o = Tn, Ao = dn, No = mn, Po = Ar, Do = Ur, Xa = function(e, a = {}) {
|
|
3129
3154
|
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 = [];
|
|
3130
3155
|
function y2(a2) {
|
|
3131
3156
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3175,7 +3200,7 @@ let No = Pn, Po = fn, Do = yn, Fo = Nr, Uo = $r, Xa = function(e, a = {}) {
|
|
|
3175
3200
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3176
3201
|
} while (I2);
|
|
3177
3202
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3178
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3203
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || ho.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3179
3204
|
break;
|
|
3180
3205
|
case 39:
|
|
3181
3206
|
case 34:
|
|
@@ -3193,31 +3218,31 @@ let No = Pn, Po = fn, Do = yn, Fo = Nr, Uo = $r, Xa = function(e, a = {}) {
|
|
|
3193
3218
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3194
3219
|
break;
|
|
3195
3220
|
case 64:
|
|
3196
|
-
|
|
3221
|
+
co.lastIndex = B2 + 1, co.test(D2), b2 = 0 === co.lastIndex ? D2.length - 1 : co.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3197
3222
|
break;
|
|
3198
3223
|
case 92:
|
|
3199
3224
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3200
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3201
|
-
for (;
|
|
3225
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, Mo.test(D2.charAt(b2)))) {
|
|
3226
|
+
for (; Mo.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3202
3227
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3203
3228
|
}
|
|
3204
3229
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3205
3230
|
break;
|
|
3206
3231
|
default:
|
|
3207
|
-
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) : (
|
|
3232
|
+
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) : (uo.lastIndex = B2 + 1, uo.test(D2), b2 = 0 === uo.lastIndex ? D2.length - 1 : uo.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3208
3233
|
}
|
|
3209
3234
|
return B2++, x2;
|
|
3210
3235
|
}, position: function S() {
|
|
3211
3236
|
return B2;
|
|
3212
3237
|
} };
|
|
3213
3238
|
};
|
|
3214
|
-
const
|
|
3215
|
-
var
|
|
3239
|
+
const Fo = { empty: true, space: true };
|
|
3240
|
+
var Uo = class {
|
|
3216
3241
|
constructor(e) {
|
|
3217
|
-
this.input = e, this.root = new
|
|
3242
|
+
this.input = e, this.root = new Po(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3218
3243
|
}
|
|
3219
3244
|
atrule(e) {
|
|
3220
|
-
let a = new
|
|
3245
|
+
let a = new _o();
|
|
3221
3246
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3222
3247
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3223
3248
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3269,7 +3294,7 @@ var jo = class {
|
|
|
3269
3294
|
return false;
|
|
3270
3295
|
}
|
|
3271
3296
|
comment(e) {
|
|
3272
|
-
let a = new
|
|
3297
|
+
let a = new Ao();
|
|
3273
3298
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3274
3299
|
let u = e[1].slice(2, -2);
|
|
3275
3300
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3282,7 +3307,7 @@ var jo = class {
|
|
|
3282
3307
|
this.tokenizer = Xa(this.input);
|
|
3283
3308
|
}
|
|
3284
3309
|
decl(e, a) {
|
|
3285
|
-
let u = new
|
|
3310
|
+
let u = new No();
|
|
3286
3311
|
this.init(u, e[0][2]);
|
|
3287
3312
|
let m2, w2 = e[e.length - 1];
|
|
3288
3313
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3331,7 +3356,7 @@ var jo = class {
|
|
|
3331
3356
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3332
3357
|
}
|
|
3333
3358
|
emptyRule(e) {
|
|
3334
|
-
let a = new
|
|
3359
|
+
let a = new Do();
|
|
3335
3360
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3336
3361
|
}
|
|
3337
3362
|
end(e) {
|
|
@@ -3407,7 +3432,7 @@ var jo = class {
|
|
|
3407
3432
|
}
|
|
3408
3433
|
raw(e, a, u, m2) {
|
|
3409
3434
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3410
|
-
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",
|
|
3435
|
+
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", Fo[x2] || Fo[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3411
3436
|
if (!O2) {
|
|
3412
3437
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3413
3438
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3416,7 +3441,7 @@ var jo = class {
|
|
|
3416
3441
|
}
|
|
3417
3442
|
rule(e) {
|
|
3418
3443
|
e.pop();
|
|
3419
|
-
let a = new
|
|
3444
|
+
let a = new Do();
|
|
3420
3445
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3421
3446
|
}
|
|
3422
3447
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3456,9 +3481,9 @@ var jo = class {
|
|
|
3456
3481
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3457
3482
|
}
|
|
3458
3483
|
};
|
|
3459
|
-
let
|
|
3484
|
+
let $o = Ln, jo = gr, Go = Uo;
|
|
3460
3485
|
function _t(e, a) {
|
|
3461
|
-
let u = new
|
|
3486
|
+
let u = new jo(e, a), m2 = new Go(u);
|
|
3462
3487
|
try {
|
|
3463
3488
|
m2.parse();
|
|
3464
3489
|
} catch (e2) {
|
|
@@ -3466,9 +3491,9 @@ function _t(e, a) {
|
|
|
3466
3491
|
}
|
|
3467
3492
|
return m2.root;
|
|
3468
3493
|
}
|
|
3469
|
-
var
|
|
3470
|
-
_t.default = _t,
|
|
3471
|
-
let
|
|
3494
|
+
var Vo = _t;
|
|
3495
|
+
_t.default = _t, $o.registerParse(_t);
|
|
3496
|
+
let qo = class {
|
|
3472
3497
|
constructor(e, a = {}) {
|
|
3473
3498
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3474
3499
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3480,9 +3505,9 @@ let Zo = class {
|
|
|
3480
3505
|
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;
|
|
3481
3506
|
}
|
|
3482
3507
|
};
|
|
3483
|
-
var
|
|
3484
|
-
|
|
3485
|
-
let
|
|
3508
|
+
var Ho = qo;
|
|
3509
|
+
qo.default = qo;
|
|
3510
|
+
let Zo = Ho, Ko = class {
|
|
3486
3511
|
get content() {
|
|
3487
3512
|
return this.css;
|
|
3488
3513
|
}
|
|
@@ -3494,26 +3519,26 @@ let Jo = Ko, Yo = class {
|
|
|
3494
3519
|
}
|
|
3495
3520
|
warn(e, a = {}) {
|
|
3496
3521
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3497
|
-
let u = new
|
|
3522
|
+
let u = new Zo(e, a);
|
|
3498
3523
|
return this.messages.push(u), u;
|
|
3499
3524
|
}
|
|
3500
3525
|
warnings() {
|
|
3501
3526
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3502
3527
|
}
|
|
3503
3528
|
};
|
|
3504
|
-
var
|
|
3505
|
-
|
|
3506
|
-
let
|
|
3529
|
+
var Jo = Ko;
|
|
3530
|
+
Ko.default = Ko;
|
|
3531
|
+
let Yo = {};
|
|
3507
3532
|
var so = function(e) {
|
|
3508
|
-
|
|
3533
|
+
Yo[e] || (Yo[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3509
3534
|
};
|
|
3510
|
-
let
|
|
3511
|
-
const
|
|
3535
|
+
let Xo = Ln, Qo = Un, es = lo, ts = Vo, ns = Jo, rs = Ar, os = en, { isClean: ss, my: is } = tn, as = so;
|
|
3536
|
+
const ls = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, cs = { 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 }, us = { Once: true, postcssPlugin: true, prepare: true };
|
|
3512
3537
|
function Ne(e) {
|
|
3513
3538
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3514
3539
|
}
|
|
3515
3540
|
function no(e) {
|
|
3516
|
-
let a = false, u =
|
|
3541
|
+
let a = false, u = ls[e.type];
|
|
3517
3542
|
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"];
|
|
3518
3543
|
}
|
|
3519
3544
|
function Gn(e) {
|
|
@@ -3521,9 +3546,9 @@ function Gn(e) {
|
|
|
3521
3546
|
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: [] };
|
|
3522
3547
|
}
|
|
3523
3548
|
function Ps(e) {
|
|
3524
|
-
return e[
|
|
3549
|
+
return e[ss] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3525
3550
|
}
|
|
3526
|
-
let
|
|
3551
|
+
let ps = {}, ds = class ro {
|
|
3527
3552
|
get content() {
|
|
3528
3553
|
return this.stringify().content;
|
|
3529
3554
|
}
|
|
@@ -3550,19 +3575,19 @@ let hs = {}, ms = class ro {
|
|
|
3550
3575
|
}
|
|
3551
3576
|
constructor(e, a, u) {
|
|
3552
3577
|
let m2;
|
|
3553
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3578
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof ns) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3554
3579
|
else {
|
|
3555
|
-
let e2 =
|
|
3580
|
+
let e2 = ts;
|
|
3556
3581
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3557
3582
|
try {
|
|
3558
3583
|
m2 = e2(a, u);
|
|
3559
3584
|
} catch (e3) {
|
|
3560
3585
|
this.processed = true, this.error = e3;
|
|
3561
3586
|
}
|
|
3562
|
-
m2 && !m2[
|
|
3587
|
+
m2 && !m2[is] && Xo.rebuild(m2);
|
|
3563
3588
|
}
|
|
3564
3589
|
else m2 = Ps(a);
|
|
3565
|
-
this.result = new
|
|
3590
|
+
this.result = new ns(e, m2, u), this.helpers = { ...ps, postcss: ps, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3566
3591
|
}
|
|
3567
3592
|
async() {
|
|
3568
3593
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3596,8 +3621,8 @@ let hs = {}, ms = class ro {
|
|
|
3596
3621
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3597
3622
|
};
|
|
3598
3623
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3599
|
-
if (!
|
|
3600
|
-
if (!
|
|
3624
|
+
if (!cs[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3625
|
+
if (!us[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3601
3626
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3602
3627
|
}
|
|
3603
3628
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3614,8 +3639,8 @@ let hs = {}, ms = class ro {
|
|
|
3614
3639
|
}
|
|
3615
3640
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3616
3641
|
let e = this.result.root;
|
|
3617
|
-
for (; !e[
|
|
3618
|
-
e[
|
|
3642
|
+
for (; !e[ss]; ) {
|
|
3643
|
+
e[ss] = true;
|
|
3619
3644
|
let a = [Gn(e)];
|
|
3620
3645
|
for (; a.length > 0; ) {
|
|
3621
3646
|
let e2 = this.visitTick(a);
|
|
@@ -3660,9 +3685,9 @@ let hs = {}, ms = class ro {
|
|
|
3660
3685
|
if (this.error) throw this.error;
|
|
3661
3686
|
if (this.stringified) return this.result;
|
|
3662
3687
|
this.stringified = true, this.sync();
|
|
3663
|
-
let e = this.result.opts, a =
|
|
3688
|
+
let e = this.result.opts, a = os;
|
|
3664
3689
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3665
|
-
let u = new
|
|
3690
|
+
let u = new es(a, this.result.root, this.result.opts).generate();
|
|
3666
3691
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3667
3692
|
}
|
|
3668
3693
|
sync() {
|
|
@@ -3674,14 +3699,14 @@ let hs = {}, ms = class ro {
|
|
|
3674
3699
|
}
|
|
3675
3700
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3676
3701
|
let e = this.result.root;
|
|
3677
|
-
for (; !e[
|
|
3702
|
+
for (; !e[ss]; ) e[ss] = true, this.walkSync(e);
|
|
3678
3703
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3679
3704
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3680
3705
|
}
|
|
3681
3706
|
return this.result;
|
|
3682
3707
|
}
|
|
3683
3708
|
then(e, a) {
|
|
3684
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3709
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || as("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);
|
|
3685
3710
|
}
|
|
3686
3711
|
toString() {
|
|
3687
3712
|
return this.css;
|
|
@@ -3713,22 +3738,22 @@ let hs = {}, ms = class ro {
|
|
|
3713
3738
|
}
|
|
3714
3739
|
if (0 !== a.iterator) {
|
|
3715
3740
|
let m3, w3 = a.iterator;
|
|
3716
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3741
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[ss]) return m3[ss] = true, void e.push(Gn(m3));
|
|
3717
3742
|
a.iterator = 0, delete u.indexes[w3];
|
|
3718
3743
|
}
|
|
3719
3744
|
let w2 = a.events;
|
|
3720
3745
|
for (; a.eventIndex < w2.length; ) {
|
|
3721
3746
|
let e2 = w2[a.eventIndex];
|
|
3722
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3747
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[ss] = true, a.iterator = u.getIterator()));
|
|
3723
3748
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3724
3749
|
}
|
|
3725
3750
|
e.pop();
|
|
3726
3751
|
}
|
|
3727
3752
|
walkSync(e) {
|
|
3728
|
-
e[
|
|
3753
|
+
e[ss] = true;
|
|
3729
3754
|
let a = no(e);
|
|
3730
3755
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3731
|
-
e2[
|
|
3756
|
+
e2[ss] || this.walkSync(e2);
|
|
3732
3757
|
});
|
|
3733
3758
|
else {
|
|
3734
3759
|
let a2 = this.listeners[u];
|
|
@@ -3739,14 +3764,14 @@ let hs = {}, ms = class ro {
|
|
|
3739
3764
|
return this.sync().warnings();
|
|
3740
3765
|
}
|
|
3741
3766
|
};
|
|
3742
|
-
|
|
3743
|
-
|
|
3767
|
+
ds.registerPostcss = (e) => {
|
|
3768
|
+
ps = e;
|
|
3744
3769
|
};
|
|
3745
|
-
var
|
|
3746
|
-
|
|
3747
|
-
let
|
|
3748
|
-
const
|
|
3749
|
-
let
|
|
3770
|
+
var hs = ds;
|
|
3771
|
+
ds.default = ds, rs.registerLazyResult(ds), Qo.registerLazyResult(ds);
|
|
3772
|
+
let ms = lo, gs = Vo;
|
|
3773
|
+
const ys = Jo;
|
|
3774
|
+
let ws = en, Ss = so, bs = class {
|
|
3750
3775
|
get content() {
|
|
3751
3776
|
return this.result.css;
|
|
3752
3777
|
}
|
|
@@ -3767,7 +3792,7 @@ let bs = nn, vs = so, xs = class {
|
|
|
3767
3792
|
}
|
|
3768
3793
|
get root() {
|
|
3769
3794
|
if (this._root) return this._root;
|
|
3770
|
-
let e, a =
|
|
3795
|
+
let e, a = gs;
|
|
3771
3796
|
try {
|
|
3772
3797
|
e = a(this._css, this._opts);
|
|
3773
3798
|
} catch (e2) {
|
|
@@ -3781,11 +3806,11 @@ let bs = nn, vs = so, xs = class {
|
|
|
3781
3806
|
}
|
|
3782
3807
|
constructor(e, a, u) {
|
|
3783
3808
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3784
|
-
let m2, w2 =
|
|
3785
|
-
this.result = new
|
|
3809
|
+
let m2, w2 = ws;
|
|
3810
|
+
this.result = new ys(this._processor, m2, this._opts), this.result.css = a;
|
|
3786
3811
|
let b2 = this;
|
|
3787
3812
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3788
|
-
let C2 = new
|
|
3813
|
+
let C2 = new ms(w2, m2, this._opts, a);
|
|
3789
3814
|
if (C2.isMap()) {
|
|
3790
3815
|
let [e2, a2] = C2.generate();
|
|
3791
3816
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3805,7 +3830,7 @@ let bs = nn, vs = so, xs = class {
|
|
|
3805
3830
|
return this.result;
|
|
3806
3831
|
}
|
|
3807
3832
|
then(e, a) {
|
|
3808
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3833
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || Ss("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);
|
|
3809
3834
|
}
|
|
3810
3835
|
toString() {
|
|
3811
3836
|
return this._css;
|
|
@@ -3814,9 +3839,9 @@ let bs = nn, vs = so, xs = class {
|
|
|
3814
3839
|
return [];
|
|
3815
3840
|
}
|
|
3816
3841
|
};
|
|
3817
|
-
var
|
|
3818
|
-
|
|
3819
|
-
let
|
|
3842
|
+
var vs = bs;
|
|
3843
|
+
bs.default = bs;
|
|
3844
|
+
let xs = Un, Ms = hs, Is = vs, _s = Ar, Os = class {
|
|
3820
3845
|
constructor(e = []) {
|
|
3821
3846
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3822
3847
|
}
|
|
@@ -3832,43 +3857,43 @@ let Is = Wn, _s = gs, Os = Ms, Es = Nr, Ls = class {
|
|
|
3832
3857
|
return a;
|
|
3833
3858
|
}
|
|
3834
3859
|
process(e, a = {}) {
|
|
3835
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3860
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Ms(this, e, a) : new Is(this, e, a);
|
|
3836
3861
|
}
|
|
3837
3862
|
use(e) {
|
|
3838
3863
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3839
3864
|
}
|
|
3840
3865
|
};
|
|
3841
|
-
var
|
|
3842
|
-
|
|
3843
|
-
let As =
|
|
3866
|
+
var Es = Os;
|
|
3867
|
+
Os.default = Os, _s.registerProcessor(Os), xs.registerProcessor(Os);
|
|
3868
|
+
let Ls = Tn, Rs = dn, As = Ln, Ts = Ht, Ns = mn, $s = Un, Ws = Zr, js = gr, Gs = hs, Vs = Nr, qs = cn, Hs = Vo, Zs = Es, Ks = Jo, Ys = Ar, Xs = Ur, Qs = en, ei = Ho;
|
|
3844
3869
|
function L$1(...e) {
|
|
3845
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3870
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Zs(e);
|
|
3846
3871
|
}
|
|
3847
3872
|
L$1.plugin = function(e, a) {
|
|
3848
3873
|
let u, m2 = false;
|
|
3849
3874
|
function n(...u2) {
|
|
3850
3875
|
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"));
|
|
3851
3876
|
let w2 = a(...u2);
|
|
3852
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3877
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Zs().version, w2;
|
|
3853
3878
|
}
|
|
3854
3879
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3855
3880
|
return L$1([n(u2)]).process(e2, a2);
|
|
3856
3881
|
}, n;
|
|
3857
|
-
}, L$1.stringify =
|
|
3858
|
-
var
|
|
3882
|
+
}, L$1.stringify = Qs, L$1.parse = Hs, L$1.fromJSON = Ws, L$1.list = Vs, L$1.comment = (e) => new Rs(e), L$1.atRule = (e) => new Ls(e), L$1.decl = (e) => new Ns(e), L$1.rule = (e) => new Xs(e), L$1.root = (e) => new Ys(e), L$1.document = (e) => new $s(e), L$1.CssSyntaxError = Ts, L$1.Declaration = Ns, L$1.Container = As, L$1.Processor = Zs, L$1.Document = $s, L$1.Comment = Rs, L$1.Warning = ei, L$1.AtRule = Ls, L$1.Result = Ks, L$1.Input = js, L$1.Rule = Xs, L$1.Root = Ys, L$1.Node = qs, Gs.registerPostcss(L$1);
|
|
3883
|
+
var ti = L$1;
|
|
3859
3884
|
L$1.default = L$1;
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3862
|
-
var
|
|
3885
|
+
const si = Yi(ti);
|
|
3886
|
+
si.stringify, si.fromJSON, si.plugin, si.parse, si.list, si.document, si.comment, si.atRule, si.rule, si.decl, si.root, si.CssSyntaxError, si.Declaration, si.Container, si.Processor, si.Document, si.Comment, si.Warning, si.AtRule, si.Result, si.Input, si.Rule, si.Root, si.Node;
|
|
3887
|
+
var ii = ((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))(ii || {}), ai = ((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))(ai || {}), li = ((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))(li || {}), ci = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(ci || {}), ui = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ui || {}), pi = ((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))(pi || {});
|
|
3863
3888
|
function G(e, a, u = document) {
|
|
3864
3889
|
const m2 = { capture: true, passive: true };
|
|
3865
3890
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3866
3891
|
}
|
|
3867
|
-
const
|
|
3868
|
-
let
|
|
3869
|
-
console.error(
|
|
3870
|
-
}, has: () => (console.error(
|
|
3871
|
-
console.error(
|
|
3892
|
+
const di = "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.";
|
|
3893
|
+
let hi = { map: {}, getId: () => (console.error(di), -1), getNode: () => (console.error(di), null), removeNodeFromMap() {
|
|
3894
|
+
console.error(di);
|
|
3895
|
+
}, has: () => (console.error(di), false), reset() {
|
|
3896
|
+
console.error(di);
|
|
3872
3897
|
} };
|
|
3873
3898
|
function $e(e, a, u = {}) {
|
|
3874
3899
|
let m2 = null, w2 = 0;
|
|
@@ -3902,8 +3927,8 @@ function Re(e, a, u) {
|
|
|
3902
3927
|
};
|
|
3903
3928
|
}
|
|
3904
3929
|
}
|
|
3905
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3906
|
-
let
|
|
3930
|
+
typeof window < "u" && window.Proxy && window.Reflect && (hi = new Proxy(hi, { get: (e, a, u) => ("map" === a && console.error(di), Reflect.get(e, a, u)) }));
|
|
3931
|
+
let fi, mi = Date.now;
|
|
3907
3932
|
function po(e) {
|
|
3908
3933
|
var a, u, m2, w2, b2, C2;
|
|
3909
3934
|
const x2 = e.document;
|
|
@@ -3950,7 +3975,7 @@ function bo(e, a) {
|
|
|
3950
3975
|
function Fs(e) {
|
|
3951
3976
|
return !(null == e || !e.shadowRoot);
|
|
3952
3977
|
}
|
|
3953
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3978
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (mi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3954
3979
|
class _l {
|
|
3955
3980
|
constructor() {
|
|
3956
3981
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3995,11 +4020,11 @@ function vo(e) {
|
|
|
3995
4020
|
const a = e.ownerDocument;
|
|
3996
4021
|
return !!a && (a.contains(e) || zl(e));
|
|
3997
4022
|
}
|
|
3998
|
-
const M = (e) =>
|
|
4023
|
+
const M = (e) => fi ? (...a) => {
|
|
3999
4024
|
try {
|
|
4000
4025
|
return e(...a);
|
|
4001
4026
|
} catch (e2) {
|
|
4002
|
-
if (
|
|
4027
|
+
if (fi && true === fi(e2)) return;
|
|
4003
4028
|
throw e2;
|
|
4004
4029
|
}
|
|
4005
4030
|
} : e;
|
|
@@ -4058,22 +4083,22 @@ class Vl {
|
|
|
4058
4083
|
transformCrossOriginEvent(e, a) {
|
|
4059
4084
|
var u;
|
|
4060
4085
|
switch (a.type) {
|
|
4061
|
-
case
|
|
4086
|
+
case ii.FullSnapshot: {
|
|
4062
4087
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4063
4088
|
const u2 = a.data.node.id;
|
|
4064
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4089
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: ii.IncrementalSnapshot, data: { source: ai.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4065
4090
|
}
|
|
4066
|
-
case
|
|
4067
|
-
case
|
|
4068
|
-
case
|
|
4091
|
+
case ii.Meta:
|
|
4092
|
+
case ii.Load:
|
|
4093
|
+
case ii.DomContentLoaded:
|
|
4069
4094
|
return false;
|
|
4070
|
-
case
|
|
4095
|
+
case ii.Plugin:
|
|
4071
4096
|
return a;
|
|
4072
|
-
case
|
|
4097
|
+
case ii.Custom:
|
|
4073
4098
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4074
|
-
case
|
|
4099
|
+
case ii.IncrementalSnapshot:
|
|
4075
4100
|
switch (a.data.source) {
|
|
4076
|
-
case
|
|
4101
|
+
case ai.Mutation:
|
|
4077
4102
|
return a.data.adds.forEach((a2) => {
|
|
4078
4103
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4079
4104
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4085,30 +4110,30 @@ class Vl {
|
|
|
4085
4110
|
}), a.data.texts.forEach((a2) => {
|
|
4086
4111
|
this.replaceIds(a2, e, ["id"]);
|
|
4087
4112
|
}), a;
|
|
4088
|
-
case
|
|
4089
|
-
case
|
|
4090
|
-
case
|
|
4113
|
+
case ai.Drag:
|
|
4114
|
+
case ai.TouchMove:
|
|
4115
|
+
case ai.MouseMove:
|
|
4091
4116
|
return a.data.positions.forEach((a2) => {
|
|
4092
4117
|
this.replaceIds(a2, e, ["id"]);
|
|
4093
4118
|
}), a;
|
|
4094
|
-
case
|
|
4119
|
+
case ai.ViewportResize:
|
|
4095
4120
|
return false;
|
|
4096
|
-
case
|
|
4097
|
-
case
|
|
4098
|
-
case
|
|
4099
|
-
case
|
|
4100
|
-
case
|
|
4121
|
+
case ai.MediaInteraction:
|
|
4122
|
+
case ai.MouseInteraction:
|
|
4123
|
+
case ai.Scroll:
|
|
4124
|
+
case ai.CanvasMutation:
|
|
4125
|
+
case ai.Input:
|
|
4101
4126
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4102
|
-
case
|
|
4103
|
-
case
|
|
4127
|
+
case ai.StyleSheetRule:
|
|
4128
|
+
case ai.StyleDeclaration:
|
|
4104
4129
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4105
|
-
case
|
|
4130
|
+
case ai.Font:
|
|
4106
4131
|
return a;
|
|
4107
|
-
case
|
|
4132
|
+
case ai.Selection:
|
|
4108
4133
|
return a.data.ranges.forEach((a2) => {
|
|
4109
4134
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4110
4135
|
}), a;
|
|
4111
|
-
case
|
|
4136
|
+
case ai.AdoptedStyleSheet:
|
|
4112
4137
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4113
4138
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4114
4139
|
}), a;
|
|
@@ -4132,7 +4157,7 @@ class Vl {
|
|
|
4132
4157
|
});
|
|
4133
4158
|
}
|
|
4134
4159
|
patchRootIdOnNode(e, a) {
|
|
4135
|
-
e.type !==
|
|
4160
|
+
e.type !== gt.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4136
4161
|
this.patchRootIdOnNode(e2, a);
|
|
4137
4162
|
});
|
|
4138
4163
|
}
|
|
@@ -4350,7 +4375,7 @@ function ko(e, a) {
|
|
|
4350
4375
|
const { parentNode: u } = a;
|
|
4351
4376
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4352
4377
|
}
|
|
4353
|
-
const
|
|
4378
|
+
const gi = [];
|
|
4354
4379
|
function tt(e) {
|
|
4355
4380
|
try {
|
|
4356
4381
|
if ("composedPath" in e) {
|
|
@@ -4364,7 +4389,7 @@ function tt(e) {
|
|
|
4364
4389
|
function Co(e, a) {
|
|
4365
4390
|
var u, m2;
|
|
4366
4391
|
const w2 = new Zl();
|
|
4367
|
-
|
|
4392
|
+
gi.push(w2), w2.init(e);
|
|
4368
4393
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4369
4394
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4370
4395
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4376,7 +4401,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4376
4401
|
};
|
|
4377
4402
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4378
4403
|
let I2 = null;
|
|
4379
|
-
return Object.keys(
|
|
4404
|
+
return Object.keys(li).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4380
4405
|
let C3 = fe(b3);
|
|
4381
4406
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4382
4407
|
const C4 = tt(b4);
|
|
@@ -4385,29 +4410,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4385
4410
|
if ("pointerType" in b4) {
|
|
4386
4411
|
switch (b4.pointerType) {
|
|
4387
4412
|
case "mouse":
|
|
4388
|
-
x3 =
|
|
4413
|
+
x3 = ci.Mouse;
|
|
4389
4414
|
break;
|
|
4390
4415
|
case "touch":
|
|
4391
|
-
x3 =
|
|
4416
|
+
x3 = ci.Touch;
|
|
4392
4417
|
break;
|
|
4393
4418
|
case "pen":
|
|
4394
|
-
x3 =
|
|
4419
|
+
x3 = ci.Pen;
|
|
4395
4420
|
}
|
|
4396
|
-
x3 ===
|
|
4397
|
-
} else Ds(b4) && (x3 =
|
|
4398
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4421
|
+
x3 === ci.Touch ? li[a2] === li.MouseDown ? _3 = "TouchStart" : li[a2] === li.MouseUp && (_3 = "TouchEnd") : ci.Pen;
|
|
4422
|
+
} else Ds(b4) && (x3 = ci.Touch);
|
|
4423
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === ci.Touch || _3.startsWith("Mouse") && x3 === ci.Mouse) && (x3 = null)) : li[a2] === li.Click && (x3 = I2, I2 = null);
|
|
4399
4424
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4400
4425
|
if (!O2) return;
|
|
4401
4426
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4402
|
-
M(e)({ type:
|
|
4427
|
+
M(e)({ type: li[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4403
4428
|
})(b3);
|
|
4404
|
-
if (window.PointerEvent) switch (
|
|
4405
|
-
case
|
|
4406
|
-
case
|
|
4429
|
+
if (window.PointerEvent) switch (li[b3]) {
|
|
4430
|
+
case li.MouseDown:
|
|
4431
|
+
case li.MouseUp:
|
|
4407
4432
|
C3 = C3.replace("mouse", "pointer");
|
|
4408
4433
|
break;
|
|
4409
|
-
case
|
|
4410
|
-
case
|
|
4434
|
+
case li.TouchStart:
|
|
4435
|
+
case li.TouchEnd:
|
|
4411
4436
|
return;
|
|
4412
4437
|
}
|
|
4413
4438
|
x2.push(G(C3, _2, a));
|
|
@@ -4426,7 +4451,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4426
4451
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4427
4452
|
}), b2.scroll || 100)), a);
|
|
4428
4453
|
}
|
|
4429
|
-
const
|
|
4454
|
+
const yi = ["INPUT", "TEXTAREA", "SELECT"], Mi = /* @__PURE__ */ new WeakMap();
|
|
4430
4455
|
function ql({ deviceChangeCb: e }) {
|
|
4431
4456
|
const t = (a2, u2) => {
|
|
4432
4457
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4546,7 +4571,7 @@ function au(e, a = {}) {
|
|
|
4546
4571
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4547
4572
|
}), b3), _3 = M($e(M((e3) => {
|
|
4548
4573
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4549
|
-
C3 || (C3 =
|
|
4574
|
+
C3 || (C3 = mi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: mi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ai.Drag : e3 instanceof MouseEvent ? ai.MouseMove : ai.TouchMove);
|
|
4550
4575
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4551
4576
|
return M(() => {
|
|
4552
4577
|
O3.forEach((e3) => e3());
|
|
@@ -4562,7 +4587,7 @@ function au(e, a = {}) {
|
|
|
4562
4587
|
function p(e3) {
|
|
4563
4588
|
let u3 = tt(e3);
|
|
4564
4589
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4565
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4590
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || yi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4566
4591
|
let D4 = u3.value, F4 = false;
|
|
4567
4592
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4568
4593
|
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 });
|
|
@@ -4575,9 +4600,9 @@ function au(e, a = {}) {
|
|
|
4575
4600
|
});
|
|
4576
4601
|
}
|
|
4577
4602
|
function f2(a3, m4) {
|
|
4578
|
-
const w4 =
|
|
4603
|
+
const w4 = Mi.get(a3);
|
|
4579
4604
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4580
|
-
|
|
4605
|
+
Mi.set(a3, m4);
|
|
4581
4606
|
const w5 = u2.getId(a3);
|
|
4582
4607
|
M(e2)({ ...m4, id: w5 });
|
|
4583
4608
|
}
|
|
@@ -4602,7 +4627,7 @@ function au(e, a = {}) {
|
|
|
4602
4627
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4603
4628
|
_3 = e3, b3 = a4;
|
|
4604
4629
|
}
|
|
4605
|
-
e2({ source:
|
|
4630
|
+
e2({ source: ai.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4606
4631
|
var a4;
|
|
4607
4632
|
const u3 = [];
|
|
4608
4633
|
for (; e3; ) {
|
|
@@ -4630,7 +4655,7 @@ function au(e, a = {}) {
|
|
|
4630
4655
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4631
4656
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4632
4657
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4633
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4658
|
+
}), w3.media || 500)), x3 = [G("play", C3(pi.Play), b3), G("pause", C3(pi.Pause), b3), G("seeked", C3(pi.Seeked), b3), G("volumechange", C3(pi.VolumeChange), b3), G("ratechange", C3(pi.RateChange), b3)];
|
|
4634
4659
|
return M(() => {
|
|
4635
4660
|
x3.forEach((e3) => e3());
|
|
4636
4661
|
});
|
|
@@ -4751,7 +4776,7 @@ function au(e, a = {}) {
|
|
|
4751
4776
|
})(e), U2 = [];
|
|
4752
4777
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4753
4778
|
return M(() => {
|
|
4754
|
-
|
|
4779
|
+
gi.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());
|
|
4755
4780
|
});
|
|
4756
4781
|
}
|
|
4757
4782
|
function ft(e) {
|
|
@@ -4760,29 +4785,29 @@ function ft(e) {
|
|
|
4760
4785
|
function mt(e) {
|
|
4761
4786
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4762
4787
|
}
|
|
4763
|
-
const
|
|
4764
|
-
var
|
|
4788
|
+
const Ii = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Li = typeof self < "u" && self.Blob && new Blob([(Ri = Ii, Uint8Array.from(atob(Ri), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4789
|
+
var Ri;
|
|
4765
4790
|
function uu(e) {
|
|
4766
4791
|
let a;
|
|
4767
4792
|
try {
|
|
4768
|
-
if (a =
|
|
4793
|
+
if (a = Li && (self.URL || self.webkitURL).createObjectURL(Li), !a) throw "";
|
|
4769
4794
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4770
4795
|
return u.addEventListener("error", () => {
|
|
4771
4796
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4772
4797
|
}), u;
|
|
4773
4798
|
} catch {
|
|
4774
|
-
return new Worker("data:text/javascript;base64," +
|
|
4799
|
+
return new Worker("data:text/javascript;base64," + Ii, { name: null == e ? void 0 : e.name });
|
|
4775
4800
|
} finally {
|
|
4776
4801
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4777
4802
|
}
|
|
4778
4803
|
}
|
|
4779
|
-
for (var
|
|
4780
|
-
const
|
|
4804
|
+
for (var Ai = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ti = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ni = 0; Ni < 64; Ni++) Ti[Ai.charCodeAt(Ni)] = Ni;
|
|
4805
|
+
const Pi = /* @__PURE__ */ new Map();
|
|
4781
4806
|
const Oo = (e, a, u) => {
|
|
4782
4807
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4783
4808
|
const m2 = (function pu(e2, a2) {
|
|
4784
|
-
let u2 =
|
|
4785
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4809
|
+
let u2 = Pi.get(e2);
|
|
4810
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Pi.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4786
4811
|
})(u, e.constructor.name);
|
|
4787
4812
|
let w2 = m2.indexOf(e);
|
|
4788
4813
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4794,7 +4819,7 @@ function Ot(e, a, u) {
|
|
|
4794
4819
|
if (e instanceof ArrayBuffer) {
|
|
4795
4820
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4796
4821
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4797
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4822
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Ai[u3[a3] >> 2], w2 += Ai[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Ai[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Ai[63 & u3[a3 + 2]];
|
|
4798
4823
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4799
4824
|
})(e);
|
|
4800
4825
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4891,7 +4916,7 @@ class gu {
|
|
|
4891
4916
|
const { id: a2 } = e2.data;
|
|
4892
4917
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4893
4918
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4894
|
-
this.mutationCb({ id: a2, type:
|
|
4919
|
+
this.mutationCb({ id: a2, type: ui["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] }] });
|
|
4895
4920
|
};
|
|
4896
4921
|
const I2 = 1e3 / e;
|
|
4897
4922
|
let _2, O2 = 0;
|
|
@@ -4927,14 +4952,14 @@ class gu {
|
|
|
4927
4952
|
return function(...b5) {
|
|
4928
4953
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4929
4954
|
const u3 = Eo(b5, a2, this);
|
|
4930
|
-
e2(this.canvas, { type:
|
|
4955
|
+
e2(this.canvas, { type: ui["2D"], property: C2, args: u3 });
|
|
4931
4956
|
}, 0), w4.apply(this, b5);
|
|
4932
4957
|
};
|
|
4933
4958
|
});
|
|
4934
4959
|
w3.push(b4);
|
|
4935
4960
|
} catch {
|
|
4936
4961
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4937
|
-
e2(this.canvas, { type:
|
|
4962
|
+
e2(this.canvas, { type: ui["2D"], property: C2, args: [a3], setter: true });
|
|
4938
4963
|
} });
|
|
4939
4964
|
w3.push(u3);
|
|
4940
4965
|
}
|
|
@@ -4943,7 +4968,7 @@ class gu {
|
|
|
4943
4968
|
};
|
|
4944
4969
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4945
4970
|
const w3 = [];
|
|
4946
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4971
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, ui.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, ui.WebGL2, e2, u2, m3, a2)), () => {
|
|
4947
4972
|
w3.forEach((e3) => e3());
|
|
4948
4973
|
};
|
|
4949
4974
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5054,23 +5079,23 @@ class bu {
|
|
|
5054
5079
|
trackStylesheetInLinkElement(e) {
|
|
5055
5080
|
}
|
|
5056
5081
|
}
|
|
5057
|
-
let
|
|
5058
|
-
var
|
|
5082
|
+
let qi, Hi, Ji, Xi = false;
|
|
5083
|
+
var Qi;
|
|
5059
5084
|
try {
|
|
5060
5085
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5061
5086
|
const e = document.createElement("iframe");
|
|
5062
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5087
|
+
document.body.appendChild(e), Array.from = (null == (Qi = e.contentWindow) ? void 0 : Qi.Array.from) || Array.from, document.body.removeChild(e);
|
|
5063
5088
|
}
|
|
5064
|
-
} catch (
|
|
5065
|
-
console.debug("Unable to override Array.from",
|
|
5089
|
+
} catch (Ri2) {
|
|
5090
|
+
console.debug("Unable to override Array.from", Ri2);
|
|
5066
5091
|
}
|
|
5067
|
-
const
|
|
5068
|
-
return new
|
|
5092
|
+
const ea = (function Ci() {
|
|
5093
|
+
return new yt();
|
|
5069
5094
|
})();
|
|
5070
5095
|
function ae(e = {}) {
|
|
5071
5096
|
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;
|
|
5072
5097
|
!(function Bl(e2) {
|
|
5073
|
-
|
|
5098
|
+
fi = e2;
|
|
5074
5099
|
})(se2);
|
|
5075
5100
|
const ie2 = !Y2 || window.parent === window;
|
|
5076
5101
|
let le2 = false;
|
|
@@ -5082,7 +5107,7 @@ function ae(e = {}) {
|
|
|
5082
5107
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5083
5108
|
if (!ie2 && !le2) return () => {
|
|
5084
5109
|
};
|
|
5085
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5110
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), ea.reset();
|
|
5086
5111
|
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 || {};
|
|
5087
5112
|
!(function Ul(e2 = window) {
|
|
5088
5113
|
"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) => {
|
|
@@ -5099,57 +5124,57 @@ function ae(e = {}) {
|
|
|
5099
5124
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5100
5125
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5101
5126
|
};
|
|
5102
|
-
|
|
5127
|
+
qi = (e2, w3) => {
|
|
5103
5128
|
var b3;
|
|
5104
5129
|
const C3 = e2;
|
|
5105
|
-
if (C3.timestamp =
|
|
5130
|
+
if (C3.timestamp = mi(), null != (b3 = gi[0]) && b3.isFrozen() && C3.type !== ii.FullSnapshot && !(C3.type === ii.IncrementalSnapshot && C3.data.source === ai.Mutation) && gi.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5106
5131
|
else if (le2) {
|
|
5107
5132
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5108
5133
|
window.parent.postMessage(e3, "*");
|
|
5109
5134
|
}
|
|
5110
|
-
if (C3.type ===
|
|
5111
|
-
else if (C3.type ===
|
|
5112
|
-
if (C3.data.source ===
|
|
5135
|
+
if (C3.type === ii.FullSnapshot) de2 = C3, he2 = 0;
|
|
5136
|
+
else if (C3.type === ii.IncrementalSnapshot) {
|
|
5137
|
+
if (C3.data.source === ai.Mutation && C3.data.isAttachIframe) return;
|
|
5113
5138
|
he2++;
|
|
5114
5139
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5115
|
-
(e3 || a2) &&
|
|
5140
|
+
(e3 || a2) && Hi(true);
|
|
5116
5141
|
}
|
|
5117
5142
|
};
|
|
5118
5143
|
const rt = (e2) => {
|
|
5119
|
-
|
|
5120
|
-
}, kn = (e2) =>
|
|
5121
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5144
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.Mutation, ...e2 } });
|
|
5145
|
+
}, kn = (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Scroll, ...e2 } }), Cn = (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: ea, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: qi });
|
|
5146
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: ea, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5122
5147
|
const ye2 = new yu();
|
|
5123
|
-
|
|
5124
|
-
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:
|
|
5125
|
-
|
|
5148
|
+
Ji = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: ea, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5149
|
+
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: Ji, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: ea });
|
|
5150
|
+
Hi = (e2 = false) => {
|
|
5126
5151
|
if (!H2) return;
|
|
5127
|
-
|
|
5152
|
+
qi({ type: ii.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), gi.forEach((e3) => e3.lock());
|
|
5128
5153
|
const a2 = (function Zi(e3, a3) {
|
|
5129
|
-
const { mirror: u2 = new
|
|
5154
|
+
const { mirror: u2 = new yt(), 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 || {};
|
|
5130
5155
|
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 });
|
|
5131
|
-
})(document, { mirror:
|
|
5132
|
-
wo(e3,
|
|
5156
|
+
})(document, { mirror: ea, 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) => {
|
|
5157
|
+
wo(e3, ea) && ge2.addIframe(e3), bo(e3, ea) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5133
5158
|
}, onIframeLoad: (e3, a3) => {
|
|
5134
5159
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5135
5160
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5136
5161
|
me2.attachLinkElement(e3, a3);
|
|
5137
5162
|
}, keepIframeSrcFn: re2 });
|
|
5138
5163
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5139
|
-
|
|
5164
|
+
qi({ type: ii.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), gi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, ea.getId(document));
|
|
5140
5165
|
};
|
|
5141
5166
|
try {
|
|
5142
5167
|
const e2 = [], K = (e3) => {
|
|
5143
5168
|
var a2;
|
|
5144
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5145
|
-
|
|
5169
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => qi({ type: ii.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.ViewportResize, ...e4 } }), inputCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Input, ...e4 } }), mediaInteractionCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5170
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.Selection, ...e4 } });
|
|
5146
5171
|
}, customElementCb: (e4) => {
|
|
5147
|
-
|
|
5172
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.CustomElement, ...e4 } });
|
|
5148
5173
|
}, typingCb: (e4) => {
|
|
5149
|
-
|
|
5174
|
+
qi({ type: ii.IncrementalSnapshot, data: { ...e4 } });
|
|
5150
5175
|
}, deviceChangeCb: (e4) => {
|
|
5151
|
-
|
|
5152
|
-
}, 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:
|
|
5176
|
+
qi({ type: ii.Device, data: { ...e4 } });
|
|
5177
|
+
}, 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: ea, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Ji, 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) => qi({ type: ii.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5153
5178
|
};
|
|
5154
5179
|
ge2.addLoadListener((a2) => {
|
|
5155
5180
|
try {
|
|
@@ -5159,15 +5184,15 @@ function ae(e = {}) {
|
|
|
5159
5184
|
}
|
|
5160
5185
|
});
|
|
5161
5186
|
const W = () => {
|
|
5162
|
-
|
|
5187
|
+
Hi(), e2.push(K(document)), Xi = true;
|
|
5163
5188
|
};
|
|
5164
5189
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5165
|
-
|
|
5190
|
+
qi({ type: ii.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5166
5191
|
})), e2.push(G("load", () => {
|
|
5167
|
-
|
|
5192
|
+
qi({ type: ii.Load, data: {} }), "load" === X2 && W();
|
|
5168
5193
|
}, window))), () => {
|
|
5169
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5170
|
-
|
|
5194
|
+
e2.forEach((e3) => e3()), ye2.destroy(), Xi = false, (function jl() {
|
|
5195
|
+
fi = void 0;
|
|
5171
5196
|
})();
|
|
5172
5197
|
};
|
|
5173
5198
|
} catch (e2) {
|
|
@@ -5194,24 +5219,24 @@ function vu(e) {
|
|
|
5194
5219
|
}), u;
|
|
5195
5220
|
}
|
|
5196
5221
|
ae.addCustomEvent = (e, a) => {
|
|
5197
|
-
if (!
|
|
5198
|
-
|
|
5222
|
+
if (!Xi) throw new Error("please add custom event after start recording");
|
|
5223
|
+
qi({ type: ii.Custom, data: { tag: e, payload: a } });
|
|
5199
5224
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5200
|
-
if (!
|
|
5201
|
-
|
|
5225
|
+
if (!Xi) throw new Error("please add Sailfish event after start recording");
|
|
5226
|
+
qi({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5202
5227
|
}, ae.freezePage = () => {
|
|
5203
|
-
|
|
5228
|
+
gi.forEach((e) => e.freeze());
|
|
5204
5229
|
}, ae.takeFullSnapshot = (e) => {
|
|
5205
|
-
if (!
|
|
5206
|
-
|
|
5207
|
-
}, ae.mirror =
|
|
5208
|
-
var
|
|
5209
|
-
return { isColorSupported: false, reset:
|
|
5230
|
+
if (!Xi) throw new Error("please take full snapshot after start recording");
|
|
5231
|
+
Hi(e);
|
|
5232
|
+
}, ae.mirror = ea;
|
|
5233
|
+
var ta = { exports: {} }, na = String, Lo = function() {
|
|
5234
|
+
return { isColorSupported: false, reset: na, bold: na, dim: na, italic: na, underline: na, inverse: na, hidden: na, strikethrough: na, black: na, red: na, green: na, yellow: na, blue: na, magenta: na, cyan: na, white: na, gray: na, bgBlack: na, bgRed: na, bgGreen: na, bgYellow: na, bgBlue: na, bgMagenta: na, bgCyan: na, bgWhite: na, blackBright: na, redBright: na, greenBright: na, yellowBright: na, blueBright: na, magentaBright: na, cyanBright: na, whiteBright: na, bgBlackBright: na, bgRedBright: na, bgGreenBright: na, bgYellowBright: na, bgBlueBright: na, bgMagentaBright: na, bgCyanBright: na, bgWhiteBright: na };
|
|
5210
5235
|
};
|
|
5211
|
-
|
|
5212
|
-
var
|
|
5213
|
-
const
|
|
5214
|
-
let
|
|
5236
|
+
ta.exports = Lo(), ta.exports.createColors = Lo;
|
|
5237
|
+
var ra = ta.exports;
|
|
5238
|
+
const oa = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5239
|
+
let sa = ra, ia = oa, aa = class To extends Error {
|
|
5215
5240
|
constructor(e, a, u, m2, w2, b2) {
|
|
5216
5241
|
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);
|
|
5217
5242
|
}
|
|
@@ -5221,11 +5246,11 @@ let aa = sa, la = ia, ca = class To extends Error {
|
|
|
5221
5246
|
showSourceCode(e) {
|
|
5222
5247
|
if (!this.source) return "";
|
|
5223
5248
|
let a = this.source;
|
|
5224
|
-
null == e && (e =
|
|
5249
|
+
null == e && (e = sa.isColorSupported);
|
|
5225
5250
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5226
5251
|
if (e) {
|
|
5227
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5228
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5252
|
+
let { bold: e2, gray: a2, red: u2 } = sa.createColors(true);
|
|
5253
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), ia && (i = (e3) => ia(e3));
|
|
5229
5254
|
}
|
|
5230
5255
|
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;
|
|
5231
5256
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5246,10 +5271,10 @@ let aa = sa, la = ia, ca = class To extends Error {
|
|
|
5246
5271
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5247
5272
|
}
|
|
5248
5273
|
};
|
|
5249
|
-
var
|
|
5250
|
-
|
|
5251
|
-
const
|
|
5252
|
-
let
|
|
5274
|
+
var la = aa;
|
|
5275
|
+
aa.default = aa;
|
|
5276
|
+
const ca = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5277
|
+
let ua = class {
|
|
5253
5278
|
constructor(e) {
|
|
5254
5279
|
this.builder = e;
|
|
5255
5280
|
}
|
|
@@ -5301,7 +5326,7 @@ let ha = class {
|
|
|
5301
5326
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5302
5327
|
let w2 = e.parent;
|
|
5303
5328
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5304
|
-
if (!w2) return
|
|
5329
|
+
if (!w2) return ca[u];
|
|
5305
5330
|
let b2 = e.root();
|
|
5306
5331
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5307
5332
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5313,7 +5338,7 @@ let ha = class {
|
|
|
5313
5338
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5314
5339
|
});
|
|
5315
5340
|
}
|
|
5316
|
-
return typeof m2 > "u" && (m2 =
|
|
5341
|
+
return typeof m2 > "u" && (m2 = ca[u]), b2.rawCache[u] = m2, m2;
|
|
5317
5342
|
}
|
|
5318
5343
|
rawBeforeClose(e) {
|
|
5319
5344
|
let a;
|
|
@@ -5389,17 +5414,17 @@ let ha = class {
|
|
|
5389
5414
|
this[e.type](e, a);
|
|
5390
5415
|
}
|
|
5391
5416
|
};
|
|
5392
|
-
var
|
|
5393
|
-
|
|
5394
|
-
let
|
|
5417
|
+
var pa = ua;
|
|
5418
|
+
ua.default = ua;
|
|
5419
|
+
let ha = pa;
|
|
5395
5420
|
function zs(e, a) {
|
|
5396
|
-
new
|
|
5421
|
+
new ha(a).stringify(e);
|
|
5397
5422
|
}
|
|
5398
|
-
var
|
|
5423
|
+
var fa = zs;
|
|
5399
5424
|
zs.default = zs;
|
|
5400
|
-
var
|
|
5401
|
-
|
|
5402
|
-
let
|
|
5425
|
+
var ma = {};
|
|
5426
|
+
ma.isClean = Symbol("isClean"), ma.my = Symbol("my");
|
|
5427
|
+
let ga = la, ya = pa, wa = fa, { isClean: Sa, my: ba } = ma;
|
|
5403
5428
|
function Bs(e, a) {
|
|
5404
5429
|
let u = new e.constructor();
|
|
5405
5430
|
for (let m2 in e) {
|
|
@@ -5421,12 +5446,12 @@ function Fe(e, a) {
|
|
|
5421
5446
|
}
|
|
5422
5447
|
return w2;
|
|
5423
5448
|
}
|
|
5424
|
-
let
|
|
5449
|
+
let va = class {
|
|
5425
5450
|
get proxyOf() {
|
|
5426
5451
|
return this;
|
|
5427
5452
|
}
|
|
5428
5453
|
constructor(e = {}) {
|
|
5429
|
-
this.raws = {}, this[
|
|
5454
|
+
this.raws = {}, this[Sa] = false, this[ba] = true;
|
|
5430
5455
|
for (let a in e) if ("nodes" === a) {
|
|
5431
5456
|
this.nodes = [];
|
|
5432
5457
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5470,19 +5495,19 @@ let ka = class {
|
|
|
5470
5495
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5471
5496
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5472
5497
|
}
|
|
5473
|
-
return new
|
|
5498
|
+
return new ga(e);
|
|
5474
5499
|
}
|
|
5475
5500
|
getProxyProcessor() {
|
|
5476
5501
|
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) };
|
|
5477
5502
|
}
|
|
5478
5503
|
markClean() {
|
|
5479
|
-
this[
|
|
5504
|
+
this[Sa] = true;
|
|
5480
5505
|
}
|
|
5481
5506
|
markDirty() {
|
|
5482
|
-
if (this[
|
|
5483
|
-
this[
|
|
5507
|
+
if (this[Sa]) {
|
|
5508
|
+
this[Sa] = false;
|
|
5484
5509
|
let e = this;
|
|
5485
|
-
for (; e = e.parent; ) e[
|
|
5510
|
+
for (; e = e.parent; ) e[Sa] = false;
|
|
5486
5511
|
}
|
|
5487
5512
|
}
|
|
5488
5513
|
next() {
|
|
@@ -5518,7 +5543,7 @@ let ka = class {
|
|
|
5518
5543
|
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 };
|
|
5519
5544
|
}
|
|
5520
5545
|
raw(e, a) {
|
|
5521
|
-
return new
|
|
5546
|
+
return new ya().raw(this, e, a);
|
|
5522
5547
|
}
|
|
5523
5548
|
remove() {
|
|
5524
5549
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5555,7 +5580,7 @@ let ka = class {
|
|
|
5555
5580
|
toProxy() {
|
|
5556
5581
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5557
5582
|
}
|
|
5558
|
-
toString(e =
|
|
5583
|
+
toString(e = wa) {
|
|
5559
5584
|
e.stringify && (e = e.stringify);
|
|
5560
5585
|
let a = "";
|
|
5561
5586
|
return e(this, (e2) => {
|
|
@@ -5568,16 +5593,16 @@ let ka = class {
|
|
|
5568
5593
|
return e.warn(a, m2);
|
|
5569
5594
|
}
|
|
5570
5595
|
};
|
|
5571
|
-
var
|
|
5572
|
-
|
|
5573
|
-
let
|
|
5596
|
+
var Ca = va;
|
|
5597
|
+
va.default = va;
|
|
5598
|
+
let ka = Ca, xa = class extends ka {
|
|
5574
5599
|
constructor(e) {
|
|
5575
5600
|
super(e), this.type = "comment";
|
|
5576
5601
|
}
|
|
5577
5602
|
};
|
|
5578
|
-
var
|
|
5579
|
-
|
|
5580
|
-
let
|
|
5603
|
+
var Ma = xa;
|
|
5604
|
+
xa.default = xa;
|
|
5605
|
+
let Ia = Ca, _a = class extends Ia {
|
|
5581
5606
|
get variable() {
|
|
5582
5607
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5583
5608
|
}
|
|
@@ -5585,16 +5610,16 @@ let Oa = xa, Ea = class extends Oa {
|
|
|
5585
5610
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5586
5611
|
}
|
|
5587
5612
|
};
|
|
5588
|
-
var
|
|
5589
|
-
|
|
5590
|
-
let
|
|
5613
|
+
var Oa = _a;
|
|
5614
|
+
_a.default = _a;
|
|
5615
|
+
let Ea, La, Ra, Aa, Ta = Ma, Na = Oa, Pa = Ca, { isClean: Da, my: Fa } = ma;
|
|
5591
5616
|
function Wo(e) {
|
|
5592
5617
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5593
5618
|
}
|
|
5594
5619
|
function zo(e) {
|
|
5595
|
-
if (e[
|
|
5620
|
+
if (e[Da] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5596
5621
|
}
|
|
5597
|
-
let
|
|
5622
|
+
let Ua = class Bo extends Pa {
|
|
5598
5623
|
get first() {
|
|
5599
5624
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5600
5625
|
}
|
|
@@ -5646,7 +5671,7 @@ let $a = class Bo extends Fa {
|
|
|
5646
5671
|
return this.markDirty(), this;
|
|
5647
5672
|
}
|
|
5648
5673
|
normalize(e, a) {
|
|
5649
|
-
if ("string" == typeof e) e = Wo(
|
|
5674
|
+
if ("string" == typeof e) e = Wo(La(e).nodes);
|
|
5650
5675
|
else if (typeof e > "u") e = [];
|
|
5651
5676
|
else if (Array.isArray(e)) {
|
|
5652
5677
|
e = e.slice(0);
|
|
@@ -5657,14 +5682,14 @@ let $a = class Bo extends Fa {
|
|
|
5657
5682
|
} else if (e.type) e = [e];
|
|
5658
5683
|
else if (e.prop) {
|
|
5659
5684
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5660
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5661
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5662
|
-
else if (e.name) e = [new
|
|
5685
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Na(e)];
|
|
5686
|
+
} else if (e.selector || e.selectors) e = [new Aa(e)];
|
|
5687
|
+
else if (e.name) e = [new Ea(e)];
|
|
5663
5688
|
else {
|
|
5664
5689
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5665
|
-
e = [new
|
|
5690
|
+
e = [new Ta(e)];
|
|
5666
5691
|
}
|
|
5667
|
-
return e.map((e2) => (e2[
|
|
5692
|
+
return e.map((e2) => (e2[Fa] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Da] && 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));
|
|
5668
5693
|
}
|
|
5669
5694
|
prepend(...e) {
|
|
5670
5695
|
e = e.reverse();
|
|
@@ -5740,22 +5765,22 @@ let $a = class Bo extends Fa {
|
|
|
5740
5765
|
}));
|
|
5741
5766
|
}
|
|
5742
5767
|
};
|
|
5743
|
-
|
|
5768
|
+
Ua.registerParse = (e) => {
|
|
5769
|
+
La = e;
|
|
5770
|
+
}, Ua.registerRule = (e) => {
|
|
5744
5771
|
Aa = e;
|
|
5745
|
-
},
|
|
5746
|
-
|
|
5747
|
-
},
|
|
5772
|
+
}, Ua.registerAtRule = (e) => {
|
|
5773
|
+
Ea = e;
|
|
5774
|
+
}, Ua.registerRoot = (e) => {
|
|
5748
5775
|
Ra = e;
|
|
5749
|
-
}, $a.registerRoot = (e) => {
|
|
5750
|
-
Ta = e;
|
|
5751
5776
|
};
|
|
5752
|
-
var
|
|
5753
|
-
|
|
5754
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5755
|
-
|
|
5777
|
+
var Ba = Ua;
|
|
5778
|
+
Ua.default = Ua, Ua.rebuild = (e) => {
|
|
5779
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, Ea.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Aa.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Na.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Ta.prototype) : "root" === e.type && Object.setPrototypeOf(e, Ra.prototype), e[Fa] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5780
|
+
Ua.rebuild(e2);
|
|
5756
5781
|
});
|
|
5757
5782
|
};
|
|
5758
|
-
let
|
|
5783
|
+
let $a = Ba, Wa = class extends $a {
|
|
5759
5784
|
constructor(e) {
|
|
5760
5785
|
super(e), this.type = "atrule";
|
|
5761
5786
|
}
|
|
@@ -5766,38 +5791,38 @@ let za = Wa, ja = class extends za {
|
|
|
5766
5791
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5767
5792
|
}
|
|
5768
5793
|
};
|
|
5769
|
-
var
|
|
5770
|
-
|
|
5771
|
-
let
|
|
5794
|
+
var za = Wa;
|
|
5795
|
+
Wa.default = Wa, $a.registerAtRule(Wa);
|
|
5796
|
+
let ja, Ga, Va = Ba, qa = class extends Va {
|
|
5772
5797
|
constructor(e) {
|
|
5773
5798
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5774
5799
|
}
|
|
5775
5800
|
toResult(e = {}) {
|
|
5776
|
-
return new
|
|
5801
|
+
return new ja(new Ga(), this, e).stringify();
|
|
5777
5802
|
}
|
|
5778
5803
|
};
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
},
|
|
5782
|
-
|
|
5804
|
+
qa.registerLazyResult = (e) => {
|
|
5805
|
+
ja = e;
|
|
5806
|
+
}, qa.registerProcessor = (e) => {
|
|
5807
|
+
Ga = e;
|
|
5783
5808
|
};
|
|
5784
|
-
var
|
|
5785
|
-
|
|
5786
|
-
var
|
|
5809
|
+
var Za = qa;
|
|
5810
|
+
qa.default = qa;
|
|
5811
|
+
var Ka = { nanoid: (e = 21) => {
|
|
5787
5812
|
let a = "", u = 0 | e;
|
|
5788
5813
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5789
5814
|
return a;
|
|
5790
5815
|
} };
|
|
5791
|
-
let { existsSync:
|
|
5792
|
-
let
|
|
5816
|
+
let { existsSync: Ja, readFileSync: Ya } = oa, { dirname: Qa, join: el } = oa, { SourceMapConsumer: tl, SourceMapGenerator: nl } = oa;
|
|
5817
|
+
let rl = class {
|
|
5793
5818
|
constructor(e, a) {
|
|
5794
5819
|
if (false === a.map) return;
|
|
5795
5820
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5796
5821
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5797
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5822
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Qa(this.mapFile)), m2 && (this.text = m2);
|
|
5798
5823
|
}
|
|
5799
5824
|
consumer() {
|
|
5800
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5825
|
+
return this.consumerCache || (this.consumerCache = new tl(this.text)), this.consumerCache;
|
|
5801
5826
|
}
|
|
5802
5827
|
decodeInline(e) {
|
|
5803
5828
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5822,15 +5847,15 @@ let sl = class {
|
|
|
5822
5847
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5823
5848
|
}
|
|
5824
5849
|
loadFile(e) {
|
|
5825
|
-
if (this.root =
|
|
5850
|
+
if (this.root = Qa(e), Ja(e)) return this.mapFile = e, Ya(e, "utf-8").toString().trim();
|
|
5826
5851
|
}
|
|
5827
5852
|
loadMap(e, a) {
|
|
5828
5853
|
if (false === a) return false;
|
|
5829
5854
|
if (a) {
|
|
5830
5855
|
if ("string" == typeof a) return a;
|
|
5831
5856
|
if ("function" != typeof a) {
|
|
5832
|
-
if (a instanceof
|
|
5833
|
-
if (a instanceof
|
|
5857
|
+
if (a instanceof tl) return nl.fromSourceMap(a).toString();
|
|
5858
|
+
if (a instanceof nl) return a.toString();
|
|
5834
5859
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5835
5860
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5836
5861
|
}
|
|
@@ -5846,7 +5871,7 @@ let sl = class {
|
|
|
5846
5871
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5847
5872
|
if (this.annotation) {
|
|
5848
5873
|
let a2 = this.annotation;
|
|
5849
|
-
return e && (a2 =
|
|
5874
|
+
return e && (a2 = el(Qa(e), a2)), this.loadFile(a2);
|
|
5850
5875
|
}
|
|
5851
5876
|
}
|
|
5852
5877
|
}
|
|
@@ -5857,23 +5882,23 @@ let sl = class {
|
|
|
5857
5882
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5858
5883
|
}
|
|
5859
5884
|
};
|
|
5860
|
-
var
|
|
5861
|
-
|
|
5862
|
-
let { nanoid:
|
|
5885
|
+
var ol = rl;
|
|
5886
|
+
rl.default = rl;
|
|
5887
|
+
let { nanoid: sl } = Ka, { isAbsolute: il, resolve: al } = oa, { SourceMapConsumer: ll, SourceMapGenerator: cl } = oa, { fileURLToPath: ul, pathToFileURL: pl } = oa, dl = la, hl = ol, fl = oa, ml = Symbol("fromOffsetCache"), gl = !(!ll || !cl), yl = !(!al || !il), wl = class {
|
|
5863
5888
|
get from() {
|
|
5864
5889
|
return this.file || this.id;
|
|
5865
5890
|
}
|
|
5866
5891
|
constructor(e, a = {}) {
|
|
5867
5892
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5868
|
-
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 && (!
|
|
5869
|
-
let e2 = new
|
|
5893
|
+
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 && (!yl || /^\w+:\/\//.test(a.from) || il(a.from) ? this.file = a.from : this.file = al(a.from)), yl && gl) {
|
|
5894
|
+
let e2 = new hl(this.css, a);
|
|
5870
5895
|
if (e2.text) {
|
|
5871
5896
|
this.map = e2;
|
|
5872
5897
|
let a2 = e2.consumer().file;
|
|
5873
5898
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5874
5899
|
}
|
|
5875
5900
|
}
|
|
5876
|
-
this.file || (this.id = "<input css " +
|
|
5901
|
+
this.file || (this.id = "<input css " + sl(6) + ">"), this.map && (this.map.file = this.from);
|
|
5877
5902
|
}
|
|
5878
5903
|
error(e, a, u, m2 = {}) {
|
|
5879
5904
|
let w2, b2, C2;
|
|
@@ -5892,17 +5917,17 @@ let { nanoid: al } = Ya, { isAbsolute: ll, resolve: cl } = ia, { SourceMapConsum
|
|
|
5892
5917
|
a = e2.line, u = e2.col;
|
|
5893
5918
|
}
|
|
5894
5919
|
let x2 = this.origin(a, u, b2, w2);
|
|
5895
|
-
return C2 = x2 ? new
|
|
5920
|
+
return C2 = x2 ? new dl(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 dl(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 && (pl && (C2.input.url = pl(this.file).toString()), C2.input.file = this.file), C2;
|
|
5896
5921
|
}
|
|
5897
5922
|
fromOffset(e) {
|
|
5898
5923
|
let a, u;
|
|
5899
|
-
if (this[
|
|
5924
|
+
if (this[ml]) u = this[ml];
|
|
5900
5925
|
else {
|
|
5901
5926
|
let e2 = this.css.split("\n");
|
|
5902
5927
|
u = new Array(e2.length);
|
|
5903
5928
|
let a2 = 0;
|
|
5904
5929
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5905
|
-
this[
|
|
5930
|
+
this[ml] = u;
|
|
5906
5931
|
}
|
|
5907
5932
|
a = u[u.length - 1];
|
|
5908
5933
|
let m2 = 0;
|
|
@@ -5921,17 +5946,17 @@ let { nanoid: al } = Ya, { isAbsolute: ll, resolve: cl } = ia, { SourceMapConsum
|
|
|
5921
5946
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5922
5947
|
}
|
|
5923
5948
|
mapResolve(e) {
|
|
5924
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5949
|
+
return /^\w+:\/\//.test(e) ? e : al(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5925
5950
|
}
|
|
5926
5951
|
origin(e, a, u, m2) {
|
|
5927
5952
|
if (!this.map) return false;
|
|
5928
5953
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5929
5954
|
if (!x2.source) return false;
|
|
5930
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5955
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = il(x2.source) ? pl(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || pl(this.map.mapFile));
|
|
5931
5956
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5932
5957
|
if ("file:" === b2.protocol) {
|
|
5933
|
-
if (!
|
|
5934
|
-
I2.file =
|
|
5958
|
+
if (!ul) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5959
|
+
I2.file = ul(b2);
|
|
5935
5960
|
}
|
|
5936
5961
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5937
5962
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5942,9 +5967,9 @@ let { nanoid: al } = Ya, { isAbsolute: ll, resolve: cl } = ia, { SourceMapConsum
|
|
|
5942
5967
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5943
5968
|
}
|
|
5944
5969
|
};
|
|
5945
|
-
var
|
|
5946
|
-
|
|
5947
|
-
let
|
|
5970
|
+
var Sl = wl;
|
|
5971
|
+
wl.default = wl, fl && fl.registerInput && fl.registerInput(wl);
|
|
5972
|
+
let bl, vl, Cl = Ba, kl = class extends Cl {
|
|
5948
5973
|
constructor(e) {
|
|
5949
5974
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5950
5975
|
}
|
|
@@ -5961,29 +5986,29 @@ let Cl, kl, xl = Wa, Ml = class extends xl {
|
|
|
5961
5986
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5962
5987
|
}
|
|
5963
5988
|
toResult(e = {}) {
|
|
5964
|
-
return new
|
|
5989
|
+
return new bl(new vl(), this, e).stringify();
|
|
5965
5990
|
}
|
|
5966
5991
|
};
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
},
|
|
5970
|
-
|
|
5992
|
+
kl.registerLazyResult = (e) => {
|
|
5993
|
+
bl = e;
|
|
5994
|
+
}, kl.registerProcessor = (e) => {
|
|
5995
|
+
vl = e;
|
|
5971
5996
|
};
|
|
5972
|
-
var
|
|
5973
|
-
|
|
5974
|
-
let
|
|
5997
|
+
var xl = kl;
|
|
5998
|
+
kl.default = kl, Cl.registerRoot(kl);
|
|
5999
|
+
let Ml = { comma: (e) => Ml.split(e, [","], true), space(e) {
|
|
5975
6000
|
let a = [" ", "\n", " "];
|
|
5976
|
-
return
|
|
6001
|
+
return Ml.split(e, a);
|
|
5977
6002
|
}, split(e, a, u) {
|
|
5978
6003
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5979
6004
|
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;
|
|
5980
6005
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5981
6006
|
} };
|
|
5982
|
-
var
|
|
5983
|
-
|
|
5984
|
-
let
|
|
6007
|
+
var Il = Ml;
|
|
6008
|
+
Ml.default = Ml;
|
|
6009
|
+
let Ol = Ba, El = Il, Ll = class extends Ol {
|
|
5985
6010
|
get selectors() {
|
|
5986
|
-
return
|
|
6011
|
+
return El.comma(this.selector);
|
|
5987
6012
|
}
|
|
5988
6013
|
set selectors(e) {
|
|
5989
6014
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5993,34 +6018,34 @@ let Ll = Wa, Rl = El, Al = class extends Ll {
|
|
|
5993
6018
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5994
6019
|
}
|
|
5995
6020
|
};
|
|
5996
|
-
var
|
|
5997
|
-
|
|
5998
|
-
let
|
|
6021
|
+
var Rl = Ll;
|
|
6022
|
+
Ll.default = Ll, Ol.registerRule(Ll);
|
|
6023
|
+
let Al = za, Tl = Ma, Nl = Oa, Pl = Sl, Dl = ol, Jl = xl, ec = Rl;
|
|
5999
6024
|
function Ke(e, a) {
|
|
6000
6025
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
6001
6026
|
let { inputs: u, ...m2 } = e;
|
|
6002
6027
|
if (u) {
|
|
6003
6028
|
a = [];
|
|
6004
6029
|
for (let e2 of u) {
|
|
6005
|
-
let u2 = { ...e2, __proto__:
|
|
6006
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
6030
|
+
let u2 = { ...e2, __proto__: Pl.prototype };
|
|
6031
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Dl.prototype }), a.push(u2);
|
|
6007
6032
|
}
|
|
6008
6033
|
}
|
|
6009
6034
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
6010
6035
|
let { inputId: e2, ...u2 } = m2.source;
|
|
6011
6036
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
6012
6037
|
}
|
|
6013
|
-
if ("root" === m2.type) return new
|
|
6014
|
-
if ("decl" === m2.type) return new
|
|
6015
|
-
if ("rule" === m2.type) return new
|
|
6016
|
-
if ("comment" === m2.type) return new
|
|
6017
|
-
if ("atrule" === m2.type) return new
|
|
6038
|
+
if ("root" === m2.type) return new Jl(m2);
|
|
6039
|
+
if ("decl" === m2.type) return new Nl(m2);
|
|
6040
|
+
if ("rule" === m2.type) return new ec(m2);
|
|
6041
|
+
if ("comment" === m2.type) return new Tl(m2);
|
|
6042
|
+
if ("atrule" === m2.type) return new Al(m2);
|
|
6018
6043
|
throw new Error("Unknown node type: " + e.type);
|
|
6019
6044
|
}
|
|
6020
|
-
var
|
|
6045
|
+
var tc = Ke;
|
|
6021
6046
|
Ke.default = Ke;
|
|
6022
|
-
let { dirname:
|
|
6023
|
-
var
|
|
6047
|
+
let { dirname: nc, relative: rc, resolve: oc, sep: sc } = oa, { SourceMapConsumer: ic, SourceMapGenerator: ac } = oa, { pathToFileURL: lc } = oa, cc = Sl, uc = !(!ic || !ac), pc = !!(nc && oc && rc && sc);
|
|
6048
|
+
var dc = class {
|
|
6024
6049
|
constructor(e, a, u, m2) {
|
|
6025
6050
|
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();
|
|
6026
6051
|
}
|
|
@@ -6032,8 +6057,8 @@ var fc = class {
|
|
|
6032
6057
|
}
|
|
6033
6058
|
applyPrevMaps() {
|
|
6034
6059
|
for (let e of this.previous()) {
|
|
6035
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
6036
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6060
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || nc(e.file);
|
|
6061
|
+
false === this.mapOpts.sourcesContent ? (a = new ic(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
6037
6062
|
}
|
|
6038
6063
|
}
|
|
6039
6064
|
clearAnnotation() {
|
|
@@ -6043,7 +6068,7 @@ var fc = class {
|
|
|
6043
6068
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
6044
6069
|
}
|
|
6045
6070
|
generate() {
|
|
6046
|
-
if (this.clearAnnotation(),
|
|
6071
|
+
if (this.clearAnnotation(), pc && uc && this.isMap()) return this.generateMap();
|
|
6047
6072
|
{
|
|
6048
6073
|
let e = "";
|
|
6049
6074
|
return this.stringify(this.root, (a) => {
|
|
@@ -6055,12 +6080,12 @@ var fc = class {
|
|
|
6055
6080
|
if (this.root) this.generateString();
|
|
6056
6081
|
else if (1 === this.previous().length) {
|
|
6057
6082
|
let e = this.previous()[0].consumer();
|
|
6058
|
-
e.file = this.outputFile(), this.map =
|
|
6059
|
-
} else this.map = new
|
|
6083
|
+
e.file = this.outputFile(), this.map = ac.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6084
|
+
} else this.map = new ac({ 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>" });
|
|
6060
6085
|
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];
|
|
6061
6086
|
}
|
|
6062
6087
|
generateString() {
|
|
6063
|
-
this.css = "", this.map = new
|
|
6088
|
+
this.css = "", this.map = new ac({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6064
6089
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6065
6090
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6066
6091
|
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) {
|
|
@@ -6090,9 +6115,9 @@ var fc = class {
|
|
|
6090
6115
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6091
6116
|
let a = this.memoizedPaths.get(e);
|
|
6092
6117
|
if (a) return a;
|
|
6093
|
-
let u = this.opts.to ?
|
|
6094
|
-
"string" == typeof this.mapOpts.annotation && (u = oc(
|
|
6095
|
-
let m2 =
|
|
6118
|
+
let u = this.opts.to ? nc(this.opts.to) : ".";
|
|
6119
|
+
"string" == typeof this.mapOpts.annotation && (u = nc(oc(u, this.mapOpts.annotation)));
|
|
6120
|
+
let m2 = rc(u, e);
|
|
6096
6121
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6097
6122
|
}
|
|
6098
6123
|
previous() {
|
|
@@ -6103,7 +6128,7 @@ var fc = class {
|
|
|
6103
6128
|
}
|
|
6104
6129
|
});
|
|
6105
6130
|
else {
|
|
6106
|
-
let e = new
|
|
6131
|
+
let e = new cc(this.originalCSS, this.opts);
|
|
6107
6132
|
e.map && this.previousMaps.push(e.map);
|
|
6108
6133
|
}
|
|
6109
6134
|
return this.previousMaps;
|
|
@@ -6134,8 +6159,8 @@ var fc = class {
|
|
|
6134
6159
|
toFileUrl(e) {
|
|
6135
6160
|
let a = this.memoizedFileURLs.get(e);
|
|
6136
6161
|
if (a) return a;
|
|
6137
|
-
if (
|
|
6138
|
-
let a2 =
|
|
6162
|
+
if (lc) {
|
|
6163
|
+
let a2 = lc(e).toString();
|
|
6139
6164
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6140
6165
|
}
|
|
6141
6166
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6143,13 +6168,13 @@ var fc = class {
|
|
|
6143
6168
|
toUrl(e) {
|
|
6144
6169
|
let a = this.memoizedURLs.get(e);
|
|
6145
6170
|
if (a) return a;
|
|
6146
|
-
"\\" ===
|
|
6171
|
+
"\\" === sc && (e = e.replace(/\\/g, "/"));
|
|
6147
6172
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6148
6173
|
return this.memoizedURLs.set(e, u), u;
|
|
6149
6174
|
}
|
|
6150
6175
|
};
|
|
6151
|
-
const
|
|
6152
|
-
let
|
|
6176
|
+
const hc = /[\t\n\f\r "#'()/;[\\\]{}]/g, fc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, mc = /.[\r\n"'(/\\]/, gc = /[\da-f]/i;
|
|
6177
|
+
let yc = za, wc = Ma, Sc = Oa, bc = xl, vc = Rl, kc = function(e, a = {}) {
|
|
6153
6178
|
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 = [];
|
|
6154
6179
|
function y2(a2) {
|
|
6155
6180
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6199,7 +6224,7 @@ let Sc = Ga, bc = _a, vc = La, xc = Il, Mc = Tl, kc = function(e, a = {}) {
|
|
|
6199
6224
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6200
6225
|
} while (I2);
|
|
6201
6226
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6202
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6227
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || mc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6203
6228
|
break;
|
|
6204
6229
|
case 39:
|
|
6205
6230
|
case 34:
|
|
@@ -6217,31 +6242,31 @@ let Sc = Ga, bc = _a, vc = La, xc = Il, Mc = Tl, kc = function(e, a = {}) {
|
|
|
6217
6242
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6218
6243
|
break;
|
|
6219
6244
|
case 64:
|
|
6220
|
-
|
|
6245
|
+
hc.lastIndex = B2 + 1, hc.test(D2), b2 = 0 === hc.lastIndex ? D2.length - 1 : hc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6221
6246
|
break;
|
|
6222
6247
|
case 92:
|
|
6223
6248
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6224
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6225
|
-
for (;
|
|
6249
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, gc.test(D2.charAt(b2)))) {
|
|
6250
|
+
for (; gc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6226
6251
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6227
6252
|
}
|
|
6228
6253
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6229
6254
|
break;
|
|
6230
6255
|
default:
|
|
6231
|
-
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) : (
|
|
6256
|
+
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) : (fc.lastIndex = B2 + 1, fc.test(D2), b2 = 0 === fc.lastIndex ? D2.length - 1 : fc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6232
6257
|
}
|
|
6233
6258
|
return B2++, x2;
|
|
6234
6259
|
}, position: function S() {
|
|
6235
6260
|
return B2;
|
|
6236
6261
|
} };
|
|
6237
6262
|
};
|
|
6238
|
-
const
|
|
6239
|
-
var
|
|
6263
|
+
const xc = { empty: true, space: true };
|
|
6264
|
+
var Mc = class {
|
|
6240
6265
|
constructor(e) {
|
|
6241
|
-
this.input = e, this.root = new
|
|
6266
|
+
this.input = e, this.root = new bc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6242
6267
|
}
|
|
6243
6268
|
atrule(e) {
|
|
6244
|
-
let a = new
|
|
6269
|
+
let a = new yc();
|
|
6245
6270
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6246
6271
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6247
6272
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6293,7 +6318,7 @@ var _c = class {
|
|
|
6293
6318
|
return false;
|
|
6294
6319
|
}
|
|
6295
6320
|
comment(e) {
|
|
6296
|
-
let a = new
|
|
6321
|
+
let a = new wc();
|
|
6297
6322
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6298
6323
|
let u = e[1].slice(2, -2);
|
|
6299
6324
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6306,7 +6331,7 @@ var _c = class {
|
|
|
6306
6331
|
this.tokenizer = kc(this.input);
|
|
6307
6332
|
}
|
|
6308
6333
|
decl(e, a) {
|
|
6309
|
-
let u = new
|
|
6334
|
+
let u = new Sc();
|
|
6310
6335
|
this.init(u, e[0][2]);
|
|
6311
6336
|
let m2, w2 = e[e.length - 1];
|
|
6312
6337
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6355,7 +6380,7 @@ var _c = class {
|
|
|
6355
6380
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6356
6381
|
}
|
|
6357
6382
|
emptyRule(e) {
|
|
6358
|
-
let a = new
|
|
6383
|
+
let a = new vc();
|
|
6359
6384
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6360
6385
|
}
|
|
6361
6386
|
end(e) {
|
|
@@ -6431,7 +6456,7 @@ var _c = class {
|
|
|
6431
6456
|
}
|
|
6432
6457
|
raw(e, a, u, m2) {
|
|
6433
6458
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6434
|
-
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",
|
|
6459
|
+
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", xc[x2] || xc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6435
6460
|
if (!O2) {
|
|
6436
6461
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6437
6462
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6440,7 +6465,7 @@ var _c = class {
|
|
|
6440
6465
|
}
|
|
6441
6466
|
rule(e) {
|
|
6442
6467
|
e.pop();
|
|
6443
|
-
let a = new
|
|
6468
|
+
let a = new vc();
|
|
6444
6469
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6445
6470
|
}
|
|
6446
6471
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6480,9 +6505,9 @@ var _c = class {
|
|
|
6480
6505
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6481
6506
|
}
|
|
6482
6507
|
};
|
|
6483
|
-
let
|
|
6508
|
+
let Ic = Ba, _c = Sl, Oc = Mc;
|
|
6484
6509
|
function Gt(e, a) {
|
|
6485
|
-
let u = new
|
|
6510
|
+
let u = new _c(e, a), m2 = new Oc(u);
|
|
6486
6511
|
try {
|
|
6487
6512
|
m2.parse();
|
|
6488
6513
|
} catch (e2) {
|
|
@@ -6490,9 +6515,9 @@ function Gt(e, a) {
|
|
|
6490
6515
|
}
|
|
6491
6516
|
return m2.root;
|
|
6492
6517
|
}
|
|
6493
|
-
var
|
|
6494
|
-
Gt.default = Gt,
|
|
6495
|
-
let
|
|
6518
|
+
var Ec = Gt;
|
|
6519
|
+
Gt.default = Gt, Ic.registerParse(Gt);
|
|
6520
|
+
let Lc = class {
|
|
6496
6521
|
constructor(e, a = {}) {
|
|
6497
6522
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6498
6523
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6504,9 +6529,9 @@ let Ac = class {
|
|
|
6504
6529
|
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;
|
|
6505
6530
|
}
|
|
6506
6531
|
};
|
|
6507
|
-
var
|
|
6508
|
-
|
|
6509
|
-
let
|
|
6532
|
+
var Rc = Lc;
|
|
6533
|
+
Lc.default = Lc;
|
|
6534
|
+
let Ac = Rc, Tc = class {
|
|
6510
6535
|
get content() {
|
|
6511
6536
|
return this.css;
|
|
6512
6537
|
}
|
|
@@ -6518,26 +6543,26 @@ let Nc = Tc, Pc = class {
|
|
|
6518
6543
|
}
|
|
6519
6544
|
warn(e, a = {}) {
|
|
6520
6545
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6521
|
-
let u = new
|
|
6546
|
+
let u = new Ac(e, a);
|
|
6522
6547
|
return this.messages.push(u), u;
|
|
6523
6548
|
}
|
|
6524
6549
|
warnings() {
|
|
6525
6550
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6526
6551
|
}
|
|
6527
6552
|
};
|
|
6528
|
-
var
|
|
6529
|
-
|
|
6530
|
-
let
|
|
6553
|
+
var Nc = Tc;
|
|
6554
|
+
Tc.default = Tc;
|
|
6555
|
+
let Pc = {};
|
|
6531
6556
|
var ni = function(e) {
|
|
6532
|
-
|
|
6557
|
+
Pc[e] || (Pc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6533
6558
|
};
|
|
6534
|
-
let
|
|
6535
|
-
const
|
|
6559
|
+
let Dc = Ba, Fc = Za, Uc = dc, Bc = Ec, $c = Nc, Wc = xl, zc = fa, { isClean: jc, my: Gc } = ma, Vc = ni;
|
|
6560
|
+
const qc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Hc = { 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 }, Zc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6536
6561
|
function _e(e) {
|
|
6537
6562
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6538
6563
|
}
|
|
6539
6564
|
function ri(e) {
|
|
6540
|
-
let a = false, u =
|
|
6565
|
+
let a = false, u = qc[e.type];
|
|
6541
6566
|
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"];
|
|
6542
6567
|
}
|
|
6543
6568
|
function br(e) {
|
|
@@ -6545,9 +6570,9 @@ function br(e) {
|
|
|
6545
6570
|
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: [] };
|
|
6546
6571
|
}
|
|
6547
6572
|
function Js(e) {
|
|
6548
|
-
return e[
|
|
6573
|
+
return e[jc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6549
6574
|
}
|
|
6550
|
-
let
|
|
6575
|
+
let Kc = {}, Jc = class oi {
|
|
6551
6576
|
get content() {
|
|
6552
6577
|
return this.stringify().content;
|
|
6553
6578
|
}
|
|
@@ -6574,19 +6599,19 @@ let Yc = {}, Xc = class oi {
|
|
|
6574
6599
|
}
|
|
6575
6600
|
constructor(e, a, u) {
|
|
6576
6601
|
let m2;
|
|
6577
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6602
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof $c) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6578
6603
|
else {
|
|
6579
|
-
let e2 =
|
|
6604
|
+
let e2 = Bc;
|
|
6580
6605
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6581
6606
|
try {
|
|
6582
6607
|
m2 = e2(a, u);
|
|
6583
6608
|
} catch (e3) {
|
|
6584
6609
|
this.processed = true, this.error = e3;
|
|
6585
6610
|
}
|
|
6586
|
-
m2 && !m2[
|
|
6611
|
+
m2 && !m2[Gc] && Dc.rebuild(m2);
|
|
6587
6612
|
}
|
|
6588
6613
|
else m2 = Js(a);
|
|
6589
|
-
this.result = new
|
|
6614
|
+
this.result = new $c(e, m2, u), this.helpers = { ...Kc, postcss: Kc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6590
6615
|
}
|
|
6591
6616
|
async() {
|
|
6592
6617
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6620,8 +6645,8 @@ let Yc = {}, Xc = class oi {
|
|
|
6620
6645
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6621
6646
|
};
|
|
6622
6647
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6623
|
-
if (!
|
|
6624
|
-
if (!
|
|
6648
|
+
if (!Hc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6649
|
+
if (!Zc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6625
6650
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6626
6651
|
}
|
|
6627
6652
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6638,8 +6663,8 @@ let Yc = {}, Xc = class oi {
|
|
|
6638
6663
|
}
|
|
6639
6664
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6640
6665
|
let e = this.result.root;
|
|
6641
|
-
for (; !e[
|
|
6642
|
-
e[
|
|
6666
|
+
for (; !e[jc]; ) {
|
|
6667
|
+
e[jc] = true;
|
|
6643
6668
|
let a = [br(e)];
|
|
6644
6669
|
for (; a.length > 0; ) {
|
|
6645
6670
|
let e2 = this.visitTick(a);
|
|
@@ -6684,9 +6709,9 @@ let Yc = {}, Xc = class oi {
|
|
|
6684
6709
|
if (this.error) throw this.error;
|
|
6685
6710
|
if (this.stringified) return this.result;
|
|
6686
6711
|
this.stringified = true, this.sync();
|
|
6687
|
-
let e = this.result.opts, a =
|
|
6712
|
+
let e = this.result.opts, a = zc;
|
|
6688
6713
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6689
|
-
let u = new
|
|
6714
|
+
let u = new Uc(a, this.result.root, this.result.opts).generate();
|
|
6690
6715
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6691
6716
|
}
|
|
6692
6717
|
sync() {
|
|
@@ -6698,14 +6723,14 @@ let Yc = {}, Xc = class oi {
|
|
|
6698
6723
|
}
|
|
6699
6724
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6700
6725
|
let e = this.result.root;
|
|
6701
|
-
for (; !e[
|
|
6726
|
+
for (; !e[jc]; ) e[jc] = true, this.walkSync(e);
|
|
6702
6727
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6703
6728
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6704
6729
|
}
|
|
6705
6730
|
return this.result;
|
|
6706
6731
|
}
|
|
6707
6732
|
then(e, a) {
|
|
6708
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6733
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Vc("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);
|
|
6709
6734
|
}
|
|
6710
6735
|
toString() {
|
|
6711
6736
|
return this.css;
|
|
@@ -6737,22 +6762,22 @@ let Yc = {}, Xc = class oi {
|
|
|
6737
6762
|
}
|
|
6738
6763
|
if (0 !== a.iterator) {
|
|
6739
6764
|
let m3, w3 = a.iterator;
|
|
6740
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6765
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[jc]) return m3[jc] = true, void e.push(br(m3));
|
|
6741
6766
|
a.iterator = 0, delete u.indexes[w3];
|
|
6742
6767
|
}
|
|
6743
6768
|
let w2 = a.events;
|
|
6744
6769
|
for (; a.eventIndex < w2.length; ) {
|
|
6745
6770
|
let e2 = w2[a.eventIndex];
|
|
6746
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6771
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[jc] = true, a.iterator = u.getIterator()));
|
|
6747
6772
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6748
6773
|
}
|
|
6749
6774
|
e.pop();
|
|
6750
6775
|
}
|
|
6751
6776
|
walkSync(e) {
|
|
6752
|
-
e[
|
|
6777
|
+
e[jc] = true;
|
|
6753
6778
|
let a = ri(e);
|
|
6754
6779
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6755
|
-
e2[
|
|
6780
|
+
e2[jc] || this.walkSync(e2);
|
|
6756
6781
|
});
|
|
6757
6782
|
else {
|
|
6758
6783
|
let a2 = this.listeners[u];
|
|
@@ -6763,14 +6788,14 @@ let Yc = {}, Xc = class oi {
|
|
|
6763
6788
|
return this.sync().warnings();
|
|
6764
6789
|
}
|
|
6765
6790
|
};
|
|
6766
|
-
|
|
6767
|
-
|
|
6791
|
+
Jc.registerPostcss = (e) => {
|
|
6792
|
+
Kc = e;
|
|
6768
6793
|
};
|
|
6769
|
-
var
|
|
6770
|
-
|
|
6771
|
-
let
|
|
6772
|
-
const
|
|
6773
|
-
let
|
|
6794
|
+
var Yc = Jc;
|
|
6795
|
+
Jc.default = Jc, Wc.registerLazyResult(Jc), Fc.registerLazyResult(Jc);
|
|
6796
|
+
let Xc = dc, Qc = Ec;
|
|
6797
|
+
const lu = Nc;
|
|
6798
|
+
let cu = fa, hu = ni, Cu = class {
|
|
6774
6799
|
get content() {
|
|
6775
6800
|
return this.result.css;
|
|
6776
6801
|
}
|
|
@@ -6791,7 +6816,7 @@ let Cu = ga, ku = ni, xu = class {
|
|
|
6791
6816
|
}
|
|
6792
6817
|
get root() {
|
|
6793
6818
|
if (this._root) return this._root;
|
|
6794
|
-
let e, a =
|
|
6819
|
+
let e, a = Qc;
|
|
6795
6820
|
try {
|
|
6796
6821
|
e = a(this._css, this._opts);
|
|
6797
6822
|
} catch (e2) {
|
|
@@ -6805,11 +6830,11 @@ let Cu = ga, ku = ni, xu = class {
|
|
|
6805
6830
|
}
|
|
6806
6831
|
constructor(e, a, u) {
|
|
6807
6832
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6808
|
-
let m2, w2 =
|
|
6809
|
-
this.result = new
|
|
6833
|
+
let m2, w2 = cu;
|
|
6834
|
+
this.result = new lu(this._processor, m2, this._opts), this.result.css = a;
|
|
6810
6835
|
let b2 = this;
|
|
6811
6836
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6812
|
-
let C2 = new
|
|
6837
|
+
let C2 = new Xc(w2, m2, this._opts, a);
|
|
6813
6838
|
if (C2.isMap()) {
|
|
6814
6839
|
let [e2, a2] = C2.generate();
|
|
6815
6840
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6829,7 +6854,7 @@ let Cu = ga, ku = ni, xu = class {
|
|
|
6829
6854
|
return this.result;
|
|
6830
6855
|
}
|
|
6831
6856
|
then(e, a) {
|
|
6832
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6857
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || hu("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);
|
|
6833
6858
|
}
|
|
6834
6859
|
toString() {
|
|
6835
6860
|
return this._css;
|
|
@@ -6838,9 +6863,9 @@ let Cu = ga, ku = ni, xu = class {
|
|
|
6838
6863
|
return [];
|
|
6839
6864
|
}
|
|
6840
6865
|
};
|
|
6841
|
-
var
|
|
6842
|
-
|
|
6843
|
-
let
|
|
6866
|
+
var ku = Cu;
|
|
6867
|
+
Cu.default = Cu;
|
|
6868
|
+
let xu = Za, Mu = Yc, _u = ku, Ou = xl, Eu = class {
|
|
6844
6869
|
constructor(e = []) {
|
|
6845
6870
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6846
6871
|
}
|
|
@@ -6856,39 +6881,39 @@ let _u = Ja, Ou = Qc, Eu = Mu, Lu = Il, Ru = class {
|
|
|
6856
6881
|
return a;
|
|
6857
6882
|
}
|
|
6858
6883
|
process(e, a = {}) {
|
|
6859
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6884
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Mu(this, e, a) : new _u(this, e, a);
|
|
6860
6885
|
}
|
|
6861
6886
|
use(e) {
|
|
6862
6887
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6863
6888
|
}
|
|
6864
6889
|
};
|
|
6865
|
-
var
|
|
6866
|
-
|
|
6867
|
-
let Tu =
|
|
6890
|
+
var Lu = Eu;
|
|
6891
|
+
Eu.default = Eu, Ou.registerProcessor(Eu), xu.registerProcessor(Eu);
|
|
6892
|
+
let Ru = za, Au = Ma, Tu = Ba, Nu = la, Pu = Oa, Du = Za, Fu = tc, Uu = Sl, $u = Yc, Wu = Il, zu = Ca, ju = Ec, Gu = Lu, Vu = Nc, qu = xl, Hu = Rl, Zu = fa, Ku = Rc;
|
|
6868
6893
|
function T$1(...e) {
|
|
6869
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6894
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Gu(e);
|
|
6870
6895
|
}
|
|
6871
6896
|
T$1.plugin = function(e, a) {
|
|
6872
6897
|
let u, m2 = false;
|
|
6873
6898
|
function n(...u2) {
|
|
6874
6899
|
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"));
|
|
6875
6900
|
let w2 = a(...u2);
|
|
6876
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6901
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Gu().version, w2;
|
|
6877
6902
|
}
|
|
6878
6903
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6879
6904
|
return T$1([n(u2)]).process(e2, a2);
|
|
6880
6905
|
}, n;
|
|
6881
|
-
}, T$1.stringify =
|
|
6882
|
-
var
|
|
6906
|
+
}, T$1.stringify = Zu, T$1.parse = ju, T$1.fromJSON = Fu, T$1.list = Wu, T$1.comment = (e) => new Au(e), T$1.atRule = (e) => new Ru(e), T$1.decl = (e) => new Pu(e), T$1.rule = (e) => new Hu(e), T$1.root = (e) => new qu(e), T$1.document = (e) => new Du(e), T$1.CssSyntaxError = Nu, T$1.Declaration = Pu, T$1.Container = Tu, T$1.Processor = Gu, T$1.Document = Du, T$1.Comment = Au, T$1.Warning = Ku, T$1.AtRule = Ru, T$1.Result = Vu, T$1.Input = Uu, T$1.Rule = Hu, T$1.Root = qu, T$1.Node = zu, $u.registerPostcss(T$1);
|
|
6907
|
+
var Ju = T$1;
|
|
6883
6908
|
T$1.default = T$1;
|
|
6884
|
-
const
|
|
6885
|
-
var
|
|
6886
|
-
|
|
6909
|
+
const Yu = Su(Ju);
|
|
6910
|
+
var Xu;
|
|
6911
|
+
Yu.stringify, Yu.fromJSON, Yu.plugin, Yu.parse, Yu.list, Yu.document, Yu.comment, Yu.atRule, Yu.rule, Yu.decl, Yu.root, Yu.CssSyntaxError, Yu.Declaration, Yu.Container, Yu.Processor, Yu.Document, Yu.Comment, Yu.Warning, Yu.AtRule, Yu.Result, Yu.Input, Yu.Rule, Yu.Root, Yu.Node, (function(e) {
|
|
6887
6912
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6888
|
-
})(
|
|
6889
|
-
const { addCustomEvent:
|
|
6890
|
-
var
|
|
6891
|
-
let
|
|
6913
|
+
})(Xu || (Xu = {}));
|
|
6914
|
+
const { addCustomEvent: Qu } = ae, { addSailfishEvent: ep } = ae, { freezePage: tp } = ae, { takeFullSnapshot: np } = ae;
|
|
6915
|
+
var rp = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? rp(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6916
|
+
let op = class d {
|
|
6892
6917
|
constructor(e) {
|
|
6893
6918
|
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;
|
|
6894
6919
|
}
|
|
@@ -6897,8 +6922,8 @@ let ip = class d {
|
|
|
6897
6922
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6898
6923
|
}
|
|
6899
6924
|
};
|
|
6900
|
-
const
|
|
6901
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6925
|
+
const sp = /(^|@)\S+:\d+/, ip = /^\s*at .*(\S+:\d+|\(native\))/m, ap = /^(eval@)?(\[native code])?$/, lp = { parse: function(e) {
|
|
6926
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(ip) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6902
6927
|
}, extractLocation: function(e) {
|
|
6903
6928
|
if (-1 === e.indexOf(":")) return [e];
|
|
6904
6929
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6906,23 +6931,23 @@ const ap = /(^|@)\S+:\d+/, lp = /^\s*at .*(\S+:\d+|\(native\))/m, cp = /^(eval@)
|
|
|
6906
6931
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6907
6932
|
}, parseV8OrIE: function(e) {
|
|
6908
6933
|
return e.stack.split("\n").filter(function(e2) {
|
|
6909
|
-
return !!e2.match(
|
|
6934
|
+
return !!e2.match(ip);
|
|
6910
6935
|
}, this).map(function(e2) {
|
|
6911
6936
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6912
6937
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6913
6938
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6914
6939
|
a = u ? a.replace(u[0], "") : a;
|
|
6915
6940
|
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];
|
|
6916
|
-
return new
|
|
6941
|
+
return new op({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6917
6942
|
}, this);
|
|
6918
6943
|
}, parseFFOrSafari: function(e) {
|
|
6919
6944
|
return e.stack.split("\n").filter(function(e2) {
|
|
6920
|
-
return !e2.match(
|
|
6945
|
+
return !e2.match(ap);
|
|
6921
6946
|
}, this).map(function(e2) {
|
|
6922
|
-
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
|
|
6947
|
+
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 op({ functionName: e2 });
|
|
6923
6948
|
{
|
|
6924
6949
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6925
|
-
return new
|
|
6950
|
+
return new op({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6926
6951
|
}
|
|
6927
6952
|
}, this);
|
|
6928
6953
|
}, parseOpera: function(e) {
|
|
@@ -6931,22 +6956,22 @@ const ap = /(^|@)\S+:\d+/, lp = /^\s*at .*(\S+:\d+|\(native\))/m, cp = /^(eval@)
|
|
|
6931
6956
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6932
6957
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6933
6958
|
const w3 = a.exec(u[e2]);
|
|
6934
|
-
w3 && m2.push(new
|
|
6959
|
+
w3 && m2.push(new op({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6935
6960
|
}
|
|
6936
6961
|
return m2;
|
|
6937
6962
|
}, parseOpera10: function(e) {
|
|
6938
6963
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6939
6964
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6940
6965
|
const w3 = a.exec(u[e2]);
|
|
6941
|
-
w3 && m2.push(new
|
|
6966
|
+
w3 && m2.push(new op({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6942
6967
|
}
|
|
6943
6968
|
return m2;
|
|
6944
6969
|
}, parseOpera11: function(e) {
|
|
6945
6970
|
return e.stack.split("\n").filter(function(e2) {
|
|
6946
|
-
return !!e2.match(
|
|
6971
|
+
return !!e2.match(sp) && !e2.match(/^Error created at/);
|
|
6947
6972
|
}, this).map(function(e2) {
|
|
6948
6973
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6949
|
-
return new
|
|
6974
|
+
return new op({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6950
6975
|
}, this);
|
|
6951
6976
|
} };
|
|
6952
6977
|
function T(e) {
|
|
@@ -7003,9 +7028,9 @@ function g(e, a) {
|
|
|
7003
7028
|
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;
|
|
7004
7029
|
});
|
|
7005
7030
|
}
|
|
7006
|
-
const
|
|
7031
|
+
const cp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
7007
7032
|
function R(e, a, u) {
|
|
7008
|
-
const m2 = u ? Object.assign({},
|
|
7033
|
+
const m2 = u ? Object.assign({}, cp, u) : cp, w2 = m2.logger;
|
|
7009
7034
|
if (!w2) return () => {
|
|
7010
7035
|
};
|
|
7011
7036
|
let b2;
|
|
@@ -7014,7 +7039,7 @@ function R(e, a, u) {
|
|
|
7014
7039
|
const I2 = [];
|
|
7015
7040
|
if (m2.level.includes("error")) {
|
|
7016
7041
|
const l = (a2) => {
|
|
7017
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
7042
|
+
const u2 = a2.message, w3 = a2.error, b3 = lp.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
7018
7043
|
e({ level: "error", trace: b3, payload: C3 });
|
|
7019
7044
|
};
|
|
7020
7045
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -7023,7 +7048,7 @@ function R(e, a, u) {
|
|
|
7023
7048
|
const f = (a2) => {
|
|
7024
7049
|
let u2, w3;
|
|
7025
7050
|
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)]);
|
|
7026
|
-
const b3 =
|
|
7051
|
+
const b3 = lp.parse(u2).map((e2) => e2.toString());
|
|
7027
7052
|
e({ level: "error", trace: b3, payload: w3 });
|
|
7028
7053
|
};
|
|
7029
7054
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7051,7 +7076,7 @@ function R(e, a, u) {
|
|
|
7051
7076
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
7052
7077
|
x2 = true;
|
|
7053
7078
|
try {
|
|
7054
|
-
const a4 =
|
|
7079
|
+
const a4 = lp.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7055
7080
|
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.")] });
|
|
7056
7081
|
} catch (e2) {
|
|
7057
7082
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7063,7 +7088,7 @@ function R(e, a, u) {
|
|
|
7063
7088
|
};
|
|
7064
7089
|
}
|
|
7065
7090
|
}
|
|
7066
|
-
var
|
|
7091
|
+
var up = ((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))(up || {});
|
|
7067
7092
|
function suppressConsoleLogsDuringCall(e) {
|
|
7068
7093
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7069
7094
|
console.log = () => {
|
|
@@ -7076,7 +7101,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7076
7101
|
console.log = a, console.warn = u, console.error = m2;
|
|
7077
7102
|
}
|
|
7078
7103
|
}
|
|
7079
|
-
const
|
|
7104
|
+
const pp = "zendesk_chat", dp = "Zendesk";
|
|
7080
7105
|
function zE_safe(...e) {
|
|
7081
7106
|
try {
|
|
7082
7107
|
if ((function hasZendesk() {
|
|
@@ -7115,7 +7140,7 @@ function initializeDomContentEvents(e) {
|
|
|
7115
7140
|
function initializeConsolePlugin(e, a) {
|
|
7116
7141
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7117
7142
|
m2((e2) => {
|
|
7118
|
-
sendEvent({ type:
|
|
7143
|
+
sendEvent({ type: up.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7119
7144
|
}, window, e);
|
|
7120
7145
|
}
|
|
7121
7146
|
async function initializeRecording(e, a, u, m2, w2) {
|
|
@@ -7135,11 +7160,11 @@ async function initializeRecording(e, a, u, m2, w2) {
|
|
|
7135
7160
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7136
7161
|
});
|
|
7137
7162
|
const handleWidgetOpen = () => {
|
|
7138
|
-
ae.addSailfishEvent(
|
|
7163
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "customer support chat opened", element_id: pp, provider: dp });
|
|
7139
7164
|
}, handleWidgetClose = () => {
|
|
7140
|
-
ae.addSailfishEvent(
|
|
7165
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "customer support chat closed", element_id: pp, provider: dp });
|
|
7141
7166
|
}, handleUnreadMessages = (e2) => {
|
|
7142
|
-
ae.addSailfishEvent(
|
|
7167
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "zendesk unreadmessages", element_id: pp, provider: dp });
|
|
7143
7168
|
};
|
|
7144
7169
|
suppressConsoleLogsDuringCall(() => {
|
|
7145
7170
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7150,19 +7175,19 @@ async function initializeRecording(e, a, u, m2, w2) {
|
|
|
7150
7175
|
}
|
|
7151
7176
|
return b2;
|
|
7152
7177
|
}
|
|
7153
|
-
let
|
|
7178
|
+
let hp = null, fp = null;
|
|
7154
7179
|
function identify(e, a = {}, u = false) {
|
|
7155
7180
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7156
|
-
|
|
7181
|
+
hp && hp.userId === e && JSON.stringify(hp.traits) === JSON.stringify(a) || (hp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7157
7182
|
}
|
|
7158
7183
|
function addOrUpdateMetadata(e) {
|
|
7159
7184
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7160
|
-
|
|
7185
|
+
fp && JSON.stringify(fp) === JSON.stringify(e) || (fp = e, sendMessage(a));
|
|
7161
7186
|
}
|
|
7162
7187
|
function trackingEvent(e) {
|
|
7163
7188
|
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: ne() });
|
|
7164
7189
|
}
|
|
7165
|
-
const
|
|
7190
|
+
const mp = readDebugFlag(), gp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], yp = [400, 403], wp = "CORS", Sp = 1, bp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, vp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7166
7191
|
function trackDomainChangesOnce() {
|
|
7167
7192
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7168
7193
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7229,7 +7254,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7229
7254
|
return true;
|
|
7230
7255
|
}
|
|
7231
7256
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7232
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7257
|
+
return !!matchUrlWithWildcard(e, [...gp, ...a]);
|
|
7233
7258
|
}
|
|
7234
7259
|
function setupFetchInterceptor(e = []) {
|
|
7235
7260
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7264,7 +7289,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7264
7289
|
F2[e3] = a4;
|
|
7265
7290
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7266
7291
|
} catch (e3) {
|
|
7267
|
-
|
|
7292
|
+
mp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7268
7293
|
}
|
|
7269
7294
|
delete F2[b];
|
|
7270
7295
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7274,16 +7299,16 @@ function setupFetchInterceptor(e = []) {
|
|
|
7274
7299
|
const I4 = getFuncSpanHeader();
|
|
7275
7300
|
if (u3 instanceof Request) {
|
|
7276
7301
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7277
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7302
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), mp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7278
7303
|
const E3 = new Request(_3, { headers: O3 });
|
|
7279
7304
|
return await e3.call(a4, E3, m4);
|
|
7280
7305
|
}
|
|
7281
7306
|
{
|
|
7282
7307
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7283
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7308
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), mp && 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);
|
|
7284
7309
|
}
|
|
7285
7310
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7286
|
-
|
|
7311
|
+
yp.includes(U3.status) && (mp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7287
7312
|
try {
|
|
7288
7313
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7289
7314
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7299,7 +7324,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7299
7324
|
}
|
|
7300
7325
|
return e3.apply(a4, u3);
|
|
7301
7326
|
} catch (e4) {
|
|
7302
|
-
throw
|
|
7327
|
+
throw mp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7303
7328
|
}
|
|
7304
7329
|
})(e2, a3, u2, x3), B2 = true);
|
|
7305
7330
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7308,7 +7333,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7308
7333
|
const e3 = U3.clone();
|
|
7309
7334
|
q2 = await e3.text();
|
|
7310
7335
|
} catch (e3) {
|
|
7311
|
-
|
|
7336
|
+
mp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7312
7337
|
}
|
|
7313
7338
|
let H2 = null;
|
|
7314
7339
|
try {
|
|
@@ -7316,12 +7341,12 @@ function setupFetchInterceptor(e = []) {
|
|
|
7316
7341
|
H2[a4] = e3;
|
|
7317
7342
|
});
|
|
7318
7343
|
} catch (e3) {
|
|
7319
|
-
|
|
7344
|
+
mp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7320
7345
|
}
|
|
7321
7346
|
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;
|
|
7322
7347
|
} catch (m4) {
|
|
7323
7348
|
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7324
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7349
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(wp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7325
7350
|
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;
|
|
7326
7351
|
}
|
|
7327
7352
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
@@ -7355,7 +7380,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7355
7380
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7356
7381
|
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.serviceAdditionalMetadata = I2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7357
7382
|
else {
|
|
7358
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7383
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(vp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7359
7384
|
window.addEventListener("error", (e2) => {
|
|
7360
7385
|
captureError(e2.error || e2.message);
|
|
7361
7386
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7363,7 +7388,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7363
7388
|
});
|
|
7364
7389
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7365
7390
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7366
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a),
|
|
7391
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || U2.ws && 1 === U2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
|
|
7392
|
+
var _a3;
|
|
7393
|
+
((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? mp && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), mp && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
|
|
7394
|
+
}).catch((e2) => {
|
|
7395
|
+
mp && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
|
|
7396
|
+
}), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...gp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7367
7397
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7368
7398
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7369
7399
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7381,9 +7411,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7381
7411
|
}
|
|
7382
7412
|
const _3 = getFuncSpanHeader();
|
|
7383
7413
|
if (_3) try {
|
|
7384
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7414
|
+
this.setRequestHeader(_3.name, _3.value), mp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7385
7415
|
} catch (e3) {
|
|
7386
|
-
|
|
7416
|
+
mp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7387
7417
|
}
|
|
7388
7418
|
const O3 = Date.now();
|
|
7389
7419
|
let E3 = false;
|
|
@@ -7411,7 +7441,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7411
7441
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7412
7442
|
});
|
|
7413
7443
|
} catch (e4) {
|
|
7414
|
-
|
|
7444
|
+
mp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7415
7445
|
}
|
|
7416
7446
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7417
7447
|
else {
|
|
@@ -7427,7 +7457,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7427
7457
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7428
7458
|
})();
|
|
7429
7459
|
try {
|
|
7430
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7460
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || bp;
|
|
7431
7461
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7432
7462
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7433
7463
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
@@ -7463,7 +7493,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7463
7493
|
const e = document.visibilityState, a = Date.now();
|
|
7464
7494
|
"visible" === e && getOrSetSessionId();
|
|
7465
7495
|
try {
|
|
7466
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7496
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), mp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7467
7497
|
} catch (e2) {
|
|
7468
7498
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7469
7499
|
}
|
|
@@ -7481,16 +7511,18 @@ const initRecorder = async (e) => {
|
|
|
7481
7511
|
})), a.initPromise);
|
|
7482
7512
|
};
|
|
7483
7513
|
export {
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7514
|
+
bp as DEFAULT_CAPTURE_SETTINGS,
|
|
7515
|
+
vp as DEFAULT_CONSOLE_RECORDING_SETTINGS,
|
|
7516
|
+
Sp as STORAGE_VERSION,
|
|
7487
7517
|
addOrUpdateMetadata,
|
|
7488
7518
|
buildBatches,
|
|
7519
|
+
clearStaleFuncSpanState,
|
|
7489
7520
|
createTriageFromRecorder,
|
|
7490
7521
|
disableFunctionSpanTracking,
|
|
7491
7522
|
enableFunctionSpanTracking,
|
|
7492
7523
|
eventSize,
|
|
7493
7524
|
fetchCaptureSettings,
|
|
7525
|
+
fetchFunctionSpanTrackingEnabled,
|
|
7494
7526
|
flushBufferedEvents,
|
|
7495
7527
|
getFuncSpanHeader,
|
|
7496
7528
|
getOrSetSessionId,
|
|
@@ -7499,6 +7531,7 @@ export {
|
|
|
7499
7531
|
initRecorder,
|
|
7500
7532
|
initializeConsolePlugin,
|
|
7501
7533
|
initializeDomContentEvents,
|
|
7534
|
+
initializeFunctionSpanTrackingFromApi,
|
|
7502
7535
|
initializeRecording,
|
|
7503
7536
|
initializeWebSocket,
|
|
7504
7537
|
isFunctionSpanTrackingEnabled,
|