@beamimpact/web-sdk 1.48.0 → 1.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_share-dialog-dependencies-B3N69ml2.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-B3N69ml2.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-CHbTSPha.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-CHbTSPha.esm.js.map +1 -0
- package/dist/chunks/{beam-errors-fXDkG1zo.esm.d.ts → beam-errors-CCe004HS.esm.d.ts} +2 -7
- package/dist/chunks/beam-errors-Ci0d3926.esm.js +2 -0
- package/dist/chunks/beam-errors-Ci0d3926.esm.js.map +1 -0
- package/dist/chunks/cart-contents-CUgc4y1N.esm.d.ts +18 -0
- package/dist/chunks/cart-contents-DkoytiZh.esm.js +2 -0
- package/dist/chunks/{cart-contents-h60geKWa.esm.js.map → cart-contents-DkoytiZh.esm.js.map} +1 -1
- package/dist/chunks/{css-card-grid-nEc--M5M.esm.js → css-card-grid-B6IEaTiP.esm.js} +2 -2
- package/dist/chunks/{css-card-grid-nEc--M5M.esm.js.map → css-card-grid-B6IEaTiP.esm.js.map} +1 -1
- package/dist/chunks/enforce-config-CQb5MiAV.esm.js +3 -0
- package/dist/chunks/enforce-config-CQb5MiAV.esm.js.map +1 -0
- package/dist/chunks/enforce-config-Cw52SuAc.esm.js +3 -0
- package/dist/chunks/enforce-config-Cw52SuAc.esm.js.map +1 -0
- package/dist/chunks/{events-ZCTR9JGZ.esm.d.ts → events-BKkf9u9l.esm.d.ts} +33 -4
- package/dist/chunks/events-BohmT6Lp.esm.js +2 -0
- package/dist/chunks/events-BohmT6Lp.esm.js.map +1 -0
- package/dist/chunks/{index-JDZQClkA.esm.js → index-BQ4Nr7Ux.esm.js} +2 -2
- package/dist/chunks/{index-JDZQClkA.esm.js.map → index-BQ4Nr7Ux.esm.js.map} +1 -1
- package/dist/chunks/index-B_8DexDX.esm.js +2 -0
- package/dist/chunks/index-B_8DexDX.esm.js.map +1 -0
- package/dist/chunks/{index-v6fG3D6u.esm.d.ts → index-BqBEii8E.esm.d.ts} +1 -1
- package/dist/chunks/index-C-beNpP0.esm.js +2 -0
- package/dist/chunks/index-C-beNpP0.esm.js.map +1 -0
- package/dist/chunks/{index-E8H5A7Qq.esm.js → index-C3hpHWh1.esm.js} +1 -1
- package/dist/chunks/index-C3hpHWh1.esm.js.map +1 -0
- package/dist/chunks/{index-XHm2EBaD.esm.js → index-CFYWEffm.esm.js} +2 -2
- package/dist/chunks/{index-XHm2EBaD.esm.js.map → index-CFYWEffm.esm.js.map} +1 -1
- package/dist/chunks/{index-FQExZDX9.esm.js → index-CFtmDAHb.esm.js} +1 -1
- package/dist/chunks/index-CFtmDAHb.esm.js.map +1 -0
- package/dist/chunks/{index-eXilYHHK.esm.js → index-C_ZNnJIS.esm.js} +2 -2
- package/dist/chunks/{index-eXilYHHK.esm.js.map → index-C_ZNnJIS.esm.js.map} +1 -1
- package/dist/chunks/{index-PA0NAKHV.esm.d.ts → index-CbKkAM6h.esm.d.ts} +1 -1
- package/dist/chunks/index-CbWdmBet.esm.js +2 -0
- package/dist/chunks/index-CbWdmBet.esm.js.map +1 -0
- package/dist/chunks/index-CpPbNdWA.esm.js +2 -0
- package/dist/chunks/index-CpPbNdWA.esm.js.map +1 -0
- package/dist/chunks/index-CyiXyHi8.esm.js +2 -0
- package/dist/chunks/index-CyiXyHi8.esm.js.map +1 -0
- package/dist/chunks/{index-XCMf22lv.esm.js → index-D6qJfs7_.esm.js} +1 -1
- package/dist/chunks/index-D6qJfs7_.esm.js.map +1 -0
- package/dist/chunks/index-DhtZDPvk.esm.js +2 -0
- package/dist/chunks/index-DhtZDPvk.esm.js.map +1 -0
- package/dist/chunks/index-Dnm34FcO.esm.d.ts +46 -0
- package/dist/chunks/index-DvbUE31b.esm.d.ts +46 -0
- package/dist/chunks/index-GcpuX_TZ.esm.js +2 -0
- package/dist/chunks/index-GcpuX_TZ.esm.js.map +1 -0
- package/dist/chunks/index-JSoHc6g1.esm.js +2 -0
- package/dist/chunks/index-JSoHc6g1.esm.js.map +1 -0
- package/dist/chunks/index-MS8_Vije.esm.d.ts +15 -0
- package/dist/chunks/index-XZRQN4Rs.esm.js +2 -0
- package/dist/chunks/index-XZRQN4Rs.esm.js.map +1 -0
- package/dist/chunks/{index-JJjxnRZK.esm.js → index-kDoWfjd5.esm.js} +2 -2
- package/dist/chunks/{index-JJjxnRZK.esm.js.map → index-kDoWfjd5.esm.js.map} +1 -1
- package/dist/chunks/index-n7pxZENA.esm.js +2 -0
- package/dist/chunks/index-n7pxZENA.esm.js.map +1 -0
- package/dist/chunks/{index-PiMq5a49.esm.js → index-oGObXjk6.esm.js} +1 -1
- package/dist/chunks/index-oGObXjk6.esm.js.map +1 -0
- package/dist/chunks/{index--z5MSe4-.esm.d.ts → index-v0tUXySN.esm.d.ts} +3 -2
- package/dist/chunks/{is-all-html-elements-SdSkxirh.esm.js → is-all-html-elements-fcB7UUA1.esm.js} +1 -1
- package/dist/chunks/{is-all-html-elements-SdSkxirh.esm.js.map → is-all-html-elements-fcB7UUA1.esm.js.map} +1 -1
- package/dist/chunks/lit-5uUWs2aX.esm.js +34 -0
- package/dist/chunks/{lit-iNN5L_Qk.esm.js.map → lit-5uUWs2aX.esm.js.map} +1 -1
- package/dist/chunks/loading-template-DXNS89Th.esm.js +2 -0
- package/dist/chunks/{loading-template-t4fFsYtr.esm.js.map → loading-template-DXNS89Th.esm.js.map} +1 -1
- package/dist/chunks/{localize-m-_ESmpk.esm.js → localize-CQCRjY9s.esm.js} +6 -6
- package/dist/chunks/{localize-m-_ESmpk.esm.js.map → localize-CQCRjY9s.esm.js.map} +1 -1
- package/dist/chunks/{localize-o-cYvHQf.esm.js → localize-cDQFOecn.esm.js} +6 -6
- package/dist/chunks/{localize-o-cYvHQf.esm.js.map → localize-cDQFOecn.esm.js.map} +1 -1
- package/dist/chunks/lodash-7H4x2457.esm.js +2 -0
- package/dist/chunks/lodash-7H4x2457.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-hjdK2L9Q.esm.d.ts → openapi-spec-VAt3phhg.esm.d.ts} +332 -0
- package/dist/chunks/order-page-CMGPM57D.esm.js +2 -0
- package/dist/chunks/order-page-CMGPM57D.esm.js.map +1 -0
- package/dist/chunks/order-page-FzVtMkga.esm.js +2 -0
- package/dist/chunks/order-page-FzVtMkga.esm.js.map +1 -0
- package/dist/chunks/{order-page-9clVUPaS.esm.d.ts → order-page-tSPKLQ24.esm.d.ts} +11 -8
- package/dist/chunks/{progress-bar-PMU_xI3L.esm.js → progress-bar-oJB_t7od.esm.js} +4 -4
- package/dist/chunks/{progress-bar-PMU_xI3L.esm.js.map → progress-bar-oJB_t7od.esm.js.map} +1 -1
- package/dist/chunks/promo-pill-label-D9ptiGak.esm.js +16 -0
- package/dist/chunks/{promo-pill-label-P1X4xeAx.esm.js.map → promo-pill-label-D9ptiGak.esm.js.map} +1 -1
- package/dist/chunks/promo-types-C1unMpo2.esm.d.ts +14 -0
- package/dist/chunks/promoManager-B9cTR1R3.esm.js +2 -0
- package/dist/chunks/promoManager-B9cTR1R3.esm.js.map +1 -0
- package/dist/chunks/promoManager-fl54hq13.esm.js +2 -0
- package/dist/chunks/promoManager-fl54hq13.esm.js.map +1 -0
- package/dist/chunks/{responsive-2lC2Wrtg.esm.js → responsive-9jAzOYoE.esm.js} +2 -2
- package/dist/chunks/{responsive-2lC2Wrtg.esm.js.map → responsive-9jAzOYoE.esm.js.map} +1 -1
- package/dist/chunks/routes-CaSRr919.esm.js +2 -0
- package/dist/chunks/routes-CaSRr919.esm.js.map +1 -0
- package/dist/chunks/{routes-iurI6dvR.esm.d.ts → routes-DDRd747e.esm.d.ts} +76 -3
- package/dist/chunks/routes-KHEaM_40.esm.js +2 -0
- package/dist/chunks/routes-KHEaM_40.esm.js.map +1 -0
- package/dist/chunks/{share-button-k_Xn5956.esm.js → share-button-BbG-gnwj.esm.js} +4 -4
- package/dist/chunks/{share-button-diP8wKOc.esm.js.map → share-button-BbG-gnwj.esm.js.map} +1 -1
- package/dist/chunks/{share-button-diP8wKOc.esm.js → share-button-CvTUluNq.esm.js} +4 -4
- package/dist/chunks/{share-button-k_Xn5956.esm.js.map → share-button-CvTUluNq.esm.js.map} +1 -1
- package/dist/chunks/{share-button-hDn8fnBI.esm.d.ts → share-button-DBVhw4qa.esm.d.ts} +1 -1
- package/dist/chunks/{share-button-SNvuFDC9.esm.js → share-button-R7jgVCPv.esm.js} +1 -1
- package/dist/chunks/{share-button-SNvuFDC9.esm.js.map → share-button-R7jgVCPv.esm.js.map} +1 -1
- package/dist/chunks/{types-zbTZ8-KP.esm.d.ts → types-CPxMwnoR.esm.d.ts} +5 -1
- package/dist/chunks/update-cart-3JFUCJLD.esm.js +2 -0
- package/dist/chunks/update-cart-3JFUCJLD.esm.js.map +1 -0
- package/dist/chunks/update-cart-DNfl9QP2.esm.js +2 -0
- package/dist/chunks/update-cart-DNfl9QP2.esm.js.map +1 -0
- package/dist/chunks/{update-cart-l86bU5uS.esm.d.ts → update-cart-NiToHHJH.esm.d.ts} +2 -2
- package/dist/chunks/{vendor-GKiOHg2N.esm.js → vendor-DRA8u-S7.esm.js} +2 -2
- package/dist/chunks/{vendor-GKiOHg2N.esm.js.map → vendor-DRA8u-S7.esm.js.map} +1 -1
- package/dist/components/beam-partner-logos.d.ts +1 -1
- package/dist/components/beam-partner-logos.esm.js +4 -4
- package/dist/components/beam-partner-logos.esm.js.map +1 -1
- package/dist/components/beam-partner-logos.js +4 -4
- package/dist/components/beam-partner-logos.js.map +1 -1
- package/dist/components/community-impact.d.ts +3 -3
- package/dist/components/community-impact.esm.js +13 -13
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +13 -13
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.d.ts +2 -2
- package/dist/components/cumulative-impact.esm.js +8 -8
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +8 -8
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.d.ts +9 -5
- package/dist/components/impact-overview.esm.js +19 -19
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +19 -19
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +8 -8
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +15 -7
- package/dist/components/post-purchase.esm.js +4 -4
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +4 -4
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +25 -7
- package/dist/components/product-details-page.esm.js +39 -28
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +39 -28
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +8 -17
- package/dist/components/redeem-transaction.esm.js +27 -27
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +27 -27
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +13 -6
- package/dist/components/select-nonprofit.esm.js +50 -45
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +50 -45
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.d.ts +3 -3
- package/dist/components/select-subscription-nonprofit.esm.js +13 -13
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +13 -13
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +12 -11
- 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/social-share.d.ts +3 -3
- package/dist/components/social-share.esm.js +3 -3
- package/dist/components/social-share.esm.js.map +1 -1
- package/dist/components/social-share.js +3 -3
- package/dist/components/social-share.js.map +1 -1
- package/dist/components/subscription-impact.d.ts +5 -4
- package/dist/components/subscription-impact.esm.js +16 -16
- package/dist/components/subscription-impact.esm.js.map +1 -1
- package/dist/components/subscription-impact.js +16 -16
- package/dist/components/subscription-impact.js.map +1 -1
- package/dist/components/subscription-management.d.ts +18 -7
- package/dist/components/subscription-management.esm.js +9 -9
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +9 -9
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +23 -21
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.d.ts +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.esm.js.map +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/beam.js.map +1 -1
- package/dist/integrations/cart.d.ts +4 -4
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +19 -17
- 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/promoManager.d.ts +36 -0
- package/dist/integrations/promoManager.esm.js +2 -0
- package/dist/integrations/promoManager.esm.js.map +1 -0
- package/dist/integrations/promoManager.js +2 -0
- package/dist/integrations/promoManager.js.map +1 -0
- package/dist/integrations/session.d.ts +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.d.ts +10 -10
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.d.ts +1 -1
- package/dist/integrations/statsig.esm.js +2 -2
- package/dist/integrations/statsig.esm.js.map +1 -1
- package/dist/integrations/statsig.js +2 -2
- package/dist/integrations/statsig.js.map +1 -1
- package/dist/integrations/utils.d.ts +7 -5
- package/dist/integrations/utils.esm.js +1 -1
- package/dist/integrations/utils.js +1 -1
- package/dist/react/beam-partner-logos.d.ts +1 -1
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.d.ts +3 -3
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/cumulative-impact.d.ts +2 -2
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/impact-overview.d.ts +4 -4
- 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 +10 -9
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +7 -7
- 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 +3 -3
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.esm.js.map +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/product-details-page.js.map +1 -1
- package/dist/react/redeem-transaction.d.ts +8 -7
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +8 -7
- 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/select-subscription-nonprofit.d.ts +7 -6
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/social-share.d.ts +3 -3
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.esm.js.map +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/social-share.js.map +1 -1
- package/dist/react/subscription-impact.d.ts +4 -4
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-management.d.ts +7 -7
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/beam-errors.d.ts +1 -1
- package/dist/utils/beam-errors.esm.js +1 -1
- package/dist/utils/beam-errors.js +1 -1
- package/dist/utils/cart.esm.js +1 -1
- package/dist/utils/cart.js +1 -1
- package/dist/utils/cookies.esm.js +1 -1
- package/dist/utils/cookies.esm.js.map +1 -1
- package/dist/utils/cookies.js +1 -1
- package/dist/utils/cookies.js.map +1 -1
- package/dist/utils/debounce.esm.js +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/events.d.ts +5 -4
- package/dist/utils/events.esm.js +1 -1
- package/dist/utils/events.js +1 -1
- package/dist/utils/index.d.ts +7 -5
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/is-equal.esm.js +1 -1
- package/dist/utils/is-equal.js +1 -1
- package/dist/utils/local-storage.esm.js +1 -1
- package/dist/utils/local-storage.js +1 -1
- package/dist/utils/memoize-last.esm.js +1 -1
- package/dist/utils/memoize-last.esm.js.map +1 -1
- package/dist/utils/memoize-last.js +1 -1
- package/dist/utils/memoize-last.js.map +1 -1
- package/dist/utils/network-listeners.esm.js +1 -1
- package/dist/utils/network-listeners.esm.js.map +1 -1
- package/dist/utils/network-listeners.js +1 -1
- package/dist/utils/network-listeners.js.map +1 -1
- package/dist/utils/promoManager.d.ts +123 -0
- package/dist/utils/promoManager.esm.js +2 -0
- package/dist/utils/promoManager.esm.js.map +1 -0
- package/dist/utils/promoManager.js +2 -0
- package/dist/utils/promoManager.js.map +1 -0
- package/dist/utils/remote-session.esm.js +1 -1
- package/dist/utils/remote-session.js +1 -1
- package/dist/utils/wait-for-element.esm.js +1 -1
- package/dist/utils/wait-for-element.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/_share-dialog-dependencies-2jzbs44g.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-2jzbs44g.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-C8uChjuF.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-C8uChjuF.esm.js.map +0 -1
- package/dist/chunks/beam-errors-P-Lu07Ce.esm.js +0 -2
- package/dist/chunks/beam-errors-P-Lu07Ce.esm.js.map +0 -1
- package/dist/chunks/cart-contents-CMm57qu0.esm.d.ts +0 -11
- package/dist/chunks/cart-contents-h60geKWa.esm.js +0 -2
- package/dist/chunks/enforce-config-ZAI7WYAd.esm.js +0 -3
- package/dist/chunks/enforce-config-ZAI7WYAd.esm.js.map +0 -1
- package/dist/chunks/enforce-config-ZyPq_4CF.esm.js +0 -3
- package/dist/chunks/enforce-config-ZyPq_4CF.esm.js.map +0 -1
- package/dist/chunks/events-6Z5MkCRr.esm.js +0 -2
- package/dist/chunks/events-6Z5MkCRr.esm.js.map +0 -1
- package/dist/chunks/index-2bLOkP4H.esm.d.ts +0 -32
- package/dist/chunks/index-CsWTfuok.esm.js +0 -2
- package/dist/chunks/index-CsWTfuok.esm.js.map +0 -1
- package/dist/chunks/index-E8H5A7Qq.esm.js.map +0 -1
- package/dist/chunks/index-FQExZDX9.esm.js.map +0 -1
- package/dist/chunks/index-GynYZRPI.esm.d.ts +0 -32
- package/dist/chunks/index-M7Ut5U3j.esm.js +0 -2
- package/dist/chunks/index-M7Ut5U3j.esm.js.map +0 -1
- package/dist/chunks/index-MIp7LlXH.esm.js +0 -2
- package/dist/chunks/index-MIp7LlXH.esm.js.map +0 -1
- package/dist/chunks/index-PiMq5a49.esm.js.map +0 -1
- package/dist/chunks/index-WvOCqhxv.esm.js +0 -2
- package/dist/chunks/index-WvOCqhxv.esm.js.map +0 -1
- package/dist/chunks/index-XCMf22lv.esm.js.map +0 -1
- package/dist/chunks/index-XH3OS_sy.esm.d.ts +0 -15
- package/dist/chunks/index-YJNgLCif.esm.js +0 -2
- package/dist/chunks/index-YJNgLCif.esm.js.map +0 -1
- package/dist/chunks/index-a6oXV2ro.esm.js +0 -2
- package/dist/chunks/index-a6oXV2ro.esm.js.map +0 -1
- package/dist/chunks/index-dkwGkvOu.esm.js +0 -2
- package/dist/chunks/index-dkwGkvOu.esm.js.map +0 -1
- package/dist/chunks/index-iK195-B9.esm.js +0 -2
- package/dist/chunks/index-iK195-B9.esm.js.map +0 -1
- package/dist/chunks/index-nstmHC95.esm.js +0 -2
- package/dist/chunks/index-nstmHC95.esm.js.map +0 -1
- package/dist/chunks/index-vq14EaW4.esm.js +0 -2
- package/dist/chunks/index-vq14EaW4.esm.js.map +0 -1
- package/dist/chunks/lit-iNN5L_Qk.esm.js +0 -34
- package/dist/chunks/loading-template-t4fFsYtr.esm.js +0 -2
- package/dist/chunks/lodash-P8OIs-at.esm.js +0 -2
- package/dist/chunks/lodash-P8OIs-at.esm.js.map +0 -1
- package/dist/chunks/order-page-Z3WcYluU.esm.js +0 -2
- package/dist/chunks/order-page-Z3WcYluU.esm.js.map +0 -1
- package/dist/chunks/order-page-rrfJ4w9F.esm.js +0 -2
- package/dist/chunks/order-page-rrfJ4w9F.esm.js.map +0 -1
- package/dist/chunks/promo-pill-label-P1X4xeAx.esm.js +0 -16
- package/dist/chunks/routes-Dmf2ZNnZ.esm.js +0 -2
- package/dist/chunks/routes-Dmf2ZNnZ.esm.js.map +0 -1
- package/dist/chunks/routes-o1QpF40R.esm.js +0 -2
- package/dist/chunks/routes-o1QpF40R.esm.js.map +0 -1
- package/dist/chunks/shoelace-components-wBxNHnyr.esm.js +0 -2
- package/dist/chunks/shoelace-components-wBxNHnyr.esm.js.map +0 -1
- package/dist/chunks/shoelace-components-xrhk189_.esm.js +0 -2
- package/dist/chunks/shoelace-components-xrhk189_.esm.js.map +0 -1
- package/dist/chunks/update-cart-EGTcbNRX.esm.js +0 -2
- package/dist/chunks/update-cart-EGTcbNRX.esm.js.map +0 -1
- package/dist/chunks/update-cart-FwtFnnGe.esm.js +0 -2
- package/dist/chunks/update-cart-FwtFnnGe.esm.js.map +0 -1
- /package/dist/chunks/{index-EGiUuWe-.esm.d.ts → index-C-hPf29c.esm.d.ts} +0 -0
- /package/dist/chunks/{index-hn6JhG_w.esm.d.ts → index-DXj15KHe.esm.d.ts} +0 -0
- /package/dist/chunks/{index-mTXm0DPh.esm.d.ts → index-DbaDUPup.esm.d.ts} +0 -0
- /package/dist/chunks/{progress-bar-0VS_AmEf.esm.d.ts → progress-bar-CveZ8E6Q.esm.d.ts} +0 -0
- /package/dist/chunks/{promo-pill-label-3bA1z-la.esm.d.ts → promo-pill-label-BXRqZHET.esm.d.ts} +0 -0
- /package/dist/chunks/{types-aju0qrRe.esm.d.ts → types-C7gqAyyH.esm.d.ts} +0 -0
|
@@ -2,17 +2,17 @@ import * as _lit_react from '@lit/react';
|
|
|
2
2
|
import { BeamSubscriptionManagement as BeamSubscriptionManagement$1 } from '../components/subscription-management.js';
|
|
3
3
|
import 'lit-html';
|
|
4
4
|
import 'lit';
|
|
5
|
-
import '../chunks/routes-
|
|
6
|
-
import '../chunks/cart-contents-
|
|
7
|
-
import '../chunks/openapi-spec-
|
|
5
|
+
import '../chunks/routes-DDRd747e.esm.js';
|
|
6
|
+
import '../chunks/cart-contents-CUgc4y1N.esm.js';
|
|
7
|
+
import '../chunks/openapi-spec-VAt3phhg.esm.js';
|
|
8
8
|
import '../components/select-subscription-nonprofit.js';
|
|
9
9
|
import 'lodash';
|
|
10
|
-
import '../chunks/types-
|
|
11
|
-
import '../chunks/types-
|
|
12
|
-
import '../chunks/progress-bar-
|
|
10
|
+
import '../chunks/types-CPxMwnoR.esm.js';
|
|
11
|
+
import '../chunks/types-C7gqAyyH.esm.js';
|
|
12
|
+
import '../chunks/progress-bar-CveZ8E6Q.esm.js';
|
|
13
13
|
import '../components/beam-partner-logos.js';
|
|
14
14
|
import '../components/subscription-impact.js';
|
|
15
|
-
import '../chunks/share-button-
|
|
15
|
+
import '../chunks/share-button-DBVhw4qa.esm.js';
|
|
16
16
|
|
|
17
17
|
declare const BeamSubscriptionManagement: _lit_react.ReactWebComponent<BeamSubscriptionManagement$1, {}>;
|
|
18
18
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-5uUWs2aX.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-CaSRr919.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-oJB_t7od.esm.js";import"../chunks/enforce-config-Cw52SuAc.esm.js";import"../chunks/localize-cDQFOecn.esm.js";import"../chunks/events-BohmT6Lp.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-7H4x2457.esm.js";import"../chunks/loading-template-DXNS89Th.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-B6IEaTiP.esm.js";import"../components/beam-partner-logos.esm.js";import"../components/subscription-impact.esm.js";import"../chunks/share-button-CvTUluNq.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/vendor-DRA8u-S7.esm.js";import"../chunks/share-button-R7jgVCPv.esm.js";import"../chunks/responsive-9jAzOYoE.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-management.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-5uUWs2aX.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-KHEaM_40.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-oJB_t7od.esm.js";import"../chunks/enforce-config-CQb5MiAV.esm.js";import"../chunks/localize-CQCRjY9s.esm.js";import"../chunks/events-BohmT6Lp.esm.js";import"../components/select-subscription-nonprofit.js";import"../chunks/lodash-7H4x2457.esm.js";import"../chunks/loading-template-DXNS89Th.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-B6IEaTiP.esm.js";import"../components/beam-partner-logos.js";import"../components/subscription-impact.js";import"../chunks/share-button-BbG-gnwj.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/vendor-DRA8u-S7.esm.js";import"../chunks/share-button-R7jgVCPv.esm.js";import"../chunks/responsive-9jAzOYoE.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
|
|
2
2
|
//# sourceMappingURL=subscription-management.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BeamError,
|
|
1
|
+
export { B as BeamError, L as LocalStorageError, M as MissingConfig, N as NetworkError, S as SetupError } from '../chunks/beam-errors-CCe004HS.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as a,
|
|
1
|
+
import{B as a,L as s,M as e,N as t,S as E}from"../chunks/beam-errors-Ci0d3926.esm.js";export{a as BeamError,s as LocalStorageError,e as MissingConfig,t as NetworkError,E as SetupError};
|
|
2
2
|
//# sourceMappingURL=beam-errors.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as a,
|
|
1
|
+
import{B as a,L as s,M as e,N as t,S as E}from"../chunks/beam-errors-Ci0d3926.esm.js";export{a as BeamError,s as LocalStorageError,e as MissingConfig,t as NetworkError,E as SetupError};
|
|
2
2
|
//# sourceMappingURL=beam-errors.js.map
|
package/dist/utils/cart.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getCookieValue as r}from"./cookies.esm.js";import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-
|
|
1
|
+
import{getCookieValue as r}from"./cookies.esm.js";import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.esm.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
|
|
2
2
|
//# sourceMappingURL=cart.esm.js.map
|
package/dist/utils/cart.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getCookieValue as r}from"./cookies.js";import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-
|
|
1
|
+
import{getCookieValue as r}from"./cookies.js";import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
|
|
2
2
|
//# sourceMappingURL=cart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const p=(e=document.cookie)=>e.split(";").reduce((i,n)=>{const o=n.trim(),[t,...a]=o.split("="),r=decodeURIComponent(a.join("="));return i.set(t,r)},new Map),m=e=>p().get(e),c=e=>{const{name:i,value:n,expires:o,...t}=e,a=encodeURIComponent(n),r=`${i}=${a}`,d=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",l=Object.entries(t).map(([u,s])=>s!=null?` ;${u}=${s}`:"").join("");document.cookie=r+l+d},C=e=>{const{name:i,domain:n,path:o}=e,t={name:i,value:"",expires:0};return o!==void 0&&(t.path=o),n!==void 0&&(t.domain=n),c(t)};export{C as deleteCookieValue,p as getCookieMap,m as getCookieValue,c as setCookieValue};
|
|
2
2
|
//# sourceMappingURL=cookies.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.esm.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n
|
|
1
|
+
{"version":3,"file":"cookies.esm.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n const { name, domain, path } = options;\n const cookieOptions: any = {\n name: name,\n value: \"\",\n expires: 0,\n };\n if (path !== undefined) {\n cookieOptions.path = path;\n }\n if (domain !== undefined) {\n cookieOptions.domain = domain;\n }\n return setCookieValue(cookieOptions);\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue","domain","path","cookieOptions"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAK,EAC/B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAA,EAAe,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,YAAa,CAAA,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GAAyE,CACzG,KAAM,CAAE,KAAAF,EAAM,OAAAW,EAAQ,KAAAC,CAAK,EAAIV,EACzBW,EAAqB,CACzB,KAAMb,EACN,MAAO,GACP,QAAS,CACX,EACA,OAAIY,IAAS,SACXC,EAAc,KAAOD,GAEnBD,IAAW,SACbE,EAAc,OAASF,GAElBV,EAAeY,CAAa,CACrC"}
|
package/dist/utils/cookies.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const p=(e=document.cookie)=>e.split(";").reduce((i,n)=>{const o=n.trim(),[t,...a]=o.split("="),r=decodeURIComponent(a.join("="));return i.set(t,r)},new Map),m=e=>p().get(e),c=e=>{const{name:i,value:n,expires:o,...t}=e,a=encodeURIComponent(n),r=`${i}=${a}`,d=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",l=Object.entries(t).map(([u,s])=>s!=null?` ;${u}=${s}`:"").join("");document.cookie=r+l+d},C=e=>{const{name:i,domain:n,path:o}=e,t={name:i,value:"",expires:0};return o!==void 0&&(t.path=o),n!==void 0&&(t.domain=n),c(t)};export{C as deleteCookieValue,p as getCookieMap,m as getCookieValue,c as setCookieValue};
|
|
2
2
|
//# sourceMappingURL=cookies.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookies.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n
|
|
1
|
+
{"version":3,"file":"cookies.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n const { name, domain, path } = options;\n const cookieOptions: any = {\n name: name,\n value: \"\",\n expires: 0,\n };\n if (path !== undefined) {\n cookieOptions.path = path;\n }\n if (domain !== undefined) {\n cookieOptions.domain = domain;\n }\n return setCookieValue(cookieOptions);\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue","domain","path","cookieOptions"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAK,EAC/B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAA,EAAe,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,YAAa,CAAA,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GAAyE,CACzG,KAAM,CAAE,KAAAF,EAAM,OAAAW,EAAQ,KAAAC,CAAK,EAAIV,EACzBW,EAAqB,CACzB,KAAMb,EACN,MAAO,GACP,QAAS,CACX,EACA,OAAIY,IAAS,SACXC,EAAc,KAAOD,GAEnBD,IAAW,SACbE,EAAc,OAASF,GAElBV,EAAeY,CAAa,CACrC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"../chunks/lodash-
|
|
1
|
+
import{d}from"../chunks/lodash-7H4x2457.esm.js";export{d as debounce};
|
|
2
2
|
//# sourceMappingURL=debounce.esm.js.map
|
package/dist/utils/debounce.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d}from"../chunks/lodash-
|
|
1
|
+
import{d}from"../chunks/lodash-7H4x2457.esm.js";export{d as debounce};
|
|
2
2
|
//# sourceMappingURL=debounce.js.map
|
package/dist/utils/events.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import '../chunks/cart-contents-
|
|
2
|
-
import '../chunks/types-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import '../chunks/cart-contents-CUgc4y1N.esm.js';
|
|
2
|
+
import '../chunks/promo-types-C1unMpo2.esm.js';
|
|
3
|
+
import '../chunks/types-CPxMwnoR.esm.js';
|
|
4
|
+
export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, h as BeamPromoCodesStoredEvent, f as BeamStatusChangeEvent, i as BeamWidgetStoredPromoCodesEvent } from '../chunks/events-BKkf9u9l.esm.js';
|
|
5
|
+
import '../chunks/openapi-spec-VAt3phhg.esm.js';
|
package/dist/utils/events.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as t,h as o,d as r,c as n,i as m,b as s,a as d,B as v,f as B}from"../chunks/events-BohmT6Lp.esm.js";export{t as BeamCartChangeEvent,o as BeamCartCreatedEvent,r as BeamNetworkCallEvent,n as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,d as BeamPromoCodesStoredEvent,v as BeamStatusChangeEvent,B as BeamWidgetStoredPromoCodesEvent};
|
|
2
2
|
//# sourceMappingURL=events.esm.js.map
|
package/dist/utils/events.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{g as t,h as o,d as r,c as n,i as m,b as s,a as d,B as v,f as B}from"../chunks/events-BohmT6Lp.esm.js";export{t as BeamCartChangeEvent,o as BeamCartCreatedEvent,r as BeamNetworkCallEvent,n as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,d as BeamPromoCodesStoredEvent,v as BeamStatusChangeEvent,B as BeamWidgetStoredPromoCodesEvent};
|
|
2
2
|
//# sourceMappingURL=events.js.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as errors } from '../chunks/beam-errors-
|
|
2
|
-
export { e as events } from '../chunks/events-
|
|
1
|
+
export { b as errors } from '../chunks/beam-errors-CCe004HS.esm.js';
|
|
2
|
+
export { e as events } from '../chunks/events-BKkf9u9l.esm.js';
|
|
3
3
|
export { logger } from './logger.js';
|
|
4
4
|
export { initNetworkListeners } from './network-listeners.js';
|
|
5
5
|
export { createScopedLocalStorage } from './local-storage.js';
|
|
@@ -9,6 +9,8 @@ export { getRemoteSession, saveRemoteSession } from './remote-session.js';
|
|
|
9
9
|
export { memoizeLast } from './memoize-last.js';
|
|
10
10
|
export { default as debounce } from 'lodash-es/debounce';
|
|
11
11
|
export { default as isEqual } from 'lodash-es/isEqual';
|
|
12
|
-
|
|
13
|
-
import '../chunks/
|
|
14
|
-
import '../chunks/
|
|
12
|
+
export { formatStoreAndReturnPromoCodes, getAllPromoCodesFromCookie, getPromoCodeFromShopifyCookie, getPromoCodesFromCart, getPromoCodesLocalStorage, getSanitizedUrlForStorage, isEmptyPromoData, mapToUnvalidatedPromoCodes, mergeStoreAndReturnPromos, parseJsonStringArray, promoCodesAreEqual, setPromoCodeInCookie, setPromoCodesInLocalStorage } from './promoManager.js';
|
|
13
|
+
import '../chunks/cart-contents-CUgc4y1N.esm.js';
|
|
14
|
+
import '../chunks/openapi-spec-VAt3phhg.esm.js';
|
|
15
|
+
import '../chunks/promo-types-C1unMpo2.esm.js';
|
|
16
|
+
import '../chunks/types-CPxMwnoR.esm.js';
|
package/dist/utils/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"../chunks/beam-errors-
|
|
1
|
+
import{b as r}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-BohmT6Lp.esm.js";import{logger as m}from"./logger.esm.js";import{initNetworkListeners as p}from"./network-listeners.esm.js";import{createScopedLocalStorage as g}from"./local-storage.esm.js";import{waitForElement as C}from"./wait-for-element.esm.js";import{deleteCookieValue as f,getCookieMap as S,getCookieValue as x,setCookieValue as P}from"./cookies.esm.js";import{getRemoteSession as u,saveRemoteSession as c}from"./remote-session.esm.js";import{memoizeLast as F}from"./memoize-last.esm.js";import{d as E,i as R}from"../chunks/lodash-7H4x2457.esm.js";import{f as v,c as y,b as V,h,g as q,a as w,i as z,m as I,j as U,e as j,p as D,s as J,k as M}from"../chunks/promoManager-fl54hq13.esm.js";export{g as createScopedLocalStorage,E as debounce,f as deleteCookieValue,r as errors,a as events,v as formatStoreAndReturnPromoCodes,y as getAllPromoCodesFromCookie,S as getCookieMap,x as getCookieValue,V as getPromoCodeFromShopifyCookie,h as getPromoCodesFromCart,q as getPromoCodesLocalStorage,u as getRemoteSession,w as getSanitizedUrlForStorage,p as initNetworkListeners,z as isEmptyPromoData,R as isEqual,m as logger,I as mapToUnvalidatedPromoCodes,F as memoizeLast,U as mergeStoreAndReturnPromos,j as parseJsonStringArray,D as promoCodesAreEqual,c as saveRemoteSession,P as setCookieValue,J as setPromoCodeInCookie,M as setPromoCodesInLocalStorage,C as waitForElement};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"../chunks/beam-errors-
|
|
1
|
+
import{b as r}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-BohmT6Lp.esm.js";import{logger as m}from"./logger.js";import{initNetworkListeners as p}from"./network-listeners.js";import{createScopedLocalStorage as g}from"./local-storage.js";import{waitForElement as C}from"./wait-for-element.js";import{deleteCookieValue as f,getCookieMap as S,getCookieValue as x,setCookieValue as P}from"./cookies.js";import{getRemoteSession as u,saveRemoteSession as c}from"./remote-session.js";import{memoizeLast as F}from"./memoize-last.js";import{d as E,i as R}from"../chunks/lodash-7H4x2457.esm.js";import{f as v,c as y,b as V,h,g as q,a as w,i as z,m as I,j as U,e as j,p as D,s as J,k as M}from"../chunks/promoManager-B9cTR1R3.esm.js";export{g as createScopedLocalStorage,E as debounce,f as deleteCookieValue,r as errors,a as events,v as formatStoreAndReturnPromoCodes,y as getAllPromoCodesFromCookie,S as getCookieMap,x as getCookieValue,V as getPromoCodeFromShopifyCookie,h as getPromoCodesFromCart,q as getPromoCodesLocalStorage,u as getRemoteSession,w as getSanitizedUrlForStorage,p as initNetworkListeners,z as isEmptyPromoData,R as isEqual,m as logger,I as mapToUnvalidatedPromoCodes,F as memoizeLast,U as mergeStoreAndReturnPromos,j as parseJsonStringArray,D as promoCodesAreEqual,c as saveRemoteSession,P as setCookieValue,J as setPromoCodeInCookie,M as setPromoCodesInLocalStorage,C as waitForElement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as o}from"../chunks/lodash-
|
|
1
|
+
import{i as o}from"../chunks/lodash-7H4x2457.esm.js";export{o as isEqual};
|
|
2
2
|
//# sourceMappingURL=is-equal.esm.js.map
|
package/dist/utils/is-equal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as o}from"../chunks/lodash-
|
|
1
|
+
import{i as o}from"../chunks/lodash-7H4x2457.esm.js";export{o as isEqual};
|
|
2
2
|
//# sourceMappingURL=is-equal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as o}from"../chunks/beam-errors-
|
|
1
|
+
import{L as o}from"../chunks/beam-errors-Ci0d3926.esm.js";import{logger as s}from"./logger.esm.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
|
|
2
2
|
//# sourceMappingURL=local-storage.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as o}from"../chunks/beam-errors-
|
|
1
|
+
import{L as o}from"../chunks/beam-errors-Ci0d3926.esm.js";import{logger as s}from"./logger.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
|
|
2
2
|
//# sourceMappingURL=local-storage.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as a}from"../chunks/lodash-
|
|
1
|
+
import{i as a}from"../chunks/lodash-7H4x2457.esm.js";function f(o,{isEqual:u=a}={}){let i=null,l=null,e=!1,r=0;return(...s)=>{if(e&&u(i,s))return l;const t=o(...s);if(t instanceof Promise){r++;const n=r;t.catch(()=>{n===r&&(e=!1)})}return i=s,l=t,e=!0,t}}export{f as memoizeLast};
|
|
2
2
|
//# sourceMappingURL=memoize-last.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoize-last.esm.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,
|
|
1
|
+
{"version":3,"file":"memoize-last.esm.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,CAAC,EAAe,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as a}from"../chunks/lodash-
|
|
1
|
+
import{i as a}from"../chunks/lodash-7H4x2457.esm.js";function f(o,{isEqual:u=a}={}){let i=null,l=null,e=!1,r=0;return(...s)=>{if(e&&u(i,s))return l;const t=o(...s);if(t instanceof Promise){r++;const n=r;t.catch(()=>{n===r&&(e=!1)})}return i=s,l=t,e=!0,t}}export{f as memoizeLast};
|
|
2
2
|
//# sourceMappingURL=memoize-last.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoize-last.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,
|
|
1
|
+
{"version":3,"file":"memoize-last.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,CAAC,EAAe,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as i}from"../chunks/events-BohmT6Lp.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
|
|
2
2
|
//# sourceMappingURL=network-listeners.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-listeners.esm.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\
|
|
1
|
+
{"version":3,"file":"network-listeners.esm.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n // @ts-expect-error arguments is untyped since xhr.open is an overloaded method\n // eslint-disable-next-line prefer-rest-params\n _open.apply(this, arguments);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"qDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAAM,EACpC,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SACb,EAAA,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAKMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EAGPJ,EAAM,MAAM,KAAM,SAAS,CAC7B,EAEAD,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,WAClB,QAASD,GAAW,OAAO,YAAA,EAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as i}from"../chunks/events-BohmT6Lp.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
|
|
2
2
|
//# sourceMappingURL=network-listeners.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-listeners.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\
|
|
1
|
+
{"version":3,"file":"network-listeners.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n // @ts-expect-error arguments is untyped since xhr.open is an overloaded method\n // eslint-disable-next-line prefer-rest-params\n _open.apply(this, arguments);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"qDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAAM,EACpC,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SACb,EAAA,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAKMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EAGPJ,EAAM,MAAM,KAAM,SAAS,CAC7B,EAEAD,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,WAClB,QAASD,GAAW,OAAO,YAAA,EAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { b as TBeamCartLocalStorage } from '../chunks/cart-contents-CUgc4y1N.esm.js';
|
|
2
|
+
import { a as TPromoCodeResponse, b as TValidatedPromoResponse, T as TPromoCodeRequest, c as TPromoCodeAttribute } from '../chunks/promo-types-C1unMpo2.esm.js';
|
|
3
|
+
import '../chunks/openapi-spec-VAt3phhg.esm.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves all validated promo codes stored in the "beam_promo_codes" cookie and parses it
|
|
7
|
+
*
|
|
8
|
+
* @returns {TPromoCodeResponse | undefined} An array of `ValidatedPromoCode` objects if found and parsed successfully, otherwise `undefined`
|
|
9
|
+
*/
|
|
10
|
+
declare const getAllPromoCodesFromCookie: () => TPromoCodeResponse | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Stores the validated promo codes in the "beam_promo_codes" cookie, replaces and does not merge
|
|
13
|
+
*
|
|
14
|
+
* @param {TValidatedPromoResponse} validatedPromoCodes
|
|
15
|
+
* @param {string} domain
|
|
16
|
+
*/
|
|
17
|
+
declare const setPromoCodeInCookie: ({ validatedPromoCodes, domain, }: {
|
|
18
|
+
validatedPromoCodes: TValidatedPromoResponse;
|
|
19
|
+
domain?: string | undefined;
|
|
20
|
+
}) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves promo codes from localStorage, scoped by API key
|
|
23
|
+
* @param {string} apiKey API key used for storage scoping
|
|
24
|
+
* @returns {TPromoCodeRequest | null} - Returns stored promo codes object containing both
|
|
25
|
+
* validated and unvalidated codes
|
|
26
|
+
* - If no codes exist, returns a fresh object with empty arrays
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
declare const getPromoCodesLocalStorage: ({ apiKey }: {
|
|
30
|
+
apiKey: string;
|
|
31
|
+
}) => TPromoCodeRequest | null;
|
|
32
|
+
/**
|
|
33
|
+
* Sets promo codes in localStorage
|
|
34
|
+
* @param {TPromoCodeRequest} promoCodes New promo codes to add
|
|
35
|
+
* @param {string} apiKey API key for storage scoping
|
|
36
|
+
*/
|
|
37
|
+
declare const setPromoCodesInLocalStorage: ({ apiKey, promoCodes, }: {
|
|
38
|
+
apiKey?: string | undefined;
|
|
39
|
+
promoCodes: Partial<TPromoCodeRequest>;
|
|
40
|
+
}) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Merges new promo codes with existing ones and returns the combined result
|
|
43
|
+
* @param {Partial<TPromoCodeRequest>} newPromos New promo codes to add
|
|
44
|
+
* @param {string} apiKey API key for storage scoping
|
|
45
|
+
* @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
|
|
46
|
+
* @example
|
|
47
|
+
* const result = mergePromoCodes({
|
|
48
|
+
* apiKey: 'beam_123',
|
|
49
|
+
* newPromos: {
|
|
50
|
+
* unvalidatedPromoCodes: [
|
|
51
|
+
* { type: 'manual', attributes: { value: 'WINTER20' } },
|
|
52
|
+
* { type: 'url', attributes: { url: 'www.example.com/?promo=HOLIDAY25' } }
|
|
53
|
+
* ]
|
|
54
|
+
* }
|
|
55
|
+
* });
|
|
56
|
+
*/
|
|
57
|
+
declare const mergeStoreAndReturnPromos: ({ newPromos, apiKey, }: {
|
|
58
|
+
newPromos: Partial<TPromoCodeRequest>;
|
|
59
|
+
apiKey: string;
|
|
60
|
+
}) => TPromoCodeRequest;
|
|
61
|
+
/**
|
|
62
|
+
* Formats unvalidated promo codes by determining their source and attributes
|
|
63
|
+
* The function will assign `QueryParam` as the source if a `url` exists,
|
|
64
|
+
* otherwise, it will assign `Manual` as the source
|
|
65
|
+
*
|
|
66
|
+
* @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
|
|
67
|
+
* @returns {TUnvalidatedPromoRequest} - An array of UnvalidatedPromoCode objects,
|
|
68
|
+
* each with a source and attributes object
|
|
69
|
+
*/
|
|
70
|
+
declare const mapToUnvalidatedPromoCodes: (promoAttributes: TPromoCodeAttribute[]) => (Partial<{
|
|
71
|
+
type?: "manual" | "url" | undefined;
|
|
72
|
+
} & {
|
|
73
|
+
attributes?: {
|
|
74
|
+
value?: string | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
}> & Partial<{
|
|
77
|
+
type?: "manual" | "url" | undefined;
|
|
78
|
+
} & {
|
|
79
|
+
attributes?: {
|
|
80
|
+
url?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
}>)[];
|
|
83
|
+
/**
|
|
84
|
+
* @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
|
|
85
|
+
* @param {string} apiKey API key for storage scoping
|
|
86
|
+
* @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
|
|
87
|
+
*/
|
|
88
|
+
declare const formatStoreAndReturnPromoCodes: (promoAttributes: TPromoCodeAttribute[], apiKey: string) => TPromoCodeRequest;
|
|
89
|
+
/**
|
|
90
|
+
* Extracts applicable promo codes from the cart object
|
|
91
|
+
* This function retrieves discounts stored in the cart's `content.discounts` array,
|
|
92
|
+
* filters out only the applicable promo codes, and returns them as an array of strings
|
|
93
|
+
*
|
|
94
|
+
* @param {TBeamCartLocalStorage} cart The cart object retrieved from local storage
|
|
95
|
+
* @returns {string[]} An array of applicable promo codes
|
|
96
|
+
*/
|
|
97
|
+
declare const getPromoCodesFromCart: (cart: TBeamCartLocalStorage) => string[];
|
|
98
|
+
/**
|
|
99
|
+
* Gets promo code exclusively from Shopify discount cookie
|
|
100
|
+
* @returns {string | null} Single discount code or null if not found
|
|
101
|
+
*/
|
|
102
|
+
declare const getPromoCodeFromShopifyCookie: () => string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Safely parses a JSON string into an array of strings
|
|
105
|
+
* If parsing fails or the input is not a valid JSON array, it returns an empty array
|
|
106
|
+
*
|
|
107
|
+
* @param {string | undefined | null} jsonString The JSON string to parse
|
|
108
|
+
* @returns {string[]} The parsed array of strings or an empty array if parsing fails
|
|
109
|
+
*/
|
|
110
|
+
declare const parseJsonStringArray: (jsonString: string | undefined | null) => string[];
|
|
111
|
+
/**
|
|
112
|
+
* Retrieves and sanitizes the current URL for storage, preserving only safe query parameters
|
|
113
|
+
*
|
|
114
|
+
* @returns {TPromoCodeAttribute} Returns an object with only the `url` property set
|
|
115
|
+
*/
|
|
116
|
+
declare const getSanitizedUrlForStorage: () => TPromoCodeAttribute | undefined;
|
|
117
|
+
declare const promoCodesAreEqual: (a: TPromoCodeRequest, b: TPromoCodeRequest) => boolean;
|
|
118
|
+
declare const isEmptyPromoData: (promos: {
|
|
119
|
+
unvalidatedPromoCodes?: unknown[];
|
|
120
|
+
validatedPromoCodes?: unknown[];
|
|
121
|
+
}) => boolean;
|
|
122
|
+
|
|
123
|
+
export { formatStoreAndReturnPromoCodes, getAllPromoCodesFromCookie, getPromoCodeFromShopifyCookie, getPromoCodesFromCart, getPromoCodesLocalStorage, getSanitizedUrlForStorage, isEmptyPromoData, mapToUnvalidatedPromoCodes, mergeStoreAndReturnPromos, parseJsonStringArray, promoCodesAreEqual, setPromoCodeInCookie, setPromoCodesInLocalStorage };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as m,c as d,b as i,h as C,g,a as p,i as n,m as P,j as S,e as l,p as A,s as f,k}from"../chunks/promoManager-fl54hq13.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./cookies.esm.js";import"./local-storage.esm.js";import"./logger.esm.js";export{m as formatStoreAndReturnPromoCodes,d as getAllPromoCodesFromCookie,i as getPromoCodeFromShopifyCookie,C as getPromoCodesFromCart,g as getPromoCodesLocalStorage,p as getSanitizedUrlForStorage,n as isEmptyPromoData,P as mapToUnvalidatedPromoCodes,S as mergeStoreAndReturnPromos,l as parseJsonStringArray,A as promoCodesAreEqual,f as setPromoCodeInCookie,k as setPromoCodesInLocalStorage};
|
|
2
|
+
//# sourceMappingURL=promoManager.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promoManager.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as m,c as d,b as i,h as C,g,a as p,i as n,m as P,j as S,e as l,p as A,s as f,k}from"../chunks/promoManager-B9cTR1R3.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./cookies.js";import"./local-storage.js";import"./logger.js";export{m as formatStoreAndReturnPromoCodes,d as getAllPromoCodesFromCookie,i as getPromoCodeFromShopifyCookie,C as getPromoCodesFromCart,g as getPromoCodesLocalStorage,p as getSanitizedUrlForStorage,n as isEmptyPromoData,P as mapToUnvalidatedPromoCodes,S as mergeStoreAndReturnPromos,l as parseJsonStringArray,A as promoCodesAreEqual,f as setPromoCodeInCookie,k as setPromoCodesInLocalStorage};
|
|
2
|
+
//# sourceMappingURL=promoManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promoManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-
|
|
1
|
+
import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.esm.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
|
|
2
2
|
//# sourceMappingURL=remote-session.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-
|
|
1
|
+
import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
|
|
2
2
|
//# sourceMappingURL=remote-session.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as s}from"../chunks/beam-errors-
|
|
1
|
+
import{B as s}from"../chunks/beam-errors-Ci0d3926.esm.js";function l(t,{timeout:c=1e4}={}){return new Promise((r,i)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const m=setTimeout(()=>{e||(o?.disconnect(),i(new s(`Timed out waiting for '${t}'`)))},c);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(u=>{e=u,r(u),n.disconnect(),clearTimeout(m)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=wait-for-element.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as s}from"../chunks/beam-errors-
|
|
1
|
+
import{B as s}from"../chunks/beam-errors-Ci0d3926.esm.js";function l(t,{timeout:c=1e4}={}){return new Promise((r,i)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const m=setTimeout(()=>{e||(o?.disconnect(),i(new s(`Timed out waiting for '${t}'`)))},c);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(u=>{e=u,r(u),n.disconnect(),clearTimeout(m)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=wait-for-element.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beamimpact/web-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.51.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -83,19 +83,19 @@
|
|
|
83
83
|
"eslint-plugin-import": "2.27.5",
|
|
84
84
|
"eslint-plugin-lit": "1.8.2",
|
|
85
85
|
"eslint-plugin-lodash": "7.4.0",
|
|
86
|
-
"fastify": "4.
|
|
86
|
+
"fastify": "4.29.1",
|
|
87
87
|
"husky": "8.0.3",
|
|
88
88
|
"lint-staged": "13.1.1",
|
|
89
89
|
"nodemon": "3.0.1",
|
|
90
90
|
"npm-run-all": "4.1.5",
|
|
91
91
|
"prettier": "2.8.4",
|
|
92
92
|
"react": "18.2.0",
|
|
93
|
-
"rollup": "4.1
|
|
93
|
+
"rollup": "4.41.1",
|
|
94
94
|
"rollup-plugin-copy": "3.5.0",
|
|
95
95
|
"rollup-plugin-dts": "6.1.0",
|
|
96
96
|
"rollup-plugin-esbuild": "6.1.0",
|
|
97
97
|
"typescript": "4.9.5",
|
|
98
|
-
"vite": "4.5.
|
|
98
|
+
"vite": "4.5.14",
|
|
99
99
|
"wait-on": "7.2.0"
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_share-dialog-dependencies-2jzbs44g.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./vendor-GKiOHg2N.esm.js";import"./shoelace-components-xrhk189_.esm.js";import"./lit-iNN5L_Qk.esm.js";import"./routes-Dmf2ZNnZ.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";
|
|
2
|
-
//# sourceMappingURL=_share-dialog-dependencies-C8uChjuF.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_share-dialog-dependencies-C8uChjuF.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|