@beamimpact/web-sdk 1.43.2 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/dist/chunks/_share-dialog-dependencies-R9RsuSGx.esm.js +2 -0
  2. package/dist/chunks/_share-dialog-dependencies-R9RsuSGx.esm.js.map +1 -0
  3. package/dist/chunks/_share-dialog-dependencies-o5GBtNTA.esm.js +2 -0
  4. package/dist/chunks/_share-dialog-dependencies-o5GBtNTA.esm.js.map +1 -0
  5. package/dist/chunks/{cart-contents-WB1BF6hG.esm.d.ts → cart-contents-HAPzwbeL.esm.d.ts} +1 -1
  6. package/dist/chunks/{css-card-grid-r6wxRbPV.esm.js → css-card-grid-nEc--M5M.esm.js} +2 -2
  7. package/dist/chunks/{css-card-grid-r6wxRbPV.esm.js.map → css-card-grid-nEc--M5M.esm.js.map} +1 -1
  8. package/dist/chunks/{enforce-config-HksNiOMu.esm.js → enforce-config-ZAI7WYAd.esm.js} +2 -2
  9. package/dist/chunks/{enforce-config-HksNiOMu.esm.js.map → enforce-config-ZAI7WYAd.esm.js.map} +1 -1
  10. package/dist/chunks/{enforce-config-er6B5Gkj.esm.js → enforce-config-ZyPq_4CF.esm.js} +2 -2
  11. package/dist/chunks/{enforce-config-er6B5Gkj.esm.js.map → enforce-config-ZyPq_4CF.esm.js.map} +1 -1
  12. package/dist/chunks/{events-MfRTtTVm.esm.d.ts → events-fqRWfo7p.esm.d.ts} +1 -1
  13. package/dist/chunks/{index-keYXyTGw.esm.js → index--JacA4R2.esm.js} +2 -2
  14. package/dist/chunks/{index-keYXyTGw.esm.js.map → index--JacA4R2.esm.js.map} +1 -1
  15. package/dist/chunks/index-1WxwWfcp.esm.js +2 -0
  16. package/dist/chunks/index-1WxwWfcp.esm.js.map +1 -0
  17. package/dist/chunks/index-4fdLArZg.esm.js +2 -0
  18. package/dist/chunks/index-4fdLArZg.esm.js.map +1 -0
  19. package/dist/chunks/{index-UggwPn9Q.esm.d.ts → index-7mukhxz_.esm.d.ts} +1 -1
  20. package/dist/chunks/index-Hd_2hpsA.esm.js +2 -0
  21. package/dist/chunks/index-Hd_2hpsA.esm.js.map +1 -0
  22. package/dist/chunks/{index-1nI7l5vj.esm.js → index-JDZQClkA.esm.js} +2 -2
  23. package/dist/chunks/{index-1nI7l5vj.esm.js.map → index-JDZQClkA.esm.js.map} +1 -1
  24. package/dist/chunks/{index-OaRsZJh7.esm.d.ts → index-JG4nmG9U.esm.d.ts} +1 -1
  25. package/dist/chunks/index-MJNFm2RK.esm.js +2 -0
  26. package/dist/chunks/index-MJNFm2RK.esm.js.map +1 -0
  27. package/dist/chunks/{index-B9w02q6y.esm.d.ts → index-MSoONvC5.esm.d.ts} +1 -1
  28. package/dist/chunks/{index-uqNCQVUx.esm.d.ts → index-SExnliMs.esm.d.ts} +1 -1
  29. package/dist/chunks/{index-mw70Caof.esm.js → index-eXilYHHK.esm.js} +2 -2
  30. package/dist/chunks/{index-mw70Caof.esm.js.map → index-eXilYHHK.esm.js.map} +1 -1
  31. package/dist/chunks/index-gBAASIWa.esm.js +2 -0
  32. package/dist/chunks/index-gBAASIWa.esm.js.map +1 -0
  33. package/dist/chunks/index-lyf1T2wZ.esm.js +2 -0
  34. package/dist/chunks/index-lyf1T2wZ.esm.js.map +1 -0
  35. package/dist/chunks/{index-U3VWulKA.esm.js → index-qs-xQCeM.esm.js} +2 -2
  36. package/dist/chunks/{index-U3VWulKA.esm.js.map → index-qs-xQCeM.esm.js.map} +1 -1
  37. package/dist/chunks/index-qt5iD9Ok.esm.d.ts +14 -0
  38. package/dist/chunks/{index-ozcDdIom.esm.d.ts → index-tdUx2WLc.esm.d.ts} +4 -4
  39. package/dist/chunks/{lit-3QHn3fwl.esm.js → lit-iNN5L_Qk.esm.js} +2 -2
  40. package/dist/chunks/{lit-3QHn3fwl.esm.js.map → lit-iNN5L_Qk.esm.js.map} +1 -1
  41. package/dist/chunks/loading-template-t4fFsYtr.esm.js +2 -0
  42. package/dist/chunks/{loading-template-mLjOGXMj.esm.js.map → loading-template-t4fFsYtr.esm.js.map} +1 -1
  43. package/dist/chunks/localize-m-_ESmpk.esm.js +31 -0
  44. package/dist/chunks/localize-m-_ESmpk.esm.js.map +1 -0
  45. package/dist/chunks/localize-o-cYvHQf.esm.js +31 -0
  46. package/dist/chunks/localize-o-cYvHQf.esm.js.map +1 -0
  47. package/dist/chunks/{openapi-spec-GGEBbqAJ.esm.d.ts → openapi-spec-RlP2IT1i.esm.d.ts} +87 -33
  48. package/dist/chunks/{order-page-LvE0Otsn.esm.d.ts → order-page-FLhpaZg2.esm.d.ts} +4 -4
  49. package/dist/chunks/order-page-KZ7xLkRW.esm.js +2 -0
  50. package/dist/chunks/order-page-KZ7xLkRW.esm.js.map +1 -0
  51. package/dist/chunks/order-page-mlWRT5YL.esm.js +2 -0
  52. package/dist/chunks/order-page-mlWRT5YL.esm.js.map +1 -0
  53. package/dist/chunks/{progress-bar-HVG_n8_6.esm.js → progress-bar-PMU_xI3L.esm.js} +2 -2
  54. package/dist/chunks/{progress-bar-HVG_n8_6.esm.js.map → progress-bar-PMU_xI3L.esm.js.map} +1 -1
  55. package/dist/chunks/promo-pill-label-58PJRvSl.esm.js +15 -0
  56. package/dist/chunks/promo-pill-label-58PJRvSl.esm.js.map +1 -0
  57. package/dist/chunks/{responsive-KbDsZM6S.esm.js → responsive-2lC2Wrtg.esm.js} +2 -2
  58. package/dist/chunks/{responsive-KbDsZM6S.esm.js.map → responsive-2lC2Wrtg.esm.js.map} +1 -1
  59. package/dist/chunks/{routes-L-CN-xXC.esm.js → routes-FBB1GA4-.esm.js} +2 -2
  60. package/dist/chunks/{routes-L-CN-xXC.esm.js.map → routes-FBB1GA4-.esm.js.map} +1 -1
  61. package/dist/chunks/{routes-wCCYf_uA.esm.d.ts → routes-NIuAzAOC.esm.d.ts} +3 -1
  62. package/dist/chunks/{routes-t6bR6BdS.esm.js → routes-jmFlXAbv.esm.js} +2 -2
  63. package/dist/chunks/{routes-t6bR6BdS.esm.js.map → routes-jmFlXAbv.esm.js.map} +1 -1
  64. package/dist/chunks/share-button-SNvuFDC9.esm.js +2 -0
  65. package/dist/chunks/share-button-SNvuFDC9.esm.js.map +1 -0
  66. package/dist/chunks/{share-button-0N1lvlZT.esm.js → share-button-bQ8brpBZ.esm.js} +4 -3
  67. package/dist/chunks/{share-button-0N1lvlZT.esm.js.map → share-button-bQ8brpBZ.esm.js.map} +1 -1
  68. package/dist/chunks/{share-button-7wbogZGx.esm.js → share-button-hLOsYlSA.esm.js} +4 -3
  69. package/dist/chunks/{share-button-7wbogZGx.esm.js.map → share-button-hLOsYlSA.esm.js.map} +1 -1
  70. package/dist/chunks/{shoelace-components-BpI14CrA.esm.js → shoelace-components-leDI-Yop.esm.js} +2 -2
  71. package/dist/chunks/{shoelace-components-BpI14CrA.esm.js.map → shoelace-components-leDI-Yop.esm.js.map} +1 -1
  72. package/dist/chunks/{shoelace-components-VlhAe0ME.esm.js → shoelace-components-qjNlvvPx.esm.js} +2 -2
  73. package/dist/chunks/{shoelace-components-VlhAe0ME.esm.js.map → shoelace-components-qjNlvvPx.esm.js.map} +1 -1
  74. package/dist/chunks/{update-cart-tjLR7pMx.esm.d.ts → update-cart-Hebtxhto.esm.d.ts} +1 -1
  75. package/dist/chunks/update-cart-aKQ3Cjc8.esm.js +2 -0
  76. package/dist/chunks/update-cart-aKQ3Cjc8.esm.js.map +1 -0
  77. package/dist/chunks/update-cart-j9LPS5By.esm.js +2 -0
  78. package/dist/chunks/update-cart-j9LPS5By.esm.js.map +1 -0
  79. package/dist/chunks/{vendor--f7lkyBk.esm.js → vendor-GKiOHg2N.esm.js} +2 -2
  80. package/dist/chunks/{vendor--f7lkyBk.esm.js.map → vendor-GKiOHg2N.esm.js.map} +1 -1
  81. package/dist/components/beam-partner-logos.esm.js +1 -1
  82. package/dist/components/beam-partner-logos.js +1 -1
  83. package/dist/components/community-impact.d.ts +1 -0
  84. package/dist/components/community-impact.esm.js +13 -13
  85. package/dist/components/community-impact.esm.js.map +1 -1
  86. package/dist/components/community-impact.js +13 -13
  87. package/dist/components/community-impact.js.map +1 -1
  88. package/dist/components/cumulative-impact.d.ts +1 -0
  89. package/dist/components/cumulative-impact.esm.js +3 -3
  90. package/dist/components/cumulative-impact.esm.js.map +1 -1
  91. package/dist/components/cumulative-impact.js +3 -3
  92. package/dist/components/cumulative-impact.js.map +1 -1
  93. package/dist/components/impact-overview.d.ts +7 -1
  94. package/dist/components/impact-overview.esm.js +87 -73
  95. package/dist/components/impact-overview.esm.js.map +1 -1
  96. package/dist/components/impact-overview.js +87 -73
  97. package/dist/components/impact-overview.js.map +1 -1
  98. package/dist/components/index.d.ts +3 -3
  99. package/dist/components/index.esm.js +1 -1
  100. package/dist/components/index.js +1 -1
  101. package/dist/components/post-purchase.d.ts +4 -3
  102. package/dist/components/post-purchase.esm.js +4 -2
  103. package/dist/components/post-purchase.esm.js.map +1 -1
  104. package/dist/components/post-purchase.js +4 -2
  105. package/dist/components/post-purchase.js.map +1 -1
  106. package/dist/components/product-details-page.d.ts +2 -1
  107. package/dist/components/product-details-page.esm.js +3 -3
  108. package/dist/components/product-details-page.esm.js.map +1 -1
  109. package/dist/components/product-details-page.js +3 -3
  110. package/dist/components/product-details-page.js.map +1 -1
  111. package/dist/components/redeem-transaction.d.ts +11 -4
  112. package/dist/components/redeem-transaction.esm.js +256 -185
  113. package/dist/components/redeem-transaction.esm.js.map +1 -1
  114. package/dist/components/redeem-transaction.js +256 -185
  115. package/dist/components/redeem-transaction.js.map +1 -1
  116. package/dist/components/select-nonprofit.d.ts +7 -5
  117. package/dist/components/select-nonprofit.esm.js +55 -30
  118. package/dist/components/select-nonprofit.esm.js.map +1 -1
  119. package/dist/components/select-nonprofit.js +55 -30
  120. package/dist/components/select-nonprofit.js.map +1 -1
  121. package/dist/components/select-subscription-nonprofit.d.ts +2 -1
  122. package/dist/components/select-subscription-nonprofit.esm.js +34 -19
  123. package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
  124. package/dist/components/select-subscription-nonprofit.js +34 -19
  125. package/dist/components/select-subscription-nonprofit.js.map +1 -1
  126. package/dist/components/shopify.d.ts +6 -6
  127. package/dist/components/shopify.esm.js +1 -1
  128. package/dist/components/shopify.esm.js.map +1 -1
  129. package/dist/components/shopify.js +1 -1
  130. package/dist/components/shopify.js.map +1 -1
  131. package/dist/components/social-share.esm.js +1 -1
  132. package/dist/components/social-share.js +1 -1
  133. package/dist/components/subscription-impact.d.ts +2 -1
  134. package/dist/components/subscription-impact.esm.js +6 -6
  135. package/dist/components/subscription-impact.esm.js.map +1 -1
  136. package/dist/components/subscription-impact.js +6 -6
  137. package/dist/components/subscription-impact.js.map +1 -1
  138. package/dist/components/subscription-management.d.ts +5 -4
  139. package/dist/components/subscription-management.esm.js +4 -2
  140. package/dist/components/subscription-management.esm.js.map +1 -1
  141. package/dist/components/subscription-management.js +4 -2
  142. package/dist/components/subscription-management.js.map +1 -1
  143. package/dist/index.d.ts +12 -12
  144. package/dist/index.esm.js +1 -1
  145. package/dist/index.js +1 -1
  146. package/dist/integrations/beam.esm.js +1 -1
  147. package/dist/integrations/beam.js +1 -1
  148. package/dist/integrations/cart.d.ts +3 -3
  149. package/dist/integrations/cart.esm.js +1 -1
  150. package/dist/integrations/cart.js +1 -1
  151. package/dist/integrations/index.d.ts +10 -10
  152. package/dist/integrations/index.esm.js +1 -1
  153. package/dist/integrations/index.js +1 -1
  154. package/dist/integrations/logs.d.ts +2 -2
  155. package/dist/integrations/logs.esm.js +1 -1
  156. package/dist/integrations/logs.js +1 -1
  157. package/dist/integrations/session.esm.js +1 -1
  158. package/dist/integrations/session.js +1 -1
  159. package/dist/integrations/shopify.d.ts +5 -5
  160. package/dist/integrations/shopify.esm.js +1 -1
  161. package/dist/integrations/shopify.js +1 -1
  162. package/dist/integrations/statsig.esm.js +14 -14
  163. package/dist/integrations/statsig.esm.js.map +1 -1
  164. package/dist/integrations/statsig.js +14 -14
  165. package/dist/integrations/statsig.js.map +1 -1
  166. package/dist/integrations/utils.d.ts +3 -3
  167. package/dist/react/beam-partner-logos.esm.js +1 -1
  168. package/dist/react/beam-partner-logos.js +1 -1
  169. package/dist/react/community-impact.esm.js +1 -1
  170. package/dist/react/community-impact.js +1 -1
  171. package/dist/react/cumulative-impact.esm.js +1 -1
  172. package/dist/react/cumulative-impact.js +1 -1
  173. package/dist/react/impact-overview.esm.js +1 -1
  174. package/dist/react/impact-overview.js +1 -1
  175. package/dist/react/index.d.ts +4 -4
  176. package/dist/react/index.esm.js +1 -1
  177. package/dist/react/index.js +1 -1
  178. package/dist/react/post-purchase.d.ts +2 -2
  179. package/dist/react/post-purchase.esm.js +1 -1
  180. package/dist/react/post-purchase.esm.js.map +1 -1
  181. package/dist/react/post-purchase.js +1 -1
  182. package/dist/react/post-purchase.js.map +1 -1
  183. package/dist/react/product-details-page.esm.js +1 -1
  184. package/dist/react/product-details-page.js +1 -1
  185. package/dist/react/redeem-transaction.d.ts +3 -3
  186. package/dist/react/redeem-transaction.esm.js +1 -1
  187. package/dist/react/redeem-transaction.esm.js.map +1 -1
  188. package/dist/react/redeem-transaction.js +1 -1
  189. package/dist/react/redeem-transaction.js.map +1 -1
  190. package/dist/react/select-nonprofit.d.ts +4 -3
  191. package/dist/react/select-nonprofit.esm.js +1 -1
  192. package/dist/react/select-nonprofit.esm.js.map +1 -1
  193. package/dist/react/select-nonprofit.js +1 -1
  194. package/dist/react/select-nonprofit.js.map +1 -1
  195. package/dist/react/select-subscription-nonprofit.d.ts +3 -3
  196. package/dist/react/select-subscription-nonprofit.esm.js +1 -1
  197. package/dist/react/select-subscription-nonprofit.esm.js.map +1 -1
  198. package/dist/react/select-subscription-nonprofit.js +1 -1
  199. package/dist/react/select-subscription-nonprofit.js.map +1 -1
  200. package/dist/react/social-share.esm.js +1 -1
  201. package/dist/react/social-share.js +1 -1
  202. package/dist/react/subscription-impact.esm.js +1 -1
  203. package/dist/react/subscription-impact.js +1 -1
  204. package/dist/react/subscription-management.d.ts +3 -3
  205. package/dist/react/subscription-management.esm.js +1 -1
  206. package/dist/react/subscription-management.esm.js.map +1 -1
  207. package/dist/react/subscription-management.js +1 -1
  208. package/dist/react/subscription-management.js.map +1 -1
  209. package/dist/utils/cart.d.ts +18 -0
  210. package/dist/utils/cart.esm.js +2 -0
  211. package/dist/utils/cart.esm.js.map +1 -0
  212. package/dist/utils/cart.js +2 -0
  213. package/dist/utils/cart.js.map +1 -0
  214. package/dist/utils/events.d.ts +3 -3
  215. package/dist/utils/index.d.ts +3 -3
  216. package/package.json +1 -1
  217. package/dist/chunks/_share-dialog-dependencies-H1_GULvN.esm.js +0 -2
  218. package/dist/chunks/_share-dialog-dependencies-H1_GULvN.esm.js.map +0 -1
  219. package/dist/chunks/_share-dialog-dependencies-ww3ylfIF.esm.js +0 -2
  220. package/dist/chunks/_share-dialog-dependencies-ww3ylfIF.esm.js.map +0 -1
  221. package/dist/chunks/checkbox-P2JYPqxl.esm.js +0 -17
  222. package/dist/chunks/checkbox-P2JYPqxl.esm.js.map +0 -1
  223. package/dist/chunks/index-Gf_Ee-cU.esm.js +0 -2
  224. package/dist/chunks/index-Gf_Ee-cU.esm.js.map +0 -1
  225. package/dist/chunks/index-Mt-ELD4q.esm.js +0 -2
  226. package/dist/chunks/index-Mt-ELD4q.esm.js.map +0 -1
  227. package/dist/chunks/index-X9fTuRmg.esm.js +0 -2
  228. package/dist/chunks/index-X9fTuRmg.esm.js.map +0 -1
  229. package/dist/chunks/index-ixzz4bX7.esm.js +0 -2
  230. package/dist/chunks/index-ixzz4bX7.esm.js.map +0 -1
  231. package/dist/chunks/index-q7eo0lf1.esm.js +0 -2
  232. package/dist/chunks/index-q7eo0lf1.esm.js.map +0 -1
  233. package/dist/chunks/index-uKlidExq.esm.js +0 -2
  234. package/dist/chunks/index-uKlidExq.esm.js.map +0 -1
  235. package/dist/chunks/index-yeW2w5bb.esm.d.ts +0 -13
  236. package/dist/chunks/loading-template-mLjOGXMj.esm.js +0 -2
  237. package/dist/chunks/localize-IRs8JglT.esm.js +0 -29
  238. package/dist/chunks/localize-IRs8JglT.esm.js.map +0 -1
  239. package/dist/chunks/localize-SsJbTmMj.esm.js +0 -29
  240. package/dist/chunks/localize-SsJbTmMj.esm.js.map +0 -1
  241. package/dist/chunks/order-page-4Tj7yLdv.esm.js +0 -2
  242. package/dist/chunks/order-page-4Tj7yLdv.esm.js.map +0 -1
  243. package/dist/chunks/order-page-9qKR3-ys.esm.js +0 -2
  244. package/dist/chunks/order-page-9qKR3-ys.esm.js.map +0 -1
  245. package/dist/chunks/promo-pill-label-3Xtr5ALT.esm.js +0 -14
  246. package/dist/chunks/promo-pill-label-3Xtr5ALT.esm.js.map +0 -1
  247. package/dist/chunks/share-button-CqTd80g8.esm.js +0 -2
  248. package/dist/chunks/share-button-CqTd80g8.esm.js.map +0 -1
  249. package/dist/chunks/update-cart-Djv-AjNu.esm.js +0 -2
  250. package/dist/chunks/update-cart-Djv-AjNu.esm.js.map +0 -1
  251. package/dist/chunks/update-cart-G7FRM8DW.esm.js +0 -2
  252. package/dist/chunks/update-cart-G7FRM8DW.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-management.js","sources":["../../src/components/subscription-management/strings.ts","../../src/components/subscription-management/index.ts"],"sourcesContent":["export const strings = {\n en: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n fr: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n de: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n es: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n it: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n pl: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n};\n","import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES, WIDGET_NAMES } from \"../../api-sdk/constants\";\nimport { TCart } from \"../../shared/cart-contents\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { postFindOrCreateSubscription, postChainEligibleNonprofitsForCart, getImpact } from \"../../api-sdk/v3/routes\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { BeamNonprofitSelectEvent } from \"../../utils/events\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport \"../select-subscription-nonprofit\";\nimport \"../subscription-impact\";\nimport \"../beam-partner-logos\";\nimport \"../../shared/components/progress-bar\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { partnerLogosConfigDefaults } from \"../beam-partner-logos\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { TNumericId } from \"../../shared/types\";\nimport { cssCardGrid } from \"../../shared/fragments/css-card-grid\";\nimport { strings } from \"./strings\";\n\ninterface RequiredDataPropsWithEmail {\n email: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ninterface RequiredDataPropsWithPartnerUserId {\n partnerUserId: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ntype TRequiredDataProps = RequiredDataPropsWithEmail | RequiredDataPropsWithPartnerUserId;\nexport type TIAPIV3PersonalImpact = Awaited<ReturnType<typeof import(\"../../api-sdk/v3/routes\").getImpact>>[\"personal\"];\nexport type TIAPIV3EligibleNonprofits = Awaited<\n ReturnType<typeof import(\"../../api-sdk/v3/routes\").getChainNonprofits>\n>[\"nonprofits\"];\nexport type TIAPIV3EligibleNonprofitConfig = Awaited<\n ReturnType<typeof import(\"../../api-sdk/v3/routes\").getChainNonprofits>\n>[\"config\"];\n\nconst INITIAL_TILE_COUNT = 3;\nconst MIN_PREVIOUS_IMPACT = 0;\nconst MIN_PROGRESS_THRESHOLD = 1;\nconst MAX_PROGRESS_THRESHOLD = 98;\n\nexport class BeamSubscriptionManagement extends LitElement {\n static tagName = \"beam-subscription-management\";\n\n @property({ type: String })\n public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String })\n public apiKey!: TRequiredDataProps[\"apiKey\"];\n\n @property({ type: String })\n public subscriptionId!: TRequiredDataProps[\"subscriptionId\"];\n\n @property({ type: Number, reflect: true })\n public storeId?: number; // Either storeId or postalCode, countryCode must be provided\n\n @property({ type: String })\n public email?: RequiredDataPropsWithEmail[\"email\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public partnerUserId?: RequiredDataPropsWithPartnerUserId[\"partnerUserId\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public postalCode?: string;\n\n @property({ type: String })\n public countryCode?: string;\n\n @property({ type: Number, reflect: true })\n public selectedNonprofitId?: TNumericId;\n\n @property({ type: String })\n public lang: LANGUAGES = \"en\";\n\n @property({ type: Object })\n public cart?: TCart;\n\n @property({ type: Boolean })\n public debug = false;\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n @state() private activeWidget: \"select-subscription-nonprofit\" | \"subscription-impact\" | null = null; // Based on /findSubscriptionByRemoteId\n @state() private nonprofitId: number | null = null; // From /findSubscriptionByRemoteId response\n @state() private beamUserId: string | null = null; // From findSubscriptionByRemoteId\n @state() private eligibleNonprofits: TIAPIV3EligibleNonprofits = [];\n @state() private showAllTiles = false;\n @state() private isMobile = window.innerWidth < 720;\n @state() private dropdownVisible = false;\n @state() private emojis = [\"👏\", \"💪\", \"🙌\", \"✨\", \"🥇\"];\n\n private subscriptionDataController = new AsyncController<typeof this.fetchSubscription>(this, this.fetchSubscription);\n private eligibleNonprofitsDataController = new AsyncController<typeof this.fetchEligibleNonprofits>(\n this,\n this.fetchEligibleNonprofits\n );\n private personalImpactDataController = new AsyncController<typeof this.fetchImpact>(this, this.fetchImpact);\n\n async firstUpdated() {\n if (!this.email && !this.partnerUserId) {\n throw new MissingConfig(\n [\"email\", \"partnerUserId\"],\n \"One of the following properties needs to be specified: email, partnerUserId \"\n );\n }\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n await this.loadWidget();\n }\n\n async loadWidget() {\n // In parallel:\n // (1). Fetch eligible nonprofits [storeId and chainName]\n // (2). Fetch subscription [userId and nonprofitId]\n await Promise.all([this.fetchEligibleNonprofits(), this.fetchSubscription()]);\n await this.fetchImpact();\n this.activeWidget = this.nonprofitId ? \"subscription-impact\" : \"select-subscription-nonprofit\";\n }\n\n async fetchEligibleNonprofits() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const eligibleNonprofitResult = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n requestBody: {\n storeId: this.storeId || undefined,\n postalCode: this.postalCode || undefined,\n countryCode: this.countryCode || undefined,\n widgetName: WIDGET_NAMES.subscription_management,\n version: \"1.0.0\",\n },\n });\n this.storeId = eligibleNonprofitResult.store.id;\n this.eligibleNonprofits = eligibleNonprofitResult.nonprofits;\n this.eligibleNonprofitsDataController.data = eligibleNonprofitResult;\n return eligibleNonprofitResult;\n }\n\n async fetchSubscription() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const subscriptionResult = await postFindOrCreateSubscription({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n requestBody: {\n remoteSubscriptionId: this.subscriptionId,\n email: this.email,\n partnerUserId: this.partnerUserId,\n },\n });\n\n this.beamUserId = subscriptionResult.beamUserId; // Returned in response regardless of subscription redemption\n this.nonprofitId = subscriptionResult.nonprofit?.id || null;\n return subscriptionResult;\n }\n\n async fetchImpact() {\n enforceConfig<TRequiredDataProps>([\"apiKey\"], this);\n\n const impactResult = await getImpact({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n beamUserId: this.beamUserId ? this.beamUserId : undefined,\n widgetName: \"subscription-management\",\n version: \"1.0.0\",\n lang: this.configLang,\n },\n });\n this.personalImpactDataController.data = impactResult;\n return impactResult;\n }\n\n handleSwapNonprofitButtonClick() {\n this.activeWidget = \"select-subscription-nonprofit\";\n }\n\n handleBackToSubscriptionImpactButtonClick() {\n this.activeWidget = \"subscription-impact\";\n }\n\n handleSupportAgainButtonClick(nonprofitId: TNumericId, nonprofitName: string) {\n this.activeWidget = \"select-subscription-nonprofit\";\n this.selectedNonprofitId = nonprofitId;\n\n const event = new BeamNonprofitSelectEvent({\n selectedNonprofitId: nonprofitId,\n nonprofitName: nonprofitName,\n });\n this.dispatchEvent(event);\n }\n\n handleNonprofitSelect(event: Event) {\n if (!(event instanceof BeamNonprofitSelectEvent)) return; // TypeScript guard\n const { selectedNonprofitId } = event.detail;\n this.nonprofitId = selectedNonprofitId ?? null;\n this.activeWidget = \"subscription-impact\";\n }\n\n isNonprofitEligible(nonprofitId: TNumericId) {\n return this.eligibleNonprofits.some((np: TIAPIV3EligibleNonprofits[0]) => np.nonprofit.id === nonprofitId);\n }\n\n shouldDisplayProgressBar(progressValue: number) {\n return progressValue > MIN_PROGRESS_THRESHOLD && progressValue < MAX_PROGRESS_THRESHOLD;\n }\n\n public get cssVariables() {\n const defaults = {\n ...partnerLogosConfigDefaults,\n ...progressBarConfigDefaults,\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-borderColor\": \"#d5d5d5\",\n \"--beam-SubscriptionManagement-widgetContainer-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-widgetContainer-padding\": \"8px 20px\",\n \"--beam-SubscriptionManagement-widgetContainer-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-maxWidth\": \"820px\",\n \"--beam-SubscriptionManagement-logo-align-desktop\": \"left\",\n \"--beam-SubscriptionManagement-logo-align-mobile\": \"center\",\n \"--beam-SubscriptionManagement-previousImpact-cardStyle\": \"'selected_icon'\",\n \"--beam-SubscriptionManagement-header-padding\": \"10px 20px 10px 0px\",\n \"--beam-SubscriptionManagement-header-borderRadius\": \"0px\",\n \"--beam-SubscriptionManagement-header-backgroundColor\": \"#fff\",\n \"--beam-SubscriptionManagement-header-meatballsMenu-fontSize\": \"24px\",\n \"--beam-SubscriptionManagement-header-meatballsMenu-color\": \"24px\",\n \"--beam-SubscriptionManagement-lineBreak-color\": \"#ddd\",\n \"--beam-SubscriptionManagement-lineBreak-width\": \"1px\",\n \"--beam-SubscriptionManagement-lineBreak-margin\": \"10px 0 20px 0\",\n \"--beam-SubscriptionManagement-tile-marginBottom\": \"20px\",\n \"--beam-SubscriptionManagement-tile-border-width\": \"0px\",\n \"--beam-SubscriptionManagement-tile-border-color\": \"#ddd\",\n \"--beam-SubscriptionManagement-tile-padding\": \"12.5px\",\n \"--beam-SubscriptionManagement-tile-borderRadius\": \"8px\",\n \"--beam-SubscriptionManagement-tile-background\": \"#f8fbfb\",\n \"--beam-SubscriptionManagement-tileContent-gap\": \" 15px\",\n \"--beam-SubscriptionManagement-tileContent-padding\": \"5px 0px\",\n \"--beam-SubscriptionManagement-tile-icon-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-tile-icon-height\": \"28px\",\n \"--beam-SubscriptionManagement-tile-icon-background-borderRadius\": \"50%\",\n \"--beam-SubscriptionManagement-tile-icon-background-width\": \"50px\",\n \"--beam-SubscriptionManagement-tile-icon-background-height\": \"50px\",\n \"--beam-SubscriptionManagement-tile-icon-background-backgroundColor\": \"#0a323c\",\n \"--beam-SubscriptionManagement-tile-icon-background-padding\": \"10px\",\n \"--beam-SubscriptionManagement-blockTileDescription-gap\": \"5px\",\n \"--beam-SubscriptionManagement-blockTileDescription-padding\": \"0px\",\n \"--beam-SubscriptionManagement-blockTileDescription-lineHeight\": \"130%\",\n \"--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop\": \"60%\",\n \"--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile\": \"100%\",\n \"--beam-SubscriptionManagement-subWidgetContainer-padding\": \"0px 0px 10px\",\n \"--beam-SubscriptionManagement-previousImpactContainer-padding-desktop\": \"10px 24px 10px 0px\",\n \"--beam-SubscriptionManagement-previousImpactContainer-padding-mobile\": \"0px\",\n \"--beam-SubscriptionManagement-dropDown-padding\": \"15px 8px\",\n \"--beam-SubscriptionManagement-dropDown-borderRadius\": \"8px\",\n \"--beam-SubscriptionManagement-dropDown-backgroundColor\": \"#f8fbfb\",\n \"--beam-SubscriptionManagement-dropDown-boxShadow\": \"0px 4px 28px 0px rgba(0, 0, 0, 0.04)\",\n \"--beam-SubscriptionManagement-dropDown-width\": \"128px\",\n \"--beam-SubscriptionManagement-dropDown-hover-backgroundColor\": \"#E1F1EE\",\n \"--beam-SubscriptionManagement-dropDownOptions-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-dropDownOptions\", {\n fontSize: \"12px\",\n fontWeight: \"400\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom\": \"15px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-yourPreviousImpactTitle\", {\n fontSize: \"18px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-title-letterSpacing\": \"0.36px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-title\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"uppercase\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-description\", {\n fontSize: \"14px\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-via\", {\n fontSize: \"14px\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n \"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-nonprofitLink\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-supportAgainButton\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft\": \"8px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-progressBarLabel\", {\n fontSize: \"10px\",\n fontWeight: \"bold\",\n fontStyle: \"normal\",\n color: \"#878a92\",\n }),\n \"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight\": \"16px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-fundedAmount\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n fontStyle: \"italic\",\n color: \"#0a323c\",\n }),\n };\n\n const remoteConfig = this.eligibleNonprofitsDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n css`\n :host {\n display: block;\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n word-break: normal;\n }\n .drop-down-options {\n text-decoration: var(--beam-SubscriptionManagement-dropDownOptions-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-dropDownOptions\")};\n }\n .widget-container {\n background-color: var(--beam-SubscriptionManagement-widgetContainer-backgroundColor);\n border: 1px solid var(--beam-SubscriptionManagement-widgetContainer-borderColor);\n border-radius: var(--beam-SubscriptionManagement-widgetContainer-borderRadius);\n padding: var(--beam-SubscriptionManagement-widgetContainer-padding);\n max-width: var(--beam-SubscriptionManagement-widgetContainer-maxWidth);\n }\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n padding: var(--beam-SubscriptionManagement-header-padding);\n border-radius: var(--beam-SubscriptionManagement-header-borderRadius);\n background-color: var(--beam-SubscriptionManagement-header-backgroundColor);\n }\n .header-content {\n display: flex;\n justify-content: space-between;\n width: 100%;\n }\n .button {\n cursor: pointer;\n background: none;\n border: none;\n }\n .header .meatballsMenu {\n position: relative;\n cursor: pointer;\n }\n .header .meatballsMenu span {\n font-size: var(--beam-SubscriptionManagement-header-meatballsMenu-fontSize);\n color: var(--beam-SubscriptionManagement-header-meatballsMenu-color);\n }\n .dropdown-container {\n display: none;\n position: absolute;\n right: 0;\n z-index: 1;\n padding: var(--beam-SubscriptionManagement-dropDown-padding);\n border-radius: var(--beam-SubscriptionManagement-dropDown-borderRadius);\n background: var(--beam-SubscriptionManagement-dropDown-backgroundColor);\n box-shadow: var(--beam-SubscriptionManagement-dropDown-boxShadow);\n width: var(--beam-SubscriptionManagement-dropDown-width);\n }\n .dropdown-container.visible {\n display: block;\n }\n .dropdown-container:hover {\n background-color: var(--beam-SubscriptionManagement-dropDown-hover-backgroundColor);\n }\n .line-break {\n border-top: var(--beam-SubscriptionManagement-lineBreak-width) solid\n var(--beam-SubscriptionManagement-lineBreak-color);\n margin: var(--beam-SubscriptionManagement-lineBreak-margin);\n }\n .tile {\n border: var(--beam-SubscriptionManagement-tile-border-width) solid\n var(--beam-SubscriptionManagement-tile-border-color);\n padding: var(--beam-SubscriptionManagement-tile-padding);\n border-radius: var(--beam-SubscriptionManagement-tile-borderRadius);\n background: var(--beam-SubscriptionManagement-tile-background);\n }\n .tile-title {\n letter-spacing: var(--beam-SubscriptionManagement-tile-title-letterSpacing);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-title\")};\n }\n .tile-content {\n display: flex;\n flex-direction: row;\n gap: var(--beam-SubscriptionManagement-tileContent-gap);\n padding: var(--beam-SubscriptionManagement-tileContent-padding);\n }\n .tile-description-block-container {\n flex: 1 1 67%;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: var(--beam-SubscriptionManagement-blockTileDescription-gap);\n padding: var(--beam-SubscriptionManagement-blockTileDescription-padding);\n line-height: var(--beam-SubscriptionManagement-blockTileDescription-lineHeight);\n }\n .sub-widget-container {\n padding: var(--beam-SubscriptionManagement-subWidgetContainer-padding);\n }\n .previous-impact-title {\n margin-bottom: var(--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom);\n ${useCustomText(\"--beam-SubscriptionManagement-yourPreviousImpactTitle\")};\n }\n .tile-description {\n ${useCustomText(\"--beam-SubscriptionManagement-tile-description\")};\n }\n .via {\n ${useCustomText(\"--beam-SubscriptionManagement-tile-via\")};\n }\n .center-align-logo {\n margin-left: auto;\n margin-right: auto;\n }\n .left-align-logo {\n margin-left: 0;\n margin-right: auto;\n }\n .previous-impact-link-container {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .previous-impact-link {\n text-decoration-line: var(--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton\")};\n }\n .icon-background {\n width: var(--beam-SubscriptionManagement-tile-icon-background-width);\n height: var(--beam-SubscriptionManagement-tile-icon-background-height);\n border-radius: var(--beam-SubscriptionManagement-tile-icon-background-borderRadius);\n padding: var(--beam-SubscriptionManagement-tile-icon-background-padding);\n overflow: hidden;\n background: var(--beam-SubscriptionManagement-tile-icon-background-backgroundColor);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .icon {\n display: block;\n margin: auto;\n border-radius: var(--beam-SubscriptionManagement-tile-icon-borderRadius);\n height: var(--beam-SubscriptionManagement-tile-icon-height);\n }\n .tile-progress-bar-container-desktop {\n display: flex;\n align-items: center;\n width: var(--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop);\n }\n .tile-progress-bar-container-mobile {\n display: flex;\n align-items: center;\n width: var(--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile);\n }\n .previous-impact-nonprofit-link {\n text-decoration-line: var(--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-nonprofitLink\")};\n }\n .details-funding-progress-label {\n white-space: nowrap;\n flex: 0 1;\n margin-left: var(--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-progressBarLabel\")};\n }\n .funded-times {\n line-height: var(--beam-SubscriptionManagement-tile-fundedAmount-lineHeight);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-fundedAmount\")};\n }\n .tile-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n .tile-support-again {\n text-decoration-line: var(--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-supportAgainButton\")};\n }\n `,\n cssCardGrid({\n gap: \"var(--beam-SubscriptionManagement-tile-marginBottom)\",\n itemMinWidth: \"250px\",\n columnCount: \"1\",\n }),\n ];\n\n private renderPreviousImpactTiles({\n personalImpact,\n cardStyle,\n eligibleNonprofitConfig,\n }: {\n personalImpact?: TIAPIV3PersonalImpact;\n cardStyle: string;\n eligibleNonprofitConfig?: TIAPIV3EligibleNonprofitConfig;\n }) {\n if (!personalImpact) {\n return html``;\n }\n if (!eligibleNonprofitConfig) {\n return html``;\n }\n\n const tilesToShow = this.showAllTiles ? personalImpact : personalImpact.slice(0, INITIAL_TILE_COUNT);\n let emojiIndex = 0;\n return html`\n ${tilesToShow\n .filter((previousImpact) => previousImpact.nonprofit.includeInPersonalImpact === true)\n .map((previousImpact) => {\n const {\n impact: { goalCompletionText, description, goalProgressPercentage, goalProgressText },\n nonprofit: { cause, causeIconSelectedUrl, causeIconUrl, website, name, id },\n } = previousImpact;\n\n const isEligibleToSupportAgain = this.nonprofitId !== id && this.isNonprofitEligible(id);\n const showProgressBar = isEligibleToSupportAgain && this.shouldDisplayProgressBar(goalProgressPercentage);\n const emoji = goalCompletionText ? `${this.emojis[emojiIndex]} ` : \"\";\n emojiIndex = (emojiIndex + 1) % this.emojis.length;\n\n return html`\n <div class=\"tile\">\n <div class=\"tile-header\">\n <div class=\"tile-title\">${localizeUserString(this.configLang, cause || \"\")}</div>\n ${isEligibleToSupportAgain\n ? html` <button\n class=\"tile-support-again button\"\n @click=\"${() => this.handleSupportAgainButtonClick(id, name)}\"\n >\n ${localizeUserString(\n this.configLang,\n eligibleNonprofitConfig?.web?.additionalStrings?.[\"supportAgainButton\"] || \"\"\n ) || strings[this.configLang].supportAgainButton()}\n </button>`\n : html``}\n </div>\n <div class=\"tile-content\">\n <div class=\"icon-background\">\n <img\n src=\"${cardStyle === \"'selected_icon'\" ? causeIconSelectedUrl : causeIconUrl}\"\n alt=\"${cause}\"\n class=\"icon\"\n />\n </div>\n <div class=\"tile-description-block-container\">\n <div class=\"tile-description-container\">\n <span class=\"tile-description\">${localizeUserString(this.configLang, description || \"\")}</span>\n <span class=\"via\"\n >${localizeUserString(\n this.configLang,\n eligibleNonprofitConfig?.web?.additionalStrings?.[\"via\"] || \"\"\n ) || strings[this.configLang].via()}</span\n >\n <a href=\"${website}\" target=\"_blank\" class=\"previous-impact-nonprofit-link\">\n ${localizeUserString(this.configLang, name || \"\")}\n </a>\n </div>\n ${showProgressBar\n ? html` <div\n class=\"${this.isMobile\n ? \"tile-progress-bar-container-mobile\"\n : \"tile-progress-bar-container-desktop\"}\"\n >\n <beam-progress-bar value=\"${goalProgressPercentage}\" style=\"flex: 1 0;\"></beam-progress-bar>\n <span class=\"details-funding-progress-label\">${goalProgressText}</span>\n </div>`\n : html``}\n <div class=\"funded-times\">\n ${emoji}${unsafeHTML(localizeUserString(this.configLang, goalCompletionText))}\n </div>\n </div>\n </div>\n </div>\n `;\n })}\n `;\n }\n\n render() {\n const { data, loading, error } = this.eligibleNonprofitsDataController;\n if (loading) {\n return _loading();\n }\n if (error || data == null) {\n return this.debug ? _errorMessage({ error: error || new Error(\"No data\") }) : \"\";\n }\n let content;\n const cardStyle = this.cssVariables[\"--beam-SubscriptionManagement-previousImpact-cardStyle\"];\n const logoAlignDesktop = this.cssVariables[\"--beam-SubscriptionManagement-logo-align-desktop\"];\n const logoAlignMobile = this.cssVariables[\"--beam-SubscriptionManagement-logo-align-mobile\"];\n const previousImpactCount = this.personalImpactDataController.data?.personal?.length ?? 0;\n if (\n this.subscriptionDataController.loading ||\n this.eligibleNonprofitsDataController.loading ||\n this.personalImpactDataController.loading\n ) {\n _loading();\n }\n\n if (\n (this.subscriptionDataController.error ||\n this.eligibleNonprofitsDataController.error ||\n this.personalImpactDataController.error) &&\n this.debug\n ) {\n if (this.subscriptionDataController.error !== null) {\n return _errorMessage({ error: this.subscriptionDataController.error });\n } else if (this.eligibleNonprofitsDataController.error !== null) {\n return _errorMessage({ error: this.eligibleNonprofitsDataController.error });\n } else if (this.personalImpactDataController.error !== null) {\n return _errorMessage({ error: this.personalImpactDataController.error });\n }\n } else {\n content = \"\";\n }\n\n if (this.activeWidget === \"select-subscription-nonprofit\") {\n content = html` <beam-select-subscription-nonprofit\n part=\"subscription-nonprofit\"\n storeId=\"${this.storeId}\"\n subscriptionId=\"${this.subscriptionId}\"\n nonprofitId=${this.nonprofitId}\n selectedNonprofitId=${this.selectedNonprofitId}\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n postalCode=\"${this.postalCode}\"\n countryCode=\"${this.countryCode}\"\n lang=\"${this.lang}\"\n ?debug=\"${this.debug}\"\n @beamnonprofitselect=\"${(event: Event) => this.handleNonprofitSelect(event)}\"\n ></beam-select-subscription-nonprofit>`;\n } else if (this.activeWidget === \"subscription-impact\") {\n content = html`\n <beam-subscription-impact\n part=\"subscription-impact\"\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n storeId=\"${this.storeId}\"\n beamUserId=\"${this.beamUserId}\"\n nonprofitId=\"${this.nonprofitId}\"\n lang=\"${this.lang}\"\n ?debug=\"${this.debug}\"\n ></beam-subscription-impact>\n `;\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div class=\"widget-container\">\n <div class=\"header\">\n <div class=\"header-content\">\n <div\n class=\"logo ${this.isMobile\n ? logoAlignMobile === \"center\"\n ? \"center-align-logo\"\n : \"left-align-logo\"\n : logoAlignDesktop === \"center\"\n ? \"center-align-logo\"\n : \"left-align-logo\"}\"\n >\n <beam-partner-logos\n partnerName=\"${this.eligibleNonprofitsDataController.data?.chain.name}\"\n partnerLogoUrl=\"${this.eligibleNonprofitsDataController.data?.chain.logoUrl}\"\n ></beam-partner-logos>\n </div>\n ${this.nonprofitId\n ? html` <div class=\"meatballsMenu\" @click=\"${() => (this.dropdownVisible = !this.dropdownVisible)}\">\n <span>&#8230;</span>\n <div class=\"dropdown-container ${this.dropdownVisible ? \"visible\" : \"\"}\">\n ${this.activeWidget === \"select-subscription-nonprofit\"\n ? html`<button\n @click=\"${this.handleBackToSubscriptionImpactButtonClick}\"\n class=\"drop-down-options button\"\n >\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"previousNonprofitButtonText\"] || \"\"\n ) || strings[this.configLang].previousNonprofitButton()}\n </button>`\n : this.activeWidget === \"subscription-impact\"\n ? html`<button @click=\"${this.handleSwapNonprofitButtonClick}\" class=\"drop-down-options button\">\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"changeNonprofitButtonText\"] || \"\"\n ) || strings[this.configLang].changeNonprofitButton()}\n </button>`\n : \"\"}\n </div>\n </div>`\n : html``}\n </div>\n </div>\n <div class=\"sub-widget-container\">${content}</div>\n ${previousImpactCount > MIN_PREVIOUS_IMPACT\n ? html` <div class=\"line-break\"></div>\n\n <div\n class=\"previous-impact-container ${this.isMobile\n ? \"--beam-SubscriptionManagement-previousImpactContainer-padding-mobile\"\n : \"--beam-SubscriptionManagement-previousImpactContainer-padding-desktop\"}\"\n >\n <h2 class=\"previous-impact-title\">\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"previousImpactHeader\"] || \"\"\n ) || strings[this.configLang].previousImpactHeader()}\n </h2>\n <div class=\"cardGrid\">\n ${this.renderPreviousImpactTiles({\n personalImpact: this.personalImpactDataController.data?.personal,\n cardStyle,\n eligibleNonprofitConfig: this.eligibleNonprofitsDataController.data?.config,\n })}\n </div>\n ${previousImpactCount > INITIAL_TILE_COUNT\n ? html`\n <div class=\"previous-impact-link-container\">\n <button\n @click=\"${() => (this.showAllTiles = !this.showAllTiles)}\"\n class=\"previous-impact-link button\"\n >\n ${this.showAllTiles\n ? localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"showLessButton\"] || \"\"\n ) || strings[this.configLang].showLessButton()\n : localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"showAllButton\"] || \"\"\n ) || strings[this.configLang].showAllButton()}\n </button>\n </div>\n `\n : html``}\n </div>`\n : html``}\n </div>\n `;\n }\n}\n\ndefineCustomElement(BeamSubscriptionManagement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-management\": BeamSubscriptionManagement;\n }\n}\n"],"names":["strings","INITIAL_TILE_COUNT","MIN_PREVIOUS_IMPACT","MIN_PROGRESS_THRESHOLD","MAX_PROGRESS_THRESHOLD","BeamSubscriptionManagement","LitElement","DEFAULT_BASE_URL","AsyncController","SUPPORTED_LANGUAGES","MissingConfig","enforceConfig","eligibleNonprofitResult","postChainEligibleNonprofitsForCart","makeApiKeyHeader","WIDGET_NAMES","subscriptionResult","postFindOrCreateSubscription","impactResult","getImpact","nonprofitId","nonprofitName","event","BeamNonprofitSelectEvent","selectedNonprofitId","np","progressValue","defaults","partnerLogosConfigDefaults","progressBarConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","personalImpact","cardStyle","eligibleNonprofitConfig","html","tilesToShow","emojiIndex","previousImpact","goalCompletionText","description","goalProgressPercentage","goalProgressText","cause","causeIconSelectedUrl","causeIconUrl","website","name","id","isEligibleToSupportAgain","showProgressBar","emoji","localizeUserString","unsafeHTML","data","loading","error","_loading","_errorMessage","content","logoAlignDesktop","logoAlignMobile","previousImpactCount","cssReset","css","useCustomText","cssCardGrid","__decorateClass","property","state","defineCustomElement"],"mappings":"osCAAO,MAAMA,EAAU,CACrB,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAA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KA7CUlE,EA6CM,UAAA,aAAA,CAAA,EACAgE,EAAA,CAAhBE,KA9CUlE,EA8CM,UAAA,qBAAA,CAAA,EACAgE,EAAA,CAAhBE,KA/CUlE,EA+CM,UAAA,eAAA,CAAA,EACAgE,EAAA,CAAhBE,EAAAA,GAhDUlE,EAgDM,UAAA,WAAA,CAAA,EACAgE,EAAA,CAAhBE,KAjDUlE,EAiDM,UAAA,kBAAA,CAAA,EACAgE,EAAA,CAAhBE,EAAAA,GAlDUlE,EAkDM,UAAA,SAAA,CAAA,EAksBnBmE,EAAoBnE,CAA0B"}
