castled-js-sdk 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (660) hide show
  1. package/README.md +21 -101
  2. package/index.es.js +1 -0
  3. package/index.js +1 -0
  4. package/package.json +39 -198
  5. package/{examples/chrome-extension/background-script-websockets/rudderAnalytics.js → service-worker/index.es.js} +1274 -1283
  6. package/service-worker/index.js +5346 -0
  7. package/.env.example +0 -8
  8. package/.eslintignore +0 -15
  9. package/.eslintrc.json +0 -41
  10. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -50
  11. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -19
  12. package/.github/pull_request_template.md +0 -22
  13. package/.github/workflows/build-and-quality-checks.yml +0 -50
  14. package/.github/workflows/deploy-beta.yml +0 -55
  15. package/.github/workflows/deploy-cdn.yml +0 -113
  16. package/.github/workflows/deploy-npm.yml +0 -80
  17. package/.github/workflows/deploy-sanity-suite.yml +0 -46
  18. package/.github/workflows/test.yml +0 -39
  19. package/.husky/commit-msg +0 -4
  20. package/.husky/pre-commit +0 -4
  21. package/.nvmrc +0 -1
  22. package/.prettierignore +0 -10
  23. package/.prettierrc +0 -7
  24. package/.size-limit.js +0 -30
  25. package/.versionrc +0 -12
  26. package/LICENSE +0 -67
  27. package/__mocks__/BraveBrowser.js +0 -9
  28. package/__mocks__/fixtures.js +0 -130
  29. package/__mocks__/msw.handlers.js +0 -34
  30. package/__mocks__/msw.server.js +0 -6
  31. package/__tests__/camelcase.test.js +0 -29
  32. package/__tests__/data-residency.test.js +0 -238
  33. package/__tests__/features/core/metrics/errorReporting/ErrorReportingService.test.js +0 -80
  34. package/__tests__/integrations/BingAds/__mocks__/data.js +0 -17
  35. package/__tests__/integrations/BingAds/browser.test.js +0 -148
  36. package/__tests__/integrations/BingAds/utils.test.js +0 -138
  37. package/__tests__/integrations/Braze/Braze.test.js +0 -462
  38. package/__tests__/integrations/FacebookPixel/FacebookPixel.test.js +0 -347
  39. package/__tests__/integrations/FacebookPixel/utils.test.js +0 -688
  40. package/__tests__/integrations/Fullstory/fullstory.test.js +0 -147
  41. package/__tests__/integrations/GA4/__mocks__/data.js +0 -1480
  42. package/__tests__/integrations/GA4/browser.test.js +0 -94
  43. package/__tests__/integrations/GA4/utils.test.js +0 -337
  44. package/__tests__/integrations/GoogleAds/__mocks__/data.js +0 -235
  45. package/__tests__/integrations/GoogleAds/browser.test.js +0 -202
  46. package/__tests__/integrations/GoogleAds/utils.test.js +0 -110
  47. package/__tests__/integrations/LaunchDarkly/__mocks__/data.js +0 -61
  48. package/__tests__/integrations/LaunchDarkly/browser.test.js +0 -148
  49. package/__tests__/integrations/LaunchDarkly/utils.test.js +0 -36
  50. package/__tests__/integrations/Lemnisk/lemnisk.test.js +0 -156
  51. package/__tests__/integrations/Mixpanel/browser.test.js +0 -60
  52. package/__tests__/integrations/PinterestTag/__mocks__/data.js +0 -24
  53. package/__tests__/integrations/PinterestTag/utils.test.js +0 -19
  54. package/__tests__/integrations/TikTokAds/tiktokads.test.js +0 -231
  55. package/__tests__/ketchConsent.test.js +0 -49
  56. package/__tests__/oneTrustCookieConsent.test.js +0 -89
  57. package/__tests__/script.test.js +0 -167
  58. package/__tests__/service-worker/__mocks__/fixtures.js +0 -79
  59. package/__tests__/service-worker/__mocks__/msw.server.js +0 -12
  60. package/__tests__/service-worker/index.test.js +0 -109
  61. package/__tests__/transformationHandler.test.js +0 -169
  62. package/__tests__/utils/IntegrationsData.test.js +0 -105
  63. package/__tests__/utils/ObjectUtils.test.js +0 -227
  64. package/__tests__/utils/cdnPaths.test.js +0 -63
  65. package/__tests__/utils/clientHint.test.js +0 -87
  66. package/__tests__/utils/commonUtils.test.js +0 -271
  67. package/__tests__/utils/errorHandler.test.js +0 -60
  68. package/__tests__/utils/eventProcessorUtils.test.js +0 -266
  69. package/__tests__/utils/navigator.test.js +0 -38
  70. package/__tests__/utils/preProcessQueue.test.js +0 -78
  71. package/__tests__/utils/screenDetails.test.js +0 -19
  72. package/__tests__/utils/utils.test.js +0 -348
  73. package/assets/integrations/AdobeAnalytics/adobe-analytics-heartbeat.js +0 -12384
  74. package/assets/integrations/AdobeAnalytics/adobe-analytics-js.js +0 -5046
  75. package/babel.config.json +0 -34
  76. package/commitlint.config.js +0 -3
  77. package/examples/SampleEventsTest.Html +0 -133
  78. package/examples/TC/TC_001.js +0 -4
  79. package/examples/TC/TC_002.js +0 -4
  80. package/examples/TC/TC_003.js +0 -4
  81. package/examples/TC/TC_004.js +0 -4
  82. package/examples/TC/TC_005.js +0 -4
  83. package/examples/chrome-extension/USAGE.md +0 -131
  84. package/examples/chrome-extension/background-script/LICENSE +0 -21
  85. package/examples/chrome-extension/background-script/README.md +0 -101
  86. package/examples/chrome-extension/background-script/foreground.js +0 -7
  87. package/examples/chrome-extension/background-script/logo/logo-128.png +0 -0
  88. package/examples/chrome-extension/background-script/logo/logo-16.png +0 -0
  89. package/examples/chrome-extension/background-script/logo/logo-48.png +0 -0
  90. package/examples/chrome-extension/background-script/logo/logo.svg +0 -138
  91. package/examples/chrome-extension/background-script/manifest.json +0 -37
  92. package/examples/chrome-extension/background-script/popup/popup.css +0 -11
  93. package/examples/chrome-extension/background-script/popup/popup.html +0 -11
  94. package/examples/chrome-extension/background-script/rudderAnalytics.js +0 -5345
  95. package/examples/chrome-extension/background-script/service-worker.js +0 -32
  96. package/examples/chrome-extension/background-script/settings/settings.css +0 -8
  97. package/examples/chrome-extension/background-script/settings/settings.html +0 -12
  98. package/examples/chrome-extension/background-script-websockets/LICENSE +0 -21
  99. package/examples/chrome-extension/background-script-websockets/README.md +0 -101
  100. package/examples/chrome-extension/background-script-websockets/foreground.js +0 -7
  101. package/examples/chrome-extension/background-script-websockets/logo/logo-128.png +0 -0
  102. package/examples/chrome-extension/background-script-websockets/logo/logo-16.png +0 -0
  103. package/examples/chrome-extension/background-script-websockets/logo/logo-48.png +0 -0
  104. package/examples/chrome-extension/background-script-websockets/logo/logo.svg +0 -138
  105. package/examples/chrome-extension/background-script-websockets/manifest.json +0 -37
  106. package/examples/chrome-extension/background-script-websockets/popup/popup.css +0 -11
  107. package/examples/chrome-extension/background-script-websockets/popup/popup.html +0 -11
  108. package/examples/chrome-extension/background-script-websockets/service-worker.js +0 -60
  109. package/examples/chrome-extension/background-script-websockets/settings/settings.css +0 -8
  110. package/examples/chrome-extension/background-script-websockets/settings/settings.html +0 -12
  111. package/examples/chrome-extension/content-script/LICENSE +0 -21
  112. package/examples/chrome-extension/content-script/README.md +0 -101
  113. package/examples/chrome-extension/content-script/foreground.js +0 -65
  114. package/examples/chrome-extension/content-script/logo/logo-128.png +0 -0
  115. package/examples/chrome-extension/content-script/logo/logo-16.png +0 -0
  116. package/examples/chrome-extension/content-script/logo/logo-48.png +0 -0
  117. package/examples/chrome-extension/content-script/logo/logo.svg +0 -138
  118. package/examples/chrome-extension/content-script/manifest.json +0 -39
  119. package/examples/chrome-extension/content-script/popup/popup.css +0 -11
  120. package/examples/chrome-extension/content-script/popup/popup.html +0 -11
  121. package/examples/chrome-extension/content-script/service-worker-utils.js +0 -17
  122. package/examples/chrome-extension/content-script/service-worker.js +0 -12
  123. package/examples/chrome-extension/content-script/settings/settings.css +0 -8
  124. package/examples/chrome-extension/content-script/settings/settings.html +0 -12
  125. package/examples/chrome-extension/websocket-server/server.mjs +0 -19
  126. package/examples/html/autotrack-test.html +0 -96
  127. package/examples/html/ecomm_test.html +0 -358
  128. package/examples/html/script-test.html +0 -968
  129. package/examples/html/segment.html +0 -177
  130. package/examples/html/test_poster.jpg +0 -0
  131. package/examples/umd/index.js +0 -11
  132. package/examples/umd/package.json +0 -42
  133. package/examples/umd/rollup.config.js +0 -36
  134. package/examples/umd/tests/test.html +0 -5
  135. package/examples/v1.1/tc1.html +0 -139
  136. package/examples/v1.1/tc2.1.html +0 -140
  137. package/examples/v1.1/tc2.2.html +0 -139
  138. package/examples/v1.1/tc2.3.html +0 -143
  139. package/examples/v1.1/tc3.1.html +0 -139
  140. package/examples/v1.1/tc3.2.html +0 -142
  141. package/examples/v1.1/tc3.3.html +0 -142
  142. package/examples/v1.1/tc3.4.html +0 -144
  143. package/examples/v1.1/tc3.5.html +0 -142
  144. package/examples/v1.1/tc4.html +0 -142
  145. package/examples/v1.1/tc5.html +0 -150
  146. package/github-release.config.js +0 -5
  147. package/jest/jest.global-setup.js +0 -3
  148. package/jest/jest.polyfills.js +0 -10
  149. package/jest/jest.setup-dom.js +0 -49
  150. package/jest.config.js +0 -196
  151. package/packages/npm/README.md +0 -125
  152. package/packages/npm/package.json +0 -50
  153. package/patches/@segment+localstorage-retry+1.3.0.patch +0 -73
  154. package/patches/@segment+top-domain+3.0.1.patch +0 -34
  155. package/public/index.html +0 -136
  156. package/public/list_integration_sdks.html +0 -390
  157. package/rollup-configs/rollup.integrations.config.js +0 -29
  158. package/rollup-configs/rollup.sdk.browser.js +0 -32
  159. package/rollup-configs/rollup.sdk.npm.js +0 -43
  160. package/rollup-configs/rollup.utilities.js +0 -120
  161. package/rollup-configs/rollup.worker.config.js +0 -37
  162. package/sanity-suite/.babelrc +0 -33
  163. package/sanity-suite/.env.example +0 -6
  164. package/sanity-suite/__mocks__/alias1.json +0 -137
  165. package/sanity-suite/__mocks__/alias2.json +0 -97
  166. package/sanity-suite/__mocks__/alias5.json +0 -103
  167. package/sanity-suite/__mocks__/alias6.json +0 -137
  168. package/sanity-suite/__mocks__/group1.json +0 -120
  169. package/sanity-suite/__mocks__/group2.json +0 -86
  170. package/sanity-suite/__mocks__/group4.json +0 -101
  171. package/sanity-suite/__mocks__/group5.json +0 -67
  172. package/sanity-suite/__mocks__/group6.json +0 -66
  173. package/sanity-suite/__mocks__/identify1.json +0 -136
  174. package/sanity-suite/__mocks__/identify2.json +0 -102
  175. package/sanity-suite/__mocks__/identify3.json +0 -99
  176. package/sanity-suite/__mocks__/identify4.json +0 -65
  177. package/sanity-suite/__mocks__/identify5.json +0 -102
  178. package/sanity-suite/__mocks__/identify6.json +0 -103
  179. package/sanity-suite/__mocks__/identify7.json +0 -102
  180. package/sanity-suite/__mocks__/identify8.json +0 -103
  181. package/sanity-suite/__mocks__/page1.json +0 -119
  182. package/sanity-suite/__mocks__/page2.json +0 -86
  183. package/sanity-suite/__mocks__/page4.json +0 -112
  184. package/sanity-suite/__mocks__/page5.json +0 -79
  185. package/sanity-suite/__mocks__/page6.json +0 -77
  186. package/sanity-suite/__mocks__/page7.json +0 -77
  187. package/sanity-suite/__mocks__/page8.json +0 -75
  188. package/sanity-suite/__mocks__/page9.json +0 -155
  189. package/sanity-suite/__mocks__/sourceConfig1.json +0 -988
  190. package/sanity-suite/__mocks__/track1.json +0 -150
  191. package/sanity-suite/__mocks__/track2.json +0 -118
  192. package/sanity-suite/__mocks__/track4.json +0 -134
  193. package/sanity-suite/__mocks__/track5.json +0 -102
  194. package/sanity-suite/__mocks__/track6.json +0 -81
  195. package/sanity-suite/__mocks__/track7.json +0 -81
  196. package/sanity-suite/package-lock.json +0 -7951
  197. package/sanity-suite/package.json +0 -67
  198. package/sanity-suite/public/eventFiltering/index-cdn.html +0 -112
  199. package/sanity-suite/public/eventFiltering/index-local.html +0 -109
  200. package/sanity-suite/public/eventFiltering/index-npm.html +0 -92
  201. package/sanity-suite/public/index-cdn.html +0 -112
  202. package/sanity-suite/public/index-local.html +0 -109
  203. package/sanity-suite/public/index-npm.html +0 -92
  204. package/sanity-suite/public/preloadBuffer/index-cdn.html +0 -112
  205. package/sanity-suite/public/preloadBuffer/index-local.html +0 -109
  206. package/sanity-suite/public/preloadBuffer/index-npm.html +0 -92
  207. package/sanity-suite/rollup.config.js +0 -199
  208. package/sanity-suite/src/index-npm.js +0 -65
  209. package/sanity-suite/src/index.js +0 -5
  210. package/sanity-suite/src/testBook/ResultAssertions.js +0 -51
  211. package/sanity-suite/src/testBook/TestBook.js +0 -345
  212. package/sanity-suite/src/testBook/ignoredProperties.js +0 -150
  213. package/sanity-suite/src/testBook/index.js +0 -11
  214. package/sanity-suite/src/testBookSuites/alias.js +0 -287
  215. package/sanity-suite/src/testBookSuites/group.js +0 -240
  216. package/sanity-suite/src/testBookSuites/identify.js +0 -455
  217. package/sanity-suite/src/testBookSuites/index.js +0 -31
  218. package/sanity-suite/src/testBookSuites/page.js +0 -258
  219. package/sanity-suite/src/testBookSuites/sourceConfig.js +0 -84
  220. package/sanity-suite/src/testBookSuites/track.js +0 -451
  221. package/scripts/integrationBuildScript.js +0 -77
  222. package/scripts/run_tests.sh +0 -6
  223. package/src/core/analytics.js +0 -1668
  224. package/src/features/core/cookieConsent/CookieConsentFactory.js +0 -32
  225. package/src/features/core/cookieConsent/OneTrust/browser.js +0 -102
  226. package/src/features/core/cookieConsent/OneTrust/index.js +0 -3
  227. package/src/features/core/cookieConsent/ketch/browser.js +0 -114
  228. package/src/features/core/cookieConsent/ketch/index.js +0 -1
  229. package/src/features/core/deviceModeTransformation/transformationHandler.js +0 -189
  230. package/src/features/core/deviceModeTransformation/util.js +0 -23
  231. package/src/features/core/metrics/errorReporting/ErrorReportingService.js +0 -116
  232. package/src/features/core/metrics/errorReporting/providers/Bugsnag.js +0 -240
  233. package/src/features/core/session/index.js +0 -207
  234. package/src/integrations/ActiveCampaign/browser.js +0 -52
  235. package/src/integrations/ActiveCampaign/constants.js +0 -14
  236. package/src/integrations/ActiveCampaign/index.js +0 -3
  237. package/src/integrations/ActiveCampaign/nativeSdkLoader.js +0 -24
  238. package/src/integrations/AdobeAnalytics/browser.js +0 -276
  239. package/src/integrations/AdobeAnalytics/constants.js +0 -14
  240. package/src/integrations/AdobeAnalytics/eCommHandle.js +0 -56
  241. package/src/integrations/AdobeAnalytics/heartbeatHandle.js +0 -266
  242. package/src/integrations/AdobeAnalytics/index.js +0 -1
  243. package/src/integrations/AdobeAnalytics/util.js +0 -678
  244. package/src/integrations/Adroll/browser.js +0 -125
  245. package/src/integrations/Adroll/constants.js +0 -10
  246. package/src/integrations/Adroll/index.js +0 -1
  247. package/src/integrations/Adroll/util.js +0 -48
  248. package/src/integrations/Amplitude/browser.js +0 -352
  249. package/src/integrations/Amplitude/constants.js +0 -9
  250. package/src/integrations/Amplitude/index.js +0 -1
  251. package/src/integrations/Amplitude/nativeSdkLoader.js +0 -112
  252. package/src/integrations/Amplitude/test/test_amplitude.html +0 -157
  253. package/src/integrations/Amplitude/utils.js +0 -25
  254. package/src/integrations/Appcues/browser.js +0 -79
  255. package/src/integrations/Appcues/constants.js +0 -9
  256. package/src/integrations/Appcues/index.js +0 -1
  257. package/src/integrations/Axeptio/browser.js +0 -61
  258. package/src/integrations/Axeptio/constants.js +0 -8
  259. package/src/integrations/Axeptio/index.js +0 -1
  260. package/src/integrations/Axeptio/nativeSdkLoader.js +0 -14
  261. package/src/integrations/Axeptio/utils.js +0 -16
  262. package/src/integrations/BingAds/browser.js +0 -79
  263. package/src/integrations/BingAds/constants.js +0 -12
  264. package/src/integrations/BingAds/index.js +0 -1
  265. package/src/integrations/BingAds/nativeSdkLoader.js +0 -30
  266. package/src/integrations/BingAds/utils.js +0 -101
  267. package/src/integrations/Braze/browser.js +0 -284
  268. package/src/integrations/Braze/constants.js +0 -11
  269. package/src/integrations/Braze/index.js +0 -1
  270. package/src/integrations/Braze/nativeSdkLoader.js +0 -35
  271. package/src/integrations/Braze/utils.js +0 -51
  272. package/src/integrations/Bugsnag/browser.js +0 -60
  273. package/src/integrations/Bugsnag/constants.js +0 -8
  274. package/src/integrations/Bugsnag/index.js +0 -1
  275. package/src/integrations/Chartbeat/browser.js +0 -148
  276. package/src/integrations/Chartbeat/constants.js +0 -10
  277. package/src/integrations/Chartbeat/index.js +0 -1
  278. package/src/integrations/Chartbeat/nativeSdkLoader.js +0 -7
  279. package/src/integrations/Clevertap/browser.js +0 -206
  280. package/src/integrations/Clevertap/constants.js +0 -8
  281. package/src/integrations/Clevertap/index.js +0 -1
  282. package/src/integrations/Comscore/browser.js +0 -130
  283. package/src/integrations/Comscore/constants.js +0 -11
  284. package/src/integrations/Comscore/index.js +0 -1
  285. package/src/integrations/Comscore/nativeSdkLoader.js +0 -10
  286. package/src/integrations/ConvertFlow/browser.js +0 -59
  287. package/src/integrations/ConvertFlow/constants.js +0 -15
  288. package/src/integrations/ConvertFlow/index.js +0 -1
  289. package/src/integrations/ConvertFlow/utils.js +0 -107
  290. package/src/integrations/Criteo/browser.js +0 -155
  291. package/src/integrations/Criteo/constants.js +0 -11
  292. package/src/integrations/Criteo/index.js +0 -1
  293. package/src/integrations/Criteo/utils.js +0 -343
  294. package/src/integrations/CustomerIO/browser.js +0 -74
  295. package/src/integrations/CustomerIO/constants.js +0 -10
  296. package/src/integrations/CustomerIO/index.js +0 -1
  297. package/src/integrations/CustomerIO/nativeSdkLoader.js +0 -31
  298. package/src/integrations/DCMFloodlight/browser.js +0 -240
  299. package/src/integrations/DCMFloodlight/constants.js +0 -15
  300. package/src/integrations/DCMFloodlight/index.js +0 -1
  301. package/src/integrations/DCMFloodlight/utils.js +0 -336
  302. package/src/integrations/Drip/browser.js +0 -169
  303. package/src/integrations/Drip/constants.js +0 -8
  304. package/src/integrations/Drip/index.js +0 -1
  305. package/src/integrations/Drip/nativeSdkLoader.js +0 -10
  306. package/src/integrations/Drip/utils.js +0 -29
  307. package/src/integrations/Engage/browser.js +0 -124
  308. package/src/integrations/Engage/constants.js +0 -16
  309. package/src/integrations/Engage/index.js +0 -1
  310. package/src/integrations/Engage/nativeSdkLoader.js +0 -25
  311. package/src/integrations/Engage/utils.js +0 -69
  312. package/src/integrations/FacebookPixel/browser.js +0 -313
  313. package/src/integrations/FacebookPixel/constants.js +0 -77
  314. package/src/integrations/FacebookPixel/index.js +0 -1
  315. package/src/integrations/FacebookPixel/utils.js +0 -310
  316. package/src/integrations/Fullstory/browser.js +0 -169
  317. package/src/integrations/Fullstory/constants.js +0 -13
  318. package/src/integrations/Fullstory/index.js +0 -1
  319. package/src/integrations/Fullstory/nativeSdkLoader.js +0 -69
  320. package/src/integrations/GA/browser.js +0 -816
  321. package/src/integrations/GA/constants.js +0 -10
  322. package/src/integrations/GA/index.js +0 -1
  323. package/src/integrations/GA/index.test.js +0 -184
  324. package/src/integrations/GA360/browser.js +0 -58
  325. package/src/integrations/GA360/constants.js +0 -14
  326. package/src/integrations/GA360/index.js +0 -1
  327. package/src/integrations/GA4/browser.js +0 -264
  328. package/src/integrations/GA4/config.js +0 -296
  329. package/src/integrations/GA4/constants.js +0 -15
  330. package/src/integrations/GA4/index.js +0 -1
  331. package/src/integrations/GA4/utils.js +0 -329
  332. package/src/integrations/GoogleAds/browser.js +0 -212
  333. package/src/integrations/GoogleAds/constants.js +0 -11
  334. package/src/integrations/GoogleAds/index.js +0 -1
  335. package/src/integrations/GoogleAds/nativeSdkLoader.js +0 -26
  336. package/src/integrations/GoogleAds/utils.js +0 -117
  337. package/src/integrations/GoogleOptimize/browser.js +0 -79
  338. package/src/integrations/GoogleOptimize/constants.js +0 -13
  339. package/src/integrations/GoogleOptimize/index.js +0 -1
  340. package/src/integrations/GoogleTagManager/browser.js +0 -95
  341. package/src/integrations/GoogleTagManager/constants.js +0 -10
  342. package/src/integrations/GoogleTagManager/index.js +0 -1
  343. package/src/integrations/GoogleTagManager/nativeSdkLoader.js +0 -21
  344. package/src/integrations/Heap/browser.js +0 -67
  345. package/src/integrations/Heap/constants.js +0 -9
  346. package/src/integrations/Heap/index.js +0 -1
  347. package/src/integrations/Heap/nativeSdkLoader.js +0 -40
  348. package/src/integrations/Heap/util.js +0 -23
  349. package/src/integrations/Hotjar/browser.js +0 -86
  350. package/src/integrations/Hotjar/constants.js +0 -10
  351. package/src/integrations/Hotjar/index.js +0 -1
  352. package/src/integrations/Hotjar/nativeSdkLoader.js +0 -21
  353. package/src/integrations/HubSpot/browser.js +0 -96
  354. package/src/integrations/HubSpot/constants.js +0 -11
  355. package/src/integrations/HubSpot/index.js +0 -1
  356. package/src/integrations/INTERCOM/browser.js +0 -107
  357. package/src/integrations/INTERCOM/constants.js +0 -8
  358. package/src/integrations/INTERCOM/index.js +0 -1
  359. package/src/integrations/INTERCOM/nativeSdkLoader.js +0 -46
  360. package/src/integrations/INTERCOM/utils.js +0 -68
  361. package/src/integrations/Iterable/browser.js +0 -185
  362. package/src/integrations/Iterable/constants.js +0 -8
  363. package/src/integrations/Iterable/index.js +0 -1
  364. package/src/integrations/Iterable/utils.js +0 -111
  365. package/src/integrations/June/browser.js +0 -98
  366. package/src/integrations/June/constants.js +0 -8
  367. package/src/integrations/June/index.js +0 -1
  368. package/src/integrations/Keen/browser.js +0 -153
  369. package/src/integrations/Keen/constants.js +0 -10
  370. package/src/integrations/Keen/index.js +0 -1
  371. package/src/integrations/Kissmetrics/browser.js +0 -254
  372. package/src/integrations/Kissmetrics/constants.js +0 -8
  373. package/src/integrations/Kissmetrics/index.js +0 -1
  374. package/src/integrations/Kissmetrics/nativeSdkLoader.js +0 -23
  375. package/src/integrations/Klaviyo/browser.js +0 -195
  376. package/src/integrations/Klaviyo/constants.js +0 -8
  377. package/src/integrations/Klaviyo/index.js +0 -1
  378. package/src/integrations/Klaviyo/util.js +0 -91
  379. package/src/integrations/LaunchDarkly/browser.js +0 -74
  380. package/src/integrations/LaunchDarkly/constants.js +0 -11
  381. package/src/integrations/LaunchDarkly/index.js +0 -1
  382. package/src/integrations/LaunchDarkly/utils.js +0 -24
  383. package/src/integrations/Lemnisk/browser.js +0 -85
  384. package/src/integrations/Lemnisk/constants.js +0 -13
  385. package/src/integrations/Lemnisk/index.js +0 -1
  386. package/src/integrations/Lemnisk/nativeSdkLoader.js +0 -34
  387. package/src/integrations/LinkedInInsightTag/browser.js +0 -71
  388. package/src/integrations/LinkedInInsightTag/constants.js +0 -16
  389. package/src/integrations/LinkedInInsightTag/index.js +0 -1
  390. package/src/integrations/LiveChat/browser.js +0 -82
  391. package/src/integrations/LiveChat/constants.js +0 -12
  392. package/src/integrations/LiveChat/index.js +0 -1
  393. package/src/integrations/LiveChat/nativeSdkLoader.js +0 -40
  394. package/src/integrations/LiveChat/util.js +0 -71
  395. package/src/integrations/Lotame/LotameStorage.js +0 -21
  396. package/src/integrations/Lotame/browser.js +0 -172
  397. package/src/integrations/Lotame/constants.js +0 -8
  398. package/src/integrations/Lotame/index.js +0 -1
  399. package/src/integrations/Lytics/browser.js +0 -87
  400. package/src/integrations/Lytics/constants.js +0 -8
  401. package/src/integrations/Lytics/index.js +0 -1
  402. package/src/integrations/Lytics/nativeSdkLoader.js +0 -77
  403. package/src/integrations/Lytics/test/script-test-lytics.html +0 -250
  404. package/src/integrations/Matomo/browser.js +0 -188
  405. package/src/integrations/Matomo/constants.js +0 -8
  406. package/src/integrations/Matomo/index.js +0 -1
  407. package/src/integrations/Matomo/nativeSdkLoader.js +0 -20
  408. package/src/integrations/Matomo/util.js +0 -417
  409. package/src/integrations/MicrosoftClarity/browser.js +0 -70
  410. package/src/integrations/MicrosoftClarity/constants.js +0 -14
  411. package/src/integrations/MicrosoftClarity/index.js +0 -1
  412. package/src/integrations/MicrosoftClarity/nativeSdkLoader.js +0 -22
  413. package/src/integrations/Mixpanel/browser.js +0 -326
  414. package/src/integrations/Mixpanel/constants.js +0 -11
  415. package/src/integrations/Mixpanel/index.js +0 -1
  416. package/src/integrations/Mixpanel/nativeSdkLoader.js +0 -71
  417. package/src/integrations/Mixpanel/util.js +0 -178
  418. package/src/integrations/MoEngage/browser.js +0 -133
  419. package/src/integrations/MoEngage/constants.js +0 -12
  420. package/src/integrations/MoEngage/index.js +0 -1
  421. package/src/integrations/MoEngage/nativeSdkLoader.js +0 -66
  422. package/src/integrations/MoEngage/test/script-test-moengage.html +0 -216
  423. package/src/integrations/Mouseflow/browser.js +0 -98
  424. package/src/integrations/Mouseflow/constants.js +0 -14
  425. package/src/integrations/Mouseflow/index.js +0 -1
  426. package/src/integrations/Mouseflow/utils.js +0 -27
  427. package/src/integrations/Olark/browser.js +0 -94
  428. package/src/integrations/Olark/constants.js +0 -8
  429. package/src/integrations/Olark/index.js +0 -1
  430. package/src/integrations/Olark/nativeSdkLoader.js +0 -31
  431. package/src/integrations/Olark/utils.js +0 -51
  432. package/src/integrations/Optimizely/browser.js +0 -230
  433. package/src/integrations/Optimizely/constants.js +0 -8
  434. package/src/integrations/Optimizely/index.js +0 -1
  435. package/src/integrations/Optimizely/utils.js +0 -23
  436. package/src/integrations/Pendo/browser.js +0 -119
  437. package/src/integrations/Pendo/constants.js +0 -8
  438. package/src/integrations/Pendo/index.js +0 -1
  439. package/src/integrations/Pendo/nativeSdkLoader.js +0 -32
  440. package/src/integrations/PinterestTag/browser.js +0 -241
  441. package/src/integrations/PinterestTag/constants.js +0 -19
  442. package/src/integrations/PinterestTag/index.js +0 -1
  443. package/src/integrations/PinterestTag/nativeSdkLoader.js +0 -19
  444. package/src/integrations/PinterestTag/propertyMappingConfig.js +0 -57
  445. package/src/integrations/PinterestTag/test/input.js +0 -180
  446. package/src/integrations/PinterestTag/test/output.js +0 -129
  447. package/src/integrations/PinterestTag/utils.js +0 -47
  448. package/src/integrations/Podsights/browser.js +0 -178
  449. package/src/integrations/Podsights/constants.js +0 -206
  450. package/src/integrations/Podsights/index.js +0 -1
  451. package/src/integrations/Podsights/utils.js +0 -65
  452. package/src/integrations/PostAffiliatePro/browser.js +0 -133
  453. package/src/integrations/PostAffiliatePro/constants.js +0 -13
  454. package/src/integrations/PostAffiliatePro/index.js +0 -1
  455. package/src/integrations/PostAffiliatePro/utils.js +0 -40
  456. package/src/integrations/Posthog/browser.js +0 -154
  457. package/src/integrations/Posthog/constants.js +0 -12
  458. package/src/integrations/Posthog/index.js +0 -1
  459. package/src/integrations/Posthog/nativeSdkLoader.js +0 -48
  460. package/src/integrations/Posthog/test/test_posthog.html +0 -77
  461. package/src/integrations/Posthog/utils.js +0 -36
  462. package/src/integrations/ProfitWell/browser.js +0 -72
  463. package/src/integrations/ProfitWell/constants.js +0 -12
  464. package/src/integrations/ProfitWell/index.js +0 -1
  465. package/src/integrations/ProfitWell/nativeSdkLoader.js +0 -25
  466. package/src/integrations/Qualaroo/browser.js +0 -116
  467. package/src/integrations/Qualaroo/constants.js +0 -8
  468. package/src/integrations/Qualaroo/index.js +0 -1
  469. package/src/integrations/Qualaroo/utils.js +0 -83
  470. package/src/integrations/Qualtrics/browser.js +0 -89
  471. package/src/integrations/Qualtrics/constants.js +0 -8
  472. package/src/integrations/Qualtrics/index.js +0 -1
  473. package/src/integrations/Qualtrics/nativeSdkLoader.js +0 -79
  474. package/src/integrations/QuantumMetric/browser.js +0 -63
  475. package/src/integrations/QuantumMetric/constants.js +0 -13
  476. package/src/integrations/QuantumMetric/index.js +0 -1
  477. package/src/integrations/QuoraPixel/browser.js +0 -64
  478. package/src/integrations/QuoraPixel/constants.js +0 -15
  479. package/src/integrations/QuoraPixel/index.js +0 -1
  480. package/src/integrations/QuoraPixel/nativeSdkLoader.js +0 -21
  481. package/src/integrations/RedditPixel/browser.js +0 -98
  482. package/src/integrations/RedditPixel/constants.js +0 -13
  483. package/src/integrations/RedditPixel/index.js +0 -1
  484. package/src/integrations/RedditPixel/nativeSdkLoader.js +0 -21
  485. package/src/integrations/Refiner/browser.js +0 -119
  486. package/src/integrations/Refiner/constants.js +0 -8
  487. package/src/integrations/Refiner/index.js +0 -1
  488. package/src/integrations/Refiner/nativeSdkLoader.js +0 -20
  489. package/src/integrations/Refiner/utils.js +0 -44
  490. package/src/integrations/Rockerbox/browser.js +0 -89
  491. package/src/integrations/Rockerbox/constants.js +0 -12
  492. package/src/integrations/Rockerbox/index.js +0 -1
  493. package/src/integrations/Rockerbox/nativeSdkLoader.js +0 -32
  494. package/src/integrations/RollBar/browser.js +0 -92
  495. package/src/integrations/RollBar/constants.js +0 -13
  496. package/src/integrations/RollBar/index.js +0 -1
  497. package/src/integrations/RollBar/nativeSdkLoader.js +0 -383
  498. package/src/integrations/Satismeter/browser.js +0 -94
  499. package/src/integrations/Satismeter/constants.js +0 -9
  500. package/src/integrations/Satismeter/index.js +0 -1
  501. package/src/integrations/Satismeter/nativeSdkLoader.js +0 -23
  502. package/src/integrations/Satismeter/util.js +0 -54
  503. package/src/integrations/Sendinblue/browser.js +0 -111
  504. package/src/integrations/Sendinblue/constants.js +0 -25
  505. package/src/integrations/Sendinblue/index.js +0 -1
  506. package/src/integrations/Sendinblue/nativeSdkLoader.js +0 -36
  507. package/src/integrations/Sendinblue/utils.js +0 -112
  508. package/src/integrations/Sentry/browser.js +0 -118
  509. package/src/integrations/Sentry/constants.js +0 -8
  510. package/src/integrations/Sentry/index.js +0 -1
  511. package/src/integrations/Sentry/utils.js +0 -80
  512. package/src/integrations/Shynet/browser.js +0 -97
  513. package/src/integrations/Shynet/constants.js +0 -15
  514. package/src/integrations/Shynet/index.js +0 -1
  515. package/src/integrations/SnapEngage/browser.js +0 -75
  516. package/src/integrations/SnapEngage/constants.js +0 -12
  517. package/src/integrations/SnapEngage/index.js +0 -1
  518. package/src/integrations/SnapEngage/nativeSdkLoader.js +0 -24
  519. package/src/integrations/SnapEngage/util.js +0 -63
  520. package/src/integrations/SnapPixel/browser.js +0 -232
  521. package/src/integrations/SnapPixel/constants.js +0 -13
  522. package/src/integrations/SnapPixel/index.js +0 -1
  523. package/src/integrations/SnapPixel/nativeSdkLoader.js +0 -20
  524. package/src/integrations/SnapPixel/util.js +0 -211
  525. package/src/integrations/TVSquared/browser.js +0 -96
  526. package/src/integrations/TVSquared/constants.js +0 -14
  527. package/src/integrations/TVSquared/index.js +0 -1
  528. package/src/integrations/TVSquared/utils.js +0 -40
  529. package/src/integrations/TiktokAds/browser.js +0 -103
  530. package/src/integrations/TiktokAds/constants.js +0 -86
  531. package/src/integrations/TiktokAds/index.js +0 -1
  532. package/src/integrations/TiktokAds/nativeSdkLoader.js +0 -52
  533. package/src/integrations/TiktokAds/util.js +0 -71
  534. package/src/integrations/VWO/browser.js +0 -131
  535. package/src/integrations/VWO/constants.js +0 -13
  536. package/src/integrations/VWO/index.js +0 -1
  537. package/src/integrations/VWO/nativeSdkLoader.js +0 -64
  538. package/src/integrations/Vero/browser.js +0 -165
  539. package/src/integrations/Vero/constants.js +0 -8
  540. package/src/integrations/Vero/index.js +0 -1
  541. package/src/integrations/Woopra/browser.js +0 -83
  542. package/src/integrations/Woopra/constants.js +0 -8
  543. package/src/integrations/Woopra/index.js +0 -1
  544. package/src/integrations/Woopra/nativeSdkLoader.js +0 -43
  545. package/src/integrations/YandexMetrica/browser.js +0 -143
  546. package/src/integrations/YandexMetrica/constants.js +0 -10
  547. package/src/integrations/YandexMetrica/index.js +0 -1
  548. package/src/integrations/YandexMetrica/nativeSdkLoader.js +0 -35
  549. package/src/integrations/YandexMetrica/utils.js +0 -138
  550. package/src/integrations/index.js +0 -155
  551. package/src/service-worker/index.js +0 -466
  552. package/src/utils/EventRepository.js +0 -78
  553. package/src/utils/HtElement.js +0 -33
  554. package/src/utils/HtElementBuilder.js +0 -29
  555. package/src/utils/IntegrationsData.js +0 -61
  556. package/src/utils/JSFileLoader.js +0 -66
  557. package/src/utils/ObjectUtils.js +0 -68
  558. package/src/utils/PreProcessQueue.js +0 -66
  559. package/src/utils/RudderApp.js +0 -9
  560. package/src/utils/RudderContext.js +0 -21
  561. package/src/utils/RudderInfo.js +0 -41
  562. package/src/utils/RudderMessage.js +0 -28
  563. package/src/utils/ScriptLoader.js +0 -53
  564. package/src/utils/beaconQueue.js +0 -133
  565. package/src/utils/camelcase.js +0 -48
  566. package/src/utils/cdnPaths.js +0 -43
  567. package/src/utils/clientHint.js +0 -28
  568. package/src/utils/client_server_name.js +0 -78
  569. package/src/utils/commonUtils.js +0 -207
  570. package/src/utils/config_to_integration_names.js +0 -80
  571. package/src/utils/constants.js +0 -82
  572. package/src/utils/errorHandler.js +0 -88
  573. package/src/utils/eventProcessorUtils.js +0 -53
  574. package/src/utils/integration_cname.js +0 -156
  575. package/src/utils/linker/base64decoder.js +0 -31
  576. package/src/utils/linker/crc32.js +0 -42
  577. package/src/utils/linker/index.js +0 -134
  578. package/src/utils/linker/userLib.js +0 -20
  579. package/src/utils/logUtil.js +0 -51
  580. package/src/utils/logger.js +0 -106
  581. package/src/utils/navigator.js +0 -32
  582. package/src/utils/notifyError.js +0 -16
  583. package/src/utils/pageProperties.js +0 -74
  584. package/src/utils/screenDetails.js +0 -23
  585. package/src/utils/storage/cookie.js +0 -93
  586. package/src/utils/storage/index.js +0 -3
  587. package/src/utils/storage/storage.js +0 -459
  588. package/src/utils/storage/store.js +0 -72
  589. package/src/utils/storage/v3DecryptionUtils.js +0 -19
  590. package/src/utils/utils.js +0 -966
  591. package/src/utils/xhrModule.js +0 -111
  592. package/stats/AdobeAnalytics.html +0 -4044
  593. package/stats/Adroll.html +0 -4044
  594. package/stats/Amplitude.html +0 -4044
  595. package/stats/Appcues.html +0 -4044
  596. package/stats/BingAds.html +0 -4044
  597. package/stats/Braze.html +0 -4044
  598. package/stats/Bugsnag.html +0 -4044
  599. package/stats/Chartbeat.html +0 -4044
  600. package/stats/Clevertap.html +0 -4044
  601. package/stats/Comscore.html +0 -4044
  602. package/stats/ConvertFlow.html +0 -4044
  603. package/stats/Criteo.html +0 -4044
  604. package/stats/CustomerIO.html +0 -4044
  605. package/stats/DCMFloodlight.html +0 -4044
  606. package/stats/Drip.html +0 -4044
  607. package/stats/Engage.html +0 -4044
  608. package/stats/FacebookPixel.html +0 -4044
  609. package/stats/Fullstory.html +0 -4044
  610. package/stats/GA.html +0 -4044
  611. package/stats/GA360.html +0 -4044
  612. package/stats/GA4.html +0 -4044
  613. package/stats/GoogleAds.html +0 -4044
  614. package/stats/GoogleOptimize.html +0 -4044
  615. package/stats/GoogleTagManager.html +0 -4044
  616. package/stats/Heap.html +0 -4044
  617. package/stats/Hotjar.html +0 -4044
  618. package/stats/HubSpot.html +0 -4044
  619. package/stats/INTERCOM.html +0 -4044
  620. package/stats/Iterable.html +0 -4044
  621. package/stats/June.html +0 -4044
  622. package/stats/Keen.html +0 -4044
  623. package/stats/Kissmetrics.html +0 -4044
  624. package/stats/Klaviyo.html +0 -4044
  625. package/stats/LaunchDarkly.html +0 -4044
  626. package/stats/LinkedInInsightTag.html +0 -4044
  627. package/stats/LiveChat.html +0 -4044
  628. package/stats/Lotame.html +0 -4044
  629. package/stats/Lytics.html +0 -4044
  630. package/stats/Matomo.html +0 -4044
  631. package/stats/Mixpanel.html +0 -4044
  632. package/stats/MoEngage.html +0 -4044
  633. package/stats/Mouseflow.html +0 -4044
  634. package/stats/Optimizely.html +0 -4044
  635. package/stats/Pendo.html +0 -4044
  636. package/stats/PinterestTag.html +0 -4044
  637. package/stats/Podsights.html +0 -4044
  638. package/stats/PostAffiliatePro.html +0 -4044
  639. package/stats/Posthog.html +0 -4044
  640. package/stats/ProfitWell.html +0 -4044
  641. package/stats/Qualaroo.html +0 -4044
  642. package/stats/Qualtrics.html +0 -4044
  643. package/stats/QuantumMetric.html +0 -4044
  644. package/stats/QuoraPixel.html +0 -4044
  645. package/stats/RedditPixel.html +0 -4044
  646. package/stats/Refiner.html +0 -4044
  647. package/stats/Rockerbox.html +0 -4044
  648. package/stats/RollBar.html +0 -4044
  649. package/stats/Sentry.html +0 -4044
  650. package/stats/Shynet.html +0 -4044
  651. package/stats/SnapEngage.html +0 -4044
  652. package/stats/SnapPixel.html +0 -4044
  653. package/stats/TVSquared.html +0 -4044
  654. package/stats/VWO.html +0 -4044
  655. package/stats/Vero.html +0 -4044
  656. package/stats/Woopra.html +0 -4044
  657. package/stats/YandexMetrica.html +0 -4044
  658. package/stats/rudder-analytics.html +0 -4044
  659. /package/{packages/npm/index.d.ts → index.d.ts} +0 -0
  660. /package/{src/service-worker → service-worker}/index.d.ts +0 -0
