@sailfish-ai/recorder 1.8.2 → 1.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/errorInterceptor.js +74 -56
- package/dist/inAppReportIssueModal.js +18 -2
- package/dist/index.js +209 -12
- package/dist/recorder.cjs +954 -804
- package/dist/recorder.js +1040 -886
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +955 -805
- package/dist/recording.js +2 -0
- package/dist/types/errorInterceptor.d.ts +0 -5
- package/dist/types/recording.d.ts +2 -0
- package/dist/types/websocket.d.ts +23 -0
- package/dist/websocket.js +244 -7
- package/package.json +2 -1
package/dist/recorder.umd.cjs
CHANGED
|
@@ -329,9 +329,9 @@
|
|
|
329
329
|
a2.delete(e2);
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const J = "undefined" != typeof globalThis && void 0 !== globalThis.window, Y = "undefined" != typeof globalThis && void 0 !== globalThis.document, X = "undefined" != typeof globalThis && "localStorage" in globalThis, Q = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
|
|
333
333
|
function getOrSetSessionId() {
|
|
334
|
-
return
|
|
334
|
+
return J ? (window.name || (window.name = v4()), window.name) : v4();
|
|
335
335
|
}
|
|
336
336
|
function buildBatches(e2, a2, u2) {
|
|
337
337
|
const m2 = {};
|
|
@@ -359,8 +359,8 @@
|
|
|
359
359
|
return { ...e2 ?? {}, appUrl: (e2 == null ? void 0 : e2.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
360
360
|
}
|
|
361
361
|
e.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (e.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
|
|
362
|
-
const ee = readDebugFlag();
|
|
363
|
-
let
|
|
362
|
+
const ee = readDebugFlag(), te = "per_session";
|
|
363
|
+
let ne = null, re = false, oe = null, se = null, ie = false, le = null, ce = null, pe = false;
|
|
364
364
|
function isWebSocketOpen(e2) {
|
|
365
365
|
return (e2 == null ? void 0 : e2.readyState) === WebSocket.OPEN;
|
|
366
366
|
}
|
|
@@ -371,15 +371,15 @@
|
|
|
371
371
|
u2.onsuccess = () => a2(u2.result), u2.onerror = () => a2([]);
|
|
372
372
|
})) ?? [];
|
|
373
373
|
})();
|
|
374
|
-
if (isWebSocketOpen(
|
|
375
|
-
for (const a2 of e2)
|
|
374
|
+
if (isWebSocketOpen(ne)) try {
|
|
375
|
+
for (const a2 of e2) ne.send(a2.value), await deleteNotifyMessageById(a2.id);
|
|
376
376
|
} catch (e3) {
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
async function flushBufferedEvents() {
|
|
380
|
-
if (isWebSocketOpen(
|
|
380
|
+
if (isWebSocketOpen(ne)) if (oe) await oe;
|
|
381
381
|
else {
|
|
382
|
-
|
|
382
|
+
oe = (async () => {
|
|
383
383
|
var _a2, _b;
|
|
384
384
|
const e2 = await (async function getAllIndexedEvents() {
|
|
385
385
|
return await withStore$1("readonly", (e3) => new Promise((a3) => {
|
|
@@ -394,33 +394,33 @@
|
|
|
394
394
|
for (const e3 of Object.values(a2)) {
|
|
395
395
|
const a3 = buildBatches(e3, (e4) => eventSize(e4.data), 52428800);
|
|
396
396
|
for (const e4 of a3) {
|
|
397
|
-
if (!isWebSocketOpen(
|
|
397
|
+
if (!isWebSocketOpen(ne)) break;
|
|
398
398
|
const a4 = e4.map((e5) => {
|
|
399
399
|
var _a3, _b2;
|
|
400
400
|
return { ...e5.data, appUrl: ((_a3 = e5.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
401
401
|
}), u2 = e4.map((e5) => e5.id).filter((e5) => null != e5);
|
|
402
402
|
try {
|
|
403
403
|
const e5 = JSON.stringify({ type: "events", events: a4, mapUuid: window.sfMapUuid });
|
|
404
|
-
|
|
404
|
+
ne.send(e5), await deleteEventsByIds(u2);
|
|
405
405
|
} catch (e5) {
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
})();
|
|
410
410
|
try {
|
|
411
|
-
await
|
|
411
|
+
await oe;
|
|
412
412
|
} finally {
|
|
413
|
-
|
|
413
|
+
oe = null;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
function sendEvent(e2) {
|
|
418
418
|
var _a2;
|
|
419
419
|
const a2 = { ...e2, app_url: (e2 == null ? void 0 : e2.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
420
|
-
if (
|
|
420
|
+
if (re || !isWebSocketOpen(ne)) return void saveEventToIDB(a2);
|
|
421
421
|
const u2 = JSON.stringify({ type: "event", event: a2, mapUuid: window.sfMapUuid });
|
|
422
422
|
try {
|
|
423
|
-
|
|
423
|
+
ne.send(u2);
|
|
424
424
|
} catch (e3) {
|
|
425
425
|
saveEventToIDB(a2);
|
|
426
426
|
}
|
|
@@ -430,49 +430,104 @@
|
|
|
430
430
|
const a3 = document.createElement("a");
|
|
431
431
|
return a3.href = e3, `${a3.hostname}${a3.port ? `:${a3.port}` : ""}`;
|
|
432
432
|
})(e2), w2 = new URL(e2).protocol;
|
|
433
|
-
return
|
|
434
|
-
ee && console.log("WebSocket opened."), (async () => {
|
|
433
|
+
return ne = new z(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a2}&sessionId=${u2}&sender=JS%2FTS&version=1.8.8`, [], { connectionTimeout: 3e4 }), ne.addEventListener("open", () => {
|
|
434
|
+
ee && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ie ? "ENABLED" : "DISABLED"))), (async () => {
|
|
435
435
|
try {
|
|
436
|
-
|
|
436
|
+
re = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
437
437
|
} finally {
|
|
438
|
-
|
|
438
|
+
re = false;
|
|
439
439
|
}
|
|
440
|
-
null !=
|
|
440
|
+
null != se && clearInterval(se), se = window.setInterval(() => {
|
|
441
441
|
flushBufferedEvents();
|
|
442
442
|
}, 2e3);
|
|
443
443
|
})();
|
|
444
|
-
}),
|
|
445
|
-
console.log("WebSocket closed
|
|
446
|
-
}),
|
|
444
|
+
}), ne.addEventListener("close", () => {
|
|
445
|
+
ee && console.log("[Sailfish] WebSocket closed");
|
|
446
|
+
}), ne.addEventListener("message", (e3) => {
|
|
447
|
+
try {
|
|
448
|
+
const a3 = JSON.parse(e3.data);
|
|
449
|
+
if ("funcSpanTrackingControl" === a3.type) if (ee && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a3.enabled, timeoutSeconds: a3.timeoutSeconds, expirationTimestampMs: a3.expirationTimestampMs }), null !== le && (window.clearTimeout(le), le = null), ie = a3.enabled, pe = false, ee && console.log("[Sailfish] Function span tracking " + (a3.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a3.enabled) {
|
|
450
|
+
if (a3.expirationTimestampMs) {
|
|
451
|
+
ce = a3.expirationTimestampMs;
|
|
452
|
+
const e4 = Date.now(), u3 = ce - e4;
|
|
453
|
+
ee && console.log(`[Sailfish] Server expiration timestamp: ${ce}, ms until expiration: ${u3}`), u3 > 0 ? le = window.setTimeout(() => {
|
|
454
|
+
pe || (ie = false, ce = null, ee && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"));
|
|
455
|
+
}, u3) : (ie = false, ce = null, ee && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
456
|
+
} else {
|
|
457
|
+
const e4 = a3.timeoutSeconds || 3600;
|
|
458
|
+
e4 > 0 && (ce = Date.now() + 1e3 * e4, le = window.setTimeout(() => {
|
|
459
|
+
pe || (ie = false, ce = null, ee && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e4}s (legacy)`));
|
|
460
|
+
}, 1e3 * e4));
|
|
461
|
+
}
|
|
462
|
+
try {
|
|
463
|
+
const e4 = getOrSetSessionId();
|
|
464
|
+
ne.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e4, enabled: true, configurationType: "global" })), ee && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e4}`);
|
|
465
|
+
} catch (e4) {
|
|
466
|
+
ee && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e4);
|
|
467
|
+
}
|
|
468
|
+
} else ce = null;
|
|
469
|
+
} catch (e4) {
|
|
470
|
+
}
|
|
471
|
+
}), ne;
|
|
447
472
|
}
|
|
448
473
|
function sendMessage(e2) {
|
|
449
474
|
var _a2;
|
|
450
475
|
"sessionId" in e2 || (e2.sessionId = getOrSetSessionId());
|
|
451
476
|
const a2 = JSON.stringify({ ...e2, app_url: (e2 == null ? void 0 : e2.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
|
|
452
|
-
if (isWebSocketOpen(
|
|
453
|
-
|
|
477
|
+
if (isWebSocketOpen(ne)) try {
|
|
478
|
+
ne.send(a2);
|
|
454
479
|
} catch (e3) {
|
|
455
480
|
saveNotifyMessageToIDB(a2);
|
|
456
481
|
}
|
|
457
482
|
else saveNotifyMessageToIDB(a2);
|
|
458
483
|
}
|
|
459
|
-
|
|
484
|
+
function enableFunctionSpanTracking() {
|
|
485
|
+
if (ee && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), ie = true, pe = true, ce = null, null !== le && (window.clearTimeout(le), le = null), isWebSocketOpen(ne)) try {
|
|
486
|
+
const e2 = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: te };
|
|
487
|
+
ne.send(JSON.stringify(e2));
|
|
488
|
+
} catch (e2) {
|
|
489
|
+
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e2);
|
|
490
|
+
}
|
|
491
|
+
else ee && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
492
|
+
}
|
|
493
|
+
function disableFunctionSpanTracking() {
|
|
494
|
+
if (ee && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(ne)) try {
|
|
495
|
+
const e2 = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: te };
|
|
496
|
+
ne.send(JSON.stringify(e2));
|
|
497
|
+
} catch (e2) {
|
|
498
|
+
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e2);
|
|
499
|
+
}
|
|
500
|
+
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
501
|
+
pe && (ie = false, pe = false, ce = null, ee && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== le && (window.clearTimeout(le), le = null);
|
|
502
|
+
}
|
|
503
|
+
function isFunctionSpanTrackingEnabled() {
|
|
504
|
+
return ie;
|
|
505
|
+
}
|
|
506
|
+
function getFuncSpanHeader() {
|
|
507
|
+
if (!ie) return null;
|
|
508
|
+
if (null !== ce) {
|
|
509
|
+
if (Date.now() >= ce) return ie = false, ce = null, ee && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
510
|
+
}
|
|
511
|
+
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
512
|
+
}
|
|
513
|
+
const de = Object.freeze(Object.defineProperty({ __proto__: null, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
514
|
+
var he, me, ge = {}, ye = {}, we = {}, be = {};
|
|
460
515
|
function requireBase64() {
|
|
461
|
-
if (
|
|
462
|
-
|
|
516
|
+
if (he) return be;
|
|
517
|
+
he = 1;
|
|
463
518
|
var e2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
464
|
-
return
|
|
519
|
+
return be.encode = function(a2) {
|
|
465
520
|
if (0 <= a2 && a2 < e2.length) return e2[a2];
|
|
466
521
|
throw new TypeError("Must be between 0 and 63: " + a2);
|
|
467
|
-
},
|
|
522
|
+
}, be.decode = function(e3) {
|
|
468
523
|
return 65 <= e3 && e3 <= 90 ? e3 - 65 : 97 <= e3 && e3 <= 122 ? e3 - 97 + 26 : 48 <= e3 && e3 <= 57 ? e3 - 48 + 52 : 43 == e3 ? 62 : 47 == e3 ? 63 : -1;
|
|
469
|
-
},
|
|
524
|
+
}, be;
|
|
470
525
|
}
|
|
471
526
|
function requireBase64Vlq() {
|
|
472
|
-
if (
|
|
473
|
-
|
|
527
|
+
if (me) return we;
|
|
528
|
+
me = 1;
|
|
474
529
|
var e2 = requireBase64();
|
|
475
|
-
return
|
|
530
|
+
return we.encode = function base64VLQ_encode(a2) {
|
|
476
531
|
var u2, m2 = "", w2 = (function toVLQSigned(e3) {
|
|
477
532
|
return e3 < 0 ? 1 + (-e3 << 1) : 0 + (e3 << 1);
|
|
478
533
|
})(a2);
|
|
@@ -480,7 +535,7 @@
|
|
|
480
535
|
u2 = 31 & w2, (w2 >>>= 5) > 0 && (u2 |= 32), m2 += e2.encode(u2);
|
|
481
536
|
} while (w2 > 0);
|
|
482
537
|
return m2;
|
|
483
|
-
},
|
|
538
|
+
}, we.decode = function base64VLQ_decode(a2, u2, m2) {
|
|
484
539
|
var w2, b2, C2 = a2.length, x2 = 0, I2 = 0;
|
|
485
540
|
do {
|
|
486
541
|
if (u2 >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -491,11 +546,11 @@
|
|
|
491
546
|
var a3 = e3 >> 1;
|
|
492
547
|
return 1 & ~e3 ? a3 : -a3;
|
|
493
548
|
})(x2), m2.rest = u2;
|
|
494
|
-
},
|
|
549
|
+
}, we;
|
|
495
550
|
}
|
|
496
|
-
var
|
|
551
|
+
var ve, Ce = {};
|
|
497
552
|
function requireUtil() {
|
|
498
|
-
return
|
|
553
|
+
return ve || (ve = 1, (function(e2) {
|
|
499
554
|
e2.getArg = function getArg(e3, a3, u3) {
|
|
500
555
|
if (a3 in e3) return e3[a3];
|
|
501
556
|
if (3 === arguments.length) return u3;
|
|
@@ -607,12 +662,12 @@
|
|
|
607
662
|
}
|
|
608
663
|
return m2(a3);
|
|
609
664
|
};
|
|
610
|
-
})(
|
|
665
|
+
})(Ce)), Ce;
|
|
611
666
|
}
|
|
612
|
-
var
|
|
667
|
+
var ke, xe = {};
|
|
613
668
|
function requireArraySet() {
|
|
614
|
-
if (
|
|
615
|
-
|
|
669
|
+
if (ke) return xe;
|
|
670
|
+
ke = 1;
|
|
616
671
|
var e2 = requireUtil(), a2 = Object.prototype.hasOwnProperty, u2 = "undefined" != typeof Map;
|
|
617
672
|
function ArraySet() {
|
|
618
673
|
this._array = [], this._set = u2 ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -643,12 +698,12 @@
|
|
|
643
698
|
throw new Error("No element indexed by " + e3);
|
|
644
699
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
645
700
|
return this._array.slice();
|
|
646
|
-
},
|
|
701
|
+
}, xe.ArraySet = ArraySet, xe;
|
|
647
702
|
}
|
|
648
|
-
var
|
|
703
|
+
var Me, Ie, Oe = {};
|
|
649
704
|
function requireMappingList() {
|
|
650
|
-
if (
|
|
651
|
-
|
|
705
|
+
if (Me) return Oe;
|
|
706
|
+
Me = 1;
|
|
652
707
|
var e2 = requireUtil();
|
|
653
708
|
function MappingList() {
|
|
654
709
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -662,11 +717,11 @@
|
|
|
662
717
|
})(this._last, a2) ? (this._sorted = false, this._array.push(a2)) : (this._last = a2, this._array.push(a2));
|
|
663
718
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
664
719
|
return this._sorted || (this._array.sort(e2.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
665
|
-
},
|
|
720
|
+
}, Oe.MappingList = MappingList, Oe;
|
|
666
721
|
}
|
|
667
722
|
function requireSourceMapGenerator() {
|
|
668
|
-
if (
|
|
669
|
-
|
|
723
|
+
if (Ie) return ye;
|
|
724
|
+
Ie = 1;
|
|
670
725
|
var e2 = requireBase64Vlq(), a2 = requireUtil(), u2 = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
671
726
|
function SourceMapGenerator(e3) {
|
|
672
727
|
e3 || (e3 = {}), this._file = a2.getArg(e3, "file", null), this._sourceRoot = a2.getArg(e3, "sourceRoot", null), this._skipValidation = a2.getArg(e3, "skipValidation", false), this._ignoreInvalidMapping = a2.getArg(e3, "ignoreInvalidMapping", false), this._sources = new u2(), this._names = new u2(), this._mappings = new m2(), this._sourcesContents = null;
|
|
@@ -743,11 +798,11 @@
|
|
|
743
798
|
return null != this._file && (e3.file = this._file), null != this._sourceRoot && (e3.sourceRoot = this._sourceRoot), this._sourcesContents && (e3.sourcesContent = this._generateSourcesContent(e3.sources, e3.sourceRoot)), e3;
|
|
744
799
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
745
800
|
return JSON.stringify(this.toJSON());
|
|
746
|
-
},
|
|
801
|
+
}, ye.SourceMapGenerator = SourceMapGenerator, ye;
|
|
747
802
|
}
|
|
748
|
-
var
|
|
803
|
+
var Ee, Le = {}, Ae = {};
|
|
749
804
|
function requireBinarySearch() {
|
|
750
|
-
return
|
|
805
|
+
return Ee || (Ee = 1, (function(e2) {
|
|
751
806
|
function recursiveSearch(a2, u2, m2, w2, b2, C2) {
|
|
752
807
|
var x2 = Math.floor((u2 - a2) / 2) + a2, I2 = b2(m2, w2[x2], true);
|
|
753
808
|
return 0 === I2 ? x2 : I2 > 0 ? u2 - x2 > 1 ? recursiveSearch(x2, u2, m2, w2, b2, C2) : C2 == e2.LEAST_UPPER_BOUND ? u2 < w2.length ? u2 : -1 : x2 : x2 - a2 > 1 ? recursiveSearch(a2, x2, m2, w2, b2, C2) : C2 == e2.LEAST_UPPER_BOUND ? x2 : a2 < 0 ? -1 : a2;
|
|
@@ -759,11 +814,11 @@
|
|
|
759
814
|
for (; b2 - 1 >= 0 && 0 === m2(u2[b2], u2[b2 - 1], true); ) --b2;
|
|
760
815
|
return b2;
|
|
761
816
|
};
|
|
762
|
-
})(
|
|
817
|
+
})(Ae)), Ae;
|
|
763
818
|
}
|
|
764
|
-
var
|
|
819
|
+
var Te, De, Ue = {};
|
|
765
820
|
function requireQuickSort() {
|
|
766
|
-
if (
|
|
821
|
+
if (Te) return Ue;
|
|
767
822
|
function SortTemplate(e3) {
|
|
768
823
|
function swap(e4, a2, u2) {
|
|
769
824
|
var m2 = e4[a2];
|
|
@@ -782,21 +837,21 @@
|
|
|
782
837
|
}
|
|
783
838
|
};
|
|
784
839
|
}
|
|
785
|
-
|
|
840
|
+
Te = 1;
|
|
786
841
|
let e2 = /* @__PURE__ */ new WeakMap();
|
|
787
|
-
return
|
|
842
|
+
return Ue.quickSort = function(a2, u2, m2 = 0) {
|
|
788
843
|
let w2 = e2.get(u2);
|
|
789
844
|
void 0 === w2 && (w2 = (function cloneSort(e3) {
|
|
790
845
|
let a3 = SortTemplate.toString();
|
|
791
846
|
return new Function(`return ${a3}`)()(e3);
|
|
792
847
|
})(u2), e2.set(u2, w2)), w2(a2, u2, m2, a2.length - 1);
|
|
793
|
-
},
|
|
848
|
+
}, Ue;
|
|
794
849
|
}
|
|
795
|
-
var
|
|
796
|
-
var
|
|
797
|
-
return
|
|
798
|
-
if (
|
|
799
|
-
|
|
850
|
+
var Be, je, Ge = {};
|
|
851
|
+
var Ve = (function requireSourceMap() {
|
|
852
|
+
return je || (je = 1, ge.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, ge.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
853
|
+
if (De) return Le;
|
|
854
|
+
De = 1;
|
|
800
855
|
var e2 = requireUtil(), a2 = requireBinarySearch(), u2 = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
801
856
|
function SourceMapConsumer(a3, u3) {
|
|
802
857
|
var m3 = a3;
|
|
@@ -853,7 +908,7 @@
|
|
|
853
908
|
else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e2.getArg(x2, "generatedLine", null), column: e2.getArg(x2, "generatedColumn", null), lastColumn: e2.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
|
|
854
909
|
}
|
|
855
910
|
return b3;
|
|
856
|
-
},
|
|
911
|
+
}, Le.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a3) {
|
|
857
912
|
var u3, m3 = a3;
|
|
858
913
|
if (null != this.sourceRoot && (m3 = e2.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
859
914
|
for (u3 = 0; u3 < this._absoluteSources.length; ++u3) if (this._absoluteSources[u3] == a3) return u3;
|
|
@@ -970,7 +1025,7 @@
|
|
|
970
1025
|
if (b3.source === m3.source) return { line: e2.getArg(b3, "generatedLine", null), column: e2.getArg(b3, "generatedColumn", null), lastColumn: e2.getArg(b3, "lastGeneratedColumn", null) };
|
|
971
1026
|
}
|
|
972
1027
|
return { line: null, column: null, lastColumn: null };
|
|
973
|
-
},
|
|
1028
|
+
}, Le.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
974
1029
|
for (var e3 = [], a3 = 0; a3 < this._sections.length; a3++) for (var u3 = 0; u3 < this._sections[a3].consumer.sources.length; u3++) e3.push(this._sections[a3].consumer.sources[u3]);
|
|
975
1030
|
return e3;
|
|
976
1031
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u3) {
|
|
@@ -1009,10 +1064,10 @@
|
|
|
1009
1064
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1010
1065
|
}
|
|
1011
1066
|
w2(this.__generatedMappings, e2.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e2.compareByOriginalPositions);
|
|
1012
|
-
},
|
|
1013
|
-
})().SourceMapConsumer,
|
|
1014
|
-
if (
|
|
1015
|
-
|
|
1067
|
+
}, Le.IndexedSourceMapConsumer = IndexedSourceMapConsumer, Le;
|
|
1068
|
+
})().SourceMapConsumer, ge.SourceNode = (function requireSourceNode() {
|
|
1069
|
+
if (Be) return Ge;
|
|
1070
|
+
Be = 1;
|
|
1016
1071
|
var e2 = requireSourceMapGenerator().SourceMapGenerator, a2 = requireUtil(), u2 = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1017
1072
|
function SourceNode(e3, a3, u3, w2, b2) {
|
|
1018
1073
|
this.children = [], this.sourceContents = {}, this.line = null == e3 ? null : e3, this.column = null == a3 ? null : a3, this.source = null == u3 ? null : u3, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
|
|
@@ -1096,9 +1151,24 @@
|
|
|
1096
1151
|
}), this.walkSourceContents(function(e3, a4) {
|
|
1097
1152
|
m3.setSourceContent(e3, a4);
|
|
1098
1153
|
}), { code: u3.code, map: m3 };
|
|
1099
|
-
},
|
|
1100
|
-
})().SourceNode),
|
|
1154
|
+
}, Ge.SourceNode = SourceNode, Ge;
|
|
1155
|
+
})().SourceNode), ge;
|
|
1101
1156
|
})();
|
|
1157
|
+
const qe = /* @__PURE__ */ new Map(), He = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1158
|
+
async function getConsumerFor(e2, a2) {
|
|
1159
|
+
const u2 = (e2 || `/assets/${a2}`).split("?")[0], m2 = [`${u2}.map`, u2.replace(/\.js$/, ".js.map"), `/assets/${a2}.map`];
|
|
1160
|
+
for (const e3 of m2) try {
|
|
1161
|
+
if (qe.has(e3)) return qe.get(e3);
|
|
1162
|
+
const a3 = await fetch(e3);
|
|
1163
|
+
if (!a3.ok) continue;
|
|
1164
|
+
const u3 = await a3.json();
|
|
1165
|
+
if (!u3 || !u3.mappings || !u3.sources) continue;
|
|
1166
|
+
const m3 = await new Ve.SourceMapConsumer(u3);
|
|
1167
|
+
return qe.set(e3, m3), m3;
|
|
1168
|
+
} catch {
|
|
1169
|
+
}
|
|
1170
|
+
return null;
|
|
1171
|
+
}
|
|
1102
1172
|
async function captureError(e2, a2 = false) {
|
|
1103
1173
|
let u2, m2;
|
|
1104
1174
|
e2 instanceof Error ? (u2 = e2.message, m2 = e2.stack || "No stack trace") : "string" == typeof e2 ? (u2 = e2, m2 = "No stack trace available") : (u2 = "Unknown error occurred", m2 = "No stack trace available");
|
|
@@ -1106,46 +1176,37 @@
|
|
|
1106
1176
|
if (!e3) return ["No stack trace available"];
|
|
1107
1177
|
const a3 = Array.isArray(e3) ? e3 : e3.split("\n"), u3 = [];
|
|
1108
1178
|
for (const e4 of a3) {
|
|
1109
|
-
const a4 = e4.match(
|
|
1179
|
+
const a4 = e4.match(He);
|
|
1110
1180
|
if (!a4) {
|
|
1111
1181
|
u3.push(e4);
|
|
1112
1182
|
continue;
|
|
1113
1183
|
}
|
|
1114
|
-
const [, m3, w3,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
const x2 = (await new Te.SourceMapConsumer(m4)).originalPositionFor({ line: parseInt(w3, 10) - 1, column: parseInt(b2, 10) });
|
|
1124
|
-
if (x2.source && x2.line) {
|
|
1125
|
-
const e5 = m4.sources.indexOf(x2.source);
|
|
1126
|
-
let a6 = [];
|
|
1127
|
-
if (-1 !== e5 && m4.sourcesContent && m4.sourcesContent[e5]) {
|
|
1128
|
-
const u4 = m4.sourcesContent[e5].split("\n"), w4 = x2.line || 1, b3 = Math.max(w4 - 6, 0), C3 = Math.min(w4 + 4, u4.length);
|
|
1129
|
-
a6 = u4.slice(b3, C3).map((e6, a7) => {
|
|
1130
|
-
const u5 = b3 + a7 + 1;
|
|
1131
|
-
return `${u5 === w4 ? "👉" : " "} ${u5.toString().padStart(4)} | ${e6.trim()}`;
|
|
1132
|
-
});
|
|
1133
|
-
}
|
|
1134
|
-
u3.push(`${x2.source}:${x2.line}:${x2.column} (${x2.name || "anonymous"})`);
|
|
1135
|
-
} else u3.push(e4);
|
|
1136
|
-
} catch (a5) {
|
|
1137
|
-
u3.push(e4);
|
|
1184
|
+
const [, m3, w3, b3, C2] = a4, x2 = parseInt(b3, 10), I2 = Math.max(0, parseInt(C2, 10) - 1);
|
|
1185
|
+
if (!Number.isFinite(x2) || !Number.isFinite(I2)) {
|
|
1186
|
+
u3.push(e4 + " [Invalid line/column]");
|
|
1187
|
+
continue;
|
|
1188
|
+
}
|
|
1189
|
+
const _2 = await getConsumerFor(m3, w3);
|
|
1190
|
+
if (!_2) {
|
|
1191
|
+
u3.push(`${e4} [No source map found for ${w3}]`);
|
|
1192
|
+
continue;
|
|
1138
1193
|
}
|
|
1194
|
+
let O2 = _2.originalPositionFor({ line: x2, column: I2, bias: Ve.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1195
|
+
if (!O2.source || null == O2.line) for (let e5 = 1; e5 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e5), bias: Ve.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e5++) ;
|
|
1196
|
+
if (O2.source && null != O2.line) {
|
|
1197
|
+
const e5 = O2.name || "anonymous";
|
|
1198
|
+
u3.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e5})`);
|
|
1199
|
+
} else u3.push(`${e4} [No mapping found in ${w3}]`);
|
|
1139
1200
|
}
|
|
1140
1201
|
return u3;
|
|
1141
|
-
})(m2);
|
|
1142
|
-
sendMessage({ type: "event", event: { type: 6, data: { payload: { message: u2, stack: m2,
|
|
1202
|
+
})(m2), b2 = w2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom"));
|
|
1203
|
+
sendMessage({ type: "event", event: { type: 6, data: { payload: { message: u2, stack: m2, trace: b2.length > 0 ? b2 : w2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: Date.now(), level: "error" } } } });
|
|
1143
1204
|
}
|
|
1144
|
-
const
|
|
1145
|
-
const
|
|
1205
|
+
const Je = readDebugFlag();
|
|
1206
|
+
const Ye = readDebugFlag();
|
|
1146
1207
|
function sendGraphQLRequest(e2, a2, u2, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1147
1208
|
const C2 = `${u2.backendApi}/graphql/?apiKey=${u2.apiKey}`;
|
|
1148
|
-
return
|
|
1209
|
+
return Ye && console.log(`Initial GraphQL request for ${e2} at ${C2}`), (function exponentialBackoff(e3, a3, u3 = 5, m3 = 2e3, w3 = 2) {
|
|
1149
1210
|
let b3 = 0;
|
|
1150
1211
|
const attemptRequest = async () => {
|
|
1151
1212
|
try {
|
|
@@ -1153,12 +1214,12 @@
|
|
|
1153
1214
|
} catch (e4) {
|
|
1154
1215
|
if (b3++, b3 > u3) throw e4;
|
|
1155
1216
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1156
|
-
return
|
|
1217
|
+
return Je && console.log(`Attempt ${b3} failed: ${a3}; Retrying in ${C3}ms...`), await new Promise((e5) => setTimeout(e5, C3)), attemptRequest();
|
|
1157
1218
|
}
|
|
1158
1219
|
};
|
|
1159
1220
|
return attemptRequest();
|
|
1160
1221
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e2, query: a2, variables: u2 }) }).then((e3) => {
|
|
1161
|
-
if (
|
|
1222
|
+
if (Ye && console.log(`Received response with status: ${e3.status}`), !e3.ok) throw new Error(`GraphQL request failed with status ${e3.status}`);
|
|
1162
1223
|
return e3.json();
|
|
1163
1224
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1164
1225
|
}
|
|
@@ -1174,9 +1235,9 @@
|
|
|
1174
1235
|
function createTriageFromRecorder(e2, a2, u2, m2, w2, b2) {
|
|
1175
1236
|
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: e2, recordingSessionId: u2, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a2 });
|
|
1176
1237
|
}
|
|
1177
|
-
const
|
|
1238
|
+
const Xe = { 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 } }, Qe = { shortcuts: { ...Xe }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1178
1239
|
} };
|
|
1179
|
-
let
|
|
1240
|
+
let et = null, nt = { mode: "lookback", description: "" }, ot = null, st = null, it = null, at = false;
|
|
1180
1241
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1181
1242
|
return (function isMacPlatform() {
|
|
1182
1243
|
const e2 = navigator.userAgentData;
|
|
@@ -1189,11 +1250,11 @@
|
|
|
1189
1250
|
return e3.requireCmdCtrl && a2.push(getShortcutKeyCmdCtrlLabel()), a2.push((function formatShortcutKeyLabel(e4) {
|
|
1190
1251
|
return ({ escape: "esc" }[e4.toLowerCase()] || e4).toUpperCase();
|
|
1191
1252
|
})(e3.key)), a2.map((e4) => `<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;">${e4}</span>`).join(e3.requireCmdCtrl ? " + " : "");
|
|
1192
|
-
})(
|
|
1253
|
+
})(Qe.shortcuts[e2]);
|
|
1193
1254
|
}
|
|
1194
1255
|
function setupIssueReporting(e2) {
|
|
1195
|
-
|
|
1196
|
-
const a3 = { ...
|
|
1256
|
+
Qe.apiKey = e2.apiKey, Qe.backendApi = e2.backendApi, Qe.resolveSessionId = e2.getSessionId, e2.customBaseUrl && (Qe.triageBaseUrl = e2.customBaseUrl), Qe.shortcuts = (function mergeShortcutsConfig(e3) {
|
|
1257
|
+
const a3 = { ...Xe };
|
|
1197
1258
|
if (!e3) return a3;
|
|
1198
1259
|
"boolean" == typeof e3.enabled && (a3.enabled = e3.enabled);
|
|
1199
1260
|
const u2 = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1203,7 +1264,7 @@
|
|
|
1203
1264
|
}
|
|
1204
1265
|
return a3;
|
|
1205
1266
|
})(e2.shortcuts);
|
|
1206
|
-
const { shortcuts: a2 } =
|
|
1267
|
+
const { shortcuts: a2 } = Qe;
|
|
1207
1268
|
window.addEventListener("keydown", (e3) => {
|
|
1208
1269
|
const u2 = (function isTypingInInput() {
|
|
1209
1270
|
const e4 = document.activeElement;
|
|
@@ -1213,20 +1274,20 @@
|
|
|
1213
1274
|
} : injectModalHTML;
|
|
1214
1275
|
if (C2 && shortcutUsed("openModalExistingMode")) return e3.preventDefault(), void x2("lookback");
|
|
1215
1276
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e3.preventDefault(), void x2("startnow");
|
|
1216
|
-
if (b2 && !
|
|
1277
|
+
if (b2 && !at && shortcutUsed("closeModal")) return e3.preventDefault(), void closeModal();
|
|
1217
1278
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1218
1279
|
const a3 = document.getElementById("sf-issue-submit-btn");
|
|
1219
1280
|
return void (a3 && !a3.disabled && (e3.preventDefault(), a3.click()));
|
|
1220
1281
|
}
|
|
1221
|
-
if (
|
|
1222
|
-
if (b2 && "startnow" ===
|
|
1282
|
+
if (at && m2 === a2.stopRecording.key && w2 === a2.stopRecording.requireCmdCtrl) return e3.preventDefault(), void stopRecording();
|
|
1283
|
+
if (b2 && "startnow" === nt.mode && m2 === a2.startRecording.key && w2 === a2.startRecording.requireCmdCtrl && !u2) {
|
|
1223
1284
|
const a3 = document.getElementById("sf-start-recording-btn");
|
|
1224
1285
|
return void (a3 && (e3.preventDefault(), a3.click()));
|
|
1225
1286
|
}
|
|
1226
1287
|
});
|
|
1227
1288
|
}
|
|
1228
1289
|
function closeModal() {
|
|
1229
|
-
|
|
1290
|
+
Qe.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (et == null ? void 0 : et.parentNode) && et.parentNode.removeChild(et), et = null, at || (nt = { mode: "lookback", description: "", occurredInThisTab: true }, ot = null, st = null), it && clearInterval(it);
|
|
1230
1291
|
}
|
|
1231
1292
|
function activateModalIsolation(e2) {
|
|
1232
1293
|
e2.setAttribute("role", "dialog"), e2.setAttribute("aria-modal", "true"), e2.hasAttribute("tabindex") || e2.setAttribute("tabindex", "-1");
|
|
@@ -1285,9 +1346,9 @@
|
|
|
1285
1346
|
};
|
|
1286
1347
|
}
|
|
1287
1348
|
function injectModalHTML(e2 = "lookback") {
|
|
1288
|
-
|
|
1349
|
+
et && (et.remove(), et = null), et = document.createElement("div"), et.id = "sf-report-issue-modal";
|
|
1289
1350
|
const a2 = "startnow" === e2;
|
|
1290
|
-
|
|
1351
|
+
et.innerHTML = `
|
|
1291
1352
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1292
1353
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1293
1354
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1335,7 +1396,7 @@
|
|
|
1335
1396
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1336
1397
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1337
1398
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1338
|
-
resize:none; outline:none;">${
|
|
1399
|
+
resize:none; outline:none;">${nt.description}</textarea>
|
|
1339
1400
|
|
|
1340
1401
|
<div id="sf-lookback-container" style="display:${a2 ? "none" : "block"}; margin-bottom:20px;">
|
|
1341
1402
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1423,8 +1484,8 @@
|
|
|
1423
1484
|
<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>
|
|
1424
1485
|
</div>
|
|
1425
1486
|
</div>
|
|
1426
|
-
`,
|
|
1427
|
-
const e3 =
|
|
1487
|
+
`, nt.mode = e2, document.body.appendChild(et), (function bindListeners() {
|
|
1488
|
+
const e3 = et == null ? void 0 : et.querySelectorAll(".sf-issue-tab"), a3 = document.getElementById("sf-start-recording-btn"), u2 = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
|
|
1428
1489
|
e3 == null ? void 0 : e3.forEach((e4) => {
|
|
1429
1490
|
e4.addEventListener("click", (e5) => {
|
|
1430
1491
|
const a4 = e5.currentTarget.dataset.mode;
|
|
@@ -1432,20 +1493,29 @@
|
|
|
1432
1493
|
});
|
|
1433
1494
|
}), u2 && (u2.onclick = closeModal);
|
|
1434
1495
|
w2 && w2.addEventListener("change", () => {
|
|
1435
|
-
"lookback" ===
|
|
1496
|
+
"lookback" === nt.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1436
1497
|
});
|
|
1437
1498
|
a3 && (a3.onclick = () => {
|
|
1438
1499
|
const e4 = document.getElementById("sf-issue-description");
|
|
1439
|
-
e4 && (
|
|
1500
|
+
e4 && (nt.description = e4.value), (function startCountdownThenRecord() {
|
|
1440
1501
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1441
1502
|
const e5 = document.createElement("div");
|
|
1442
1503
|
e5.id = "sf-countdown-overlay", e5.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 ";
|
|
1443
1504
|
let a4 = 3;
|
|
1444
1505
|
e5.textContent = a4.toString(), document.body.appendChild(e5);
|
|
1445
|
-
const u3 = setInterval(() => {
|
|
1446
|
-
a4--, a4 > 0
|
|
1447
|
-
|
|
1448
|
-
|
|
1506
|
+
const u3 = setInterval(async () => {
|
|
1507
|
+
if (a4--, a4 > 0) e5.textContent = a4.toString();
|
|
1508
|
+
else {
|
|
1509
|
+
clearInterval(u3), document.body.removeChild(e5), ot = Date.now(), at = true;
|
|
1510
|
+
try {
|
|
1511
|
+
const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => de);
|
|
1512
|
+
e6();
|
|
1513
|
+
} catch (e6) {
|
|
1514
|
+
console.error("[Report Issue] Failed to enable function span tracking:", e6);
|
|
1515
|
+
}
|
|
1516
|
+
closeModal(), (function showFloatingTimer() {
|
|
1517
|
+
const e6 = document.createElement("div");
|
|
1518
|
+
e6.id = "sf-recording-indicator", e6.style.cssText = "\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n padding: 8px 12px;\n font-family: sans-serif;\n font-size: 14px;\n display: flex;\n align-items: start;\n gap: 24px;\n z-index: 10000;\n cursor: pointer;\n ", e6.innerHTML = `
|
|
1449
1519
|
<div style="display:flex; align-items:center; gap:8px;">
|
|
1450
1520
|
<div style="width:32px; height:32px; background:#FC5555; border-radius:6px; border:1px solid #991b1b; display:flex; align-items:center; justify-content:center;">
|
|
1451
1521
|
<div style="width:10px; height:10px; background:white; border-radius:2px;"></div>
|
|
@@ -1462,22 +1532,23 @@
|
|
|
1462
1532
|
</span>
|
|
1463
1533
|
</div>
|
|
1464
1534
|
`, e6.addEventListener("click", () => stopRecording()), document.body.appendChild(e6);
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1535
|
+
const a5 = e6.querySelector("#sf-recording-timer");
|
|
1536
|
+
if (!a5) return;
|
|
1537
|
+
it = setInterval(() => {
|
|
1538
|
+
const e7 = Date.now() - (ot ?? Date.now()), u4 = Math.floor(e7 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e7 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1539
|
+
a5.textContent = `${u4}:${m3}`;
|
|
1540
|
+
}, 1e3);
|
|
1541
|
+
})();
|
|
1542
|
+
}
|
|
1472
1543
|
}, 1e3);
|
|
1473
1544
|
})();
|
|
1474
1545
|
});
|
|
1475
|
-
|
|
1546
|
+
et == null ? void 0 : et.addEventListener("click", (e4) => {
|
|
1476
1547
|
var _a2;
|
|
1477
1548
|
if (e4.target.closest("#sf-issue-submit-btn")) {
|
|
1478
|
-
const e5 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a4 =
|
|
1549
|
+
const e5 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a4 = nt.mode;
|
|
1479
1550
|
let u3, m3;
|
|
1480
|
-
if (
|
|
1551
|
+
if (nt.description = e5, "startnow" === a4) u3 = ot ?? Date.now() - 3e5, m3 = st ?? Date.now();
|
|
1481
1552
|
else {
|
|
1482
1553
|
const e6 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1483
1554
|
m3 = Date.now(), u3 = m3 - e6;
|
|
@@ -1486,9 +1557,9 @@
|
|
|
1486
1557
|
var _a3, _b;
|
|
1487
1558
|
try {
|
|
1488
1559
|
showTriageStatusModal(true);
|
|
1489
|
-
const m4 = await createTriageFromRecorder(
|
|
1490
|
-
if (!
|
|
1491
|
-
return
|
|
1560
|
+
const m4 = await createTriageFromRecorder(Qe.apiKey, Qe.backendApi, (function getSessionIdSafely() {
|
|
1561
|
+
if (!Qe.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1562
|
+
return Qe.resolveSessionId();
|
|
1492
1563
|
})(), e6, a5, u4), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1493
1564
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1494
1565
|
} catch (e7) {
|
|
@@ -1497,27 +1568,34 @@
|
|
|
1497
1568
|
})(`${u3}`, `${m3}`, e5);
|
|
1498
1569
|
}
|
|
1499
1570
|
});
|
|
1500
|
-
})(),
|
|
1571
|
+
})(), Qe.deactivateIsolation = activateModalIsolation(et);
|
|
1501
1572
|
}
|
|
1502
1573
|
function setActiveTab(e2) {
|
|
1503
|
-
|
|
1504
|
-
const a2 =
|
|
1574
|
+
nt.mode = e2;
|
|
1575
|
+
const a2 = et == null ? void 0 : et.querySelector("#sf-tab-lookback"), u2 = et == null ? void 0 : et.querySelector("#sf-tab-startnow");
|
|
1505
1576
|
"lookback" === e2 ? (a2.style.background = "white", a2.style.color = "#0F172A", u2.style.background = "transparent", u2.style.color = "#64748B") : (u2.style.background = "white", u2.style.color = "#0F172A", a2.style.background = "transparent", a2.style.color = "#64748B");
|
|
1506
1577
|
}
|
|
1507
1578
|
function updateModeSpecificUI(e2) {
|
|
1508
1579
|
const a2 = document.querySelector("#sf-issue-mode-info div"), u2 = 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");
|
|
1509
1580
|
if (a2 && u2 && m2 && w2 && b2 && C2 && x2) if ("startnow" === e2) {
|
|
1510
1581
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a2.textContent = "I want to reproduce the issue right now.";
|
|
1511
|
-
const e3 = null !==
|
|
1512
|
-
if (u2.disabled = !e3, u2.style.opacity = e3 ? "1" : "0.4", u2.style.cursor = e3 ? "pointer" : "not-allowed",
|
|
1513
|
-
const e4 = Math.floor((
|
|
1582
|
+
const e3 = null !== ot && null !== st;
|
|
1583
|
+
if (u2.disabled = !e3, u2.style.opacity = e3 ? "1" : "0.4", u2.style.cursor = e3 ? "pointer" : "not-allowed", ot && st) {
|
|
1584
|
+
const e4 = Math.floor((st - ot) / 1e3), a3 = String(Math.floor(e4 / 60)).padStart(2, "0"), u3 = String(e4 % 60).padStart(2, "0");
|
|
1514
1585
|
w2.style.display = "block", b2.textContent = `${a3}:${u3}`;
|
|
1515
1586
|
} else w2.style.display = "none";
|
|
1516
1587
|
} else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a2.textContent = "Something already happened. Capture the past few minutes.", u2.disabled = false, u2.style.opacity = "1", u2.style.cursor = "pointer";
|
|
1517
1588
|
}
|
|
1518
|
-
function stopRecording() {
|
|
1589
|
+
async function stopRecording() {
|
|
1519
1590
|
var _a2;
|
|
1520
|
-
|
|
1591
|
+
st = Date.now(), at = false, it && clearInterval(it), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1592
|
+
try {
|
|
1593
|
+
const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => de);
|
|
1594
|
+
e2();
|
|
1595
|
+
} catch (e2) {
|
|
1596
|
+
console.error("[Report Issue] Failed to disable function span tracking:", e2);
|
|
1597
|
+
}
|
|
1598
|
+
!(function reopenModalAfterStop() {
|
|
1521
1599
|
injectModalHTML("startnow");
|
|
1522
1600
|
const e2 = document.getElementById("sf-start-recording-btn");
|
|
1523
1601
|
if (e2) {
|
|
@@ -1525,17 +1603,17 @@
|
|
|
1525
1603
|
a3 && (a3.textContent = "Re-record");
|
|
1526
1604
|
}
|
|
1527
1605
|
const a2 = document.getElementById("sf-recording-timer-label"), u2 = document.getElementById("sf-recording-timer-display");
|
|
1528
|
-
if (a2 && u2 &&
|
|
1529
|
-
const e3 = Math.floor((
|
|
1606
|
+
if (a2 && u2 && ot && st) {
|
|
1607
|
+
const e3 = Math.floor((st - ot) / 1e3), m3 = Math.floor(e3 / 60).toString().padStart(2, "0"), w3 = (e3 % 60).toString().padStart(2, "0");
|
|
1530
1608
|
u2.textContent = `${m3}:${w3}`, a2.style.display = "block";
|
|
1531
1609
|
}
|
|
1532
1610
|
const m2 = document.getElementById("sf-issue-description");
|
|
1533
|
-
m2 && (m2.value =
|
|
1611
|
+
m2 && (m2.value = nt.description);
|
|
1534
1612
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1535
1613
|
w2 && (w2.checked = true);
|
|
1536
1614
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1537
1615
|
if (b2 && C2) {
|
|
1538
|
-
const e3 = Math.floor(((
|
|
1616
|
+
const e3 = Math.floor(((st ?? 0) - (ot ?? 0)) / 1e3), a3 = Math.floor(e3 / 60).toString().padStart(2, "0"), u3 = Math.floor(e3 % 60).toString().padStart(2, "0");
|
|
1539
1617
|
C2.textContent = `${a3}:${u3}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1540
1618
|
}
|
|
1541
1619
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1548,7 +1626,7 @@
|
|
|
1548
1626
|
var _a3, _b;
|
|
1549
1627
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1550
1628
|
})();
|
|
1551
|
-
const u2 = a2 ? `${
|
|
1629
|
+
const u2 = a2 ? `${Qe.triageBaseUrl}/triage/${a2}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1552
1630
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1553
1631
|
const w2 = e2 ? "Reporting Issue..." : "Issue reported!", b2 = e2 ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e2 ? '<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 = e2 ? "" : '<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>';
|
|
1554
1632
|
m2.innerHTML = `
|
|
@@ -1610,7 +1688,7 @@
|
|
|
1610
1688
|
function fadeCardAndRemove(e2, a2, u2 = 300) {
|
|
1611
1689
|
a2.style.opacity = "0", a2.addEventListener("transitionend", () => e2.remove(), { once: true }), setTimeout(() => e2.remove(), u2 + 100);
|
|
1612
1690
|
}
|
|
1613
|
-
var
|
|
1691
|
+
var lt = Object.defineProperty, b$1 = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? lt(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2), ct = Object.defineProperty, xn = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? ct(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2), ut = ((e2) => (e2[e2.Document = 0] = "Document", e2[e2.DocumentType = 1] = "DocumentType", e2[e2.Element = 2] = "Element", e2[e2.Text = 3] = "Text", e2[e2.CDATA = 4] = "CDATA", e2[e2.Comment = 5] = "Comment", e2))(ut || {});
|
|
1614
1692
|
function vr(e2) {
|
|
1615
1693
|
return e2.nodeType === e2.ELEMENT_NODE;
|
|
1616
1694
|
}
|
|
@@ -1652,7 +1730,7 @@
|
|
|
1652
1730
|
})(e2.cssText);
|
|
1653
1731
|
return a2 || e2.cssText;
|
|
1654
1732
|
}
|
|
1655
|
-
let
|
|
1733
|
+
let pt = class {
|
|
1656
1734
|
constructor() {
|
|
1657
1735
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1658
1736
|
}
|
|
@@ -1704,7 +1782,7 @@
|
|
|
1704
1782
|
function fe(e2) {
|
|
1705
1783
|
return e2.toLowerCase();
|
|
1706
1784
|
}
|
|
1707
|
-
const
|
|
1785
|
+
const dt = "__rrweb_original__";
|
|
1708
1786
|
function Yt(e2) {
|
|
1709
1787
|
const a2 = e2.type;
|
|
1710
1788
|
return e2.hasAttribute("data-rr-is-password") ? "password" : a2 ? fe(a2) : null;
|
|
@@ -1719,19 +1797,19 @@
|
|
|
1719
1797
|
const m2 = u2.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1720
1798
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1721
1799
|
}
|
|
1722
|
-
let
|
|
1723
|
-
const
|
|
1800
|
+
let ht = 1;
|
|
1801
|
+
const gt = new RegExp("[^a-z0-9-_:]");
|
|
1724
1802
|
function Ir() {
|
|
1725
|
-
return
|
|
1803
|
+
return ht++;
|
|
1726
1804
|
}
|
|
1727
|
-
let
|
|
1728
|
-
const
|
|
1805
|
+
let yt, wt;
|
|
1806
|
+
const bt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, St = /^(?:[a-z+]+:)?\/\//i, vt = /^www\..*/i, Ct = /^(data:)([^,]*),(.*)/i;
|
|
1729
1807
|
function Pt(e2, a2) {
|
|
1730
|
-
return (e2 || "").replace(
|
|
1808
|
+
return (e2 || "").replace(bt, (e3, u2, m2, w2, b2, C2) => {
|
|
1731
1809
|
const x2 = m2 || b2 || C2, I2 = u2 || w2 || "";
|
|
1732
1810
|
if (!x2) return e3;
|
|
1733
|
-
if (
|
|
1734
|
-
if (
|
|
1811
|
+
if (St.test(x2) || vt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1812
|
+
if (Ct.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1735
1813
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e4) {
|
|
1736
1814
|
let a3 = "";
|
|
1737
1815
|
return a3 = e4.indexOf("//") > -1 ? e4.split("/").slice(0, 3).join("/") : e4.split("/")[0], a3 = a3.split("?")[0], a3;
|
|
@@ -1742,8 +1820,8 @@
|
|
|
1742
1820
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1743
1821
|
});
|
|
1744
1822
|
}
|
|
1745
|
-
const
|
|
1746
|
-
const
|
|
1823
|
+
const kt = /^[^ \t\n\r\u000c]+/, xt = /^[, \t\n\r\u000c]+/;
|
|
1824
|
+
const Mt = /* @__PURE__ */ new WeakMap();
|
|
1747
1825
|
function At(e2, a2) {
|
|
1748
1826
|
return a2 && "" !== a2.trim() ? $t(e2, a2) : a2;
|
|
1749
1827
|
}
|
|
@@ -1751,8 +1829,8 @@
|
|
|
1751
1829
|
return !("svg" !== e2.tagName && !e2.ownerSVGElement);
|
|
1752
1830
|
}
|
|
1753
1831
|
function $t(e2, a2) {
|
|
1754
|
-
let u2 =
|
|
1755
|
-
if (u2 || (u2 = e2.createElement("a"),
|
|
1832
|
+
let u2 = Mt.get(e2);
|
|
1833
|
+
if (u2 || (u2 = e2.createElement("a"), Mt.set(e2, u2)), a2) {
|
|
1756
1834
|
if (a2.startsWith("blob:") || a2.startsWith("data:")) return a2;
|
|
1757
1835
|
} else a2 = "";
|
|
1758
1836
|
return u2.setAttribute("href", a2), u2.href;
|
|
@@ -1767,8 +1845,8 @@
|
|
|
1767
1845
|
return w2 ? (m4 = w2[0], u3 += m4.length, m4) : "";
|
|
1768
1846
|
}
|
|
1769
1847
|
const m3 = [];
|
|
1770
|
-
for (; n(
|
|
1771
|
-
let w2 = n(
|
|
1848
|
+
for (; n(xt), !(u3 >= a3.length); ) {
|
|
1849
|
+
let w2 = n(kt);
|
|
1772
1850
|
if ("," === w2.slice(-1)) w2 = At(e3, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1773
1851
|
else {
|
|
1774
1852
|
let b2 = "";
|
|
@@ -1838,9 +1916,9 @@
|
|
|
1838
1916
|
})(u2, m2);
|
|
1839
1917
|
switch (e2.nodeType) {
|
|
1840
1918
|
case e2.DOCUMENT_NODE:
|
|
1841
|
-
return "CSS1Compat" !== e2.compatMode ? { type:
|
|
1919
|
+
return "CSS1Compat" !== e2.compatMode ? { type: ut.Document, childNodes: [], compatMode: e2.compatMode } : { type: ut.Document, childNodes: [] };
|
|
1842
1920
|
case e2.DOCUMENT_TYPE_NODE:
|
|
1843
|
-
return { type:
|
|
1921
|
+
return { type: ut.DocumentType, name: e2.name, publicId: e2.publicId, systemId: e2.systemId, rootId: $2 };
|
|
1844
1922
|
case e2.ELEMENT_NODE:
|
|
1845
1923
|
return (function Vi(e3, a3) {
|
|
1846
1924
|
const { doc: u3, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a3, U3 = (function Ui(e4, a4, u4) {
|
|
@@ -1858,7 +1936,7 @@
|
|
|
1858
1936
|
})(e3, m3, w3), B3 = (function Oi(e4) {
|
|
1859
1937
|
if (e4 instanceof HTMLFormElement) return "form";
|
|
1860
1938
|
const a4 = fe(e4.tagName);
|
|
1861
|
-
return
|
|
1939
|
+
return gt.test(a4) ? "div" : a4;
|
|
1862
1940
|
})(e3);
|
|
1863
1941
|
let $3 = {};
|
|
1864
1942
|
const z2 = e3.attributes.length;
|
|
@@ -1887,7 +1965,7 @@
|
|
|
1887
1965
|
const a4 = e4.getContext("2d");
|
|
1888
1966
|
if (!a4) return true;
|
|
1889
1967
|
for (let u4 = 0; u4 < e4.width; u4 += 50) for (let m4 = 0; m4 < e4.height; m4 += 50) {
|
|
1890
|
-
const w4 = a4.getImageData, b4 =
|
|
1968
|
+
const w4 = a4.getImageData, b4 = dt in w4 ? w4[dt] : w4;
|
|
1891
1969
|
if (new Uint32Array(b4.call(a4, u4, m4, Math.min(50, e4.width - u4), Math.min(50, e4.height - m4)).data.buffer).some((e5) => 0 !== e5)) return false;
|
|
1892
1970
|
}
|
|
1893
1971
|
return true;
|
|
@@ -1899,11 +1977,11 @@
|
|
|
1899
1977
|
}
|
|
1900
1978
|
}
|
|
1901
1979
|
if ("img" === B3 && _3) {
|
|
1902
|
-
|
|
1980
|
+
yt || (yt = u3.createElement("canvas"), wt = yt.getContext("2d"));
|
|
1903
1981
|
const a4 = e3, m4 = a4.currentSrc || a4.getAttribute("src") || "<unknown-src>", w4 = a4.crossOrigin, A = () => {
|
|
1904
1982
|
a4.removeEventListener("load", A);
|
|
1905
1983
|
try {
|
|
1906
|
-
|
|
1984
|
+
yt.width = a4.naturalWidth, yt.height = a4.naturalHeight, wt.drawImage(a4, 0, 0), $3.rr_dataURL = yt.toDataURL(I3.type, I3.quality);
|
|
1907
1985
|
} catch (e4) {
|
|
1908
1986
|
if ("anonymous" !== a4.crossOrigin) return a4.crossOrigin = "anonymous", void (a4.complete && 0 !== a4.naturalWidth ? A() : a4.addEventListener("load", A));
|
|
1909
1987
|
console.warn(`Cannot inline img src=${m4}! Error: ${e4}`);
|
|
@@ -1926,7 +2004,7 @@
|
|
|
1926
2004
|
customElements.get(B3) && (j2 = true);
|
|
1927
2005
|
} catch {
|
|
1928
2006
|
}
|
|
1929
|
-
return { type:
|
|
2007
|
+
return { type: ut.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e3) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
1930
2008
|
})(e2, { doc: u2, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
|
|
1931
2009
|
case e2.TEXT_NODE:
|
|
1932
2010
|
return (function ji(e3, a3) {
|
|
@@ -1942,12 +2020,12 @@
|
|
|
1942
2020
|
}
|
|
1943
2021
|
x3 = Pt(x3, $t(a3.doc));
|
|
1944
2022
|
}
|
|
1945
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e3.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2023
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e3.parentElement) : x3.replace(/[\S]/g, "*")), { type: ut.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
1946
2024
|
})(e2, { doc: u2, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
1947
2025
|
case e2.CDATA_SECTION_NODE:
|
|
1948
|
-
return { type:
|
|
2026
|
+
return { type: ut.CDATA, textContent: "", rootId: $2 };
|
|
1949
2027
|
case e2.COMMENT_NODE:
|
|
1950
|
-
return { type:
|
|
2028
|
+
return { type: ut.Comment, textContent: e2.textContent || "", rootId: $2 };
|
|
1951
2029
|
default:
|
|
1952
2030
|
return false;
|
|
1953
2031
|
}
|
|
@@ -1956,28 +2034,28 @@
|
|
|
1956
2034
|
return null == e2 ? "" : e2.toLowerCase();
|
|
1957
2035
|
}
|
|
1958
2036
|
function Se(e2, a2) {
|
|
1959
|
-
const { doc: u2, mirror: m2, blockClass: w2, blockSelector: b2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2 = false, inlineStylesheet: _2 = true, maskInputOptions: O2 = {}, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2 = {}, inlineImages: B2 = false, recordCanvas: $2 = false, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2 = 5e3, onStylesheetLoad: q2, stylesheetLoadTimeout: H2 = 5e3, keepIframeSrcFn:
|
|
2037
|
+
const { doc: u2, mirror: m2, blockClass: w2, blockSelector: b2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2 = false, inlineStylesheet: _2 = true, maskInputOptions: O2 = {}, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2 = {}, inlineImages: B2 = false, recordCanvas: $2 = false, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2 = 5e3, onStylesheetLoad: q2, stylesheetLoadTimeout: H2 = 5e3, keepIframeSrcFn: J2 = () => false, newlyAddedElement: Y2 = false } = a2;
|
|
1960
2038
|
let { needsMask: X2 } = a2, { preserveWhiteSpace: Q2 = true } = a2;
|
|
1961
2039
|
X2 || (X2 = Er(e2, C2, x2, void 0 === X2));
|
|
1962
|
-
const ee2 = zi(e2, { doc: u2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, keepIframeSrcFn:
|
|
2040
|
+
const ee2 = zi(e2, { doc: u2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, keepIframeSrcFn: J2, newlyAddedElement: Y2 });
|
|
1963
2041
|
if (!ee2) return console.warn(e2, "not serialized"), null;
|
|
1964
2042
|
let te2;
|
|
1965
2043
|
te2 = m2.hasNode(e2) ? m2.getId(e2) : (function Gi(e3, a3) {
|
|
1966
|
-
return !!(a3.comment && e3.type ===
|
|
1967
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2044
|
+
return !!(a3.comment && e3.type === ut.Comment || e3.type === ut.Element && (a3.script && ("script" === e3.tagName || "link" === e3.tagName && ("preload" === e3.attributes.rel || "modulepreload" === e3.attributes.rel) && "script" === e3.attributes.as || "link" === e3.tagName && "prefetch" === e3.attributes.rel && "string" == typeof e3.attributes.href && "js" === xr(e3.attributes.href)) || a3.headFavicon && ("link" === e3.tagName && "shortcut icon" === e3.attributes.rel || "meta" === e3.tagName && (N(e3.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e3.attributes.name) || "icon" === N(e3.attributes.rel) || "apple-touch-icon" === N(e3.attributes.rel) || "shortcut icon" === N(e3.attributes.rel))) || "meta" === e3.tagName && (a3.headMetaDescKeywords && N(e3.attributes.name).match(/^description|keywords$/) || a3.headMetaSocial && (N(e3.attributes.property).match(/^(og|twitter|fb):/) || N(e3.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e3.attributes.name)) || a3.headMetaRobots && ("robots" === N(e3.attributes.name) || "googlebot" === N(e3.attributes.name) || "bingbot" === N(e3.attributes.name)) || a3.headMetaHttpEquiv && void 0 !== e3.attributes["http-equiv"] || a3.headMetaAuthorship && ("author" === N(e3.attributes.name) || "generator" === N(e3.attributes.name) || "framework" === N(e3.attributes.name) || "publisher" === N(e3.attributes.name) || "progid" === N(e3.attributes.name) || N(e3.attributes.property).match(/^article:/) || N(e3.attributes.property).match(/^product:/)) || a3.headMetaVerification && ("google-site-verification" === N(e3.attributes.name) || "yandex-verification" === N(e3.attributes.name) || "csrf-token" === N(e3.attributes.name) || "p:domain_verify" === N(e3.attributes.name) || "verify-v1" === N(e3.attributes.name) || "verification" === N(e3.attributes.name) || "shopify-checkout-api-token" === N(e3.attributes.name)))));
|
|
2045
|
+
})(ee2, F2) || !Q2 && ee2.type === ut.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
1968
2046
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
1969
2047
|
if (m2.add(e2, ne2), -2 === te2) return null;
|
|
1970
2048
|
z2 && z2(e2);
|
|
1971
2049
|
let re2 = !I2;
|
|
1972
|
-
if (ne2.type ===
|
|
2050
|
+
if (ne2.type === ut.Element) {
|
|
1973
2051
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
1974
2052
|
const a3 = e2.shadowRoot;
|
|
1975
2053
|
a3 && ze(a3) && (ne2.isShadowHost = true);
|
|
1976
2054
|
}
|
|
1977
|
-
if ((ne2.type ===
|
|
1978
|
-
F2.headWhitespace && ne2.type ===
|
|
1979
|
-
const a3 = { doc: u2, 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:
|
|
1980
|
-
if (ne2.type !==
|
|
2055
|
+
if ((ne2.type === ut.Document || ne2.type === ut.Element) && re2) {
|
|
2056
|
+
F2.headWhitespace && ne2.type === ut.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2057
|
+
const a3 = { doc: u2, 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 };
|
|
2058
|
+
if (ne2.type !== ut.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u3 of Array.from(e2.childNodes)) {
|
|
1981
2059
|
const e3 = Se(u3, a3);
|
|
1982
2060
|
e3 && ne2.childNodes.push(e3);
|
|
1983
2061
|
}
|
|
@@ -1986,7 +2064,7 @@
|
|
|
1986
2064
|
m3 && (ze(e2.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
1987
2065
|
}
|
|
1988
2066
|
}
|
|
1989
|
-
return e2.parentNode && We(e2.parentNode) && ze(e2.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2067
|
+
return e2.parentNode && We(e2.parentNode) && ze(e2.parentNode) && (ne2.isShadow = true), ne2.type === ut.Element && "iframe" === ne2.tagName && (function _i(e3, a3, u3) {
|
|
1990
2068
|
const m3 = e3.contentWindow;
|
|
1991
2069
|
if (!m3) return;
|
|
1992
2070
|
let w3, b3 = false;
|
|
@@ -2009,10 +2087,10 @@
|
|
|
2009
2087
|
})(e2, () => {
|
|
2010
2088
|
const a3 = e2.contentDocument;
|
|
2011
2089
|
if (a3 && j2) {
|
|
2012
|
-
const u3 = Se(a3, { doc: a3, 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:
|
|
2090
|
+
const u3 = Se(a3, { doc: a3, 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 });
|
|
2013
2091
|
u3 && j2(e2, u3);
|
|
2014
2092
|
}
|
|
2015
|
-
}, V2), ne2.type ===
|
|
2093
|
+
}, V2), ne2.type === ut.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(e3, a3, u3) {
|
|
2016
2094
|
let m3, w3 = false;
|
|
2017
2095
|
try {
|
|
2018
2096
|
m3 = e3.sheet;
|
|
@@ -2028,7 +2106,7 @@
|
|
|
2028
2106
|
});
|
|
2029
2107
|
})(e2, () => {
|
|
2030
2108
|
if (q2) {
|
|
2031
|
-
const a3 = Se(e2, { doc: u2, 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:
|
|
2109
|
+
const a3 = Se(e2, { doc: u2, 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 });
|
|
2032
2110
|
a3 && q2(e2, a3);
|
|
2033
2111
|
}
|
|
2034
2112
|
}, H2), ne2;
|
|
@@ -2052,13 +2130,13 @@
|
|
|
2052
2130
|
} });
|
|
2053
2131
|
}), u2;
|
|
2054
2132
|
}
|
|
2055
|
-
var
|
|
2056
|
-
return { isColorSupported: false, reset:
|
|
2133
|
+
var It = { exports: {} }, Et = String, Rr = function() {
|
|
2134
|
+
return { isColorSupported: false, reset: Et, bold: Et, dim: Et, italic: Et, underline: Et, inverse: Et, hidden: Et, strikethrough: Et, black: Et, red: Et, green: Et, yellow: Et, blue: Et, magenta: Et, cyan: Et, white: Et, gray: Et, bgBlack: Et, bgRed: Et, bgGreen: Et, bgYellow: Et, bgBlue: Et, bgMagenta: Et, bgCyan: Et, bgWhite: Et, blackBright: Et, redBright: Et, greenBright: Et, yellowBright: Et, blueBright: Et, magentaBright: Et, cyanBright: Et, whiteBright: Et, bgBlackBright: Et, bgRedBright: Et, bgGreenBright: Et, bgYellowBright: Et, bgBlueBright: Et, bgMagentaBright: Et, bgCyanBright: Et, bgWhiteBright: Et };
|
|
2057
2135
|
};
|
|
2058
|
-
|
|
2059
|
-
var
|
|
2060
|
-
const
|
|
2061
|
-
let
|
|
2136
|
+
It.exports = Rr(), It.exports.createColors = Rr;
|
|
2137
|
+
var Lt = It.exports;
|
|
2138
|
+
const Rt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2139
|
+
let Dt = Lt, Ft = Rt, Ut = class Lr extends Error {
|
|
2062
2140
|
constructor(e2, a2, u2, m2, w2, b2) {
|
|
2063
2141
|
super(e2), this.name = "CssSyntaxError", this.reason = e2, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a2 < "u" && typeof u2 < "u" && ("number" == typeof a2 ? (this.line = a2, this.column = u2) : (this.line = a2.line, this.column = a2.column, this.endLine = u2.line, this.endColumn = u2.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
|
|
2064
2142
|
}
|
|
@@ -2068,11 +2146,11 @@
|
|
|
2068
2146
|
showSourceCode(e2) {
|
|
2069
2147
|
if (!this.source) return "";
|
|
2070
2148
|
let a2 = this.source;
|
|
2071
|
-
null == e2 && (e2 =
|
|
2149
|
+
null == e2 && (e2 = Dt.isColorSupported);
|
|
2072
2150
|
let n = (e3) => e3, r = (e3) => e3, i = (e3) => e3;
|
|
2073
2151
|
if (e2) {
|
|
2074
|
-
let { bold: e3, gray: a3, red: u3 } =
|
|
2075
|
-
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4),
|
|
2152
|
+
let { bold: e3, gray: a3, red: u3 } = Dt.createColors(true);
|
|
2153
|
+
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4), Ft && (i = (e4) => Ft(e4));
|
|
2076
2154
|
}
|
|
2077
2155
|
let u2 = a2.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u2.length), b2 = String(w2).length;
|
|
2078
2156
|
return u2.slice(m2, w2).map((e3, a3) => {
|
|
@@ -2093,10 +2171,10 @@
|
|
|
2093
2171
|
return e2 && (e2 = "\n\n" + e2 + "\n"), this.name + ": " + this.message + e2;
|
|
2094
2172
|
}
|
|
2095
2173
|
};
|
|
2096
|
-
var
|
|
2097
|
-
|
|
2098
|
-
const
|
|
2099
|
-
let
|
|
2174
|
+
var Bt = Ut;
|
|
2175
|
+
Ut.default = Ut;
|
|
2176
|
+
const Wt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2177
|
+
let jt = class {
|
|
2100
2178
|
constructor(e2) {
|
|
2101
2179
|
this.builder = e2;
|
|
2102
2180
|
}
|
|
@@ -2148,7 +2226,7 @@
|
|
|
2148
2226
|
if (u2 || (u2 = a2), a2 && (m2 = e2.raws[a2], typeof m2 < "u")) return m2;
|
|
2149
2227
|
let w2 = e2.parent;
|
|
2150
2228
|
if ("before" === u2 && (!w2 || "root" === w2.type && w2.first === e2 || w2 && "document" === w2.type)) return "";
|
|
2151
|
-
if (!w2) return
|
|
2229
|
+
if (!w2) return Wt[u2];
|
|
2152
2230
|
let b2 = e2.root();
|
|
2153
2231
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u2] < "u") return b2.rawCache[u2];
|
|
2154
2232
|
if ("before" === u2 || "after" === u2) return this.beforeAfter(e2, u2);
|
|
@@ -2160,7 +2238,7 @@
|
|
|
2160
2238
|
if (m2 = e3.raws[a2], typeof m2 < "u") return false;
|
|
2161
2239
|
});
|
|
2162
2240
|
}
|
|
2163
|
-
return typeof m2 > "u" && (m2 =
|
|
2241
|
+
return typeof m2 > "u" && (m2 = Wt[u2]), b2.rawCache[u2] = m2, m2;
|
|
2164
2242
|
}
|
|
2165
2243
|
rawBeforeClose(e2) {
|
|
2166
2244
|
let a2;
|
|
@@ -2236,17 +2314,17 @@
|
|
|
2236
2314
|
this[e2.type](e2, a2);
|
|
2237
2315
|
}
|
|
2238
2316
|
};
|
|
2239
|
-
var
|
|
2240
|
-
|
|
2241
|
-
let
|
|
2317
|
+
var Vt = jt;
|
|
2318
|
+
jt.default = jt;
|
|
2319
|
+
let Ht = Vt;
|
|
2242
2320
|
function ks(e2, a2) {
|
|
2243
|
-
new
|
|
2321
|
+
new Ht(a2).stringify(e2);
|
|
2244
2322
|
}
|
|
2245
|
-
var
|
|
2323
|
+
var Kt = ks;
|
|
2246
2324
|
ks.default = ks;
|
|
2247
|
-
var
|
|
2248
|
-
|
|
2249
|
-
let
|
|
2325
|
+
var Jt = {};
|
|
2326
|
+
Jt.isClean = Symbol("isClean"), Jt.my = Symbol("my");
|
|
2327
|
+
let Xt = Bt, Qt = Vt, en = Kt, { isClean: tn, my: nn } = Jt;
|
|
2250
2328
|
function Cs(e2, a2) {
|
|
2251
2329
|
let u2 = new e2.constructor();
|
|
2252
2330
|
for (let m2 in e2) {
|
|
@@ -2268,12 +2346,12 @@
|
|
|
2268
2346
|
}
|
|
2269
2347
|
return w2;
|
|
2270
2348
|
}
|
|
2271
|
-
let
|
|
2349
|
+
let rn = class {
|
|
2272
2350
|
get proxyOf() {
|
|
2273
2351
|
return this;
|
|
2274
2352
|
}
|
|
2275
2353
|
constructor(e2 = {}) {
|
|
2276
|
-
this.raws = {}, this[
|
|
2354
|
+
this.raws = {}, this[tn] = false, this[nn] = true;
|
|
2277
2355
|
for (let a2 in e2) if ("nodes" === a2) {
|
|
2278
2356
|
this.nodes = [];
|
|
2279
2357
|
for (let u2 of e2[a2]) "function" == typeof u2.clone ? this.append(u2.clone()) : this.append(u2);
|
|
@@ -2317,19 +2395,19 @@
|
|
|
2317
2395
|
let { end: u2, start: m2 } = this.rangeBy(a2);
|
|
2318
2396
|
return this.source.input.error(e2, { column: m2.column, line: m2.line }, { column: u2.column, line: u2.line }, a2);
|
|
2319
2397
|
}
|
|
2320
|
-
return new
|
|
2398
|
+
return new Xt(e2);
|
|
2321
2399
|
}
|
|
2322
2400
|
getProxyProcessor() {
|
|
2323
2401
|
return { get: (e2, a2) => "proxyOf" === a2 ? e2 : "root" === a2 ? () => e2.root().toProxy() : e2[a2], set: (e2, a2, u2) => (e2[a2] === u2 || (e2[a2] = u2, ("prop" === a2 || "value" === a2 || "name" === a2 || "params" === a2 || "important" === a2 || "text" === a2) && e2.markDirty()), true) };
|
|
2324
2402
|
}
|
|
2325
2403
|
markClean() {
|
|
2326
|
-
this[
|
|
2404
|
+
this[tn] = true;
|
|
2327
2405
|
}
|
|
2328
2406
|
markDirty() {
|
|
2329
|
-
if (this[
|
|
2330
|
-
this[
|
|
2407
|
+
if (this[tn]) {
|
|
2408
|
+
this[tn] = false;
|
|
2331
2409
|
let e2 = this;
|
|
2332
|
-
for (; e2 = e2.parent; ) e2[
|
|
2410
|
+
for (; e2 = e2.parent; ) e2[tn] = false;
|
|
2333
2411
|
}
|
|
2334
2412
|
}
|
|
2335
2413
|
next() {
|
|
@@ -2365,7 +2443,7 @@
|
|
|
2365
2443
|
return (u2.line < a2.line || u2.line === a2.line && u2.column <= a2.column) && (u2 = { column: a2.column + 1, line: a2.line }), { end: u2, start: a2 };
|
|
2366
2444
|
}
|
|
2367
2445
|
raw(e2, a2) {
|
|
2368
|
-
return new
|
|
2446
|
+
return new Qt().raw(this, e2, a2);
|
|
2369
2447
|
}
|
|
2370
2448
|
remove() {
|
|
2371
2449
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2402,7 +2480,7 @@
|
|
|
2402
2480
|
toProxy() {
|
|
2403
2481
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2404
2482
|
}
|
|
2405
|
-
toString(e2 =
|
|
2483
|
+
toString(e2 = en) {
|
|
2406
2484
|
e2.stringify && (e2 = e2.stringify);
|
|
2407
2485
|
let a2 = "";
|
|
2408
2486
|
return e2(this, (e3) => {
|
|
@@ -2415,16 +2493,16 @@
|
|
|
2415
2493
|
return e2.warn(a2, m2);
|
|
2416
2494
|
}
|
|
2417
2495
|
};
|
|
2418
|
-
var
|
|
2419
|
-
|
|
2420
|
-
let
|
|
2496
|
+
var on = rn;
|
|
2497
|
+
rn.default = rn;
|
|
2498
|
+
let sn = on, an = class extends sn {
|
|
2421
2499
|
constructor(e2) {
|
|
2422
2500
|
super(e2), this.type = "comment";
|
|
2423
2501
|
}
|
|
2424
2502
|
};
|
|
2425
|
-
var
|
|
2426
|
-
|
|
2427
|
-
let
|
|
2503
|
+
var ln = an;
|
|
2504
|
+
an.default = an;
|
|
2505
|
+
let cn = on, un = class extends cn {
|
|
2428
2506
|
get variable() {
|
|
2429
2507
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2430
2508
|
}
|
|
@@ -2432,16 +2510,16 @@
|
|
|
2432
2510
|
e2 && typeof e2.value < "u" && "string" != typeof e2.value && (e2 = { ...e2, value: String(e2.value) }), super(e2), this.type = "decl";
|
|
2433
2511
|
}
|
|
2434
2512
|
};
|
|
2435
|
-
var
|
|
2436
|
-
|
|
2437
|
-
let
|
|
2513
|
+
var pn = un;
|
|
2514
|
+
un.default = un;
|
|
2515
|
+
let dn, hn, fn, mn, gn = ln, yn = pn, wn = on, { isClean: bn, my: Sn } = Jt;
|
|
2438
2516
|
function _r(e2) {
|
|
2439
2517
|
return e2.map((e3) => (e3.nodes && (e3.nodes = _r(e3.nodes)), delete e3.source, e3));
|
|
2440
2518
|
}
|
|
2441
2519
|
function Wr(e2) {
|
|
2442
|
-
if (e2[
|
|
2520
|
+
if (e2[bn] = false, e2.proxyOf.nodes) for (let a2 of e2.proxyOf.nodes) Wr(a2);
|
|
2443
2521
|
}
|
|
2444
|
-
let
|
|
2522
|
+
let Mn = class zr extends wn {
|
|
2445
2523
|
get first() {
|
|
2446
2524
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2447
2525
|
}
|
|
@@ -2493,7 +2571,7 @@
|
|
|
2493
2571
|
return this.markDirty(), this;
|
|
2494
2572
|
}
|
|
2495
2573
|
normalize(e2, a2) {
|
|
2496
|
-
if ("string" == typeof e2) e2 = _r(
|
|
2574
|
+
if ("string" == typeof e2) e2 = _r(hn(e2).nodes);
|
|
2497
2575
|
else if (typeof e2 > "u") e2 = [];
|
|
2498
2576
|
else if (Array.isArray(e2)) {
|
|
2499
2577
|
e2 = e2.slice(0);
|
|
@@ -2504,14 +2582,14 @@
|
|
|
2504
2582
|
} else if (e2.type) e2 = [e2];
|
|
2505
2583
|
else if (e2.prop) {
|
|
2506
2584
|
if (typeof e2.value > "u") throw new Error("Value field is missed in node creation");
|
|
2507
|
-
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new
|
|
2508
|
-
} else if (e2.selector || e2.selectors) e2 = [new
|
|
2509
|
-
else if (e2.name) e2 = [new
|
|
2585
|
+
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new yn(e2)];
|
|
2586
|
+
} else if (e2.selector || e2.selectors) e2 = [new mn(e2)];
|
|
2587
|
+
else if (e2.name) e2 = [new dn(e2)];
|
|
2510
2588
|
else {
|
|
2511
2589
|
if (!e2.text) throw new Error("Unknown node type in node creation");
|
|
2512
|
-
e2 = [new
|
|
2590
|
+
e2 = [new gn(e2)];
|
|
2513
2591
|
}
|
|
2514
|
-
return e2.map((e3) => (e3[
|
|
2592
|
+
return e2.map((e3) => (e3[Sn] || zr.rebuild(e3), (e3 = e3.proxyOf).parent && e3.parent.removeChild(e3), e3[bn] && Wr(e3), e3.raws || (e3.raws = {}), typeof e3.raws.before > "u" && a2 && typeof a2.raws.before < "u" && (e3.raws.before = a2.raws.before.replace(/\S/g, "")), e3.parent = this.proxyOf, e3));
|
|
2515
2593
|
}
|
|
2516
2594
|
prepend(...e2) {
|
|
2517
2595
|
e2 = e2.reverse();
|
|
@@ -2587,22 +2665,22 @@
|
|
|
2587
2665
|
}));
|
|
2588
2666
|
}
|
|
2589
2667
|
};
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
},
|
|
2593
|
-
|
|
2594
|
-
},
|
|
2595
|
-
|
|
2596
|
-
},
|
|
2597
|
-
|
|
2668
|
+
Mn.registerParse = (e2) => {
|
|
2669
|
+
hn = e2;
|
|
2670
|
+
}, Mn.registerRule = (e2) => {
|
|
2671
|
+
mn = e2;
|
|
2672
|
+
}, Mn.registerAtRule = (e2) => {
|
|
2673
|
+
dn = e2;
|
|
2674
|
+
}, Mn.registerRoot = (e2) => {
|
|
2675
|
+
fn = e2;
|
|
2598
2676
|
};
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2601
|
-
"atrule" === e2.type ? Object.setPrototypeOf(e2,
|
|
2602
|
-
|
|
2677
|
+
var In = Mn;
|
|
2678
|
+
Mn.default = Mn, Mn.rebuild = (e2) => {
|
|
2679
|
+
"atrule" === e2.type ? Object.setPrototypeOf(e2, dn.prototype) : "rule" === e2.type ? Object.setPrototypeOf(e2, mn.prototype) : "decl" === e2.type ? Object.setPrototypeOf(e2, yn.prototype) : "comment" === e2.type ? Object.setPrototypeOf(e2, gn.prototype) : "root" === e2.type && Object.setPrototypeOf(e2, fn.prototype), e2[Sn] = true, e2.nodes && e2.nodes.forEach((e3) => {
|
|
2680
|
+
Mn.rebuild(e3);
|
|
2603
2681
|
});
|
|
2604
2682
|
};
|
|
2605
|
-
let
|
|
2683
|
+
let _n = In, On = class extends _n {
|
|
2606
2684
|
constructor(e2) {
|
|
2607
2685
|
super(e2), this.type = "atrule";
|
|
2608
2686
|
}
|
|
@@ -2613,38 +2691,38 @@
|
|
|
2613
2691
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e2);
|
|
2614
2692
|
}
|
|
2615
2693
|
};
|
|
2616
|
-
var
|
|
2617
|
-
|
|
2618
|
-
let
|
|
2694
|
+
var En = On;
|
|
2695
|
+
On.default = On, _n.registerAtRule(On);
|
|
2696
|
+
let Ln, Rn, An = In, Tn = class extends An {
|
|
2619
2697
|
constructor(e2) {
|
|
2620
2698
|
super({ type: "document", ...e2 }), this.nodes || (this.nodes = []);
|
|
2621
2699
|
}
|
|
2622
2700
|
toResult(e2 = {}) {
|
|
2623
|
-
return new
|
|
2701
|
+
return new Ln(new Rn(), this, e2).stringify();
|
|
2624
2702
|
}
|
|
2625
2703
|
};
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
},
|
|
2629
|
-
|
|
2704
|
+
Tn.registerLazyResult = (e2) => {
|
|
2705
|
+
Ln = e2;
|
|
2706
|
+
}, Tn.registerProcessor = (e2) => {
|
|
2707
|
+
Rn = e2;
|
|
2630
2708
|
};
|
|
2631
|
-
var
|
|
2632
|
-
|
|
2633
|
-
var
|
|
2709
|
+
var Nn = Tn;
|
|
2710
|
+
Tn.default = Tn;
|
|
2711
|
+
var Pn = { nanoid: (e2 = 21) => {
|
|
2634
2712
|
let a2 = "", u2 = 0 | e2;
|
|
2635
2713
|
for (; u2--; ) a2 += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2636
2714
|
return a2;
|
|
2637
2715
|
} };
|
|
2638
|
-
let { existsSync:
|
|
2639
|
-
let
|
|
2716
|
+
let { existsSync: Dn, readFileSync: Fn } = Rt, { dirname: Un, join: Bn } = Rt, { SourceMapConsumer: Wn, SourceMapGenerator: zn } = Rt;
|
|
2717
|
+
let jn = class {
|
|
2640
2718
|
constructor(e2, a2) {
|
|
2641
2719
|
if (false === a2.map) return;
|
|
2642
2720
|
this.loadAnnotation(e2), this.inline = this.startWith(this.annotation, "data:");
|
|
2643
2721
|
let u2 = a2.map ? a2.map.prev : void 0, m2 = this.loadMap(a2.from, u2);
|
|
2644
|
-
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root =
|
|
2722
|
+
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root = Un(this.mapFile)), m2 && (this.text = m2);
|
|
2645
2723
|
}
|
|
2646
2724
|
consumer() {
|
|
2647
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2725
|
+
return this.consumerCache || (this.consumerCache = new Wn(this.text)), this.consumerCache;
|
|
2648
2726
|
}
|
|
2649
2727
|
decodeInline(e2) {
|
|
2650
2728
|
let a2 = e2.match(/^data:application\/json;charset=utf-?8,/) || e2.match(/^data:application\/json,/);
|
|
@@ -2669,15 +2747,15 @@
|
|
|
2669
2747
|
u2 > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e2.substring(u2, m2)));
|
|
2670
2748
|
}
|
|
2671
2749
|
loadFile(e2) {
|
|
2672
|
-
if (this.root =
|
|
2750
|
+
if (this.root = Un(e2), Dn(e2)) return this.mapFile = e2, Fn(e2, "utf-8").toString().trim();
|
|
2673
2751
|
}
|
|
2674
2752
|
loadMap(e2, a2) {
|
|
2675
2753
|
if (false === a2) return false;
|
|
2676
2754
|
if (a2) {
|
|
2677
2755
|
if ("string" == typeof a2) return a2;
|
|
2678
2756
|
if ("function" != typeof a2) {
|
|
2679
|
-
if (a2 instanceof
|
|
2680
|
-
if (a2 instanceof
|
|
2757
|
+
if (a2 instanceof Wn) return zn.fromSourceMap(a2).toString();
|
|
2758
|
+
if (a2 instanceof zn) return a2.toString();
|
|
2681
2759
|
if (this.isMap(a2)) return JSON.stringify(a2);
|
|
2682
2760
|
throw new Error("Unsupported previous source map format: " + a2.toString());
|
|
2683
2761
|
}
|
|
@@ -2693,7 +2771,7 @@
|
|
|
2693
2771
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2694
2772
|
if (this.annotation) {
|
|
2695
2773
|
let a3 = this.annotation;
|
|
2696
|
-
return e2 && (a3 =
|
|
2774
|
+
return e2 && (a3 = Bn(Un(e2), a3)), this.loadFile(a3);
|
|
2697
2775
|
}
|
|
2698
2776
|
}
|
|
2699
2777
|
}
|
|
@@ -2704,23 +2782,23 @@
|
|
|
2704
2782
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2705
2783
|
}
|
|
2706
2784
|
};
|
|
2707
|
-
var
|
|
2708
|
-
|
|
2709
|
-
let { nanoid:
|
|
2785
|
+
var Vn = jn;
|
|
2786
|
+
jn.default = jn;
|
|
2787
|
+
let { nanoid: qn } = Pn, { isAbsolute: Zn, resolve: Kn } = Rt, { SourceMapConsumer: Qn, SourceMapGenerator: nr } = Rt, { fileURLToPath: rr, pathToFileURL: or } = Rt, sr = Bt, ir = Vn, ar = Rt, lr = Symbol("fromOffsetCache"), cr = !(!Qn || !nr), ur = !(!Kn || !Zn), pr = class {
|
|
2710
2788
|
get from() {
|
|
2711
2789
|
return this.file || this.id;
|
|
2712
2790
|
}
|
|
2713
2791
|
constructor(e2, a2 = {}) {
|
|
2714
2792
|
if (null === e2 || typeof e2 > "u" || "object" == typeof e2 && !e2.toString) throw new Error(`PostCSS received ${e2} instead of CSS string`);
|
|
2715
|
-
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!
|
|
2716
|
-
let e3 = new
|
|
2793
|
+
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!ur || /^\w+:\/\//.test(a2.from) || Zn(a2.from) ? this.file = a2.from : this.file = Kn(a2.from)), ur && cr) {
|
|
2794
|
+
let e3 = new ir(this.css, a2);
|
|
2717
2795
|
if (e3.text) {
|
|
2718
2796
|
this.map = e3;
|
|
2719
2797
|
let a3 = e3.consumer().file;
|
|
2720
2798
|
!this.file && a3 && (this.file = this.mapResolve(a3));
|
|
2721
2799
|
}
|
|
2722
2800
|
}
|
|
2723
|
-
this.file || (this.id = "<input css " +
|
|
2801
|
+
this.file || (this.id = "<input css " + qn(6) + ">"), this.map && (this.map.file = this.from);
|
|
2724
2802
|
}
|
|
2725
2803
|
error(e2, a2, u2, m2 = {}) {
|
|
2726
2804
|
let w2, b2, C2;
|
|
@@ -2739,17 +2817,17 @@
|
|
|
2739
2817
|
a2 = e3.line, u2 = e3.col;
|
|
2740
2818
|
}
|
|
2741
2819
|
let x2 = this.origin(a2, u2, b2, w2);
|
|
2742
|
-
return C2 = x2 ? new
|
|
2820
|
+
return C2 = x2 ? new sr(e2, 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 sr(e2, void 0 === b2 ? a2 : { column: u2, line: a2 }, void 0 === b2 ? u2 : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u2, endColumn: w2, endLine: b2, line: a2, source: this.css }, this.file && (or && (C2.input.url = or(this.file).toString()), C2.input.file = this.file), C2;
|
|
2743
2821
|
}
|
|
2744
2822
|
fromOffset(e2) {
|
|
2745
2823
|
let a2, u2;
|
|
2746
|
-
if (this[
|
|
2824
|
+
if (this[lr]) u2 = this[lr];
|
|
2747
2825
|
else {
|
|
2748
2826
|
let e3 = this.css.split("\n");
|
|
2749
2827
|
u2 = new Array(e3.length);
|
|
2750
2828
|
let a3 = 0;
|
|
2751
2829
|
for (let m3 = 0, w2 = e3.length; m3 < w2; m3++) u2[m3] = a3, a3 += e3[m3].length + 1;
|
|
2752
|
-
this[
|
|
2830
|
+
this[lr] = u2;
|
|
2753
2831
|
}
|
|
2754
2832
|
a2 = u2[u2.length - 1];
|
|
2755
2833
|
let m2 = 0;
|
|
@@ -2768,17 +2846,17 @@
|
|
|
2768
2846
|
return { col: e2 - u2[m2] + 1, line: m2 + 1 };
|
|
2769
2847
|
}
|
|
2770
2848
|
mapResolve(e2) {
|
|
2771
|
-
return /^\w+:\/\//.test(e2) ? e2 :
|
|
2849
|
+
return /^\w+:\/\//.test(e2) ? e2 : Kn(this.map.consumer().sourceRoot || this.map.root || ".", e2);
|
|
2772
2850
|
}
|
|
2773
2851
|
origin(e2, a2, u2, m2) {
|
|
2774
2852
|
if (!this.map) return false;
|
|
2775
2853
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a2, line: e2 });
|
|
2776
2854
|
if (!x2.source) return false;
|
|
2777
|
-
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 =
|
|
2855
|
+
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 = Zn(x2.source) ? or(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || or(this.map.mapFile));
|
|
2778
2856
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2779
2857
|
if ("file:" === b2.protocol) {
|
|
2780
|
-
if (!
|
|
2781
|
-
I2.file =
|
|
2858
|
+
if (!rr) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2859
|
+
I2.file = rr(b2);
|
|
2782
2860
|
}
|
|
2783
2861
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2784
2862
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2789,9 +2867,9 @@
|
|
|
2789
2867
|
return this.map && (e2.map = { ...this.map }, e2.map.consumerCache && (e2.map.consumerCache = void 0)), e2;
|
|
2790
2868
|
}
|
|
2791
2869
|
};
|
|
2792
|
-
var
|
|
2793
|
-
|
|
2794
|
-
let
|
|
2870
|
+
var dr = pr;
|
|
2871
|
+
pr.default = pr, ar && ar.registerInput && ar.registerInput(pr);
|
|
2872
|
+
let hr, fr, mr = In, gr = class extends mr {
|
|
2795
2873
|
constructor(e2) {
|
|
2796
2874
|
super(e2), this.type = "root", this.nodes || (this.nodes = []);
|
|
2797
2875
|
}
|
|
@@ -2808,29 +2886,29 @@
|
|
|
2808
2886
|
return !a2 && 0 === u2 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u2].raws.before), super.removeChild(e2);
|
|
2809
2887
|
}
|
|
2810
2888
|
toResult(e2 = {}) {
|
|
2811
|
-
return new
|
|
2889
|
+
return new hr(new fr(), this, e2).stringify();
|
|
2812
2890
|
}
|
|
2813
2891
|
};
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
},
|
|
2817
|
-
|
|
2892
|
+
gr.registerLazyResult = (e2) => {
|
|
2893
|
+
hr = e2;
|
|
2894
|
+
}, gr.registerProcessor = (e2) => {
|
|
2895
|
+
fr = e2;
|
|
2818
2896
|
};
|
|
2819
|
-
var
|
|
2820
|
-
|
|
2821
|
-
let
|
|
2897
|
+
var yr = gr;
|
|
2898
|
+
gr.default = gr, mr.registerRoot(gr);
|
|
2899
|
+
let wr = { comma: (e2) => wr.split(e2, [","], true), space(e2) {
|
|
2822
2900
|
let a2 = [" ", "\n", " "];
|
|
2823
|
-
return
|
|
2901
|
+
return wr.split(e2, a2);
|
|
2824
2902
|
}, split(e2, a2, u2) {
|
|
2825
2903
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2826
2904
|
for (let u3 of e2) _2 ? _2 = false : "\\" === u3 ? _2 = true : x2 ? u3 === I2 && (x2 = false) : '"' === u3 || "'" === u3 ? (x2 = true, I2 = u3) : "(" === u3 ? C2 += 1 : ")" === u3 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a2.includes(u3) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u3;
|
|
2827
2905
|
return (u2 || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2828
2906
|
} };
|
|
2829
|
-
var
|
|
2830
|
-
|
|
2831
|
-
let
|
|
2907
|
+
var Sr = wr;
|
|
2908
|
+
wr.default = wr;
|
|
2909
|
+
let Cr = In, Ar = Sr, Tr = class extends Cr {
|
|
2832
2910
|
get selectors() {
|
|
2833
|
-
return
|
|
2911
|
+
return Ar.comma(this.selector);
|
|
2834
2912
|
}
|
|
2835
2913
|
set selectors(e2) {
|
|
2836
2914
|
let a2 = this.selector ? this.selector.match(/,\s*/) : null, u2 = a2 ? a2[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2840,34 +2918,34 @@
|
|
|
2840
2918
|
super(e2), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2841
2919
|
}
|
|
2842
2920
|
};
|
|
2843
|
-
var
|
|
2844
|
-
|
|
2845
|
-
let
|
|
2921
|
+
var Nr = Tr;
|
|
2922
|
+
Tr.default = Tr, Cr.registerRule(Tr);
|
|
2923
|
+
let Pr = En, Dr = ln, Fr = pn, Ur = dr, Br = Vn, $r = yr, jr = Nr;
|
|
2846
2924
|
function Ze(e2, a2) {
|
|
2847
2925
|
if (Array.isArray(e2)) return e2.map((e3) => Ze(e3));
|
|
2848
2926
|
let { inputs: u2, ...m2 } = e2;
|
|
2849
2927
|
if (u2) {
|
|
2850
2928
|
a2 = [];
|
|
2851
2929
|
for (let e3 of u2) {
|
|
2852
|
-
let u3 = { ...e3, __proto__:
|
|
2853
|
-
u3.map && (u3.map = { ...u3.map, __proto__:
|
|
2930
|
+
let u3 = { ...e3, __proto__: Ur.prototype };
|
|
2931
|
+
u3.map && (u3.map = { ...u3.map, __proto__: Br.prototype }), a2.push(u3);
|
|
2854
2932
|
}
|
|
2855
2933
|
}
|
|
2856
2934
|
if (m2.nodes && (m2.nodes = e2.nodes.map((e3) => Ze(e3, a2))), m2.source) {
|
|
2857
2935
|
let { inputId: e3, ...u3 } = m2.source;
|
|
2858
2936
|
m2.source = u3, null != e3 && (m2.source.input = a2[e3]);
|
|
2859
2937
|
}
|
|
2860
|
-
if ("root" === m2.type) return new
|
|
2861
|
-
if ("decl" === m2.type) return new
|
|
2862
|
-
if ("rule" === m2.type) return new
|
|
2863
|
-
if ("comment" === m2.type) return new
|
|
2864
|
-
if ("atrule" === m2.type) return new
|
|
2938
|
+
if ("root" === m2.type) return new $r(m2);
|
|
2939
|
+
if ("decl" === m2.type) return new Fr(m2);
|
|
2940
|
+
if ("rule" === m2.type) return new jr(m2);
|
|
2941
|
+
if ("comment" === m2.type) return new Dr(m2);
|
|
2942
|
+
if ("atrule" === m2.type) return new Pr(m2);
|
|
2865
2943
|
throw new Error("Unknown node type: " + e2.type);
|
|
2866
2944
|
}
|
|
2867
|
-
var
|
|
2945
|
+
var Gr = Ze;
|
|
2868
2946
|
Ze.default = Ze;
|
|
2869
|
-
let { dirname:
|
|
2870
|
-
var
|
|
2947
|
+
let { dirname: Vr, relative: qr, resolve: Hr, sep: Zr } = Rt, { SourceMapConsumer: Kr, SourceMapGenerator: Jr } = Rt, { pathToFileURL: Yr } = Rt, Xr = dr, Qr = !(!Kr || !Jr), eo = !!(Vr && Hr && qr && Zr);
|
|
2948
|
+
var to = class {
|
|
2871
2949
|
constructor(e2, a2, u2, m2) {
|
|
2872
2950
|
this.stringify = e2, this.mapOpts = u2.map || {}, this.root = a2, this.opts = u2, 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();
|
|
2873
2951
|
}
|
|
@@ -2879,8 +2957,8 @@
|
|
|
2879
2957
|
}
|
|
2880
2958
|
applyPrevMaps() {
|
|
2881
2959
|
for (let e2 of this.previous()) {
|
|
2882
|
-
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root ||
|
|
2883
|
-
false === this.mapOpts.sourcesContent ? (a2 = new
|
|
2960
|
+
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root || Vr(e2.file);
|
|
2961
|
+
false === this.mapOpts.sourcesContent ? (a2 = new Kr(e2.text), a2.sourcesContent && (a2.sourcesContent = null)) : a2 = e2.consumer(), this.map.applySourceMap(a2, u2, this.toUrl(this.path(m2)));
|
|
2884
2962
|
}
|
|
2885
2963
|
}
|
|
2886
2964
|
clearAnnotation() {
|
|
@@ -2890,7 +2968,7 @@
|
|
|
2890
2968
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
2891
2969
|
}
|
|
2892
2970
|
generate() {
|
|
2893
|
-
if (this.clearAnnotation(),
|
|
2971
|
+
if (this.clearAnnotation(), eo && Qr && this.isMap()) return this.generateMap();
|
|
2894
2972
|
{
|
|
2895
2973
|
let e2 = "";
|
|
2896
2974
|
return this.stringify(this.root, (a2) => {
|
|
@@ -2902,12 +2980,12 @@
|
|
|
2902
2980
|
if (this.root) this.generateString();
|
|
2903
2981
|
else if (1 === this.previous().length) {
|
|
2904
2982
|
let e2 = this.previous()[0].consumer();
|
|
2905
|
-
e2.file = this.outputFile(), this.map =
|
|
2906
|
-
} else this.map = new
|
|
2983
|
+
e2.file = this.outputFile(), this.map = Jr.fromSourceMap(e2, { ignoreInvalidMapping: true });
|
|
2984
|
+
} else this.map = new Jr({ 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>" });
|
|
2907
2985
|
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];
|
|
2908
2986
|
}
|
|
2909
2987
|
generateString() {
|
|
2910
|
-
this.css = "", this.map = new
|
|
2988
|
+
this.css = "", this.map = new Jr({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
2911
2989
|
let e2, a2, u2 = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
2912
2990
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
2913
2991
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u2, 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))), a2 = C2.match(/\n/g), a2 ? (u2 += a2.length, e2 = C2.lastIndexOf("\n"), m2 = C2.length - e2) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -2937,9 +3015,9 @@
|
|
|
2937
3015
|
if (this.mapOpts.absolute || 60 === e2.charCodeAt(0) || /^\w+:\/\//.test(e2)) return e2;
|
|
2938
3016
|
let a2 = this.memoizedPaths.get(e2);
|
|
2939
3017
|
if (a2) return a2;
|
|
2940
|
-
let u2 = this.opts.to ?
|
|
2941
|
-
"string" == typeof this.mapOpts.annotation && (u2 =
|
|
2942
|
-
let m2 =
|
|
3018
|
+
let u2 = this.opts.to ? Vr(this.opts.to) : ".";
|
|
3019
|
+
"string" == typeof this.mapOpts.annotation && (u2 = Vr(Hr(u2, this.mapOpts.annotation)));
|
|
3020
|
+
let m2 = qr(u2, e2);
|
|
2943
3021
|
return this.memoizedPaths.set(e2, m2), m2;
|
|
2944
3022
|
}
|
|
2945
3023
|
previous() {
|
|
@@ -2950,7 +3028,7 @@
|
|
|
2950
3028
|
}
|
|
2951
3029
|
});
|
|
2952
3030
|
else {
|
|
2953
|
-
let e2 = new
|
|
3031
|
+
let e2 = new Xr(this.originalCSS, this.opts);
|
|
2954
3032
|
e2.map && this.previousMaps.push(e2.map);
|
|
2955
3033
|
}
|
|
2956
3034
|
return this.previousMaps;
|
|
@@ -2981,8 +3059,8 @@
|
|
|
2981
3059
|
toFileUrl(e2) {
|
|
2982
3060
|
let a2 = this.memoizedFileURLs.get(e2);
|
|
2983
3061
|
if (a2) return a2;
|
|
2984
|
-
if (
|
|
2985
|
-
let a3 =
|
|
3062
|
+
if (Yr) {
|
|
3063
|
+
let a3 = Yr(e2).toString();
|
|
2986
3064
|
return this.memoizedFileURLs.set(e2, a3), a3;
|
|
2987
3065
|
}
|
|
2988
3066
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -2990,13 +3068,13 @@
|
|
|
2990
3068
|
toUrl(e2) {
|
|
2991
3069
|
let a2 = this.memoizedURLs.get(e2);
|
|
2992
3070
|
if (a2) return a2;
|
|
2993
|
-
"\\" ===
|
|
3071
|
+
"\\" === Zr && (e2 = e2.replace(/\\/g, "/"));
|
|
2994
3072
|
let u2 = encodeURI(e2).replace(/[#?]/g, encodeURIComponent);
|
|
2995
3073
|
return this.memoizedURLs.set(e2, u2), u2;
|
|
2996
3074
|
}
|
|
2997
3075
|
};
|
|
2998
|
-
const
|
|
2999
|
-
let
|
|
3076
|
+
const oo = /[\t\n\f\r "#'()/;[\\\]{}]/g, io = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, ao = /.[\r\n"'(/\\]/, lo = /[\da-f]/i;
|
|
3077
|
+
let co = En, uo = ln, ho = pn, Mo = yr, _o = Nr, Xa = function(e2, a2 = {}) {
|
|
3000
3078
|
let u2, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e2.css.valueOf(), F2 = a2.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
3001
3079
|
function y2(a3) {
|
|
3002
3080
|
throw e2.error("Unclosed " + a3, B2);
|
|
@@ -3046,7 +3124,7 @@
|
|
|
3046
3124
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3047
3125
|
} while (I2);
|
|
3048
3126
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3049
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3127
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || ao.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3050
3128
|
break;
|
|
3051
3129
|
case 39:
|
|
3052
3130
|
case 34:
|
|
@@ -3064,31 +3142,31 @@
|
|
|
3064
3142
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3065
3143
|
break;
|
|
3066
3144
|
case 64:
|
|
3067
|
-
|
|
3145
|
+
oo.lastIndex = B2 + 1, oo.test(D2), b2 = 0 === oo.lastIndex ? D2.length - 1 : oo.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3068
3146
|
break;
|
|
3069
3147
|
case 92:
|
|
3070
3148
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3071
|
-
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1,
|
|
3072
|
-
for (;
|
|
3149
|
+
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1, lo.test(D2.charAt(b2)))) {
|
|
3150
|
+
for (; lo.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3073
3151
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3074
3152
|
}
|
|
3075
3153
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3076
3154
|
break;
|
|
3077
3155
|
default:
|
|
3078
|
-
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
3156
|
+
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (io.lastIndex = B2 + 1, io.test(D2), b2 = 0 === io.lastIndex ? D2.length - 1 : io.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3079
3157
|
}
|
|
3080
3158
|
return B2++, x2;
|
|
3081
3159
|
}, position: function S() {
|
|
3082
3160
|
return B2;
|
|
3083
3161
|
} };
|
|
3084
3162
|
};
|
|
3085
|
-
const
|
|
3086
|
-
var
|
|
3163
|
+
const Ao = { empty: true, space: true };
|
|
3164
|
+
var No = class {
|
|
3087
3165
|
constructor(e2) {
|
|
3088
|
-
this.input = e2, this.root = new
|
|
3166
|
+
this.input = e2, this.root = new Mo(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e2, start: { column: 1, line: 1, offset: 0 } };
|
|
3089
3167
|
}
|
|
3090
3168
|
atrule(e2) {
|
|
3091
|
-
let a2 = new
|
|
3169
|
+
let a2 = new co();
|
|
3092
3170
|
a2.name = e2[1].slice(1), "" === a2.name && this.unnamedAtrule(a2, e2), this.init(a2, e2[2]);
|
|
3093
3171
|
let u2, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3094
3172
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3140,7 +3218,7 @@
|
|
|
3140
3218
|
return false;
|
|
3141
3219
|
}
|
|
3142
3220
|
comment(e2) {
|
|
3143
|
-
let a2 = new
|
|
3221
|
+
let a2 = new uo();
|
|
3144
3222
|
this.init(a2, e2[2]), a2.source.end = this.getPosition(e2[3] || e2[2]), a2.source.end.offset++;
|
|
3145
3223
|
let u2 = e2[1].slice(2, -2);
|
|
3146
3224
|
if (/^\s*$/.test(u2)) a2.text = "", a2.raws.left = u2, a2.raws.right = "";
|
|
@@ -3153,7 +3231,7 @@
|
|
|
3153
3231
|
this.tokenizer = Xa(this.input);
|
|
3154
3232
|
}
|
|
3155
3233
|
decl(e2, a2) {
|
|
3156
|
-
let u2 = new
|
|
3234
|
+
let u2 = new ho();
|
|
3157
3235
|
this.init(u2, e2[0][2]);
|
|
3158
3236
|
let m2, w2 = e2[e2.length - 1];
|
|
3159
3237
|
for (";" === w2[0] && (this.semicolon = true, e2.pop()), u2.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e3) {
|
|
@@ -3202,7 +3280,7 @@
|
|
|
3202
3280
|
throw this.input.error("Double colon", { offset: e2[2] }, { offset: e2[2] + e2[1].length });
|
|
3203
3281
|
}
|
|
3204
3282
|
emptyRule(e2) {
|
|
3205
|
-
let a2 = new
|
|
3283
|
+
let a2 = new _o();
|
|
3206
3284
|
this.init(a2, e2[2]), a2.selector = "", a2.raws.between = "", this.current = a2;
|
|
3207
3285
|
}
|
|
3208
3286
|
end(e2) {
|
|
@@ -3278,7 +3356,7 @@
|
|
|
3278
3356
|
}
|
|
3279
3357
|
raw(e2, a2, u2, m2) {
|
|
3280
3358
|
let w2, b2, C2, x2, I2 = u2.length, _2 = "", O2 = true;
|
|
3281
|
-
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty",
|
|
3359
|
+
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty", Ao[x2] || Ao[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3282
3360
|
if (!O2) {
|
|
3283
3361
|
let m3 = u2.reduce((e3, a3) => e3 + a3[1], "");
|
|
3284
3362
|
e2.raws[a2] = { raw: m3, value: _2 };
|
|
@@ -3287,7 +3365,7 @@
|
|
|
3287
3365
|
}
|
|
3288
3366
|
rule(e2) {
|
|
3289
3367
|
e2.pop();
|
|
3290
|
-
let a2 = new
|
|
3368
|
+
let a2 = new _o();
|
|
3291
3369
|
this.init(a2, e2[0][2]), a2.raws.between = this.spacesAndCommentsFromEnd(e2), this.raw(a2, "selector", e2), this.current = a2;
|
|
3292
3370
|
}
|
|
3293
3371
|
spacesAndCommentsFromEnd(e2) {
|
|
@@ -3327,9 +3405,9 @@
|
|
|
3327
3405
|
throw this.input.error("At-rule without name", { offset: a2[2] }, { offset: a2[2] + a2[1].length });
|
|
3328
3406
|
}
|
|
3329
3407
|
};
|
|
3330
|
-
let
|
|
3408
|
+
let Po = In, Do = dr, Fo = No;
|
|
3331
3409
|
function _t(e2, a2) {
|
|
3332
|
-
let u2 = new
|
|
3410
|
+
let u2 = new Do(e2, a2), m2 = new Fo(u2);
|
|
3333
3411
|
try {
|
|
3334
3412
|
m2.parse();
|
|
3335
3413
|
} catch (e3) {
|
|
@@ -3337,9 +3415,9 @@
|
|
|
3337
3415
|
}
|
|
3338
3416
|
return m2.root;
|
|
3339
3417
|
}
|
|
3340
|
-
var
|
|
3341
|
-
_t.default = _t,
|
|
3342
|
-
let
|
|
3418
|
+
var Uo = _t;
|
|
3419
|
+
_t.default = _t, Po.registerParse(_t);
|
|
3420
|
+
let $o = class {
|
|
3343
3421
|
constructor(e2, a2 = {}) {
|
|
3344
3422
|
if (this.type = "warning", this.text = e2, a2.node && a2.node.source) {
|
|
3345
3423
|
let e3 = a2.node.rangeBy(a2);
|
|
@@ -3351,9 +3429,9 @@
|
|
|
3351
3429
|
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;
|
|
3352
3430
|
}
|
|
3353
3431
|
};
|
|
3354
|
-
var
|
|
3355
|
-
|
|
3356
|
-
let
|
|
3432
|
+
var jo = $o;
|
|
3433
|
+
$o.default = $o;
|
|
3434
|
+
let Go = jo, Vo = class {
|
|
3357
3435
|
get content() {
|
|
3358
3436
|
return this.css;
|
|
3359
3437
|
}
|
|
@@ -3365,26 +3443,26 @@
|
|
|
3365
3443
|
}
|
|
3366
3444
|
warn(e2, a2 = {}) {
|
|
3367
3445
|
a2.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a2.plugin = this.lastPlugin.postcssPlugin);
|
|
3368
|
-
let u2 = new
|
|
3446
|
+
let u2 = new Go(e2, a2);
|
|
3369
3447
|
return this.messages.push(u2), u2;
|
|
3370
3448
|
}
|
|
3371
3449
|
warnings() {
|
|
3372
3450
|
return this.messages.filter((e2) => "warning" === e2.type);
|
|
3373
3451
|
}
|
|
3374
3452
|
};
|
|
3375
|
-
var
|
|
3376
|
-
|
|
3377
|
-
let
|
|
3453
|
+
var qo = Vo;
|
|
3454
|
+
Vo.default = Vo;
|
|
3455
|
+
let Ho = {};
|
|
3378
3456
|
var so = function(e2) {
|
|
3379
|
-
|
|
3457
|
+
Ho[e2] || (Ho[e2] = true, typeof console < "u" && console.warn && console.warn(e2));
|
|
3380
3458
|
};
|
|
3381
|
-
let
|
|
3382
|
-
const
|
|
3459
|
+
let Zo = In, Ko = Nn, Jo = to, Yo = Uo, Xo = qo, Qo = yr, es = Kt, { isClean: ts, my: ns } = Jt, rs = so;
|
|
3460
|
+
const os = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, ss = { 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 }, is = { Once: true, postcssPlugin: true, prepare: true };
|
|
3383
3461
|
function Ne(e2) {
|
|
3384
3462
|
return "object" == typeof e2 && "function" == typeof e2.then;
|
|
3385
3463
|
}
|
|
3386
3464
|
function no(e2) {
|
|
3387
|
-
let a2 = false, u2 =
|
|
3465
|
+
let a2 = false, u2 = os[e2.type];
|
|
3388
3466
|
return "decl" === e2.type ? a2 = e2.prop.toLowerCase() : "atrule" === e2.type && (a2 = e2.name.toLowerCase()), a2 && e2.append ? [u2, u2 + "-" + a2, 0, u2 + "Exit", u2 + "Exit-" + a2] : a2 ? [u2, u2 + "-" + a2, u2 + "Exit", u2 + "Exit-" + a2] : e2.append ? [u2, 0, u2 + "Exit"] : [u2, u2 + "Exit"];
|
|
3389
3467
|
}
|
|
3390
3468
|
function Gn(e2) {
|
|
@@ -3392,9 +3470,9 @@
|
|
|
3392
3470
|
return a2 = "document" === e2.type ? ["Document", 0, "DocumentExit"] : "root" === e2.type ? ["Root", 0, "RootExit"] : no(e2), { eventIndex: 0, events: a2, iterator: 0, node: e2, visitorIndex: 0, visitors: [] };
|
|
3393
3471
|
}
|
|
3394
3472
|
function Ps(e2) {
|
|
3395
|
-
return e2[
|
|
3473
|
+
return e2[ts] = false, e2.nodes && e2.nodes.forEach((e3) => Ps(e3)), e2;
|
|
3396
3474
|
}
|
|
3397
|
-
let
|
|
3475
|
+
let as = {}, ls = class ro {
|
|
3398
3476
|
get content() {
|
|
3399
3477
|
return this.stringify().content;
|
|
3400
3478
|
}
|
|
@@ -3421,19 +3499,19 @@
|
|
|
3421
3499
|
}
|
|
3422
3500
|
constructor(e2, a2, u2) {
|
|
3423
3501
|
let m2;
|
|
3424
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof ro || a2 instanceof
|
|
3502
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof ro || a2 instanceof Xo) m2 = Ps(a2.root), a2.map && (typeof u2.map > "u" && (u2.map = {}), u2.map.inline || (u2.map.inline = false), u2.map.prev = a2.map);
|
|
3425
3503
|
else {
|
|
3426
|
-
let e3 =
|
|
3504
|
+
let e3 = Yo;
|
|
3427
3505
|
u2.syntax && (e3 = u2.syntax.parse), u2.parser && (e3 = u2.parser), e3.parse && (e3 = e3.parse);
|
|
3428
3506
|
try {
|
|
3429
3507
|
m2 = e3(a2, u2);
|
|
3430
3508
|
} catch (e4) {
|
|
3431
3509
|
this.processed = true, this.error = e4;
|
|
3432
3510
|
}
|
|
3433
|
-
m2 && !m2[
|
|
3511
|
+
m2 && !m2[ns] && Zo.rebuild(m2);
|
|
3434
3512
|
}
|
|
3435
3513
|
else m2 = Ps(a2);
|
|
3436
|
-
this.result = new
|
|
3514
|
+
this.result = new Xo(e2, m2, u2), this.helpers = { ...as, postcss: as, result: this.result }, this.plugins = this.processor.plugins.map((e3) => "object" == typeof e3 && e3.prepare ? { ...e3, ...e3.prepare(this.result) } : e3);
|
|
3437
3515
|
}
|
|
3438
3516
|
async() {
|
|
3439
3517
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3467,8 +3545,8 @@
|
|
|
3467
3545
|
this.listeners[a2] || (this.listeners[a2] = []), this.listeners[a2].push([e2, u2]);
|
|
3468
3546
|
};
|
|
3469
3547
|
for (let e2 of this.plugins) if ("object" == typeof e2) for (let a2 in e2) {
|
|
3470
|
-
if (!
|
|
3471
|
-
if (!
|
|
3548
|
+
if (!ss[a2] && /^[A-Z]/.test(a2)) throw new Error(`Unknown event ${a2} in ${e2.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3549
|
+
if (!is[a2]) if ("object" == typeof e2[a2]) for (let u2 in e2[a2]) t(e2, "*" === u2 ? a2 : a2 + "-" + u2.toLowerCase(), e2[a2][u2]);
|
|
3472
3550
|
else "function" == typeof e2[a2] && t(e2, a2, e2[a2]);
|
|
3473
3551
|
}
|
|
3474
3552
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3485,8 +3563,8 @@
|
|
|
3485
3563
|
}
|
|
3486
3564
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3487
3565
|
let e2 = this.result.root;
|
|
3488
|
-
for (; !e2[
|
|
3489
|
-
e2[
|
|
3566
|
+
for (; !e2[ts]; ) {
|
|
3567
|
+
e2[ts] = true;
|
|
3490
3568
|
let a2 = [Gn(e2)];
|
|
3491
3569
|
for (; a2.length > 0; ) {
|
|
3492
3570
|
let e3 = this.visitTick(a2);
|
|
@@ -3531,9 +3609,9 @@
|
|
|
3531
3609
|
if (this.error) throw this.error;
|
|
3532
3610
|
if (this.stringified) return this.result;
|
|
3533
3611
|
this.stringified = true, this.sync();
|
|
3534
|
-
let e2 = this.result.opts, a2 =
|
|
3612
|
+
let e2 = this.result.opts, a2 = es;
|
|
3535
3613
|
e2.syntax && (a2 = e2.syntax.stringify), e2.stringifier && (a2 = e2.stringifier), a2.stringify && (a2 = a2.stringify);
|
|
3536
|
-
let u2 = new
|
|
3614
|
+
let u2 = new Jo(a2, this.result.root, this.result.opts).generate();
|
|
3537
3615
|
return this.result.css = u2[0], this.result.map = u2[1], this.result;
|
|
3538
3616
|
}
|
|
3539
3617
|
sync() {
|
|
@@ -3545,14 +3623,14 @@
|
|
|
3545
3623
|
}
|
|
3546
3624
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3547
3625
|
let e2 = this.result.root;
|
|
3548
|
-
for (; !e2[
|
|
3626
|
+
for (; !e2[ts]; ) e2[ts] = true, this.walkSync(e2);
|
|
3549
3627
|
if (this.listeners.OnceExit) if ("document" === e2.type) for (let a2 of e2.nodes) this.visitSync(this.listeners.OnceExit, a2);
|
|
3550
3628
|
else this.visitSync(this.listeners.OnceExit, e2);
|
|
3551
3629
|
}
|
|
3552
3630
|
return this.result;
|
|
3553
3631
|
}
|
|
3554
3632
|
then(e2, a2) {
|
|
3555
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3633
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || rs("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(e2, a2);
|
|
3556
3634
|
}
|
|
3557
3635
|
toString() {
|
|
3558
3636
|
return this.css;
|
|
@@ -3584,22 +3662,22 @@
|
|
|
3584
3662
|
}
|
|
3585
3663
|
if (0 !== a2.iterator) {
|
|
3586
3664
|
let m3, w3 = a2.iterator;
|
|
3587
|
-
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[
|
|
3665
|
+
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[ts]) return m3[ts] = true, void e2.push(Gn(m3));
|
|
3588
3666
|
a2.iterator = 0, delete u2.indexes[w3];
|
|
3589
3667
|
}
|
|
3590
3668
|
let w2 = a2.events;
|
|
3591
3669
|
for (; a2.eventIndex < w2.length; ) {
|
|
3592
3670
|
let e3 = w2[a2.eventIndex];
|
|
3593
|
-
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[
|
|
3671
|
+
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[ts] = true, a2.iterator = u2.getIterator()));
|
|
3594
3672
|
if (this.listeners[e3]) return void (a2.visitors = this.listeners[e3]);
|
|
3595
3673
|
}
|
|
3596
3674
|
e2.pop();
|
|
3597
3675
|
}
|
|
3598
3676
|
walkSync(e2) {
|
|
3599
|
-
e2[
|
|
3677
|
+
e2[ts] = true;
|
|
3600
3678
|
let a2 = no(e2);
|
|
3601
3679
|
for (let u2 of a2) if (0 === u2) e2.nodes && e2.each((e3) => {
|
|
3602
|
-
e3[
|
|
3680
|
+
e3[ts] || this.walkSync(e3);
|
|
3603
3681
|
});
|
|
3604
3682
|
else {
|
|
3605
3683
|
let a3 = this.listeners[u2];
|
|
@@ -3610,14 +3688,14 @@
|
|
|
3610
3688
|
return this.sync().warnings();
|
|
3611
3689
|
}
|
|
3612
3690
|
};
|
|
3613
|
-
|
|
3614
|
-
|
|
3691
|
+
ls.registerPostcss = (e2) => {
|
|
3692
|
+
as = e2;
|
|
3615
3693
|
};
|
|
3616
|
-
var
|
|
3617
|
-
|
|
3618
|
-
let
|
|
3619
|
-
const
|
|
3620
|
-
let
|
|
3694
|
+
var cs = ls;
|
|
3695
|
+
ls.default = ls, Qo.registerLazyResult(ls), Ko.registerLazyResult(ls);
|
|
3696
|
+
let us = to, ps = Uo;
|
|
3697
|
+
const ds = qo;
|
|
3698
|
+
let hs = Kt, ms = so, gs = class {
|
|
3621
3699
|
get content() {
|
|
3622
3700
|
return this.result.css;
|
|
3623
3701
|
}
|
|
@@ -3638,7 +3716,7 @@
|
|
|
3638
3716
|
}
|
|
3639
3717
|
get root() {
|
|
3640
3718
|
if (this._root) return this._root;
|
|
3641
|
-
let e2, a2 =
|
|
3719
|
+
let e2, a2 = ps;
|
|
3642
3720
|
try {
|
|
3643
3721
|
e2 = a2(this._css, this._opts);
|
|
3644
3722
|
} catch (e3) {
|
|
@@ -3652,11 +3730,11 @@
|
|
|
3652
3730
|
}
|
|
3653
3731
|
constructor(e2, a2, u2) {
|
|
3654
3732
|
a2 = a2.toString(), this.stringified = false, this._processor = e2, this._css = a2, this._opts = u2, this._map = void 0;
|
|
3655
|
-
let m2, w2 =
|
|
3656
|
-
this.result = new
|
|
3733
|
+
let m2, w2 = hs;
|
|
3734
|
+
this.result = new ds(this._processor, m2, this._opts), this.result.css = a2;
|
|
3657
3735
|
let b2 = this;
|
|
3658
3736
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3659
|
-
let C2 = new
|
|
3737
|
+
let C2 = new us(w2, m2, this._opts, a2);
|
|
3660
3738
|
if (C2.isMap()) {
|
|
3661
3739
|
let [e3, a3] = C2.generate();
|
|
3662
3740
|
e3 && (this.result.css = e3), a3 && (this.result.map = a3);
|
|
@@ -3676,7 +3754,7 @@
|
|
|
3676
3754
|
return this.result;
|
|
3677
3755
|
}
|
|
3678
3756
|
then(e2, a2) {
|
|
3679
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3757
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || ms("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(e2, a2);
|
|
3680
3758
|
}
|
|
3681
3759
|
toString() {
|
|
3682
3760
|
return this._css;
|
|
@@ -3685,9 +3763,9 @@
|
|
|
3685
3763
|
return [];
|
|
3686
3764
|
}
|
|
3687
3765
|
};
|
|
3688
|
-
var
|
|
3689
|
-
|
|
3690
|
-
let
|
|
3766
|
+
var ys = gs;
|
|
3767
|
+
gs.default = gs;
|
|
3768
|
+
let ws = Nn, bs = cs, Ss = ys, vs = yr, xs = class {
|
|
3691
3769
|
constructor(e2 = []) {
|
|
3692
3770
|
this.version = "8.5.3", this.plugins = this.normalize(e2);
|
|
3693
3771
|
}
|
|
@@ -3703,43 +3781,43 @@
|
|
|
3703
3781
|
return a2;
|
|
3704
3782
|
}
|
|
3705
3783
|
process(e2, a2 = {}) {
|
|
3706
|
-
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new
|
|
3784
|
+
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new bs(this, e2, a2) : new Ss(this, e2, a2);
|
|
3707
3785
|
}
|
|
3708
3786
|
use(e2) {
|
|
3709
3787
|
return this.plugins = this.plugins.concat(this.normalize([e2])), this;
|
|
3710
3788
|
}
|
|
3711
3789
|
};
|
|
3712
|
-
var
|
|
3713
|
-
|
|
3714
|
-
let
|
|
3790
|
+
var Ms = xs;
|
|
3791
|
+
xs.default = xs, vs.registerProcessor(xs), ws.registerProcessor(xs);
|
|
3792
|
+
let Is = En, _s = ln, Os = In, Es = Bt, Ls = pn, Rs = Nn, As = Gr, Ts = dr, Ns = cs, $s = Sr, Ws = on, js = Uo, Gs = Ms, Vs = qo, qs = yr, Hs = Nr, Zs = Kt, Ks = jo;
|
|
3715
3793
|
function L$1(...e2) {
|
|
3716
|
-
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new
|
|
3794
|
+
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new Gs(e2);
|
|
3717
3795
|
}
|
|
3718
3796
|
L$1.plugin = function(e2, a2) {
|
|
3719
3797
|
let u2, m2 = false;
|
|
3720
3798
|
function n(...u3) {
|
|
3721
3799
|
console && console.warn && !m2 && (m2 = true, console.warn(e2 + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e2 + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
3722
3800
|
let w2 = a2(...u3);
|
|
3723
|
-
return w2.postcssPlugin = e2, w2.postcssVersion = new
|
|
3801
|
+
return w2.postcssPlugin = e2, w2.postcssVersion = new Gs().version, w2;
|
|
3724
3802
|
}
|
|
3725
3803
|
return Object.defineProperty(n, "postcss", { get: () => (u2 || (u2 = n()), u2) }), n.process = function(e3, a3, u3) {
|
|
3726
3804
|
return L$1([n(u3)]).process(e3, a3);
|
|
3727
3805
|
}, n;
|
|
3728
|
-
}, L$1.stringify =
|
|
3729
|
-
var
|
|
3806
|
+
}, L$1.stringify = Zs, L$1.parse = js, L$1.fromJSON = As, L$1.list = $s, L$1.comment = (e2) => new _s(e2), L$1.atRule = (e2) => new Is(e2), L$1.decl = (e2) => new Ls(e2), L$1.rule = (e2) => new Hs(e2), L$1.root = (e2) => new qs(e2), L$1.document = (e2) => new Rs(e2), L$1.CssSyntaxError = Es, L$1.Declaration = Ls, L$1.Container = Os, L$1.Processor = Gs, L$1.Document = Rs, L$1.Comment = _s, L$1.Warning = Ks, L$1.AtRule = Is, L$1.Result = Vs, L$1.Input = Ts, L$1.Rule = Hs, L$1.Root = qs, L$1.Node = Ws, Ns.registerPostcss(L$1);
|
|
3807
|
+
var Ys = L$1;
|
|
3730
3808
|
L$1.default = L$1;
|
|
3731
|
-
const
|
|
3732
|
-
|
|
3733
|
-
var
|
|
3809
|
+
const Xs = Yi(Ys);
|
|
3810
|
+
Xs.stringify, Xs.fromJSON, Xs.plugin, Xs.parse, Xs.list, Xs.document, Xs.comment, Xs.atRule, Xs.rule, Xs.decl, Xs.root, Xs.CssSyntaxError, Xs.Declaration, Xs.Container, Xs.Processor, Xs.Document, Xs.Comment, Xs.Warning, Xs.AtRule, Xs.Result, Xs.Input, Xs.Rule, Xs.Root, Xs.Node;
|
|
3811
|
+
var Qs = ((e2) => (e2[e2.DomContentLoaded = 0] = "DomContentLoaded", e2[e2.Load = 1] = "Load", e2[e2.FullSnapshot = 2] = "FullSnapshot", e2[e2.IncrementalSnapshot = 3] = "IncrementalSnapshot", e2[e2.Meta = 4] = "Meta", e2[e2.Custom = 5] = "Custom", e2[e2.Plugin = 6] = "Plugin", e2[e2.Device = 24] = "Device", e2[e2.SailfishCustom = 25] = "SailfishCustom", e2))(Qs || {}), ei = ((e2) => (e2[e2.Mutation = 0] = "Mutation", e2[e2.MouseMove = 1] = "MouseMove", e2[e2.MouseInteraction = 2] = "MouseInteraction", e2[e2.Scroll = 3] = "Scroll", e2[e2.ViewportResize = 4] = "ViewportResize", e2[e2.Input = 5] = "Input", e2[e2.TouchMove = 6] = "TouchMove", e2[e2.MediaInteraction = 7] = "MediaInteraction", e2[e2.StyleSheetRule = 8] = "StyleSheetRule", e2[e2.CanvasMutation = 9] = "CanvasMutation", e2[e2.Font = 10] = "Font", e2[e2.Log = 11] = "Log", e2[e2.Drag = 12] = "Drag", e2[e2.StyleDeclaration = 13] = "StyleDeclaration", e2[e2.Selection = 14] = "Selection", e2[e2.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e2[e2.CustomElement = 16] = "CustomElement", e2[e2.Typing = 17] = "Typing", e2))(ei || {}), ti = ((e2) => (e2[e2.MouseUp = 0] = "MouseUp", e2[e2.MouseDown = 1] = "MouseDown", e2[e2.Click = 2] = "Click", e2[e2.ContextMenu = 3] = "ContextMenu", e2[e2.DblClick = 4] = "DblClick", e2[e2.Focus = 5] = "Focus", e2[e2.Blur = 6] = "Blur", e2[e2.TouchStart = 7] = "TouchStart", e2[e2.TouchMove_Departed = 8] = "TouchMove_Departed", e2[e2.TouchEnd = 9] = "TouchEnd", e2[e2.TouchCancel = 10] = "TouchCancel", e2))(ti || {}), si = ((e2) => (e2[e2.Mouse = 0] = "Mouse", e2[e2.Pen = 1] = "Pen", e2[e2.Touch = 2] = "Touch", e2))(si || {}), ii = ((e2) => (e2[e2["2D"] = 0] = "2D", e2[e2.WebGL = 1] = "WebGL", e2[e2.WebGL2 = 2] = "WebGL2", e2))(ii || {}), ai = ((e2) => (e2[e2.Play = 0] = "Play", e2[e2.Pause = 1] = "Pause", e2[e2.Seeked = 2] = "Seeked", e2[e2.VolumeChange = 3] = "VolumeChange", e2[e2.RateChange = 4] = "RateChange", e2))(ai || {});
|
|
3734
3812
|
function G(e2, a2, u2 = document) {
|
|
3735
3813
|
const m2 = { capture: true, passive: true };
|
|
3736
3814
|
return u2.addEventListener(e2, a2, m2), () => u2.removeEventListener(e2, a2, m2);
|
|
3737
3815
|
}
|
|
3738
|
-
const
|
|
3739
|
-
let
|
|
3740
|
-
console.error(
|
|
3741
|
-
}, has: () => (console.error(
|
|
3742
|
-
console.error(
|
|
3816
|
+
const li = "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.";
|
|
3817
|
+
let ci = { map: {}, getId: () => (console.error(li), -1), getNode: () => (console.error(li), null), removeNodeFromMap() {
|
|
3818
|
+
console.error(li);
|
|
3819
|
+
}, has: () => (console.error(li), false), reset() {
|
|
3820
|
+
console.error(li);
|
|
3743
3821
|
} };
|
|
3744
3822
|
function $e(e2, a2, u2 = {}) {
|
|
3745
3823
|
let m2 = null, w2 = 0;
|
|
@@ -3773,8 +3851,8 @@
|
|
|
3773
3851
|
};
|
|
3774
3852
|
}
|
|
3775
3853
|
}
|
|
3776
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3777
|
-
let
|
|
3854
|
+
typeof window < "u" && window.Proxy && window.Reflect && (ci = new Proxy(ci, { get: (e2, a2, u2) => ("map" === a2 && console.error(li), Reflect.get(e2, a2, u2)) }));
|
|
3855
|
+
let ui, pi = Date.now;
|
|
3778
3856
|
function po(e2) {
|
|
3779
3857
|
var a2, u2, m2, w2, b2, C2;
|
|
3780
3858
|
const x2 = e2.document;
|
|
@@ -3821,7 +3899,7 @@
|
|
|
3821
3899
|
function Fs(e2) {
|
|
3822
3900
|
return !(null == e2 || !e2.shadowRoot);
|
|
3823
3901
|
}
|
|
3824
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3902
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (pi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3825
3903
|
class _l {
|
|
3826
3904
|
constructor() {
|
|
3827
3905
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3866,11 +3944,11 @@
|
|
|
3866
3944
|
const a2 = e2.ownerDocument;
|
|
3867
3945
|
return !!a2 && (a2.contains(e2) || zl(e2));
|
|
3868
3946
|
}
|
|
3869
|
-
const M = (e2) =>
|
|
3947
|
+
const M = (e2) => ui ? (...a2) => {
|
|
3870
3948
|
try {
|
|
3871
3949
|
return e2(...a2);
|
|
3872
3950
|
} catch (e3) {
|
|
3873
|
-
if (
|
|
3951
|
+
if (ui && true === ui(e3)) return;
|
|
3874
3952
|
throw e3;
|
|
3875
3953
|
}
|
|
3876
3954
|
} : e2;
|
|
@@ -3929,22 +4007,22 @@
|
|
|
3929
4007
|
transformCrossOriginEvent(e2, a2) {
|
|
3930
4008
|
var u2;
|
|
3931
4009
|
switch (a2.type) {
|
|
3932
|
-
case
|
|
4010
|
+
case Qs.FullSnapshot: {
|
|
3933
4011
|
this.crossOriginIframeMirror.reset(e2), this.crossOriginIframeStyleMirror.reset(e2), this.replaceIdOnNode(a2.data.node, e2);
|
|
3934
4012
|
const u3 = a2.data.node.id;
|
|
3935
|
-
return this.crossOriginIframeRootIdMap.set(e2, u3), this.patchRootIdOnNode(a2.data.node, u3), { timestamp: a2.timestamp, type:
|
|
4013
|
+
return this.crossOriginIframeRootIdMap.set(e2, u3), this.patchRootIdOnNode(a2.data.node, u3), { timestamp: a2.timestamp, type: Qs.IncrementalSnapshot, data: { source: ei.Mutation, adds: [{ parentId: this.mirror.getId(e2), nextId: null, node: a2.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
3936
4014
|
}
|
|
3937
|
-
case
|
|
3938
|
-
case
|
|
3939
|
-
case
|
|
4015
|
+
case Qs.Meta:
|
|
4016
|
+
case Qs.Load:
|
|
4017
|
+
case Qs.DomContentLoaded:
|
|
3940
4018
|
return false;
|
|
3941
|
-
case
|
|
4019
|
+
case Qs.Plugin:
|
|
3942
4020
|
return a2;
|
|
3943
|
-
case
|
|
4021
|
+
case Qs.Custom:
|
|
3944
4022
|
return this.replaceIds(a2.data.payload, e2, ["id", "parentId", "previousId", "nextId"]), a2;
|
|
3945
|
-
case
|
|
4023
|
+
case Qs.IncrementalSnapshot:
|
|
3946
4024
|
switch (a2.data.source) {
|
|
3947
|
-
case
|
|
4025
|
+
case ei.Mutation:
|
|
3948
4026
|
return a2.data.adds.forEach((a3) => {
|
|
3949
4027
|
this.replaceIds(a3, e2, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a3.node, e2);
|
|
3950
4028
|
const u3 = this.crossOriginIframeRootIdMap.get(e2);
|
|
@@ -3956,30 +4034,30 @@
|
|
|
3956
4034
|
}), a2.data.texts.forEach((a3) => {
|
|
3957
4035
|
this.replaceIds(a3, e2, ["id"]);
|
|
3958
4036
|
}), a2;
|
|
3959
|
-
case
|
|
3960
|
-
case
|
|
3961
|
-
case
|
|
4037
|
+
case ei.Drag:
|
|
4038
|
+
case ei.TouchMove:
|
|
4039
|
+
case ei.MouseMove:
|
|
3962
4040
|
return a2.data.positions.forEach((a3) => {
|
|
3963
4041
|
this.replaceIds(a3, e2, ["id"]);
|
|
3964
4042
|
}), a2;
|
|
3965
|
-
case
|
|
4043
|
+
case ei.ViewportResize:
|
|
3966
4044
|
return false;
|
|
3967
|
-
case
|
|
3968
|
-
case
|
|
3969
|
-
case
|
|
3970
|
-
case
|
|
3971
|
-
case
|
|
4045
|
+
case ei.MediaInteraction:
|
|
4046
|
+
case ei.MouseInteraction:
|
|
4047
|
+
case ei.Scroll:
|
|
4048
|
+
case ei.CanvasMutation:
|
|
4049
|
+
case ei.Input:
|
|
3972
4050
|
return this.replaceIds(a2.data, e2, ["id"]), a2;
|
|
3973
|
-
case
|
|
3974
|
-
case
|
|
4051
|
+
case ei.StyleSheetRule:
|
|
4052
|
+
case ei.StyleDeclaration:
|
|
3975
4053
|
return this.replaceIds(a2.data, e2, ["id"]), this.replaceStyleIds(a2.data, e2, ["styleId"]), a2;
|
|
3976
|
-
case
|
|
4054
|
+
case ei.Font:
|
|
3977
4055
|
return a2;
|
|
3978
|
-
case
|
|
4056
|
+
case ei.Selection:
|
|
3979
4057
|
return a2.data.ranges.forEach((a3) => {
|
|
3980
4058
|
this.replaceIds(a3, e2, ["start", "end"]);
|
|
3981
4059
|
}), a2;
|
|
3982
|
-
case
|
|
4060
|
+
case ei.AdoptedStyleSheet:
|
|
3983
4061
|
return this.replaceIds(a2.data, e2, ["id"]), this.replaceStyleIds(a2.data, e2, ["styleIds"]), null == (u2 = a2.data.styles) || u2.forEach((a3) => {
|
|
3984
4062
|
this.replaceStyleIds(a3, e2, ["styleId"]);
|
|
3985
4063
|
}), a2;
|
|
@@ -4003,7 +4081,7 @@
|
|
|
4003
4081
|
});
|
|
4004
4082
|
}
|
|
4005
4083
|
patchRootIdOnNode(e2, a2) {
|
|
4006
|
-
e2.type !==
|
|
4084
|
+
e2.type !== ut.Document && !e2.rootId && (e2.rootId = a2), "childNodes" in e2 && e2.childNodes.forEach((e3) => {
|
|
4007
4085
|
this.patchRootIdOnNode(e3, a2);
|
|
4008
4086
|
});
|
|
4009
4087
|
}
|
|
@@ -4221,7 +4299,7 @@
|
|
|
4221
4299
|
const { parentNode: u2 } = a2;
|
|
4222
4300
|
return !!u2 && (!!e2.has(u2) || ko(e2, u2));
|
|
4223
4301
|
}
|
|
4224
|
-
const
|
|
4302
|
+
const di = [];
|
|
4225
4303
|
function tt(e2) {
|
|
4226
4304
|
try {
|
|
4227
4305
|
if ("composedPath" in e2) {
|
|
@@ -4235,7 +4313,7 @@
|
|
|
4235
4313
|
function Co(e2, a2) {
|
|
4236
4314
|
var u2, m2;
|
|
4237
4315
|
const w2 = new Zl();
|
|
4238
|
-
|
|
4316
|
+
di.push(w2), w2.init(e2);
|
|
4239
4317
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4240
4318
|
const C2 = null == (m2 = null == (u2 = null == window ? void 0 : window.Zone) ? void 0 : u2.__symbol__) ? void 0 : m2.call(u2, "MutationObserver");
|
|
4241
4319
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4247,7 +4325,7 @@
|
|
|
4247
4325
|
};
|
|
4248
4326
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4249
4327
|
let I2 = null;
|
|
4250
|
-
return Object.keys(
|
|
4328
|
+
return Object.keys(ti).filter((e3) => Number.isNaN(Number(e3)) && !e3.endsWith("_Departed") && false !== C2[e3]).forEach((b3) => {
|
|
4251
4329
|
let C3 = fe(b3);
|
|
4252
4330
|
const _2 = /* @__PURE__ */ ((a3) => (b4) => {
|
|
4253
4331
|
const C4 = tt(b4);
|
|
@@ -4256,29 +4334,29 @@
|
|
|
4256
4334
|
if ("pointerType" in b4) {
|
|
4257
4335
|
switch (b4.pointerType) {
|
|
4258
4336
|
case "mouse":
|
|
4259
|
-
x3 =
|
|
4337
|
+
x3 = si.Mouse;
|
|
4260
4338
|
break;
|
|
4261
4339
|
case "touch":
|
|
4262
|
-
x3 =
|
|
4340
|
+
x3 = si.Touch;
|
|
4263
4341
|
break;
|
|
4264
4342
|
case "pen":
|
|
4265
|
-
x3 =
|
|
4343
|
+
x3 = si.Pen;
|
|
4266
4344
|
}
|
|
4267
|
-
x3 ===
|
|
4268
|
-
} else Ds(b4) && (x3 =
|
|
4269
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4345
|
+
x3 === si.Touch ? ti[a3] === ti.MouseDown ? _3 = "TouchStart" : ti[a3] === ti.MouseUp && (_3 = "TouchEnd") : si.Pen;
|
|
4346
|
+
} else Ds(b4) && (x3 = si.Touch);
|
|
4347
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === si.Touch || _3.startsWith("Mouse") && x3 === si.Mouse) && (x3 = null)) : ti[a3] === ti.Click && (x3 = I2, I2 = null);
|
|
4270
4348
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4271
4349
|
if (!O2) return;
|
|
4272
4350
|
const E2 = u2.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4273
|
-
M(e2)({ type:
|
|
4351
|
+
M(e2)({ type: ti[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4274
4352
|
})(b3);
|
|
4275
|
-
if (window.PointerEvent) switch (
|
|
4276
|
-
case
|
|
4277
|
-
case
|
|
4353
|
+
if (window.PointerEvent) switch (ti[b3]) {
|
|
4354
|
+
case ti.MouseDown:
|
|
4355
|
+
case ti.MouseUp:
|
|
4278
4356
|
C3 = C3.replace("mouse", "pointer");
|
|
4279
4357
|
break;
|
|
4280
|
-
case
|
|
4281
|
-
case
|
|
4358
|
+
case ti.TouchStart:
|
|
4359
|
+
case ti.TouchEnd:
|
|
4282
4360
|
return;
|
|
4283
4361
|
}
|
|
4284
4362
|
x2.push(G(C3, _2, a2));
|
|
@@ -4297,7 +4375,7 @@
|
|
|
4297
4375
|
} else e2({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4298
4376
|
}), b2.scroll || 100)), a2);
|
|
4299
4377
|
}
|
|
4300
|
-
const
|
|
4378
|
+
const hi = ["INPUT", "TEXTAREA", "SELECT"], fi = /* @__PURE__ */ new WeakMap();
|
|
4301
4379
|
function ql({ deviceChangeCb: e2 }) {
|
|
4302
4380
|
const t = (a3, u3) => {
|
|
4303
4381
|
const m2 = a3.device.productName ? [a3.device.productName] : ["Unknown USB Device"];
|
|
@@ -4417,7 +4495,7 @@
|
|
|
4417
4495
|
e3(x3.map((e4) => (e4.timeOffset -= u4, e4)), a4), x3 = [], C3 = null;
|
|
4418
4496
|
}), b3), _3 = M($e(M((e4) => {
|
|
4419
4497
|
const a4 = tt(e4), { clientX: u4, clientY: w4 } = Ds(e4) ? e4.changedTouches[0] : e4;
|
|
4420
|
-
C3 || (C3 =
|
|
4498
|
+
C3 || (C3 = pi()), x3.push({ x: u4, y: w4, id: m3.getId(a4), timeOffset: pi() - C3 }), I3(typeof DragEvent < "u" && e4 instanceof DragEvent ? ei.Drag : e4 instanceof MouseEvent ? ei.MouseMove : ei.TouchMove);
|
|
4421
4499
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u3), G("touchmove", _3, u3), G("drag", _3, u3)];
|
|
4422
4500
|
return M(() => {
|
|
4423
4501
|
O3.forEach((e4) => e4());
|
|
@@ -4433,7 +4511,7 @@
|
|
|
4433
4511
|
function p(e4) {
|
|
4434
4512
|
let u4 = tt(e4);
|
|
4435
4513
|
const _4 = e4.isTrusted, E4 = u4 && u4.tagName;
|
|
4436
|
-
if (u4 && "OPTION" === E4 && (u4 = u4.parentElement), !u4 || !E4 ||
|
|
4514
|
+
if (u4 && "OPTION" === E4 && (u4 = u4.parentElement), !u4 || !E4 || hi.indexOf(E4) < 0 || Z(u4, m3, w3, true) || u4.classList.contains(b3) || C3 && u4.matches(C3)) return;
|
|
4437
4515
|
let D4 = u4.value, F4 = false;
|
|
4438
4516
|
const U4 = Yt(u4) || "", { value: B2, masked: $2 } = Zt({ element: u4, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4439
4517
|
D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u4.checked), f2(u4, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
|
|
@@ -4446,9 +4524,9 @@
|
|
|
4446
4524
|
});
|
|
4447
4525
|
}
|
|
4448
4526
|
function f2(a4, m4) {
|
|
4449
|
-
const w4 =
|
|
4527
|
+
const w4 = fi.get(a4);
|
|
4450
4528
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4451
|
-
|
|
4529
|
+
fi.set(a4, m4);
|
|
4452
4530
|
const w5 = u3.getId(a4);
|
|
4453
4531
|
M(e3)({ ...m4, id: w5 });
|
|
4454
4532
|
}
|
|
@@ -4473,7 +4551,7 @@
|
|
|
4473
4551
|
const { value: e4, masked: a5 } = Zt({ element: w4, maskInputOptions: u3, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4474
4552
|
_3 = e4, b3 = a5;
|
|
4475
4553
|
}
|
|
4476
|
-
e3({ source:
|
|
4554
|
+
e3({ source: ei.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e4) => {
|
|
4477
4555
|
var a5;
|
|
4478
4556
|
const u4 = [];
|
|
4479
4557
|
for (; e4; ) {
|
|
@@ -4501,7 +4579,7 @@
|
|
|
4501
4579
|
if (!C4 || Z(C4, a3, u3, true)) return;
|
|
4502
4580
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4503
4581
|
e3({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4504
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4582
|
+
}), w3.media || 500)), x3 = [G("play", C3(ai.Play), b3), G("pause", C3(ai.Pause), b3), G("seeked", C3(ai.Seeked), b3), G("volumechange", C3(ai.VolumeChange), b3), G("ratechange", C3(ai.RateChange), b3)];
|
|
4505
4583
|
return M(() => {
|
|
4506
4584
|
x3.forEach((e4) => e4());
|
|
4507
4585
|
});
|
|
@@ -4622,7 +4700,7 @@
|
|
|
4622
4700
|
})(e2), U2 = [];
|
|
4623
4701
|
for (const a3 of e2.plugins) U2.push(a3.observer(a3.callback, u2, a3.options));
|
|
4624
4702
|
return M(() => {
|
|
4625
|
-
|
|
4703
|
+
di.forEach((e3) => e3.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d(), g2(), h(), D2(), F2(), O2(), U2.forEach((e3) => e3());
|
|
4626
4704
|
});
|
|
4627
4705
|
}
|
|
4628
4706
|
function ft(e2) {
|
|
@@ -4631,29 +4709,29 @@
|
|
|
4631
4709
|
function mt(e2) {
|
|
4632
4710
|
return !!(typeof window[e2] < "u" && window[e2].prototype && "insertRule" in window[e2].prototype && "deleteRule" in window[e2].prototype);
|
|
4633
4711
|
}
|
|
4634
|
-
const
|
|
4635
|
-
var
|
|
4712
|
+
const mi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", gi = typeof self < "u" && self.Blob && new Blob([(yi = mi, Uint8Array.from(atob(yi), (e2) => e2.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4713
|
+
var yi;
|
|
4636
4714
|
function uu(e2) {
|
|
4637
4715
|
let a2;
|
|
4638
4716
|
try {
|
|
4639
|
-
if (a2 =
|
|
4717
|
+
if (a2 = gi && (self.URL || self.webkitURL).createObjectURL(gi), !a2) throw "";
|
|
4640
4718
|
const u2 = new Worker(a2, { name: null == e2 ? void 0 : e2.name });
|
|
4641
4719
|
return u2.addEventListener("error", () => {
|
|
4642
4720
|
(self.URL || self.webkitURL).revokeObjectURL(a2);
|
|
4643
4721
|
}), u2;
|
|
4644
4722
|
} catch {
|
|
4645
|
-
return new Worker("data:text/javascript;base64," +
|
|
4723
|
+
return new Worker("data:text/javascript;base64," + mi, { name: null == e2 ? void 0 : e2.name });
|
|
4646
4724
|
} finally {
|
|
4647
4725
|
a2 && (self.URL || self.webkitURL).revokeObjectURL(a2);
|
|
4648
4726
|
}
|
|
4649
4727
|
}
|
|
4650
|
-
for (var
|
|
4651
|
-
const
|
|
4728
|
+
for (var Mi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ii = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Li = 0; Li < 64; Li++) Ii[Mi.charCodeAt(Li)] = Li;
|
|
4729
|
+
const Ri = /* @__PURE__ */ new Map();
|
|
4652
4730
|
const Oo = (e2, a2, u2) => {
|
|
4653
4731
|
if (!e2 || !Ro(e2, a2) && "object" != typeof e2) return;
|
|
4654
4732
|
const m2 = (function pu(e3, a3) {
|
|
4655
|
-
let u3 =
|
|
4656
|
-
return u3 || (u3 = /* @__PURE__ */ new Map(),
|
|
4733
|
+
let u3 = Ri.get(e3);
|
|
4734
|
+
return u3 || (u3 = /* @__PURE__ */ new Map(), Ri.set(e3, u3)), u3.has(a3) || u3.set(a3, []), u3.get(a3);
|
|
4657
4735
|
})(u2, e2.constructor.name);
|
|
4658
4736
|
let w2 = m2.indexOf(e2);
|
|
4659
4737
|
return -1 === w2 && (w2 = m2.length, m2.push(e2)), w2;
|
|
@@ -4665,7 +4743,7 @@
|
|
|
4665
4743
|
if (e2 instanceof ArrayBuffer) {
|
|
4666
4744
|
const a3 = e2.constructor.name, u3 = (function(e3) {
|
|
4667
4745
|
var a4, u4 = new Uint8Array(e3), m2 = u4.length, w2 = "";
|
|
4668
|
-
for (a4 = 0; a4 < m2; a4 += 3) w2 +=
|
|
4746
|
+
for (a4 = 0; a4 < m2; a4 += 3) w2 += Mi[u4[a4] >> 2], w2 += Mi[(3 & u4[a4]) << 4 | u4[a4 + 1] >> 4], w2 += Mi[(15 & u4[a4 + 1]) << 2 | u4[a4 + 2] >> 6], w2 += Mi[63 & u4[a4 + 2]];
|
|
4669
4747
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4670
4748
|
})(e2);
|
|
4671
4749
|
return { rr_type: a3, base64: u3 };
|
|
@@ -4762,7 +4840,7 @@
|
|
|
4762
4840
|
const { id: a3 } = e3.data;
|
|
4763
4841
|
if (C2.set(a3, false), !("base64" in e3.data)) return;
|
|
4764
4842
|
const { base64: u3, type: m3, width: w3, height: b3 } = e3.data;
|
|
4765
|
-
this.mutationCb({ id: a3, type:
|
|
4843
|
+
this.mutationCb({ id: a3, type: ii["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u3 }], type: m3 }] }, 0, 0] }] });
|
|
4766
4844
|
};
|
|
4767
4845
|
const I2 = 1e3 / e2;
|
|
4768
4846
|
let _2, O2 = 0;
|
|
@@ -4798,14 +4876,14 @@
|
|
|
4798
4876
|
return function(...b5) {
|
|
4799
4877
|
return Z(this.canvas, u3, m3, true) || setTimeout(() => {
|
|
4800
4878
|
const u4 = Eo(b5, a3, this);
|
|
4801
|
-
e3(this.canvas, { type:
|
|
4879
|
+
e3(this.canvas, { type: ii["2D"], property: C2, args: u4 });
|
|
4802
4880
|
}, 0), w4.apply(this, b5);
|
|
4803
4881
|
};
|
|
4804
4882
|
});
|
|
4805
4883
|
w3.push(b4);
|
|
4806
4884
|
} catch {
|
|
4807
4885
|
const u4 = qt(a3.CanvasRenderingContext2D.prototype, C2, { set(a4) {
|
|
4808
|
-
e3(this.canvas, { type:
|
|
4886
|
+
e3(this.canvas, { type: ii["2D"], property: C2, args: [a4], setter: true });
|
|
4809
4887
|
} });
|
|
4810
4888
|
w3.push(u4);
|
|
4811
4889
|
}
|
|
@@ -4814,7 +4892,7 @@
|
|
|
4814
4892
|
};
|
|
4815
4893
|
})(this.processMutation.bind(this), e2, a2, u2), b2 = (function mu(e3, a3, u3, m3) {
|
|
4816
4894
|
const w3 = [];
|
|
4817
|
-
return w3.push(...tr(a3.WebGLRenderingContext.prototype,
|
|
4895
|
+
return w3.push(...tr(a3.WebGLRenderingContext.prototype, ii.WebGL, e3, u3, m3, a3)), typeof a3.WebGL2RenderingContext < "u" && w3.push(...tr(a3.WebGL2RenderingContext.prototype, ii.WebGL2, e3, u3, m3, a3)), () => {
|
|
4818
4896
|
w3.forEach((e4) => e4());
|
|
4819
4897
|
};
|
|
4820
4898
|
})(this.processMutation.bind(this), e2, a2, u2);
|
|
@@ -4925,25 +5003,25 @@
|
|
|
4925
5003
|
trackStylesheetInLinkElement(e2) {
|
|
4926
5004
|
}
|
|
4927
5005
|
}
|
|
4928
|
-
let
|
|
4929
|
-
var
|
|
5006
|
+
let Ai, Ti, Ni, Pi = false;
|
|
5007
|
+
var qi;
|
|
4930
5008
|
try {
|
|
4931
5009
|
if (2 !== Array.from([1], (e2) => 2 * e2)[0]) {
|
|
4932
5010
|
const e2 = document.createElement("iframe");
|
|
4933
|
-
document.body.appendChild(e2), Array.from = (null == (
|
|
5011
|
+
document.body.appendChild(e2), Array.from = (null == (qi = e2.contentWindow) ? void 0 : qi.Array.from) || Array.from, document.body.removeChild(e2);
|
|
4934
5012
|
}
|
|
4935
|
-
} catch (
|
|
4936
|
-
console.debug("Unable to override Array.from",
|
|
5013
|
+
} catch (yi2) {
|
|
5014
|
+
console.debug("Unable to override Array.from", yi2);
|
|
4937
5015
|
}
|
|
4938
|
-
const
|
|
4939
|
-
return new
|
|
5016
|
+
const Hi = (function Ci() {
|
|
5017
|
+
return new pt();
|
|
4940
5018
|
})();
|
|
4941
5019
|
function ae(e2 = {}) {
|
|
4942
|
-
const { emit: a2, checkoutEveryNms: u2, 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:
|
|
5020
|
+
const { emit: a2, checkoutEveryNms: u2, 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" === e2.recordAfter ? e2.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e2;
|
|
4943
5021
|
!(function Bl(e3) {
|
|
4944
|
-
|
|
5022
|
+
ui = e3;
|
|
4945
5023
|
})(se2);
|
|
4946
|
-
const ie2 = !
|
|
5024
|
+
const ie2 = !Y2 || window.parent === window;
|
|
4947
5025
|
let le2 = false;
|
|
4948
5026
|
if (!ie2) try {
|
|
4949
5027
|
window.parent.document && (le2 = false);
|
|
@@ -4953,7 +5031,7 @@
|
|
|
4953
5031
|
if (ie2 && !a2) throw new Error("emit function is required");
|
|
4954
5032
|
if (!ie2 && !le2) return () => {
|
|
4955
5033
|
};
|
|
4956
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5034
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Hi.reset();
|
|
4957
5035
|
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 || {};
|
|
4958
5036
|
!(function Ul(e3 = window) {
|
|
4959
5037
|
"NodeList" in e3 && !e3.NodeList.prototype.forEach && (e3.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e3 && !e3.DOMTokenList.prototype.forEach && (e3.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e4) => {
|
|
@@ -4970,57 +5048,57 @@
|
|
|
4970
5048
|
for (const a3 of ne2 || []) a3.eventProcessor && (e3 = a3.eventProcessor(e3));
|
|
4971
5049
|
return z2 && !le2 && (e3 = z2(e3)), e3;
|
|
4972
5050
|
};
|
|
4973
|
-
|
|
5051
|
+
Ai = (e3, w3) => {
|
|
4974
5052
|
var b3;
|
|
4975
5053
|
const C3 = e3;
|
|
4976
|
-
if (C3.timestamp =
|
|
5054
|
+
if (C3.timestamp = pi(), null != (b3 = di[0]) && b3.isFrozen() && C3.type !== Qs.FullSnapshot && !(C3.type === Qs.IncrementalSnapshot && C3.data.source === ei.Mutation) && di.forEach((e4) => e4.unfreeze()), ie2) null == a2 || a2(vn(C3), w3);
|
|
4977
5055
|
else if (le2) {
|
|
4978
5056
|
const e4 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
4979
5057
|
window.parent.postMessage(e4, "*");
|
|
4980
5058
|
}
|
|
4981
|
-
if (C3.type ===
|
|
4982
|
-
else if (C3.type ===
|
|
4983
|
-
if (C3.data.source ===
|
|
5059
|
+
if (C3.type === Qs.FullSnapshot) de2 = C3, he2 = 0;
|
|
5060
|
+
else if (C3.type === Qs.IncrementalSnapshot) {
|
|
5061
|
+
if (C3.data.source === ei.Mutation && C3.data.isAttachIframe) return;
|
|
4984
5062
|
he2++;
|
|
4985
5063
|
const e4 = m2 && he2 >= m2, a3 = u2 && C3.timestamp - de2.timestamp > u2;
|
|
4986
|
-
(e4 || a3) &&
|
|
5064
|
+
(e4 || a3) && Ti(true);
|
|
4987
5065
|
}
|
|
4988
5066
|
};
|
|
4989
5067
|
const rt = (e3) => {
|
|
4990
|
-
|
|
4991
|
-
}, kn = (e3) =>
|
|
4992
|
-
for (const e3 of ne2 || []) e3.getMirror && e3.getMirror({ nodeMirror:
|
|
5068
|
+
Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Mutation, ...e3 } });
|
|
5069
|
+
}, kn = (e3) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Scroll, ...e3 } }), Cn = (e3) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.CanvasMutation, ...e3 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e3) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.AdoptedStyleSheet, ...e3 } }) }), ge2 = new Vl({ mirror: Hi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Ai });
|
|
5070
|
+
for (const e3 of ne2 || []) e3.getMirror && e3.getMirror({ nodeMirror: Hi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
4993
5071
|
const ye2 = new yu();
|
|
4994
|
-
|
|
4995
|
-
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:
|
|
4996
|
-
|
|
5072
|
+
Ni = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Hi, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5073
|
+
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: Ni, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Hi });
|
|
5074
|
+
Ti = (e3 = false) => {
|
|
4997
5075
|
if (!H2) return;
|
|
4998
|
-
|
|
5076
|
+
Ai({ type: Qs.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e3), me2.reset(), we2.init(), di.forEach((e4) => e4.lock());
|
|
4999
5077
|
const a3 = (function Zi(e4, a4) {
|
|
5000
|
-
const { mirror: u3 = new
|
|
5078
|
+
const { mirror: u3 = new pt(), 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 } = a4 || {};
|
|
5001
5079
|
return Se(e4, { doc: e4, mirror: u3, 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 });
|
|
5002
|
-
})(document, { mirror:
|
|
5003
|
-
wo(e4,
|
|
5080
|
+
})(document, { mirror: Hi, 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: (e4) => {
|
|
5081
|
+
wo(e4, Hi) && ge2.addIframe(e4), bo(e4, Hi) && me2.trackLinkElement(e4), Fs(e4) && we2.addShadowRoot(e4.shadowRoot, document);
|
|
5004
5082
|
}, onIframeLoad: (e4, a4) => {
|
|
5005
5083
|
ge2.attachIframe(e4, a4), we2.observeAttachShadow(e4);
|
|
5006
5084
|
}, onStylesheetLoad: (e4, a4) => {
|
|
5007
5085
|
me2.attachLinkElement(e4, a4);
|
|
5008
5086
|
}, keepIframeSrcFn: re2 });
|
|
5009
5087
|
if (!a3) return console.warn("Failed to snapshot the document");
|
|
5010
|
-
|
|
5088
|
+
Ai({ type: Qs.FullSnapshot, data: { node: a3, initialOffset: po(window) } }, e3), di.forEach((e4) => e4.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Hi.getId(document));
|
|
5011
5089
|
};
|
|
5012
5090
|
try {
|
|
5013
5091
|
const e3 = [], K = (e4) => {
|
|
5014
5092
|
var a3;
|
|
5015
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e5, a4) =>
|
|
5016
|
-
|
|
5093
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e5, a4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: a4, positions: e5 } }), mouseInteractionCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.MouseInteraction, ...e5 } }), scrollCb: kn, viewportResizeCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.ViewportResize, ...e5 } }), inputCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Input, ...e5 } }), mediaInteractionCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.MediaInteraction, ...e5 } }), styleSheetRuleCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.StyleSheetRule, ...e5 } }), styleDeclarationCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.StyleDeclaration, ...e5 } }), canvasMutationCb: Cn, fontCb: (e5) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Font, ...e5 } }), selectionCb: (e5) => {
|
|
5094
|
+
Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Selection, ...e5 } });
|
|
5017
5095
|
}, customElementCb: (e5) => {
|
|
5018
|
-
|
|
5096
|
+
Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.CustomElement, ...e5 } });
|
|
5019
5097
|
}, typingCb: (e5) => {
|
|
5020
|
-
|
|
5098
|
+
Ai({ type: Qs.IncrementalSnapshot, data: { ...e5 } });
|
|
5021
5099
|
}, deviceChangeCb: (e5) => {
|
|
5022
|
-
|
|
5023
|
-
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas:
|
|
5100
|
+
Ai({ type: Qs.Device, data: { ...e5 } });
|
|
5101
|
+
}, 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: e4, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: Hi, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Ni, ignoreCSSAttributes: oe2, plugins: (null == (a3 = null == ne2 ? void 0 : ne2.filter((e5) => e5.observer)) ? void 0 : a3.map((e5) => ({ observer: e5.observer, options: e5.options, callback: (a4) => Ai({ type: Qs.Plugin, data: { plugin: e5.name, payload: a4 } }) }))) || [] }, $2);
|
|
5024
5102
|
};
|
|
5025
5103
|
ge2.addLoadListener((a3) => {
|
|
5026
5104
|
try {
|
|
@@ -5030,15 +5108,15 @@
|
|
|
5030
5108
|
}
|
|
5031
5109
|
});
|
|
5032
5110
|
const W = () => {
|
|
5033
|
-
|
|
5111
|
+
Ti(), e3.push(K(document)), Pi = true;
|
|
5034
5112
|
};
|
|
5035
5113
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e3.push(G("DOMContentLoaded", () => {
|
|
5036
|
-
|
|
5114
|
+
Ai({ type: Qs.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5037
5115
|
})), e3.push(G("load", () => {
|
|
5038
|
-
|
|
5116
|
+
Ai({ type: Qs.Load, data: {} }), "load" === X2 && W();
|
|
5039
5117
|
}, window))), () => {
|
|
5040
|
-
e3.forEach((e4) => e4()), ye2.destroy(),
|
|
5041
|
-
|
|
5118
|
+
e3.forEach((e4) => e4()), ye2.destroy(), Pi = false, (function jl() {
|
|
5119
|
+
ui = void 0;
|
|
5042
5120
|
})();
|
|
5043
5121
|
};
|
|
5044
5122
|
} catch (e3) {
|
|
@@ -5065,24 +5143,24 @@
|
|
|
5065
5143
|
}), u2;
|
|
5066
5144
|
}
|
|
5067
5145
|
ae.addCustomEvent = (e2, a2) => {
|
|
5068
|
-
if (!
|
|
5069
|
-
|
|
5146
|
+
if (!Pi) throw new Error("please add custom event after start recording");
|
|
5147
|
+
Ai({ type: Qs.Custom, data: { tag: e2, payload: a2 } });
|
|
5070
5148
|
}, ae.addSailfishEvent = (e2, a2) => {
|
|
5071
|
-
if (!
|
|
5072
|
-
|
|
5149
|
+
if (!Pi) throw new Error("please add Sailfish event after start recording");
|
|
5150
|
+
Ai({ type: e2, data: { tag: "sailfish-zendesk-test-tag", payload: a2 } });
|
|
5073
5151
|
}, ae.freezePage = () => {
|
|
5074
|
-
|
|
5152
|
+
di.forEach((e2) => e2.freeze());
|
|
5075
5153
|
}, ae.takeFullSnapshot = (e2) => {
|
|
5076
|
-
if (!
|
|
5077
|
-
|
|
5078
|
-
}, ae.mirror =
|
|
5079
|
-
var
|
|
5080
|
-
return { isColorSupported: false, reset:
|
|
5154
|
+
if (!Pi) throw new Error("please take full snapshot after start recording");
|
|
5155
|
+
Ti(e2);
|
|
5156
|
+
}, ae.mirror = Hi;
|
|
5157
|
+
var Ji = { exports: {} }, Xi = String, Lo = function() {
|
|
5158
|
+
return { isColorSupported: false, reset: Xi, bold: Xi, dim: Xi, italic: Xi, underline: Xi, inverse: Xi, hidden: Xi, strikethrough: Xi, black: Xi, red: Xi, green: Xi, yellow: Xi, blue: Xi, magenta: Xi, cyan: Xi, white: Xi, gray: Xi, bgBlack: Xi, bgRed: Xi, bgGreen: Xi, bgYellow: Xi, bgBlue: Xi, bgMagenta: Xi, bgCyan: Xi, bgWhite: Xi, blackBright: Xi, redBright: Xi, greenBright: Xi, yellowBright: Xi, blueBright: Xi, magentaBright: Xi, cyanBright: Xi, whiteBright: Xi, bgBlackBright: Xi, bgRedBright: Xi, bgGreenBright: Xi, bgYellowBright: Xi, bgBlueBright: Xi, bgMagentaBright: Xi, bgCyanBright: Xi, bgWhiteBright: Xi };
|
|
5081
5159
|
};
|
|
5082
|
-
|
|
5083
|
-
var
|
|
5084
|
-
const
|
|
5085
|
-
let
|
|
5160
|
+
Ji.exports = Lo(), Ji.exports.createColors = Lo;
|
|
5161
|
+
var Qi = Ji.exports;
|
|
5162
|
+
const ea = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5163
|
+
let ta = Qi, na = ea, ra = class To extends Error {
|
|
5086
5164
|
constructor(e2, a2, u2, m2, w2, b2) {
|
|
5087
5165
|
super(e2), this.name = "CssSyntaxError", this.reason = e2, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a2 < "u" && typeof u2 < "u" && ("number" == typeof a2 ? (this.line = a2, this.column = u2) : (this.line = a2.line, this.column = a2.column, this.endLine = u2.line, this.endColumn = u2.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
|
|
5088
5166
|
}
|
|
@@ -5092,11 +5170,11 @@
|
|
|
5092
5170
|
showSourceCode(e2) {
|
|
5093
5171
|
if (!this.source) return "";
|
|
5094
5172
|
let a2 = this.source;
|
|
5095
|
-
null == e2 && (e2 =
|
|
5173
|
+
null == e2 && (e2 = ta.isColorSupported);
|
|
5096
5174
|
let n = (e3) => e3, r = (e3) => e3, i = (e3) => e3;
|
|
5097
5175
|
if (e2) {
|
|
5098
|
-
let { bold: e3, gray: a3, red: u3 } =
|
|
5099
|
-
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4),
|
|
5176
|
+
let { bold: e3, gray: a3, red: u3 } = ta.createColors(true);
|
|
5177
|
+
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4), na && (i = (e4) => na(e4));
|
|
5100
5178
|
}
|
|
5101
5179
|
let u2 = a2.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u2.length), b2 = String(w2).length;
|
|
5102
5180
|
return u2.slice(m2, w2).map((e3, a3) => {
|
|
@@ -5117,10 +5195,10 @@
|
|
|
5117
5195
|
return e2 && (e2 = "\n\n" + e2 + "\n"), this.name + ": " + this.message + e2;
|
|
5118
5196
|
}
|
|
5119
5197
|
};
|
|
5120
|
-
var
|
|
5121
|
-
|
|
5122
|
-
const
|
|
5123
|
-
let
|
|
5198
|
+
var oa = ra;
|
|
5199
|
+
ra.default = ra;
|
|
5200
|
+
const sa = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5201
|
+
let ia = class {
|
|
5124
5202
|
constructor(e2) {
|
|
5125
5203
|
this.builder = e2;
|
|
5126
5204
|
}
|
|
@@ -5172,7 +5250,7 @@
|
|
|
5172
5250
|
if (u2 || (u2 = a2), a2 && (m2 = e2.raws[a2], typeof m2 < "u")) return m2;
|
|
5173
5251
|
let w2 = e2.parent;
|
|
5174
5252
|
if ("before" === u2 && (!w2 || "root" === w2.type && w2.first === e2 || w2 && "document" === w2.type)) return "";
|
|
5175
|
-
if (!w2) return
|
|
5253
|
+
if (!w2) return sa[u2];
|
|
5176
5254
|
let b2 = e2.root();
|
|
5177
5255
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u2] < "u") return b2.rawCache[u2];
|
|
5178
5256
|
if ("before" === u2 || "after" === u2) return this.beforeAfter(e2, u2);
|
|
@@ -5184,7 +5262,7 @@
|
|
|
5184
5262
|
if (m2 = e3.raws[a2], typeof m2 < "u") return false;
|
|
5185
5263
|
});
|
|
5186
5264
|
}
|
|
5187
|
-
return typeof m2 > "u" && (m2 =
|
|
5265
|
+
return typeof m2 > "u" && (m2 = sa[u2]), b2.rawCache[u2] = m2, m2;
|
|
5188
5266
|
}
|
|
5189
5267
|
rawBeforeClose(e2) {
|
|
5190
5268
|
let a2;
|
|
@@ -5260,17 +5338,17 @@
|
|
|
5260
5338
|
this[e2.type](e2, a2);
|
|
5261
5339
|
}
|
|
5262
5340
|
};
|
|
5263
|
-
var
|
|
5264
|
-
|
|
5265
|
-
let
|
|
5341
|
+
var aa = ia;
|
|
5342
|
+
ia.default = ia;
|
|
5343
|
+
let la = aa;
|
|
5266
5344
|
function zs(e2, a2) {
|
|
5267
|
-
new
|
|
5345
|
+
new la(a2).stringify(e2);
|
|
5268
5346
|
}
|
|
5269
|
-
var
|
|
5347
|
+
var ca = zs;
|
|
5270
5348
|
zs.default = zs;
|
|
5271
|
-
var
|
|
5272
|
-
|
|
5273
|
-
let
|
|
5349
|
+
var ua = {};
|
|
5350
|
+
ua.isClean = Symbol("isClean"), ua.my = Symbol("my");
|
|
5351
|
+
let pa = oa, ha = aa, fa = ca, { isClean: ma, my: ga } = ua;
|
|
5274
5352
|
function Bs(e2, a2) {
|
|
5275
5353
|
let u2 = new e2.constructor();
|
|
5276
5354
|
for (let m2 in e2) {
|
|
@@ -5292,12 +5370,12 @@
|
|
|
5292
5370
|
}
|
|
5293
5371
|
return w2;
|
|
5294
5372
|
}
|
|
5295
|
-
let
|
|
5373
|
+
let ya = class {
|
|
5296
5374
|
get proxyOf() {
|
|
5297
5375
|
return this;
|
|
5298
5376
|
}
|
|
5299
5377
|
constructor(e2 = {}) {
|
|
5300
|
-
this.raws = {}, this[
|
|
5378
|
+
this.raws = {}, this[ma] = false, this[ga] = true;
|
|
5301
5379
|
for (let a2 in e2) if ("nodes" === a2) {
|
|
5302
5380
|
this.nodes = [];
|
|
5303
5381
|
for (let u2 of e2[a2]) "function" == typeof u2.clone ? this.append(u2.clone()) : this.append(u2);
|
|
@@ -5341,19 +5419,19 @@
|
|
|
5341
5419
|
let { end: u2, start: m2 } = this.rangeBy(a2);
|
|
5342
5420
|
return this.source.input.error(e2, { column: m2.column, line: m2.line }, { column: u2.column, line: u2.line }, a2);
|
|
5343
5421
|
}
|
|
5344
|
-
return new
|
|
5422
|
+
return new pa(e2);
|
|
5345
5423
|
}
|
|
5346
5424
|
getProxyProcessor() {
|
|
5347
5425
|
return { get: (e2, a2) => "proxyOf" === a2 ? e2 : "root" === a2 ? () => e2.root().toProxy() : e2[a2], set: (e2, a2, u2) => (e2[a2] === u2 || (e2[a2] = u2, ("prop" === a2 || "value" === a2 || "name" === a2 || "params" === a2 || "important" === a2 || "text" === a2) && e2.markDirty()), true) };
|
|
5348
5426
|
}
|
|
5349
5427
|
markClean() {
|
|
5350
|
-
this[
|
|
5428
|
+
this[ma] = true;
|
|
5351
5429
|
}
|
|
5352
5430
|
markDirty() {
|
|
5353
|
-
if (this[
|
|
5354
|
-
this[
|
|
5431
|
+
if (this[ma]) {
|
|
5432
|
+
this[ma] = false;
|
|
5355
5433
|
let e2 = this;
|
|
5356
|
-
for (; e2 = e2.parent; ) e2[
|
|
5434
|
+
for (; e2 = e2.parent; ) e2[ma] = false;
|
|
5357
5435
|
}
|
|
5358
5436
|
}
|
|
5359
5437
|
next() {
|
|
@@ -5389,7 +5467,7 @@
|
|
|
5389
5467
|
return (u2.line < a2.line || u2.line === a2.line && u2.column <= a2.column) && (u2 = { column: a2.column + 1, line: a2.line }), { end: u2, start: a2 };
|
|
5390
5468
|
}
|
|
5391
5469
|
raw(e2, a2) {
|
|
5392
|
-
return new
|
|
5470
|
+
return new ha().raw(this, e2, a2);
|
|
5393
5471
|
}
|
|
5394
5472
|
remove() {
|
|
5395
5473
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5426,7 +5504,7 @@
|
|
|
5426
5504
|
toProxy() {
|
|
5427
5505
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5428
5506
|
}
|
|
5429
|
-
toString(e2 =
|
|
5507
|
+
toString(e2 = fa) {
|
|
5430
5508
|
e2.stringify && (e2 = e2.stringify);
|
|
5431
5509
|
let a2 = "";
|
|
5432
5510
|
return e2(this, (e3) => {
|
|
@@ -5439,16 +5517,16 @@
|
|
|
5439
5517
|
return e2.warn(a2, m2);
|
|
5440
5518
|
}
|
|
5441
5519
|
};
|
|
5442
|
-
var
|
|
5443
|
-
|
|
5444
|
-
let
|
|
5520
|
+
var wa = ya;
|
|
5521
|
+
ya.default = ya;
|
|
5522
|
+
let ba = wa, Sa = class extends ba {
|
|
5445
5523
|
constructor(e2) {
|
|
5446
5524
|
super(e2), this.type = "comment";
|
|
5447
5525
|
}
|
|
5448
5526
|
};
|
|
5449
|
-
var
|
|
5450
|
-
|
|
5451
|
-
let
|
|
5527
|
+
var va = Sa;
|
|
5528
|
+
Sa.default = Sa;
|
|
5529
|
+
let Ca = wa, ka = class extends Ca {
|
|
5452
5530
|
get variable() {
|
|
5453
5531
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5454
5532
|
}
|
|
@@ -5456,16 +5534,16 @@
|
|
|
5456
5534
|
e2 && typeof e2.value < "u" && "string" != typeof e2.value && (e2 = { ...e2, value: String(e2.value) }), super(e2), this.type = "decl";
|
|
5457
5535
|
}
|
|
5458
5536
|
};
|
|
5459
|
-
var
|
|
5460
|
-
|
|
5461
|
-
let
|
|
5537
|
+
var xa = ka;
|
|
5538
|
+
ka.default = ka;
|
|
5539
|
+
let Ma, Ia, _a, Oa, Ea = va, La = xa, Ra = wa, { isClean: Aa, my: Ta } = ua;
|
|
5462
5540
|
function Wo(e2) {
|
|
5463
5541
|
return e2.map((e3) => (e3.nodes && (e3.nodes = Wo(e3.nodes)), delete e3.source, e3));
|
|
5464
5542
|
}
|
|
5465
5543
|
function zo(e2) {
|
|
5466
|
-
if (e2[
|
|
5544
|
+
if (e2[Aa] = false, e2.proxyOf.nodes) for (let a2 of e2.proxyOf.nodes) zo(a2);
|
|
5467
5545
|
}
|
|
5468
|
-
let
|
|
5546
|
+
let Na = class Bo extends Ra {
|
|
5469
5547
|
get first() {
|
|
5470
5548
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5471
5549
|
}
|
|
@@ -5517,7 +5595,7 @@
|
|
|
5517
5595
|
return this.markDirty(), this;
|
|
5518
5596
|
}
|
|
5519
5597
|
normalize(e2, a2) {
|
|
5520
|
-
if ("string" == typeof e2) e2 = Wo(
|
|
5598
|
+
if ("string" == typeof e2) e2 = Wo(Ia(e2).nodes);
|
|
5521
5599
|
else if (typeof e2 > "u") e2 = [];
|
|
5522
5600
|
else if (Array.isArray(e2)) {
|
|
5523
5601
|
e2 = e2.slice(0);
|
|
@@ -5528,14 +5606,14 @@
|
|
|
5528
5606
|
} else if (e2.type) e2 = [e2];
|
|
5529
5607
|
else if (e2.prop) {
|
|
5530
5608
|
if (typeof e2.value > "u") throw new Error("Value field is missed in node creation");
|
|
5531
|
-
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new
|
|
5532
|
-
} else if (e2.selector || e2.selectors) e2 = [new
|
|
5533
|
-
else if (e2.name) e2 = [new
|
|
5609
|
+
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new La(e2)];
|
|
5610
|
+
} else if (e2.selector || e2.selectors) e2 = [new Oa(e2)];
|
|
5611
|
+
else if (e2.name) e2 = [new Ma(e2)];
|
|
5534
5612
|
else {
|
|
5535
5613
|
if (!e2.text) throw new Error("Unknown node type in node creation");
|
|
5536
|
-
e2 = [new
|
|
5614
|
+
e2 = [new Ea(e2)];
|
|
5537
5615
|
}
|
|
5538
|
-
return e2.map((e3) => (e3[
|
|
5616
|
+
return e2.map((e3) => (e3[Ta] || Bo.rebuild(e3), (e3 = e3.proxyOf).parent && e3.parent.removeChild(e3), e3[Aa] && zo(e3), e3.raws || (e3.raws = {}), typeof e3.raws.before > "u" && a2 && typeof a2.raws.before < "u" && (e3.raws.before = a2.raws.before.replace(/\S/g, "")), e3.parent = this.proxyOf, e3));
|
|
5539
5617
|
}
|
|
5540
5618
|
prepend(...e2) {
|
|
5541
5619
|
e2 = e2.reverse();
|
|
@@ -5611,22 +5689,22 @@
|
|
|
5611
5689
|
}));
|
|
5612
5690
|
}
|
|
5613
5691
|
};
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
},
|
|
5617
|
-
|
|
5618
|
-
},
|
|
5619
|
-
|
|
5620
|
-
},
|
|
5621
|
-
|
|
5692
|
+
Na.registerParse = (e2) => {
|
|
5693
|
+
Ia = e2;
|
|
5694
|
+
}, Na.registerRule = (e2) => {
|
|
5695
|
+
Oa = e2;
|
|
5696
|
+
}, Na.registerAtRule = (e2) => {
|
|
5697
|
+
Ma = e2;
|
|
5698
|
+
}, Na.registerRoot = (e2) => {
|
|
5699
|
+
_a = e2;
|
|
5622
5700
|
};
|
|
5623
|
-
var
|
|
5624
|
-
|
|
5625
|
-
"atrule" === e2.type ? Object.setPrototypeOf(e2,
|
|
5626
|
-
|
|
5701
|
+
var Pa = Na;
|
|
5702
|
+
Na.default = Na, Na.rebuild = (e2) => {
|
|
5703
|
+
"atrule" === e2.type ? Object.setPrototypeOf(e2, Ma.prototype) : "rule" === e2.type ? Object.setPrototypeOf(e2, Oa.prototype) : "decl" === e2.type ? Object.setPrototypeOf(e2, La.prototype) : "comment" === e2.type ? Object.setPrototypeOf(e2, Ea.prototype) : "root" === e2.type && Object.setPrototypeOf(e2, _a.prototype), e2[Ta] = true, e2.nodes && e2.nodes.forEach((e3) => {
|
|
5704
|
+
Na.rebuild(e3);
|
|
5627
5705
|
});
|
|
5628
5706
|
};
|
|
5629
|
-
let
|
|
5707
|
+
let Da = Pa, Fa = class extends Da {
|
|
5630
5708
|
constructor(e2) {
|
|
5631
5709
|
super(e2), this.type = "atrule";
|
|
5632
5710
|
}
|
|
@@ -5637,38 +5715,38 @@
|
|
|
5637
5715
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e2);
|
|
5638
5716
|
}
|
|
5639
5717
|
};
|
|
5640
|
-
var
|
|
5641
|
-
|
|
5642
|
-
let
|
|
5718
|
+
var Ua = Fa;
|
|
5719
|
+
Fa.default = Fa, Da.registerAtRule(Fa);
|
|
5720
|
+
let Ba, $a, Wa = Pa, za = class extends Wa {
|
|
5643
5721
|
constructor(e2) {
|
|
5644
5722
|
super({ type: "document", ...e2 }), this.nodes || (this.nodes = []);
|
|
5645
5723
|
}
|
|
5646
5724
|
toResult(e2 = {}) {
|
|
5647
|
-
return new
|
|
5725
|
+
return new Ba(new $a(), this, e2).stringify();
|
|
5648
5726
|
}
|
|
5649
5727
|
};
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
},
|
|
5653
|
-
|
|
5728
|
+
za.registerLazyResult = (e2) => {
|
|
5729
|
+
Ba = e2;
|
|
5730
|
+
}, za.registerProcessor = (e2) => {
|
|
5731
|
+
$a = e2;
|
|
5654
5732
|
};
|
|
5655
|
-
var
|
|
5656
|
-
|
|
5657
|
-
var
|
|
5733
|
+
var ja = za;
|
|
5734
|
+
za.default = za;
|
|
5735
|
+
var Ga = { nanoid: (e2 = 21) => {
|
|
5658
5736
|
let a2 = "", u2 = 0 | e2;
|
|
5659
5737
|
for (; u2--; ) a2 += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5660
5738
|
return a2;
|
|
5661
5739
|
} };
|
|
5662
|
-
let { existsSync:
|
|
5663
|
-
let
|
|
5740
|
+
let { existsSync: Va, readFileSync: qa } = ea, { dirname: Za, join: Ka } = ea, { SourceMapConsumer: Ja, SourceMapGenerator: Ya } = ea;
|
|
5741
|
+
let Qa = class {
|
|
5664
5742
|
constructor(e2, a2) {
|
|
5665
5743
|
if (false === a2.map) return;
|
|
5666
5744
|
this.loadAnnotation(e2), this.inline = this.startWith(this.annotation, "data:");
|
|
5667
5745
|
let u2 = a2.map ? a2.map.prev : void 0, m2 = this.loadMap(a2.from, u2);
|
|
5668
|
-
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root =
|
|
5746
|
+
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root = Za(this.mapFile)), m2 && (this.text = m2);
|
|
5669
5747
|
}
|
|
5670
5748
|
consumer() {
|
|
5671
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5749
|
+
return this.consumerCache || (this.consumerCache = new Ja(this.text)), this.consumerCache;
|
|
5672
5750
|
}
|
|
5673
5751
|
decodeInline(e2) {
|
|
5674
5752
|
let a2 = e2.match(/^data:application\/json;charset=utf-?8,/) || e2.match(/^data:application\/json,/);
|
|
@@ -5693,15 +5771,15 @@
|
|
|
5693
5771
|
u2 > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e2.substring(u2, m2)));
|
|
5694
5772
|
}
|
|
5695
5773
|
loadFile(e2) {
|
|
5696
|
-
if (this.root =
|
|
5774
|
+
if (this.root = Za(e2), Va(e2)) return this.mapFile = e2, qa(e2, "utf-8").toString().trim();
|
|
5697
5775
|
}
|
|
5698
5776
|
loadMap(e2, a2) {
|
|
5699
5777
|
if (false === a2) return false;
|
|
5700
5778
|
if (a2) {
|
|
5701
5779
|
if ("string" == typeof a2) return a2;
|
|
5702
5780
|
if ("function" != typeof a2) {
|
|
5703
|
-
if (a2 instanceof
|
|
5704
|
-
if (a2 instanceof
|
|
5781
|
+
if (a2 instanceof Ja) return Ya.fromSourceMap(a2).toString();
|
|
5782
|
+
if (a2 instanceof Ya) return a2.toString();
|
|
5705
5783
|
if (this.isMap(a2)) return JSON.stringify(a2);
|
|
5706
5784
|
throw new Error("Unsupported previous source map format: " + a2.toString());
|
|
5707
5785
|
}
|
|
@@ -5717,7 +5795,7 @@
|
|
|
5717
5795
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5718
5796
|
if (this.annotation) {
|
|
5719
5797
|
let a3 = this.annotation;
|
|
5720
|
-
return e2 && (a3 =
|
|
5798
|
+
return e2 && (a3 = Ka(Za(e2), a3)), this.loadFile(a3);
|
|
5721
5799
|
}
|
|
5722
5800
|
}
|
|
5723
5801
|
}
|
|
@@ -5728,23 +5806,23 @@
|
|
|
5728
5806
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5729
5807
|
}
|
|
5730
5808
|
};
|
|
5731
|
-
var
|
|
5732
|
-
|
|
5733
|
-
let { nanoid:
|
|
5809
|
+
var el = Qa;
|
|
5810
|
+
Qa.default = Qa;
|
|
5811
|
+
let { nanoid: tl } = Ga, { isAbsolute: nl, resolve: rl } = ea, { SourceMapConsumer: ol, SourceMapGenerator: sl } = ea, { fileURLToPath: il, pathToFileURL: al } = ea, ll = oa, cl = el, ul = ea, pl = Symbol("fromOffsetCache"), dl = !(!ol || !sl), hl = !(!rl || !nl), fl = class {
|
|
5734
5812
|
get from() {
|
|
5735
5813
|
return this.file || this.id;
|
|
5736
5814
|
}
|
|
5737
5815
|
constructor(e2, a2 = {}) {
|
|
5738
5816
|
if (null === e2 || typeof e2 > "u" || "object" == typeof e2 && !e2.toString) throw new Error(`PostCSS received ${e2} instead of CSS string`);
|
|
5739
|
-
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!
|
|
5740
|
-
let e3 = new
|
|
5817
|
+
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!hl || /^\w+:\/\//.test(a2.from) || nl(a2.from) ? this.file = a2.from : this.file = rl(a2.from)), hl && dl) {
|
|
5818
|
+
let e3 = new cl(this.css, a2);
|
|
5741
5819
|
if (e3.text) {
|
|
5742
5820
|
this.map = e3;
|
|
5743
5821
|
let a3 = e3.consumer().file;
|
|
5744
5822
|
!this.file && a3 && (this.file = this.mapResolve(a3));
|
|
5745
5823
|
}
|
|
5746
5824
|
}
|
|
5747
|
-
this.file || (this.id = "<input css " +
|
|
5825
|
+
this.file || (this.id = "<input css " + tl(6) + ">"), this.map && (this.map.file = this.from);
|
|
5748
5826
|
}
|
|
5749
5827
|
error(e2, a2, u2, m2 = {}) {
|
|
5750
5828
|
let w2, b2, C2;
|
|
@@ -5763,17 +5841,17 @@
|
|
|
5763
5841
|
a2 = e3.line, u2 = e3.col;
|
|
5764
5842
|
}
|
|
5765
5843
|
let x2 = this.origin(a2, u2, b2, w2);
|
|
5766
|
-
return C2 = x2 ? new
|
|
5844
|
+
return C2 = x2 ? new ll(e2, 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 ll(e2, void 0 === b2 ? a2 : { column: u2, line: a2 }, void 0 === b2 ? u2 : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u2, endColumn: w2, endLine: b2, line: a2, source: this.css }, this.file && (al && (C2.input.url = al(this.file).toString()), C2.input.file = this.file), C2;
|
|
5767
5845
|
}
|
|
5768
5846
|
fromOffset(e2) {
|
|
5769
5847
|
let a2, u2;
|
|
5770
|
-
if (this[
|
|
5848
|
+
if (this[pl]) u2 = this[pl];
|
|
5771
5849
|
else {
|
|
5772
5850
|
let e3 = this.css.split("\n");
|
|
5773
5851
|
u2 = new Array(e3.length);
|
|
5774
5852
|
let a3 = 0;
|
|
5775
5853
|
for (let m3 = 0, w2 = e3.length; m3 < w2; m3++) u2[m3] = a3, a3 += e3[m3].length + 1;
|
|
5776
|
-
this[
|
|
5854
|
+
this[pl] = u2;
|
|
5777
5855
|
}
|
|
5778
5856
|
a2 = u2[u2.length - 1];
|
|
5779
5857
|
let m2 = 0;
|
|
@@ -5792,17 +5870,17 @@
|
|
|
5792
5870
|
return { col: e2 - u2[m2] + 1, line: m2 + 1 };
|
|
5793
5871
|
}
|
|
5794
5872
|
mapResolve(e2) {
|
|
5795
|
-
return /^\w+:\/\//.test(e2) ? e2 :
|
|
5873
|
+
return /^\w+:\/\//.test(e2) ? e2 : rl(this.map.consumer().sourceRoot || this.map.root || ".", e2);
|
|
5796
5874
|
}
|
|
5797
5875
|
origin(e2, a2, u2, m2) {
|
|
5798
5876
|
if (!this.map) return false;
|
|
5799
5877
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a2, line: e2 });
|
|
5800
5878
|
if (!x2.source) return false;
|
|
5801
|
-
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 =
|
|
5879
|
+
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 = nl(x2.source) ? al(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || al(this.map.mapFile));
|
|
5802
5880
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5803
5881
|
if ("file:" === b2.protocol) {
|
|
5804
|
-
if (!
|
|
5805
|
-
I2.file =
|
|
5882
|
+
if (!il) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5883
|
+
I2.file = il(b2);
|
|
5806
5884
|
}
|
|
5807
5885
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5808
5886
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5813,9 +5891,9 @@
|
|
|
5813
5891
|
return this.map && (e2.map = { ...this.map }, e2.map.consumerCache && (e2.map.consumerCache = void 0)), e2;
|
|
5814
5892
|
}
|
|
5815
5893
|
};
|
|
5816
|
-
var
|
|
5817
|
-
|
|
5818
|
-
let
|
|
5894
|
+
var ml = fl;
|
|
5895
|
+
fl.default = fl, ul && ul.registerInput && ul.registerInput(fl);
|
|
5896
|
+
let gl, yl, wl = Pa, bl = class extends wl {
|
|
5819
5897
|
constructor(e2) {
|
|
5820
5898
|
super(e2), this.type = "root", this.nodes || (this.nodes = []);
|
|
5821
5899
|
}
|
|
@@ -5832,29 +5910,29 @@
|
|
|
5832
5910
|
return !a2 && 0 === u2 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u2].raws.before), super.removeChild(e2);
|
|
5833
5911
|
}
|
|
5834
5912
|
toResult(e2 = {}) {
|
|
5835
|
-
return new
|
|
5913
|
+
return new gl(new yl(), this, e2).stringify();
|
|
5836
5914
|
}
|
|
5837
5915
|
};
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
},
|
|
5841
|
-
|
|
5916
|
+
bl.registerLazyResult = (e2) => {
|
|
5917
|
+
gl = e2;
|
|
5918
|
+
}, bl.registerProcessor = (e2) => {
|
|
5919
|
+
yl = e2;
|
|
5842
5920
|
};
|
|
5843
|
-
var
|
|
5844
|
-
|
|
5845
|
-
let
|
|
5921
|
+
var Sl = bl;
|
|
5922
|
+
bl.default = bl, wl.registerRoot(bl);
|
|
5923
|
+
let vl = { comma: (e2) => vl.split(e2, [","], true), space(e2) {
|
|
5846
5924
|
let a2 = [" ", "\n", " "];
|
|
5847
|
-
return
|
|
5925
|
+
return vl.split(e2, a2);
|
|
5848
5926
|
}, split(e2, a2, u2) {
|
|
5849
5927
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5850
5928
|
for (let u3 of e2) _2 ? _2 = false : "\\" === u3 ? _2 = true : x2 ? u3 === I2 && (x2 = false) : '"' === u3 || "'" === u3 ? (x2 = true, I2 = u3) : "(" === u3 ? C2 += 1 : ")" === u3 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a2.includes(u3) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u3;
|
|
5851
5929
|
return (u2 || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5852
5930
|
} };
|
|
5853
|
-
var
|
|
5854
|
-
|
|
5855
|
-
let
|
|
5931
|
+
var Cl = vl;
|
|
5932
|
+
vl.default = vl;
|
|
5933
|
+
let kl = Pa, xl = Cl, Ml = class extends kl {
|
|
5856
5934
|
get selectors() {
|
|
5857
|
-
return
|
|
5935
|
+
return xl.comma(this.selector);
|
|
5858
5936
|
}
|
|
5859
5937
|
set selectors(e2) {
|
|
5860
5938
|
let a2 = this.selector ? this.selector.match(/,\s*/) : null, u2 = a2 ? a2[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5864,34 +5942,34 @@
|
|
|
5864
5942
|
super(e2), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5865
5943
|
}
|
|
5866
5944
|
};
|
|
5867
|
-
var
|
|
5868
|
-
|
|
5869
|
-
let
|
|
5945
|
+
var Il = Ml;
|
|
5946
|
+
Ml.default = Ml, kl.registerRule(Ml);
|
|
5947
|
+
let Ol = Ua, El = va, Ll = xa, Rl = ml, Al = el, Tl = Sl, Nl = Il;
|
|
5870
5948
|
function Ke(e2, a2) {
|
|
5871
5949
|
if (Array.isArray(e2)) return e2.map((e3) => Ke(e3));
|
|
5872
5950
|
let { inputs: u2, ...m2 } = e2;
|
|
5873
5951
|
if (u2) {
|
|
5874
5952
|
a2 = [];
|
|
5875
5953
|
for (let e3 of u2) {
|
|
5876
|
-
let u3 = { ...e3, __proto__:
|
|
5877
|
-
u3.map && (u3.map = { ...u3.map, __proto__:
|
|
5954
|
+
let u3 = { ...e3, __proto__: Rl.prototype };
|
|
5955
|
+
u3.map && (u3.map = { ...u3.map, __proto__: Al.prototype }), a2.push(u3);
|
|
5878
5956
|
}
|
|
5879
5957
|
}
|
|
5880
5958
|
if (m2.nodes && (m2.nodes = e2.nodes.map((e3) => Ke(e3, a2))), m2.source) {
|
|
5881
5959
|
let { inputId: e3, ...u3 } = m2.source;
|
|
5882
5960
|
m2.source = u3, null != e3 && (m2.source.input = a2[e3]);
|
|
5883
5961
|
}
|
|
5884
|
-
if ("root" === m2.type) return new
|
|
5885
|
-
if ("decl" === m2.type) return new
|
|
5886
|
-
if ("rule" === m2.type) return new
|
|
5887
|
-
if ("comment" === m2.type) return new
|
|
5888
|
-
if ("atrule" === m2.type) return new
|
|
5962
|
+
if ("root" === m2.type) return new Tl(m2);
|
|
5963
|
+
if ("decl" === m2.type) return new Ll(m2);
|
|
5964
|
+
if ("rule" === m2.type) return new Nl(m2);
|
|
5965
|
+
if ("comment" === m2.type) return new El(m2);
|
|
5966
|
+
if ("atrule" === m2.type) return new Ol(m2);
|
|
5889
5967
|
throw new Error("Unknown node type: " + e2.type);
|
|
5890
5968
|
}
|
|
5891
|
-
var
|
|
5969
|
+
var Pl = Ke;
|
|
5892
5970
|
Ke.default = Ke;
|
|
5893
|
-
let { dirname:
|
|
5894
|
-
var
|
|
5971
|
+
let { dirname: Dl, relative: Jl, resolve: ec, sep: tc } = ea, { SourceMapConsumer: nc, SourceMapGenerator: rc } = ea, { pathToFileURL: oc } = ea, sc = ml, ic = !(!nc || !rc), ac = !!(Dl && ec && Jl && tc);
|
|
5972
|
+
var lc = class {
|
|
5895
5973
|
constructor(e2, a2, u2, m2) {
|
|
5896
5974
|
this.stringify = e2, this.mapOpts = u2.map || {}, this.root = a2, this.opts = u2, 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();
|
|
5897
5975
|
}
|
|
@@ -5903,8 +5981,8 @@
|
|
|
5903
5981
|
}
|
|
5904
5982
|
applyPrevMaps() {
|
|
5905
5983
|
for (let e2 of this.previous()) {
|
|
5906
|
-
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root ||
|
|
5907
|
-
false === this.mapOpts.sourcesContent ? (a2 = new
|
|
5984
|
+
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root || Dl(e2.file);
|
|
5985
|
+
false === this.mapOpts.sourcesContent ? (a2 = new nc(e2.text), a2.sourcesContent && (a2.sourcesContent = null)) : a2 = e2.consumer(), this.map.applySourceMap(a2, u2, this.toUrl(this.path(m2)));
|
|
5908
5986
|
}
|
|
5909
5987
|
}
|
|
5910
5988
|
clearAnnotation() {
|
|
@@ -5914,7 +5992,7 @@
|
|
|
5914
5992
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
5915
5993
|
}
|
|
5916
5994
|
generate() {
|
|
5917
|
-
if (this.clearAnnotation(),
|
|
5995
|
+
if (this.clearAnnotation(), ac && ic && this.isMap()) return this.generateMap();
|
|
5918
5996
|
{
|
|
5919
5997
|
let e2 = "";
|
|
5920
5998
|
return this.stringify(this.root, (a2) => {
|
|
@@ -5926,12 +6004,12 @@
|
|
|
5926
6004
|
if (this.root) this.generateString();
|
|
5927
6005
|
else if (1 === this.previous().length) {
|
|
5928
6006
|
let e2 = this.previous()[0].consumer();
|
|
5929
|
-
e2.file = this.outputFile(), this.map =
|
|
5930
|
-
} else this.map = new
|
|
6007
|
+
e2.file = this.outputFile(), this.map = rc.fromSourceMap(e2, { ignoreInvalidMapping: true });
|
|
6008
|
+
} else this.map = new rc({ 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>" });
|
|
5931
6009
|
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];
|
|
5932
6010
|
}
|
|
5933
6011
|
generateString() {
|
|
5934
|
-
this.css = "", this.map = new
|
|
6012
|
+
this.css = "", this.map = new rc({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
5935
6013
|
let e2, a2, u2 = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
5936
6014
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
5937
6015
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u2, 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))), a2 = C2.match(/\n/g), a2 ? (u2 += a2.length, e2 = C2.lastIndexOf("\n"), m2 = C2.length - e2) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -5961,9 +6039,9 @@
|
|
|
5961
6039
|
if (this.mapOpts.absolute || 60 === e2.charCodeAt(0) || /^\w+:\/\//.test(e2)) return e2;
|
|
5962
6040
|
let a2 = this.memoizedPaths.get(e2);
|
|
5963
6041
|
if (a2) return a2;
|
|
5964
|
-
let u2 = this.opts.to ?
|
|
5965
|
-
"string" == typeof this.mapOpts.annotation && (u2 =
|
|
5966
|
-
let m2 =
|
|
6042
|
+
let u2 = this.opts.to ? Dl(this.opts.to) : ".";
|
|
6043
|
+
"string" == typeof this.mapOpts.annotation && (u2 = Dl(ec(u2, this.mapOpts.annotation)));
|
|
6044
|
+
let m2 = Jl(u2, e2);
|
|
5967
6045
|
return this.memoizedPaths.set(e2, m2), m2;
|
|
5968
6046
|
}
|
|
5969
6047
|
previous() {
|
|
@@ -5974,7 +6052,7 @@
|
|
|
5974
6052
|
}
|
|
5975
6053
|
});
|
|
5976
6054
|
else {
|
|
5977
|
-
let e2 = new
|
|
6055
|
+
let e2 = new sc(this.originalCSS, this.opts);
|
|
5978
6056
|
e2.map && this.previousMaps.push(e2.map);
|
|
5979
6057
|
}
|
|
5980
6058
|
return this.previousMaps;
|
|
@@ -6005,8 +6083,8 @@
|
|
|
6005
6083
|
toFileUrl(e2) {
|
|
6006
6084
|
let a2 = this.memoizedFileURLs.get(e2);
|
|
6007
6085
|
if (a2) return a2;
|
|
6008
|
-
if (
|
|
6009
|
-
let a3 =
|
|
6086
|
+
if (oc) {
|
|
6087
|
+
let a3 = oc(e2).toString();
|
|
6010
6088
|
return this.memoizedFileURLs.set(e2, a3), a3;
|
|
6011
6089
|
}
|
|
6012
6090
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6014,13 +6092,13 @@
|
|
|
6014
6092
|
toUrl(e2) {
|
|
6015
6093
|
let a2 = this.memoizedURLs.get(e2);
|
|
6016
6094
|
if (a2) return a2;
|
|
6017
|
-
"\\" ===
|
|
6095
|
+
"\\" === tc && (e2 = e2.replace(/\\/g, "/"));
|
|
6018
6096
|
let u2 = encodeURI(e2).replace(/[#?]/g, encodeURIComponent);
|
|
6019
6097
|
return this.memoizedURLs.set(e2, u2), u2;
|
|
6020
6098
|
}
|
|
6021
6099
|
};
|
|
6022
|
-
const
|
|
6023
|
-
let
|
|
6100
|
+
const cc = /[\t\n\f\r "#'()/;[\\\]{}]/g, uc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, pc = /.[\r\n"'(/\\]/, dc = /[\da-f]/i;
|
|
6101
|
+
let hc = Ua, fc = va, mc = xa, gc = Sl, yc = Il, kc = function(e2, a2 = {}) {
|
|
6024
6102
|
let u2, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e2.css.valueOf(), F2 = a2.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
6025
6103
|
function y2(a3) {
|
|
6026
6104
|
throw e2.error("Unclosed " + a3, B2);
|
|
@@ -6070,7 +6148,7 @@
|
|
|
6070
6148
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6071
6149
|
} while (I2);
|
|
6072
6150
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6073
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6151
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || pc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6074
6152
|
break;
|
|
6075
6153
|
case 39:
|
|
6076
6154
|
case 34:
|
|
@@ -6088,31 +6166,31 @@
|
|
|
6088
6166
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6089
6167
|
break;
|
|
6090
6168
|
case 64:
|
|
6091
|
-
|
|
6169
|
+
cc.lastIndex = B2 + 1, cc.test(D2), b2 = 0 === cc.lastIndex ? D2.length - 1 : cc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6092
6170
|
break;
|
|
6093
6171
|
case 92:
|
|
6094
6172
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6095
|
-
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1,
|
|
6096
|
-
for (;
|
|
6173
|
+
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1, dc.test(D2.charAt(b2)))) {
|
|
6174
|
+
for (; dc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6097
6175
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6098
6176
|
}
|
|
6099
6177
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6100
6178
|
break;
|
|
6101
6179
|
default:
|
|
6102
|
-
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
6180
|
+
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (uc.lastIndex = B2 + 1, uc.test(D2), b2 = 0 === uc.lastIndex ? D2.length - 1 : uc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6103
6181
|
}
|
|
6104
6182
|
return B2++, x2;
|
|
6105
6183
|
}, position: function S() {
|
|
6106
6184
|
return B2;
|
|
6107
6185
|
} };
|
|
6108
6186
|
};
|
|
6109
|
-
const
|
|
6110
|
-
var
|
|
6187
|
+
const wc = { empty: true, space: true };
|
|
6188
|
+
var bc = class {
|
|
6111
6189
|
constructor(e2) {
|
|
6112
|
-
this.input = e2, this.root = new
|
|
6190
|
+
this.input = e2, this.root = new gc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e2, start: { column: 1, line: 1, offset: 0 } };
|
|
6113
6191
|
}
|
|
6114
6192
|
atrule(e2) {
|
|
6115
|
-
let a2 = new
|
|
6193
|
+
let a2 = new hc();
|
|
6116
6194
|
a2.name = e2[1].slice(1), "" === a2.name && this.unnamedAtrule(a2, e2), this.init(a2, e2[2]);
|
|
6117
6195
|
let u2, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6118
6196
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6164,7 +6242,7 @@
|
|
|
6164
6242
|
return false;
|
|
6165
6243
|
}
|
|
6166
6244
|
comment(e2) {
|
|
6167
|
-
let a2 = new
|
|
6245
|
+
let a2 = new fc();
|
|
6168
6246
|
this.init(a2, e2[2]), a2.source.end = this.getPosition(e2[3] || e2[2]), a2.source.end.offset++;
|
|
6169
6247
|
let u2 = e2[1].slice(2, -2);
|
|
6170
6248
|
if (/^\s*$/.test(u2)) a2.text = "", a2.raws.left = u2, a2.raws.right = "";
|
|
@@ -6177,7 +6255,7 @@
|
|
|
6177
6255
|
this.tokenizer = kc(this.input);
|
|
6178
6256
|
}
|
|
6179
6257
|
decl(e2, a2) {
|
|
6180
|
-
let u2 = new
|
|
6258
|
+
let u2 = new mc();
|
|
6181
6259
|
this.init(u2, e2[0][2]);
|
|
6182
6260
|
let m2, w2 = e2[e2.length - 1];
|
|
6183
6261
|
for (";" === w2[0] && (this.semicolon = true, e2.pop()), u2.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e3) {
|
|
@@ -6226,7 +6304,7 @@
|
|
|
6226
6304
|
throw this.input.error("Double colon", { offset: e2[2] }, { offset: e2[2] + e2[1].length });
|
|
6227
6305
|
}
|
|
6228
6306
|
emptyRule(e2) {
|
|
6229
|
-
let a2 = new
|
|
6307
|
+
let a2 = new yc();
|
|
6230
6308
|
this.init(a2, e2[2]), a2.selector = "", a2.raws.between = "", this.current = a2;
|
|
6231
6309
|
}
|
|
6232
6310
|
end(e2) {
|
|
@@ -6302,7 +6380,7 @@
|
|
|
6302
6380
|
}
|
|
6303
6381
|
raw(e2, a2, u2, m2) {
|
|
6304
6382
|
let w2, b2, C2, x2, I2 = u2.length, _2 = "", O2 = true;
|
|
6305
|
-
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty",
|
|
6383
|
+
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty", wc[x2] || wc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6306
6384
|
if (!O2) {
|
|
6307
6385
|
let m3 = u2.reduce((e3, a3) => e3 + a3[1], "");
|
|
6308
6386
|
e2.raws[a2] = { raw: m3, value: _2 };
|
|
@@ -6311,7 +6389,7 @@
|
|
|
6311
6389
|
}
|
|
6312
6390
|
rule(e2) {
|
|
6313
6391
|
e2.pop();
|
|
6314
|
-
let a2 = new
|
|
6392
|
+
let a2 = new yc();
|
|
6315
6393
|
this.init(a2, e2[0][2]), a2.raws.between = this.spacesAndCommentsFromEnd(e2), this.raw(a2, "selector", e2), this.current = a2;
|
|
6316
6394
|
}
|
|
6317
6395
|
spacesAndCommentsFromEnd(e2) {
|
|
@@ -6351,9 +6429,9 @@
|
|
|
6351
6429
|
throw this.input.error("At-rule without name", { offset: a2[2] }, { offset: a2[2] + a2[1].length });
|
|
6352
6430
|
}
|
|
6353
6431
|
};
|
|
6354
|
-
let
|
|
6432
|
+
let Sc = Pa, vc = ml, xc = bc;
|
|
6355
6433
|
function Gt(e2, a2) {
|
|
6356
|
-
let u2 = new
|
|
6434
|
+
let u2 = new vc(e2, a2), m2 = new xc(u2);
|
|
6357
6435
|
try {
|
|
6358
6436
|
m2.parse();
|
|
6359
6437
|
} catch (e3) {
|
|
@@ -6361,9 +6439,9 @@
|
|
|
6361
6439
|
}
|
|
6362
6440
|
return m2.root;
|
|
6363
6441
|
}
|
|
6364
|
-
var
|
|
6365
|
-
Gt.default = Gt,
|
|
6366
|
-
let
|
|
6442
|
+
var Mc = Gt;
|
|
6443
|
+
Gt.default = Gt, Sc.registerParse(Gt);
|
|
6444
|
+
let Ic = class {
|
|
6367
6445
|
constructor(e2, a2 = {}) {
|
|
6368
6446
|
if (this.type = "warning", this.text = e2, a2.node && a2.node.source) {
|
|
6369
6447
|
let e3 = a2.node.rangeBy(a2);
|
|
@@ -6375,9 +6453,9 @@
|
|
|
6375
6453
|
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;
|
|
6376
6454
|
}
|
|
6377
6455
|
};
|
|
6378
|
-
var
|
|
6379
|
-
|
|
6380
|
-
let
|
|
6456
|
+
var _c = Ic;
|
|
6457
|
+
Ic.default = Ic;
|
|
6458
|
+
let Oc = _c, Ec = class {
|
|
6381
6459
|
get content() {
|
|
6382
6460
|
return this.css;
|
|
6383
6461
|
}
|
|
@@ -6389,26 +6467,26 @@
|
|
|
6389
6467
|
}
|
|
6390
6468
|
warn(e2, a2 = {}) {
|
|
6391
6469
|
a2.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a2.plugin = this.lastPlugin.postcssPlugin);
|
|
6392
|
-
let u2 = new
|
|
6470
|
+
let u2 = new Oc(e2, a2);
|
|
6393
6471
|
return this.messages.push(u2), u2;
|
|
6394
6472
|
}
|
|
6395
6473
|
warnings() {
|
|
6396
6474
|
return this.messages.filter((e2) => "warning" === e2.type);
|
|
6397
6475
|
}
|
|
6398
6476
|
};
|
|
6399
|
-
var
|
|
6400
|
-
|
|
6401
|
-
let
|
|
6477
|
+
var Lc = Ec;
|
|
6478
|
+
Ec.default = Ec;
|
|
6479
|
+
let Rc = {};
|
|
6402
6480
|
var ni = function(e2) {
|
|
6403
|
-
|
|
6481
|
+
Rc[e2] || (Rc[e2] = true, typeof console < "u" && console.warn && console.warn(e2));
|
|
6404
6482
|
};
|
|
6405
|
-
let
|
|
6406
|
-
const
|
|
6483
|
+
let Ac = Pa, Tc = ja, Nc = lc, Pc = Mc, Dc = Lc, Fc = Sl, Uc = ca, { isClean: Bc, my: $c } = ua, Wc = ni;
|
|
6484
|
+
const zc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, jc = { 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 }, Gc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6407
6485
|
function _e(e2) {
|
|
6408
6486
|
return "object" == typeof e2 && "function" == typeof e2.then;
|
|
6409
6487
|
}
|
|
6410
6488
|
function ri(e2) {
|
|
6411
|
-
let a2 = false, u2 =
|
|
6489
|
+
let a2 = false, u2 = zc[e2.type];
|
|
6412
6490
|
return "decl" === e2.type ? a2 = e2.prop.toLowerCase() : "atrule" === e2.type && (a2 = e2.name.toLowerCase()), a2 && e2.append ? [u2, u2 + "-" + a2, 0, u2 + "Exit", u2 + "Exit-" + a2] : a2 ? [u2, u2 + "-" + a2, u2 + "Exit", u2 + "Exit-" + a2] : e2.append ? [u2, 0, u2 + "Exit"] : [u2, u2 + "Exit"];
|
|
6413
6491
|
}
|
|
6414
6492
|
function br(e2) {
|
|
@@ -6416,9 +6494,9 @@
|
|
|
6416
6494
|
return a2 = "document" === e2.type ? ["Document", 0, "DocumentExit"] : "root" === e2.type ? ["Root", 0, "RootExit"] : ri(e2), { eventIndex: 0, events: a2, iterator: 0, node: e2, visitorIndex: 0, visitors: [] };
|
|
6417
6495
|
}
|
|
6418
6496
|
function Js(e2) {
|
|
6419
|
-
return e2[
|
|
6497
|
+
return e2[Bc] = false, e2.nodes && e2.nodes.forEach((e3) => Js(e3)), e2;
|
|
6420
6498
|
}
|
|
6421
|
-
let
|
|
6499
|
+
let Vc = {}, qc = class oi {
|
|
6422
6500
|
get content() {
|
|
6423
6501
|
return this.stringify().content;
|
|
6424
6502
|
}
|
|
@@ -6445,19 +6523,19 @@
|
|
|
6445
6523
|
}
|
|
6446
6524
|
constructor(e2, a2, u2) {
|
|
6447
6525
|
let m2;
|
|
6448
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof oi || a2 instanceof
|
|
6526
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof oi || a2 instanceof Dc) m2 = Js(a2.root), a2.map && (typeof u2.map > "u" && (u2.map = {}), u2.map.inline || (u2.map.inline = false), u2.map.prev = a2.map);
|
|
6449
6527
|
else {
|
|
6450
|
-
let e3 =
|
|
6528
|
+
let e3 = Pc;
|
|
6451
6529
|
u2.syntax && (e3 = u2.syntax.parse), u2.parser && (e3 = u2.parser), e3.parse && (e3 = e3.parse);
|
|
6452
6530
|
try {
|
|
6453
6531
|
m2 = e3(a2, u2);
|
|
6454
6532
|
} catch (e4) {
|
|
6455
6533
|
this.processed = true, this.error = e4;
|
|
6456
6534
|
}
|
|
6457
|
-
m2 && !m2[
|
|
6535
|
+
m2 && !m2[$c] && Ac.rebuild(m2);
|
|
6458
6536
|
}
|
|
6459
6537
|
else m2 = Js(a2);
|
|
6460
|
-
this.result = new
|
|
6538
|
+
this.result = new Dc(e2, m2, u2), this.helpers = { ...Vc, postcss: Vc, result: this.result }, this.plugins = this.processor.plugins.map((e3) => "object" == typeof e3 && e3.prepare ? { ...e3, ...e3.prepare(this.result) } : e3);
|
|
6461
6539
|
}
|
|
6462
6540
|
async() {
|
|
6463
6541
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6491,8 +6569,8 @@
|
|
|
6491
6569
|
this.listeners[a2] || (this.listeners[a2] = []), this.listeners[a2].push([e2, u2]);
|
|
6492
6570
|
};
|
|
6493
6571
|
for (let e2 of this.plugins) if ("object" == typeof e2) for (let a2 in e2) {
|
|
6494
|
-
if (!
|
|
6495
|
-
if (!
|
|
6572
|
+
if (!jc[a2] && /^[A-Z]/.test(a2)) throw new Error(`Unknown event ${a2} in ${e2.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6573
|
+
if (!Gc[a2]) if ("object" == typeof e2[a2]) for (let u2 in e2[a2]) t(e2, "*" === u2 ? a2 : a2 + "-" + u2.toLowerCase(), e2[a2][u2]);
|
|
6496
6574
|
else "function" == typeof e2[a2] && t(e2, a2, e2[a2]);
|
|
6497
6575
|
}
|
|
6498
6576
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6509,8 +6587,8 @@
|
|
|
6509
6587
|
}
|
|
6510
6588
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6511
6589
|
let e2 = this.result.root;
|
|
6512
|
-
for (; !e2[
|
|
6513
|
-
e2[
|
|
6590
|
+
for (; !e2[Bc]; ) {
|
|
6591
|
+
e2[Bc] = true;
|
|
6514
6592
|
let a2 = [br(e2)];
|
|
6515
6593
|
for (; a2.length > 0; ) {
|
|
6516
6594
|
let e3 = this.visitTick(a2);
|
|
@@ -6555,9 +6633,9 @@
|
|
|
6555
6633
|
if (this.error) throw this.error;
|
|
6556
6634
|
if (this.stringified) return this.result;
|
|
6557
6635
|
this.stringified = true, this.sync();
|
|
6558
|
-
let e2 = this.result.opts, a2 =
|
|
6636
|
+
let e2 = this.result.opts, a2 = Uc;
|
|
6559
6637
|
e2.syntax && (a2 = e2.syntax.stringify), e2.stringifier && (a2 = e2.stringifier), a2.stringify && (a2 = a2.stringify);
|
|
6560
|
-
let u2 = new
|
|
6638
|
+
let u2 = new Nc(a2, this.result.root, this.result.opts).generate();
|
|
6561
6639
|
return this.result.css = u2[0], this.result.map = u2[1], this.result;
|
|
6562
6640
|
}
|
|
6563
6641
|
sync() {
|
|
@@ -6569,14 +6647,14 @@
|
|
|
6569
6647
|
}
|
|
6570
6648
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6571
6649
|
let e2 = this.result.root;
|
|
6572
|
-
for (; !e2[
|
|
6650
|
+
for (; !e2[Bc]; ) e2[Bc] = true, this.walkSync(e2);
|
|
6573
6651
|
if (this.listeners.OnceExit) if ("document" === e2.type) for (let a2 of e2.nodes) this.visitSync(this.listeners.OnceExit, a2);
|
|
6574
6652
|
else this.visitSync(this.listeners.OnceExit, e2);
|
|
6575
6653
|
}
|
|
6576
6654
|
return this.result;
|
|
6577
6655
|
}
|
|
6578
6656
|
then(e2, a2) {
|
|
6579
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6657
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Wc("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(e2, a2);
|
|
6580
6658
|
}
|
|
6581
6659
|
toString() {
|
|
6582
6660
|
return this.css;
|
|
@@ -6608,22 +6686,22 @@
|
|
|
6608
6686
|
}
|
|
6609
6687
|
if (0 !== a2.iterator) {
|
|
6610
6688
|
let m3, w3 = a2.iterator;
|
|
6611
|
-
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[
|
|
6689
|
+
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[Bc]) return m3[Bc] = true, void e2.push(br(m3));
|
|
6612
6690
|
a2.iterator = 0, delete u2.indexes[w3];
|
|
6613
6691
|
}
|
|
6614
6692
|
let w2 = a2.events;
|
|
6615
6693
|
for (; a2.eventIndex < w2.length; ) {
|
|
6616
6694
|
let e3 = w2[a2.eventIndex];
|
|
6617
|
-
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[
|
|
6695
|
+
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[Bc] = true, a2.iterator = u2.getIterator()));
|
|
6618
6696
|
if (this.listeners[e3]) return void (a2.visitors = this.listeners[e3]);
|
|
6619
6697
|
}
|
|
6620
6698
|
e2.pop();
|
|
6621
6699
|
}
|
|
6622
6700
|
walkSync(e2) {
|
|
6623
|
-
e2[
|
|
6701
|
+
e2[Bc] = true;
|
|
6624
6702
|
let a2 = ri(e2);
|
|
6625
6703
|
for (let u2 of a2) if (0 === u2) e2.nodes && e2.each((e3) => {
|
|
6626
|
-
e3[
|
|
6704
|
+
e3[Bc] || this.walkSync(e3);
|
|
6627
6705
|
});
|
|
6628
6706
|
else {
|
|
6629
6707
|
let a3 = this.listeners[u2];
|
|
@@ -6634,14 +6712,14 @@
|
|
|
6634
6712
|
return this.sync().warnings();
|
|
6635
6713
|
}
|
|
6636
6714
|
};
|
|
6637
|
-
|
|
6638
|
-
|
|
6715
|
+
qc.registerPostcss = (e2) => {
|
|
6716
|
+
Vc = e2;
|
|
6639
6717
|
};
|
|
6640
|
-
var
|
|
6641
|
-
|
|
6642
|
-
let
|
|
6643
|
-
const
|
|
6644
|
-
let
|
|
6718
|
+
var Hc = qc;
|
|
6719
|
+
qc.default = qc, Fc.registerLazyResult(qc), Tc.registerLazyResult(qc);
|
|
6720
|
+
let Zc = lc, Kc = Mc;
|
|
6721
|
+
const Jc = Lc;
|
|
6722
|
+
let Yc = ca, Xc = ni, Qc = class {
|
|
6645
6723
|
get content() {
|
|
6646
6724
|
return this.result.css;
|
|
6647
6725
|
}
|
|
@@ -6662,7 +6740,7 @@
|
|
|
6662
6740
|
}
|
|
6663
6741
|
get root() {
|
|
6664
6742
|
if (this._root) return this._root;
|
|
6665
|
-
let e2, a2 =
|
|
6743
|
+
let e2, a2 = Kc;
|
|
6666
6744
|
try {
|
|
6667
6745
|
e2 = a2(this._css, this._opts);
|
|
6668
6746
|
} catch (e3) {
|
|
@@ -6676,11 +6754,11 @@
|
|
|
6676
6754
|
}
|
|
6677
6755
|
constructor(e2, a2, u2) {
|
|
6678
6756
|
a2 = a2.toString(), this.stringified = false, this._processor = e2, this._css = a2, this._opts = u2, this._map = void 0;
|
|
6679
|
-
let m2, w2 =
|
|
6680
|
-
this.result = new
|
|
6757
|
+
let m2, w2 = Yc;
|
|
6758
|
+
this.result = new Jc(this._processor, m2, this._opts), this.result.css = a2;
|
|
6681
6759
|
let b2 = this;
|
|
6682
6760
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6683
|
-
let C2 = new
|
|
6761
|
+
let C2 = new Zc(w2, m2, this._opts, a2);
|
|
6684
6762
|
if (C2.isMap()) {
|
|
6685
6763
|
let [e3, a3] = C2.generate();
|
|
6686
6764
|
e3 && (this.result.css = e3), a3 && (this.result.map = a3);
|
|
@@ -6700,7 +6778,7 @@
|
|
|
6700
6778
|
return this.result;
|
|
6701
6779
|
}
|
|
6702
6780
|
then(e2, a2) {
|
|
6703
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6781
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || Xc("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(e2, a2);
|
|
6704
6782
|
}
|
|
6705
6783
|
toString() {
|
|
6706
6784
|
return this._css;
|
|
@@ -6709,9 +6787,9 @@
|
|
|
6709
6787
|
return [];
|
|
6710
6788
|
}
|
|
6711
6789
|
};
|
|
6712
|
-
var
|
|
6713
|
-
|
|
6714
|
-
let
|
|
6790
|
+
var lu = Qc;
|
|
6791
|
+
Qc.default = Qc;
|
|
6792
|
+
let cu = ja, hu = Hc, Cu = lu, ku = Sl, xu = class {
|
|
6715
6793
|
constructor(e2 = []) {
|
|
6716
6794
|
this.version = "8.5.3", this.plugins = this.normalize(e2);
|
|
6717
6795
|
}
|
|
@@ -6727,39 +6805,39 @@
|
|
|
6727
6805
|
return a2;
|
|
6728
6806
|
}
|
|
6729
6807
|
process(e2, a2 = {}) {
|
|
6730
|
-
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new
|
|
6808
|
+
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new hu(this, e2, a2) : new Cu(this, e2, a2);
|
|
6731
6809
|
}
|
|
6732
6810
|
use(e2) {
|
|
6733
6811
|
return this.plugins = this.plugins.concat(this.normalize([e2])), this;
|
|
6734
6812
|
}
|
|
6735
6813
|
};
|
|
6736
|
-
var
|
|
6737
|
-
|
|
6738
|
-
let
|
|
6814
|
+
var Mu = xu;
|
|
6815
|
+
xu.default = xu, ku.registerProcessor(xu), cu.registerProcessor(xu);
|
|
6816
|
+
let _u = Ua, Ou = va, Eu = Pa, Lu = oa, Ru = xa, Au = ja, Tu = Pl, Nu = ml, Pu = Hc, Du = Cl, Fu = wa, Uu = Mc, $u = Mu, Wu = Lc, zu = Sl, ju = Il, Gu = ca, Vu = _c;
|
|
6739
6817
|
function T$1(...e2) {
|
|
6740
|
-
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new
|
|
6818
|
+
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new $u(e2);
|
|
6741
6819
|
}
|
|
6742
6820
|
T$1.plugin = function(e2, a2) {
|
|
6743
6821
|
let u2, m2 = false;
|
|
6744
6822
|
function n(...u3) {
|
|
6745
6823
|
console && console.warn && !m2 && (m2 = true, console.warn(e2 + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e2 + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
6746
6824
|
let w2 = a2(...u3);
|
|
6747
|
-
return w2.postcssPlugin = e2, w2.postcssVersion = new
|
|
6825
|
+
return w2.postcssPlugin = e2, w2.postcssVersion = new $u().version, w2;
|
|
6748
6826
|
}
|
|
6749
6827
|
return Object.defineProperty(n, "postcss", { get: () => (u2 || (u2 = n()), u2) }), n.process = function(e3, a3, u3) {
|
|
6750
6828
|
return T$1([n(u3)]).process(e3, a3);
|
|
6751
6829
|
}, n;
|
|
6752
|
-
}, T$1.stringify =
|
|
6753
|
-
var
|
|
6830
|
+
}, T$1.stringify = Gu, T$1.parse = Uu, T$1.fromJSON = Tu, T$1.list = Du, T$1.comment = (e2) => new Ou(e2), T$1.atRule = (e2) => new _u(e2), T$1.decl = (e2) => new Ru(e2), T$1.rule = (e2) => new ju(e2), T$1.root = (e2) => new zu(e2), T$1.document = (e2) => new Au(e2), T$1.CssSyntaxError = Lu, T$1.Declaration = Ru, T$1.Container = Eu, T$1.Processor = $u, T$1.Document = Au, T$1.Comment = Ou, T$1.Warning = Vu, T$1.AtRule = _u, T$1.Result = Wu, T$1.Input = Nu, T$1.Rule = ju, T$1.Root = zu, T$1.Node = Fu, Pu.registerPostcss(T$1);
|
|
6831
|
+
var qu = T$1;
|
|
6754
6832
|
T$1.default = T$1;
|
|
6755
|
-
const
|
|
6756
|
-
var
|
|
6757
|
-
|
|
6833
|
+
const Hu = Su(qu);
|
|
6834
|
+
var Zu;
|
|
6835
|
+
Hu.stringify, Hu.fromJSON, Hu.plugin, Hu.parse, Hu.list, Hu.document, Hu.comment, Hu.atRule, Hu.rule, Hu.decl, Hu.root, Hu.CssSyntaxError, Hu.Declaration, Hu.Container, Hu.Processor, Hu.Document, Hu.Comment, Hu.Warning, Hu.AtRule, Hu.Result, Hu.Input, Hu.Rule, Hu.Root, Hu.Node, (function(e2) {
|
|
6758
6836
|
e2[e2.NotStarted = 0] = "NotStarted", e2[e2.Running = 1] = "Running", e2[e2.Stopped = 2] = "Stopped";
|
|
6759
|
-
})(
|
|
6760
|
-
const { addCustomEvent:
|
|
6761
|
-
var
|
|
6762
|
-
let
|
|
6837
|
+
})(Zu || (Zu = {}));
|
|
6838
|
+
const { addCustomEvent: Ku } = ae, { addSailfishEvent: Ju } = ae, { freezePage: Yu } = ae, { takeFullSnapshot: Xu } = ae;
|
|
6839
|
+
var Qu = Object.defineProperty, y = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? Qu(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2);
|
|
6840
|
+
let ep = class d {
|
|
6763
6841
|
constructor(e2) {
|
|
6764
6842
|
y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e2.fileName || "", this.functionName = e2.functionName || "", this.lineNumber = e2.lineNumber, this.columnNumber = e2.columnNumber;
|
|
6765
6843
|
}
|
|
@@ -6768,8 +6846,8 @@
|
|
|
6768
6846
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e2}:${a2})` : `${this.fileName}:${e2}:${a2}`;
|
|
6769
6847
|
}
|
|
6770
6848
|
};
|
|
6771
|
-
const
|
|
6772
|
-
return e2 ? typeof e2.stacktrace < "u" || typeof e2["opera#sourceloc"] < "u" ? this.parseOpera(e2) : e2.stack && e2.stack.match(
|
|
6849
|
+
const tp = /(^|@)\S+:\d+/, np = /^\s*at .*(\S+:\d+|\(native\))/m, rp = /^(eval@)?(\[native code])?$/, op = { parse: function(e2) {
|
|
6850
|
+
return e2 ? typeof e2.stacktrace < "u" || typeof e2["opera#sourceloc"] < "u" ? this.parseOpera(e2) : e2.stack && e2.stack.match(np) ? this.parseV8OrIE(e2) : e2.stack ? this.parseFFOrSafari(e2) : (console.warn("[console-record-plugin]: Failed to parse error object:", e2), []) : [];
|
|
6773
6851
|
}, extractLocation: function(e2) {
|
|
6774
6852
|
if (-1 === e2.indexOf(":")) return [e2];
|
|
6775
6853
|
const a2 = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e2.replace(/[()]/g, ""));
|
|
@@ -6777,23 +6855,23 @@
|
|
|
6777
6855
|
return [a2[1], a2[2] || void 0, a2[3] || void 0];
|
|
6778
6856
|
}, parseV8OrIE: function(e2) {
|
|
6779
6857
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6780
|
-
return !!e3.match(
|
|
6858
|
+
return !!e3.match(np);
|
|
6781
6859
|
}, this).map(function(e3) {
|
|
6782
6860
|
e3.indexOf("(eval ") > -1 && (e3 = e3.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6783
6861
|
let a2 = e3.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6784
6862
|
const u2 = a2.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6785
6863
|
a2 = u2 ? a2.replace(u2[0], "") : a2;
|
|
6786
6864
|
const m2 = a2.split(/\s+/).slice(1), w2 = this.extractLocation(u2 ? u2[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
|
|
6787
|
-
return new
|
|
6865
|
+
return new ep({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6788
6866
|
}, this);
|
|
6789
6867
|
}, parseFFOrSafari: function(e2) {
|
|
6790
6868
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6791
|
-
return !e3.match(
|
|
6869
|
+
return !e3.match(rp);
|
|
6792
6870
|
}, this).map(function(e3) {
|
|
6793
|
-
if (e3.indexOf(" > eval") > -1 && (e3 = e3.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e3.indexOf("@") && -1 === e3.indexOf(":")) return new
|
|
6871
|
+
if (e3.indexOf(" > eval") > -1 && (e3 = e3.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e3.indexOf("@") && -1 === e3.indexOf(":")) return new ep({ functionName: e3 });
|
|
6794
6872
|
{
|
|
6795
6873
|
const a2 = /((.*".+"[^@]*)?[^@]*)(?:@)/, u2 = e3.match(a2), m2 = u2 && u2[1] ? u2[1] : void 0, w2 = this.extractLocation(e3.replace(a2, ""));
|
|
6796
|
-
return new
|
|
6874
|
+
return new ep({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6797
6875
|
}
|
|
6798
6876
|
}, this);
|
|
6799
6877
|
}, parseOpera: function(e2) {
|
|
@@ -6802,22 +6880,22 @@
|
|
|
6802
6880
|
const a2 = /Line (\d+).*script (?:in )?(\S+)/i, u2 = e2.message.split("\n"), m2 = [];
|
|
6803
6881
|
for (let e3 = 2, w2 = u2.length; e3 < w2; e3 += 2) {
|
|
6804
6882
|
const w3 = a2.exec(u2[e3]);
|
|
6805
|
-
w3 && m2.push(new
|
|
6883
|
+
w3 && m2.push(new ep({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6806
6884
|
}
|
|
6807
6885
|
return m2;
|
|
6808
6886
|
}, parseOpera10: function(e2) {
|
|
6809
6887
|
const a2 = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u2 = e2.stacktrace.split("\n"), m2 = [];
|
|
6810
6888
|
for (let e3 = 0, w2 = u2.length; e3 < w2; e3 += 2) {
|
|
6811
6889
|
const w3 = a2.exec(u2[e3]);
|
|
6812
|
-
w3 && m2.push(new
|
|
6890
|
+
w3 && m2.push(new ep({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6813
6891
|
}
|
|
6814
6892
|
return m2;
|
|
6815
6893
|
}, parseOpera11: function(e2) {
|
|
6816
6894
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6817
|
-
return !!e3.match(
|
|
6895
|
+
return !!e3.match(tp) && !e3.match(/^Error created at/);
|
|
6818
6896
|
}, this).map(function(e3) {
|
|
6819
6897
|
const a2 = e3.split("@"), u2 = this.extractLocation(a2.pop()), m2 = (a2.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6820
|
-
return new
|
|
6898
|
+
return new ep({ functionName: m2, fileName: u2[0], lineNumber: u2[1], columnNumber: u2[2] });
|
|
6821
6899
|
}, this);
|
|
6822
6900
|
} };
|
|
6823
6901
|
function T(e2) {
|
|
@@ -6874,9 +6952,9 @@
|
|
|
6874
6952
|
return a3 instanceof Node ? a3 instanceof HTMLElement ? a3 ? a3.outerHTML : "" : a3.nodeName : a3 instanceof Error ? a3.stack ? a3.stack + "\nEnd of stack for Error object" : a3.name + ": " + a3.message : a3;
|
|
6875
6953
|
});
|
|
6876
6954
|
}
|
|
6877
|
-
const
|
|
6955
|
+
const sp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
6878
6956
|
function R(e2, a2, u2) {
|
|
6879
|
-
const m2 = u2 ? Object.assign({},
|
|
6957
|
+
const m2 = u2 ? Object.assign({}, sp, u2) : sp, w2 = m2.logger;
|
|
6880
6958
|
if (!w2) return () => {
|
|
6881
6959
|
};
|
|
6882
6960
|
let b2;
|
|
@@ -6885,7 +6963,7 @@
|
|
|
6885
6963
|
const I2 = [];
|
|
6886
6964
|
if (m2.level.includes("error")) {
|
|
6887
6965
|
const l = (a3) => {
|
|
6888
|
-
const u3 = a3.message, w3 = a3.error, b3 =
|
|
6966
|
+
const u3 = a3.message, w3 = a3.error, b3 = op.parse(w3).map((e3) => e3.toString()), C3 = [g(u3, m2.stringifyOptions)];
|
|
6889
6967
|
e2({ level: "error", trace: b3, payload: C3 });
|
|
6890
6968
|
};
|
|
6891
6969
|
a2.addEventListener("error", l), I2.push(() => {
|
|
@@ -6894,7 +6972,7 @@
|
|
|
6894
6972
|
const f = (a3) => {
|
|
6895
6973
|
let u3, w3;
|
|
6896
6974
|
a3.reason instanceof Error ? (u3 = a3.reason, w3 = [g(`Uncaught (in promise) ${u3.name}: ${u3.message}`, m2.stringifyOptions)]) : (u3 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a3.reason, m2.stringifyOptions)]);
|
|
6897
|
-
const b3 =
|
|
6975
|
+
const b3 = op.parse(u3).map((e3) => e3.toString());
|
|
6898
6976
|
e2({ level: "error", trace: b3, payload: w3 });
|
|
6899
6977
|
};
|
|
6900
6978
|
a2.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -6922,7 +7000,7 @@
|
|
|
6922
7000
|
if (a4.apply(this, w3), !("assert" === u3 && w3[0] || x2)) {
|
|
6923
7001
|
x2 = true;
|
|
6924
7002
|
try {
|
|
6925
|
-
const a5 =
|
|
7003
|
+
const a5 = op.parse(new Error()).map((e3) => e3.toString()).splice(1), b3 = ("assert" === u3 ? w3.slice(1) : w3).map((e3) => g(e3, m2.stringifyOptions));
|
|
6926
7004
|
C2++, C2 < m2.lengthThreshold ? e2({ level: u3, trace: a5, payload: b3 }) : C2 === m2.lengthThreshold && e2({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
|
|
6927
7005
|
} catch (e3) {
|
|
6928
7006
|
a4("@sailfish-rrweb/rrweb logger error:", e3, ...w3);
|
|
@@ -6934,7 +7012,7 @@
|
|
|
6934
7012
|
};
|
|
6935
7013
|
}
|
|
6936
7014
|
}
|
|
6937
|
-
var
|
|
7015
|
+
var ip = ((e2) => (e2[e2.DomContentLoaded = 0] = "DomContentLoaded", e2[e2.Load = 1] = "Load", e2[e2.FullSnapshot = 2] = "FullSnapshot", e2[e2.IncrementalSnapshot = 3] = "IncrementalSnapshot", e2[e2.Meta = 4] = "Meta", e2[e2.Custom = 5] = "Custom", e2[e2.Plugin = 6] = "Plugin", e2[e2.Device = 24] = "Device", e2[e2.SailfishCustom = 25] = "SailfishCustom", e2))(ip || {});
|
|
6938
7016
|
function suppressConsoleLogsDuringCall(e2) {
|
|
6939
7017
|
const a2 = console.log, u2 = console.warn, m2 = console.error;
|
|
6940
7018
|
console.log = () => {
|
|
@@ -6947,7 +7025,7 @@
|
|
|
6947
7025
|
console.log = a2, console.warn = u2, console.error = m2;
|
|
6948
7026
|
}
|
|
6949
7027
|
}
|
|
6950
|
-
const
|
|
7028
|
+
const ap = "zendesk_chat", lp = "Zendesk";
|
|
6951
7029
|
function zE_safe(...e2) {
|
|
6952
7030
|
try {
|
|
6953
7031
|
if ((function hasZendesk() {
|
|
@@ -6963,7 +7041,7 @@
|
|
|
6963
7041
|
const u2 = { creditCard: /\b(?:\d[ -]*?){13,16}\b/, ssn: /\b\d{3}-\d{2}-\d{4}\b/ };
|
|
6964
7042
|
return a2.closest(".mask") ? "*".repeat(e2.length) : a2.hasAttribute("data-cc") || ((_a2 = a2.getAttribute("autocomplete")) == null ? void 0 : _a2.startsWith("cc-")) || u2.creditCard.test(e2) ? "**** **** **** " + e2.slice(-4) : a2.hasAttribute("data-ssn") || u2.ssn.test(e2) ? "***-**-" + e2.slice(-4) : a2.hasAttribute("data-dob") ? "**/**/" + e2.slice(-4) : e2;
|
|
6965
7043
|
}
|
|
6966
|
-
const getUrlAndStoredUuids = () => ({ page_visit_uuid: sessionStorage.getItem("pageVisitUUID"), prev_page_visit_uuid: sessionStorage.getItem("prevPageVisitUUID"), href: location.origin + location.pathname });
|
|
7044
|
+
const getUrlAndStoredUuids = () => ({ page_visit_uuid: sessionStorage.getItem("pageVisitUUID"), prev_page_visit_uuid: sessionStorage.getItem("prevPageVisitUUID"), href: location.origin + location.pathname, tabVisibilityChanged: sessionStorage.getItem("tabVisibilityChanged"), tabVisibilityState: sessionStorage.getItem("tabVisibilityState") });
|
|
6967
7045
|
function initializeDomContentEvents(e2) {
|
|
6968
7046
|
document.addEventListener("readystatechange", () => {
|
|
6969
7047
|
const a2 = { type: 24, data: { source: 0, info: "" }, timestamp: Date.now(), sessionId: e2, ...getUrlAndStoredUuids() };
|
|
@@ -6986,7 +7064,7 @@
|
|
|
6986
7064
|
function initializeConsolePlugin(e2, a2) {
|
|
6987
7065
|
const { name: u2, observer: m2 } = /* @__PURE__ */ ((e3) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e3 }))(e2);
|
|
6988
7066
|
m2((e3) => {
|
|
6989
|
-
sendEvent({ type:
|
|
7067
|
+
sendEvent({ type: ip.Plugin, timestamp: Date.now(), data: { plugin: u2, payload: e3 }, sessionId: a2, ...getUrlAndStoredUuids() });
|
|
6990
7068
|
}, window, e2);
|
|
6991
7069
|
}
|
|
6992
7070
|
async function initializeRecording(e2, a2, u2, m2) {
|
|
@@ -7006,11 +7084,11 @@
|
|
|
7006
7084
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7007
7085
|
});
|
|
7008
7086
|
const handleWidgetOpen = () => {
|
|
7009
|
-
ae.addSailfishEvent(
|
|
7087
|
+
ae.addSailfishEvent(ip.SailfishCustom, { action: "customer support chat opened", element_id: ap, provider: lp });
|
|
7010
7088
|
}, handleWidgetClose = () => {
|
|
7011
|
-
ae.addSailfishEvent(
|
|
7089
|
+
ae.addSailfishEvent(ip.SailfishCustom, { action: "customer support chat closed", element_id: ap, provider: lp });
|
|
7012
7090
|
}, handleUnreadMessages = (e3) => {
|
|
7013
|
-
ae.addSailfishEvent(
|
|
7091
|
+
ae.addSailfishEvent(ip.SailfishCustom, { action: "zendesk unreadmessages", element_id: ap, provider: lp });
|
|
7014
7092
|
};
|
|
7015
7093
|
suppressConsoleLogsDuringCall(() => {
|
|
7016
7094
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7021,8 +7099,8 @@
|
|
|
7021
7099
|
}
|
|
7022
7100
|
return w2;
|
|
7023
7101
|
}
|
|
7024
|
-
let
|
|
7025
|
-
const
|
|
7102
|
+
let cp = null, up = null;
|
|
7103
|
+
const pp = readDebugFlag(), dp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], hp = [400, 403], fp = "CORS", mp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, gp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7026
7104
|
function trackDomainChangesOnce() {
|
|
7027
7105
|
const e2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7028
7106
|
if (e2.routeWatcherIntervalId) return;
|
|
@@ -7043,6 +7121,9 @@
|
|
|
7043
7121
|
})(() => checkDomainChange(), 500);
|
|
7044
7122
|
checkDomainChange(true), e2.routeWatcherIntervalId = window.setInterval(u2, 1e3);
|
|
7045
7123
|
}
|
|
7124
|
+
function clearPageVisitDataFromSessionStorage() {
|
|
7125
|
+
Q && (sessionStorage.removeItem("pageVisitUUID"), sessionStorage.removeItem("prevPageVisitUUID"), sessionStorage.removeItem("tabVisibilityChanged"), sessionStorage.removeItem("tabVisibilityState"));
|
|
7126
|
+
}
|
|
7046
7127
|
function matchUrlWithWildcard(e2, a2) {
|
|
7047
7128
|
let u2, m2;
|
|
7048
7129
|
if ("string" == typeof e2 ? u2 = e2 : "undefined" != typeof URL && e2 instanceof URL ? u2 = e2.href : "undefined" != typeof Request && e2 instanceof Request ? u2 = e2.url : null != e2 && "function" == typeof e2.toString && (u2 = e2.toString()), !u2) return false;
|
|
@@ -7086,7 +7167,7 @@
|
|
|
7086
7167
|
return true;
|
|
7087
7168
|
}
|
|
7088
7169
|
for (const e3 of D) if (u2.pathname.toLowerCase().endsWith(e3)) return true;
|
|
7089
|
-
return !!matchUrlWithWildcard(e2, [...
|
|
7170
|
+
return !!matchUrlWithWildcard(e2, [...dp, ...a2]);
|
|
7090
7171
|
}
|
|
7091
7172
|
function setupFetchInterceptor(e2 = []) {
|
|
7092
7173
|
const a2 = window.fetch, u2 = getOrSetSessionId();
|
|
@@ -7099,23 +7180,48 @@
|
|
|
7099
7180
|
b2 = x2.href;
|
|
7100
7181
|
}
|
|
7101
7182
|
return shouldSkipHeadersPropagation(b2, e2) ? a3.apply(m2, w2) : (async function injectHeaderWrapper(e3, a4, u3, m3, w3, b3, x3) {
|
|
7102
|
-
var _a2, _b;
|
|
7183
|
+
var _a2, _b, _c2;
|
|
7103
7184
|
if (!b3) return e3.apply(a4, u3);
|
|
7104
|
-
|
|
7185
|
+
let I3 = v4();
|
|
7186
|
+
const _2 = getUrlAndStoredUuids(), O2 = w3.method || "GET", E2 = Date.now();
|
|
7187
|
+
let D2, F2 = {};
|
|
7188
|
+
try {
|
|
7189
|
+
if (m3 instanceof Request) {
|
|
7190
|
+
m3.headers.forEach((e4, a5) => {
|
|
7191
|
+
F2[a5] = e4;
|
|
7192
|
+
});
|
|
7193
|
+
try {
|
|
7194
|
+
const e4 = m3.clone();
|
|
7195
|
+
D2 = await e4.text();
|
|
7196
|
+
} catch (e4) {
|
|
7197
|
+
D2 = null;
|
|
7198
|
+
}
|
|
7199
|
+
} else w3.headers && (w3.headers instanceof Headers ? w3.headers.forEach((e4, a5) => {
|
|
7200
|
+
F2[a5] = e4;
|
|
7201
|
+
}) : Array.isArray(w3.headers) ? w3.headers.forEach(([e4, a5]) => {
|
|
7202
|
+
F2[e4] = a5;
|
|
7203
|
+
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7204
|
+
} catch (e4) {
|
|
7205
|
+
pp && console.warn("[Sailfish] Failed to capture request data:", e4);
|
|
7206
|
+
}
|
|
7207
|
+
delete F2[C];
|
|
7208
|
+
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
7209
|
+
U2 && delete F2[U2];
|
|
7105
7210
|
try {
|
|
7106
|
-
let
|
|
7211
|
+
let U3 = await (async function injectHeader(e4, a5, u4, m4, w4, b4, x4) {
|
|
7212
|
+
const I4 = getFuncSpanHeader();
|
|
7107
7213
|
if (u4 instanceof Request) {
|
|
7108
|
-
const
|
|
7109
|
-
|
|
7110
|
-
const
|
|
7111
|
-
return await e4.call(a5,
|
|
7214
|
+
const _3 = u4.clone(), O3 = new Headers(_3.headers);
|
|
7215
|
+
O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value), pp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u4.url, header: I4.name }));
|
|
7216
|
+
const E3 = new Request(_3, { headers: O3 });
|
|
7217
|
+
return await e4.call(a5, E3, m4);
|
|
7112
7218
|
}
|
|
7113
7219
|
{
|
|
7114
|
-
const
|
|
7115
|
-
return
|
|
7220
|
+
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7221
|
+
return O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value), pp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u4 ? u4 : u4.href, header: I4.name })), _3.headers = O3, await e4.call(a5, u4, _3);
|
|
7116
7222
|
}
|
|
7117
|
-
})(e3, a4, m3, w3, b3, _2.page_visit_uuid, I3),
|
|
7118
|
-
|
|
7223
|
+
})(e3, a4, m3, w3, b3, _2.page_visit_uuid, I3), B2 = false;
|
|
7224
|
+
hp.includes(U3.status) && (pp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e4, a5, u4, m4) {
|
|
7119
7225
|
try {
|
|
7120
7226
|
let m5 = u4[0], w4 = u4[1] || {};
|
|
7121
7227
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7131,15 +7237,30 @@
|
|
|
7131
7237
|
}
|
|
7132
7238
|
return e4.apply(a5, u4);
|
|
7133
7239
|
} catch (e5) {
|
|
7134
|
-
throw
|
|
7240
|
+
throw pp && console.log(`Retry without ${C} for ${m4} also failed:`, e5), e5;
|
|
7135
7241
|
}
|
|
7136
|
-
})(e3, a4, u3, x3),
|
|
7137
|
-
const
|
|
7138
|
-
|
|
7242
|
+
})(e3, a4, u3, x3), B2 = true);
|
|
7243
|
+
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
7244
|
+
let q2;
|
|
7245
|
+
try {
|
|
7246
|
+
const e4 = U3.clone();
|
|
7247
|
+
q2 = await e4.text();
|
|
7248
|
+
} catch (e4) {
|
|
7249
|
+
pp && console.warn("[Sailfish] Failed to capture response data:", e4), q2 = null;
|
|
7250
|
+
}
|
|
7251
|
+
let H2 = null;
|
|
7252
|
+
try {
|
|
7253
|
+
H2 = {}, U3.headers.forEach((e4, a5) => {
|
|
7254
|
+
H2[a5] = e4;
|
|
7255
|
+
});
|
|
7256
|
+
} catch (e4) {
|
|
7257
|
+
pp && console.warn("[Sailfish] Failed to capture response headers:", e4), H2 = null;
|
|
7258
|
+
}
|
|
7259
|
+
return sendEvent({ type: 27, timestamp: $2, sessionId: b3, data: { request_id: I3, session_id: b3, 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;
|
|
7139
7260
|
} catch (m4) {
|
|
7140
|
-
const w4 = Date.now(), C2 = false,
|
|
7141
|
-
if (m4 instanceof TypeError && ((
|
|
7142
|
-
throw sendEvent({ type: 27, timestamp: w4, sessionId: b3, data: { request_id: I3, session_id: b3, timestamp_start: E2, timestamp_end: w4, response_code:
|
|
7261
|
+
const w4 = Date.now(), C2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7262
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(fp.toLowerCase()))) return e3.apply(a4, u3);
|
|
7263
|
+
throw sendEvent({ type: 27, timestamp: w4, sessionId: b3, data: { request_id: I3, session_id: b3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: C2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7143
7264
|
}
|
|
7144
7265
|
})(a3, m2, w2, x2, I2, u2, b2);
|
|
7145
7266
|
} });
|
|
@@ -7172,7 +7293,7 @@
|
|
|
7172
7293
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7173
7294
|
if (U2.sessionId = F2, U2.apiKey = e2, U2.backendApi = a2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7174
7295
|
else {
|
|
7175
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7296
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(gp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7176
7297
|
window.addEventListener("error", (e3) => {
|
|
7177
7298
|
captureError(e3.error || e3.message);
|
|
7178
7299
|
}), window.addEventListener("unhandledrejection", (e3) => {
|
|
@@ -7180,7 +7301,7 @@
|
|
|
7180
7301
|
});
|
|
7181
7302
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e3, backendApi: a3 }) {
|
|
7182
7303
|
Q && (sessionStorage.setItem("sailfishApiKey", e3), sessionStorage.setItem("sailfishBackendApi", a3));
|
|
7183
|
-
})({ apiKey: e2, backendApi: a2 }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e2, [...m2, ...
|
|
7304
|
+
})({ apiKey: e2, backendApi: a2 }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e2, [...m2, ...dp], a2).catch((e3) => console.error("Failed to send domains to not propagate header to:", e3)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e3 = []) {
|
|
7184
7305
|
const a3 = XMLHttpRequest.prototype.open, u3 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7185
7306
|
XMLHttpRequest.prototype.setRequestHeader = function(e4, a4) {
|
|
7186
7307
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e4] = a4, m3.call(this, e4, a4);
|
|
@@ -7196,20 +7317,44 @@
|
|
|
7196
7317
|
} catch (e4) {
|
|
7197
7318
|
console.warn(`Could not set X-Sf3-Rid for ${m4}`, e4);
|
|
7198
7319
|
}
|
|
7199
|
-
const _3 =
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7320
|
+
const _3 = getFuncSpanHeader();
|
|
7321
|
+
if (_3) try {
|
|
7322
|
+
this.setRequestHeader(_3.name, _3.value), pp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7323
|
+
} catch (e4) {
|
|
7324
|
+
pp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e4);
|
|
7325
|
+
}
|
|
7326
|
+
const O3 = Date.now();
|
|
7327
|
+
let E3 = false;
|
|
7328
|
+
const D3 = a4[0], F3 = { ...this._capturedRequestHeaders };
|
|
7329
|
+
delete F3[C], _3 && delete F3[_3.name];
|
|
7330
|
+
const emitFinished = (e4, a5, u4, b4, C2) => {
|
|
7331
|
+
if (E3) return;
|
|
7332
|
+
E3 = true;
|
|
7333
|
+
const I4 = Date.now();
|
|
7334
|
+
sendEvent({ type: 27, timestamp: I4, sessionId: w3, data: { request_id: x3, session_id: w3, timestamp_start: O3, timestamp_end: I4, response_code: a5, success: e4, error: u4, method: this._requestMethod, url: m4, request_headers: F3, request_body: D3, response_headers: C2, response_body: b4 }, ...getUrlAndStoredUuids() });
|
|
7206
7335
|
};
|
|
7207
7336
|
return this.addEventListener("load", () => {
|
|
7208
7337
|
const e4 = this.status || 0;
|
|
7209
|
-
|
|
7338
|
+
let a5, u4 = null;
|
|
7339
|
+
try {
|
|
7340
|
+
a5 = this.responseText || this.response;
|
|
7341
|
+
} catch (e5) {
|
|
7342
|
+
a5 = null;
|
|
7343
|
+
}
|
|
7344
|
+
try {
|
|
7345
|
+
u4 = {};
|
|
7346
|
+
const e5 = this.getAllResponseHeaders();
|
|
7347
|
+
e5 && e5.split("\r\n").forEach((e6) => {
|
|
7348
|
+
const a6 = e6.split(": ");
|
|
7349
|
+
2 === a6.length && (u4[a6[0]] = a6[1]);
|
|
7350
|
+
});
|
|
7351
|
+
} catch (e5) {
|
|
7352
|
+
pp && console.warn("[Sailfish] Failed to capture XHR response headers:", e5), u4 = null;
|
|
7353
|
+
}
|
|
7354
|
+
if (e4 >= 200 && e4 < 300) emitFinished(true, e4, "", a5, u4);
|
|
7210
7355
|
else {
|
|
7211
|
-
const
|
|
7212
|
-
emitFinished(false, e4, a5);
|
|
7356
|
+
const m5 = this.statusText || `HTTP ${e4}`;
|
|
7357
|
+
emitFinished(false, e4, m5, a5, u4);
|
|
7213
7358
|
}
|
|
7214
7359
|
}, { once: true }), this.addEventListener("error", () => {
|
|
7215
7360
|
const e4 = this.status || 0, a5 = 0 === e4 ? "Network or CORS failure" : this.statusText || `Error ${e4}`;
|
|
@@ -7220,7 +7365,7 @@
|
|
|
7220
7365
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7221
7366
|
})();
|
|
7222
7367
|
try {
|
|
7223
|
-
const u3 = await fetchCaptureSettings(e2, a2), m3 = ((_a2 = u3.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7368
|
+
const u3 = await fetchCaptureSettings(e2, a2), m3 = ((_a2 = u3.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || mp;
|
|
7224
7369
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7225
7370
|
const C2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e2, F2, a2, O2, E2, D2, _2, "JS/TS", C2);
|
|
7226
7371
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
@@ -7234,7 +7379,7 @@
|
|
|
7234
7379
|
}
|
|
7235
7380
|
}
|
|
7236
7381
|
}
|
|
7237
|
-
|
|
7382
|
+
J && (!(function sendUserDeviceUuid() {
|
|
7238
7383
|
sendMessage({ type: "userDeviceUuid", userDeviceUuid: (function getOrSetUserDeviceUuid() {
|
|
7239
7384
|
let e2 = null;
|
|
7240
7385
|
if (X) try {
|
|
@@ -7252,29 +7397,34 @@
|
|
|
7252
7397
|
})() });
|
|
7253
7398
|
})(), (function sendTimeZone() {
|
|
7254
7399
|
sendMessage({ type: "timeZone", timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
|
|
7255
|
-
})()),
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
}
|
|
7400
|
+
})()), Y && document.addEventListener("visibilitychange", function handleVisibilityChange() {
|
|
7401
|
+
const e2 = document.visibilityState, a2 = Date.now();
|
|
7402
|
+
"visible" === e2 && getOrSetSessionId();
|
|
7403
|
+
try {
|
|
7404
|
+
sendMessage({ type: "visibilityChange", data: { state: e2, url: window.location.href.split("?")[0], timestamp: a2, ...getUrlAndStoredUuids() } }), pp && console.log(`[Sailfish] Tab became ${e2}, sent visibility change event`);
|
|
7405
|
+
} catch (e3) {
|
|
7406
|
+
console.warn("[Sailfish] Failed to send visibility change event:", e3);
|
|
7407
|
+
}
|
|
7408
|
+
sessionStorage.setItem("tabVisibilityChanged", a2.toString()), sessionStorage.setItem("tabVisibilityState", e2);
|
|
7409
|
+
}), J && window.addEventListener("beforeunload", () => {
|
|
7410
|
+
clearPageVisitDataFromSessionStorage();
|
|
7261
7411
|
});
|
|
7262
|
-
e.DEFAULT_CAPTURE_SETTINGS =
|
|
7412
|
+
e.DEFAULT_CAPTURE_SETTINGS = mp, e.DEFAULT_CONSOLE_RECORDING_SETTINGS = gp, e.STORAGE_VERSION = 1, e.addOrUpdateMetadata = function addOrUpdateMetadata(e2) {
|
|
7263
7413
|
const a2 = { type: "addOrUpdateMetadata", metadata: e2 };
|
|
7264
|
-
|
|
7265
|
-
}, e.buildBatches = buildBatches, e.createTriageFromRecorder = createTriageFromRecorder, e.eventSize = eventSize, e.fetchCaptureSettings = fetchCaptureSettings, e.flushBufferedEvents = flushBufferedEvents, e.getUrlAndStoredUuids = getUrlAndStoredUuids, e.identify = function identify(e2, a2 = {}, u2 = false) {
|
|
7414
|
+
up && JSON.stringify(up) === JSON.stringify(e2) || (up = e2, sendMessage(a2));
|
|
7415
|
+
}, e.buildBatches = buildBatches, e.createTriageFromRecorder = createTriageFromRecorder, e.disableFunctionSpanTracking = disableFunctionSpanTracking, e.enableFunctionSpanTracking = enableFunctionSpanTracking, e.eventSize = eventSize, e.fetchCaptureSettings = fetchCaptureSettings, e.flushBufferedEvents = flushBufferedEvents, e.getFuncSpanHeader = getFuncSpanHeader, e.getUrlAndStoredUuids = getUrlAndStoredUuids, e.identify = function identify(e2, a2 = {}, u2 = false) {
|
|
7266
7416
|
const m2 = { type: "identify", userId: e2, traits: a2 };
|
|
7267
|
-
|
|
7417
|
+
cp && cp.userId === e2 && JSON.stringify(cp.traits) === JSON.stringify(a2) || (cp = { userId: e2, traits: a2, overwrite: u2 }, sendMessage(m2));
|
|
7268
7418
|
}, e.initRecorder = async (e2) => {
|
|
7269
7419
|
if ("undefined" == typeof window) return;
|
|
7270
7420
|
const a2 = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u2 = getOrSetSessionId();
|
|
7271
|
-
return a2.initialized && a2.sessionId === u2 && a2.ws && 1 === a2.ws.readyState ? void 0 : (a2.initPromise || (a2.initPromise = (async () => {
|
|
7421
|
+
return clearPageVisitDataFromSessionStorage(), a2.initialized && a2.sessionId === u2 && a2.ws && 1 === a2.ws.readyState ? void 0 : (a2.initPromise || (a2.initPromise = (async () => {
|
|
7272
7422
|
a2.hasLoggedInitOnce || (console.log("Initializing Sailfish Recorder (first run) …"), a2.hasLoggedInitOnce = true), await startRecording(e2), a2.issueReportingInit || (setupIssueReporting({ apiKey: e2.apiKey, backendApi: e2.backendApi ?? "https://api-service.sailfishqa.com", getSessionId: () => getOrSetSessionId(), shortcuts: e2.reportIssueShortcuts, customBaseUrl: e2.customBaseUrl }), a2.issueReportingInit = true);
|
|
7273
7423
|
})().finally(() => {
|
|
7274
7424
|
delete a2.initPromise;
|
|
7275
7425
|
})), a2.initPromise);
|
|
7276
|
-
}, e.initializeConsolePlugin = initializeConsolePlugin, e.initializeDomContentEvents = initializeDomContentEvents, e.initializeRecording = initializeRecording, e.initializeWebSocket = initializeWebSocket, e.matchUrlWithWildcard = matchUrlWithWildcard, e.openReportIssueModal = function openReportIssueModal() {
|
|
7277
|
-
|
|
7426
|
+
}, e.initializeConsolePlugin = initializeConsolePlugin, e.initializeDomContentEvents = initializeDomContentEvents, e.initializeRecording = initializeRecording, e.initializeWebSocket = initializeWebSocket, e.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, e.matchUrlWithWildcard = matchUrlWithWildcard, e.openReportIssueModal = function openReportIssueModal() {
|
|
7427
|
+
at ? stopRecording() : (injectModalHTML(), et && document.body.appendChild(et));
|
|
7278
7428
|
}, e.sendDomainsToNotPropagateHeaderTo = sendDomainsToNotPropagateHeaderTo, e.sendEvent = sendEvent, e.sendGraphQLRequest = sendGraphQLRequest, e.sendMessage = sendMessage, e.startRecording = startRecording, e.startRecordingSession = startRecordingSession, e.trackingEvent = function trackingEvent(a2) {
|
|
7279
7429
|
sendMessage({ type: "trackingEvent", trackingData: a2, timestamp: e.nowTimestamp() });
|
|
7280
7430
|
}, e.withAppUrlMetadata = withAppUrlMetadata, Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|