@nivaro/react 0.3.114 → 0.3.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScreenShareHost.js +24 -0
- package/dist/full.css +50 -2
- package/dist/hooks/useSessionRecorder.js +61 -60
- package/dist/index.d.ts +1717 -21
- package/dist/index.js +1091 -950
- package/dist/shared/components/ActivityEntry.js +209 -97
- package/dist/shared/components/AgentPresenceChip.js +51 -0
- package/dist/shared/components/AnnouncementBanner.js +56 -41
- package/dist/shared/components/AutolinkedText.js +98 -85
- package/dist/shared/components/BroadcastView.js +149 -141
- package/dist/shared/components/CacheStamp.js +78 -30
- package/dist/shared/components/CollectionBrowserView.js +4088 -3592
- package/dist/shared/components/ConfigChangeStrip.js +63 -0
- package/dist/shared/components/ConfigReachNote.js +107 -0
- package/dist/shared/components/ConformanceView.js +389 -319
- package/dist/shared/components/DataTable.js +1 -0
- package/dist/shared/components/DelegateCoverLine.js +164 -0
- package/dist/shared/components/EnvironmentNotice.js +56 -65
- package/dist/shared/components/FilePreviewLightbox.js +89 -43
- package/dist/shared/components/FindingFixedMark.js +23 -0
- package/dist/shared/components/GridPresenceLine.js +100 -0
- package/dist/shared/components/IdleReloadWatcher.js +82 -43
- package/dist/shared/components/InStep.js +46 -0
- package/dist/shared/components/ItemEditForm.js +5504 -4889
- package/dist/shared/components/LiveAnnouncer.js +62 -0
- package/dist/shared/components/LiveCount.js +54 -0
- package/dist/shared/components/LiveFigure.js +28 -0
- package/dist/shared/components/LiveListControls.js +114 -0
- package/dist/shared/components/LiveNewMatchesPill.js +25 -0
- package/dist/shared/components/LiveOffNote.js +44 -0
- package/dist/shared/components/LivePreferenceHost.js +42 -0
- package/dist/shared/components/LiveRowMark.js +25 -20
- package/dist/shared/components/LiveTraceView.js +257 -0
- package/dist/shared/components/MapView.js +30 -29
- package/dist/shared/components/MatrixEditor.js +497 -462
- package/dist/shared/components/MyWorkView.js +346 -272
- package/dist/shared/components/NotificationBell.js +215 -201
- package/dist/shared/components/PageRenderer.js +636 -599
- package/dist/shared/components/PresenceDot.js +21 -0
- package/dist/shared/components/ProfileView.js +656 -536
- package/dist/shared/components/RealtimeStatusBanner.js +25 -25
- package/dist/shared/components/RecentRecordsRail.js +51 -48
- package/dist/shared/components/RecordCompare.js +241 -150
- package/dist/shared/components/RecordDrilldownSheet.js +66 -64
- package/dist/shared/components/RecordGridEditor.js +350 -311
- package/dist/shared/components/RecordHoverCard.js +147 -0
- package/dist/shared/components/RecordPeekHost.js +111 -0
- package/dist/shared/components/RecordReadView.js +414 -412
- package/dist/shared/components/RelativeTime.js +16 -0
- package/dist/shared/components/ReportView.js +1396 -1304
- package/dist/shared/components/ScreenRefreshButton.js +77 -0
- package/dist/shared/components/TabCountHost.js +10 -0
- package/dist/shared/components/TickerNumber.js +19 -18
- package/dist/shared/components/TipLayer.js +70 -58
- package/dist/shared/components/WidgetImageMenu.js +59 -0
- package/dist/shared/components/WidgetSlot.js +571 -524
- package/dist/shared/components/activity/RecordActivityStream.js +317 -0
- package/dist/shared/components/bulk/BulkSelectionNotices.js +220 -0
- package/dist/shared/components/cbv/approval-changed.js +20 -0
- package/dist/shared/components/cbv/changed-by-others.js +251 -0
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +320 -0
- package/dist/shared/components/change-proposals/ProposalValue.js +28 -0
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +44 -0
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +359 -0
- package/dist/shared/components/change-proposals/types.js +4 -0
- package/dist/shared/components/chat/ChatPanel.js +1571 -1528
- package/dist/shared/components/chat/Composer.js +276 -298
- package/dist/shared/components/chat/room-due.js +13 -0
- package/dist/shared/components/collections-directory/CollectionRow.js +76 -75
- package/dist/shared/components/collections-directory/CollectionsDirectory.js +415 -395
- package/dist/shared/components/collections-directory/directory-data.js +75 -63
- package/dist/shared/components/imports/ImportConsole.js +159 -155
- package/dist/shared/components/imports/ImportDuplicatesNotice.js +46 -31
- package/dist/shared/components/integrations/SendStatus.js +202 -0
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +45 -36
- package/dist/shared/components/integrations/console/ReadyToSendView.js +453 -0
- package/dist/shared/components/integrations/console/api.js +161 -117
- package/dist/shared/components/integrations/console/tone.js +15 -12
- package/dist/shared/components/item-edit/CatalogPickerField.js +1353 -1245
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +162 -0
- package/dist/shared/components/item-edit/CloneDialog.js +208 -206
- package/dist/shared/components/item-edit/DerivedCauseNote.js +57 -0
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +81 -70
- package/dist/shared/components/item-edit/DuplicateNotice.js +169 -101
- package/dist/shared/components/item-edit/FieldAffordances.js +294 -385
- package/dist/shared/components/item-edit/FieldComments.js +159 -116
- package/dist/shared/components/item-edit/FieldPointer.js +132 -0
- package/dist/shared/components/item-edit/FieldRenderer.js +277 -273
- package/dist/shared/components/item-edit/FieldRow.js +519 -439
- package/dist/shared/components/item-edit/FieldSourceBadge.js +88 -0
- package/dist/shared/components/item-edit/FilePickerField.js +454 -369
- package/dist/shared/components/item-edit/GroupSection.js +618 -567
- package/dist/shared/components/item-edit/HeldEditsChip.js +113 -0
- package/dist/shared/components/item-edit/InlineTableField.js +2891 -2723
- package/dist/shared/components/item-edit/ListNeighborNav.js +79 -0
- package/dist/shared/components/item-edit/LiveTraceSheet.js +26 -0
- package/dist/shared/components/item-edit/M2MCombobox.js +284 -273
- package/dist/shared/components/item-edit/OutboxReviewTray.js +313 -0
- package/dist/shared/components/item-edit/PickerBadges.js +52 -0
- package/dist/shared/components/item-edit/PlanGrid.js +434 -439
- package/dist/shared/components/item-edit/RecalcValue.js +55 -0
- package/dist/shared/components/item-edit/RecordChatActions.js +76 -64
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +103 -0
- package/dist/shared/components/item-edit/RecordGrantTools.js +87 -86
- package/dist/shared/components/item-edit/RecordHelpChip.js +70 -0
- package/dist/shared/components/item-edit/RecordLiveSync.js +230 -217
- package/dist/shared/components/item-edit/RecordOutbox.js +53 -52
- package/dist/shared/components/item-edit/RecordRecapStrip.js +109 -36
- package/dist/shared/components/item-edit/RelationCombobox.js +229 -217
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +105 -100
- package/dist/shared/components/item-edit/RemoteChangeUi.js +454 -0
- package/dist/shared/components/item-edit/RemoteUploads.js +55 -0
- package/dist/shared/components/item-edit/RemovedLineNote.js +92 -0
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +298 -223
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +244 -0
- package/dist/shared/components/item-edit/SectionPresence.js +78 -0
- package/dist/shared/components/item-edit/SplitLinesButton.js +166 -0
- package/dist/shared/components/item-edit/catalog-line-watch.js +94 -0
- package/dist/shared/components/item-edit/coedit/collab.js +84 -0
- package/dist/shared/components/item-edit/coedit/context.js +24 -0
- package/dist/shared/components/item-edit/coedit/cursors.js +103 -0
- package/dist/shared/components/item-edit/coedit/safe-link.js +15 -0
- package/dist/shared/components/item-edit/coedit/session.js +382 -0
- package/dist/shared/components/item-edit/coedit/useCoedit.js +49 -0
- package/dist/shared/components/item-edit/file-live.js +77 -0
- package/dist/shared/components/item-edit/file-processing.js +87 -0
- package/dist/shared/components/item-edit/layout-switch.js +148 -0
- package/dist/shared/components/item-edit/live-related.js +23 -0
- package/dist/shared/components/item-edit/live-title.js +66 -0
- package/dist/shared/components/item-edit/partner-needs.js +142 -0
- package/dist/shared/components/item-edit/removed-line.js +58 -0
- package/dist/shared/components/item-edit/render-stability.js +70 -59
- package/dist/shared/components/layout-editor/ChangeNote.js +36 -34
- package/dist/shared/components/layout-editor/CollabParts.js +72 -70
- package/dist/shared/components/layout-editor/LayoutEditor.js +306 -303
- package/dist/shared/components/list/InlineEdit.js +504 -208
- package/dist/shared/components/list/ListViewers.js +81 -0
- package/dist/shared/components/merge/MergeRecordsDialog.js +1227 -0
- package/dist/shared/components/merge/MergeWithFlow.js +290 -0
- package/dist/shared/components/merge/merge-values.js +110 -0
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +285 -258
- package/dist/shared/components/notifications/NotificationCenterView.js +388 -321
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -130
- package/dist/shared/components/notifications/NotificationRulesEditor.js +72 -52
- package/dist/shared/components/notifications/bundles.js +21 -19
- package/dist/shared/components/notifications/resolved-line.js +25 -0
- package/dist/shared/components/ops/OpsTasksView.js +45 -44
- package/dist/shared/components/panels/AccessGrantedNote.js +85 -0
- package/dist/shared/components/panels/AlertBanners.js +132 -0
- package/dist/shared/components/panels/AsyncUserPicker.js +54 -45
- package/dist/shared/components/panels/BranchLanes.js +82 -54
- package/dist/shared/components/panels/CommentAwareness.js +332 -0
- package/dist/shared/components/panels/CommentImages.js +219 -0
- package/dist/shared/components/panels/CommentPanel.js +649 -530
- package/dist/shared/components/panels/ExternalRequestsChip.js +98 -80
- package/dist/shared/components/panels/NewSinceChip.js +16 -0
- package/dist/shared/components/panels/OwnerOpenedLine.js +85 -0
- package/dist/shared/components/panels/PipelinePanel.js +1644 -1494
- package/dist/shared/components/panels/ResubmissionDiff.js +293 -0
- package/dist/shared/components/panels/SlaBreachBanner.js +30 -29
- package/dist/shared/components/panels/SlaClock.js +130 -99
- package/dist/shared/components/panels/TaskPanel.js +308 -287
- package/dist/shared/components/panels/unseen-move-check.js +101 -0
- package/dist/shared/components/pipeline/OwnerMatrix.js +80 -71
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +495 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +1855 -1771
- package/dist/shared/components/profile/AgentNameField.js +141 -0
- package/dist/shared/components/profile/AgentsPanel.js +55 -46
- package/dist/shared/components/profile/PersonAccess.js +398 -330
- package/dist/shared/components/profile/PersonAdminTools.js +127 -113
- package/dist/shared/components/profile/PersonProfile.js +81 -73
- package/dist/shared/components/profile/SignInTroubleshooter.js +361 -0
- package/dist/shared/components/queue/QueueBulkBar.js +101 -84
- package/dist/shared/components/queue/QueueItemSheet.js +66 -66
- package/dist/shared/components/queue/QueueTeamStrip.js +279 -0
- package/dist/shared/components/queue/QueueWorklist.js +1927 -1635
- package/dist/shared/components/send-view/SendViewButton.js +136 -0
- package/dist/shared/components/send-view/SentViewCards.js +147 -0
- package/dist/shared/components/support/ReportProblem.js +1 -0
- package/dist/shared/components/support/ScreenShare.js +554 -0
- package/dist/shared/components/support/SupportView.js +160 -129
- package/dist/shared/components/support/TicketDetailSheet.js +101 -89
- package/dist/shared/components/watch-list/WatchDock.js +1044 -0
- package/dist/shared/components/watch-list/WatchExtras.js +723 -0
- package/dist/shared/components/watch-list/WatchListButton.js +46 -0
- package/dist/shared/components/watch-list/WatchPinButton.js +67 -0
- package/dist/shared/components/watch-list/WatchRows.js +348 -0
- package/dist/shared/lib/activity-sentence.js +87 -75
- package/dist/shared/lib/agent-presence.js +46 -0
- package/dist/shared/lib/approval-progress.js +49 -0
- package/dist/shared/lib/attention-prefs.js +27 -0
- package/dist/shared/lib/cell-locks.js +56 -0
- package/dist/shared/lib/co-edit.js +166 -0
- package/dist/shared/lib/coedit-registry.js +44 -0
- package/dist/shared/lib/comment-awareness.js +124 -0
- package/dist/shared/lib/comment-images.js +45 -0
- package/dist/shared/lib/config-watch.js +94 -0
- package/dist/shared/lib/copy-rules.js +65 -0
- package/dist/shared/lib/count-step.js +30 -0
- package/dist/shared/lib/deadline-ticker.js +68 -0
- package/dist/shared/lib/derived-causes.js +115 -0
- package/dist/shared/lib/draft-store.js +114 -85
- package/dist/shared/lib/error-hints.js +1 -0
- package/dist/shared/lib/field-merge.js +126 -0
- package/dist/shared/lib/filter-sentence.js +10 -10
- package/dist/shared/lib/focus-mode.js +16 -12
- package/dist/shared/lib/grid-cursors.js +77 -0
- package/dist/shared/lib/grid-presence.js +182 -0
- package/dist/shared/lib/idle-reload.js +100 -73
- package/dist/shared/lib/in-step.js +45 -0
- package/dist/shared/lib/integration-chip.js +19 -18
- package/dist/shared/lib/line-locks.js +141 -0
- package/dist/shared/lib/line-split.js +41 -0
- package/dist/shared/lib/linked-changes.js +150 -0
- package/dist/shared/lib/list-return.js +231 -0
- package/dist/shared/lib/list-viewers.js +52 -0
- package/dist/shared/lib/live-announcer.js +86 -0
- package/dist/shared/lib/live-counts.js +85 -0
- package/dist/shared/lib/live-data-changed.js +108 -0
- package/dist/shared/lib/live-deltas.js +81 -0
- package/dist/shared/lib/live-findings.js +113 -0
- package/dist/shared/lib/live-groups.js +122 -0
- package/dist/shared/lib/live-link-labels.js +162 -0
- package/dist/shared/lib/live-list-flow.js +334 -0
- package/dist/shared/lib/live-list.js +143 -129
- package/dist/shared/lib/live-moves.js +51 -0
- package/dist/shared/lib/live-ops.js +26 -26
- package/dist/shared/lib/live-pickers.js +7 -0
- package/dist/shared/lib/live-preference.js +184 -0
- package/dist/shared/lib/live-queries.js +226 -181
- package/dist/shared/lib/live-screen.js +333 -0
- package/dist/shared/lib/live-search.js +108 -0
- package/dist/shared/lib/live-seen.js +35 -0
- package/dist/shared/lib/live-views.js +100 -0
- package/dist/shared/lib/live.js +159 -133
- package/dist/shared/lib/missed-updates.js +198 -0
- package/dist/shared/lib/newer-file.js +56 -0
- package/dist/shared/lib/notification-sound.js +42 -20
- package/dist/shared/lib/own-writes.js +59 -41
- package/dist/shared/lib/picker-badges.js +94 -0
- package/dist/shared/lib/presence-signals.js +131 -84
- package/dist/shared/lib/realtime.js +49 -24
- package/dist/shared/lib/record-gaps.js +85 -0
- package/dist/shared/lib/record-outbox.js +369 -222
- package/dist/shared/lib/record-peek.js +75 -0
- package/dist/shared/lib/record-tabs.js +92 -72
- package/dist/shared/lib/relative-ticker.js +42 -0
- package/dist/shared/lib/request-gate.js +119 -119
- package/dist/shared/lib/rollup-recalc.js +107 -0
- package/dist/shared/lib/room-gaps.js +40 -36
- package/dist/shared/lib/rum.js +137 -87
- package/dist/shared/lib/save-progress.js +20 -0
- package/dist/shared/lib/scheduled-countdown.js +67 -0
- package/dist/shared/lib/screen-refresh.js +160 -0
- package/dist/shared/lib/screen-share.js +234 -0
- package/dist/shared/lib/seen-since.js +74 -0
- package/dist/shared/lib/selection-watch.js +205 -0
- package/dist/shared/lib/send-status.js +132 -0
- package/dist/shared/lib/send-view.js +23 -0
- package/dist/shared/lib/socket-liveness.js +155 -0
- package/dist/shared/lib/socket-realtime.js +168 -140
- package/dist/shared/lib/state-census.js +53 -0
- package/dist/shared/lib/summary-mode.js +61 -39
- package/dist/shared/lib/tab-attention.js +143 -32
- package/dist/shared/lib/table-density.js +64 -0
- package/dist/shared/lib/track-travel.js +40 -0
- package/dist/shared/lib/unseen-changes.js +68 -0
- package/dist/shared/lib/upload-file.js +33 -0
- package/dist/shared/lib/upload-presence.js +127 -0
- package/dist/shared/lib/urgent-chime.js +65 -0
- package/dist/shared/lib/use-online-users.js +32 -11
- package/dist/shared/lib/user-sync.js +155 -39
- package/dist/shared/lib/waiting-count.js +44 -0
- package/dist/shared/lib/watch-desktop.js +83 -0
- package/dist/shared/lib/watch-list.js +447 -0
- package/dist/shared/lib/widget-image-render.js +64 -0
- package/dist/shared/lib/widget-image.js +111 -0
- package/dist/shared/lib/worker-socket.js +130 -104
- package/dist/shared/lib/write-to-screen.js +133 -0
- package/package.json +1 -1
- package/styles.css +49 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { endSessionRecording as M, appendSessionRecordingEvents as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { sessionStore as
|
|
4
|
-
import { useAutoRecord as
|
|
5
|
-
import { useOptionalNivaroClient as
|
|
1
|
+
import { endSessionRecording as M, appendSessionRecordingEvents as re, sessionRecordingEnabled as he, startSessionRecording as q } from "@nivaro/sdk";
|
|
2
|
+
import { useRef as me, useEffect as we } from "react";
|
|
3
|
+
import { sessionStore as ye, sharedChunkStore as ge, ReplayUploader as ve, clearResume as N, ORPHAN_TTL_MS as Re, readResume as be, isResumable as Se, splitBySize as ne, writeResume as ke, KEEPALIVE_CHUNK_BYTES as Ie, CHUNK_BYTES as Ae, backoffDelay as Ee, errorStatus as Ce, clipChunkFailure as _e } from "./replayUploadQueue.js";
|
|
4
|
+
import { useAutoRecord as De } from "./useAutoRecord.js";
|
|
5
|
+
import { useOptionalNivaroClient as Te } from "../shared/context.js";
|
|
6
6
|
import { normalizeReplayMasking as x, buildReplayMaskingOptions as j } from "../shared/lib/replay-masking.js";
|
|
7
|
-
import { normalizeReplaySampling as G, replaySampleDraw as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { normalizeReplaySampling as G, replaySampleDraw as qe, currentReplayRoute as L, isReplayRouteSampled as J, attributeChunkRoutes as oe } from "../shared/lib/replay-sampling.js";
|
|
8
|
+
import { emitReplayTap as Q, setReplayRecorderMode as O, registerReplayCapture as Le, clipEndOffset as Pe, withClipKind as Fe } from "../shared/lib/replay-capture.js";
|
|
9
|
+
import { noteReplayIdle as Me, createReplayIdleState as Ne, REPLAY_IDLE_RESTART_MS as Oe } from "../shared/lib/replay-idle.js";
|
|
10
|
+
import { noteReplayEvent as Ue, createReplayCheckoutState as We } from "../shared/lib/replay-checkout.js";
|
|
11
11
|
import { instrumentConsole as He, instrumentRequests as Ke, redactSecrets as $e } from "../shared/lib/replay-context.js";
|
|
12
12
|
import { instrumentSocket as Be } from "../shared/lib/replay-socket.js";
|
|
13
|
-
const ze = "nivaro-react@0.3.
|
|
13
|
+
const ze = "nivaro-react@0.3.115", V = 1e4, Ye = 150, xe = 3e3, je = 600, Ge = (o) => `nvr_replay_resume${o ? `:${o}` : ""}`, X = () => typeof navigator > "u" || navigator.onLine !== !1;
|
|
14
14
|
function Je(o) {
|
|
15
15
|
return typeof o.url != "string" || typeof fetch != "function" ? null : (f, u) => {
|
|
16
16
|
const l = typeof o.getToken == "function" ? o.getToken() : void 0, d = { "Content-Type": "application/json" };
|
|
@@ -24,26 +24,26 @@ function Je(o) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
async function Qe(o, f, u, l, d) {
|
|
27
|
-
const c =
|
|
27
|
+
const c = ne(l), { routes: S } = oe(c, d.startRoute);
|
|
28
28
|
for (const [a, e] of c.entries()) {
|
|
29
29
|
const h = u();
|
|
30
30
|
try {
|
|
31
31
|
await o.request(
|
|
32
|
-
|
|
32
|
+
re(f, h, e, {
|
|
33
33
|
route: S[a],
|
|
34
34
|
...d.build ? { build: d.build } : {}
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
} catch (R) {
|
|
38
|
-
const b =
|
|
39
|
-
if (
|
|
38
|
+
const b = Ce(R);
|
|
39
|
+
if (_e(b) === "stop") return "closed";
|
|
40
40
|
b === 413 && console.warn(`[session-recorder] chunk ${h} too large — dropped`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
return "ok";
|
|
44
44
|
}
|
|
45
45
|
const Ve = 3e4, Xe = 3e4;
|
|
46
|
-
let
|
|
46
|
+
let Z = !1, v = null, E = null;
|
|
47
47
|
async function Ze(o = "error") {
|
|
48
48
|
if (!E) return null;
|
|
49
49
|
try {
|
|
@@ -55,16 +55,16 @@ async function Ze(o = "error") {
|
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
async function
|
|
58
|
+
async function ee() {
|
|
59
59
|
try {
|
|
60
60
|
return (await import("rrweb")).record;
|
|
61
61
|
} catch {
|
|
62
|
-
return
|
|
62
|
+
return Z || (Z = !0, console.warn(
|
|
63
63
|
"[nivaro] session recording is enabled on the instance but `rrweb` is not installed in this app — run `npm i rrweb` to record."
|
|
64
64
|
)), null;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function te(o, f) {
|
|
68
68
|
const u = He(o), l = Ke(o), d = Be(o), c = () => {
|
|
69
69
|
f == null || f();
|
|
70
70
|
try {
|
|
@@ -83,9 +83,9 @@ function ee(o, f) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function ft(o = {}) {
|
|
86
|
-
const f =
|
|
87
|
-
|
|
88
|
-
const S =
|
|
86
|
+
const f = Te(), u = o.client ?? f, l = o.app, d = o.disabled ?? !1, c = o.build ?? ze;
|
|
87
|
+
De({ client: u, disabled: d });
|
|
88
|
+
const S = me({
|
|
89
89
|
buffer: [],
|
|
90
90
|
stop: null,
|
|
91
91
|
uninstrument: null,
|
|
@@ -101,23 +101,23 @@ function ft(o = {}) {
|
|
|
101
101
|
prevWindowRoute: "/",
|
|
102
102
|
sampled: !0
|
|
103
103
|
});
|
|
104
|
-
|
|
104
|
+
we(() => {
|
|
105
105
|
if (!u || d || typeof window > "u") return;
|
|
106
106
|
let a = !1;
|
|
107
107
|
const e = S.current;
|
|
108
108
|
e.dead = !1;
|
|
109
|
-
const h = u, R =
|
|
109
|
+
const h = u, R = ye(), b = Ge(l), C = ge(), _ = Je(h), ie = async (t, r, i, w, y = {}) => {
|
|
110
110
|
if (!w || !_) {
|
|
111
|
-
await h.request(
|
|
111
|
+
await h.request(re(t, r, i, y));
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
114
|
const g = await _(t, JSON.stringify({ seq: r, events: i, ...y }));
|
|
115
115
|
if (!g.ok) throw Object.assign(new Error(`HTTP ${g.status}`), { status: g.status });
|
|
116
|
-
}, n = new
|
|
116
|
+
}, n = new ve({ store: C, send: ie, online: X });
|
|
117
117
|
let k = null, D = 0;
|
|
118
|
-
const
|
|
118
|
+
const se = () => document.readyState === "complete" && Date.now() - e.lastNavAt >= xe;
|
|
119
119
|
function I() {
|
|
120
|
-
n.recordingId &&
|
|
120
|
+
n.recordingId && ke(R, b, {
|
|
121
121
|
recordingId: n.recordingId,
|
|
122
122
|
nextSeq: n.nextSeq,
|
|
123
123
|
startedAt: e.startedAt,
|
|
@@ -127,9 +127,9 @@ function ft(o = {}) {
|
|
|
127
127
|
function T() {
|
|
128
128
|
k && clearTimeout(k), k = null, D = 0;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function ae() {
|
|
131
131
|
T();
|
|
132
|
-
const t =
|
|
132
|
+
const t = Ee(n.attempt);
|
|
133
133
|
D = Date.now() + t, k = setTimeout(() => {
|
|
134
134
|
k = null, D = 0, m(!0);
|
|
135
135
|
}, t);
|
|
@@ -142,14 +142,14 @@ function ft(o = {}) {
|
|
|
142
142
|
if (e.buffer.length === 0 || !n.recordingId) return;
|
|
143
143
|
const r = e.buffer;
|
|
144
144
|
e.buffer = [];
|
|
145
|
-
const i =
|
|
145
|
+
const i = ne(r, t ? Ie : Ae), { routes: w } = oe(i, e.bufferRoute);
|
|
146
146
|
for (const [y, g] of i.entries())
|
|
147
147
|
n.enqueue(g, { route: w[y], ...c ? { build: c } : {} });
|
|
148
148
|
I();
|
|
149
149
|
}
|
|
150
|
-
async function
|
|
150
|
+
async function ue(t) {
|
|
151
151
|
if (!a) {
|
|
152
|
-
if (t === "retry")
|
|
152
|
+
if (t === "retry") ae();
|
|
153
153
|
else if (t === "closed" || t === "abandoned") U();
|
|
154
154
|
else if (t === "stale")
|
|
155
155
|
try {
|
|
@@ -162,12 +162,12 @@ function ft(o = {}) {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
function m(t = !1, r = !1) {
|
|
165
|
-
return e.inFlight ? (t && (e.flushAfter = !0), e.inFlight) : e.dead || !n.recordingId || !t && !
|
|
165
|
+
return e.inFlight ? (t && (e.flushAfter = !0), e.inFlight) : e.dead || !n.recordingId || !t && !se() && e.buffer.length < je || (W(r), !n.hasPending() || Date.now() < D) ? Promise.resolve() : (e.inFlight = n.drain(r).then(ue).catch(() => {
|
|
166
166
|
}).finally(() => {
|
|
167
167
|
e.inFlight = null, e.flushAfter && (e.flushAfter = !1, m(!0));
|
|
168
168
|
}), e.inFlight);
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function le() {
|
|
171
171
|
const t = n.recordingId;
|
|
172
172
|
if (!(!t || e.dead) && (await m(!0).catch(() => {
|
|
173
173
|
}), !(a || e.dead || n.recordingId !== t || n.hasPending())))
|
|
@@ -181,14 +181,14 @@ function ft(o = {}) {
|
|
|
181
181
|
}
|
|
182
182
|
function H() {
|
|
183
183
|
const t = window.requestIdleCallback;
|
|
184
|
-
t ? t(() => void m(), { timeout:
|
|
184
|
+
t ? t(() => void m(), { timeout: V }) : m();
|
|
185
185
|
}
|
|
186
|
-
async function
|
|
187
|
-
const t = await
|
|
186
|
+
async function ce() {
|
|
187
|
+
const t = await ee();
|
|
188
188
|
if (a || !t) return;
|
|
189
|
-
C.prune(Date.now() -
|
|
190
|
-
const r =
|
|
191
|
-
if (r &&
|
|
189
|
+
C.prune(Date.now() - Re);
|
|
190
|
+
const r = be(R, b);
|
|
191
|
+
if (r && Se(r, Date.now())) {
|
|
192
192
|
const s = await C.list(r.recordingId);
|
|
193
193
|
if (a) return;
|
|
194
194
|
n.begin(r.recordingId, r.nextSeq, { trusted: !1, restored: s }), e.startedAt = r.startedAt;
|
|
@@ -199,7 +199,7 @@ function ft(o = {}) {
|
|
|
199
199
|
n.begin(s.data.id), e.startedAt = Date.now();
|
|
200
200
|
}
|
|
201
201
|
I(), e.lastNavAt = Date.now();
|
|
202
|
-
const i =
|
|
202
|
+
const i = qe(R);
|
|
203
203
|
e.route = L(), e.bufferRoute = e.route, e.sampled = J(F, e.route, i);
|
|
204
204
|
const w = () => {
|
|
205
205
|
var p;
|
|
@@ -213,11 +213,11 @@ function ft(o = {}) {
|
|
|
213
213
|
);
|
|
214
214
|
} catch {
|
|
215
215
|
}
|
|
216
|
-
}, y =
|
|
216
|
+
}, y = We(), g = Ne(), A = (s) => {
|
|
217
217
|
setTimeout(() => {
|
|
218
218
|
(async () => {
|
|
219
219
|
var p;
|
|
220
|
-
if (s >=
|
|
220
|
+
if (s >= Oe && await le(), !(a || e.dead))
|
|
221
221
|
try {
|
|
222
222
|
(p = t.takeFullSnapshot) == null || p.call(t, !0);
|
|
223
223
|
} catch {
|
|
@@ -227,13 +227,14 @@ function ft(o = {}) {
|
|
|
227
227
|
};
|
|
228
228
|
e.stop = t({
|
|
229
229
|
emit(s) {
|
|
230
|
-
|
|
230
|
+
Q(s);
|
|
231
|
+
const p = Me(g, s);
|
|
231
232
|
if (e.sampled) {
|
|
232
233
|
if (p !== "keep") {
|
|
233
234
|
p === "resume" && A(g.idleMs);
|
|
234
235
|
return;
|
|
235
236
|
}
|
|
236
|
-
e.buffer.length === 0 && (e.bufferRoute = e.route), e.buffer.push(s), e.buffer.length >= Ye && H(),
|
|
237
|
+
e.buffer.length === 0 && (e.bufferRoute = e.route), e.buffer.push(s), e.buffer.length >= Ye && H(), Ue(y, s) && setTimeout(() => {
|
|
237
238
|
var Y;
|
|
238
239
|
try {
|
|
239
240
|
(Y = t.takeFullSnapshot) == null || Y.call(t, !0);
|
|
@@ -244,7 +245,7 @@ function ft(o = {}) {
|
|
|
244
245
|
}
|
|
245
246
|
},
|
|
246
247
|
...j(() => P)
|
|
247
|
-
}) ?? null, e.uninstrument =
|
|
248
|
+
}) ?? null, e.uninstrument = te(
|
|
248
249
|
(s, p) => t.addCustomEvent(
|
|
249
250
|
s,
|
|
250
251
|
p
|
|
@@ -264,15 +265,15 @@ function ft(o = {}) {
|
|
|
264
265
|
}), n.recordingId ? { recording_id: n.recordingId, offset_ms: s } : null);
|
|
265
266
|
};
|
|
266
267
|
}
|
|
267
|
-
async function
|
|
268
|
-
const t = await
|
|
268
|
+
async function de() {
|
|
269
|
+
const t = await ee();
|
|
269
270
|
a || !t || (e.buffer = [], e.prevWindow = [], e.route = L(), e.bufferRoute = e.route, e.prevWindowRoute = e.route, e.stop = t({
|
|
270
271
|
emit(r, i) {
|
|
271
|
-
|
|
272
|
+
Q(r), i ? (e.prevWindow = e.buffer, e.prevWindowRoute = e.bufferRoute, e.buffer = [r], e.bufferRoute = e.route) : e.buffer.push(r);
|
|
272
273
|
},
|
|
273
274
|
...j(() => P),
|
|
274
275
|
checkoutEveryNms: Ve
|
|
275
|
-
}) ?? null, e.uninstrument =
|
|
276
|
+
}) ?? null, e.uninstrument = te(
|
|
276
277
|
(r, i) => t.addCustomEvent(
|
|
277
278
|
r,
|
|
278
279
|
i
|
|
@@ -283,10 +284,10 @@ function ft(o = {}) {
|
|
|
283
284
|
), O("clip"), v = (r) => {
|
|
284
285
|
const i = [...e.prevWindow, ...e.buffer], w = e.prevWindow.length > 0 ? e.prevWindowRoute : e.bufferRoute;
|
|
285
286
|
if (i.length === 0 || !u) return null;
|
|
286
|
-
const y =
|
|
287
|
+
const y = Pe(i, r);
|
|
287
288
|
return async () => {
|
|
288
289
|
const A = (await u.request(
|
|
289
|
-
|
|
290
|
+
Fe(q(l ?? "error-clip", void 0, !0), r)
|
|
290
291
|
)).data.id;
|
|
291
292
|
let s = 0;
|
|
292
293
|
return await Qe(u, A, () => s++, i, {
|
|
@@ -308,25 +309,25 @@ function ft(o = {}) {
|
|
|
308
309
|
});
|
|
309
310
|
}
|
|
310
311
|
let K = !1, P = x(null), F = G(null);
|
|
311
|
-
async function
|
|
312
|
+
async function fe() {
|
|
312
313
|
try {
|
|
313
|
-
const t = await u.request(
|
|
314
|
+
const t = await u.request(he());
|
|
314
315
|
if (a) return;
|
|
315
316
|
P = x(t.data.masking), F = G(t.data.sampling);
|
|
316
317
|
const r = t.data.cap_reached === !0;
|
|
317
318
|
K = t.data.enabled === !0 && !r;
|
|
318
319
|
const i = t.data.enabled !== !0 && t.data.error_replay === !0 && !r;
|
|
319
|
-
K ? await
|
|
320
|
+
K ? await ce() : i && await de();
|
|
320
321
|
} catch {
|
|
321
322
|
}
|
|
322
323
|
}
|
|
323
|
-
|
|
324
|
-
const
|
|
324
|
+
fe();
|
|
325
|
+
const pe = setInterval(H, V), $ = () => {
|
|
325
326
|
document.visibilityState === "hidden" && m(!0, !0);
|
|
326
327
|
};
|
|
327
328
|
document.addEventListener("visibilitychange", $);
|
|
328
329
|
const B = () => {
|
|
329
|
-
if (!(e.dead || !n.recordingId) && (W(!0), I(), !(!
|
|
330
|
+
if (!(e.dead || !n.recordingId) && (W(!0), I(), !(!X() || !_)))
|
|
330
331
|
for (const { chunk: t, body: r } of n.keepaliveBatch())
|
|
331
332
|
try {
|
|
332
333
|
_(t.recordingId, r).catch(() => {
|
|
@@ -340,7 +341,7 @@ function ft(o = {}) {
|
|
|
340
341
|
};
|
|
341
342
|
return window.addEventListener("online", z), () => {
|
|
342
343
|
var t, r;
|
|
343
|
-
a = !0, E = null, v = null, O(null), document.removeEventListener("visibilitychange", $), window.removeEventListener("pagehide", B), window.removeEventListener("online", z), clearInterval(
|
|
344
|
+
a = !0, E = null, v = null, O(null), document.removeEventListener("visibilitychange", $), window.removeEventListener("pagehide", B), window.removeEventListener("online", z), clearInterval(pe), T(), (t = e.uninstrument) == null || t.call(e), e.uninstrument = null, (r = e.stop) == null || r.call(e), e.stop = null, e.prevWindow = [], m(!0).then(() => {
|
|
344
345
|
const i = n.recordingId;
|
|
345
346
|
i && (e.dead || h.request(M(i)).catch(() => {
|
|
346
347
|
}), n.discard(), n.recordingId = null, N(R, b));
|
|
@@ -348,7 +349,7 @@ function ft(o = {}) {
|
|
|
348
349
|
};
|
|
349
350
|
}, [u, d, l, c]);
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
+
Le(
|
|
352
353
|
(o) => Ze(o),
|
|
353
354
|
(o) => (v == null ? void 0 : v(o)) ?? null
|
|
354
355
|
);
|