package/index.js ADDED
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hightouchevents={})}(this,(function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function s(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function p(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];n.push.apply(n,arguments);var r=Function.bind.apply(t,n);return new r}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var g={exports:{}};!function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}}(g);var y=g.exports,v=d(y);function m(e){return null!=e&&"object"===r(e)&&!0===e["@@functional/placeholder"]}function I(e){return function t(n){return 0===arguments.length||m(n)?t:e.apply(this,arguments)}}function b(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return m(n)?t:I((function(t){return e(n,t)}));default:return m(n)&&m(r)?t:m(n)?I((function(t){return e(t,r)})):m(r)?I((function(t){return e(n,t)})):e(n,r)}}}function k(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return m(n)?t:b((function(t,r){return e(n,t,r)}));case 2:return m(n)&&m(r)?t:m(n)?b((function(t,n){return e(t,r,n)})):m(r)?b((function(t,r){return e(n,t,r)})):I((function(t){return e(n,r,t)}));default:return m(n)&&m(r)&&m(i)?t:m(n)&&m(r)?b((function(t,n){return e(t,n,i)})):m(n)&&m(i)?b((function(t,n){return e(t,r,n)})):m(r)&&m(i)?b((function(t,r){return e(n,t,r)})):m(n)?I((function(t){return e(t,r,i)})):m(r)?I((function(t){return e(n,t,i)})):m(i)?I((function(t){return e(n,r,t)})):e(n,r,i)}}}function A(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var E=I((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e,t,n){if(n||(n=new w),function(e){var t=r(e);return null==e||"object"!=t&&"function"!=t}(e))return e;var i,o=function(r){var i=n.get(e);if(i)return i;for(var o in n.set(e,r),e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=t?S(e[o],!0,n):e[o]);return r};switch(E(e)){case"Object":return o(Object.create(Object.getPrototypeOf(e)));case"Array":return o([]);case"Date":return new Date(e.valueOf());case"RegExp":return i=e,new RegExp(i.source,i.flags?i.flags:(i.global?"g":"")+(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.sticky?"y":"")+(i.unicode?"u":"")+(i.dotAll?"s":""));case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var w=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var n=this.hash(e),r=this.map[n];r||(this.map[n]=r=[]),r.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var n in e)t.push(Object.prototype.toString.call(e[n]));return t.join()},e.prototype.get=function(e){if(this.length<=180)for(var t in this.map)for(var n=this.map[t],r=0;r<n.length;r+=1){var i=n[r];if(i[0]===e)return i[1]}else{var o=this.hash(e),s=this.map[o];if(s)for(var a=0;a<s.length;a+=1){var u=s[a];if(u[0]===e)return u[1]}}},e}(),T=I((function(e){return null!=e&&"function"==typeof e.clone?e.clone():S(e,!0)})),O=k((function(e,t,n){var r,i={};for(r in n=n||{},t=t||{})A(r,t)&&(i[r]=A(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)A(r,n)&&!A(r,i)&&(i[r]=n[r]);return i})),_=k((function e(t,n,r){return O((function(n,r,i){return C(r)&&C(i)?e(t,r,i):t(n,r,i)}),n,r)})),R=k((function(e,t,n){return _((function(t,n,r){return e(n,r)}),t,n)})),P=function(e){return null!=e&&"object"===r(e)&&!1===Array.isArray(e)},D=function(e,t,n){if(P(n)||(n={default:n}),!M(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));var r=Array.isArray(t),i="string"==typeof t,o=n.separator||".",s=n.joinChar||("string"==typeof o?o:".");if(!i&&!r)return e;if(i&&t in e)return x(t,e,n)?e[t]:n.default;var a=r?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,o,n),u=a.length,c=0;do{var l=a[c];for("number"==typeof l&&(l=String(l));l&&"\\"===l.slice(-1);)l=L([l.slice(0,-1),a[++c]||""],s,n);if(l in e){if(!x(l,e,n))return n.default;e=e[l]}else{for(var h=!1,f=c+1;f<u;)if(h=(l=L([l,a[f++]],s,n))in e){if(!x(l,e,n))return n.default;e=e[l],c=f-1;break}if(!h)return n.default}}while(++c<u&&M(e));return c===u?e:n.default};function L(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function x(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function M(e){return P(e)||Array.isArray(e)||"function"==typeof e}for(var B,N=d(D),j=256,F=[];j--;)F[j]=(j+256).toString(16).substring(1);for(var G,U=[],H=0;H<256;H++)U[H]=(H+256).toString(16).substring(1);function K(){var e;(!G||H+16>4096)&&(e=4096,G=crypto.getRandomValues(new Uint8Array(e)),H=0);for(var t,n=0,r="";n<16;n++)t=G[H+n],r+=6==n?U[15&t|64]:8==n?U[63&t|128]:U[t],1&n&&n>1&&n<11&&(r+="-");return H+=16,r}var Q,z,q,V,W,Y,X,J,$,Z,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,he,fe,de,pe,ge,ye,ve,me,Ie,be,ke,Ae,Ee,Ce,Se,we,Te,Oe,_e,Re,Pe,De,Le,xe,Me,Be,Ne,je,Fe,Ge,Ue,He,Ke,Qe,ze,qe,Ve,We,Ye,Xe,Je,$e,Ze,et,tt,nt,rt,it,ot,st,at,ut,ct,lt=4,ht={setLogLevel:function(e){switch(e.toUpperCase()){case"INFO":lt=1;break;case"DEBUG":lt=2;break;case"WARN":lt=3;break;default:lt=4}},info:function(){var e;lt<=1&&(e=console).info.apply(e,arguments)},debug:function(){var e;lt<=2&&(e=console).log.apply(e,arguments)},warn:function(){var e;lt<=3&&(e=console).warn.apply(e,arguments)},error:function(){var e;lt<=4&&(e=console).error.apply(e,arguments)}},ft="ADOBE_ANALYTICS",dt=(Q={"Adobe Analytics":ft,ADOBEANALYTICS:ft,"ADOBE ANALYTICS":ft},a(Q,ft,ft),a(Q,"AdobeAnalytics",ft),a(Q,"adobeanalytics",ft),a(Q,"adobe analytics",ft),a(Q,"Adobe analytics",ft),a(Q,"adobe Analytics",ft),Q),pt="AM",gt=(z={},a(z,pt,pt),a(z,"AMPLITUDE",pt),a(z,"Amplitude",pt),a(z,"am",pt),z),yt="APPCUES",vt=(q={},a(q,yt,yt),a(q,"Appcues",yt),a(q,"App Cues",yt),a(q,"appcues",yt),q),mt="BINGADS",It=(V={},a(V,mt,mt),a(V,"BingAds",mt),a(V,"bingads",mt),a(V,"Bing Ads",mt),a(V,"Bing ads",mt),a(V,"bing Ads",mt),a(V,"bing ads",mt),V),bt="BRAZE",kt=(W={},a(W,bt,bt),a(W,"Braze",bt),a(W,"braze",bt),W),At="BUGSNAG",Et=(Y={},a(Y,At,At),a(Y,"bugsnag",At),a(Y,"Bugsnag",At),Y),Ct="CHARTBEAT",St=(X={},a(X,Ct,Ct),a(X,"Chartbeat",Ct),a(X,"chartbeat",Ct),a(X,"Chart Beat",Ct),a(X,"chart beat",Ct),X),wt="CLEVERTAP",Tt=(J={},a(J,wt,wt),a(J,"Clevertap",wt),a(J,"clevertap",wt),J),Ot="COMSCORE",_t=($={},a($,Ot,Ot),a($,"Comscore",Ot),a($,"Com Score",Ot),a($,"com Score",Ot),a($,"com score",Ot),a($,"Com score",Ot),$),Rt="CRITEO",Pt=(Z={},a(Z,Rt,Rt),a(Z,"Criteo",Rt),a(Z,"criteo",Rt),Z),Dt="CUSTOMERIO",Lt=(ee={},a(ee,Dt,Dt),a(ee,"Customerio",Dt),a(ee,"Customer.io",Dt),a(ee,"CUSTOMER.IO",Dt),a(ee,"customer.io",Dt),ee),xt="DRIP",Mt=(te={},a(te,xt,xt),a(te,"Drip",xt),a(te,"drip",xt),te),Bt="FACEBOOK_PIXEL",Nt=(ne={},a(ne,Bt,Bt),a(ne,"FB Pixel",Bt),a(ne,"Facebook Pixel",Bt),a(ne,"facebook pixel",Bt),a(ne,"fbpixel",Bt),a(ne,"FBPIXEL",Bt),a(ne,"FB_PIXEL",Bt),ne),jt="FULLSTORY",Ft=(re={},a(re,jt,jt),a(re,"Fullstory",jt),a(re,"FullStory",jt),a(re,"full Story",jt),a(re,"Full Story",jt),a(re,"Full story",jt),a(re,"full story",jt),a(re,"fullstory",jt),re),Gt="GA",Ut=(ie={},a(ie,Gt,Gt),a(ie,"Google Analytics",Gt),a(ie,"GoogleAnalytics",Gt),a(ie,"GOOGLE ANALYTICS",Gt),a(ie,"google analytics",Gt),ie),Ht="GA4",Kt=(oe={},a(oe,Ht,Ht),a(oe,"Google Analytics 4",Ht),a(oe,"Google analytics 4",Ht),a(oe,"google analytics 4",Ht),a(oe,"Google Analytics4",Ht),a(oe,"Google analytics4",Ht),a(oe,"google analytics4",Ht),a(oe,"Google Analytics 4 (GA4)",Ht),a(oe,"google analytics 4 (ga4)",Ht),a(oe,"GoogleAnalytics4",Ht),oe),Qt="GOOGLEADS",zt=(se={},a(se,Qt,Qt),a(se,"Google Ads",Qt),a(se,"GoogleAds",Qt),a(se,"GOOGLE ADS",Qt),a(se,"google ads",Qt),a(se,"googleads",Qt),se),qt="GOOGLE_OPTIMIZE",Vt=(ae={},a(ae,qt,qt),a(ae,"Google Optimize",qt),a(ae,"GoogleOptimize",qt),a(ae,"Googleoptimize",qt),a(ae,"GOOGLEOPTIMIZE",qt),a(ae,"google optimize",qt),a(ae,"Google optimize",qt),a(ae,"GOOGLE OPTIMIZE",qt),ae),Wt="GTM",Yt=(ue={},a(ue,Wt,Wt),a(ue,"Google Tag Manager",Wt),a(ue,"google tag manager",Wt),a(ue,"googletag manager",Wt),a(ue,"googletagmanager",Wt),ue),Xt="HEAP",Jt=(a(ce={},Xt,Xt),a(ce,"Heap",Xt),a(ce,"heap",Xt),a(ce,"Heap.io",Xt),ce),$t="HOTJAR",Zt=(a(le={},$t,$t),a(le,"Hotjar",$t),a(le,"hotjar",$t),a(le,"Hot Jar",$t),a(le,"hot jar",$t),le),en="HS",tn=(a(he={},en,en),a(he,"Hubspot",en),a(he,"HUBSPOT",en),a(he,"hub spot",en),a(he,"Hub Spot",en),a(he,"Hub spot",en),he),nn="INTERCOM",rn=(a(fe={},nn,nn),a(fe,"Intercom",nn),a(fe,"intercom",nn),fe),on="KEEN",sn=(a(de={},on,on),a(de,"Keen",on),a(de,"Keen.io",on),a(de,"keen",on),a(de,"keen.io",on),de),an="KISSMETRICS",un=(a(pe={},an,an),a(pe,"Kissmetrics",an),a(pe,"kissmetrics",an),pe),cn="KLAVIYO",ln=(a(ge={},cn,cn),a(ge,"Klaviyo",cn),a(ge,"klaviyo",cn),ge),hn="LAUNCHDARKLY",fn=(a(ye={},hn,hn),a(ye,"LaunchDarkly",hn),a(ye,"Launch_Darkly",hn),a(ye,"Launch Darkly",hn),a(ye,"launchDarkly",hn),a(ye,"launch darkly",hn),ye),dn="LINKEDIN_INSIGHT_TAG",pn=(a(ve={},dn,dn),a(ve,"LinkedIn Insight Tag",dn),a(ve,"LinkedIn insight tag",dn),a(ve,"linkedIn insight tag",dn),a(ve,"Linkedin_insight_tag",dn),a(ve,"LinkedinInsighttag",dn),a(ve,"LinkedinInsightTag",dn),a(ve,"LinkedInInsightTag",dn),a(ve,"Linkedininsighttag",dn),a(ve,"LINKEDININSIGHTTAG",dn),a(ve,"linkedininsighttag",dn),ve),gn="LOTAME",yn=(a(me={},gn,gn),a(me,"Lotame",gn),a(me,"lotame",gn),me),vn="LYTICS",mn=(a(Ie={},vn,vn),a(Ie,"Lytics",vn),a(Ie,"lytics",vn),Ie),In="MP",bn=(a(be={},In,In),a(be,"MIXPANEL",In),a(be,"Mixpanel",In),a(be,"MIX PANEL",In),a(be,"Mix panel",In),a(be,"Mix Panel",In),be),kn="MOENGAGE",An=(a(ke={},kn,kn),a(ke,"MoEngage",kn),a(ke,"moengage",kn),a(ke,"Moengage",kn),a(ke,"Mo Engage",kn),a(ke,"mo engage",kn),a(ke,"Mo engage",kn),ke),En="OPTIMIZELY",Cn=(a(Ae={},En,En),a(Ae,"Optimizely",En),a(Ae,"optimizely",En),Ae),Sn="PENDO",wn=(a(Ee={},Sn,Sn),a(Ee,"Pendo",Sn),a(Ee,"pendo",Sn),Ee),Tn="PINTEREST_TAG",On=(a(Ce={},Tn,Tn),a(Ce,"PinterestTag",Tn),a(Ce,"Pinterest_Tag",Tn),a(Ce,"PINTERESTTAG",Tn),a(Ce,"pinterest",Tn),a(Ce,"PinterestAds",Tn),a(Ce,"Pinterest_Ads",Tn),a(Ce,"Pinterest",Tn),a(Ce,"Pinterest Tag",Tn),a(Ce,"Pinterest tag",Tn),a(Ce,"PINTEREST TAG",Tn),a(Ce,"pinterest tag",Tn),a(Ce,"Pinterest Ads",Tn),a(Ce,"Pinterest ads",Tn),Ce),_n="POST_AFFILIATE_PRO",Rn=(a(Se={},_n,_n),a(Se,"PostAffiliatePro",_n),a(Se,"Post_affiliate_pro",_n),a(Se,"Post Affiliate Pro",_n),a(Se,"Post affiliate pro",_n),a(Se,"post affiliate pro",_n),a(Se,"postaffiliatepro",_n),a(Se,"POSTAFFILIATEPRO",_n),Se),Pn="POSTHOG",Dn=(a(we={},Pn,Pn),a(we,"PostHog",Pn),a(we,"Posthog",Pn),a(we,"posthog",Pn),a(we,"Post Hog",Pn),a(we,"Post hog",Pn),a(we,"post hog",Pn),we),Ln="PROFITWELL",xn=(a(Te={},Ln,Ln),a(Te,"ProfitWell",Ln),a(Te,"profitwell",Ln),a(Te,"Profitwell",Ln),a(Te,"Profit Well",Ln),a(Te,"profit well",Ln),a(Te,"Profit well",Ln),Te),Mn="QUALTRICS",Bn=(a(Oe={},Mn,Mn),a(Oe,"Qualtrics",Mn),a(Oe,"qualtrics",Mn),Oe),Nn="QUANTUMMETRIC",jn=(a(_e={},Nn,Nn),a(_e,"Quantum Metric",Nn),a(_e,"quantum Metric",Nn),a(_e,"quantum metric",Nn),a(_e,"QuantumMetric",Nn),a(_e,"quantumMetric",Nn),a(_e,"quantummetric",Nn),a(_e,"Quantum_Metric",Nn),_e),Fn="REDDIT_PIXEL",Gn=(a(Re={},Fn,Fn),a(Re,"Reddit_Pixel",Fn),a(Re,"RedditPixel",Fn),a(Re,"REDDITPIXEL",Fn),a(Re,"redditpixel",Fn),a(Re,"Reddit Pixel",Fn),a(Re,"REDDIT PIXEL",Fn),a(Re,"reddit pixel",Fn),Re),Un="SENTRY",Hn=(a(Pe={},Un,Un),a(Pe,"sentry",Un),a(Pe,"Sentry",Un),Pe),Kn="SNAP_PIXEL",Qn=(a(De={},Kn,Kn),a(De,"Snap_Pixel",Kn),a(De,"SnapPixel",Kn),a(De,"SNAPPIXEL",Kn),a(De,"snappixel",Kn),a(De,"Snap Pixel",Kn),a(De,"SNAP PIXEL",Kn),a(De,"snap pixel",Kn),De),zn="TVSQUARED",qn=(a(Le={},zn,zn),a(Le,"TVSquared",zn),a(Le,"tvsquared",zn),a(Le,"tvSquared",zn),a(Le,"TvSquared",zn),a(Le,"Tvsquared",zn),a(Le,"TV Squared",zn),a(Le,"tv squared",zn),a(Le,"tv Squared",zn),Le),Vn="VWO",Wn=(a(xe={},Vn,Vn),a(xe,"VisualWebsiteOptimizer",Vn),a(xe,"Visualwebsiteoptimizer",Vn),a(xe,"visualwebsiteoptimizer",Vn),a(xe,"vwo",Vn),a(xe,"Visual Website Optimizer",Vn),a(xe,"Visual website optimizer",Vn),a(xe,"visual website optimizer",Vn),xe),Yn="GA360",Xn=(a(Me={},Yn,Yn),a(Me,"Google Analytics 360",Yn),a(Me,"Google analytics 360",Yn),a(Me,"google analytics 360",Yn),a(Me,"Google Analytics360",Yn),a(Me,"Google analytics360",Yn),a(Me,"google analytics360",Yn),a(Me,"GoogleAnalytics360",Yn),a(Me,"GA 360",Yn),Me),Jn="ADROLL",$n=(a(Be={},Jn,Jn),a(Be,"Adroll",Jn),a(Be,"Ad roll",Jn),a(Be,"ad roll",Jn),a(Be,"adroll",Jn),Be),Zn="DCM_FLOODLIGHT",er=(a(Ne={},Zn,Zn),a(Ne,"DCM Floodlight",Zn),a(Ne,"dcm floodlight",Zn),a(Ne,"Dcm Floodlight",Zn),a(Ne,"DCMFloodlight",Zn),a(Ne,"dcmfloodlight",Zn),a(Ne,"DcmFloodlight",Zn),a(Ne,"dcm_floodlight",Zn),a(Ne,"DCM_Floodlight",Zn),Ne),tr="MATOMO",nr=(a(je={},tr,tr),a(je,"Matomo",tr),a(je,"matomo",tr),je),rr="VERO",ir=(a(Fe={},rr,rr),a(Fe,"Vero",rr),a(Fe,"vero",rr),Fe),or="MOUSEFLOW",sr=(a(Ge={},or,or),a(Ge,"Mouseflow",or),a(Ge,"mouseflow",or),a(Ge,"mouseFlow",or),a(Ge,"MouseFlow",or),a(Ge,"Mouse flow",or),a(Ge,"mouse flow",or),a(Ge,"mouse Flow",or),a(Ge,"Mouse Flow",or),Ge),ar="ROCKERBOX",ur=(a(Ue={},ar,ar),a(Ue,"Rockerbox",ar),a(Ue,"rockerbox",ar),a(Ue,"RockerBox",ar),a(Ue,"Rocker box",ar),a(Ue,"rocker box",ar),a(Ue,"Rocker Box",ar),Ue),cr="CONVERTFLOW",lr=(a(He={},cr,cr),a(He,"Convertflow",cr),a(He,"convertflow",cr),a(He,"convertFlow",cr),a(He,"ConvertFlow",cr),a(He,"Convert flow",cr),a(He,"convert flow",cr),a(He,"convert Flow",cr),a(He,"Convert Flow",cr),a(He,"CONVERT FLOW",cr),He),hr="SNAPENGAGE",fr=(a(Ke={},hr,hr),a(Ke,"SnapEngage",hr),a(Ke,"Snap_Engage",hr),a(Ke,"snapengage",hr),a(Ke,"SNAP ENGAGE",hr),a(Ke,"Snap Engage",hr),a(Ke,"snap engage",hr),Ke),dr="LIVECHAT",pr=(a(Qe={},dr,dr),a(Qe,"LiveChat",dr),a(Qe,"Live_Chat",dr),a(Qe,"livechat",dr),a(Qe,"LIVE CHAT",dr),a(Qe,"Live Chat",dr),a(Qe,"live chat",dr),Qe),gr="SHYNET",yr=(a(ze={},gr,gr),a(ze,"shynet",gr),a(ze,"ShyNet",gr),a(ze,"shyNet",gr),a(ze,"Shynet",gr),a(ze,"shy net",gr),a(ze,"Shy Net",gr),a(ze,"shy Net",gr),a(ze,"Shy net",gr),ze),vr="WOOPRA",mr=(a(qe={},vr,vr),a(qe,"Woopra",vr),a(qe,"woopra",vr),qe),Ir="ROLLBAR",br=(a(Ve={},Ir,Ir),a(Ve,"RollBar",Ir),a(Ve,"Roll_Bar",Ir),a(Ve,"rollbar",Ir),a(Ve,"Rollbar",Ir),a(Ve,"ROLL BAR",Ir),a(Ve,"Roll Bar",Ir),a(Ve,"roll bar",Ir),Ve),kr="QUORA_PIXEL",Ar=(a(We={},kr,kr),a(We,"Quora Pixel",kr),a(We,"Quora pixel",kr),a(We,"QUORA PIXEL",kr),a(We,"QuoraPixel",kr),a(We,"Quorapixel",kr),a(We,"QUORAPIXEL",kr),a(We,"Quora_Pixel",kr),a(We,"quora_pixel",kr),a(We,"Quora",kr),We),Er="JUNE",Cr=(a(Ye={},Er,Er),a(Ye,"June",Er),a(Ye,"june",Er),Ye),Sr="ENGAGE",wr=(a(Xe={},Sr,Sr),a(Xe,"Engage",Sr),a(Xe,"engage",Sr),Xe),Tr="ITERABLE",Or=(a(Je={},Tr,Tr),a(Je,"Iterable",Tr),a(Je,"iterable",Tr),Je),_r="YANDEX_METRICA",Rr=(a($e={},_r,_r),a($e,"Yandexmetrica",_r),a($e,"yandexmetrica",_r),a($e,"yandexMetrica",_r),a($e,"YandexMetrica",_r),$e),Pr="REFINER",Dr=(a(Ze={},Pr,Pr),a(Ze,"Refiner",Pr),a(Ze,"refiner",Pr),Ze),Lr="QUALAROO",xr=(a(et={},Lr,Lr),a(et,"Qualaroo",Lr),a(et,"qualaroo",Lr),et),Mr="PODSIGHTS",Br=(a(tt={},Mr,Mr),a(tt,"Podsights",Mr),a(tt,"PodSights",Mr),a(tt,"pod Sights",Mr),a(tt,"Pod Sights",Mr),a(tt,"pod sights",Mr),a(tt,"POD SIGHTS",Mr),a(tt,"Pod sights",Mr),tt),Nr="AXEPTIO",jr=(a(nt={},Nr,Nr),a(nt,"Axeptio",Nr),a(nt,"axeptio",Nr),nt),Fr="SATISMETER",Gr=(a(rt={},Fr,Fr),a(rt,"Satismeter",Fr),a(rt,"SatisMeter",Fr),a(rt,"SATISMETER",Fr),rt),Ur="MICROSOFT_CLARITY",Hr=(a(it={},Ur,Ur),a(it,"Microsoft Clarity",Ur),a(it,"Microsoft clarity",Ur),a(it,"microsoft clarity",Ur),a(it,"Microsoft_clarity",Ur),a(it,"MicrosoftClarity",Ur),a(it,"MICROSOFTCLARITY",Ur),a(it,"microsoftclarity",Ur),a(it,"microsoftClarity",Ur),it),Kr="SENDINBLUE",Qr=(a(ot={},Kr,Kr),a(ot,"Sendinblue",Kr),a(ot,"sendinblue",Kr),a(ot,"SendinBlue",Kr),ot),zr="OLARK",qr=(a(st={},zr,zr),a(st,"Olark",zr),a(st,"olark",zr),st),Vr="LEMNISK",Wr=(a(at={},Vr,Vr),a(at,"LEMNISK_MARKETING_AUTOMATION",Vr),a(at,"Lemnisk Marketing Automation",Vr),a(at,"LemniskMarketingAutomation",Vr),a(at,"lemniskmarketingautomation",Vr),a(at,"lemniskMarketingAutomation",Vr),a(at,"lemnisk",Vr),a(at,"Lemnisk",Vr),at),Yr="TIKTOK_ADS",Xr=(a(ut={},Yr,Yr),a(ut,"TiktokAds",Yr),a(ut,"TIKTOK_ADS",Yr),a(ut,"Tiktok ads",Yr),a(ut,"Tiktok Ads",Yr),a(ut,"Tik Tok Ads",Yr),a(ut,"tik tok ads",Yr),a(ut,"tiktokads",Yr),ut),Jr="ACTIVE_CAMPAIGN",$r=(a(ct={ActiveCampaign:Jr,"Active Campaign":Jr,"ACTIVE CAMPAIGN":Jr},Jr,Jr),a(ct,"activecampaign",Jr),a(ct,"active campaign",Jr),a(ct,"Active campaign",Jr),a(ct,"active Campaign",Jr),a(ct,"active_campaign",Jr),ct),Zr=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n({All:"All"},dt),gt),vt),It),kt),Et),St),Tt),_t),Pt),Lt),Mt),Nt),Ft),Ut),Kt),Xn),zt),Vt),Yt),Jt),Zt),tn),rn),sn),un),ln),fn),pn),yn),mn),bn),An),Cn),wn),On),Rn),Dn),xn),Bn),jn),Gn),Hn),Qn),qn),Wn),$n),er),nr),ir),sr),lr),fr),pr),yr),mr),br),Ar),Cr),wr),Or),ur),Rr),Dr),xr),Br),jr),Gr),Hr),Qr),qr),Wr),Xr),$r),ei={All:"All",GA:"Google Analytics",GOOGLEADS:"Google Ads",BRAZE:"Braze",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",CUSTOMERIO:"Customer IO",DCM_Floodlight:"DCM Floodlight",FACEBOOK_PIXEL:"Facebook Pixel",GTM:"Google Tag Manager",HOTJAR:"Hotjar",HS:"HubSpot",INTERCOM:"Intercom",KEEN:"Keen",KISSMETRICS:"Kiss Metrics",LOTAME:"Lotame",VWO:"VWO",OPTIMIZELY:"Optimizely Web",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"Google Analytics 4 (GA4)",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"PostHog",PROFITWELL:"ProfitWell",KLAVIYO:"Klaviyo",CLEVERTAP:"CleverTap",BINGADS:"Bing Ads",PINTEREST_TAG:"Pinterest Tag",SNAP_PIXEL:"Snap Pixel",LINKEDIN_INSIGHT_TAG:"Linkedin Insight Tag",REDDIT_PIXEL:"Reddit Pixel",DRIP:"Drip",HEAP:"Heap.io",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",SENTRY:"Sentry",GOOGLE_OPTIMIZE:"Google Optimize",POST_AFFILIATE_PRO:"Post Affiliate Pro",LAUNCHDARKLY:"LaunchDarkly",GA360:"Google Analytics 360",ADROLL:"Adroll",VERO:"Vero",MATOMO:"Matomo",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"Quora Pixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"Yandex.Metrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"Microsoft Clarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TikTok Ads",ACTIVE_CAMPAIGN:"ActiveCampaign"},ti=["anonymous_id","id","sent_at","received_at","timestamp","original_timestamp","event_text","event"],ni="v1.1",ri="js-integrations",ii="".concat("https://cdn.hightouch-events.com/js","/").concat(ni,"/").concat(ri),oi=1e4,si=1e3,ai="_RS",ui=["Lax","None","Strict"],ci=["oneTrust","ketch"],li=["library","consentManagement"],hi=["none","default","full"],fi={All:!0},di="Request failed with status:",pi=[di],gi=function(e){var t=window.HtEventsGlobals&&window.HtEventsGlobals.errorReporting;t&&e instanceof Error&&t.notify(e)},yi=function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return T(t);var n=T(e);return t.forEach((function(e,t){n[t]=vi(n[t],e)})),n},vi=function(e,t){return R(yi,e,t)},mi=function(e,t){return JSON.stringify(e,function(e){var t=[];return function(n,i){if(!e||null!=i){if("object"!==r(i)||null===i)return i;for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(i)?(ht.debug("Circular Reference detected for key: ".concat(n)),"[Circular Reference]"):(t.push(i),i)}}}(t))},Ii=function(e){return function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}(e)&&Object.keys(e).length>0},bi=function(e,t,n){var i,o;try{i="string"==typeof e?e:e instanceof Error||e.message?e.message:mi(e)}catch(e){i=""}if("object"===r(o=e)&&null!==o&&"target"in o){if(e.target&&"script"!==e.target.localName)return"";if(e.target.dataset&&("RS_JS_SDK"!==e.target.dataset.loader||"true"!==e.target.dataset.isnonnativesdk))return"";if(i="error in script loading:: src:: ".concat(e.target.src," id:: ").concat(e.target.id),"ad-block"===e.target.id)return n.page("EventsJS-Initiated","ad-block page request",{path:"/ad-blocked",title:i},n.sendAdblockPageOptions),""}return"[handleError]::".concat(t||"",' "').concat(i,'"')},ki=function(e,t,n){var r;try{r=bi(e,t,n)}catch(t){ht.error("[handleError] Exception:: ",t),ht.error("[handleError] Original error:: ",mi(e)),gi(t)}r&&(ht.error(r),function(e){return!e.message||!pi.some((function(t){return e.message.includes(t)}))}(e)&&gi(e))};function Ai(e){return e&&e.endsWith("/")?e.replace(/\/+$/,""):e}function Ei(){return window.crypto&&"function"==typeof window.crypto.getRandomValues?K():function(){var e,t=0,n="";if(!B||j+16>256){for(B=Array(t=256);t--;)B[t]=256*Math.random()|0;t=j=0}for(;t<16;t++)e=B[j+t],n+=6==t?F[15&e|64]:8==t?F[63&e|128]:F[e],1&t&&t>1&&t<11&&(n+="-");return j++,n}()}function Ci(){return(new Date).toISOString()}function Si(e,t){Object.keys(e).forEach((function(n){e.hasOwnProperty(n)&&(t[n]&&(e[t[n]]=e[n]),"All"!==n&&void 0!==t[n]&&t[n]!==n&&delete e[n])}))}function wi(e){Si(e,Zr)}function Ti(e){Si(e,ei)}function Oi(e,t){var n=[];if(!t||0===t.length)return n;var i=!0;void 0!==e.All&&(i=e.All);var o=[];return"string"==typeof t[0]?t.forEach((function(e){o.push({intgName:e,intObj:e})})):"object"===r(t[0])&&t.forEach((function(e){o.push({intgName:e.name,intObj:e})})),o.forEach((function(t){var r=t.intgName,o=t.intObj;if(i){var s=!0;void 0!==e[r]&&!1===Boolean(e[r])&&(s=!1),s&&n.push(o)}else void 0!==e[r]&&!0===Boolean(e[r])&&n.push(o)})),n}var _i=function(){for(var e,t=document.getElementsByTagName("script"),n=!1,r=0;r<t.length;r+=1){var i=Ai(t[r].getAttribute("src"));if(i){var o=i.match(/^.*events(-staging)?(\.min)?\.js$/);if(o){e=i,n=void 0!==o[1];break}}}return{sdkURL:e,isStaging:n}},Ri=function(e){return"string"==typeof e||null==e?e:JSON.stringify(e)},Pi={exports:{}};var Di,Li={exports:{}},xi=p(Object.freeze({__proto__:null,default:{}}));function Mi(){return Di||(Di=1,function(e,t){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==f&&f.crypto&&(n=f.crypto),!n)try{n=xi}catch(e){}var r=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},a=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=o.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}});var g=o.algo={};return o}(Math),n)}(Li)),Li.exports}var Bi,Ni={exports:{}};function ji(){return Bi||(Bi=1,function(e,t){var n;e.exports=(n=Mi(),function(){var e=n,t=e.lib.WordArray;function r(e,n,r){for(var i=[],o=0,s=0;s<n;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=a<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<n.length;o++)i[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return r(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.enc.Base64)}(Ni)),Ni.exports}var Fi,Gi={exports:{}};function Ui(){return Fi||(Fi=1,function(e,t){var n;e.exports=(n=Mi(),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],p=e[t+3],g=e[t+4],y=e[t+5],v=e[t+6],m=e[t+7],I=e[t+8],b=e[t+9],k=e[t+10],A=e[t+11],E=e[t+12],C=e[t+13],S=e[t+14],w=e[t+15],T=o[0],O=o[1],_=o[2],R=o[3];T=c(T,O,_,R,s,7,a[0]),R=c(R,T,O,_,u,12,a[1]),_=c(_,R,T,O,d,17,a[2]),O=c(O,_,R,T,p,22,a[3]),T=c(T,O,_,R,g,7,a[4]),R=c(R,T,O,_,y,12,a[5]),_=c(_,R,T,O,v,17,a[6]),O=c(O,_,R,T,m,22,a[7]),T=c(T,O,_,R,I,7,a[8]),R=c(R,T,O,_,b,12,a[9]),_=c(_,R,T,O,k,17,a[10]),O=c(O,_,R,T,A,22,a[11]),T=c(T,O,_,R,E,7,a[12]),R=c(R,T,O,_,C,12,a[13]),_=c(_,R,T,O,S,17,a[14]),T=l(T,O=c(O,_,R,T,w,22,a[15]),_,R,u,5,a[16]),R=l(R,T,O,_,v,9,a[17]),_=l(_,R,T,O,A,14,a[18]),O=l(O,_,R,T,s,20,a[19]),T=l(T,O,_,R,y,5,a[20]),R=l(R,T,O,_,k,9,a[21]),_=l(_,R,T,O,w,14,a[22]),O=l(O,_,R,T,g,20,a[23]),T=l(T,O,_,R,b,5,a[24]),R=l(R,T,O,_,S,9,a[25]),_=l(_,R,T,O,p,14,a[26]),O=l(O,_,R,T,I,20,a[27]),T=l(T,O,_,R,C,5,a[28]),R=l(R,T,O,_,d,9,a[29]),_=l(_,R,T,O,m,14,a[30]),T=h(T,O=l(O,_,R,T,E,20,a[31]),_,R,y,4,a[32]),R=h(R,T,O,_,I,11,a[33]),_=h(_,R,T,O,A,16,a[34]),O=h(O,_,R,T,S,23,a[35]),T=h(T,O,_,R,u,4,a[36]),R=h(R,T,O,_,g,11,a[37]),_=h(_,R,T,O,m,16,a[38]),O=h(O,_,R,T,k,23,a[39]),T=h(T,O,_,R,C,4,a[40]),R=h(R,T,O,_,s,11,a[41]),_=h(_,R,T,O,p,16,a[42]),O=h(O,_,R,T,v,23,a[43]),T=h(T,O,_,R,b,4,a[44]),R=h(R,T,O,_,E,11,a[45]),_=h(_,R,T,O,w,16,a[46]),T=f(T,O=h(O,_,R,T,d,23,a[47]),_,R,s,6,a[48]),R=f(R,T,O,_,m,10,a[49]),_=f(_,R,T,O,S,15,a[50]),O=f(O,_,R,T,y,21,a[51]),T=f(T,O,_,R,E,6,a[52]),R=f(R,T,O,_,p,10,a[53]),_=f(_,R,T,O,k,15,a[54]),O=f(O,_,R,T,u,21,a[55]),T=f(T,O,_,R,I,6,a[56]),R=f(R,T,O,_,w,10,a[57]),_=f(_,R,T,O,v,15,a[58]),O=f(O,_,R,T,C,21,a[59]),T=f(T,O,_,R,g,6,a[60]),R=f(R,T,O,_,A,10,a[61]),_=f(_,R,T,O,d,15,a[62]),O=f(O,_,R,T,b,21,a[63]),o[0]=o[0]+T|0,o[1]=o[1]+O|0,o[2]=o[2]+_|0,o[3]=o[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function l(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),n.MD5)}(Gi)),Gi.exports}var Hi,Ki={exports:{}},Qi={exports:{}};function zi(){return Hi||(Hi=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Mi(),r=(n=c).lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=s.SHA1=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var h=(r<<5|r>>>27)+u+a[c];h+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,u=s,s=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(u),n.HmacSHA1=o._createHmacHelper(u),c.SHA1)}(Qi)),Qi.exports}var qi,Vi,Wi={exports:{}};function Yi(){return Vi||(Vi=1,function(e,t){var n,r,i,o,s,a,u,c;e.exports=(c=Mi(),zi(),qi||(qi=1,function(e,t){var n;e.exports=(n=Mi(),void function(){var e=n,t=e.lib.Base,r=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,u=s.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}())}(Wi)),r=(n=c).lib,i=r.Base,o=r.WordArray,s=n.algo,a=s.MD5,u=s.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,i=r.hasher.create(),s=o.create(),a=s.words,u=r.keySize,c=r.iterations;a.length<u;){n&&i.update(n),n=i.update(e).finalize(t),i.reset();for(var l=1;l<c;l++)n=i.finalize(n),i.reset();s.concat(n)}return s.sigBytes=4*u,s}}),n.EvpKDF=function(e,t,n){return u.create(n).compute(e,t)},c.EvpKDF)}(Ki)),Ki.exports}var Xi,Ji={exports:{}};!function(e,t){var n;e.exports=(n=Mi(),ji(),Ui(),Yi(),Xi||(Xi=1,function(e,t){var n;e.exports=(n=Mi(),Yi(),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,o=r.WordArray,s=r.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var u=a.Base64,c=t.algo.EvpKDF,l=r.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?I:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()});r.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=t.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=h.CBC=function(){var t=f.extend();function n(t,n,r){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var u=o.create(s,r);e.concat(u)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var g=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(u)},parse:function(e){var t,n=u.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},v=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return g.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),m=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),s=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:s,salt:r})}},I=r.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:m}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))}(Ji)),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],o=[],s=[],a=[],u=[],c=[],l=[],h=[],f=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var g=e[n],y=e[g],v=e[y],m=257*e[p]^16843008*p;s[n]=m<<24|m>>>8,a[n]=m<<16|m>>>16,u[n]=m<<8|m>>>24,c[n]=m,m=16843009*v^65537*y^257*g^16843008*n,l[p]=m<<24|m>>>8,h[p]=m<<16|m>>>16,f[p]=m<<8|m>>>24,d[p]=m,n?(n=g^e[e[e[v^g]]],r^=e[e[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=t[s]:(c=o[s-1],s%n?n>6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[s/n|0]<<24),o[s]=o[s-n]^c);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var c=o[s];else c=o[s-4];a[u]=u<4||s<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<u;p++){var g=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[d++],y=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[d++],v=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[d++],m=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[d++];c=g,l=y,h=v,f=m}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[d++],y=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[d++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[d++],m=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[d++],e[t]=g,e[t+1]=y,e[t+2]=v,e[t+3]=m},keySize:8});e.AES=t._createHelper(g)}(),n.AES)}(Pi);var $i=d(Pi.exports),Zi={exports:{}};!function(e,t){e.exports=Mi().enc.Utf8}(Zi);var eo=d(Zi.exports),to="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function no(){throw new Error("setTimeout has not been defined")}function ro(){throw new Error("clearTimeout has not been defined")}var io=no,oo=ro;function so(e){if(io===setTimeout)return setTimeout(e,0);if((io===no||!io)&&setTimeout)return io=setTimeout,setTimeout(e,0);try{return io(e,0)}catch(t){try{return io.call(null,e,0)}catch(t){return io.call(this,e,0)}}}"function"==typeof to.setTimeout&&(io=setTimeout),"function"==typeof to.clearTimeout&&(oo=clearTimeout);var ao,uo=[],co=!1,lo=-1;function ho(){co&&ao&&(co=!1,ao.length?uo=ao.concat(uo):lo=-1,uo.length&&fo())}function fo(){if(!co){var e=so(ho);co=!0;for(var t=uo.length;t;){for(ao=uo,uo=[];++lo<t;)ao&&ao[lo].run();lo=-1,t=uo.length}ao=null,co=!1,function(e){if(oo===clearTimeout)return clearTimeout(e);if((oo===ro||!oo)&&clearTimeout)return oo=clearTimeout,clearTimeout(e);try{oo(e)}catch(t){try{return oo.call(null,e)}catch(t){return oo.call(this,e)}}}(e)}}function po(e,t){this.fun=e,this.array=t}po.prototype.run=function(){this.fun.apply(null,this.array)};function go(){}var yo=go,vo=go,mo=go,Io=go,bo=go,ko=go,Ao=go;var Eo=to.performance||{},Co=Eo.now||Eo.mozNow||Eo.msNow||Eo.oNow||Eo.webkitNow||function(){return(new Date).getTime()};var So=new Date;var wo,To,Oo={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];uo.push(new po(e,t)),1!==uo.length||co||so(fo)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:yo,addListener:vo,once:mo,off:Io,removeListener:bo,removeAllListeners:ko,emit:Ao,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Co.call(Eo),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-So)/1e3}},_o={exports:{}};function Ro(){if(To)return wo;To=1;var e=1e3,t=60*e,n=60*t,i=24*n,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}return wo=function(u,c){c=c||{};var l=r(u);if("string"===l&&u.length>0)return function(r){if((r=String(r)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*s;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*i;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(u);if("number"===l&&isFinite(u))return c.long?function(r){var o=Math.abs(r);if(o>=i)return a(r,o,i,"day");if(o>=n)return a(r,o,n,"hour");if(o>=t)return a(r,o,t,"minute");if(o>=e)return a(r,o,e,"second");return r+" ms"}(u):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))},wo}var Po=function(e){function t(e){var r,i,o,s=null;function a(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(a.enabled){var o=a,s=Number(new Date),u=s-(r||s);o.diff=u,o.prev=r,o.curr=s,r=s,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");var c=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";c++;var i=t.formatters[r];if("function"==typeof i){var s=n[c];e=i.call(o,s),n.splice(c,1),c--}return e})),t.formatArgs.call(o,n);var l=o.log||t.log;l.apply(o,n)}}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o)},set:function(e){s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,n){var r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){var e=[].concat(c(t.names.map(r)),c(t.skips.map(r).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=Ro(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(n){t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t};!function(e,t){var n;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==Oo&&"env"in Oo&&(e=Oo.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||function(){},e.exports=Po(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(_o,_o.exports);var Do=_o.exports,Lo=Do("cookie"),xo=function(e,t,n){switch(arguments.length){case 3:case 2:return Mo(e,t,n);case 1:return No(e);default:return Bo()}};function Mo(e,t,n){n=n||{};var r=jo(e)+"="+jo(t);null==t&&(n.maxage=-1),n.maxage&&(n.expires=new Date(+new Date+n.maxage)),n.path&&(r+="; path="+n.path),n.domain&&(r+="; domain="+n.domain),n.expires&&(r+="; expires="+n.expires.toUTCString()),n.samesite&&(r+="; samesite="+n.samesite),n.secure&&(r+="; secure"),document.cookie=r}function Bo(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[Fo((t=r[i].split("="))[0])]=Fo(t[1]);return n}(e)}function No(e){return Bo()[e]}function jo(e){try{return encodeURIComponent(e)}catch(t){Lo("error `encode(%o)` - %o",e,t)}}function Fo(e){try{return decodeURIComponent(e)}catch(t){Lo("error `decode(%o)` - %o",e,t)}}var Go=d(xo),Uo={exports:{}},Ho=Math.max,Ko=function(e,t){var n=t?t.length:0;if(!n)return[];for(var r=Ho(Number(e)||0,0),i=Ho(n-r,0),o=new Array(i),s=0;s<i;s+=1)o[s]=t[s+r];return o},Qo=Math.max,zo=function(e){if(null==e||!e.length)return[];for(var t=new Array(Qo(e.length-2,0)),n=1;n<e.length;n+=1)t[n-1]=e[n];return t},qo=Ko,Vo=zo,Wo=Object.prototype.hasOwnProperty,Yo=Object.prototype.toString,Xo=function(e){return Boolean(e)&&"object"===r(e)},Jo=function(e){return Boolean(e)&&"[object Object]"===Yo.call(e)},$o=function(e,t,n,r){return Wo.call(t,r)&&void 0===e[r]&&(e[r]=n),t},Zo=function(e,t,n,r){return Wo.call(t,r)&&(Jo(e[r])&&Jo(n)?e[r]=ts(e[r],n):void 0===e[r]&&(e[r]=n)),t},es=function(e,t){if(!Xo(t))return t;e=e||$o;for(var n=qo(2,arguments),r=0;r<n.length;r+=1)for(var i in n[r])e(t,n[r],n[r][i],i);return t},ts=function(e){return es.apply(null,[Zo,e].concat(Vo(arguments)))};Uo.exports=function(e){return es.apply(null,[null,e].concat(Vo(arguments)))},Uo.exports.deep=ts;var ns=d(Uo.exports),rs={exports:{}},is=Do("cookie"),os=function(e,t,n){switch(arguments.length){case 3:case 2:return ss(e,t,n);case 1:return us(e);default:return as()}};function ss(e,t,n){n=n||{};var r=cs(e)+"="+cs(t);null==t&&(n.maxage=-1),n.maxage&&(n.expires=new Date(+new Date+n.maxage)),n.path&&(r+="; path="+n.path),n.domain&&(r+="; domain="+n.domain),n.expires&&(r+="; expires="+n.expires.toUTCString()),n.secure&&(r+="; secure"),document.cookie=r}function as(){var e;try{e=document.cookie}catch(e){return"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e.stack||e),{}}return function(e){var t,n={},r=e.split(/ *; */);if(""==r[0])return n;for(var i=0;i<r.length;++i)n[ls((t=r[i].split("="))[0])]=ls(t[1]);return n}(e)}function us(e){return as()[e]}function cs(e){try{return encodeURIComponent(e)}catch(t){is("error `encode(%o)` - %o",e,t)}}function ls(e){try{return decodeURIComponent(e)}catch(t){is("error `decode(%o)` - %o",e,t)}}!function(e,t){var n=os;function r(e){for(var n=t.cookie,r=t.levels(e),i=0;i<r.length;++i){var o="__tld__",s=r[i],a={domain:"."+s};if(n(o,1,a),n(o))return n(o,null,a),s}return""}r.levels=function(e){var t,n,r=("function"!=typeof window.URL?(t=e,(n=document.createElement("a")).href=t,n.hostname):new URL(e).hostname).split("."),i=r[r.length-1],o=[];if(4===r.length&&i===parseInt(i,10))return o;if(r.length<=1)return o;for(var s=r.length-2;s>=0;--s)o.push(r.slice(s).join("."));return o},r.cookie=n,t=e.exports=r}(rs,rs.exports);var hs=d(rs.exports),fs=function(){function e(t){i(this,e),this.cOpts={},this.options(t),this.isSupportAvailable=this.checkSupportAvailability()}return s(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===arguments.length)return this.cOpts;var t=".".concat(hs(window.location.href));return"."===t&&(t=null),this.cOpts=ns(e,{maxage:31536e6,path:"/",domain:t,samesite:"Lax"}),this.cOpts}},{key:"set",value:function(e,t){try{return Go(e,t,T(this.cOpts)),!0}catch(e){return ht.error(e),!1}}},{key:"get",value:function(e){return Go(e)}},{key:"remove",value:function(e){try{return Go(e,null,T(this.cOpts)),!0}catch(e){return!1}}},{key:"checkSupportAvailability",value:function(){var e="test_htevents_cookie";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),ds=new fs({}),ps={exports:{}};!function(e,t){e.exports=function(){function e(e){return e=JSON.stringify(e),!!/^\{[\s\S]*\}$/.test(e)}function t(e){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e)}function n(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}}function r(e){return"[object Function]"==={}.toString.call(e)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){var t="_Is_Incognit",n="yes";try{e||(e=window.localStorage),e.setItem(t,n),e.removeItem(t)}catch(t){var r={_data:{},setItem:function(e,t){return r._data[e]=String(t)},getItem:function(e){return r._data.hasOwnProperty(e)?r._data[e]:void 0},removeItem:function(e){return delete r._data[e]},clear:function(){return r._data={}}};e=r}finally{e.getItem(t)===n&&e.removeItem(t)}return e}var s=o();function a(){if(!(this instanceof a))return new a}a.prototype={set:function(n,r){if(n&&!e(n))s.setItem(n,t(r));else if(e(n))for(var i in n)this.set(i,n[i]);return this},get:function(e){if(!e){var t={};return this.forEach((function(e,n){return t[e]=n})),t}if("?"===e.charAt(0))return this.has(e.substr(1));var r=arguments;if(r.length>1){for(var i={},o=0,a=r.length;o<a;o++){var u=n(s.getItem(r[o]));this.has(r[o])&&(i[r[o]]=u)}return i}return n(s.getItem(e))},clear:function(){return s.clear(),this},remove:function(e){var t=this.get(e);return s.removeItem(e),t},has:function(e){return{}.hasOwnProperty.call(this.get(),e)},keys:function(){var e=[];return this.forEach((function(t){e.push(t)})),e},forEach:function(e){for(var t=0,n=s.length;t<n;t++){var r=s.key(t);e(r,this.get(r))}return this},search:function(e){for(var t=this.keys(),n={},r=0,i=t.length;r<i;r++)t[r].indexOf(e)>-1&&(n[t[r]]=this.get(t[r]));return n}};var u=null;function c(t,n){var o=arguments,s=null;if(u||(u=a()),0===o.length)return u.get();if(1===o.length){if("string"==typeof t)return u.get(t);if(e(t))return u.set(t)}if(2===o.length&&"string"==typeof t){if(!n)return u.remove(t);if(n&&"string"==typeof n)return u.set(t,n);n&&r(n)&&(s=null,s=n(t,u.get(t)),c.set(t,s))}if(2===o.length&&i(t)&&r(n))for(var l=0,h=t.length;l<h;l++)s=n(t[l],u.get(t[l])),c.set(t[l],s);return c}for(var l in a.prototype)c[l]=a.prototype[l];return c}()}(ps);var gs=d(ps.exports),ys=function(){function e(t){i(this,e),this.sOpts={},this.enabled=this.checkSupportAvailability(),this.options(t)}return s(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===arguments.length||(ns(e,{enabled:!0}),this.enabled=e.enabled&&this.enabled,this.sOpts=e),this.sOpts}},{key:"set",value:function(e,t){return gs.set(e,t)}},{key:"get",value:function(e){return gs.get(e)}},{key:"remove",value:function(e){return gs.remove(e)}},{key:"checkSupportAvailability",value:function(){var e="test_htevents_ls";return this.set(e,!0),!!this.get(e)&&(this.remove(e),!0)}}]),e}(),vs=new ys({}),ms=function(e){return(new TextDecoder).decode((t=e,n=globalThis.atob(t).split("").map((function(e){return e.charCodeAt(0)})),new Uint8Array(n)));var t,n},Is="htev_user_id",bs="htev_trait",ks="htev_anonymous_id",As="htev_group_id",Es="htev_group_trait",Cs="htev_page_init_referrer",Ss="htev_page_init_referring_domain",ws="htev_session",Ts="htev_auth_token",Os="HtEvEncrypt:",_s="HtEv_ENC_v3_",Rs="HTEV",Ps="RudderEncrypt:",Ds="RS_ENC_v3_",Ls="Rudder",xs={segment:"ajs_anonymous_id",rudder:"rl_anonymous_id"},Ms={segment:"ajs_user_id",rudder:"rl_user_id"};function Bs(e){try{return e?JSON.parse(e):null}catch(t){return ht.error(t),e||null}}function Ns(e){return e.replace(/^\s+|\s+$/gm,"")}function js(e){return e&&"string"==typeof e&&""!==Ns(e)?e.substring(0,Os.length)===Os?$i.decrypt(e.substring(Os.length),Rs).toString(eo):e.substring(0,_s.length)===_s?ms(e.substring(_s.length)):e:e}var Fs=function(){function e(){i(this,e),ds.isSupportAvailable?this.storage=ds:(vs.enabled&&(this.storage=vs),this.storage||ht.error("No storage is available :: initializing the SDK without storage"))}return s(e,[{key:"options",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.storage.options(e)}},{key:"setItem",value:function(e,t){this.storage.set(e,function(e){return""===Ns(e)?e:"".concat(Os).concat($i.encrypt(e,Rs).toString())}(function(e){return JSON.stringify(e)}(t)))}},{key:"setStringItem",value:function(e,t){"string"==typeof t?this.setItem(e,t):ht.error("[Storage] ".concat(e," should be string"))}},{key:"setUserId",value:function(e){this.setStringItem(Is,e)}},{key:"setUserTraits",value:function(e){this.setItem(bs,e)}},{key:"setGroupId",value:function(e){this.setStringItem(As,e)}},{key:"setGroupTraits",value:function(e){this.setItem(Es,e)}},{key:"setAnonymousId",value:function(e){this.setStringItem(ks,e)}},{key:"setInitialReferrer",value:function(e){this.setItem(Cs,e)}},{key:"setInitialReferringDomain",value:function(e){this.setItem(Ss,e)}},{key:"setSessionInfo",value:function(e){this.setItem(ws,e)}},{key:"setAuthToken",value:function(e){this.setItem(Ts,e)}},{key:"getItem",value:function(e){return Bs(js(this.storage.get(e)))}},{key:"getUserId",value:function(e){var t=this.getItem(Is);return t||this.fetchExternalValue(e,Ms)}},{key:"getUserTraits",value:function(){return this.getItem(bs)}},{key:"getGroupId",value:function(){return this.getItem(As)}},{key:"getGroupTraits",value:function(){return this.getItem(Es)}},{key:"fetchExternalValue",value:function(e,t){var n;try{var r=N(e,"autoCapture.source");if("string"!=typeof r||!0!==N(e,"autoCapture.enabled"))return n;if("auto"===r)for(var i=Object.keys(t);!n&&i.length>0;)n=this.fetchExternalValueFromSource(t,i.pop());else n=this.fetchExternalValueFromSource(t,r);if(n)return n}catch(e){}return n}},{key:"fetchExternalValueFromSource",value:function(e,t){var n,r,i=t.toLowerCase();if(!Object.keys(e).includes(i))return n;switch(i){case"segment":return vs.enabled&&(n=vs.get(e.segment)),!n&&ds.isSupportAvailable&&(n=ds.get(e.segment)),n;case"rudder":case"rudderstack":return ds.isSupportAvailable&&(r=ds.get(e.rudder)),!r&&vs.enabled&&(r=vs.get(e.rudder)),Bs(function(e){return e&&"string"==typeof e&&""!==Ns(e)?e.substring(0,Ps.length)===Ps?$i.decrypt(e.substring(Ps.length),Ls).toString(eo):e.substring(0,Ds.length)===Ds?ms(e.substring(Ds.length)):e:e}(r));default:return n}}},{key:"fetchExternalAnonymousId",value:function(e){return this.fetchExternalValueFromSource(xs,e)}},{key:"getAnonymousId",value:function(e){var t=Bs(js(this.storage.get(ks)));return t||this.fetchExternalValue(e,xs)}},{key:"getInitialReferrer",value:function(){return this.getItem(Cs)}},{key:"getInitialReferringDomain",value:function(){return this.getItem(Ss)}},{key:"getSessionInfo",value:function(){return this.getItem(ws)}},{key:"getAuthToken",value:function(){return this.getItem(Ts)}},{key:"removeItem",value:function(e){return this.storage.remove(e)}},{key:"removeSessionInfo",value:function(){this.removeItem(ws)}},{key:"clear",value:function(e){this.storage.remove(Is),this.storage.remove(bs),this.storage.remove(As),this.storage.remove(Es),this.storage.remove(Ts),e&&this.storage.remove(ks)}}]),e}(),Gs=new Fs;function Us(){return document.referrer||"$direct"}function Hs(e){var t=e.split("/");return t.length>=3?t[2]:""}function Ks(){for(var e=document.getElementsByTagName("link"),t=0;e[t];t+=1){var n=e[t];if("canonical"===n.getAttribute("rel"))return n.getAttribute("href")}}function Qs(){var e=Ks(),t=window.location.pathname;if(e)try{t=new URL(e).pathname}catch(e){}var n=window.location,r=n.search,i=n.href,o=document.title,s=function(e){var t,n=Ks(),r=(t=n?n.includes("?")?n:n+e:window.location.href).indexOf("#");return r>-1?t.slice(0,r):t}(r),a=i,u=Us();return{path:t,referrer:u,referring_domain:Hs(u),search:r,title:o,url:s,tab_url:a,initial_referrer:Gs.getInitialReferrer()||"",initial_referring_domain:Gs.getInitialReferringDomain()||""}}for(var zs,qs=s((function e(){i(this,e),this.name="Events SDK JavaScript",this.namespace="com.hightouch.javascript",this.version="0.0.5"})),Vs=s((function e(){i(this,e),this.name="Events SDK JavaScript",this.version="0.0.5"})),Ws=s((function e(){i(this,e),this.name="",this.version=""})),Ys=s((function e(){i(this,e),this.density=0,this.width=0,this.height=0,this.innerWidth=0,this.innerHeight=0})),Xs=s((function e(){var t;i(this,e),this.app=new qs,this.traits=null,this.library=new Vs,this.userAgent=function(){if("undefined"==typeof navigator)return null;var e=navigator.userAgent,t=navigator.brave;if(t&&Object.getPrototypeOf(t).isBrave){var n=e.match(/(chrome)\/([\w.]+)/i);n&&(e="".concat(e," Brave/").concat(n[2]))}return e}(),this.device=null,this.network=null,this.os=new Ws,this.locale="undefined"==typeof navigator?null:navigator.language||navigator.browserLanguage,this.screen=(t=new Ys,"undefined"==typeof window||(t.width=window.screen.width,t.height=window.screen.height,t.density=window.devicePixelRatio,t.innerWidth=window.innerWidth,t.innerHeight=window.innerHeight),t)})),Js=function(){function e(){i(this,e),this.channel="web",this.context=new Xs,this.type=null,this.messageId=Ei(),this.originalTimestamp=(new Date).toISOString(),this.anonymousId=null,this.userId=null,this.event=null,this.properties={}}return s(e,[{key:"getProperty",value:function(e){return this.properties[e]}},{key:"addProperty",value:function(e,t){this.properties[e]=t}}]),e}(),$s=function(){function e(){i(this,e),this.message=new Js}return s(e,[{key:"setType",value:function(e){this.message.type=e}},{key:"setProperty",value:function(e){this.message.properties=e}},{key:"setUserProperty",value:function(e){this.message.user_properties=e}},{key:"setUserId",value:function(e){this.message.userId=e}},{key:"setEventName",value:function(e){this.message.event=e}},{key:"getElementContent",value:function(){return this.message}}]),e}(),Zs=function(){function e(){i(this,e),this.htProperty=null,this.htUserProperty=null,this.event=null,this.userId=null,this.type=null}return s(e,[{key:"setType",value:function(e){return this.type=e,this}},{key:"build",value:function(){var e=new $s;return e.setUserId(this.userId),e.setType(this.type),e.setEventName(this.event),e.setProperty(this.htProperty),e.setUserProperty(this.htUserProperty),e}}]),e}(),ea={},ta=256,na=[];ta--;)na[ta]=(ta+256).toString(16).substring(1);ea.v4=function(){var e,t=0,n="";if(!zs||ta+16>256){for(zs=Array(t=256);t--;)zs[t]=256*Math.random()|0;t=ta=0}for(;t<16;t++)e=zs[ta+t],n+=6==t?na[15&e|64]:8==t?na[63&e|128]:na[e],1&t&&t>1&&t<11&&(n+="-");return ta++,n};var ra={},ia=Object.prototype.hasOwnProperty,oa=String.prototype.charAt,sa=Object.prototype.toString,aa=function(e,t){return oa.call(e,t)},ua=function(e,t){return ia.call(e,t)},ca=function(e,t){t=t||ua;for(var n=[],r=0,i=e.length;r<i;r+=1)t(e,r)&&n.push(String(r));return n},la=function(e){return null==e?[]:(t=e,"[object String]"===sa.call(t)?ca(e,aa):function(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}(e)?ca(e,ua):function(e,t){t=t||ua;var n=[];for(var r in e)t(e,r)&&n.push(String(r));return n}(e));var t},ha=la,fa=ea.v4,da={_data:{},length:0,setItem:function(e,t){return this._data[e]=t,this.length=ha(this._data).length,t},getItem:function(e){return e in this._data?this._data[e]:null},removeItem:function(e){return e in this._data&&delete this._data[e],this.length=ha(this._data).length,null},clear:function(){this._data={},this.length=0},key:function(e){return ha(this._data)[e]}};ra.defaultEngine=function(){try{if(!window.localStorage)return!1;var e=fa();window.localStorage.setItem(e,"test_value");var t=window.localStorage.getItem(e);return window.localStorage.removeItem(e),"test_value"===t}catch(e){return!1}}()?window.localStorage:da,ra.inMemoryEngine=da;var pa=la,ga=Object.prototype.toString,ya="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===ga.call(e)},va=function(e){return null!=e&&(ya(e)||"function"!==e&&function(e){var t=r(e);return"number"===t||"object"===t&&"[object Number]"===ga.call(e)}(e.length))},ma=function(e,t){for(var n=0;n<t.length&&!1!==e(t[n],n,t);n+=1);},Ia=function(e,t){for(var n=pa(t),r=0;r<n.length&&!1!==e(t[n[r]],n[r],t);r+=1);},ba=function(e,t){return(va(t)?ma:Ia).call(this,e,t)},ka=ra.defaultEngine,Aa=ra.inMemoryEngine,Ea=ba,Ca=la,Sa=JSON;function wa(e,t,n,r){this.id=t,this.name=e,this.keys=n||{},this.engine=r||ka,this.originalEngine=this.engine}wa.prototype.set=function(e,t){var n=this._createValidKey(e);if(n)try{this.engine.setItem(n,Sa.stringify(t))}catch(n){(function(e){var t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t})(n)&&(this._swapEngine(),this.set(e,t))}},wa.prototype.get=function(e){try{var t=this.engine.getItem(this._createValidKey(e));return null===t?null:Sa.parse(t)}catch(e){return null}},wa.prototype.getOriginalEngine=function(){return this.originalEngine},wa.prototype.remove=function(e){this.engine.removeItem(this._createValidKey(e))},wa.prototype._createValidKey=function(e){var t,n=this.name,r=this.id;return Ca(this.keys).length?(Ea((function(i){i===e&&(t=[n,r,e].join("."))}),this.keys),t):[n,r,e].join(".")},wa.prototype._swapEngine=function(){var e=this;Ea((function(t){var n=e.get(t);Aa.setItem([e.name,e.id,t].join("."),n),e.remove(t)}),this.keys),this.engine=Aa};var Ta=wa;var Oa=ba,_a={setTimeout:function(e,t){return window.setTimeout(e,t)},clearTimeout:function(e){return window.clearTimeout(e)},Date:window.Date},Ra=_a,Pa={ASAP:1,RESCHEDULE:2,ABANDON:3};function Da(){this.tasks={},this.nextId=1}Da.prototype.now=function(){return+new Ra.Date},Da.prototype.run=function(e,t,n){var r=this.nextId++;return this.tasks[r]=Ra.setTimeout(this._handle(r,e,t,n||Pa.ASAP),t),r},Da.prototype.cancel=function(e){this.tasks[e]&&(Ra.clearTimeout(this.tasks[e]),delete this.tasks[e])},Da.prototype.cancelAll=function(){Oa(Ra.clearTimeout,this.tasks),this.tasks={}},Da.prototype._handle=function(e,t,n,r){var i=this,o=i.now();return function(){if(delete i.tasks[e],!(r>=Pa.RESCHEDULE&&o+2*n<i.now()))return t();r===Pa.RESCHEDULE&&i.run(t,n,r)}},Da.setClock=function(e){Ra=e},Da.resetClock=function(){Ra=_a},Da.Modes=Pa;var La=Da,xa=ea.v4,Ma=Ta,Ba=ba,Na=La,ja=Do("localstorage-retry");function Fa(e,t){return function(){return e.apply(t,arguments)}}function Ga(e,t,n){"function"==typeof t&&(n=t),this.name=e,this.id=xa(),this.fn=n,this.maxItems=t.maxItems||1/0,this.maxAttempts=t.maxAttempts||1/0,this.backoff={MIN_RETRY_DELAY:t.minRetryDelay||1e3,MAX_RETRY_DELAY:t.maxRetryDelay||3e4,FACTOR:t.backoffFactor||2,JITTER:t.backoffJitter||0},this.timeouts={ACK_TIMER:1e3,RECLAIM_TIMER:3e3,RECLAIM_TIMEOUT:1e4,RECLAIM_WAIT:500},this.keys={IN_PROGRESS:"inProgress",QUEUE:"queue",RECLAIM_START:"reclaimStart",RECLAIM_END:"reclaimEnd",ACK:"ack"},this._schedule=new Na,this._processId=0,this._store=new Ma(this.name,this.id,this.keys),this._store.set(this.keys.IN_PROGRESS,{}),this._store.set(this.keys.QUEUE,[]),this._ack=Fa(this._ack,this),this._checkReclaim=Fa(this._checkReclaim,this),this._processHead=Fa(this._processHead,this),this._running=!1}y(Ga.prototype),Ga.prototype.start=function(){this._running&&this.stop(),this._running=!0,this._ack(),this._checkReclaim(),this._processHead()},Ga.prototype.stop=function(){this._schedule.cancelAll(),this._running=!1},Ga.prototype.shouldRetry=function(e,t){return!(t>this.maxAttempts)},Ga.prototype.getDelay=function(e){var t=this.backoff.MIN_RETRY_DELAY*Math.pow(this.backoff.FACTOR,e);if(this.backoff.JITTER){var n=Math.random(),r=Math.floor(n*this.backoff.JITTER*t);Math.floor(10*n)<5?t-=r:t+=r}return Number(Math.min(t,this.backoff.MAX_RETRY_DELAY).toPrecision(1))},Ga.prototype.addItem=function(e){this._enqueue({item:e,attemptNumber:0,time:this._schedule.now(),id:xa()})},Ga.prototype.requeue=function(e,t,n,r){this.shouldRetry(e,t,n)?this._enqueue({item:e,attemptNumber:t,time:this._schedule.now()+this.getDelay(t),id:r||xa()}):this.emit("discard",e,t)},Ga.prototype._enqueue=function(e){var t=this._store.get(this.keys.QUEUE)||[];(t=t.slice(-(this.maxItems-1))).push(e),t=t.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,t),this._running&&this._processHead()},Ga.prototype._processHead=function(){var e=this,t=this._store;this._schedule.cancel(this._processId);var n=t.get(this.keys.QUEUE)||[],r=t.get(this.keys.IN_PROGRESS)||{},i=this._schedule.now(),o=[];function s(n,r){o.push({item:n.item,done:function(i,o){var s=t.get(e.keys.IN_PROGRESS)||{};delete s[r],t.set(e.keys.IN_PROGRESS,s),e.emit("processed",i,o,n.item),i&&e.requeue(n.item,n.attemptNumber+1,i,n.id)}})}for(var a=Object.keys(r).length;n.length&&n[0].time<=i&&a++<e.maxItems;){var u=n.shift(),c=xa();r[c]={item:u.item,attemptNumber:u.attemptNumber,time:e._schedule.now()},s(u,c)}t.set(this.keys.QUEUE,n),t.set(this.keys.IN_PROGRESS,r),Ba((function(t){try{e.fn(t.item,t.done)}catch(e){ja("Process function threw error: "+e)}}),o),n=t.get(this.keys.QUEUE)||[],this._schedule.cancel(this._processId),n.length>0&&(this._processId=this._schedule.run(this._processHead,n[0].time-i,Na.Modes.ASAP))},Ga.prototype._ack=function(){this._store.set(this.keys.ACK,this._schedule.now()),this._store.set(this.keys.RECLAIM_START,null),this._store.set(this.keys.RECLAIM_END,null),this._schedule.run(this._ack,this.timeouts.ACK_TIMER,Na.Modes.ASAP)},Ga.prototype._checkReclaim=function(){var e=this;Ba((function(t){t.id!==e.id&&(e._schedule.now()-t.get(e.keys.ACK)<e.timeouts.RECLAIM_TIMEOUT||function(t){t.set(e.keys.RECLAIM_START,e.id),t.set(e.keys.ACK,e._schedule.now()),e._schedule.run((function(){t.get(e.keys.RECLAIM_START)===e.id&&(t.set(e.keys.RECLAIM_END,e.id),e._schedule.run((function(){t.get(e.keys.RECLAIM_END)===e.id&&t.get(e.keys.RECLAIM_START)===e.id&&e._reclaim(t.id)}),e.timeouts.RECLAIM_WAIT,Na.Modes.ABANDON))}),e.timeouts.RECLAIM_WAIT,Na.Modes.ABANDON)}(t))}),function(t){for(var n=[],r=e._store.getOriginalEngine(),i=0;i<r.length;i++){var o=r.key(i);if(null!==o){var s=o.split(".");3===s.length&&s[0]===t&&"ack"===s[2]&&n.push(new Ma(t,s[1],e.keys))}}return n}(this.name)),this._schedule.run(this._checkReclaim,this.timeouts.RECLAIM_TIMER,Na.Modes.RESCHEDULE)},Ga.prototype._reclaim=function(e){var t=this,n=new Ma(this.name,e,this.keys),r={queue:this._store.get(this.keys.QUEUE)||[]},i={inProgress:n.get(this.keys.IN_PROGRESS)||{},queue:n.get(this.keys.QUEUE)||[]},o=[],s=function(e,n){Ba((function(e){var i=e.id||xa();o.indexOf(i)>=0?t.emit("duplication",e.item,e.attemptNumber):(r.queue.push({item:e.item,attemptNumber:e.attemptNumber+n,time:t._schedule.now(),id:i}),o.push(i))}),e)};s(i.queue,0),s(i.inProgress,1),r.queue=r.queue.sort((function(e,t){return e.time-t.time})),this._store.set(this.keys.QUEUE,r.queue);try{this._clearOtherQueue(n,1)}catch(e){if("NS_ERROR_STORAGE_BUSY"===e.name||"NS_ERROR_STORAGE_BUSY"===e.code||2153971713===e.code)try{this._clearOtherQueue(n,40)}catch(e){console.error(e)}else console.error(e)}this._processHead()},Ga.prototype._clearOtherQueue=function(e,t){var n=this;setTimeout((function(){e.remove(n.keys.IN_PROGRESS),setTimeout((function(){e.remove(n.keys.QUEUE),setTimeout((function(){e.remove(n.keys.RECLAIM_START),setTimeout((function(){e.remove(n.keys.RECLAIM_END),setTimeout((function(){e.remove(n.keys.ACK)}),t)}),t)}),t)}),t)}),t)};var Ua=d(Ga),Ha={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:10,maxItems:100},Ka=function(){function e(){i(this,e),this.url="",this.writeKey=""}return s(e,[{key:"init",value:function(e,t,n){var r=this;this.url=t,this.writeKey=e,n&&u(Ha,n),this.payloadQueue=new Ua("htevents",Ha,(function(e,t){e.message.sentAt=Ci(),r.processQueueElement(e.url,e.headers,e.message,1e4,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"processQueueElement",value:function(e,t,n,r,i){try{var o=new XMLHttpRequest;for(var s in o.open("POST",e,!0),t)o.setRequestHeader(s,t[s]);o.timeout=r,o.ontimeout=i,o.onerror=i,o.onreadystatechange=function(){if(4===o.readyState)if(429===o.status||o.status>=500&&o.status<600){var t="".concat(di,' "').concat(o.status,'" status text: "').concat(o.statusText,'" for URL: "').concat(e,'"'),n=new Error(t);ki(n),i(n)}else i(null,o.status)},o.send(mi(n,!0))}catch(e){i(e)}}},{key:"enqueue",value:function(e,t){var n={"Content-Type":"application/json","App-Id":"".concat(this.writeKey),AnonymousId:btoa(e.anonymousId)};this.payloadQueue.addItem({url:"".concat(this.url,"/backend/external/v1/collections/").concat(t),headers:n,message:e})}}]),e}(),Qa="queue",za=64e3,qa=function(){function e(){i(this,e),this.storage=vs,this.maxItems=10,this.flushQueueTimeOut=void 0,this.timeOutActive=!1,this.flushQueueTimeOutInterval=6e5,this.url="",this.writekey="",this.queueName="".concat(Qa,".").concat(Date.now())}return s(e,[{key:"sendQueueDataForBeacon",value:function(){this.sendDataFromQueueAndDestroyQueue()}},{key:"init",value:function(e,t,n){this.url=t,this.writekey=e,n.maxItems&&(this.maxItems=n.maxItems),n.flushQueueInterval&&(this.flushQueueTimeOutInterval=n.flushQueueInterval),this.sendQueueDataForBeacon=this.sendQueueDataForBeacon.bind(this),this.attachListeners()}},{key:"attachListeners",value:function(){var e=this;window.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.sendQueueDataForBeacon()}))}},{key:"getQueue",value:function(){return this.storage.get(this.queueName)}},{key:"setQueue",value:function(e){this.storage.set(this.queueName,e)}},{key:"enqueue",value:function(e){var t=this.getQueue()||[];(t=t.slice(-(this.maxItems-1))).push(e);var n=t.slice(0);mi({batch:n},!0).length>za&&(n=t.slice(0,t.length-1),this.flushQueue(n),(t=this.getQueue()).push(e)),this.setQueue(t),this.setTimer(),t.length===this.maxItems&&this.flushQueue(n)}},{key:"sendDataFromQueueAndDestroyQueue",value:function(){this.sendDataFromQueue(),this.storage.remove(this.queueName)}},{key:"sendDataFromQueue",value:function(){var e=this.getQueue();if(e&&e.length>0){var t=e.slice(0,e.length);this.flushQueue(t)}}},{key:"flushQueue",value:function(e){if(e&&e.length>0){e.forEach((function(e){e.sentAt=(new Date).toISOString()}));var t=mi({batch:e},!0),n=new Blob([t],{type:"text/plain"}),r="".concat(this.url,"?writeKey=").concat(this.writekey);try{"function"!=typeof navigator.sendBeacon&&ki(new Error("Beacon API is not supported by browser")),navigator.sendBeacon(r,n)||ki(new Error("Unable to queue data to browser's beacon queue"))}catch(e){e.message="".concat(e.message," - While sending Beacon data to: ").concat(r),ki(e)}}this.setQueue([]),this.clearTimer()}},{key:"setTimer",value:function(){this.timeOutActive||(this.flushQueueTimeOut=setTimeout(this.sendDataFromQueue.bind(this),this.flushQueueTimeOutInterval),this.timeOutActive=!0)}},{key:"clearTimer",value:function(){this.timeOutActive&&(clearTimeout(this.flushQueueTimeOut),this.timeOutActive=!1)}}]),e}(),Va=function(){function e(){i(this,e),this.queue=void 0}return s(e,[{key:"initialize",value:function(e,t,n){var i={},o=Ai(t);n&&n.useBeacon&&navigator.sendBeacon?(n.beaconQueueOptions&&null!=n.beaconQueueOptions&&"object"===r(n.beaconQueueOptions)&&(i=n.beaconQueueOptions),o="".concat(o,"/beacon/v1/batch"),this.queue=new qa):(n&&n.useBeacon&&ht.info("[EventRepository] sendBeacon feature not available in this browser :: fallback to XHR"),n&&n.queueOptions&&null!=n.queueOptions&&"object"===r(n.queueOptions)&&(i=n.queueOptions),this.queue=new Ka),this.queue.init(e,o,i)}},{key:"enqueue",value:function(e,t){var n=e.getElementContent();n.originalTimestamp=n.originalTimestamp||Ci(),n.sentAt=Ci(),mi(n,!0).length>32e3&&ht.error("[EventRepository] enqueue:: message length greater 32 Kb ",n),this.queue.enqueue(n,t)}}]),e}(),Wa=new Va,Ya={maxRetryDelay:36e4,minRetryDelay:1e3,backoffFactor:2,maxAttempts:1/0},Xa=function(){function e(){i(this,e),this.callback=void 0,this.processQueueElements=!1}return s(e,[{key:"init",value:function(e,t){var n=this;e&&u(Ya,e),t&&(this.callback=t),this.payloadQueue=new Ua("rs_events",Ya,(function(e,t){n.processQueueElement(e.type,e.htElement,(function(e,n){if(e)return t(e);t(null,n)}))})),this.payloadQueue.start()}},{key:"activateProcessor",value:function(){this.processQueueElements=!0}},{key:"processQueueElement",value:function(e,t,n){try{this.processQueueElements?(Object.setPrototypeOf(t,$s.prototype),this.callback(e,t),n(null)):n(new Error("The queue elements are not ready to be processed yet"))}catch(e){n(e)}}},{key:"enqueue",value:function(e,t){this.payloadQueue.addItem({type:e,htElement:t})}}]),e}(),Ja="RS_JS_SDK",$a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=document.getElementById(e);if(r)return;var i=document.createElement("script");i.src=t,i.async=void 0===n.async||n.async,i.type="text/javascript",i.id=e,!0!==n.skipDatasetAttributes&&(i.setAttribute("data-loader",Ja),void 0!==n.isNonNativeSDK&&i.setAttribute("data-isNonNativeSDK",n.isNonNativeSDK));var o=document.getElementsByTagName("head");if(o.length>0)o[0].insertBefore(i,o[0].firstChild);else{var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(i,s)}}catch(s){ki(s)}},Za=function(){return navigator&&navigator.language},eu=function(){return navigator&&navigator.userAgent};function tu(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%".concat("00".concat(e.charCodeAt(0).toString(16)).slice(-2))})).join(""))}function nu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return tu(e=e.endsWith("..")?e.substr(0,e.length-2):e)}var ru=/^[a-zA-Z0-9\-_.]+$/,iu="*";function ou(e,t,n,r){var i=function(e,t){return[e,(new Date).getTimezoneOffset(),t].join(iu)}(n,r),o=t||0,s=function(e){for(var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),n=-1,r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.charCodeAt(r))];return(-1^n)>>>0}([i,Math.floor(Date.now()/6e4)-o,e].join(iu));return s.toString(36)}function su(e){var t=function(e){var t=e.split(iu),n=t.length%2==0;return t.length<4||!n||1!==Number(t.shift())?null:{checksum:t.shift(),serializedIds:t.join(iu)}}(e);if(!t)return null;var n=t.checksum,r=t.serializedIds;return function(e,t){for(var n=eu(),r=Za(),i=0;i<=1;i+=1)if(ou(e,i,n,r)===t)return!0;return!1}(r,n)?function(e){for(var t={},n=e.split(iu),r=0;r<n.length;r+=2){var i=n[r];if(ru.test(i)){var o=nu(n[r+1]);t[i]=o}}return t}(r):null}var au={HS:"HubSpot",GA:"GA",HOTJAR:"Hotjar",GOOGLEADS:"GoogleAds",VWO:"VWO",GTM:"GoogleTagManager",BRAZE:"Braze",INTERCOM:"INTERCOM",KEEN:"Keen",KISSMETRICS:"Kissmetrics",CUSTOMERIO:"CustomerIO",CHARTBEAT:"Chartbeat",COMSCORE:"Comscore",FACEBOOK_PIXEL:"FacebookPixel",LOTAME:"Lotame",OPTIMIZELY:"Optimizely",BUGSNAG:"Bugsnag",FULLSTORY:"Fullstory",TVSQUARED:"TVSquared",GA4:"GA4",MOENGAGE:"MoEngage",AM:"Amplitude",PENDO:"Pendo",LYTICS:"Lytics",APPCUES:"Appcues",POSTHOG:"Posthog",KLAVIYO:"Klaviyo",CLEVERTAP:"Clevertap",BINGADS:"BingAds",PINTEREST_TAG:"PinterestTag",ADOBE_ANALYTICS:"AdobeAnalytics",LINKEDIN_INSIGHT_TAG:"LinkedInInsightTag",REDDIT_PIXEL:"RedditPixel",DRIP:"Drip",HEAP:"Heap",CRITEO:"Criteo",MP:"Mixpanel",QUALTRICS:"Qualtrics",PROFITWELL:"ProfitWell",SENTRY:"Sentry",QUANTUMMETRIC:"QuantumMetric",SNAP_PIXEL:"SnapPixel",POST_AFFILIATE_PRO:"PostAffiliatePro",GOOGLE_OPTIMIZE:"GoogleOptimize",LAUNCHDARKLY:"LaunchDarkly",GA360:"GA360",ADROLL:"Adroll",DCM_FLOODLIGHT:"DCMFloodlight",MATOMO:"Matomo",VERO:"Vero",MOUSEFLOW:"Mouseflow",ROCKERBOX:"Rockerbox",CONVERTFLOW:"ConvertFlow",SNAPENGAGE:"SnapEngage",LIVECHAT:"LiveChat",SHYNET:"Shynet",WOOPRA:"Woopra",ROLLBAR:"RollBar",QUORA_PIXEL:"QuoraPixel",JUNE:"June",ENGAGE:"Engage",ITERABLE:"Iterable",YANDEX_METRICA:"YandexMetrica",REFINER:"Refiner",QUALAROO:"Qualaroo",PODSIGHTS:"Podsights",AXEPTIO:"Axeptio",SATISMETER:"Satismeter",MICROSOFT_CLARITY:"MicrosoftClarity",SENDINBLUE:"Sendinblue",OLARK:"Olark",LEMNISK:"Lemnisk",TIKTOK_ADS:"TiktokAds",ACTIVE_CAMPAIGN:"ActiveCampaign"},uu=function(){function e(){var t=this;if(i(this,e),this.isInitialized=!1,window.OneTrust&&window.OnetrustActiveGroups){this.userSetConsentGroupIds=window.OnetrustActiveGroups.split(",").filter((function(e){return e}));var n=window.OneTrust.GetDomainData().Groups;this.userSetConsentGroupNames=[],this.userDeniedConsentGroupIds=[],n.forEach((function(e){var n=e.CustomGroupId,r=e.GroupName;t.userSetConsentGroupIds.includes(n)?t.userSetConsentGroupNames.push(r.toUpperCase().trim()):t.userDeniedConsentGroupIds.push(n)})),this.userSetConsentGroupIds=this.userSetConsentGroupIds.map((function(e){return e.toUpperCase()})),this.isInitialized=!0}else ht.error("OneTrust resources are not accessible.")}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{if(!this.isInitialized)return!0;var n=e.oneTrustCookieCategories;if(!n)return!0;var r=n.map((function(e){return e.oneTrustCookieCategory})).filter((function(e){return e}));return r.every((function(e){return t.userSetConsentGroupIds.includes(e.toUpperCase().trim())||t.userSetConsentGroupNames.includes(e.toUpperCase().trim())}))}catch(e){return ht.error("Error during onetrust cookie consent management ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.isInitialized?this.userDeniedConsentGroupIds:[]}}]),e}(),cu=function(){function e(){var t=this;if(i(this,e),this.updatePurposes=function(e){e&&Object.entries(e).forEach((function(e){var n=e[0];e[1]?t.userConsentedPurposes.push(n):t.userDeniedPurposes.push(n)}))},this.userConsentedPurposes=[],this.userDeniedPurposes=[],window.updateKetchConsent=function(e){e&&(t.userConsentedPurposes=[],t.userDeniedPurposes=[],t.updatePurposes(e))},window.getKetchUserConsentedPurposes=function(){return t.userConsentedPurposes.slice()},window.getKetchUserDeniedPurposes=function(){return t.userDeniedPurposes.slice()},window.ketchConsent)this.updatePurposes(window.ketchConsent);else{var n=this.getConsent();this.updatePurposes(n)}}return s(e,[{key:"isEnabled",value:function(e){var t=this;try{var n=e.ketchConsentPurposes;if(!n||0===n.length)return!0;var r=n.map((function(e){return e.purpose})).filter((function(e){return e}));return r.some((function(e){return t.userConsentedPurposes.includes(e.trim())}))}catch(e){return ht.error("Error occured checking ketch consent state ".concat(e)),!0}}},{key:"getDeniedList",value:function(){return this.userDeniedPurposes}},{key:"getConsent",value:function(){var e=ds.get("_ketch_consent_v1_");if(e){var t;try{t=JSON.parse(atob(e))}catch(e){return void ht.error("Error occured while parsing consent cookie ".concat(e))}if(t){var n={};return Object.entries(t).forEach((function(e){var t=e[0],r=e[1];r&&r.status&&(n[t]="granted"===r.status)})),n}}}}]),e}(),lu=function(e){var t,n;return null!=e&&null!==(t=e.oneTrust)&&void 0!==t&&t.enabled?new uu:null!=e&&null!==(n=e.ketch)&&void 0!==n&&n.enabled?new cu:null},hu=function(){function e(){i(this,e),this.storage=Gs,this.timeout=18e5,this.sessionInfo=this.storage.getSessionInfo()||{autoTrack:!0}}return s(e,[{key:"initialize",value:function(e){try{var t;if(this.sessionInfo.autoTrack=!(!1===(null==e||null===(t=e.sessions)||void 0===t?void 0:t.autoTrack)||this.sessionInfo.manualTrack),null!=e&&e.sessions&&!isNaN(e.sessions.timeout)){var n=e.sessions.timeout;0===n&&(ht.warn("[Session]:: Provided timeout value 0 will disable the auto session tracking feature."),this.sessionInfo.autoTrack=!1),n>0&&n<1e4&&ht.warn('[Session]:: It is not advised to set "timeout" less than 10 seconds'),this.timeout=n}this.sessionInfo.autoTrack?this.startAutoTracking():!1!==this.sessionInfo.autoTrack||this.sessionInfo.manualTrack||this.end()}catch(e){ki(e)}}},{key:"isValidSession",value:function(e){return e<=this.sessionInfo.expiresAt}},{key:"generateSessionId",value:function(){return Date.now()}},{key:"startAutoTracking",value:function(){var e=Date.now();this.isValidSession(e)||(this.sessionInfo={},this.sessionInfo.id=e,this.sessionInfo.expiresAt=e+this.timeout,this.sessionInfo.sessionStart=!0,this.sessionInfo.autoTrack=!0),this.storage.setSessionInfo(this.sessionInfo)}},{key:"validateSessionId",value:function(e){if("number"==typeof e&&e%1==0){var t;if(!(((t=e)?t.toString().length:0)<10))return e;ht.error('[Session]:: "sessionId" should at least be "'.concat(10,'" digits long'))}else ht.error('[Session]:: "sessionId" should only be a positive integer')}},{key:"start",value:function(e){var t=e?this.validateSessionId(e):this.generateSessionId();this.sessionInfo={id:t||this.generateSessionId(),sessionStart:!0,manualTrack:!0},this.storage.setSessionInfo(this.sessionInfo)}},{key:"getSessionId",value:function(){return this.sessionInfo.autoTrack&&this.isValidSession(Date.now())||this.sessionInfo.manualTrack?this.sessionInfo.id:null}},{key:"end",value:function(){this.sessionInfo={},this.storage.removeSessionInfo()}},{key:"getSessionInfo",value:function(){var e={};if(this.sessionInfo.autoTrack||this.sessionInfo.manualTrack){if(this.sessionInfo.autoTrack){var t=Date.now();this.isValidSession(t)?this.sessionInfo.expiresAt=t+this.timeout:this.startAutoTracking()}this.sessionInfo.sessionStart&&(e.sessionStart=!0,this.sessionInfo.sessionStart=!1),e.sessionId=this.sessionInfo.id,this.storage.setSessionInfo(this.sessionInfo)}return e}},{key:"reset",value:function(){var e=this.sessionInfo,t=e.manualTrack;e.autoTrack?(this.sessionInfo={},this.startAutoTracking()):t&&this.start()}}]),e}(),fu=new hu,du=["integrations","anonymousId","originalTimestamp"],pu="rs-bugsnag",gu="bugsnag",yu=["Bugsnag",gu],vu="{{{{__RS_BUGSNAG_API_KEY__}}}}",mu=["events.min.js","events-staging.min.js","events.js"].concat(c(Object.keys(au).map((function(e){return"".concat(au[e],".min.js")}))),c(Object.keys(au).map((function(e){return"".concat(au[e],"-staging.min.js")}))),c(Object.keys(au).map((function(e){return"".concat(au[e],".js")})))),Iu=function(e){var t=e&&e._client&&e._client._notifier&&e._client._notifier.version;if(!t){var n=e({apiKey:vu,releaseStage:"version-test",beforeSend:function(){return!1}});t=n.notifier&&n.notifier.version,n=void 0}return t&&"6"===t.charAt(0)},bu=function(e){yu.every((function(e){return!function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}(window,e)}))&&$a(e,"https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js",{isNonNativeSDK:"true",skipDatasetAttributes:!0})},ku=function(){function e(t,n){i(this,e),this.pluginName=pu,this.sourceId=t,this.onClientReady=n,this.initClientOnLibReadyInterval=void 0,this.init()}return s(e,[{key:"init",value:function(){var e=this;if(!window.HtEventsGlobals||!window.HtEventsGlobals.errorReporting){if(!vu.match(/{{.+}}/)){bu(this.pluginName);var t=window.bugsnag;"function"!=typeof t?(this.initClientOnLibReadyInterval=setInterval((function(){var t=window.bugsnag;"function"==typeof t&&(Iu(t)&&e.initClient(),clearInterval(e.initClientOnLibReadyInterval))}),100),setTimeout((function(){clearInterval(e.initClientOnLibReadyInterval)}),oi)):Iu(t)&&this.initClient()}}}},{key:"initClient",value:function(){var e,t=window.bugsnag;this.client=t({apiKey:vu,appVersion:"0.0.5",metaData:{SDK:{name:"JS",installType:"npm"}},beforeSend:this.onError(),autoTrackSessions:!1,collectUserIp:!1,enabledBreadcrumbTypes:["error","log","user"],maxEvents:100,releaseStage:(e=window.location.hostname,e&&["www.rs-unit-test-host.com","localhost","127.0.0.1","[::1]"].includes(e)?"development":"production"),networkBreadcrumbsEnabled:!1}),this.onClientReady()}},{key:"onError",value:function(){var e=this.sourceId;return function(t){try{return!!function(e){var t=N(e,"stacktrace.0.file");if(!t||"string"!=typeof t)return!1;var n=t.substring(t.lastIndexOf("/")+1);return mu.includes(n)}(t)&&(function(e,t){e.updateMetaData("source",{metadataSource:t});var n=e.errorMessage;e.context=n,n.includes("error in script loading")&&(e.context="Script load failures"),e.severity="error"}(t,e),!0)}catch(e){return!1}}}},{key:"notify",value:function(e){this.client&&this.client.notify(e)}},{key:"leaveBreadcrumb",value:function(e){this.client&&this.client.leaveBreadcrumb(e)}}]),e}(),Au=pu,Eu=[pu],Cu=function(){function e(t){i(this,e),this.isEnabled=!1,this.providerName=Au,this.provider=void 0,this.logger=t,this.onClientReady=this.onClientReady.bind(this),this.exposeToGlobal=this.exposeToGlobal.bind(this)}return s(e,[{key:"init",value:function(e,t){e&&t?!0===function(e){return N(e,"statsCollection.errors.enabled")||!1}(e)?(this.enable(),this.setProviderName(function(e){return N(e,"statsCollection.errors.provider")}(e)),this.initProvider(e,t)):this.disable():this.logger.error("[Analytics] ErrorReporting :: Invalid configuration or missing source id provided.")}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1}},{key:"setProviderName",value:function(e){e?!e||Eu.includes(e)?this.providerName=e:this.logger.error("[Analytics] ErrorReporting :: Invalid error reporting provider value. Value should be one of: ".concat(Eu.join(","))):this.providerName=Au}},{key:"initProvider",value:function(e,t){if(this.providerName===pu)this.provider=new ku(t,this.onClientReady)}},{key:"onClientReady",value:function(){this.exposeToGlobal()}},{key:"exposeToGlobal",value:function(){window.HtEventsGlobals||(window.HtEventsGlobals={}),window.HtEventsGlobals.errorReporting=this}},{key:"leaveBreadcrumb",value:function(e){if(this.provider)try{this.provider.leaveBreadcrumb(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: leaveBreadcrumb method ".concat(e.toString()))}}},{key:"notify",value:function(e){if(this.provider)try{this.provider.notify(e)}catch(e){this.logger.error("[Analytics] ErrorReporting :: notify method ".concat(e.toString()))}}}]),e}(),Su=new(function(){function e(){i(this,e),this.retryAttempt=3,this.queue=[],this.isTransformationProcessing=!1,this.authToken=null}return s(e,[{key:"init",value:function(e,t,n){this.dataPlaneUrl=Ai(t),this.writeKey=e,this.authToken=n||this.authToken,this.start()}},{key:"enqueue",value:function(e,t,n){this.queue.push({event:e,destinationIds:t,cb:n})}},{key:"sendEventForTransformation",value:function(e,t){var n=this;return new Promise((function(r,i){var o="".concat(n.dataPlaneUrl,"/transform"),s={"Content-Type":"application/json",Authorization:"Basic ".concat(btoa("".concat(n.writeKey,":")))};try{var a=new XMLHttpRequest;a.open("POST",o,!0),Object.keys(s).forEach((function(e){return a.setRequestHeader(e,s[e])})),a.timeout=1e4,a.onreadystatechange=function(){if(4===a.readyState)try{var o=a.status,s=a.response;switch(o){case 200:return s=JSON.parse(s),void r({status:o,transformedPayload:s.transformedBatch});case 400:var u=s?"".concat(s):"Invalid request payload";return void r({status:o,errorMessage:u});case 404:return void r({status:o});default:if(t>0){var c=t-1;setTimeout((function(){return n.sendEventForTransformation(e,c).then(r).catch(i)}),500*Math.pow(2,n.retryAttempt-c))}else r({status:o,errorMessage:"Retries exhausted"})}}catch(e){i(e)}},a.send(mi(e,!0))}catch(e){i(e)}}))}},{key:"checkQueueLengthAndProcess",value:function(){this.queue.length>0&&this.process()}},{key:"process",value:function(){var e=this;this.isTransformationProcessing=!0;var t,n,r=this.queue.shift(),i=(t=r.event,n=r.destinationIds,{metadata:{"Custom-Authorization":this.authToken},batch:[{orderNo:Date.now(),destinationIds:n,event:t.message}]});this.sendEventForTransformation(i,this.retryAttempt).then((function(t){e.isTransformationProcessing=!1,r.cb(t),e.checkQueueLengthAndProcess()})).catch((function(t){ki("string"==typeof t?t:t.message),e.isTransformationProcessing=!1,r.cb({status:0}),e.checkQueueLengthAndProcess()}))}},{key:"start",value:function(){var e=this;setInterval((function(){e.isTransformationProcessing||e.checkQueueLengthAndProcess()}),100)}},{key:"setAuthToken",value:function(e){this.authToken=e}}]),e}()),wu=function(){function e(){i(this,e),this.initialized=!1,this.clientIntegrations=[],this.loadOnlyIntegrations={},this.clientIntegrationObjects=void 0,this.successfullyLoadedIntegration=[],this.failedToBeLoadedIntegration=[],this.toBeProcessedArray=[],this.toBeProcessedByIntegrationArray=[],this.storage=Gs,this.eventRepository=Wa,this.preProcessQueue=new Xa,this.sendAdblockPage=!1,this.sendAdblockPageOptions={},this.clientSuppliedCallbacks={},this.readyCallbacks=[],this.methodToCallbackMapping={syncPixel:"syncPixelCallback"},this.loaded=!1,this.loadIntegration=!0,this.bufferDataPlaneEventsUntilReady=!1,this.dataPlaneEventsBufferTimeout=1e4,this.integrationsData={},this.dynamicallyLoadedIntegrations={},this.destSDKBaseURL=ii,this.cookieConsentOptions={},this.logLevel=void 0,this.clientIntegrationsReady=!1,this.uSession=fu,this.version="0.0.5",this.lockIntegrationsVersion=!1,this.errorReporting=new Cu(ht),this.deniedConsentIds=[],this.transformationHandler=Su}return s(e,[{key:"initializeUser",value:function(e,t){this.userId=this.storage.getUserId(t||{autoCapture:{enabled:!0,source:"auto"}})||"",this.storage.setUserId(this.userId),this.userTraits=this.storage.getUserTraits()||{},this.storage.setUserTraits(this.userTraits),this.groupId=this.storage.getGroupId()||"",this.storage.setGroupId(this.groupId),this.groupTraits=this.storage.getGroupTraits()||{},this.storage.setGroupTraits(this.groupTraits),this.anonymousId=this.getAnonymousId(e||{autoCapture:{enabled:!0,source:"auto"}}),this.storage.setAnonymousId(this.anonymousId)}},{key:"setInitialPageProperties",value:function(){if(null==this.storage.getInitialReferrer()&&null==this.storage.getInitialReferringDomain()){var e=Us();this.storage.setInitialReferrer(e),this.storage.setInitialReferringDomain(Hs(e))}}},{key:"allModulesInitialized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(n){e.clientIntegrations.every((function(t){return null!=e.dynamicallyLoadedIntegrations["".concat(au[t.name]).concat(ai)]}))||t>=2e4?n(e):e.pause(si).then((function(){return e.allModulesInitialized(t+si).then(n)}))}))}},{key:"executeReadyCallback",value:function(){this.readyCallbacks.forEach((function(e){return e()}))}},{key:"integrationSDKLoaded",value:function(e,t){return window[e]&&window[e][t]&&window[e][t].prototype&&void 0!==window[e][t].prototype.constructor}},{key:"finalizeLoad",value:function(){var e=this;try{if(this.errorReporting.disable(),this.serverUrl=function(e,t){try{return function(e){return"string"==typeof e&&e.trim().length>0}(e)?e:DEFAULT_DATAPLANE_URL}catch(e){throw Error(e)}}(this.serverUrl,this.options),this.eventRepository.initialize(this.writeKey,this.serverUrl,this.options),this.loaded=!0,this.transformationHandler.init(this.writeKey,this.serverUrl,this.storage.getAuthToken()),this.options&&"function"==typeof this.options.onLoaded&&this.options.onLoaded(this),function(e){if(e.toBeProcessedArray.length>0)for(;e.toBeProcessedArray.length>0;){var t=c(e.toBeProcessedArray[0]);e.toBeProcessedArray.shift();var n=t[0];t.shift(),e[n].apply(e,c(t))}}(this),this.clientIntegrations=Oi(this.loadOnlyIntegrations,this.clientIntegrations),Object.keys(this.cookieConsentOptions).length>0)try{var t=lu(this.cookieConsentOptions);this.deniedConsentIds=t&&t.getDeniedList(),this.clientIntegrations=this.clientIntegrations.filter((function(e){return!t||t&&t.isEnabled(e.config)}))}catch(e){ki(e)}this.clientIntegrations=this.clientIntegrations.filter((function(e){return!!au[e.name]||(ht.error("[Analytics] Integration:: ".concat(e.name," not available for initialization")),!1)}));var n="";_i().isStaging&&(n="-staging"),this.bufferDataPlaneEventsUntilReady&&setTimeout((function(){e.processBufferedCloudModeEvents()}),this.dataPlaneEventsBufferTimeout),this.errorReporting.leaveBreadcrumb("Starting device-mode initialization"),this.clientIntegrations.forEach((function(t){var r=au[t.name],i="".concat(r).concat(ai),o="".concat(e.destSDKBaseURL,"/").concat(r).concat(n,".min.js");window.hasOwnProperty(i)||$a(i,o,{isNonNativeSDK:!0});var s=e,a=setInterval((function(){if(s.integrationSDKLoaded(i,r)){var n,o=window[i];clearInterval(a);try{var u="[Analytics] processResponse :: trying to initialize integration name:: ".concat(i);e.errorReporting.leaveBreadcrumb(u),(n=new o[r](t.config,s,t.destinationInfo)).init(),s.isInitialized(n).then((function(){s.dynamicallyLoadedIntegrations[i]=o[r]}))}catch(e){var c="[Analytics] 'integration.init()' failed :: ".concat(i," :: ").concat(e.message);ki(e,c),s.failedToBeLoadedIntegration.push(n)}}}),100);setTimeout((function(){clearInterval(a)}),oi)}));var r=this;this.allModulesInitialized().then((function(){if(!r.clientIntegrations||0===r.clientIntegrations.length)return e.clientIntegrationsReady=!0,e.executeReadyCallback(),void(e.toBeProcessedByIntegrationArray=[]);r.replayEvents(r)}))}catch(e){ki(e)}}},{key:"sendDataToDestination",value:function(e,t,n){try{if(e[n]){var r=T(t);e[n](r)}}catch(t){var i="[sendToNative]:: [Destination: ".concat(e.name,"]:: ");ki(t,i)}}},{key:"sendTransformedDataToDestination",value:function(e,t,n){var r=this;try{Ti(t.message.integrations);var i=e.map((function(e){return e.destinationId}));this.transformationHandler.enqueue(t,i,(function(i){var o=i.status,s=i.transformedPayload,a=i.errorMessage;e.forEach((function(e){try{switch(o){case 200:var i=s.find((function(t){return t.id===e.destinationId})),u=[];null==i||i.payload.forEach((function(n){if("200"===n.status)u.push(n);else{var r='[DMT]:: Event transformation unsuccessful for destination "'.concat(e.name,'". Reason: '),i="Unknown";"410"===n.status&&(i="Transformation is not available");var o="Dropping the event",s=ht.error;!0===e.propagateEventsUntransformedOnError&&(o="Sending untransformed event to the destination",s=ht.warn,u.push({event:t.message})),s("".concat(r," ").concat(i,". ").concat(o,"."))}})),null==u||u.forEach((function(t){Ii(t.event)&&r.sendDataToDestination(e,{message:t.event},n)}));break;case 404:ht.warn("[DMT]:: Transformation server access is denied. The configuration data seems to be out of sync. Sending untransformed event to the destination."),r.sendDataToDestination(e,t,n);break;default:!0===e.propagateEventsUntransformedOnError?(ht.warn("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Sending untransformed event.")),r.sendDataToDestination(e,t,n)):ht.error("[DMT]::[Destination: ".concat(e.name,"] :: Transformation request failed with status: ").concat(o," ").concat(a,". Dropping the event."))}}catch(t){t instanceof Error&&(t.message="[DMT]::[Destination:".concat(e.name,"]:: ").concat(t.message)),ki(t)}}))}))}catch(e){e instanceof Error&&(e.message="[DMT]:: ".concat(e.message)),ki(e)}}},{key:"processAndSendEventsToDeviceMode",value:function(e,t,n){var r=this,i=[],o=[];e.forEach((function(e){!r.IsEventBlackListed(t.message.event,e.name)&&(e.shouldApplyDeviceModeTransformation?o.push(e):i.push(e))})),i.forEach((function(e){r.sendDataToDestination(e,t,n)})),o.length>0&&this.sendTransformedDataToDestination(o,t,n)}},{key:"queueEventForDataPlane",value:function(e,t){var n=t.message.integrations||{All:!0};t.message.integrations=function(e,t){var n=T(e),r=Object.keys(t).filter((function(e){return!(!0===t[e]&&n[e])})).reduce((function(e,n){return e[n]=t[n],e}),{});return vi(n,r)}(this.integrationsData,n),this.eventRepository.enqueue(t,e)}},{key:"processBufferedCloudModeEvents",value:function(){this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.activateProcessor()}},{key:"replayEvents",value:function(e){var t,n,r,i=this;this.errorReporting.leaveBreadcrumb("Started replaying buffered events"),e.clientIntegrationObjects=[],e.clientIntegrationObjects=e.successfullyLoadedIntegration,e.clientIntegrationObjects.every((function(e){return!e.isReady||e.isReady()}))&&(this.integrationsData=(t=this.integrationsData,n=e.clientIntegrationObjects,r=T(t),n.forEach((function(e){if(e.getDataForIntegrationsObject)try{r=vi(r,e.getDataForIntegrationsObject())}catch(e){ht.debug("[Analytics: prepareDataForIntegrationsObj]",e)}})),r),e.clientIntegrationsReady=!0,e.executeReadyCallback()),this.processBufferedCloudModeEvents(),e.toBeProcessedByIntegrationArray.forEach((function(t){var n=t[0];t.shift(),Object.keys(t[0].message.integrations).length>0&&wi(t[0].message.integrations);var r=Oi(t[0].message.integrations,e.clientIntegrationObjects);i.processAndSendEventsToDeviceMode(r,t[0],n)})),e.toBeProcessedByIntegrationArray=[]}},{key:"pause",value:function(e){return new Promise((function(t){setTimeout(t,e)}))}},{key:"isInitialized",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Promise((function(r){e.isLoaded()?(t.successfullyLoadedIntegration.push(e),r(t)):n>=oi?(t.failedToBeLoadedIntegration.push(e),r(t)):t.pause(si).then((function(){return t.isInitialized(e,n+si).then(r)}))}))}},{key:"page",value:function(e,t,n,i,o){if(this.errorReporting.leaveBreadcrumb("Page event"),this.loaded){"function"==typeof i&&(o=i,i=null),"function"==typeof n&&(o=n,i=n=null),"function"==typeof t&&(o=t,i=n=t=null),"function"==typeof e&&(o=e,i=n=t=e=null),"object"===r(e)&&null!=e&&null!=e&&(i=t,n=e,t=e=null),"object"===r(t)&&null!=t&&null!=t&&(i=n,n=t,t=null),"string"==typeof e&&"string"!=typeof t&&(t=e,e=null),this.sendAdblockPage&&"EventsJS-Initiated"!=e&&this.sendSampleRequest();var s=T(n),a=T(i),u=(new Zs).setType("page").build();s||(s={}),t&&(u.message.name=s.name=t),e&&(u.message.category=s.category=e),u.message.properties=this.getPageProperties(s),this.processAndSendDataToDestinations("page",u,a,o)}else this.toBeProcessedArray.push(["page"].concat(Array.prototype.slice.call(arguments)))}},{key:"track",value:function(e,t,n,r){if(this.errorReporting.leaveBreadcrumb("Track event"),this.loaded){"function"==typeof n&&(r=n,n=null),"function"==typeof t&&(r=t,n=null,t=null);var i=T(t),o=T(n),s=(new Zs).setType("track").build();e&&s.setEventName(e),s.setProperty(i||{}),this.processAndSendDataToDestinations("track",s,o,r)}else this.toBeProcessedArray.push(["track"].concat(Array.prototype.slice.call(arguments)))}},{key:"identify",value:function(e,t,n,i){if(console.log("completed identify 1"),this.errorReporting.leaveBreadcrumb("Identify event"),this.loaded){console.log("completed identify 2"),"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.userId);var o=Ri(e);o&&this.userId&&o!==this.userId&&this.reset(),this.userId=o,this.storage.setUserId(this.userId);var s=T(t),a=T(n);if(s){for(var u in s)this.userTraits[u]=s[u];this.storage.setUserTraits(this.userTraits)}var c=(new Zs).setType("identify").build();this.processAndSendDataToDestinations("identify",c,a,i),console.log("completed identify 3")}else this.toBeProcessedArray.push(["identify"].concat(Array.prototype.slice.call(arguments)))}},{key:"alias",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Alias event"),this.loaded){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"function"==typeof e&&(i=e,n=null,t=null,e=null),"object"===r(t)&&(n=t,t=null),"object"===r(e)&&(n=e,t=null,e=null);var o=(new Zs).setType("alias").build();o.message.previousId=Ri(t)||(this.userId?this.userId:this.getAnonymousId()),o.message.userId=Ri(e);var s=T(n);this.processAndSendDataToDestinations("alias",o,s,i)}else this.toBeProcessedArray.push(["alias"].concat(Array.prototype.slice.call(arguments)))}},{key:"group",value:function(e,t,n,i){if(this.errorReporting.leaveBreadcrumb("Group event"),this.loaded){if(0!==arguments.length){"function"==typeof n&&(i=n,n=null),"function"==typeof t&&(i=t,n=null,t=null),"object"===r(e)&&(n=t,t=e,e=this.groupId),"function"==typeof e&&(i=e,n=null,t=null,e=this.groupId),this.groupId=Ri(e),this.storage.setGroupId(this.groupId);var o=T(t),s=T(n),a=(new Zs).setType("group").build();if(o)for(var u in o)this.groupTraits[u]=o[u];else this.groupTraits={};this.storage.setGroupTraits(this.groupTraits),this.processAndSendDataToDestinations("group",a,s,i)}}else this.toBeProcessedArray.push(["group"].concat(Array.prototype.slice.call(arguments)))}},{key:"IsEventBlackListed",value:function(e,t){if(!e||"string"!=typeof e)return!1;var n=Zr[t],r=this.clientIntegrations.find((function(e){return e.name===n})).config,i=r.blacklistedEvents,o=r.whitelistedEvents,s=r.eventFilteringOption;if(!s)return!1;var a=e.trim().toUpperCase();switch(s){case"disable":default:return!1;case"blacklistedEvents":return!!Array.isArray(i)&&i.some((function(e){return e.eventName.trim().toUpperCase()===a}));case"whitelistedEvents":return!Array.isArray(o)||!o.some((function(e){return e.eventName.trim().toUpperCase()===a}))}}},{key:"shouldUseGlobalIntegrationsConfigInEvents",value:function(){return this.useGlobalIntegrationsConfigInEvents&&this.loadOnlyIntegrations&&Object.keys(this.loadOnlyIntegrations).length>0}},{key:"processAndSendDataToDestinations",value:function(e,t,r,i){try{this.anonymousId||this.setAnonymousId(),this.errorReporting.leaveBreadcrumb("Started sending data to destinations"),t.message.context.traits=n({},this.userTraits),"identify"==e&&(t.message.traits=n({},this.userTraits)),t.message.anonymousId=this.anonymousId,t.message.userId=t.message.userId?t.message.userId:this.userId,"group"==e&&(this.groupId&&(t.message.groupId=this.groupId),this.groupTraits&&(t.message.traits=n({},this.groupTraits)));try{var o=this.uSession.getSessionInfo(),s=o.sessionId,a=o.sessionStart;t.message.context.sessionId=s,a&&(t.message.context.sessionStart=!0)}catch(e){ki(e)}h=this.cookieConsentOptions,f=!1,Object.keys(h).forEach((function(e){ci.includes(e)&&"boolean"==typeof h[e].enabled&&!0===h[e].enabled&&(f=!0)})),f&&(t.message.context.consentManagement={deniedConsentIds:this.deniedConsentIds||[]}),this.processOptionsParam(t,r),function(e,t){var n=e.properties,r=e.traits,i=e.context;n&&Object.keys(n).forEach((function(e){ti.indexOf(e.toLowerCase())>=0&&ht.error("Warning! : Reserved keyword used in properties--\x3e ".concat(e," with ").concat(t," call"))})),r&&Object.keys(r).forEach((function(e){ti.indexOf(e.toLowerCase())>=0&&ht.error("Warning! : Reserved keyword used in traits--\x3e ".concat(e," with ").concat(t," call"))}));var o=i.traits;o&&Object.keys(o).forEach((function(e){ti.indexOf(e.toLowerCase())>=0&&ht.error("Warning! : Reserved keyword used in traits --\x3e ".concat(e," with ").concat(t," call"))}))}(t.message,e);var u=t.message.integrations;u?wi(u):u=this.shouldUseGlobalIntegrationsConfigInEvents()?this.loadOnlyIntegrations:fi,t.message.integrations=u;try{t.message.context["ua-ch"]=this.uach}catch(e){ki(e)}if(this.clientIntegrationObjects){var c=Oi(u,this.clientIntegrationObjects);this.processAndSendEventsToDeviceMode(c,t,e)}else this.toBeProcessedByIntegrationArray.push([e,t]);var l=T(t);Ti(l.message.integrations),!this.bufferDataPlaneEventsUntilReady||this.clientIntegrationObjects?this.queueEventForDataPlane(e,l):this.preProcessQueue.enqueue(e,l),i&&"function"==typeof i&&i(l)}catch(e){ki(e)}var h,f}},{key:"utm",value:function(e){var t={};try{var n=new URL(e),r="utm_";n.searchParams.forEach((function(e,n){if(n.startsWith(r)){var i=n.substring(r.length);"campaign"===i&&(i="name"),t[i]=e}}))}catch(e){}return t}},{key:"addCampaignInfo",value:function(e){var t=e.message.context;t&&"object"===r(t)&&(e.message.context.campaign=this.utm(window.location.href))}},{key:"processOptionsParam",value:function(e,t){var i=e.message,o=i.type,s=i.properties;this.addCampaignInfo(e),e.message.context.page=this.getContextPageProperties("page"===o?s:void 0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===r(t)&&null!==t&&Object.keys(t).forEach((function(n){du.includes(n)&&(e[n]=t[n])}))}(e.message,t),e.message.context=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.context;return"object"!==r(t)||null===t||Object.keys(t).forEach((function(e){if(!du.includes(e)&&!li.includes(e))if("context"!==e)i=vi(i,a({},e,t[e]));else if("object"===r(t[e])&&null!==t[e]){var o={};Object.keys(t[e]).forEach((function(n){li.includes(n)||(o[n]=t[e][n])})),i=vi(i,n({},o))}else ht.error("[Analytics: processOptionsParam] context passed in options ".concat(e," is not object."))})),i}(e.message,t)}},{key:"getPageProperties",value:function(e,t){var n=Qs(),r=t&&t.page||{};for(var i in n)void 0===e[i]&&(e[i]=r[i]||n[i]);return e}},{key:"getContextPageProperties",value:function(e){var t=Qs(),n={};for(var r in t)n[r]=e&&e[r]?e[r]:t[r];return n}},{key:"reset",value:function(e){this.errorReporting.leaveBreadcrumb("reset API :: flag: ".concat(e)),this.loaded?(e&&(this.anonymousId=""),this.userId="",this.userTraits={},this.groupId="",this.groupTraits={},this.uSession.reset(),this.storage.clear(e)):this.toBeProcessedArray.push(["reset",e])}},{key:"getAnonymousId",value:function(e){return this.anonymousId=this.storage.getAnonymousId(e),this.anonymousId||this.setAnonymousId(),this.anonymousId}},{key:"getUserId",value:function(){return this.userId}},{key:"getSessionId",value:function(){return this.uSession.getSessionId()}},{key:"getUserTraits",value:function(){return this.userTraits}},{key:"getGroupId",value:function(){return this.groupId}},{key:"getGroupTraits",value:function(){return this.groupTraits}},{key:"setAnonymousId",value:function(e,t){var n=t?su(t):null,r=n?n.rs_amp_id:null;this.anonymousId=e||r||Ei(),this.storage.setAnonymousId(this.anonymousId)}},{key:"isValidWriteKey",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isValidServerUrl",value:function(e){return e&&"string"==typeof e&&e.trim().length>0}},{key:"isDatasetAvailable",value:function(){var e=document.createElement("div");return e.setAttribute("data-a-b","c"),!!e.dataset&&"c"===e.dataset.aB}},{key:"loadAfterPolyfill",value:function(e,t,i){var o=this;if("object"===r(t)&&null!==t&&(i=t,t=null),i&&i.logLevel&&(this.logLevel=i.logLevel,ht.setLogLevel(i.logLevel)),!this.isValidWriteKey(e))throw Error("Unable to load the SDK due to invalid writeKey");if(!this.storage||0===Object.keys(this.storage).length)throw Error("Cannot proceed as no storage is available");i&&i.cookieConsentManager&&(this.cookieConsentOptions=i.cookieConsentManager),this.writeKey=e,this.serverUrl=t,this.options=i;var s={};if(i&&i.setCookieDomain&&(s=n(n({},s),{},{domain:i.setCookieDomain})),i&&"boolean"==typeof i.secureCookie&&(s=n(n({},s),{},{secure:i.secureCookie})),i&&-1!==ui.indexOf(i.sameSiteCookie)&&(s=n(n({},s),{},{samesite:i.sameSiteCookie})),this.storage.options(s),i&&"string"==typeof i.uaChTrackLevel&&hi.includes(i.uaChTrackLevel)&&(this.uaChTrackLevel=i.uaChTrackLevel),navigator.userAgentData&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";"none"===t&&e(void 0),"default"===t&&e(navigator.userAgentData),"full"===t&&navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList","wow64"]).then((function(t){e(t)}))}((function(e){o.uach=e}),this.uaChTrackLevel),i&&i.integrations&&(u(this.loadOnlyIntegrations,i.integrations),wi(this.loadOnlyIntegrations)),this.useGlobalIntegrationsConfigInEvents=i&&!0===i.useGlobalIntegrationsConfigInEvents,i&&i.sendAdblockPage&&(this.sendAdblockPage=!0),i&&i.sendAdblockPageOptions&&"object"===r(i.sendAdblockPageOptions)&&(this.sendAdblockPageOptions=i.sendAdblockPageOptions),this.uSession.initialize(i),i&&i.clientSuppliedCallbacks){var a={};Object.keys(this.methodToCallbackMapping).forEach((function(e){o.methodToCallbackMapping.hasOwnProperty(e)&&i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]]&&(a[e]=i.clientSuppliedCallbacks[o.methodToCallbackMapping[e]])})),u(this.clientSuppliedCallbacks,a),this.registerCallbacks(!0)}i&&null!=i.loadIntegration&&(this.loadIntegration=!!i.loadIntegration),i&&"boolean"==typeof i.bufferDataPlaneEventsUntilReady&&(this.bufferDataPlaneEventsUntilReady=!0===i.bufferDataPlaneEventsUntilReady,this.bufferDataPlaneEventsUntilReady&&this.preProcessQueue.init(this.options,this.queueEventForDataPlane.bind(this))),i&&"number"==typeof i.dataPlaneEventsBufferTimeout&&(this.dataPlaneEventsBufferTimeout=i.dataPlaneEventsBufferTimeout),i&&void 0!==i.lockIntegrationsVersion&&(this.lockIntegrationsVersion=!0===i.lockIntegrationsVersion),this.initializeUser(i?i.anonymousIdOptions:void 0,i?i.userIdOptions:void 0),this.setInitialPageProperties(),this.destSDKBaseURL=function(e,t,n){var r="";if(n){if(!(r=Ai(n))){var i="CDN base URL for integrations is not valid";throw ki({message:"[Analytics] load:: ".concat(i)}),Error("Failed to load Events SDK: ".concat(i))}return r}var o=_i().sdkURL;return r=o?o.split("/").slice(0,-1).concat(ri).join("/"):ii,t&&(r=r.replace(ni,e)),r}(this.version,this.lockIntegrationsVersion,i&&i.destSDKBaseURL);try{this.finalizeLoad()}catch(e){ki(e)}}},{key:"arePolyfillsRequired",value:function(e){return(!e||"boolean"!=typeof e.polyfillIfRequired||e.polyfillIfRequired)&&(!String.prototype.endsWith||!String.prototype.startsWith||!String.prototype.includes||!Array.prototype.find||!Array.prototype.includes||"function"!=typeof window.URL||"undefined"==typeof Promise||!Object.entries||!Object.values||!String.prototype.replaceAll||!this.isDatasetAvailable()||"function"!=typeof TextDecoder||"function"!=typeof Uint8Array)}},{key:"load",value:function(e,t,n){if(!this.loaded){var r=T(n);if(this.arePolyfillsRequired(r)){var i="polyfill";$a(i,"https://polyfill.io/v3/polyfill.min.js?features=Number.isNaN%2CURL%2CArray.prototype.find%2CArray.prototype.includes%2CPromise%2CString.prototype.endsWith%2CString.prototype.includes%2CString.prototype.startsWith%2CObject.entries%2CObject.values%2CElement.prototype.dataset%2CString.prototype.replaceAll%2CTextDecoder%2Uint8Array",{skipDatasetAttributes:!0});var o=this,s=setInterval((function(){!window.hasOwnProperty(i)&&null===document.getElementById(i)||"undefined"==typeof Promise||(clearInterval(s),o.loadAfterPolyfill(e,t,r))}),100);setTimeout((function(){clearInterval(s)}),oi)}else this.loadAfterPolyfill(e,t,r)}}},{key:"ready",value:function(e){this.loaded?"function"!=typeof e?ht.error("ready callback is not a function"):this.clientIntegrationsReady?e():this.readyCallbacks.push(e):this.toBeProcessedArray.push(["ready",e])}},{key:"initializeCallbacks",value:function(){var e=this;Object.keys(this.methodToCallbackMapping).forEach((function(t){e.methodToCallbackMapping.hasOwnProperty(t)&&e.on(t,(function(){}))}))}},{key:"registerCallbacks",value:function(e){var t=this;e||Object.keys(this.methodToCallbackMapping).forEach((function(e){t.methodToCallbackMapping.hasOwnProperty(e)&&window.hightouchevents&&"function"==typeof window.hightouchevents[t.methodToCallbackMapping[e]]&&(t.clientSuppliedCallbacks[e]=window.hightouchevents[t.methodToCallbackMapping[e]])})),Object.keys(this.clientSuppliedCallbacks).forEach((function(e){t.clientSuppliedCallbacks.hasOwnProperty(e)&&t.on(e,t.clientSuppliedCallbacks[e])}))}},{key:"sendSampleRequest",value:function(){$a("ad-block","//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",{isNonNativeSDK:!0})}},{key:"startSession",value:function(e){this.uSession.start(e)}},{key:"endSession",value:function(){this.uSession.end()}},{key:"setAuthToken",value:function(e){"string"==typeof e?(this.storage.setAuthToken(e),this.transformationHandler.setAuthToken(e)):ht.error("Provided input should be in string format")}}]),e}(),Tu=new wu;v(Tu),window.addEventListener("error",(function(e){ki(e,void 0,Tu)}),!0),Tu.initializeCallbacks(),Tu.registerCallbacks(!1);var Ou,_u="load",Ru=window.hightouchevents,Pu=Array.isArray(Ru);if(Pu)for(var Du=0;Du<Ru.length;){if(Ru[Du]&&Ru[Du][0]===_u){Ou=Ru[Du],Ru.splice(Du,1);break}Du+=1}!function(e){var t="ajs_trait_",n="ajs_prop_";function r(e,t){var n={};return Object.keys(e).forEach((function(r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r])})),n}var i=function(e){var t={};try{new URL(e).searchParams.forEach((function(e,n){t[n]=e}))}catch(e){}return t}(e);i.ajs_aid&&Tu.toBeProcessedArray.push(["setAnonymousId",i.ajs_aid]),i.ajs_uid&&Tu.toBeProcessedArray.push(["identify",i.ajs_uid,r(i,t)]),i.ajs_event&&Tu.toBeProcessedArray.push(["track",i.ajs_event,r(i,n)])}(window.location.href),Pu&&Ru.forEach((function(e){return Tu.toBeProcessedArray.push(e)})),Ou&&Ou.length>0&&(Ou.shift(),Tu.load.apply(Tu,c(Ou)));var Lu=Tu.ready.bind(Tu),xu=Tu.identify.bind(Tu),Mu=Tu.page.bind(Tu),Bu=Tu.track.bind(Tu),Nu=Tu.alias.bind(Tu),ju=Tu.group.bind(Tu),Fu=Tu.reset.bind(Tu),Gu=Tu.load.bind(Tu),Uu=Tu.initialized=!0,Hu=Tu.getUserId.bind(Tu),Ku=Tu.getSessionId.bind(Tu),Qu=Tu.getUserTraits.bind(Tu),zu=Tu.getAnonymousId.bind(Tu),qu=Tu.setAnonymousId.bind(Tu),Vu=Tu.getGroupId.bind(Tu),Wu=Tu.getGroupTraits.bind(Tu),Yu=Tu.startSession.bind(Tu),Xu=Tu.endSession.bind(Tu),Ju=Tu.setAuthToken.bind(Tu);e.alias=Nu,e.endSession=Xu,e.getAnonymousId=zu,e.getGroupId=Vu,e.getGroupTraits=Wu,e.getSessionId=Ku,e.getUserId=Hu,e.getUserTraits=Qu,e.group=ju,e.identify=xu,e.initialized=Uu,e.load=Gu,e.page=Mu,e.ready=Lu,e.reset=Fu,e.setAnonymousId=qu,e.setAuthToken=Ju,e.startSession=Yu,e.track=Bu,Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,209 +1,50 @@
1
1
  {
2
2
  "name": "castled-js-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Castled Javascript Events SDK",
5
- "main": "./dist/browser.min.js",
5
+ "main": "index.js",
6
+ "module": "index.es.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./index.d.ts",
10
+ "import": "./index.es.js",
11
+ "require": "./index.js"
12
+ },
13
+ "./service-worker": {
14
+ "types": "./service-worker/index.d.ts",
15
+ "import": "./service-worker/index.es.js",
16
+ "require": "./service-worker/index.js"
17
+ },
18
+ "./service-worker/index.es": {
19
+ "types": "./service-worker/index.d.ts",
20
+ "import": "./service-worker/index.es.js"
21
+ }
22
+ },
23
+ "typesVersions": {
24
+ "*": {
25
+ ".": [
26
+ "index.d.ts"
27
+ ],
28
+ "service-worker": [
29
+ "service-worker/index.d.ts"
30
+ ],
31
+ "service-worker/index.es": [
32
+ "service-worker/index.d.ts"
33
+ ]
34
+ }
35
+ },
6
36
  "scripts": {
7
- "setup": "npm i && cd sanity-suite && npm i",
8
- "test": "npm run build:browser && sed 's/var hightouchevents/hightouchevents/g' dist/legacy/events.min.js > __tests__/prodsdk.js && jest --watchAll=false --maxWorkers=50% --coverage",
9
- "test:ci": "npm run build:browser && sed 's/var hightouchevents/hightouchevents/g' dist/legacy/events.min.js > __tests__/prodsdk.js && jest --watchAll=false --maxWorkers=2 --coverage",
10
- "start": "rollup --config rollup-configs/rollup.sdk.browser.js --watch --environment DEV_SERVER,PROD_DEBUG:inline",
11
- "start:all": "npm run build:integration:all && rollup --config rollup-configs/rollup.sdk.browser.js --watch --environment DEV_SERVER,PROD_DEBUG:inline",
12
- "build:browser:dev": "rollup --config rollup-configs/rollup.sdk.browser.js",
13
- "build:browser": "rollup --config rollup-configs/rollup.sdk.browser.js --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG,STAGING:$npm_config_staging,ENV:prod",
14
- "build:browser:modern": "BROWSERSLIST_ENV=modern rollup --config rollup-configs/rollup.sdk.browser.js --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG,STAGING:$npm_config_staging,ENV:prod",
15
- "build:browser:debug": "rollup --config rollup-configs/rollup.sdk.browser.js --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG:inline,ENV:prod",
16
- "build:browser:bundle-size": "VISUALIZER=true npm run build:browser",
17
- "build:browser:modern:bundle-size": "VISUALIZER=true npm run build:browser:modern",
18
- "build:node:dev": "rollup --config rollup-configs/rollup.sdk.npm.js --environment VERSION:$npm_package_version,NPM",
19
- "build:node": "rollup --config rollup-configs/rollup.sdk.npm.js --environment VERSION:$npm_package_version,UGLIFY,ENV:prod,NPM",
20
- "build:worker": "rollup --config rollup-configs/rollup.worker.config.js --environment VERSION:$npm_package_version,NPM",
21
- "build:npm": "npm run build:node && npm run build:worker",
22
- "build:integration:dev": "rollup --config rollup-configs/rollup.integrations.config.js --environment PROD_DEBUG,INTG_NAME:AdobeAnalytics",
23
- "build:integration:dev:cli": "rollup --config rollup-configs/rollup.integrations.config.js --environment PROD_DEBUG,INTG_NAME:$npm_config_intg",
24
- "build:integration": "rollup --config rollup-configs/rollup.integrations.config.js --environment PROD_DEBUG,ENV:prod,UGLIFY,INTG_NAME:AdobeAnalytics",
25
- "build:integration:cli": "rollup --config rollup-configs/rollup.integrations.config.js --environment PROD_DEBUG,ENV:prod,UGLIFY,INTG_NAME:$npm_config_intg",
26
- "build:integration:all": "VISUALIZER=false STAGING=$npm_config_staging node -r esm scripts/integrationBuildScript.js",
27
- "build:integration:all:bundle-size": "VISUALIZER=true STAGING=$npm_config_staging node -r esm scripts/integrationBuildScript.js",
28
- "build:integration:all:modern": "VISUALIZER=false BROWSERSLIST_ENV=modern STAGING=$npm_config_staging node -r esm scripts/integrationBuildScript.js",
29
- "build:integration:all:modern:bundle-size": "VISUALIZER=true BROWSERSLIST_ENV=modern STAGING=$npm_config_staging node -r esm scripts/integrationBuildScript.js",
30
- "build:integration:bundle-size": "VISUALIZER=true npm run build:integration",
31
- "build:integration:bundle-size:cli": "VISUALIZER=true npm run build:integration:cli",
32
- "clean": "rm -rf dist",
33
- "check:lint": "eslint \"src/**/*.js\" -f json -o reports/eslint.json || exit 0",
34
- "check:size:build": "npm run clean && npm run build:browser && npm run build:integration:all && npm run build:npm",
35
- "check:size": "npm run check:size:build && size-limit",
36
- "check:circular": "madge --circular --extensions js ./src || exit 0",
37
- "check:support": "NODE_ENV=production npx browserslist --mobile-to-desktop",
38
- "check:support:modern": "NODE_ENV=modern npx browserslist --mobile-to-desktop",
39
- "check:duplicates": "jscpd src --threshold 5",
40
- "check:security": "npm audit --recursive --audit-level=high",
41
- "format": "prettier --write .",
42
- "lint:fix": "eslint . --fix",
43
- "prepare": "husky install",
44
- "pre-commit": "npm run test && npm run check:size && npx lint-staged",
45
- "commit-msg": "commitlint --edit",
46
- "commit": "git-cz",
47
- "release": "npx standard-version",
48
- "release:github": "DEBUG=conventional-github-releaser npx conventional-github-releaser -p angular --config github-release.config.js",
49
- "sanity": "npm run build:browser && cd sanity-suite && npm run start:local",
50
- "sanity:cdn": "cd sanity-suite && npm run start:cdn",
51
- "sanity:npm": "cd sanity-suite && npm run start:npm",
52
- "build:sanity": "rm -rf sanity-suite/dist && cd sanity-suite && npm run build:all && npm run build:all:staging",
53
- "postinstall": "npx patch-package"
37
+ "test": "echo \"Error: no test specified\" && exit 1"
54
38
  },
