@beamimpact/web-sdk 1.40.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/README.md +7 -11
  2. package/dist/chunks/_share-dialog-dependencies-0XZ9j6DF.esm.js +2 -0
  3. package/dist/chunks/_share-dialog-dependencies-0XZ9j6DF.esm.js.map +1 -0
  4. package/dist/chunks/_share-dialog-dependencies-cBi8GG00.esm.js +2 -0
  5. package/dist/chunks/_share-dialog-dependencies-cBi8GG00.esm.js.map +1 -0
  6. package/dist/chunks/cart-contents-h60geKWa.esm.js.map +1 -1
  7. package/dist/chunks/{cart-contents-3-9fB-7m.esm.d.ts → cart-contents-sUhfwLAz.esm.d.ts} +2 -1
  8. package/dist/chunks/checkbox-P2JYPqxl.esm.js +17 -0
  9. package/dist/chunks/checkbox-P2JYPqxl.esm.js.map +1 -0
  10. package/dist/chunks/{css-card-grid-7tObtoJx.esm.js → css-card-grid-r6wxRbPV.esm.js} +2 -2
  11. package/dist/chunks/{css-card-grid-7tObtoJx.esm.js.map → css-card-grid-r6wxRbPV.esm.js.map} +1 -1
  12. package/dist/chunks/enforce-config-HksNiOMu.esm.js +3 -0
  13. package/dist/chunks/enforce-config-HksNiOMu.esm.js.map +1 -0
  14. package/dist/chunks/enforce-config-er6B5Gkj.esm.js +3 -0
  15. package/dist/chunks/enforce-config-er6B5Gkj.esm.js.map +1 -0
  16. package/dist/chunks/{events-7cGXyV7_.esm.d.ts → events-QJc86_5Y.esm.d.ts} +2 -2
  17. package/dist/chunks/{events-Y8fYvSqM.esm.js → events-_4nImo3u.esm.js} +2 -2
  18. package/dist/chunks/{events-Y8fYvSqM.esm.js.map → events-_4nImo3u.esm.js.map} +1 -1
  19. package/dist/chunks/index--phjcEHh.esm.js +2 -0
  20. package/dist/chunks/index--phjcEHh.esm.js.map +1 -0
  21. package/dist/chunks/{index-uCfdsWtt.esm.js → index-1nI7l5vj.esm.js} +2 -2
  22. package/dist/chunks/{index-uCfdsWtt.esm.js.map → index-1nI7l5vj.esm.js.map} +1 -1
  23. package/dist/chunks/index-2K1cEtb1.esm.js +2 -0
  24. package/dist/chunks/index-2K1cEtb1.esm.js.map +1 -0
  25. package/dist/chunks/index-3-VTK-nH.esm.js +2 -0
  26. package/dist/chunks/index-3-VTK-nH.esm.js.map +1 -0
  27. package/dist/chunks/index-AQ8n9ODJ.esm.js +2 -0
  28. package/dist/chunks/{index-fINTvZVX.esm.js.map → index-AQ8n9ODJ.esm.js.map} +1 -1
  29. package/dist/chunks/index-E8H5A7Qq.esm.js +2 -0
  30. package/dist/chunks/index-E8H5A7Qq.esm.js.map +1 -0
  31. package/dist/chunks/index-FQExZDX9.esm.js +2 -0
  32. package/dist/chunks/index-FQExZDX9.esm.js.map +1 -0
  33. package/dist/chunks/index-JA-7NqMF.esm.js +2 -0
  34. package/dist/chunks/index-JA-7NqMF.esm.js.map +1 -0
  35. package/dist/chunks/{index-8KzbQIsU.esm.d.ts → index-M-0eAFA6.esm.d.ts} +1 -1
  36. package/dist/chunks/{index-phDmC-TS.esm.js → index-NOF_HeFP.esm.js} +2 -2
  37. package/dist/chunks/index-NOF_HeFP.esm.js.map +1 -0
  38. package/dist/chunks/index-PiMq5a49.esm.js +2 -0
  39. package/dist/chunks/index-PiMq5a49.esm.js.map +1 -0
  40. package/dist/chunks/{index-rFBYAk7m.esm.d.ts → index-VHXu2kRx.esm.d.ts} +1 -1
  41. package/dist/chunks/index-XCMf22lv.esm.js +2 -0
  42. package/dist/chunks/index-XCMf22lv.esm.js.map +1 -0
  43. package/dist/chunks/{index-0VcD5nhV.esm.d.ts → index-ZgCs6F4e.esm.d.ts} +4 -4
  44. package/dist/chunks/{index-TOzSFOvI.esm.d.ts → index-_Hgu38MH.esm.d.ts} +1 -1
  45. package/dist/chunks/{index-SxFKifVJ.esm.d.ts → index-_UuYsIe9.esm.d.ts} +1 -1
  46. package/dist/chunks/index-cUb-0Igl.esm.js +2 -0
  47. package/dist/chunks/{index-kxMe_AX1.esm.js.map → index-cUb-0Igl.esm.js.map} +1 -1
  48. package/dist/chunks/index-eHSdKArB.esm.js +2 -0
  49. package/dist/chunks/index-eHSdKArB.esm.js.map +1 -0
  50. package/dist/chunks/{index-HBDtoJlQ.esm.d.ts → index-euJMrXIc.esm.d.ts} +1 -1
  51. package/dist/chunks/{index-Hb-jziQs.esm.d.ts → index-hn6JhG_w.esm.d.ts} +7 -1
  52. package/dist/chunks/{index-6t9MtjyS.esm.d.ts → index-mTXm0DPh.esm.d.ts} +9 -1
  53. package/dist/chunks/{index-Q1vx4WtG.esm.js → index-mw70Caof.esm.js} +2 -2
  54. package/dist/chunks/{index-Q1vx4WtG.esm.js.map → index-mw70Caof.esm.js.map} +1 -1
  55. package/dist/chunks/{index-8yrr7ZZv.esm.js → index-n6QNFLXV.esm.js} +2 -2
  56. package/dist/chunks/index-n6QNFLXV.esm.js.map +1 -0
  57. package/dist/chunks/index-sOAq6oM0.esm.js +2 -0
  58. package/dist/chunks/index-sOAq6oM0.esm.js.map +1 -0
  59. package/dist/chunks/{index-uF-Qtewb.esm.js → index-x2kxA_Xo.esm.js} +2 -2
  60. package/dist/chunks/index-x2kxA_Xo.esm.js.map +1 -0
  61. package/dist/chunks/{index-Lw32NXij.esm.js → index-z8c9I9IQ.esm.js} +2 -2
  62. package/dist/chunks/index-z8c9I9IQ.esm.js.map +1 -0
  63. package/dist/chunks/{lit-qtGbjGnK.esm.js → lit-3QHn3fwl.esm.js} +5 -5
  64. package/dist/chunks/lit-3QHn3fwl.esm.js.map +1 -0
  65. package/dist/chunks/loading-template-mLjOGXMj.esm.js +2 -0
  66. package/dist/chunks/{loading-template-Av0IUyKF.esm.js.map → loading-template-mLjOGXMj.esm.js.map} +1 -1
  67. package/dist/chunks/localize-IRs8JglT.esm.js +29 -0
  68. package/dist/chunks/localize-IRs8JglT.esm.js.map +1 -0
  69. package/dist/chunks/localize-SsJbTmMj.esm.js +29 -0
  70. package/dist/chunks/localize-SsJbTmMj.esm.js.map +1 -0
  71. package/dist/chunks/{openapi-spec--MzXvfCC.esm.d.ts → openapi-spec--WoGcZgR.esm.d.ts} +232 -9
  72. package/dist/chunks/order-page-4qPr8vqZ.esm.js +2 -0
  73. package/dist/chunks/order-page-4qPr8vqZ.esm.js.map +1 -0
  74. package/dist/chunks/order-page-Ps8Qyjfg.esm.d.ts +74 -0
  75. package/dist/chunks/order-page-akvp5h2x.esm.js +2 -0
  76. package/dist/chunks/order-page-akvp5h2x.esm.js.map +1 -0
  77. package/dist/chunks/{progress-bar-Sn2QspHy.esm.js → progress-bar-HVG_n8_6.esm.js} +7 -6
  78. package/dist/chunks/progress-bar-HVG_n8_6.esm.js.map +1 -0
  79. package/dist/chunks/{promo-pill-label-j0A8qZ0c.esm.js → promo-pill-label-3Xtr5ALT.esm.js} +4 -3
  80. package/dist/chunks/{promo-pill-label-j0A8qZ0c.esm.js.map → promo-pill-label-3Xtr5ALT.esm.js.map} +1 -1
  81. package/dist/chunks/{responsive-aWj_7ZN_.esm.js → responsive-KbDsZM6S.esm.js} +2 -2
  82. package/dist/chunks/{responsive-aWj_7ZN_.esm.js.map → responsive-KbDsZM6S.esm.js.map} +1 -1
  83. package/dist/chunks/routes-qbvie7oI.esm.d.ts +445 -0
  84. package/dist/chunks/routes-r5D_LdgT.esm.js +2 -0
  85. package/dist/chunks/routes-r5D_LdgT.esm.js.map +1 -0
  86. package/dist/chunks/routes-rmhOokKz.esm.js +2 -0
  87. package/dist/chunks/routes-rmhOokKz.esm.js.map +1 -0
  88. package/dist/chunks/share-button-CqTd80g8.esm.js +2 -0
  89. package/dist/chunks/share-button-CqTd80g8.esm.js.map +1 -0
  90. package/dist/chunks/share-button-JqbM7N_4.esm.js +163 -0
  91. package/dist/chunks/share-button-JqbM7N_4.esm.js.map +1 -0
  92. package/dist/chunks/share-button-hDn8fnBI.esm.d.ts +22 -0
  93. package/dist/chunks/share-button-jpa1X3FA.esm.js +163 -0
  94. package/dist/chunks/share-button-jpa1X3FA.esm.js.map +1 -0
  95. package/dist/chunks/shoelace-components-NR11kwmz.esm.js +2 -0
  96. package/dist/chunks/shoelace-components-NR11kwmz.esm.js.map +1 -0
  97. package/dist/chunks/shoelace-components-yXqj8DyM.esm.js +2 -0
  98. package/dist/chunks/shoelace-components-yXqj8DyM.esm.js.map +1 -0
  99. package/dist/chunks/{types-CfbVJRfU.esm.d.ts → types-zbTZ8-KP.esm.d.ts} +4 -1
  100. package/dist/chunks/update-cart-05ZiT0Xf.esm.js +2 -0
  101. package/dist/chunks/update-cart-05ZiT0Xf.esm.js.map +1 -0
  102. package/dist/chunks/{update-cart-xaWdPxse.esm.d.ts → update-cart-SajqAoez.esm.d.ts} +2 -1
  103. package/dist/chunks/update-cart-lTgKV-Zu.esm.js +2 -0
  104. package/dist/chunks/update-cart-lTgKV-Zu.esm.js.map +1 -0
  105. package/dist/chunks/{vendor-jQ8cxMpw.esm.js → vendor--f7lkyBk.esm.js} +44 -44
  106. package/dist/chunks/vendor--f7lkyBk.esm.js.map +1 -0
  107. package/dist/components/beam-partner-logos.esm.js +2 -2
  108. package/dist/components/beam-partner-logos.esm.js.map +1 -1
  109. package/dist/components/beam-partner-logos.js +2 -2
  110. package/dist/components/beam-partner-logos.js.map +1 -1
  111. package/dist/components/community-impact.d.ts +1 -1
  112. package/dist/components/community-impact.esm.js +15 -9
  113. package/dist/components/community-impact.esm.js.map +1 -1
  114. package/dist/components/community-impact.js +15 -9
  115. package/dist/components/community-impact.js.map +1 -1
  116. package/dist/components/cumulative-impact.d.ts +1 -1
  117. package/dist/components/cumulative-impact.esm.js +1 -1
  118. package/dist/components/cumulative-impact.esm.js.map +1 -1
  119. package/dist/components/cumulative-impact.js +1 -1
  120. package/dist/components/cumulative-impact.js.map +1 -1
  121. package/dist/components/impact-overview.d.ts +16 -4
  122. package/dist/components/impact-overview.esm.js +29 -146
  123. package/dist/components/impact-overview.esm.js.map +1 -1
  124. package/dist/components/impact-overview.js +29 -146
  125. package/dist/components/impact-overview.js.map +1 -1
  126. package/dist/components/index.d.ts +8 -3
  127. package/dist/components/index.esm.js +1 -1
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/post-purchase.d.ts +7 -4
  130. package/dist/components/post-purchase.esm.js +2 -1
  131. package/dist/components/post-purchase.esm.js.map +1 -1
  132. package/dist/components/post-purchase.js +2 -1
  133. package/dist/components/post-purchase.js.map +1 -1
  134. package/dist/components/product-details-page.d.ts +7 -1
  135. package/dist/components/product-details-page.esm.js +5 -5
  136. package/dist/components/product-details-page.esm.js.map +1 -1
  137. package/dist/components/product-details-page.js +5 -5
  138. package/dist/components/product-details-page.js.map +1 -1
  139. package/dist/components/redeem-transaction.d.ts +5 -4
  140. package/dist/components/redeem-transaction.esm.js +44 -55
  141. package/dist/components/redeem-transaction.esm.js.map +1 -1
  142. package/dist/components/redeem-transaction.js +44 -55
  143. package/dist/components/redeem-transaction.js.map +1 -1
  144. package/dist/components/select-nonprofit.d.ts +4 -4
  145. package/dist/components/select-nonprofit.esm.js +20 -16
  146. package/dist/components/select-nonprofit.esm.js.map +1 -1
  147. package/dist/components/select-nonprofit.js +20 -16
  148. package/dist/components/select-nonprofit.js.map +1 -1
  149. package/dist/components/select-subscription-nonprofit.d.ts +67 -0
  150. package/dist/components/select-subscription-nonprofit.esm.js +373 -0
  151. package/dist/components/select-subscription-nonprofit.esm.js.map +1 -0
  152. package/dist/components/select-subscription-nonprofit.js +373 -0
  153. package/dist/components/select-subscription-nonprofit.js.map +1 -0
  154. package/dist/components/shopify.d.ts +8 -6
  155. package/dist/components/shopify.esm.js +1 -1
  156. package/dist/components/shopify.esm.js.map +1 -1
  157. package/dist/components/shopify.js +1 -1
  158. package/dist/components/shopify.js.map +1 -1
  159. package/dist/components/social-share.d.ts +47 -0
  160. package/dist/components/social-share.esm.js +170 -0
  161. package/dist/components/social-share.esm.js.map +1 -0
  162. package/dist/components/social-share.js +170 -0
  163. package/dist/components/social-share.js.map +1 -0
  164. package/dist/components/subscription-impact.d.ts +179 -0
  165. package/dist/components/subscription-impact.esm.js +269 -0
  166. package/dist/components/subscription-impact.esm.js.map +1 -0
  167. package/dist/components/subscription-impact.js +269 -0
  168. package/dist/components/subscription-impact.js.map +1 -0
  169. package/dist/components/subscription-management.d.ts +143 -14
  170. package/dist/components/subscription-management.esm.js +267 -31
  171. package/dist/components/subscription-management.esm.js.map +1 -1
  172. package/dist/components/subscription-management.js +267 -31
  173. package/dist/components/subscription-management.js.map +1 -1
  174. package/dist/index.d.ts +23 -14
  175. package/dist/index.esm.js +1 -1
  176. package/dist/index.js +1 -1
  177. package/dist/integrations/beam.d.ts +1 -1
  178. package/dist/integrations/beam.esm.js +1 -1
  179. package/dist/integrations/beam.js +1 -1
  180. package/dist/integrations/cart.d.ts +3 -3
  181. package/dist/integrations/cart.esm.js +1 -1
  182. package/dist/integrations/cart.js +1 -1
  183. package/dist/integrations/index.d.ts +12 -10
  184. package/dist/integrations/index.esm.js +1 -1
  185. package/dist/integrations/index.js +1 -1
  186. package/dist/integrations/logs.d.ts +2 -2
  187. package/dist/integrations/logs.esm.js +1 -1
  188. package/dist/integrations/logs.js +1 -1
  189. package/dist/integrations/session.esm.js +1 -1
  190. package/dist/integrations/session.js +1 -1
  191. package/dist/integrations/shopify.d.ts +7 -5
  192. package/dist/integrations/shopify.esm.js +1 -1
  193. package/dist/integrations/shopify.js +1 -1
  194. package/dist/integrations/statsig.d.ts +1 -1
  195. package/dist/integrations/statsig.esm.js +14 -10
  196. package/dist/integrations/statsig.esm.js.map +1 -1
  197. package/dist/integrations/statsig.js +14 -10
  198. package/dist/integrations/statsig.js.map +1 -1
  199. package/dist/integrations/utils.d.ts +4 -4
  200. package/dist/integrations/utils.esm.js +1 -1
  201. package/dist/integrations/utils.js +1 -1
  202. package/dist/react/beam-partner-logos.esm.js +1 -1
  203. package/dist/react/beam-partner-logos.js +1 -1
  204. package/dist/react/community-impact.d.ts +1 -1
  205. package/dist/react/community-impact.esm.js +1 -1
  206. package/dist/react/community-impact.esm.js.map +1 -1
  207. package/dist/react/community-impact.js +1 -1
  208. package/dist/react/community-impact.js.map +1 -1
  209. package/dist/react/cumulative-impact.d.ts +1 -1
  210. package/dist/react/cumulative-impact.esm.js +1 -1
  211. package/dist/react/cumulative-impact.esm.js.map +1 -1
  212. package/dist/react/cumulative-impact.js +1 -1
  213. package/dist/react/cumulative-impact.js.map +1 -1
  214. package/dist/react/impact-overview.d.ts +2 -1
  215. package/dist/react/impact-overview.esm.js +1 -1
  216. package/dist/react/impact-overview.esm.js.map +1 -1
  217. package/dist/react/impact-overview.js +1 -1
  218. package/dist/react/impact-overview.js.map +1 -1
  219. package/dist/react/index.d.ts +14 -4
  220. package/dist/react/index.esm.js +1 -1
  221. package/dist/react/index.js +1 -1
  222. package/dist/react/post-purchase.d.ts +4 -3
  223. package/dist/react/post-purchase.esm.js +1 -1
  224. package/dist/react/post-purchase.esm.js.map +1 -1
  225. package/dist/react/post-purchase.js +1 -1
  226. package/dist/react/post-purchase.js.map +1 -1
  227. package/dist/react/product-details-page.esm.js +1 -1
  228. package/dist/react/product-details-page.esm.js.map +1 -1
  229. package/dist/react/product-details-page.js +1 -1
  230. package/dist/react/product-details-page.js.map +1 -1
  231. package/dist/react/redeem-transaction.d.ts +4 -4
  232. package/dist/react/redeem-transaction.esm.js +1 -1
  233. package/dist/react/redeem-transaction.esm.js.map +1 -1
  234. package/dist/react/redeem-transaction.js +1 -1
  235. package/dist/react/redeem-transaction.js.map +1 -1
  236. package/dist/react/select-nonprofit.d.ts +4 -4
  237. package/dist/react/select-nonprofit.esm.js +1 -1
  238. package/dist/react/select-nonprofit.esm.js.map +1 -1
  239. package/dist/react/select-nonprofit.js +1 -1
  240. package/dist/react/select-nonprofit.js.map +1 -1
  241. package/dist/react/select-subscription-nonprofit.d.ts +19 -0
  242. package/dist/react/select-subscription-nonprofit.esm.js +2 -0
  243. package/dist/react/select-subscription-nonprofit.esm.js.map +1 -0
  244. package/dist/react/select-subscription-nonprofit.js +2 -0
  245. package/dist/react/select-subscription-nonprofit.js.map +1 -0
  246. package/dist/react/social-share.d.ts +12 -0
  247. package/dist/react/social-share.esm.js +2 -0
  248. package/dist/react/social-share.esm.js.map +1 -0
  249. package/dist/react/social-share.js +2 -0
  250. package/dist/react/social-share.js.map +1 -0
  251. package/dist/react/subscription-impact.d.ts +13 -0
  252. package/dist/react/subscription-impact.esm.js +2 -0
  253. package/dist/react/subscription-impact.esm.js.map +1 -0
  254. package/dist/react/subscription-impact.js +2 -0
  255. package/dist/react/subscription-impact.js.map +1 -0
  256. package/dist/react/subscription-management.d.ts +9 -8
  257. package/dist/react/subscription-management.esm.js +1 -1
  258. package/dist/react/subscription-management.esm.js.map +1 -1
  259. package/dist/react/subscription-management.js +1 -1
  260. package/dist/react/subscription-management.js.map +1 -1
  261. package/dist/utils/events.d.ts +4 -4
  262. package/dist/utils/events.esm.js +1 -1
  263. package/dist/utils/events.js +1 -1
  264. package/dist/utils/index.d.ts +4 -4
  265. package/dist/utils/index.esm.js +1 -1
  266. package/dist/utils/index.js +1 -1
  267. package/dist/utils/network-listeners.esm.js +1 -1
  268. package/dist/utils/network-listeners.js +1 -1
  269. package/package.json +1 -1
  270. package/dist/chunks/_share-dialog-dependencies-1vD2dmjh.esm.js +0 -2
  271. package/dist/chunks/_share-dialog-dependencies-1vD2dmjh.esm.js.map +0 -1
  272. package/dist/chunks/_share-dialog-dependencies-jvbBs-cC.esm.js +0 -2
  273. package/dist/chunks/_share-dialog-dependencies-jvbBs-cC.esm.js.map +0 -1
  274. package/dist/chunks/index-8yrr7ZZv.esm.js.map +0 -1
  275. package/dist/chunks/index-EHubF2KN.esm.js +0 -2
  276. package/dist/chunks/index-EHubF2KN.esm.js.map +0 -1
  277. package/dist/chunks/index-FIfx75-P.esm.js +0 -2
  278. package/dist/chunks/index-FIfx75-P.esm.js.map +0 -1
  279. package/dist/chunks/index-GocMPeWn.esm.js +0 -2
  280. package/dist/chunks/index-GocMPeWn.esm.js.map +0 -1
  281. package/dist/chunks/index-HyzTMHYl.esm.js +0 -2
  282. package/dist/chunks/index-HyzTMHYl.esm.js.map +0 -1
  283. package/dist/chunks/index-LmCqzg5B.esm.js +0 -2
  284. package/dist/chunks/index-LmCqzg5B.esm.js.map +0 -1
  285. package/dist/chunks/index-Lw32NXij.esm.js.map +0 -1
  286. package/dist/chunks/index-V-BsPYtl.esm.js +0 -2
  287. package/dist/chunks/index-V-BsPYtl.esm.js.map +0 -1
  288. package/dist/chunks/index-bUooCSdc.esm.js +0 -2
  289. package/dist/chunks/index-bUooCSdc.esm.js.map +0 -1
  290. package/dist/chunks/index-cekgAcEE.esm.js +0 -2
  291. package/dist/chunks/index-cekgAcEE.esm.js.map +0 -1
  292. package/dist/chunks/index-fINTvZVX.esm.js +0 -2
  293. package/dist/chunks/index-iMRMlkF3.esm.js +0 -2
  294. package/dist/chunks/index-iMRMlkF3.esm.js.map +0 -1
  295. package/dist/chunks/index-kxMe_AX1.esm.js +0 -2
  296. package/dist/chunks/index-o7YiP4gC.esm.js +0 -2
  297. package/dist/chunks/index-o7YiP4gC.esm.js.map +0 -1
  298. package/dist/chunks/index-phDmC-TS.esm.js.map +0 -1
  299. package/dist/chunks/index-uF-Qtewb.esm.js.map +0 -1
  300. package/dist/chunks/lit-qtGbjGnK.esm.js.map +0 -1
  301. package/dist/chunks/loading-template-Av0IUyKF.esm.js +0 -2
  302. package/dist/chunks/localize-F31ae3j6.esm.js +0 -30
  303. package/dist/chunks/localize-F31ae3j6.esm.js.map +0 -1
  304. package/dist/chunks/localize-fH8KOrMi.esm.js +0 -30
  305. package/dist/chunks/localize-fH8KOrMi.esm.js.map +0 -1
  306. package/dist/chunks/order-page-0azkW5QD.esm.js +0 -2
  307. package/dist/chunks/order-page-0azkW5QD.esm.js.map +0 -1
  308. package/dist/chunks/order-page-DPx5SUKM.esm.d.ts +0 -255
  309. package/dist/chunks/order-page-n12hvsCN.esm.js +0 -2
  310. package/dist/chunks/order-page-n12hvsCN.esm.js.map +0 -1
  311. package/dist/chunks/progress-bar-Sn2QspHy.esm.js.map +0 -1
  312. package/dist/chunks/routes-31m626dW.esm.js +0 -2
  313. package/dist/chunks/routes-31m626dW.esm.js.map +0 -1
  314. package/dist/chunks/routes-sbqL3QFm.esm.js +0 -2
  315. package/dist/chunks/routes-sbqL3QFm.esm.js.map +0 -1
  316. package/dist/chunks/update-cart-NEt4A8dB.esm.js +0 -2
  317. package/dist/chunks/update-cart-NEt4A8dB.esm.js.map +0 -1
  318. package/dist/chunks/update-cart-XAwwFxhS.esm.js +0 -2
  319. package/dist/chunks/update-cart-XAwwFxhS.esm.js.map +0 -1
  320. package/dist/chunks/vendor-jQ8cxMpw.esm.js.map +0 -1
