@adobe/alloy 2.32.1-beta.0 → 2.33.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/components.json +9 -0
  2. package/dist/alloy.js +13696 -12143
  3. package/dist/alloy.min.js +1 -1
  4. package/dist/alloyServiceWorker.js +8 -20
  5. package/dist/alloyServiceWorker.min.js +1 -1
  6. package/dist/types/browser/src/allOptionalComponents.d.ts +2 -0
  7. package/dist/types/{core → browser}/src/components/Advertising/constants/index.d.ts +3 -0
  8. package/dist/types/{core → browser}/src/components/Advertising/handlers/createOnBeforeSendEventHandler.d.ts +4 -1
  9. package/dist/types/{core → browser}/src/components/Advertising/handlers/sendAdConversion.d.ts +3 -1
  10. package/dist/types/{core → browser}/src/components/Advertising/handlers/viewThroughHandler.d.ts +3 -1
  11. package/dist/types/{core → browser}/src/components/Advertising/identities/collectAllIdentities.d.ts +1 -1
  12. package/dist/types/browser/src/components/Advertising/identities/collectSurferId.d.ts +15 -0
  13. package/dist/types/browser/src/components/Advertising/identities/createHashedIpHandler.d.ts +9 -0
  14. package/dist/types/browser/src/components/Advertising/identities/initiateAdvertisingIdentityCall.d.ts +5 -0
  15. package/dist/types/{core → browser}/src/components/Advertising/utils/helpers.d.ts +14 -0
  16. package/dist/types/browser/src/components/Advertising/utils/murmurHash128GuavaHex.d.ts +2 -0
  17. package/dist/types/browser/src/components/Personalization/constants/surface.d.ts +4 -0
  18. package/dist/types/browser/src/components/Personalization/dom-actions/dom/isDomElement.d.ts +2 -0
  19. package/dist/types/browser/src/components/Personalization/utils/addRenderAttemptedToDecisions.d.ts +5 -0
  20. package/dist/types/browser/src/components/Personalization/utils/surfaceUtils.d.ts +3 -0
  21. package/dist/types/{core → browser}/src/components/PushNotifications/helpers/saveToIndexedDb.d.ts +1 -1
  22. package/dist/types/{core → browser}/src/components/PushNotifications/index.d.ts +6 -6
  23. package/dist/types/{core → browser}/src/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts +2 -2
  24. package/dist/types/browser/src/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +6 -0
  25. package/dist/types/{core → browser}/src/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts +6 -6
  26. package/dist/types/{core → browser}/src/components/PushNotifications/types.d.ts +1 -1
  27. package/dist/types/browser/src/components/componentCreators.d.ts +4 -0
  28. package/dist/types/browser/src/components/requiredComponentCreators.d.ts +1 -0
  29. package/dist/types/browser/src/index.d.ts +4 -2
  30. package/dist/types/browser/src/initializeStandalone.d.ts +4 -0
  31. package/dist/types/core/src/components/Identity/injectAddQueryStringIdentityToPayload.d.ts +2 -1
  32. package/dist/types/core/src/components/MediaAnalyticsBridge/createGetInstance.d.ts +1 -1
  33. package/dist/types/core/src/components/MediaAnalyticsBridge/createMediaHelper.d.ts +7 -56
  34. package/dist/types/core/src/core/componentCreators.d.ts +0 -4
  35. package/dist/types/core/src/core/requiredComponentCreators.d.ts +0 -1
  36. package/dist/types/core/src/types.d.ts +0 -4
  37. package/dist/utils/createEventMergeId.js +38 -30
  38. package/dist/utils/deepAssign.js +10 -4
  39. package/package.json +9 -13
  40. package/rollup.config.js +9 -15
  41. package/scripts/alloyBuilder.js +34 -42
  42. package/scripts/helpers/componentMetadata.js +25 -0
  43. package/scripts/helpers/generateEntryPoint.js +29 -0
  44. package/src/allOptionalComponents.js +14 -0
  45. package/src/components/ActivityCollector/attachClickActivityCollector.js +55 -0
  46. package/src/components/ActivityCollector/configValidators.js +52 -0
  47. package/src/components/ActivityCollector/createClickActivityStorage.js +33 -0
  48. package/src/components/ActivityCollector/createClickedElementProperties.js +224 -0
  49. package/src/components/ActivityCollector/createGetClickedElementProperties.js +68 -0
  50. package/src/components/ActivityCollector/createInjectClickedElementProperties.js +80 -0
  51. package/src/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js +45 -0
  52. package/src/components/ActivityCollector/createStorePageViewProperties.js +20 -0
  53. package/src/components/ActivityCollector/getLinkName.js +145 -0
  54. package/src/components/ActivityCollector/getLinkRegion.js +65 -0
  55. package/src/components/ActivityCollector/index.js +132 -0
  56. package/src/components/ActivityCollector/utils/activityMapExtensionEnabled.js +16 -0
  57. package/src/components/ActivityCollector/utils/createTransientStorage.js +26 -0
  58. package/src/components/ActivityCollector/utils/determineLinkType.js +27 -0
  59. package/src/components/ActivityCollector/utils/dom/elementHasClickHandler.js +15 -0
  60. package/src/components/ActivityCollector/utils/dom/extractDomain.js +20 -0
  61. package/src/components/ActivityCollector/utils/dom/findClickableElement.js +36 -0
  62. package/src/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.js +25 -0
  63. package/src/components/ActivityCollector/utils/dom/isButtonSubmitElement.js +15 -0
  64. package/src/components/ActivityCollector/utils/dom/isDownloadLink.js +27 -0
  65. package/src/components/ActivityCollector/utils/dom/isExitLink.js +24 -0
  66. package/src/components/ActivityCollector/utils/dom/isInputSubmitElement.js +26 -0
  67. package/src/components/ActivityCollector/utils/dom/isSupportedAnchorElement.js +24 -0
  68. package/src/components/ActivityCollector/utils/dom/isSupportedTextNode.js +27 -0
  69. package/src/components/ActivityCollector/utils/hasPageName.js +23 -0
  70. package/src/components/ActivityCollector/utils/isDifferentDomains.js +19 -0
  71. package/src/components/ActivityCollector/utils/trimQueryFromUrl.js +31 -0
  72. package/src/components/ActivityCollector/utils/truncateWhiteSpace.js +22 -0
  73. package/src/components/ActivityCollector/validateClickCollectionConfig.js +47 -0
  74. package/src/components/Advertising/configValidators.js +32 -0
  75. package/src/components/Advertising/constants/index.js +80 -0
  76. package/src/components/Advertising/createComponent.js +24 -0
  77. package/src/components/Advertising/handlers/clickThroughHandler.js +94 -0
  78. package/src/components/Advertising/handlers/createAdConversionHandler.js +50 -0
  79. package/src/components/Advertising/handlers/createOnBeforeSendEventHandler.js +177 -0
  80. package/src/components/Advertising/handlers/sendAdConversion.js +74 -0
  81. package/src/components/Advertising/handlers/viewThroughHandler.js +107 -0
  82. package/src/components/Advertising/identities/collectAllIdentities.js +57 -0
  83. package/src/components/Advertising/identities/collectID5Id.js +133 -0
  84. package/src/components/Advertising/identities/collectRampId.js +265 -0
  85. package/src/components/Advertising/identities/collectSurferId.js +72 -0
  86. package/src/components/Advertising/identities/createHashedIpHandler.js +36 -0
  87. package/src/components/Advertising/identities/initiateAdvertisingIdentityCall.js +153 -0
  88. package/src/components/Advertising/index.js +109 -0
  89. package/src/components/Advertising/utils/advertisingCookieManager.js +92 -0
  90. package/src/components/Advertising/utils/helpers.js +190 -0
  91. package/src/components/Advertising/utils/murmurHash128GuavaHex.js +195 -0
  92. package/src/components/Context/createComponent.js +35 -0
  93. package/src/components/Context/implementationDetails.js +23 -0
  94. package/src/components/Context/index.js +56 -0
  95. package/src/components/Context/injectDevice.js +77 -0
  96. package/src/components/Context/injectEnvironment.js +38 -0
  97. package/src/components/Context/injectHighEntropyUserAgentHints.js +55 -0
  98. package/src/components/Context/injectOneTimeAnalyticsReferrer.js +61 -0
  99. package/src/components/Context/injectPlaceContext.js +38 -0
  100. package/src/components/Context/injectWeb.js +26 -0
  101. package/src/components/Personalization/constants/loggerMessage.js +14 -0
  102. package/src/components/Personalization/constants/scopeType.js +15 -0
  103. package/src/components/Personalization/constants/surface.js +16 -0
  104. package/src/components/Personalization/createApplyPropositions.js +136 -0
  105. package/src/components/Personalization/createClickStorage.js +56 -0
  106. package/src/components/Personalization/createComponent.js +133 -0
  107. package/src/components/Personalization/createFetchDataHandler.js +149 -0
  108. package/src/components/Personalization/createGetPageLocation.js +16 -0
  109. package/src/components/Personalization/createHandleConsentFlicker.js +22 -0
  110. package/src/components/Personalization/createInteractionStorage.js +104 -0
  111. package/src/components/Personalization/createNotificationHandler.js +49 -0
  112. package/src/components/Personalization/createOnClickHandler.js +102 -0
  113. package/src/components/Personalization/createOnDecisionHandler.js +98 -0
  114. package/src/components/Personalization/createPersonalizationDetails.js +138 -0
  115. package/src/components/Personalization/createSetTargetMigration.js +22 -0
  116. package/src/components/Personalization/createViewCacheManager.js +101 -0
  117. package/src/components/Personalization/createViewChangeHandler.js +53 -0
  118. package/src/components/Personalization/dom-actions/action.js +97 -0
  119. package/src/components/Personalization/dom-actions/addNonceToInlineStyleElements.js +37 -0
  120. package/src/components/Personalization/dom-actions/appendHtml.js +42 -0
  121. package/src/components/Personalization/dom-actions/clicks/collectClicks.js +89 -0
  122. package/src/components/Personalization/dom-actions/clicks/collectInteractions.js +113 -0
  123. package/src/components/Personalization/dom-actions/collectInteractions.js +15 -0
  124. package/src/components/Personalization/dom-actions/createPreprocess.js +21 -0
  125. package/src/components/Personalization/dom-actions/createRedirect.js +23 -0
  126. package/src/components/Personalization/dom-actions/dom/createFragment.js +18 -0
  127. package/src/components/Personalization/dom-actions/dom/getAttribute.js +15 -0
  128. package/src/components/Personalization/dom-actions/dom/getChildNodes.js +23 -0
  129. package/src/components/Personalization/dom-actions/dom/getChildren.js +23 -0
  130. package/src/components/Personalization/dom-actions/dom/getElementById.js +21 -0
  131. package/src/components/Personalization/dom-actions/dom/getFirstChild.js +15 -0
  132. package/src/components/Personalization/dom-actions/dom/getNextSibling.js +15 -0
  133. package/src/components/Personalization/dom-actions/dom/getNonce.js +33 -0
  134. package/src/components/Personalization/dom-actions/dom/getParent.js +15 -0
  135. package/src/components/Personalization/dom-actions/dom/helperForEq.js +22 -0
  136. package/src/components/Personalization/dom-actions/dom/index.js +26 -0
  137. package/src/components/Personalization/dom-actions/dom/insertAfter.js +26 -0
  138. package/src/components/Personalization/dom-actions/dom/insertBefore.js +25 -0
  139. package/src/components/Personalization/dom-actions/dom/isDomElement.js +13 -0
  140. package/src/components/Personalization/dom-actions/dom/matchesSelectorWithEq.js +37 -0
  141. package/src/components/Personalization/dom-actions/dom/removeAttribute.js +15 -0
  142. package/src/components/Personalization/dom-actions/dom/selectNodesWithEq.js +101 -0
  143. package/src/components/Personalization/dom-actions/dom/setAttribute.js +15 -0
  144. package/src/components/Personalization/dom-actions/dom/setStyle.js +23 -0
  145. package/src/components/Personalization/dom-actions/dom/util.js +17 -0
  146. package/src/components/Personalization/dom-actions/images.js +34 -0
  147. package/src/components/Personalization/dom-actions/index.js +13 -0
  148. package/src/components/Personalization/dom-actions/initDomActionsModules.js +67 -0
  149. package/src/components/Personalization/dom-actions/insertHtmlAfter.js +43 -0
  150. package/src/components/Personalization/dom-actions/insertHtmlBefore.js +40 -0
  151. package/src/components/Personalization/dom-actions/move.js +28 -0
  152. package/src/components/Personalization/dom-actions/prependHtml.js +60 -0
  153. package/src/components/Personalization/dom-actions/rearrangeChildren.js +34 -0
  154. package/src/components/Personalization/dom-actions/remapCustomCodeOffers.js +33 -0
  155. package/src/components/Personalization/dom-actions/remapHeadOffers.js +63 -0
  156. package/src/components/Personalization/dom-actions/replaceHtml.js +20 -0
  157. package/src/components/Personalization/dom-actions/resize.js +28 -0
  158. package/src/components/Personalization/dom-actions/scripts.js +106 -0
  159. package/src/components/Personalization/dom-actions/setAttributes.js +21 -0
  160. package/src/components/Personalization/dom-actions/setHtml.js +27 -0
  161. package/src/components/Personalization/dom-actions/setStyles.js +23 -0
  162. package/src/components/Personalization/dom-actions/setText.js +16 -0
  163. package/src/components/Personalization/dom-actions/swapImage.js +32 -0
  164. package/src/components/Personalization/flicker/index.js +106 -0
  165. package/src/components/Personalization/handlers/createDecorateProposition.js +100 -0
  166. package/src/components/Personalization/handlers/createProcessDomAction.js +79 -0
  167. package/src/components/Personalization/handlers/createProcessHtmlContent.js +60 -0
  168. package/src/components/Personalization/handlers/createProcessInAppMessage.js +91 -0
  169. package/src/components/Personalization/handlers/createProcessPropositions.js +228 -0
  170. package/src/components/Personalization/handlers/createProcessRedirect.js +54 -0
  171. package/src/components/Personalization/handlers/createRenderStatusHandler.js +62 -0
  172. package/src/components/Personalization/handlers/injectCreateProposition.js +121 -0
  173. package/src/components/Personalization/handlers/processDefaultContent.js +20 -0
  174. package/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.js +309 -0
  175. package/src/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.js +18 -0
  176. package/src/components/Personalization/in-app-message-actions/utils.js +55 -0
  177. package/src/components/Personalization/index.js +223 -0
  178. package/src/components/Personalization/utils/addRenderAttemptedToDecisions.js +15 -0
  179. package/src/components/Personalization/utils/createAsyncArray.js +37 -0
  180. package/src/components/Personalization/utils/isAuthoringModeEnabled.js +15 -0
  181. package/src/components/Personalization/utils/metaUtils.js +27 -0
  182. package/src/components/Personalization/utils/surfaceUtils.js +120 -0
  183. package/src/components/Personalization/validateApplyPropositionsOptions.js +56 -0
  184. package/src/components/PushNotifications/helpers/constants.js +16 -0
  185. package/src/components/PushNotifications/helpers/getPushSubscriptionDetails.js +122 -0
  186. package/src/components/PushNotifications/helpers/readFromIndexedDb.js +50 -0
  187. package/src/components/PushNotifications/helpers/saveToIndexedDb.js +64 -0
  188. package/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.js +84 -0
  189. package/src/components/PushNotifications/helpers/serviceWorkerPushListener.js +72 -0
  190. package/src/components/PushNotifications/index.js +128 -0
  191. package/src/components/PushNotifications/request/createSendPushSubscriptionPayload.js +66 -0
  192. package/src/components/PushNotifications/request/createSendPushSubscriptionRequest.js +35 -0
  193. package/src/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +98 -0
  194. package/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +154 -0
  195. package/src/components/PushNotifications/types.js +104 -0
  196. package/src/components/componentCreators.js +16 -0
  197. package/src/components/requiredComponentCreators.js +13 -0
  198. package/src/createEventListeners.js +81 -0
  199. package/src/index.js +14 -2
  200. package/src/initializeStandalone.js +34 -0
  201. package/src/serviceWorker.js +2 -2
  202. package/src/standalone.js +3 -26
  203. package/.browserslistrc +0 -2
  204. package/babel.config.js +0 -76
  205. package/dist/types/core/src/components/Advertising/identities/collectSurferId.d.ts +0 -2
  206. package/dist/types/core/src/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +0 -6
  207. package/dist/types/core/src/constants/sessionDataKeys.d.ts +0 -1
  208. package/scripts/helpers/entryPointGeneratorBabelPlugin.js +0 -101
  209. /package/dist/types/{core → browser}/src/components/ActivityCollector/attachClickActivityCollector.d.ts +0 -0
  210. /package/dist/types/{core → browser}/src/components/ActivityCollector/configValidators.d.ts +0 -0
  211. /package/dist/types/{core → browser}/src/components/ActivityCollector/createClickActivityStorage.d.ts +0 -0
  212. /package/dist/types/{core → browser}/src/components/ActivityCollector/createClickedElementProperties.d.ts +0 -0
  213. /package/dist/types/{core → browser}/src/components/ActivityCollector/createGetClickedElementProperties.d.ts +0 -0
  214. /package/dist/types/{core → browser}/src/components/ActivityCollector/createInjectClickedElementProperties.d.ts +0 -0
  215. /package/dist/types/{core → browser}/src/components/ActivityCollector/createRecallAndInjectClickedElementProperties.d.ts +0 -0
  216. /package/dist/types/{core → browser}/src/components/ActivityCollector/createStorePageViewProperties.d.ts +0 -0
  217. /package/dist/types/{core → browser}/src/components/ActivityCollector/getLinkName.d.ts +0 -0
  218. /package/dist/types/{core → browser}/src/components/ActivityCollector/getLinkRegion.d.ts +0 -0
  219. /package/dist/types/{core → browser}/src/components/ActivityCollector/index.d.ts +0 -0
  220. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/activityMapExtensionEnabled.d.ts +0 -0
  221. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/createTransientStorage.d.ts +0 -0
  222. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/determineLinkType.d.ts +0 -0
  223. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/elementHasClickHandler.d.ts +0 -0
  224. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/extractDomain.d.ts +0 -0
  225. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/findClickableElement.d.ts +0 -0
  226. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/getAbsoluteUrlFromAnchorElement.d.ts +0 -0
  227. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isButtonSubmitElement.d.ts +0 -0
  228. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isDownloadLink.d.ts +0 -0
  229. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isExitLink.d.ts +0 -0
  230. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isInputSubmitElement.d.ts +0 -0
  231. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isSupportedAnchorElement.d.ts +0 -0
  232. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/dom/isSupportedTextNode.d.ts +0 -0
  233. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/hasPageName.d.ts +0 -0
  234. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/isDifferentDomains.d.ts +0 -0
  235. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/trimQueryFromUrl.d.ts +0 -0
  236. /package/dist/types/{core → browser}/src/components/ActivityCollector/utils/truncateWhiteSpace.d.ts +0 -0
  237. /package/dist/types/{core → browser}/src/components/ActivityCollector/validateClickCollectionConfig.d.ts +0 -0
  238. /package/dist/types/{core → browser}/src/components/Advertising/configValidators.d.ts +0 -0
  239. /package/dist/types/{core → browser}/src/components/Advertising/createComponent.d.ts +0 -0
  240. /package/dist/types/{core → browser}/src/components/Advertising/handlers/clickThroughHandler.d.ts +0 -0
  241. /package/dist/types/{core → browser}/src/components/Advertising/handlers/createAdConversionHandler.d.ts +0 -0
  242. /package/dist/types/{core → browser}/src/components/Advertising/identities/collectID5Id.d.ts +0 -0
  243. /package/dist/types/{core → browser}/src/components/Advertising/identities/collectRampId.d.ts +0 -0
  244. /package/dist/types/{core → browser}/src/components/Advertising/index.d.ts +0 -0
  245. /package/dist/types/{core → browser}/src/components/Advertising/utils/advertisingCookieManager.d.ts +0 -0
  246. /package/dist/types/{core → browser}/src/components/Context/createComponent.d.ts +0 -0
  247. /package/dist/types/{core → browser}/src/components/Context/implementationDetails.d.ts +0 -0
  248. /package/dist/types/{core → browser}/src/components/Context/index.d.ts +0 -0
  249. /package/dist/types/{core → browser}/src/components/Context/injectDevice.d.ts +0 -0
  250. /package/dist/types/{core → browser}/src/components/Context/injectEnvironment.d.ts +0 -0
  251. /package/dist/types/{core → browser}/src/components/Context/injectHighEntropyUserAgentHints.d.ts +0 -0
  252. /package/dist/types/{core → browser}/src/components/Context/injectOneTimeAnalyticsReferrer.d.ts +0 -0
  253. /package/dist/types/{core → browser}/src/components/Context/injectPlaceContext.d.ts +0 -0
  254. /package/dist/types/{core → browser}/src/components/Context/injectWeb.d.ts +0 -0
  255. /package/dist/types/{core → browser}/src/components/Personalization/constants/loggerMessage.d.ts +0 -0
  256. /package/dist/types/{core → browser}/src/components/Personalization/constants/scopeType.d.ts +0 -0
  257. /package/dist/types/{core → browser}/src/components/Personalization/createApplyPropositions.d.ts +0 -0
  258. /package/dist/types/{core → browser}/src/components/Personalization/createClickStorage.d.ts +0 -0
  259. /package/dist/types/{core → browser}/src/components/Personalization/createComponent.d.ts +0 -0
  260. /package/dist/types/{core → browser}/src/components/Personalization/createFetchDataHandler.d.ts +0 -0
  261. /package/dist/types/{core → browser}/src/components/Personalization/createGetPageLocation.d.ts +0 -0
  262. /package/dist/types/{core → browser}/src/components/Personalization/createHandleConsentFlicker.d.ts +0 -0
  263. /package/dist/types/{core → browser}/src/components/Personalization/createInteractionStorage.d.ts +0 -0
  264. /package/dist/types/{core → browser}/src/components/Personalization/createNotificationHandler.d.ts +0 -0
  265. /package/dist/types/{core → browser}/src/components/Personalization/createOnClickHandler.d.ts +0 -0
  266. /package/dist/types/{core → browser}/src/components/Personalization/createOnDecisionHandler.d.ts +0 -0
  267. /package/dist/types/{core → browser}/src/components/Personalization/createPersonalizationDetails.d.ts +0 -0
  268. /package/dist/types/{core → browser}/src/components/Personalization/createSetTargetMigration.d.ts +0 -0
  269. /package/dist/types/{core → browser}/src/components/Personalization/createViewCacheManager.d.ts +0 -0
  270. /package/dist/types/{core → browser}/src/components/Personalization/createViewChangeHandler.d.ts +0 -0
  271. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/action.d.ts +0 -0
  272. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/addNonceToInlineStyleElements.d.ts +0 -0
  273. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/appendHtml.d.ts +0 -0
  274. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/clicks/collectClicks.d.ts +0 -0
  275. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/clicks/collectInteractions.d.ts +0 -0
  276. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/collectInteractions.d.ts +0 -0
  277. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/createPreprocess.d.ts +0 -0
  278. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/createRedirect.d.ts +0 -0
  279. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/createFragment.d.ts +0 -0
  280. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getAttribute.d.ts +0 -0
  281. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getChildNodes.d.ts +0 -0
  282. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getChildren.d.ts +0 -0
  283. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getElementById.d.ts +0 -0
  284. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getFirstChild.d.ts +0 -0
  285. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getNextSibling.d.ts +0 -0
  286. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getNonce.d.ts +0 -0
  287. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/getParent.d.ts +0 -0
  288. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/helperForEq.d.ts +0 -0
  289. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/index.d.ts +0 -0
  290. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/insertAfter.d.ts +0 -0
  291. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/insertBefore.d.ts +0 -0
  292. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/matchesSelectorWithEq.d.ts +0 -0
  293. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/removeAttribute.d.ts +0 -0
  294. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/selectNodesWithEq.d.ts +0 -0
  295. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/setAttribute.d.ts +0 -0
  296. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/setStyle.d.ts +0 -0
  297. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/dom/util.d.ts +0 -0
  298. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/images.d.ts +0 -0
  299. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/index.d.ts +0 -0
  300. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/initDomActionsModules.d.ts +0 -0
  301. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/insertHtmlAfter.d.ts +0 -0
  302. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/insertHtmlBefore.d.ts +0 -0
  303. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/move.d.ts +0 -0
  304. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/prependHtml.d.ts +0 -0
  305. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/rearrangeChildren.d.ts +0 -0
  306. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/remapCustomCodeOffers.d.ts +0 -0
  307. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/remapHeadOffers.d.ts +0 -0
  308. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/replaceHtml.d.ts +0 -0
  309. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/resize.d.ts +0 -0
  310. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/scripts.d.ts +0 -0
  311. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setAttributes.d.ts +0 -0
  312. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setHtml.d.ts +0 -0
  313. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setStyles.d.ts +0 -0
  314. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/setText.d.ts +0 -0
  315. /package/dist/types/{core → browser}/src/components/Personalization/dom-actions/swapImage.d.ts +0 -0
  316. /package/dist/types/{core → browser}/src/components/Personalization/flicker/index.d.ts +0 -0
  317. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createDecorateProposition.d.ts +0 -0
  318. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessDomAction.d.ts +0 -0
  319. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessHtmlContent.d.ts +0 -0
  320. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessInAppMessage.d.ts +0 -0
  321. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessPropositions.d.ts +0 -0
  322. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createProcessRedirect.d.ts +0 -0
  323. /package/dist/types/{core → browser}/src/components/Personalization/handlers/createRenderStatusHandler.d.ts +0 -0
  324. /package/dist/types/{core → browser}/src/components/Personalization/handlers/injectCreateProposition.d.ts +0 -0
  325. /package/dist/types/{core → browser}/src/components/Personalization/handlers/processDefaultContent.d.ts +0 -0
  326. /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/actions/displayIframeContent.d.ts +0 -0
  327. /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/initInAppMessageActionsModules.d.ts +0 -0
  328. /package/dist/types/{core → browser}/src/components/Personalization/in-app-message-actions/utils.d.ts +0 -0
  329. /package/dist/types/{core → browser}/src/components/Personalization/index.d.ts +0 -0
  330. /package/dist/types/{core → browser}/src/components/Personalization/utils/createAsyncArray.d.ts +0 -0
  331. /package/dist/types/{core → browser}/src/components/Personalization/utils/isAuthoringModeEnabled.d.ts +0 -0
  332. /package/dist/types/{core → browser}/src/components/Personalization/utils/metaUtils.d.ts +0 -0
  333. /package/dist/types/{core → browser}/src/components/Personalization/validateApplyPropositionsOptions.d.ts +0 -0
  334. /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/constants.d.ts +0 -0
  335. /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts +0 -0
  336. /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/readFromIndexedDb.d.ts +0 -0
  337. /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts +0 -0
  338. /package/dist/types/{core → browser}/src/components/PushNotifications/helpers/serviceWorkerPushListener.d.ts +0 -0
  339. /package/dist/types/{core → browser}/src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts +0 -0
  340. /package/dist/types/{core → browser}/src/createEventListeners.d.ts +0 -0
  341. /package/dist/types/core/src/{components/Context → utils}/injectTimestamp.d.ts +0 -0