55
- "author": "CastledData",
39
+ "keywords": [],
40
+ "author": "Castled Data",
56
41
  "license": "MIT",
57
- "bugs": {
58
- "url": "https://github.com/castledio/castled-js-sdk/issues"
59
- },
60
- "homepage": "https://github.com/castledio/castled-js-sdk#readme",
61
42
  "repository": {
62
43
  "type": "git",
63
- "url": "https://github.com/castledio/castled-js-sdk.git"
44
+ "url": "git+https://github.com/castledio/castled-js-sdk.git"
64
45
  },
65
- "dependencies": {
66
- "@lukeed/uuid": "2.0.1",
67
- "@ndhoule/defaults": "2.0.1",
68
- "@ndhoule/each": "2.0.1",
69
- "@ndhoule/extend": "2.0.0",
70
- "@segment/localstorage-retry": "1.3.0",
71
- "@segment/loosely-validate-event": "2.0.0",
72
- "@segment/top-domain": "3.0.1",
73
- "@vespaiach/axios-fetch-adapter": "0.3.1",
74
- "assert": "2.0.0",
75
- "axios": "0.27.2",
76
- "axios-retry": "3.5.1",
77
- "component-each": "0.2.6",
78
- "component-emitter": "1.3.0",
79
- "component-querystring": "2.0.1",
80
- "component-url": "0.2.1",
81
- "crypto-js": "4.1.1",
82
- "get-value": "3.0.1",
83
- "is": "3.3.0",
84
- "lodash.clonedeep": "4.5.0",
85
- "lodash.difference": "4.5.0",
86
- "lodash.get": "4.4.2",
87
- "lodash.isempty": "4.4.0",
88
- "lodash.isequal": "4.5.0",
89
- "lodash.isstring": "4.0.1",
90
- "lodash.isundefined": "3.0.1",
91
- "lodash.merge": "4.6.2",
92
- "lodash.pick": "4.4.0",
93
- "lodash.pickby": "4.6.0",
94
- "lodash.tostring": "4.1.4",
95
- "md5": "2.3.0",
96
- "ms": "2.1.3",
97
- "obj-case": "0.2.1",
98
- "on-body": "0.0.1",
99
- "ramda": "0.29.0",
100
- "rudder-component-cookie": "0.0.1",
101
- "serialize-javascript": "6.0.1",
102
- "storejs": "2.0.5",
103
- "uuid": "8.3.2"
104
- },
105
- "devDependencies": {
106
- "@babel/core": "7.22.9",
107
- "@babel/eslint-parser": "7.22.9",
108
- "@babel/plugin-proposal-class-properties": "7.18.6",
109
- "@babel/plugin-proposal-private-methods": "7.18.6",
110
- "@babel/plugin-proposal-private-property-in-object": "7.21.11",
111
- "@babel/plugin-transform-arrow-functions": "7.22.5",
112
- "@babel/plugin-transform-object-assign": "7.22.5",
113
- "@babel/preset-env": "7.22.9",
114
- "@commitlint/config-conventional": "17.6.6",
115
- "@digitalroute/cz-conventional-changelog-for-jira": "8.0.1",
116
- "@rollup/plugin-babel": "6.0.3",
117
- "@rollup/plugin-commonjs": "25.0.2",
118
- "@rollup/plugin-json": "6.0.0",
119
- "@rollup/plugin-node-resolve": "15.1.0",
120
- "@rollup/plugin-replace": "5.0.2",
121
- "@size-limit/file": "8.2.6",
122
- "@size-limit/webpack": "8.2.6",
123
- "babel-eslint": "10.1.0",
124
- "babel-jest": "29.6.1",
125
- "babel-plugin-transform-object-hasown": "1.1.0",
126
- "commitizen": "4.3.0",
127
- "commitlint": "17.6.6",
128
- "conventional-changelog-cli": "2.2.2",
129
- "conventional-github-releaser": "3.1.5",
130
- "dotenv": "16.3.1",
131
- "eslint": "8.44.0",
132
- "eslint-config-airbnb": "19.0.4",
133
- "eslint-config-airbnb-base": "15.0.0",
134
- "eslint-config-prettier": "8.8.0",
135
- "eslint-plugin-compat": "4.1.4",
136
- "eslint-plugin-import": "2.27.5",
137
- "eslint-plugin-sonarjs": "0.19.0",
138
- "eslint-plugin-unicorn": "47.0.0",
139
- "esm": "3.2.25",
140
- "husky": "8.0.3",
141
- "isomorphic-fetch": "3.0.0",
142
- "jest": "29.6.1",
143
- "jest-date-mock": "1.0.8",
144
- "jest-environment-jsdom": "29.6.1",
145
- "jest-sonar": "0.2.16",
146
- "jscpd": "3.5.9",
147
- "lint-staged": "13.2.3",
148
- "madge": "6.1.0",
149
- "msw": "1.2.2",
150
- "prettier": "2.8.8",
151
- "rollup": "2.79.1",
152
- "rollup-plugin-copy": "3.4.0",
153
- "rollup-plugin-filesize": "10.0.0",
154
- "rollup-plugin-generate-html-template": "1.7.0",
155
- "rollup-plugin-livereload": "2.0.5",
156
- "rollup-plugin-polyfill-node": "0.12.0",
157
- "rollup-plugin-serve": "2.0.2",
158
- "rollup-plugin-terser": "7.0.2",
159
- "rollup-plugin-visualizer": "5.9.2",
160
- "size-limit": "8.2.6",
161
- "standard-version": "9.5.0"
162
- },
163
- "overrides": {
164
- "@xmldom/xmldom": "0.8.5",
165
- "debug": "4.3.4",
166
- "decode-uri-component": "0.4.1",
167
- "dot-prop": "5.3.0",
168
- "json5": "2.2.2",
169
- "http-cache-semantics": "4.1.1",
170
- "semver": "7.3.8",
171
- "semver-regex": "3.1.4",
172
- "trim-newlines": "3.0.1",
173
- "webpack": "5.76.0",
174
- "xml2js": "0.5.0"
175
- },
176
- "browserslist": {
177
- "production": [
178
- "defaults",
179
- "Edge >= 15",
180
- "Firefox >= 40",
181
- "IE >= 10",
182
- "Chrome >= 37",
183
- "Safari >= 7",
184
- "Opera >= 23"
185
- ],
186
- "modern": [
187
- "defaults"
188
- ],
189
- "development": [
190
- "last 1 chrome version",
191
- "last 1 firefox version",
192
- "last 1 edge version",
193
- "last 1 safari version"
194
- ]
195
- },
196
- "lint-staged": {
197
- "*.js": "eslint --cache --fix",
198
- "*.{json,js,md,ts}": "prettier --write"
46
+ "bugs": {
47
+ "url": "https://github.com/castledio/castled-js-sdk/issues"
199
48
  },
200
- "config": {
201
- "commitizen": {
202
- "path": "./node_modules/@digitalroute/cz-conventional-changelog-for-jira",
203
- "jiraMode": false,
204
- "jiraOptional": true,
205
- "skipScope": true,
206
- "defaultType": "feat"
207
- }
208
- }
49
+ "homepage": "https://github.com/castledio/castled-js-sdk/blob/master/README.md"
209
50
  }