@moneylion/react-native-offer-carousel 1.0.0 → 1.0.1

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 (737) hide show
  1. package/README.md +44 -0
  2. package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js +30 -0
  3. package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
  4. package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js +40 -0
  5. package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
  6. package/lib/commonjs/capabilities/configuration/src/brands/index.js +20 -0
  7. package/lib/commonjs/capabilities/configuration/src/brands/index.js.map +1 -0
  8. package/lib/commonjs/capabilities/configuration/src/brands/types.js +13 -0
  9. package/lib/commonjs/capabilities/configuration/src/brands/types.js.map +1 -0
  10. package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +17 -0
  11. package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
  12. package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +33 -0
  13. package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
  14. package/lib/commonjs/capabilities/core/src/index.js +17 -0
  15. package/lib/commonjs/capabilities/core/src/index.js.map +1 -0
  16. package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js +18 -0
  17. package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
  18. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js +18 -0
  19. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
  20. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +87 -0
  21. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
  22. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js +41 -0
  23. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
  24. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js +21 -0
  25. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
  26. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js +12 -0
  27. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
  28. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js +41 -0
  29. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
  30. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +26 -0
  31. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
  32. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js +83 -0
  33. package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
  34. package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +131 -0
  35. package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
  36. package/lib/commonjs/capabilities/offer-catalog/src/index.js +65 -0
  37. package/lib/commonjs/capabilities/offer-catalog/src/index.js.map +1 -0
  38. package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
  39. package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
  40. package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +11 -0
  41. package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
  42. package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js +70 -0
  43. package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
  44. package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js +21 -0
  45. package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
  46. package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js +161 -0
  47. package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
  48. package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js +44 -0
  49. package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
  50. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +78 -0
  51. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
  52. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +22 -0
  53. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
  54. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +60 -0
  55. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
  56. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js +20 -0
  57. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
  58. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +62 -0
  59. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
  60. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +32 -0
  61. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
  62. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +31 -0
  63. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
  64. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +22 -0
  65. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
  66. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +46 -0
  67. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
  68. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +208 -0
  69. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
  70. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +20 -0
  71. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
  72. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +24 -0
  73. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
  74. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +21 -0
  75. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
  76. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +40 -0
  77. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
  78. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js +204 -0
  79. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
  80. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +35 -0
  81. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
  82. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +43 -0
  83. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
  84. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +21 -0
  85. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
  86. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +32 -0
  87. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
  88. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +76 -0
  89. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
  90. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +69 -0
  91. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
  92. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +23 -0
  93. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
  94. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +47 -0
  95. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
  96. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +72 -0
  97. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
  98. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +23 -0
  99. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
  100. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +29 -0
  101. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
  102. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +53 -0
  103. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
  104. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +46 -0
  105. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
  106. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +26 -0
  107. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
  108. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +83 -0
  109. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
  110. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +28 -0
  111. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
  112. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +28 -0
  113. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
  114. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +21 -0
  115. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
  116. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +30 -0
  117. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
  118. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js +48 -0
  119. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
  120. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js +6 -0
  121. package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
  122. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +6 -0
  123. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
  124. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
  125. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
  126. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
  127. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
  128. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +6 -0
  129. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
  130. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +74 -0
  131. package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
  132. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +61 -0
  133. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
  134. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +143 -0
  135. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
  136. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js +54 -0
  137. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
  138. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +122 -0
  139. package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
  140. package/lib/commonjs/capabilities/ui/elements/src/components/index.js +13 -0
  141. package/lib/commonjs/capabilities/ui/elements/src/components/index.js.map +1 -0
  142. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js +110 -0
  143. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
  144. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +91 -0
  145. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
  146. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +44 -0
  147. package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
  148. package/lib/commonjs/capabilities/ui/elements/src/index.js +28 -0
  149. package/lib/commonjs/capabilities/ui/elements/src/index.js.map +1 -0
  150. package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js +23 -0
  151. package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
  152. package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +1 -1
  153. package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +1 -1
  154. package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
  155. package/lib/commonjs/components/Common/BaseOfferCard/index.js +4 -4
  156. package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
  157. package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
  158. package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
  159. package/lib/commonjs/components/Modal/DescriptionPoints.js +3 -3
  160. package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
  161. package/lib/commonjs/components/Modal/Disclaimer.js +1 -1
  162. package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
  163. package/lib/commonjs/components/MoneyLionOfferCarousel.js +1 -1
  164. package/lib/commonjs/config/mocks/cnfContext.js +143 -0
  165. package/lib/commonjs/config/mocks/cnfContext.js.map +1 -0
  166. package/lib/commonjs/pageData.js +1 -1
  167. package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
  168. package/lib/commonjs/utils/formatOfferUrl.js +1 -1
  169. package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
  170. package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js +24 -0
  171. package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
  172. package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js +34 -0
  173. package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
  174. package/lib/module/capabilities/configuration/src/brands/index.js +3 -0
  175. package/lib/module/capabilities/configuration/src/brands/index.js.map +1 -0
  176. package/lib/module/capabilities/configuration/src/brands/types.js +6 -0
  177. package/lib/module/capabilities/configuration/src/brands/types.js.map +1 -0
  178. package/lib/module/capabilities/core/src/domain/third-party-search/index.js +2 -0
  179. package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
  180. package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +26 -0
  181. package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
  182. package/lib/module/capabilities/core/src/index.js +2 -0
  183. package/lib/module/capabilities/core/src/index.js.map +1 -0
  184. package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js +12 -0
  185. package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
  186. package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js +12 -0
  187. package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
  188. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +81 -0
  189. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
  190. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js +35 -0
  191. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
  192. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js +15 -0
  193. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
  194. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js +6 -0
  195. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
  196. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js +35 -0
  197. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
  198. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +20 -0
  199. package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
  200. package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js +8 -0
  201. package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
  202. package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +122 -0
  203. package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
  204. package/lib/module/capabilities/offer-catalog/src/index.js +5 -0
  205. package/lib/module/capabilities/offer-catalog/src/index.js.map +1 -0
  206. package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
  207. package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
  208. package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +4 -0
  209. package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
  210. package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js +58 -0
  211. package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
  212. package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js +15 -0
  213. package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
  214. package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js +151 -0
  215. package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
  216. package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js +37 -0
  217. package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
  218. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +71 -0
  219. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
  220. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +15 -0
  221. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
  222. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +59 -0
  223. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
  224. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js +13 -0
  225. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
  226. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +61 -0
  227. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
  228. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +25 -0
  229. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
  230. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +30 -0
  231. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
  232. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +15 -0
  233. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
  234. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +39 -0
  235. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
  236. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +207 -0
  237. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
  238. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +13 -0
  239. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
  240. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +23 -0
  241. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
  242. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +14 -0
  243. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
  244. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +39 -0
  245. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
  246. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js +20 -0
  247. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
  248. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +28 -0
  249. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
  250. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +42 -0
  251. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
  252. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +14 -0
  253. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
  254. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +31 -0
  255. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
  256. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +69 -0
  257. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
  258. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +68 -0
  259. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
  260. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +16 -0
  261. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
  262. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +40 -0
  263. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
  264. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +71 -0
  265. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
  266. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +16 -0
  267. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
  268. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +28 -0
  269. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
  270. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +46 -0
  271. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
  272. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +45 -0
  273. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
  274. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +19 -0
  275. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
  276. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +82 -0
  277. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
  278. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +21 -0
  279. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
  280. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +27 -0
  281. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
  282. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +14 -0
  283. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
  284. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +29 -0
  285. package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
  286. package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js +41 -0
  287. package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
  288. package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js +2 -0
  289. package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
  290. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +2 -0
  291. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
  292. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
  293. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
  294. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
  295. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
  296. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +2 -0
  297. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
  298. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +65 -0
  299. package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
  300. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +50 -0
  301. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
  302. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +134 -0
  303. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
  304. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js +46 -0
  305. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
  306. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +115 -0
  307. package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
  308. package/lib/module/capabilities/ui/elements/src/components/index.js +2 -0
  309. package/lib/module/capabilities/ui/elements/src/components/index.js.map +1 -0
  310. package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js +103 -0
  311. package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
  312. package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +86 -0
  313. package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
  314. package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +43 -0
  315. package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
  316. package/lib/module/capabilities/ui/elements/src/index.js +3 -0
  317. package/lib/module/capabilities/ui/elements/src/index.js.map +1 -0
  318. package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js +16 -0
  319. package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
  320. package/lib/module/components/Cards/VideosCard/VideosCard.js +1 -1
  321. package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +1 -2
  322. package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
  323. package/lib/module/components/Common/BaseOfferCard/index.js +3 -4
  324. package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
  325. package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
  326. package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
  327. package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
  328. package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
  329. package/lib/module/components/Modal/DescriptionPoints.js +2 -2
  330. package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
  331. package/lib/module/components/Modal/Disclaimer.js +1 -1
  332. package/lib/module/components/Modal/Disclaimer.js.map +1 -1
  333. package/lib/module/components/MoneyLionOfferCarousel.js +1 -1
  334. package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
  335. package/lib/module/config/mocks/cnfContext.js +137 -0
  336. package/lib/module/config/mocks/cnfContext.js.map +1 -0
  337. package/lib/module/pageData.js +1 -1
  338. package/lib/module/pageData.js.map +1 -1
  339. package/lib/module/services/getProductTypesByQuery.js +1 -1
  340. package/lib/module/services/getProductTypesByQuery.js.map +1 -1
  341. package/lib/module/utils/formatOfferUrl.js +1 -1
  342. package/lib/module/utils/formatOfferUrl.js.map +1 -1
  343. package/lib/module/utils/getOffersByProductTypes.js +2 -2
  344. package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
  345. package/lib/typescript/builder/builder.d.ts +2 -2
  346. package/lib/typescript/builder/builder.d.ts.map +1 -1
  347. package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
  348. package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/createDerivedBrands.d.ts +1 -1
  349. package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
  350. package/lib/typescript/src/capabilities/configuration/src/brands/index.d.ts.map +1 -0
  351. package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/types.d.ts +1 -1
  352. package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -0
  353. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
  354. package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
  355. package/lib/typescript/src/capabilities/core/src/index.d.ts.map +1 -0
  356. package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
  357. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
  358. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
  359. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
  360. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
  361. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
  362. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
  363. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
  364. package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
  365. package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
  366. package/lib/typescript/src/capabilities/offer-catalog/src/index.d.ts.map +1 -0
  367. package/lib/typescript/src/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
  368. package/lib/typescript/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
  369. package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
  370. package/lib/typescript/src/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
  371. package/lib/typescript/src/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
  372. package/lib/typescript/src/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
  373. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
  374. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
  375. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
  376. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
  377. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
  378. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
  379. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
  380. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
  381. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
  382. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
  383. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
  384. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
  385. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
  386. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
  387. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
  388. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
  389. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
  390. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
  391. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
  392. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
  393. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
  394. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
  395. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
  396. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
  397. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
  398. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
  399. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
  400. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
  401. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
  402. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
  403. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
  404. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
  405. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
  406. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
  407. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
  408. package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
  409. package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
  410. package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
  411. package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
  412. package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +9 -9
  413. package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
  414. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
  415. package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/components.d.ts +1 -1
  416. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
  417. package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/index.d.ts +1 -1
  418. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
  419. package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
  420. package/lib/typescript/src/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
  421. package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
  422. package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
  423. package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
  424. package/lib/typescript/src/capabilities/ui/elements/src/index.d.ts.map +1 -0
  425. package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
  426. package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +5 -1
  427. package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -1
  428. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +2 -2
  429. package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
  430. package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +1 -1
  431. package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
  432. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
  433. package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
  434. package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +1 -1
  435. package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
  436. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -1
  437. package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
  438. package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +1 -1
  439. package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
  440. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +1 -1
  441. package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
  442. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +1 -1
  443. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
  444. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
  445. package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
  446. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +1 -1
  447. package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
  448. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
  449. package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
  450. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +1 -1
  451. package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
  452. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
  453. package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
  454. package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -0
  455. package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
  456. package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
  457. package/lib/typescript/src/pageData.d.ts +2 -2
  458. package/lib/typescript/src/pageData.d.ts.map +1 -1
  459. package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
  460. package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
  461. package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
  462. package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
  463. package/lib/typescript/src/utils/formatOfferUrl.d.ts +1 -1
  464. package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
  465. package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
  466. package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
  467. package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
  468. package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
  469. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
  470. package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
  471. package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +2 -2
  472. package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
  473. package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
  474. package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
  475. package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
  476. package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
  477. package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
  478. package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
  479. package/package.json +1 -1
  480. package/src/capabilities/configuration/src/brands/checkVisualEligibility.ts +29 -0
  481. package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +39 -0
  482. package/src/capabilities/configuration/src/brands/index.ts +2 -0
  483. package/src/capabilities/configuration/src/brands/types.ts +8 -0
  484. package/src/capabilities/core/src/domain/third-party-search/index.ts +1 -0
  485. package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +33 -0
  486. package/src/capabilities/core/src/index.ts +1 -0
  487. package/src/capabilities/core/src/system/cnfContext/CnfContext.ts +21 -0
  488. package/src/capabilities/core/src/system/cnfContext/schemas/App.ts +13 -0
  489. package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +119 -0
  490. package/src/capabilities/core/src/system/cnfContext/schemas/Configuration.ts +49 -0
  491. package/src/capabilities/core/src/system/cnfContext/schemas/Request.ts +16 -0
  492. package/src/capabilities/core/src/system/cnfContext/schemas/Session.ts +9 -0
  493. package/src/capabilities/core/src/system/cnfContext/schemas/Signals.ts +47 -0
  494. package/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.ts +25 -0
  495. package/src/capabilities/core/src/system/cnfContext/schemas/index.ts +7 -0
  496. package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +171 -0
  497. package/src/capabilities/offer-catalog/src/index.ts +10 -0
  498. package/src/capabilities/offer-catalog/src/types/offerCatalogSchema.ts +119 -0
  499. package/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.ts +3 -0
  500. package/src/capabilities/offer-catalog/src/utils/contextUtil.ts +73 -0
  501. package/src/capabilities/offer-catalog/src/utils/errorUtil.ts +18 -0
  502. package/src/capabilities/offer-catalog/src/utils/formatUtils.ts +168 -0
  503. package/src/capabilities/offer-catalog/src/utils/getOfferUrl.ts +61 -0
  504. package/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.ts +103 -0
  505. package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts +58 -0
  506. package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.ts +31 -0
  507. package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts +60 -0
  508. package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.ts +31 -0
  509. package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts +29 -0
  510. package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.ts +36 -0
  511. package/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.ts +24 -0
  512. package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts +206 -0
  513. package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.ts +83 -0
  514. package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts +22 -0
  515. package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.ts +25 -0
  516. package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts +38 -0
  517. package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts +24 -0
  518. package/src/capabilities/offer-catalog/src/utils/stats/formatters/index.ts +19 -0
  519. package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts +41 -0
  520. package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts +52 -0
  521. package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts +30 -0
  522. package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts +23 -0
  523. package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts +67 -0
  524. package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts +92 -0
  525. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.ts +34 -0
  526. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.ts +70 -0
  527. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.ts +71 -0
  528. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.ts +27 -0
  529. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.ts +38 -0
  530. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.ts +44 -0
  531. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.ts +68 -0
  532. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.ts +81 -0
  533. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.ts +38 -0
  534. package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.ts +26 -0
  535. package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +45 -0
  536. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.ts +28 -0
  537. package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.ts +23 -0
  538. package/src/capabilities/offer-catalog/src/utils/stats/index.ts +141 -0
  539. package/src/capabilities/offer-catalog/src/utils/stats/types.ts +47 -0
  540. package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.ts +6 -0
  541. package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.ts +2272 -0
  542. package/src/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.ts +1924 -0
  543. package/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.ts +5 -0
  544. package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +83 -0
  545. package/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.tsx +66 -0
  546. package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +175 -0
  547. package/src/capabilities/ui/elements/src/components/MarkdownText/index.tsx +52 -0
  548. package/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.ts +124 -0
  549. package/src/capabilities/ui/elements/src/components/index.ts +1 -0
  550. package/src/capabilities/ui/elements/src/components/thumbor/index.tsx +115 -0
  551. package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.ts +42 -0
  552. package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.ts +110 -0
  553. package/src/capabilities/ui/elements/src/index.ts +3 -0
  554. package/src/capabilities/ui/elements/src/offerCardAttributes.ts +28 -0
  555. package/src/components/Cards/VideosCard/VideosCard.tsx +1 -1
  556. package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +7 -2
  557. package/src/components/Common/BaseOfferCard/index.tsx +3 -4
  558. package/src/components/Common/DynamicOfferCard/CallToAction.tsx +1 -1
  559. package/src/components/Common/DynamicOfferCard/SeeMore.tsx +1 -1
  560. package/src/components/Common/DynamicOfferCard/index.tsx +1 -1
  561. package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +1 -1
  562. package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +1 -1
  563. package/src/components/DynamicOffers/Render/Offer.tsx +1 -1
  564. package/src/components/Layouts/CreditCardOfferCard/index.tsx +1 -1
  565. package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
  566. package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -1
  567. package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
  568. package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +1 -1
  569. package/src/components/Modal/DescriptionPoints.tsx +2 -2
  570. package/src/components/Modal/Disclaimer.tsx +1 -1
  571. package/src/components/Modal/OfferDetailsModal.tsx +1 -1
  572. package/src/components/MoneyLionOfferCarousel.tsx +2 -2
  573. package/src/config/mocks/cnfContext.ts +136 -0
  574. package/src/context/EventHandlerProvider.tsx +1 -1
  575. package/src/pageData.ts +2 -2
  576. package/src/services/getDynamicOffers.ts +2 -2
  577. package/src/services/getProductTypesByQuery.ts +1 -1
  578. package/src/utils/addClientTagsToOfferLinks.ts +1 -1
  579. package/src/utils/formatOfferUrl.ts +1 -1
  580. package/src/utils/getDefaultProductType.ts +1 -1
  581. package/src/utils/getEnableUseCachedOffers.ts +1 -1
  582. package/src/utils/getOffersBasedOnLayout.ts +1 -1
  583. package/src/utils/getOffersByProductTypes.ts +3 -3
  584. package/src/utils/getProductTypesDefinition.ts +1 -1
  585. package/src/utils/selectDynamicOffers.ts +1 -1
  586. package/src/utils/sortOffersByRecommendationScore.ts +1 -1
  587. package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +0 -1
  588. package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +0 -1
  589. package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +0 -1
  590. package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +0 -1
  591. package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
  592. package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
  593. package/lib/typescript/capabilities/core/src/index.d.ts.map +0 -1
  594. package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +0 -1
  595. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +0 -1
  596. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +0 -1
  597. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +0 -1
  598. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +0 -1
  599. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +0 -1
  600. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +0 -1
  601. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +0 -1
  602. package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +0 -1
  603. package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +0 -1
  604. package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +0 -1
  605. package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +0 -1
  606. package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +0 -1
  607. package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +0 -1
  608. package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +0 -1
  609. package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +0 -1
  610. package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +0 -1
  611. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +0 -1
  612. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +0 -1
  613. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +0 -1
  614. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +0 -1
  615. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +0 -1
  616. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +0 -1
  617. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +0 -1
  618. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +0 -1
  619. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +0 -1
  620. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +0 -1
  621. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +0 -1
  622. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +0 -1
  623. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +0 -1
  624. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +0 -1
  625. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +0 -1
  626. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +0 -1
  627. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +0 -1
  628. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +0 -1
  629. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +0 -1
  630. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +0 -1
  631. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +0 -1
  632. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +0 -1
  633. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +0 -1
  634. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +0 -1
  635. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +0 -1
  636. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +0 -1
  637. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +0 -1
  638. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +0 -1
  639. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +0 -1
  640. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +0 -1
  641. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +0 -1
  642. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +0 -1
  643. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +0 -1
  644. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +0 -1
  645. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +0 -1
  646. package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +0 -1
  647. package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +0 -1
  648. package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +0 -1
  649. package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +0 -1
  650. package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +0 -1
  651. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +0 -7
  652. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +0 -1
  653. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +0 -12
  654. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +0 -1
  655. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +0 -2
  656. package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +0 -1
  657. package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +0 -1
  658. package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +0 -1
  659. package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +0 -1
  660. package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +0 -1
  661. package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +0 -1
  662. package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +0 -1
  663. package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +0 -1
  664. package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +0 -1
  665. package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +0 -1
  666. package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +0 -1
  667. package/lib/typescript/config/mocks/cnfContext.d.ts.map +0 -1
  668. /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/checkVisualEligibility.d.ts +0 -0
  669. /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/index.d.ts +0 -0
  670. /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/index.d.ts +0 -0
  671. /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -0
  672. /package/lib/typescript/{capabilities → src/capabilities}/core/src/index.d.ts +0 -0
  673. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/CnfContext.d.ts +0 -0
  674. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/App.d.ts +0 -0
  675. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Brand.d.ts +0 -0
  676. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Configuration.d.ts +0 -0
  677. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Request.d.ts +0 -0
  678. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Session.d.ts +0 -0
  679. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Signals.d.ts +0 -0
  680. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Subaccount.d.ts +0 -0
  681. /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/index.d.ts +0 -0
  682. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/api/offerCatalogApi.d.ts +0 -0
  683. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/index.d.ts +0 -0
  684. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/types/offerCatalogSchema.d.ts +0 -0
  685. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/arrayToMarkdownList.d.ts +0 -0
  686. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/contextUtil.d.ts +0 -0
  687. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/errorUtil.d.ts +0 -0
  688. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/formatUtils.d.ts +0 -0
  689. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/getOfferUrl.d.ts +0 -0
  690. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +0 -0
  691. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.d.ts +0 -0
  692. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +0 -0
  693. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.d.ts +0 -0
  694. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +0 -0
  695. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +0 -0
  696. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +0 -0
  697. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currency.d.ts +0 -0
  698. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +0 -0
  699. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +0 -0
  700. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +0 -0
  701. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +0 -0
  702. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +0 -0
  703. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +0 -0
  704. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/index.d.ts +0 -0
  705. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +0 -0
  706. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +0 -0
  707. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.d.ts +0 -0
  708. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +0 -0
  709. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +0 -0
  710. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +0 -0
  711. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +0 -0
  712. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +0 -0
  713. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +0 -0
  714. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +0 -0
  715. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +0 -0
  716. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +0 -0
  717. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +0 -0
  718. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +0 -0
  719. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +0 -0
  720. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +0 -0
  721. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +0 -0
  722. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +0 -0
  723. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +0 -0
  724. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/index.d.ts +0 -0
  725. /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/types.d.ts +0 -0
  726. /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +0 -0
  727. /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +0 -0
  728. /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/types/index.d.ts +0 -0
  729. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +0 -0
  730. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +0 -0
  731. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/index.d.ts +0 -0
  732. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/index.d.ts +0 -0
  733. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +0 -0
  734. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +0 -0
  735. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/index.d.ts +0 -0
  736. /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/offerCardAttributes.d.ts +0 -0
  737. /package/lib/typescript/{config → src/config}/mocks/cnfContext.d.ts +0 -0
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _App = require("./App");
7
+ Object.keys(_App).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _App[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _App[key];
14
+ }
15
+ });
16
+ });
17
+ var _Brand = require("./Brand");
18
+ Object.keys(_Brand).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _Brand[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _Brand[key];
25
+ }
26
+ });
27
+ });
28
+ var _Configuration = require("./Configuration");
29
+ Object.keys(_Configuration).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _Configuration[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _Configuration[key];
36
+ }
37
+ });
38
+ });
39
+ var _Request = require("./Request");
40
+ Object.keys(_Request).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _Request[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _Request[key];
47
+ }
48
+ });
49
+ });
50
+ var _Session = require("./Session");
51
+ Object.keys(_Session).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _Session[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _Session[key];
58
+ }
59
+ });
60
+ });
61
+ var _Signals = require("./Signals");
62
+ Object.keys(_Signals).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _Signals[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _Signals[key];
69
+ }
70
+ });
71
+ });
72
+ var _Subaccount = require("./Subaccount");
73
+ Object.keys(_Subaccount).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _Subaccount[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _Subaccount[key];
80
+ }
81
+ });
82
+ });
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_App","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Brand","_Configuration","_Request","_Session","_Signals","_Subaccount"],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/index.ts"],"mappings":";;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,IAAA,EAAAI,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0 +1,131 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getOffersForProductTypes = exports.getCachedOffersByProductTypes = void 0;
7
+ var _radash = require("radash");
8
+ var _contextUtil = require("../utils/contextUtil");
9
+ var _errorUtil = _interopRequireDefault(require("../utils/errorUtil"));
10
+ var _withDeviceSignals = require("../../../offers/pipeline/src/sources/ratetables/withDeviceSignals");
11
+ var _apiEnvironment = require("../../../../apiEnvironment");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const getCachedOffersByProductTypes = context => async productTypes => {
14
+ // const cachedOffersByProductTypesLogger = pinoRootLogger.child({
15
+ // name: "cachedOffersByProductTypesLogger",
16
+ // });
17
+
18
+ try {
19
+ const subAccountUuid = (0, _contextUtil.getSubAccountUUID)(context);
20
+ const isDev = (0, _contextUtil.getIsDevEnvironment)(context);
21
+ const url = new URL(`${(0, _apiEnvironment.getOfferCatalogApiBaseUrl)(isDev)}/leads/public/channelOffers`);
22
+ url.searchParams.append("productType", productTypes.join(","));
23
+ if (subAccountUuid) {
24
+ url.searchParams.append("channelUuid", subAccountUuid);
25
+ }
26
+
27
+ // TODO find a way to add the revalidate: 3600 kind of logic here
28
+ const response = await fetch(url.toString(), {
29
+ method: "GET",
30
+ headers: {
31
+ "Content-Type": "application/json"
32
+ }
33
+ });
34
+ const logFormat = {
35
+ status: response.status,
36
+ statusText: response.statusText,
37
+ url: response.url
38
+ };
39
+ if (!response.ok) {
40
+ const errorMessage = _errorUtil.default.getErrorMessageForResponseStatus(response.status, response.statusText);
41
+ console.error(logFormat, errorMessage);
42
+ throw new Error(errorMessage);
43
+ }
44
+ const offersData = await response.json();
45
+ if ((0, _radash.isEmpty)(offersData.offers)) {
46
+ const errorMessage = _errorUtil.default.getErrorForOffersFromProductTypes("NO_OFFERS");
47
+ console.error(logFormat, errorMessage);
48
+ throw new Error(errorMessage);
49
+ }
50
+ return offersData;
51
+ } catch (error) {
52
+ const errorMessage = _errorUtil.default.getErrorForOffersFromProductTypes("DEFAULT");
53
+ console.error(error, errorMessage);
54
+ return {
55
+ isError: true,
56
+ leadUuid: "",
57
+ offers: [],
58
+ uuid: ""
59
+ };
60
+ }
61
+ };
62
+ exports.getCachedOffersByProductTypes = getCachedOffersByProductTypes;
63
+ const getOffersForProductTypes = context => async (productTypes, customClientTags) => {
64
+ // const offersFromProductTypesLogger = pinoRootLogger.child({
65
+ // name: "offersFromProductTypesLogger",
66
+ // });
67
+
68
+ try {
69
+ const token = (0, _contextUtil.getSubaccountToken)(context);
70
+ const leadUuid = (0, _contextUtil.getLeadUUID)(context);
71
+ const isDev = (0, _contextUtil.getIsDevEnvironment)(context);
72
+ let fields = {
73
+ productTypes,
74
+ clientTags: customClientTags
75
+ };
76
+ try {
77
+ const stateCode = (0, _contextUtil.getStateCode)(context);
78
+ // TODO: Refactor to not use this withDeviceSignals
79
+ fields = (0, _withDeviceSignals.withDeviceSignals)(context, {
80
+ productTypes,
81
+ clientTags: customClientTags,
82
+ personalInformation: {
83
+ state: stateCode
84
+ }
85
+ });
86
+ } catch (error) {
87
+ // handle error if context is not available. This scenario should not occur in production
88
+ console.error(error, _errorUtil.default.getErrorForOffersFromProductTypes("DEVICE_SIGNALS_ERROR"));
89
+ }
90
+ const url = `${(0, _apiEnvironment.getOfferCatalogApiBaseUrl)(isDev)}/leads/${leadUuid}/offerCatalogRateTables`;
91
+ const response = await fetch(url, {
92
+ method: "POST",
93
+ headers: {
94
+ "Content-Type": "application/json",
95
+ "Authorization": `Bearer ${token}`
96
+ },
97
+ body: JSON.stringify(fields)
98
+ });
99
+ const body = await response.json();
100
+ const logFormat = {
101
+ status: response.status,
102
+ statusText: response.statusText,
103
+ url: response.url,
104
+ body,
105
+ fields
106
+ };
107
+ if (!response.ok) {
108
+ const errorMessage = _errorUtil.default.getErrorMessageForResponseStatus(response.status, response.statusText);
109
+ console.error(logFormat, errorMessage);
110
+ throw new Error(errorMessage);
111
+ }
112
+ const offersData = body;
113
+ if ((0, _radash.isEmpty)(offersData.offers)) {
114
+ const errorMessage = _errorUtil.default.getErrorForOffersFromProductTypes("NO_OFFERS");
115
+ console.error(logFormat, errorMessage);
116
+ throw new Error(errorMessage);
117
+ }
118
+ return offersData;
119
+ } catch (error) {
120
+ const errorMessage = _errorUtil.default.getErrorForOffersFromProductTypes("DEFAULT");
121
+ console.error(error, errorMessage);
122
+ return {
123
+ isError: true,
124
+ leadUuid: "",
125
+ offers: [],
126
+ uuid: ""
127
+ };
128
+ }
129
+ };
130
+ exports.getOffersForProductTypes = getOffersForProductTypes;
131
+ //# sourceMappingURL=offerCatalogApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_radash","require","_contextUtil","_errorUtil","_interopRequireDefault","_withDeviceSignals","_apiEnvironment","e","__esModule","default","getCachedOffersByProductTypes","context","productTypes","subAccountUuid","getSubAccountUUID","isDev","getIsDevEnvironment","url","URL","getOfferCatalogApiBaseUrl","searchParams","append","join","response","fetch","toString","method","headers","logFormat","status","statusText","ok","errorMessage","errorUtil","getErrorMessageForResponseStatus","console","error","Error","offersData","json","isEmpty","offers","getErrorForOffersFromProductTypes","isError","leadUuid","uuid","exports","getOffersForProductTypes","customClientTags","token","getSubaccountToken","getLeadUUID","fields","clientTags","stateCode","getStateCode","withDeviceSignals","personalInformation","state","body","JSON","stringify"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/api/offerCatalogApi.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAAuE,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhE,MAAMG,6BAA6B,GAC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P,OAAO,CAACC,KAAK,CAACA,KAAK,EAAEJ,YAAY,CAAC;IAElC,OAAO;MACNW,OAAO,EAAE,IAAI;MACbC,QAAQ,EAAE,EAAE;MACZH,MAAM,EAAE,EAAE;MACVI,IAAI,EAAE;IACP,CAAC;EACF;AACD,CAAC;AAACC,OAAA,CAAAC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ getOfferUrl: true,
8
+ getSubAccountUUID: true,
9
+ formatAmount: true,
10
+ formatPercentage: true,
11
+ formatStringListWithAnd: true,
12
+ formatRange: true
13
+ };
14
+ Object.defineProperty(exports, "formatAmount", {
15
+ enumerable: true,
16
+ get: function () {
17
+ return _formatUtils.formatAmount;
18
+ }
19
+ });
20
+ Object.defineProperty(exports, "formatPercentage", {
21
+ enumerable: true,
22
+ get: function () {
23
+ return _formatUtils.formatPercentage;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "formatRange", {
27
+ enumerable: true,
28
+ get: function () {
29
+ return _formatUtils.formatRange;
30
+ }
31
+ });
32
+ Object.defineProperty(exports, "formatStringListWithAnd", {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _formatUtils.formatStringListWithAnd;
36
+ }
37
+ });
38
+ Object.defineProperty(exports, "getOfferUrl", {
39
+ enumerable: true,
40
+ get: function () {
41
+ return _getOfferUrl.getOfferUrl;
42
+ }
43
+ });
44
+ Object.defineProperty(exports, "getSubAccountUUID", {
45
+ enumerable: true,
46
+ get: function () {
47
+ return _contextUtil.getSubAccountUUID;
48
+ }
49
+ });
50
+ var _arrayToMarkdownList = require("./utils/arrayToMarkdownList");
51
+ Object.keys(_arrayToMarkdownList).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
54
+ if (key in exports && exports[key] === _arrayToMarkdownList[key]) return;
55
+ Object.defineProperty(exports, key, {
56
+ enumerable: true,
57
+ get: function () {
58
+ return _arrayToMarkdownList[key];
59
+ }
60
+ });
61
+ });
62
+ var _getOfferUrl = require("./utils/getOfferUrl");
63
+ var _contextUtil = require("./utils/contextUtil");
64
+ var _formatUtils = require("./utils/formatUtils");
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_arrayToMarkdownList","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getOfferUrl","_contextUtil","_formatUtils"],"sourceRoot":"../../../../../src","sources":["capabilities/offer-catalog/src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,oBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,oBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,oBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,YAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,YAAA,GAAAf,OAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=offerCatalogSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/types/offerCatalogSchema.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.arrayToMarkdownList = void 0;
7
+ const arrayToMarkdownList = arr => {
8
+ return arr === null || arr === void 0 ? void 0 : arr.map(item => `- ${item}`).join("\n");
9
+ };
10
+ exports.arrayToMarkdownList = arrayToMarkdownList;
11
+ //# sourceMappingURL=arrayToMarkdownList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["arrayToMarkdownList","arr","map","item","join","exports"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/utils/arrayToMarkdownList.ts"],"mappings":";;;;;;AAAO,MAAMA,mBAAmB,GAAIC,GAAa,IAAK;EACrD,OAAOA,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEC,GAAG,CAAEC,IAAI,IAAK,KAAKA,IAAI,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAClD,CAAC;AAACC,OAAA,CAAAL,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseClientTags = exports.getSubaccountToken = exports.getSubAccountUUID = exports.getStateCode = exports.getLeadUUID = exports.getIsDevEnvironment = void 0;
7
+ const STATE_CODE_FALLBACK = "NY";
8
+ const getStateCode = cnfContext => {
9
+ var _cnfContext$signals$d;
10
+ const stateCode = (_cnfContext$signals$d = cnfContext.signals.deviceSignals) === null || _cnfContext$signals$d === void 0 || (_cnfContext$signals$d = _cnfContext$signals$d.state) === null || _cnfContext$signals$d === void 0 ? void 0 : _cnfContext$signals$d.code;
11
+ if (!stateCode) {
12
+ console.warn(stateCode, "state code not found in getCNFContext");
13
+ }
14
+ return stateCode || STATE_CODE_FALLBACK;
15
+ };
16
+ exports.getStateCode = getStateCode;
17
+ const getSubaccountToken = cnfContext => cnfContext.subaccount.publicToken;
18
+ exports.getSubaccountToken = getSubaccountToken;
19
+ const parseClientTags = tags => {
20
+ if (!tags) {
21
+ return {};
22
+ }
23
+
24
+ // Decode the tags to handle special characters
25
+ const decodedTags = decodeURIComponent(tags);
26
+ const clientTags = decodedTags
27
+ // Split the tags by the 'tag.' prefix to get the individual tags
28
+ .split(/(?=(?:^|&)tag\.)/).reduce((acc, tag) => {
29
+ // Remove the leading '&' from the tag if it exists
30
+ const cleanTag = tag.replace(/^&/, "");
31
+ // Find the index of the '=' character in the tag
32
+ const equalIndex = cleanTag.indexOf("=");
33
+
34
+ // If the tag is not a valid key-value pair, return the accumulator
35
+ if (equalIndex === -1) return acc;
36
+
37
+ // Extract the key and value from the tag
38
+ const key = cleanTag.substring(0, equalIndex);
39
+ const value = cleanTag.substring(equalIndex + 1);
40
+
41
+ // If the key starts with 'tag.', it is a valid client tag
42
+ if (key.startsWith("tag.")) {
43
+ const cleanKey = key.replace("tag.", "");
44
+ // Handle comma-separated or pipe-separated values
45
+ if (value.includes(",") || value.includes("|")) {
46
+ // Split the value into an array based on comma or pipe separators
47
+ acc[cleanKey] = value.split(/[,|]/);
48
+ } else {
49
+ // If the value is not comma or pipe separated, add it to the accumulator as a single value
50
+ acc[cleanKey] = [value];
51
+ }
52
+ }
53
+ return acc;
54
+ }, {});
55
+ return clientTags;
56
+ };
57
+ exports.parseClientTags = parseClientTags;
58
+ const getSubAccountUUID = cnfContext => {
59
+ const supplySubaccountUuid = cnfContext.subaccount.supplySubaccountUuid;
60
+ if (!supplySubaccountUuid) {
61
+ console.warn("Supply subaccount uuid not found in context");
62
+ }
63
+ return supplySubaccountUuid;
64
+ };
65
+ exports.getSubAccountUUID = getSubAccountUUID;
66
+ const getLeadUUID = cnfContext => cnfContext.signals.lead.uuid;
67
+ exports.getLeadUUID = getLeadUUID;
68
+ const getIsDevEnvironment = cnfContext => cnfContext.isDev;
69
+ exports.getIsDevEnvironment = getIsDevEnvironment;
70
+ //# sourceMappingURL=contextUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["STATE_CODE_FALLBACK","getStateCode","cnfContext","_cnfContext$signals$d","stateCode","signals","deviceSignals","state","code","console","warn","exports","getSubaccountToken","subaccount","publicToken","parseClientTags","tags","decodedTags","decodeURIComponent","clientTags","split","reduce","acc","tag","cleanTag","replace","equalIndex","indexOf","key","substring","value","startsWith","cleanKey","includes","getSubAccountUUID","supplySubaccountUuid","getLeadUUID","lead","uuid","getIsDevEnvironment","isDev"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/utils/contextUtil.ts"],"mappings":";;;;;;AAEA,MAAMA,mBAAmB,GAAG,IAAI;AAEzB,MAAMC,YAAY,GAAIC,UAAsB,IAAK;EAAA,IAAAC,qBAAA;EACvD,MAAMC,SAAS,IAAAD,qBAAA,GAAGD,UAAU,CAACG,OAAO,CAACC,aAAa,cAAAH,qBAAA,gBAAAA,qBAAA,GAAhCA,qBAAA,CAAkCI,KAAK,cAAAJ,qBAAA,uBAAvCA,qBAAA,CAAyCK,IAAI;EAE/D,IAAI,CAACJ,SAAS,EAAE;IACfK,OAAO,CAACC,IAAI,CAACN,SAAS,EAAE,uCAAuC,CAAC;EACjE;EAEA,OAAOA,SAAS,IAAIJ,mBAAmB;AACxC,CAAC;AAACW,OAAA,CAAAV,YAAA,GAAAA,YAAA;AAEK,MAAMW,kBAAkB,GAAIV,UAAsB,IACxDA,UAAU,CAACW,UAAU,CAACC,WAAW;AAACH,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAE5B,MAAMG,eAAe,GAAIC,IAAa,IAAK;EACjD,IAAI,CAACA,IAAI,EAAE;IACV,OAAO,CAAC,CAAC;EACV;;EAEA;EACA,MAAMC,WAAW,GAAGC,kBAAkB,CAACF,IAAI,CAAC;EAE5C,MAAMG,UAAU,GAAGF;EAClB;EAAA,CACCG,KAAK,CAAC,kBAAkB,CAAC,CACzBC,MAAM,CAA2B,CAACC,GAAG,EAAEC,GAAG,KAAK;IAC/C;IACA,MAAMC,QAAQ,GAAGD,GAAG,CAACE,OAAO,CAAC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AAA,CAAAyB,WAAA,GAAAA,WAAA;AAEvB,MAAMG,mBAAmB,GAAIrC,UAAsB,IAAKA,UAAU,CAACsC,KAAK;AAAC7B,OAAA,CAAA4B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const errorUtil = {
8
+ getErrorMessageForResponseStatus(status, statusText) {
9
+ return `${status}: ${statusText}`;
10
+ },
11
+ getErrorForOffersFromProductTypes(error) {
12
+ const errorMessages = {
13
+ DEVICE_SIGNALS_ERROR: "Error getting device signals",
14
+ NO_OFFERS: "No offers found",
15
+ DEFAULT: "An unexpected error occurred in getOffersFromProductTypes"
16
+ };
17
+ return errorMessages[error] || errorMessages.DEFAULT;
18
+ }
19
+ };
20
+ var _default = exports.default = errorUtil;
21
+ //# sourceMappingURL=errorUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["errorUtil","getErrorMessageForResponseStatus","status","statusText","getErrorForOffersFromProductTypes","error","errorMessages","DEVICE_SIGNALS_ERROR","NO_OFFERS","DEFAULT","_default","exports","default"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/utils/errorUtil.ts"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAG;EACjBC,gCAAgCA,CAACC,MAAc,EAAEC,UAAkB,EAAU;IAC5E,OAAO,GAAGD,MAAM,KAAKC,UAAU,EAAE;EAClC,CAAC;EACDC,iCAAiCA,CAChCC,KAAuD,EAC9C;IACT,MAAMC,aAAa,GAAG;MACrBC,oBAAoB,EAAE,8BAA8B;MACpDC,SAAS,EAAE,iBAAiB;MAC5BC,OAAO,EAAE;IACV,CAAU;IAEV,OAAOH,aAAa,CAACD,KAAK,CAAC,IAAIC,aAAa,CAACG,OAAO;EACrD;AACD,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,SAAS","ignoreList":[]}
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatStringListWithAnd = exports.formatRange = exports.formatPercentage = exports.formatAmount = void 0;
7
+ var _numbro = _interopRequireDefault(require("numbro"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ /**
10
+ * Format the amount
11
+ * @param amount {number | undefined} - Amount in cents
12
+ * @param raw {boolean | undefined} - Returns the amount in raw cents (currently only used for zero values)
13
+ * @returns {string}
14
+ * @example
15
+ * formatAmount(undefined)
16
+ * // returns 'N/A'
17
+ * formatAmount(0)
18
+ * // returns 'Free'
19
+ * formatAmount(1000)
20
+ * // returns '$10'
21
+ * formatAmount(100000)
22
+ * // returns '$1K'
23
+ */
24
+ const formatAmount = (amount, raw) => {
25
+ if (Number.isNaN(amount) || amount === undefined) return "N/A";
26
+ if (amount === 0 && !raw) return "FREE";
27
+
28
+ // Convert cents to dollars
29
+ const isLargeAmount = amount >= 99999900;
30
+ const amountInDollars = isLargeAmount ? Math.ceil(amount / 1000000) * 1000000 / 100 // Round to nearest million if large
31
+ : amount / 100;
32
+
33
+ // Format the amount in dollars
34
+ const formattedAmount = (0, _numbro.default)(amountInDollars).formatCurrency({
35
+ average: amountInDollars >= 1000,
36
+ mantissa: amountInDollars < 1000 ? 2 : 1,
37
+ trimMantissa: !(amount < 100 && amount !== 0),
38
+ spaceSeparated: false
39
+ });
40
+ return formattedAmount.toUpperCase();
41
+ };
42
+
43
+ /**
44
+ * Format the percentage
45
+ * @param percentage {number}
46
+ * @returns {string}
47
+ * @example
48
+ * formatPercentage(undefined)
49
+ * // returns 'N/A'
50
+ * formatPercentage(399)
51
+ * // returns '3.99%'
52
+ * formatPercentage(1800)
53
+ * // returns '18%'
54
+ */
55
+ exports.formatAmount = formatAmount;
56
+ const formatPercentage = percentage => {
57
+ if (percentage === undefined || percentage === null) return "N/A";
58
+ return `${(0, _numbro.default)(percentage / 100).format({
59
+ mantissa: 2,
60
+ trimMantissa: true
61
+ })}%`;
62
+ };
63
+
64
+ /**
65
+ * Format the strings with commas and add '&' to the last string
66
+ * @param strings {string[]}
67
+ * @returns {string}
68
+ * @example
69
+ * addAndToLastString(['CT', 'DE', 'GA', 'HI', 'IL'])
70
+ * // returns 'CT, DE, GA, HI & IL'
71
+ */
72
+ exports.formatPercentage = formatPercentage;
73
+ const formatStringListWithAnd = strings => {
74
+ if (!(strings !== null && strings !== void 0 && strings.length)) {
75
+ return "N/A";
76
+ }
77
+ if (strings.length === 1) {
78
+ return strings[0] ?? "N/A";
79
+ }
80
+ const newStrings = [...strings];
81
+ const lastString = newStrings.pop();
82
+ return `${newStrings.join(", ")} & ${lastString}`;
83
+ };
84
+
85
+ /**
86
+ * Format the amount with unabreviated values
87
+ * @param amount {number | undefined} - Amount in cents
88
+ * @param raw {boolean | undefined} - Returns the amount in raw cents (currently only used for zero values)
89
+ * @returns {string}
90
+ * @example
91
+ * formatAmountUnabbreviated(undefined)
92
+ * // returns 'N/A'
93
+ * formatAmountUnabbreviated(0)
94
+ * // returns 'Free'
95
+ * formatAmountUnabbreviated(1000)
96
+ * // returns '$10'
97
+ * formatAmountUnabbreviated(100000)
98
+ * // returns '$1,000'
99
+ * formatAmountUnabbreviated(10000000)
100
+ * // returns '$100,000'
101
+ */
102
+ exports.formatStringListWithAnd = formatStringListWithAnd;
103
+ const formatAmountUnabbreviated = (amount, raw) => {
104
+ if (Number.isNaN(amount) || amount === undefined) return "N/A";
105
+ if (amount === 0 && !raw) return "FREE";
106
+
107
+ // Convert cents to dollars
108
+ const isLargeAmount = amount >= 99999900;
109
+ const amountInDollars = isLargeAmount ? Math.ceil(amount / 1000000) * 1000000 / 100 // Round to nearest million if large
110
+ : amount / 100;
111
+ // Format the amount in dollars
112
+ const formattedAmount = (0, _numbro.default)(amountInDollars).formatCurrency({
113
+ mantissa: amountInDollars < 1000 ? 2 : 1,
114
+ trimMantissa: !(amount < 100 && amount !== 0),
115
+ spaceSeparated: false,
116
+ thousandSeparated: true
117
+ });
118
+ return formattedAmount.toUpperCase();
119
+ };
120
+
121
+ /**
122
+ * Format the range based on the min and max values
123
+ * @param min {number | undefined}
124
+ * @param max {number | undefined}
125
+ * @param type {string | undefined}
126
+ * @returns {string}
127
+ * @example
128
+ * formatRange(undefined, undefined)
129
+ * // returns 'N/A'
130
+ * formatRange(100, undefined)
131
+ * // returns 'N/A'
132
+ * formatRange(undefined, 100)
133
+ * // returns 'N/A'
134
+ * formatRange(0, 0)
135
+ * // returns 'Free'
136
+ * formatRange(100, 100)
137
+ * // returns '$1'
138
+ * formatRange(1000, 1000)
139
+ * // returns '$10'
140
+ * formatRange(1000, 10000)
141
+ * // returns '$10 - $100'
142
+ * formatRange(1000, 100000)
143
+ * // returns '$10 - $1K'
144
+ * formatRange(350, 490, 'percentage')
145
+ * // returns '3.5% - 4.9%'
146
+ * formatRange(1000, 10000, 'percentage')
147
+ * // returns '10% - 100%'
148
+ */
149
+ const formatRange = (min, max, type = "amount", amountFormat) => {
150
+ const resolvedFormatAmount = amountFormat === "unabbreviated" ? formatAmountUnabbreviated : formatAmount;
151
+ if (min === undefined || max === undefined) return "N/A";
152
+ if (type === "percentage") {
153
+ return min === max ? formatPercentage(min) : `${formatPercentage(min)} - ${formatPercentage(max)}`;
154
+ }
155
+ if ((min === 0 || min === 1) && max !== 0) {
156
+ return `Up to ${resolvedFormatAmount(max)}`;
157
+ }
158
+ return min === max ? resolvedFormatAmount(min) : `${resolvedFormatAmount(min)} - ${resolvedFormatAmount(max)}`;
159
+ };
160
+ exports.formatRange = formatRange;
161
+ //# sourceMappingURL=formatUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_numbro","_interopRequireDefault","require","e","__esModule","default","formatAmount","amount","raw","Number","isNaN","undefined","isLargeAmount","amountInDollars","Math","ceil","formattedAmount","numbro","formatCurrency","average","mantissa","trimMantissa","spaceSeparated","toUpperCase","exports","formatPercentage","percentage","format","formatStringListWithAnd","strings","length","newStrings","lastString","pop","join","formatAmountUnabbreviated","thousandSeparated","formatRange","min","max","type","amountFormat","resolvedFormatAmount"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/utils/formatUtils.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,YAAY,GAAGA,CAACC,MAAe,EAAEC,GAAa,KAAa;EACvE,IAAIC,MAAM,CAACC,KAAK,CAACH,MAAM,CAAC,IAAIA,MAAM,KAAKI,SAAS,EAAE,OAAO,KAAK;EAC9D,IAAIJ,MAAM,KAAK,CAAC,IAAI,CAACC,GAAG,EAAE,OAAO,MAAM;;EAEvC;EACA,MAAMI,aAAa,GAAGL,MAAM,IAAI,QAAQ;EACxC,MAAMM,eAAe,GAAGD,aAAa,GACjCE,IAAI,CAACC,IAAI,CAACR,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO,GAAI,GAAG,CAAC;EAAA,EAC9CA,MAAM,GAAG,GAAG;;EAEf;EACA,MAAMS,eAAe,GAAG,IAAAC,eAAM,EAACJ,eAAe,CAAC,CAACK,cAAc,CAAC;IAC9DC,OAAO,EAAEN,eAAe,IAAI,IAAI;IAChCO,QAAQ,EAAEP,eAAe,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC;IACxCQ,YAAY,EAAE,EAAEd,MAAM,GAAG,GAAG,IAAIA,MAAM,KAAK,CAAC,CAAC;IAC7Ce,cAAc,EAAE;EACjB,CAAC,CAAC;EAEF,OAAON,eAAe,CAACO,WAAW,CAAC,CAAC;AACrC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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;EAC5C;EAEA,OAAOD,GAAG,KAAKC,GAAG,GACfG,oBAAoB,CAACJ,GAAG,CAAC,GACzB,GAAGI,oBAAoB,CAACJ,GAAG,CAAC,MAAMI,oBAAoB,CAACH,GAAG,CAAC,EAAE;AACjE,CAAC;AAACf,OAAA,CAAAa,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getOfferUrl = void 0;
7
+ /**
8
+ * Get the offer URL.
9
+ * @description
10
+ * Returns the offer URL and any applicable override URL based on the provided offer and definitions.
11
+ * Override URL determination process:
12
+ * 1. First checks for a product type override from productTypesDefinition
13
+ * 2. Then checks for a partner override from partnersOverrideDefinition (takes precedence)
14
+ * The base offer URL is always returned, while the override URL is optional.
15
+ * @param {GetOfferUrlProps} props - The properties for getting the offer URL.
16
+ * @returns {GetOfferUrlResult} An object containing the URL and optional override URL.
17
+ **/
18
+ const getOfferUrl = ({
19
+ offer,
20
+ productTypesDefinition,
21
+ partnersOverrideDefinition
22
+ }) => {
23
+ var _productTypesDefiniti, _partnersOverrideDefi;
24
+ // Start with the base result
25
+ const result = {
26
+ url: offer.url
27
+ };
28
+
29
+ // Check product type override first
30
+ const partnerPageUrl = productTypesDefinition === null || productTypesDefinition === void 0 || (_productTypesDefiniti = productTypesDefinition.find(definition => definition.productTypeSlug === offer.productType)) === null || _productTypesDefiniti === void 0 ? void 0 : _productTypesDefiniti.partnerPageUrl;
31
+ if (partnerPageUrl) {
32
+ result.overrideUrl = partnerPageUrl;
33
+ }
34
+ if (!(partnersOverrideDefinition !== null && partnersOverrideDefinition !== void 0 && partnersOverrideDefinition.length)) return result;
35
+
36
+ // Check partner override second (will overwrite product type override if exists)
37
+ const partnerOverride = partnersOverrideDefinition === null || partnersOverrideDefinition === void 0 || (_partnersOverrideDefi = partnersOverrideDefinition.find(partner => partner.financialInstitutionUuid === offer.financialInstitutionUuid)) === null || _partnersOverrideDefi === void 0 ? void 0 : _partnersOverrideDefi.overrideUrl;
38
+ if (partnerOverride) {
39
+ result.overrideUrl = partnerOverride;
40
+ }
41
+ return result;
42
+ };
43
+ exports.getOfferUrl = getOfferUrl;
44
+ //# sourceMappingURL=getOfferUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getOfferUrl","offer","productTypesDefinition","partnersOverrideDefinition","_productTypesDefiniti","_partnersOverrideDefi","result","url","partnerPageUrl","find","definition","productTypeSlug","productType","overrideUrl","length","partnerOverride","partner","financialInstitutionUuid","exports"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/utils/getOfferUrl.ts"],"mappings":";;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,GAAGA,CAAC;EAC3BC,KAAK;EACLC,sBAAsB;EACtBC;AACiB,CAAC,KAAwB;EAAA,IAAAC,qBAAA,EAAAC,qBAAA;EAC1C;EACA,MAAMC,MAAyB,GAAG;IACjCC,GAAG,EAAEN,KAAK,CAACM;EACZ,CAAC;;EAED;EACA,MAAMC,cAAc,GAAGN,sBAAsB,aAAtBA,sBAAsB,gBAAAE,qBAAA,GAAtBF,sBAAsB,CAAEO,IAAI,CACjDC,UAAU,IAAKA,UAAU,CAACC,eAAe,KAAKV,KAAK,CAACW,WACtD,CAAC,cAAAR,qBAAA,uBAFsBA,qBAAA,CAEpBI,cAAc;EAEjB,IAAIA,cAAc,EAAE;IACnBF,MAAM,CAACO,WAAW,GAAGL,cAAc;EACpC;EAEA,IAAI,EAACL,0BAA0B,aAA1BA,0BAA0B,eAA1BA,0BAA0B,CAAEW,MAAM,GAAE,OAAOR,MAAM;;EAEtD;EACA,MAAMS,eAAe,GAAGZ,0BAA0B,aAA1BA,0BAA0B,gBAAAE,qBAAA,GAA1BF,0BAA0B,CAAEM,IAAI,CACtDO,OAAO,IACPA,OAAO,CAACC,wBAAwB,KAAKhB,KAAK,CAACgB,wBAC7C,CAAC,cAAAZ,qBAAA,uBAHuBA,qBAAA,CAGrBQ,WAAW;EAEd,IAAIE,eAAe,EAAE;IACpBT,MAAM,CAACO,WAAW,GAAGE,eAAe;EACrC;EAEA,OAAOT,MAAM;AACd,CAAC;AAACY,OAAA,CAAAlB,WAAA,GAAAA,WAAA","ignoreList":[]}