@beamimpact/web-sdk 1.52.2 → 1.52.6

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 (161) hide show
  1. package/dist/chunks/{_share-dialog-dependencies-CFBQaddH.esm.js → _share-dialog-dependencies-Cry6mcdg.esm.js} +2 -2
  2. package/dist/chunks/{_share-dialog-dependencies-CFBQaddH.esm.js.map → _share-dialog-dependencies-Cry6mcdg.esm.js.map} +1 -1
  3. package/dist/chunks/{_share-dialog-dependencies-x5pyLsew.esm.js → _share-dialog-dependencies-DSYemenF.esm.js} +2 -2
  4. package/dist/chunks/{_share-dialog-dependencies-x5pyLsew.esm.js.map → _share-dialog-dependencies-DSYemenF.esm.js.map} +1 -1
  5. package/dist/chunks/{index-CXJEBQUg.esm.js → index--lGfTDwX.esm.js} +2 -2
  6. package/dist/chunks/{index-CXJEBQUg.esm.js.map → index--lGfTDwX.esm.js.map} +1 -1
  7. package/dist/chunks/index-1hlAGQPk.esm.js +2 -0
  8. package/dist/chunks/index-1hlAGQPk.esm.js.map +1 -0
  9. package/dist/chunks/{index-DhtZDPvk.esm.js → index-AEnQH-so.esm.js} +2 -2
  10. package/dist/chunks/index-AEnQH-so.esm.js.map +1 -0
  11. package/dist/chunks/{index-BNVaWVJi.esm.js → index-B-uw46_j.esm.js} +2 -2
  12. package/dist/chunks/{index-BNVaWVJi.esm.js.map → index-B-uw46_j.esm.js.map} +1 -1
  13. package/dist/chunks/{index-DoF3KFUY.esm.js → index-BTYU0dxk.esm.js} +2 -2
  14. package/dist/chunks/index-BTYU0dxk.esm.js.map +1 -0
  15. package/dist/chunks/{index-C-beNpP0.esm.js → index-CtYbieoH.esm.js} +2 -2
  16. package/dist/chunks/index-CtYbieoH.esm.js.map +1 -0
  17. package/dist/chunks/index-D2Ox_xyE.esm.js +2 -0
  18. package/dist/chunks/index-D2Ox_xyE.esm.js.map +1 -0
  19. package/dist/chunks/{index-utCqipvB.esm.js → index-D8jCSss3.esm.js} +2 -2
  20. package/dist/chunks/index-D8jCSss3.esm.js.map +1 -0
  21. package/dist/chunks/index-DE2QManY.esm.js +2 -0
  22. package/dist/chunks/index-DE2QManY.esm.js.map +1 -0
  23. package/dist/chunks/{index-GcpuX_TZ.esm.js → index-DhhPQ773.esm.js} +2 -2
  24. package/dist/chunks/index-DhhPQ773.esm.js.map +1 -0
  25. package/dist/chunks/{index-CbWdmBet.esm.js → index-DtfQd6C4.esm.js} +2 -2
  26. package/dist/chunks/index-DtfQd6C4.esm.js.map +1 -0
  27. package/dist/chunks/index-GmNTlVv2.esm.js +2 -0
  28. package/dist/chunks/index-GmNTlVv2.esm.js.map +1 -0
  29. package/dist/chunks/{lodash-7H4x2457.esm.js → lodash-D3TLHRR_.esm.js} +2 -2
  30. package/dist/chunks/lodash-D3TLHRR_.esm.js.map +1 -0
  31. package/dist/chunks/{order-page-CTpjnsoe.esm.js → order-page-BRpixGl8.esm.js} +2 -2
  32. package/dist/chunks/{order-page-CTpjnsoe.esm.js.map → order-page-BRpixGl8.esm.js.map} +1 -1
  33. package/dist/chunks/{order-page-BH3Qr433.esm.js → order-page-CW5aw6Kh.esm.js} +2 -2
  34. package/dist/chunks/{order-page-BH3Qr433.esm.js.map → order-page-CW5aw6Kh.esm.js.map} +1 -1
  35. package/dist/chunks/{routes-Bgj1HGgx.esm.js → routes-D-AQPRne.esm.js} +2 -2
  36. package/dist/chunks/{routes-Bgj1HGgx.esm.js.map → routes-D-AQPRne.esm.js.map} +1 -1
  37. package/dist/chunks/{routes-Be8scSEK.esm.js → routes-Lvj2SXN4.esm.js} +2 -2
  38. package/dist/chunks/{routes-Be8scSEK.esm.js.map → routes-Lvj2SXN4.esm.js.map} +1 -1
  39. package/dist/chunks/{share-button-BuneDluf.esm.js → share-button-Bj6RA_H6.esm.js} +2 -2
  40. package/dist/chunks/{share-button-BuneDluf.esm.js.map → share-button-Bj6RA_H6.esm.js.map} +1 -1
  41. package/dist/chunks/{share-button-BX-kWAd0.esm.js → share-button-DNgyupow.esm.js} +2 -2
  42. package/dist/chunks/{share-button-BX-kWAd0.esm.js.map → share-button-DNgyupow.esm.js.map} +1 -1
  43. package/dist/chunks/{share-button-DK30KQ6n.esm.js → share-button-DUn-zC5t.esm.js} +2 -2
  44. package/dist/chunks/{share-button-DK30KQ6n.esm.js.map → share-button-DUn-zC5t.esm.js.map} +1 -1
  45. package/dist/chunks/{share-button-CcD-wBHE.esm.js → share-button-XJxSyBaT.esm.js} +2 -2
  46. package/dist/chunks/{share-button-CcD-wBHE.esm.js.map → share-button-XJxSyBaT.esm.js.map} +1 -1
  47. package/dist/chunks/{update-cart-Cih70sgI.esm.js → update-cart-Kt4NGuYW.esm.js} +2 -2
  48. package/dist/chunks/{update-cart-Cih70sgI.esm.js.map → update-cart-Kt4NGuYW.esm.js.map} +1 -1
  49. package/dist/chunks/{update-cart-C8ufWemL.esm.js → update-cart-y9guItUM.esm.js} +2 -2
  50. package/dist/chunks/{update-cart-C8ufWemL.esm.js.map → update-cart-y9guItUM.esm.js.map} +1 -1
  51. package/dist/components/community-impact.esm.js +17 -17
  52. package/dist/components/community-impact.esm.js.map +1 -1
  53. package/dist/components/community-impact.js +17 -17
  54. package/dist/components/community-impact.js.map +1 -1
  55. package/dist/components/cumulative-impact.esm.js +1 -1
  56. package/dist/components/cumulative-impact.js +1 -1
  57. package/dist/components/impact-overview.esm.js +4 -4
  58. package/dist/components/impact-overview.esm.js.map +1 -1
  59. package/dist/components/impact-overview.js +4 -4
  60. package/dist/components/impact-overview.js.map +1 -1
  61. package/dist/components/index.esm.js +1 -1
  62. package/dist/components/index.js +1 -1
  63. package/dist/components/post-purchase.d.ts +1 -1
  64. package/dist/components/post-purchase.esm.js +1 -1
  65. package/dist/components/post-purchase.js +1 -1
  66. package/dist/components/product-details-page.d.ts +1 -1
  67. package/dist/components/product-details-page.esm.js +16 -15
  68. package/dist/components/product-details-page.esm.js.map +1 -1
  69. package/dist/components/product-details-page.js +16 -15
  70. package/dist/components/product-details-page.js.map +1 -1
  71. package/dist/components/redeem-transaction.d.ts +1 -1
  72. package/dist/components/redeem-transaction.esm.js +4 -3
  73. package/dist/components/redeem-transaction.esm.js.map +1 -1
  74. package/dist/components/redeem-transaction.js +4 -3
  75. package/dist/components/redeem-transaction.js.map +1 -1
  76. package/dist/components/select-nonprofit.d.ts +1 -1
  77. package/dist/components/select-nonprofit.esm.js +2 -2
  78. package/dist/components/select-nonprofit.esm.js.map +1 -1
  79. package/dist/components/select-nonprofit.js +2 -2
  80. package/dist/components/select-nonprofit.js.map +1 -1
  81. package/dist/components/select-subscription-nonprofit.d.ts +1 -1
  82. package/dist/components/select-subscription-nonprofit.esm.js +1 -1
  83. package/dist/components/select-subscription-nonprofit.js +1 -1
  84. package/dist/components/shopify.esm.js +1 -1
  85. package/dist/components/shopify.js +1 -1
  86. package/dist/components/social-share.esm.js +1 -1
  87. package/dist/components/social-share.js +1 -1
  88. package/dist/components/subscription-impact.d.ts +1 -1
  89. package/dist/components/subscription-impact.esm.js +15 -15
  90. package/dist/components/subscription-impact.esm.js.map +1 -1
  91. package/dist/components/subscription-impact.js +15 -15
  92. package/dist/components/subscription-impact.js.map +1 -1
  93. package/dist/components/subscription-management.d.ts +31 -1
  94. package/dist/components/subscription-management.esm.js +56 -56
  95. package/dist/components/subscription-management.esm.js.map +1 -1
  96. package/dist/components/subscription-management.js +56 -56
  97. package/dist/components/subscription-management.js.map +1 -1
  98. package/dist/index.esm.js +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/integrations/beam.esm.js +1 -1
  101. package/dist/integrations/beam.js +1 -1
  102. package/dist/integrations/cart.esm.js +1 -1
  103. package/dist/integrations/cart.js +1 -1
  104. package/dist/integrations/index.esm.js +1 -1
  105. package/dist/integrations/index.js +1 -1
  106. package/dist/integrations/logs.esm.js +1 -1
  107. package/dist/integrations/logs.js +1 -1
  108. package/dist/integrations/shopify.esm.js +1 -1
  109. package/dist/integrations/shopify.js +1 -1
  110. package/dist/integrations/statsig.esm.js +1 -1
  111. package/dist/integrations/statsig.js +1 -1
  112. package/dist/integrations/utils.esm.js +1 -1
  113. package/dist/integrations/utils.js +1 -1
  114. package/dist/react/community-impact.esm.js +1 -1
  115. package/dist/react/community-impact.js +1 -1
  116. package/dist/react/cumulative-impact.esm.js +1 -1
  117. package/dist/react/cumulative-impact.js +1 -1
  118. package/dist/react/impact-overview.esm.js +1 -1
  119. package/dist/react/impact-overview.js +1 -1
  120. package/dist/react/index.esm.js +1 -1
  121. package/dist/react/index.js +1 -1
  122. package/dist/react/post-purchase.esm.js +1 -1
  123. package/dist/react/post-purchase.js +1 -1
  124. package/dist/react/product-details-page.esm.js +1 -1
  125. package/dist/react/product-details-page.js +1 -1
  126. package/dist/react/redeem-transaction.esm.js +1 -1
  127. package/dist/react/redeem-transaction.js +1 -1
  128. package/dist/react/select-nonprofit.esm.js +1 -1
  129. package/dist/react/select-nonprofit.js +1 -1
  130. package/dist/react/select-subscription-nonprofit.esm.js +1 -1
  131. package/dist/react/select-subscription-nonprofit.js +1 -1
  132. package/dist/react/social-share.esm.js +1 -1
  133. package/dist/react/social-share.js +1 -1
  134. package/dist/react/subscription-impact.esm.js +1 -1
  135. package/dist/react/subscription-impact.js +1 -1
  136. package/dist/react/subscription-management.esm.js +1 -1
  137. package/dist/react/subscription-management.js +1 -1
  138. package/dist/utils/debounce.esm.js +1 -1
  139. package/dist/utils/debounce.js +1 -1
  140. package/dist/utils/index.esm.js +1 -1
  141. package/dist/utils/index.js +1 -1
  142. package/dist/utils/is-equal.esm.js +1 -1
  143. package/dist/utils/is-equal.js +1 -1
  144. package/dist/utils/memoize-last.esm.js +1 -1
  145. package/dist/utils/memoize-last.js +1 -1
  146. package/package.json +1 -1
  147. package/dist/chunks/index-C-beNpP0.esm.js.map +0 -1
  148. package/dist/chunks/index-CbWdmBet.esm.js.map +0 -1
  149. package/dist/chunks/index-DGQ-LQxP.esm.js +0 -2
  150. package/dist/chunks/index-DGQ-LQxP.esm.js.map +0 -1
  151. package/dist/chunks/index-DI43alE-.esm.js +0 -2
  152. package/dist/chunks/index-DI43alE-.esm.js.map +0 -1
  153. package/dist/chunks/index-DhtZDPvk.esm.js.map +0 -1
  154. package/dist/chunks/index-DoF3KFUY.esm.js.map +0 -1
  155. package/dist/chunks/index-GcpuX_TZ.esm.js.map +0 -1
  156. package/dist/chunks/index-NrjNZmBX.esm.js +0 -2
  157. package/dist/chunks/index-NrjNZmBX.esm.js.map +0 -1
  158. package/dist/chunks/index-VCyr24SS.esm.js +0 -2
  159. package/dist/chunks/index-VCyr24SS.esm.js.map +0 -1
  160. package/dist/chunks/index-utCqipvB.esm.js.map +0 -1
  161. package/dist/chunks/lodash-7H4x2457.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm.js";import{d as $}from"../chunks/lodash-7H4x2457.esm.js";import{p as G}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as w,a as V}from"../chunks/share-button-BX-kWAd0.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as _,g as H,S as j}from"../chunks/routes-Bgj1HGgx.esm.js";import{u as b,A as K,d as g,a as q,_ as J,i as t}from"../chunks/localize-C25pEGnx.esm.js";import{c as Q,d as X,e as Z}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{_ as ee}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as ie}from"../utils/makeApiKeyHeader.js";import{c as te}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as ae}from"../utils/logger.js";import{c as re}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-DK30KQ6n.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var ne=Object.defineProperty,oe=(i,e,r,m)=>{for(var a=void 0,c=i.length-1,d;c>=0;c--)(d=i[c])&&(a=d(e,r,a)||a);return a&&ne(e,r,a),a};class C extends T{constructor(){super(...arguments),this.infoText=""}static get styles(){return L`
1
+ import{h as $,f as w,y as p,g as l,t as _,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as S,b as H}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as j}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as A,a as K}from"../chunks/share-button-DNgyupow.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as q,g as J,S as Q}from"../chunks/routes-D-AQPRne.esm.js";import{u as b,A as X,d as g,a as Z,_ as ee,i as r}from"../chunks/localize-C25pEGnx.esm.js";import{c as ie,d as te,e as ae}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{_ as re}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as ne}from"../utils/makeApiKeyHeader.js";import{c as oe}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as se}from"../utils/logger.js";import{c as ce}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-Bj6RA_H6.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var pe=Object.defineProperty,le=(i,e,n,m)=>{for(var a=void 0,t=i.length-1,d;t>=0;t--)(d=i[t])&&(a=d(e,n,a)||a);return a&&pe(e,n,a),a};class P extends ${constructor(){super(...arguments),this.infoText=""}static get styles(){return w`
2
2
  sl-badge::part(base) {
3
3
  background-color: var(--beam-pillLabel-color-background, #000);
4
4
  color: var(--beam-pillLabel-color, #fff);
@@ -11,7 +11,7 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
11
11
  text-transform: var(--beam-pillLabel-text-transform, none);
12
12
  padding: var(--beam-pillLabel-padding, 3px 4px);
13
13
  }
14
- `}render(){return p`<sl-badge pill aria-label="${this.infoText}">${this.infoText}</sl-badge>`}}oe([l({type:String})],C.prototype,"infoText"),customElements.get("beam-info-pill")||customElements.define("beam-info-pill",C);const se={"--beam-pillLabel-color-background":"#0A323C","--beam-pillLabel-color":"#fff","--beam-pillLabel-border":"#0A323C","--beam-pillLabel-border-width":"1px","--beam-pillLabel-font-size":"10px","--beam-pillLabel-font":"inherit","--beam-pillLabel-font-weight":"400","--beam-pillLabel-text-transform":"none","--beam-pillLabel-font-style":"italic","--beam-pillLabel-padding":"3px 4px"},o={en:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},fr:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},de:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},es:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},it:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},pl:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"}};var ce=Object.defineProperty,s=(i,e,r,m)=>{for(var a=void 0,c=i.length-1,d;c>=0;c--)(d=i[c])&&(a=d(e,r,a)||a);return a&&ce(e,r,a),a};class n extends T{constructor(){super(...arguments),this.baseUrl=_,this.lang="en",this.debug=!1,this.draftConfig=!1,this.isMobile=window.innerWidth<720,this.getImpactData=async()=>(Z(["apiKey","beamUserId","nonprofitId"],this),await H({baseUrl:this.baseUrl,headers:ie(this.apiKey),queryParams:{nonprofitId:this.nonprofitId,beamUserId:this.beamUserId,personalImpactLimit:1,communityImpactLimit:1,storeId:this.storeId,widgetName:"subscription-impact",draftConfig:this.draftConfig,version:"1.0.0",lang:this.configLang}})),this.impactDataController=new K(this,this.getImpactData),this.evaluateBreakPoints=$(()=>{this.isMobile=window.innerWidth<768},50,{maxWait:50,leading:!0}),this.resizeElements=$(()=>{w(this.impactTitleRefs),w(this.impactLinkRefs)},50,{maxWait:50,leading:!0})}get configLang(){return j[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.evaluateBreakPoints)}async updated(e){const r=["baseUrl","storeId","apiKey","beamUserId","lang"];for(const m of r)if(e.has(m)){await this.impactDataController.exec();break}this.resizeElements(),await this.handleFontLoad(this.resizeElements)}disconnectedCallback(){window.removeEventListener("resize",this.resizeElements),document.fonts.removeEventListener("loadingdone",this.resizeElements),super.disconnectedCallback()}async handleFontLoad(e){if(document.fonts.status==="loading")return await document.fonts.ready.catch(r=>ae.error(r)),e()}get cssVariables(){const e={...G,...V,...se,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"12px","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-subscriptionImpact-impactCards-maxWidth":"900px","--beam-subscriptionImpact-headerContainer-desktop-textAlign":"left","--beam-subscriptionImpact-headerContainer-mobile-textAlign":"center","--beam-subscriptionImpact-descriptionContainer-marginTop":"10px","--beam-subscriptionImpact-cardContainer-marginTop":"15px","--beam-subscriptionImpact-cardContainer-gap":"20px","--beam-subscriptionImpact-card-borderRadius":"8px","--beam-subscriptionImpact-card-background":"#f8fbfb","--beam-subscriptionImpact-card-padding":"24px 28px 24px 24px","--beam-subscriptionImpact-card-marginRight":"0px","--beam-subscriptionImpact-card-marginTop":"10px","--beam-subscriptionImpact-card-gap":"5px","--beam-subscriptionImpact-cardTitle-textAlign":"left","--beam-subscriptionImpact-cardTitle-letterSpacing":"0.36px","--beam-SubscriptionImpact-cardStyle":"'selected_icon'","--beam-SubscriptionImpact-imagePosition":"'inline'","--beam-subscriptionImpact-imageBlock-height":"120px","--beam-subscriptionImpact-imageBlock-borderRadius":"4px","--beam-subscriptionImpact-iconBackground-width":"50px","--beam-subscriptionImpact-iconBackground-height":"50px","--beam-subscriptionImpact-iconBackground-borderRadius":"50%","--beam-subscriptionImpact-iconBackground-background":"#0a323c","--beam-subscriptionImpact-icon-height":"28px","--beam-subscriptionImpact-icon-margin":"auto","--beam-subscriptionImpact-icon-padding":"10px","--beam-subscriptionImpact-icon-borderRadius":"4px","--beam-subscriptionImpact-image-borderRadius":"4px","--beam-subscriptionImpact-image-minHeight":"0","--beam-subscriptionImpact-image-minWidth":"0","--beam-subscriptionImpact-cardDescription-padding":"0px","--beam-subscriptionImpact-card-progressBar-padding":"8px 0px","--beam-subscriptionImpact-card-progressBarLabel-gap":"10px","--beam-subscriptionImpact-card-progressBarLabel-textAlign":"right","--beam-subscriptionImpact-card-progressBarLabel-marginLeft":"8px","--beam-subscriptionImpact-card-linkContainer-textAlign":"left","--beam-subscriptionImpact-card-impactLink-textDecoration":"underline","--beam-subscriptionImpact-footer-textAlign":"center","--beam-subscriptionImpact-footer-marginTop":"10px","--beam-subscriptionImpact-share-button-icon-name":"share-2","--beam-subscriptionImpact-learnAbout-arrow-display":"block",...g("--beam-subscriptionImpact-title",{fontSize:"20px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),...g("--beam-subscriptionImpact-descriptionPrefix",{fontSize:"14px",fontWeight:"800",lineHeight:"138%",fontStyle:"normal",color:"#2f302d",marginTop:"9px"}),...g("--beam-subscriptionImpact-description",{fontSize:"14px",fontWeight:"400",lineHeight:"138%",fontStyle:"normal",color:"#2f302d",marginTop:"9px"}),...g("--beam-subscriptionImpact-cardTitle",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",fontStyle:"normal",textTransform:"uppercase"}),...g("--beam-subscriptionImpact-cardDescription",{fontSize:"12px",fontWeight:"400",lineHeight:"18.2px",fontStyle:"normal",color:"#454a47"}),...g("--beam-subscriptionImpact-card-progressBarLabel",{fontSize:"10px",color:"#878a92"}),...g("--beam-subscriptionImpact-card-impactLink",{fontSize:"12px",fontWeight:"600",lineHeight:"16px",fontStyle:"normal",color:"#454a47",marginTop:"auto"})},r=this.impactDataController?.data?.config?.web?.theme||{},m={...e,...r};return Object.assign(Object.create({toCSS(){return q(this)}}),m)}render(){const{data:e,loading:r,error:m}=this.impactDataController;if(r)return ee();if(m||e==null)return this.debug?J({error:m||new Error("No data")}):"";const a=e.chain.name,c=t(this.configLang,e.personal[0].nonprofit.cause||""),d=e.personal[0].nonprofit.name,u=e.personal[0]?.impact?.goalProgressPercentage||0,h=e.community[0].impact?.goalProgressPercentage||0,S=`${u}% ${t(this.configLang,e?.config?.web?.additionalStrings?.percentFunded||"")||o[this.configLang].percentFunded()}`,A=`${h}% ${t(this.configLang,e?.config?.web?.additionalStrings?.percentFunded||"")||o[this.configLang].percentFunded()}`,P=e.community[0]?.imageUrl||"",B=e.personal[0]?.imageUrl||"",F=e.personal[0].nonprofit.causeIconUrl,W=e.personal[0].nonprofit.causeIconSelectedUrl,f=this.cssVariables["--beam-SubscriptionImpact-cardStyle"],x=this.cssVariables["--beam-SubscriptionImpact-imagePosition"],y=f==="'image'",I=f==="'selected_icon'"?W:F,E=y?P:I,N=y?B:I,Y=t(this.configLang,e?.config?.web?.dynamicStrings?.ctaTitle||"")||o[this.configLang].title({causeName:c}),z=t(this.configLang,e?.config?.web?.dynamicStrings?.ctaFutureTenseTitle||"")||o[this.configLang].futureTenseTitle({causeName:c}),U=e.store.communityPageURL,R=e.personal[0].nonprofit?.website,M=e.personal[0].share?.imageUrl,D=this.cssVariables["--beam-SubscriptionImpact-share-button-icon-name"]||"share-2",v=this.cssVariables["--beam-subscriptionImpact-learnAbout-arrow-display"]==="none";return p`
14
+ `}render(){return p`<sl-badge pill aria-label="${this.infoText}">${this.infoText}</sl-badge>`}}le([l({type:String})],P.prototype,"infoText"),customElements.get("beam-info-pill")||customElements.define("beam-info-pill",P);const me={"--beam-pillLabel-color-background":"#0A323C","--beam-pillLabel-color":"#fff","--beam-pillLabel-border":"#0A323C","--beam-pillLabel-border-width":"1px","--beam-pillLabel-font-size":"10px","--beam-pillLabel-font":"inherit","--beam-pillLabel-font-weight":"400","--beam-pillLabel-text-transform":"none","--beam-pillLabel-font-style":"italic","--beam-pillLabel-padding":"3px 4px"},s={en:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},fr:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},de:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},es:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},it:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"},pl:{title:({causeName:i=""})=>`Your Subscription is Going Towards ${i} With Every Order`,futureTenseTitle:({causeName:i=""})=>`Your Subscription Will Go Towards ${i} With Every Order`,ctaMessagePrefix:()=>"At no extra cost, ",description:({nonprofit:i=""})=>`1% of every order will be donated to ${i} on your behalf.`,personalImpactTitle:()=>"You're Currently Funding",futureTensePersonalImpactTitle:()=>"You\u2019ll Be Funding",communityImpactTitle:()=>"Together We're Funding",personalLinkCopy:({nonprofit:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,communityLinkCopy:({brandName:i="",hideArrow:e=!1})=>`Learn about ${i}${e?"":" \u203A"}`,percentFunded:()=>"funded",progressPillText:()=>"\u{1F389} Impact begins once order is charged"}};var de=Object.defineProperty,c=(i,e,n,m)=>{for(var a=void 0,t=i.length-1,d;t>=0;t--)(d=i[t])&&(a=d(e,n,a)||a);return a&&de(e,n,a),a};class o extends ${constructor(){super(...arguments),this.baseUrl=q,this.lang="en",this.debug=!1,this.draftConfig=!1,this.isMobile=window.innerWidth<720,this.getImpactData=async()=>(ae(["apiKey","beamUserId","nonprofitId"],this),await J({baseUrl:this.baseUrl,headers:ne(this.apiKey),queryParams:{nonprofitId:this.nonprofitId,beamUserId:this.beamUserId,personalImpactLimit:1,communityImpactLimit:1,storeId:this.storeId,widgetName:"subscription-impact",draftConfig:this.draftConfig,version:"1.0.0",lang:this.configLang}})),this.impactDataController=new X(this,this.getImpactData),this.evaluateBreakPoints=S(()=>{this.isMobile=window.innerWidth<768},50,{maxWait:50,leading:!0}),this.resizeElements=S(()=>{A(this.impactTitleRefs),A(this.impactLinkRefs)},50,{maxWait:50,leading:!0})}get configLang(){return Q[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.evaluateBreakPoints)}async updated(e){const n=["baseUrl","storeId","apiKey","beamUserId","lang"];for(const m of n)if(e.has(m)){await this.impactDataController.exec();break}this.resizeElements(),await this.handleFontLoad(this.resizeElements)}disconnectedCallback(){window.removeEventListener("resize",this.resizeElements),document.fonts.removeEventListener("loadingdone",this.resizeElements),super.disconnectedCallback()}async handleFontLoad(e){if(document.fonts.status==="loading")return await document.fonts.ready.catch(n=>se.error(n)),e()}get cssVariables(){const e={...j,...K,...me,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"12px","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-subscriptionImpact-impactCards-maxWidth":"900px","--beam-subscriptionImpact-headerContainer-desktop-textAlign":"left","--beam-subscriptionImpact-headerContainer-mobile-textAlign":"center","--beam-subscriptionImpact-descriptionContainer-marginTop":"10px","--beam-subscriptionImpact-cardContainer-marginTop":"15px","--beam-subscriptionImpact-cardContainer-gap":"20px","--beam-subscriptionImpact-card-borderRadius":"8px","--beam-subscriptionImpact-card-background":"#f8fbfb","--beam-subscriptionImpact-card-padding":"24px 28px 24px 24px","--beam-subscriptionImpact-card-marginRight":"0px","--beam-subscriptionImpact-card-marginTop":"10px","--beam-subscriptionImpact-card-gap":"5px","--beam-subscriptionImpact-cardTitle-textAlign":"left","--beam-subscriptionImpact-cardTitle-letterSpacing":"0.36px","--beam-SubscriptionImpact-cardStyle":"'selected_icon'","--beam-SubscriptionImpact-imagePosition":"'inline'","--beam-subscriptionImpact-imageBlock-height":"120px","--beam-subscriptionImpact-imageBlock-borderRadius":"4px","--beam-subscriptionImpact-iconBackground-width":"50px","--beam-subscriptionImpact-iconBackground-height":"50px","--beam-subscriptionImpact-iconBackground-borderRadius":"50%","--beam-subscriptionImpact-iconBackground-background":"#0a323c","--beam-subscriptionImpact-icon-height":"28px","--beam-subscriptionImpact-icon-margin":"auto","--beam-subscriptionImpact-icon-padding":"10px","--beam-subscriptionImpact-icon-borderRadius":"4px","--beam-subscriptionImpact-image-borderRadius":"4px","--beam-subscriptionImpact-image-minHeight":"0","--beam-subscriptionImpact-image-minWidth":"0","--beam-subscriptionImpact-cardDescription-padding":"0px","--beam-subscriptionImpact-card-progressBar-padding":"8px 0px","--beam-subscriptionImpact-card-progressBarLabel-gap":"10px","--beam-subscriptionImpact-card-progressBarLabel-textAlign":"right","--beam-subscriptionImpact-card-progressBarLabel-marginLeft":"8px","--beam-subscriptionImpact-card-linkContainer-textAlign":"left","--beam-subscriptionImpact-card-impactLink-textDecoration":"underline","--beam-subscriptionImpact-footer-textAlign":"center","--beam-subscriptionImpact-footer-marginTop":"10px","--beam-subscriptionImpact-share-button-icon-name":"share-2","--beam-subscriptionImpact-learnAbout-arrow-display":"block",...g("--beam-subscriptionImpact-title",{fontSize:"20px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),...g("--beam-subscriptionImpact-descriptionPrefix",{fontSize:"14px",fontWeight:"800",lineHeight:"138%",fontStyle:"normal",color:"#2f302d",marginTop:"9px"}),...g("--beam-subscriptionImpact-description",{fontSize:"14px",fontWeight:"400",lineHeight:"138%",fontStyle:"normal",color:"#2f302d",marginTop:"9px"}),...g("--beam-subscriptionImpact-cardTitle",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",fontStyle:"normal",textTransform:"uppercase"}),...g("--beam-subscriptionImpact-cardDescription",{fontSize:"12px",fontWeight:"400",lineHeight:"18.2px",fontStyle:"normal",color:"#454a47"}),...g("--beam-subscriptionImpact-card-progressBarLabel",{fontSize:"10px",color:"#878a92"}),...g("--beam-subscriptionImpact-card-impactLink",{fontSize:"12px",fontWeight:"600",lineHeight:"16px",fontStyle:"normal",color:"#454a47",marginTop:"auto"})},n=this.impactDataController?.data?.config?.web?.theme||{},m={...e,...n};return Object.assign(Object.create({toCSS(){return Z(this)}}),m)}render(){const{data:e,loading:n,error:m}=this.impactDataController;if(n)return re();if(m||e==null)return this.debug?ee({error:m||new Error("No data")}):"";const a=e.community[0],t=e.personal[0],d=e.chain.name,f=r(this.configLang,t?.nonprofit.cause||""),h=t?.nonprofit.name,x=t?.impact?.goalProgressPercentage||0,y=!(t?.impact?.goalProgressPercentage>0||t?.impact?.goalCompletionText?.length>0),I=a?.impact?.goalProgressPercentage||0,B=`${x}% ${r(this.configLang,e?.config?.web?.additionalStrings?.percentFunded||"")||s[this.configLang].percentFunded()}`,F=`${I}% ${r(this.configLang,e?.config?.web?.additionalStrings?.percentFunded||"")||s[this.configLang].percentFunded()}`,W=a?.imageUrl||"",E=t?.imageUrl||"",N=t?.nonprofit.causeIconUrl,U=t?.nonprofit.causeIconSelectedUrl,u=this.cssVariables["--beam-SubscriptionImpact-cardStyle"],T=this.cssVariables["--beam-SubscriptionImpact-imagePosition"],v=u==="'image'",L=u==="'selected_icon'"?U:N,Y=v?W:L,z=v?E:L,R=r(this.configLang,e?.config?.web?.dynamicStrings?.ctaTitle||"")||s[this.configLang].title({causeName:f}),M=r(this.configLang,e?.config?.web?.dynamicStrings?.ctaFutureTenseTitle||"")||s[this.configLang].futureTenseTitle({causeName:f}),D=H(e.store.communityPageURL)?e.chain.communityImpactUrl:e.store.communityPageURL,O=t?.nonprofit?.website,G=t?.share?.imageUrl,V=this.cssVariables["--beam-SubscriptionImpact-share-button-icon-name"]||"share-2",k=this.cssVariables["--beam-subscriptionImpact-learnAbout-arrow-display"]==="none";return p`
15
15
  <style>
16
16
  :host {
17
17
  ${this.cssVariables.toCSS()}
@@ -24,16 +24,16 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
24
24
  id="beam-subscriptionImpact-header-container"
25
25
  >
26
26
  <h3 class="title" part="title" id="beam-subscriptionImpact-title">
27
- ${u<=1?z:Y}
27
+ ${y?M:R}
28
28
  </h3>
29
29
  <div
30
30
  class="description-container ${this.isMobile?"header-container-mobile description-mobile":"header-container-desktop description-desktop"}"
31
31
  >
32
32
  <span class="description-prefix" part="description">
33
- ${t(this.configLang,e?.config?.web?.additionalStrings?.ctaMessagePrefix||"")||o[this.configLang].ctaMessagePrefix()}
33
+ ${r(this.configLang,e?.config?.web?.additionalStrings?.ctaMessagePrefix||"")||s[this.configLang].ctaMessagePrefix()}
34
34
  </span>
35
35
  <span class="description" part="description" id="beam-subscriptionImpact-description">
36
- ${t(this.configLang,e?.config?.web?.dynamicStrings?.ctaMessage||"")||o[this.configLang].description({nonprofit:d})}
36
+ ${r(this.configLang,e?.config?.web?.dynamicStrings?.ctaMessage||"")||s[this.configLang].description({nonprofit:h})}
37
37
  </span>
38
38
  </div>
39
39
  </div>
@@ -42,21 +42,21 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
42
42
  class="card-container cardGrid ${this.isMobile?"card-container-mobile":""}"
43
43
  id="beam-subscriptionImpact-card-container"
44
44
  >
45
- ${this.renderInlineCard({title:u<=1?t(this.configLang,e?.config?.web?.additionalStrings?.futureTensePersonalImpactTitle||"")||o[this.configLang].futureTensePersonalImpactTitle():t(this.configLang,e?.config?.web?.additionalStrings?.personalImpactTitle||"")||o[this.configLang].personalImpactTitle(),image:N,description:t(this.configLang,e.personal[0]?.impact?.description||""),link:R,linkText:t(this.configLang,e?.config?.web?.dynamicStrings?.personalLinkCopy||"")||o[this.configLang].personalLinkCopy({nonprofit:d,hideArrow:v}),progressBarValue:u,progressBarText:S,infoPill:t(this.configLang,e?.config?.web?.additionalStrings?.progressPillText||"")||o[this.configLang].progressPillText(),imageType:f,cardType:"personal",imagePosition:x})}
46
- ${this.renderInlineCard({title:t(this.configLang,e?.config?.web?.additionalStrings?.communityImpactTitle||"")||o[this.configLang].communityImpactTitle(),image:E,description:t(this.configLang,e.community[0].impact?.description||""),link:U,linkText:t(this.configLang,e?.config?.web?.dynamicStrings?.communityLinkCopy||"")||o[this.configLang].communityLinkCopy({brandName:a,hideArrow:v}),progressBarValue:h,progressBarText:A,infoPill:t(this.configLang,e?.config?.web?.additionalStrings?.progressPillText||"")||o[this.configLang].progressPillText(),imageType:f,cardType:"community",imagePosition:x})}
45
+ ${this.renderInlineCard({title:y?r(this.configLang,e?.config?.web?.additionalStrings?.futureTensePersonalImpactTitle||"")||s[this.configLang].futureTensePersonalImpactTitle():r(this.configLang,e?.config?.web?.additionalStrings?.personalImpactTitle||"")||s[this.configLang].personalImpactTitle(),image:z,description:r(this.configLang,t?.impact?.description||""),link:O,linkText:r(this.configLang,e?.config?.web?.dynamicStrings?.personalLinkCopy||"")||s[this.configLang].personalLinkCopy({nonprofit:h,hideArrow:k}),progressBarValue:x,progressBarText:B,infoPill:r(this.configLang,e?.config?.web?.additionalStrings?.progressPillText||"")||s[this.configLang].progressPillText(),imageType:u,cardType:"personal",imagePosition:T})}
46
+ ${this.renderInlineCard({title:r(this.configLang,e?.config?.web?.additionalStrings?.communityImpactTitle||"")||s[this.configLang].communityImpactTitle(),image:Y,description:r(this.configLang,a?.impact?.description||""),link:D,linkText:r(this.configLang,e?.config?.web?.dynamicStrings?.communityLinkCopy||"")||s[this.configLang].communityLinkCopy({brandName:d,hideArrow:k}),progressBarValue:I,progressBarText:F,infoPill:r(this.configLang,e?.config?.web?.additionalStrings?.progressPillText||"")||s[this.configLang].progressPillText(),imageType:u,cardType:"community",imagePosition:T})}
47
47
  </div>
48
48
  </div>
49
49
  <div class="footer" part="social-share">
50
50
  <beam-share-button
51
- imageUrl="${M}"
52
- brandName="${a}"
53
- shareIcon="${D}"
54
- buttonText="${t(this.configLang,e?.config?.web?.additionalStrings?.shareButtonText||"")}"
51
+ imageUrl="${G}"
52
+ brandName="${d}"
53
+ shareIcon="${V}"
54
+ buttonText="${r(this.configLang,e?.config?.web?.additionalStrings?.shareButtonText||"")}"
55
55
  configLang="${this.configLang}"
56
56
  ></beam-share-button>
57
57
  </div>
58
58
  </div>
59
- `}renderInlineCard(e){const r=e.progressBarValue!==void 0&&e.progressBarValue<=1&&e.cardType==="personal";return p`
59
+ `}renderInlineCard(e){const n=e.progressBarValue!==void 0&&e.progressBarValue<=1&&e.cardType==="personal";return p`
60
60
  <div class="inline-card ${this.isMobile?"":"inline-card-desktop"}">
61
61
  ${e.image&&e.imagePosition==="'block'"&&e.imageType==="'image'"?p` <div
62
62
  class="image-block-container"
@@ -76,7 +76,7 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
76
76
  <div class="impact-container" part="details">
77
77
  <p class="card-description">${e.description}</p>
78
78
  <div class="card-progress-bar">
79
- ${r?p` <beam-info-pill infoText="${e.infoPill}"></beam-info-pill> `:p`
79
+ ${n?p` <beam-info-pill infoText="${e.infoPill}"></beam-info-pill> `:p`
80
80
  <beam-progress-bar value="${e.progressBarValue}" style="flex: 1 0;"> </beam-progress-bar>
81
81
  <span class="details-funding-progress-label"> ${e.progressBarText} </span>
82
82
  `}
@@ -87,7 +87,7 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
87
87
  </div>
88
88
  </div>
89
89
  </div>
90
- `}}n.tagName="beam-subscription-impact",n.styles=[Q,te,L`
90
+ `}}o.tagName="beam-subscription-impact",o.styles=[ie,oe,w`
91
91
  :host {
92
92
  display: block;
93
93
  font-family: var(--beam-fontFamily);
@@ -267,5 +267,5 @@ import{h as T,f as L,y as p,g as l,t as O,p as k}from"../chunks/lit-WqMxC_PA.esm
267
267
  text-align: var(--beam-subscriptionImpact-footer-textAlign);
268
268
  margin-top: var(--beam-subscriptionImpact-footer-marginTop);
269
269
  }
270
- `,re({gap:"var(--beam-subscriptionImpact-cardContainer-gap)",itemMinWidth:"250px",columnCount:"2"})],s([l({type:String,reflect:!0})],n.prototype,"baseUrl"),s([l({type:String,reflect:!1})],n.prototype,"apiKey"),s([l({type:Number})],n.prototype,"storeId"),s([l({type:String,reflect:!0})],n.prototype,"nonprofitId"),s([l({type:String,reflect:!0})],n.prototype,"beamUserId"),s([l({type:String})],n.prototype,"lang"),s([l({type:Boolean})],n.prototype,"debug"),s([l({type:Boolean})],n.prototype,"draftConfig"),s([O()],n.prototype,"isMobile"),s([k(".card-title")],n.prototype,"impactTitleRefs"),s([k(".impact-link")],n.prototype,"impactLinkRefs"),X(n);export{n as BeamSubscriptionImpact};
270
+ `,ce({gap:"var(--beam-subscriptionImpact-cardContainer-gap)",itemMinWidth:"250px",columnCount:"2"})],c([l({type:String,reflect:!0})],o.prototype,"baseUrl"),c([l({type:String,reflect:!1})],o.prototype,"apiKey"),c([l({type:Number})],o.prototype,"storeId"),c([l({type:String,reflect:!0})],o.prototype,"nonprofitId"),c([l({type:String,reflect:!0})],o.prototype,"beamUserId"),c([l({type:String})],o.prototype,"lang"),c([l({type:Boolean})],o.prototype,"debug"),c([l({type:Boolean})],o.prototype,"draftConfig"),c([_()],o.prototype,"isMobile"),c([C(".card-title")],o.prototype,"impactTitleRefs"),c([C(".impact-link")],o.prototype,"impactLinkRefs"),te(o);export{o as BeamSubscriptionImpact};
271
271
  //# sourceMappingURL=subscription-impact.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-impact.js","sources":["../../src/shared/components/info-pill.ts","../../src/components/subscription-impact/strings.ts","../../src/components/subscription-impact/index.ts"],"sourcesContent":["import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport \"@shoelace-style/shoelace/dist/components/badge/badge.js\";\n\nexport class BeamInfoPill extends LitElement {\n @property({ type: String }) infoText = \"\";\n\n static get styles() {\n return css`\n sl-badge::part(base) {\n background-color: var(--beam-pillLabel-color-background, #000);\n color: var(--beam-pillLabel-color, #fff);\n border: var(--beam-pillLabel-border-width, 3px) solid var(--beam-pillLabel-border, #000);\n border-radius: 18.37px;\n font-family: var(--beam-pillLabel-font, inherit);\n font-size: var(--beam-pillLabel-font-size, 12px);\n font-style: var(--beam-pillLabel-font-style, italic);\n font-weight: var(--beam-pillLabel-font-weight, bold);\n text-transform: var(--beam-pillLabel-text-transform, none);\n padding: var(--beam-pillLabel-padding, 3px 4px);\n }\n `;\n }\n\n render() {\n return html`<sl-badge pill aria-label=\"${this.infoText}\">${this.infoText}</sl-badge>`;\n }\n}\n\ncustomElements.get(\"beam-info-pill\") || customElements.define(\"beam-info-pill\", BeamInfoPill);\n\nexport const infoPillLabelConfigDefaults = {\n \"--beam-pillLabel-color-background\": \"#0A323C\",\n \"--beam-pillLabel-color\": \"#fff\",\n \"--beam-pillLabel-border\": \"#0A323C\",\n \"--beam-pillLabel-border-width\": \"1px\",\n \"--beam-pillLabel-font-size\": \"10px\",\n \"--beam-pillLabel-font\": \"inherit\",\n \"--beam-pillLabel-font-weight\": \"400\",\n \"--beam-pillLabel-text-transform\": \"none\",\n \"--beam-pillLabel-font-style\": \"italic\",\n \"--beam-pillLabel-padding\": \"3px 4px\",\n} as const;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-info-pill\": BeamInfoPill;\n }\n}\n","export const strings = {\n en: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n fr: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n de: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n es: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n it: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n pl: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n};\n","import { html, css, LitElement, PropertyValues } from \"lit\";\nimport debounce from \"lodash-es/debounce\";\nimport { property } from \"lit/decorators/property.js\";\nimport { queryAll } from \"lit/decorators/query-all.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { shareButtonConfigDefaults } from \"../../shared/components/share-button\";\nimport { infoPillLabelConfigDefaults } from \"../../shared/components/info-pill\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES } from \"../../api-sdk/constants\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { syncElementHeights } from \"../../shared/sync-element-heights\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { TId, TNumericId, TUrl } from \"../../shared/types\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { getImpact } from \"../../api-sdk/v3/routes\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { logger } from \"../../utils/logger\";\nimport { cssCardGrid } from \"../../shared/fragments/css-card-grid\";\nimport { strings } from \"./strings\";\nimport \"../../shared/components/progress-bar\";\nimport \"../../shared/components/share-button\";\nimport \"../../shared/components/info-pill\";\n\ntype RequiredConfig = {\n apiKey: string;\n nonprofitId: TNumericId;\n beamUserId: TId;\n};\n\nexport class BeamSubscriptionImpact extends LitElement {\n static tagName = \"beam-subscription-impact\";\n\n @property({ type: String, reflect: true }) public baseUrl: TUrl = DEFAULT_BASE_URL;\n @property({ type: String, reflect: false }) apiKey?: RequiredConfig[\"apiKey\"];\n @property({ type: Number }) storeId?: number;\n @property({ type: String, reflect: true }) nonprofitId?: RequiredConfig[\"nonprofitId\"];\n @property({ type: String, reflect: true }) beamUserId?: RequiredConfig[\"beamUserId\"];\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n @property({ type: Boolean }) public debug = false;\n @property({ type: Boolean }) public draftConfig = false;\n\n @state() private isMobile = window.innerWidth < 720;\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n getImpactData = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"beamUserId\", \"nonprofitId\"], this)) throw new MissingConfig();\n const res = await getImpact({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n nonprofitId: this.nonprofitId,\n beamUserId: this.beamUserId,\n personalImpactLimit: 1,\n communityImpactLimit: 1,\n storeId: this.storeId,\n widgetName: \"subscription-impact\",\n draftConfig: this.draftConfig,\n version: \"1.0.0\",\n lang: this.configLang,\n },\n });\n\n return res;\n };\n\n private impactDataController = new AsyncController<typeof this.getImpactData>(this, this.getImpactData);\n\n @queryAll(\".card-title\")\n impactTitleRefs!: HTMLElement[];\n\n @queryAll(\".impact-link\")\n impactLinkRefs!: HTMLElement[];\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener(\"resize\", this.evaluateBreakPoints);\n }\n\n async updated(changedProperties: PropertyValues): Promise<void> {\n // Fires on first load as props go from undefined => value\n const requireNewDataProps = [\"baseUrl\", \"storeId\", \"apiKey\", \"beamUserId\", \"lang\"];\n for (const prop of requireNewDataProps) {\n if (changedProperties.has(prop)) {\n await this.impactDataController.exec();\n break;\n }\n }\n this.resizeElements(); // Handle layout shifts immediately\n await this.handleFontLoad(this.resizeElements); // If content change triggered font load, resize again\n }\n\n disconnectedCallback() {\n window.removeEventListener(\"resize\", this.resizeElements);\n document.fonts.removeEventListener(\"loadingdone\", this.resizeElements);\n super.disconnectedCallback();\n }\n\n /**\n * Safari does not fire loading events on the document FontFaceSet, but it does implement the .ready Promise\n * Call this method to wait for font loads that may be triggered by content changes\n */\n async handleFontLoad<T = any>(callback: () => T | void) {\n if (document.fonts.status === \"loading\") {\n await document.fonts.ready.catch((e) => logger.error(e));\n return callback();\n }\n }\n\n public get cssVariables() {\n const defaults = {\n ...progressBarConfigDefaults,\n ...shareButtonConfigDefaults,\n ...infoPillLabelConfigDefaults,\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"12px\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-subscriptionImpact-impactCards-maxWidth\": \"900px\",\n \"--beam-subscriptionImpact-headerContainer-desktop-textAlign\": \"left\",\n \"--beam-subscriptionImpact-headerContainer-mobile-textAlign\": \"center\",\n \"--beam-subscriptionImpact-descriptionContainer-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-cardContainer-marginTop\": \"15px\",\n \"--beam-subscriptionImpact-cardContainer-gap\": \"20px\",\n \"--beam-subscriptionImpact-card-borderRadius\": \"8px\",\n \"--beam-subscriptionImpact-card-background\": \"#f8fbfb\",\n \"--beam-subscriptionImpact-card-padding\": \"24px 28px 24px 24px\",\n \"--beam-subscriptionImpact-card-marginRight\": \"0px\",\n \"--beam-subscriptionImpact-card-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-card-gap\": \"5px\",\n \"--beam-subscriptionImpact-cardTitle-textAlign\": \"left\",\n \"--beam-subscriptionImpact-cardTitle-letterSpacing\": \"0.36px\",\n \"--beam-SubscriptionImpact-cardStyle\": \"'selected_icon'\",\n \"--beam-SubscriptionImpact-imagePosition\": \"'inline'\",\n \"--beam-subscriptionImpact-imageBlock-height\": \"120px\",\n \"--beam-subscriptionImpact-imageBlock-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-iconBackground-width\": \"50px\",\n \"--beam-subscriptionImpact-iconBackground-height\": \"50px\",\n \"--beam-subscriptionImpact-iconBackground-borderRadius\": \"50%\",\n \"--beam-subscriptionImpact-iconBackground-background\": \"#0a323c\",\n \"--beam-subscriptionImpact-icon-height\": \"28px\",\n \"--beam-subscriptionImpact-icon-margin\": \"auto\",\n \"--beam-subscriptionImpact-icon-padding\": \"10px\",\n \"--beam-subscriptionImpact-icon-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-image-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-image-minHeight\": \"0\",\n \"--beam-subscriptionImpact-image-minWidth\": \"0\",\n \"--beam-subscriptionImpact-cardDescription-padding\": \"0px\",\n \"--beam-subscriptionImpact-card-progressBar-padding\": \"8px 0px\",\n \"--beam-subscriptionImpact-card-progressBarLabel-gap\": \"10px\",\n \"--beam-subscriptionImpact-card-progressBarLabel-textAlign\": \"right\",\n \"--beam-subscriptionImpact-card-progressBarLabel-marginLeft\": \"8px\",\n \"--beam-subscriptionImpact-card-linkContainer-textAlign\": \"left\",\n \"--beam-subscriptionImpact-card-impactLink-textDecoration\": \"underline\",\n \"--beam-subscriptionImpact-footer-textAlign\": \"center\",\n \"--beam-subscriptionImpact-footer-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-share-button-icon-name\": \"share-2\",\n \"--beam-subscriptionImpact-learnAbout-arrow-display\": \"block\",\n ...defineCustomText(\"--beam-subscriptionImpact-title\", {\n fontSize: \"20px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-descriptionPrefix\", {\n fontSize: \"14px\",\n fontWeight: \"800\",\n lineHeight: \"138%\",\n fontStyle: \"normal\",\n color: \"#2f302d\",\n marginTop: \"9px\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-description\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"138%\",\n fontStyle: \"normal\",\n color: \"#2f302d\",\n marginTop: \"9px\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-cardTitle\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n textTransform: \"uppercase\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-cardDescription\", {\n fontSize: \"12px\",\n fontWeight: \"400\",\n lineHeight: \"18.2px\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-card-progressBarLabel\", {\n fontSize: \"10px\",\n color: \"#878a92\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-card-impactLink\", {\n fontSize: \"12px\",\n fontWeight: \"600\",\n lineHeight: \"16px\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n marginTop: \"auto\",\n }),\n };\n const remoteConfig = this.impactDataController?.data?.config?.web?.theme || {};\n const config = {\n ...defaults,\n ...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 evaluateBreakPoints = debounce(\n () => {\n this.isMobile = window.innerWidth < 768;\n },\n 50,\n { maxWait: 50, leading: true }\n );\n\n resizeElements = debounce(\n () => {\n syncElementHeights(this.impactTitleRefs);\n syncElementHeights(this.impactLinkRefs);\n },\n 50,\n { maxWait: 50, leading: true }\n );\n\n render() {\n const { data, loading, error } = this.impactDataController;\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\n const brandName = data.chain.name;\n const causeName = localizeUserString(this.configLang, data.personal[0].nonprofit.cause || \"\");\n const nonprofitName = data.personal[0].nonprofit.name;\n const personalProgressPercentage = data.personal[0]?.impact?.goalProgressPercentage || 0;\n const communityProgressPercentage = data.community[0].impact?.goalProgressPercentage || 0;\n const personalProgressDescription = `${personalProgressPercentage}% ${\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"percentFunded\"] || \"\") ||\n strings[this.configLang].percentFunded()\n }`;\n const communityProgressDescription = `${communityProgressPercentage}% ${\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"percentFunded\"] || \"\") ||\n strings[this.configLang].percentFunded()\n }`;\n const communityImage = data.community[0]?.imageUrl || \"\";\n const personalImage = data.personal[0]?.imageUrl || \"\";\n const unselectedIcon = data.personal[0].nonprofit.causeIconUrl;\n const selectedIcon = data.personal[0].nonprofit.causeIconSelectedUrl;\n const cardStyle = this.cssVariables[\"--beam-SubscriptionImpact-cardStyle\"];\n const imagePosition = this.cssVariables[\"--beam-SubscriptionImpact-imagePosition\"];\n const isImage = cardStyle === \"'image'\";\n const iconImage = cardStyle === \"'selected_icon'\" ? selectedIcon : unselectedIcon;\n const communityCardImage = isImage ? communityImage : iconImage;\n const personalCardImage = isImage ? personalImage : iconImage;\n const personalTitle =\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaTitle\"] || \"\") ||\n strings[this.configLang].title({ causeName });\n\n const personalFutureTenseTitle =\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaFutureTenseTitle\"] || \"\") ||\n strings[this.configLang].futureTenseTitle({ causeName });\n const communityLink = data.store.communityPageURL;\n const personalLink = data.personal[0].nonprofit?.website;\n const shareImage = data.personal[0].share?.imageUrl;\n const shareIcon = this.cssVariables[\"--beam-SubscriptionImpact-share-button-icon-name\"] || \"share-2\";\n const hideLearnAboutArrow = this.cssVariables[\"--beam-subscriptionImpact-learnAbout-arrow-display\"] === \"none\";\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n\n <div class=\"widget-container\" id=\"beam-subscription-impact-container\">\n <div\n class=\"header-container ${this.isMobile ? \"header-container-mobile\" : \"header-container-desktop\"}\"\n id=\"beam-subscriptionImpact-header-container\"\n >\n <h3 class=\"title\" part=\"title\" id=\"beam-subscriptionImpact-title\">\n ${personalProgressPercentage <= 1 ? personalFutureTenseTitle : personalTitle}\n </h3>\n <div\n class=\"description-container ${this.isMobile\n ? \"header-container-mobile description-mobile\"\n : \"header-container-desktop description-desktop\"}\"\n >\n <span class=\"description-prefix\" part=\"description\">\n ${localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"ctaMessagePrefix\"] || \"\") ||\n strings[this.configLang].ctaMessagePrefix()}\n </span>\n <span class=\"description\" part=\"description\" id=\"beam-subscriptionImpact-description\">\n ${localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaMessage\"] || \"\") ||\n strings[this.configLang].description({ nonprofit: nonprofitName })}\n </span>\n </div>\n </div>\n <div class=\"root\">\n <div\n class=\"card-container cardGrid ${this.isMobile ? \"card-container-mobile\" : \"\"}\"\n id=\"beam-subscriptionImpact-card-container\"\n >\n ${this.renderInlineCard({\n title:\n personalProgressPercentage <= 1\n ? localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"futureTensePersonalImpactTitle\"] || \"\"\n ) || strings[this.configLang].futureTensePersonalImpactTitle()\n : localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"personalImpactTitle\"] || \"\"\n ) || strings[this.configLang].personalImpactTitle(),\n image: personalCardImage,\n description: localizeUserString(this.configLang, data.personal[0]?.impact?.description || \"\"),\n link: personalLink,\n linkText:\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"personalLinkCopy\"] || \"\") ||\n strings[this.configLang].personalLinkCopy({ nonprofit: nonprofitName, hideArrow: hideLearnAboutArrow }),\n progressBarValue: personalProgressPercentage,\n progressBarText: personalProgressDescription,\n infoPill:\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"progressPillText\"] || \"\") ||\n strings[this.configLang].progressPillText(),\n imageType: cardStyle,\n cardType: \"personal\",\n imagePosition: imagePosition,\n })}\n ${this.renderInlineCard({\n title:\n localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"communityImpactTitle\"] || \"\"\n ) || strings[this.configLang].communityImpactTitle(),\n image: communityCardImage,\n description: localizeUserString(this.configLang, data.community[0].impact?.description || \"\"),\n link: communityLink,\n linkText:\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"communityLinkCopy\"] || \"\") ||\n strings[this.configLang].communityLinkCopy({ brandName: brandName, hideArrow: hideLearnAboutArrow }),\n progressBarValue: communityProgressPercentage,\n progressBarText: communityProgressDescription,\n infoPill:\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"progressPillText\"] || \"\") ||\n strings[this.configLang].progressPillText(),\n imageType: cardStyle,\n cardType: \"community\",\n imagePosition: imagePosition,\n })}\n </div>\n </div>\n <div class=\"footer\" part=\"social-share\">\n <beam-share-button\n imageUrl=\"${shareImage}\"\n brandName=\"${brandName}\"\n shareIcon=\"${shareIcon}\"\n buttonText=\"${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"shareButtonText\"] || \"\"\n )}\"\n configLang=\"${this.configLang}\"\n ></beam-share-button>\n </div>\n </div>\n `;\n }\n\n renderInlineCard(impactCard: {\n title: string;\n description: string;\n image: string | null;\n link: string | null;\n linkText: string;\n progressBarValue?: number;\n progressBarText?: string;\n infoPill: string;\n imageType: \"'image'\" | \"'icon'\" | \"'selected_icon'\";\n cardType: \"personal\" | \"community\";\n imagePosition: \"'inline'\" | \"'block'\";\n }) {\n const isPersonalProgressBarValueLow =\n impactCard.progressBarValue !== undefined &&\n impactCard.progressBarValue <= 1 &&\n impactCard.cardType === \"personal\";\n return html`\n <div class=\"inline-card ${this.isMobile ? \"\" : \"inline-card-desktop\"}\">\n ${impactCard.image && impactCard.imagePosition === \"'block'\" && impactCard.imageType === \"'image'\"\n ? html` <div\n class=\"image-block-container\"\n style=\"background: url('${impactCard.image}');background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\"\n ></div>`\n : \"\"}\n <h4 class=\"card-title\">${impactCard.title}</h4>\n <div class=\"inline-content\">\n ${impactCard.image && impactCard.imagePosition === \"'inline'\"\n ? html`${impactCard.imageType === \"'icon'\" || impactCard.imageType === \"'selected_icon'\"\n ? html` <div class=\"icon-container\">\n <div class=\"icon-background\">\n <img src=\"${impactCard.image}\" alt=\"\" role=\"presentation\" class=\"icon\" />\n </div>\n </div>`\n : html` <div class=\"image-container\">\n <img src=\"${impactCard.image}\" alt=\"\" role=\"presentation\" class=\"image\" />\n </div>`}`\n : \"\"}\n <div class=\"impact-container\" part=\"details\">\n <p class=\"card-description\">${impactCard.description}</p>\n <div class=\"card-progress-bar\">\n ${isPersonalProgressBarValueLow\n ? html` <beam-info-pill infoText=\"${impactCard.infoPill}\"></beam-info-pill> `\n : html`\n <beam-progress-bar value=\"${impactCard.progressBarValue}\" style=\"flex: 1 0;\"> </beam-progress-bar>\n <span class=\"details-funding-progress-label\"> ${impactCard.progressBarText} </span>\n `}\n </div>\n <div class=\"link-container\">\n <a href=\"${impactCard.link}\" class=\"impact-link\" target=\"_blank\">${impactCard.linkText}</a>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\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 max-width: var(--beam-subscriptionImpact-impactCards-maxWidth);\n word-break: normal;\n }\n\n /* subscription impact container and header css */\n\n .header-container-mobile {\n text-align: var(--beam-subscriptionImpact-headerContainer-mobile-textAlign);\n }\n\n .header-container-desktop {\n text-align: var(--beam-subscriptionImpact-headerContainer-desktop-textAlign);\n }\n\n .title {\n ${useCustomText(\"--beam-subscriptionImpact-title\")};\n }\n\n .description-container {\n margin-top: var(--beam-subscriptionImpact-descriptionContainer-marginTop);\n }\n\n .description-prefix {\n ${useCustomText(\"--beam-subscriptionImpact-descriptionPrefix\")};\n }\n\n .description {\n ${useCustomText(\"--beam-subscriptionImpact-description\")};\n }\n\n .root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex-shrink: 0;\n }\n\n .card-container {\n margin-top: var(--beam-subscriptionImpact-cardContainer-marginTop);\n gap: var(--beam-subscriptionImpact-cardContainer-gap);\n display: grid;\n justify-content: center;\n }\n\n .card-container-mobile {\n flex-direction: column;\n }\n\n /* subscription impact card css */\n .inline-card {\n border-radius: var(--beam-subscriptionImpact-card-borderRadius);\n background: var(--beam-subscriptionImpact-card-background);\n padding: var(--beam-subscriptionImpact-card-padding);\n flex: 2;\n flex-direction: column;\n margin-top: var(--beam-subscriptionImpact-card-marginTop);\n display: flex;\n gap: var(--beam-subscriptionImpact-card-gap);\n }\n\n .inline-card-desktop {\n margin-right: var(--beam-subscriptionImpact-card-marginRight);\n }\n\n .inline-content {\n display: flex;\n flex-direction: row;\n gap: 15px;\n height: 100%;\n }\n\n .card-title {\n text-align: var(--beam-subscriptionImpact-cardTitle-textAlign);\n letter-spacing: var(--beam-subscriptionImpact-cardTitle-letterSpacing);\n ${useCustomText(\"--beam-subscriptionImpact-cardTitle\")};\n }\n\n .icon-container {\n flex: 0;\n flex-direction: column;\n }\n\n .image-block-container {\n flex-shrink: 0;\n height: var(--beam-subscriptionImpact-imageBlock-height);\n border-radius: var(--beam-subscriptionImpact-imageBlock-borderRadius);\n }\n\n .image-container {\n flex: 4;\n display: flex;\n flex-direction: column;\n }\n\n .icon-background {\n width: var(--beam-subscriptionImpact-iconBackground-width);\n height: var(--beam-subscriptionImpact-iconBackground-height);\n border-radius: var(--beam-subscriptionImpact-iconBackground-borderRadius);\n padding: var(--beam-subscriptionImpact-icon-padding);\n overflow: hidden;\n background: var(--beam-subscriptionImpact-iconBackground-background);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .icon {\n height: var(--beam-subscriptionImpact-icon-height);\n display: block;\n margin: var(--beam-subscriptionImpact-icon-margin);\n border-radius: var(--beam-subscriptionImpact-icon-borderRadius);\n }\n\n .image {\n flex: 4;\n height: auto;\n width: 100%;\n object-fit: cover;\n min-height: var(--beam-subscriptionImpact-image-minHeight);\n min-width: var(--beam-subscriptionImpact-image-minWidth);\n border-radius: var(--beam-subscriptionImpact-image-borderRadius);\n }\n\n .impact-container {\n flex: 1 1 67%;\n height: 100%;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-content: stretch;\n align-items: stretch;\n position: relative;\n }\n\n .card-description {\n flex-grow: 1;\n padding: var(--beam-subscriptionImpact-cardDescription-padding);\n ${useCustomText(\"--beam-subscriptionImpact-cardDescription\")};\n }\n\n .card-progress-bar {\n flex: 1 1;\n display: flex;\n align-items: center;\n padding: var(--beam-subscriptionImpact-card-progressBar-padding);\n }\n\n .details-funding-progress-label {\n gap: var(--beam-subscriptionImpact-card-progressBarLabel-gap);\n white-space: nowrap;\n text-align: var(--beam-subscriptionImpact-card-progressBarLabel-textAlign);\n flex: 0 1;\n margin-left: var(--beam-subscriptionImpact-card-progressBarLabel-marginLeft);\n ${useCustomText(\"--beam-subscriptionImpact-card-progressBarLabel\")};\n }\n\n .link-container {\n text-align: var(--beam-subscriptionImpact-card-linkContainer-textAlign);\n }\n\n .impact-link {\n display: inline-block;\n text-decoration-line: var(--beam-subscriptionImpact-card-impactLink-textDecoration);\n ${useCustomText(\"--beam-subscriptionImpact-card-impactLink\")};\n }\n\n /* share footer */\n .footer {\n text-align: var(--beam-subscriptionImpact-footer-textAlign);\n margin-top: var(--beam-subscriptionImpact-footer-marginTop);\n }\n `,\n cssCardGrid({\n gap: \"var(--beam-subscriptionImpact-cardContainer-gap)\",\n itemMinWidth: \"250px\",\n columnCount: \"2\",\n }),\n ];\n}\n\ndefineCustomElement(BeamSubscriptionImpact);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-impact\": BeamSubscriptionImpact;\n }\n}\n"],"names":["BeamInfoPill","LitElement","css","html","__decorateClass","property","infoPillLabelConfigDefaults","strings","causeName","nonprofit","hideArrow","brandName","BeamSubscriptionImpact","DEFAULT_BASE_URL","enforceConfig","getImpact","makeApiKeyHeader","AsyncController","debounce","syncElementHeights","SUPPORTED_LANGUAGES","changedProperties","requireNewDataProps","prop","callback","e","logger","defaults","progressBarConfigDefaults","shareButtonConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","data","loading","error","_loading","_errorMessage","localizeUserString","nonprofitName","personalProgressPercentage","communityProgressPercentage","personalProgressDescription","communityProgressDescription","communityImage","personalImage","unselectedIcon","selectedIcon","cardStyle","imagePosition","isImage","iconImage","communityCardImage","personalCardImage","personalTitle","personalFutureTenseTitle","communityLink","personalLink","shareImage","shareIcon","hideLearnAboutArrow","impactCard","isPersonalProgressBarValueLow","cssReset","cssResponsiveUtils","useCustomText","cssCardGrid","state","queryAll","defineCustomElement"],"mappings":"ulCAIO,MAAMA,UAAqBC,CAAW,CAAtC,aAAA,CAAA,MAAA,GAAA,SAAA,EACuB,cAAW,EAEvC,CAAA,WAAW,QAAS,CAClB,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,KAcT,CAEA,QAAS,CACP,OAAOC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AAO,CAAC,CAAA,EARfO,EAQwB,UAAA,MAAA,EACCR,EAAA,CAAnCC,EAAS,CAAE,KAAM,OAAQ,CAAC,CAAA,EAThBO,EASyB,UAAA,OAAA,EACAR,EAAA,CAAnCC,EAAS,CAAE,KAAM,OAAQ,CAAC,CAVhB,EAAAO,EAUyB,UAEnBR,aAAAA,EAAAA,EAAA,CAAhBgE,EAAAA,CAZU,EAAAxD,EAYM,UA8BjBR,UAAAA,EAAAA,EAAA,CADCiE,EAAS,aAAa,CAAA,EAzCZzD,EA0CX,UAAA,iBAAA,EAGAR,EAAA,CADCiE,EAAS,cAAc,CA5Cb,EAAAzD,EA6CX,UAmjBF0D,gBAAAA,EAAAA,EAAoB1D,CAAsB"}
1
+ {"version":3,"file":"subscription-impact.js","sources":["../../src/shared/components/info-pill.ts","../../src/components/subscription-impact/strings.ts","../../src/components/subscription-impact/index.ts"],"sourcesContent":["import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport \"@shoelace-style/shoelace/dist/components/badge/badge.js\";\n\nexport class BeamInfoPill extends LitElement {\n @property({ type: String }) infoText = \"\";\n\n static get styles() {\n return css`\n sl-badge::part(base) {\n background-color: var(--beam-pillLabel-color-background, #000);\n color: var(--beam-pillLabel-color, #fff);\n border: var(--beam-pillLabel-border-width, 3px) solid var(--beam-pillLabel-border, #000);\n border-radius: 18.37px;\n font-family: var(--beam-pillLabel-font, inherit);\n font-size: var(--beam-pillLabel-font-size, 12px);\n font-style: var(--beam-pillLabel-font-style, italic);\n font-weight: var(--beam-pillLabel-font-weight, bold);\n text-transform: var(--beam-pillLabel-text-transform, none);\n padding: var(--beam-pillLabel-padding, 3px 4px);\n }\n `;\n }\n\n render() {\n return html`<sl-badge pill aria-label=\"${this.infoText}\">${this.infoText}</sl-badge>`;\n }\n}\n\ncustomElements.get(\"beam-info-pill\") || customElements.define(\"beam-info-pill\", BeamInfoPill);\n\nexport const infoPillLabelConfigDefaults = {\n \"--beam-pillLabel-color-background\": \"#0A323C\",\n \"--beam-pillLabel-color\": \"#fff\",\n \"--beam-pillLabel-border\": \"#0A323C\",\n \"--beam-pillLabel-border-width\": \"1px\",\n \"--beam-pillLabel-font-size\": \"10px\",\n \"--beam-pillLabel-font\": \"inherit\",\n \"--beam-pillLabel-font-weight\": \"400\",\n \"--beam-pillLabel-text-transform\": \"none\",\n \"--beam-pillLabel-font-style\": \"italic\",\n \"--beam-pillLabel-padding\": \"3px 4px\",\n} as const;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-info-pill\": BeamInfoPill;\n }\n}\n","export const strings = {\n en: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n fr: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n de: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n es: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n it: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n pl: {\n title: ({ causeName = \"\" }) => `Your Subscription is Going Towards ${causeName} With Every Order`,\n futureTenseTitle: ({ causeName = \"\" }) => `Your Subscription Will Go Towards ${causeName} With Every Order`,\n ctaMessagePrefix: () => `At no extra cost, `,\n description: ({ nonprofit = \"\" }) => `1% of every order will be donated to ${nonprofit} on your behalf.`,\n personalImpactTitle: () => `You're Currently Funding`,\n futureTensePersonalImpactTitle: () => `You’ll Be Funding`,\n communityImpactTitle: () => `Together We're Funding`,\n personalLinkCopy: ({ nonprofit = \"\", hideArrow = false }) => `Learn about ${nonprofit}${!hideArrow ? \" ›\" : \"\"}`,\n communityLinkCopy: ({ brandName = \"\", hideArrow = false }) => `Learn about ${brandName}${!hideArrow ? \" ›\" : \"\"}`,\n percentFunded: () => `funded`,\n progressPillText: () => `🎉 Impact begins once order is charged`,\n },\n};\n","import { html, css, LitElement, PropertyValues } from \"lit\";\nimport debounce from \"lodash-es/debounce\";\nimport isNil from \"lodash-es/isNil\";\nimport { property } from \"lit/decorators/property.js\";\nimport { queryAll } from \"lit/decorators/query-all.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { shareButtonConfigDefaults } from \"../../shared/components/share-button\";\nimport { infoPillLabelConfigDefaults } from \"../../shared/components/info-pill\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES } from \"../../api-sdk/constants\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { syncElementHeights } from \"../../shared/sync-element-heights\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { makeApiKeyHeader } from \"../../utils/makeApiKeyHeader\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { TId, TNumericId, TUrl } from \"../../shared/types\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { getImpact } from \"../../api-sdk/v3/routes\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { logger } from \"../../utils/logger\";\nimport { cssCardGrid } from \"../../shared/fragments/css-card-grid\";\nimport { strings } from \"./strings\";\nimport \"../../shared/components/progress-bar\";\nimport \"../../shared/components/share-button\";\nimport \"../../shared/components/info-pill\";\n\ntype RequiredConfig = {\n apiKey: string;\n nonprofitId: TNumericId;\n beamUserId: TId;\n};\n\nexport class BeamSubscriptionImpact extends LitElement {\n static tagName = \"beam-subscription-impact\";\n\n @property({ type: String, reflect: true }) public baseUrl: TUrl = DEFAULT_BASE_URL;\n @property({ type: String, reflect: false }) apiKey?: RequiredConfig[\"apiKey\"];\n @property({ type: Number }) storeId?: number;\n @property({ type: String, reflect: true }) nonprofitId?: RequiredConfig[\"nonprofitId\"];\n @property({ type: String, reflect: true }) beamUserId?: RequiredConfig[\"beamUserId\"];\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n @property({ type: Boolean }) public debug = false;\n @property({ type: Boolean }) public draftConfig = false;\n\n @state() private isMobile = window.innerWidth < 720;\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n getImpactData = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"beamUserId\", \"nonprofitId\"], this)) throw new MissingConfig();\n const res = await getImpact({\n baseUrl: this.baseUrl,\n headers: makeApiKeyHeader(this.apiKey),\n queryParams: {\n nonprofitId: this.nonprofitId,\n beamUserId: this.beamUserId,\n personalImpactLimit: 1,\n communityImpactLimit: 1,\n storeId: this.storeId,\n widgetName: \"subscription-impact\",\n draftConfig: this.draftConfig,\n version: \"1.0.0\",\n lang: this.configLang,\n },\n });\n\n return res;\n };\n\n private impactDataController = new AsyncController<typeof this.getImpactData>(this, this.getImpactData);\n\n @queryAll(\".card-title\")\n impactTitleRefs!: HTMLElement[];\n\n @queryAll(\".impact-link\")\n impactLinkRefs!: HTMLElement[];\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener(\"resize\", this.evaluateBreakPoints);\n }\n\n async updated(changedProperties: PropertyValues): Promise<void> {\n // Fires on first load as props go from undefined => value\n const requireNewDataProps = [\"baseUrl\", \"storeId\", \"apiKey\", \"beamUserId\", \"lang\"];\n for (const prop of requireNewDataProps) {\n if (changedProperties.has(prop)) {\n await this.impactDataController.exec();\n break;\n }\n }\n this.resizeElements(); // Handle layout shifts immediately\n await this.handleFontLoad(this.resizeElements); // If content change triggered font load, resize again\n }\n\n disconnectedCallback() {\n window.removeEventListener(\"resize\", this.resizeElements);\n document.fonts.removeEventListener(\"loadingdone\", this.resizeElements);\n super.disconnectedCallback();\n }\n\n /**\n * Safari does not fire loading events on the document FontFaceSet, but it does implement the .ready Promise\n * Call this method to wait for font loads that may be triggered by content changes\n */\n async handleFontLoad<T = any>(callback: () => T | void) {\n if (document.fonts.status === \"loading\") {\n await document.fonts.ready.catch((e) => logger.error(e));\n return callback();\n }\n }\n\n public get cssVariables() {\n const defaults = {\n ...progressBarConfigDefaults,\n ...shareButtonConfigDefaults,\n ...infoPillLabelConfigDefaults,\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"12px\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-subscriptionImpact-impactCards-maxWidth\": \"900px\",\n \"--beam-subscriptionImpact-headerContainer-desktop-textAlign\": \"left\",\n \"--beam-subscriptionImpact-headerContainer-mobile-textAlign\": \"center\",\n \"--beam-subscriptionImpact-descriptionContainer-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-cardContainer-marginTop\": \"15px\",\n \"--beam-subscriptionImpact-cardContainer-gap\": \"20px\",\n \"--beam-subscriptionImpact-card-borderRadius\": \"8px\",\n \"--beam-subscriptionImpact-card-background\": \"#f8fbfb\",\n \"--beam-subscriptionImpact-card-padding\": \"24px 28px 24px 24px\",\n \"--beam-subscriptionImpact-card-marginRight\": \"0px\",\n \"--beam-subscriptionImpact-card-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-card-gap\": \"5px\",\n \"--beam-subscriptionImpact-cardTitle-textAlign\": \"left\",\n \"--beam-subscriptionImpact-cardTitle-letterSpacing\": \"0.36px\",\n \"--beam-SubscriptionImpact-cardStyle\": \"'selected_icon'\",\n \"--beam-SubscriptionImpact-imagePosition\": \"'inline'\",\n \"--beam-subscriptionImpact-imageBlock-height\": \"120px\",\n \"--beam-subscriptionImpact-imageBlock-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-iconBackground-width\": \"50px\",\n \"--beam-subscriptionImpact-iconBackground-height\": \"50px\",\n \"--beam-subscriptionImpact-iconBackground-borderRadius\": \"50%\",\n \"--beam-subscriptionImpact-iconBackground-background\": \"#0a323c\",\n \"--beam-subscriptionImpact-icon-height\": \"28px\",\n \"--beam-subscriptionImpact-icon-margin\": \"auto\",\n \"--beam-subscriptionImpact-icon-padding\": \"10px\",\n \"--beam-subscriptionImpact-icon-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-image-borderRadius\": \"4px\",\n \"--beam-subscriptionImpact-image-minHeight\": \"0\",\n \"--beam-subscriptionImpact-image-minWidth\": \"0\",\n \"--beam-subscriptionImpact-cardDescription-padding\": \"0px\",\n \"--beam-subscriptionImpact-card-progressBar-padding\": \"8px 0px\",\n \"--beam-subscriptionImpact-card-progressBarLabel-gap\": \"10px\",\n \"--beam-subscriptionImpact-card-progressBarLabel-textAlign\": \"right\",\n \"--beam-subscriptionImpact-card-progressBarLabel-marginLeft\": \"8px\",\n \"--beam-subscriptionImpact-card-linkContainer-textAlign\": \"left\",\n \"--beam-subscriptionImpact-card-impactLink-textDecoration\": \"underline\",\n \"--beam-subscriptionImpact-footer-textAlign\": \"center\",\n \"--beam-subscriptionImpact-footer-marginTop\": \"10px\",\n \"--beam-subscriptionImpact-share-button-icon-name\": \"share-2\",\n \"--beam-subscriptionImpact-learnAbout-arrow-display\": \"block\",\n ...defineCustomText(\"--beam-subscriptionImpact-title\", {\n fontSize: \"20px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n textTransform: \"capitalize\",\n fontStyle: \"normal\",\n color: \"#0a323c\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-descriptionPrefix\", {\n fontSize: \"14px\",\n fontWeight: \"800\",\n lineHeight: \"138%\",\n fontStyle: \"normal\",\n color: \"#2f302d\",\n marginTop: \"9px\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-description\", {\n fontSize: \"14px\",\n fontWeight: \"400\",\n lineHeight: \"138%\",\n fontStyle: \"normal\",\n color: \"#2f302d\",\n marginTop: \"9px\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-cardTitle\", {\n fontSize: \"12px\",\n fontWeight: \"bold\",\n lineHeight: \"120%\",\n fontStyle: \"normal\",\n textTransform: \"uppercase\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-cardDescription\", {\n fontSize: \"12px\",\n fontWeight: \"400\",\n lineHeight: \"18.2px\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-card-progressBarLabel\", {\n fontSize: \"10px\",\n color: \"#878a92\",\n }),\n ...defineCustomText(\"--beam-subscriptionImpact-card-impactLink\", {\n fontSize: \"12px\",\n fontWeight: \"600\",\n lineHeight: \"16px\",\n fontStyle: \"normal\",\n color: \"#454a47\",\n marginTop: \"auto\",\n }),\n };\n const remoteConfig = this.impactDataController?.data?.config?.web?.theme || {};\n const config = {\n ...defaults,\n ...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 evaluateBreakPoints = debounce(\n () => {\n this.isMobile = window.innerWidth < 768;\n },\n 50,\n { maxWait: 50, leading: true }\n );\n\n resizeElements = debounce(\n () => {\n syncElementHeights(this.impactTitleRefs);\n syncElementHeights(this.impactLinkRefs);\n },\n 50,\n { maxWait: 50, leading: true }\n );\n\n render() {\n const { data, loading, error } = this.impactDataController;\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\n const communityImpact = data.community[0];\n const personalImpact = data.personal[0];\n\n const brandName = data.chain.name;\n const causeName = localizeUserString(this.configLang, personalImpact?.nonprofit.cause || \"\");\n const nonprofitName = personalImpact?.nonprofit.name;\n const personalProgressPercentage = personalImpact?.impact?.goalProgressPercentage || 0;\n const isPersonalProgressNotStarted = !(\n personalImpact?.impact?.goalProgressPercentage > 0 || personalImpact?.impact?.goalCompletionText?.length > 0\n );\n const communityProgressPercentage = communityImpact?.impact?.goalProgressPercentage || 0;\n const personalProgressDescription = `${personalProgressPercentage}% ${\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"percentFunded\"] || \"\") ||\n strings[this.configLang].percentFunded()\n }`;\n const communityProgressDescription = `${communityProgressPercentage}% ${\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"percentFunded\"] || \"\") ||\n strings[this.configLang].percentFunded()\n }`;\n const communityImage = communityImpact?.imageUrl || \"\";\n const personalImage = personalImpact?.imageUrl || \"\";\n const unselectedIcon = personalImpact?.nonprofit.causeIconUrl;\n const selectedIcon = personalImpact?.nonprofit.causeIconSelectedUrl;\n const cardStyle = this.cssVariables[\"--beam-SubscriptionImpact-cardStyle\"];\n const imagePosition = this.cssVariables[\"--beam-SubscriptionImpact-imagePosition\"];\n const isImage = cardStyle === \"'image'\";\n const iconImage = cardStyle === \"'selected_icon'\" ? selectedIcon : unselectedIcon;\n const communityCardImage = isImage ? communityImage : iconImage;\n const personalCardImage = isImage ? personalImage : iconImage;\n const personalTitle =\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaTitle\"] || \"\") ||\n strings[this.configLang].title({ causeName });\n\n const personalFutureTenseTitle =\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaFutureTenseTitle\"] || \"\") ||\n strings[this.configLang].futureTenseTitle({ causeName });\n const communityLink = isNil(data.store.communityPageURL)\n ? data.chain.communityImpactUrl\n : data.store.communityPageURL;\n const personalLink = personalImpact?.nonprofit?.website;\n const shareImage = personalImpact?.share?.imageUrl;\n const shareIcon = this.cssVariables[\"--beam-SubscriptionImpact-share-button-icon-name\"] || \"share-2\";\n const hideLearnAboutArrow = this.cssVariables[\"--beam-subscriptionImpact-learnAbout-arrow-display\"] === \"none\";\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n\n <div class=\"widget-container\" id=\"beam-subscription-impact-container\">\n <div\n class=\"header-container ${this.isMobile ? \"header-container-mobile\" : \"header-container-desktop\"}\"\n id=\"beam-subscriptionImpact-header-container\"\n >\n <h3 class=\"title\" part=\"title\" id=\"beam-subscriptionImpact-title\">\n ${isPersonalProgressNotStarted ? personalFutureTenseTitle : personalTitle}\n </h3>\n <div\n class=\"description-container ${this.isMobile\n ? \"header-container-mobile description-mobile\"\n : \"header-container-desktop description-desktop\"}\"\n >\n <span class=\"description-prefix\" part=\"description\">\n ${localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"ctaMessagePrefix\"] || \"\") ||\n strings[this.configLang].ctaMessagePrefix()}\n </span>\n <span class=\"description\" part=\"description\" id=\"beam-subscriptionImpact-description\">\n ${localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"ctaMessage\"] || \"\") ||\n strings[this.configLang].description({ nonprofit: nonprofitName })}\n </span>\n </div>\n </div>\n <div class=\"root\">\n <div\n class=\"card-container cardGrid ${this.isMobile ? \"card-container-mobile\" : \"\"}\"\n id=\"beam-subscriptionImpact-card-container\"\n >\n ${this.renderInlineCard({\n title: isPersonalProgressNotStarted\n ? localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"futureTensePersonalImpactTitle\"] || \"\"\n ) || strings[this.configLang].futureTensePersonalImpactTitle()\n : localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"personalImpactTitle\"] || \"\"\n ) || strings[this.configLang].personalImpactTitle(),\n image: personalCardImage,\n description: localizeUserString(this.configLang, personalImpact?.impact?.description || \"\"),\n link: personalLink,\n linkText:\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"personalLinkCopy\"] || \"\") ||\n strings[this.configLang].personalLinkCopy({ nonprofit: nonprofitName, hideArrow: hideLearnAboutArrow }),\n progressBarValue: personalProgressPercentage,\n progressBarText: personalProgressDescription,\n infoPill:\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"progressPillText\"] || \"\") ||\n strings[this.configLang].progressPillText(),\n imageType: cardStyle,\n cardType: \"personal\",\n imagePosition: imagePosition,\n })}\n ${this.renderInlineCard({\n title:\n localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"communityImpactTitle\"] || \"\"\n ) || strings[this.configLang].communityImpactTitle(),\n image: communityCardImage,\n description: localizeUserString(this.configLang, communityImpact?.impact?.description || \"\"),\n link: communityLink,\n linkText:\n localizeUserString(this.configLang, data?.config?.web?.dynamicStrings?.[\"communityLinkCopy\"] || \"\") ||\n strings[this.configLang].communityLinkCopy({ brandName: brandName, hideArrow: hideLearnAboutArrow }),\n progressBarValue: communityProgressPercentage,\n progressBarText: communityProgressDescription,\n infoPill:\n localizeUserString(this.configLang, data?.config?.web?.additionalStrings?.[\"progressPillText\"] || \"\") ||\n strings[this.configLang].progressPillText(),\n imageType: cardStyle,\n cardType: \"community\",\n imagePosition: imagePosition,\n })}\n </div>\n </div>\n <div class=\"footer\" part=\"social-share\">\n <beam-share-button\n imageUrl=\"${shareImage}\"\n brandName=\"${brandName}\"\n shareIcon=\"${shareIcon}\"\n buttonText=\"${localizeUserString(\n this.configLang,\n data?.config?.web?.additionalStrings?.[\"shareButtonText\"] || \"\"\n )}\"\n configLang=\"${this.configLang}\"\n ></beam-share-button>\n </div>\n </div>\n `;\n }\n\n renderInlineCard(impactCard: {\n title: string;\n description: string;\n image: string | null;\n link: string | null;\n linkText: string;\n progressBarValue?: number;\n progressBarText?: string;\n infoPill: string;\n imageType: \"'image'\" | \"'icon'\" | \"'selected_icon'\";\n cardType: \"personal\" | \"community\";\n imagePosition: \"'inline'\" | \"'block'\";\n }) {\n const isPersonalProgressBarValueLow =\n impactCard.progressBarValue !== undefined &&\n impactCard.progressBarValue <= 1 &&\n impactCard.cardType === \"personal\";\n return html`\n <div class=\"inline-card ${this.isMobile ? \"\" : \"inline-card-desktop\"}\">\n ${impactCard.image && impactCard.imagePosition === \"'block'\" && impactCard.imageType === \"'image'\"\n ? html` <div\n class=\"image-block-container\"\n style=\"background: url('${impactCard.image}');background-position: center;\n background-size: cover;\n background-repeat: no-repeat;\"\n ></div>`\n : \"\"}\n <h4 class=\"card-title\">${impactCard.title}</h4>\n <div class=\"inline-content\">\n ${impactCard.image && impactCard.imagePosition === \"'inline'\"\n ? html`${impactCard.imageType === \"'icon'\" || impactCard.imageType === \"'selected_icon'\"\n ? html` <div class=\"icon-container\">\n <div class=\"icon-background\">\n <img src=\"${impactCard.image}\" alt=\"\" role=\"presentation\" class=\"icon\" />\n </div>\n </div>`\n : html` <div class=\"image-container\">\n <img src=\"${impactCard.image}\" alt=\"\" role=\"presentation\" class=\"image\" />\n </div>`}`\n : \"\"}\n <div class=\"impact-container\" part=\"details\">\n <p class=\"card-description\">${impactCard.description}</p>\n <div class=\"card-progress-bar\">\n ${isPersonalProgressBarValueLow\n ? html` <beam-info-pill infoText=\"${impactCard.infoPill}\"></beam-info-pill> `\n : html`\n <beam-progress-bar value=\"${impactCard.progressBarValue}\" style=\"flex: 1 0;\"> </beam-progress-bar>\n <span class=\"details-funding-progress-label\"> ${impactCard.progressBarText} </span>\n `}\n </div>\n <div class=\"link-container\">\n <a href=\"${impactCard.link}\" class=\"impact-link\" target=\"_blank\">${impactCard.linkText}</a>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\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 max-width: var(--beam-subscriptionImpact-impactCards-maxWidth);\n word-break: normal;\n }\n\n /* subscription impact container and header css */\n\n .header-container-mobile {\n text-align: var(--beam-subscriptionImpact-headerContainer-mobile-textAlign);\n }\n\n .header-container-desktop {\n text-align: var(--beam-subscriptionImpact-headerContainer-desktop-textAlign);\n }\n\n .title {\n ${useCustomText(\"--beam-subscriptionImpact-title\")};\n }\n\n .description-container {\n margin-top: var(--beam-subscriptionImpact-descriptionContainer-marginTop);\n }\n\n .description-prefix {\n ${useCustomText(\"--beam-subscriptionImpact-descriptionPrefix\")};\n }\n\n .description {\n ${useCustomText(\"--beam-subscriptionImpact-description\")};\n }\n\n .root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n flex-shrink: 0;\n }\n\n .card-container {\n margin-top: var(--beam-subscriptionImpact-cardContainer-marginTop);\n gap: var(--beam-subscriptionImpact-cardContainer-gap);\n display: grid;\n justify-content: center;\n }\n\n .card-container-mobile {\n flex-direction: column;\n }\n\n /* subscription impact card css */\n .inline-card {\n border-radius: var(--beam-subscriptionImpact-card-borderRadius);\n background: var(--beam-subscriptionImpact-card-background);\n padding: var(--beam-subscriptionImpact-card-padding);\n flex: 2;\n flex-direction: column;\n margin-top: var(--beam-subscriptionImpact-card-marginTop);\n display: flex;\n gap: var(--beam-subscriptionImpact-card-gap);\n }\n\n .inline-card-desktop {\n margin-right: var(--beam-subscriptionImpact-card-marginRight);\n }\n\n .inline-content {\n display: flex;\n flex-direction: row;\n gap: 15px;\n height: 100%;\n }\n\n .card-title {\n text-align: var(--beam-subscriptionImpact-cardTitle-textAlign);\n letter-spacing: var(--beam-subscriptionImpact-cardTitle-letterSpacing);\n ${useCustomText(\"--beam-subscriptionImpact-cardTitle\")};\n }\n\n .icon-container {\n flex: 0;\n flex-direction: column;\n }\n\n .image-block-container {\n flex-shrink: 0;\n height: var(--beam-subscriptionImpact-imageBlock-height);\n border-radius: var(--beam-subscriptionImpact-imageBlock-borderRadius);\n }\n\n .image-container {\n flex: 4;\n display: flex;\n flex-direction: column;\n }\n\n .icon-background {\n width: var(--beam-subscriptionImpact-iconBackground-width);\n height: var(--beam-subscriptionImpact-iconBackground-height);\n border-radius: var(--beam-subscriptionImpact-iconBackground-borderRadius);\n padding: var(--beam-subscriptionImpact-icon-padding);\n overflow: hidden;\n background: var(--beam-subscriptionImpact-iconBackground-background);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .icon {\n height: var(--beam-subscriptionImpact-icon-height);\n display: block;\n margin: var(--beam-subscriptionImpact-icon-margin);\n border-radius: var(--beam-subscriptionImpact-icon-borderRadius);\n }\n\n .image {\n flex: 4;\n height: auto;\n width: 100%;\n object-fit: cover;\n min-height: var(--beam-subscriptionImpact-image-minHeight);\n min-width: var(--beam-subscriptionImpact-image-minWidth);\n border-radius: var(--beam-subscriptionImpact-image-borderRadius);\n }\n\n .impact-container {\n flex: 1 1 67%;\n height: 100%;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-content: stretch;\n align-items: stretch;\n position: relative;\n }\n\n .card-description {\n flex-grow: 1;\n padding: var(--beam-subscriptionImpact-cardDescription-padding);\n ${useCustomText(\"--beam-subscriptionImpact-cardDescription\")};\n }\n\n .card-progress-bar {\n flex: 1 1;\n display: flex;\n align-items: center;\n padding: var(--beam-subscriptionImpact-card-progressBar-padding);\n }\n\n .details-funding-progress-label {\n gap: var(--beam-subscriptionImpact-card-progressBarLabel-gap);\n white-space: nowrap;\n text-align: var(--beam-subscriptionImpact-card-progressBarLabel-textAlign);\n flex: 0 1;\n margin-left: var(--beam-subscriptionImpact-card-progressBarLabel-marginLeft);\n ${useCustomText(\"--beam-subscriptionImpact-card-progressBarLabel\")};\n }\n\n .link-container {\n text-align: var(--beam-subscriptionImpact-card-linkContainer-textAlign);\n }\n\n .impact-link {\n display: inline-block;\n text-decoration-line: var(--beam-subscriptionImpact-card-impactLink-textDecoration);\n ${useCustomText(\"--beam-subscriptionImpact-card-impactLink\")};\n }\n\n /* share footer */\n .footer {\n text-align: var(--beam-subscriptionImpact-footer-textAlign);\n margin-top: var(--beam-subscriptionImpact-footer-marginTop);\n }\n `,\n cssCardGrid({\n gap: \"var(--beam-subscriptionImpact-cardContainer-gap)\",\n itemMinWidth: \"250px\",\n columnCount: \"2\",\n }),\n ];\n}\n\ndefineCustomElement(BeamSubscriptionImpact);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-impact\": BeamSubscriptionImpact;\n }\n}\n"],"names":["BeamInfoPill","LitElement","css","html","__decorateClass","property","infoPillLabelConfigDefaults","strings","causeName","nonprofit","hideArrow","brandName","BeamSubscriptionImpact","DEFAULT_BASE_URL","enforceConfig","getImpact","makeApiKeyHeader","AsyncController","debounce","syncElementHeights","SUPPORTED_LANGUAGES","changedProperties","requireNewDataProps","prop","callback","e","logger","defaults","progressBarConfigDefaults","shareButtonConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","data","loading","error","_loading","_errorMessage","communityImpact","personalImpact","localizeUserString","nonprofitName","personalProgressPercentage","isPersonalProgressNotStarted","communityProgressPercentage","personalProgressDescription","communityProgressDescription","communityImage","personalImage","unselectedIcon","selectedIcon","cardStyle","imagePosition","isImage","iconImage","communityCardImage","personalCardImage","personalTitle","personalFutureTenseTitle","communityLink","isNil","personalLink","shareImage","shareIcon","hideLearnAboutArrow","impactCard","isPersonalProgressBarValueLow","cssReset","cssResponsiveUtils","useCustomText","cssCardGrid","state","queryAll","defineCustomElement"],"mappings":"kmCAIO,MAAMA,UAAqBC,CAAW,CAAtC,aAAA,CAAA,MAAA,GAAA,SAAA,EACuB,cAAW,EAEvC,CAAA,WAAW,QAAS,CAClB,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,KAcT,CAEA,QAAS,CACP,OAAOC,+BAAkC,KAAK,QAAQ,KAAK,KAAK,QAAQ,aAC1E,CACF,CAtB8BC,GAAA,CAA3BC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EADfL,EACiB,UAAA,UAAA,EAwB9B,eAAe,IAAI,gBAAgB,GAAK,eAAe,OAAO,iBAAkBA,CAAY,EAE/E,MAAAM,GAA8B,CACzC,oCAAqC,UACrC,yBAA0B,OAC1B,0BAA2B,UAC3B,gCAAiC,MACjC,6BAA8B,OAC9B,wBAAyB,UACzB,+BAAgC,MAChC,kCAAmC,OACnC,8BAA+B,SAC/B,2BAA4B,SAC9B,EC1CaC,EAAU,CACrB,GAAI,CACF,MAAO,CAAC,CAAE,UAAAC,EAAY,EAAG,IAAM,sCAAsCA,CAAS,oBAC9E,iBAAkB,CAAC,CAAE,UAAAA,EAAY,EAAG,IAAM,qCAAqCA,CAAS,oBACxF,iBAAkB,IAAM,qBACxB,Y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;
296
296
  }>;
297
+ getDisplayablePreviousImpacts(): {
298
+ imageUrl: string | null;
299
+ nonprofit: {
300
+ id: number;
301
+ name: string;
302
+ cause: string | null;
303
+ causeIconUrl: string | null;
304
+ causeIconSelectedUrl: string | null;
305
+ causeColor: string | null;
306
+ extensibility?: {
307
+ causeIconUrl?: string | null | undefined;
308
+ causeIconSelectedUrl?: string | null | undefined;
309
+ causeIconAndBackgroundUrl?: string | null | undefined;
310
+ } | undefined;
311
+ website: string | null;
312
+ websiteLinkText: string;
313
+ badge?: string | undefined;
314
+ includeInPersonalImpact?: boolean | undefined;
315
+ };
316
+ impact: {
317
+ description: string | null;
318
+ goalCompletionText: string;
319
+ goalProgressText: string;
320
+ goalProgressPercentage: number;
321
+ };
322
+ share: {
323
+ imageUrl: string | null;
324
+ };
325
+ filters?: string[] | undefined;
326
+ }[];
297
327
  handleSwapNonprofitButtonClick(): void;
298
328
  handleBackToSubscriptionImpactButtonClick(): void;
299
329
  handleSupportAgainButtonClick(nonprofitId: TNumericId, nonprofitName: string): void;
@@ -303,7 +333,7 @@ declare class BeamSubscriptionManagement extends LitElement {
303
333
  get cssVariables(): any;
304
334
  static styles: lit.CSSResult[];
305
335
  private renderPreviousImpactTiles;
306
- render(): lit_html.TemplateResult<1> | "";
336
+ render(): "" | lit_html.TemplateResult<1>;
307
337
  }
308
338
  declare global {
309
339
  interface HTMLElementTagNameMap {