@beamimpact/web-sdk 1.38.1 → 1.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_share-dialog-dependencies-E9UC6rFe.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-E9UC6rFe.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-jT0LyIYZ.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-jT0LyIYZ.esm.js.map +1 -0
- package/dist/chunks/{cart-contents-dKdDg09p.esm.d.ts → cart-contents-3-9fB-7m.esm.d.ts} +1 -1
- package/dist/chunks/{css-card-grid-inRnKSWs.esm.js → css-card-grid-7tObtoJx.esm.js} +2 -2
- package/dist/chunks/{css-card-grid-inRnKSWs.esm.js.map → css-card-grid-7tObtoJx.esm.js.map} +1 -1
- package/dist/chunks/{events-zF9NDtBD.esm.d.ts → events-7W7i4aV5.esm.d.ts} +1 -1
- package/dist/chunks/{index-UCh8HjVN.esm.js → index-82TLJN3M.esm.js} +2 -2
- package/dist/chunks/{index-UCh8HjVN.esm.js.map → index-82TLJN3M.esm.js.map} +1 -1
- package/dist/chunks/index-A4ADMGuS.esm.js +2 -0
- package/dist/chunks/index-A4ADMGuS.esm.js.map +1 -0
- package/dist/chunks/index-GxPqdIah.esm.js +2 -0
- package/dist/chunks/index-GxPqdIah.esm.js.map +1 -0
- package/dist/chunks/{index-tqTROh5B.esm.d.ts → index-HBDtoJlQ.esm.d.ts} +1 -1
- package/dist/chunks/{index-oLz4lmx2.esm.d.ts → index-Hb-jziQs.esm.d.ts} +3 -1
- package/dist/chunks/{index-6iInzwnG.esm.js → index-Q1vx4WtG.esm.js} +2 -2
- package/dist/chunks/{index-6iInzwnG.esm.js.map → index-Q1vx4WtG.esm.js.map} +1 -1
- package/dist/chunks/index-QNK0E7_-.esm.js +2 -0
- package/dist/chunks/index-QNK0E7_-.esm.js.map +1 -0
- package/dist/chunks/{index-EjqeU7Mu.esm.d.ts → index-SxFKifVJ.esm.d.ts} +1 -1
- package/dist/chunks/{index-cRyQ6D5G.esm.d.ts → index-TOzSFOvI.esm.d.ts} +1 -1
- package/dist/chunks/index-V-BsPYtl.esm.js +2 -0
- package/dist/chunks/index-V-BsPYtl.esm.js.map +1 -0
- package/dist/chunks/index-WeS36ABz.esm.js +2 -0
- package/dist/chunks/index-WeS36ABz.esm.js.map +1 -0
- package/dist/chunks/index-Y6-97c9H.esm.js +2 -0
- package/dist/chunks/index-Y6-97c9H.esm.js.map +1 -0
- package/dist/chunks/{index-dDBsHD_s.esm.d.ts → index-YwDVLm67.esm.d.ts} +1 -1
- package/dist/chunks/{index-Tnwxn22c.esm.d.ts → index-Zk634mW7.esm.d.ts} +4 -4
- package/dist/chunks/{index-iYxrQMxt.esm.d.ts → index-b-AHDeDB.esm.d.ts} +1 -1
- package/dist/chunks/index-cekgAcEE.esm.js +2 -0
- package/dist/chunks/index-cekgAcEE.esm.js.map +1 -0
- package/dist/chunks/index-hEEPYOBy.esm.js +2 -0
- package/dist/chunks/index-hEEPYOBy.esm.js.map +1 -0
- package/dist/chunks/{index-_WQFoMIz.esm.js → index-sCYUc4NK.esm.js} +2 -2
- package/dist/chunks/{index-_WQFoMIz.esm.js.map → index-sCYUc4NK.esm.js.map} +1 -1
- package/dist/chunks/{index-l7Ao8g5B.esm.js → index-uCfdsWtt.esm.js} +2 -2
- package/dist/chunks/{index-l7Ao8g5B.esm.js.map → index-uCfdsWtt.esm.js.map} +1 -1
- package/dist/chunks/{lit-HCWbxxT7.esm.js → lit-qtGbjGnK.esm.js} +2 -2
- package/dist/chunks/{lit-HCWbxxT7.esm.js.map → lit-qtGbjGnK.esm.js.map} +1 -1
- package/dist/chunks/loading-template-Av0IUyKF.esm.js +2 -0
- package/dist/chunks/loading-template-Av0IUyKF.esm.js.map +1 -0
- package/dist/chunks/localize-F31ae3j6.esm.js +30 -0
- package/dist/chunks/localize-F31ae3j6.esm.js.map +1 -0
- package/dist/chunks/localize-fH8KOrMi.esm.js +30 -0
- package/dist/chunks/localize-fH8KOrMi.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-fxMWpEwU.esm.d.ts → openapi-spec--MzXvfCC.esm.d.ts} +139 -10
- package/dist/chunks/{order-page-5VQO1Sil.esm.js → order-page--Z7oUbXx.esm.js} +2 -2
- package/dist/chunks/{order-page-5VQO1Sil.esm.js.map → order-page--Z7oUbXx.esm.js.map} +1 -1
- package/dist/chunks/{order-page-AezeN9KY.esm.d.ts → order-page-DPx5SUKM.esm.d.ts} +2 -2
- package/dist/chunks/{order-page-E7Kyu1JP.esm.js → order-page-zVZsxnVd.esm.js} +2 -2
- package/dist/chunks/{order-page-E7Kyu1JP.esm.js.map → order-page-zVZsxnVd.esm.js.map} +1 -1
- package/dist/chunks/{progress-bar-9vfd2JYm.esm.js → progress-bar-Sn2QspHy.esm.js} +2 -2
- package/dist/chunks/{progress-bar-9vfd2JYm.esm.js.map → progress-bar-Sn2QspHy.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-vCWNyiaj.esm.js → promo-pill-label-j0A8qZ0c.esm.js} +2 -2
- package/dist/chunks/{promo-pill-label-vCWNyiaj.esm.js.map → promo-pill-label-j0A8qZ0c.esm.js.map} +1 -1
- package/dist/chunks/{responsive-Bzkkpj11.esm.js → responsive-aWj_7ZN_.esm.js} +2 -2
- package/dist/chunks/responsive-aWj_7ZN_.esm.js.map +1 -0
- package/dist/chunks/routes-2FqTWOCW.esm.js +2 -0
- package/dist/chunks/{routes-UBDDazXd.esm.js.map → routes-2FqTWOCW.esm.js.map} +1 -1
- package/dist/chunks/routes-OzJqNrBl.esm.js +2 -0
- package/dist/chunks/{routes-t5eRHMRc.esm.js.map → routes-OzJqNrBl.esm.js.map} +1 -1
- package/dist/chunks/shoelace-components-7Bz0cgFm.esm.js +2 -0
- package/dist/chunks/shoelace-components-7Bz0cgFm.esm.js.map +1 -0
- package/dist/chunks/shoelace-components-R0WKZ63n.esm.js +2 -0
- package/dist/chunks/shoelace-components-R0WKZ63n.esm.js.map +1 -0
- package/dist/chunks/{update-cart-6fMyZd34.esm.js → update-cart-147q_9OK.esm.js} +2 -2
- package/dist/chunks/{update-cart-6fMyZd34.esm.js.map → update-cart-147q_9OK.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-WfOplzik.esm.js → update-cart-KdiGuVzp.esm.js} +2 -2
- package/dist/chunks/{update-cart-WfOplzik.esm.js.map → update-cart-KdiGuVzp.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-43LEXveI.esm.d.ts → update-cart-xaWdPxse.esm.d.ts} +1 -1
- package/dist/chunks/vendor-jQ8cxMpw.esm.js +1284 -0
- package/dist/chunks/vendor-jQ8cxMpw.esm.js.map +1 -0
- package/dist/components/beam-partner-logos.esm.js +1 -1
- package/dist/components/beam-partner-logos.js +1 -1
- package/dist/components/community-impact.d.ts +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.esm.js +1 -1
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.esm.js +7 -7
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +7 -7
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +2 -2
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +75 -0
- package/dist/components/product-details-page.esm.js +118 -0
- package/dist/components/product-details-page.esm.js.map +1 -0
- package/dist/components/product-details-page.js +118 -0
- package/dist/components/product-details-page.js.map +1 -0
- package/dist/components/redeem-transaction.d.ts +2 -2
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +2 -2
- package/dist/components/select-nonprofit.esm.js +1 -1
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +1 -1
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +5 -5
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/subscription-management.d.ts +9 -2
- package/dist/components/subscription-management.esm.js +4 -4
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +4 -4
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +9 -9
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.d.ts +4 -4
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.esm.js +1 -1
- package/dist/integrations/statsig.js +1 -1
- package/dist/integrations/utils.d.ts +3 -3
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.esm.js.map +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/community-impact.js.map +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.esm.js.map +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/cumulative-impact.js.map +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.esm.js.map +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/impact-overview.js.map +1 -1
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +2 -2
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.esm.js.map +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/post-purchase.js.map +1 -1
- package/dist/react/product-details-page.d.ts +9 -0
- package/dist/react/product-details-page.esm.js +2 -0
- package/dist/react/product-details-page.esm.js.map +1 -0
- package/dist/react/product-details-page.js +2 -0
- package/dist/react/product-details-page.js.map +1 -0
- package/dist/react/redeem-transaction.d.ts +3 -3
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.d.ts +3 -3
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.esm.js.map +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-nonprofit.js.map +1 -1
- package/dist/react/subscription-management.d.ts +9 -2
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/dist/utils/events.d.ts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/makeApiKeyHeader.d.ts +5 -0
- package/dist/utils/makeApiKeyHeader.esm.js +2 -0
- package/dist/utils/makeApiKeyHeader.esm.js.map +1 -0
- package/dist/utils/makeApiKeyHeader.js +2 -0
- package/dist/utils/makeApiKeyHeader.js.map +1 -0
- package/package.json +2 -2
- package/dist/chunks/_share-dialog-dependencies-0yVtRIRR.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-0yVtRIRR.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-HWissVga.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-HWissVga.esm.js.map +0 -1
- package/dist/chunks/enforce-config-7R9KCF_i.esm.js +0 -22
- package/dist/chunks/enforce-config-7R9KCF_i.esm.js.map +0 -1
- package/dist/chunks/enforce-config-iFdf1QkH.esm.js +0 -22
- package/dist/chunks/enforce-config-iFdf1QkH.esm.js.map +0 -1
- package/dist/chunks/index-5yFqo0yl.esm.js +0 -2
- package/dist/chunks/index-5yFqo0yl.esm.js.map +0 -1
- package/dist/chunks/index-FsVWk2WD.esm.js +0 -2
- package/dist/chunks/index-FsVWk2WD.esm.js.map +0 -1
- package/dist/chunks/index-IKTofhFw.esm.js +0 -2
- package/dist/chunks/index-IKTofhFw.esm.js.map +0 -1
- package/dist/chunks/index-IWF7IfQk.esm.js +0 -2
- package/dist/chunks/index-IWF7IfQk.esm.js.map +0 -1
- package/dist/chunks/index-IzAvjker.esm.js +0 -2
- package/dist/chunks/index-IzAvjker.esm.js.map +0 -1
- package/dist/chunks/index-MG0WE1Fz.esm.js +0 -2
- package/dist/chunks/index-MG0WE1Fz.esm.js.map +0 -1
- package/dist/chunks/index-NU6RpwSa.esm.js +0 -2
- package/dist/chunks/index-NU6RpwSa.esm.js.map +0 -1
- package/dist/chunks/index-QrlkSlnv.esm.js +0 -2
- package/dist/chunks/index-QrlkSlnv.esm.js.map +0 -1
- package/dist/chunks/localize-ZHtlNltZ.esm.js +0 -10
- package/dist/chunks/localize-ZHtlNltZ.esm.js.map +0 -1
- package/dist/chunks/localize-jRg7W6Ul.esm.js +0 -10
- package/dist/chunks/localize-jRg7W6Ul.esm.js.map +0 -1
- package/dist/chunks/responsive-Bzkkpj11.esm.js.map +0 -1
- package/dist/chunks/routes-UBDDazXd.esm.js +0 -2
- package/dist/chunks/routes-t5eRHMRc.esm.js +0 -2
- package/dist/chunks/vendor-h5FNKy-G.esm.js +0 -1147
- package/dist/chunks/vendor-h5FNKy-G.esm.js.map +0 -1
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{f as l,y as r}from"./lit-HCWbxxT7.esm.js";import{N as c,M as o,I as h}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as d}from"../utils/logger.esm.js";const p=l`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;function u(t,e=t.tagName){customElements.get(e)||customElements.define(e,t)}const m=t=>Object.entries(t).map(([e,s])=>`${e}: ${s};`).join(`
|
|
2
|
-
`);class f{constructor(e,s){this.data=null,this.loading=!1,this.error=null,(this.host=e).addController(this),this.asyncFn=s}async exec(...e){this.lastArgs=e,this.loading=!0,this.host.requestUpdate();try{this.data=await this.asyncFn(...e),this.error=null}catch(s){s instanceof Error&&(this.error=s,this.data=null)}return this.loading=!1,this.host.requestUpdate(),this.data}async retry(){return this.exec(...this.lastArgs||[])}hostDisconnected(){}}const a={errorTitle:"Beam encountered an error. Please try again.",retry:"Retry"},g=({error:t,retry:e})=>{let s=r``;if(t instanceof c){const i=JSON.stringify({status:t.response.status,statusText:t.response.statusText,url:t.response.url,body:t.body},null,4);s=r`
|
|
3
|
-
<p><b>Network Response:</b></p>
|
|
4
|
-
<p>${i}</p>
|
|
5
|
-
`}return t instanceof o&&(s=r`
|
|
6
|
-
<p><b>Missing Required Config Options:</b></p>
|
|
7
|
-
<p>${t.missingConfigKeyNames.join(", ")}</p>
|
|
8
|
-
`),r`<div class="beam-error" style="text-align: left">
|
|
9
|
-
<p>${a.errorTitle} ${e?r` <button type="reset" @click="${e}">${a.retry}</button>`:""}</p>
|
|
10
|
-
<br />
|
|
11
|
-
<details>
|
|
12
|
-
<div style="white-space: pre-wrap; font-family: monospace; line-height: 1;">
|
|
13
|
-
${s}
|
|
14
|
-
<p><b>Message:</b> ${t.message||r`<i>None</i>`}</p>
|
|
15
|
-
<p><b>Stack:</b> ${t.stack}</p>
|
|
16
|
-
</div>
|
|
17
|
-
</details>
|
|
18
|
-
<br />
|
|
19
|
-
<p>Help: <a href="https://www.beamimpact.com">www.beamimpact.com</a></p>
|
|
20
|
-
</div>`};function b(t,e){const s=[],i=e;for(const n of t)i[n]==null&&s.push(n);if(s.length>0)throw d.error(`Beam Impact - Missing Required Config Values:
|
|
21
|
-
`,s.join(", "),e),new o(s);return!0}function y(t,e){return t.every(s=>s in e&&e[s]!=null)}function w(t,e){if(t.every(s=>e[s]!==null&&e[s]!==void 0))throw new h}export{f as A,g as _,m as a,w as b,p as c,u as d,b as e,y as f};
|
|
22
|
-
//# sourceMappingURL=enforce-config-7R9KCF_i.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-config-7R9KCF_i.esm.js","sources":["../../src/shared/css-reset.ts","../../src/shared/defineCustomElement.ts","../../src/shared/fragments/css-variable-map.ts","../../src/shared/controllers/async-controller.ts","../../src/shared/fragments/error-message-template.ts","../../src/shared/enforce-config.ts"],"sourcesContent":["import { css } from \"lit\";\n\n// minireset.css v0.0.7 | MIT License | github.com/jgthms/minireset.css\n// prettier-ignore\nexport const cssReset = css`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;\n","/**\n * Defines a custom element based on its static tagName property\n */\nexport function defineCustomElement(\n CustomElementClass: CustomElementConstructor & { tagName: string },\n tagName = CustomElementClass[\"tagName\"]\n) {\n customElements.get(tagName) || customElements.define(tagName, CustomElementClass);\n}\n","export const _cssVariableMap = (variables: Record<string, string>) => {\n return Object.entries(variables)\n .map(([k, v]) => `${k}: ${v};`)\n .join(\"\\n\");\n};\n","import { ReactiveController, ReactiveControllerHost } from \"lit\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncFunction = (...args: any[]) => Promise<any>;\n\n/**\n * Creates a declarative wrapper around async operations\n * @example\n * class MyElement extends LitElement {\n * private user = new AsyncController(\n * this,\n * async ({ id }) => get(url, { id }));\n *\n * async updated(changedProperties) {\n * if (changedProperties.has(\"userId\")) {\n * await this.user.exec({ id: this.userId })\n * }\n * }\n *\n * render() {\n * const { data, loading, error } = this.user;\n * if (loading) return html`Please wait...`\n * if (error) return html`Error! <button @click=${this.user.retry}>Reload</button>`;\n * return html`My name is: ${data.name}`\n * }\n * }\n */\nexport class AsyncController<TFn extends AsyncFunction> implements ReactiveController {\n public data: Awaited<ReturnType<TFn>> | null = null;\n public loading = false;\n public error: Error | null = null;\n\n private readonly host: ReactiveControllerHost;\n private readonly asyncFn: TFn;\n private lastArgs?: Parameters<TFn>;\n\n constructor(host: ReactiveControllerHost, asyncFn: TFn) {\n (this.host = host).addController(this);\n this.asyncFn = asyncFn;\n }\n\n public async exec(...args: Parameters<TFn>): Promise<ReturnType<TFn> | null> {\n this.lastArgs = args;\n this.loading = true;\n this.host.requestUpdate();\n try {\n // TODO: prevent race condition if later invocation returns before earlier\n this.data = await this.asyncFn(...args);\n this.error = null;\n } catch (err) {\n if (err instanceof Error) {\n this.error = err;\n this.data = null;\n }\n }\n this.loading = false;\n this.host.requestUpdate();\n return this.data;\n }\n\n public async retry() {\n return this.exec(...((this.lastArgs || []) as Parameters<TFn>));\n }\n\n hostDisconnected() {\n // TODO: cancel API calls\n }\n}\n","import { html } from \"lit\";\nimport { MissingConfig, NetworkError } from \"../../utils/beam-errors\";\n\nconst strings = {\n errorTitle: `Beam encountered an error. Please try again.`,\n retry: `Retry`,\n};\n\nexport const _errorMessage = ({ error, retry }: { error: Error; retry?: (...args: never) => void }) => {\n let details = html``;\n if (error instanceof NetworkError) {\n const response = JSON.stringify(\n {\n status: error.response.status,\n statusText: error.response.statusText,\n url: error.response.url,\n body: error.body,\n },\n null,\n 4\n );\n details = html`\n <p><b>Network Response:</b></p>\n <p>${response}</p>\n `;\n }\n if (error instanceof MissingConfig) {\n details = html`\n <p><b>Missing Required Config Options:</b></p>\n <p>${error.missingConfigKeyNames.join(\", \")}</p>\n `;\n }\n return html`<div class=\"beam-error\" style=\"text-align: left\">\n <p>${strings.errorTitle} ${retry ? html` <button type=\"reset\" @click=\"${retry}\">${strings.retry}</button>` : \"\"}</p>\n <br />\n <details>\n <div style=\"white-space: pre-wrap; font-family: monospace; line-height: 1;\">\n ${details}\n <p><b>Message:</b> ${error.message || html`<i>None</i>`}</p>\n <p><b>Stack:</b> ${error.stack}</p>\n </div>\n </details>\n <br />\n <p>Help: <a href=\"https://www.beamimpact.com\">www.beamimpact.com</a></p>\n </div>`;\n};\n","import { InvalidAttributeCombinationError, MissingConfig } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\n\nexport function enforceConfig<T>(keys: (keyof T)[], input: unknown): input is Required<T> {\n const missingKeys: string[] = [];\n const check = input as Record<string | number | symbol, unknown>;\n for (const key of keys) {\n if (check[key] == null) {\n missingKeys.push(key as string);\n }\n }\n if (missingKeys.length > 0) {\n logger.error(\"Beam Impact - Missing Required Config Values:\\n\", missingKeys.join(\", \"), input);\n throw new MissingConfig(missingKeys);\n }\n return true;\n}\n\nexport function areRequiredKeysDefined<T extends object>(requiredKeys: (keyof T)[], config: T): boolean {\n return requiredKeys.every((key) => key in config && config[key] != null);\n}\n\nexport function checkForInvalidAttributeCombinations<T>(keys: (keyof T)[], config: T): void {\n const InvalidAttributeCombinationsPresent = keys.every((key) => config[key] !== null && config[key] !== undefined);\n if (InvalidAttributeCombinationsPresent) {\n throw new InvalidAttributeCombinationError();\n }\n}\n"],"names":["cssReset","css","defineCustomElement","CustomElementClass","tagName","_cssVariableMap","variables","k","v","AsyncController","host","asyncFn","args","err","strings","_errorMessage","error","retry","details","html","NetworkError","response","MissingConfig","enforceConfig","keys","input","missingKeys","check","key","logger","areRequiredKeysDefined","requiredKeys","config","checkForInvalidAttributeCombinations","InvalidAttributeCombinationError"],"mappings":"iKAIO,MAAMA,EAAWC,gaCDjB,SAASC,EACdC,EACAC,EAAUD,EAAmB,QAC7B,CACA,eAAe,IAAIC,CAAO,GAAK,eAAe,OAAOA,EAASD,CAAkB,CAClF,CCRO,MAAME,EAAmBC,GACvB,OAAO,QAAQA,CAAS,EAC5B,IAAI,CAAC,CAACC,EAAGC,CAAC,IAAM,GAAGD,CAAC,KAAKC,CAAC,GAAG,EAC7B,KAAK;AAAA,CAAI,ECwBP,MAAMC,CAAyE,CASpF,YAAYC,EAA8BC,EAAc,CARxD,KAAO,KAAwC,KAC/C,KAAO,QAAU,GACjB,KAAO,MAAsB,MAO1B,KAAK,KAAOD,GAAM,cAAc,IAAI,EACrC,KAAK,QAAUC,CACjB,CAEA,MAAa,QAAQC,EAAwD,CAC3E,KAAK,SAAWA,EAChB,KAAK,QAAU,GACf,KAAK,KAAK,gBACV,GAAI,CAEF,KAAK,KAAO,MAAM,KAAK,QAAQ,GAAGA,CAAI,EACtC,KAAK,MAAQ,IACf,OAASC,EAAK,CACRA,aAAe,QACjB,KAAK,MAAQA,EACb,KAAK,KAAO,KAEhB,CACA,YAAK,QAAU,GACf,KAAK,KAAK,gBACH,KAAK,IACd,CAEA,MAAa,OAAQ,CACnB,OAAO,KAAK,KAAK,GAAK,KAAK,UAAY,CAAuB,CAAA,CAChE,CAEA,kBAAmB,CAGrB,CAAA,CChEA,MAAMC,EAAU,CACd,WAAY,+CACZ,MAAO,OACT,EAEaC,EAAgB,CAAC,CAAE,MAAAC,EAAO,MAAAC,CAAM,IAA0D,CACrG,IAAIC,EAAUC,IACd,GAAIH,aAAiBI,EAAc,CACjC,MAAMC,EAAW,KAAK,UACpB,CACE,OAAQL,EAAM,SAAS,OACvB,WAAYA,EAAM,SAAS,WAC3B,IAAKA,EAAM,SAAS,IACpB,KAAMA,EAAM,IACd,EACA,KACA,CACF,EACAE,EAAUC;AAAAA;AAAAA,WAEHE,CAAQ;AAAA,KAEjB,CACA,OAAIL,aAAiBM,IACnBJ,EAAUC;AAAAA;AAAAA,WAEHH,EAAM,sBAAsB,KAAK,IAAI,CAAC;AAAA,OAGxCG;AAAAA,SACAL,EAAQ,UAAU,IAAIG,EAAQE,kCAAqCF,CAAK,KAAKH,EAAQ,KAAK,YAAc,EAAE;AAAA;AAAA;AAAA;AAAA,UAIzGI,CAAO;AAAA,6BACYF,EAAM,SAAWG,cAAiB;AAAA,2BACpCH,EAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,SAMtC,EC1CO,SAASO,EAAiBC,EAAmBC,EAAsC,CACxF,MAAMC,EAAwB,CAAA,EACxBC,EAAQF,EACd,UAAWG,KAAOJ,EACZG,EAAMC,CAAG,GAAK,MAChBF,EAAY,KAAKE,CAAa,EAGlC,GAAIF,EAAY,OAAS,EACvB,MAAAG,EAAO,MAAM;AAAA,EAAmDH,EAAY,KAAK,IAAI,EAAGD,CAAK,EACvF,IAAIH,EAAcI,CAAW,EAErC,MAAO,EACT,CAEO,SAASI,EAAyCC,EAA2BC,EAAoB,CACtG,OAAOD,EAAa,MAAOH,GAAQA,KAAOI,GAAUA,EAAOJ,CAAG,GAAK,IAAI,CACzE,CAEO,SAASK,EAAwCT,EAAmBQ,EAAiB,CAE1F,GAD4CR,EAAK,MAAOI,GAAQI,EAAOJ,CAAG,IAAM,MAAQI,EAAOJ,CAAG,IAAM,MAAS,EAE/G,MAAM,IAAIM,CAEd"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{f as l,y as r}from"./lit-HCWbxxT7.esm.js";import{N as c,M as o,I as h}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as d}from"../utils/logger.js";const p=l`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;function u(t,e=t.tagName){customElements.get(e)||customElements.define(e,t)}const m=t=>Object.entries(t).map(([e,s])=>`${e}: ${s};`).join(`
|
|
2
|
-
`);class f{constructor(e,s){this.data=null,this.loading=!1,this.error=null,(this.host=e).addController(this),this.asyncFn=s}async exec(...e){this.lastArgs=e,this.loading=!0,this.host.requestUpdate();try{this.data=await this.asyncFn(...e),this.error=null}catch(s){s instanceof Error&&(this.error=s,this.data=null)}return this.loading=!1,this.host.requestUpdate(),this.data}async retry(){return this.exec(...this.lastArgs||[])}hostDisconnected(){}}const a={errorTitle:"Beam encountered an error. Please try again.",retry:"Retry"},g=({error:t,retry:e})=>{let s=r``;if(t instanceof c){const i=JSON.stringify({status:t.response.status,statusText:t.response.statusText,url:t.response.url,body:t.body},null,4);s=r`
|
|
3
|
-
<p><b>Network Response:</b></p>
|
|
4
|
-
<p>${i}</p>
|
|
5
|
-
`}return t instanceof o&&(s=r`
|
|
6
|
-
<p><b>Missing Required Config Options:</b></p>
|
|
7
|
-
<p>${t.missingConfigKeyNames.join(", ")}</p>
|
|
8
|
-
`),r`<div class="beam-error" style="text-align: left">
|
|
9
|
-
<p>${a.errorTitle} ${e?r` <button type="reset" @click="${e}">${a.retry}</button>`:""}</p>
|
|
10
|
-
<br />
|
|
11
|
-
<details>
|
|
12
|
-
<div style="white-space: pre-wrap; font-family: monospace; line-height: 1;">
|
|
13
|
-
${s}
|
|
14
|
-
<p><b>Message:</b> ${t.message||r`<i>None</i>`}</p>
|
|
15
|
-
<p><b>Stack:</b> ${t.stack}</p>
|
|
16
|
-
</div>
|
|
17
|
-
</details>
|
|
18
|
-
<br />
|
|
19
|
-
<p>Help: <a href="https://www.beamimpact.com">www.beamimpact.com</a></p>
|
|
20
|
-
</div>`};function b(t,e){const s=[],i=e;for(const n of t)i[n]==null&&s.push(n);if(s.length>0)throw d.error(`Beam Impact - Missing Required Config Values:
|
|
21
|
-
`,s.join(", "),e),new o(s);return!0}function y(t,e){return t.every(s=>s in e&&e[s]!=null)}function w(t,e){if(t.every(s=>e[s]!==null&&e[s]!==void 0))throw new h}export{f as A,g as _,m as a,w as b,p as c,u as d,b as e,y as f};
|
|
22
|
-
//# sourceMappingURL=enforce-config-iFdf1QkH.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-config-iFdf1QkH.esm.js","sources":["../../src/shared/css-reset.ts","../../src/shared/defineCustomElement.ts","../../src/shared/fragments/css-variable-map.ts","../../src/shared/controllers/async-controller.ts","../../src/shared/fragments/error-message-template.ts","../../src/shared/enforce-config.ts"],"sourcesContent":["import { css } from \"lit\";\n\n// minireset.css v0.0.7 | MIT License | github.com/jgthms/minireset.css\n// prettier-ignore\nexport const cssReset = css`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;\n","/**\n * Defines a custom element based on its static tagName property\n */\nexport function defineCustomElement(\n CustomElementClass: CustomElementConstructor & { tagName: string },\n tagName = CustomElementClass[\"tagName\"]\n) {\n customElements.get(tagName) || customElements.define(tagName, CustomElementClass);\n}\n","export const _cssVariableMap = (variables: Record<string, string>) => {\n return Object.entries(variables)\n .map(([k, v]) => `${k}: ${v};`)\n .join(\"\\n\");\n};\n","import { ReactiveController, ReactiveControllerHost } from \"lit\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AsyncFunction = (...args: any[]) => Promise<any>;\n\n/**\n * Creates a declarative wrapper around async operations\n * @example\n * class MyElement extends LitElement {\n * private user = new AsyncController(\n * this,\n * async ({ id }) => get(url, { id }));\n *\n * async updated(changedProperties) {\n * if (changedProperties.has(\"userId\")) {\n * await this.user.exec({ id: this.userId })\n * }\n * }\n *\n * render() {\n * const { data, loading, error } = this.user;\n * if (loading) return html`Please wait...`\n * if (error) return html`Error! <button @click=${this.user.retry}>Reload</button>`;\n * return html`My name is: ${data.name}`\n * }\n * }\n */\nexport class AsyncController<TFn extends AsyncFunction> implements ReactiveController {\n public data: Awaited<ReturnType<TFn>> | null = null;\n public loading = false;\n public error: Error | null = null;\n\n private readonly host: ReactiveControllerHost;\n private readonly asyncFn: TFn;\n private lastArgs?: Parameters<TFn>;\n\n constructor(host: ReactiveControllerHost, asyncFn: TFn) {\n (this.host = host).addController(this);\n this.asyncFn = asyncFn;\n }\n\n public async exec(...args: Parameters<TFn>): Promise<ReturnType<TFn> | null> {\n this.lastArgs = args;\n this.loading = true;\n this.host.requestUpdate();\n try {\n // TODO: prevent race condition if later invocation returns before earlier\n this.data = await this.asyncFn(...args);\n this.error = null;\n } catch (err) {\n if (err instanceof Error) {\n this.error = err;\n this.data = null;\n }\n }\n this.loading = false;\n this.host.requestUpdate();\n return this.data;\n }\n\n public async retry() {\n return this.exec(...((this.lastArgs || []) as Parameters<TFn>));\n }\n\n hostDisconnected() {\n // TODO: cancel API calls\n }\n}\n","import { html } from \"lit\";\nimport { MissingConfig, NetworkError } from \"../../utils/beam-errors\";\n\nconst strings = {\n errorTitle: `Beam encountered an error. Please try again.`,\n retry: `Retry`,\n};\n\nexport const _errorMessage = ({ error, retry }: { error: Error; retry?: (...args: never) => void }) => {\n let details = html``;\n if (error instanceof NetworkError) {\n const response = JSON.stringify(\n {\n status: error.response.status,\n statusText: error.response.statusText,\n url: error.response.url,\n body: error.body,\n },\n null,\n 4\n );\n details = html`\n <p><b>Network Response:</b></p>\n <p>${response}</p>\n `;\n }\n if (error instanceof MissingConfig) {\n details = html`\n <p><b>Missing Required Config Options:</b></p>\n <p>${error.missingConfigKeyNames.join(\", \")}</p>\n `;\n }\n return html`<div class=\"beam-error\" style=\"text-align: left\">\n <p>${strings.errorTitle} ${retry ? html` <button type=\"reset\" @click=\"${retry}\">${strings.retry}</button>` : \"\"}</p>\n <br />\n <details>\n <div style=\"white-space: pre-wrap; font-family: monospace; line-height: 1;\">\n ${details}\n <p><b>Message:</b> ${error.message || html`<i>None</i>`}</p>\n <p><b>Stack:</b> ${error.stack}</p>\n </div>\n </details>\n <br />\n <p>Help: <a href=\"https://www.beamimpact.com\">www.beamimpact.com</a></p>\n </div>`;\n};\n","import { InvalidAttributeCombinationError, MissingConfig } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\n\nexport function enforceConfig<T>(keys: (keyof T)[], input: unknown): input is Required<T> {\n const missingKeys: string[] = [];\n const check = input as Record<string | number | symbol, unknown>;\n for (const key of keys) {\n if (check[key] == null) {\n missingKeys.push(key as string);\n }\n }\n if (missingKeys.length > 0) {\n logger.error(\"Beam Impact - Missing Required Config Values:\\n\", missingKeys.join(\", \"), input);\n throw new MissingConfig(missingKeys);\n }\n return true;\n}\n\nexport function areRequiredKeysDefined<T extends object>(requiredKeys: (keyof T)[], config: T): boolean {\n return requiredKeys.every((key) => key in config && config[key] != null);\n}\n\nexport function checkForInvalidAttributeCombinations<T>(keys: (keyof T)[], config: T): void {\n const InvalidAttributeCombinationsPresent = keys.every((key) => config[key] !== null && config[key] !== undefined);\n if (InvalidAttributeCombinationsPresent) {\n throw new InvalidAttributeCombinationError();\n }\n}\n"],"names":["cssReset","css","defineCustomElement","CustomElementClass","tagName","_cssVariableMap","variables","k","v","AsyncController","host","asyncFn","args","err","strings","_errorMessage","error","retry","details","html","NetworkError","response","MissingConfig","enforceConfig","keys","input","missingKeys","check","key","logger","areRequiredKeysDefined","requiredKeys","config","checkForInvalidAttributeCombinations","InvalidAttributeCombinationError"],"mappings":"6JAIO,MAAMA,EAAWC,gaCDjB,SAASC,EACdC,EACAC,EAAUD,EAAmB,QAC7B,CACA,eAAe,IAAIC,CAAO,GAAK,eAAe,OAAOA,EAASD,CAAkB,CAClF,CCRO,MAAME,EAAmBC,GACvB,OAAO,QAAQA,CAAS,EAC5B,IAAI,CAAC,CAACC,EAAGC,CAAC,IAAM,GAAGD,CAAC,KAAKC,CAAC,GAAG,EAC7B,KAAK;AAAA,CAAI,ECwBP,MAAMC,CAAyE,CASpF,YAAYC,EAA8BC,EAAc,CARxD,KAAO,KAAwC,KAC/C,KAAO,QAAU,GACjB,KAAO,MAAsB,MAO1B,KAAK,KAAOD,GAAM,cAAc,IAAI,EACrC,KAAK,QAAUC,CACjB,CAEA,MAAa,QAAQC,EAAwD,CAC3E,KAAK,SAAWA,EAChB,KAAK,QAAU,GACf,KAAK,KAAK,gBACV,GAAI,CAEF,KAAK,KAAO,MAAM,KAAK,QAAQ,GAAGA,CAAI,EACtC,KAAK,MAAQ,IACf,OAASC,EAAK,CACRA,aAAe,QACjB,KAAK,MAAQA,EACb,KAAK,KAAO,KAEhB,CACA,YAAK,QAAU,GACf,KAAK,KAAK,gBACH,KAAK,IACd,CAEA,MAAa,OAAQ,CACnB,OAAO,KAAK,KAAK,GAAK,KAAK,UAAY,CAAuB,CAAA,CAChE,CAEA,kBAAmB,CAGrB,CAAA,CChEA,MAAMC,EAAU,CACd,WAAY,+CACZ,MAAO,OACT,EAEaC,EAAgB,CAAC,CAAE,MAAAC,EAAO,MAAAC,CAAM,IAA0D,CACrG,IAAIC,EAAUC,IACd,GAAIH,aAAiBI,EAAc,CACjC,MAAMC,EAAW,KAAK,UACpB,CACE,OAAQL,EAAM,SAAS,OACvB,WAAYA,EAAM,SAAS,WAC3B,IAAKA,EAAM,SAAS,IACpB,KAAMA,EAAM,IACd,EACA,KACA,CACF,EACAE,EAAUC;AAAAA;AAAAA,WAEHE,CAAQ;AAAA,KAEjB,CACA,OAAIL,aAAiBM,IACnBJ,EAAUC;AAAAA;AAAAA,WAEHH,EAAM,sBAAsB,KAAK,IAAI,CAAC;AAAA,OAGxCG;AAAAA,SACAL,EAAQ,UAAU,IAAIG,EAAQE,kCAAqCF,CAAK,KAAKH,EAAQ,KAAK,YAAc,EAAE;AAAA;AAAA;AAAA;AAAA,UAIzGI,CAAO;AAAA,6BACYF,EAAM,SAAWG,cAAiB;AAAA,2BACpCH,EAAM,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA,SAMtC,EC1CO,SAASO,EAAiBC,EAAmBC,EAAsC,CACxF,MAAMC,EAAwB,CAAA,EACxBC,EAAQF,EACd,UAAWG,KAAOJ,EACZG,EAAMC,CAAG,GAAK,MAChBF,EAAY,KAAKE,CAAa,EAGlC,GAAIF,EAAY,OAAS,EACvB,MAAAG,EAAO,MAAM;AAAA,EAAmDH,EAAY,KAAK,IAAI,EAAGD,CAAK,EACvF,IAAIH,EAAcI,CAAW,EAErC,MAAO,EACT,CAEO,SAASI,EAAyCC,EAA2BC,EAAoB,CACtG,OAAOD,EAAa,MAAOH,GAAQA,KAAOI,GAAUA,EAAOJ,CAAG,GAAK,IAAI,CACzE,CAEO,SAASK,EAAwCT,EAAmBQ,EAAiB,CAE1F,GAD4CR,EAAK,MAAOI,GAAQI,EAAOJ,CAAG,IAAM,MAAQI,EAAOJ,CAAG,IAAM,MAAS,EAE/G,MAAM,IAAIM,CAEd"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import{BeamCumulativeImpact as e}from"../components/cumulative-impact.esm.js";import{BeamImpactOverview as a}from"../components/impact-overview.esm.js";import{BeamSelectNonprofit as t}from"../components/select-nonprofit.esm.js";import{BeamRedeemTransaction as o}from"../components/redeem-transaction.esm.js";import{BeamPostPurchase as r}from"../components/post-purchase.esm.js";import{BeamSubscriptionManagement as i}from"../components/subscription-management.esm.js";var p=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSubscriptionManagement:i});export{p as i};
|
|
2
|
-
//# sourceMappingURL=index-5yFqo0yl.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-5yFqo0yl.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{f as e,p as r,P as t,s as a,R as o}from"./order-page-E7Kyu1JP.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-FsVWk2WD.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-FsVWk2WD.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-IKTofhFw.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-Lw32NXij.esm.js";import{i as o}from"./index-FsVWk2WD.esm.js";import{i as r}from"./index-6iInzwnG.esm.js";import{i as e}from"./index-IKTofhFw.esm.js";import{i as m}from"./index-UCh8HjVN.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-IWF7IfQk.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-IWF7IfQk.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{BeamCommunityImpact as m}from"../components/community-impact.js";import{BeamCumulativeImpact as e}from"../components/cumulative-impact.js";import{BeamImpactOverview as a}from"../components/impact-overview.js";import{BeamSelectNonprofit as t}from"../components/select-nonprofit.js";import{BeamRedeemTransaction as o}from"../components/redeem-transaction.js";import{BeamPostPurchase as r}from"../components/post-purchase.js";import{BeamSubscriptionManagement as i}from"../components/subscription-management.js";var p=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSubscriptionManagement:i});export{p as i};
|
|
2
|
-
//# sourceMappingURL=index-IzAvjker.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-IzAvjker.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-MG0WE1Fz.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i}from"./index-uF-Qtewb.esm.js";import{i as o}from"./index-QrlkSlnv.esm.js";import{i as r}from"./index-l7Ao8g5B.esm.js";import{i as e}from"./index-MG0WE1Fz.esm.js";import{i as m}from"./index-_WQFoMIz.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-NU6RpwSa.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-NU6RpwSa.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{f as e,p as r,P as t,s as a,R as o}from"./order-page-5VQO1Sil.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
|
|
2
|
-
//# sourceMappingURL=index-QrlkSlnv.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-QrlkSlnv.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{y as l,j as h}from"./lit-HCWbxxT7.esm.js";import{logger as $}from"../utils/logger.js";import{B as g}from"./beam-errors-P-Lu07Ce.esm.js";const c={loading:""},p=()=>l`<p class="beam-loading">${c.loading}</p>`,y=(o="",{fontFamily:n="inherit",fontStyle:r="inherit",fontSize:e="inherit",fontWeight:i="inherit",textTransform:a="none",marginTop:s="0",lineHeight:f="inherit",color:m="inherit"}={})=>{const t=o.startsWith("--beam-")?o:`--beam-${o}`;return{[`${t}-fontFamily`]:n,[`${t}-fontStyle`]:r,[`${t}-fontSize`]:e,[`${t}-fontWeight`]:i,[`${t}-textTransform`]:a,[`${t}-marginTop`]:s,[`${t}-lineHeight`]:f,[`${t}-color`]:m}},S=(o="",{fontFamily:n="inherit",fontStyle:r="inherit",fontSize:e="inherit",fontWeight:i="inherit",textTransform:a="none",marginTop:s="0",lineHeight:f="inherit",color:m="inherit"}={})=>{const t=o.startsWith("--beam-")?o:`--beam-${o}`;return h(` font-family: var(${t}-fontFamily, ${n});
|
|
2
|
-
font-style: var(${t}-fontStyle, ${r});
|
|
3
|
-
font-size: var(${t}-fontSize, ${e});
|
|
4
|
-
font-weight: var(${t}-fontWeight, ${i});
|
|
5
|
-
text-transform: var(${t}-textTransform, ${a});
|
|
6
|
-
margin-top: var(${t}-marginTop, ${s});
|
|
7
|
-
line-height: var(${t}-lineHeight, ${f});
|
|
8
|
-
color: var(${t}-color, ${m});
|
|
9
|
-
`)},T=(o,n)=>{if(n.startsWith("{"))try{const r=JSON.parse(n);return r[o]??r.en??n}catch{return $.error(new g("Failed to extract JSON translation from string"),n),n}return n};export{p as _,y as d,T as i,S as u};
|
|
10
|
-
//# sourceMappingURL=localize-ZHtlNltZ.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"localize-ZHtlNltZ.esm.js","sources":["../../src/shared/fragments/loading-template.ts","../../src/shared/fragments/custom-text.ts","../../src/shared/localize.ts"],"sourcesContent":["import { html } from \"lit\";\n\nconst strings = {\n loading: \"\", // Default is no loading content\n};\n\nexport const _loading = () => {\n return html`<p class=\"beam-loading\">${strings.loading}</p>`;\n};\n","import { CSSResult, unsafeCSS } from \"lit\";\n\n/**\n * Create an object that can be passed to cssVariableMap\n * to define CSS variables in a style tag. The default properties\n * are the ones exposed for customization in the remote config interface.\n * @example\n * const variables = {\n * ...customizableTextJs(\"widget-header\",\n * \"widget-border-color\": \"red\"\n * };\n *\n * html`<style>:host { ${_cssVariableMap(variables)} }</style>`;\n * @returns {{[p: string]: string}}\n */\nexport const defineCustomText = (\n namespace = \"\",\n {\n fontFamily = \"inherit\",\n fontStyle = \"inherit\",\n fontSize = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n color = \"inherit\",\n } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n [`${prefix}-fontFamily`]: fontFamily,\n [`${prefix}-fontStyle`]: fontStyle,\n [`${prefix}-fontSize`]: fontSize,\n [`${prefix}-fontWeight`]: fontWeight,\n [`${prefix}-textTransform`]: textTransform,\n [`${prefix}-marginTop`]: marginTop,\n [`${prefix}-lineHeight`]: lineHeight,\n [`${prefix}-color`]: color,\n };\n};\n\n/**\n * Returns a string that defines css properties based on variables,\n * which can be used in a css`` template. The default properties are the\n * ones exposed for customization in the remote config interface.\n * @example\n * css`.widget-header { ${customizableTextCss(\"widget-header\")} border: none; }`\n * @returns {CSSResult}\n */\nexport const useCustomText = (\n namespace = \"\",\n {\n fontFamily = \"inherit\",\n fontStyle = \"inherit\",\n fontSize = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n color = \"inherit\",\n } = {}\n): CSSResult => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return unsafeCSS(`\\\n font-family: var(${prefix}-fontFamily, ${fontFamily});\n font-style: var(${prefix}-fontStyle, ${fontStyle});\n font-size: var(${prefix}-fontSize, ${fontSize});\n font-weight: var(${prefix}-fontWeight, ${fontWeight});\n text-transform: var(${prefix}-textTransform, ${textTransform});\n margin-top: var(${prefix}-marginTop, ${marginTop});\n line-height: var(${prefix}-lineHeight, ${lineHeight});\n color: var(${prefix}-color, ${color});\n `);\n};\n\n/**\n * Same as useCustomText except returns an object that can be passed to styleMap\n */\nexport const useCustomTextMap = (\n namespace = \"\",\n {\n fontSize = \"inherit\",\n fontStyle = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n fontSize: `var(${prefix}-fontSize, ${fontSize})`,\n fontStyle: `var(${prefix}-fontStyle, ${fontStyle})`,\n fontWeight: `var(${prefix}-fontWeight, ${fontWeight})`,\n textTransform: `var(${prefix}-textTransform, ${textTransform})`,\n marginTop: `var(${prefix}-marginTop, ${marginTop})`,\n lineHeight: `var(${prefix}-lineHeight, ${lineHeight})`,\n };\n};\n","import { LANGUAGES } from \"../api-sdk/types\";\nimport { logger } from \"../utils/logger\";\nimport { BeamError } from \"../utils/beam-errors\";\n\n/**\n * User-provided strings may include embedded translations in JSON form\n * This function extracts the string for the provided language\n * If it fails to parse, or the string is not json-like, it returns the whole string\n * TODO: consider returning unsafeHtml() or adding an option for it\n */\nconst localizeUserString = (lang: LANGUAGES, str: string): string => {\n const isJson = str.startsWith(\"{\");\n if (isJson) {\n try {\n const json = JSON.parse(str);\n return json[lang] ?? json[\"en\"] ?? str;\n } catch (err) {\n logger.error(new BeamError(\"Failed to extract JSON translation from string\"), str);\n return str;\n }\n }\n return str;\n};\n\nexport { localizeUserString };\n"],"names":["strings","_loading","html","defineCustomText","namespace","fontFamily","fontStyle","fontSize","fontWeight","textTransform","marginTop","lineHeight","color","prefix","useCustomText","unsafeCSS","localizeUserString","lang","str","json","logger","BeamError"],"mappings":"+IAEA,MAAMA,EAAU,CACd,QAAS,EACX,EAEaC,EAAW,IACfC,4BAA+BF,EAAQ,OAAO,OCQ1CG,EAAmB,CAC9BC,EAAY,GACZ,CACE,WAAAC,EAAa,UACb,UAAAC,EAAY,UACZ,SAAAC,EAAW,UACX,WAAAC,EAAa,UACb,cAAAC,EAAgB,OAChB,UAAAC,EAAY,IACZ,WAAAC,EAAa,UACb,MAAAC,EAAQ,SACV,EAAI,CAAA,IACuB,CAC3B,MAAMC,EAAST,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,MAAO,CACL,CAAC,GAAGS,CAAM,aAAa,EAAGR,EAC1B,CAAC,GAAGQ,CAAM,YAAY,EAAGP,EACzB,CAAC,GAAGO,CAAM,WAAW,EAAGN,EACxB,CAAC,GAAGM,CAAM,aAAa,EAAGL,EAC1B,CAAC,GAAGK,CAAM,gBAAgB,EAAGJ,EAC7B,CAAC,GAAGI,CAAM,YAAY,EAAGH,EACzB,CAAC,GAAGG,CAAM,aAAa,EAAGF,EAC1B,CAAC,GAAGE,CAAM,QAAQ,EAAGD,CACvB,CACF,EAUaE,EAAgB,CAC3BV,EAAY,GACZ,CACE,WAAAC,EAAa,UACb,UAAAC,EAAY,UACZ,SAAAC,EAAW,UACX,WAAAC,EAAa,UACb,cAAAC,EAAgB,OAChB,UAAAC,EAAY,IACZ,WAAAC,EAAa,UACb,MAAAC,EAAQ,SACV,EAAI,CACU,IAAA,CACd,MAAMC,EAAST,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,OAAOW,EAAU,4BACQF,CAAM,gBAAgBR,CAAU;AAAA,0BACjCQ,CAAM,eAAeP,CAAS;AAAA,yBAC/BO,CAAM,cAAcN,CAAQ;AAAA,2BAC1BM,CAAM,gBAAgBL,CAAU;AAAA,8BAC7BK,CAAM,mBAAmBJ,CAAa;AAAA,0BAC1CI,CAAM,eAAeH,CAAS;AAAA,2BAC7BG,CAAM,gBAAgBF,CAAU;AAAA,qBACtCE,CAAM,WAAWD,CAAK;AAAA,KACtC,CACL,EC/DMI,EAAqB,CAACC,EAAiBC,IAAwB,CAEnE,GADeA,EAAI,WAAW,GAAG,EAE/B,GAAI,CACF,MAAMC,EAAO,KAAK,MAAMD,CAAG,EAC3B,OAAOC,EAAKF,CAAI,GAAKE,EAAK,IAASD,CACrC,MAAc,CACZ,OAAAE,EAAO,MAAM,IAAIC,EAAU,gDAAgD,EAAGH,CAAG,EAC1EA,CACT,CAEF,OAAOA,CACT"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{y as l,j as h}from"./lit-HCWbxxT7.esm.js";import{logger as $}from"../utils/logger.esm.js";import{B as g}from"./beam-errors-P-Lu07Ce.esm.js";const c={loading:""},p=()=>l`<p class="beam-loading">${c.loading}</p>`,y=(o="",{fontFamily:n="inherit",fontStyle:r="inherit",fontSize:e="inherit",fontWeight:i="inherit",textTransform:a="none",marginTop:s="0",lineHeight:f="inherit",color:m="inherit"}={})=>{const t=o.startsWith("--beam-")?o:`--beam-${o}`;return{[`${t}-fontFamily`]:n,[`${t}-fontStyle`]:r,[`${t}-fontSize`]:e,[`${t}-fontWeight`]:i,[`${t}-textTransform`]:a,[`${t}-marginTop`]:s,[`${t}-lineHeight`]:f,[`${t}-color`]:m}},S=(o="",{fontFamily:n="inherit",fontStyle:r="inherit",fontSize:e="inherit",fontWeight:i="inherit",textTransform:a="none",marginTop:s="0",lineHeight:f="inherit",color:m="inherit"}={})=>{const t=o.startsWith("--beam-")?o:`--beam-${o}`;return h(` font-family: var(${t}-fontFamily, ${n});
|
|
2
|
-
font-style: var(${t}-fontStyle, ${r});
|
|
3
|
-
font-size: var(${t}-fontSize, ${e});
|
|
4
|
-
font-weight: var(${t}-fontWeight, ${i});
|
|
5
|
-
text-transform: var(${t}-textTransform, ${a});
|
|
6
|
-
margin-top: var(${t}-marginTop, ${s});
|
|
7
|
-
line-height: var(${t}-lineHeight, ${f});
|
|
8
|
-
color: var(${t}-color, ${m});
|
|
9
|
-
`)},T=(o,n)=>{if(n.startsWith("{"))try{const r=JSON.parse(n);return r[o]??r.en??n}catch{return $.error(new g("Failed to extract JSON translation from string"),n),n}return n};export{p as _,y as d,T as i,S as u};
|
|
10
|
-
//# sourceMappingURL=localize-jRg7W6Ul.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"localize-jRg7W6Ul.esm.js","sources":["../../src/shared/fragments/loading-template.ts","../../src/shared/fragments/custom-text.ts","../../src/shared/localize.ts"],"sourcesContent":["import { html } from \"lit\";\n\nconst strings = {\n loading: \"\", // Default is no loading content\n};\n\nexport const _loading = () => {\n return html`<p class=\"beam-loading\">${strings.loading}</p>`;\n};\n","import { CSSResult, unsafeCSS } from \"lit\";\n\n/**\n * Create an object that can be passed to cssVariableMap\n * to define CSS variables in a style tag. The default properties\n * are the ones exposed for customization in the remote config interface.\n * @example\n * const variables = {\n * ...customizableTextJs(\"widget-header\",\n * \"widget-border-color\": \"red\"\n * };\n *\n * html`<style>:host { ${_cssVariableMap(variables)} }</style>`;\n * @returns {{[p: string]: string}}\n */\nexport const defineCustomText = (\n namespace = \"\",\n {\n fontFamily = \"inherit\",\n fontStyle = \"inherit\",\n fontSize = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n color = \"inherit\",\n } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n [`${prefix}-fontFamily`]: fontFamily,\n [`${prefix}-fontStyle`]: fontStyle,\n [`${prefix}-fontSize`]: fontSize,\n [`${prefix}-fontWeight`]: fontWeight,\n [`${prefix}-textTransform`]: textTransform,\n [`${prefix}-marginTop`]: marginTop,\n [`${prefix}-lineHeight`]: lineHeight,\n [`${prefix}-color`]: color,\n };\n};\n\n/**\n * Returns a string that defines css properties based on variables,\n * which can be used in a css`` template. The default properties are the\n * ones exposed for customization in the remote config interface.\n * @example\n * css`.widget-header { ${customizableTextCss(\"widget-header\")} border: none; }`\n * @returns {CSSResult}\n */\nexport const useCustomText = (\n namespace = \"\",\n {\n fontFamily = \"inherit\",\n fontStyle = \"inherit\",\n fontSize = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n color = \"inherit\",\n } = {}\n): CSSResult => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return unsafeCSS(`\\\n font-family: var(${prefix}-fontFamily, ${fontFamily});\n font-style: var(${prefix}-fontStyle, ${fontStyle});\n font-size: var(${prefix}-fontSize, ${fontSize});\n font-weight: var(${prefix}-fontWeight, ${fontWeight});\n text-transform: var(${prefix}-textTransform, ${textTransform});\n margin-top: var(${prefix}-marginTop, ${marginTop});\n line-height: var(${prefix}-lineHeight, ${lineHeight});\n color: var(${prefix}-color, ${color});\n `);\n};\n\n/**\n * Same as useCustomText except returns an object that can be passed to styleMap\n */\nexport const useCustomTextMap = (\n namespace = \"\",\n {\n fontSize = \"inherit\",\n fontStyle = \"inherit\",\n fontWeight = \"inherit\",\n textTransform = \"none\",\n marginTop = \"0\",\n lineHeight = \"inherit\",\n } = {}\n): Record<string, string> => {\n const prefix = namespace.startsWith(\"--beam-\") ? namespace : `--beam-${namespace}`;\n return {\n fontSize: `var(${prefix}-fontSize, ${fontSize})`,\n fontStyle: `var(${prefix}-fontStyle, ${fontStyle})`,\n fontWeight: `var(${prefix}-fontWeight, ${fontWeight})`,\n textTransform: `var(${prefix}-textTransform, ${textTransform})`,\n marginTop: `var(${prefix}-marginTop, ${marginTop})`,\n lineHeight: `var(${prefix}-lineHeight, ${lineHeight})`,\n };\n};\n","import { LANGUAGES } from \"../api-sdk/types\";\nimport { logger } from \"../utils/logger\";\nimport { BeamError } from \"../utils/beam-errors\";\n\n/**\n * User-provided strings may include embedded translations in JSON form\n * This function extracts the string for the provided language\n * If it fails to parse, or the string is not json-like, it returns the whole string\n * TODO: consider returning unsafeHtml() or adding an option for it\n */\nconst localizeUserString = (lang: LANGUAGES, str: string): string => {\n const isJson = str.startsWith(\"{\");\n if (isJson) {\n try {\n const json = JSON.parse(str);\n return json[lang] ?? json[\"en\"] ?? str;\n } catch (err) {\n logger.error(new BeamError(\"Failed to extract JSON translation from string\"), str);\n return str;\n }\n }\n return str;\n};\n\nexport { localizeUserString };\n"],"names":["strings","_loading","html","defineCustomText","namespace","fontFamily","fontStyle","fontSize","fontWeight","textTransform","marginTop","lineHeight","color","prefix","useCustomText","unsafeCSS","localizeUserString","lang","str","json","logger","BeamError"],"mappings":"mJAEA,MAAMA,EAAU,CACd,QAAS,EACX,EAEaC,EAAW,IACfC,4BAA+BF,EAAQ,OAAO,OCQ1CG,EAAmB,CAC9BC,EAAY,GACZ,CACE,WAAAC,EAAa,UACb,UAAAC,EAAY,UACZ,SAAAC,EAAW,UACX,WAAAC,EAAa,UACb,cAAAC,EAAgB,OAChB,UAAAC,EAAY,IACZ,WAAAC,EAAa,UACb,MAAAC,EAAQ,SACV,EAAI,CAAA,IACuB,CAC3B,MAAMC,EAAST,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,MAAO,CACL,CAAC,GAAGS,CAAM,aAAa,EAAGR,EAC1B,CAAC,GAAGQ,CAAM,YAAY,EAAGP,EACzB,CAAC,GAAGO,CAAM,WAAW,EAAGN,EACxB,CAAC,GAAGM,CAAM,aAAa,EAAGL,EAC1B,CAAC,GAAGK,CAAM,gBAAgB,EAAGJ,EAC7B,CAAC,GAAGI,CAAM,YAAY,EAAGH,EACzB,CAAC,GAAGG,CAAM,aAAa,EAAGF,EAC1B,CAAC,GAAGE,CAAM,QAAQ,EAAGD,CACvB,CACF,EAUaE,EAAgB,CAC3BV,EAAY,GACZ,CACE,WAAAC,EAAa,UACb,UAAAC,EAAY,UACZ,SAAAC,EAAW,UACX,WAAAC,EAAa,UACb,cAAAC,EAAgB,OAChB,UAAAC,EAAY,IACZ,WAAAC,EAAa,UACb,MAAAC,EAAQ,SACV,EAAI,CACU,IAAA,CACd,MAAMC,EAAST,EAAU,WAAW,SAAS,EAAIA,EAAY,UAAUA,CAAS,GAChF,OAAOW,EAAU,4BACQF,CAAM,gBAAgBR,CAAU;AAAA,0BACjCQ,CAAM,eAAeP,CAAS;AAAA,yBAC/BO,CAAM,cAAcN,CAAQ;AAAA,2BAC1BM,CAAM,gBAAgBL,CAAU;AAAA,8BAC7BK,CAAM,mBAAmBJ,CAAa;AAAA,0BAC1CI,CAAM,eAAeH,CAAS;AAAA,2BAC7BG,CAAM,gBAAgBF,CAAU;AAAA,qBACtCE,CAAM,WAAWD,CAAK;AAAA,KACtC,CACL,EC/DMI,EAAqB,CAACC,EAAiBC,IAAwB,CAEnE,GADeA,EAAI,WAAW,GAAG,EAE/B,GAAI,CACF,MAAMC,EAAO,KAAK,MAAMD,CAAG,EAC3B,OAAOC,EAAKF,CAAI,GAAKE,EAAK,IAASD,CACrC,MAAc,CACZ,OAAAE,EAAO,MAAM,IAAIC,EAAU,gDAAgD,EAAGH,CAAG,EAC1EA,CACT,CAEF,OAAOA,CACT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responsive-Bzkkpj11.esm.js","sources":["../../src/shared/responsive.ts"],"sourcesContent":["/**\n * Module containing constants for breakpoints and other resposive design considerations\n */\nimport { css } from \"lit\";\n\nexport const SCREEN_SIZE_SMALL = 501; // px\n\n/**\n * Reusable CSS stylesheet for responsive display\n * Implements a subset of Bootstrap's CSS, but with only two sizes (sm [default] and lg)\n * https://getbootstrap.com/docs/4.0/utilities/display/\n */\nexport const cssResponsiveUtils = css`\n .d-none {\n display: none;\n }\n .d-block {\n display: block;\n }\n .d-inline {\n display: inline;\n }\n @media screen and (min-width: ${SCREEN_SIZE_SMALL}px) {\n .d-lg-none {\n display: none;\n }\n .d-lg-block {\n display: block;\n }\n .d-lg-inline {\n display: inline;\n }\n }\n`;\n"],"names":["SCREEN_SIZE_SMALL","cssResponsiveUtils","css"],"mappings":"0CAKa,MAAAA,EAAoB,IAOpBC,EAAqBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,kCAUAF,CAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{B as E,N as l}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as c}from"../utils/logger.esm.js";var w="1.38.1",C={"@lit/react":"1.0.0","@lukeed/uuid":"2.0.0","@shoelace-style/shoelace":"2.11.2",lit:"2.6.1","lodash-es":"4.17.21","lucide-static":"0.292.0"};async function O(o,a){const p={method:"GET",...a,headers:{"Content-Type":"application/json",Accept:"application/json","X-Beam-Client":"WebSDK","X-Beam-Client-Version":w,...a?.headers},preflightContinue:!0,mode:a?.mode||"cors",body:a?.body!=null?a.body:void 0};let r;try{r=await fetch(o,p)}catch(e){const s=new E(`Network call failed (${p?.method.toUpperCase()} ${o})`);throw s.cause=e,c.error(s,o),s}let i,n;try{n=await r.text(),n&&(i=JSON.parse(n))}catch(e){let s=e;throw e instanceof SyntaxError&&(s=new l(r,i,`Response invalid. Expected JSON. Received: "${n}"`),s.cause=e),c.error(s),s}if(!r.ok){const e=new l(r,i,"Response was not OK");throw c.error(e),e}return i}const u="https://api.beamimpact.com",v="https://production.beamimpactlogs.com",U={en:"en",fr:"fr",de:"de",es:"es",it:"it",pl:"pl"},t=(o,a,p)=>({[o]:async function({headers:r={},baseUrl:i=u,apiRoot:n="/api/v3",pathParams:e={},queryParams:s={},requestBody:m}){const h=Object.entries(e).reduce((g,[y,N])=>g.replace(`{${y}}`,N),o),f=JSON.parse(JSON.stringify(s)),d=new URLSearchParams(f).toString(),S=i+n+h+(d&&`?${d}`),b={headers:r,method:a,body:JSON.stringify(m)};return O(S,b)}})[o],L=t("/impact","get"),R=t("/chain/{chainId}/cumulativeImpact","get"),T=t("/selectNonprofit","post"),A=t("/transaction","post"),k=t("/transaction/{transactionId}","put"),x=t("/cart","post"),B=t("/chain/findEligibleNonprofitsForCart","post"),J=t("/logs","post"),D=t("/experimentSession","post"),F=t("/subscriptions/updateSubscriptionNonprofit","post"),I=t("/subscriptions/findOrCreateSubscription","post");export{u as D,U as S,v as a,A as b,x as c,J as d,B as e,I as f,L as g,T as h,k as i,R as j,C as k,D as p,F as u};
|
|
2
|
-
//# sourceMappingURL=routes-UBDDazXd.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{B as E,N as l}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as c}from"../utils/logger.js";var w="1.38.1",C={"@lit/react":"1.0.0","@lukeed/uuid":"2.0.0","@shoelace-style/shoelace":"2.11.2",lit:"2.6.1","lodash-es":"4.17.21","lucide-static":"0.292.0"};async function O(o,a){const p={method:"GET",...a,headers:{"Content-Type":"application/json",Accept:"application/json","X-Beam-Client":"WebSDK","X-Beam-Client-Version":w,...a?.headers},preflightContinue:!0,mode:a?.mode||"cors",body:a?.body!=null?a.body:void 0};let r;try{r=await fetch(o,p)}catch(e){const s=new E(`Network call failed (${p?.method.toUpperCase()} ${o})`);throw s.cause=e,c.error(s,o),s}let i,n;try{n=await r.text(),n&&(i=JSON.parse(n))}catch(e){let s=e;throw e instanceof SyntaxError&&(s=new l(r,i,`Response invalid. Expected JSON. Received: "${n}"`),s.cause=e),c.error(s),s}if(!r.ok){const e=new l(r,i,"Response was not OK");throw c.error(e),e}return i}const u="https://api.beamimpact.com",v="https://production.beamimpactlogs.com",U={en:"en",fr:"fr",de:"de",es:"es",it:"it",pl:"pl"},t=(o,a,p)=>({[o]:async function({headers:r={},baseUrl:i=u,apiRoot:n="/api/v3",pathParams:e={},queryParams:s={},requestBody:m}){const h=Object.entries(e).reduce((g,[y,N])=>g.replace(`{${y}}`,N),o),f=JSON.parse(JSON.stringify(s)),d=new URLSearchParams(f).toString(),S=i+n+h+(d&&`?${d}`),b={headers:r,method:a,body:JSON.stringify(m)};return O(S,b)}})[o],L=t("/impact","get"),R=t("/chain/{chainId}/cumulativeImpact","get"),T=t("/selectNonprofit","post"),A=t("/transaction","post"),k=t("/transaction/{transactionId}","put"),x=t("/cart","post"),B=t("/chain/findEligibleNonprofitsForCart","post"),J=t("/logs","post"),D=t("/experimentSession","post"),F=t("/subscriptions/updateSubscriptionNonprofit","post"),I=t("/subscriptions/findOrCreateSubscription","post");export{u as D,U as S,v as a,A as b,x as c,J as d,B as e,I as f,L as g,T as h,k as i,R as j,C as k,D as p,F as u};
|
|
2
|
-
//# sourceMappingURL=routes-t5eRHMRc.esm.js.map
|