@pelcro/react-pelcro-js 3.17.0-beta.11 → 3.17.0-beta.13

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/index.cjs.js CHANGED
@@ -8558,17 +8558,17 @@ const createPelcroHook = store => {
8558
8558
  */
8559
8559
  pelcroHook.override = fn => {
8560
8560
  const partialState = fn(store.setState, store.getState);
8561
- usePelcro$1.setState(partialState);
8561
+ usePelcro.setState(partialState);
8562
8562
  };
8563
8563
  pelcroHook.getStore = pelcroHook.getState;
8564
8564
  return pelcroHook;
8565
8565
  };
8566
8566
  const pelcroStore = createPelcroStore();
8567
- const usePelcro$1 = createPelcroHook(pelcroStore);
8567
+ const usePelcro = createPelcroHook(pelcroStore);
8568
8568
 
8569
8569
  /* istanbul ignore next */
8570
8570
  if (process.env.NODE_ENV === "development") {
8571
- c$1("Pelcro Store", usePelcro$1);
8571
+ c$1("Pelcro Store", usePelcro);
8572
8572
  }
8573
8573
 
8574
8574
  /**
@@ -8760,7 +8760,7 @@ const trackSubscriptionOnGA = () => {
8760
8760
  product,
8761
8761
  plan,
8762
8762
  couponCode
8763
- } = usePelcro$1.getStore();
8763
+ } = usePelcro.getStore();
8764
8764
 
8765
8765
  /*
8766
8766
  getting the latest subscription id from invoices instead of subscriptions
@@ -9067,7 +9067,7 @@ class SaveToMetadataButtonClass {
9067
9067
  _defineProperty$3(this, "unauthenticated", () => {
9068
9068
  const {
9069
9069
  switchView
9070
- } = usePelcro$1.getStore();
9070
+ } = usePelcro.getStore();
9071
9071
  _classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
9072
9072
  _classPrivateFieldGet(this, _unmarkAllSavedButtons).call(this);
9073
9073
  });
@@ -9136,7 +9136,7 @@ class SaveToMetadataButtonClass {
9136
9136
  const user = window.Pelcro.user.read();
9137
9137
  const {
9138
9138
  switchView
9139
- } = usePelcro$1.getStore();
9139
+ } = usePelcro.getStore();
9140
9140
  const {
9141
9141
  key,
9142
9142
  ...buttonMetadata
@@ -10237,7 +10237,7 @@ const init$1 = () => {
10237
10237
  addToCart,
10238
10238
  purchaseItem,
10239
10239
  setSubscriptionToManageMembers
10240
- } = usePelcro$1.getStore();
10240
+ } = usePelcro.getStore();
10241
10241
  const pelcroDashboardButtonsByClass = document.getElementsByClassName("pelcro-dashboard-button");
10242
10242
  if (pelcroDashboardButtonsByClass.length !== 0) {
10243
10243
  for (let i = 0; i < pelcroDashboardButtonsByClass.length; i++) {
@@ -10491,7 +10491,7 @@ const init = () => {
10491
10491
  const {
10492
10492
  switchView,
10493
10493
  set
10494
- } = usePelcro$1.getStore();
10494
+ } = usePelcro.getStore();
10495
10495
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
10496
10496
  if (entitlementsProtectedElements.length === 0) {
10497
10497
  return false;
@@ -10569,7 +10569,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
10569
10569
  document.addEventListener("PelcroSubscriptionCreate", event => {
10570
10570
  const {
10571
10571
  isGift
10572
- } = usePelcro$1.getStore();
10572
+ } = usePelcro.getStore();
10573
10573
  if (isGift) return;
10574
10574
  const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
10575
10575
  const shouldUnblurContent = entitlements.some(ent => {
@@ -10896,7 +10896,7 @@ const initPaywalls = () => {
10896
10896
  }
10897
10897
  const {
10898
10898
  switchView
10899
- } = usePelcro$1.getStore();
10899
+ } = usePelcro.getStore();
10900
10900
  if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
10901
10901
  /*
10902
10902
  showing both the meter and the entitlements notification doesn't make sense from
@@ -10917,7 +10917,7 @@ const loadPaymentSDKs = () => {
10917
10917
  // Lazy load stripe's SDK
10918
10918
  const {
10919
10919
  whenUserReady
10920
- } = usePelcro$1.getStore();
10920
+ } = usePelcro.getStore();
10921
10921
  whenUserReady(() => {
10922
10922
  if (!window.Stripe) {
10923
10923
  pure_1(window.Pelcro.environment.stripe);
@@ -10961,7 +10961,7 @@ const loadAuth0SDK = () => {
10961
10961
  const initSecuritySdk = () => {
10962
10962
  const {
10963
10963
  whenSiteReady
10964
- } = usePelcro$1.getStore();
10964
+ } = usePelcro.getStore();
10965
10965
  whenSiteReady(() => {
10966
10966
  var _window$Pelcro$site$r2;
10967
10967
  const securityKey = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.security_key;
@@ -10994,7 +10994,7 @@ const dispatchModalDisplayEvents = modalName => {
10994
10994
  const {
10995
10995
  whenSiteReady,
10996
10996
  whenEcommerceLoaded
10997
- } = usePelcro$1.getStore();
10997
+ } = usePelcro.getStore();
10998
10998
  const renderShopView = shopComponent => {
10999
10999
  whenEcommerceLoaded(() => {
11000
11000
  const shopElement = document.getElementById("pelcro-shop");
@@ -11069,7 +11069,7 @@ const initViewFromURL = () => {
11069
11069
  const {
11070
11070
  switchView,
11071
11071
  whenSiteReady
11072
- } = usePelcro$1.getStore();
11072
+ } = usePelcro.getStore();
11073
11073
  if (isValidViewFromURL(view)) {
11074
11074
  whenSiteReady(() => {
11075
11075
  if (view === "plan-select") {
@@ -11116,7 +11116,7 @@ const initSubscriptionFromURL = () => {
11116
11116
  switchView,
11117
11117
  whenSiteReady,
11118
11118
  set
11119
- } = usePelcro$1.getStore();
11119
+ } = usePelcro.getStore();
11120
11120
  whenSiteReady(() => {
11121
11121
  var _selectedProduct$plan;
11122
11122
  const productsList = window.Pelcro.product.list();
@@ -11137,7 +11137,7 @@ const initSubscriptionFromURL = () => {
11137
11137
  isAuthenticated,
11138
11138
  switchToAddressView,
11139
11139
  switchToPaymentView
11140
- } = usePelcro$1.getStore();
11140
+ } = usePelcro.getStore();
11141
11141
  if (!isAuthenticated()) {
11142
11142
  return switchView("register");
11143
11143
  }
@@ -11164,7 +11164,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
11164
11164
  switchToPaymentView,
11165
11165
  switchToAddressView,
11166
11166
  set
11167
- } = usePelcro$1.getStore();
11167
+ } = usePelcro.getStore();
11168
11168
  whenSiteReady(() => {
11169
11169
  window.Pelcro.plan.getPlan({
11170
11170
  plan_id: offlinePlanId
@@ -11205,7 +11205,7 @@ const initPurchaseFromUrl = () => {
11205
11205
  const {
11206
11206
  whenEcommerceLoaded,
11207
11207
  purchaseItem
11208
- } = usePelcro$1.getStore();
11208
+ } = usePelcro.getStore();
11209
11209
  whenEcommerceLoaded(() => {
11210
11210
  const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
11211
11211
  purchaseItem(skuId);
@@ -11221,7 +11221,7 @@ const initCartFromUrl = () => {
11221
11221
  whenEcommerceLoaded,
11222
11222
  addToCart,
11223
11223
  switchView
11224
- } = usePelcro$1.getStore();
11224
+ } = usePelcro.getStore();
11225
11225
  whenEcommerceLoaded(() => {
11226
11226
  const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
11227
11227
  const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
@@ -11239,7 +11239,7 @@ const verifyEmailTokenFromUrl = () => {
11239
11239
  var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
11240
11240
  const {
11241
11241
  whenSiteReady
11242
- } = usePelcro$1.getStore();
11242
+ } = usePelcro.getStore();
11243
11243
  const translations = i18next.t("verifyEmail:messages", {
11244
11244
  returnObjects: true
11245
11245
  });
@@ -11265,7 +11265,7 @@ const verifyLinkTokenFromUrl = () => {
11265
11265
  whenSiteReady,
11266
11266
  resetView,
11267
11267
  isAuthenticated
11268
- } = usePelcro$1.getStore();
11268
+ } = usePelcro.getStore();
11269
11269
  const translations = i18next.t("verifyLinkToken:messages", {
11270
11270
  returnObjects: true
11271
11271
  });
@@ -11300,12 +11300,12 @@ const showPasswordlessRequestFromUrl = () => {
11300
11300
  var _window$Pelcro$site$r8;
11301
11301
  const {
11302
11302
  isAuthenticated
11303
- } = usePelcro$1.getStore();
11303
+ } = usePelcro.getStore();
11304
11304
  const passwordlessEnabled = (_window$Pelcro$site$r8 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r8 === void 0 ? void 0 : _window$Pelcro$site$r8.passwordless_enabled;
11305
11305
  if (!passwordlessEnabled || isAuthenticated()) return;
11306
11306
  const {
11307
11307
  switchView
11308
- } = usePelcro$1.getStore();
11308
+ } = usePelcro.getStore();
11309
11309
  return switchView("passwordless-request");
11310
11310
  };
11311
11311
  const showInvoiceDetailsFromUrl = () => {
@@ -11315,7 +11315,7 @@ const showInvoiceDetailsFromUrl = () => {
11315
11315
  whenUserReady,
11316
11316
  whenSiteReady,
11317
11317
  switchView
11318
- } = usePelcro$1.getStore();
11318
+ } = usePelcro.getStore();
11319
11319
  whenSiteReady(() => {
11320
11320
  if (!isAuthenticated()) {
11321
11321
  return switchView("login");
@@ -11331,7 +11331,7 @@ const showInvoiceDetailsFromUrl = () => {
11331
11331
  }
11332
11332
  const {
11333
11333
  invoice
11334
- } = usePelcro$1.getStore();
11334
+ } = usePelcro.getStore();
11335
11335
  if (invoice.total === 0) {
11336
11336
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11337
11337
  returnObjects: true
@@ -11349,7 +11349,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11349
11349
  whenUserReady,
11350
11350
  whenSiteReady,
11351
11351
  switchView
11352
- } = usePelcro$1.getStore();
11352
+ } = usePelcro.getStore();
11353
11353
  whenSiteReady(() => {
11354
11354
  if (!isAuthenticated()) {
11355
11355
  return switchView("login");
@@ -11387,7 +11387,7 @@ const PelcroModalController = _ref => {
11387
11387
  view,
11388
11388
  isAuthenticated,
11389
11389
  whenSiteReady
11390
- } = usePelcro$1();
11390
+ } = usePelcro();
11391
11391
  React__default['default'].useEffect(() => {
11392
11392
  init$1();
11393
11393
  renderShopView(React__default['default'].Children.map(children, child => child).find(_ref2 => {
@@ -13115,7 +13115,7 @@ function Modal(_ref) {
13115
13115
  children,
13116
13116
  ...props
13117
13117
  } = _ref;
13118
- const resetView = usePelcro$1(state => state.resetView);
13118
+ const resetView = usePelcro(state => state.resetView);
13119
13119
  React.useEffect(() => {
13120
13120
  onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
13121
13121
  dispatchModalDisplayEvents(id);
@@ -13194,23 +13194,27 @@ function LoginModal(_ref) {
13194
13194
  switchView,
13195
13195
  resetView,
13196
13196
  product,
13197
+ plan,
13197
13198
  order,
13198
13199
  switchToAddressView,
13199
13200
  switchToPaymentView
13200
- } = usePelcro$1();
13201
+ } = usePelcro();
13201
13202
  const onSuccess = res => {
13202
13203
  var _props$onSuccess;
13203
13204
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
13204
13205
  if (window.Pelcro.paywall.isArticleRestricted()) {
13205
13206
  initPaywalls();
13206
13207
  }
13207
- if (product) {
13208
+ if (product && plan) {
13208
13209
  if (product.address_required) {
13209
13210
  return switchToAddressView();
13210
13211
  } else {
13211
13212
  return switchToPaymentView();
13212
13213
  }
13213
13214
  }
13215
+ if (product && !plan) {
13216
+ return switchView("plan-select");
13217
+ }
13214
13218
  if (order) {
13215
13219
  return switchToAddressView();
13216
13220
  }
@@ -13534,7 +13538,7 @@ function RegisterView(props) {
13534
13538
  } = useTranslation("register");
13535
13539
  const {
13536
13540
  product
13537
- } = usePelcro$1();
13541
+ } = usePelcro();
13538
13542
  const title = (_product$paywall$regi = product === null || product === void 0 ? void 0 : (_product$paywall = product.paywall) === null || _product$paywall === void 0 ? void 0 : _product$paywall.register_title) !== null && _product$paywall$regi !== void 0 ? _product$paywall$regi : t("title");
13539
13543
  const subtitle = (_product$paywall$regi2 = product === null || product === void 0 ? void 0 : (_product$paywall2 = product.paywall) === null || _product$paywall2 === void 0 ? void 0 : _product$paywall2.register_subtitle) !== null && _product$paywall$regi2 !== void 0 ? _product$paywall$regi2 : t("subtitle");
13540
13544
  const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
@@ -13757,10 +13761,11 @@ function RegisterModal(props) {
13757
13761
  switchToAddressView,
13758
13762
  switchToPaymentView,
13759
13763
  product,
13764
+ plan,
13760
13765
  order,
13761
13766
  giftCode,
13762
13767
  isGift
13763
- } = usePelcro$1();
13768
+ } = usePelcro();
13764
13769
  const onSuccess = res => {
13765
13770
  var _props$onSuccess;
13766
13771
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
@@ -13795,13 +13800,16 @@ function RegisterModal(props) {
13795
13800
  if (order) {
13796
13801
  return switchToAddressView();
13797
13802
  }
13798
- if (product) {
13803
+ if (product && plan) {
13799
13804
  if (product.address_required) {
13800
13805
  return switchToAddressView();
13801
13806
  } else {
13802
13807
  return switchToPaymentView();
13803
13808
  }
13804
13809
  }
13810
+ if (product && !plan) {
13811
+ return switchView("plan-select");
13812
+ }
13805
13813
  return resetView();
13806
13814
  };
13807
13815
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
@@ -13873,7 +13881,7 @@ function SelectModalWithHook(props) {
13873
13881
  resetView,
13874
13882
  view,
13875
13883
  set
13876
- } = usePelcro$1();
13884
+ } = usePelcro();
13877
13885
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
13878
13886
  const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
13879
13887
  return /*#__PURE__*/React__default['default'].createElement(SelectModalWithTrans, {
@@ -14114,7 +14122,7 @@ class SelectModal extends React.Component {
14114
14122
  const {
14115
14123
  switchToAddressView,
14116
14124
  switchToPaymentView
14117
- } = usePelcro$1.getStore();
14125
+ } = usePelcro.getStore();
14118
14126
  if (!isAuthenticated) {
14119
14127
  return setView("register");
14120
14128
  }
@@ -16215,16 +16223,16 @@ const PaymentMethodContainerWithoutStripe = _ref => {
16215
16223
  const {
16216
16224
  t
16217
16225
  } = useTranslation("payment");
16218
- const pelcroStore = usePelcro$1();
16226
+ const pelcroStore = usePelcro();
16219
16227
  const {
16220
16228
  set,
16221
16229
  order,
16222
16230
  selectedPaymentMethodId,
16223
16231
  couponCode
16224
- } = usePelcro$1();
16232
+ } = usePelcro();
16225
16233
  const {
16226
16234
  whenUserReady
16227
- } = usePelcro$1.getStore();
16235
+ } = usePelcro.getStore();
16228
16236
  const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
16229
16237
  const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
16230
16238
  const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
@@ -17774,7 +17782,7 @@ const PaymentMethodContainer = props => {
17774
17782
  const [isStripeLoaded, setIsStripeLoaded] = React.useState(Boolean(window.Stripe));
17775
17783
  const {
17776
17784
  whenUserReady
17777
- } = usePelcro$1.getStore();
17785
+ } = usePelcro.getStore();
17778
17786
  React.useEffect(() => {
17779
17787
  whenUserReady(() => {
17780
17788
  if (!window.Stripe) {
@@ -17870,7 +17878,7 @@ const PelcroPaymentRequestButton = props => {
17870
17878
  const CheckoutForm = () => {
17871
17879
  const {
17872
17880
  selectedPaymentMethodId
17873
- } = usePelcro$1();
17881
+ } = usePelcro();
17874
17882
  const cardProcessor = getSiteCardProcessor();
17875
17883
  if (selectedPaymentMethodId) {
17876
17884
  return null;
@@ -17919,7 +17927,7 @@ const DiscountedPrice = props => {
17919
17927
  const {
17920
17928
  order,
17921
17929
  plan
17922
- } = usePelcro$1();
17930
+ } = usePelcro();
17923
17931
  const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
17924
17932
  const ecommOrderCurrency = (_order$currency = order === null || order === void 0 ? void 0 : order.currency) !== null && _order$currency !== void 0 ? _order$currency : order === null || order === void 0 ? void 0 : (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency;
17925
17933
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
@@ -17952,7 +17960,7 @@ const SubmitPaymentMethod = _ref => {
17952
17960
  } = _ref;
17953
17961
  const {
17954
17962
  plan
17955
- } = usePelcro$1();
17963
+ } = usePelcro();
17956
17964
  const {
17957
17965
  t
17958
17966
  } = useTranslation("checkoutForm");
@@ -18344,7 +18352,7 @@ const PaypalSubscribeButton = props => {
18344
18352
  plan,
18345
18353
  invoice,
18346
18354
  selectedAddressId
18347
- } = usePelcro$1();
18355
+ } = usePelcro();
18348
18356
  React.useEffect(() => {
18349
18357
  var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
18350
18358
  // sometimes, price is updated. eg. Coupon codes.
@@ -18481,7 +18489,7 @@ const SelectedPaymentMethod = () => {
18481
18489
  const {
18482
18490
  switchView,
18483
18491
  selectedPaymentMethodId
18484
- } = usePelcro$1();
18492
+ } = usePelcro();
18485
18493
  const paymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : (_window$Pelcro$user$r2 = _window$Pelcro$user$r.sources) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : (_window$Pelcro$user$r3 = _window$Pelcro$user$r2.find) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.call(_window$Pelcro$user$r2, source => {
18486
18494
  return source.id == selectedPaymentMethodId;
18487
18495
  });
@@ -18521,7 +18529,7 @@ const TaxAmount = () => {
18521
18529
  } = React.useContext(store$k);
18522
18530
  const {
18523
18531
  plan
18524
- } = usePelcro$1();
18532
+ } = usePelcro();
18525
18533
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
18526
18534
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
18527
18535
  const isTaxInclusive = (_window$Pelcro$site = window.Pelcro.site) === null || _window$Pelcro$site === void 0 ? void 0 : (_window$Pelcro$site$r = _window$Pelcro$site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tax_inclusive;
@@ -18665,7 +18673,7 @@ const SubscriptionRenewView = _ref => {
18665
18673
  const {
18666
18674
  product,
18667
18675
  plan
18668
- } = usePelcro$1();
18676
+ } = usePelcro();
18669
18677
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
18670
18678
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
18671
18679
  const getPricingText = plan => {
@@ -18718,7 +18726,7 @@ function SubscriptionRenewModal(_ref) {
18718
18726
  } = _ref;
18719
18727
  const {
18720
18728
  switchView
18721
- } = usePelcro$1();
18729
+ } = usePelcro();
18722
18730
  const onSuccess = res => {
18723
18731
  var _otherProps$onSuccess, _ReactGA$event;
18724
18732
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
@@ -18914,7 +18922,7 @@ const SubscriptionCancelNowButton = _ref => {
18914
18922
  } = _ref;
18915
18923
  const {
18916
18924
  switchView
18917
- } = usePelcro$1();
18925
+ } = usePelcro();
18918
18926
  const {
18919
18927
  state: {
18920
18928
  cancelationReason
@@ -18984,7 +18992,7 @@ const SubscriptionCancelLaterButton = _ref => {
18984
18992
  } = _ref;
18985
18993
  const {
18986
18994
  switchView
18987
- } = usePelcro$1();
18995
+ } = usePelcro();
18988
18996
  const {
18989
18997
  state: {
18990
18998
  cancelationReason
@@ -19049,7 +19057,7 @@ const SubscriptionCancelLaterButton = _ref => {
19049
19057
  const SubscriptionCancelView = props => {
19050
19058
  const {
19051
19059
  subscriptionToCancel
19052
- } = usePelcro$1();
19060
+ } = usePelcro();
19053
19061
  const {
19054
19062
  t
19055
19063
  } = useTranslation("subscriptionCancel");
@@ -19224,7 +19232,7 @@ const SubscriptionSuspendButton = _ref => {
19224
19232
  } = _ref;
19225
19233
  const {
19226
19234
  switchView
19227
- } = usePelcro$1();
19235
+ } = usePelcro();
19228
19236
  const {
19229
19237
  state: {
19230
19238
  suspendDate,
@@ -19285,7 +19293,7 @@ const SubscriptionSuspendButton = _ref => {
19285
19293
  const SubscriptionSuspendView = props => {
19286
19294
  const {
19287
19295
  subscriptionToSuspend
19288
- } = usePelcro$1();
19296
+ } = usePelcro();
19289
19297
  const {
19290
19298
  t
19291
19299
  } = useTranslation("subscriptionSuspend");
@@ -19375,7 +19383,7 @@ const getCurrentFlow = () => {
19375
19383
  giftRecipient,
19376
19384
  giftCode,
19377
19385
  invoice
19378
- } = usePelcro$1.getStore();
19386
+ } = usePelcro.getStore();
19379
19387
  if (invoice) {
19380
19388
  return "invoicePayment";
19381
19389
  } else if (giftRecipient) {
@@ -19391,7 +19399,7 @@ const getSuccessContent = i18n => {
19391
19399
  const flow = getCurrentFlow();
19392
19400
  const {
19393
19401
  product
19394
- } = usePelcro$1.getStore();
19402
+ } = usePelcro.getStore();
19395
19403
  const wordingDictionary = {
19396
19404
  subscriptionSuccess: {
19397
19405
  successIcon: /*#__PURE__*/React__default['default'].createElement(SvgCheckSolid, {
@@ -19435,7 +19443,7 @@ function PaymentSuccessModal(_ref) {
19435
19443
  } = _ref;
19436
19444
  const {
19437
19445
  resetView
19438
- } = usePelcro$1();
19446
+ } = usePelcro();
19439
19447
  const onClose = () => {
19440
19448
  var _props$onClose;
19441
19449
  (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
@@ -19463,7 +19471,7 @@ function NewsletterWithHook(props) {
19463
19471
  switchView,
19464
19472
  resetView,
19465
19473
  product
19466
- } = usePelcro$1();
19474
+ } = usePelcro();
19467
19475
  return /*#__PURE__*/React__default['default'].createElement(NewsLetter, {
19468
19476
  onClose: () => {
19469
19477
  var _props$onClose;
@@ -19929,7 +19937,7 @@ const MeterView = () => {
19929
19937
  switchView,
19930
19938
  product,
19931
19939
  isAuthenticated
19932
- } = usePelcro$1();
19940
+ } = usePelcro();
19933
19941
  const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
19934
19942
  const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
19935
19943
  const title = `${paywallProduct === null || paywallProduct === void 0 ? void 0 : (_paywallProduct$paywa = paywallProduct.paywall) === null || _paywallProduct$paywa === void 0 ? void 0 : _paywallProduct$paywa.meter_title}: ${visitsLeft}`;
@@ -19951,7 +19959,7 @@ const MeterView = () => {
19951
19959
  const MeterModal = props => {
19952
19960
  const {
19953
19961
  resetView
19954
- } = usePelcro$1();
19962
+ } = usePelcro();
19955
19963
  React.useEffect(() => {
19956
19964
  var _props$onDisplay;
19957
19965
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
@@ -19985,7 +19993,7 @@ const SubscriptionCreateView = _ref => {
19985
19993
  const {
19986
19994
  product,
19987
19995
  plan
19988
- } = usePelcro$1();
19996
+ } = usePelcro();
19989
19997
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
19990
19998
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
19991
19999
  const getPricingText = plan => {
@@ -20040,7 +20048,7 @@ function SubscriptionCreateModal(_ref) {
20040
20048
  useTranslation("common");
20041
20049
  const {
20042
20050
  switchView
20043
- } = usePelcro$1();
20051
+ } = usePelcro();
20044
20052
  const onSuccess = res => {
20045
20053
  var _otherProps$onSuccess;
20046
20054
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
@@ -20083,7 +20091,7 @@ const SubscriptionManageMembersContainer = _ref => {
20083
20091
  } = _ref;
20084
20092
  const {
20085
20093
  subscriptionToManageMembers
20086
- } = usePelcro$1();
20094
+ } = usePelcro();
20087
20095
  const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
20088
20096
  const handleListMembers = (_ref2, dispatch) => {
20089
20097
  var _window$Pelcro, _window$Pelcro$user, _window$Pelcro$user$r;
@@ -21138,7 +21146,7 @@ function UserUpdateModal(_ref) {
21138
21146
  } = _ref;
21139
21147
  const {
21140
21148
  switchView
21141
- } = usePelcro$1();
21149
+ } = usePelcro();
21142
21150
  const onPictureClick = () => {
21143
21151
  switchView("profile-picture");
21144
21152
  };
@@ -21212,7 +21220,7 @@ const AddressCreateContainer = _ref => {
21212
21220
  order,
21213
21221
  set,
21214
21222
  selectedMembership
21215
- } = usePelcro$1();
21223
+ } = usePelcro();
21216
21224
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
21217
21225
  const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
21218
21226
  React.useEffect(() => {
@@ -21864,7 +21872,7 @@ const AddressCreateView = props => {
21864
21872
  } = useTranslation("address");
21865
21873
  const {
21866
21874
  giftRecipient
21867
- } = usePelcro$1();
21875
+ } = usePelcro();
21868
21876
  return /*#__PURE__*/React__default['default'].createElement("div", {
21869
21877
  id: "pelcro-address-create-view"
21870
21878
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -21936,7 +21944,7 @@ const AddressCreateModal = _ref => {
21936
21944
  switchView,
21937
21945
  switchToPaymentView,
21938
21946
  resetView
21939
- } = usePelcro$1();
21947
+ } = usePelcro();
21940
21948
  const onSuccess = newAddressId => {
21941
21949
  var _otherProps$onSuccess;
21942
21950
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, newAddressId);
@@ -22022,7 +22030,7 @@ const AddressUpdateContainer = _ref => {
22022
22030
  } = _ref;
22023
22031
  const {
22024
22032
  addressIdToEdit
22025
- } = usePelcro$1();
22033
+ } = usePelcro();
22026
22034
  const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
22027
22035
  const [t] = useTranslation("address");
22028
22036
  React.useEffect(() => {
@@ -23086,7 +23094,7 @@ const PasswordForgotModal = _ref => {
23086
23094
  } = useTranslation("passwordForgot");
23087
23095
  const {
23088
23096
  switchView
23089
- } = usePelcro$1();
23097
+ } = usePelcro();
23090
23098
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
23091
23099
  id: "pelcro-password-forgot-modal",
23092
23100
  onDisplay: onDisplay,
@@ -23674,7 +23682,7 @@ const CartContainer = _ref => {
23674
23682
  const {
23675
23683
  cartItems,
23676
23684
  set
23677
- } = usePelcro$1();
23685
+ } = usePelcro();
23678
23686
  const {
23679
23687
  t
23680
23688
  } = useTranslation("shop");
@@ -23776,7 +23784,7 @@ const CartRemoveItemButton = _ref => {
23776
23784
  } = _ref;
23777
23785
  const {
23778
23786
  removeFromCart
23779
- } = usePelcro$1();
23787
+ } = usePelcro();
23780
23788
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
23781
23789
  variant: "icon",
23782
23790
  "data-key": itemId,
@@ -23841,7 +23849,7 @@ const CartTotalPrice = () => {
23841
23849
  } = React.useContext(store$8);
23842
23850
  const {
23843
23851
  cartItems
23844
- } = usePelcro$1();
23852
+ } = usePelcro();
23845
23853
  const totalPriceCurrency = cartItems[0].currency;
23846
23854
  const {
23847
23855
  t
@@ -23859,7 +23867,7 @@ const CartTotalPrice = () => {
23859
23867
  const CartView = props => {
23860
23868
  const {
23861
23869
  cartItems
23862
- } = usePelcro$1();
23870
+ } = usePelcro();
23863
23871
  const {
23864
23872
  t
23865
23873
  } = useTranslation("cart");
@@ -23921,7 +23929,7 @@ const CartModal = _ref => {
23921
23929
  switchView,
23922
23930
  switchToAddressView,
23923
23931
  isAuthenticated
23924
- } = usePelcro$1();
23932
+ } = usePelcro();
23925
23933
  const onSuccess = items => {
23926
23934
  var _otherProps$onSuccess;
23927
23935
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, items);
@@ -23949,7 +23957,7 @@ const ShopSelectProductButton = _ref => {
23949
23957
  } = _ref;
23950
23958
  const {
23951
23959
  addToCart
23952
- } = usePelcro$1();
23960
+ } = usePelcro();
23953
23961
  const {
23954
23962
  t
23955
23963
  } = useTranslation("shop");
@@ -23980,7 +23988,7 @@ const ShopPurchaseButton = _ref => {
23980
23988
  } = _ref;
23981
23989
  const {
23982
23990
  purchaseItem
23983
- } = usePelcro$1();
23991
+ } = usePelcro();
23984
23992
  const {
23985
23993
  t
23986
23994
  } = useTranslation("shop");
@@ -24057,7 +24065,7 @@ const OrderCreateModal = _ref => {
24057
24065
  } = _ref;
24058
24066
  const {
24059
24067
  switchView
24060
- } = usePelcro$1();
24068
+ } = usePelcro();
24061
24069
  const onSuccess = () => {
24062
24070
  var _otherProps$onSuccess;
24063
24071
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
@@ -24083,7 +24091,7 @@ const OrderConfirmModal = props => {
24083
24091
  } = useTranslation("shop");
24084
24092
  const {
24085
24093
  resetView
24086
- } = usePelcro$1();
24094
+ } = usePelcro();
24087
24095
  const onClose = () => {
24088
24096
  var _props$onClose;
24089
24097
  props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
@@ -24172,7 +24180,7 @@ const GiftCreateContainer = _ref => {
24172
24180
  } = useTranslation("register");
24173
24181
  const {
24174
24182
  set
24175
- } = usePelcro$1();
24183
+ } = usePelcro();
24176
24184
  const handleSubmit = (state, dispatch) => {
24177
24185
  const giftRecipient = {
24178
24186
  email: state.email,
@@ -24452,7 +24460,7 @@ const GiftCreateModal = _ref => {
24452
24460
  switchToAddressView,
24453
24461
  switchToPaymentView,
24454
24462
  product
24455
- } = usePelcro$1();
24463
+ } = usePelcro();
24456
24464
  const onSuccess = giftRecipient => {
24457
24465
  var _otherProps$onSuccess;
24458
24466
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftRecipient);
@@ -24504,13 +24512,13 @@ const GiftRedeemContainer = _ref => {
24504
24512
  } = useTranslation("register");
24505
24513
  const {
24506
24514
  set
24507
- } = usePelcro$1();
24515
+ } = usePelcro();
24508
24516
  const {
24509
24517
  switchView,
24510
24518
  switchToAddressView,
24511
24519
  isAuthenticated,
24512
24520
  subscriptionIdToRenew: subscriptionIdToRenewFromStore
24513
- } = usePelcro$1();
24521
+ } = usePelcro();
24514
24522
  const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
24515
24523
  React.useEffect(() => {
24516
24524
  onDisplay();
@@ -24718,7 +24726,7 @@ const GiftRedeemModal = _ref => {
24718
24726
  switchView,
24719
24727
  switchToAddressView,
24720
24728
  isAuthenticated
24721
- } = usePelcro$1();
24729
+ } = usePelcro();
24722
24730
  const onSuccess = giftCode => {
24723
24731
  var _otherProps$onSuccess;
24724
24732
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftCode);
@@ -24779,7 +24787,7 @@ const AddressSelectContainer = _ref => {
24779
24787
  subscriptionIdToRenew: subscriptionIdToRenewFromStore,
24780
24788
  set,
24781
24789
  selectedMembership
24782
- } = usePelcro$1();
24790
+ } = usePelcro();
24783
24791
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
24784
24792
  const subscriptionIdToRenew = (_ref2 = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref2 !== void 0 ? _ref2 : undefined;
24785
24793
  const submitAddress = (_ref3, dispatch) => {
@@ -25012,7 +25020,7 @@ const AddressSelectModal = _ref => {
25012
25020
  switchView,
25013
25021
  switchToPaymentView,
25014
25022
  resetView
25015
- } = usePelcro$1();
25023
+ } = usePelcro();
25016
25024
  const onSuccess = selectedAddressId => {
25017
25025
  var _otherProps$onSuccess;
25018
25026
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedAddressId);
@@ -25079,7 +25087,7 @@ const PaymentMethodSelectContainer = _ref => {
25079
25087
  const {
25080
25088
  set,
25081
25089
  selectedPaymentMethodId: selectedPaymentMethodIdFromStore
25082
- } = usePelcro$1();
25090
+ } = usePelcro();
25083
25091
  const submitPaymentMethod = _ref2 => {
25084
25092
  let {
25085
25093
  selectedPaymentMethodId
@@ -25254,7 +25262,7 @@ const PaymentMethodSelectModal = _ref => {
25254
25262
  switchToCheckoutForm,
25255
25263
  set,
25256
25264
  plan
25257
- } = usePelcro$1();
25265
+ } = usePelcro();
25258
25266
  const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
25259
25267
  React.useEffect(() => {
25260
25268
  if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
@@ -26565,7 +26573,7 @@ const SavedItems = _ref3 => {
26565
26573
  const [isLoading, setLoading] = React.useState(false);
26566
26574
  const {
26567
26575
  isAuthenticated
26568
- } = usePelcro$1();
26576
+ } = usePelcro();
26569
26577
  const removeItemFromMetadata = (category, title) => {
26570
26578
  const user = window.Pelcro.user.read();
26571
26579
  const oldValue = user.metadata[`metadata_saved_${category}`];
@@ -26754,7 +26762,7 @@ const SubscriptionsItems = _ref => {
26754
26762
  setSubscriptionToCancel,
26755
26763
  setSubscriptionToSuspend,
26756
26764
  set
26757
- } = usePelcro$1();
26765
+ } = usePelcro();
26758
26766
  const subs = getNonDonationSubs();
26759
26767
  if (subs.length === 0) return null;
26760
26768
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
@@ -27253,7 +27261,7 @@ const DonationsMenu = _ref => {
27253
27261
  const {
27254
27262
  switchView,
27255
27263
  setSubscriptionToCancel
27256
- } = usePelcro$1();
27264
+ } = usePelcro();
27257
27265
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
27258
27266
  // Cancel button click handlers
27259
27267
  const onCancelClick = () => {
@@ -27364,7 +27372,7 @@ const InvoicesItems = () => {
27364
27372
  const {
27365
27373
  setInvoice,
27366
27374
  switchView
27367
- } = usePelcro$1();
27375
+ } = usePelcro();
27368
27376
  const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
27369
27377
  const showInvoiceDetails = event => {
27370
27378
  if (setInvoice(event.target.dataset.id)) {
@@ -27484,7 +27492,7 @@ const MembershipsItems = () => {
27484
27492
  switchView,
27485
27493
  setSelectedMembership,
27486
27494
  switchToAddressView
27487
- } = usePelcro$1();
27495
+ } = usePelcro();
27488
27496
  const memberships = getActiveMemberships();
27489
27497
  const onChangeAddressClick = membershipId => {
27490
27498
  if (userMustVerifyEmail()) {
@@ -27556,7 +27564,7 @@ function DashboardWithHook(props) {
27556
27564
  resetView,
27557
27565
  logout,
27558
27566
  set
27559
- } = usePelcro$1();
27567
+ } = usePelcro();
27560
27568
  return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
27561
27569
  setAddress: addressIdToEdit => set({
27562
27570
  addressIdToEdit
@@ -28142,7 +28150,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
28142
28150
  const DashboardOpenButton = () => {
28143
28151
  const {
28144
28152
  switchView
28145
- } = usePelcro$1();
28153
+ } = usePelcro();
28146
28154
  return /*#__PURE__*/React__default['default'].createElement("div", {
28147
28155
  className: "plc-fixed plc-right-4 plc-bottom-4 pelcro-open-dashboard-btn"
28148
28156
  }, /*#__PURE__*/React__default['default'].createElement("button", {
@@ -30126,15 +30134,18 @@ const EmailVerifyModal = _ref => {
30126
30134
  switchToPaymentView
30127
30135
  } = usePelcro();
30128
30136
  const onSuccess = res => {
30129
- var _props$onSuccess, _props;
30130
- (_props$onSuccess = (_props = props).onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(_props, res);
30131
- if (product) {
30137
+ var _otherProps$onSuccess;
30138
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, res);
30139
+ if (product && plan) {
30132
30140
  if (product.address_required) {
30133
30141
  return switchToAddressView();
30134
30142
  } else {
30135
30143
  return switchToPaymentView();
30136
30144
  }
30137
30145
  }
30146
+ if (product && !plan) {
30147
+ return switchView("plan-select");
30148
+ }
30138
30149
  };
30139
30150
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
30140
30151
  onDisplay: onDisplay,
@@ -30286,7 +30297,7 @@ function VerifyLinkTokenModal(_ref) {
30286
30297
  } = useTranslation("verifyLinkToken");
30287
30298
  const {
30288
30299
  resetView
30289
- } = usePelcro$1();
30300
+ } = usePelcro();
30290
30301
  const onSuccess = res => {
30291
30302
  var _props$onSuccess;
30292
30303
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
@@ -30334,7 +30345,7 @@ const InvoicePaymentModal = _ref => {
30334
30345
  } = _ref;
30335
30346
  const {
30336
30347
  switchView
30337
- } = usePelcro$1();
30348
+ } = usePelcro();
30338
30349
  const onSuccess = () => {
30339
30350
  var _otherProps$onSuccess;
30340
30351
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
@@ -30408,7 +30419,7 @@ const InvoiceDetailsDownloadButton = _ref => {
30408
30419
  } = useTranslation("invoiceDetails");
30409
30420
  const {
30410
30421
  invoice
30411
- } = usePelcro$1();
30422
+ } = usePelcro();
30412
30423
  return /*#__PURE__*/React__default['default'].createElement(Link, Object.assign({
30413
30424
  className: `plc-px-6 plc-py-2 plc-uppercase plc-bg-transparent plc-text-primary-500 plc-border plc-border-primary-500 plc-rounded focus:plc-outline-none focus:plc-ring-2 focus:plc-ring-primary-300 plc-tracking-wider hover:plc-bg-primary-600 focus:plc-bg-primary-600 hover:plc-text-white focus:plc-text-white hover:plc-shadow-none plc-no-underline ${className}`,
30414
30425
  id: "pelcro-download-invoice-link",
@@ -30446,7 +30457,7 @@ const InvoiceDetailsView = props => {
30446
30457
  } = useTranslation("invoiceDetails");
30447
30458
  const {
30448
30459
  invoice
30449
- } = usePelcro$1();
30460
+ } = usePelcro();
30450
30461
  const showPayButton = canPayInvoice(invoice);
30451
30462
  const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
30452
30463
  const hasPlanDetails = Boolean(invoice.plan);
@@ -30514,7 +30525,7 @@ const InvoiceDetailsModal = _ref => {
30514
30525
  } = _ref;
30515
30526
  const {
30516
30527
  switchToPaymentView
30517
- } = usePelcro$1();
30528
+ } = usePelcro();
30518
30529
  const onSuccess = () => {
30519
30530
  var _otherProps$onSuccess;
30520
30531
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps);
@@ -32183,4 +32194,4 @@ exports.initContentEntitlement = init;
32183
32194
  exports.invoicePaymentSubmitButton = invoicePaymentSubmitButton;
32184
32195
  exports.notify = notify$1;
32185
32196
  exports.unauthenticatedButtons = unauthenticatedButtons;
32186
- exports.usePelcro = usePelcro$1;
32197
+ exports.usePelcro = usePelcro;