@@ -294,8 +294,6 @@ OF ANY KIND, either express or implied. See the License for the specific languag
294
294
  governing permissions and limitations under the License.
295
295
  */
296
296
 
297
- /* eslint-disable no-underscore-dangle */
298
-
299
297
  /** @import { ServiceWorkerLogger } from '../types.js' */
300
298
  /** @import { TrackingDataPayload } from '../types.js' */
301
299
 
@@ -466,21 +464,17 @@ function unsafeStringify(arr, offset = 0) {
466
464
  byteToHex[arr[offset + 15]]).toLowerCase();
467
465
  }
468
466
 
469
- let getRandomValues;
470
467
  const rnds8 = new Uint8Array(16);
471
468
  function rng() {
472
- if (!getRandomValues) {
473
- if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
474
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
475
- }
476
- getRandomValues = crypto.getRandomValues.bind(crypto);
477
- }
478
- return getRandomValues(rnds8);
469
+ return crypto.getRandomValues(rnds8);
479
470
  }
480
471
 
481
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
482
- var native = { randomUUID };
483
-
472
+ function v4(options, buf, offset) {
473
+ if (!buf && !options && crypto.randomUUID) {
474
+ return crypto.randomUUID();
475
+ }
476
+ return _v4(options, buf, offset);
477
+ }
484
478
  function _v4(options, buf, offset) {
485
479
  options = options || {};
486
480
  const rnds = options.random ?? options.rng?.() ?? rng();
@@ -501,12 +495,6 @@ function _v4(options, buf, offset) {
501
495
  }
502
496
  return unsafeStringify(rnds);
503
497
  }
