gather-vue 8.6.0

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.
Files changed (178) hide show
  1. package/README.md +64 -0
  2. package/dist/.htaccess +1 -0
  3. package/dist/App-B7KWoHRH.js +160 -0
  4. package/dist/App-B7KWoHRH.js.gz +0 -0
  5. package/dist/App-C03tW0-W.js +405 -0
  6. package/dist/App-C03tW0-W.js.gz +0 -0
  7. package/dist/BannerExample-CRj1iMwh.js +77 -0
  8. package/dist/BannerExample-CRj1iMwh.js.gz +0 -0
  9. package/dist/BannerExample-DLN6d9M0.js +84 -0
  10. package/dist/BannerExample-DLN6d9M0.js.gz +0 -0
  11. package/dist/CallToAction-BbJ-zDFa.js +3493 -0
  12. package/dist/CallToAction-BbJ-zDFa.js.gz +0 -0
  13. package/dist/CallToAction-jAi8aaI-.js +35 -0
  14. package/dist/CallToAction-jAi8aaI-.js.gz +0 -0
  15. package/dist/Card-B1Pdd5BL.js +202 -0
  16. package/dist/Card-B1Pdd5BL.js.gz +0 -0
  17. package/dist/Card-qMo1jrfb.js +699 -0
  18. package/dist/Card-qMo1jrfb.js.gz +0 -0
  19. package/dist/CloseCardButton-CL_3xkAF.js +71 -0
  20. package/dist/CloseCardButton-CL_3xkAF.js.gz +0 -0
  21. package/dist/Editor-DXSZFkEM.js +149 -0
  22. package/dist/Editor-DXSZFkEM.js.gz +0 -0
  23. package/dist/EmailExistsView-CX1ijN0R.js +72 -0
  24. package/dist/EmailExistsView-CX1ijN0R.js.gz +0 -0
  25. package/dist/EmailInvitation-BVFicmrK.js +22 -0
  26. package/dist/EmailView-DdaSnKFq.js +84 -0
  27. package/dist/EmailView-DdaSnKFq.js.gz +0 -0
  28. package/dist/FriendBannerExample-C8QmPZyP.js +76 -0
  29. package/dist/FriendBannerExample-C8QmPZyP.js.gz +0 -0
  30. package/dist/FriendConfirmation-B-RemAoP.js +22 -0
  31. package/dist/FriendForm-CunLFX_H.js +255 -0
  32. package/dist/FriendForm-CunLFX_H.js.gz +0 -0
  33. package/dist/FriendOptIn-bp4udUYv.js +27 -0
  34. package/dist/FriendPending-cFjgyL8g.js +22 -0
  35. package/dist/FriendPitch-BhSs2eLR.js +19 -0
  36. package/dist/FriendPitch-CAS1c3Co.js +33 -0
  37. package/dist/FriendSuccess-uxEdomAY.js +22 -0
  38. package/dist/Invitations-hprUCIvW.js +27 -0
  39. package/dist/InviteRoot-Dima8d2G.js +252 -0
  40. package/dist/InviteRoot-Dima8d2G.js.gz +0 -0
  41. package/dist/LaunchButton-BQw42WVn.js +18 -0
  42. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js +103 -0
  43. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js.gz +0 -0
  44. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js +149 -0
  45. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js.gz +0 -0
  46. package/dist/MazIcon.B5hPzeLk-C20gse35.js +103 -0
  47. package/dist/MazIcon.B5hPzeLk-C20gse35.js.gz +0 -0
  48. package/dist/MazPhoneNumberInput-Cz50Ts4U.js +4751 -0
  49. package/dist/MazPhoneNumberInput-Cz50Ts4U.js.gz +0 -0
  50. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js +34 -0
  51. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js.gz +0 -0
  52. package/dist/Menu-BsKr40BO.js +21377 -0
  53. package/dist/Menu-BsKr40BO.js.gz +0 -0
  54. package/dist/Message-D4PAgcHO.js +22 -0
  55. package/dist/MessageCard-CC74qCir.js +74 -0
  56. package/dist/MessageCard-CC74qCir.js.gz +0 -0
  57. package/dist/MessageView-BKAIrwj7.js +88 -0
  58. package/dist/MessageView-BKAIrwj7.js.gz +0 -0
  59. package/dist/PendingApprovalCard-Dzs0UxBO.js +48 -0
  60. package/dist/PendingApprovalCard-Dzs0UxBO.js.gz +0 -0
  61. package/dist/PendingApprovalView-V-OUYSnK.js +33 -0
  62. package/dist/ReferralButton-CEue5qud.js +18 -0
  63. package/dist/ReferralFailedView-3Ua13t4V.js +74 -0
  64. package/dist/ReferralFailedView-3Ua13t4V.js.gz +0 -0
  65. package/dist/ReferredConfirmCard-iwgkcZCm.js +48 -0
  66. package/dist/ReferredConfirmCard-iwgkcZCm.js.gz +0 -0
  67. package/dist/ReferredConfirmView-DS1RNBwP.js +33 -0
  68. package/dist/ReferredSuccessCard-Dg-a4FYr.js +209 -0
  69. package/dist/ReferredSuccessCard-Dg-a4FYr.js.gz +0 -0
  70. package/dist/ReferredSuccessView-ChVztlUr.js +33 -0
  71. package/dist/ReferredView-7HezoVIA.js +98 -0
  72. package/dist/ReferredView-7HezoVIA.js.gz +0 -0
  73. package/dist/RewardCard-CwU2X2Yo.js +197 -0
  74. package/dist/RewardCard-CwU2X2Yo.js.gz +0 -0
  75. package/dist/Rewards-DdyEwCyy.js +27 -0
  76. package/dist/RewardsRoot-CnQfyjC6.js +198 -0
  77. package/dist/RewardsRoot-CnQfyjC6.js.gz +0 -0
  78. package/dist/Root-bUfnZpPP.js +17 -0
  79. package/dist/ShareInvitation-SAgC-8YA.js +22 -0
  80. package/dist/SignIn-CroW3mY6.js +36 -0
  81. package/dist/SignIn-CroW3mY6.js.gz +0 -0
  82. package/dist/SignIn-g32Hg2or.js +17 -0
  83. package/dist/SignInTextArea-DBRk6x09.js +17 -0
  84. package/dist/SignUpFormCard-Cail4V4M.js +287 -0
  85. package/dist/SignUpFormCard-Cail4V4M.js.gz +0 -0
  86. package/dist/SignUpView-a7LPgEeX.js +368 -0
  87. package/dist/SignUpView-a7LPgEeX.js.gz +0 -0
  88. package/dist/SignUpView-uujOX5hN.js +103 -0
  89. package/dist/SignUpView-uujOX5hN.js.gz +0 -0
  90. package/dist/SocialView-CbBZTB7Z.js +87 -0
  91. package/dist/SocialView-CbBZTB7Z.js.gz +0 -0
  92. package/dist/Stats-DtS-GXsI.js +22 -0
  93. package/dist/StatsView-fX-VznRc.js +90 -0
  94. package/dist/StatsView-fX-VznRc.js.gz +0 -0
  95. package/dist/Success-k06CZz0K.js +40 -0
  96. package/dist/Success-k06CZz0K.js.gz +0 -0
  97. package/dist/SuccessCard-C1iF1j2W.js +219 -0
  98. package/dist/SuccessCard-C1iF1j2W.js.gz +0 -0
  99. package/dist/SuccessView-CDUVkpSQ.js +77 -0
  100. package/dist/SuccessView-CDUVkpSQ.js.gz +0 -0
  101. package/dist/TextArea-DFfa9A93.js +17 -0
  102. package/dist/TextAreaCard-D_VfEHME.js +34 -0
  103. package/dist/TextAreaCard-D_VfEHME.js.gz +0 -0
  104. package/dist/UserView-DnD929IT.js +96 -0
  105. package/dist/UserView-DnD929IT.js.gz +0 -0
  106. package/dist/WhatsAppShare-B40Ouvds.js +59 -0
  107. package/dist/WhatsAppShare-B40Ouvds.js.gz +0 -0
  108. package/dist/agent-session-Xh6dZlhc.js +298 -0
  109. package/dist/agent-session-Xh6dZlhc.js.gz +0 -0
  110. package/dist/aggregate-base-C6N8Ymd5.js +830 -0
  111. package/dist/aggregate-base-C6N8Ymd5.js.gz +0 -0
  112. package/dist/bel-serializer-DMbFBZ6U.js +51 -0
  113. package/dist/bel-serializer-DMbFBZ6U.js.gz +0 -0
  114. package/dist/browser-q7cvfJ-2.js +366 -0
  115. package/dist/browser-q7cvfJ-2.js.gz +0 -0
  116. package/dist/cart.js +5 -0
  117. package/dist/cart.js.gz +0 -0
  118. package/dist/check.C9Q_W85g-DmgtOx7Q.js +30 -0
  119. package/dist/chevron-down.BkvtON3b-RNrTKYcy.js +30 -0
  120. package/dist/content-5VAQ1vQ0.js +4 -0
  121. package/dist/event-origin-BSW5uum9.js +13 -0
  122. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js +4 -0
  123. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js.gz +0 -0
  124. package/dist/eye-slash.BoO00xzs-CULY_lvM.js +30 -0
  125. package/dist/eye.f8zAUc30-Yr89kafZ.js +43 -0
  126. package/dist/eye.f8zAUc30-Yr89kafZ.js.gz +0 -0
  127. package/dist/favicon.ico +0 -0
  128. package/dist/first-paint-B61SrVKm.js +453 -0
  129. package/dist/first-paint-B61SrVKm.js.gz +0 -0
  130. package/dist/gather-vue.css +5 -0
  131. package/dist/gather-vue.css.gz +0 -0
  132. package/dist/gather-widget.es.js +5 -0
  133. package/dist/gather-widget.umd.js +263 -0
  134. package/dist/gather-widget.umd.js.gz +0 -0
  135. package/dist/gather_widget.css +58 -0
  136. package/dist/gather_widget.css.gz +0 -0
  137. package/dist/gather_widget.js +72 -0
  138. package/dist/gather_widget.js.gz +0 -0
  139. package/dist/iframe-BELrOJ1p.js +6 -0
  140. package/dist/index-3lvNtPTE.js +327 -0
  141. package/dist/index-3lvNtPTE.js.gz +0 -0
  142. package/dist/index-BDyGxL1x.js +255 -0
  143. package/dist/index-BDyGxL1x.js.gz +0 -0
  144. package/dist/index-BF9haAFD.js +343 -0
  145. package/dist/index-BF9haAFD.js.gz +0 -0
  146. package/dist/index-BMIST_QA.js +128 -0
  147. package/dist/index-BMIST_QA.js.gz +0 -0
  148. package/dist/index-BdWnMhAc.js +235 -0
  149. package/dist/index-BdWnMhAc.js.gz +0 -0
  150. package/dist/index-BioZsJbf.js +190 -0
  151. package/dist/index-BioZsJbf.js.gz +0 -0
  152. package/dist/index-BzOcD8v-.js +166 -0
  153. package/dist/index-BzOcD8v-.js.gz +0 -0
  154. package/dist/index-C8pB9mUQ.js +147 -0
  155. package/dist/index-C8pB9mUQ.js.gz +0 -0
  156. package/dist/index-C_ougoWd.js +426 -0
  157. package/dist/index-C_ougoWd.js.gz +0 -0
  158. package/dist/index-CoRlIGDo.js +513 -0
  159. package/dist/index-CoRlIGDo.js.gz +0 -0
  160. package/dist/index-CyWBxUBS.js +291 -0
  161. package/dist/index-CyWBxUBS.js.gz +0 -0
  162. package/dist/index-DijQHge7.js +325 -0
  163. package/dist/index-DijQHge7.js.gz +0 -0
  164. package/dist/magnifying-glass.-nBiyXot-CuA_mltt.js +30 -0
  165. package/dist/main-DPldah1M.js +40243 -0
  166. package/dist/main-DPldah1M.js.gz +0 -0
  167. package/dist/nav-timing-B-TNQpyK.js +31 -0
  168. package/dist/nav-timing-B-TNQpyK.js.gz +0 -0
  169. package/dist/no-photography.BJX8HSus-BJX8HSus.js +4 -0
  170. package/dist/no-symbol.CIgKzsrB-3PuxVsDY.js +30 -0
  171. package/dist/recorder-PHZWRV-S.js +8271 -0
  172. package/dist/recorder-PHZWRV-S.js.gz +0 -0
  173. package/dist/stylesheet-evaluator-B4P289vW.js +86 -0
  174. package/dist/stylesheet-evaluator-B4P289vW.js.gz +0 -0
  175. package/dist/time-to-first-byte-kiwh1xjs.js +29 -0
  176. package/dist/traverse-Bw4y1x4D.js +8 -0
  177. package/dist/type-check-Bp684oBR.js +6 -0
  178. package/package.json +89 -0