@@ -0,0 +1,445 @@
1
+ declare const getChainNonprofits: ({ headers, baseUrl, apiRoot, pathParams, queryParams, requestBody, }: {
2
+ baseUrl?: string | undefined;
3
+ apiRoot?: string | undefined;
4
+ pathParams?: {
5
+ chainId: number;
6
+ } | undefined;
7
+ queryParams?: {
8
+ postalCode?: string | undefined;
9
+ countryCode?: string | undefined;
10
+ storeId?: number | undefined;
11
+ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | undefined;
12
+ widgetName: "select-nonprofit" | "redeem-transaction";
13
+ version: string;
14
+ } | undefined;
15
+ requestBody?: undefined;
16
+ headers?: Record<string, string> | undefined;
17
+ }) => Promise<{
18
+ chain: {
19
+ name: string;
20
+ logoUrl: string | null;
21
+ communityImpactUrl: string | null;
22
+ donationTypeName: string | null;
23
+ matchDonationTypeName: string | null;
24
+ };
25
+ config: {
26
+ web: {
27
+ title: string;
28
+ description: string;
29
+ promoDescriptionPrefix?: string | undefined;
30
+ promoDescription?: string | undefined;
31
+ theme?: {
32
+ [key: string]: unknown;
33
+ } | null | undefined;
34
+ nonprofitSelectedHeader?: string | undefined;
35
+ nonprofitUnselectedHeader?: string | undefined;
36
+ dynamicStrings?: {
37
+ [key: string]: string;
38
+ } | null | undefined;
39
+ additionalStrings?: {
40
+ [key: string]: string;
41
+ } | null | undefined;
42
+ disableAnimation?: boolean | undefined;
43
+ promo?: {
44
+ "promo-text-long": string;
45
+ "promo-text-short": string;
46
+ "promo-cause-alt-text": string;
47
+ } | undefined;
48
+ };
49
+ mobileWeb?: {
50
+ title: string;
51
+ description: string;
52
+ nonprofitSelectedHeader?: string | undefined;
53
+ nonprofitUnselectedHeader?: string | undefined;
54
+ } | undefined;
55
+ mobile: {
56
+ title: string;
57
+ description: string;
58
+ nonprofitSelectedHeader?: string | undefined;
59
+ nonprofitUnselectedHeader?: string | undefined;
60
+ };
61
+ enableNonprofitDeselection?: boolean | undefined;
62
+ } & {
63
+ web?: {
64
+ redeemButtonText?: string | undefined;
65
+ } | undefined;
66
+ mobileWeb?: {
67
+ redeemButtonText?: string | undefined;
68
+ } | undefined;
69
+ mobile?: {
70
+ redeemButtonText?: string | undefined;
71
+ } | undefined;
72
+ };
73
+ nonprofits: {
74
+ imageUrl: Partial<string | null>;
75
+ nonprofit: {
76
+ id: number;
77
+ name: string;
78
+ cause: string | null;
79
+ causeIconUrl: string | null;
80
+ causeIconSelectedUrl: string | null;
81
+ causeColor: string | null;
82
+ website: string | null;
83
+ websiteLinkText: string;
84
+ badge?: string | undefined;
85
+ includeInPersonalImpact?: boolean | undefined;
86
+ };
87
+ impact: {
88
+ description: string | null;
89
+ goalCompletionText: string;
90
+ goalProgressText: string;
91
+ goalProgressPercentage: number;
92
+ };
93
+ promo?: {
94
+ isActive: boolean;
95
+ multiplier: number | null;
96
+ } | null | undefined;
97
+ }[];
98
+ store: {
99
+ id: number;
100
+ };
101
+ region: {
102
+ id: string | null;
103
+ };
104
+ }>;
105
+ declare const getImpact: ({ headers, baseUrl, apiRoot, pathParams, queryParams, requestBody, }: {
106
+ baseUrl?: string | undefined;
107
+ apiRoot?: string | undefined;
108
+ pathParams?: Record<string, never> | undefined;
109
+ queryParams?: {
110
+ chainId?: number | undefined;
111
+ storeId?: number | undefined;
112
+ beamUserId?: string | undefined;
113
+ nonprofitId?: number | undefined;
114
+ communityImpactLimit?: number | undefined;
115
+ personalImpactLimit?: number | undefined;
116
+ widgetName: "impact-overview" | "community-impact" | "subscription-impact" | "subscription-management";
117
+ version: string;
118
+ lang?: "en" | "fr" | "de" | "es" | "it" | "pl" | undefined;
119
+ "options.config.omitThemes"?: boolean | undefined;
120
+ discountCodes?: string[] | undefined;
121
+ } | undefined;
122
+ requestBody?: undefined;
123
+ headers?: Record<string, string> | undefined;
124
+ }) => Promise<{
125
+ chain: {
126
+ name: string;
127
+ logoUrl: string | null;
128
+ communityImpactUrl: string | null;
129
+ donationTypeName: string | null;
130
+ matchDonationTypeName: string | null;
131
+ };
132
+ store: {
133
+ name: string | null;
134
+ displayName: string | null;
135
+ communityPageURL: string | null;
136
+ };
137
+ config: {
138
+ web: {
139
+ title: string;
140
+ description: string;
141
+ promoDescriptionPrefix?: string | undefined;
142
+ promoDescription?: string | undefined;
143
+ theme?: {
144
+ [key: string]: unknown;
145
+ } | null | undefined;
146
+ nonprofitSelectedHeader?: string | undefined;
147
+ nonprofitUnselectedHeader?: string | undefined;
148
+ dynamicStrings?: {
149
+ [key: string]: string;
150
+ } | null | undefined;
151
+ additionalStrings?: {
152
+ [key: string]: string;
153
+ } | null | undefined;
154
+ disableAnimation?: boolean | undefined;
155
+ promo?: {
156
+ "promo-text-long": string;
157
+ "promo-text-short": string;
158
+ "promo-cause-alt-text": string;
159
+ } | undefined;
160
+ };
161
+ mobileWeb?: {
162
+ title: string;
163
+ description: string;
164
+ nonprofitSelectedHeader?: string | undefined;
165
+ nonprofitUnselectedHeader?: string | undefined;
166
+ } | undefined;
167
+ mobile: {
168
+ title: string;
169
+ description: string;
170
+ nonprofitSelectedHeader?: string | undefined;
171
+ nonprofitUnselectedHeader?: string | undefined;
172
+ };
173
+ enableNonprofitDeselection?: boolean | undefined;
174
+ };
175
+ personal: {
176
+ imageUrl: string | null;
177
+ nonprofit: {
178
+ id: number;
179
+ name: string;
180
+ cause: string | null;
181
+ causeIconUrl: string | null;
182
+ causeIconSelectedUrl: string | null;
183
+ causeColor: string | null;
184
+ website: string | null;
185
+ websiteLinkText: string;
186
+ badge?: string | undefined;
187
+ includeInPersonalImpact?: boolean | undefined;
188
+ };
189
+ impact: {
190
+ description: string | null;
191
+ goalCompletionText: string;
192
+ goalProgressText: string;
193
+ goalProgressPercentage: number;
194
+ };
195
+ share: {
196
+ imageUrl: string | null;
197
+ };
198
+ filters?: string[] | undefined;
199
+ }[];
200
+ community: {
201
+ imageUrl: string | null;
202
+ nonprofit: {
203
+ id: number;
204
+ name: string;
205
+ cause: string | null;
206
+ causeIconUrl: string | null;
207
+ causeIconSelectedUrl: string | null;
208
+ causeColor: string | null;
209
+ website: string | null;
210
+ websiteLinkText: string;
211
+ badge?: string | undefined;
212
+ includeInPersonalImpact?: boolean | undefined;
213
+ };
214
+ impact: {
215
+ description: string | null;
216
+ goalCompletionText: string;
217
+ goalProgressText: string;
218
+ goalProgressPercentage: number;
219
+ };
220
+ share: {
221
+ imageUrl: string | null;
222
+ };
223
+ filters?: string[] | undefined;
224
+ }[];
225
+ promo: {
226
+ isActive: boolean;
227
+ multiplier: number | null;
228
+ } | null;
229
+ }>;
230
+ declare const postTransaction: ({ headers, baseUrl, apiRoot, pathParams, queryParams, requestBody, }: {
231
+ baseUrl?: string | undefined;
232
+ apiRoot?: string | undefined;
233
+ pathParams?: undefined;
234
+ queryParams?: undefined;
235
+ requestBody?: {
236
+ orderId: string | number;
237
+ storeId?: number | undefined;
238
+ selectionId?: string | undefined;
239
+ beamCartId?: string | undefined;
240
+ cartId?: string | undefined;
241
+ nonprofitId?: number | null | undefined;
242
+ beamUserId?: string | undefined;
243
+ email?: string | undefined;
244
+ partnerUserId?: string | undefined;
245
+ currencyCode: string;
246
+ defaultToLastNonprofit?: boolean | undefined;
247
+ postalCode?: string | undefined;
248
+ countryCode?: string | undefined;
249
+ cart?: {
250
+ schema: {
251
+ source: "shopify";
252
+ variant: "ajax";
253
+ version?: string | undefined;
254
+ };
255
+ content: {
256
+ localAmount?: number | undefined;
257
+ discounts?: {
258
+ code: string;
259
+ applicable: boolean;
260
+ }[] | null | undefined;
261
+ items: {
262
+ id?: number | null | undefined;
263
+ gift_card?: boolean | null | undefined;
264
+ final_line_price: number | null;
265
+ final_price?: number | null | undefined;
266
+ line_level_discount_applications?: ({
267
+ title: string;
268
+ } & {
269
+ [key: string]: unknown;
270
+ })[] | null | undefined;
271
+ quantity?: number | null | undefined;
272
+ sku: string | null;
273
+ product_id?: number | null | undefined;
274
+ product_title?: string | null | undefined;
275
+ product_type?: string | null | undefined;
276
+ variant_id?: number | null | undefined;
277
+ }[];
278
+ subscriptions?: {
279
+ remoteSubscriptionId: string;
280
+ isNew?: boolean | undefined;
281
+ }[] | undefined;
282
+ };
283
+ } | {
284
+ schema: {
285
+ source: "shopify";
286
+ variant: "liquid";
287
+ version?: string | undefined;
288
+ };
289
+ content: {
290
+ localAmount?: number | undefined;
291
+ discounts?: {
292
+ code: string;
293
+ applicable: boolean;
294
+ }[] | null | undefined;
295
+ items: {
296
+ id?: number | null | undefined;
297
+ gift_card?: boolean | null | undefined;
298
+ final_line_price: number | null;
299
+ final_price?: number | null | undefined;
300
+ line_level_discount_applications?: ({
301
+ title: string;
302
+ } & {
303
+ [key: string]: unknown;
304
+ })[] | null | undefined;
305
+ quantity?: number | null | undefined;
306
+ sku: string | null;
307
+ product_id?: number | null | undefined;
308
+ variant_id?: number | null | undefined;
309
+ }[];
310
+ subscriptions?: {
311
+ remoteSubscriptionId: string;
312
+ isNew?: boolean | undefined;
313
+ }[] | undefined;
314
+ };
315
+ } | {
316
+ schema: {
317
+ source: "generic";
318
+ variant?: "default" | undefined;
319
+ version?: string | undefined;
320
+ };
321
+ content: {
322
+ localAmount?: number | undefined;
323
+ discounts?: {
324
+ code: string;
325
+ applicable: boolean;
326
+ }[] | null | undefined;
327
+ items: {
328
+ remoteProductIdentifier?: string | null | undefined;
329
+ localAmount: number;
330
+ remoteSubscriptionId?: string | undefined;
331
+ discounts?: {
332
+ code: string;
333
+ applicable: boolean;
334
+ }[] | null | undefined;
335
+ }[];
336
+ subscriptions?: {
337
+ remoteSubscriptionId: string;
338
+ isNew?: boolean | undefined;
339
+ }[] | undefined;
340
+ };
341
+ } | undefined;
342
+ options?: {
343
+ response?: {
344
+ personalImpact?: boolean | undefined;
345
+ communityImpact?: boolean | undefined;
346
+ } | undefined;
347
+ config?: {
348
+ omitThemes?: boolean | undefined;
349
+ } | undefined;
350
+ } | undefined;
351
+ widgetName?: "select-nonprofit" | "redeem-transaction" | "select-nonprofit-cta" | undefined;
352
+ version?: string | undefined;
353
+ donation?: {
354
+ currencyCode: string;
355
+ amount: number;
356
+ } | undefined;
357
+ cartTotal?: number | undefined;
358
+ discountCodes?: string[] | undefined;
359
+ creationMethod?: "recurring" | null | undefined;
360
+ } | undefined;
361
+ headers?: Record<string, string> | undefined;
362
+ }) => Promise<{
363
+ transactionId: string;
364
+ transactionCreated?: boolean | undefined;
365
+ beamUserId: string;
366
+ chainId: number;
367
+ nonprofitId: number | null;
368
+ impact?: {
369
+ personal?: {
370
+ imageUrl: string | null;
371
+ nonprofit: {
372
+ id: number;
373
+ name: string;
374
+ cause: string | null;
375
+ causeIconUrl: string | null;
376
+ causeIconSelectedUrl: string | null;
377
+ causeColor: string | null;
378
+ website: string | null;
379
+ websiteLinkText: string;
380
+ badge?: string | undefined;
381
+ includeInPersonalImpact?: boolean | undefined;
382
+ };
383
+ impact: {
384
+ description: string | null;
385
+ goalCompletionText: string;
386
+ goalProgressText: string;
387
+ goalProgressPercentage: number;
388
+ };
389
+ share: {
390
+ imageUrl: string | null;
391
+ };
392
+ filters?: string[] | undefined;
393
+ }[] | undefined;
394
+ community?: {
395
+ imageUrl: string | null;
396
+ nonprofit: {
397
+ id: number;
398
+ name: string;
399
+ cause: string | null;
400
+ causeIconUrl: string | null;
401
+ causeIconSelectedUrl: string | null;
402
+ causeColor: string | null;
403
+ website: string | null;
404
+ websiteLinkText: string;
405
+ badge?: string | undefined;
406
+ includeInPersonalImpact?: boolean | undefined;
407
+ };
408
+ impact: {
409
+ description: string | null;
410
+ goalCompletionText: string;
411
+ goalProgressText: string;
412
+ goalProgressPercentage: number;
413
+ };
414
+ share: {
415
+ imageUrl: string | null;
416
+ };
417
+ filters?: string[] | undefined;
418
+ }[] | undefined;
419
+ } | undefined;
420
+ config?: {
421
+ mobile?: {
422
+ title?: unknown;
423
+ description?: string | undefined;
424
+ theme?: {
425
+ [key: string]: unknown;
426
+ } | null | undefined;
427
+ } | undefined;
428
+ mobileWeb?: {
429
+ title?: unknown;
430
+ description?: string | undefined;
431
+ theme?: {
432
+ [key: string]: unknown;
433
+ } | null | undefined;
434
+ } | undefined;
435
+ web?: {
436
+ title?: string | undefined;
437
+ description?: string | undefined;
438
+ theme?: {
439
+ [key: string]: unknown;
440
+ } | null | undefined;
441
+ } | undefined;
442
+ } | undefined;
443
+ }>;
444
+
445
+ export { getChainNonprofits as a, getImpact as g, postTransaction as p };
@@ -0,0 +1,2 @@
1
+ import{B as v,N as m}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as p}from"../utils/logger.js";var E="1.42.0",N={"@lit/react":"1.0.0","@lukeed/uuid":"2.0.0","@shoelace-style/shoelace":"2.15.0",lit:"2.6.1","lodash-es":"4.17.21","lucide-static":"0.292.0"};async function w(s,o){const c={method:"GET",...o,headers:{"Content-Type":"application/json",Accept:"application/json","X-Beam-Client":"WebSDK","X-Beam-Client-Version":E,...o?.headers},preflightContinue:!0,mode:o?.mode||"cors",body:o?.body!=null?o.body:void 0};let i;try{i=await fetch(s,c)}catch(e){const a=new v(`Network call failed (${c?.method.toUpperCase()} ${s})`);throw a.cause=e,p.error(a,s),a}let r,n;try{n=await i.text(),n&&(r=JSON.parse(n))}catch(e){let a=e;throw e instanceof SyntaxError&&(a=new m(i,r,`Response invalid. Expected JSON. Received: "${n}"`),a.cause=e),p.error(a),a}if(!i.ok){const e=new m(i,r,"Response was not OK");throw p.error(e),e}return r}const u="https://api.beamimpact.com",C="https://production.beamimpactlogs.com",O={en:"en",fr:"fr",de:"de",es:"es",it:"it",pl:"pl"},T={select_nonprofit:"select-nonprofit",redeem_transaction:"redeem-transaction",impact_overview:"impact-overview",community_impact:"community-impact",cumulative_impact:"cumulative-impact",product_details_page:"product-details-page",subscription_management:"subscription-management",subscription_impact:"subscription-impact",select_subscription_nonprofit:"select-subscription-nonprofit",social_share:"social-share"},t=(s,o,c)=>({[s]:async function({headers:i={},baseUrl:r=u,apiRoot:n="/api/v3",pathParams:e={},queryParams:a={},requestBody:d}){const h=Object.entries(e).reduce((S,[y,_])=>S.replace(`{${y}}`,_),s),f=JSON.parse(JSON.stringify(a)),l=new URLSearchParams(f).toString(),b=r+n+h+(l&&`?${l}`),g={headers:i,method:o,body:JSON.stringify(d)};return w(b,g)}})[s],U=t("/impact","get"),A=t("/chain/{chainId}/cumulativeImpact","get"),D=t("/selectNonprofit","post"),L=t("/transaction","post"),P=t("/transaction/{transactionId}","put"),R=t("/cart","post"),k=t("/chain/findEligibleNonprofitsForCart","post"),x=t("/logs","post"),B=t("/experimentSession","post"),I=t("/subscriptions/updateSubscriptionNonprofit","post"),J=t("/subscriptions/findOrCreateSubscription","post"),F=t("/productDetailsPage","get");export{u as D,O as S,T as W,C as a,R as b,x as c,N as d,B as e,k as f,U as g,P as h,J as i,D as j,F as k,A as l,L as p,I as u};
2
+ //# sourceMappingURL=routes-r5D_LdgT.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes-r5D_LdgT.esm.js","sources":["../../src/api-sdk/fetch-json.ts","../../src/api-sdk/constants.ts","../../src/api-sdk/v3/make-openapi-method.ts","../../src/api-sdk/v3/routes.ts"],"sourcesContent":["/**\n * Wrapper over window.fetch that expects/returns JSON\n */\nimport { BeamError, NetworkError } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\nimport { version as pkgVersion } from \"../../package.json\";\n\nexport async function fetchJson<T = unknown>(url: RequestInfo, options?: RequestInit): Promise<T> {\n const fetchOptions = {\n method: \"GET\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-Beam-Client\": \"WebSDK\",\n \"X-Beam-Client-Version\": pkgVersion,\n ...options?.headers,\n },\n preflightContinue: true,\n mode: options?.mode || \"cors\",\n body: options?.body != null ? options.body : undefined,\n };\n\n let response;\n try {\n response = await fetch(url, fetchOptions);\n // fetch can throw a TypeError if the server can't be reached, catch and log below\n } catch (err) {\n const error = new BeamError(`Network call failed (${fetchOptions?.method.toUpperCase()} ${url})`);\n error.cause = err;\n logger.error(error, url);\n throw error;\n }\n let body;\n let text;\n // This can throw a SyntaxError if response payload is malformed JSON\n try {\n text = await response.text();\n if (text) {\n // (response can be empty)\n body = JSON.parse(text);\n }\n } catch (err) {\n let error = err as Error;\n if (err instanceof SyntaxError) {\n error = new NetworkError(response, body, `Response invalid. Expected JSON. Received: \"${text}\"`);\n error.cause = err;\n }\n logger.error(error);\n throw error;\n }\n // Translate 4xx, 5xx status to runtime error\n if (!response.ok) {\n const error = new NetworkError(response, body, \"Response was not OK\");\n logger.error(error);\n throw error;\n }\n\n return body;\n}\n","import { LANGUAGES, TUrl } from \"./types\";\n\nexport const DEFAULT_BASE_URL: TUrl = \"https://api.beamimpact.com\";\n\nexport const DEFAULT_LOG_URL = \"https://production.beamimpactlogs.com\";\n\nexport const SUPPORTED_LANGUAGES: Record<string, LANGUAGES> = {\n en: \"en\",\n fr: \"fr\",\n de: \"de\",\n es: \"es\",\n it: \"it\",\n pl: \"pl\",\n};\n\nexport const WIDGET_NAMES = {\n select_nonprofit: \"select-nonprofit\",\n redeem_transaction: \"redeem-transaction\",\n impact_overview: \"impact-overview\",\n community_impact: \"community-impact\",\n cumulative_impact: \"cumulative-impact\",\n product_details_page: \"product-details-page\",\n subscription_management: \"subscription-management\",\n subscription_impact: \"subscription-impact\",\n select_subscription_nonprofit: \"select-subscription-nonprofit\",\n social_share: \"social-share\",\n} as const;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { fetchJson } from \"../fetch-json\";\nimport { DEFAULT_BASE_URL } from \"../constants\";\nimport { THttpMethod } from \"../types\";\nimport { paths } from \"./openapi-spec\";\n\nexport const makeOpenApiMethod = <\n TPathName extends keyof paths,\n TMethod extends keyof paths[TPathName],\n TStatusCode extends paths[TPathName][TMethod] extends { responses: any }\n ? keyof paths[TPathName][TMethod][\"responses\"]\n : never\n>(\n pathName: TPathName,\n method: TMethod,\n okHttpStatus: TStatusCode\n) => {\n type TRouteSpec = paths[typeof pathName];\n type TRouteMethod = TRouteSpec[typeof method];\n type TParams = \"parameters\" extends keyof TRouteMethod ? TRouteMethod[\"parameters\"] : never;\n type TPathParams = TParams extends { path: any } ? TParams[\"path\"] : Record<string, never>;\n type TQueryParams = TParams extends { query: any } ? TParams[\"query\"] : Record<string, never>;\n type TRequestBody = TRouteMethod extends { requestBody: { content: { \"application/json\": any } } }\n ? TRouteMethod[\"requestBody\"][\"content\"][\"application/json\"]\n : never;\n type TAllResponses = TRouteMethod extends { responses: any } ? TRouteMethod[\"responses\"] : never;\n type TOkResponse = TAllResponses[typeof okHttpStatus] extends { content: { \"application/json\": any } }\n ? TAllResponses[typeof okHttpStatus][\"content\"][\"application/json\"]\n : never;\n const openApi = {\n [pathName]: async function ({\n headers = {},\n baseUrl = DEFAULT_BASE_URL,\n apiRoot = \"/api/v3\",\n pathParams = {},\n queryParams = {},\n requestBody,\n }: {\n baseUrl?: string;\n apiRoot?: string;\n pathParams?: TPathParams;\n queryParams?: TQueryParams;\n requestBody?: TRequestBody;\n headers?: Record<string, string>;\n }) {\n const pathWithParams: string = Object.entries(pathParams).reduce((newPath: string, [k, v]) => {\n return newPath.replace(`{${k}}`, v as string);\n }, pathName as string);\n const cleanQueryParams = JSON.parse(JSON.stringify(queryParams));\n const search = new URLSearchParams(cleanQueryParams as unknown as Record<string, string>).toString();\n const url = baseUrl + apiRoot + pathWithParams + (search && `?${search}`);\n const options = { headers, method: method as THttpMethod, body: JSON.stringify(requestBody) };\n\n return fetchJson<TOkResponse>(url, options);\n },\n };\n\n // Use object to create function with dynamic name, for better stacktraces\n return openApi[pathName];\n};\n","import { makeOpenApiMethod } from \"./make-openapi-method\";\n\nexport const getChainNonprofits = makeOpenApiMethod(\"/chain/{chainId}/nonprofits\", \"get\", 200);\n\nexport const getImpact = makeOpenApiMethod(\"/impact\", \"get\", 200);\n\nexport const getCumulativeImpact = makeOpenApiMethod(\"/chain/{chainId}/cumulativeImpact\", \"get\", 200);\n\nexport const postSelectNonprofit = makeOpenApiMethod(\"/selectNonprofit\", \"post\", 201);\n\nexport const postTransaction = makeOpenApiMethod(\"/transaction\", \"post\", 201);\n\nexport const putTransaction = makeOpenApiMethod(\"/transaction/{transactionId}\", \"put\", 204);\n\nexport const postCart = makeOpenApiMethod(\"/cart\", \"post\", 200);\n\nexport const postChainEligibleNonprofitsForCart = makeOpenApiMethod(\n \"/chain/findEligibleNonprofitsForCart\",\n \"post\",\n 200\n);\n\nexport const postLogs = makeOpenApiMethod(\"/logs\", \"post\", 200);\n\nexport const postExperimentSession = makeOpenApiMethod(\"/experimentSession\", \"post\", 200);\n\nexport const updateSubscription = makeOpenApiMethod(\"/subscriptions/updateSubscriptionNonprofit\", \"post\", 200);\n\nexport const postFindOrCreateSubscription = makeOpenApiMethod(\"/subscriptions/findOrCreateSubscription\", \"post\", 200);\n\nexport const getProductDetailsPage = makeOpenApiMethod(\"/productDetailsPage\", \"get\", 200);\n"],"names":["fetchJson","url","options","fetchOptions","pkgVersion","response","err","error","BeamError","logger","body","text","NetworkError","DEFAULT_BASE_URL","DEFAULT_LOG_URL","SUPPORTED_LANGUAGES","WIDGET_NAMES","makeOpenApiMethod","pathName","method","okHttpStatus","headers","baseUrl","apiRoot","pathParams","queryParams","requestBody","pathWithParams","newPath","k","v","cleanQueryParams","search","getImpact","getCumulativeImpact","postSelectNonprofit","postTransaction","putTransaction","postCart","postChainEligibleNonprofitsForCart","postLogs","postExperimentSession","updateSubscription","postFindOrCreateSubscription","getPro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{logger as p}from"../utils/logger.esm.js";var E="1.42.0",N={"@lit/react":"1.0.0","@lukeed/uuid":"2.0.0","@shoelace-style/shoelace":"2.15.0",lit:"2.6.1","lodash-es":"4.17.21","lucide-static":"0.292.0"};async function w(s,o){const c={method:"GET",...o,headers:{"Content-Type":"application/json",Accept:"application/json","X-Beam-Client":"WebSDK","X-Beam-Client-Version":E,...o?.headers},preflightContinue:!0,mode:o?.mode||"cors",body:o?.body!=null?o.body:void 0};let i;try{i=await fetch(s,c)}catch(e){const a=new v(`Network call failed (${c?.method.toUpperCase()} ${s})`);throw a.cause=e,p.error(a,s),a}let r,n;try{n=await i.text(),n&&(r=JSON.parse(n))}catch(e){let a=e;throw e instanceof SyntaxError&&(a=new m(i,r,`Response invalid. Expected JSON. Received: "${n}"`),a.cause=e),p.error(a),a}if(!i.ok){const e=new m(i,r,"Response was not OK");throw p.error(e),e}return r}const u="https://api.beamimpact.com",C="https://production.beamimpactlogs.com",O={en:"en",fr:"fr",de:"de",es:"es",it:"it",pl:"pl"},T={select_nonprofit:"select-nonprofit",redeem_transaction:"redeem-transaction",impact_overview:"impact-overview",community_impact:"community-impact",cumulative_impact:"cumulative-impact",product_details_page:"product-details-page",subscription_management:"subscription-management",subscription_impact:"subscription-impact",select_subscription_nonprofit:"select-subscription-nonprofit",social_share:"social-share"},t=(s,o,c)=>({[s]:async function({headers:i={},baseUrl:r=u,apiRoot:n="/api/v3",pathParams:e={},queryParams:a={},requestBody:d}){const h=Object.entries(e).reduce((S,[y,_])=>S.replace(`{${y}}`,_),s),f=JSON.parse(JSON.stringify(a)),l=new URLSearchParams(f).toString(),b=r+n+h+(l&&`?${l}`),g={headers:i,method:o,body:JSON.stringify(d)};return w(b,g)}})[s],U=t("/impact","get"),A=t("/chain/{chainId}/cumulativeImpact","get"),D=t("/selectNonprofit","post"),L=t("/transaction","post"),P=t("/transaction/{transactionId}","put"),R=t("/cart","post"),k=t("/chain/findEligibleNonprofitsForCart","post"),x=t("/logs","post"),B=t("/experimentSession","post"),I=t("/subscriptions/updateSubscriptionNonprofit","post"),J=t("/subscriptions/findOrCreateSubscription","post"),F=t("/productDetailsPage","get");export{u as D,O as S,T as W,C as a,R as b,x as c,N as d,B as e,k as f,U as g,P as h,J as i,D as j,F as k,A as l,L as p,I as u};
2
+ //# sourceMappingURL=routes-rmhOokKz.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes-rmhOokKz.esm.js","sources":["../../src/api-sdk/fetch-json.ts","../../src/api-sdk/constants.ts","../../src/api-sdk/v3/make-openapi-method.ts","../../src/api-sdk/v3/routes.ts"],"sourcesContent":["/**\n * Wrapper over window.fetch that expects/returns JSON\n */\nimport { BeamError, NetworkError } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\nimport { version as pkgVersion } from \"../../package.json\";\n\nexport async function fetchJson<T = unknown>(url: RequestInfo, options?: RequestInit): Promise<T> {\n const fetchOptions = {\n method: \"GET\",\n ...options,\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n \"X-Beam-Client\": \"WebSDK\",\n \"X-Beam-Client-Version\": pkgVersion,\n ...options?.headers,\n },\n preflightContinue: true,\n mode: options?.mode || \"cors\",\n body: options?.body != null ? options.body : undefined,\n };\n\n let response;\n try {\n response = await fetch(url, fetchOptions);\n // fetch can throw a TypeError if the server can't be reached, catch and log below\n } catch (err) {\n const error = new BeamError(`Network call failed (${fetchOptions?.method.toUpperCase()} ${url})`);\n error.cause = err;\n logger.error(error, url);\n throw error;\n }\n let body;\n let text;\n // This can throw a SyntaxError if response payload is malformed JSON\n try {\n text = await response.text();\n if (text) {\n // (response can be empty)\n body = JSON.parse(text);\n }\n } catch (err) {\n let error = err as Error;\n if (err instanceof SyntaxError) {\n error = new NetworkError(response, body, `Response invalid. Expected JSON. Received: \"${text}\"`);\n error.cause = err;\n }\n logger.error(error);\n throw error;\n }\n // Translate 4xx, 5xx status to runtime error\n if (!response.ok) {\n const error = new NetworkError(response, body, \"Response was not OK\");\n logger.error(error);\n throw error;\n }\n\n return body;\n}\n","import { LANGUAGES, TUrl } from \"./types\";\n\nexport const DEFAULT_BASE_URL: TUrl = \"https://api.beamimpact.com\";\n\nexport const DEFAULT_LOG_URL = \"https://production.beamimpactlogs.com\";\n\nexport const SUPPORTED_LANGUAGES: Record<string, LANGUAGES> = {\n en: \"en\",\n fr: \"fr\",\n de: \"de\",\n es: \"es\",\n it: \"it\",\n pl: \"pl\",\n};\n\nexport const WIDGET_NAMES = {\n select_nonprofit: \"select-nonprofit\",\n redeem_transaction: \"redeem-transaction\",\n impact_overview: \"impact-overview\",\n community_impact: \"community-impact\",\n cumulative_impact: \"cumulative-impact\",\n product_details_page: \"product-details-page\",\n subscription_management: \"subscription-management\",\n subscription_impact: \"subscription-impact\",\n select_subscription_nonprofit: \"select-subscription-nonprofit\",\n social_share: \"social-share\",\n} as const;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { fetchJson } from \"../fetch-json\";\nimport { DEFAULT_BASE_URL } from \"../constants\";\nimport { THttpMethod } from \"../types\";\nimport { paths } from \"./openapi-spec\";\n\nexport const makeOpenApiMethod = <\n TPathName extends keyof paths,\n TMethod extends keyof paths[TPathName],\n TStatusCode extends paths[TPathName][TMethod] extends { responses: any }\n ? keyof paths[TPathName][TMethod][\"responses\"]\n : never\n>(\n pathName: TPathName,\n method: TMethod,\n okHttpStatus: TStatusCode\n) => {\n type TRouteSpec = paths[typeof pathName];\n type TRouteMethod = TRouteSpec[typeof method];\n type TParams = \"parameters\" extends keyof TRouteMethod ? TRouteMethod[\"parameters\"] : never;\n type TPathParams = TParams extends { path: any } ? TParams[\"path\"] : Record<string, never>;\n type TQueryParams = TParams extends { query: any } ? TParams[\"query\"] : Record<string, never>;\n type TRequestBody = TRouteMethod extends { requestBody: { content: { \"application/json\": any } } }\n ? TRouteMethod[\"requestBody\"][\"content\"][\"application/json\"]\n : never;\n type TAllResponses = TRouteMethod extends { responses: any } ? TRouteMethod[\"responses\"] : never;\n type TOkResponse = TAllResponses[typeof okHttpStatus] extends { content: { \"application/json\": any } }\n ? TAllResponses[typeof okHttpStatus][\"content\"][\"application/json\"]\n : never;\n const openApi = {\n [pathName]: async function ({\n headers = {},\n baseUrl = DEFAULT_BASE_URL,\n apiRoot = \"/api/v3\",\n pathParams = {},\n queryParams = {},\n requestBody,\n }: {\n baseUrl?: string;\n apiRoot?: string;\n pathParams?: TPathParams;\n queryParams?: TQueryParams;\n requestBody?: TRequestBody;\n headers?: Record<string, string>;\n }) {\n const pathWithParams: string = Object.entries(pathParams).reduce((newPath: string, [k, v]) => {\n return newPath.replace(`{${k}}`, v as string);\n }, pathName as string);\n const cleanQueryParams = JSON.parse(JSON.stringify(queryParams));\n const search = new URLSearchParams(cleanQueryParams as unknown as Record<string, string>).toString();\n const url = baseUrl + apiRoot + pathWithParams + (search && `?${search}`);\n const options = { headers, method: method as THttpMethod, body: JSON.stringify(requestBody) };\n\n return fetchJson<TOkResponse>(url, options);\n },\n };\n\n // Use object to create function with dynamic name, for better stacktraces\n return openApi[pathName];\n};\n","import { makeOpenApiMethod } from \"./make-openapi-method\";\n\nexport const getChainNonprofits = makeOpenApiMethod(\"/chain/{chainId}/nonprofits\", \"get\", 200);\n\nexport const getImpact = makeOpenApiMethod(\"/impact\", \"get\", 200);\n\nexport const getCumulativeImpact = makeOpenApiMethod(\"/chain/{chainId}/cumulativeImpact\", \"get\", 200);\n\nexport const postSelectNonprofit = makeOpenApiMethod(\"/selectNonprofit\", \"post\", 201);\n\nexport const postTransaction = makeOpenApiMethod(\"/transaction\", \"post\", 201);\n\nexport const putTransaction = makeOpenApiMethod(\"/transaction/{transactionId}\", \"put\", 204);\n\nexport const postCart = makeOpenApiMethod(\"/cart\", \"post\", 200);\n\nexport const postChainEligibleNonprofitsForCart = makeOpenApiMethod(\n \"/chain/findEligibleNonprofitsForCart\",\n \"post\",\n 200\n);\n\nexport const postLogs = makeOpenApiMethod(\"/logs\", \"post\", 200);\n\nexport const postExperimentSession = makeOpenApiMethod(\"/experimentSession\", \"post\", 200);\n\nexport const updateSubscription = makeOpenApiMethod(\"/subscriptions/updateSubscriptionNonprofit\", \"post\", 200);\n\nexport const postFindOrCreateSubscription = makeOpenApiMethod(\"/subscriptions/findOrCreateSubscription\", \"post\", 200);\n\nexport const getProductDetailsPage = makeOpenApiMethod(\"/productDetailsPage\", \"get\", 200);\n"],"names":["fetchJson","url","options","fetchOptions","pkgVersion","response","err","error","BeamError","logger","body","text","NetworkError","DEFAULT_BASE_URL","DEFAULT_LOG_URL","SUPPORTED_LANGUAGES","WIDGET_NAMES","makeOpenApiMethod","pathName","method","okHttpStatus","headers","baseUrl","apiRoot","pathParams","queryParams","requestBody","pathWithParams","newPath","k","v","cleanQueryParams","search","getImpact","getCumulativeImpact","postSelectNonprofit","postTransaction","putTransaction","postCart","postChainEligibleNonprofitsForCart","postLogs","postExperimentSession","updateSubscription","postFindOrCreateSubscription","getProductDetailsPage"],"mappings":"wQAOA,eAAsBA,EAAuBC,EAAkBC,EAAmC,CAChG,MAAMC,EAAe,CACnB,OAAQ,MACR,GAAGD,EACH,QAAS,CACP,eAAgB,mBAChB,OAAQ,mBACR,gBAAiB,SACjB,wBAAyBE,EACzB,GAAGF,GAAS,OACd,EACA,kBAAmB,GACnB,KAAMA,GAAS,MAAQ,OACvB,KAAMA,GAAS,MAAQ,KAAOA,EAAQ,KAAO,MAC/C,EAEA,IAAIG,EACJ,GAAI,CACFA,EAAW,MAAM,MAAMJ,EAAKE,CAAY,CAE1C,OAASG,EAAK,CACZ,MAAMC,EAAQ,IAAIC,EAAU,wBAAwBL,GAAc,OAAO,YAAa,CAAA,IAAIF,CAAG,GAAG,EAChG,MAAAM,EAAM,MAAQD,EACdG,EAAO,MAAMF,EAAON,CAAG,EACjBM,CACR,CACA,IAAIG,EACAC,EAEJ,GAAI,CACFA,EAAO,MAAMN,EAAS,OAClBM,IAEFD,EAAO,KAAK,MAAMC,CAAI,EAE1B,OAASL,EAAK,CACZ,IAAIC,E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,CAAO,CAC5C,CACF,GAGegB,CAAQ,ECvDZe,EAAYhB,EAAkB,UAAW,KAAU,EAEnDiB,EAAsBjB,EAAkB,oCAAqC,KAAU,EAEvFkB,EAAsBlB,EAAkB,mBAAoB,MAAW,EAEvEmB,EAAkBnB,EAAkB,eAAgB,MAAW,EAE/DoB,EAAiBpB,EAAkB,+BAAgC,KAAU,EAE7EqB,EAAWrB,EAAkB,QAAS,MAAW,EAEjDsB,EAAqCtB,EAChD,uCACA,MAEF,EAEauB,EAAWvB,EAAkB,QAAS,MAAW,EAEjDwB,EAAwBxB,EAAkB,qBAAsB,MAAW,EAE3EyB,EAAqBzB,EAAkB,6CAA8C,MAAW,EAEhG0B,EAA+B1B,EAAkB,0CAA2C,MAAW,EAEvG2B,EAAwB3B,EAAkB,sBAAuB,KAAU"}
@@ -0,0 +1,2 @@
1
+ const t=async a=>fetch(a).then(async i=>{const r=new URL(a),e=await i.blob();return new File([e],r.pathname,{type:e.type})}),o={en:{impactShareButton:()=>"Share to Grow Our Impact",impactShareText:({brandName:a=""})=>`Help ${a} reach their giving goal by sharing this cause on social media`,impactShareTitle:()=>"Share on Social Media",impactShareCopy:()=>"Copy",impactShareDownload:()=>"Download",impactShareClose:()=>"Close"},fr:{impactShareButton:()=>"Partagez pour augmentez notre cause",impactShareText:({brandName:a=""})=>`Aidez ${a} a atteindre leur objectif en partageant cette cause sur votre r\xE9seaux sociaux`,impactShareTitle:()=>"Partager sur votre r\xE9seaux sociaux",impactShareCopy:()=>"Copier",impactShareDownload:()=>"T\xE9l\xE9charger",impactShareClose:()=>"Fermer"},de:{impactShareButton:()=>"Teil, um unserem Beitrag zu erh\xF6hen",impactShareText:({brandName:a=""})=>`Hilf ${a} ihre Spendenziel zu erreichen`,impactShareTitle:()=>"In den sozialen Medien teilen",impactShareCopy:()=>"Kopieren",impactShareDownload:()=>"Herunterladen",impactShareClose:()=>"Schlie\xDFen"},es:{impactShareButton:()=>"Comparte para aumentar nuestro impacto",impactShareText:({brandName:a=""})=>`Comparte en las redes sociales para ayudar a ${a} a alcanzar su objetivo.`,impactShareTitle:()=>"Compartir en redes sociales",impactShareCopy:()=>"Copiar",impactShareDownload:()=>"Descargar",impactShareClose:()=>"Cerrar"},it:{impactShareButton:()=>"Condividi, aiutaci a fare la differenza",impactShareText:({brandName:a=""})=>`Aiuta ${a} a raggiungere il suo obiettivo di donazione condividendo questa causa sui social media.`,impactShareTitle:()=>"Condividi, aiutaci a fare la differenza",impactShareCopy:()=>"Copia",impactShareDownload:()=>"Scarica",impactShareClose:()=>"Chiudi"},pl:{impactShareButton:()=>"Udost\u0119pnij, by szerzy\u0107 nasz\u0105 misj\u0119",impactShareText:({brandName:a=""})=>`Pom\xF3\u017C ${a} osi\u0105gn\u0105\u0107 cel i podziel si\u0119 t\u0105 inicjatyw\u0105 na swoim profilu`,impactShareTitle:()=>"Udost\u0119pnij na swoim profilu",impactShareCopy:()=>"Kopiuj",impactShareDownload:()=>"Pobierz",impactShareClose:()=>"Zamknij"}};export{o as s,t as u};
2
+ //# sourceMappingURL=share-button-CqTd80g8.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-button-CqTd80g8.esm.js","sources":["../../src/shared/files.ts","../../src/shared/components/strings/share-button.ts"],"sourcesContent":["export const urlToFile = async (url: string) => {\n return fetch(url).then(async (r) => {\n const u = new URL(url);\n const blob = await r.blob();\n return new File([blob], u.pathname, { type: blob.type });\n });\n};\n","export const strings = {\n en: {\n impactShareButton: () => `Share to Grow Our Impact`,\n impactShareText: ({ brandName = \"\" }) =>\n `Help ${brandName} reach their giving goal by sharing this cause on social media`,\n impactShareTitle: () => `Share on Social Media`,\n impactShareCopy: () => `Copy`,\n impactShareDownload: () => `Download`,\n impactShareClose: () => `Close`,\n },\n fr: {\n impactShareButton: () => `Partagez pour augmentez notre cause`,\n impactShareText: ({ brandName = \"\" }) =>\n `Aidez ${brandName} a atteindre leur objectif en partageant cette cause sur votre réseaux sociaux`,\n impactShareTitle: () => `Partager sur votre réseaux sociaux`,\n impactShareCopy: () => `Copier`,\n impactShareDownload: () => `Télécharger`,\n impactShareClose: () => `Fermer`,\n },\n de: {\n impactShareButton: () => `Teil, um unserem Beitrag zu erhöhen`,\n impactShareText: ({ brandName = \"\" }) => `Hilf ${brandName} ihre Spendenziel zu erreichen`,\n impactShareTitle: () => `In den sozialen Medien teilen`,\n impactShareCopy: () => `Kopieren`,\n impactShareDownload: () => `Herunterladen`,\n impactShareClose: () => `Schließen`,\n },\n es: {\n impactShareButton: () => \"Comparte para aumentar nuestro impacto\",\n impactShareText: ({ brandName = \"\" }) =>\n `Comparte en las redes sociales para ayudar a ${brandName} a alcanzar su objetivo.`,\n impactShareTitle: () => \"Compartir en redes sociales\",\n impactShareCopy: () => \"Copiar\",\n impactShareDownload: () => \"Descargar\",\n impactShareClose: () => \"Cerrar\",\n },\n it: {\n impactShareButton: () => \"Condividi, aiutaci a fare la differenza\",\n impactShareText: ({ brandName = \"\" }) =>\n `Aiuta ${brandName} a raggiungere il suo obiettivo di donazione condividendo questa causa sui social media.`,\n impactShareTitle: () => \"Condividi, aiutaci a fare la differenza\",\n impactShareCopy: () => \"Copia\",\n impactShareDownload: () => \"Scarica\",\n impactShareClose: () => \"Chiudi\",\n },\n pl: {\n impactShareButton: () => `Udostępnij, by szerzyć naszą misję`,\n impactShareText: ({ brandName = \"\" }) =>\n `Pomóż ${brandName} osiągnąć cel i podziel się tą inicjatywą na swoim profilu`,\n impactShareTitle: () => `Udostępnij na swoim profilu`,\n impactShareCopy: () => `Kopiuj`,\n impactShareDownload: () => `Pobierz`,\n impactShareClose: () => `Zamknij`,\n },\n};\n"],"names":["urlToFile","url","r","u","blob","strings","brandName"],"mappings":"AAAO,MAAMA,EAAY,MAAOC,GACvB,MAAMA,CAAG,EAAE,KAAK,MAAOC,GAAM,CAClC,MAAMC,EAAI,IAAI,IAAIF,CAAG,EACfG,EAAO,MAAMF,EAAE,KACrB,EAAA,OAAO,IAAI,KAAK,CAACE,CAAI,E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