504
- function v4(options, buf, offset) {
505
- if (native.randomUUID && !buf && !options) {
506
- return native.randomUUID();
507
- }
508
- return _v4(options, buf, offset);
509
- }
510
498
 
511
499
  /*
512
500
  Copyright 2025 Adobe. All rights reserved.
@@ -602,7 +590,7 @@ governing permissions and limitations under the License.
602
590
  // @ts-check
603
591
  /// <reference lib="webworker" />
604
592
 
605
- /** @import { ServiceWorkerLogger } from '@adobe/alloy-core/types.js' */
593
+ /** @import { ServiceWorkerLogger } from './components/PushNotifications/types.js' */
606
594
 
607
595
  /** @type {ServiceWorkerGlobalScope} */
608
596
  // @ts-ignore
@@ -10,4 +10,4 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));let r;const a=new Uint8Array(16);var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function c(e,t,n){const i=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(a)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(i)}function s(e,t,n){return!i.randomUUID||t||e?c(e,t,n):i.randomUUID()}const d=self,l={namespace:"[alloy][pushNotificationWorker]",info:(...e)=>console.log(l.namespace,...e),error:(...e)=>console.error(l.namespace,...e)},u=(({platform:t,sw:o})=>{const r=(({readFromIndexedDb:e,uuidv4:t,logger:n,fetch:o})=>async({xdm:r,actionLabel:a,applicationLaunches:i=0})=>{const c=await e(n),{browser:s,ecid:d,edgeDomain:l,edgeBasePath:u,datastreamId:g,datasetId:m}=c||{};let f={};a&&(f={customAction:{actionID:a}});const p=[{name:"browser",errorField:"Browser"},{name:"ecid",errorField:"ECID"},{name:"edgeDomain",errorField:"Edge domain"},{name:"edgeBasePath",errorField:"Edge base path"},{name:"datastreamId",errorField:"Datastream ID"},{name:"datasetId",errorField:"Dataset ID"}];try{for(const e of p)if(!c[e.name])throw new Error(`Cannot send tracking call. ${e.errorField} is missing.`);const e=`https://${l}/${u}/v1/interact?configId=${g}&requestId=${t()}`,h={events:[{xdm:{identityMap:{ECID:[{id:d}]},timestamp:(new Date).toISOString(),pushNotificationTracking:{...f,pushProviderMessageID:t(),pushProvider:s.toLowerCase()},application:{launches:{value:i}},eventType:a?"pushTracking.customAction":"pushTracking.applicationOpened",_experience:{...r._experience,customerJourneyManagement:{...r._experience.customerJourneyManagement,pushChannelContext:{platform:"web"},messageProfile:{channel:{_id:"https://ns.adobe.com/xdm/channels/push"}}}}},meta:{collect:{datasetId:m}}}]},y=await o(e,{method:"POST",headers:{"content-type":"text/plain; charset=UTF-8"},body:JSON.stringify(h)});return!!y.ok||(n.error("Tracking call failed: ",y.status,y.statusText),!1)}catch(e){return n.error("Error sending tracking call:",e),!1}})({readFromIndexedDb:n,uuidv4:s,logger:t.logger,fetch:t.fetch}),a=(({makeSendServiceWorkerTrackingData:t,sw:n,logger:o})=>({event:r})=>{r.notification.close();const a=r.notification.data;let i=null,c=null;if(r.action){const t=parseInt(r.action.replace("action_",""),10);if(a?.actions?.buttons[t]){const n=a.actions.buttons[t];c=n.label,e(n.type)&&n.uri&&(i=n.uri)}}else e(a?.interaction?.type)&&a?.interaction?.uri&&(i=a.interaction.uri);t({xdm:a._xdm.mixins,actionLabel:c,applicationLaunches:1}).catch(e=>{o.error("Failed to send tracking call:",e)}),i&&r.waitUntil(n.clients.matchAll({type:"window"}).then(e=>{for(const t of e)if(t.url===i&&"focus"in t)return t.focus();if(n.clients.openWindow)return n.clients.openWindow(i)}))})({makeSendServiceWorkerTrackingData:r,sw:o,logger:t.logger});return{pushNotifications:{onPush:e=>(async({sw:e,event:t,logger:n})=>{if(!t.data)return;let o;try{o=t.data.json()}catch(e){return void n.error("Error decoding notification JSON data:",e)}const r=o.web;if(!r?.title)return;const a={body:r.body,icon:r.media,image:r.media,data:r,actions:[]};return Object.keys(a).forEach(e=>{null==a[e]&&delete a[e]}),r.actions&&r.actions.buttons&&(a.actions=r.actions.buttons.map((e,t)=>({action:`action_${t}`,title:e.label}))),e.registration.showNotification(r.title,a)})({event:e,sw:o,logger:t.logger}),onNotificationClick(e){a({event:e})},async onNotificationClose(e){const n=e.notification.data;try{await r({xdm:n._xdm.mixins,actionLabel:"Dismiss"})}catch(e){t.logger.error("Failed to send tracking call:",e)}}}}})({sw:d,platform:{logger:l,fetch:fetch}});d.addEventListener("install",()=>{d.skipWaiting()}),d.addEventListener("activate",e=>{e.waitUntil(d.clients.claim())}),d.addEventListener("push",e=>u.pushNotifications.onPush(e)),d.addEventListener("notificationclick",e=>u.pushNotifications.onNotificationClick(e)),d.addEventListener("notificationclose",e=>{u.pushNotifications.onNotificationClose(e)});
13
+ const e=e=>["DEEPLINK","WEBURL"].includes(e);const t="config";var n=async e=>{try{const e=await(n="alloyPushNotifications",o=1,r=e=>{e.objectStoreNames.contains(t)||e.createObjectStore(t,{keyPath:"id"})},new Promise((e,t)=>{const a=indexedDB.open(n,o);a.onerror=()=>t(a.error),a.onsuccess=()=>e(a.result),a.onupgradeneeded=e=>{const t=e.target.result;r&&r(t)}})),a=await((e,t,n)=>new Promise((o,r)=>{const a=e.transaction([t],"readonly").objectStore(t).get(n);a.onerror=()=>r(a.error),a.onsuccess=()=>o(a.result)}))(e,t,"alloyConfig");return e.close(),a}catch(t){e.error("Failed to read data from IndexedDB",{error:t})}var n,o,r};const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));const r=new Uint8Array(16);function a(e,t,n){return t||e||!crypto.randomUUID?function(e,t,n){e=e||{};const a=e.random??e.rng?.()??crypto.getRandomValues(r);if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=a[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(a)}(e,t,n):crypto.randomUUID()}const i=self,s={namespace:"[alloy][pushNotificationWorker]",info:(...e)=>console.log(s.namespace,...e),error:(...e)=>console.error(s.namespace,...e)},c=(({platform:t,sw:o})=>{const r=(({readFromIndexedDb:e,uuidv4:t,logger:n,fetch:o})=>async({xdm:r,actionLabel:a,applicationLaunches:i=0})=>{const s=await e(n),{browser:c,ecid:l,edgeDomain:d,edgeBasePath:u,datastreamId:g,datasetId:m}=s||{};let f={};a&&(f={customAction:{actionID:a}});const p=[{name:"browser",errorField:"Browser"},{name:"ecid",errorField:"ECID"},{name:"edgeDomain",errorField:"Edge domain"},{name:"edgeBasePath",errorField:"Edge base path"},{name:"datastreamId",errorField:"Datastream ID"},{name:"datasetId",errorField:"Dataset ID"}];try{for(const e of p)if(!s[e.name])throw new Error(`Cannot send tracking call. ${e.errorField} is missing.`);const e=`https://${d}/${u}/v1/interact?configId=${g}&requestId=${t()}`,h={events:[{xdm:{identityMap:{ECID:[{id:l}]},timestamp:(new Date).toISOString(),pushNotificationTracking:{...f,pushProviderMessageID:t(),pushProvider:c.toLowerCase()},application:{launches:{value:i}},eventType:a?"pushTracking.customAction":"pushTracking.applicationOpened",_experience:{...r._experience,customerJourneyManagement:{...r._experience.customerJourneyManagement,pushChannelContext:{platform:"web"},messageProfile:{channel:{_id:"https://ns.adobe.com/xdm/channels/push"}}}}},meta:{collect:{datasetId:m}}}]},w=await o(e,{method:"POST",headers:{"content-type":"text/plain; charset=UTF-8"},body:JSON.stringify(h)});return!!w.ok||(n.error("Tracking call failed: ",w.status,w.statusText),!1)}catch(e){return n.error("Error sending tracking call:",e),!1}})({readFromIndexedDb:n,uuidv4:a,logger:t.logger,fetch:t.fetch}),i=(({makeSendServiceWorkerTrackingData:t,sw:n,logger:o})=>({event:r})=>{r.notification.close();const a=r.notification.data;let i=null,s=null;if(r.action){const t=parseInt(r.action.replace("action_",""),10);if(a?.actions?.buttons[t]){const n=a.actions.buttons[t];s=n.label,e(n.type)&&n.uri&&(i=n.uri)}}else e(a?.interaction?.type)&&a?.interaction?.uri&&(i=a.interaction.uri);t({xdm:a._xdm.mixins,actionLabel:s,applicationLaunches:1}).catch(e=>{o.error("Failed to send tracking call:",e)}),i&&r.waitUntil(n.clients.matchAll({type:"window"}).then(e=>{for(const t of e)if(t.url===i&&"focus"in t)return t.focus();if(n.clients.openWindow)return n.clients.openWindow(i)}))})({makeSendServiceWorkerTrackingData:r,sw:o,logger:t.logger});return{pushNotifications:{onPush:e=>(async({sw:e,event:t,logger:n})=>{if(!t.data)return;let o;try{o=t.data.json()}catch(e){return void n.error("Error decoding notification JSON data:",e)}const r=o.web;if(!r?.title)return;const a={body:r.body,icon:r.media,image:r.media,data:r,actions:[]};return Object.keys(a).forEach(e=>{null==a[e]&&delete a[e]}),r.actions&&r.actions.buttons&&(a.actions=r.actions.buttons.map((e,t)=>({action:`action_${t}`,title:e.label}))),e.registration.showNotification(r.title,a)})({event:e,sw:o,logger:t.logger}),onNotificationClick(e){i({event:e})},async onNotificationClose(e){const n=e.notification.data;try{await r({xdm:n._xdm.mixins,actionLabel:"Dismiss"})}catch(e){t.logger.error("Failed to send tracking call:",e)}}}}})({sw:i,platform:{logger:s,fetch:fetch}});i.addEventListener("install",()=>{i.skipWaiting()}),i.addEventListener("activate",e=>{e.waitUntil(i.clients.claim())}),i.addEventListener("push",e=>c.pushNotifications.onPush(e)),i.addEventListener("notificationclick",e=>c.pushNotifications.onNotificationClick(e)),i.addEventListener("notificationclose",e=>{c.pushNotifications.onNotificationClose(e)});
@@ -0,0 +1,2 @@
1
+ export * from "@adobe/alloy-core/core/componentCreators.js";
2
+ export * from "./components/componentCreators.js";
@@ -10,6 +10,8 @@ export const LAST_CONVERSION_TIME_KEY_EXPIRES: "lastConversionTimeExpires";
10
10
  export const SKWCID_PARAM: "s_kwcid";
11
11
  export const EFID_PARAM: "ef_id";
12
12
  export const SURFER_ID: "surferId";
13
+ export const HASHED_IP: "hashedIp";
14
+ export const HASHED_IP_ADDR: "hashedIPAddr";
13
15
  export const RAMP_ID: "rampId";
14
16
  export const ID5_ID: "id5Id";
15
17
  export const UNKNOWN_ADVERTISER: "";
@@ -30,6 +32,7 @@ export const SURFER_USER_ID: "1";
30
32
  export const SURFER_TIMEOUT_MS: 5000;
31
33
  export const SURFER_TRUSTED_ORIGIN: "www.everestjs.net";
32
34
  export const SURFER_PARAM_KEY: "gsurfer";
35
+ export const SURFER_IP: "clientIp";
33
36
  export const ERROR_ID5_PARTNER_ID_REQUIRED: "ID5 partner ID is required";
34
37
  export const ERROR_RAMP_ID_MAX_RETRIES: "Failed to retrieve RampID after maximum retries";
35
38
  export const LOG_AD_CONVERSION_START: "Processing ad conversion";
@@ -1,4 +1,4 @@
1
- declare function _default({ cookieManager, logger, componentConfig, getBrowser, consent, collectSurferId, getID5Id, getRampId, appendAdvertisingIdQueryToEvent, getUrlParams, isThrottled, }: {
1
+ declare function _default({ cookieManager, logger, componentConfig, getBrowser, consent, collectSurferId, getID5Id, getRampId, appendAdvertisingIdQueryToEvent, appendAdCloudIdentityToEvent, collectHashedIPAddr, getUrlParams, isThrottled, normalizeAdvertiser, }: {
2
2
  cookieManager: any;
3
3
  logger: any;
4
4
  componentConfig: any;
@@ -8,8 +8,11 @@ declare function _default({ cookieManager, logger, componentConfig, getBrowser,
8
8
  getID5Id: Function;
9
9
  getRampId: Function;
10
10
  appendAdvertisingIdQueryToEvent: Function;
11
+ appendAdCloudIdentityToEvent: Function;
12
+ collectHashedIPAddr: Function;
11
13
  getUrlParams: Function;
12
14
  isThrottled: Function;
15
+ normalizeAdvertiser: Function;
13
16
  }): ({ event, advertising }: {
14
17
  event: any;
15
18
  advertising?: any;
@@ -1,4 +1,4 @@
1
- declare function _default({ eventManager, cookieManager, adConversionHandler, logger, componentConfig, getBrowser, consent, }: {
1
+ declare function _default({ eventManager, cookieManager, adConversionHandler, logger, componentConfig, getBrowser, consent, collectSurferId, collectHashedIPAddr, }: {
2
2
  eventManager: any;
3
3
  cookieManager: any;
4
4
  adConversionHandler: any;
@@ -6,5 +6,7 @@ declare function _default({ eventManager, cookieManager, adConversionHandler, lo
6
6
  componentConfig: any;
7
7
  getBrowser: any;
8
8
  consent: any;
9
+ collectSurferId: any;
10
+ collectHashedIPAddr: any;
9
11
  }): () => Promise<any>;
10
12
  export default _default;
@@ -1,8 +1,10 @@
1
- export default function handleViewThrough({ eventManager, cookieManager, logger, componentConfig, adConversionHandler, getBrowser, }: {
1
+ export default function handleViewThrough({ eventManager, cookieManager, logger, componentConfig, adConversionHandler, getBrowser, collectSurferId, collectHashedIPAddr, }: {
2
2
  eventManager: any;
3
3
  cookieManager: any;
4
4
  logger: any;
5
5
  componentConfig: any;
6
6
  adConversionHandler: any;
7
7
  getBrowser: any;
8
+ collectSurferId: any;
9
+ collectHashedIPAddr: any;
8
10
  }): Promise<PromiseSettledResult<any>[]>;
@@ -1,5 +1,5 @@
1
1
  export default collectAllIdentities;
2
- declare function collectAllIdentities(logger: any, componentConfig: any, cookieManager: any, getBrowser: any): {
2
+ declare function collectAllIdentities(logger: any, componentConfig: any, cookieManager: any, getBrowser: any, collectSurferId: any): {
3
3
  surferId: any;
4
4
  id5Id: any;
5
5
  rampId: any;
@@ -0,0 +1,15 @@
1
+ export default createCollectSurferId;
2
+ /**
3
+ * Factory for surferId collection. Cache lives at closure scope — no module-level state.
4
+ *
5
+ * @param {Object} deps
6
+ * @param {Function} deps.initiateAdvertisingIdentityCall
7
+ * @param {Object} deps.cookieManager
8
+ * @param {Function} deps.getBrowser
9
+ * @returns {Function} collectSurferId(useShortTimeout?)
10
+ */
11
+ declare function createCollectSurferId({ initiateAdvertisingIdentityCall, cookieManager, getBrowser, }: {
12
+ initiateAdvertisingIdentityCall: Function;
13
+ cookieManager: any;
14
+ getBrowser: Function;
15
+ }): Function;
@@ -0,0 +1,9 @@
1
+ declare function _default({ cookieManager, hash }: {
2
+ cookieManager: any;
3
+ hash?: (str: string, seed?: number) => string;
4
+ }): {
5
+ captureFromIframe: (clientIp: any) => void;
6
+ get: () => any;
7
+ collect: (initiateCallFn: any) => any;
8
+ };
9
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export function createInitiateAdvertisingIdentityCall({ appendNode: appendNodeFn, awaitSelector: awaitSelectorFn, createNode: createNodeFn, }?: {
2
+ appendNode?: Function;
3
+ awaitSelector?: Function;
4
+ createNode?: Function;
5
+ }): Function;
@@ -16,6 +16,20 @@ export function normalizeAdvertiser(advertiserSettings: any[]): string;
16
16
  */
17
17
  export function createManagedAsyncOperation(operationName: string, workerFn: Function): Function;
18
18
  export function appendAdvertisingIdQueryToEvent(idsToInclude: any, event: any, cookieManager: any, componentConfig: any, addEventType?: boolean): any;
19
+ /**
20
+ * Appends AdCloud identity data to the event XDM as _experience.adcloud.stitchId.
21
+ * @param {{ surferId?: string, hashedIp?: string, id5Id?: string, rampId?: string, adfId?: string }} idsToInclude
22
+ * @param {{ mergeXdm: (xdm: Object) => void }} event
23
+ */
24
+ export function appendAdCloudIdentityToEvent(idsToInclude: {
25
+ surferId?: string;
26
+ hashedIp?: string;
27
+ id5Id?: string;
28
+ rampId?: string;
29
+ adfId?: string;
30
+ }, event: {
31
+ mergeXdm: (xdm: any) => void;
32
+ }): void;
19
33
  export function isAnyIdUnused(availableIds: any, conversionCalled: any): boolean;
20
34
  export function markIdsAsConverted(idTypes: any, conversionCalled: any, cookieManager: any, logger: any): void;
21
35
  export function isThrottled(idType: any, cookieManager: any): boolean;
@@ -0,0 +1,2 @@
1
+ export function murmurHash128GuavaHex(str: string, seed?: number): string;
2
+ export default murmurHash128GuavaHex;
@@ -0,0 +1,4 @@
1
+ export const WEB: "web";
2
+ export const WEBAPP: "webapp";
3
+ export const SURFACE_TYPE_DELIMITER: "://";
4
+ export const FRAGMENT_DELIMITER: "#";
@@ -0,0 +1,2 @@
1
+ declare function _default(element: any): element is Element | HTMLDocument;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ declare function _default({ decisions, renderAttempted }: {
2
+ decisions: any;
3
+ renderAttempted: any;
4
+ }): any;
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export function buildPageSurface(getPageLocation: any): string;
2
+ export function isPageWideSurface(scope: any): boolean;
3
+ export function normalizeSurfaces(surfaces: any[], getPageLocation: any, logger: any): string[];
@@ -5,4 +5,4 @@
5
5
  * @returns {Promise<void>}
6
6
  */
7
7
  export default function saveToIndexedDB(data: any, logger: Logger): Promise<void>;
8
- import type { Logger } from '../../../core/types.js';
8
+ import type { Logger } from '@adobe/alloy-core/core/types.js';
@@ -42,9 +42,9 @@ declare namespace createPushNotifications {
42
42
  let namespace: string;
43
43
  let configValidators: any;
44
44
  }
45
- import type { StorageCreator } from '../../utils/types.js';
46
- import type { EventManager } from '../../core/types.js';
47
- import type { Logger } from '../../core/types.js';
48
- import type { ConsentManager } from '../../core/consent/types.js';
49
- import type { IdentityManager } from '../../core/identity/types.js';
50
- import type { EdgeRequestExecutor } from '../../core/edgeNetwork/types.js';
45
+ import type { StorageCreator } from '@adobe/alloy-core/utils/types.js';
46
+ import type { EventManager } from '@adobe/alloy-core/core/types.js';
47
+ import type { Logger } from '@adobe/alloy-core/core/types.js';
48
+ import type { ConsentManager } from '@adobe/alloy-core/core/consent/types.js';
49
+ import type { IdentityManager } from '@adobe/alloy-core/core/identity/types.js';
50
+ import type { EdgeRequestExecutor } from '@adobe/alloy-core/core/edgeNetwork/types.js';
@@ -5,5 +5,5 @@ declare function _default({ ecid, eventManager, serializedPushSubscriptionDetail
5
5
  appId: string;
6
6
  }): Promise<DataCollectionRequestPayload>;
7
7
  export default _default;
8
- import type { EventManager } from "../../../core/types.js";
9
- import type { DataCollectionRequestPayload } from "../../../utils/request/types.js";
8
+ import type { EventManager } from "@adobe/alloy-core/core/types.js";
9
+ import type { DataCollectionRequestPayload } from "@adobe/alloy-core/utils/request/types.js";
@@ -0,0 +1,6 @@
1
+ declare function _default({ payload }: {
2
+ payload: DataCollectionRequestPayload;
3
+ }): Request;
4
+ export default _default;
5
+ import type { DataCollectionRequestPayload } from '@adobe/alloy-core/utils/request/types.js';
6
+ import type { Request } from '@adobe/alloy-core/utils/request/types.js';
@@ -12,9 +12,9 @@ declare function _default({ config: { vapidPublicKey, appId }, storage, logger,
12
12
  window: Window;
13
13
  }): Promise<void>;
14
14
  export default _default;
15
- import type { Storage } from '../../../utils/types.js';
16
- import type { Logger } from '../../../core/types.js';
17
- import type { EventManager } from '../../../core/types.js';
18
- import type { IdentityManager } from '../../../core/identity/types.js';
19
- import type { EdgeRequestExecutor } from '../../../core/edgeNetwork/types.js';
20
- import type { ConsentManager } from '../../../core/consent/types.js';
15
+ import type { Storage } from '@adobe/alloy-core/utils/types.js';
16
+ import type { Logger } from '@adobe/alloy-core/core/types.js';
17
+ import type { EventManager } from '@adobe/alloy-core/core/types.js';
18
+ import type { IdentityManager } from '@adobe/alloy-core/core/identity/types.js';
19
+ import type { EdgeRequestExecutor } from '@adobe/alloy-core/core/edgeNetwork/types.js';
20
+ import type { ConsentManager } from '@adobe/alloy-core/core/consent/types.js';
@@ -1,4 +1,4 @@
1
- /** @import { Identity } from '../../utils/request/types.js' */
1
+ /** @import { Identity } from '@adobe/alloy-core/utils/request/types.js' */
2
2
  /**
3
3
  * @typedef {Object} PushSubscription
4
4
  * @property {string} endpoint - The push service endpoint URL
@@ -0,0 +1,4 @@
1
+ export { default as activityCollector } from "./ActivityCollector/index.js";
2
+ export { default as advertising } from "./Advertising/index.js";
3
+ export { default as personalization } from "./Personalization/index.js";
4
+ export { default as pushNotifications } from "./PushNotifications/index.js";
@@ -0,0 +1 @@
1
+ export { default as context } from "./Context/index.js";
@@ -1,2 +1,4 @@
1
- export * as components from "@adobe/alloy-core/core/componentCreators.js";
2
- export { createInstance, createCustomInstance } from "@adobe/alloy-core";
1
+ export function createInstance(options?: {}): (commandName: string, options?: any) => Promise<any>;
2
+ import { createCustomInstance } from "@adobe/alloy-core";
3
+ import * as allOptionalComponents from "./allOptionalComponents.js";
4
+ export { createCustomInstance, allOptionalComponents as components };
@@ -0,0 +1,4 @@
1
+ export default initializeStandalone;
2
+ declare function initializeStandalone({ components }: {
3
+ components: any;
4
+ }): void;
@@ -1,5 +1,6 @@
1
- declare function _default({ locationSearch, dateProvider, orgId, logger }: {
1
+ declare function _default({ locationSearch, locationHash, dateProvider, orgId, logger, }: {
2
2
  locationSearch: any;
3
+ locationHash: any;
3
4
  dateProvider: any;
4
5
  orgId: any;
5
6
  logger: any;
@@ -10,7 +10,7 @@ declare function _default({ logger, trackMediaSession, trackMediaEvent, uuid }:
10
10
  trackSessionEnd: () => any;
11
11
  trackComplete: () => any;
12
12
  trackError: (errorId: any) => any;
13
- trackEvent: (eventType: any, info: any, context: any) => any;
13
+ trackEvent: (eventType: any, info: any, contextData: any) => any;
14
14
  updatePlayhead: (time: any) => void;
15
15
  updateQoEObject: (qoeObject: any) => void;
16
16
  destroy: () => void;
@@ -1,61 +1,12 @@
1
1
  declare function _default({ logger }: {
2
2
  logger: any;
3
3
  }): {
4
- createMediaObject: (friendlyName: any, name: any, length: any, contentType: any, streamType: any) => {
5
- sessionDetails: {
6
- name: any;
7
- friendlyName: any;
8
- length: number;
9
- streamType: any;
10
- contentType: any;
11
- };
12
- } | {
13
- sessionDetails?: undefined;
14
- };
15
- createAdBreakObject: (name: any, position: any, startTime: any) => {
16
- advertisingPodDetails: {
17
- friendlyName: any;
18
- offset: any;
19
- index: any;
20
- };
21
- } | {
22
- advertisingPodDetails?: undefined;
23
- };
24
- createAdObject: (name: any, id: any, position: any, length: any) => {
25
- advertisingDetails: {
26
- friendlyName: any;
27
- name: any;
28
- podPosition: any;
29
- length: any;
30
- };
31
- } | {
32
- advertisingDetails?: undefined;
33
- };
34
- createChapterObject: (name: any, position: any, length: any, startTime: any) => {
35
- chapterDetails: {
36
- friendlyName: any;
37
- offset: any;
38
- index: any;
39
- length: any;
40
- };
41
- } | {
42
- chapterDetails?: undefined;
43
- };
44
- createStateObject: (stateName: any) => {
45
- name: any;
46
- } | {
47
- name?: undefined;
48
- };
49
- createQoEObject: (bitrate: any, droppedFrames: any, fps: any, startupTime: any) => {
50
- bitrate: any;
51
- droppedFrames: any;
52
- framesPerSecond: any;
53
- timeToStart: any;
54
- } | {
55
- bitrate?: undefined;
56
- droppedFrames?: undefined;
57
- framesPerSecond?: undefined;
58
- timeToStart?: undefined;
59
- };
4
+ createMediaObject: (...args: any[]) => any;
5
+ createAdBreakObject: (...args: any[]) => any;
6
+ createAdObject: (...args: any[]) => any;
7
+ createChapterObject: (...args: any[]) => any;
8
+ createStateObject: (...args: any[]) => any;
9
+ createQoEObject: (...args: any[]) => any;
10
+ version: string;
60
11
  };
61
12
  export default _default;
@@ -1,11 +1,7 @@
1
- export { default as activityCollector } from "../components/ActivityCollector/index.js";
2
1
  export { default as audiences } from "../components/Audiences/index.js";
3
2
  export { default as consent } from "../components/Consent/index.js";
4
3
  export { default as eventMerge } from "../components/EventMerge/index.js";
5
4
  export { default as mediaAnalyticsBridge } from "../components/MediaAnalyticsBridge/index.js";
6
- export { default as personalization } from "../components/Personalization/index.js";
7
5
  export { default as rulesEngine } from "../components/RulesEngine/index.js";
8
6
  export { default as streamingMedia } from "../components/StreamingMedia/index.js";
9
- export { default as advertising } from "../components/Advertising/index.js";
10
- export { default as pushNotifications } from "../components/PushNotifications/index.js";
11
7
  export { default as brandConcierge } from "../components/BrandConcierge/index.js";
@@ -1,4 +1,3 @@
1
- export { default as context } from "../components/Context/index.js";
2
1
  export { default as dataCollector } from "../components/DataCollector/index.js";
3
2
  export { default as identity } from "../components/Identity/index.js";
4
3
  export { default as libraryInfo } from "../components/LibraryInfo/index.js";
@@ -1,9 +1,5 @@
1
1
  /**
2
2
  * @typedef {import("./core/types.js").AlloyMonitor} AlloyMonitor
3
3
  */
4
- /**
5
- * @typedef {import("./components/PushNotifications/types.js").ServiceWorkerLogger} ServiceWorkerLogger
6
- */
7
4
  export const Types: {};
8
5
  export type AlloyMonitor = import("./core/types.js").AlloyMonitor;
9
- export type ServiceWorkerLogger = import("./components/PushNotifications/types.js").ServiceWorkerLogger;
@@ -12,44 +12,51 @@
12
12
 
13
13
  const byteToHex = [];
14
14
  for (let i = 0; i < 256; ++i) {
15
- byteToHex.push((i + 0x100).toString(16).slice(1));
15
+ byteToHex.push((i + 0x100).toString(16).slice(1));
16
16
  }
17
17
  function unsafeStringify(arr, offset = 0) {
18
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
18
+ return (byteToHex[arr[offset + 0]] +
19
+ byteToHex[arr[offset + 1]] +
20
+ byteToHex[arr[offset + 2]] +
21
+ byteToHex[arr[offset + 3]] +
22
+ '-' +
23
+ byteToHex[arr[offset + 4]] +
24
+ byteToHex[arr[offset + 5]] +
25
+ '-' +
26
+ byteToHex[arr[offset + 6]] +
27
+ byteToHex[arr[offset + 7]] +
28
+ '-' +
29
+ byteToHex[arr[offset + 8]] +
30
+ byteToHex[arr[offset + 9]] +
31
+ '-' +
32
+ byteToHex[arr[offset + 10]] +
33
+ byteToHex[arr[offset + 11]] +
34
+ byteToHex[arr[offset + 12]] +
35
+ byteToHex[arr[offset + 13]] +
36
+ byteToHex[arr[offset + 14]] +
37
+ byteToHex[arr[offset + 15]]).toLowerCase();
19
38
  }
20
39
 
21
- let getRandomValues;
22
40
  const rnds8 = new Uint8Array(16);
23
41
  function rng() {
24
- if (!getRandomValues) {
25
- if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
26
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
27
- }
28
- getRandomValues = crypto.getRandomValues.bind(crypto);
29
- }
30
- return getRandomValues(rnds8);
42
+ return crypto.getRandomValues(rnds8);
31
43
  }
32
44
 
33
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
34
- var native = {
35
- randomUUID
36
- };
37
-
38
- function _v4(options, buf, offset) {
39
- options = options || {};
40
- const rnds = options.random ?? options.rng?.() ?? rng();
41
- if (rnds.length < 16) {
42
- throw new Error('Random bytes length must be >= 16');
43
- }
44
- rnds[6] = rnds[6] & 0x0f | 0x40;
45
- rnds[8] = rnds[8] & 0x3f | 0x80;
46
- return unsafeStringify(rnds);
47
- }
48
45
  function v4(options, buf, offset) {
49
- if (native.randomUUID && true && !options) {
50
- return native.randomUUID();
51
- }
52
- return _v4(options);
46
+ if (crypto.randomUUID) {
47
+ return crypto.randomUUID();
48
+ }
49
+ return _v4(options);
50
+ }
51
+ function _v4(options, buf, offset) {
52
+ options = options || {};
53
+ const rnds = options.random ?? options.rng?.() ?? rng();
54
+ if (rnds.length < 16) {
55
+ throw new Error('Random bytes length must be >= 16');
56
+ }
57
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
58
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
59
+ return unsafeStringify(rnds);
53
60
  }
54
61
 
55
62
  /*
@@ -64,9 +71,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
64
71
  governing permissions and limitations under the License.
65
72
  */
66
73
 
74
+
67
75
  var createEventMergeId = () => {
68
76
  return {
69
- eventMergeId: v4()
77
+ eventMergeId: v4(),
70
78
  };
71
79
  };
72
80
 
@@ -27,7 +27,7 @@ governing permissions and limitations under the License.
27
27
  * @param {*} value
28
28
  * @returns {boolean}
29
29
  */
30
- var isNil = value => value == null;
30
+ var isNil = (value) => value == null;
31
31
 
32
32
  /*
33
33
  Copyright 2019 Adobe. All rights reserved.
@@ -47,7 +47,8 @@ governing permissions and limitations under the License.
47
47
  * @param {*} value
48
48
  * @returns {boolean}
49
49
  */
50
- var isObject = value => !isNil(value) && !Array.isArray(value) && typeof value === "object";
50
+ var isObject = (value) =>
51
+ !isNil(value) && !Array.isArray(value) && typeof value === "object";
51
52
 
52
53
  /*
53
54
  Copyright 2019 Adobe. All rights reserved.
@@ -64,11 +65,13 @@ governing permissions and limitations under the License.
64
65
 
65
66
  // Keys that should never be copied to prevent prototype pollution.
66
67
  const DANGEROUS_KEYS = ["__proto__", "constructor", "prototype"];
68
+
67
69
  const deepAssignObject = (target, source) => {
68
- Object.keys(source).forEach(key => {
70
+ Object.keys(source).forEach((key) => {
69
71
  if (DANGEROUS_KEYS.includes(key)) {
70
72
  return;
71
73
  }
74
+
72
75
  if (isObject(target[key]) && isObject(source[key])) {
73
76
  deepAssignObject(target[key], source[key]);
74
77
  return;
@@ -89,8 +92,11 @@ var deepAssign = (target, ...sources) => {
89
92
  if (isNil(target)) {
90
93
  throw new TypeError('deepAssign "target" cannot be null or undefined');
91
94
  }
95
+
92
96
  const result = Object(target);
93
- sources.forEach(source => deepAssignObject(result, Object(source)));
97
+
98
+ sources.forEach((source) => deepAssignObject(result, Object(source)));
99
+
94
100
  return result;
95
101
  };
96
102