1
+ {"version":3,"file":"subscription-management.js","sources":["../../src/components/subscription-management/strings.ts","../../src/components/subscription-management/index.ts"],"sourcesContent":["export const strings = {\n en: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n fr: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n de: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n es: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n it: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n pl: {\n changeNonprofitButton: () => `Change Nonprofit`,\n previousImpactHeader: () => `Your Previous Impact`,\n previousNonprofitButton: () => `Back to Previous Nonprofit`,\n supportAgainButton: () => `Support Again`,\n via: () => `via`,\n showAllButton: () => `Show All`,\n showLessButton: () => `Show Less`,\n },\n};\n","import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES, WIDGET_NAMES } from \"../../api-sdk/constants\";\nimport { TCart } from \"../../shared/cart-contents\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { postFindOrCreateSubscription, postChainEligibleNonprofitsForCart, getImpact } from \"../../api-sdk/v3/routes\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { BeamNonprofitSelectEvent } from \"../../utils/events\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport \"../select-subscription-nonprofit\";\nimport \"../subscription-impact\";\nimport \"../beam-partner-logos\";\nimport \"../../shared/components/progress-bar\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { partnerLogosConfigDefaults } from \"../beam-partner-logos\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { TNumericId } from \"../../shared/types\";\nimport { cssCardGrid } from \"../../shared/fragments/css-card-grid\";\nimport { strings } from \"./strings\";\n\ninterface RequiredDataPropsWithEmail {\n email: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ninterface RequiredDataPropsWithPartnerUserId {\n partnerUserId: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ntype TRequiredDataProps = RequiredDataPropsWithEmail | RequiredDataPropsWithPartnerUserId;\nexport type TIAPIV3PersonalImpact = Awaited<ReturnType<typeof import(\"../../api-sdk/v3/routes\").getImpact>>[\"personal\"];\nexport type TIAPIV3EligibleNonprofits = Awaited<\n ReturnType<typeof import(\"../../api-sdk/v3/routes\").getChainNonprofits>\n>[\"nonprofits\"];\nexport type TIAPIV3EligibleNonprofitConfig = Awaited<\n ReturnType<typeof import(\"../../api-sdk/v3/routes\").getChainNonprofits>\n>[\"config\"];\n\nconst INITIAL_TILE_COUNT = 3;\nconst MIN_PREVIOUS_IMPACT = 0;\nconst MIN_PROGRESS_THRESHOLD = 1;\nconst MAX_PROGRESS_THRESHOLD = 98;\n\nexport class BeamSubscriptionManagement extends LitElement {\n static tagName = \"beam-subscription-management\";\n\n @property({ type: String })\n public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String })\n public apiKey!: TRequiredDataProps[\"apiKey\"];\n\n @property({ type: String })\n public subscriptionId!: TRequiredDataProps[\"subscriptionId\"];\n\n @property({ type: Number, reflect: true })\n public storeId?: number; // Either storeId or postalCode, countryCode must be provided\n\n @property({ type: String })\n public email?: RequiredDataPropsWithEmail[\"email\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public partnerUserId?: RequiredDataPropsWithPartnerUserId[\"partnerUserId\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public postalCode?: string;\n\n @property({ type: String })\n public countryCode?: string;\n\n @property({ type: Number, reflect: true })\n public selectedNonprofitId?: TNumericId;\n\n @property({ type: String })\n public lang: LANGUAGES = \"en\";\n\n @property({ type: Object })\n public cart?: TCart;\n\n @property({ type: Boolean })\n public debug = false;\n\n @property({ type: Boolean })\n public draftConfig = false;\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n @state() private activeWidget: \"select-subscription-nonprofit\" | \"subscription-impact\" | null = null; // Based on /findSubscriptionByRemoteId\n @state() private nonprofitId: number | null = null; // From /findSubscriptionByRemoteId response\n @state() private beamUserId: string | null = null; // From findSubscriptionByRemoteId\n @state() private eligibleNonprofits: TIAPIV3EligibleNonprofits = [];\n @state() private showAllTiles = false;\n @state() private isMobile = window.innerWidth < 720;\n @state() private dropdownVisible = false;\n @state() private emojis = [\"👏\", \"💪\", \"🙌\", \"✨\", \"🥇\"];\n\n private subscriptionDataController = new AsyncController<typeof this.fetchSubscription>(this, this.fetchSubscription);\n private eligibleNonprofitsDataController = new AsyncController<typeof this.fetchEligibleNonprofits>(\n this,\n this.fetchEligibleNonprofits\n );\n private personalImpactDataController = new AsyncController<typeof this.fetchImpact>(this, this.fetchImpact);\n\n async firstUpdated() {\n if (!this.email && !this.partnerUserId) {\n throw new MissingConfig(\n [\"email\", \"partnerUserId\"],\n \"One of the following properties needs to be specified: email, partnerUserId \"\n );\n }\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n await this.loadWidget();\n }\n\n async loadWidget() {\n // In parallel:\n // (1). Fetch eligible nonprofits [storeId and chainName]\n // (2). Fetch subscription [userId and nonprofitId]\n await Promise.all([this.fetchEligibleNonprofits(), this.fetchSubscription()]);\n await this.fetchImpact();\n this.activeWidget = this.nonprofitId ? \"subscription-impact\" : \"select-subscription-nonprofit\";\n }\n\n async fetchEligibleNonprofits() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const eligibleNonprofitResult = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n requestBody: {\n storeId: this.storeId || undefined,\n postalCode: this.postalCode || undefined,\n countryCode: this.countryCode || undefined,\n widgetName: WIDGET_NAMES.subscription_management,\n version: \"1.0.0\",\n },\n });\n this.storeId = eligibleNonprofitResult.store.id;\n this.eligibleNonprofits = eligibleNonprofitResult.nonprofits;\n this.eligibleNonprofitsDataController.data = eligibleNonprofitResult;\n return eligibleNonprofitResult;\n }\n\n async fetchSubscription() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const subscriptionResult = await postFindOrCreateSubscription({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n requestBody: {\n remoteSubscriptionId: this.subscriptionId,\n email: this.email,\n partnerUserId: this.partnerUserId,\n },\n });\n\n this.beamUserId = subscriptionResult.beamUserId; // Returned in response regardless of subscription redemption\n this.nonprofitId = subscriptionResult.nonprofit?.id || null;\n return subscriptionResult;\n }\n\n async fetchImpact() {\n enforceConfig<TRequiredDataProps>([\"apiKey\"], this);\n\n const impactResult = await getImpact({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n beamUserId: this.beamUserId ? this.beamUserId : undefined,\n widgetName: \"subscription-management\",\n version: \"1.0.0\",\n lang: this.configLang,\n },\n });\n this.personalImpactDataController.data = impactResult;\n return impactResult;\n }\n\n handleSwapNonprofitButtonClick() {\n this.activeWidget = \"select-subscription-nonprofit\";\n }\n\n handleBackToSubscriptionImpactButtonClick() {\n this.activeWidget = \"subscription-impact\";\n }\n\n handleSupportAgainButtonClick(nonprofitId: TNumericId, nonprofitName: string) {\n this.activeWidget = \"select-subscription-nonprofit\";\n this.selectedNonprofitId = nonprofitId;\n\n const event = new BeamNonprofitSelectEvent({\n selectedNonprofitId: nonprofitId,\n nonprofitName: nonprofitName,\n });\n this.dispatchEvent(event);\n }\n\n handleNonprofitSelect(event: Event) {\n if (!(event instanceof BeamNonprofitSelectEvent)) return; // TypeScript guard\n const { selectedNonprofitId } = event.detail;\n this.nonprofitId = selectedNonprofitId ?? null;\n this.activeWidget = \"subscription-impact\";\n }\n\n isNonprofitEligible(nonprofitId: TNumericId) {\n return this.eligibleNonprofits.some((np: TIAPIV3EligibleNonprofits[0]) => np.nonprofit.id === nonprofitId);\n }\n\n shouldDisplayProgressBar(progressValue: number) {\n return progressValue > MIN_PROGRESS_THRESHOLD && progressValue < MAX_PROGRESS_THRESHOLD;\n }\n\n public get cssVariables() {\n const defaults = {\n ...partnerLogosConfigDefaults,\n ...progressBarConfigDefaults,\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-borderColor\": \"#d5d5d5\",\n \"--beam-SubscriptionManagement-widgetContainer-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-widgetContainer-padding\": \"8px 20px\",\n \"--beam-SubscriptionManagement-widgetContainer-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-maxWidth\": \"820px\",\n \"--beam-SubscriptionManagement-logo-align-desktop\": \"left\",\n \"--beam-SubscriptionManagement-logo-align-mobile\": \"center\",\n \"--beam-SubscriptionManagement-previousImpact-cardStyle\": \"'selected_icon'\",\n \"--beam-SubscriptionManagement-header-padding\": \"10px 20px 10px 0px\",\n \"--beam-SubscriptionManagement-header-borderRadius\": \"0px\",\n \"--beam-SubscriptionManagement-header-backgroundColor\": \"#fff\",\n \"--beam-SubscriptionManagement-header-meatballsMenu-fontSize\": \"24px\",\n \"--beam-SubscriptionManagement-header-meatballsMenu-color\": \"24px\",\n \"--beam-SubscriptionManagement-lineBreak-color\": \"#ddd\",\n \"--beam-SubscriptionManagement-lineBreak-width\": \"1px\",\n \"--beam-SubscriptionManagement-lineBreak-margin\": \"10px 0 20px 0\",\n \"--beam-SubscriptionManagement-tile-marginBottom\": \"20px\",\n \"--beam-SubscriptionManagement-tile-border-width\": \"0px\",\n \"--beam-SubscriptionManagement-tile-border-color\": \"#ddd\",\n \"--beam-SubscriptionManagement-tile-padding\": \"12.5px\",\n \"--beam-SubscriptionManagement-tile-borderRadius\": \"8px\",\n \"--beam-SubscriptionManagement-tile-background\": \"#f8fbfb\",\n \"--beam-SubscriptionManagement-tileContent-gap\": \" 15px\",\n \"--beam-SubscriptionManagement-tileContent-padding\": \"5px 0px\",\n \"--beam-SubscriptionManagement-tile-icon-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-tile-icon-height\": \"28px\",\n \"--beam-SubscriptionManagement-tile-icon-background-borderRadius\": \"50%\",\n \"--beam-SubscriptionManagement-tile-icon-background-width\": \"50px\",\n \"--beam-SubscriptionManagement-tile-icon-background-height\": \"50px\",\n \"--beam-SubscriptionManagement-tile-icon-background-backgroundColor\": \"#0a323c\",\n \"--beam-SubscriptionManagement-tile-icon-background-padding\": \"10px\",\n \"--beam-SubscriptionManagement-blockTileDescription-gap\": \"5px\",\n \"--beam-SubscriptionManagement-blockTileDescription-padding\": \"0px\",\n \"--beam-SubscriptionManagement-blockTileDescription-lineHeight\": \"130%\",\n \"--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop\": \"60%\",\n \"--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile\": \"100%\",\n \"--beam-SubscriptionManagement-subWidgetContainer-padding\": \"0px 0px 10px\",\n \"--beam-SubscriptionManagement-previousImpactContainer-padding-desktop\": \"10px 24px 10px 0px\",\n \"--beam-SubscriptionManagement-previousImpactContainer-padding-mobile\": \"0px\",\n \"--beam-SubscriptionManagement-dropDown-padding\": \"15px 8px\",\n \"--beam-SubscriptionManagement-dropDown-borderRadius\": \"8px\",\n \"--beam-SubscriptionManagement-dropDown-backgroundColor\": \"#f8fbfb\",\n \"--beam-SubscriptionManagement-dropDown-boxShadow\": \"0px 4px 28px 0px rgba(0, 0, 0, 0.04)\",\n \"--beam-SubscriptionManagement-dropDown-width\": \"128px\",\n \"--beam-SubscriptionManagement-dropDown-hover-backgroundColor\": \"#E1F1EE\",\n \"--beam-SubscriptionManagement-dropDownOptions-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-dropDownOptions\", {\n fontSize: \"12px\",\n fontWeight: \"400\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom\": \"15px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-yourPreviousImpactTitle\", {\n fontSize: \"18px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-title-letterSpacing\": \"0.36px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-title\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"uppercase\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-description\", {\n fontSize: \"14px\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-via\", {\n fontSize: \"14px\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n \"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-nonprofitLink\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration\": \"underline\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-supportAgainButton\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n \"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft\": \"8px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-progressBarLabel\", {\n fontSize: \"10px\",\n fontWeight: \"bold\",\n fontStyle: \"normal\",\n color: \"#878a92\",\n }),\n \"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight\": \"16px\",\n ...defineCustomText(\"--beam-SubscriptionManagement-tile-fundedAmount\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"120%\",\n fontStyle: \"italic\",\n color: \"#0a323c\",\n }),\n };\n\n const remoteConfig = this.eligibleNonprofitsDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n css`\n :host {\n display: block;\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n word-break: normal;\n }\n .drop-down-options {\n text-decoration: var(--beam-SubscriptionManagement-dropDownOptions-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-dropDownOptions\")};\n }\n .widget-container {\n background-color: var(--beam-SubscriptionManagement-widgetContainer-backgroundColor);\n border: 1px solid var(--beam-SubscriptionManagement-widgetContainer-borderColor);\n border-radius: var(--beam-SubscriptionManagement-widgetContainer-borderRadius);\n padding: var(--beam-SubscriptionManagement-widgetContainer-padding);\n max-width: var(--beam-SubscriptionManagement-widgetContainer-maxWidth);\n }\n .header {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n padding: var(--beam-SubscriptionManagement-header-padding);\n border-radius: var(--beam-SubscriptionManagement-header-borderRadius);\n background-color: var(--beam-SubscriptionManagement-header-backgroundColor);\n }\n .header-content {\n display: flex;\n justify-content: space-between;\n width: 100%;\n }\n .button {\n cursor: pointer;\n background: none;\n border: none;\n }\n .header .meatballsMenu {\n position: relative;\n cursor: pointer;\n }\n .header .meatballsMenu span {\n font-size: var(--beam-SubscriptionManagement-header-meatballsMenu-fontSize);\n color: var(--beam-SubscriptionManagement-header-meatballsMenu-color);\n }\n .dropdown-container {\n display: none;\n position: absolute;\n right: 0;\n z-index: 1;\n padding: var(--beam-SubscriptionManagement-dropDown-padding);\n border-radius: var(--beam-SubscriptionManagement-dropDown-borderRadius);\n background: var(--beam-SubscriptionManagement-dropDown-backgroundColor);\n box-shadow: var(--beam-SubscriptionManagement-dropDown-boxShadow);\n width: var(--beam-SubscriptionManagement-dropDown-width);\n }\n .dropdown-container.visible {\n display: block;\n }\n .dropdown-container:hover {\n background-color: var(--beam-SubscriptionManagement-dropDown-hover-backgroundColor);\n }\n .line-break {\n border-top: var(--beam-SubscriptionManagement-lineBreak-width) solid\n var(--beam-SubscriptionManagement-lineBreak-color);\n margin: var(--beam-SubscriptionManagement-lineBreak-margin);\n }\n .tile {\n border: var(--beam-SubscriptionManagement-tile-border-width) solid\n var(--beam-SubscriptionManagement-tile-border-color);\n padding: var(--beam-SubscriptionManagement-tile-padding);\n border-radius: var(--beam-SubscriptionManagement-tile-borderRadius);\n background: var(--beam-SubscriptionManagement-tile-background);\n }\n .tile-title {\n letter-spacing: var(--beam-SubscriptionManagement-tile-title-letterSpacing);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-title\")};\n }\n .tile-content {\n display: flex;\n flex-direction: row;\n gap: var(--beam-SubscriptionManagement-tileContent-gap);\n padding: var(--beam-SubscriptionManagement-tileContent-padding);\n }\n .tile-description-block-container {\n flex: 1 1 67%;\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: var(--beam-SubscriptionManagement-blockTileDescription-gap);\n padding: var(--beam-SubscriptionManagement-blockTileDescription-padding);\n line-height: var(--beam-SubscriptionManagement-blockTileDescription-lineHeight);\n }\n .sub-widget-container {\n padding: var(--beam-SubscriptionManagement-subWidgetContainer-padding);\n }\n .previous-impact-title {\n margin-bottom: var(--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom);\n ${useCustomText(\"--beam-SubscriptionManagement-yourPreviousImpactTitle\")};\n }\n .tile-description {\n ${useCustomText(\"--beam-SubscriptionManagement-tile-description\")};\n }\n .via {\n ${useCustomText(\"--beam-SubscriptionManagement-tile-via\")};\n }\n .center-align-logo {\n margin-left: auto;\n margin-right: auto;\n }\n .left-align-logo {\n margin-left: 0;\n margin-right: auto;\n }\n .previous-impact-link-container {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .previous-impact-link {\n text-decoration-line: var(--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton\")};\n }\n .icon-background {\n width: var(--beam-SubscriptionManagement-tile-icon-background-width);\n height: var(--beam-SubscriptionManagement-tile-icon-background-height);\n border-radius: var(--beam-SubscriptionManagement-tile-icon-background-borderRadius);\n padding: var(--beam-SubscriptionManagement-tile-icon-background-padding);\n overflow: hidden;\n background: var(--beam-SubscriptionManagement-tile-icon-background-backgroundColor);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .icon {\n display: block;\n margin: auto;\n border-radius: var(--beam-SubscriptionManagement-tile-icon-borderRadius);\n height: var(--beam-SubscriptionManagement-tile-icon-height);\n }\n .tile-progress-bar-container-desktop {\n display: flex;\n align-items: center;\n width: var(--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop);\n }\n .tile-progress-bar-container-mobile {\n display: flex;\n align-items: center;\n width: var(--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile);\n }\n .previous-impact-nonprofit-link {\n text-decoration-line: var(--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-nonprofitLink\")};\n }\n .details-funding-progress-label {\n white-space: nowrap;\n flex: 0 1;\n margin-left: var(--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-progressBarLabel\")};\n }\n .funded-times {\n line-height: var(--beam-SubscriptionManagement-tile-fundedAmount-lineHeight);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-fundedAmount\")};\n }\n .tile-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n .tile-support-again {\n text-decoration-line: var(--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration);\n ${useCustomText(\"--beam-SubscriptionManagement-tile-supportAgainButton\")};\n }\n `,\n cssCardGrid({\n gap: \"var(--beam-SubscriptionManagement-tile-marginBottom)\",\n itemMinWidth: \"250px\",\n columnCount: \"1\",\n }),\n ];\n\n private renderPreviousImpactTiles({\n personalImpact,\n cardStyle,\n eligibleNonprofitConfig,\n }: {\n personalImpact?: TIAPIV3PersonalImpact;\n cardStyle: string;\n eligibleNonprofitConfig?: TIAPIV3EligibleNonprofitConfig;\n }) {\n if (!personalImpact) {\n return html``;\n }\n if (!eligibleNonprofitConfig) {\n return html``;\n }\n\n const tilesToShow = this.showAllTiles ? personalImpact : personalImpact.slice(0, INITIAL_TILE_COUNT);\n let emojiIndex = 0;\n return html`\n ${tilesToShow\n .filter((previousImpact) => previousImpact.nonprofit.includeInPersonalImpact === true)\n .map((previousImpact) => {\n const {\n impact: { goalCompletionText, description, goalProgressPercentage, goalProgressText },\n nonprofit: { cause, causeIconSelectedUrl, causeIconUrl, website, name, id },\n } = previousImpact;\n\n const isEligibleToSupportAgain = this.nonprofitId !== id && this.isNonprofitEligible(id);\n const showProgressBar = isEligibleToSupportAgain && this.shouldDisplayProgressBar(goalProgressPercentage);\n const emoji = goalCompletionText ? `${this.emojis[emojiIndex]} ` : \"\";\n emojiIndex = (emojiIndex + 1) % this.emojis.length;\n\n return html`\n <div class=\"tile\">\n <div class=\"tile-header\">\n <div class=\"tile-title\">${localizeUserString(this.configLang, cause || \"\")}</div>\n ${isEligibleToSupportAgain\n ? html` <button\n class=\"tile-support-again button\"\n @click=\"${() => this.handleSupportAgainButtonClick(id, name)}\"\n >\n ${localizeUserString(\n this.configLang,\n eligibleNonprofitConfig?.web?.additionalStrings?.[\"supportAgainButton\"] || \"\"\n ) || strings[this.configLang].supportAgainButton()}\n </button>`\n : html``}\n </div>\n <div class=\"tile-content\">\n <div class=\"icon-background\">\n <img\n src=\"${cardStyle === \"'selected_icon'\" ? causeIconSelectedUrl : causeIconUrl}\"\n alt=\"${cause}\"\n class=\"icon\"\n />\n </div>\n <div class=\"tile-description-block-container\">\n <div class=\"tile-description-container\">\n <span class=\"tile-description\">${localizeUserString(this.configLang, description || \"\")}</span>\n <span class=\"via\"\n >${localizeUserString(\n this.configLang,\n eligibleNonprofitConfig?.web?.additionalStrings?.[\"via\"] || \"\"\n ) || strings[this.configLang].via()}</span\n >\n <a href=\"${website}\" target=\"_blank\" class=\"previous-impact-nonprofit-link\">\n ${localizeUserString(this.configLang, name || \"\")}\n </a>\n </div>\n ${showProgressBar\n ? html` <div\n class=\"${this.isMobile\n ? \"tile-progress-bar-container-mobile\"\n : \"tile-progress-bar-container-desktop\"}\"\n >\n <beam-progress-bar value=\"${goalProgressPercentage}\" style=\"flex: 1 0;\"></beam-progress-bar>\n <span class=\"details-funding-progress-label\">${goalProgressText}</span>\n </div>`\n : html``}\n <div class=\"funded-times\">\n ${emoji}${unsafeHTML(localizeUserString(this.configLang, goalCompletionText))}\n </div>\n </div>\n </div>\n </div>\n `;\n })}\n `;\n }\n\n render() {\n const { data, loading, error } = this.eligibleNonprofitsDataController;\n if (loading) {\n return _loading();\n }\n if (error || data == null) {\n return this.debug ? _errorMessage({ error: error || new Error(\"No data\") }) : \"\";\n }\n let content;\n const cardStyle = this.cssVariables[\"--beam-SubscriptionManagement-previousImpact-cardStyle\"];\n const logoAlignDesktop = this.cssVariables[\"--beam-SubscriptionManagement-logo-align-desktop\"];\n const logoAlignMobile = this.cssVariables[\"--beam-SubscriptionManagement-logo-align-mobile\"];\n const previousImpactCount = this.personalImpactDataController.data?.personal?.length ?? 0;\n if (\n this.subscriptionDataController.loading ||\n this.eligibleNonprofitsDataController.loading ||\n this.personalImpactDataController.loading\n ) {\n _loading();\n }\n\n if (\n (this.subscriptionDataController.error ||\n this.eligibleNonprofitsDataController.error ||\n this.personalImpactDataController.error) &&\n this.debug\n ) {\n if (this.subscriptionDataController.error !== null) {\n return _errorMessage({ error: this.subscriptionDataController.error });\n } else if (this.eligibleNonprofitsDataController.error !== null) {\n return _errorMessage({ error: this.eligibleNonprofitsDataController.error });\n } else if (this.personalImpactDataController.error !== null) {\n return _errorMessage({ error: this.personalImpactDataController.error });\n }\n } else {\n content = \"\";\n }\n\n if (this.activeWidget === \"select-subscription-nonprofit\") {\n content = html` <beam-select-subscription-nonprofit\n part=\"subscription-nonprofit\"\n storeId=\"${this.storeId}\"\n subscriptionId=\"${this.subscriptionId}\"\n nonprofitId=${this.nonprofitId}\n selectedNonprofitId=${this.selectedNonprofitId}\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n postalCode=\"${this.postalCode}\"\n countryCode=\"${this.countryCode}\"\n lang=\"${this.lang}\"\n ?draftConfig=\"${this.draftConfig}\"\n ?debug=\"${this.debug}\"\n @beamnonprofitselect=\"${(event: Event) => this.handleNonprofitSelect(event)}\"\n ></beam-select-subscription-nonprofit>`;\n } else if (this.activeWidget === \"subscription-impact\") {\n content = html`\n <beam-subscription-impact\n part=\"subscription-impact\"\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n storeId=\"${this.storeId}\"\n beamUserId=\"${this.beamUserId}\"\n nonprofitId=\"${this.nonprofitId}\"\n lang=\"${this.lang}\"\n ?draftConfig=\"${this.draftConfig}\"\n ?debug=\"${this.debug}\"\n ></beam-subscription-impact>\n `;\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div class=\"widget-container\">\n <div class=\"header\">\n <div class=\"header-content\">\n <div\n class=\"logo ${this.isMobile\n ? logoAlignMobile === \"center\"\n ? \"center-align-logo\"\n : \"left-align-logo\"\n : logoAlignDesktop === \"center\"\n ? \"center-align-logo\"\n : \"left-align-logo\"}\"\n >\n <beam-partner-logos\n partnerName=\"${this.eligibleNonprofitsDataController.data?.chain.name}\"\n partnerLogoUrl=\"${this.eligibleNonprofitsDataController.data?.chain.logoUrl}\"\n ></beam-partner-logos>\n </div>\n ${this.nonprofitId\n ? html` <div class=\"meatballsMenu\" @click=\"${() => (this.dropdownVisible = !this.dropdownVisible)}\">\n <span>&#8230;</span>\n <div class=\"dropdown-container ${this.dropdownVisible ? \"visible\" : \"\"}\">\n ${this.activeWidget === \"select-subscription-nonprofit\"\n ? html`<button\n @click=\"${this.handleBackToSubscriptionImpactButtonClick}\"\n class=\"drop-down-options button\"\n >\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"previousNonprofitButtonText\"] || \"\"\n ) || strings[this.configLang].previousNonprofitButton()}\n </button>`\n : this.activeWidget === \"subscription-impact\"\n ? html`<button @click=\"${this.handleSwapNonprofitButtonClick}\" class=\"drop-down-options button\">\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"changeNonprofitButtonText\"] || \"\"\n ) || strings[this.configLang].changeNonprofitButton()}\n </button>`\n : \"\"}\n </div>\n </div>`\n : html``}\n </div>\n </div>\n <div class=\"sub-widget-container\">${content}</div>\n ${previousImpactCount > MIN_PREVIOUS_IMPACT\n ? html` <div class=\"line-break\"></div>\n\n <div\n class=\"previous-impact-container ${this.isMobile\n ? \"--beam-SubscriptionManagement-previousImpactContainer-padding-mobile\"\n : \"--beam-SubscriptionManagement-previousImpactContainer-padding-desktop\"}\"\n >\n <h2 class=\"previous-impact-title\">\n ${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"previousImpactHeader\"] || \"\"\n ) || strings[this.configLang].previousImpactHeader()}\n </h2>\n <div class=\"cardGrid\">\n ${this.renderPreviousImpactTiles({\n personalImpact: this.personalImpactDataController.data?.personal,\n cardStyle,\n eligibleNonprofitConfig: this.eligibleNonprofitsDataController.data?.config,\n })}\n </div>\n ${previousImpactCount > INITIAL_TILE_COUNT\n ? html`\n <div class=\"previous-impact-link-container\">\n <button\n @click=\"${() => (this.showAllTiles = !this.showAllTiles)}\"\n class=\"previous-impact-link button\"\n >\n ${this.showAllTiles\n ? localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"showLessButton\"] || \"\"\n ) || strings[this.configLang].showLessButton()\n : localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"showAllButton\"] || \"\"\n ) || strings[this.configLang].showAllButton()}\n </button>\n </div>\n `\n : html``}\n </div>`\n : html``}\n </div>\n `;\n }\n}\n\ndefineCustomElement(BeamSubscriptionManagement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-management\": BeamSubscriptionManagement;\n }\n}\n"],"names":["strings","INITIAL_TILE_COUNT","MIN_PREVIOUS_IMPACT","MIN_PROGRESS_THRESHOLD","MAX_PROGRESS_THRESHOLD","BeamSubscriptionManagement","LitElement","DEFAULT_BASE_URL","AsyncController","SUPPORTED_LANGUAGES","MissingConfig","enforceConfig","eligibleNonprofitResult","postChainEligibleNonprofitsForCart","makeApiKeyHeader","WIDGET_NAMES","subscriptionResult","postFindOrCreateSubscription","impactResult","getImpact","nonprofitId","nonprofitName","event","BeamNonprofitSelectEvent","selectedNonprofitId","np","progressValue","defaults","partnerLogosConfigDefaults","progressBarConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","personalImpact","cardStyle","eligibleNonprofitConfig","html","tilesToShow","emojiIndex","previousImpact","goalCompletionText","description","goalProgressPercentage","goalProgressText","cause","causeIconSelectedUrl","causeIconUrl","website","name","id","isEligibleToSupportAgain","showProgressBar","emoji","localizeUserString","unsafeHTML","data","loading","error","_loading","_errorMessage","content","logoAlignDesktop","logoAlignMobile","previousImpactCount","cssReset","css","useCustomText","cssCardGrid","__decorateClass","property","state","defineCustomElement"],"mappings":"ypCAAO,MAAMA,EAAU,CACrB,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,EACA,GAAI,CACF,sBAAuB,IAAM,mBAC7B,qBAAsB,IAAM,uBAC5B,wBAAyB,IAAM,6BAC/B,mBAAoB,IAAM,gBAC1B,IAAK,IAAM,MACX,cAAe,IAAM,WACrB,eAAgB,IAAM,WACxB,CACF,kMCJA,MAAMC,EAAqB,EACrBC,GAAsB,EACtBC,GAAyB,EACzBC,GAAyB,SAElBC,UAAmCC,CAAW,CAApD,aAAA,CAAA,MA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,EAjDIlE,EAiDM,UAAA,qBAAA,CAAA,EACAgE,EAAA,CAAhBE,GAlDU,EAAAlE,EAkDM,4BACAgE,EAAA,CAAhBE,EAnDU,CAAA,EAAAlE,EAmDM,wBACAgE,EAAA,CAAhBE,EApDU,CAAA,EAAAlE,EAoDM,+BACAgE,EAAA,CAAhBE,EArDU,CAAA,EAAAlE,EAqDM,UAosBnBmE,SAAAA,CAAAA,EAAAA,EAAoBnE,CAA0B"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { i as WebComponents } from './chunks/index-hn6JhG_w.esm.js';
2
- export { i as Integrations } from './chunks/index-ozcDdIom.esm.js';
2
+ export { i as Integrations } from './chunks/index-tdUx2WLc.esm.js';
3
3
  export { i as ReactComponents } from './chunks/index-mTXm0DPh.esm.js';
4
- export { i as Utils } from './chunks/index-B9w02q6y.esm.js';
4
+ export { i as Utils } from './chunks/index-SExnliMs.esm.js';
5
5
  import './components/community-impact.js';
6
6
  import 'lit';
7
7
  import 'lit-html';
@@ -15,19 +15,19 @@ import './components/impact-overview.js';
15
15
  import './chunks/share-button-hDn8fnBI.esm.js';
16
16
  import './components/select-nonprofit.js';
17
17
  import './chunks/promo-pill-label-3bA1z-la.esm.js';
18
- import './chunks/cart-contents-WB1BF6hG.esm.js';
19
- import './chunks/openapi-spec-GGEBbqAJ.esm.js';
18
+ import './chunks/cart-contents-HAPzwbeL.esm.js';
19
+ import './chunks/openapi-spec-RlP2IT1i.esm.js';
20
20
  import './components/redeem-transaction.js';
21
21
  import './components/post-purchase.js';
22
22
  import './components/subscription-management.js';
23
- import './chunks/routes-wCCYf_uA.esm.js';
23
+ import './chunks/routes-NIuAzAOC.esm.js';
24
24
  import './components/select-subscription-nonprofit.js';
25
25
  import './components/subscription-impact.js';
26
26
  import './components/product-details-page.js';
27
27
  import './components/social-share.js';
28
- import './chunks/index-uqNCQVUx.esm.js';
28
+ import './chunks/index-MSoONvC5.esm.js';
29
29
  import './chunks/beam-errors-fXDkG1zo.esm.js';
30
- import './chunks/events-MfRTtTVm.esm.js';
30
+ import './chunks/events-fqRWfo7p.esm.js';
31
31
  import './utils/logger.js';
32
32
  import './utils/network-listeners.js';
33
33
  import './utils/local-storage.js';
@@ -37,12 +37,12 @@ import './utils/remote-session.js';
37
37
  import './utils/memoize-last.js';
38
38
  import 'lodash-es/debounce';
39
39
  import 'lodash-es/isEqual';
40
- import './chunks/index-yeW2w5bb.esm.js';
41
- import './chunks/order-page-LvE0Otsn.esm.js';
42
- import './chunks/update-cart-tjLR7pMx.esm.js';
40
+ import './chunks/index-qt5iD9Ok.esm.js';
41
+ import './chunks/order-page-FLhpaZg2.esm.js';
42
+ import './chunks/update-cart-Hebtxhto.esm.js';
43
43
  import './chunks/index-EGiUuWe-.esm.js';
44
- import './chunks/index-UggwPn9Q.esm.js';
45
- import './chunks/index-OaRsZJh7.esm.js';
44
+ import './chunks/index-7mukhxz_.esm.js';
45
+ import './chunks/index-JG4nmG9U.esm.js';
46
46
  import './react/community-impact.js';
47
47
  import '@lit/react';
48
48
  import './react/cumulative-impact.js';
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{i as eo}from"./chunks/index-PiMq5a49.esm.js";import{i as ao}from"./chunks/index-Mt-ELD4q.esm.js";import{i as fo}from"./chunks/index-E8H5A7Qq.esm.js";import{i as Co}from"./chunks/index-n6QNFLXV.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-3QHn3fwl.esm.js";import"./chunks/progress-bar-HVG_n8_6.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/enforce-config-HksNiOMu.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.esm.js";import"./chunks/localize-IRs8JglT.esm.js";import"./chunks/routes-t6bR6BdS.esm.js";import"./chunks/loading-template-mLjOGXMj.esm.js";import"./chunks/css-card-grid-r6wxRbPV.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.esm.js";import"./chunks/shoelace-components-VlhAe0ME.esm.js";import"./chunks/vendor--f7lkyBk.esm.js";import"./chunks/share-button-7wbogZGx.esm.js";import"./chunks/share-button-CqTd80g8.esm.js";import"./chunks/responsive-KbDsZM6S.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/promo-pill-label-3Xtr5ALT.esm.js";import"./chunks/events-_4nImo3u.esm.js";import"./utils/network-listeners.esm.js";import"./utils/local-storage.esm.js";import"./utils/cookies.esm.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.esm.js";import"./chunks/checkbox-P2JYPqxl.esm.js";import"./components/post-purchase.esm.js";import"./components/subscription-management.esm.js";import"./components/select-subscription-nonprofit.esm.js";import"./utils/makeApiKeyHeader.esm.js";import"./components/subscription-impact.esm.js";import"./components/product-details-page.esm.js";import"./components/social-share.esm.js";import"./chunks/index-z8c9I9IQ.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-q7eo0lf1.esm.js";import"./chunks/order-page-4Tj7yLdv.esm.js";import"./chunks/update-cart-Djv-AjNu.esm.js";import"./chunks/index-mw70Caof.esm.js";import"./chunks/index-uKlidExq.esm.js";import"./chunks/index-U3VWulKA.esm.js";import"./react/community-impact.esm.js";import"react";import"./react/cumulative-impact.esm.js";import"./react/impact-overview.esm.js";import"./react/select-nonprofit.esm.js";import"./react/redeem-transaction.esm.js";import"./react/post-purchase.esm.js";import"./react/subscription-management.esm.js";import"./react/select-subscription-nonprofit.esm.js";import"./react/subscription-impact.esm.js";import"./react/product-details-page.esm.js";import"./react/social-share.esm.js";export{ao as Integrations,fo as ReactComponents,Co as Utils,eo as WebComponents};
1
+ import{i as eo}from"./chunks/index-PiMq5a49.esm.js";import{i as ao}from"./chunks/index-MJNFm2RK.esm.js";import{i as fo}from"./chunks/index-E8H5A7Qq.esm.js";import{i as Co}from"./chunks/index-n6QNFLXV.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-iNN5L_Qk.esm.js";import"./chunks/progress-bar-PMU_xI3L.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/enforce-config-ZAI7WYAd.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.esm.js";import"./chunks/localize-o-cYvHQf.esm.js";import"./chunks/routes-jmFlXAbv.esm.js";import"./chunks/loading-template-t4fFsYtr.esm.js";import"./chunks/css-card-grid-nEc--M5M.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.esm.js";import"./chunks/shoelace-components-qjNlvvPx.esm.js";import"./chunks/vendor-GKiOHg2N.esm.js";import"./chunks/share-button-hLOsYlSA.esm.js";import"./chunks/share-button-SNvuFDC9.esm.js";import"./chunks/responsive-2lC2Wrtg.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/promo-pill-label-58PJRvSl.esm.js";import"./chunks/events-_4nImo3u.esm.js";import"./utils/network-listeners.esm.js";import"./utils/local-storage.esm.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./utils/cart.esm.js";import"./utils/cookies.esm.js";import"./components/redeem-transaction.esm.js";import"./components/post-purchase.esm.js";import"./components/subscription-management.esm.js";import"./components/select-subscription-nonprofit.esm.js";import"./utils/makeApiKeyHeader.esm.js";import"./components/subscription-impact.esm.js";import"./components/product-details-page.esm.js";import"./components/social-share.esm.js";import"./chunks/index-z8c9I9IQ.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-4fdLArZg.esm.js";import"./chunks/order-page-KZ7xLkRW.esm.js";import"./chunks/update-cart-aKQ3Cjc8.esm.js";import"./chunks/index-eXilYHHK.esm.js";import"./chunks/index-lyf1T2wZ.esm.js";import"./chunks/index-qs-xQCeM.esm.js";import"./react/community-impact.esm.js";import"react";import"./react/cumulative-impact.esm.js";import"./react/impact-overview.esm.js";import"./react/select-nonprofit.esm.js";import"./react/redeem-transaction.esm.js";import"./react/post-purchase.esm.js";import"./react/subscription-management.esm.js";import"./react/select-subscription-nonprofit.esm.js";import"./react/subscription-impact.esm.js";import"./react/product-details-page.esm.js";import"./react/social-share.esm.js";export{ao as Integrations,fo as ReactComponents,Co as Utils,eo as WebComponents};
2
2
  //# sourceMappingURL=index.esm.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{i as eo}from"./chunks/index-FQExZDX9.esm.js";import{i as ao}from"./chunks/index-X9fTuRmg.esm.js";import{i as fo}from"./chunks/index-XCMf22lv.esm.js";import{i as Co}from"./chunks/index-NOF_HeFP.esm.js";import"./components/community-impact.js";import"./chunks/lit-3QHn3fwl.esm.js";import"./chunks/progress-bar-HVG_n8_6.esm.js";import"./components/beam-partner-logos.js";import"./chunks/enforce-config-er6B5Gkj.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.js";import"./chunks/localize-SsJbTmMj.esm.js";import"./chunks/routes-L-CN-xXC.esm.js";import"./chunks/loading-template-mLjOGXMj.esm.js";import"./chunks/css-card-grid-r6wxRbPV.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.js";import"./chunks/shoelace-components-BpI14CrA.esm.js";import"./chunks/vendor--f7lkyBk.esm.js";import"./chunks/share-button-0N1lvlZT.esm.js";import"./chunks/share-button-CqTd80g8.esm.js";import"./chunks/responsive-KbDsZM6S.esm.js";import"./components/select-nonprofit.js";import"./chunks/promo-pill-label-3Xtr5ALT.esm.js";import"./chunks/events-_4nImo3u.esm.js";import"./utils/network-listeners.js";import"./utils/local-storage.js";import"./utils/cookies.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.js";import"./chunks/checkbox-P2JYPqxl.esm.js";import"./components/post-purchase.js";import"./components/subscription-management.js";import"./components/select-subscription-nonprofit.js";import"./utils/makeApiKeyHeader.js";import"./components/subscription-impact.js";import"./components/product-details-page.js";import"./components/social-share.js";import"./chunks/index-x2kxA_Xo.esm.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-Gf_Ee-cU.esm.js";import"./chunks/order-page-9qKR3-ys.esm.js";import"./chunks/update-cart-G7FRM8DW.esm.js";import"./chunks/index-1nI7l5vj.esm.js";import"./chunks/index-ixzz4bX7.esm.js";import"./chunks/index-keYXyTGw.esm.js";import"./react/community-impact.js";import"react";import"./react/cumulative-impact.js";import"./react/impact-overview.js";import"./react/select-nonprofit.js";import"./react/redeem-transaction.js";import"./react/post-purchase.js";import"./react/subscription-management.js";import"./react/select-subscription-nonprofit.js";import"./react/subscription-impact.js";import"./react/product-details-page.js";import"./react/social-share.js";export{ao as Integrations,fo as ReactComponents,Co as Utils,eo as WebComponents};
1
+ import{i as eo}from"./chunks/index-FQExZDX9.esm.js";import{i as ao}from"./chunks/index-gBAASIWa.esm.js";import{i as fo}from"./chunks/index-XCMf22lv.esm.js";import{i as Co}from"./chunks/index-NOF_HeFP.esm.js";import"./components/community-impact.js";import"./chunks/lit-iNN5L_Qk.esm.js";import"./chunks/progress-bar-PMU_xI3L.esm.js";import"./components/beam-partner-logos.js";import"./chunks/enforce-config-ZyPq_4CF.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.js";import"./chunks/localize-m-_ESmpk.esm.js";import"./chunks/routes-FBB1GA4-.esm.js";import"./chunks/loading-template-t4fFsYtr.esm.js";import"./chunks/css-card-grid-nEc--M5M.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.js";import"./chunks/shoelace-components-leDI-Yop.esm.js";import"./chunks/vendor-GKiOHg2N.esm.js";import"./chunks/share-button-bQ8brpBZ.esm.js";import"./chunks/share-button-SNvuFDC9.esm.js";import"./chunks/responsive-2lC2Wrtg.esm.js";import"./components/select-nonprofit.js";import"./chunks/promo-pill-label-58PJRvSl.esm.js";import"./chunks/events-_4nImo3u.esm.js";import"./utils/network-listeners.js";import"./utils/local-storage.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./utils/cart.js";import"./utils/cookies.js";import"./components/redeem-transaction.js";import"./components/post-purchase.js";import"./components/subscription-management.js";import"./components/select-subscription-nonprofit.js";import"./utils/makeApiKeyHeader.js";import"./components/subscription-impact.js";import"./components/product-details-page.js";import"./components/social-share.js";import"./chunks/index-x2kxA_Xo.esm.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-1WxwWfcp.esm.js";import"./chunks/order-page-mlWRT5YL.esm.js";import"./chunks/update-cart-j9LPS5By.esm.js";import"./chunks/index-JDZQClkA.esm.js";import"./chunks/index-Hd_2hpsA.esm.js";import"./chunks/index--JacA4R2.esm.js";import"./react/community-impact.js";import"react";import"./react/cumulative-impact.js";import"./react/impact-overview.js";import"./react/select-nonprofit.js";import"./react/redeem-transaction.js";import"./react/post-purchase.js";import"./react/subscription-management.js";import"./react/select-subscription-nonprofit.js";import"./react/subscription-impact.js";import"./react/product-details-page.js";import"./react/social-share.js";export{ao as Integrations,fo as ReactComponents,Co as Utils,eo as WebComponents};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{D as u,a as g}from"../chunks/routes-t6bR6BdS.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-_4nImo3u.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-U3VWulKA.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
1
+ import{D as u,a as g}from"../chunks/routes-jmFlXAbv.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-_4nImo3u.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-qs-xQCeM.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
2
2
  //# sourceMappingURL=beam.esm.js.map
@@ -1,2 +1,2 @@
1
- import{D as u,a as g}from"../chunks/routes-L-CN-xXC.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-_4nImo3u.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index-keYXyTGw.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
1
+ import{D as u,a as g}from"../chunks/routes-FBB1GA4-.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-_4nImo3u.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index--JacA4R2.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
2
2
  //# sourceMappingURL=beam.js.map
@@ -1,5 +1,5 @@
1
- export { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from '../chunks/update-cart-tjLR7pMx.esm.js';
1
+ export { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from '../chunks/update-cart-Hebtxhto.esm.js';
2
2
  import 'lodash';
3
3
  import '../chunks/types-aju0qrRe.esm.js';
4
- import '../chunks/cart-contents-WB1BF6hG.esm.js';
5
- import '../chunks/openapi-spec-GGEBbqAJ.esm.js';
4
+ import '../chunks/cart-contents-HAPzwbeL.esm.js';
5
+ import '../chunks/openapi-spec-RlP2IT1i.esm.js';
@@ -1,2 +1,2 @@
1
- import{K as C}from"../chunks/update-cart-Djv-AjNu.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-t6bR6BdS.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
1
+ import{K}from"../chunks/update-cart-aKQ3Cjc8.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-jmFlXAbv.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../utils/cart.esm.js";export{K as updateCart};
2
2
  //# sourceMappingURL=cart.esm.js.map
@@ -1,2 +1,2 @@
1
- import{K as C}from"../chunks/update-cart-G7FRM8DW.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-L-CN-xXC.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
1
+ import{K}from"../chunks/update-cart-j9LPS5By.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-FBB1GA4-.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../utils/cart.js";export{K as updateCart};
2
2
  //# sourceMappingURL=cart.js.map
@@ -1,12 +1,12 @@
1
- export { i as Utils } from '../chunks/index-uqNCQVUx.esm.js';
2
- export { i as Shopify } from '../chunks/index-yeW2w5bb.esm.js';
1
+ export { i as Utils } from '../chunks/index-MSoONvC5.esm.js';
2
+ export { i as Shopify } from '../chunks/index-qt5iD9Ok.esm.js';
3
3
  export { i as Session } from '../chunks/index-EGiUuWe-.esm.js';
4
- export { i as Cart } from '../chunks/index-UggwPn9Q.esm.js';
5
- export { i as Logs } from '../chunks/index-OaRsZJh7.esm.js';
4
+ export { i as Cart } from '../chunks/index-7mukhxz_.esm.js';
5
+ export { i as Logs } from '../chunks/index-JG4nmG9U.esm.js';
6
6
  import '../chunks/beam-errors-fXDkG1zo.esm.js';
7
- import '../chunks/events-MfRTtTVm.esm.js';
8
- import '../chunks/cart-contents-WB1BF6hG.esm.js';
9
- import '../chunks/openapi-spec-GGEBbqAJ.esm.js';
7
+ import '../chunks/events-fqRWfo7p.esm.js';
8
+ import '../chunks/cart-contents-HAPzwbeL.esm.js';
9
+ import '../chunks/openapi-spec-RlP2IT1i.esm.js';
10
10
  import '../chunks/types-zbTZ8-KP.esm.js';
11
11
  import '../utils/logger.js';
12
12
  import '../utils/network-listeners.js';
@@ -17,9 +17,9 @@ import '../utils/remote-session.js';
17
17
  import '../utils/memoize-last.js';
18
18
  import 'lodash-es/debounce';
19
19
  import 'lodash-es/isEqual';
20
- import '../chunks/order-page-LvE0Otsn.esm.js';
20
+ import '../chunks/order-page-FLhpaZg2.esm.js';
21
21
  import 'lodash';
22
- import '../chunks/update-cart-tjLR7pMx.esm.js';
22
+ import '../chunks/update-cart-Hebtxhto.esm.js';
23
23
  import '../chunks/types-aju0qrRe.esm.js';
24
24
  import '../components/post-purchase.js';
25
25
  import 'lit';
@@ -30,4 +30,4 @@ import '../chunks/promo-pill-label-3bA1z-la.esm.js';
30
30
  import '../components/beam-partner-logos.js';
31
31
  import '../components/impact-overview.js';
32
32
  import '../chunks/share-button-hDn8fnBI.esm.js';
33
- import '../chunks/routes-wCCYf_uA.esm.js';
33
+ import '../chunks/routes-NIuAzAOC.esm.js';
@@ -1,2 +1,2 @@
1
- import{i as F}from"../chunks/index-z8c9I9IQ.esm.js";import{i as H}from"../chunks/index-q7eo0lf1.esm.js";import{i as J}from"../chunks/index-mw70Caof.esm.js";import{i as M}from"../chunks/index-uKlidExq.esm.js";import{i as O}from"../chunks/index-U3VWulKA.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/wait-for-element.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-4Tj7yLdv.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-Djv-AjNu.esm.js";import"../chunks/routes-t6bR6BdS.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/enforce-config-HksNiOMu.esm.js";import"../chunks/localize-IRs8JglT.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-HVG_n8_6.esm.js";import"../chunks/promo-pill-label-3Xtr5ALT.esm.js";import"../chunks/vendor--f7lkyBk.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-mLjOGXMj.esm.js";import"../chunks/css-card-grid-r6wxRbPV.esm.js";import"../chunks/checkbox-P2JYPqxl.esm.js";import"../components/impact-overview.esm.js";import"../chunks/shoelace-components-VlhAe0ME.esm.js";import"../chunks/share-button-7wbogZGx.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-CqTd80g8.esm.js";import"../chunks/responsive-KbDsZM6S.esm.js";export{M as Cart,O as Logs,J as Session,H as Shopify,F as Utils};
1
+ import{i as F}from"../chunks/index-z8c9I9IQ.esm.js";import{i as H}from"../chunks/index-4fdLArZg.esm.js";import{i as J}from"../chunks/index-eXilYHHK.esm.js";import{i as M}from"../chunks/index-lyf1T2wZ.esm.js";import{i as O}from"../chunks/index-qs-xQCeM.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/wait-for-element.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-KZ7xLkRW.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-aKQ3Cjc8.esm.js";import"../chunks/routes-jmFlXAbv.esm.js";import"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/promo-pill-label-58PJRvSl.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/impact-overview.esm.js";import"../chunks/shoelace-components-qjNlvvPx.esm.js";import"../chunks/share-button-hLOsYlSA.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";export{M as Cart,O as Logs,J as Session,H as Shopify,F as Utils};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{i as F}from"../chunks/index-x2kxA_Xo.esm.js";import{i as H}from"../chunks/index-Gf_Ee-cU.esm.js";import{i as J}from"../chunks/index-1nI7l5vj.esm.js";import{i as M}from"../chunks/index-ixzz4bX7.esm.js";import{i as O}from"../chunks/index-keYXyTGw.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/wait-for-element.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-9qKR3-ys.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-G7FRM8DW.esm.js";import"../chunks/routes-L-CN-xXC.esm.js";import"../components/post-purchase.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/enforce-config-er6B5Gkj.esm.js";import"../chunks/localize-SsJbTmMj.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-HVG_n8_6.esm.js";import"../chunks/promo-pill-label-3Xtr5ALT.esm.js";import"../chunks/vendor--f7lkyBk.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-mLjOGXMj.esm.js";import"../chunks/css-card-grid-r6wxRbPV.esm.js";import"../chunks/checkbox-P2JYPqxl.esm.js";import"../components/impact-overview.js";import"../chunks/shoelace-components-BpI14CrA.esm.js";import"../chunks/share-button-0N1lvlZT.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-CqTd80g8.esm.js";import"../chunks/responsive-KbDsZM6S.esm.js";export{M as Cart,O as Logs,J as Session,H as Shopify,F as Utils};
1
+ import{i as F}from"../chunks/index-x2kxA_Xo.esm.js";import{i as H}from"../chunks/index-1WxwWfcp.esm.js";import{i as J}from"../chunks/index-JDZQClkA.esm.js";import{i as M}from"../chunks/index-Hd_2hpsA.esm.js";import{i as O}from"../chunks/index--JacA4R2.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/wait-for-element.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-mlWRT5YL.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-j9LPS5By.esm.js";import"../chunks/routes-FBB1GA4-.esm.js";import"../utils/cart.js";import"../components/post-purchase.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/promo-pill-label-58PJRvSl.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/impact-overview.js";import"../chunks/shoelace-components-leDI-Yop.esm.js";import"../chunks/share-button-bQ8brpBZ.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";export{M as Cart,O as Logs,J as Session,H as Shopify,F as Utils};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import '../chunks/openapi-spec-GGEBbqAJ.esm.js';
2
- export { s as sendLog } from '../chunks/index-OaRsZJh7.esm.js';
1
+ import '../chunks/openapi-spec-RlP2IT1i.esm.js';
2
+ export { s as sendLog } from '../chunks/index-JG4nmG9U.esm.js';
@@ -1,2 +1,2 @@
1
- import"../chunks/routes-t6bR6BdS.esm.js";import"../utils/logger.esm.js";import{s as i}from"../chunks/index-U3VWulKA.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
1
+ import"../chunks/routes-jmFlXAbv.esm.js";import"../utils/logger.esm.js";import{s as i}from"../chunks/index-qs-xQCeM.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
2
2
  //# sourceMappingURL=logs.esm.js.map
@@ -1,2 +1,2 @@
1
- import"../chunks/routes-L-CN-xXC.esm.js";import"../utils/logger.js";import{s as i}from"../chunks/index-keYXyTGw.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
1
+ import"../chunks/routes-FBB1GA4-.esm.js";import"../utils/logger.js";import{s as i}from"../chunks/index--JacA4R2.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
2
2
  //# sourceMappingURL=logs.js.map
@@ -1,2 +1,2 @@
1
- import"../chunks/vendor--f7lkyBk.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";import{c as a,e as n}from"../chunks/index-mw70Caof.esm.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";export{a as createSession,n as endSession};
1
+ import"../chunks/vendor-GKiOHg2N.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";import{c as a,e as n}from"../chunks/index-eXilYHHK.esm.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";export{a as createSession,n as endSession};
2
2
  //# sourceMappingURL=session.esm.js.map
@@ -1,2 +1,2 @@
1
- import"../chunks/vendor--f7lkyBk.esm.js";import"../utils/cookies.js";import"../utils/local-storage.js";import{c as a,e as n}from"../chunks/index-1nI7l5vj.esm.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";export{a as createSession,n as endSession};
1
+ import"../chunks/vendor-GKiOHg2N.esm.js";import"../utils/cookies.js";import"../utils/local-storage.js";import{c as a,e as n}from"../chunks/index-JDZQClkA.esm.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";export{a as createSession,n as endSession};
2
2
  //# sourceMappingURL=session.js.map
@@ -1,9 +1,9 @@
1
- export { T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-LvE0Otsn.esm.js';
1
+ export { B as BeamShopifyCartIntegrationConfig, T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-FLhpaZg2.esm.js';
2
2
  import 'lodash';
3
- import '../chunks/update-cart-tjLR7pMx.esm.js';
3
+ import '../chunks/update-cart-Hebtxhto.esm.js';
4
4
  import '../chunks/types-aju0qrRe.esm.js';
5
- import '../chunks/cart-contents-WB1BF6hG.esm.js';
6
- import '../chunks/openapi-spec-GGEBbqAJ.esm.js';
5
+ import '../chunks/cart-contents-HAPzwbeL.esm.js';
6
+ import '../chunks/openapi-spec-RlP2IT1i.esm.js';
7
7
  import '../components/post-purchase.js';
8
8
  import 'lit';
9
9
  import 'lit-html';
@@ -14,4 +14,4 @@ import '../components/beam-partner-logos.js';
14
14
  import '../chunks/types-zbTZ8-KP.esm.js';
15
15
  import '../components/impact-overview.js';
16
16
  import '../chunks/share-button-hDn8fnBI.esm.js';
17
- import '../chunks/routes-wCCYf_uA.esm.js';
17
+ import '../chunks/routes-NIuAzAOC.esm.js';
@@ -1,2 +1,2 @@
1
- import{f as v,h as y,M as z,s as D,U as E}from"../chunks/order-page-4Tj7yLdv.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-Djv-AjNu.esm.js";import"../chunks/routes-t6bR6BdS.esm.js";import"../utils/remote-session.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/enforce-config-HksNiOMu.esm.js";import"../chunks/localize-IRs8JglT.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-HVG_n8_6.esm.js";import"../chunks/promo-pill-label-3Xtr5ALT.esm.js";import"../chunks/vendor--f7lkyBk.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-mLjOGXMj.esm.js";import"../chunks/css-card-grid-r6wxRbPV.esm.js";import"../chunks/checkbox-P2JYPqxl.esm.js";import"../components/impact-overview.esm.js";import"../chunks/shoelace-components-VlhAe0ME.esm.js";import"../chunks/share-button-7wbogZGx.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-CqTd80g8.esm.js";import"../chunks/responsive-KbDsZM6S.esm.js";import"../utils/wait-for-element.esm.js";export{v as addBeamAttributesToCart,y as getCurrentCart,z as registerCartIntegration,D as showBeamOrderPageWidgets,E as trackCart};
1
+ import{p as y,w as z,J as D,s as E,q as F}from"../chunks/order-page-KZ7xLkRW.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-aKQ3Cjc8.esm.js";import"../chunks/routes-jmFlXAbv.esm.js";import"../utils/remote-session.esm.js";import"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/promo-pill-label-58PJRvSl.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/impact-overview.esm.js";import"../chunks/shoelace-components-qjNlvvPx.esm.js";import"../chunks/share-button-hLOsYlSA.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";import"../utils/wait-for-element.esm.js";export{y as addBeamAttributesToCart,z as getCurrentCart,D as registerCartIntegration,E as showBeamOrderPageWidgets,F as trackCart};
2
2
  //# sourceMappingURL=shopify.esm.js.map
@@ -1,2 +1,2 @@
1
- import{f as v,h as y,M as z,s as D,U as E}from"../chunks/order-page-9qKR3-ys.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-G7FRM8DW.esm.js";import"../chunks/routes-L-CN-xXC.esm.js";import"../utils/remote-session.js";import"../components/post-purchase.js";import"../chunks/lit-3QHn3fwl.esm.js";import"../chunks/enforce-config-er6B5Gkj.esm.js";import"../chunks/localize-SsJbTmMj.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-HVG_n8_6.esm.js";import"../chunks/promo-pill-label-3Xtr5ALT.esm.js";import"../chunks/vendor--f7lkyBk.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-mLjOGXMj.esm.js";import"../chunks/css-card-grid-r6wxRbPV.esm.js";import"../chunks/checkbox-P2JYPqxl.esm.js";import"../components/impact-overview.js";import"../chunks/shoelace-components-BpI14CrA.esm.js";import"../chunks/share-button-0N1lvlZT.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-CqTd80g8.esm.js";import"../chunks/responsive-KbDsZM6S.esm.js";import"../utils/wait-for-element.js";export{v as addBeamAttributesToCart,y as getCurrentCart,z as registerCartIntegration,D as showBeamOrderPageWidgets,E as trackCart};
1
+ import{p as y,w as z,J as D,s as E,q as F}from"../chunks/order-page-mlWRT5YL.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-_4nImo3u.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-j9LPS5By.esm.js";import"../chunks/routes-FBB1GA4-.esm.js";import"../utils/remote-session.js";import"../utils/cart.js";import"../components/post-purchase.js";import"../chunks/lit-iNN5L_Qk.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/promo-pill-label-58PJRvSl.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/impact-overview.js";import"../chunks/shoelace-components-leDI-Yop.esm.js";import"../chunks/share-button-bQ8brpBZ.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";import"../utils/wait-for-element.js";export{y as addBeamAttributesToCart,z as getCurrentCart,D as registerCartIntegration,E as showBeamOrderPageWidgets,F as trackCart};
2
2
  //# sourceMappingURL=shopify.js.map