@@ -0,0 +1,128 @@
1
+ var M = Object.defineProperty;
2
+ var E = (n, t, e) => t in n ? M(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var o = (n, t, e) => E(n, typeof t != "symbol" ? t + "" : t, e);
4
+ import { L as m, j as b, k as u, l as y, m as d, A as f, n as R, p as a, d as L, q as T, r as g, s as v, t as S, v as F } from "./main-DPldah1M.js";
5
+ import { c as O, A, M as N } from "./aggregate-base-C6N8Ymd5.js";
6
+ import { a as _ } from "./traverse-Bw4y1x4D.js";
7
+ class I {
8
+ /**
9
+ * @param {number} timestamp - Unix timestamp
10
+ * @param {string} message - message string
11
+ * @param {object} attributes - other log event attributes
12
+ * @param {enum} level - Log level
13
+ */
14
+ constructor(t, e, i = {}, s = m.INFO) {
15
+ /** @type {long} the unix timestamp of the log event */
16
+ o(this, "timestamp");
17
+ /** @type {string} the log message */
18
+ o(this, "message");
19
+ /** @type {object} the object of attributes to be parsed by logging ingest into top-level properties */
20
+ o(this, "attributes");
21
+ /** @type {'ERROR'|'TRACE'|'DEBUG'|'INFO'|'WARN'} the log type of the log */
22
+ o(this, "level");
23
+ this.timestamp = t, this.message = e, this.attributes = {
24
+ ...i,
25
+ pageUrl: O("" + b)
26
+ }, this.level = s.toUpperCase();
27
+ }
28
+ }
29
+ class k extends A {
30
+ constructor(t) {
31
+ super(t, u), this.isSessionTrackingEnabled = y(t.init) && t.runtime.session, this.ee.on(d.RESET, () => {
32
+ this.abort(f.RESET);
33
+ }), this.ee.on(d.UPDATE, (e, i) => {
34
+ this.blocked || e !== R.CROSS_TAB || (this.loggingMode !== a.OFF && i.loggingMode === a.OFF ? this.abort(f.CROSS_TAB) : this.loggingMode = i.loggingMode);
35
+ }), this.harvestOpts.raw = !0, this.waitForFlags(["log"]).then(([e]) => {
36
+ const i = this.agentRef.runtime.session ?? {};
37
+ if (this.loggingMode === a.OFF || i.isNew && e === a.OFF) {
38
+ this.blocked = !0, this.deregisterDrain();
39
+ return;
40
+ }
41
+ i.isNew || !this.isSessionTrackingEnabled ? this.updateLoggingMode(e) : this.loggingMode = i.state.loggingMode, L(T, this.handleLog.bind(this), this.featureName, this.ee), this.drain(), t.runtime.harvester.triggerHarvestFor(this);
42
+ });
43
+ }
44
+ updateLoggingMode(t) {
45
+ this.loggingMode = t, this.syncWithSessionManager({
46
+ loggingMode: this.loggingMode
47
+ });
48
+ }
49
+ handleLog(t, e, i = {}, s = m.INFO, l) {
50
+ if (!this.agentRef.runtime.entityManager.get(l)) return g(56, this.featureName);
51
+ if (this.blocked || !this.loggingMode) return;
52
+ if ((!i || typeof i != "object") && (i = {}), typeof s == "string" && (s = s.toUpperCase()), !v(s)) return g(30, s);
53
+ if (this.loggingMode < (a[s] || 1 / 0)) {
54
+ this.reportSupportabilityMetric("Logging/Event/Dropped/Sampling");
55
+ return;
56
+ }
57
+ try {
58
+ if (typeof e != "string") {
59
+ const p = S(e);
60
+ p && p !== "{}" ? e = p : e = String(e);
61
+ }
62
+ } catch {
63
+ g(16, e), this.reportSupportabilityMetric("Logging/Event/Dropped/Casting");
64
+ return;
65
+ }
66
+ if (typeof e != "string" || !e) return g(32);
67
+ const r = new I(Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(t)), e, i, s), h = r.message.length + S(r.attributes).length + r.level.length + 10, c = "Logging/Harvest/Failed/Seen";
68
+ if (h > N) {
69
+ this.reportSupportabilityMetric(c, h), g(31, r.message.slice(0, 25) + "...");
70
+ return;
71
+ }
72
+ this.events.wouldExceedMaxSize(h, l) && (this.reportSupportabilityMetric("Logging/Harvest/Early/Seen", this.events.byteSize() + h), this.agentRef.runtime.harvester.triggerHarvestFor(this, {
73
+ targetEntityGuid: l
74
+ })), this.events.add(r, l) ? this.reportSupportabilityMetric("Logging/Event/Added/Seen") : (this.reportSupportabilityMetric(c, h), g(31, r.message.slice(0, 25) + "..."));
75
+ }
76
+ serializer(t, e) {
77
+ const i = this.agentRef.runtime.entityManager.get(e), s = this.agentRef.runtime.session;
78
+ return [{
79
+ common: {
80
+ /** Attributes in the `common` section are added to `all` logs generated in the payload */
81
+ attributes: {
82
+ "entity.guid": i.entityGuid,
83
+ // browser entity guid as provided API target OR the default from RUM response if not supplied
84
+ ...s && {
85
+ session: s.state.value || "0",
86
+ // The session ID that we generate and keep across page loads
87
+ hasReplay: s.state.sessionReplayMode === 1 && F(i, this.agentRef),
88
+ // True if a session replay recording is running
89
+ hasTrace: s.state.sessionTraceMode === 1
90
+ // True if a session trace recording is running
91
+ },
92
+ ptid: this.agentRef.runtime.ptid,
93
+ // page trace id
94
+ appId: i.applicationID || this.agentRef.info.applicationID,
95
+ // Application ID from info object,
96
+ standalone: !!this.agentRef.info.sa,
97
+ // copy paste (true) vs APM (false)
98
+ agentVersion: this.agentRef.runtime.version,
99
+ // browser agent version
100
+ // The following 3 attributes are evaluated and dropped at ingest processing time and do not get stored on NRDB:
101
+ "instrumentation.provider": "browser",
102
+ "instrumentation.version": this.agentRef.runtime.version,
103
+ "instrumentation.name": this.agentRef.runtime.loaderType,
104
+ // Custom attributes
105
+ ...this.agentRef.info.jsAttributes
106
+ }
107
+ },
108
+ /** logs section contains individual unique log entries */
109
+ logs: _(t, this.obfuscator.obfuscateString.bind(this.obfuscator), "string")
110
+ }];
111
+ }
112
+ queryStringsBuilder(t, e) {
113
+ return {
114
+ browser_monitoring_key: this.agentRef.runtime.entityManager.get(e).licenseKey
115
+ };
116
+ }
117
+ /** Abort the feature, once aborted it will not resume */
118
+ abort(t = {}) {
119
+ this.reportSupportabilityMetric("Logging/Abort/".concat(t.sm)), this.blocked = !0, this.events && (this.events.clear(), this.events.clearSave()), this.updateLoggingMode(a.OFF), this.deregisterDrain();
120
+ }
121
+ syncWithSessionManager(t = {}) {
122
+ this.isSessionTrackingEnabled && this.agentRef.runtime.session.write(t);
123
+ }
124
+ }
125
+ o(k, "featureName", u);
126
+ export {
127
+ k as Aggregate
128
+ };
Binary file
@@ -0,0 +1,235 @@
1
+ var U = Object.defineProperty;
2
+ var I = (c, u, e) => u in c ? U(c, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[u] = e;
3
+ var M = (c, u, e) => I(c, typeof u != "symbol" ? u + "" : u, e);
4
+ import { aH as A, aF as a, l as L, m as R, A as f, n as z, d as O, aI as v, B, aJ as P, aK as N, t as w, r as C, aL as b, z as K, aM as D, aN as W } from "./main-DPldah1M.js";
5
+ import { A as H, M as G, o as V, c as Y } from "./aggregate-base-C6N8Ymd5.js";
6
+ import { s as j } from "./stylesheet-evaluator-B4P289vW.js";
7
+ let k;
8
+ const x = new Promise((c) => {
9
+ k = c;
10
+ }), J = Object.freeze({
11
+ onReplayReady: k,
12
+ sessionReplayInitialized: x
13
+ });
14
+ class q extends H {
15
+ // pass the recorder into the aggregator
16
+ constructor(e, t) {
17
+ super(e, A);
18
+ M(this, "mode", a.OFF);
19
+ this.initialized = !1, this.blocked = !1, this.gzipper = void 0, this.u8 = void 0, this.entitled = !1, this.timeKeeper = void 0, this.recorder = t == null ? void 0 : t.recorder, this.errorNoticed = (t == null ? void 0 : t.errorNoticed) || !1, this.harvestOpts.raw = !0, this.isSessionTrackingEnabled = L(e.init) && !!e.runtime.session, this.reportSupportabilityMetric("Config/SessionReplay/Enabled"), this.ee.on(R.RESET, () => {
20
+ this.abort(f.RESET);
21
+ }), this.ee.on(R.PAUSE, () => {
22
+ var o;
23
+ (o = this.recorder) == null || o.stopRecording();
24
+ }), this.ee.on(R.RESUME, () => {
25
+ var o;
26
+ this.recorder && (this.mode = e.runtime.session.state.sessionReplayMode, !(!this.initialized || this.mode === a.OFF) && ((o = this.recorder) == null || o.startRecording()));
27
+ }), this.ee.on(R.UPDATE, (o, d) => {
28
+ !this.recorder || !this.initialized || this.blocked || o !== z.CROSS_TAB || (this.mode !== a.OFF && d.sessionReplayMode === a.OFF && this.abort(f.CROSS_TAB), this.mode = d.sessionReplayMode);
29
+ }), O(v.PAUSE, () => {
30
+ this.forceStop(this.mode === a.FULL);
31
+ }, this.featureName, this.ee), O(v.ERROR_DURING_REPLAY, (o) => {
32
+ this.handleError(o);
33
+ }, this.featureName, this.ee);
34
+ const {
35
+ error_sampling_rate: i,
36
+ sampling_rate: r,
37
+ autoStart: n,
38
+ block_selector: p,
39
+ mask_text_selector: l,
40
+ mask_all_inputs: s,
41
+ inline_images: h,
42
+ collect_fonts: g
43
+ } = e.init.session_replay;
44
+ this.waitForFlags(["srs", "sr"]).then(([o, d]) => {
45
+ if (this.entitled = !!d, !this.entitled) {
46
+ this.deregisterDrain(), this.agentRef.runtime.isRecording && (this.abort(f.ENTITLEMENTS), this.reportSupportabilityMetric("SessionReplay/EnabledNotEntitled/Detected"));
47
+ return;
48
+ }
49
+ this.drain(), this.initializeRecording(o);
50
+ }).then(() => {
51
+ var o, d, m, y;
52
+ if (this.mode === a.OFF)
53
+ for ((o = this.recorder) == null || o.stopRecording(); (d = this.recorder) != null && d.getEvents().events.length; ) (y = (m = this.recorder) == null ? void 0 : m.clearBuffer) == null || y.call(m);
54
+ J.onReplayReady(this.mode);
55
+ }), n || this.reportSupportabilityMetric("Config/SessionReplay/AutoStart/Modified"), g === !0 && this.reportSupportabilityMetric("Config/SessionReplay/CollectFonts/Modified"), h === !0 && this.reportSupportabilityMetric("Config/SessionReplay/InlineImages/Modifed"), s !== !0 && this.reportSupportabilityMetric("Config/SessionReplay/MaskAllInputs/Modified"), p !== "[data-nr-block]" && this.reportSupportabilityMetric("Config/SessionReplay/BlockSelector/Modified"), l !== "*" && this.reportSupportabilityMetric("Config/SessionReplay/MaskTextSelector/Modified"), this.reportSupportabilityMetric("Config/SessionReplay/SamplingRate/Value", r), this.reportSupportabilityMetric("Config/SessionReplay/ErrorSamplingRate/Value", i);
56
+ }
57
+ replayIsActive() {
58
+ return !!(this.recorder && this.mode === a.FULL && !this.blocked && this.entitled);
59
+ }
60
+ handleError(e) {
61
+ var t;
62
+ this.recorder && (this.recorder.currentBufferTarget.hasError = !0), this.mode === a.ERROR && ((t = B) == null ? void 0 : t.document.visibilityState) === "visible" && this.switchToFull();
63
+ }
64
+ switchToFull() {
65
+ !this.entitled || this.blocked || (this.mode = a.FULL, this.recorder && this.initialized ? (this.agentRef.runtime.isRecording || this.recorder.startRecording(), this.syncWithSessionManager({
66
+ sessionReplayMode: this.mode
67
+ })) : this.initializeRecording(a.FULL, !0));
68
+ }
69
+ /**
70
+ * Evaluate entitlements and sampling before starting feature mechanics, importing and configuring recording library, and setting storage state
71
+ * @param {boolean} srMode - the true/false state of the "sr" flag (aka. entitlements) from RUM response
72
+ * @param {boolean} ignoreSession - whether to force the method to ignore the session state and use just the sample flags
73
+ * @returns {void}
74
+ */
75
+ async initializeRecording(e, t) {
76
+ var n, p;
77
+ if (this.initialized = !0, !this.entitled) return;
78
+ const {
79
+ session: i,
80
+ timeKeeper: r
81
+ } = this.agentRef.runtime;
82
+ if (this.timeKeeper = r, ((n = this.recorder) == null ? void 0 : n.parent.trigger) === P.API && this.agentRef.runtime.isRecording ? this.mode = a.FULL : !i.isNew && !t ? this.mode = i.state.sessionReplayMode : this.mode = e, this.mode !== a.OFF) {
83
+ if (this.recorder)
84
+ this.recorder.parent = this;
85
+ else
86
+ try {
87
+ const {
88
+ Recorder: l
89
+ } = await import(
90
+ /* webpackChunkName: "recorder" */
91
+ "./recorder-PHZWRV-S.js"
92
+ );
93
+ this.recorder = new l(this), this.recorder.currentBufferTarget.hasError = this.errorNoticed;
94
+ } catch {
95
+ return this.abort(f.IMPORT);
96
+ }
97
+ this.mode === a.ERROR && this.errorNoticed && (this.mode = a.FULL), this.mode === a.FULL && ((p = this.recorder) == null ? void 0 : p.getEvents().type) === "preloaded" && this.prepUtils().then(() => this.agentRef.runtime.harvester.triggerHarvestFor(this)), await this.prepUtils(), this.agentRef.runtime.isRecording || this.recorder.startRecording(), this.syncWithSessionManager({
98
+ sessionReplayMode: this.mode
99
+ });
100
+ }
101
+ }
102
+ async prepUtils() {
103
+ try {
104
+ const {
105
+ gzipSync: e,
106
+ strToU8: t
107
+ } = await import(
108
+ /* webpackChunkName: "compressor" */
109
+ "./browser-q7cvfJ-2.js"
110
+ );
111
+ this.gzipper = e, this.u8 = t;
112
+ } catch {
113
+ }
114
+ }
115
+ makeHarvestPayload(e) {
116
+ var p;
117
+ const t = {
118
+ targetApp: void 0,
119
+ payload: void 0
120
+ };
121
+ if (this.mode !== a.FULL || this.blocked || !this.recorder || !((p = this.timeKeeper) != null && p.ready) || !this.recorder.hasSeenSnapshot) return;
122
+ const i = this.recorder.getEvents();
123
+ if (!i.events.length) return;
124
+ const r = this.getHarvestContents(i);
125
+ if (!r.body.length)
126
+ return this.recorder.clearBuffer(), [t];
127
+ this.reportSupportabilityMetric("SessionReplay/Harvest/Attempts");
128
+ let n = 0;
129
+ return this.gzipper && this.u8 ? (r.body = this.gzipper(this.u8("[".concat(r.body.map(({
130
+ __serialized: l,
131
+ ...s
132
+ }) => {
133
+ if (s.__newrelic && l) return l;
134
+ const h = {
135
+ ...s
136
+ };
137
+ return h.__newrelic || (h.__newrelic = N(s.timestamp, this.timeKeeper), h.timestamp = this.timeKeeper.correctAbsoluteTimestamp(s.timestamp)), w(h);
138
+ }).join(","), "]"))), n = r.body.length) : (r.body = r.body.map(({
139
+ __serialized: l,
140
+ ...s
141
+ }) => {
142
+ if (s.__newrelic) return s;
143
+ const h = {
144
+ ...s
145
+ };
146
+ return h.__newrelic = N(s.timestamp, this.timeKeeper), h.timestamp = this.timeKeeper.correctAbsoluteTimestamp(s.timestamp), h;
147
+ }), n = w(r.body).length), n > G ? (this.abort(f.TOO_BIG, n), [t]) : (this.agentRef.runtime.session.state.sessionReplaySentFirstChunk || this.syncWithSessionManager({
148
+ sessionReplaySentFirstChunk: !0
149
+ }), this.recorder.clearBuffer(), i.type === "preloaded" && this.agentRef.runtime.harvester.triggerHarvestFor(this), t.payload = r, this.agentRef.runtime.session.state.traceHarvestStarted || C(59, JSON.stringify(this.agentRef.runtime.session.state)), [t]);
150
+ }
151
+ getCorrectedTimestamp(e) {
152
+ if (e != null && e.timestamp)
153
+ return e.__newrelic ? e.timestamp : this.timeKeeper.correctAbsoluteTimestamp(e.timestamp);
154
+ }
155
+ getHarvestContents(e) {
156
+ var m, y, E, _, T, F;
157
+ e ?? (e = this.recorder.getEvents());
158
+ let t = e.events;
159
+ const i = this.agentRef.runtime, r = (m = this.agentRef.info.jsAttributes) == null ? void 0 : m["enduser.id"];
160
+ ((y = t == null ? void 0 : t[0]) == null ? void 0 : y.type) === b.FullSnapshot && this.recorder.lastMeta && (e.hasMeta = !0, t.unshift(this.recorder.lastMeta), this.recorder.lastMeta = void 0), ((E = t[t.length - 1]) == null ? void 0 : E.type) === b.Meta && (this.recorder.lastMeta = t[t.length - 1], t = t.slice(0, t.length - 1), e.hasMeta = !!t.find((S) => S.type === b.Meta));
161
+ const l = K(), s = this.getCorrectedTimestamp(t[0]), h = this.getCorrectedTimestamp(t[t.length - 1]), g = s || Math.floor(this.timeKeeper.correctAbsoluteTimestamp(e.cycleTimestamp)), o = h || Math.floor(this.timeKeeper.correctRelativeTimestamp(l)), d = ((T = (_ = i.appMetadata) == null ? void 0 : _.agents) == null ? void 0 : T[0]) || {};
162
+ return {
163
+ qs: {
164
+ browser_monitoring_key: this.agentRef.info.licenseKey,
165
+ type: "SessionReplay",
166
+ app_id: this.agentRef.info.applicationID,
167
+ protocol_version: "0",
168
+ timestamp: g,
169
+ attributes: V({
170
+ // this section of attributes must be controllable and stay below the query param padding limit -- see QUERY_PARAM_PADDING
171
+ // if not, data could be lost to truncation at time of sending, potentially breaking parsing / API behavior in NR1
172
+ ...!!this.gzipper && !!this.u8 && {
173
+ content_encoding: "gzip"
174
+ },
175
+ ...d.entityGuid && {
176
+ entityGuid: d.entityGuid
177
+ },
178
+ harvestId: [(F = i.session) == null ? void 0 : F.state.value, i.ptid, i.harvestCount].filter((S) => S).join("_"),
179
+ "replay.firstTimestamp": g,
180
+ "replay.lastTimestamp": o,
181
+ "replay.nodes": t.length,
182
+ "session.durationMs": i.session.getDuration(),
183
+ agentVersion: i.version,
184
+ session: i.session.state.value,
185
+ rst: l,
186
+ hasMeta: e.hasMeta || !1,
187
+ hasSnapshot: e.hasSnapshot || !1,
188
+ hasError: e.hasError || !1,
189
+ isFirstChunk: i.session.state.sessionReplaySentFirstChunk === !1,
190
+ decompressedBytes: e.payloadBytesEstimation,
191
+ invalidStylesheetsDetected: j.invalidStylesheetsDetected,
192
+ inlinedAllStylesheets: e.inlinedAllStylesheets,
193
+ "rrweb.version": W,
194
+ "payload.type": e.type,
195
+ // customer-defined data should go last so that if it exceeds the query param padding limit it will be truncated instead of important attrs
196
+ ...r && {
197
+ "enduser.id": this.obfuscator.obfuscateString(r)
198
+ },
199
+ currentUrl: this.obfuscator.obfuscateString(Y("" + location))
200
+ // The Query Param is being arbitrarily limited in length here. It is also applied when estimating the size of the payload in getPayloadSize()
201
+ }, D).substring(1)
202
+ // remove the leading '&'
203
+ },
204
+ body: t
205
+ };
206
+ }
207
+ postHarvestCleanup(e) {
208
+ e.status === 429 && this.abort(f.TOO_MANY);
209
+ }
210
+ /**
211
+ * Forces the agent into OFF mode so that changing tabs or navigating
212
+ * does not restart the recording. This is used when the customer calls
213
+ * the stopRecording API.
214
+ */
215
+ forceStop(e) {
216
+ var t, i;
217
+ e && this.agentRef.runtime.harvester.triggerHarvestFor(this), this.mode = a.OFF, (i = (t = this.recorder) == null ? void 0 : t.stopRecording) == null || i.call(t), this.syncWithSessionManager({
218
+ sessionReplayMode: this.mode
219
+ });
220
+ }
221
+ /** Abort the feature, once aborted it will not resume */
222
+ abort(e = {}, t) {
223
+ var i, r, n, p, l, s, h;
224
+ for (C(33, e.message), this.reportSupportabilityMetric("SessionReplay/Abort/".concat(e.sm), t), this.blocked = !0, this.mode = a.OFF, (r = (i = this.recorder) == null ? void 0 : i.stopRecording) == null || r.call(i), this.syncWithSessionManager({
225
+ sessionReplayMode: this.mode
226
+ }), (p = (n = this.recorder) == null ? void 0 : n.clearTimestamps) == null || p.call(n); (l = this.recorder) != null && l.getEvents().events.length; ) (h = (s = this.recorder) == null ? void 0 : s.clearBuffer) == null || h.call(s);
227
+ }
228
+ syncWithSessionManager(e = {}) {
229
+ this.isSessionTrackingEnabled && this.agentRef.runtime.session.write(e);
230
+ }
231
+ }
232
+ M(q, "featureName", A);
233
+ export {
234
+ q as Aggregate
235
+ };
Binary file
@@ -0,0 +1,190 @@
1
+ var y = Object.defineProperty;
2
+ var w = (e, t, i) => t in e ? y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var u = (e, t, i) => w(e, typeof t != "symbol" ? t + "" : t, i);
4
+ import { i as n, F as l, d, S, e as O, f as b, g as E, o as g, h as R, w as A } from "./main-DPldah1M.js";
5
+ import { A as M, i as m } from "./aggregate-base-C6N8Ymd5.js";
6
+ import { i as T } from "./iframe-BELrOJ1p.js";
7
+ const r = {
8
+ REACT: "React",
9
+ NEXTJS: "NextJS",
10
+ VUE: "Vue",
11
+ NUXTJS: "NuxtJS",
12
+ ANGULAR: "Angular",
13
+ ANGULARUNIVERSAL: "AngularUniversal",
14
+ SVELTE: "Svelte",
15
+ SVELTEKIT: "SvelteKit",
16
+ PREACT: "Preact",
17
+ PREACTSSR: "PreactSSR",
18
+ ANGULARJS: "AngularJS",
19
+ BACKBONE: "Backbone",
20
+ EMBER: "Ember",
21
+ METEOR: "Meteor",
22
+ ZEPTO: "Zepto",
23
+ JQUERY: "Jquery",
24
+ MOOTOOLS: "MooTools",
25
+ QWIK: "Qwik",
26
+ ELECTRON: "Electron"
27
+ };
28
+ function P() {
29
+ if (!n) return [];
30
+ const e = [];
31
+ try {
32
+ C() && (e.push(r.REACT), N() && e.push(r.NEXTJS)), v() && (e.push(r.VUE), L() && e.push(r.NUXTJS)), j() && (e.push(r.ANGULAR), U() && e.push(r.ANGULARUNIVERSAL)), k() && (e.push(r.SVELTE), G() && e.push(r.SVELTEKIT)), I() && (e.push(r.PREACT), _() && e.push(r.PREACTSSR)), D() && e.push(r.ANGULARJS), Object.prototype.hasOwnProperty.call(window, "Backbone") && e.push(r.BACKBONE), Object.prototype.hasOwnProperty.call(window, "Ember") && e.push(r.EMBER), Object.prototype.hasOwnProperty.call(window, "Meteor") && e.push(r.METEOR), Object.prototype.hasOwnProperty.call(window, "Zepto") && e.push(r.ZEPTO), Object.prototype.hasOwnProperty.call(window, "jQuery") && e.push(r.JQUERY), Object.prototype.hasOwnProperty.call(window, "MooTools") && e.push(r.MOOTOOLS), Object.prototype.hasOwnProperty.call(window, "qwikevents") && e.push(r.QWIK), x() && e.push(r.ELECTRON);
33
+ } catch {
34
+ }
35
+ return e;
36
+ }
37
+ function C() {
38
+ try {
39
+ return Object.prototype.hasOwnProperty.call(window, "React") || Object.prototype.hasOwnProperty.call(window, "ReactDOM") || Object.prototype.hasOwnProperty.call(window, "ReactRedux") || document.querySelector("[data-reactroot], [data-reactid]") || (() => {
40
+ const e = document.querySelectorAll("body > div");
41
+ for (let t = 0; t < e.length; t++)
42
+ if (Object.prototype.hasOwnProperty.call(e[t], "_reactRootContainer"))
43
+ return !0;
44
+ })();
45
+ } catch {
46
+ return !1;
47
+ }
48
+ }
49
+ function N() {
50
+ try {
51
+ return Object.prototype.hasOwnProperty.call(window, "next") && Object.prototype.hasOwnProperty.call(window.next, "version");
52
+ } catch {
53
+ return !1;
54
+ }
55
+ }
56
+ function v() {
57
+ try {
58
+ return Object.prototype.hasOwnProperty.call(window, "Vue");
59
+ } catch {
60
+ return !1;
61
+ }
62
+ }
63
+ function L() {
64
+ try {
65
+ return Object.prototype.hasOwnProperty.call(window, "$nuxt") && Object.prototype.hasOwnProperty.call(window.$nuxt, "nuxt");
66
+ } catch {
67
+ return !1;
68
+ }
69
+ }
70
+ function j() {
71
+ try {
72
+ return Object.prototype.hasOwnProperty.call(window, "ng") || document.querySelector("[ng-version]");
73
+ } catch {
74
+ return !1;
75
+ }
76
+ }
77
+ function U() {
78
+ try {
79
+ return document.querySelector("[ng-server-context]");
80
+ } catch {
81
+ return !1;
82
+ }
83
+ }
84
+ function k() {
85
+ try {
86
+ return Object.prototype.hasOwnProperty.call(window, "__svelte");
87
+ } catch {
88
+ return !1;
89
+ }
90
+ }
91
+ function G() {
92
+ try {
93
+ return !!Object.keys(window).find((e) => e.startsWith("__sveltekit"));
94
+ } catch {
95
+ return !1;
96
+ }
97
+ }
98
+ function I() {
99
+ try {
100
+ return Object.prototype.hasOwnProperty.call(window, "preact");
101
+ } catch {
102
+ return !1;
103
+ }
104
+ }
105
+ function _() {
106
+ try {
107
+ return document.querySelector('script[type="__PREACT_CLI_DATA__"]');
108
+ } catch {
109
+ return !1;
110
+ }
111
+ }
112
+ function D() {
113
+ try {
114
+ return Object.prototype.hasOwnProperty.call(window, "angular") || document.querySelector(".ng-binding, [ng-app], [data-ng-app], [ng-controller], [data-ng-controller], [ng-repeat], [data-ng-repeat]") || document.querySelector('script[src*="angular.js"], script[src*="angular.min.js"]');
115
+ } catch {
116
+ return !1;
117
+ }
118
+ }
119
+ function x() {
120
+ try {
121
+ return typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Electron") >= 0;
122
+ } catch {
123
+ return !1;
124
+ }
125
+ }
126
+ class F extends M {
127
+ constructor(t) {
128
+ var i;
129
+ super(t, l), this.harvestOpts.aggregatorTypes = ["cm", "sm"], this.agentNonce = n && ((i = document.currentScript) == null ? void 0 : i.nonce), this.waitForFlags(["err"]).then(([o]) => {
130
+ o ? (this.singleChecks(), this.eachSessionChecks(), this.drain()) : (this.blocked = !0, this.deregisterDrain());
131
+ }), d(S, this.storeSupportabilityMetrics.bind(this), this.featureName, this.ee), d(O, this.storeEventMetrics.bind(this), this.featureName, this.ee);
132
+ }
133
+ preHarvestChecks(t) {
134
+ return this.drained && t.isFinalHarvest;
135
+ }
136
+ // only allow any metrics to be sent after we get the right RUM flag and only on EoL
137
+ storeSupportabilityMetrics(t, i) {
138
+ if (this.blocked) return;
139
+ const o = b, s = {
140
+ name: t
141
+ };
142
+ this.events.addMetric(o, t, s, i);
143
+ }
144
+ storeEventMetrics(t, i) {
145
+ if (this.blocked) return;
146
+ const o = E, s = {
147
+ name: t
148
+ };
149
+ this.events.add([o, t, s, i]);
150
+ }
151
+ singleChecks() {
152
+ const {
153
+ distMethod: t,
154
+ loaderType: i
155
+ } = this.agentRef.runtime, {
156
+ proxy: o,
157
+ privacy: s
158
+ } = this.agentRef.init;
159
+ if (i && this.storeSupportabilityMetrics("Generic/LoaderType/".concat(i, "/Detected")), t && this.storeSupportabilityMetrics("Generic/DistMethod/".concat(t, "/Detected")), n ? (this.storeSupportabilityMetrics("Generic/Runtime/Browser/Detected"), this.agentNonce && this.agentNonce !== "" && this.storeSupportabilityMetrics("Generic/Runtime/Nonce/Detected"), g(() => {
160
+ P().forEach((c) => {
161
+ this.storeSupportabilityMetrics("Framework/" + c + "/Detected");
162
+ });
163
+ }), s.cookies_enabled || this.storeSupportabilityMetrics("Config/SessionTracking/Disabled")) : R ? this.storeSupportabilityMetrics("Generic/Runtime/Worker/Detected") : this.storeSupportabilityMetrics("Generic/Runtime/Unknown/Detected"), m() && this.storeSupportabilityMetrics("Generic/FileProtocol/Detected"), this.obfuscator.obfuscateConfigRules.length > 0 && this.storeSupportabilityMetrics("Generic/Obfuscate/Detected"), o.assets && this.storeSupportabilityMetrics("Config/AssetsUrl/Changed"), o.beacon && this.storeSupportabilityMetrics("Config/BeaconUrl/Changed"), n && window.MutationObserver) {
164
+ T(window) && this.storeSupportabilityMetrics("Generic/Runtime/IFrame/Detected");
165
+ const c = window.document.querySelectorAll("video").length;
166
+ c && this.storeSupportabilityMetrics("Generic/VideoElement/Added", c);
167
+ const a = window.document.querySelectorAll("iframe").length;
168
+ a && this.storeSupportabilityMetrics("Generic/IFrame/Added", a), new MutationObserver((h) => {
169
+ h.forEach((f) => {
170
+ f.addedNodes.forEach((p) => {
171
+ p instanceof HTMLVideoElement && this.storeSupportabilityMetrics("Generic/VideoElement/Added", 1), p instanceof HTMLIFrameElement && this.storeSupportabilityMetrics("Generic/IFrame/Added", 1);
172
+ });
173
+ });
174
+ }).observe(window.document.body, {
175
+ childList: !0,
176
+ subtree: !0
177
+ });
178
+ }
179
+ navigator.webdriver && this.storeSupportabilityMetrics("Generic/WebDriver/Detected");
180
+ }
181
+ eachSessionChecks() {
182
+ n && A("pageshow", (t) => {
183
+ t != null && t.persisted && this.storeSupportabilityMetrics("Generic/BFCache/PageRestored");
184
+ });
185
+ }
186
+ }
187
+ u(F, "featureName", l);
188
+ export {
189
+ F as Aggregate
190
+ };
Binary file