@sailfish-ai/recorder 1.8.10 → 1.8.12-alpha-2
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 +2 -0
- package/dist/graphql.js +7 -0
- package/dist/index.js +35 -5
- package/dist/recorder.cjs +831 -783
- package/dist/recorder.js +839 -786
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +831 -783
- package/dist/recording.js +2 -2
- package/dist/session.js +42 -5
- package/dist/types/graphql.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/recording.d.ts +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/websocket.d.ts +11 -1
- package/dist/websocket.js +154 -70
- package/package.json +2 -2
package/dist/recorder.js
CHANGED
|
@@ -325,9 +325,23 @@ async function deleteNotifyMessageById(e) {
|
|
|
325
325
|
a.delete(e);
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
|
-
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
|
|
328
|
+
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis, Q = "sailfishSessionId", ee = "__sailfish_refresh__";
|
|
329
|
+
let te = null;
|
|
329
330
|
function getOrSetSessionId() {
|
|
330
|
-
|
|
331
|
+
if (!H) return v4();
|
|
332
|
+
if (te) return te;
|
|
333
|
+
const e = window.name.startsWith(ee);
|
|
334
|
+
if (e && (window.name = window.name.substring(20)), e) {
|
|
335
|
+
const e2 = window.sessionStorage.getItem(Q);
|
|
336
|
+
if (e2) return te = e2, e2;
|
|
337
|
+
}
|
|
338
|
+
const a = v4();
|
|
339
|
+
te = a;
|
|
340
|
+
try {
|
|
341
|
+
window.sessionStorage.setItem(Q, a);
|
|
342
|
+
} catch (e2) {
|
|
343
|
+
}
|
|
344
|
+
return a;
|
|
331
345
|
}
|
|
332
346
|
function buildBatches(e, a, u) {
|
|
333
347
|
const m2 = {};
|
|
@@ -350,32 +364,38 @@ function buildBatches(e, a, u) {
|
|
|
350
364
|
function eventSize(e) {
|
|
351
365
|
return new Blob([JSON.stringify(e)]).size;
|
|
352
366
|
}
|
|
353
|
-
|
|
367
|
+
H && window.addEventListener("beforeunload", () => {
|
|
368
|
+
window.name = ee + window.name;
|
|
369
|
+
});
|
|
370
|
+
let ne = Date.now;
|
|
354
371
|
function withAppUrlMetadata(e) {
|
|
355
372
|
var _a2;
|
|
356
373
|
return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
357
374
|
}
|
|
358
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
359
|
-
const
|
|
360
|
-
let
|
|
375
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (ne = () => (/* @__PURE__ */ new Date()).getTime());
|
|
376
|
+
const re = readDebugFlag(), oe = "per_session";
|
|
377
|
+
let se = null, ie = false, le = null, ce = null, pe = false, de = null, he = null, me = false;
|
|
378
|
+
const ge = "sailfish_funcspan_global_state";
|
|
361
379
|
function saveGlobalFuncSpanState(e, a) {
|
|
362
380
|
try {
|
|
363
381
|
if ("undefined" == typeof localStorage) return;
|
|
364
|
-
const u = { enabled: e, expirationTimestampMs: a };
|
|
365
|
-
localStorage.setItem(
|
|
382
|
+
const u = { enabled: e, expirationTimestampMs: a, savedAt: Date.now() };
|
|
383
|
+
localStorage.setItem(ge, JSON.stringify(u)), re && console.log("[Sailfish] Saved funcSpan state to localStorage:", u);
|
|
366
384
|
} catch (e2) {
|
|
367
|
-
|
|
385
|
+
re && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e2);
|
|
368
386
|
}
|
|
369
387
|
}
|
|
370
388
|
function clearGlobalFuncSpanState() {
|
|
371
389
|
try {
|
|
372
390
|
if ("undefined" == typeof localStorage) return;
|
|
373
|
-
localStorage.removeItem(
|
|
391
|
+
localStorage.removeItem(ge), re && console.log("[Sailfish] Cleared funcSpan state from localStorage");
|
|
374
392
|
} catch (e) {
|
|
375
|
-
|
|
393
|
+
re && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e);
|
|
376
394
|
}
|
|
377
395
|
}
|
|
378
|
-
|
|
396
|
+
function clearStaleFuncSpanState() {
|
|
397
|
+
pe = false, he = null, me = false, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
|
|
398
|
+
}
|
|
379
399
|
function isWebSocketOpen(e) {
|
|
380
400
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
381
401
|
}
|
|
@@ -386,15 +406,15 @@ async function flushNotifyQueue() {
|
|
|
386
406
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
387
407
|
})) ?? [];
|
|
388
408
|
})();
|
|
389
|
-
if (isWebSocketOpen(
|
|
390
|
-
for (const a of e)
|
|
409
|
+
if (isWebSocketOpen(se)) try {
|
|
410
|
+
for (const a of e) se.send(a.value), await deleteNotifyMessageById(a.id);
|
|
391
411
|
} catch (e2) {
|
|
392
412
|
}
|
|
393
413
|
}
|
|
394
414
|
async function flushBufferedEvents() {
|
|
395
|
-
if (isWebSocketOpen(
|
|
415
|
+
if (isWebSocketOpen(se)) if (le) await le;
|
|
396
416
|
else {
|
|
397
|
-
|
|
417
|
+
le = (async () => {
|
|
398
418
|
var _a2, _b;
|
|
399
419
|
const e = await (async function getAllIndexedEvents() {
|
|
400
420
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -409,119 +429,138 @@ async function flushBufferedEvents() {
|
|
|
409
429
|
for (const e2 of Object.values(a)) {
|
|
410
430
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
411
431
|
for (const e3 of a2) {
|
|
412
|
-
if (!isWebSocketOpen(
|
|
432
|
+
if (!isWebSocketOpen(se)) break;
|
|
413
433
|
const a3 = e3.map((e4) => {
|
|
414
434
|
var _a3, _b2;
|
|
415
435
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
416
436
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
417
437
|
try {
|
|
418
438
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
419
|
-
|
|
439
|
+
se.send(e4), await deleteEventsByIds(u);
|
|
420
440
|
} catch (e4) {
|
|
421
441
|
}
|
|
422
442
|
}
|
|
423
443
|
}
|
|
424
444
|
})();
|
|
425
445
|
try {
|
|
426
|
-
await
|
|
446
|
+
await le;
|
|
427
447
|
} finally {
|
|
428
|
-
|
|
448
|
+
le = null;
|
|
429
449
|
}
|
|
430
450
|
}
|
|
431
451
|
}
|
|
432
452
|
function sendEvent(e) {
|
|
433
453
|
var _a2;
|
|
434
454
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
435
|
-
if (
|
|
455
|
+
if (ie || !isWebSocketOpen(se)) return void saveEventToIDB(a);
|
|
436
456
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
437
457
|
try {
|
|
438
|
-
|
|
458
|
+
se.send(u);
|
|
439
459
|
} catch (e2) {
|
|
440
460
|
saveEventToIDB(a);
|
|
441
461
|
}
|
|
442
462
|
}
|
|
443
|
-
function initializeWebSocket(e, a, u) {
|
|
444
|
-
const
|
|
463
|
+
function initializeWebSocket(e, a, u, m2) {
|
|
464
|
+
const w2 = (function getWebSocketHost(e2) {
|
|
445
465
|
const a2 = document.createElement("a");
|
|
446
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
447
|
-
})(e)
|
|
448
|
-
|
|
449
|
-
|
|
467
|
+
})(e);
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.12-alpha-2`;
|
|
469
|
+
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
470
|
+
return se = new $(b2, [], { connectionTimeout: 3e4 }), se.addEventListener("open", () => {
|
|
471
|
+
re && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (pe ? "ENABLED" : "DISABLED"))), (async () => {
|
|
450
472
|
try {
|
|
451
|
-
|
|
473
|
+
ie = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
452
474
|
} finally {
|
|
453
|
-
|
|
475
|
+
ie = false;
|
|
454
476
|
}
|
|
455
|
-
null !=
|
|
477
|
+
null != ce && clearInterval(ce), ce = window.setInterval(() => {
|
|
456
478
|
flushBufferedEvents();
|
|
457
479
|
}, 2e3);
|
|
458
480
|
})();
|
|
459
|
-
}),
|
|
460
|
-
|
|
461
|
-
}),
|
|
481
|
+
}), se.addEventListener("close", () => {
|
|
482
|
+
re && console.log("[Sailfish] WebSocket closed");
|
|
483
|
+
}), se.addEventListener("message", (e2) => {
|
|
462
484
|
try {
|
|
463
485
|
const a2 = JSON.parse(e2.data);
|
|
464
|
-
if ("funcSpanTrackingControl" === a2.type) if (
|
|
486
|
+
if ("funcSpanTrackingControl" === a2.type) if (re && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== de && (window.clearTimeout(de), de = null), pe = a2.enabled, me = false, re && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
465
487
|
if (a2.expirationTimestampMs) {
|
|
466
|
-
|
|
467
|
-
const e3 = Date.now(), u2 =
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
488
|
+
he = a2.expirationTimestampMs;
|
|
489
|
+
const e3 = Date.now(), u2 = he - e3;
|
|
490
|
+
re && console.log(`[Sailfish] Server expiration timestamp: ${he}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, he), de = window.setTimeout(() => {
|
|
491
|
+
if (!me) {
|
|
492
|
+
pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
|
|
493
|
+
try {
|
|
494
|
+
isWebSocketOpen(se) && (se.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), re && console.log("[Sailfish] Notified backend that function span tracking expired"));
|
|
495
|
+
} catch (e4) {
|
|
496
|
+
re && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, u2)) : (pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
471
500
|
} else {
|
|
472
501
|
const e3 = a2.timeoutSeconds || 3600;
|
|
473
|
-
e3 > 0 && (
|
|
474
|
-
|
|
502
|
+
e3 > 0 && (he = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, he), de = window.setTimeout(() => {
|
|
503
|
+
if (!me) {
|
|
504
|
+
pe = false, he = null, clearGlobalFuncSpanState(), re && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
|
|
505
|
+
try {
|
|
506
|
+
isWebSocketOpen(se) && (se.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), re && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
|
|
507
|
+
} catch (e4) {
|
|
508
|
+
re && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
475
511
|
}, 1e3 * e3));
|
|
476
512
|
}
|
|
477
513
|
try {
|
|
478
514
|
const e3 = getOrSetSessionId();
|
|
479
|
-
|
|
515
|
+
se.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), re && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
480
516
|
} catch (e3) {
|
|
481
|
-
|
|
517
|
+
re && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
482
518
|
}
|
|
483
|
-
} else
|
|
519
|
+
} else he = null, clearGlobalFuncSpanState();
|
|
484
520
|
} catch (e3) {
|
|
485
521
|
}
|
|
486
|
-
}),
|
|
522
|
+
}), se;
|
|
487
523
|
}
|
|
488
524
|
function sendMessage(e) {
|
|
489
525
|
var _a2;
|
|
490
526
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
491
527
|
const a = JSON.stringify({ ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
|
|
492
|
-
if (isWebSocketOpen(
|
|
493
|
-
|
|
528
|
+
if (ie || !isWebSocketOpen(se)) saveNotifyMessageToIDB(a);
|
|
529
|
+
else try {
|
|
530
|
+
se.send(a);
|
|
494
531
|
} catch (e2) {
|
|
495
532
|
saveNotifyMessageToIDB(a);
|
|
496
533
|
}
|
|
497
|
-
else saveNotifyMessageToIDB(a);
|
|
498
534
|
}
|
|
499
535
|
function enableFunctionSpanTracking() {
|
|
500
|
-
if (
|
|
501
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType:
|
|
502
|
-
|
|
536
|
+
if (re && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), pe = true, me = true, he = null, null !== de && (window.clearTimeout(de), de = null), isWebSocketOpen(se)) try {
|
|
537
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: oe };
|
|
538
|
+
se.send(JSON.stringify(e));
|
|
503
539
|
} catch (e) {
|
|
504
540
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
505
541
|
}
|
|
506
|
-
else
|
|
542
|
+
else re && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
507
543
|
}
|
|
508
544
|
function disableFunctionSpanTracking() {
|
|
509
|
-
if (
|
|
510
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType:
|
|
511
|
-
|
|
545
|
+
if (re && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(se)) try {
|
|
546
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: oe };
|
|
547
|
+
se.send(JSON.stringify(e));
|
|
512
548
|
} catch (e) {
|
|
513
549
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
514
550
|
}
|
|
515
551
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
516
|
-
|
|
552
|
+
me && (pe = false, me = false, he = null, re && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== de && (window.clearTimeout(de), de = null);
|
|
517
553
|
}
|
|
518
554
|
function isFunctionSpanTrackingEnabled() {
|
|
519
|
-
return
|
|
555
|
+
return pe;
|
|
556
|
+
}
|
|
557
|
+
function initializeFunctionSpanTrackingFromApi(e) {
|
|
558
|
+
e && !pe ? (pe = true, me = false, he = null, re && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && pe && (pe = false, me = false, he = null, re && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
|
|
520
559
|
}
|
|
521
560
|
function getFuncSpanHeader() {
|
|
522
|
-
if (!
|
|
523
|
-
if (null !==
|
|
524
|
-
if (Date.now() >=
|
|
561
|
+
if (!pe) return null;
|
|
562
|
+
if (null !== he) {
|
|
563
|
+
if (Date.now() >= he) return pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
525
564
|
}
|
|
526
565
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
527
566
|
}
|
|
@@ -529,34 +568,36 @@ function getFuncSpanHeader() {
|
|
|
529
568
|
const e = (function loadGlobalFuncSpanState() {
|
|
530
569
|
try {
|
|
531
570
|
if ("undefined" == typeof localStorage) return null;
|
|
532
|
-
const e2 = localStorage.getItem(
|
|
571
|
+
const e2 = localStorage.getItem(ge);
|
|
533
572
|
if (!e2) return null;
|
|
534
573
|
const a = JSON.parse(e2);
|
|
535
|
-
return
|
|
574
|
+
return re && console.log("[Sailfish] Loaded funcSpan state from localStorage:", a), a;
|
|
536
575
|
} catch (e2) {
|
|
537
|
-
return
|
|
576
|
+
return re && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e2), null;
|
|
538
577
|
}
|
|
539
578
|
})();
|
|
540
|
-
e && e.enabled
|
|
579
|
+
if (e && e.enabled) if (pe = true, he = e.expirationTimestampMs, me = false, re && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: he }), null !== he) {
|
|
580
|
+
Date.now() >= he ? (pe = false, he = null, clearGlobalFuncSpanState(), re && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : re && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
|
|
581
|
+
} else re && console.log("[Sailfish] Module init: Function span tracking is active (no expiration, temporary until WebSocket confirms)");
|
|
541
582
|
})();
|
|
542
|
-
const
|
|
543
|
-
var
|
|
583
|
+
const ye = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
584
|
+
var we, be, ve = {}, Ce = {}, ke = {}, xe = {};
|
|
544
585
|
function requireBase64() {
|
|
545
|
-
if (
|
|
546
|
-
|
|
586
|
+
if (we) return xe;
|
|
587
|
+
we = 1;
|
|
547
588
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
548
|
-
return
|
|
589
|
+
return xe.encode = function(a) {
|
|
549
590
|
if (0 <= a && a < e.length) return e[a];
|
|
550
591
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
551
|
-
},
|
|
592
|
+
}, xe.decode = function(e2) {
|
|
552
593
|
return 65 <= e2 && e2 <= 90 ? e2 - 65 : 97 <= e2 && e2 <= 122 ? e2 - 97 + 26 : 48 <= e2 && e2 <= 57 ? e2 - 48 + 52 : 43 == e2 ? 62 : 47 == e2 ? 63 : -1;
|
|
553
|
-
},
|
|
594
|
+
}, xe;
|
|
554
595
|
}
|
|
555
596
|
function requireBase64Vlq() {
|
|
556
|
-
if (
|
|
557
|
-
|
|
597
|
+
if (be) return ke;
|
|
598
|
+
be = 1;
|
|
558
599
|
var e = requireBase64();
|
|
559
|
-
return
|
|
600
|
+
return ke.encode = function base64VLQ_encode(a) {
|
|
560
601
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
561
602
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
562
603
|
})(a);
|
|
@@ -564,7 +605,7 @@ function requireBase64Vlq() {
|
|
|
564
605
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
565
606
|
} while (w2 > 0);
|
|
566
607
|
return m2;
|
|
567
|
-
},
|
|
608
|
+
}, ke.decode = function base64VLQ_decode(a, u, m2) {
|
|
568
609
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
569
610
|
do {
|
|
570
611
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -575,11 +616,11 @@ function requireBase64Vlq() {
|
|
|
575
616
|
var a2 = e2 >> 1;
|
|
576
617
|
return 1 & ~e2 ? a2 : -a2;
|
|
577
618
|
})(x2), m2.rest = u;
|
|
578
|
-
},
|
|
619
|
+
}, ke;
|
|
579
620
|
}
|
|
580
|
-
var
|
|
621
|
+
var Me, Ie = {};
|
|
581
622
|
function requireUtil() {
|
|
582
|
-
return
|
|
623
|
+
return Me || (Me = 1, (function(e) {
|
|
583
624
|
e.getArg = function getArg(e2, a2, u2) {
|
|
584
625
|
if (a2 in e2) return e2[a2];
|
|
585
626
|
if (3 === arguments.length) return u2;
|
|
@@ -691,12 +732,12 @@ function requireUtil() {
|
|
|
691
732
|
}
|
|
692
733
|
return m2(a2);
|
|
693
734
|
};
|
|
694
|
-
})(
|
|
735
|
+
})(Ie)), Ie;
|
|
695
736
|
}
|
|
696
|
-
var
|
|
737
|
+
var Oe, Ee = {};
|
|
697
738
|
function requireArraySet() {
|
|
698
|
-
if (
|
|
699
|
-
|
|
739
|
+
if (Oe) return Ee;
|
|
740
|
+
Oe = 1;
|
|
700
741
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
701
742
|
function ArraySet() {
|
|
702
743
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -727,12 +768,12 @@ function requireArraySet() {
|
|
|
727
768
|
throw new Error("No element indexed by " + e2);
|
|
728
769
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
729
770
|
return this._array.slice();
|
|
730
|
-
},
|
|
771
|
+
}, Ee.ArraySet = ArraySet, Ee;
|
|
731
772
|
}
|
|
732
|
-
var
|
|
773
|
+
var Le, Ae, Te = {};
|
|
733
774
|
function requireMappingList() {
|
|
734
|
-
if (
|
|
735
|
-
|
|
775
|
+
if (Le) return Te;
|
|
776
|
+
Le = 1;
|
|
736
777
|
var e = requireUtil();
|
|
737
778
|
function MappingList() {
|
|
738
779
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -746,11 +787,11 @@ function requireMappingList() {
|
|
|
746
787
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
747
788
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
748
789
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
749
|
-
},
|
|
790
|
+
}, Te.MappingList = MappingList, Te;
|
|
750
791
|
}
|
|
751
792
|
function requireSourceMapGenerator() {
|
|
752
|
-
if (
|
|
753
|
-
|
|
793
|
+
if (Ae) return Ce;
|
|
794
|
+
Ae = 1;
|
|
754
795
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
755
796
|
function SourceMapGenerator(e2) {
|
|
756
797
|
e2 || (e2 = {}), this._file = a.getArg(e2, "file", null), this._sourceRoot = a.getArg(e2, "sourceRoot", null), this._skipValidation = a.getArg(e2, "skipValidation", false), this._ignoreInvalidMapping = a.getArg(e2, "ignoreInvalidMapping", false), this._sources = new u(), this._names = new u(), this._mappings = new m2(), this._sourcesContents = null;
|
|
@@ -827,11 +868,11 @@ function requireSourceMapGenerator() {
|
|
|
827
868
|
return null != this._file && (e2.file = this._file), null != this._sourceRoot && (e2.sourceRoot = this._sourceRoot), this._sourcesContents && (e2.sourcesContent = this._generateSourcesContent(e2.sources, e2.sourceRoot)), e2;
|
|
828
869
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
829
870
|
return JSON.stringify(this.toJSON());
|
|
830
|
-
},
|
|
871
|
+
}, Ce.SourceMapGenerator = SourceMapGenerator, Ce;
|
|
831
872
|
}
|
|
832
|
-
var
|
|
873
|
+
var De, Ue = {}, Be = {};
|
|
833
874
|
function requireBinarySearch() {
|
|
834
|
-
return
|
|
875
|
+
return De || (De = 1, (function(e) {
|
|
835
876
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
836
877
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
837
878
|
return 0 === I2 ? x2 : I2 > 0 ? u - x2 > 1 ? recursiveSearch(x2, u, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? u < w2.length ? u : -1 : x2 : x2 - a > 1 ? recursiveSearch(a, x2, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? x2 : a < 0 ? -1 : a;
|
|
@@ -843,11 +884,11 @@ function requireBinarySearch() {
|
|
|
843
884
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
844
885
|
return b2;
|
|
845
886
|
};
|
|
846
|
-
})(
|
|
887
|
+
})(Be)), Be;
|
|
847
888
|
}
|
|
848
|
-
var
|
|
889
|
+
var je, Ge, Ve = {};
|
|
849
890
|
function requireQuickSort() {
|
|
850
|
-
if (
|
|
891
|
+
if (je) return Ve;
|
|
851
892
|
function SortTemplate(e2) {
|
|
852
893
|
function swap(e3, a, u) {
|
|
853
894
|
var m2 = e3[a];
|
|
@@ -866,21 +907,21 @@ function requireQuickSort() {
|
|
|
866
907
|
}
|
|
867
908
|
};
|
|
868
909
|
}
|
|
869
|
-
|
|
910
|
+
je = 1;
|
|
870
911
|
let e = /* @__PURE__ */ new WeakMap();
|
|
871
|
-
return
|
|
912
|
+
return Ve.quickSort = function(a, u, m2 = 0) {
|
|
872
913
|
let w2 = e.get(u);
|
|
873
914
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
874
915
|
let a2 = SortTemplate.toString();
|
|
875
916
|
return new Function(`return ${a2}`)()(e2);
|
|
876
917
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
877
|
-
},
|
|
918
|
+
}, Ve;
|
|
878
919
|
}
|
|
879
|
-
var
|
|
880
|
-
var
|
|
881
|
-
return
|
|
882
|
-
if (
|
|
883
|
-
|
|
920
|
+
var qe, He, Je = {};
|
|
921
|
+
var Ye = (function requireSourceMap() {
|
|
922
|
+
return He || (He = 1, ve.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, ve.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
923
|
+
if (Ge) return Ue;
|
|
924
|
+
Ge = 1;
|
|
884
925
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
885
926
|
function SourceMapConsumer(a2, u2) {
|
|
886
927
|
var m3 = a2;
|
|
@@ -937,7 +978,7 @@ var Je = (function requireSourceMap() {
|
|
|
937
978
|
else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e.getArg(x2, "generatedLine", null), column: e.getArg(x2, "generatedColumn", null), lastColumn: e.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
|
|
938
979
|
}
|
|
939
980
|
return b3;
|
|
940
|
-
},
|
|
981
|
+
}, Ue.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
941
982
|
var u2, m3 = a2;
|
|
942
983
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
943
984
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1054,7 +1095,7 @@ var Je = (function requireSourceMap() {
|
|
|
1054
1095
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1055
1096
|
}
|
|
1056
1097
|
return { line: null, column: null, lastColumn: null };
|
|
1057
|
-
},
|
|
1098
|
+
}, Ue.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1058
1099
|
for (var e2 = [], a2 = 0; a2 < this._sections.length; a2++) for (var u2 = 0; u2 < this._sections[a2].consumer.sources.length; u2++) e2.push(this._sections[a2].consumer.sources[u2]);
|
|
1059
1100
|
return e2;
|
|
1060
1101
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1093,10 +1134,10 @@ var Je = (function requireSourceMap() {
|
|
|
1093
1134
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1094
1135
|
}
|
|
1095
1136
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1096
|
-
},
|
|
1097
|
-
})().SourceMapConsumer,
|
|
1098
|
-
if (
|
|
1099
|
-
|
|
1137
|
+
}, Ue.IndexedSourceMapConsumer = IndexedSourceMapConsumer, Ue;
|
|
1138
|
+
})().SourceMapConsumer, ve.SourceNode = (function requireSourceNode() {
|
|
1139
|
+
if (qe) return Je;
|
|
1140
|
+
qe = 1;
|
|
1100
1141
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1101
1142
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1102
1143
|
this.children = [], this.sourceContents = {}, this.line = null == e2 ? null : e2, this.column = null == a2 ? null : a2, this.source = null == u2 ? null : u2, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
|
|
@@ -1180,20 +1221,20 @@ var Je = (function requireSourceMap() {
|
|
|
1180
1221
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1181
1222
|
m3.setSourceContent(e2, a3);
|
|
1182
1223
|
}), { code: u2.code, map: m3 };
|
|
1183
|
-
},
|
|
1184
|
-
})().SourceNode),
|
|
1224
|
+
}, Je.SourceNode = SourceNode, Je;
|
|
1225
|
+
})().SourceNode), ve;
|
|
1185
1226
|
})();
|
|
1186
|
-
const
|
|
1227
|
+
const Xe = /* @__PURE__ */ new Map(), Qe = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1187
1228
|
async function getConsumerFor(e, a) {
|
|
1188
1229
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1189
1230
|
for (const e2 of m2) try {
|
|
1190
|
-
if (
|
|
1231
|
+
if (Xe.has(e2)) return Xe.get(e2);
|
|
1191
1232
|
const a2 = await fetch(e2);
|
|
1192
1233
|
if (!a2.ok) continue;
|
|
1193
1234
|
const u2 = await a2.json();
|
|
1194
1235
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1195
|
-
const m3 = await new
|
|
1196
|
-
return
|
|
1236
|
+
const m3 = await new Ye.SourceMapConsumer(u2);
|
|
1237
|
+
return Xe.set(e2, m3), m3;
|
|
1197
1238
|
} catch {
|
|
1198
1239
|
}
|
|
1199
1240
|
return null;
|
|
@@ -1205,7 +1246,7 @@ async function captureError(e, a = false) {
|
|
|
1205
1246
|
if (!e2) return ["No stack trace available"];
|
|
1206
1247
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1207
1248
|
for (const e3 of a2) {
|
|
1208
|
-
const a3 = e3.match(
|
|
1249
|
+
const a3 = e3.match(Qe);
|
|
1209
1250
|
if (!a3) {
|
|
1210
1251
|
u2.push(e3);
|
|
1211
1252
|
continue;
|
|
@@ -1220,8 +1261,8 @@ async function captureError(e, a = false) {
|
|
|
1220
1261
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1221
1262
|
continue;
|
|
1222
1263
|
}
|
|
1223
|
-
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias:
|
|
1224
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias:
|
|
1264
|
+
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias: Ye.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1265
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias: Ye.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1225
1266
|
if (O2.source && null != O2.line) {
|
|
1226
1267
|
const e4 = O2.name || "anonymous";
|
|
1227
1268
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1231,11 +1272,11 @@ async function captureError(e, a = false) {
|
|
|
1231
1272
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), C2 = b2.length > 0 ? b2 : w2, x2 = Date.now();
|
|
1232
1273
|
sendMessage({ type: "event", event: { type: 6, timestamp: x2, data: { payload: { message: u, stack: m2, trace: C2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: x2, level: "error" } } } });
|
|
1233
1274
|
}
|
|
1234
|
-
const Qe = readDebugFlag();
|
|
1235
1275
|
const et = readDebugFlag();
|
|
1276
|
+
const nt = readDebugFlag();
|
|
1236
1277
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1237
1278
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1238
|
-
return
|
|
1279
|
+
return nt && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1239
1280
|
let b3 = 0;
|
|
1240
1281
|
const attemptRequest = async () => {
|
|
1241
1282
|
try {
|
|
@@ -1243,18 +1284,21 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1243
1284
|
} catch (e3) {
|
|
1244
1285
|
if (b3++, b3 > u2) throw e3;
|
|
1245
1286
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1246
|
-
return
|
|
1287
|
+
return et && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1247
1288
|
}
|
|
1248
1289
|
};
|
|
1249
1290
|
return attemptRequest();
|
|
1250
1291
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1251
|
-
if (
|
|
1292
|
+
if (nt && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1252
1293
|
return e2.json();
|
|
1253
1294
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1254
1295
|
}
|
|
1255
1296
|
function fetchCaptureSettings(e, a) {
|
|
1256
1297
|
return sendGraphQLRequest("GetCaptureSettingsFromApiKey", "\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ", { apiKey: e, backendApi: a });
|
|
1257
1298
|
}
|
|
1299
|
+
function fetchFunctionSpanTrackingEnabled(e, a) {
|
|
1300
|
+
return sendGraphQLRequest("GetFunctionSpanTrackingEnabledFromApiKey", "\n query GetFunctionSpanTrackingEnabledFromApiKey($apiKey: String!) {\n isFunctionSpanTrackingEnabledFromApiKey(apiKey: $apiKey)\n }\n ", { apiKey: e, backendApi: a });
|
|
1301
|
+
}
|
|
1258
1302
|
function startRecordingSession(e, a, u, m2, w2, b2, C2, x2, I2) {
|
|
1259
1303
|
return sendGraphQLRequest("StartSession", "mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }", { apiKey: e, recordingSessionId: a, backendApi: u, serviceIdentifier: m2, serviceVersion: w2, mapUuid: b2, gitSha: C2, library: x2, serviceAdditionalMetadata: I2, startRecordingFilePath: null, startRecordingLineNumber: null });
|
|
1260
1304
|
}
|
|
@@ -1264,9 +1308,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1264
1308
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1265
1309
|
return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ", { apiKey: e, recordingSessionId: u, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a });
|
|
1266
1310
|
}
|
|
1267
|
-
const
|
|
1311
|
+
const ot = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, st = { shortcuts: { ...ot }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1268
1312
|
} };
|
|
1269
|
-
let
|
|
1313
|
+
let it = null, at = { mode: "lookback", description: "" }, lt = null, ct = null, ut = null, pt = false;
|
|
1270
1314
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1271
1315
|
return (function isMacPlatform() {
|
|
1272
1316
|
const e = navigator.userAgentData;
|
|
@@ -1279,11 +1323,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1279
1323
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1280
1324
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1281
1325
|
})(e2.key)), a.map((e3) => `<span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; padding: 0 4px; font-weight: 500; font-size: 12px; color: #94A3B8; line-height: 16px;">${e3}</span>`).join(e2.requireCmdCtrl ? " + " : "");
|
|
1282
|
-
})(
|
|
1326
|
+
})(st.shortcuts[e]);
|
|
1283
1327
|
}
|
|
1284
1328
|
function setupIssueReporting(e) {
|
|
1285
|
-
|
|
1286
|
-
const a2 = { ...
|
|
1329
|
+
st.apiKey = e.apiKey, st.backendApi = e.backendApi, st.resolveSessionId = e.getSessionId, e.customBaseUrl && (st.triageBaseUrl = e.customBaseUrl), st.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1330
|
+
const a2 = { ...ot };
|
|
1287
1331
|
if (!e2) return a2;
|
|
1288
1332
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1289
1333
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1293,7 +1337,7 @@ function setupIssueReporting(e) {
|
|
|
1293
1337
|
}
|
|
1294
1338
|
return a2;
|
|
1295
1339
|
})(e.shortcuts);
|
|
1296
|
-
const { shortcuts: a } =
|
|
1340
|
+
const { shortcuts: a } = st;
|
|
1297
1341
|
window.addEventListener("keydown", (e2) => {
|
|
1298
1342
|
const u = (function isTypingInInput() {
|
|
1299
1343
|
const e3 = document.activeElement;
|
|
@@ -1303,23 +1347,23 @@ function setupIssueReporting(e) {
|
|
|
1303
1347
|
} : injectModalHTML;
|
|
1304
1348
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1305
1349
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1306
|
-
if (b2 && !
|
|
1350
|
+
if (b2 && !pt && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1307
1351
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1308
1352
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1309
1353
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1310
1354
|
}
|
|
1311
|
-
if (
|
|
1312
|
-
if (b2 && "startnow" ===
|
|
1355
|
+
if (pt && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1356
|
+
if (b2 && "startnow" === at.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1313
1357
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1314
1358
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1315
1359
|
}
|
|
1316
1360
|
});
|
|
1317
1361
|
}
|
|
1318
1362
|
function openReportIssueModal() {
|
|
1319
|
-
|
|
1363
|
+
pt ? stopRecording() : (injectModalHTML(), it && document.body.appendChild(it));
|
|
1320
1364
|
}
|
|
1321
1365
|
function closeModal() {
|
|
1322
|
-
|
|
1366
|
+
st.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (it == null ? void 0 : it.parentNode) && it.parentNode.removeChild(it), it = null, pt || (at = { mode: "lookback", description: "", occurredInThisTab: true }, lt = null, ct = null), ut && clearInterval(ut);
|
|
1323
1367
|
}
|
|
1324
1368
|
function activateModalIsolation(e) {
|
|
1325
1369
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1378,9 +1422,9 @@ function activateModalIsolation(e) {
|
|
|
1378
1422
|
};
|
|
1379
1423
|
}
|
|
1380
1424
|
function injectModalHTML(e = "lookback") {
|
|
1381
|
-
|
|
1425
|
+
it && (it.remove(), it = null), it = document.createElement("div"), it.id = "sf-report-issue-modal";
|
|
1382
1426
|
const a = "startnow" === e;
|
|
1383
|
-
|
|
1427
|
+
it.innerHTML = `
|
|
1384
1428
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1385
1429
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1386
1430
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1428,7 +1472,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1428
1472
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1429
1473
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1430
1474
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1431
|
-
resize:none; outline:none;">${
|
|
1475
|
+
resize:none; outline:none;">${at.description}</textarea>
|
|
1432
1476
|
|
|
1433
1477
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1434
1478
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1516,8 +1560,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1516
1560
|
<a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>
|
|
1517
1561
|
</div>
|
|
1518
1562
|
</div>
|
|
1519
|
-
`,
|
|
1520
|
-
const e2 =
|
|
1563
|
+
`, at.mode = e, document.body.appendChild(it), (function bindListeners() {
|
|
1564
|
+
const e2 = it == null ? void 0 : it.querySelectorAll(".sf-issue-tab"), a2 = document.getElementById("sf-start-recording-btn"), u = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
|
|
1521
1565
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1522
1566
|
e3.addEventListener("click", (e4) => {
|
|
1523
1567
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1525,11 +1569,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1525
1569
|
});
|
|
1526
1570
|
}), u && (u.onclick = closeModal);
|
|
1527
1571
|
w2 && w2.addEventListener("change", () => {
|
|
1528
|
-
"lookback" ===
|
|
1572
|
+
"lookback" === at.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1529
1573
|
});
|
|
1530
1574
|
a2 && (a2.onclick = () => {
|
|
1531
1575
|
const e3 = document.getElementById("sf-issue-description");
|
|
1532
|
-
e3 && (
|
|
1576
|
+
e3 && (at.description = e3.value), (function startCountdownThenRecord() {
|
|
1533
1577
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1534
1578
|
const e4 = document.createElement("div");
|
|
1535
1579
|
e4.id = "sf-countdown-overlay", e4.style.cssText = "\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";
|
|
@@ -1538,9 +1582,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1538
1582
|
const u2 = setInterval(async () => {
|
|
1539
1583
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1540
1584
|
else {
|
|
1541
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1585
|
+
clearInterval(u2), document.body.removeChild(e4), lt = Date.now(), pt = true;
|
|
1542
1586
|
try {
|
|
1543
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1587
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => ye);
|
|
1544
1588
|
e5();
|
|
1545
1589
|
} catch (e5) {
|
|
1546
1590
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1566,8 +1610,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1566
1610
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1567
1611
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1568
1612
|
if (!a4) return;
|
|
1569
|
-
|
|
1570
|
-
const e6 = Date.now() - (
|
|
1613
|
+
ut = setInterval(() => {
|
|
1614
|
+
const e6 = Date.now() - (lt ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1571
1615
|
a4.textContent = `${u3}:${m3}`;
|
|
1572
1616
|
}, 1e3);
|
|
1573
1617
|
})();
|
|
@@ -1575,12 +1619,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1575
1619
|
}, 1e3);
|
|
1576
1620
|
})();
|
|
1577
1621
|
});
|
|
1578
|
-
|
|
1622
|
+
it == null ? void 0 : it.addEventListener("click", (e3) => {
|
|
1579
1623
|
var _a2;
|
|
1580
1624
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1581
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1625
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = at.mode;
|
|
1582
1626
|
let u2, m3;
|
|
1583
|
-
if (
|
|
1627
|
+
if (at.description = e4, "startnow" === a3) u2 = lt ?? Date.now() - 3e5, m3 = ct ?? Date.now();
|
|
1584
1628
|
else {
|
|
1585
1629
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1586
1630
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1589,9 +1633,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1589
1633
|
var _a3, _b;
|
|
1590
1634
|
try {
|
|
1591
1635
|
showTriageStatusModal(true);
|
|
1592
|
-
const m4 = await createTriageFromRecorder(
|
|
1593
|
-
if (!
|
|
1594
|
-
return
|
|
1636
|
+
const m4 = await createTriageFromRecorder(st.apiKey, st.backendApi, (function getSessionIdSafely() {
|
|
1637
|
+
if (!st.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1638
|
+
return st.resolveSessionId();
|
|
1595
1639
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1596
1640
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1597
1641
|
} catch (e6) {
|
|
@@ -1600,29 +1644,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1600
1644
|
})(`${u2}`, `${m3}`, e4);
|
|
1601
1645
|
}
|
|
1602
1646
|
});
|
|
1603
|
-
})(),
|
|
1647
|
+
})(), st.deactivateIsolation = activateModalIsolation(it);
|
|
1604
1648
|
}
|
|
1605
1649
|
function setActiveTab(e) {
|
|
1606
|
-
|
|
1607
|
-
const a =
|
|
1650
|
+
at.mode = e;
|
|
1651
|
+
const a = it == null ? void 0 : it.querySelector("#sf-tab-lookback"), u = it == null ? void 0 : it.querySelector("#sf-tab-startnow");
|
|
1608
1652
|
"lookback" === e ? (a.style.background = "white", a.style.color = "#0F172A", u.style.background = "transparent", u.style.color = "#64748B") : (u.style.background = "white", u.style.color = "#0F172A", a.style.background = "transparent", a.style.color = "#64748B");
|
|
1609
1653
|
}
|
|
1610
1654
|
function updateModeSpecificUI(e) {
|
|
1611
1655
|
const a = document.querySelector("#sf-issue-mode-info div"), u = document.getElementById("sf-issue-submit-btn"), m2 = document.getElementById("sf-record-button-container"), w2 = document.getElementById("sf-recording-timer-label"), b2 = document.getElementById("sf-recording-timer-display"), C2 = document.getElementById("sf-modal-footer"), x2 = document.getElementById("sf-lookback-container");
|
|
1612
1656
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1613
1657
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1614
|
-
const e2 = null !==
|
|
1615
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1616
|
-
const e3 = Math.floor((
|
|
1658
|
+
const e2 = null !== lt && null !== ct;
|
|
1659
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", lt && ct) {
|
|
1660
|
+
const e3 = Math.floor((ct - lt) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1617
1661
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1618
1662
|
} else w2.style.display = "none";
|
|
1619
1663
|
} else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a.textContent = "Something already happened. Capture the past few minutes.", u.disabled = false, u.style.opacity = "1", u.style.cursor = "pointer";
|
|
1620
1664
|
}
|
|
1621
1665
|
async function stopRecording() {
|
|
1622
1666
|
var _a2;
|
|
1623
|
-
|
|
1667
|
+
ct = Date.now(), pt = false, ut && clearInterval(ut), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1624
1668
|
try {
|
|
1625
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1669
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => ye);
|
|
1626
1670
|
e();
|
|
1627
1671
|
} catch (e) {
|
|
1628
1672
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1635,17 +1679,17 @@ async function stopRecording() {
|
|
|
1635
1679
|
a2 && (a2.textContent = "Re-record");
|
|
1636
1680
|
}
|
|
1637
1681
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1638
|
-
if (a && u &&
|
|
1639
|
-
const e2 = Math.floor((
|
|
1682
|
+
if (a && u && lt && ct) {
|
|
1683
|
+
const e2 = Math.floor((ct - lt) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1640
1684
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1641
1685
|
}
|
|
1642
1686
|
const m2 = document.getElementById("sf-issue-description");
|
|
1643
|
-
m2 && (m2.value =
|
|
1687
|
+
m2 && (m2.value = at.description);
|
|
1644
1688
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1645
1689
|
w2 && (w2.checked = true);
|
|
1646
1690
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1647
1691
|
if (b2 && C2) {
|
|
1648
|
-
const e2 = Math.floor(((
|
|
1692
|
+
const e2 = Math.floor(((ct ?? 0) - (lt ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1649
1693
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1650
1694
|
}
|
|
1651
1695
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1658,7 +1702,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1658
1702
|
var _a3, _b;
|
|
1659
1703
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1660
1704
|
})();
|
|
1661
|
-
const u = a ? `${
|
|
1705
|
+
const u = a ? `${st.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1662
1706
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1663
1707
|
const w2 = e ? "Reporting Issue..." : "Issue reported!", b2 = e ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e ? '<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>' : "", x2 = e ? "" : '<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';
|
|
1664
1708
|
m2.innerHTML = `
|
|
@@ -1720,7 +1764,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1720
1764
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1721
1765
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1722
1766
|
}
|
|
1723
|
-
var
|
|
1767
|
+
var dt = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? dt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ht = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? ht(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), gt = ((e) => (e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment", e))(gt || {});
|
|
1724
1768
|
function vr(e) {
|
|
1725
1769
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1726
1770
|
}
|
|
@@ -1762,7 +1806,7 @@ function kr(e) {
|
|
|
1762
1806
|
})(e.cssText);
|
|
1763
1807
|
return a || e.cssText;
|
|
1764
1808
|
}
|
|
1765
|
-
let
|
|
1809
|
+
let yt = class {
|
|
1766
1810
|
constructor() {
|
|
1767
1811
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1768
1812
|
}
|
|
@@ -1814,7 +1858,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1814
1858
|
function fe(e) {
|
|
1815
1859
|
return e.toLowerCase();
|
|
1816
1860
|
}
|
|
1817
|
-
const
|
|
1861
|
+
const wt = "__rrweb_original__";
|
|
1818
1862
|
function Yt(e) {
|
|
1819
1863
|
const a = e.type;
|
|
1820
1864
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1829,19 +1873,19 @@ function xr(e, a) {
|
|
|
1829
1873
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1830
1874
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1831
1875
|
}
|
|
1832
|
-
let
|
|
1833
|
-
const
|
|
1876
|
+
let St = 1;
|
|
1877
|
+
const bt = new RegExp("[^a-z0-9-_:]");
|
|
1834
1878
|
function Ir() {
|
|
1835
|
-
return
|
|
1879
|
+
return St++;
|
|
1836
1880
|
}
|
|
1837
|
-
let
|
|
1838
|
-
const
|
|
1881
|
+
let vt, Ct;
|
|
1882
|
+
const kt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, xt = /^(?:[a-z+]+:)?\/\//i, Mt = /^www\..*/i, It = /^(data:)([^,]*),(.*)/i;
|
|
1839
1883
|
function Pt(e, a) {
|
|
1840
|
-
return (e || "").replace(
|
|
1884
|
+
return (e || "").replace(kt, (e2, u, m2, w2, b2, C2) => {
|
|
1841
1885
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1842
1886
|
if (!x2) return e2;
|
|
1843
|
-
if (
|
|
1844
|
-
if (
|
|
1887
|
+
if (xt.test(x2) || Mt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1888
|
+
if (It.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1845
1889
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1846
1890
|
let a2 = "";
|
|
1847
1891
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1852,8 +1896,8 @@ function Pt(e, a) {
|
|
|
1852
1896
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1853
1897
|
});
|
|
1854
1898
|
}
|
|
1855
|
-
const
|
|
1856
|
-
const
|
|
1899
|
+
const Et = /^[^ \t\n\r\u000c]+/, Lt = /^[, \t\n\r\u000c]+/;
|
|
1900
|
+
const Rt = /* @__PURE__ */ new WeakMap();
|
|
1857
1901
|
function At(e, a) {
|
|
1858
1902
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1859
1903
|
}
|
|
@@ -1861,8 +1905,8 @@ function Fi(e) {
|
|
|
1861
1905
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1862
1906
|
}
|
|
1863
1907
|
function $t(e, a) {
|
|
1864
|
-
let u =
|
|
1865
|
-
if (u || (u = e.createElement("a"),
|
|
1908
|
+
let u = Rt.get(e);
|
|
1909
|
+
if (u || (u = e.createElement("a"), Rt.set(e, u)), a) {
|
|
1866
1910
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1867
1911
|
} else a = "";
|
|
1868
1912
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1877,8 +1921,8 @@ function Mr(e, a, u, m2) {
|
|
|
1877
1921
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1878
1922
|
}
|
|
1879
1923
|
const m3 = [];
|
|
1880
|
-
for (; n(
|
|
1881
|
-
let w2 = n(
|
|
1924
|
+
for (; n(Lt), !(u2 >= a2.length); ) {
|
|
1925
|
+
let w2 = n(Et);
|
|
1882
1926
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1883
1927
|
else {
|
|
1884
1928
|
let b2 = "";
|
|
@@ -1948,9 +1992,9 @@ function zi(e, a) {
|
|
|
1948
1992
|
})(u, m2);
|
|
1949
1993
|
switch (e.nodeType) {
|
|
1950
1994
|
case e.DOCUMENT_NODE:
|
|
1951
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1995
|
+
return "CSS1Compat" !== e.compatMode ? { type: gt.Document, childNodes: [], compatMode: e.compatMode } : { type: gt.Document, childNodes: [] };
|
|
1952
1996
|
case e.DOCUMENT_TYPE_NODE:
|
|
1953
|
-
return { type:
|
|
1997
|
+
return { type: gt.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1954
1998
|
case e.ELEMENT_NODE:
|
|
1955
1999
|
return (function Vi(e2, a2) {
|
|
1956
2000
|
const { doc: u2, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a2, U3 = (function Ui(e3, a3, u3) {
|
|
@@ -1968,7 +2012,7 @@ function zi(e, a) {
|
|
|
1968
2012
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1969
2013
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1970
2014
|
const a3 = fe(e3.tagName);
|
|
1971
|
-
return
|
|
2015
|
+
return bt.test(a3) ? "div" : a3;
|
|
1972
2016
|
})(e2);
|
|
1973
2017
|
let $3 = {};
|
|
1974
2018
|
const z2 = e2.attributes.length;
|
|
@@ -1997,7 +2041,7 @@ function zi(e, a) {
|
|
|
1997
2041
|
const a3 = e3.getContext("2d");
|
|
1998
2042
|
if (!a3) return true;
|
|
1999
2043
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
2000
|
-
const w4 = a3.getImageData, b4 =
|
|
2044
|
+
const w4 = a3.getImageData, b4 = wt in w4 ? w4[wt] : w4;
|
|
2001
2045
|
if (new Uint32Array(b4.call(a3, u3, m4, Math.min(50, e3.width - u3), Math.min(50, e3.height - m4)).data.buffer).some((e4) => 0 !== e4)) return false;
|
|
2002
2046
|
}
|
|
2003
2047
|
return true;
|
|
@@ -2009,11 +2053,11 @@ function zi(e, a) {
|
|
|
2009
2053
|
}
|
|
2010
2054
|
}
|
|
2011
2055
|
if ("img" === B3 && _3) {
|
|
2012
|
-
|
|
2056
|
+
vt || (vt = u2.createElement("canvas"), Ct = vt.getContext("2d"));
|
|
2013
2057
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
2014
2058
|
a3.removeEventListener("load", A);
|
|
2015
2059
|
try {
|
|
2016
|
-
|
|
2060
|
+
vt.width = a3.naturalWidth, vt.height = a3.naturalHeight, Ct.drawImage(a3, 0, 0), $3.rr_dataURL = vt.toDataURL(I3.type, I3.quality);
|
|
2017
2061
|
} catch (e3) {
|
|
2018
2062
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
2019
2063
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2036,7 +2080,7 @@ function zi(e, a) {
|
|
|
2036
2080
|
customElements.get(B3) && (j2 = true);
|
|
2037
2081
|
} catch {
|
|
2038
2082
|
}
|
|
2039
|
-
return { type:
|
|
2083
|
+
return { type: gt.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2040
2084
|
})(e, { doc: u, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
|
|
2041
2085
|
case e.TEXT_NODE:
|
|
2042
2086
|
return (function ji(e2, a2) {
|
|
@@ -2052,12 +2096,12 @@ function zi(e, a) {
|
|
|
2052
2096
|
}
|
|
2053
2097
|
x3 = Pt(x3, $t(a2.doc));
|
|
2054
2098
|
}
|
|
2055
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2099
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: gt.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2056
2100
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2057
2101
|
case e.CDATA_SECTION_NODE:
|
|
2058
|
-
return { type:
|
|
2102
|
+
return { type: gt.CDATA, textContent: "", rootId: $2 };
|
|
2059
2103
|
case e.COMMENT_NODE:
|
|
2060
|
-
return { type:
|
|
2104
|
+
return { type: gt.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2061
2105
|
default:
|
|
2062
2106
|
return false;
|
|
2063
2107
|
}
|
|
@@ -2073,21 +2117,21 @@ function Se(e, a) {
|
|
|
2073
2117
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2074
2118
|
let te2;
|
|
2075
2119
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2076
|
-
return !!(a2.comment && e2.type ===
|
|
2077
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2120
|
+
return !!(a2.comment && e2.type === gt.Comment || e2.type === gt.Element && (a2.script && ("script" === e2.tagName || "link" === e2.tagName && ("preload" === e2.attributes.rel || "modulepreload" === e2.attributes.rel) && "script" === e2.attributes.as || "link" === e2.tagName && "prefetch" === e2.attributes.rel && "string" == typeof e2.attributes.href && "js" === xr(e2.attributes.href)) || a2.headFavicon && ("link" === e2.tagName && "shortcut icon" === e2.attributes.rel || "meta" === e2.tagName && (N(e2.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e2.attributes.name) || "icon" === N(e2.attributes.rel) || "apple-touch-icon" === N(e2.attributes.rel) || "shortcut icon" === N(e2.attributes.rel))) || "meta" === e2.tagName && (a2.headMetaDescKeywords && N(e2.attributes.name).match(/^description|keywords$/) || a2.headMetaSocial && (N(e2.attributes.property).match(/^(og|twitter|fb):/) || N(e2.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e2.attributes.name)) || a2.headMetaRobots && ("robots" === N(e2.attributes.name) || "googlebot" === N(e2.attributes.name) || "bingbot" === N(e2.attributes.name)) || a2.headMetaHttpEquiv && void 0 !== e2.attributes["http-equiv"] || a2.headMetaAuthorship && ("author" === N(e2.attributes.name) || "generator" === N(e2.attributes.name) || "framework" === N(e2.attributes.name) || "publisher" === N(e2.attributes.name) || "progid" === N(e2.attributes.name) || N(e2.attributes.property).match(/^article:/) || N(e2.attributes.property).match(/^product:/)) || a2.headMetaVerification && ("google-site-verification" === N(e2.attributes.name) || "yandex-verification" === N(e2.attributes.name) || "csrf-token" === N(e2.attributes.name) || "p:domain_verify" === N(e2.attributes.name) || "verify-v1" === N(e2.attributes.name) || "verification" === N(e2.attributes.name) || "shopify-checkout-api-token" === N(e2.attributes.name)))));
|
|
2121
|
+
})(ee2, F2) || !Q2 && ee2.type === gt.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2078
2122
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2079
2123
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2080
2124
|
z2 && z2(e);
|
|
2081
2125
|
let re2 = !I2;
|
|
2082
|
-
if (ne2.type ===
|
|
2126
|
+
if (ne2.type === gt.Element) {
|
|
2083
2127
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2084
2128
|
const a2 = e.shadowRoot;
|
|
2085
2129
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2086
2130
|
}
|
|
2087
|
-
if ((ne2.type ===
|
|
2088
|
-
F2.headWhitespace && ne2.type ===
|
|
2131
|
+
if ((ne2.type === gt.Document || ne2.type === gt.Element) && re2) {
|
|
2132
|
+
F2.headWhitespace && ne2.type === gt.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2089
2133
|
const a2 = { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 };
|
|
2090
|
-
if (ne2.type !==
|
|
2134
|
+
if (ne2.type !== gt.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2091
2135
|
const e2 = Se(u2, a2);
|
|
2092
2136
|
e2 && ne2.childNodes.push(e2);
|
|
2093
2137
|
}
|
|
@@ -2096,7 +2140,7 @@ function Se(e, a) {
|
|
|
2096
2140
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2097
2141
|
}
|
|
2098
2142
|
}
|
|
2099
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2143
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === gt.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2100
2144
|
const m3 = e2.contentWindow;
|
|
2101
2145
|
if (!m3) return;
|
|
2102
2146
|
let w3, b3 = false;
|
|
@@ -2122,7 +2166,7 @@ function Se(e, a) {
|
|
|
2122
2166
|
const u2 = Se(a2, { doc: a2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 });
|
|
2123
2167
|
u2 && j2(e, u2);
|
|
2124
2168
|
}
|
|
2125
|
-
}, V2), ne2.type ===
|
|
2169
|
+
}, V2), ne2.type === gt.Element && "link" === ne2.tagName && "string" == typeof ne2.attributes.rel && ("stylesheet" === ne2.attributes.rel || "preload" === ne2.attributes.rel && "string" == typeof ne2.attributes.href && "css" === xr(ne2.attributes.href)) && (function Wi(e2, a2, u2) {
|
|
2126
2170
|
let m3, w3 = false;
|
|
2127
2171
|
try {
|
|
2128
2172
|
m3 = e2.sheet;
|
|
@@ -2162,13 +2206,13 @@ function $i(e) {
|
|
|
2162
2206
|
} });
|
|
2163
2207
|
}), u;
|
|
2164
2208
|
}
|
|
2165
|
-
var
|
|
2166
|
-
return { isColorSupported: false, reset:
|
|
2209
|
+
var Dt = { exports: {} }, Ft = String, Rr = function() {
|
|
2210
|
+
return { isColorSupported: false, reset: Ft, bold: Ft, dim: Ft, italic: Ft, underline: Ft, inverse: Ft, hidden: Ft, strikethrough: Ft, black: Ft, red: Ft, green: Ft, yellow: Ft, blue: Ft, magenta: Ft, cyan: Ft, white: Ft, gray: Ft, bgBlack: Ft, bgRed: Ft, bgGreen: Ft, bgYellow: Ft, bgBlue: Ft, bgMagenta: Ft, bgCyan: Ft, bgWhite: Ft, blackBright: Ft, redBright: Ft, greenBright: Ft, yellowBright: Ft, blueBright: Ft, magentaBright: Ft, cyanBright: Ft, whiteBright: Ft, bgBlackBright: Ft, bgRedBright: Ft, bgGreenBright: Ft, bgYellowBright: Ft, bgBlueBright: Ft, bgMagentaBright: Ft, bgCyanBright: Ft, bgWhiteBright: Ft };
|
|
2167
2211
|
};
|
|
2168
|
-
|
|
2169
|
-
var
|
|
2170
|
-
const
|
|
2171
|
-
let
|
|
2212
|
+
Dt.exports = Rr(), Dt.exports.createColors = Rr;
|
|
2213
|
+
var Ut = Dt.exports;
|
|
2214
|
+
const Bt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2215
|
+
let Wt = Ut, jt = Bt, Vt = class Lr extends Error {
|
|
2172
2216
|
constructor(e, a, u, m2, w2, b2) {
|
|
2173
2217
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
|
|
2174
2218
|
}
|
|
@@ -2178,11 +2222,11 @@ let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
|
2178
2222
|
showSourceCode(e) {
|
|
2179
2223
|
if (!this.source) return "";
|
|
2180
2224
|
let a = this.source;
|
|
2181
|
-
null == e && (e =
|
|
2225
|
+
null == e && (e = Wt.isColorSupported);
|
|
2182
2226
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2183
2227
|
if (e) {
|
|
2184
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2185
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2228
|
+
let { bold: e2, gray: a2, red: u2 } = Wt.createColors(true);
|
|
2229
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), jt && (i = (e3) => jt(e3));
|
|
2186
2230
|
}
|
|
2187
2231
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
2188
2232
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2203,10 +2247,10 @@ let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
|
2203
2247
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2204
2248
|
}
|
|
2205
2249
|
};
|
|
2206
|
-
var
|
|
2207
|
-
|
|
2208
|
-
const
|
|
2209
|
-
let
|
|
2250
|
+
var Ht = Vt;
|
|
2251
|
+
Vt.default = Vt;
|
|
2252
|
+
const Kt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2253
|
+
let Jt = class {
|
|
2210
2254
|
constructor(e) {
|
|
2211
2255
|
this.builder = e;
|
|
2212
2256
|
}
|
|
@@ -2258,7 +2302,7 @@ let Kt = class {
|
|
|
2258
2302
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2259
2303
|
let w2 = e.parent;
|
|
2260
2304
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2261
|
-
if (!w2) return
|
|
2305
|
+
if (!w2) return Kt[u];
|
|
2262
2306
|
let b2 = e.root();
|
|
2263
2307
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2264
2308
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2270,7 +2314,7 @@ let Kt = class {
|
|
|
2270
2314
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2271
2315
|
});
|
|
2272
2316
|
}
|
|
2273
|
-
return typeof m2 > "u" && (m2 =
|
|
2317
|
+
return typeof m2 > "u" && (m2 = Kt[u]), b2.rawCache[u] = m2, m2;
|
|
2274
2318
|
}
|
|
2275
2319
|
rawBeforeClose(e) {
|
|
2276
2320
|
let a;
|
|
@@ -2346,17 +2390,17 @@ let Kt = class {
|
|
|
2346
2390
|
this[e.type](e, a);
|
|
2347
2391
|
}
|
|
2348
2392
|
};
|
|
2349
|
-
var
|
|
2350
|
-
|
|
2351
|
-
let
|
|
2393
|
+
var Xt = Jt;
|
|
2394
|
+
Jt.default = Jt;
|
|
2395
|
+
let Qt = Xt;
|
|
2352
2396
|
function ks(e, a) {
|
|
2353
|
-
new
|
|
2397
|
+
new Qt(a).stringify(e);
|
|
2354
2398
|
}
|
|
2355
|
-
var
|
|
2399
|
+
var en = ks;
|
|
2356
2400
|
ks.default = ks;
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
let
|
|
2401
|
+
var tn = {};
|
|
2402
|
+
tn.isClean = Symbol("isClean"), tn.my = Symbol("my");
|
|
2403
|
+
let nn = Ht, rn = Xt, on = en, { isClean: sn, my: an } = tn;
|
|
2360
2404
|
function Cs(e, a) {
|
|
2361
2405
|
let u = new e.constructor();
|
|
2362
2406
|
for (let m2 in e) {
|
|
@@ -2378,12 +2422,12 @@ function Pe(e, a) {
|
|
|
2378
2422
|
}
|
|
2379
2423
|
return w2;
|
|
2380
2424
|
}
|
|
2381
|
-
let
|
|
2425
|
+
let ln = class {
|
|
2382
2426
|
get proxyOf() {
|
|
2383
2427
|
return this;
|
|
2384
2428
|
}
|
|
2385
2429
|
constructor(e = {}) {
|
|
2386
|
-
this.raws = {}, this[
|
|
2430
|
+
this.raws = {}, this[sn] = false, this[an] = true;
|
|
2387
2431
|
for (let a in e) if ("nodes" === a) {
|
|
2388
2432
|
this.nodes = [];
|
|
2389
2433
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2427,19 +2471,19 @@ let an = class {
|
|
|
2427
2471
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2428
2472
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2429
2473
|
}
|
|
2430
|
-
return new
|
|
2474
|
+
return new nn(e);
|
|
2431
2475
|
}
|
|
2432
2476
|
getProxyProcessor() {
|
|
2433
2477
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
2434
2478
|
}
|
|
2435
2479
|
markClean() {
|
|
2436
|
-
this[
|
|
2480
|
+
this[sn] = true;
|
|
2437
2481
|
}
|
|
2438
2482
|
markDirty() {
|
|
2439
|
-
if (this[
|
|
2440
|
-
this[
|
|
2483
|
+
if (this[sn]) {
|
|
2484
|
+
this[sn] = false;
|
|
2441
2485
|
let e = this;
|
|
2442
|
-
for (; e = e.parent; ) e[
|
|
2486
|
+
for (; e = e.parent; ) e[sn] = false;
|
|
2443
2487
|
}
|
|
2444
2488
|
}
|
|
2445
2489
|
next() {
|
|
@@ -2475,7 +2519,7 @@ let an = class {
|
|
|
2475
2519
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
2476
2520
|
}
|
|
2477
2521
|
raw(e, a) {
|
|
2478
|
-
return new
|
|
2522
|
+
return new rn().raw(this, e, a);
|
|
2479
2523
|
}
|
|
2480
2524
|
remove() {
|
|
2481
2525
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2512,7 +2556,7 @@ let an = class {
|
|
|
2512
2556
|
toProxy() {
|
|
2513
2557
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2514
2558
|
}
|
|
2515
|
-
toString(e =
|
|
2559
|
+
toString(e = on) {
|
|
2516
2560
|
e.stringify && (e = e.stringify);
|
|
2517
2561
|
let a = "";
|
|
2518
2562
|
return e(this, (e2) => {
|
|
@@ -2525,16 +2569,16 @@ let an = class {
|
|
|
2525
2569
|
return e.warn(a, m2);
|
|
2526
2570
|
}
|
|
2527
2571
|
};
|
|
2528
|
-
var
|
|
2529
|
-
|
|
2530
|
-
let
|
|
2572
|
+
var cn = ln;
|
|
2573
|
+
ln.default = ln;
|
|
2574
|
+
let un = cn, pn = class extends un {
|
|
2531
2575
|
constructor(e) {
|
|
2532
2576
|
super(e), this.type = "comment";
|
|
2533
2577
|
}
|
|
2534
2578
|
};
|
|
2535
|
-
var
|
|
2536
|
-
|
|
2537
|
-
let
|
|
2579
|
+
var dn = pn;
|
|
2580
|
+
pn.default = pn;
|
|
2581
|
+
let hn = cn, fn = class extends hn {
|
|
2538
2582
|
get variable() {
|
|
2539
2583
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2540
2584
|
}
|
|
@@ -2542,16 +2586,16 @@ let dn = ln, hn = class extends dn {
|
|
|
2542
2586
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2543
2587
|
}
|
|
2544
2588
|
};
|
|
2545
|
-
var
|
|
2546
|
-
|
|
2547
|
-
let
|
|
2589
|
+
var mn = fn;
|
|
2590
|
+
fn.default = fn;
|
|
2591
|
+
let gn, yn, wn, Sn, bn = dn, Mn = mn, In = cn, { isClean: _n, my: On } = tn;
|
|
2548
2592
|
function _r(e) {
|
|
2549
2593
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2550
2594
|
}
|
|
2551
2595
|
function Wr(e) {
|
|
2552
|
-
if (e[
|
|
2596
|
+
if (e[_n] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2553
2597
|
}
|
|
2554
|
-
let
|
|
2598
|
+
let En = class zr extends In {
|
|
2555
2599
|
get first() {
|
|
2556
2600
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2557
2601
|
}
|
|
@@ -2603,7 +2647,7 @@ let On = class zr extends Mn {
|
|
|
2603
2647
|
return this.markDirty(), this;
|
|
2604
2648
|
}
|
|
2605
2649
|
normalize(e, a) {
|
|
2606
|
-
if ("string" == typeof e) e = _r(
|
|
2650
|
+
if ("string" == typeof e) e = _r(yn(e).nodes);
|
|
2607
2651
|
else if (typeof e > "u") e = [];
|
|
2608
2652
|
else if (Array.isArray(e)) {
|
|
2609
2653
|
e = e.slice(0);
|
|
@@ -2614,14 +2658,14 @@ let On = class zr extends Mn {
|
|
|
2614
2658
|
} else if (e.type) e = [e];
|
|
2615
2659
|
else if (e.prop) {
|
|
2616
2660
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2617
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2618
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2619
|
-
else if (e.name) e = [new
|
|
2661
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Mn(e)];
|
|
2662
|
+
} else if (e.selector || e.selectors) e = [new Sn(e)];
|
|
2663
|
+
else if (e.name) e = [new gn(e)];
|
|
2620
2664
|
else {
|
|
2621
2665
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2622
|
-
e = [new
|
|
2666
|
+
e = [new bn(e)];
|
|
2623
2667
|
}
|
|
2624
|
-
return e.map((e2) => (e2[
|
|
2668
|
+
return e.map((e2) => (e2[On] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[_n] && Wr(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
2625
2669
|
}
|
|
2626
2670
|
prepend(...e) {
|
|
2627
2671
|
e = e.reverse();
|
|
@@ -2697,22 +2741,22 @@ let On = class zr extends Mn {
|
|
|
2697
2741
|
}));
|
|
2698
2742
|
}
|
|
2699
2743
|
};
|
|
2700
|
-
|
|
2744
|
+
En.registerParse = (e) => {
|
|
2745
|
+
yn = e;
|
|
2746
|
+
}, En.registerRule = (e) => {
|
|
2747
|
+
Sn = e;
|
|
2748
|
+
}, En.registerAtRule = (e) => {
|
|
2701
2749
|
gn = e;
|
|
2702
|
-
},
|
|
2750
|
+
}, En.registerRoot = (e) => {
|
|
2703
2751
|
wn = e;
|
|
2704
|
-
}, On.registerAtRule = (e) => {
|
|
2705
|
-
mn = e;
|
|
2706
|
-
}, On.registerRoot = (e) => {
|
|
2707
|
-
yn = e;
|
|
2708
2752
|
};
|
|
2709
|
-
var
|
|
2710
|
-
|
|
2711
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2712
|
-
|
|
2753
|
+
var Ln = En;
|
|
2754
|
+
En.default = En, En.rebuild = (e) => {
|
|
2755
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, gn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Sn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Mn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, bn.prototype) : "root" === e.type && Object.setPrototypeOf(e, wn.prototype), e[On] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2756
|
+
En.rebuild(e2);
|
|
2713
2757
|
});
|
|
2714
2758
|
};
|
|
2715
|
-
let
|
|
2759
|
+
let Rn = Ln, An = class extends Rn {
|
|
2716
2760
|
constructor(e) {
|
|
2717
2761
|
super(e), this.type = "atrule";
|
|
2718
2762
|
}
|
|
@@ -2723,38 +2767,38 @@ let Ln = En, Rn = class extends Ln {
|
|
|
2723
2767
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2724
2768
|
}
|
|
2725
2769
|
};
|
|
2726
|
-
var
|
|
2727
|
-
|
|
2728
|
-
let
|
|
2770
|
+
var Tn = An;
|
|
2771
|
+
An.default = An, Rn.registerAtRule(An);
|
|
2772
|
+
let Nn, Pn, Dn = Ln, Fn = class extends Dn {
|
|
2729
2773
|
constructor(e) {
|
|
2730
2774
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2731
2775
|
}
|
|
2732
2776
|
toResult(e = {}) {
|
|
2733
|
-
return new
|
|
2777
|
+
return new Nn(new Pn(), this, e).stringify();
|
|
2734
2778
|
}
|
|
2735
2779
|
};
|
|
2736
|
-
|
|
2737
|
-
Tn = e;
|
|
2738
|
-
}, Dn.registerProcessor = (e) => {
|
|
2780
|
+
Fn.registerLazyResult = (e) => {
|
|
2739
2781
|
Nn = e;
|
|
2782
|
+
}, Fn.registerProcessor = (e) => {
|
|
2783
|
+
Pn = e;
|
|
2740
2784
|
};
|
|
2741
|
-
var
|
|
2742
|
-
|
|
2743
|
-
var
|
|
2785
|
+
var Un = Fn;
|
|
2786
|
+
Fn.default = Fn;
|
|
2787
|
+
var Bn = { nanoid: (e = 21) => {
|
|
2744
2788
|
let a = "", u = 0 | e;
|
|
2745
2789
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2746
2790
|
return a;
|
|
2747
2791
|
} };
|
|
2748
|
-
let { existsSync:
|
|
2749
|
-
let
|
|
2792
|
+
let { existsSync: Wn, readFileSync: zn } = Bt, { dirname: jn, join: Vn } = Bt, { SourceMapConsumer: qn, SourceMapGenerator: Zn } = Bt;
|
|
2793
|
+
let Kn = class {
|
|
2750
2794
|
constructor(e, a) {
|
|
2751
2795
|
if (false === a.map) return;
|
|
2752
2796
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2753
2797
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2754
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2798
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = jn(this.mapFile)), m2 && (this.text = m2);
|
|
2755
2799
|
}
|
|
2756
2800
|
consumer() {
|
|
2757
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2801
|
+
return this.consumerCache || (this.consumerCache = new qn(this.text)), this.consumerCache;
|
|
2758
2802
|
}
|
|
2759
2803
|
decodeInline(e) {
|
|
2760
2804
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2779,15 +2823,15 @@ let Zn = class {
|
|
|
2779
2823
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2780
2824
|
}
|
|
2781
2825
|
loadFile(e) {
|
|
2782
|
-
if (this.root =
|
|
2826
|
+
if (this.root = jn(e), Wn(e)) return this.mapFile = e, zn(e, "utf-8").toString().trim();
|
|
2783
2827
|
}
|
|
2784
2828
|
loadMap(e, a) {
|
|
2785
2829
|
if (false === a) return false;
|
|
2786
2830
|
if (a) {
|
|
2787
2831
|
if ("string" == typeof a) return a;
|
|
2788
2832
|
if ("function" != typeof a) {
|
|
2789
|
-
if (a instanceof
|
|
2790
|
-
if (a instanceof
|
|
2833
|
+
if (a instanceof qn) return Zn.fromSourceMap(a).toString();
|
|
2834
|
+
if (a instanceof Zn) return a.toString();
|
|
2791
2835
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2792
2836
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2793
2837
|
}
|
|
@@ -2803,7 +2847,7 @@ let Zn = class {
|
|
|
2803
2847
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2804
2848
|
if (this.annotation) {
|
|
2805
2849
|
let a2 = this.annotation;
|
|
2806
|
-
return e && (a2 = jn(
|
|
2850
|
+
return e && (a2 = Vn(jn(e), a2)), this.loadFile(a2);
|
|
2807
2851
|
}
|
|
2808
2852
|
}
|
|
2809
2853
|
}
|
|
@@ -2814,23 +2858,23 @@ let Zn = class {
|
|
|
2814
2858
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2815
2859
|
}
|
|
2816
2860
|
};
|
|
2817
|
-
var
|
|
2818
|
-
|
|
2819
|
-
let { nanoid:
|
|
2861
|
+
var Qn = Kn;
|
|
2862
|
+
Kn.default = Kn;
|
|
2863
|
+
let { nanoid: nr } = Bn, { isAbsolute: rr, resolve: or } = Bt, { SourceMapConsumer: sr, SourceMapGenerator: ir } = Bt, { fileURLToPath: ar, pathToFileURL: lr } = Bt, cr = Ht, ur = Qn, pr = Bt, dr = Symbol("fromOffsetCache"), hr = !(!sr || !ir), fr = !(!or || !rr), mr = class {
|
|
2820
2864
|
get from() {
|
|
2821
2865
|
return this.file || this.id;
|
|
2822
2866
|
}
|
|
2823
2867
|
constructor(e, a = {}) {
|
|
2824
2868
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2825
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
2826
|
-
let e2 = new
|
|
2869
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!fr || /^\w+:\/\//.test(a.from) || rr(a.from) ? this.file = a.from : this.file = or(a.from)), fr && hr) {
|
|
2870
|
+
let e2 = new ur(this.css, a);
|
|
2827
2871
|
if (e2.text) {
|
|
2828
2872
|
this.map = e2;
|
|
2829
2873
|
let a2 = e2.consumer().file;
|
|
2830
2874
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2831
2875
|
}
|
|
2832
2876
|
}
|
|
2833
|
-
this.file || (this.id = "<input css " +
|
|
2877
|
+
this.file || (this.id = "<input css " + nr(6) + ">"), this.map && (this.map.file = this.from);
|
|
2834
2878
|
}
|
|
2835
2879
|
error(e, a, u, m2 = {}) {
|
|
2836
2880
|
let w2, b2, C2;
|
|
@@ -2849,17 +2893,17 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2849
2893
|
a = e2.line, u = e2.col;
|
|
2850
2894
|
}
|
|
2851
2895
|
let x2 = this.origin(a, u, b2, w2);
|
|
2852
|
-
return C2 = x2 ? new
|
|
2896
|
+
return C2 = x2 ? new cr(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new cr(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (lr && (C2.input.url = lr(this.file).toString()), C2.input.file = this.file), C2;
|
|
2853
2897
|
}
|
|
2854
2898
|
fromOffset(e) {
|
|
2855
2899
|
let a, u;
|
|
2856
|
-
if (this[
|
|
2900
|
+
if (this[dr]) u = this[dr];
|
|
2857
2901
|
else {
|
|
2858
2902
|
let e2 = this.css.split("\n");
|
|
2859
2903
|
u = new Array(e2.length);
|
|
2860
2904
|
let a2 = 0;
|
|
2861
2905
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2862
|
-
this[
|
|
2906
|
+
this[dr] = u;
|
|
2863
2907
|
}
|
|
2864
2908
|
a = u[u.length - 1];
|
|
2865
2909
|
let m2 = 0;
|
|
@@ -2878,17 +2922,17 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2878
2922
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2879
2923
|
}
|
|
2880
2924
|
mapResolve(e) {
|
|
2881
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2925
|
+
return /^\w+:\/\//.test(e) ? e : or(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2882
2926
|
}
|
|
2883
2927
|
origin(e, a, u, m2) {
|
|
2884
2928
|
if (!this.map) return false;
|
|
2885
2929
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2886
2930
|
if (!x2.source) return false;
|
|
2887
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2931
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = rr(x2.source) ? lr(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || lr(this.map.mapFile));
|
|
2888
2932
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2889
2933
|
if ("file:" === b2.protocol) {
|
|
2890
|
-
if (!
|
|
2891
|
-
I2.file =
|
|
2934
|
+
if (!ar) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2935
|
+
I2.file = ar(b2);
|
|
2892
2936
|
}
|
|
2893
2937
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2894
2938
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2899,9 +2943,9 @@ let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsum
|
|
|
2899
2943
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2900
2944
|
}
|
|
2901
2945
|
};
|
|
2902
|
-
var
|
|
2903
|
-
|
|
2904
|
-
let
|
|
2946
|
+
var gr = mr;
|
|
2947
|
+
mr.default = mr, pr && pr.registerInput && pr.registerInput(mr);
|
|
2948
|
+
let yr, wr, Sr = Ln, Cr = class extends Sr {
|
|
2905
2949
|
constructor(e) {
|
|
2906
2950
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2907
2951
|
}
|
|
@@ -2918,29 +2962,29 @@ let gr, yr, wr = En, Sr = class extends wr {
|
|
|
2918
2962
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2919
2963
|
}
|
|
2920
2964
|
toResult(e = {}) {
|
|
2921
|
-
return new
|
|
2965
|
+
return new yr(new wr(), this, e).stringify();
|
|
2922
2966
|
}
|
|
2923
2967
|
};
|
|
2924
|
-
|
|
2925
|
-
gr = e;
|
|
2926
|
-
}, Sr.registerProcessor = (e) => {
|
|
2968
|
+
Cr.registerLazyResult = (e) => {
|
|
2927
2969
|
yr = e;
|
|
2970
|
+
}, Cr.registerProcessor = (e) => {
|
|
2971
|
+
wr = e;
|
|
2928
2972
|
};
|
|
2929
|
-
var
|
|
2930
|
-
|
|
2931
|
-
let
|
|
2973
|
+
var Ar = Cr;
|
|
2974
|
+
Cr.default = Cr, Sr.registerRoot(Cr);
|
|
2975
|
+
let Tr = { comma: (e) => Tr.split(e, [","], true), space(e) {
|
|
2932
2976
|
let a = [" ", "\n", " "];
|
|
2933
|
-
return
|
|
2977
|
+
return Tr.split(e, a);
|
|
2934
2978
|
}, split(e, a, u) {
|
|
2935
2979
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2936
2980
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
2937
2981
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2938
2982
|
} };
|
|
2939
|
-
var
|
|
2940
|
-
|
|
2941
|
-
let
|
|
2983
|
+
var Nr = Tr;
|
|
2984
|
+
Tr.default = Tr;
|
|
2985
|
+
let Pr = Ln, Dr = Nr, Fr = class extends Pr {
|
|
2942
2986
|
get selectors() {
|
|
2943
|
-
return
|
|
2987
|
+
return Dr.comma(this.selector);
|
|
2944
2988
|
}
|
|
2945
2989
|
set selectors(e) {
|
|
2946
2990
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2950,34 +2994,34 @@ let Nr = En, Pr = Tr, Dr = class extends Nr {
|
|
|
2950
2994
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2951
2995
|
}
|
|
2952
2996
|
};
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2955
|
-
let
|
|
2997
|
+
var Ur = Fr;
|
|
2998
|
+
Fr.default = Fr, Pr.registerRule(Fr);
|
|
2999
|
+
let Br = Tn, $r = dn, jr = mn, Gr = gr, Vr = Qn, qr = Ar, Hr = Ur;
|
|
2956
3000
|
function Ze(e, a) {
|
|
2957
3001
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2958
3002
|
let { inputs: u, ...m2 } = e;
|
|
2959
3003
|
if (u) {
|
|
2960
3004
|
a = [];
|
|
2961
3005
|
for (let e2 of u) {
|
|
2962
|
-
let u2 = { ...e2, __proto__:
|
|
2963
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
3006
|
+
let u2 = { ...e2, __proto__: Gr.prototype };
|
|
3007
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Vr.prototype }), a.push(u2);
|
|
2964
3008
|
}
|
|
2965
3009
|
}
|
|
2966
3010
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2967
3011
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2968
3012
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2969
3013
|
}
|
|
2970
|
-
if ("root" === m2.type) return new
|
|
2971
|
-
if ("decl" === m2.type) return new
|
|
2972
|
-
if ("rule" === m2.type) return new
|
|
2973
|
-
if ("comment" === m2.type) return new
|
|
2974
|
-
if ("atrule" === m2.type) return new
|
|
3014
|
+
if ("root" === m2.type) return new qr(m2);
|
|
3015
|
+
if ("decl" === m2.type) return new jr(m2);
|
|
3016
|
+
if ("rule" === m2.type) return new Hr(m2);
|
|
3017
|
+
if ("comment" === m2.type) return new $r(m2);
|
|
3018
|
+
if ("atrule" === m2.type) return new Br(m2);
|
|
2975
3019
|
throw new Error("Unknown node type: " + e.type);
|
|
2976
3020
|
}
|
|
2977
|
-
var
|
|
3021
|
+
var Zr = Ze;
|
|
2978
3022
|
Ze.default = Ze;
|
|
2979
|
-
let { dirname:
|
|
2980
|
-
var
|
|
3023
|
+
let { dirname: Kr, relative: Jr, resolve: Yr, sep: Xr } = Bt, { SourceMapConsumer: Qr, SourceMapGenerator: eo } = Bt, { pathToFileURL: to } = Bt, oo = gr, io = !(!Qr || !eo), ao = !!(Kr && Yr && Jr && Xr);
|
|
3024
|
+
var lo = class {
|
|
2981
3025
|
constructor(e, a, u, m2) {
|
|
2982
3026
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
2983
3027
|
}
|
|
@@ -2989,8 +3033,8 @@ var ao = class {
|
|
|
2989
3033
|
}
|
|
2990
3034
|
applyPrevMaps() {
|
|
2991
3035
|
for (let e of this.previous()) {
|
|
2992
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
2993
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
3036
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Kr(e.file);
|
|
3037
|
+
false === this.mapOpts.sourcesContent ? (a = new Qr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
2994
3038
|
}
|
|
2995
3039
|
}
|
|
2996
3040
|
clearAnnotation() {
|
|
@@ -3000,7 +3044,7 @@ var ao = class {
|
|
|
3000
3044
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
3001
3045
|
}
|
|
3002
3046
|
generate() {
|
|
3003
|
-
if (this.clearAnnotation(),
|
|
3047
|
+
if (this.clearAnnotation(), ao && io && this.isMap()) return this.generateMap();
|
|
3004
3048
|
{
|
|
3005
3049
|
let e = "";
|
|
3006
3050
|
return this.stringify(this.root, (a) => {
|
|
@@ -3012,12 +3056,12 @@ var ao = class {
|
|
|
3012
3056
|
if (this.root) this.generateString();
|
|
3013
3057
|
else if (1 === this.previous().length) {
|
|
3014
3058
|
let e = this.previous()[0].consumer();
|
|
3015
|
-
e.file = this.outputFile(), this.map =
|
|
3016
|
-
} else this.map = new
|
|
3059
|
+
e.file = this.outputFile(), this.map = eo.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3060
|
+
} else this.map = new eo({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
3017
3061
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
3018
3062
|
}
|
|
3019
3063
|
generateString() {
|
|
3020
|
-
this.css = "", this.map = new
|
|
3064
|
+
this.css = "", this.map = new eo({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
3021
3065
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
3022
3066
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
3023
3067
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -3047,9 +3091,9 @@ var ao = class {
|
|
|
3047
3091
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3048
3092
|
let a = this.memoizedPaths.get(e);
|
|
3049
3093
|
if (a) return a;
|
|
3050
|
-
let u = this.opts.to ?
|
|
3051
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
3052
|
-
let m2 =
|
|
3094
|
+
let u = this.opts.to ? Kr(this.opts.to) : ".";
|
|
3095
|
+
"string" == typeof this.mapOpts.annotation && (u = Kr(Yr(u, this.mapOpts.annotation)));
|
|
3096
|
+
let m2 = Jr(u, e);
|
|
3053
3097
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3054
3098
|
}
|
|
3055
3099
|
previous() {
|
|
@@ -3060,7 +3104,7 @@ var ao = class {
|
|
|
3060
3104
|
}
|
|
3061
3105
|
});
|
|
3062
3106
|
else {
|
|
3063
|
-
let e = new
|
|
3107
|
+
let e = new oo(this.originalCSS, this.opts);
|
|
3064
3108
|
e.map && this.previousMaps.push(e.map);
|
|
3065
3109
|
}
|
|
3066
3110
|
return this.previousMaps;
|
|
@@ -3091,8 +3135,8 @@ var ao = class {
|
|
|
3091
3135
|
toFileUrl(e) {
|
|
3092
3136
|
let a = this.memoizedFileURLs.get(e);
|
|
3093
3137
|
if (a) return a;
|
|
3094
|
-
if (
|
|
3095
|
-
let a2 =
|
|
3138
|
+
if (to) {
|
|
3139
|
+
let a2 = to(e).toString();
|
|
3096
3140
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3097
3141
|
}
|
|
3098
3142
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3100,13 +3144,13 @@ var ao = class {
|
|
|
3100
3144
|
toUrl(e) {
|
|
3101
3145
|
let a = this.memoizedURLs.get(e);
|
|
3102
3146
|
if (a) return a;
|
|
3103
|
-
"\\" ===
|
|
3147
|
+
"\\" === Xr && (e = e.replace(/\\/g, "/"));
|
|
3104
3148
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3105
3149
|
return this.memoizedURLs.set(e, u), u;
|
|
3106
3150
|
}
|
|
3107
3151
|
};
|
|
3108
|
-
const
|
|
3109
|
-
let
|
|
3152
|
+
const co = /[\t\n\f\r "#'()/;[\\\]{}]/g, uo = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, ho = /.[\r\n"'(/\\]/, Mo = /[\da-f]/i;
|
|
3153
|
+
let _o = Tn, Ao = dn, No = mn, Po = Ar, Do = Ur, Xa = function(e, a = {}) {
|
|
3110
3154
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
3111
3155
|
function y2(a2) {
|
|
3112
3156
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3156,7 +3200,7 @@ let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
|
3156
3200
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3157
3201
|
} while (I2);
|
|
3158
3202
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3159
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3203
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || ho.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3160
3204
|
break;
|
|
3161
3205
|
case 39:
|
|
3162
3206
|
case 34:
|
|
@@ -3174,31 +3218,31 @@ let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
|
3174
3218
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3175
3219
|
break;
|
|
3176
3220
|
case 64:
|
|
3177
|
-
|
|
3221
|
+
co.lastIndex = B2 + 1, co.test(D2), b2 = 0 === co.lastIndex ? D2.length - 1 : co.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3178
3222
|
break;
|
|
3179
3223
|
case 92:
|
|
3180
3224
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3181
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3182
|
-
for (;
|
|
3225
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, Mo.test(D2.charAt(b2)))) {
|
|
3226
|
+
for (; Mo.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3183
3227
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3184
3228
|
}
|
|
3185
3229
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3186
3230
|
break;
|
|
3187
3231
|
default:
|
|
3188
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
3232
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (uo.lastIndex = B2 + 1, uo.test(D2), b2 = 0 === uo.lastIndex ? D2.length - 1 : uo.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3189
3233
|
}
|
|
3190
3234
|
return B2++, x2;
|
|
3191
3235
|
}, position: function S() {
|
|
3192
3236
|
return B2;
|
|
3193
3237
|
} };
|
|
3194
3238
|
};
|
|
3195
|
-
const
|
|
3196
|
-
var
|
|
3239
|
+
const Fo = { empty: true, space: true };
|
|
3240
|
+
var Uo = class {
|
|
3197
3241
|
constructor(e) {
|
|
3198
|
-
this.input = e, this.root = new
|
|
3242
|
+
this.input = e, this.root = new Po(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3199
3243
|
}
|
|
3200
3244
|
atrule(e) {
|
|
3201
|
-
let a = new
|
|
3245
|
+
let a = new _o();
|
|
3202
3246
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3203
3247
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3204
3248
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3250,7 +3294,7 @@ var Fo = class {
|
|
|
3250
3294
|
return false;
|
|
3251
3295
|
}
|
|
3252
3296
|
comment(e) {
|
|
3253
|
-
let a = new
|
|
3297
|
+
let a = new Ao();
|
|
3254
3298
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3255
3299
|
let u = e[1].slice(2, -2);
|
|
3256
3300
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3263,7 +3307,7 @@ var Fo = class {
|
|
|
3263
3307
|
this.tokenizer = Xa(this.input);
|
|
3264
3308
|
}
|
|
3265
3309
|
decl(e, a) {
|
|
3266
|
-
let u = new
|
|
3310
|
+
let u = new No();
|
|
3267
3311
|
this.init(u, e[0][2]);
|
|
3268
3312
|
let m2, w2 = e[e.length - 1];
|
|
3269
3313
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3312,7 +3356,7 @@ var Fo = class {
|
|
|
3312
3356
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3313
3357
|
}
|
|
3314
3358
|
emptyRule(e) {
|
|
3315
|
-
let a = new
|
|
3359
|
+
let a = new Do();
|
|
3316
3360
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3317
3361
|
}
|
|
3318
3362
|
end(e) {
|
|
@@ -3388,7 +3432,7 @@ var Fo = class {
|
|
|
3388
3432
|
}
|
|
3389
3433
|
raw(e, a, u, m2) {
|
|
3390
3434
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3391
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
3435
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Fo[x2] || Fo[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3392
3436
|
if (!O2) {
|
|
3393
3437
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3394
3438
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3397,7 +3441,7 @@ var Fo = class {
|
|
|
3397
3441
|
}
|
|
3398
3442
|
rule(e) {
|
|
3399
3443
|
e.pop();
|
|
3400
|
-
let a = new
|
|
3444
|
+
let a = new Do();
|
|
3401
3445
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3402
3446
|
}
|
|
3403
3447
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3437,9 +3481,9 @@ var Fo = class {
|
|
|
3437
3481
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3438
3482
|
}
|
|
3439
3483
|
};
|
|
3440
|
-
let
|
|
3484
|
+
let $o = Ln, jo = gr, Go = Uo;
|
|
3441
3485
|
function _t(e, a) {
|
|
3442
|
-
let u = new
|
|
3486
|
+
let u = new jo(e, a), m2 = new Go(u);
|
|
3443
3487
|
try {
|
|
3444
3488
|
m2.parse();
|
|
3445
3489
|
} catch (e2) {
|
|
@@ -3447,9 +3491,9 @@ function _t(e, a) {
|
|
|
3447
3491
|
}
|
|
3448
3492
|
return m2.root;
|
|
3449
3493
|
}
|
|
3450
|
-
var
|
|
3451
|
-
_t.default = _t,
|
|
3452
|
-
let
|
|
3494
|
+
var Vo = _t;
|
|
3495
|
+
_t.default = _t, $o.registerParse(_t);
|
|
3496
|
+
let qo = class {
|
|
3453
3497
|
constructor(e, a = {}) {
|
|
3454
3498
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3455
3499
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3461,9 +3505,9 @@ let Vo = class {
|
|
|
3461
3505
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
3462
3506
|
}
|
|
3463
3507
|
};
|
|
3464
|
-
var
|
|
3465
|
-
|
|
3466
|
-
let
|
|
3508
|
+
var Ho = qo;
|
|
3509
|
+
qo.default = qo;
|
|
3510
|
+
let Zo = Ho, Ko = class {
|
|
3467
3511
|
get content() {
|
|
3468
3512
|
return this.css;
|
|
3469
3513
|
}
|
|
@@ -3475,26 +3519,26 @@ let Ho = qo, Zo = class {
|
|
|
3475
3519
|
}
|
|
3476
3520
|
warn(e, a = {}) {
|
|
3477
3521
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3478
|
-
let u = new
|
|
3522
|
+
let u = new Zo(e, a);
|
|
3479
3523
|
return this.messages.push(u), u;
|
|
3480
3524
|
}
|
|
3481
3525
|
warnings() {
|
|
3482
3526
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3483
3527
|
}
|
|
3484
3528
|
};
|
|
3485
|
-
var
|
|
3486
|
-
|
|
3487
|
-
let
|
|
3529
|
+
var Jo = Ko;
|
|
3530
|
+
Ko.default = Ko;
|
|
3531
|
+
let Yo = {};
|
|
3488
3532
|
var so = function(e) {
|
|
3489
|
-
|
|
3533
|
+
Yo[e] || (Yo[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3490
3534
|
};
|
|
3491
|
-
let
|
|
3492
|
-
const
|
|
3535
|
+
let Xo = Ln, Qo = Un, es = lo, ts = Vo, ns = Jo, rs = Ar, os = en, { isClean: ss, my: is } = tn, as = so;
|
|
3536
|
+
const ls = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, cs = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, us = { Once: true, postcssPlugin: true, prepare: true };
|
|
3493
3537
|
function Ne(e) {
|
|
3494
3538
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3495
3539
|
}
|
|
3496
3540
|
function no(e) {
|
|
3497
|
-
let a = false, u =
|
|
3541
|
+
let a = false, u = ls[e.type];
|
|
3498
3542
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
3499
3543
|
}
|
|
3500
3544
|
function Gn(e) {
|
|
@@ -3502,9 +3546,9 @@ function Gn(e) {
|
|
|
3502
3546
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : no(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
3503
3547
|
}
|
|
3504
3548
|
function Ps(e) {
|
|
3505
|
-
return e[
|
|
3549
|
+
return e[ss] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3506
3550
|
}
|
|
3507
|
-
let
|
|
3551
|
+
let ps = {}, ds = class ro {
|
|
3508
3552
|
get content() {
|
|
3509
3553
|
return this.stringify().content;
|
|
3510
3554
|
}
|
|
@@ -3531,19 +3575,19 @@ let us = {}, ps = class ro {
|
|
|
3531
3575
|
}
|
|
3532
3576
|
constructor(e, a, u) {
|
|
3533
3577
|
let m2;
|
|
3534
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3578
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof ns) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3535
3579
|
else {
|
|
3536
|
-
let e2 =
|
|
3580
|
+
let e2 = ts;
|
|
3537
3581
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3538
3582
|
try {
|
|
3539
3583
|
m2 = e2(a, u);
|
|
3540
3584
|
} catch (e3) {
|
|
3541
3585
|
this.processed = true, this.error = e3;
|
|
3542
3586
|
}
|
|
3543
|
-
m2 && !m2[
|
|
3587
|
+
m2 && !m2[is] && Xo.rebuild(m2);
|
|
3544
3588
|
}
|
|
3545
3589
|
else m2 = Ps(a);
|
|
3546
|
-
this.result = new
|
|
3590
|
+
this.result = new ns(e, m2, u), this.helpers = { ...ps, postcss: ps, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3547
3591
|
}
|
|
3548
3592
|
async() {
|
|
3549
3593
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3577,8 +3621,8 @@ let us = {}, ps = class ro {
|
|
|
3577
3621
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3578
3622
|
};
|
|
3579
3623
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3580
|
-
if (!
|
|
3581
|
-
if (!
|
|
3624
|
+
if (!cs[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3625
|
+
if (!us[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3582
3626
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3583
3627
|
}
|
|
3584
3628
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3595,8 +3639,8 @@ let us = {}, ps = class ro {
|
|
|
3595
3639
|
}
|
|
3596
3640
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3597
3641
|
let e = this.result.root;
|
|
3598
|
-
for (; !e[
|
|
3599
|
-
e[
|
|
3642
|
+
for (; !e[ss]; ) {
|
|
3643
|
+
e[ss] = true;
|
|
3600
3644
|
let a = [Gn(e)];
|
|
3601
3645
|
for (; a.length > 0; ) {
|
|
3602
3646
|
let e2 = this.visitTick(a);
|
|
@@ -3641,9 +3685,9 @@ let us = {}, ps = class ro {
|
|
|
3641
3685
|
if (this.error) throw this.error;
|
|
3642
3686
|
if (this.stringified) return this.result;
|
|
3643
3687
|
this.stringified = true, this.sync();
|
|
3644
|
-
let e = this.result.opts, a =
|
|
3688
|
+
let e = this.result.opts, a = os;
|
|
3645
3689
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3646
|
-
let u = new
|
|
3690
|
+
let u = new es(a, this.result.root, this.result.opts).generate();
|
|
3647
3691
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3648
3692
|
}
|
|
3649
3693
|
sync() {
|
|
@@ -3655,14 +3699,14 @@ let us = {}, ps = class ro {
|
|
|
3655
3699
|
}
|
|
3656
3700
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3657
3701
|
let e = this.result.root;
|
|
3658
|
-
for (; !e[
|
|
3702
|
+
for (; !e[ss]; ) e[ss] = true, this.walkSync(e);
|
|
3659
3703
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3660
3704
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3661
3705
|
}
|
|
3662
3706
|
return this.result;
|
|
3663
3707
|
}
|
|
3664
3708
|
then(e, a) {
|
|
3665
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3709
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || as("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
3666
3710
|
}
|
|
3667
3711
|
toString() {
|
|
3668
3712
|
return this.css;
|
|
@@ -3694,22 +3738,22 @@ let us = {}, ps = class ro {
|
|
|
3694
3738
|
}
|
|
3695
3739
|
if (0 !== a.iterator) {
|
|
3696
3740
|
let m3, w3 = a.iterator;
|
|
3697
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3741
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[ss]) return m3[ss] = true, void e.push(Gn(m3));
|
|
3698
3742
|
a.iterator = 0, delete u.indexes[w3];
|
|
3699
3743
|
}
|
|
3700
3744
|
let w2 = a.events;
|
|
3701
3745
|
for (; a.eventIndex < w2.length; ) {
|
|
3702
3746
|
let e2 = w2[a.eventIndex];
|
|
3703
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3747
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[ss] = true, a.iterator = u.getIterator()));
|
|
3704
3748
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3705
3749
|
}
|
|
3706
3750
|
e.pop();
|
|
3707
3751
|
}
|
|
3708
3752
|
walkSync(e) {
|
|
3709
|
-
e[
|
|
3753
|
+
e[ss] = true;
|
|
3710
3754
|
let a = no(e);
|
|
3711
3755
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3712
|
-
e2[
|
|
3756
|
+
e2[ss] || this.walkSync(e2);
|
|
3713
3757
|
});
|
|
3714
3758
|
else {
|
|
3715
3759
|
let a2 = this.listeners[u];
|
|
@@ -3720,14 +3764,14 @@ let us = {}, ps = class ro {
|
|
|
3720
3764
|
return this.sync().warnings();
|
|
3721
3765
|
}
|
|
3722
3766
|
};
|
|
3723
|
-
|
|
3724
|
-
|
|
3767
|
+
ds.registerPostcss = (e) => {
|
|
3768
|
+
ps = e;
|
|
3725
3769
|
};
|
|
3726
|
-
var
|
|
3727
|
-
|
|
3728
|
-
let
|
|
3729
|
-
const
|
|
3730
|
-
let
|
|
3770
|
+
var hs = ds;
|
|
3771
|
+
ds.default = ds, rs.registerLazyResult(ds), Qo.registerLazyResult(ds);
|
|
3772
|
+
let ms = lo, gs = Vo;
|
|
3773
|
+
const ys = Jo;
|
|
3774
|
+
let ws = en, Ss = so, bs = class {
|
|
3731
3775
|
get content() {
|
|
3732
3776
|
return this.result.css;
|
|
3733
3777
|
}
|
|
@@ -3748,7 +3792,7 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3748
3792
|
}
|
|
3749
3793
|
get root() {
|
|
3750
3794
|
if (this._root) return this._root;
|
|
3751
|
-
let e, a =
|
|
3795
|
+
let e, a = gs;
|
|
3752
3796
|
try {
|
|
3753
3797
|
e = a(this._css, this._opts);
|
|
3754
3798
|
} catch (e2) {
|
|
@@ -3762,11 +3806,11 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3762
3806
|
}
|
|
3763
3807
|
constructor(e, a, u) {
|
|
3764
3808
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3765
|
-
let m2, w2 =
|
|
3766
|
-
this.result = new
|
|
3809
|
+
let m2, w2 = ws;
|
|
3810
|
+
this.result = new ys(this._processor, m2, this._opts), this.result.css = a;
|
|
3767
3811
|
let b2 = this;
|
|
3768
3812
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3769
|
-
let C2 = new
|
|
3813
|
+
let C2 = new ms(w2, m2, this._opts, a);
|
|
3770
3814
|
if (C2.isMap()) {
|
|
3771
3815
|
let [e2, a2] = C2.generate();
|
|
3772
3816
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3786,7 +3830,7 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3786
3830
|
return this.result;
|
|
3787
3831
|
}
|
|
3788
3832
|
then(e, a) {
|
|
3789
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3833
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || Ss("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
3790
3834
|
}
|
|
3791
3835
|
toString() {
|
|
3792
3836
|
return this._css;
|
|
@@ -3795,9 +3839,9 @@ let ys = Qt, ws = so, Ss = class {
|
|
|
3795
3839
|
return [];
|
|
3796
3840
|
}
|
|
3797
3841
|
};
|
|
3798
|
-
var
|
|
3799
|
-
|
|
3800
|
-
let
|
|
3842
|
+
var vs = bs;
|
|
3843
|
+
bs.default = bs;
|
|
3844
|
+
let xs = Un, Ms = hs, Is = vs, _s = Ar, Os = class {
|
|
3801
3845
|
constructor(e = []) {
|
|
3802
3846
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3803
3847
|
}
|
|
@@ -3813,43 +3857,43 @@ let vs = Fn, xs = ds, Ms = bs, Is = Cr, _s = class {
|
|
|
3813
3857
|
return a;
|
|
3814
3858
|
}
|
|
3815
3859
|
process(e, a = {}) {
|
|
3816
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3860
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Ms(this, e, a) : new Is(this, e, a);
|
|
3817
3861
|
}
|
|
3818
3862
|
use(e) {
|
|
3819
3863
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3820
3864
|
}
|
|
3821
3865
|
};
|
|
3822
|
-
var
|
|
3823
|
-
|
|
3824
|
-
let
|
|
3866
|
+
var Es = Os;
|
|
3867
|
+
Os.default = Os, _s.registerProcessor(Os), xs.registerProcessor(Os);
|
|
3868
|
+
let Ls = Tn, Rs = dn, As = Ln, Ts = Ht, Ns = mn, $s = Un, Ws = Zr, js = gr, Gs = hs, Vs = Nr, qs = cn, Hs = Vo, Zs = Es, Ks = Jo, Ys = Ar, Xs = Ur, Qs = en, ei = Ho;
|
|
3825
3869
|
function L$1(...e) {
|
|
3826
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3870
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Zs(e);
|
|
3827
3871
|
}
|
|
3828
3872
|
L$1.plugin = function(e, a) {
|
|
3829
3873
|
let u, m2 = false;
|
|
3830
3874
|
function n(...u2) {
|
|
3831
3875
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
3832
3876
|
let w2 = a(...u2);
|
|
3833
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3877
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Zs().version, w2;
|
|
3834
3878
|
}
|
|
3835
3879
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3836
3880
|
return L$1([n(u2)]).process(e2, a2);
|
|
3837
3881
|
}, n;
|
|
3838
|
-
}, L$1.stringify =
|
|
3839
|
-
var
|
|
3882
|
+
}, L$1.stringify = Qs, L$1.parse = Hs, L$1.fromJSON = Ws, L$1.list = Vs, L$1.comment = (e) => new Rs(e), L$1.atRule = (e) => new Ls(e), L$1.decl = (e) => new Ns(e), L$1.rule = (e) => new Xs(e), L$1.root = (e) => new Ys(e), L$1.document = (e) => new $s(e), L$1.CssSyntaxError = Ts, L$1.Declaration = Ns, L$1.Container = As, L$1.Processor = Zs, L$1.Document = $s, L$1.Comment = Rs, L$1.Warning = ei, L$1.AtRule = Ls, L$1.Result = Ks, L$1.Input = js, L$1.Rule = Xs, L$1.Root = Ys, L$1.Node = qs, Gs.registerPostcss(L$1);
|
|
3883
|
+
var ti = L$1;
|
|
3840
3884
|
L$1.default = L$1;
|
|
3841
|
-
const
|
|
3842
|
-
|
|
3843
|
-
var
|
|
3885
|
+
const si = Yi(ti);
|
|
3886
|
+
si.stringify, si.fromJSON, si.plugin, si.parse, si.list, si.document, si.comment, si.atRule, si.rule, si.decl, si.root, si.CssSyntaxError, si.Declaration, si.Container, si.Processor, si.Document, si.Comment, si.Warning, si.AtRule, si.Result, si.Input, si.Rule, si.Root, si.Node;
|
|
3887
|
+
var ii = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(ii || {}), ai = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e[e.Typing = 17] = "Typing", e))(ai || {}), li = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(li || {}), ci = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(ci || {}), ui = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ui || {}), pi = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(pi || {});
|
|
3844
3888
|
function G(e, a, u = document) {
|
|
3845
3889
|
const m2 = { capture: true, passive: true };
|
|
3846
3890
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3847
3891
|
}
|
|
3848
|
-
const
|
|
3849
|
-
let
|
|
3850
|
-
console.error(
|
|
3851
|
-
}, has: () => (console.error(
|
|
3852
|
-
console.error(
|
|
3892
|
+
const di = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
|
|
3893
|
+
let hi = { map: {}, getId: () => (console.error(di), -1), getNode: () => (console.error(di), null), removeNodeFromMap() {
|
|
3894
|
+
console.error(di);
|
|
3895
|
+
}, has: () => (console.error(di), false), reset() {
|
|
3896
|
+
console.error(di);
|
|
3853
3897
|
} };
|
|
3854
3898
|
function $e(e, a, u = {}) {
|
|
3855
3899
|
let m2 = null, w2 = 0;
|
|
@@ -3883,8 +3927,8 @@ function Re(e, a, u) {
|
|
|
3883
3927
|
};
|
|
3884
3928
|
}
|
|
3885
3929
|
}
|
|
3886
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3887
|
-
let
|
|
3930
|
+
typeof window < "u" && window.Proxy && window.Reflect && (hi = new Proxy(hi, { get: (e, a, u) => ("map" === a && console.error(di), Reflect.get(e, a, u)) }));
|
|
3931
|
+
let fi, mi = Date.now;
|
|
3888
3932
|
function po(e) {
|
|
3889
3933
|
var a, u, m2, w2, b2, C2;
|
|
3890
3934
|
const x2 = e.document;
|
|
@@ -3931,7 +3975,7 @@ function bo(e, a) {
|
|
|
3931
3975
|
function Fs(e) {
|
|
3932
3976
|
return !(null == e || !e.shadowRoot);
|
|
3933
3977
|
}
|
|
3934
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3978
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (mi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3935
3979
|
class _l {
|
|
3936
3980
|
constructor() {
|
|
3937
3981
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3976,11 +4020,11 @@ function vo(e) {
|
|
|
3976
4020
|
const a = e.ownerDocument;
|
|
3977
4021
|
return !!a && (a.contains(e) || zl(e));
|
|
3978
4022
|
}
|
|
3979
|
-
const M = (e) =>
|
|
4023
|
+
const M = (e) => fi ? (...a) => {
|
|
3980
4024
|
try {
|
|
3981
4025
|
return e(...a);
|
|
3982
4026
|
} catch (e2) {
|
|
3983
|
-
if (
|
|
4027
|
+
if (fi && true === fi(e2)) return;
|
|
3984
4028
|
throw e2;
|
|
3985
4029
|
}
|
|
3986
4030
|
} : e;
|
|
@@ -4039,22 +4083,22 @@ class Vl {
|
|
|
4039
4083
|
transformCrossOriginEvent(e, a) {
|
|
4040
4084
|
var u;
|
|
4041
4085
|
switch (a.type) {
|
|
4042
|
-
case
|
|
4086
|
+
case ii.FullSnapshot: {
|
|
4043
4087
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4044
4088
|
const u2 = a.data.node.id;
|
|
4045
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4089
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: ii.IncrementalSnapshot, data: { source: ai.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4046
4090
|
}
|
|
4047
|
-
case
|
|
4048
|
-
case
|
|
4049
|
-
case
|
|
4091
|
+
case ii.Meta:
|
|
4092
|
+
case ii.Load:
|
|
4093
|
+
case ii.DomContentLoaded:
|
|
4050
4094
|
return false;
|
|
4051
|
-
case
|
|
4095
|
+
case ii.Plugin:
|
|
4052
4096
|
return a;
|
|
4053
|
-
case
|
|
4097
|
+
case ii.Custom:
|
|
4054
4098
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4055
|
-
case
|
|
4099
|
+
case ii.IncrementalSnapshot:
|
|
4056
4100
|
switch (a.data.source) {
|
|
4057
|
-
case
|
|
4101
|
+
case ai.Mutation:
|
|
4058
4102
|
return a.data.adds.forEach((a2) => {
|
|
4059
4103
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4060
4104
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4066,30 +4110,30 @@ class Vl {
|
|
|
4066
4110
|
}), a.data.texts.forEach((a2) => {
|
|
4067
4111
|
this.replaceIds(a2, e, ["id"]);
|
|
4068
4112
|
}), a;
|
|
4069
|
-
case
|
|
4070
|
-
case
|
|
4071
|
-
case
|
|
4113
|
+
case ai.Drag:
|
|
4114
|
+
case ai.TouchMove:
|
|
4115
|
+
case ai.MouseMove:
|
|
4072
4116
|
return a.data.positions.forEach((a2) => {
|
|
4073
4117
|
this.replaceIds(a2, e, ["id"]);
|
|
4074
4118
|
}), a;
|
|
4075
|
-
case
|
|
4119
|
+
case ai.ViewportResize:
|
|
4076
4120
|
return false;
|
|
4077
|
-
case
|
|
4078
|
-
case
|
|
4079
|
-
case
|
|
4080
|
-
case
|
|
4081
|
-
case
|
|
4121
|
+
case ai.MediaInteraction:
|
|
4122
|
+
case ai.MouseInteraction:
|
|
4123
|
+
case ai.Scroll:
|
|
4124
|
+
case ai.CanvasMutation:
|
|
4125
|
+
case ai.Input:
|
|
4082
4126
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4083
|
-
case
|
|
4084
|
-
case
|
|
4127
|
+
case ai.StyleSheetRule:
|
|
4128
|
+
case ai.StyleDeclaration:
|
|
4085
4129
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4086
|
-
case
|
|
4130
|
+
case ai.Font:
|
|
4087
4131
|
return a;
|
|
4088
|
-
case
|
|
4132
|
+
case ai.Selection:
|
|
4089
4133
|
return a.data.ranges.forEach((a2) => {
|
|
4090
4134
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4091
4135
|
}), a;
|
|
4092
|
-
case
|
|
4136
|
+
case ai.AdoptedStyleSheet:
|
|
4093
4137
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4094
4138
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4095
4139
|
}), a;
|
|
@@ -4113,7 +4157,7 @@ class Vl {
|
|
|
4113
4157
|
});
|
|
4114
4158
|
}
|
|
4115
4159
|
patchRootIdOnNode(e, a) {
|
|
4116
|
-
e.type !==
|
|
4160
|
+
e.type !== gt.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4117
4161
|
this.patchRootIdOnNode(e2, a);
|
|
4118
4162
|
});
|
|
4119
4163
|
}
|
|
@@ -4331,7 +4375,7 @@ function ko(e, a) {
|
|
|
4331
4375
|
const { parentNode: u } = a;
|
|
4332
4376
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4333
4377
|
}
|
|
4334
|
-
const
|
|
4378
|
+
const gi = [];
|
|
4335
4379
|
function tt(e) {
|
|
4336
4380
|
try {
|
|
4337
4381
|
if ("composedPath" in e) {
|
|
@@ -4345,7 +4389,7 @@ function tt(e) {
|
|
|
4345
4389
|
function Co(e, a) {
|
|
4346
4390
|
var u, m2;
|
|
4347
4391
|
const w2 = new Zl();
|
|
4348
|
-
|
|
4392
|
+
gi.push(w2), w2.init(e);
|
|
4349
4393
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4350
4394
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4351
4395
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4357,7 +4401,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4357
4401
|
};
|
|
4358
4402
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4359
4403
|
let I2 = null;
|
|
4360
|
-
return Object.keys(
|
|
4404
|
+
return Object.keys(li).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4361
4405
|
let C3 = fe(b3);
|
|
4362
4406
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4363
4407
|
const C4 = tt(b4);
|
|
@@ -4366,29 +4410,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4366
4410
|
if ("pointerType" in b4) {
|
|
4367
4411
|
switch (b4.pointerType) {
|
|
4368
4412
|
case "mouse":
|
|
4369
|
-
x3 =
|
|
4413
|
+
x3 = ci.Mouse;
|
|
4370
4414
|
break;
|
|
4371
4415
|
case "touch":
|
|
4372
|
-
x3 =
|
|
4416
|
+
x3 = ci.Touch;
|
|
4373
4417
|
break;
|
|
4374
4418
|
case "pen":
|
|
4375
|
-
x3 =
|
|
4419
|
+
x3 = ci.Pen;
|
|
4376
4420
|
}
|
|
4377
|
-
x3 ===
|
|
4378
|
-
} else Ds(b4) && (x3 =
|
|
4379
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4421
|
+
x3 === ci.Touch ? li[a2] === li.MouseDown ? _3 = "TouchStart" : li[a2] === li.MouseUp && (_3 = "TouchEnd") : ci.Pen;
|
|
4422
|
+
} else Ds(b4) && (x3 = ci.Touch);
|
|
4423
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === ci.Touch || _3.startsWith("Mouse") && x3 === ci.Mouse) && (x3 = null)) : li[a2] === li.Click && (x3 = I2, I2 = null);
|
|
4380
4424
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4381
4425
|
if (!O2) return;
|
|
4382
4426
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4383
|
-
M(e)({ type:
|
|
4427
|
+
M(e)({ type: li[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4384
4428
|
})(b3);
|
|
4385
|
-
if (window.PointerEvent) switch (
|
|
4386
|
-
case
|
|
4387
|
-
case
|
|
4429
|
+
if (window.PointerEvent) switch (li[b3]) {
|
|
4430
|
+
case li.MouseDown:
|
|
4431
|
+
case li.MouseUp:
|
|
4388
4432
|
C3 = C3.replace("mouse", "pointer");
|
|
4389
4433
|
break;
|
|
4390
|
-
case
|
|
4391
|
-
case
|
|
4434
|
+
case li.TouchStart:
|
|
4435
|
+
case li.TouchEnd:
|
|
4392
4436
|
return;
|
|
4393
4437
|
}
|
|
4394
4438
|
x2.push(G(C3, _2, a));
|
|
@@ -4407,7 +4451,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4407
4451
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4408
4452
|
}), b2.scroll || 100)), a);
|
|
4409
4453
|
}
|
|
4410
|
-
const
|
|
4454
|
+
const yi = ["INPUT", "TEXTAREA", "SELECT"], Mi = /* @__PURE__ */ new WeakMap();
|
|
4411
4455
|
function ql({ deviceChangeCb: e }) {
|
|
4412
4456
|
const t = (a2, u2) => {
|
|
4413
4457
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4527,7 +4571,7 @@ function au(e, a = {}) {
|
|
|
4527
4571
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4528
4572
|
}), b3), _3 = M($e(M((e3) => {
|
|
4529
4573
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4530
|
-
C3 || (C3 =
|
|
4574
|
+
C3 || (C3 = mi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: mi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ai.Drag : e3 instanceof MouseEvent ? ai.MouseMove : ai.TouchMove);
|
|
4531
4575
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4532
4576
|
return M(() => {
|
|
4533
4577
|
O3.forEach((e3) => e3());
|
|
@@ -4543,7 +4587,7 @@ function au(e, a = {}) {
|
|
|
4543
4587
|
function p(e3) {
|
|
4544
4588
|
let u3 = tt(e3);
|
|
4545
4589
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4546
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4590
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || yi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4547
4591
|
let D4 = u3.value, F4 = false;
|
|
4548
4592
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4549
4593
|
D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u3.checked), f2(u3, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
|
|
@@ -4556,9 +4600,9 @@ function au(e, a = {}) {
|
|
|
4556
4600
|
});
|
|
4557
4601
|
}
|
|
4558
4602
|
function f2(a3, m4) {
|
|
4559
|
-
const w4 =
|
|
4603
|
+
const w4 = Mi.get(a3);
|
|
4560
4604
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4561
|
-
|
|
4605
|
+
Mi.set(a3, m4);
|
|
4562
4606
|
const w5 = u2.getId(a3);
|
|
4563
4607
|
M(e2)({ ...m4, id: w5 });
|
|
4564
4608
|
}
|
|
@@ -4583,7 +4627,7 @@ function au(e, a = {}) {
|
|
|
4583
4627
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4584
4628
|
_3 = e3, b3 = a4;
|
|
4585
4629
|
}
|
|
4586
|
-
e2({ source:
|
|
4630
|
+
e2({ source: ai.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4587
4631
|
var a4;
|
|
4588
4632
|
const u3 = [];
|
|
4589
4633
|
for (; e3; ) {
|
|
@@ -4611,7 +4655,7 @@ function au(e, a = {}) {
|
|
|
4611
4655
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4612
4656
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4613
4657
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4614
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4658
|
+
}), w3.media || 500)), x3 = [G("play", C3(pi.Play), b3), G("pause", C3(pi.Pause), b3), G("seeked", C3(pi.Seeked), b3), G("volumechange", C3(pi.VolumeChange), b3), G("ratechange", C3(pi.RateChange), b3)];
|
|
4615
4659
|
return M(() => {
|
|
4616
4660
|
x3.forEach((e3) => e3());
|
|
4617
4661
|
});
|
|
@@ -4732,7 +4776,7 @@ function au(e, a = {}) {
|
|
|
4732
4776
|
})(e), U2 = [];
|
|
4733
4777
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4734
4778
|
return M(() => {
|
|
4735
|
-
|
|
4779
|
+
gi.forEach((e2) => e2.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d2(), g2(), h(), D2(), F2(), O2(), U2.forEach((e2) => e2());
|
|
4736
4780
|
});
|
|
4737
4781
|
}
|
|
4738
4782
|
function ft(e) {
|
|
@@ -4741,29 +4785,29 @@ function ft(e) {
|
|
|
4741
4785
|
function mt(e) {
|
|
4742
4786
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4743
4787
|
}
|
|
4744
|
-
const
|
|
4745
|
-
var
|
|
4788
|
+
const Ii = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Li = typeof self < "u" && self.Blob && new Blob([(Ri = Ii, Uint8Array.from(atob(Ri), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4789
|
+
var Ri;
|
|
4746
4790
|
function uu(e) {
|
|
4747
4791
|
let a;
|
|
4748
4792
|
try {
|
|
4749
|
-
if (a =
|
|
4793
|
+
if (a = Li && (self.URL || self.webkitURL).createObjectURL(Li), !a) throw "";
|
|
4750
4794
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4751
4795
|
return u.addEventListener("error", () => {
|
|
4752
4796
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4753
4797
|
}), u;
|
|
4754
4798
|
} catch {
|
|
4755
|
-
return new Worker("data:text/javascript;base64," +
|
|
4799
|
+
return new Worker("data:text/javascript;base64," + Ii, { name: null == e ? void 0 : e.name });
|
|
4756
4800
|
} finally {
|
|
4757
4801
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4758
4802
|
}
|
|
4759
4803
|
}
|
|
4760
|
-
for (var
|
|
4761
|
-
const
|
|
4804
|
+
for (var Ai = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ti = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ni = 0; Ni < 64; Ni++) Ti[Ai.charCodeAt(Ni)] = Ni;
|
|
4805
|
+
const Pi = /* @__PURE__ */ new Map();
|
|
4762
4806
|
const Oo = (e, a, u) => {
|
|
4763
4807
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4764
4808
|
const m2 = (function pu(e2, a2) {
|
|
4765
|
-
let u2 =
|
|
4766
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4809
|
+
let u2 = Pi.get(e2);
|
|
4810
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Pi.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4767
4811
|
})(u, e.constructor.name);
|
|
4768
4812
|
let w2 = m2.indexOf(e);
|
|
4769
4813
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4775,7 +4819,7 @@ function Ot(e, a, u) {
|
|
|
4775
4819
|
if (e instanceof ArrayBuffer) {
|
|
4776
4820
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4777
4821
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4778
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4822
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Ai[u3[a3] >> 2], w2 += Ai[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Ai[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Ai[63 & u3[a3 + 2]];
|
|
4779
4823
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4780
4824
|
})(e);
|
|
4781
4825
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4872,7 +4916,7 @@ class gu {
|
|
|
4872
4916
|
const { id: a2 } = e2.data;
|
|
4873
4917
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4874
4918
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4875
|
-
this.mutationCb({ id: a2, type:
|
|
4919
|
+
this.mutationCb({ id: a2, type: ui["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u2 }], type: m3 }] }, 0, 0] }] });
|
|
4876
4920
|
};
|
|
4877
4921
|
const I2 = 1e3 / e;
|
|
4878
4922
|
let _2, O2 = 0;
|
|
@@ -4908,14 +4952,14 @@ class gu {
|
|
|
4908
4952
|
return function(...b5) {
|
|
4909
4953
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4910
4954
|
const u3 = Eo(b5, a2, this);
|
|
4911
|
-
e2(this.canvas, { type:
|
|
4955
|
+
e2(this.canvas, { type: ui["2D"], property: C2, args: u3 });
|
|
4912
4956
|
}, 0), w4.apply(this, b5);
|
|
4913
4957
|
};
|
|
4914
4958
|
});
|
|
4915
4959
|
w3.push(b4);
|
|
4916
4960
|
} catch {
|
|
4917
4961
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4918
|
-
e2(this.canvas, { type:
|
|
4962
|
+
e2(this.canvas, { type: ui["2D"], property: C2, args: [a3], setter: true });
|
|
4919
4963
|
} });
|
|
4920
4964
|
w3.push(u3);
|
|
4921
4965
|
}
|
|
@@ -4924,7 +4968,7 @@ class gu {
|
|
|
4924
4968
|
};
|
|
4925
4969
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4926
4970
|
const w3 = [];
|
|
4927
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4971
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, ui.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, ui.WebGL2, e2, u2, m3, a2)), () => {
|
|
4928
4972
|
w3.forEach((e3) => e3());
|
|
4929
4973
|
};
|
|
4930
4974
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5035,23 +5079,23 @@ class bu {
|
|
|
5035
5079
|
trackStylesheetInLinkElement(e) {
|
|
5036
5080
|
}
|
|
5037
5081
|
}
|
|
5038
|
-
let
|
|
5039
|
-
var
|
|
5082
|
+
let qi, Hi, Ji, Xi = false;
|
|
5083
|
+
var Qi;
|
|
5040
5084
|
try {
|
|
5041
5085
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5042
5086
|
const e = document.createElement("iframe");
|
|
5043
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5087
|
+
document.body.appendChild(e), Array.from = (null == (Qi = e.contentWindow) ? void 0 : Qi.Array.from) || Array.from, document.body.removeChild(e);
|
|
5044
5088
|
}
|
|
5045
|
-
} catch (
|
|
5046
|
-
console.debug("Unable to override Array.from",
|
|
5089
|
+
} catch (Ri2) {
|
|
5090
|
+
console.debug("Unable to override Array.from", Ri2);
|
|
5047
5091
|
}
|
|
5048
|
-
const
|
|
5049
|
-
return new
|
|
5092
|
+
const ea = (function Ci() {
|
|
5093
|
+
return new yt();
|
|
5050
5094
|
})();
|
|
5051
5095
|
function ae(e = {}) {
|
|
5052
5096
|
const { emit: a, checkoutEveryNms: u, checkoutEveryNth: m2, blockClass: w2 = "rr-block", blockSelector: b2 = null, ignoreClass: C2 = "rr-ignore", ignoreSelector: x2 = null, maskTextClass: I2 = "rr-mask", maskTextSelector: _2 = null, inlineStylesheet: O2 = true, maskAllInputs: E2, maskInputOptions: D2, slimDOMOptions: F2, maskInputFn: U2, maskTextFn: B2, hooks: $2, packFn: z2, sampling: j2 = {}, dataURLOptions: V2 = {}, mousemoveWait: q2, recordDOM: H2 = true, recordCanvas: J2 = false, recordCrossOriginIframes: Y2 = false, recordAfter: X2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e;
|
|
5053
5097
|
!(function Bl(e2) {
|
|
5054
|
-
|
|
5098
|
+
fi = e2;
|
|
5055
5099
|
})(se2);
|
|
5056
5100
|
const ie2 = !Y2 || window.parent === window;
|
|
5057
5101
|
let le2 = false;
|
|
@@ -5063,7 +5107,7 @@ function ae(e = {}) {
|
|
|
5063
5107
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5064
5108
|
if (!ie2 && !le2) return () => {
|
|
5065
5109
|
};
|
|
5066
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5110
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), ea.reset();
|
|
5067
5111
|
const ce2 = true === E2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== D2 ? D2 : { password: true }, pe2 = true === F2 || "all" === F2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === F2, headMetaDescKeywords: "all" === F2, headTitleMutations: "all" === F2 } : F2 || {};
|
|
5068
5112
|
!(function Ul(e2 = window) {
|
|
5069
5113
|
"NodeList" in e2 && !e2.NodeList.prototype.forEach && (e2.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e2 && !e2.DOMTokenList.prototype.forEach && (e2.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e3) => {
|
|
@@ -5080,57 +5124,57 @@ function ae(e = {}) {
|
|
|
5080
5124
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5081
5125
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5082
5126
|
};
|
|
5083
|
-
|
|
5127
|
+
qi = (e2, w3) => {
|
|
5084
5128
|
var b3;
|
|
5085
5129
|
const C3 = e2;
|
|
5086
|
-
if (C3.timestamp =
|
|
5130
|
+
if (C3.timestamp = mi(), null != (b3 = gi[0]) && b3.isFrozen() && C3.type !== ii.FullSnapshot && !(C3.type === ii.IncrementalSnapshot && C3.data.source === ai.Mutation) && gi.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5087
5131
|
else if (le2) {
|
|
5088
5132
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5089
5133
|
window.parent.postMessage(e3, "*");
|
|
5090
5134
|
}
|
|
5091
|
-
if (C3.type ===
|
|
5092
|
-
else if (C3.type ===
|
|
5093
|
-
if (C3.data.source ===
|
|
5135
|
+
if (C3.type === ii.FullSnapshot) de2 = C3, he2 = 0;
|
|
5136
|
+
else if (C3.type === ii.IncrementalSnapshot) {
|
|
5137
|
+
if (C3.data.source === ai.Mutation && C3.data.isAttachIframe) return;
|
|
5094
5138
|
he2++;
|
|
5095
5139
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5096
|
-
(e3 || a2) &&
|
|
5140
|
+
(e3 || a2) && Hi(true);
|
|
5097
5141
|
}
|
|
5098
5142
|
};
|
|
5099
5143
|
const rt = (e2) => {
|
|
5100
|
-
|
|
5101
|
-
}, kn = (e2) =>
|
|
5102
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5144
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.Mutation, ...e2 } });
|
|
5145
|
+
}, kn = (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Scroll, ...e2 } }), Cn = (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: ea, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: qi });
|
|
5146
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: ea, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5103
5147
|
const ye2 = new yu();
|
|
5104
|
-
|
|
5105
|
-
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager:
|
|
5106
|
-
|
|
5148
|
+
Ji = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: ea, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5149
|
+
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager: Ji, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: ea });
|
|
5150
|
+
Hi = (e2 = false) => {
|
|
5107
5151
|
if (!H2) return;
|
|
5108
|
-
|
|
5152
|
+
qi({ type: ii.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), gi.forEach((e3) => e3.lock());
|
|
5109
5153
|
const a2 = (function Zi(e3, a3) {
|
|
5110
|
-
const { mirror: u2 = new
|
|
5154
|
+
const { mirror: u2 = new yt(), blockClass: m3 = "rr-block", blockSelector: w3 = null, maskTextClass: b3 = "rr-mask", maskTextSelector: C3 = null, inlineStylesheet: x3 = true, inlineImages: I3 = false, recordCanvas: _3 = false, maskAllInputs: O3 = false, maskTextFn: E3, maskInputFn: D3, slimDOM: F3 = false, dataURLOptions: U3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3 = () => false } = a3 || {};
|
|
5111
5155
|
return Se(e3, { doc: e3, mirror: u2, blockClass: m3, blockSelector: w3, maskTextClass: b3, maskTextSelector: C3, skipChild: false, inlineStylesheet: x3, maskInputOptions: true === O3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === O3 ? { password: true } : O3, maskTextFn: E3, maskInputFn: D3, slimDOMOptions: true === F3 || "all" === F3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === F3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === F3 ? {} : F3, dataURLOptions: U3, inlineImages: I3, recordCanvas: _3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3, newlyAddedElement: false });
|
|
5112
|
-
})(document, { mirror:
|
|
5113
|
-
wo(e3,
|
|
5156
|
+
})(document, { mirror: ea, blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskAllInputs: ce2, maskTextFn: B2, maskInputFn: U2, slimDOM: pe2, dataURLOptions: V2, recordCanvas: J2, inlineImages: te2, onSerialize: (e3) => {
|
|
5157
|
+
wo(e3, ea) && ge2.addIframe(e3), bo(e3, ea) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5114
5158
|
}, onIframeLoad: (e3, a3) => {
|
|
5115
5159
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5116
5160
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5117
5161
|
me2.attachLinkElement(e3, a3);
|
|
5118
5162
|
}, keepIframeSrcFn: re2 });
|
|
5119
5163
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5120
|
-
|
|
5164
|
+
qi({ type: ii.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), gi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, ea.getId(document));
|
|
5121
5165
|
};
|
|
5122
5166
|
try {
|
|
5123
5167
|
const e2 = [], K = (e3) => {
|
|
5124
5168
|
var a2;
|
|
5125
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5126
|
-
|
|
5169
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => qi({ type: ii.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.ViewportResize, ...e4 } }), inputCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Input, ...e4 } }), mediaInteractionCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => qi({ type: ii.IncrementalSnapshot, data: { source: ai.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5170
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.Selection, ...e4 } });
|
|
5127
5171
|
}, customElementCb: (e4) => {
|
|
5128
|
-
|
|
5172
|
+
qi({ type: ii.IncrementalSnapshot, data: { source: ai.CustomElement, ...e4 } });
|
|
5129
5173
|
}, typingCb: (e4) => {
|
|
5130
|
-
|
|
5174
|
+
qi({ type: ii.IncrementalSnapshot, data: { ...e4 } });
|
|
5131
5175
|
}, deviceChangeCb: (e4) => {
|
|
5132
|
-
|
|
5133
|
-
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror:
|
|
5176
|
+
qi({ type: ii.Device, data: { ...e4 } });
|
|
5177
|
+
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: ea, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Ji, ignoreCSSAttributes: oe2, plugins: (null == (a2 = null == ne2 ? void 0 : ne2.filter((e4) => e4.observer)) ? void 0 : a2.map((e4) => ({ observer: e4.observer, options: e4.options, callback: (a3) => qi({ type: ii.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5134
5178
|
};
|
|
5135
5179
|
ge2.addLoadListener((a2) => {
|
|
5136
5180
|
try {
|
|
@@ -5140,15 +5184,15 @@ function ae(e = {}) {
|
|
|
5140
5184
|
}
|
|
5141
5185
|
});
|
|
5142
5186
|
const W = () => {
|
|
5143
|
-
|
|
5187
|
+
Hi(), e2.push(K(document)), Xi = true;
|
|
5144
5188
|
};
|
|
5145
5189
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5146
|
-
|
|
5190
|
+
qi({ type: ii.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5147
5191
|
})), e2.push(G("load", () => {
|
|
5148
|
-
|
|
5192
|
+
qi({ type: ii.Load, data: {} }), "load" === X2 && W();
|
|
5149
5193
|
}, window))), () => {
|
|
5150
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5151
|
-
|
|
5194
|
+
e2.forEach((e3) => e3()), ye2.destroy(), Xi = false, (function jl() {
|
|
5195
|
+
fi = void 0;
|
|
5152
5196
|
})();
|
|
5153
5197
|
};
|
|
5154
5198
|
} catch (e2) {
|
|
@@ -5175,24 +5219,24 @@ function vu(e) {
|
|
|
5175
5219
|
}), u;
|
|
5176
5220
|
}
|
|
5177
5221
|
ae.addCustomEvent = (e, a) => {
|
|
5178
|
-
if (!
|
|
5179
|
-
|
|
5222
|
+
if (!Xi) throw new Error("please add custom event after start recording");
|
|
5223
|
+
qi({ type: ii.Custom, data: { tag: e, payload: a } });
|
|
5180
5224
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5181
|
-
if (!
|
|
5182
|
-
|
|
5225
|
+
if (!Xi) throw new Error("please add Sailfish event after start recording");
|
|
5226
|
+
qi({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5183
5227
|
}, ae.freezePage = () => {
|
|
5184
|
-
|
|
5228
|
+
gi.forEach((e) => e.freeze());
|
|
5185
5229
|
}, ae.takeFullSnapshot = (e) => {
|
|
5186
|
-
if (!
|
|
5187
|
-
|
|
5188
|
-
}, ae.mirror =
|
|
5189
|
-
var
|
|
5190
|
-
return { isColorSupported: false, reset:
|
|
5230
|
+
if (!Xi) throw new Error("please take full snapshot after start recording");
|
|
5231
|
+
Hi(e);
|
|
5232
|
+
}, ae.mirror = ea;
|
|
5233
|
+
var ta = { exports: {} }, na = String, Lo = function() {
|
|
5234
|
+
return { isColorSupported: false, reset: na, bold: na, dim: na, italic: na, underline: na, inverse: na, hidden: na, strikethrough: na, black: na, red: na, green: na, yellow: na, blue: na, magenta: na, cyan: na, white: na, gray: na, bgBlack: na, bgRed: na, bgGreen: na, bgYellow: na, bgBlue: na, bgMagenta: na, bgCyan: na, bgWhite: na, blackBright: na, redBright: na, greenBright: na, yellowBright: na, blueBright: na, magentaBright: na, cyanBright: na, whiteBright: na, bgBlackBright: na, bgRedBright: na, bgGreenBright: na, bgYellowBright: na, bgBlueBright: na, bgMagentaBright: na, bgCyanBright: na, bgWhiteBright: na };
|
|
5191
5235
|
};
|
|
5192
|
-
|
|
5193
|
-
var
|
|
5194
|
-
const
|
|
5195
|
-
let
|
|
5236
|
+
ta.exports = Lo(), ta.exports.createColors = Lo;
|
|
5237
|
+
var ra = ta.exports;
|
|
5238
|
+
const oa = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5239
|
+
let sa = ra, ia = oa, aa = class To extends Error {
|
|
5196
5240
|
constructor(e, a, u, m2, w2, b2) {
|
|
5197
5241
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
|
|
5198
5242
|
}
|
|
@@ -5202,11 +5246,11 @@ let oa = na, sa = ra, ia = class To extends Error {
|
|
|
5202
5246
|
showSourceCode(e) {
|
|
5203
5247
|
if (!this.source) return "";
|
|
5204
5248
|
let a = this.source;
|
|
5205
|
-
null == e && (e =
|
|
5249
|
+
null == e && (e = sa.isColorSupported);
|
|
5206
5250
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5207
5251
|
if (e) {
|
|
5208
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5209
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5252
|
+
let { bold: e2, gray: a2, red: u2 } = sa.createColors(true);
|
|
5253
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), ia && (i = (e3) => ia(e3));
|
|
5210
5254
|
}
|
|
5211
5255
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
5212
5256
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5227,10 +5271,10 @@ let oa = na, sa = ra, ia = class To extends Error {
|
|
|
5227
5271
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5228
5272
|
}
|
|
5229
5273
|
};
|
|
5230
|
-
var
|
|
5231
|
-
|
|
5232
|
-
const
|
|
5233
|
-
let
|
|
5274
|
+
var la = aa;
|
|
5275
|
+
aa.default = aa;
|
|
5276
|
+
const ca = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5277
|
+
let ua = class {
|
|
5234
5278
|
constructor(e) {
|
|
5235
5279
|
this.builder = e;
|
|
5236
5280
|
}
|
|
@@ -5282,7 +5326,7 @@ let ca = class {
|
|
|
5282
5326
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5283
5327
|
let w2 = e.parent;
|
|
5284
5328
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5285
|
-
if (!w2) return
|
|
5329
|
+
if (!w2) return ca[u];
|
|
5286
5330
|
let b2 = e.root();
|
|
5287
5331
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5288
5332
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5294,7 +5338,7 @@ let ca = class {
|
|
|
5294
5338
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5295
5339
|
});
|
|
5296
5340
|
}
|
|
5297
|
-
return typeof m2 > "u" && (m2 =
|
|
5341
|
+
return typeof m2 > "u" && (m2 = ca[u]), b2.rawCache[u] = m2, m2;
|
|
5298
5342
|
}
|
|
5299
5343
|
rawBeforeClose(e) {
|
|
5300
5344
|
let a;
|
|
@@ -5370,17 +5414,17 @@ let ca = class {
|
|
|
5370
5414
|
this[e.type](e, a);
|
|
5371
5415
|
}
|
|
5372
5416
|
};
|
|
5373
|
-
var
|
|
5374
|
-
|
|
5375
|
-
let
|
|
5417
|
+
var pa = ua;
|
|
5418
|
+
ua.default = ua;
|
|
5419
|
+
let ha = pa;
|
|
5376
5420
|
function zs(e, a) {
|
|
5377
|
-
new
|
|
5421
|
+
new ha(a).stringify(e);
|
|
5378
5422
|
}
|
|
5379
|
-
var
|
|
5423
|
+
var fa = zs;
|
|
5380
5424
|
zs.default = zs;
|
|
5381
|
-
var
|
|
5382
|
-
|
|
5383
|
-
let
|
|
5425
|
+
var ma = {};
|
|
5426
|
+
ma.isClean = Symbol("isClean"), ma.my = Symbol("my");
|
|
5427
|
+
let ga = la, ya = pa, wa = fa, { isClean: Sa, my: ba } = ma;
|
|
5384
5428
|
function Bs(e, a) {
|
|
5385
5429
|
let u = new e.constructor();
|
|
5386
5430
|
for (let m2 in e) {
|
|
@@ -5402,12 +5446,12 @@ function Fe(e, a) {
|
|
|
5402
5446
|
}
|
|
5403
5447
|
return w2;
|
|
5404
5448
|
}
|
|
5405
|
-
let
|
|
5449
|
+
let va = class {
|
|
5406
5450
|
get proxyOf() {
|
|
5407
5451
|
return this;
|
|
5408
5452
|
}
|
|
5409
5453
|
constructor(e = {}) {
|
|
5410
|
-
this.raws = {}, this[
|
|
5454
|
+
this.raws = {}, this[Sa] = false, this[ba] = true;
|
|
5411
5455
|
for (let a in e) if ("nodes" === a) {
|
|
5412
5456
|
this.nodes = [];
|
|
5413
5457
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5451,19 +5495,19 @@ let ba = class {
|
|
|
5451
5495
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5452
5496
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5453
5497
|
}
|
|
5454
|
-
return new
|
|
5498
|
+
return new ga(e);
|
|
5455
5499
|
}
|
|
5456
5500
|
getProxyProcessor() {
|
|
5457
5501
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
5458
5502
|
}
|
|
5459
5503
|
markClean() {
|
|
5460
|
-
this[
|
|
5504
|
+
this[Sa] = true;
|
|
5461
5505
|
}
|
|
5462
5506
|
markDirty() {
|
|
5463
|
-
if (this[
|
|
5464
|
-
this[
|
|
5507
|
+
if (this[Sa]) {
|
|
5508
|
+
this[Sa] = false;
|
|
5465
5509
|
let e = this;
|
|
5466
|
-
for (; e = e.parent; ) e[
|
|
5510
|
+
for (; e = e.parent; ) e[Sa] = false;
|
|
5467
5511
|
}
|
|
5468
5512
|
}
|
|
5469
5513
|
next() {
|
|
@@ -5499,7 +5543,7 @@ let ba = class {
|
|
|
5499
5543
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
5500
5544
|
}
|
|
5501
5545
|
raw(e, a) {
|
|
5502
|
-
return new
|
|
5546
|
+
return new ya().raw(this, e, a);
|
|
5503
5547
|
}
|
|
5504
5548
|
remove() {
|
|
5505
5549
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5536,7 +5580,7 @@ let ba = class {
|
|
|
5536
5580
|
toProxy() {
|
|
5537
5581
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5538
5582
|
}
|
|
5539
|
-
toString(e =
|
|
5583
|
+
toString(e = wa) {
|
|
5540
5584
|
e.stringify && (e = e.stringify);
|
|
5541
5585
|
let a = "";
|
|
5542
5586
|
return e(this, (e2) => {
|
|
@@ -5549,16 +5593,16 @@ let ba = class {
|
|
|
5549
5593
|
return e.warn(a, m2);
|
|
5550
5594
|
}
|
|
5551
5595
|
};
|
|
5552
|
-
var
|
|
5553
|
-
|
|
5554
|
-
let
|
|
5596
|
+
var Ca = va;
|
|
5597
|
+
va.default = va;
|
|
5598
|
+
let ka = Ca, xa = class extends ka {
|
|
5555
5599
|
constructor(e) {
|
|
5556
5600
|
super(e), this.type = "comment";
|
|
5557
5601
|
}
|
|
5558
5602
|
};
|
|
5559
|
-
var
|
|
5560
|
-
|
|
5561
|
-
let
|
|
5603
|
+
var Ma = xa;
|
|
5604
|
+
xa.default = xa;
|
|
5605
|
+
let Ia = Ca, _a = class extends Ia {
|
|
5562
5606
|
get variable() {
|
|
5563
5607
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5564
5608
|
}
|
|
@@ -5566,16 +5610,16 @@ let Ma = va, Ia = class extends Ma {
|
|
|
5566
5610
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5567
5611
|
}
|
|
5568
5612
|
};
|
|
5569
|
-
var
|
|
5570
|
-
|
|
5571
|
-
let
|
|
5613
|
+
var Oa = _a;
|
|
5614
|
+
_a.default = _a;
|
|
5615
|
+
let Ea, La, Ra, Aa, Ta = Ma, Na = Oa, Pa = Ca, { isClean: Da, my: Fa } = ma;
|
|
5572
5616
|
function Wo(e) {
|
|
5573
5617
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5574
5618
|
}
|
|
5575
5619
|
function zo(e) {
|
|
5576
|
-
if (e[
|
|
5620
|
+
if (e[Da] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5577
5621
|
}
|
|
5578
|
-
let
|
|
5622
|
+
let Ua = class Bo extends Pa {
|
|
5579
5623
|
get first() {
|
|
5580
5624
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5581
5625
|
}
|
|
@@ -5627,7 +5671,7 @@ let Fa = class Bo extends Na {
|
|
|
5627
5671
|
return this.markDirty(), this;
|
|
5628
5672
|
}
|
|
5629
5673
|
normalize(e, a) {
|
|
5630
|
-
if ("string" == typeof e) e = Wo(
|
|
5674
|
+
if ("string" == typeof e) e = Wo(La(e).nodes);
|
|
5631
5675
|
else if (typeof e > "u") e = [];
|
|
5632
5676
|
else if (Array.isArray(e)) {
|
|
5633
5677
|
e = e.slice(0);
|
|
@@ -5638,14 +5682,14 @@ let Fa = class Bo extends Na {
|
|
|
5638
5682
|
} else if (e.type) e = [e];
|
|
5639
5683
|
else if (e.prop) {
|
|
5640
5684
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5641
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5642
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5643
|
-
else if (e.name) e = [new
|
|
5685
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Na(e)];
|
|
5686
|
+
} else if (e.selector || e.selectors) e = [new Aa(e)];
|
|
5687
|
+
else if (e.name) e = [new Ea(e)];
|
|
5644
5688
|
else {
|
|
5645
5689
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5646
|
-
e = [new
|
|
5690
|
+
e = [new Ta(e)];
|
|
5647
5691
|
}
|
|
5648
|
-
return e.map((e2) => (e2[
|
|
5692
|
+
return e.map((e2) => (e2[Fa] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Da] && zo(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
5649
5693
|
}
|
|
5650
5694
|
prepend(...e) {
|
|
5651
5695
|
e = e.reverse();
|
|
@@ -5721,22 +5765,22 @@ let Fa = class Bo extends Na {
|
|
|
5721
5765
|
}));
|
|
5722
5766
|
}
|
|
5723
5767
|
};
|
|
5724
|
-
|
|
5768
|
+
Ua.registerParse = (e) => {
|
|
5769
|
+
La = e;
|
|
5770
|
+
}, Ua.registerRule = (e) => {
|
|
5771
|
+
Aa = e;
|
|
5772
|
+
}, Ua.registerAtRule = (e) => {
|
|
5725
5773
|
Ea = e;
|
|
5726
|
-
},
|
|
5774
|
+
}, Ua.registerRoot = (e) => {
|
|
5727
5775
|
Ra = e;
|
|
5728
|
-
}, Fa.registerAtRule = (e) => {
|
|
5729
|
-
Oa = e;
|
|
5730
|
-
}, Fa.registerRoot = (e) => {
|
|
5731
|
-
La = e;
|
|
5732
5776
|
};
|
|
5733
|
-
var
|
|
5734
|
-
|
|
5735
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5736
|
-
|
|
5777
|
+
var Ba = Ua;
|
|
5778
|
+
Ua.default = Ua, Ua.rebuild = (e) => {
|
|
5779
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, Ea.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Aa.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Na.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Ta.prototype) : "root" === e.type && Object.setPrototypeOf(e, Ra.prototype), e[Fa] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5780
|
+
Ua.rebuild(e2);
|
|
5737
5781
|
});
|
|
5738
5782
|
};
|
|
5739
|
-
let
|
|
5783
|
+
let $a = Ba, Wa = class extends $a {
|
|
5740
5784
|
constructor(e) {
|
|
5741
5785
|
super(e), this.type = "atrule";
|
|
5742
5786
|
}
|
|
@@ -5747,38 +5791,38 @@ let Ba = Ua, $a = class extends Ba {
|
|
|
5747
5791
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5748
5792
|
}
|
|
5749
5793
|
};
|
|
5750
|
-
var
|
|
5751
|
-
|
|
5752
|
-
let
|
|
5794
|
+
var za = Wa;
|
|
5795
|
+
Wa.default = Wa, $a.registerAtRule(Wa);
|
|
5796
|
+
let ja, Ga, Va = Ba, qa = class extends Va {
|
|
5753
5797
|
constructor(e) {
|
|
5754
5798
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5755
5799
|
}
|
|
5756
5800
|
toResult(e = {}) {
|
|
5757
|
-
return new
|
|
5801
|
+
return new ja(new Ga(), this, e).stringify();
|
|
5758
5802
|
}
|
|
5759
5803
|
};
|
|
5760
|
-
|
|
5761
|
-
za = e;
|
|
5762
|
-
}, Va.registerProcessor = (e) => {
|
|
5804
|
+
qa.registerLazyResult = (e) => {
|
|
5763
5805
|
ja = e;
|
|
5806
|
+
}, qa.registerProcessor = (e) => {
|
|
5807
|
+
Ga = e;
|
|
5764
5808
|
};
|
|
5765
|
-
var
|
|
5766
|
-
|
|
5767
|
-
var
|
|
5809
|
+
var Za = qa;
|
|
5810
|
+
qa.default = qa;
|
|
5811
|
+
var Ka = { nanoid: (e = 21) => {
|
|
5768
5812
|
let a = "", u = 0 | e;
|
|
5769
5813
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5770
5814
|
return a;
|
|
5771
5815
|
} };
|
|
5772
|
-
let { existsSync:
|
|
5773
|
-
let
|
|
5816
|
+
let { existsSync: Ja, readFileSync: Ya } = oa, { dirname: Qa, join: el } = oa, { SourceMapConsumer: tl, SourceMapGenerator: nl } = oa;
|
|
5817
|
+
let rl = class {
|
|
5774
5818
|
constructor(e, a) {
|
|
5775
5819
|
if (false === a.map) return;
|
|
5776
5820
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5777
5821
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5778
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5822
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Qa(this.mapFile)), m2 && (this.text = m2);
|
|
5779
5823
|
}
|
|
5780
5824
|
consumer() {
|
|
5781
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5825
|
+
return this.consumerCache || (this.consumerCache = new tl(this.text)), this.consumerCache;
|
|
5782
5826
|
}
|
|
5783
5827
|
decodeInline(e) {
|
|
5784
5828
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5803,15 +5847,15 @@ let nl = class {
|
|
|
5803
5847
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5804
5848
|
}
|
|
5805
5849
|
loadFile(e) {
|
|
5806
|
-
if (this.root =
|
|
5850
|
+
if (this.root = Qa(e), Ja(e)) return this.mapFile = e, Ya(e, "utf-8").toString().trim();
|
|
5807
5851
|
}
|
|
5808
5852
|
loadMap(e, a) {
|
|
5809
5853
|
if (false === a) return false;
|
|
5810
5854
|
if (a) {
|
|
5811
5855
|
if ("string" == typeof a) return a;
|
|
5812
5856
|
if ("function" != typeof a) {
|
|
5813
|
-
if (a instanceof
|
|
5814
|
-
if (a instanceof
|
|
5857
|
+
if (a instanceof tl) return nl.fromSourceMap(a).toString();
|
|
5858
|
+
if (a instanceof nl) return a.toString();
|
|
5815
5859
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5816
5860
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5817
5861
|
}
|
|
@@ -5827,7 +5871,7 @@ let nl = class {
|
|
|
5827
5871
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5828
5872
|
if (this.annotation) {
|
|
5829
5873
|
let a2 = this.annotation;
|
|
5830
|
-
return e && (a2 = Qa(
|
|
5874
|
+
return e && (a2 = el(Qa(e), a2)), this.loadFile(a2);
|
|
5831
5875
|
}
|
|
5832
5876
|
}
|
|
5833
5877
|
}
|
|
@@ -5838,23 +5882,23 @@ let nl = class {
|
|
|
5838
5882
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5839
5883
|
}
|
|
5840
5884
|
};
|
|
5841
|
-
var
|
|
5842
|
-
|
|
5843
|
-
let { nanoid:
|
|
5885
|
+
var ol = rl;
|
|
5886
|
+
rl.default = rl;
|
|
5887
|
+
let { nanoid: sl } = Ka, { isAbsolute: il, resolve: al } = oa, { SourceMapConsumer: ll, SourceMapGenerator: cl } = oa, { fileURLToPath: ul, pathToFileURL: pl } = oa, dl = la, hl = ol, fl = oa, ml = Symbol("fromOffsetCache"), gl = !(!ll || !cl), yl = !(!al || !il), wl = class {
|
|
5844
5888
|
get from() {
|
|
5845
5889
|
return this.file || this.id;
|
|
5846
5890
|
}
|
|
5847
5891
|
constructor(e, a = {}) {
|
|
5848
5892
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5849
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
5850
|
-
let e2 = new
|
|
5893
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!yl || /^\w+:\/\//.test(a.from) || il(a.from) ? this.file = a.from : this.file = al(a.from)), yl && gl) {
|
|
5894
|
+
let e2 = new hl(this.css, a);
|
|
5851
5895
|
if (e2.text) {
|
|
5852
5896
|
this.map = e2;
|
|
5853
5897
|
let a2 = e2.consumer().file;
|
|
5854
5898
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5855
5899
|
}
|
|
5856
5900
|
}
|
|
5857
|
-
this.file || (this.id = "<input css " +
|
|
5901
|
+
this.file || (this.id = "<input css " + sl(6) + ">"), this.map && (this.map.file = this.from);
|
|
5858
5902
|
}
|
|
5859
5903
|
error(e, a, u, m2 = {}) {
|
|
5860
5904
|
let w2, b2, C2;
|
|
@@ -5873,17 +5917,17 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5873
5917
|
a = e2.line, u = e2.col;
|
|
5874
5918
|
}
|
|
5875
5919
|
let x2 = this.origin(a, u, b2, w2);
|
|
5876
|
-
return C2 = x2 ? new
|
|
5920
|
+
return C2 = x2 ? new dl(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new dl(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (pl && (C2.input.url = pl(this.file).toString()), C2.input.file = this.file), C2;
|
|
5877
5921
|
}
|
|
5878
5922
|
fromOffset(e) {
|
|
5879
5923
|
let a, u;
|
|
5880
|
-
if (this[
|
|
5924
|
+
if (this[ml]) u = this[ml];
|
|
5881
5925
|
else {
|
|
5882
5926
|
let e2 = this.css.split("\n");
|
|
5883
5927
|
u = new Array(e2.length);
|
|
5884
5928
|
let a2 = 0;
|
|
5885
5929
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5886
|
-
this[
|
|
5930
|
+
this[ml] = u;
|
|
5887
5931
|
}
|
|
5888
5932
|
a = u[u.length - 1];
|
|
5889
5933
|
let m2 = 0;
|
|
@@ -5902,17 +5946,17 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5902
5946
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5903
5947
|
}
|
|
5904
5948
|
mapResolve(e) {
|
|
5905
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5949
|
+
return /^\w+:\/\//.test(e) ? e : al(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5906
5950
|
}
|
|
5907
5951
|
origin(e, a, u, m2) {
|
|
5908
5952
|
if (!this.map) return false;
|
|
5909
5953
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5910
5954
|
if (!x2.source) return false;
|
|
5911
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5955
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = il(x2.source) ? pl(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || pl(this.map.mapFile));
|
|
5912
5956
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5913
5957
|
if ("file:" === b2.protocol) {
|
|
5914
|
-
if (!
|
|
5915
|
-
I2.file =
|
|
5958
|
+
if (!ul) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5959
|
+
I2.file = ul(b2);
|
|
5916
5960
|
}
|
|
5917
5961
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5918
5962
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5923,9 +5967,9 @@ let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsum
|
|
|
5923
5967
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5924
5968
|
}
|
|
5925
5969
|
};
|
|
5926
|
-
var
|
|
5927
|
-
|
|
5928
|
-
let
|
|
5970
|
+
var Sl = wl;
|
|
5971
|
+
wl.default = wl, fl && fl.registerInput && fl.registerInput(wl);
|
|
5972
|
+
let bl, vl, Cl = Ba, kl = class extends Cl {
|
|
5929
5973
|
constructor(e) {
|
|
5930
5974
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5931
5975
|
}
|
|
@@ -5942,29 +5986,29 @@ let Sl, bl, vl = Ua, Cl = class extends vl {
|
|
|
5942
5986
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5943
5987
|
}
|
|
5944
5988
|
toResult(e = {}) {
|
|
5945
|
-
return new
|
|
5989
|
+
return new bl(new vl(), this, e).stringify();
|
|
5946
5990
|
}
|
|
5947
5991
|
};
|
|
5948
|
-
|
|
5949
|
-
Sl = e;
|
|
5950
|
-
}, Cl.registerProcessor = (e) => {
|
|
5992
|
+
kl.registerLazyResult = (e) => {
|
|
5951
5993
|
bl = e;
|
|
5994
|
+
}, kl.registerProcessor = (e) => {
|
|
5995
|
+
vl = e;
|
|
5952
5996
|
};
|
|
5953
|
-
var
|
|
5954
|
-
|
|
5955
|
-
let
|
|
5997
|
+
var xl = kl;
|
|
5998
|
+
kl.default = kl, Cl.registerRoot(kl);
|
|
5999
|
+
let Ml = { comma: (e) => Ml.split(e, [","], true), space(e) {
|
|
5956
6000
|
let a = [" ", "\n", " "];
|
|
5957
|
-
return
|
|
6001
|
+
return Ml.split(e, a);
|
|
5958
6002
|
}, split(e, a, u) {
|
|
5959
6003
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5960
6004
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
5961
6005
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5962
6006
|
} };
|
|
5963
|
-
var
|
|
5964
|
-
|
|
5965
|
-
let
|
|
6007
|
+
var Il = Ml;
|
|
6008
|
+
Ml.default = Ml;
|
|
6009
|
+
let Ol = Ba, El = Il, Ll = class extends Ol {
|
|
5966
6010
|
get selectors() {
|
|
5967
|
-
return
|
|
6011
|
+
return El.comma(this.selector);
|
|
5968
6012
|
}
|
|
5969
6013
|
set selectors(e) {
|
|
5970
6014
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5974,34 +6018,34 @@ let Il = Ua, Ol = Ml, El = class extends Il {
|
|
|
5974
6018
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5975
6019
|
}
|
|
5976
6020
|
};
|
|
5977
|
-
var
|
|
5978
|
-
|
|
5979
|
-
let
|
|
6021
|
+
var Rl = Ll;
|
|
6022
|
+
Ll.default = Ll, Ol.registerRule(Ll);
|
|
6023
|
+
let Al = za, Tl = Ma, Nl = Oa, Pl = Sl, Dl = ol, Jl = xl, ec = Rl;
|
|
5980
6024
|
function Ke(e, a) {
|
|
5981
6025
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
5982
6026
|
let { inputs: u, ...m2 } = e;
|
|
5983
6027
|
if (u) {
|
|
5984
6028
|
a = [];
|
|
5985
6029
|
for (let e2 of u) {
|
|
5986
|
-
let u2 = { ...e2, __proto__:
|
|
5987
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
6030
|
+
let u2 = { ...e2, __proto__: Pl.prototype };
|
|
6031
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Dl.prototype }), a.push(u2);
|
|
5988
6032
|
}
|
|
5989
6033
|
}
|
|
5990
6034
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
5991
6035
|
let { inputId: e2, ...u2 } = m2.source;
|
|
5992
6036
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
5993
6037
|
}
|
|
5994
|
-
if ("root" === m2.type) return new
|
|
5995
|
-
if ("decl" === m2.type) return new
|
|
5996
|
-
if ("rule" === m2.type) return new
|
|
5997
|
-
if ("comment" === m2.type) return new
|
|
5998
|
-
if ("atrule" === m2.type) return new
|
|
6038
|
+
if ("root" === m2.type) return new Jl(m2);
|
|
6039
|
+
if ("decl" === m2.type) return new Nl(m2);
|
|
6040
|
+
if ("rule" === m2.type) return new ec(m2);
|
|
6041
|
+
if ("comment" === m2.type) return new Tl(m2);
|
|
6042
|
+
if ("atrule" === m2.type) return new Al(m2);
|
|
5999
6043
|
throw new Error("Unknown node type: " + e.type);
|
|
6000
6044
|
}
|
|
6001
|
-
var
|
|
6045
|
+
var tc = Ke;
|
|
6002
6046
|
Ke.default = Ke;
|
|
6003
|
-
let { dirname:
|
|
6004
|
-
var
|
|
6047
|
+
let { dirname: nc, relative: rc, resolve: oc, sep: sc } = oa, { SourceMapConsumer: ic, SourceMapGenerator: ac } = oa, { pathToFileURL: lc } = oa, cc = Sl, uc = !(!ic || !ac), pc = !!(nc && oc && rc && sc);
|
|
6048
|
+
var dc = class {
|
|
6005
6049
|
constructor(e, a, u, m2) {
|
|
6006
6050
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
6007
6051
|
}
|
|
@@ -6013,8 +6057,8 @@ var pc = class {
|
|
|
6013
6057
|
}
|
|
6014
6058
|
applyPrevMaps() {
|
|
6015
6059
|
for (let e of this.previous()) {
|
|
6016
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
6017
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6060
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || nc(e.file);
|
|
6061
|
+
false === this.mapOpts.sourcesContent ? (a = new ic(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
6018
6062
|
}
|
|
6019
6063
|
}
|
|
6020
6064
|
clearAnnotation() {
|
|
@@ -6024,7 +6068,7 @@ var pc = class {
|
|
|
6024
6068
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
6025
6069
|
}
|
|
6026
6070
|
generate() {
|
|
6027
|
-
if (this.clearAnnotation(),
|
|
6071
|
+
if (this.clearAnnotation(), pc && uc && this.isMap()) return this.generateMap();
|
|
6028
6072
|
{
|
|
6029
6073
|
let e = "";
|
|
6030
6074
|
return this.stringify(this.root, (a) => {
|
|
@@ -6036,12 +6080,12 @@ var pc = class {
|
|
|
6036
6080
|
if (this.root) this.generateString();
|
|
6037
6081
|
else if (1 === this.previous().length) {
|
|
6038
6082
|
let e = this.previous()[0].consumer();
|
|
6039
|
-
e.file = this.outputFile(), this.map =
|
|
6040
|
-
} else this.map = new
|
|
6083
|
+
e.file = this.outputFile(), this.map = ac.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6084
|
+
} else this.map = new ac({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
6041
6085
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
6042
6086
|
}
|
|
6043
6087
|
generateString() {
|
|
6044
|
-
this.css = "", this.map = new
|
|
6088
|
+
this.css = "", this.map = new ac({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6045
6089
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6046
6090
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6047
6091
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -6071,9 +6115,9 @@ var pc = class {
|
|
|
6071
6115
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6072
6116
|
let a = this.memoizedPaths.get(e);
|
|
6073
6117
|
if (a) return a;
|
|
6074
|
-
let u = this.opts.to ?
|
|
6075
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
6076
|
-
let m2 =
|
|
6118
|
+
let u = this.opts.to ? nc(this.opts.to) : ".";
|
|
6119
|
+
"string" == typeof this.mapOpts.annotation && (u = nc(oc(u, this.mapOpts.annotation)));
|
|
6120
|
+
let m2 = rc(u, e);
|
|
6077
6121
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6078
6122
|
}
|
|
6079
6123
|
previous() {
|
|
@@ -6084,7 +6128,7 @@ var pc = class {
|
|
|
6084
6128
|
}
|
|
6085
6129
|
});
|
|
6086
6130
|
else {
|
|
6087
|
-
let e = new
|
|
6131
|
+
let e = new cc(this.originalCSS, this.opts);
|
|
6088
6132
|
e.map && this.previousMaps.push(e.map);
|
|
6089
6133
|
}
|
|
6090
6134
|
return this.previousMaps;
|
|
@@ -6115,8 +6159,8 @@ var pc = class {
|
|
|
6115
6159
|
toFileUrl(e) {
|
|
6116
6160
|
let a = this.memoizedFileURLs.get(e);
|
|
6117
6161
|
if (a) return a;
|
|
6118
|
-
if (
|
|
6119
|
-
let a2 =
|
|
6162
|
+
if (lc) {
|
|
6163
|
+
let a2 = lc(e).toString();
|
|
6120
6164
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6121
6165
|
}
|
|
6122
6166
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6124,13 +6168,13 @@ var pc = class {
|
|
|
6124
6168
|
toUrl(e) {
|
|
6125
6169
|
let a = this.memoizedURLs.get(e);
|
|
6126
6170
|
if (a) return a;
|
|
6127
|
-
"\\" ===
|
|
6171
|
+
"\\" === sc && (e = e.replace(/\\/g, "/"));
|
|
6128
6172
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6129
6173
|
return this.memoizedURLs.set(e, u), u;
|
|
6130
6174
|
}
|
|
6131
6175
|
};
|
|
6132
|
-
const
|
|
6133
|
-
let
|
|
6176
|
+
const hc = /[\t\n\f\r "#'()/;[\\\]{}]/g, fc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, mc = /.[\r\n"'(/\\]/, gc = /[\da-f]/i;
|
|
6177
|
+
let yc = za, wc = Ma, Sc = Oa, bc = xl, vc = Rl, kc = function(e, a = {}) {
|
|
6134
6178
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
6135
6179
|
function y2(a2) {
|
|
6136
6180
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6180,7 +6224,7 @@ let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
|
6180
6224
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6181
6225
|
} while (I2);
|
|
6182
6226
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6183
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6227
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || mc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6184
6228
|
break;
|
|
6185
6229
|
case 39:
|
|
6186
6230
|
case 34:
|
|
@@ -6198,31 +6242,31 @@ let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
|
6198
6242
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6199
6243
|
break;
|
|
6200
6244
|
case 64:
|
|
6201
|
-
|
|
6245
|
+
hc.lastIndex = B2 + 1, hc.test(D2), b2 = 0 === hc.lastIndex ? D2.length - 1 : hc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6202
6246
|
break;
|
|
6203
6247
|
case 92:
|
|
6204
6248
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6205
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6206
|
-
for (;
|
|
6249
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, gc.test(D2.charAt(b2)))) {
|
|
6250
|
+
for (; gc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6207
6251
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6208
6252
|
}
|
|
6209
6253
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6210
6254
|
break;
|
|
6211
6255
|
default:
|
|
6212
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
6256
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (fc.lastIndex = B2 + 1, fc.test(D2), b2 = 0 === fc.lastIndex ? D2.length - 1 : fc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6213
6257
|
}
|
|
6214
6258
|
return B2++, x2;
|
|
6215
6259
|
}, position: function S() {
|
|
6216
6260
|
return B2;
|
|
6217
6261
|
} };
|
|
6218
6262
|
};
|
|
6219
|
-
const
|
|
6220
|
-
var
|
|
6263
|
+
const xc = { empty: true, space: true };
|
|
6264
|
+
var Mc = class {
|
|
6221
6265
|
constructor(e) {
|
|
6222
|
-
this.input = e, this.root = new
|
|
6266
|
+
this.input = e, this.root = new bc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6223
6267
|
}
|
|
6224
6268
|
atrule(e) {
|
|
6225
|
-
let a = new
|
|
6269
|
+
let a = new yc();
|
|
6226
6270
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6227
6271
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6228
6272
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6274,7 +6318,7 @@ var xc = class {
|
|
|
6274
6318
|
return false;
|
|
6275
6319
|
}
|
|
6276
6320
|
comment(e) {
|
|
6277
|
-
let a = new
|
|
6321
|
+
let a = new wc();
|
|
6278
6322
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6279
6323
|
let u = e[1].slice(2, -2);
|
|
6280
6324
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6287,7 +6331,7 @@ var xc = class {
|
|
|
6287
6331
|
this.tokenizer = kc(this.input);
|
|
6288
6332
|
}
|
|
6289
6333
|
decl(e, a) {
|
|
6290
|
-
let u = new
|
|
6334
|
+
let u = new Sc();
|
|
6291
6335
|
this.init(u, e[0][2]);
|
|
6292
6336
|
let m2, w2 = e[e.length - 1];
|
|
6293
6337
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6336,7 +6380,7 @@ var xc = class {
|
|
|
6336
6380
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6337
6381
|
}
|
|
6338
6382
|
emptyRule(e) {
|
|
6339
|
-
let a = new
|
|
6383
|
+
let a = new vc();
|
|
6340
6384
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6341
6385
|
}
|
|
6342
6386
|
end(e) {
|
|
@@ -6412,7 +6456,7 @@ var xc = class {
|
|
|
6412
6456
|
}
|
|
6413
6457
|
raw(e, a, u, m2) {
|
|
6414
6458
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6415
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
6459
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", xc[x2] || xc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6416
6460
|
if (!O2) {
|
|
6417
6461
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6418
6462
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6421,7 +6465,7 @@ var xc = class {
|
|
|
6421
6465
|
}
|
|
6422
6466
|
rule(e) {
|
|
6423
6467
|
e.pop();
|
|
6424
|
-
let a = new
|
|
6468
|
+
let a = new vc();
|
|
6425
6469
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6426
6470
|
}
|
|
6427
6471
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6461,9 +6505,9 @@ var xc = class {
|
|
|
6461
6505
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6462
6506
|
}
|
|
6463
6507
|
};
|
|
6464
|
-
let
|
|
6508
|
+
let Ic = Ba, _c = Sl, Oc = Mc;
|
|
6465
6509
|
function Gt(e, a) {
|
|
6466
|
-
let u = new
|
|
6510
|
+
let u = new _c(e, a), m2 = new Oc(u);
|
|
6467
6511
|
try {
|
|
6468
6512
|
m2.parse();
|
|
6469
6513
|
} catch (e2) {
|
|
@@ -6471,9 +6515,9 @@ function Gt(e, a) {
|
|
|
6471
6515
|
}
|
|
6472
6516
|
return m2.root;
|
|
6473
6517
|
}
|
|
6474
|
-
var
|
|
6475
|
-
Gt.default = Gt,
|
|
6476
|
-
let
|
|
6518
|
+
var Ec = Gt;
|
|
6519
|
+
Gt.default = Gt, Ic.registerParse(Gt);
|
|
6520
|
+
let Lc = class {
|
|
6477
6521
|
constructor(e, a = {}) {
|
|
6478
6522
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6479
6523
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6485,9 +6529,9 @@ let Ec = class {
|
|
|
6485
6529
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
6486
6530
|
}
|
|
6487
6531
|
};
|
|
6488
|
-
var
|
|
6489
|
-
|
|
6490
|
-
let
|
|
6532
|
+
var Rc = Lc;
|
|
6533
|
+
Lc.default = Lc;
|
|
6534
|
+
let Ac = Rc, Tc = class {
|
|
6491
6535
|
get content() {
|
|
6492
6536
|
return this.css;
|
|
6493
6537
|
}
|
|
@@ -6499,26 +6543,26 @@ let Rc = Lc, Ac = class {
|
|
|
6499
6543
|
}
|
|
6500
6544
|
warn(e, a = {}) {
|
|
6501
6545
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6502
|
-
let u = new
|
|
6546
|
+
let u = new Ac(e, a);
|
|
6503
6547
|
return this.messages.push(u), u;
|
|
6504
6548
|
}
|
|
6505
6549
|
warnings() {
|
|
6506
6550
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6507
6551
|
}
|
|
6508
6552
|
};
|
|
6509
|
-
var
|
|
6510
|
-
|
|
6511
|
-
let
|
|
6553
|
+
var Nc = Tc;
|
|
6554
|
+
Tc.default = Tc;
|
|
6555
|
+
let Pc = {};
|
|
6512
6556
|
var ni = function(e) {
|
|
6513
|
-
|
|
6557
|
+
Pc[e] || (Pc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6514
6558
|
};
|
|
6515
|
-
let
|
|
6516
|
-
const
|
|
6559
|
+
let Dc = Ba, Fc = Za, Uc = dc, Bc = Ec, $c = Nc, Wc = xl, zc = fa, { isClean: jc, my: Gc } = ma, Vc = ni;
|
|
6560
|
+
const qc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Hc = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Zc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6517
6561
|
function _e(e) {
|
|
6518
6562
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6519
6563
|
}
|
|
6520
6564
|
function ri(e) {
|
|
6521
|
-
let a = false, u =
|
|
6565
|
+
let a = false, u = qc[e.type];
|
|
6522
6566
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
6523
6567
|
}
|
|
6524
6568
|
function br(e) {
|
|
@@ -6526,9 +6570,9 @@ function br(e) {
|
|
|
6526
6570
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : ri(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
6527
6571
|
}
|
|
6528
6572
|
function Js(e) {
|
|
6529
|
-
return e[
|
|
6573
|
+
return e[jc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6530
6574
|
}
|
|
6531
|
-
let
|
|
6575
|
+
let Kc = {}, Jc = class oi {
|
|
6532
6576
|
get content() {
|
|
6533
6577
|
return this.stringify().content;
|
|
6534
6578
|
}
|
|
@@ -6555,19 +6599,19 @@ let Zc = {}, Kc = class oi {
|
|
|
6555
6599
|
}
|
|
6556
6600
|
constructor(e, a, u) {
|
|
6557
6601
|
let m2;
|
|
6558
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6602
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof $c) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6559
6603
|
else {
|
|
6560
|
-
let e2 =
|
|
6604
|
+
let e2 = Bc;
|
|
6561
6605
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6562
6606
|
try {
|
|
6563
6607
|
m2 = e2(a, u);
|
|
6564
6608
|
} catch (e3) {
|
|
6565
6609
|
this.processed = true, this.error = e3;
|
|
6566
6610
|
}
|
|
6567
|
-
m2 && !m2[
|
|
6611
|
+
m2 && !m2[Gc] && Dc.rebuild(m2);
|
|
6568
6612
|
}
|
|
6569
6613
|
else m2 = Js(a);
|
|
6570
|
-
this.result = new
|
|
6614
|
+
this.result = new $c(e, m2, u), this.helpers = { ...Kc, postcss: Kc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6571
6615
|
}
|
|
6572
6616
|
async() {
|
|
6573
6617
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6601,8 +6645,8 @@ let Zc = {}, Kc = class oi {
|
|
|
6601
6645
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6602
6646
|
};
|
|
6603
6647
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6604
|
-
if (!
|
|
6605
|
-
if (!
|
|
6648
|
+
if (!Hc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6649
|
+
if (!Zc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6606
6650
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6607
6651
|
}
|
|
6608
6652
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6619,8 +6663,8 @@ let Zc = {}, Kc = class oi {
|
|
|
6619
6663
|
}
|
|
6620
6664
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6621
6665
|
let e = this.result.root;
|
|
6622
|
-
for (; !e[
|
|
6623
|
-
e[
|
|
6666
|
+
for (; !e[jc]; ) {
|
|
6667
|
+
e[jc] = true;
|
|
6624
6668
|
let a = [br(e)];
|
|
6625
6669
|
for (; a.length > 0; ) {
|
|
6626
6670
|
let e2 = this.visitTick(a);
|
|
@@ -6665,9 +6709,9 @@ let Zc = {}, Kc = class oi {
|
|
|
6665
6709
|
if (this.error) throw this.error;
|
|
6666
6710
|
if (this.stringified) return this.result;
|
|
6667
6711
|
this.stringified = true, this.sync();
|
|
6668
|
-
let e = this.result.opts, a =
|
|
6712
|
+
let e = this.result.opts, a = zc;
|
|
6669
6713
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6670
|
-
let u = new
|
|
6714
|
+
let u = new Uc(a, this.result.root, this.result.opts).generate();
|
|
6671
6715
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6672
6716
|
}
|
|
6673
6717
|
sync() {
|
|
@@ -6679,14 +6723,14 @@ let Zc = {}, Kc = class oi {
|
|
|
6679
6723
|
}
|
|
6680
6724
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6681
6725
|
let e = this.result.root;
|
|
6682
|
-
for (; !e[
|
|
6726
|
+
for (; !e[jc]; ) e[jc] = true, this.walkSync(e);
|
|
6683
6727
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6684
6728
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6685
6729
|
}
|
|
6686
6730
|
return this.result;
|
|
6687
6731
|
}
|
|
6688
6732
|
then(e, a) {
|
|
6689
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6733
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Vc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
6690
6734
|
}
|
|
6691
6735
|
toString() {
|
|
6692
6736
|
return this.css;
|
|
@@ -6718,22 +6762,22 @@ let Zc = {}, Kc = class oi {
|
|
|
6718
6762
|
}
|
|
6719
6763
|
if (0 !== a.iterator) {
|
|
6720
6764
|
let m3, w3 = a.iterator;
|
|
6721
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6765
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[jc]) return m3[jc] = true, void e.push(br(m3));
|
|
6722
6766
|
a.iterator = 0, delete u.indexes[w3];
|
|
6723
6767
|
}
|
|
6724
6768
|
let w2 = a.events;
|
|
6725
6769
|
for (; a.eventIndex < w2.length; ) {
|
|
6726
6770
|
let e2 = w2[a.eventIndex];
|
|
6727
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6771
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[jc] = true, a.iterator = u.getIterator()));
|
|
6728
6772
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6729
6773
|
}
|
|
6730
6774
|
e.pop();
|
|
6731
6775
|
}
|
|
6732
6776
|
walkSync(e) {
|
|
6733
|
-
e[
|
|
6777
|
+
e[jc] = true;
|
|
6734
6778
|
let a = ri(e);
|
|
6735
6779
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6736
|
-
e2[
|
|
6780
|
+
e2[jc] || this.walkSync(e2);
|
|
6737
6781
|
});
|
|
6738
6782
|
else {
|
|
6739
6783
|
let a2 = this.listeners[u];
|
|
@@ -6744,14 +6788,14 @@ let Zc = {}, Kc = class oi {
|
|
|
6744
6788
|
return this.sync().warnings();
|
|
6745
6789
|
}
|
|
6746
6790
|
};
|
|
6747
|
-
|
|
6748
|
-
|
|
6791
|
+
Jc.registerPostcss = (e) => {
|
|
6792
|
+
Kc = e;
|
|
6749
6793
|
};
|
|
6750
|
-
var
|
|
6751
|
-
|
|
6752
|
-
let
|
|
6753
|
-
const
|
|
6754
|
-
let
|
|
6794
|
+
var Yc = Jc;
|
|
6795
|
+
Jc.default = Jc, Wc.registerLazyResult(Jc), Fc.registerLazyResult(Jc);
|
|
6796
|
+
let Xc = dc, Qc = Ec;
|
|
6797
|
+
const lu = Nc;
|
|
6798
|
+
let cu = fa, hu = ni, Cu = class {
|
|
6755
6799
|
get content() {
|
|
6756
6800
|
return this.result.css;
|
|
6757
6801
|
}
|
|
@@ -6772,7 +6816,7 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6772
6816
|
}
|
|
6773
6817
|
get root() {
|
|
6774
6818
|
if (this._root) return this._root;
|
|
6775
|
-
let e, a =
|
|
6819
|
+
let e, a = Qc;
|
|
6776
6820
|
try {
|
|
6777
6821
|
e = a(this._css, this._opts);
|
|
6778
6822
|
} catch (e2) {
|
|
@@ -6786,11 +6830,11 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6786
6830
|
}
|
|
6787
6831
|
constructor(e, a, u) {
|
|
6788
6832
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6789
|
-
let m2, w2 =
|
|
6790
|
-
this.result = new
|
|
6833
|
+
let m2, w2 = cu;
|
|
6834
|
+
this.result = new lu(this._processor, m2, this._opts), this.result.css = a;
|
|
6791
6835
|
let b2 = this;
|
|
6792
6836
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6793
|
-
let C2 = new
|
|
6837
|
+
let C2 = new Xc(w2, m2, this._opts, a);
|
|
6794
6838
|
if (C2.isMap()) {
|
|
6795
6839
|
let [e2, a2] = C2.generate();
|
|
6796
6840
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6810,7 +6854,7 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6810
6854
|
return this.result;
|
|
6811
6855
|
}
|
|
6812
6856
|
then(e, a) {
|
|
6813
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6857
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || hu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
6814
6858
|
}
|
|
6815
6859
|
toString() {
|
|
6816
6860
|
return this._css;
|
|
@@ -6819,9 +6863,9 @@ let lu = ha, cu = ni, hu = class {
|
|
|
6819
6863
|
return [];
|
|
6820
6864
|
}
|
|
6821
6865
|
};
|
|
6822
|
-
var
|
|
6823
|
-
|
|
6824
|
-
let
|
|
6866
|
+
var ku = Cu;
|
|
6867
|
+
Cu.default = Cu;
|
|
6868
|
+
let xu = Za, Mu = Yc, _u = ku, Ou = xl, Eu = class {
|
|
6825
6869
|
constructor(e = []) {
|
|
6826
6870
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6827
6871
|
}
|
|
@@ -6837,39 +6881,39 @@ let ku = qa, xu = Jc, Mu = Cu, _u = kl, Ou = class {
|
|
|
6837
6881
|
return a;
|
|
6838
6882
|
}
|
|
6839
6883
|
process(e, a = {}) {
|
|
6840
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6884
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Mu(this, e, a) : new _u(this, e, a);
|
|
6841
6885
|
}
|
|
6842
6886
|
use(e) {
|
|
6843
6887
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6844
6888
|
}
|
|
6845
6889
|
};
|
|
6846
|
-
var
|
|
6847
|
-
|
|
6848
|
-
let
|
|
6890
|
+
var Lu = Eu;
|
|
6891
|
+
Eu.default = Eu, Ou.registerProcessor(Eu), xu.registerProcessor(Eu);
|
|
6892
|
+
let Ru = za, Au = Ma, Tu = Ba, Nu = la, Pu = Oa, Du = Za, Fu = tc, Uu = Sl, $u = Yc, Wu = Il, zu = Ca, ju = Ec, Gu = Lu, Vu = Nc, qu = xl, Hu = Rl, Zu = fa, Ku = Rc;
|
|
6849
6893
|
function T$1(...e) {
|
|
6850
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6894
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Gu(e);
|
|
6851
6895
|
}
|
|
6852
6896
|
T$1.plugin = function(e, a) {
|
|
6853
6897
|
let u, m2 = false;
|
|
6854
6898
|
function n(...u2) {
|
|
6855
6899
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
6856
6900
|
let w2 = a(...u2);
|
|
6857
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6901
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Gu().version, w2;
|
|
6858
6902
|
}
|
|
6859
6903
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6860
6904
|
return T$1([n(u2)]).process(e2, a2);
|
|
6861
6905
|
}, n;
|
|
6862
|
-
}, T$1.stringify =
|
|
6863
|
-
var
|
|
6906
|
+
}, T$1.stringify = Zu, T$1.parse = ju, T$1.fromJSON = Fu, T$1.list = Wu, T$1.comment = (e) => new Au(e), T$1.atRule = (e) => new Ru(e), T$1.decl = (e) => new Pu(e), T$1.rule = (e) => new Hu(e), T$1.root = (e) => new qu(e), T$1.document = (e) => new Du(e), T$1.CssSyntaxError = Nu, T$1.Declaration = Pu, T$1.Container = Tu, T$1.Processor = Gu, T$1.Document = Du, T$1.Comment = Au, T$1.Warning = Ku, T$1.AtRule = Ru, T$1.Result = Vu, T$1.Input = Uu, T$1.Rule = Hu, T$1.Root = qu, T$1.Node = zu, $u.registerPostcss(T$1);
|
|
6907
|
+
var Ju = T$1;
|
|
6864
6908
|
T$1.default = T$1;
|
|
6865
|
-
const
|
|
6866
|
-
var
|
|
6867
|
-
|
|
6909
|
+
const Yu = Su(Ju);
|
|
6910
|
+
var Xu;
|
|
6911
|
+
Yu.stringify, Yu.fromJSON, Yu.plugin, Yu.parse, Yu.list, Yu.document, Yu.comment, Yu.atRule, Yu.rule, Yu.decl, Yu.root, Yu.CssSyntaxError, Yu.Declaration, Yu.Container, Yu.Processor, Yu.Document, Yu.Comment, Yu.Warning, Yu.AtRule, Yu.Result, Yu.Input, Yu.Rule, Yu.Root, Yu.Node, (function(e) {
|
|
6868
6912
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6869
|
-
})(
|
|
6870
|
-
const { addCustomEvent:
|
|
6871
|
-
var
|
|
6872
|
-
let
|
|
6913
|
+
})(Xu || (Xu = {}));
|
|
6914
|
+
const { addCustomEvent: Qu } = ae, { addSailfishEvent: ep } = ae, { freezePage: tp } = ae, { takeFullSnapshot: np } = ae;
|
|
6915
|
+
var rp = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? rp(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6916
|
+
let op = class d {
|
|
6873
6917
|
constructor(e) {
|
|
6874
6918
|
y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e.fileName || "", this.functionName = e.functionName || "", this.lineNumber = e.lineNumber, this.columnNumber = e.columnNumber;
|
|
6875
6919
|
}
|
|
@@ -6878,8 +6922,8 @@ let rp = class d {
|
|
|
6878
6922
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6879
6923
|
}
|
|
6880
6924
|
};
|
|
6881
|
-
const
|
|
6882
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6925
|
+
const sp = /(^|@)\S+:\d+/, ip = /^\s*at .*(\S+:\d+|\(native\))/m, ap = /^(eval@)?(\[native code])?$/, lp = { parse: function(e) {
|
|
6926
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(ip) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6883
6927
|
}, extractLocation: function(e) {
|
|
6884
6928
|
if (-1 === e.indexOf(":")) return [e];
|
|
6885
6929
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6887,23 +6931,23 @@ const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)
|
|
|
6887
6931
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6888
6932
|
}, parseV8OrIE: function(e) {
|
|
6889
6933
|
return e.stack.split("\n").filter(function(e2) {
|
|
6890
|
-
return !!e2.match(
|
|
6934
|
+
return !!e2.match(ip);
|
|
6891
6935
|
}, this).map(function(e2) {
|
|
6892
6936
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6893
6937
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6894
6938
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6895
6939
|
a = u ? a.replace(u[0], "") : a;
|
|
6896
6940
|
const m2 = a.split(/\s+/).slice(1), w2 = this.extractLocation(u ? u[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
|
|
6897
|
-
return new
|
|
6941
|
+
return new op({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6898
6942
|
}, this);
|
|
6899
6943
|
}, parseFFOrSafari: function(e) {
|
|
6900
6944
|
return e.stack.split("\n").filter(function(e2) {
|
|
6901
|
-
return !e2.match(
|
|
6945
|
+
return !e2.match(ap);
|
|
6902
6946
|
}, this).map(function(e2) {
|
|
6903
|
-
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new
|
|
6947
|
+
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new op({ functionName: e2 });
|
|
6904
6948
|
{
|
|
6905
6949
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6906
|
-
return new
|
|
6950
|
+
return new op({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6907
6951
|
}
|
|
6908
6952
|
}, this);
|
|
6909
6953
|
}, parseOpera: function(e) {
|
|
@@ -6912,22 +6956,22 @@ const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)
|
|
|
6912
6956
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6913
6957
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6914
6958
|
const w3 = a.exec(u[e2]);
|
|
6915
|
-
w3 && m2.push(new
|
|
6959
|
+
w3 && m2.push(new op({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6916
6960
|
}
|
|
6917
6961
|
return m2;
|
|
6918
6962
|
}, parseOpera10: function(e) {
|
|
6919
6963
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6920
6964
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6921
6965
|
const w3 = a.exec(u[e2]);
|
|
6922
|
-
w3 && m2.push(new
|
|
6966
|
+
w3 && m2.push(new op({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6923
6967
|
}
|
|
6924
6968
|
return m2;
|
|
6925
6969
|
}, parseOpera11: function(e) {
|
|
6926
6970
|
return e.stack.split("\n").filter(function(e2) {
|
|
6927
|
-
return !!e2.match(
|
|
6971
|
+
return !!e2.match(sp) && !e2.match(/^Error created at/);
|
|
6928
6972
|
}, this).map(function(e2) {
|
|
6929
6973
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6930
|
-
return new
|
|
6974
|
+
return new op({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6931
6975
|
}, this);
|
|
6932
6976
|
} };
|
|
6933
6977
|
function T(e) {
|
|
@@ -6984,9 +7028,9 @@ function g(e, a) {
|
|
|
6984
7028
|
return a2 instanceof Node ? a2 instanceof HTMLElement ? a2 ? a2.outerHTML : "" : a2.nodeName : a2 instanceof Error ? a2.stack ? a2.stack + "\nEnd of stack for Error object" : a2.name + ": " + a2.message : a2;
|
|
6985
7029
|
});
|
|
6986
7030
|
}
|
|
6987
|
-
const
|
|
7031
|
+
const cp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
6988
7032
|
function R(e, a, u) {
|
|
6989
|
-
const m2 = u ? Object.assign({},
|
|
7033
|
+
const m2 = u ? Object.assign({}, cp, u) : cp, w2 = m2.logger;
|
|
6990
7034
|
if (!w2) return () => {
|
|
6991
7035
|
};
|
|
6992
7036
|
let b2;
|
|
@@ -6995,7 +7039,7 @@ function R(e, a, u) {
|
|
|
6995
7039
|
const I2 = [];
|
|
6996
7040
|
if (m2.level.includes("error")) {
|
|
6997
7041
|
const l = (a2) => {
|
|
6998
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
7042
|
+
const u2 = a2.message, w3 = a2.error, b3 = lp.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
6999
7043
|
e({ level: "error", trace: b3, payload: C3 });
|
|
7000
7044
|
};
|
|
7001
7045
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -7004,7 +7048,7 @@ function R(e, a, u) {
|
|
|
7004
7048
|
const f = (a2) => {
|
|
7005
7049
|
let u2, w3;
|
|
7006
7050
|
a2.reason instanceof Error ? (u2 = a2.reason, w3 = [g(`Uncaught (in promise) ${u2.name}: ${u2.message}`, m2.stringifyOptions)]) : (u2 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a2.reason, m2.stringifyOptions)]);
|
|
7007
|
-
const b3 =
|
|
7051
|
+
const b3 = lp.parse(u2).map((e2) => e2.toString());
|
|
7008
7052
|
e({ level: "error", trace: b3, payload: w3 });
|
|
7009
7053
|
};
|
|
7010
7054
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7032,7 +7076,7 @@ function R(e, a, u) {
|
|
|
7032
7076
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
7033
7077
|
x2 = true;
|
|
7034
7078
|
try {
|
|
7035
|
-
const a4 =
|
|
7079
|
+
const a4 = lp.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7036
7080
|
C2++, C2 < m2.lengthThreshold ? e({ level: u2, trace: a4, payload: b3 }) : C2 === m2.lengthThreshold && e({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
|
|
7037
7081
|
} catch (e2) {
|
|
7038
7082
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7044,7 +7088,7 @@ function R(e, a, u) {
|
|
|
7044
7088
|
};
|
|
7045
7089
|
}
|
|
7046
7090
|
}
|
|
7047
|
-
var
|
|
7091
|
+
var up = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(up || {});
|
|
7048
7092
|
function suppressConsoleLogsDuringCall(e) {
|
|
7049
7093
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7050
7094
|
console.log = () => {
|
|
@@ -7057,7 +7101,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7057
7101
|
console.log = a, console.warn = u, console.error = m2;
|
|
7058
7102
|
}
|
|
7059
7103
|
}
|
|
7060
|
-
const
|
|
7104
|
+
const pp = "zendesk_chat", dp = "Zendesk";
|
|
7061
7105
|
function zE_safe(...e) {
|
|
7062
7106
|
try {
|
|
7063
7107
|
if ((function hasZendesk() {
|
|
@@ -7096,11 +7140,11 @@ function initializeDomContentEvents(e) {
|
|
|
7096
7140
|
function initializeConsolePlugin(e, a) {
|
|
7097
7141
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7098
7142
|
m2((e2) => {
|
|
7099
|
-
sendEvent({ type:
|
|
7143
|
+
sendEvent({ type: up.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7100
7144
|
}, window, e);
|
|
7101
7145
|
}
|
|
7102
|
-
async function initializeRecording(e, a, u, m2) {
|
|
7103
|
-
const
|
|
7146
|
+
async function initializeRecording(e, a, u, m2, w2) {
|
|
7147
|
+
const b2 = initializeWebSocket(a, u, m2, w2);
|
|
7104
7148
|
try {
|
|
7105
7149
|
ae({ emit(e2) {
|
|
7106
7150
|
Object.assign(e2, getUrlAndStoredUuids()), e2.sessionId = m2, sendEvent(e2);
|
|
@@ -7116,11 +7160,11 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7116
7160
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7117
7161
|
});
|
|
7118
7162
|
const handleWidgetOpen = () => {
|
|
7119
|
-
ae.addSailfishEvent(
|
|
7163
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "customer support chat opened", element_id: pp, provider: dp });
|
|
7120
7164
|
}, handleWidgetClose = () => {
|
|
7121
|
-
ae.addSailfishEvent(
|
|
7165
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "customer support chat closed", element_id: pp, provider: dp });
|
|
7122
7166
|
}, handleUnreadMessages = (e2) => {
|
|
7123
|
-
ae.addSailfishEvent(
|
|
7167
|
+
ae.addSailfishEvent(up.SailfishCustom, { action: "zendesk unreadmessages", element_id: pp, provider: dp });
|
|
7124
7168
|
};
|
|
7125
7169
|
suppressConsoleLogsDuringCall(() => {
|
|
7126
7170
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7129,21 +7173,21 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7129
7173
|
} catch (e2) {
|
|
7130
7174
|
console.error("Error importing plugins!", e2);
|
|
7131
7175
|
}
|
|
7132
|
-
return
|
|
7176
|
+
return b2;
|
|
7133
7177
|
}
|
|
7134
|
-
let
|
|
7178
|
+
let hp = null, fp = null;
|
|
7135
7179
|
function identify(e, a = {}, u = false) {
|
|
7136
7180
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7137
|
-
|
|
7181
|
+
hp && hp.userId === e && JSON.stringify(hp.traits) === JSON.stringify(a) || (hp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7138
7182
|
}
|
|
7139
7183
|
function addOrUpdateMetadata(e) {
|
|
7140
7184
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7141
|
-
|
|
7185
|
+
fp && JSON.stringify(fp) === JSON.stringify(e) || (fp = e, sendMessage(a));
|
|
7142
7186
|
}
|
|
7143
7187
|
function trackingEvent(e) {
|
|
7144
|
-
sendMessage({ type: "trackingEvent", trackingData: e, timestamp:
|
|
7188
|
+
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: ne() });
|
|
7145
7189
|
}
|
|
7146
|
-
const
|
|
7190
|
+
const mp = readDebugFlag(), gp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], yp = [400, 403], wp = "CORS", Sp = 1, bp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, vp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7147
7191
|
function trackDomainChangesOnce() {
|
|
7148
7192
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7149
7193
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7210,7 +7254,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7210
7254
|
return true;
|
|
7211
7255
|
}
|
|
7212
7256
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7213
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7257
|
+
return !!matchUrlWithWildcard(e, [...gp, ...a]);
|
|
7214
7258
|
}
|
|
7215
7259
|
function setupFetchInterceptor(e = []) {
|
|
7216
7260
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7245,7 +7289,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7245
7289
|
F2[e3] = a4;
|
|
7246
7290
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7247
7291
|
} catch (e3) {
|
|
7248
|
-
|
|
7292
|
+
mp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7249
7293
|
}
|
|
7250
7294
|
delete F2[b];
|
|
7251
7295
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7255,16 +7299,16 @@ function setupFetchInterceptor(e = []) {
|
|
|
7255
7299
|
const I4 = getFuncSpanHeader();
|
|
7256
7300
|
if (u3 instanceof Request) {
|
|
7257
7301
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7258
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7302
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), mp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7259
7303
|
const E3 = new Request(_3, { headers: O3 });
|
|
7260
7304
|
return await e3.call(a4, E3, m4);
|
|
7261
7305
|
}
|
|
7262
7306
|
{
|
|
7263
7307
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7264
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7308
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), mp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u3 ? u3 : u3.href, header: I4.name })), _3.headers = O3, await e3.call(a4, u3, _3);
|
|
7265
7309
|
}
|
|
7266
7310
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7267
|
-
|
|
7311
|
+
yp.includes(U3.status) && (mp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7268
7312
|
try {
|
|
7269
7313
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7270
7314
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7280,7 +7324,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7280
7324
|
}
|
|
7281
7325
|
return e3.apply(a4, u3);
|
|
7282
7326
|
} catch (e4) {
|
|
7283
|
-
throw
|
|
7327
|
+
throw mp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7284
7328
|
}
|
|
7285
7329
|
})(e2, a3, u2, x3), B2 = true);
|
|
7286
7330
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7289,7 +7333,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7289
7333
|
const e3 = U3.clone();
|
|
7290
7334
|
q2 = await e3.text();
|
|
7291
7335
|
} catch (e3) {
|
|
7292
|
-
|
|
7336
|
+
mp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7293
7337
|
}
|
|
7294
7338
|
let H2 = null;
|
|
7295
7339
|
try {
|
|
@@ -7297,12 +7341,12 @@ function setupFetchInterceptor(e = []) {
|
|
|
7297
7341
|
H2[a4] = e3;
|
|
7298
7342
|
});
|
|
7299
7343
|
} catch (e3) {
|
|
7300
|
-
|
|
7344
|
+
mp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7301
7345
|
}
|
|
7302
7346
|
return sendEvent({ type: 27, timestamp: $2, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: $2, response_code: z2, success: j2, error: V2, method: O2, url: x3, retry_without_trace_id: B2, request_headers: F2, request_body: D2, response_headers: H2, response_body: q2 }, ..._2 }), U3;
|
|
7303
7347
|
} catch (m4) {
|
|
7304
7348
|
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7305
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7349
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(wp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7306
7350
|
throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: b2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7307
7351
|
}
|
|
7308
7352
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
@@ -7334,9 +7378,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7334
7378
|
} catch {
|
|
7335
7379
|
}
|
|
7336
7380
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7337
|
-
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7381
|
+
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.serviceAdditionalMetadata = I2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7338
7382
|
else {
|
|
7339
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7383
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(vp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7340
7384
|
window.addEventListener("error", (e2) => {
|
|
7341
7385
|
captureError(e2.error || e2.message);
|
|
7342
7386
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7344,7 +7388,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7344
7388
|
});
|
|
7345
7389
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7346
7390
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7347
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a),
|
|
7391
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || U2.ws && 1 === U2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
|
|
7392
|
+
var _a3;
|
|
7393
|
+
((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? mp && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), mp && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
|
|
7394
|
+
}).catch((e2) => {
|
|
7395
|
+
mp && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
|
|
7396
|
+
}), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...gp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7348
7397
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7349
7398
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7350
7399
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7362,9 +7411,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7362
7411
|
}
|
|
7363
7412
|
const _3 = getFuncSpanHeader();
|
|
7364
7413
|
if (_3) try {
|
|
7365
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7414
|
+
this.setRequestHeader(_3.name, _3.value), mp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7366
7415
|
} catch (e3) {
|
|
7367
|
-
|
|
7416
|
+
mp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7368
7417
|
}
|
|
7369
7418
|
const O3 = Date.now();
|
|
7370
7419
|
let E3 = false;
|
|
@@ -7392,7 +7441,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7392
7441
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7393
7442
|
});
|
|
7394
7443
|
} catch (e4) {
|
|
7395
|
-
|
|
7444
|
+
mp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7396
7445
|
}
|
|
7397
7446
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7398
7447
|
else {
|
|
@@ -7408,12 +7457,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7408
7457
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7409
7458
|
})();
|
|
7410
7459
|
try {
|
|
7411
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7460
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || bp;
|
|
7412
7461
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7413
7462
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7414
7463
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
7415
|
-
const u3 = await initializeRecording(m3, a, e, F2);
|
|
7416
|
-
U2.ws =
|
|
7464
|
+
const u3 = (I2 == null ? void 0 : I2.env) || (I2 == null ? void 0 : I2.environment), b3 = await initializeRecording(m3, a, e, F2, u3);
|
|
7465
|
+
U2.ws = b3, U2.initialized = true, U2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e2 = "", a2 = "") {
|
|
7417
7466
|
window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e2, serviceVersion: a2 } });
|
|
7418
7467
|
})(C2, w2), U2.sentMapUuidOnce = true);
|
|
7419
7468
|
} else console.error("Failed to start recording session:", x3.errors || x3);
|
|
@@ -7444,7 +7493,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7444
7493
|
const e = document.visibilityState, a = Date.now();
|
|
7445
7494
|
"visible" === e && getOrSetSessionId();
|
|
7446
7495
|
try {
|
|
7447
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7496
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), mp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7448
7497
|
} catch (e2) {
|
|
7449
7498
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7450
7499
|
}
|
|
@@ -7462,28 +7511,32 @@ const initRecorder = async (e) => {
|
|
|
7462
7511
|
})), a.initPromise);
|
|
7463
7512
|
};
|
|
7464
7513
|
export {
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7514
|
+
bp as DEFAULT_CAPTURE_SETTINGS,
|
|
7515
|
+
vp as DEFAULT_CONSOLE_RECORDING_SETTINGS,
|
|
7516
|
+
Sp as STORAGE_VERSION,
|
|
7468
7517
|
addOrUpdateMetadata,
|
|
7469
7518
|
buildBatches,
|
|
7519
|
+
clearStaleFuncSpanState,
|
|
7470
7520
|
createTriageFromRecorder,
|
|
7471
7521
|
disableFunctionSpanTracking,
|
|
7472
7522
|
enableFunctionSpanTracking,
|
|
7473
7523
|
eventSize,
|
|
7474
7524
|
fetchCaptureSettings,
|
|
7525
|
+
fetchFunctionSpanTrackingEnabled,
|
|
7475
7526
|
flushBufferedEvents,
|
|
7476
7527
|
getFuncSpanHeader,
|
|
7528
|
+
getOrSetSessionId,
|
|
7477
7529
|
getUrlAndStoredUuids,
|
|
7478
7530
|
identify,
|
|
7479
7531
|
initRecorder,
|
|
7480
7532
|
initializeConsolePlugin,
|
|
7481
7533
|
initializeDomContentEvents,
|
|
7534
|
+
initializeFunctionSpanTrackingFromApi,
|
|
7482
7535
|
initializeRecording,
|
|
7483
7536
|
initializeWebSocket,
|
|
7484
7537
|
isFunctionSpanTrackingEnabled,
|
|
7485
7538
|
matchUrlWithWildcard,
|
|
7486
|
-
|
|
7539
|
+
ne as nowTimestamp,
|
|
7487
7540
|
openReportIssueModal,
|
|
7488
7541
|
sendDomainsToNotPropagateHeaderTo,
|
|
7489
7542
|
sendEvent,
|