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,830 @@
1
+ var ge = Object.defineProperty;
2
+ var te = (s) => {
3
+ throw TypeError(s);
4
+ };
5
+ var ve = (s, e, t) => e in s ? ge(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
+ var se = (s, e, t) => ve(s, typeof e != "symbol" ? e + "" : e, t), _ = (s, e, t) => e.has(s) || te("Cannot " + t);
7
+ var o = (s, e, t) => (_(s, e, "read from private field"), t ? t.call(s) : e.get(s)), l = (s, e, t) => e.has(s) ? te("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), S = (s, e, t, r) => (_(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t), d = (s, e, t) => (_(s, e, "access private method"), t);
8
+ import { B as D, r as B, v as pe, ao as ae, ap as z, i as ne, $ as me, h as P, t as K, aq as ye, ar as Se, as as be, N as Ee, at as xe, au as ke, av as we, z as De, aw as Oe, D as oe, y as M, S as ce, ax as Re, ay as Te, W as Me, az as Ce, aA as Ae } from "./main-DPldah1M.js";
9
+ function Ne() {
10
+ var s, e;
11
+ return ((e = (s = D) == null ? void 0 : s.location) == null ? void 0 : e.protocol) === "file:";
12
+ }
13
+ class Be {
14
+ constructor(e) {
15
+ this.agentRef = e, this.warnedRegexMissing = !1, this.warnedInvalidRegex = !1, this.warnedInvalidReplacement = !1;
16
+ }
17
+ get obfuscateConfigRules() {
18
+ return this.agentRef.init.obfuscate || [];
19
+ }
20
+ /**
21
+ * Applies all valid obfuscation rules to the provided input string
22
+ * @param {string} input String to obfuscate
23
+ * @returns {string}
24
+ */
25
+ obfuscateString(e) {
26
+ if (typeof e != "string" || e.trim().length === 0) return e;
27
+ const t = this.obfuscateConfigRules.map((r) => this.validateObfuscationRule(r));
28
+ return Ne() && t.push({
29
+ regex: /^file:\/\/(.*)/,
30
+ replacement: atob("ZmlsZTovL09CRlVTQ0FURUQ=")
31
+ }), t.filter((r) => r.isValid).reduce((r, a) => {
32
+ const {
33
+ rule: i
34
+ } = a;
35
+ return r.replace(i.regex, i.replacement || "*");
36
+ }, e);
37
+ }
38
+ /**
39
+ * Validates an obfuscation rule and provides errors if any are found.
40
+ * @param {ObfuscationRule} rule The rule to validate
41
+ * @returns {ObfuscationRuleValidation} The validation state of the rule
42
+ */
43
+ validateObfuscationRule(e) {
44
+ const t = e.regex === void 0, r = e.regex !== void 0 && typeof e.regex != "string" && !(e.regex instanceof RegExp), a = !!(e.replacement && typeof e.replacement != "string");
45
+ return t && !this.warnedRegexMissing ? (B(12, e), this.warnedRegexMissing = !0) : r && !this.warnedInvalidRegex && (B(13, e), this.warnedInvalidRegex = !0), a && !this.warnedInvalidReplacement && (B(14, e), this.warnedInvalidReplacement = !0), {
46
+ rule: e,
47
+ isValid: !t && !r && !a,
48
+ errors: {
49
+ regexMissingDetected: t,
50
+ invalidRegexDetected: r,
51
+ invalidReplacementDetected: a
52
+ }
53
+ };
54
+ }
55
+ }
56
+ const ot = 64e3, He = 1e6, O = "NR_CONTAINER_AGENT";
57
+ var g, b;
58
+ class re {
59
+ /**
60
+ * @param {object} agentRef - reference to base agent class
61
+ * @param {EventBuffer|EventAggregator} storageClass - the type of storage to use in this manager; 'EventBuffer' (1), 'EventAggregator' (2)
62
+ * @param {string} [defaultEntityGuid] - the entity guid to use as the default storage instance; if not provided, a new one is created
63
+ * @param {string} featureName - the name of the feature this manager is for; used for event dispatching
64
+ */
65
+ constructor(e, t, r, a) {
66
+ l(this, g);
67
+ this.agentRef = e, this.entityManager = e.runtime.entityManager, this.StorageClass = t, this.appStorageMap = /* @__PURE__ */ new Map([[O, new this.StorageClass()]]), this.featureName = a, this.setEventStore(r);
68
+ }
69
+ setEventStore(e) {
70
+ if (!e) return;
71
+ const t = pe(this.entityManager.get(e), this.agentRef) ? this.appStorageMap.get(O) : new this.StorageClass();
72
+ this.appStorageMap.set(e, t);
73
+ }
74
+ // This class must contain an union of all methods from all supported storage classes and conceptualize away the target app argument.
75
+ /**
76
+ * Calls the isEmpty method on the underlying storage class. If target is provided, runs just for the target, otherwise runs for all apps.
77
+ * @param {object} optsIfPresent - exists if called during harvest interval, @see AggregateBase.makeHarvestPayload
78
+ * @param {object} target - specific app's storage to check; if not provided, this method takes into account all apps recorded by this manager
79
+ * @returns {boolean} True if the target's storage is empty, or target does not exist in map (defaults to all storages)
80
+ */
81
+ isEmpty(e, t) {
82
+ if (t) return d(this, g, b).call(this, t).isEmpty(e);
83
+ for (const r of this.appStorageMap.values())
84
+ if (!r.isEmpty(e)) return !1;
85
+ return !0;
86
+ }
87
+ /**
88
+ * Calls the add method on the underlying storage class.
89
+ * @param {string} event - the event element to store
90
+ * @param {object} targetEntityGuid - the entity guid lookup to store event under; if not provided, this method adds to the default
91
+ * @returns {boolean} True if the event was successfully added
92
+ */
93
+ add(e, t) {
94
+ var r;
95
+ return ae({
96
+ agentIdentifier: this.agentRef.agentIdentifier,
97
+ drained: !!((r = z) != null && r[this.agentRef.agentIdentifier]),
98
+ type: "data",
99
+ name: "buffer",
100
+ feature: this.featureName,
101
+ data: e
102
+ }), d(this, g, b).call(this, t).add(e);
103
+ }
104
+ /** This is only used by the Metrics feature which has no need to add metric under a different app atm. */
105
+ addMetric(e, t, r, a) {
106
+ return d(this, g, b).call(this).addMetric(e, t, r, a);
107
+ }
108
+ /**
109
+ * Calls the get method on the underlying storage class. If target is provided, runs just for the target, otherwise runs for all apps.
110
+ * @param {object=} opts - exists if called during harvest interval, @see AggregateBase.makeHarvestPayload
111
+ * @param {object=} target - specific app to fetch; if not provided, this method fetches from all apps
112
+ * @returns {Array} Objects of `data` labeled with their respective `target` app to be sent to
113
+ */
114
+ get(e, t) {
115
+ if (t) return [{
116
+ targetApp: this.entityManager.get(t),
117
+ data: d(this, g, b).call(this, t).get(e)
118
+ }];
119
+ const r = [];
120
+ return this.appStorageMap.forEach((a, i) => {
121
+ if (i === O) return;
122
+ const n = this.entityManager.get(i);
123
+ n && r.push({
124
+ targetApp: n,
125
+ data: a.get(e)
126
+ });
127
+ }), r;
128
+ }
129
+ /**
130
+ * Calls the byteSize method on the underlying storage class
131
+ * @param {*} targetEntityGuid
132
+ * @returns
133
+ */
134
+ byteSize(e) {
135
+ return d(this, g, b).call(this, e).byteSize();
136
+ }
137
+ /**
138
+ * Calls the wouldExceedMaxSize method on the underlying storage class
139
+ * @param {*} incomingSize
140
+ * @param {*} targetEntityGuid
141
+ * @returns
142
+ */
143
+ wouldExceedMaxSize(e, t) {
144
+ return d(this, g, b).call(this, t).wouldExceedMaxSize(e);
145
+ }
146
+ /**
147
+ * Calls the save method on the underlying storage class. If target is provided, runs just for the target, otherwise runs for all apps.
148
+ * @param {*} optsIfPresent
149
+ * @param {*} targetEntityGuid
150
+ * @returns
151
+ */
152
+ save(e, t) {
153
+ if (t) return d(this, g, b).call(this, t).save(e);
154
+ this.appStorageMap.forEach((r) => r.save(e));
155
+ }
156
+ /**
157
+ * Calls the clear method on the underlying storage class. If target is provided, runs just for the target, otherwise runs for all apps.
158
+ * @param {*} optsIfPresent
159
+ * @param {*} targetEntityGuid
160
+ * @returns
161
+ */
162
+ clear(e, t) {
163
+ if (t) return d(this, g, b).call(this, t).clear(e);
164
+ this.appStorageMap.forEach((r) => r.clear(e));
165
+ }
166
+ // Unlike the methods above, the following will have a target as they are called by AggregateBase.postHarvestCleanup callback on harvest finish after getting & sending the data.
167
+ reloadSave(e, t) {
168
+ return d(this, g, b).call(this, t).reloadSave(e);
169
+ }
170
+ clearSave(e, t) {
171
+ return d(this, g, b).call(this, t).clearSave(e);
172
+ }
173
+ }
174
+ g = new WeakSet(), /**
175
+ * Always returns a storage instance. Creates one if one does not exist. If a lookup is not provided, uses the DEFAULT namespace
176
+ * @param {string=} targetEntityGuid the lookup
177
+ * @returns {*} ALWAYS returns a storage instance
178
+ */
179
+ b = function(e = O) {
180
+ return this.appStorageMap.has(e) || this.setEventStore(e), this.appStorageMap.get(e);
181
+ };
182
+ if (P) {
183
+ D.cleanupTasks = [];
184
+ const s = D.close;
185
+ D.close = () => {
186
+ for (let e of D.cleanupTasks)
187
+ e();
188
+ s();
189
+ };
190
+ }
191
+ function Fe(s, e) {
192
+ ne ? me(s, !0, e) : P && D.cleanupTasks.push(s);
193
+ }
194
+ var je = /([^?#]*)[^#]*(#[^?]*|$).*/, ze = /([^?#]*)().*/;
195
+ function Pe(s, e) {
196
+ return s.replace(e ? je : ze, "$1$2");
197
+ }
198
+ var he = {
199
+ "%2C": ",",
200
+ "%3A": ":",
201
+ "%2F": "/",
202
+ "%40": "@",
203
+ "%24": "$",
204
+ "%3B": ";"
205
+ }, Ie = Object.keys(he), Le = new RegExp(Ie.join("|"), "g");
206
+ function Ue(s) {
207
+ return he[s];
208
+ }
209
+ function q(s) {
210
+ return s == null ? "null" : encodeURIComponent(s).replace(Le, Ue);
211
+ }
212
+ function _e(s, e) {
213
+ var t = 0, r = "";
214
+ return Object.entries(s || {}).forEach(([a, i]) => {
215
+ var n = [], c, h;
216
+ if (typeof i == "string" || !Array.isArray(i) && i !== null && i !== void 0 && i.toString().length)
217
+ c = "&" + a + "=" + q(i), t += c.length, r += c;
218
+ else if (Array.isArray(i) && i.length) {
219
+ for (t += 9, h = 0; h < i.length && (c = q(K(i[h])), t += c.length, !(typeof e < "u" && t >= e)); h++)
220
+ n.push(c);
221
+ r += "&" + a + "=%5B" + n.join(",") + "%5D";
222
+ }
223
+ }), r;
224
+ }
225
+ function k(s, e, t = {}) {
226
+ return Object.keys(t).includes(s) ? "" : e && typeof e == "string" ? "&" + s + "=" + q(e) : "";
227
+ }
228
+ function qe({
229
+ isFinalHarvest: s = !1
230
+ } = {}) {
231
+ return s && ne ? Ve : typeof XMLHttpRequest < "u" ? I : V;
232
+ }
233
+ function V({
234
+ url: s,
235
+ body: e = null,
236
+ method: t = "POST",
237
+ headers: r = [{
238
+ key: "content-type",
239
+ value: "text/plain"
240
+ }]
241
+ }) {
242
+ const a = {};
243
+ for (const i of r)
244
+ a[i.key] = i.value;
245
+ return fetch(s, {
246
+ headers: a,
247
+ method: t,
248
+ body: e,
249
+ credentials: "include"
250
+ });
251
+ }
252
+ function I({
253
+ url: s,
254
+ body: e = null,
255
+ sync: t,
256
+ method: r = "POST",
257
+ headers: a = [{
258
+ key: "content-type",
259
+ value: "text/plain"
260
+ }]
261
+ }) {
262
+ const i = new XMLHttpRequest();
263
+ i.open(r, s, !t);
264
+ try {
265
+ "withCredentials" in i && (i.withCredentials = !0);
266
+ } catch {
267
+ }
268
+ return a.forEach((n) => {
269
+ i.setRequestHeader(n.key, n.value);
270
+ }), i.send(e), i;
271
+ }
272
+ function Ve({
273
+ url: s,
274
+ body: e
275
+ }) {
276
+ try {
277
+ return window.navigator.sendBeacon.bind(window.navigator)(s, e);
278
+ } catch {
279
+ return !1;
280
+ }
281
+ }
282
+ const Ye = "Harvester/Retry/Failed/", Ke = "Harvester/Retry/Succeeded/";
283
+ var H;
284
+ class We {
285
+ constructor(e) {
286
+ l(this, H, !1);
287
+ se(this, "initializedAggregates", []);
288
+ this.agentRef = e, Fe(() => {
289
+ this.initializedAggregates.forEach((t) => {
290
+ typeof t.harvestOpts.beforeUnload == "function" && t.harvestOpts.beforeUnload();
291
+ }), this.initializedAggregates.forEach((t) => this.triggerHarvestFor(t, {
292
+ isFinalHarvest: !0
293
+ }));
294
+ }, !1);
295
+ }
296
+ startTimer(e = this.agentRef.init.harvest.interval) {
297
+ if (o(this, H)) return;
298
+ S(this, H, !0);
299
+ const t = () => {
300
+ this.initializedAggregates.forEach((r) => this.triggerHarvestFor(r)), setTimeout(t, e * 1e3);
301
+ };
302
+ setTimeout(t, e * 1e3);
303
+ }
304
+ /**
305
+ * Given a feature (aggregate), execute a harvest on-demand.
306
+ * @param {object} aggregateInst
307
+ * @param {object} localOpts
308
+ * @returns {boolean} True if 1+ network call was made. Note that this does not mean or guarantee that it was successful (or that all were in the case of more than 1).
309
+ */
310
+ triggerHarvestFor(e, t = {}) {
311
+ if (e.blocked) return !1;
312
+ const r = qe(t);
313
+ if (!r) return !1;
314
+ const a = !t.isFinalHarvest && r === I;
315
+ let i, n = !1;
316
+ if (t.directSend)
317
+ i = [t.directSend];
318
+ else if (i = e.makeHarvestPayload(a, t), !i) return !1;
319
+ return i.forEach(({
320
+ targetApp: h,
321
+ payload: u
322
+ }) => {
323
+ u && ($e(this.agentRef, {
324
+ endpoint: ye[e.featureName],
325
+ targetApp: h,
326
+ payload: u,
327
+ localOpts: t,
328
+ submitMethod: r,
329
+ cbFinished: c,
330
+ raw: e.harvestOpts.raw,
331
+ featureName: e.featureName
332
+ }), n = !0);
333
+ }), n;
334
+ function c(h) {
335
+ e.harvestOpts.prevAttemptCode && (oe(ce, [(h.retry ? Ye : Ke) + e.harvestOpts.prevAttemptCode], void 0, M.metrics, e.ee), delete e.harvestOpts.prevAttemptCode), h.retry && (e.harvestOpts.prevAttemptCode = h.status), t.forceNoRetry && (h.retry = !1), e.postHarvestCleanup(h);
336
+ }
337
+ }
338
+ }
339
+ H = new WeakMap();
340
+ const ie = {};
341
+ function $e(s, {
342
+ endpoint: e,
343
+ targetApp: t,
344
+ payload: r,
345
+ localOpts: a = {},
346
+ submitMethod: i,
347
+ cbFinished: n,
348
+ raw: c,
349
+ featureName: h
350
+ }) {
351
+ var Q, G;
352
+ if (!s.info.errorBeacon) return !1;
353
+ let {
354
+ body: u,
355
+ qs: v
356
+ } = Xe(r);
357
+ if (Object.keys(u).length === 0 && !a.sendEmptyBody)
358
+ return n && n({
359
+ sent: !1,
360
+ targetApp: t
361
+ }), !1;
362
+ const f = s.init.ssl === !1 ? "http" : "https", N = s.init.proxy.beacon || s.info.errorBeacon, de = c ? "".concat(f, "://").concat(N, "/").concat(e) : "".concat(f, "://").concat(N).concat(e !== Se ? "/" + e : "", "/1/").concat(t.licenseKey), W = c ? "" : Ze(s, v, e, t.applicationID);
363
+ let F = _e(v, s.runtime.maxBytes);
364
+ W === "" && F.startsWith("&") && (F = F.substring(1));
365
+ const U = "".concat(de, "?").concat(W).concat(F);
366
+ !!((Q = v == null ? void 0 : v.attributes) != null && Q.includes("gzip")) || (e !== be && (u = K(u)), u.length > 75e4 && (ie[e] = (ie[e] || 0) + 1) === 1 && B(28, e)), (!u || u.length === 0 || u === "{}" || u === "[]") && (u = "");
367
+ const $ = [{
368
+ key: "content-type",
369
+ value: "text/plain"
370
+ }];
371
+ let X = i({
372
+ url: U,
373
+ body: u,
374
+ sync: a.isFinalHarvest && P,
375
+ headers: $
376
+ });
377
+ return !a.isFinalHarvest && n && (i === I ? X.addEventListener("loadend", function() {
378
+ const p = {
379
+ sent: this.status !== 0,
380
+ status: this.status,
381
+ retry: Z(this.status),
382
+ fullUrl: U,
383
+ xhr: this,
384
+ targetApp: t
385
+ };
386
+ a.needResponse && (p.responseText = this.responseText), n(p);
387
+ }, Ee(!1)) : i === V && X.then(async function(p) {
388
+ const J = p.status, ee = {
389
+ sent: !0,
390
+ status: J,
391
+ retry: Z(J),
392
+ fullUrl: U,
393
+ fetchResponse: p,
394
+ targetApp: t
395
+ };
396
+ a.needResponse && (ee.responseText = await p.text()), n(ee);
397
+ })), ae({
398
+ agentIdentifier: s.agentIdentifier,
399
+ drained: !!((G = z) != null && G[s.agentIdentifier]),
400
+ type: "data",
401
+ name: "harvest",
402
+ feature: h,
403
+ data: {
404
+ endpoint: e,
405
+ headers: $,
406
+ targetApp: t,
407
+ payload: r,
408
+ submitMethod: le(),
409
+ raw: c,
410
+ synchronousXhr: !!(a.isFinalHarvest && P)
411
+ }
412
+ }), !0;
413
+ function Z(p) {
414
+ switch (p) {
415
+ case 408:
416
+ case 429:
417
+ case 500:
418
+ return !0;
419
+ }
420
+ return p >= 502 && p <= 504 || p >= 512 && p <= 530;
421
+ }
422
+ function le() {
423
+ return i === I ? "xhr" : i === V ? "fetch" : "beacon";
424
+ }
425
+ }
426
+ function Xe(s = {}) {
427
+ const e = (t) => typeof Uint8Array < "u" && t instanceof Uint8Array || Array.isArray(t) ? t : typeof t == "string" ? t.length > 0 ? t : null : Object.entries(t || {}).reduce((r, [a, i]) => ((typeof i == "number" || typeof i == "string" && i.length > 0 || typeof i == "object" && Object.keys(i || {}).length > 0) && (r[a] = i), r), {});
428
+ return {
429
+ body: e(s.body),
430
+ qs: e(s.qs)
431
+ };
432
+ }
433
+ function Ze(s, e, t, r) {
434
+ var u, v, f;
435
+ const a = s.runtime.obfuscator.obfuscateString(Pe("" + D.location)), i = ((u = s.runtime.session) == null ? void 0 : u.state.sessionReplayMode) === 1 && t !== xe, n = ((v = s.runtime.session) == null ? void 0 : v.state.sessionTraceMode) === 1 && ![ke, we].includes(t), c = [
436
+ "a=" + r,
437
+ k("sa", s.info.sa ? "" + s.info.sa : ""),
438
+ k("v", Oe),
439
+ h(),
440
+ k("ct", s.runtime.customTransaction),
441
+ "&rst=" + De(),
442
+ "&ck=0",
443
+ // ck param DEPRECATED - still expected by backend
444
+ "&s=" + (((f = s.runtime.session) == null ? void 0 : f.state.value) || "0"),
445
+ // the 0 id encaps all untrackable and default traffic
446
+ k("ref", a),
447
+ k("ptid", s.runtime.ptid ? "" + s.runtime.ptid : "")
448
+ ];
449
+ return i && c.push(k("hr", "1", e)), n && c.push(k("ht", "1", e)), c.join("");
450
+ function h() {
451
+ return s.info.transactionName ? k("to", s.info.transactionName) : k("t", s.info.tNamePlain || "Unnamed Transaction");
452
+ }
453
+ }
454
+ var w, E;
455
+ class Qe {
456
+ constructor(e) {
457
+ l(this, w, /* @__PURE__ */ new Map());
458
+ l(this, E, {});
459
+ this.agentRef = e, o(this, w).set(O, {
460
+ licenseKey: e.info.licenseKey,
461
+ applicationID: e.info.applicationID
462
+ });
463
+ }
464
+ get(e = O) {
465
+ return o(this, w).get(e);
466
+ }
467
+ getEntityGuidFor(e, t) {
468
+ if (!(!o(this, E)[e] || !o(this, E)[t]))
469
+ return o(this, E)[e].filter((r) => o(this, E)[t].includes(r))[0];
470
+ }
471
+ set(e, t) {
472
+ var r, a, i, n;
473
+ o(this, w).has(e) || (o(this, w).set(e, t), (r = o(this, E))[a = t.licenseKey] ?? (r[a] = []), o(this, E)[t.licenseKey].push(e), (i = o(this, E))[n = t.applicationID] ?? (i[n] = []), o(this, E)[t.applicationID].push(e), this.agentRef.ee.emit("entity-added", [t]));
474
+ }
475
+ clear() {
476
+ o(this, w).clear();
477
+ }
478
+ setDefaultEntity(e) {
479
+ o(this, w).set(O, e);
480
+ }
481
+ }
482
+ w = new WeakMap(), E = new WeakMap();
483
+ var x, m, R, T;
484
+ class Ge {
485
+ /**
486
+ * @param {number} maxPayloadSize
487
+ */
488
+ constructor(e = He) {
489
+ l(this, x, []);
490
+ l(this, m, 0);
491
+ l(this, R);
492
+ l(this, T);
493
+ this.maxPayloadSize = e;
494
+ }
495
+ isEmpty() {
496
+ return o(this, x).length === 0;
497
+ }
498
+ get() {
499
+ return o(this, x);
500
+ }
501
+ byteSize() {
502
+ return o(this, m);
503
+ }
504
+ wouldExceedMaxSize(e) {
505
+ return o(this, m) + e > this.maxPayloadSize;
506
+ }
507
+ /**
508
+ * Add feature-processed event to our buffer. If this event would cause our total raw size to exceed the set max payload size, it is dropped.
509
+ * @param {any} event - any primitive type or object
510
+ * @returns {Boolean} true if successfully added; false otherwise
511
+ */
512
+ add(e) {
513
+ var r;
514
+ const t = ((r = K(e)) == null ? void 0 : r.length) || 0;
515
+ return o(this, m) + t > this.maxPayloadSize ? !1 : (o(this, x).push(e), S(this, m, o(this, m) + t), !0);
516
+ }
517
+ /**
518
+ * Wipes the main buffer
519
+ */
520
+ clear() {
521
+ S(this, x, []), S(this, m, 0);
522
+ }
523
+ /**
524
+ * Backup the buffered data and clear the main buffer
525
+ */
526
+ save() {
527
+ S(this, R, o(this, x)), S(this, T, o(this, m));
528
+ }
529
+ /**
530
+ * Wipes the backup buffer
531
+ */
532
+ clearSave() {
533
+ S(this, R, void 0), S(this, T, void 0);
534
+ }
535
+ /**
536
+ * Prepend the backup buffer back into the main buffer
537
+ */
538
+ reloadSave() {
539
+ o(this, R) && (o(this, T) + o(this, m) > this.maxPayloadSize || (S(this, x, [...o(this, R), ...o(this, x)]), S(this, m, o(this, T) + o(this, m))));
540
+ }
541
+ }
542
+ x = new WeakMap(), m = new WeakMap(), R = new WeakMap(), T = new WeakMap();
543
+ var C, j;
544
+ class Je {
545
+ constructor() {
546
+ l(this, C);
547
+ this.aggregatedData = {};
548
+ }
549
+ // Items with the same type and name get aggregated together
550
+ // params are example data from the aggregated items
551
+ // metrics are the numeric values to be aggregated
552
+ store(e, t, r, a, i) {
553
+ var n = d(this, C, j).call(this, e, t, r, i);
554
+ return n.metrics = et(a, n.metrics), n;
555
+ }
556
+ merge(e, t, r, a, i, n = !1) {
557
+ var c = d(this, C, j).call(this, e, t, a, i);
558
+ if (n && (c.params = a), !c.metrics) {
559
+ c.metrics = r;
560
+ return;
561
+ }
562
+ var h = c.metrics;
563
+ h.count += r.count, Object.keys(r || {}).forEach((u) => {
564
+ if (u !== "count") {
565
+ var v = h[u], f = r[u];
566
+ f && !f.c ? h[u] = Y(f.t, v) : h[u] = st(f, h[u]);
567
+ }
568
+ });
569
+ }
570
+ storeMetric(e, t, r, a) {
571
+ var i = d(this, C, j).call(this, e, t, r);
572
+ return i.stats = Y(a, i.stats), i;
573
+ }
574
+ // Get all listed types buckets and it deletes the retrieved content from the aggregatedData
575
+ take(e, t = !0) {
576
+ for (var r = {}, a = "", i = !1, n = 0; n < e.length; n++)
577
+ a = e[n], r[a] = Object.values(this.aggregatedData[a] || {}), r[a].length && (i = !0), t && delete this.aggregatedData[a];
578
+ return i ? r : null;
579
+ }
580
+ }
581
+ C = new WeakSet(), j = function(e, t, r, a) {
582
+ this.aggregatedData[e] || (this.aggregatedData[e] = {});
583
+ var i = this.aggregatedData[e][t];
584
+ return i || (i = this.aggregatedData[e][t] = {
585
+ params: r || {}
586
+ }, a && (i.custom = a)), i;
587
+ };
588
+ function et(s, e) {
589
+ return e || (e = {
590
+ count: 0
591
+ }), e.count += 1, Object.entries(s || {}).forEach(([t, r]) => {
592
+ e[t] = Y(r, e[t]);
593
+ }), e;
594
+ }
595
+ function Y(s, e) {
596
+ return s == null ? tt(e) : e ? (e.c || (e = ue(e.t)), e.c += 1, e.t += s, e.sos += s * s, s > e.max && (e.max = s), s < e.min && (e.min = s), e) : {
597
+ t: s
598
+ };
599
+ }
600
+ function tt(s) {
601
+ return s ? s.c++ : s = {
602
+ c: 1
603
+ }, s;
604
+ }
605
+ function st(s, e) {
606
+ return e ? (e.c || (e = ue(e.t)), e.min = Math.min(s.min, e.min), e.max = Math.max(s.max, e.max), e.t += s.t, e.sos += s.sos, e.c += s.c, e) : s;
607
+ }
608
+ function ue(s) {
609
+ return {
610
+ t: s,
611
+ min: s,
612
+ max: s,
613
+ sos: s * s,
614
+ c: 1
615
+ };
616
+ }
617
+ var y, A;
618
+ class rt {
619
+ constructor() {
620
+ l(this, y, new Je());
621
+ l(this, A, {});
622
+ }
623
+ isEmpty({
624
+ aggregatorTypes: e
625
+ }) {
626
+ return e ? e.every((t) => !o(this, y).aggregatedData[t]) : Object.keys(o(this, y).aggregatedData).length === 0;
627
+ }
628
+ add([e, t, r, a, i]) {
629
+ return o(this, y).store(e, t, r, a, i), !0;
630
+ }
631
+ addMetric(e, t, r, a) {
632
+ return o(this, y).storeMetric(e, t, r, a), !0;
633
+ }
634
+ save({
635
+ aggregatorTypes: e
636
+ }) {
637
+ const t = e.toString(), r = {};
638
+ e.forEach((a) => r[a] = o(this, y).aggregatedData[a]), o(this, A)[t] = r;
639
+ }
640
+ get(e) {
641
+ const t = Array.isArray(e) ? e : e.aggregatorTypes;
642
+ return o(this, y).take(t, !1);
643
+ }
644
+ clear({
645
+ aggregatorTypes: e
646
+ } = {}) {
647
+ if (!e) {
648
+ o(this, y).aggregatedData = {};
649
+ return;
650
+ }
651
+ e.forEach((t) => delete o(this, y).aggregatedData[t]);
652
+ }
653
+ reloadSave({
654
+ aggregatorTypes: e
655
+ }) {
656
+ const t = e.toString(), r = o(this, A)[t];
657
+ e.forEach((a) => {
658
+ Object.keys(r[a] || {}).forEach((i) => {
659
+ const n = r[a][i];
660
+ o(this, y).merge(a, i, n.metrics, n.params, n.custom, !0);
661
+ });
662
+ });
663
+ }
664
+ clearSave({
665
+ aggregatorTypes: e
666
+ }) {
667
+ const t = e.toString();
668
+ delete o(this, A)[t];
669
+ }
670
+ }
671
+ y = new WeakMap(), A = new WeakMap();
672
+ var L, fe;
673
+ class ct extends Re {
674
+ /**
675
+ * Create an AggregateBase instance.
676
+ * @param {Object} agentRef The reference to the agent instance.
677
+ * @param {string} featureName The name of the feature creating the instance.
678
+ */
679
+ constructor(t, r) {
680
+ var i, n, c, h, u;
681
+ super(t.agentIdentifier, r);
682
+ l(this, L);
683
+ this.agentRef = t, this.checkConfiguration(t), this.doOnceForAllAggregate(t), this.harvestOpts = {};
684
+ const a = (u = (h = (c = (n = (i = this.agentRef) == null ? void 0 : i.runtime) == null ? void 0 : n.appMetadata) == null ? void 0 : c.agents) == null ? void 0 : h[0]) == null ? void 0 : u.entityGuid;
685
+ d(this, L, fe).call(this, a), a || this.ee.on("entity-added", (v) => {
686
+ var f, N;
687
+ (N = (f = this.events) == null ? void 0 : f.setEventStore) == null || N.call(f, v.entityGuid);
688
+ });
689
+ }
690
+ /**
691
+ * New handler for waiting for multiple flags. Useful when expecting multiple flags simultaneously (ex. stn vs sr)
692
+ * @param {string[]} flagNames
693
+ * @returns {Promise}
694
+ */
695
+ waitForFlags(t = []) {
696
+ return new Promise((a, i) => {
697
+ z[this.agentIdentifier] ? a(n(z[this.agentIdentifier])) : this.ee.on("rumresp", (c = {}) => {
698
+ a(n(c));
699
+ });
700
+ function n(c) {
701
+ return t.map((h) => c[h] ? c[h] : 0);
702
+ }
703
+ }).catch((a) => {
704
+ this.ee.emit("internal-error", [a]), this.blocked = !0, this.deregisterDrain();
705
+ });
706
+ }
707
+ /**
708
+ * Stages the feature to be drained
709
+ */
710
+ drain() {
711
+ Te(this.agentIdentifier, this.featureName), this.drained = !0;
712
+ }
713
+ preHarvestChecks(t) {
714
+ return !this.blocked;
715
+ }
716
+ /**
717
+ * Return harvest payload. A "serializer" function can be defined on a derived class to format the payload.
718
+ * @param {Boolean} shouldRetryOnFail - harvester flag to backup payload for retry later if harvest request fails; this should be moved to harvester logic
719
+ * @param {object|undefined} opts - opts passed from the harvester to help form the payload
720
+ * @param {string} opts.targetEntityGuid - the entity guid of the target app
721
+ * @returns {Array} Final payload tagged with their targeting browser app. The value of `payload` can be undefined if there are no pending events for an app. This should be a minimum length of 1.
722
+ */
723
+ makeHarvestPayload(t = !1, r = {}) {
724
+ if (!this.events || this.events.isEmpty(this.harvestOpts, r.targetEntityGuid) || this.preHarvestChecks && !this.preHarvestChecks(r)) return;
725
+ t && this.events.save(this.harvestOpts, r.targetEntityGuid);
726
+ const a = this.events.get(this.harvestOpts, r.targetEntityGuid);
727
+ return a.length ? (this.events.clear(this.harvestOpts, r.targetEntityGuid), a.map(({
728
+ targetApp: i,
729
+ data: n
730
+ }) => {
731
+ const h = {
732
+ body: this.serializer ? this.serializer(n, i == null ? void 0 : i.entityGuid) : n
733
+ };
734
+ return this.queryStringsBuilder && (h.qs = this.queryStringsBuilder(n, i == null ? void 0 : i.entityGuid)), {
735
+ targetApp: i,
736
+ payload: h
737
+ };
738
+ })) : B(52);
739
+ }
740
+ /**
741
+ * Cleanup task after a harvest.
742
+ * @param {object} result - the cbResult object from the harvester's send method
743
+ * @param {object=} result.targetApp - the target app object that was used to point the harvest to the correct app
744
+ * @param {string=} result.targetApp.entityGuid - the entity guid of the target app
745
+ * @param {boolean=} result.sent - whether the harvest was sent successfully
746
+ * @param {boolean=} result.retry - whether the harvest should be retried
747
+ */
748
+ postHarvestCleanup(t = {}) {
749
+ var a, i;
750
+ t.sent && t.retry && this.events.reloadSave(this.harvestOpts, (a = t.targetApp) == null ? void 0 : a.entityGuid), this.events.clearSave(this.harvestOpts, (i = t.targetApp) == null ? void 0 : i.entityGuid);
751
+ }
752
+ /**
753
+ * Checks for additional `jsAttributes` items to support backward compatibility with implementations of the agent where
754
+ * loader configurations may appear after the loader code is executed.
755
+ */
756
+ checkConfiguration(t) {
757
+ var r, a;
758
+ if (!Me(t.info)) {
759
+ const i = Ce();
760
+ let n = {
761
+ ...(r = i.info) == null ? void 0 : r.jsAttributes
762
+ };
763
+ try {
764
+ n = {
765
+ ...n,
766
+ ...(a = t.info) == null ? void 0 : a.jsAttributes
767
+ };
768
+ } catch {
769
+ }
770
+ Ae(t, {
771
+ ...i,
772
+ info: {
773
+ ...i.info,
774
+ jsAttributes: n
775
+ },
776
+ runtime: t.runtime
777
+ }, t.runtime.loaderType);
778
+ }
779
+ }
780
+ /**
781
+ * These are actions related to shared resources that should be initialized once by whichever feature Aggregate subclass loads first.
782
+ * This method should run after checkConfiguration, which may reset the agent's info/runtime object that is used here.
783
+ */
784
+ doOnceForAllAggregate(t) {
785
+ t.runtime.obfuscator || (t.runtime.obfuscator = new Be(t)), this.obfuscator = t.runtime.obfuscator, t.runtime.entityManager || (t.runtime.entityManager = new Qe(this.agentRef)), t.runtime.harvester || (t.runtime.harvester = new We(t));
786
+ }
787
+ /**
788
+ * Report a supportability metric
789
+ * @param {*} metricName The tag of the name matching the Angler aggregation tag
790
+ * @param {*} [value] An optional value to supply. If not supplied, the metric count will be incremented by 1 for every call.
791
+ */
792
+ reportSupportabilityMetric(t, r) {
793
+ oe(ce, [t, r], void 0, M.metrics, this.ee);
794
+ }
795
+ }
796
+ L = new WeakSet(), /**
797
+ * sets up the event store for the feature. It must wait for the entity guid to be available before setting up the event store. This is called once the rum response is received with an entityGuid.
798
+ * @param {string} entityGuid
799
+ * @returns {void}
800
+ */
801
+ fe = function(t) {
802
+ var r;
803
+ if (!this.events)
804
+ switch (this.featureName) {
805
+ // SessionTrace + Replay have their own storage mechanisms.
806
+ case M.sessionTrace:
807
+ case M.sessionReplay:
808
+ break;
809
+ // Jserror and Metric features uses a singleton EventAggregator instead of a regular EventBuffer.
810
+ case M.jserrors:
811
+ case M.metrics:
812
+ this.events = (r = this.agentRef).sharedAggregator ?? (r.sharedAggregator = new re(this.agentRef, rt, t, "shared_aggregator"));
813
+ break;
814
+ /** All other features get EventBuffer in the ESM by default. Note: PVE is included here, but event buffer will always be empty so future harvests will still not happen by interval or EOL.
815
+ This was necessary to prevent race cond. issues where the event buffer was checked before the feature could "block" itself.
816
+ Its easier to just keep an empty event buffer in place. */
817
+ default:
818
+ this.events = new re(this.agentRef, Ge, t, this.featureName);
819
+ break;
820
+ }
821
+ };
822
+ export {
823
+ ct as A,
824
+ Ge as E,
825
+ ot as I,
826
+ He as M,
827
+ Pe as c,
828
+ Ne as i,
829
+ _e as o
830
+ };