@pelcro/react-pelcro-js 3.14.0 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3604,6 +3604,8 @@ var labels$Y = {
3604
3604
  email: "Email",
3605
3605
  firstName: "First name",
3606
3606
  lastName: "Last name",
3607
+ username: "Username",
3608
+ displayname: "Display name",
3607
3609
  phone: "Phone",
3608
3610
  submit: "Submit",
3609
3611
  required: "Required",
@@ -4537,6 +4539,8 @@ var labels$D = {
4537
4539
  email: "Address courriel",
4538
4540
  firstName: "Prénom",
4539
4541
  lastName: "Nom de famille",
4542
+ username: "Nom d'utilisateur",
4543
+ displayname: "Afficher un nom",
4540
4544
  phone: "Numéro de téléphone",
4541
4545
  submit: "Soumettre",
4542
4546
  required: "Champs obligatoires",
@@ -5354,6 +5358,8 @@ var labels$o = {
5354
5358
  email: "이메일",
5355
5359
  firstName: "이름",
5356
5360
  lastName: "성",
5361
+ username: "사용자 이름",
5362
+ displayname: "이름 표시하기",
5357
5363
  phone: "전화번호",
5358
5364
  submit: "제출",
5359
5365
  required: "필수 항목",
@@ -6273,6 +6279,8 @@ var labels$9 = {
6273
6279
  email: "Correo",
6274
6280
  firstName: "Nombre",
6275
6281
  lastName: "Apellido",
6282
+ username: "Nombre de usuario",
6283
+ displayname: "Nombre para mostrar",
6276
6284
  phone: "Teléfono",
6277
6285
  submit: "Enviar",
6278
6286
  required: "Obligatorio",
@@ -8279,7 +8287,7 @@ class PelcroActions {
8279
8287
  return console.error("invalid subscription id");
8280
8288
  }
8281
8289
 
8282
- if ((subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : (_subscriptionToManage = subscriptionToManageMembers.plan) === null || _subscriptionToManage === void 0 ? void 0 : _subscriptionToManage.type) !== 'membership') {
8290
+ if ((subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : (_subscriptionToManage = subscriptionToManageMembers.plan) === null || _subscriptionToManage === void 0 ? void 0 : _subscriptionToManage.type) !== "membership") {
8283
8291
  return console.error("subscription is not from type membership");
8284
8292
  }
8285
8293
 
@@ -8579,7 +8587,7 @@ const createPelcroHook = store => {
8579
8587
 
8580
8588
  pelcroHook.override = fn => {
8581
8589
  const partialState = fn(store.setState, store.getState);
8582
- usePelcro.setState(partialState);
8590
+ usePelcro$1.setState(partialState);
8583
8591
  };
8584
8592
 
8585
8593
  pelcroHook.getStore = pelcroHook.getState;
@@ -8587,11 +8595,11 @@ const createPelcroHook = store => {
8587
8595
  };
8588
8596
 
8589
8597
  const pelcroStore = createPelcroStore();
8590
- const usePelcro = createPelcroHook(pelcroStore);
8598
+ const usePelcro$1 = createPelcroHook(pelcroStore);
8591
8599
  /* istanbul ignore next */
8592
8600
 
8593
8601
  if (process.env.NODE_ENV === "development") {
8594
- c$1("Pelcro Store", usePelcro);
8602
+ c$1("Pelcro Store", usePelcro$1);
8595
8603
  }
8596
8604
 
8597
8605
  /**
@@ -8796,7 +8804,7 @@ const trackSubscriptionOnGA = () => {
8796
8804
  product,
8797
8805
  plan,
8798
8806
  couponCode
8799
- } = usePelcro.getStore();
8807
+ } = usePelcro$1.getStore();
8800
8808
  /*
8801
8809
  getting the latest subscription id from invoices instead of subscriptions
8802
8810
  to handle gifted subs which are not added to subs list
@@ -9116,7 +9124,7 @@ class SaveToMetadataButtonClass {
9116
9124
  _defineProperty$3(this, "unauthenticated", () => {
9117
9125
  const {
9118
9126
  switchView
9119
- } = usePelcro.getStore();
9127
+ } = usePelcro$1.getStore();
9120
9128
 
9121
9129
  _classPrivateFieldGet(this, _onClick).call(this, () => switchView("login"));
9122
9130
 
@@ -9199,7 +9207,7 @@ class SaveToMetadataButtonClass {
9199
9207
  const user = window.Pelcro.user.read();
9200
9208
  const {
9201
9209
  switchView
9202
- } = usePelcro.getStore();
9210
+ } = usePelcro$1.getStore();
9203
9211
  const {
9204
9212
  key,
9205
9213
  ...buttonMetadata
@@ -10303,7 +10311,7 @@ toast.confirm = (onConfirm, {
10303
10311
  ...options
10304
10312
  });
10305
10313
  setTimeout(() => {
10306
- notify.dismiss(id);
10314
+ notify$1.dismiss(id);
10307
10315
  }, 3000);
10308
10316
  };
10309
10317
 
@@ -10313,12 +10321,12 @@ toast.confirm = (onConfirm, {
10313
10321
  ...options
10314
10322
  });
10315
10323
  setTimeout(() => {
10316
- notify.dismiss(id);
10324
+ notify$1.dismiss(id);
10317
10325
  }, 3000);
10318
10326
  };
10319
10327
  };
10320
10328
 
10321
- const notify = toast;
10329
+ const notify$1 = toast;
10322
10330
 
10323
10331
  const translations = i18next.t("common:buttons", {
10324
10332
  returnObjects: true
@@ -10335,7 +10343,7 @@ const init$1 = () => {
10335
10343
  addToCart,
10336
10344
  purchaseItem,
10337
10345
  setSubscriptionToManageMembers
10338
- } = usePelcro.getStore();
10346
+ } = usePelcro$1.getStore();
10339
10347
  const pelcroDashboardButtonsByClass = document.getElementsByClassName("pelcro-dashboard-button");
10340
10348
 
10341
10349
  if (pelcroDashboardButtonsByClass.length !== 0) {
@@ -10389,7 +10397,7 @@ const init$1 = () => {
10389
10397
  const errorMessage = i18next.t("messages:invalidSubscription", {
10390
10398
  returnObjects: true
10391
10399
  });
10392
- return notify.error(errorMessage);
10400
+ return notify$1.error(errorMessage);
10393
10401
  }
10394
10402
 
10395
10403
  switchView("manage-members");
@@ -10398,7 +10406,7 @@ const init$1 = () => {
10398
10406
  const errorMessage = i18next.t("messages:invalidSubscription", {
10399
10407
  returnObjects: true
10400
10408
  });
10401
- return notify.error(errorMessage);
10409
+ return notify$1.error(errorMessage);
10402
10410
  }
10403
10411
  }
10404
10412
  }
@@ -10568,7 +10576,7 @@ const init$1 = () => {
10568
10576
  const errorMsg = i18next.t("shop:messages.currencyMismatch", {
10569
10577
  currency: userCurrency
10570
10578
  });
10571
- notify.error(errorMsg);
10579
+ notify$1.error(errorMsg);
10572
10580
  }
10573
10581
  });
10574
10582
  }
@@ -10638,7 +10646,7 @@ const init = () => {
10638
10646
  const {
10639
10647
  switchView,
10640
10648
  set
10641
- } = usePelcro.getStore();
10649
+ } = usePelcro$1.getStore();
10642
10650
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
10643
10651
 
10644
10652
  if (entitlementsProtectedElements.length === 0) {
@@ -10670,7 +10678,7 @@ const init = () => {
10670
10678
  elemDeepClone.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
10671
10679
  unblurElemWhenUserSubscribes(elemDeepClone, entitlements);
10672
10680
  const NOTIFICATION_ID = "entitlement";
10673
- notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10681
+ notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10674
10682
  i18nKey: "messages:entitlement"
10675
10683
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
10676
10684
  onClick: () => {
@@ -10687,7 +10695,7 @@ const init = () => {
10687
10695
  });
10688
10696
  }
10689
10697
 
10690
- notify.dismiss(NOTIFICATION_ID);
10698
+ notify$1.dismiss(NOTIFICATION_ID);
10691
10699
  switchView("_plan-select-entitlements");
10692
10700
  }
10693
10701
  }, "Subscribe"), "now to get full page access.")), {
@@ -10727,7 +10735,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
10727
10735
  document.addEventListener("PelcroSubscriptionCreate", event => {
10728
10736
  const {
10729
10737
  isGift
10730
- } = usePelcro.getStore();
10738
+ } = usePelcro$1.getStore();
10731
10739
  if (isGift) return;
10732
10740
  const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
10733
10741
  const shouldUnblurContent = entitlements.some(ent => {
@@ -11049,7 +11057,7 @@ const initPaywalls = () => {
11049
11057
 
11050
11058
  const {
11051
11059
  switchView
11052
- } = usePelcro.getStore();
11060
+ } = usePelcro$1.getStore();
11053
11061
 
11054
11062
  if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11055
11063
  /*
@@ -11071,7 +11079,7 @@ const loadPaymentSDKs = () => {
11071
11079
  // Lazy load stripe's SDK
11072
11080
  const {
11073
11081
  whenUserReady
11074
- } = usePelcro.getStore();
11082
+ } = usePelcro$1.getStore();
11075
11083
  whenUserReady(() => {
11076
11084
  if (!window.Stripe) {
11077
11085
  pure_1(window.Pelcro.environment.stripe);
@@ -11119,7 +11127,7 @@ const loadAuth0SDK = () => {
11119
11127
  const initSecuritySdk = () => {
11120
11128
  const {
11121
11129
  whenSiteReady
11122
- } = usePelcro.getStore();
11130
+ } = usePelcro$1.getStore();
11123
11131
  whenSiteReady(() => {
11124
11132
  var _window$Pelcro$site$r2;
11125
11133
 
@@ -11155,7 +11163,7 @@ const dispatchModalDisplayEvents = modalName => {
11155
11163
  const {
11156
11164
  whenSiteReady,
11157
11165
  whenEcommerceLoaded
11158
- } = usePelcro.getStore();
11166
+ } = usePelcro$1.getStore();
11159
11167
  const renderShopView = shopComponent => {
11160
11168
  whenEcommerceLoaded(() => {
11161
11169
  const shopElement = document.getElementById("pelcro-shop");
@@ -11237,7 +11245,7 @@ const initViewFromURL = () => {
11237
11245
  const {
11238
11246
  switchView,
11239
11247
  whenSiteReady
11240
- } = usePelcro.getStore();
11248
+ } = usePelcro$1.getStore();
11241
11249
 
11242
11250
  if (isValidViewFromURL(view)) {
11243
11251
  whenSiteReady(() => {
@@ -11295,7 +11303,7 @@ const initSubscriptionFromURL = () => {
11295
11303
  switchView,
11296
11304
  whenSiteReady,
11297
11305
  set
11298
- } = usePelcro.getStore();
11306
+ } = usePelcro$1.getStore();
11299
11307
  whenSiteReady(() => {
11300
11308
  var _selectedProduct$plan;
11301
11309
 
@@ -11319,7 +11327,7 @@ const initSubscriptionFromURL = () => {
11319
11327
  isAuthenticated,
11320
11328
  switchToAddressView,
11321
11329
  switchToPaymentView
11322
- } = usePelcro.getStore();
11330
+ } = usePelcro$1.getStore();
11323
11331
 
11324
11332
  if (!isAuthenticated()) {
11325
11333
  return switchView("register");
@@ -11351,7 +11359,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
11351
11359
  switchToPaymentView,
11352
11360
  switchToAddressView,
11353
11361
  set
11354
- } = usePelcro.getStore();
11362
+ } = usePelcro$1.getStore();
11355
11363
  whenSiteReady(() => {
11356
11364
  window.Pelcro.plan.getPlan({
11357
11365
  plan_id: offlinePlanId
@@ -11398,7 +11406,7 @@ const initPurchaseFromUrl = () => {
11398
11406
  const {
11399
11407
  whenEcommerceLoaded,
11400
11408
  purchaseItem
11401
- } = usePelcro.getStore();
11409
+ } = usePelcro$1.getStore();
11402
11410
  whenEcommerceLoaded(() => {
11403
11411
  const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
11404
11412
  purchaseItem(skuId);
@@ -11414,7 +11422,7 @@ const initCartFromUrl = () => {
11414
11422
  whenEcommerceLoaded,
11415
11423
  addToCart,
11416
11424
  switchView
11417
- } = usePelcro.getStore();
11425
+ } = usePelcro$1.getStore();
11418
11426
  whenEcommerceLoaded(() => {
11419
11427
  const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
11420
11428
  const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
@@ -11435,7 +11443,7 @@ const verifyEmailTokenFromUrl = () => {
11435
11443
 
11436
11444
  const {
11437
11445
  whenSiteReady
11438
- } = usePelcro.getStore();
11446
+ } = usePelcro$1.getStore();
11439
11447
  const translations = i18next.t("verifyEmail:messages", {
11440
11448
  returnObjects: true
11441
11449
  });
@@ -11447,10 +11455,10 @@ const verifyEmailTokenFromUrl = () => {
11447
11455
  token: emailToken
11448
11456
  }, (err, res) => {
11449
11457
  if (err) {
11450
- return notify.error(getErrorMessages(err));
11458
+ return notify$1.error(getErrorMessages(err));
11451
11459
  }
11452
11460
 
11453
- return notify.success(translations.success);
11461
+ return notify$1.success(translations.success);
11454
11462
  });
11455
11463
  }, {
11456
11464
  once: true
@@ -11464,7 +11472,7 @@ const verifyLinkTokenFromUrl = () => {
11464
11472
  whenSiteReady,
11465
11473
  resetView,
11466
11474
  isAuthenticated
11467
- } = usePelcro.getStore();
11475
+ } = usePelcro$1.getStore();
11468
11476
  const translations = i18next.t("verifyLinkToken:messages", {
11469
11477
  returnObjects: true
11470
11478
  });
@@ -11476,7 +11484,7 @@ const verifyLinkTokenFromUrl = () => {
11476
11484
  token: loginToken
11477
11485
  }, (err, res) => {
11478
11486
  if (err) {
11479
- return notify.error(getErrorMessages(err));
11487
+ return notify$1.error(getErrorMessages(err));
11480
11488
  }
11481
11489
 
11482
11490
  const {
@@ -11486,11 +11494,11 @@ const verifyLinkTokenFromUrl = () => {
11486
11494
  auth_token
11487
11495
  }, (err, res) => {
11488
11496
  if (err) {
11489
- return notify.error(getErrorMessages(err));
11497
+ return notify$1.error(getErrorMessages(err));
11490
11498
  }
11491
11499
 
11492
11500
  resetView();
11493
- return notify.success(translations.success);
11501
+ return notify$1.success(translations.success);
11494
11502
  });
11495
11503
  });
11496
11504
  }, {
@@ -11503,12 +11511,12 @@ const showPasswordlessRequestFromUrl = () => {
11503
11511
 
11504
11512
  const {
11505
11513
  isAuthenticated
11506
- } = usePelcro.getStore();
11514
+ } = usePelcro$1.getStore();
11507
11515
  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;
11508
11516
  if (!passwordlessEnabled || isAuthenticated()) return;
11509
11517
  const {
11510
11518
  switchView
11511
- } = usePelcro.getStore();
11519
+ } = usePelcro$1.getStore();
11512
11520
  return switchView("passwordless-request");
11513
11521
  };
11514
11522
 
@@ -11519,7 +11527,7 @@ const showInvoiceDetailsFromUrl = () => {
11519
11527
  whenUserReady,
11520
11528
  whenSiteReady,
11521
11529
  switchView
11522
- } = usePelcro.getStore();
11530
+ } = usePelcro$1.getStore();
11523
11531
  whenSiteReady(() => {
11524
11532
  if (!isAuthenticated()) {
11525
11533
  return switchView("login");
@@ -11533,18 +11541,18 @@ const showInvoiceDetailsFromUrl = () => {
11533
11541
  const errorMessage = i18next.t("messages:invalidInvoice", {
11534
11542
  returnObjects: true
11535
11543
  });
11536
- return notify.error(errorMessage);
11544
+ return notify$1.error(errorMessage);
11537
11545
  }
11538
11546
 
11539
11547
  const {
11540
11548
  invoice
11541
- } = usePelcro.getStore();
11549
+ } = usePelcro$1.getStore();
11542
11550
 
11543
11551
  if (invoice.total === 0) {
11544
11552
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11545
11553
  returnObjects: true
11546
11554
  });
11547
- return notify.error(errorMessage);
11555
+ return notify$1.error(errorMessage);
11548
11556
  }
11549
11557
 
11550
11558
  return switchView("invoice-details");
@@ -11559,7 +11567,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11559
11567
  whenUserReady,
11560
11568
  whenSiteReady,
11561
11569
  switchView
11562
- } = usePelcro.getStore();
11570
+ } = usePelcro$1.getStore();
11563
11571
  whenSiteReady(() => {
11564
11572
  if (!isAuthenticated()) {
11565
11573
  return switchView("login");
@@ -11573,7 +11581,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11573
11581
  const errorMessage = i18next.t("messages:invalidSubscription", {
11574
11582
  returnObjects: true
11575
11583
  });
11576
- return notify.error(errorMessage);
11584
+ return notify$1.error(errorMessage);
11577
11585
  }
11578
11586
 
11579
11587
  return switchView("manage-members");
@@ -11599,7 +11607,7 @@ const PelcroModalController = ({
11599
11607
  view,
11600
11608
  isAuthenticated,
11601
11609
  whenSiteReady
11602
- } = usePelcro();
11610
+ } = usePelcro$1();
11603
11611
  React__default.useEffect(() => {
11604
11612
  init$1();
11605
11613
  renderShopView(React__default.Children.map(children, child => child).find(({
@@ -13360,7 +13368,7 @@ function Modal({
13360
13368
  }) {
13361
13369
  var _window$Pelcro, _window$Pelcro$site$r;
13362
13370
 
13363
- const resetView = usePelcro(state => state.resetView);
13371
+ const resetView = usePelcro$1(state => state.resetView);
13364
13372
  useEffect(() => {
13365
13373
  onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
13366
13374
  dispatchModalDisplayEvents(id);
@@ -13433,8 +13441,11 @@ function LoginModal({
13433
13441
  const {
13434
13442
  switchView,
13435
13443
  resetView,
13436
- invoice
13437
- } = usePelcro();
13444
+ product,
13445
+ order,
13446
+ switchToAddressView,
13447
+ switchToPaymentView
13448
+ } = usePelcro$1();
13438
13449
 
13439
13450
  const onSuccess = res => {
13440
13451
  var _props$onSuccess;
@@ -13445,10 +13456,23 @@ function LoginModal({
13445
13456
  initPaywalls();
13446
13457
  }
13447
13458
 
13459
+ if (product) {
13460
+ if (product.address_required) {
13461
+ return switchToAddressView();
13462
+ } else {
13463
+ return switchToPaymentView();
13464
+ }
13465
+ }
13466
+
13467
+ if (order) {
13468
+ return switchToAddressView();
13469
+ }
13470
+
13448
13471
  resetView();
13449
13472
  const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
13473
+ const viewsURLs = ["invoice-details", "gift-redeem", "plan-select"];
13450
13474
 
13451
- if (viewFromURL === "invoice-details") {
13475
+ if (viewsURLs.includes(viewFromURL)) {
13452
13476
  initViewFromURL();
13453
13477
  }
13454
13478
  };
@@ -13771,7 +13795,7 @@ function RegisterView(props) {
13771
13795
  } = useTranslation("register");
13772
13796
  const {
13773
13797
  product
13774
- } = usePelcro();
13798
+ } = usePelcro$1();
13775
13799
  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");
13776
13800
  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");
13777
13801
  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);
@@ -14002,7 +14026,7 @@ function RegisterModal(props) {
14002
14026
  order,
14003
14027
  giftCode,
14004
14028
  isGift
14005
- } = usePelcro();
14029
+ } = usePelcro$1();
14006
14030
 
14007
14031
  const onSuccess = res => {
14008
14032
  var _props$onSuccess;
@@ -14032,7 +14056,7 @@ function RegisterModal(props) {
14032
14056
 
14033
14057
 
14034
14058
  if (giftCode) {
14035
- return switchToAddressView();
14059
+ return switchView("gift-redeem"); // return switchToAddressView();
14036
14060
  } // Check if the subscription is meant as a gift (if so, gather recipients info)
14037
14061
 
14038
14062
 
@@ -14124,7 +14148,7 @@ function SelectModalWithHook(props) {
14124
14148
  resetView,
14125
14149
  view,
14126
14150
  set
14127
- } = usePelcro();
14151
+ } = usePelcro$1();
14128
14152
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
14129
14153
  const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
14130
14154
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
@@ -14396,7 +14420,7 @@ class SelectModal extends Component {
14396
14420
  const {
14397
14421
  switchToAddressView,
14398
14422
  switchToPaymentView
14399
- } = usePelcro.getStore();
14423
+ } = usePelcro$1.getStore();
14400
14424
 
14401
14425
  if (!isAuthenticated) {
14402
14426
  return setView("register");
@@ -16599,16 +16623,16 @@ const PaymentMethodContainerWithoutStripe = ({
16599
16623
  const {
16600
16624
  t
16601
16625
  } = useTranslation("payment");
16602
- const pelcroStore = usePelcro();
16626
+ const pelcroStore = usePelcro$1();
16603
16627
  const {
16604
16628
  set,
16605
16629
  order,
16606
16630
  selectedPaymentMethodId,
16607
16631
  couponCode
16608
- } = usePelcro();
16632
+ } = usePelcro$1();
16609
16633
  const {
16610
16634
  whenUserReady
16611
- } = usePelcro.getStore();
16635
+ } = usePelcro$1.getStore();
16612
16636
  const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
16613
16637
  const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
16614
16638
  const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
@@ -18072,11 +18096,11 @@ const PaymentMethodContainerWithoutStripe = ({
18072
18096
 
18073
18097
  if (show) {
18074
18098
  injectCardAuthenticationIframe(source);
18075
- cardAuthContainer.classList.remove("plc-hidden");
18076
- cardAuthContainer.classList.add("plc-flex");
18099
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18100
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18077
18101
  } else {
18078
- cardAuthContainer.classList.add("plc-hidden");
18079
- cardAuthContainer.classList.remove("plc-flex");
18102
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18103
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18080
18104
  }
18081
18105
  };
18082
18106
 
@@ -18084,11 +18108,11 @@ const PaymentMethodContainerWithoutStripe = ({
18084
18108
  const cardAuthContainer = document.querySelector(".card-authentication-success-container");
18085
18109
 
18086
18110
  if (show) {
18087
- cardAuthContainer.classList.remove("plc-hidden");
18088
- cardAuthContainer.classList.add("plc-flex");
18111
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18112
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18089
18113
  } else {
18090
- cardAuthContainer.classList.add("plc-hidden");
18091
- cardAuthContainer.classList.remove("plc-flex");
18114
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18115
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18092
18116
  }
18093
18117
  };
18094
18118
 
@@ -18099,7 +18123,7 @@ const PaymentMethodContainerWithoutStripe = ({
18099
18123
  const iframe = document.createElement("iframe");
18100
18124
  iframe.src = source !== null && source !== void 0 && (_source$redirect = source.redirect) !== null && _source$redirect !== void 0 && _source$redirect.url ? source.redirect.url : source.threeDSecure_url;
18101
18125
  iframe.style = "position: absolute; width: 100%; height: 100%; left: 0; top: 0; bottom: 0; z-index: 10;";
18102
- cardAuthContainer.appendChild(iframe);
18126
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.appendChild(iframe);
18103
18127
  };
18104
18128
 
18105
18129
  const [state, dispatch] = useReducerWithSideEffects((state, action) => {
@@ -18288,7 +18312,7 @@ const PaymentMethodContainer = props => {
18288
18312
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
18289
18313
  const {
18290
18314
  whenUserReady
18291
- } = usePelcro.getStore();
18315
+ } = usePelcro$1.getStore();
18292
18316
  useEffect(() => {
18293
18317
  whenUserReady(() => {
18294
18318
  if (!window.Stripe) {
@@ -18389,7 +18413,7 @@ const PelcroPaymentRequestButton = props => {
18389
18413
  const CheckoutForm = () => {
18390
18414
  const {
18391
18415
  selectedPaymentMethodId
18392
- } = usePelcro();
18416
+ } = usePelcro$1();
18393
18417
  const cardProcessor = getSiteCardProcessor();
18394
18418
 
18395
18419
  if (selectedPaymentMethodId) {
@@ -18444,7 +18468,7 @@ const DiscountedPrice = props => {
18444
18468
  const {
18445
18469
  order,
18446
18470
  plan
18447
- } = usePelcro();
18471
+ } = usePelcro$1();
18448
18472
  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;
18449
18473
  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;
18450
18474
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
@@ -18480,7 +18504,7 @@ const SubmitPaymentMethod = ({
18480
18504
 
18481
18505
  const {
18482
18506
  plan
18483
- } = usePelcro();
18507
+ } = usePelcro$1();
18484
18508
  const {
18485
18509
  t
18486
18510
  } = useTranslation("checkoutForm");
@@ -18912,7 +18936,7 @@ const PaypalSubscribeButton = props => {
18912
18936
  plan,
18913
18937
  invoice,
18914
18938
  selectedAddressId
18915
- } = usePelcro();
18939
+ } = usePelcro$1();
18916
18940
  useEffect(() => {
18917
18941
  var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
18918
18942
 
@@ -19054,7 +19078,7 @@ const SelectedPaymentMethod = () => {
19054
19078
  const {
19055
19079
  switchView,
19056
19080
  selectedPaymentMethodId
19057
- } = usePelcro();
19081
+ } = usePelcro$1();
19058
19082
  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 => {
19059
19083
  return source.id == selectedPaymentMethodId;
19060
19084
  });
@@ -19095,7 +19119,7 @@ const TaxAmount = () => {
19095
19119
  } = useContext(store$k);
19096
19120
  const {
19097
19121
  plan
19098
- } = usePelcro();
19122
+ } = usePelcro$1();
19099
19123
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19100
19124
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19101
19125
  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;
@@ -19241,7 +19265,7 @@ const SubscriptionRenewView = ({
19241
19265
  const {
19242
19266
  product,
19243
19267
  plan
19244
- } = usePelcro();
19268
+ } = usePelcro$1();
19245
19269
  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;
19246
19270
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
19247
19271
 
@@ -19296,7 +19320,7 @@ function SubscriptionRenewModal({
19296
19320
  }) {
19297
19321
  const {
19298
19322
  switchView
19299
- } = usePelcro();
19323
+ } = usePelcro$1();
19300
19324
 
19301
19325
  const onSuccess = res => {
19302
19326
  var _otherProps$onSuccess, _ReactGA$event;
@@ -19501,7 +19525,7 @@ const SubscriptionCancelNowButton = ({
19501
19525
  }) => {
19502
19526
  const {
19503
19527
  switchView
19504
- } = usePelcro();
19528
+ } = usePelcro$1();
19505
19529
  const {
19506
19530
  state: {
19507
19531
  cancelationReason
@@ -19548,7 +19572,7 @@ const SubscriptionCancelNowButton = ({
19548
19572
 
19549
19573
  switchView(null); //Show confirmation alert after closing the modal
19550
19574
 
19551
- notify.confirm((onSuccess, onFailure) => {
19575
+ notify$1.confirm((onSuccess, onFailure) => {
19552
19576
  cancelSubscription(payload, onSuccess, onFailure);
19553
19577
  }, {
19554
19578
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -19573,7 +19597,7 @@ const SubscriptionCancelLaterButton = ({
19573
19597
  }) => {
19574
19598
  const {
19575
19599
  switchView
19576
- } = usePelcro();
19600
+ } = usePelcro$1();
19577
19601
  const {
19578
19602
  state: {
19579
19603
  cancelationReason
@@ -19620,7 +19644,7 @@ const SubscriptionCancelLaterButton = ({
19620
19644
 
19621
19645
  switchView(null); //Show confirmation alert after closing the modal
19622
19646
 
19623
- notify.confirm((onSuccess, onFailure) => {
19647
+ notify$1.confirm((onSuccess, onFailure) => {
19624
19648
  cancelSubscription(payload, onSuccess, onFailure);
19625
19649
  }, {
19626
19650
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -19641,7 +19665,7 @@ const SubscriptionCancelLaterButton = ({
19641
19665
  const SubscriptionCancelView = props => {
19642
19666
  const {
19643
19667
  subscriptionToCancel
19644
- } = usePelcro();
19668
+ } = usePelcro$1();
19645
19669
  const {
19646
19670
  t
19647
19671
  } = useTranslation("subscriptionCancel");
@@ -19815,7 +19839,7 @@ const SubscriptionSuspendButton = ({
19815
19839
  }) => {
19816
19840
  const {
19817
19841
  switchView
19818
- } = usePelcro();
19842
+ } = usePelcro$1();
19819
19843
  const {
19820
19844
  state: {
19821
19845
  suspendDate,
@@ -19857,7 +19881,7 @@ const SubscriptionSuspendButton = ({
19857
19881
 
19858
19882
  switchView(null); //Show confirmation alert after closing the modal
19859
19883
 
19860
- notify.confirm((onSuccess, onFailure) => {
19884
+ notify$1.confirm((onSuccess, onFailure) => {
19861
19885
  suspendSubscription(payload, onSuccess, onFailure);
19862
19886
  }, {
19863
19887
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -19879,7 +19903,7 @@ const SubscriptionSuspendButton = ({
19879
19903
  const SubscriptionSuspendView = props => {
19880
19904
  const {
19881
19905
  subscriptionToSuspend
19882
- } = usePelcro();
19906
+ } = usePelcro$1();
19883
19907
  const {
19884
19908
  t
19885
19909
  } = useTranslation("subscriptionSuspend");
@@ -19972,7 +19996,7 @@ const getCurrentFlow = () => {
19972
19996
  giftRecipient,
19973
19997
  giftCode,
19974
19998
  invoice
19975
- } = usePelcro.getStore();
19999
+ } = usePelcro$1.getStore();
19976
20000
 
19977
20001
  if (invoice) {
19978
20002
  return "invoicePayment";
@@ -19991,7 +20015,7 @@ const getSuccessContent = i18n => {
19991
20015
  const flow = getCurrentFlow();
19992
20016
  const {
19993
20017
  product
19994
- } = usePelcro.getStore();
20018
+ } = usePelcro$1.getStore();
19995
20019
  const wordingDictionary = {
19996
20020
  subscriptionSuccess: {
19997
20021
  successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
@@ -20035,7 +20059,7 @@ function PaymentSuccessModal({
20035
20059
  }) {
20036
20060
  const {
20037
20061
  resetView
20038
- } = usePelcro();
20062
+ } = usePelcro$1();
20039
20063
 
20040
20064
  const onClose = () => {
20041
20065
  var _props$onClose;
@@ -20068,7 +20092,7 @@ function NewsletterWithHook(props) {
20068
20092
  switchView,
20069
20093
  resetView,
20070
20094
  product
20071
- } = usePelcro();
20095
+ } = usePelcro$1();
20072
20096
  return /*#__PURE__*/React__default.createElement(NewsLetter, {
20073
20097
  onClose: () => {
20074
20098
  var _props$onClose;
@@ -20567,7 +20591,7 @@ const MeterView = () => {
20567
20591
  switchView,
20568
20592
  product,
20569
20593
  isAuthenticated
20570
- } = usePelcro();
20594
+ } = usePelcro$1();
20571
20595
  const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
20572
20596
  const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
20573
20597
  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}`;
@@ -20589,7 +20613,7 @@ const MeterView = () => {
20589
20613
  const MeterModal = props => {
20590
20614
  const {
20591
20615
  resetView
20592
- } = usePelcro();
20616
+ } = usePelcro$1();
20593
20617
  useEffect(() => {
20594
20618
  var _props$onDisplay;
20595
20619
 
@@ -20627,7 +20651,7 @@ const SubscriptionCreateView = ({
20627
20651
  const {
20628
20652
  product,
20629
20653
  plan
20630
- } = usePelcro();
20654
+ } = usePelcro$1();
20631
20655
  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;
20632
20656
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
20633
20657
 
@@ -20685,7 +20709,7 @@ function SubscriptionCreateModal({
20685
20709
  useTranslation("common");
20686
20710
  const {
20687
20711
  switchView
20688
- } = usePelcro();
20712
+ } = usePelcro$1();
20689
20713
 
20690
20714
  const onSuccess = res => {
20691
20715
  var _otherProps$onSuccess;
@@ -20731,7 +20755,7 @@ const SubscriptionManageMembersContainer = ({
20731
20755
  }) => {
20732
20756
  const {
20733
20757
  subscriptionToManageMembers
20734
- } = usePelcro();
20758
+ } = usePelcro$1();
20735
20759
  const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
20736
20760
 
20737
20761
  const handleListMembers = ({}, dispatch) => {
@@ -21026,8 +21050,8 @@ function SubscriptionManageMembersList(props) {
21026
21050
  return {
21027
21051
  title: sub.status,
21028
21052
  content: sub.status,
21029
- textColor: "plc-text-orange-700",
21030
- bgColor: "plc-bg-orange-100",
21053
+ textColor: "plc-text-yellow-500",
21054
+ bgColor: "plc-bg-yellow-100",
21031
21055
  icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
21032
21056
  };
21033
21057
  }
@@ -21083,7 +21107,8 @@ function SubscriptionManageMembersList(props) {
21083
21107
  key: member.id,
21084
21108
  className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
21085
21109
  }, /*#__PURE__*/React__default.createElement("td", {
21086
- className: "plc-truncate"
21110
+ className: "plc-truncate plc-text-left",
21111
+ title: member === null || member === void 0 ? void 0 : member.invitation_email
21087
21112
  }, /*#__PURE__*/React__default.createElement("span", {
21088
21113
  className: "plc-font-semibold plc-text-gray-500"
21089
21114
  }, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default.createElement("td", {
@@ -21137,8 +21162,10 @@ function SubscriptionManageMembersView(props) {
21137
21162
  className: "plc-flex-shrink-0 plc-p-2 plc-text-xs plc-text-gray-400 plc-uppercase"
21138
21163
  }, t("labels.listOfMembers")), /*#__PURE__*/React__default.createElement("hr", {
21139
21164
  className: "plc-w-full plc-border-gray-300"
21140
- })), /*#__PURE__*/React__default.createElement("table", {
21141
- className: "plc-w-full plc-table-fixed"
21165
+ })), /*#__PURE__*/React__default.createElement("div", {
21166
+ className: "plc-max-h-48 plc-overflow-x-hidden plc-overflow-y-auto"
21167
+ }, /*#__PURE__*/React__default.createElement("table", {
21168
+ className: "plc-w-full plc-table-fixed plc-text-center plc-p-2 plc-m-1"
21142
21169
  }, /*#__PURE__*/React__default.createElement("thead", {
21143
21170
  className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
21144
21171
  }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
@@ -21147,7 +21174,7 @@ function SubscriptionManageMembersView(props) {
21147
21174
  className: "plc-w-3/12 "
21148
21175
  }, t("labels.status")), /*#__PURE__*/React__default.createElement("th", {
21149
21176
  className: "plc-w-3/12 "
21150
- }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null)))))));
21177
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null))))))));
21151
21178
  }
21152
21179
 
21153
21180
  /**
@@ -21176,7 +21203,7 @@ function SubscriptionManageMembersModal({
21176
21203
  }
21177
21204
  SubscriptionManageMembersModal.viewId = "manage-members";
21178
21205
 
21179
- var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
21206
+ var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6, _window$Pelcro$user$r7;
21180
21207
  const initialState$f = {
21181
21208
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
21182
21209
  emailError: null,
@@ -21184,10 +21211,12 @@ const initialState$f = {
21184
21211
  firstNameError: null,
21185
21212
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
21186
21213
  lastNameError: null,
21187
- displayName: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.display_name,
21188
- phone: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.phone,
21214
+ username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
21215
+ usernameError: null,
21216
+ displayName: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.display_name,
21217
+ phone: (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.phone,
21189
21218
  phoneError: null,
21190
- tin: (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.tin,
21219
+ tin: (_window$Pelcro$user$r7 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.tin,
21191
21220
  buttonDisabled: false,
21192
21221
  textFields: {},
21193
21222
  alert: {
@@ -21218,26 +21247,29 @@ const UserUpdateContainer = ({
21218
21247
  }, []);
21219
21248
 
21220
21249
  const loadUserDataIntoFields = () => {
21221
- var _window$Pelcro$user$r7, _window$Pelcro$user$r8, _window$Pelcro$user$r9, _window$Pelcro$user$r10, _window$Pelcro$user$r11, _window$Pelcro$user$r12;
21250
+ var _window$Pelcro$user$r8, _window$Pelcro$user$r9, _window$Pelcro$user$r10, _window$Pelcro$user$r11, _window$Pelcro$user$r12, _window$Pelcro$user$r13, _window$Pelcro$user$r14;
21222
21251
 
21223
21252
  const fields = [{
21224
21253
  type: SET_EMAIL,
21225
- payload: (_window$Pelcro$user$r7 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.email
21254
+ payload: (_window$Pelcro$user$r8 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r8 === void 0 ? void 0 : _window$Pelcro$user$r8.email
21226
21255
  }, {
21227
21256
  type: SET_FIRST_NAME,
21228
- payload: (_window$Pelcro$user$r8 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r8 === void 0 ? void 0 : _window$Pelcro$user$r8.first_name
21257
+ payload: (_window$Pelcro$user$r9 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r9 === void 0 ? void 0 : _window$Pelcro$user$r9.first_name
21229
21258
  }, {
21230
21259
  type: SET_LAST_NAME,
21231
- payload: (_window$Pelcro$user$r9 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r9 === void 0 ? void 0 : _window$Pelcro$user$r9.last_name
21260
+ payload: (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.last_name
21261
+ }, {
21262
+ type: SET_USERNAME,
21263
+ payload: (_window$Pelcro$user$r11 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r11 === void 0 ? void 0 : _window$Pelcro$user$r11.username
21232
21264
  }, {
21233
21265
  type: SET_DISPLAY_NAME,
21234
- payload: (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.display_name
21266
+ payload: (_window$Pelcro$user$r12 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r12 === void 0 ? void 0 : _window$Pelcro$user$r12.display_name
21235
21267
  }, {
21236
21268
  type: SET_PHONE,
21237
- payload: (_window$Pelcro$user$r11 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r11 === void 0 ? void 0 : _window$Pelcro$user$r11.phone
21269
+ payload: (_window$Pelcro$user$r13 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r13 === void 0 ? void 0 : _window$Pelcro$user$r13.phone
21238
21270
  }, {
21239
21271
  type: SET_TIN,
21240
- payload: (_window$Pelcro$user$r12 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r12 === void 0 ? void 0 : _window$Pelcro$user$r12.tin
21272
+ payload: (_window$Pelcro$user$r14 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r14 === void 0 ? void 0 : _window$Pelcro$user$r14.tin
21241
21273
  }];
21242
21274
  fields.filter(field => Boolean(field.payload)).forEach(field => {
21243
21275
  dispatch(field);
@@ -21248,6 +21280,7 @@ const UserUpdateContainer = ({
21248
21280
  email,
21249
21281
  firstName,
21250
21282
  lastName,
21283
+ username,
21251
21284
  phone,
21252
21285
  tin,
21253
21286
  textFields,
@@ -21258,6 +21291,9 @@ const UserUpdateContainer = ({
21258
21291
  email: email,
21259
21292
  first_name: firstName,
21260
21293
  last_name: lastName,
21294
+ ...(username && {
21295
+ username
21296
+ }),
21261
21297
  display_name: displayName,
21262
21298
  phone: phone,
21263
21299
  tin: tin,
@@ -21343,6 +21379,18 @@ const UserUpdateContainer = ({
21343
21379
  lastName: ""
21344
21380
  });
21345
21381
 
21382
+ case SET_USERNAME:
21383
+ return lib_7({ ...state,
21384
+ username: action.payload,
21385
+ usernameError: null
21386
+ });
21387
+
21388
+ case SET_USERNAME_ERROR:
21389
+ return lib_7({ ...state,
21390
+ usernameError: action.payload,
21391
+ username: ""
21392
+ });
21393
+
21346
21394
  case SET_PHONE:
21347
21395
  return lib_7({ ...state,
21348
21396
  phone: action.payload,
@@ -21388,10 +21436,14 @@ const UserUpdateContainer = ({
21388
21436
  state,
21389
21437
  dispatch
21390
21438
  }
21391
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
21392
- store: store$f,
21393
- key: i
21394
- })) : /*#__PURE__*/React__default.cloneElement(children, {
21439
+ }, children.length ? children.map((child, i) => {
21440
+ if (child) {
21441
+ return /*#__PURE__*/React__default.cloneElement(child, {
21442
+ store: store$f,
21443
+ key: i
21444
+ });
21445
+ }
21446
+ }) : /*#__PURE__*/React__default.cloneElement(children, {
21395
21447
  store: store$f
21396
21448
  })));
21397
21449
  };
@@ -21499,6 +21551,84 @@ const UserUpdateButton = ({
21499
21551
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
21500
21552
  };
21501
21553
 
21554
+ function UpdateUserNameInput({
21555
+ initWithUserName = true,
21556
+ store,
21557
+ ...otherProps
21558
+ }) {
21559
+ const {
21560
+ t
21561
+ } = useTranslation("common");
21562
+ const {
21563
+ dispatch,
21564
+ state: {
21565
+ username: stateUsername,
21566
+ usernameError
21567
+ }
21568
+ } = useContext(store);
21569
+ const [username, setUsername] = useState(stateUsername);
21570
+ const [finishedTyping, setFinishedTyping] = useState(false);
21571
+ const handleInputChange = useCallback(value => {
21572
+ setUsername(value);
21573
+
21574
+ if (finishedTyping) {
21575
+ if (username !== null && username !== void 0 && username.length) {
21576
+ dispatch({
21577
+ type: SET_USERNAME,
21578
+ payload: username
21579
+ });
21580
+ } else {
21581
+ if (otherProps.required) {
21582
+ dispatch({
21583
+ type: SET_USERNAME_ERROR,
21584
+ payload: t("validation.enterUsername")
21585
+ });
21586
+ } else {
21587
+ dispatch({
21588
+ type: SET_USERNAME,
21589
+ payload: username
21590
+ });
21591
+ }
21592
+ }
21593
+ }
21594
+ }, [dispatch, username, finishedTyping]);
21595
+ useEffect(() => {
21596
+ handleInputChange(username);
21597
+ }, [finishedTyping, username, handleInputChange]); // Initialize username field with user's username
21598
+
21599
+ const loadFirstNameIntoField = () => {
21600
+ handleInputChange(window.Pelcro.user.read().username);
21601
+ dispatch({
21602
+ type: SET_USERNAME,
21603
+ payload: window.Pelcro.user.read().username
21604
+ });
21605
+ };
21606
+
21607
+ useEffect(() => {
21608
+ if (initWithUserName) {
21609
+ document.addEventListener("PelcroUserLoaded", () => {
21610
+ loadFirstNameIntoField();
21611
+ });
21612
+ loadFirstNameIntoField();
21613
+ return () => {
21614
+ document.removeEventListener("PelcroUserLoaded", handleInputChange);
21615
+ };
21616
+ }
21617
+ }, []);
21618
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21619
+ type: "text",
21620
+ error: usernameError,
21621
+ value: username,
21622
+ onChange: e => handleInputChange(e.target.value),
21623
+ onBlur: () => setFinishedTyping(true),
21624
+ onFocus: () => setFinishedTyping(false)
21625
+ }, otherProps));
21626
+ }
21627
+
21628
+ const UserUpdateUsername = props => /*#__PURE__*/React__default.createElement(UpdateUserNameInput, Object.assign({
21629
+ store: store$f
21630
+ }, props));
21631
+
21502
21632
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
21503
21633
  store: store$f
21504
21634
  }, props));
@@ -21598,13 +21728,45 @@ const UserUpdateTin = props => /*#__PURE__*/React__default.createElement(Tin, Ob
21598
21728
  store: store$f
21599
21729
  }, props));
21600
21730
 
21731
+ function DisplayName({
21732
+ store,
21733
+ ...otherProps
21734
+ }) {
21735
+ const {
21736
+ dispatch,
21737
+ state
21738
+ } = useContext(store);
21739
+
21740
+ const handleInputChange = value => {
21741
+ dispatch({
21742
+ type: SET_DISPLAY_NAME,
21743
+ payload: value
21744
+ });
21745
+ };
21746
+
21747
+ if (state.loading) {
21748
+ return /*#__PURE__*/React__default.createElement(Loader, null);
21749
+ }
21750
+
21751
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21752
+ type: "text",
21753
+ value: state.displayName || null,
21754
+ onChange: e => handleInputChange(e.target.value)
21755
+ }, otherProps));
21756
+ }
21757
+
21758
+ const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
21759
+ store: store$f
21760
+ }, props));
21761
+
21601
21762
  const UserUpdateView = props => {
21602
- var _window$Pelcro$site$r;
21763
+ var _window$Pelcro$site$r, _window$Pelcro, _window$Pelcro$uiSett;
21603
21764
 
21604
21765
  const {
21605
21766
  t
21606
21767
  } = useTranslation("userEdit");
21607
21768
  const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
21769
+ const showUsernameInput = (_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.enableLoginWithUsername;
21608
21770
  return /*#__PURE__*/React__default.createElement("div", {
21609
21771
  id: "pelcro-user-update-view"
21610
21772
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -21632,7 +21794,17 @@ const UserUpdateView = props => {
21632
21794
  errorId: "pelcro-input-last-name-error",
21633
21795
  label: t("labels.lastName"),
21634
21796
  required: supportsTap ? true : false
21635
- })), /*#__PURE__*/React__default.createElement("div", {
21797
+ })), /*#__PURE__*/React__default.createElement(UserUpdateDisplayName, {
21798
+ id: "pelcro-input-display-name",
21799
+ autoComplete: "display-name",
21800
+ errorId: "pelcro-input-display-name-error",
21801
+ label: t("labels.displayname")
21802
+ }), showUsernameInput && /*#__PURE__*/React__default.createElement(UserUpdateUsername, {
21803
+ id: "pelcro-input-user-name",
21804
+ autoComplete: "user-name",
21805
+ errorId: "pelcro-input-user-name-error",
21806
+ label: t("labels.username")
21807
+ }), /*#__PURE__*/React__default.createElement("div", {
21636
21808
  className: "plc-flex plc-items-start"
21637
21809
  }, /*#__PURE__*/React__default.createElement(UserUpdatePhone, {
21638
21810
  id: "pelcro-input-phone",
@@ -21663,7 +21835,7 @@ function UserUpdateModal({
21663
21835
  }) {
21664
21836
  const {
21665
21837
  switchView
21666
- } = usePelcro();
21838
+ } = usePelcro$1();
21667
21839
 
21668
21840
  const onPictureClick = () => {
21669
21841
  switchView("profile-picture");
@@ -21679,37 +21851,6 @@ function UserUpdateModal({
21679
21851
  }
21680
21852
  UserUpdateModal.viewId = "user-edit";
21681
21853
 
21682
- function DisplayName({
21683
- store,
21684
- ...otherProps
21685
- }) {
21686
- const {
21687
- dispatch,
21688
- state
21689
- } = useContext(store);
21690
-
21691
- const handleInputChange = value => {
21692
- dispatch({
21693
- type: SET_DISPLAY_NAME,
21694
- payload: value
21695
- });
21696
- };
21697
-
21698
- if (state.loading) {
21699
- return /*#__PURE__*/React__default.createElement(Loader, null);
21700
- }
21701
-
21702
- return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21703
- type: "text",
21704
- value: state.displayName || null,
21705
- onChange: e => handleInputChange(e.target.value)
21706
- }, otherProps));
21707
- }
21708
-
21709
- const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
21710
- store: store$f
21711
- }, props));
21712
-
21713
21854
  const UserUpdateTextInput = props => {
21714
21855
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
21715
21856
  store: store$f
@@ -21772,7 +21913,7 @@ const AddressCreateContainer = ({
21772
21913
  order,
21773
21914
  set,
21774
21915
  selectedMembership
21775
- } = usePelcro();
21916
+ } = usePelcro$1();
21776
21917
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
21777
21918
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
21778
21919
  useEffect(() => {
@@ -21877,7 +22018,7 @@ const AddressCreateContainer = ({
21877
22018
  return onFailure(err);
21878
22019
  }
21879
22020
 
21880
- notify.success(t("messages.addressUpdated"));
22021
+ notify$1.success(t("messages.addressUpdated"));
21881
22022
  return onMembershipAdressUpdateSuccess(res);
21882
22023
  });
21883
22024
  }
@@ -22529,7 +22670,7 @@ const AddressCreateModal = ({
22529
22670
  switchView,
22530
22671
  switchToPaymentView,
22531
22672
  resetView
22532
- } = usePelcro();
22673
+ } = usePelcro$1();
22533
22674
 
22534
22675
  const onSuccess = newAddressId => {
22535
22676
  var _otherProps$onSuccess;
@@ -22622,7 +22763,7 @@ const AddressUpdateContainer = ({
22622
22763
 
22623
22764
  const {
22624
22765
  addressIdToEdit
22625
- } = usePelcro();
22766
+ } = usePelcro$1();
22626
22767
  const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
22627
22768
  const [t] = useTranslation("address");
22628
22769
  useEffect(() => {
@@ -23713,7 +23854,7 @@ const PasswordForgotModal = ({
23713
23854
  } = useTranslation("passwordForgot");
23714
23855
  const {
23715
23856
  switchView
23716
- } = usePelcro();
23857
+ } = usePelcro$1();
23717
23858
  return /*#__PURE__*/React__default.createElement(Modal, {
23718
23859
  id: "pelcro-password-forgot-modal",
23719
23860
  onDisplay: onDisplay,
@@ -24298,7 +24439,7 @@ const CartContainer = ({
24298
24439
  const {
24299
24440
  cartItems,
24300
24441
  set
24301
- } = usePelcro();
24442
+ } = usePelcro$1();
24302
24443
  const {
24303
24444
  t
24304
24445
  } = useTranslation("shop");
@@ -24403,7 +24544,7 @@ const CartRemoveItemButton = ({
24403
24544
  }) => {
24404
24545
  const {
24405
24546
  removeFromCart
24406
- } = usePelcro();
24547
+ } = usePelcro$1();
24407
24548
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
24408
24549
  variant: "icon",
24409
24550
  "data-key": itemId,
@@ -24466,7 +24607,7 @@ const CartTotalPrice = () => {
24466
24607
  } = useContext(store$8);
24467
24608
  const {
24468
24609
  cartItems
24469
- } = usePelcro();
24610
+ } = usePelcro$1();
24470
24611
  const totalPriceCurrency = cartItems[0].currency;
24471
24612
  const {
24472
24613
  t
@@ -24486,7 +24627,7 @@ const CartTotalPrice = () => {
24486
24627
  const CartView = props => {
24487
24628
  const {
24488
24629
  cartItems
24489
- } = usePelcro();
24630
+ } = usePelcro$1();
24490
24631
  const {
24491
24632
  t
24492
24633
  } = useTranslation("cart");
@@ -24547,7 +24688,7 @@ const CartModal = ({
24547
24688
  switchView,
24548
24689
  switchToAddressView,
24549
24690
  isAuthenticated
24550
- } = usePelcro();
24691
+ } = usePelcro$1();
24551
24692
 
24552
24693
  const onSuccess = items => {
24553
24694
  var _otherProps$onSuccess;
@@ -24579,7 +24720,7 @@ const ShopSelectProductButton = ({
24579
24720
  }) => {
24580
24721
  const {
24581
24722
  addToCart
24582
- } = usePelcro();
24723
+ } = usePelcro$1();
24583
24724
  const {
24584
24725
  t
24585
24726
  } = useTranslation("shop");
@@ -24611,7 +24752,7 @@ const ShopPurchaseButton = ({
24611
24752
  }) => {
24612
24753
  const {
24613
24754
  purchaseItem
24614
- } = usePelcro();
24755
+ } = usePelcro$1();
24615
24756
  const {
24616
24757
  t
24617
24758
  } = useTranslation("shop");
@@ -24647,7 +24788,7 @@ const ShopView = () => {
24647
24788
  className: "plc-mt-2"
24648
24789
  }), /*#__PURE__*/React__default.createElement(ShopPurchaseButton, {
24649
24790
  itemId: item.id,
24650
- className: "plc-mt-2"
24791
+ className: "plc-mt-2 pelcro-purchase-button"
24651
24792
  })));
24652
24793
  })));
24653
24794
  };
@@ -24687,7 +24828,7 @@ const OrderCreateModal = ({
24687
24828
  }) => {
24688
24829
  const {
24689
24830
  switchView
24690
- } = usePelcro();
24831
+ } = usePelcro$1();
24691
24832
 
24692
24833
  const onSuccess = () => {
24693
24834
  var _otherProps$onSuccess;
@@ -24717,7 +24858,7 @@ const OrderConfirmModal = props => {
24717
24858
  } = useTranslation("shop");
24718
24859
  const {
24719
24860
  resetView
24720
- } = usePelcro();
24861
+ } = usePelcro$1();
24721
24862
 
24722
24863
  const onClose = () => {
24723
24864
  var _props$onClose;
@@ -24809,7 +24950,7 @@ const GiftCreateContainer = ({
24809
24950
  } = useTranslation("register");
24810
24951
  const {
24811
24952
  set
24812
- } = usePelcro();
24953
+ } = usePelcro$1();
24813
24954
 
24814
24955
  const handleSubmit = (state, dispatch) => {
24815
24956
  const giftRecipient = {
@@ -25101,7 +25242,7 @@ const GiftCreateModal = ({
25101
25242
  switchToAddressView,
25102
25243
  switchToPaymentView,
25103
25244
  product
25104
- } = usePelcro();
25245
+ } = usePelcro$1();
25105
25246
 
25106
25247
  const onSuccess = giftRecipient => {
25107
25248
  var _otherProps$onSuccess;
@@ -25129,6 +25270,7 @@ const GiftCreateModal = ({
25129
25270
  GiftCreateModal.viewId = "gift-create";
25130
25271
 
25131
25272
  const initialState$6 = {
25273
+ isSubmitting: false,
25132
25274
  giftCode: "",
25133
25275
  buttonDisabled: true,
25134
25276
  alert: {
@@ -25147,14 +25289,24 @@ const GiftRedeemContainer = ({
25147
25289
  onSuccess = () => {},
25148
25290
  onFailure = () => {},
25149
25291
  onDisplay = () => {},
25150
- children
25292
+ children,
25293
+ ...props
25151
25294
  }) => {
25295
+ var _ref, _props$subscriptionId;
25296
+
25152
25297
  const {
25153
25298
  t
25154
25299
  } = useTranslation("register");
25155
25300
  const {
25156
25301
  set
25157
- } = usePelcro();
25302
+ } = usePelcro$1();
25303
+ const {
25304
+ switchView,
25305
+ switchToAddressView,
25306
+ isAuthenticated,
25307
+ subscriptionIdToRenew: subscriptionIdToRenewFromStore
25308
+ } = usePelcro$1();
25309
+ const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25158
25310
  useEffect(() => {
25159
25311
  onDisplay();
25160
25312
  }, []);
@@ -25175,7 +25327,41 @@ const GiftRedeemContainer = ({
25175
25327
  set({
25176
25328
  giftCode
25177
25329
  });
25178
- onSuccess(giftCode);
25330
+
25331
+ if (!isAuthenticated()) {
25332
+ switchView("register");
25333
+ } else {
25334
+ console.log("Shaker");
25335
+ window.Pelcro.subscription.redeemGift({
25336
+ auth_token: window.Pelcro.user.read().auth_token,
25337
+ gift_code: giftCode,
25338
+ // redeem gift as a future phase of an existing subscription
25339
+ subscription_id: subscriptionIdToRenew
25340
+ }, (err, res) => {
25341
+ dispatch({
25342
+ type: LOADING,
25343
+ payload: false
25344
+ });
25345
+
25346
+ if (err) {
25347
+ dispatch({
25348
+ type: SHOW_ALERT,
25349
+ payload: {
25350
+ type: "error",
25351
+ content: getErrorMessages(err)
25352
+ }
25353
+ });
25354
+
25355
+ if (getErrorMessages(err) === "Address ID is required") {
25356
+ switchToAddressView();
25357
+ } else {
25358
+ return onFailure(err);
25359
+ }
25360
+ } else {
25361
+ return onSuccess(giftCode);
25362
+ }
25363
+ });
25364
+ }
25179
25365
  }
25180
25366
  };
25181
25367
 
@@ -25196,8 +25382,14 @@ const GiftRedeemContainer = ({
25196
25382
  buttonDisabled: action.payload
25197
25383
  });
25198
25384
 
25385
+ case LOADING:
25386
+ return lib_7({ ...state,
25387
+ isSubmitting: action.payload
25388
+ });
25389
+
25199
25390
  case HANDLE_SUBMIT:
25200
25391
  return lib_5({ ...state,
25392
+ isSubmitting: true,
25201
25393
  buttonDisabled: true
25202
25394
  }, (state, dispatch) => handleRedeem(state, dispatch));
25203
25395
 
@@ -25266,7 +25458,8 @@ const GiftRedeemSubmitButton = ({
25266
25458
  const {
25267
25459
  dispatch,
25268
25460
  state: {
25269
- disableSubmit
25461
+ disableSubmit,
25462
+ isSubmitting
25270
25463
  }
25271
25464
  } = useContext(store$6);
25272
25465
  const {
@@ -25279,7 +25472,8 @@ const GiftRedeemSubmitButton = ({
25279
25472
  });
25280
25473
  onClick === null || onClick === void 0 ? void 0 : onClick();
25281
25474
  },
25282
- disabled: disableSubmit
25475
+ disabled: disableSubmit,
25476
+ isLoading: isSubmitting
25283
25477
  }, otherProps), name !== null && name !== void 0 ? name : t("redeem.buttons.redeem"));
25284
25478
  };
25285
25479
 
@@ -25324,18 +25518,13 @@ const GiftRedeemModal = ({
25324
25518
  switchView,
25325
25519
  switchToAddressView,
25326
25520
  isAuthenticated
25327
- } = usePelcro();
25521
+ } = usePelcro$1();
25328
25522
 
25329
25523
  const onSuccess = giftCode => {
25330
25524
  var _otherProps$onSuccess;
25331
25525
 
25332
25526
  (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, giftCode);
25333
-
25334
- if (isAuthenticated()) {
25335
- switchToAddressView();
25336
- } else {
25337
- switchView("register");
25338
- }
25527
+ switchView("subscription-success");
25339
25528
  };
25340
25529
 
25341
25530
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -25396,7 +25585,7 @@ const AddressSelectContainer = ({
25396
25585
  subscriptionIdToRenew: subscriptionIdToRenewFromStore,
25397
25586
  set,
25398
25587
  selectedMembership
25399
- } = usePelcro();
25588
+ } = usePelcro$1();
25400
25589
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
25401
25590
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25402
25591
 
@@ -25433,7 +25622,7 @@ const AddressSelectContainer = ({
25433
25622
  return onFailure(err);
25434
25623
  }
25435
25624
 
25436
- notify.success(t("messages.addressUpdated"));
25625
+ notify$1.success(t("messages.addressUpdated"));
25437
25626
  return onMembershipAdressUpdateSuccess(res);
25438
25627
  });
25439
25628
  }
@@ -25638,7 +25827,7 @@ const AddressSelectModal = ({
25638
25827
  switchView,
25639
25828
  switchToPaymentView,
25640
25829
  resetView
25641
- } = usePelcro();
25830
+ } = usePelcro$1();
25642
25831
 
25643
25832
  const onSuccess = selectedAddressId => {
25644
25833
  var _otherProps$onSuccess;
@@ -25716,7 +25905,7 @@ const PaymentMethodSelectContainer = ({
25716
25905
  const {
25717
25906
  set,
25718
25907
  selectedPaymentMethodId: selectedPaymentMethodIdFromStore
25719
- } = usePelcro();
25908
+ } = usePelcro$1();
25720
25909
 
25721
25910
  const submitPaymentMethod = ({
25722
25911
  selectedPaymentMethodId
@@ -25899,7 +26088,7 @@ const PaymentMethodSelectModal = ({
25899
26088
  switchToCheckoutForm,
25900
26089
  set,
25901
26090
  plan
25902
- } = usePelcro();
26091
+ } = usePelcro$1();
25903
26092
  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;
25904
26093
  useEffect(() => {
25905
26094
  if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
@@ -27207,7 +27396,7 @@ const SavedItems = ({
27207
27396
  const [isLoading, setLoading] = useState(false);
27208
27397
  const {
27209
27398
  isAuthenticated
27210
- } = usePelcro();
27399
+ } = usePelcro$1();
27211
27400
 
27212
27401
  const removeItemFromMetadata = (category, title) => {
27213
27402
  const user = window.Pelcro.user.read();
@@ -27406,7 +27595,7 @@ const SubscriptionsItems = ({
27406
27595
  setSubscriptionToCancel,
27407
27596
  setSubscriptionToSuspend,
27408
27597
  set
27409
- } = usePelcro();
27598
+ } = usePelcro$1();
27410
27599
  const subs = getNonDonationSubs();
27411
27600
  if (subs.length === 0) return null;
27412
27601
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
@@ -27427,7 +27616,7 @@ const SubscriptionsItems = ({
27427
27616
  }
27428
27617
 
27429
27618
  onClose === null || onClose === void 0 ? void 0 : onClose();
27430
- notify.confirm((onSuccess, onFailure) => {
27619
+ notify$1.confirm((onSuccess, onFailure) => {
27431
27620
  cancelSubscription(sub.id, onSuccess, onFailure);
27432
27621
  }, {
27433
27622
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -27485,7 +27674,7 @@ const SubscriptionsItems = ({
27485
27674
  }
27486
27675
 
27487
27676
  onClose === null || onClose === void 0 ? void 0 : onClose();
27488
- notify.confirm((onSuccess, onFailure) => {
27677
+ notify$1.confirm((onSuccess, onFailure) => {
27489
27678
  unSuspendSubscription(sub.id, onSuccess, onFailure);
27490
27679
  }, {
27491
27680
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -27931,11 +28120,56 @@ function SvgQrcode(props) {
27931
28120
  })));
27932
28121
  }
27933
28122
 
27934
- const DonationsMenu = () => {
28123
+ const DonationsMenu = ({
28124
+ reactivateSubscription,
28125
+ disableSubmit,
28126
+ cancelSubscription
28127
+ }) => {
27935
28128
  const {
27936
28129
  t
27937
28130
  } = useTranslation("dashboard");
28131
+ const {
28132
+ switchView,
28133
+ setSubscriptionToCancel
28134
+ } = usePelcro$1();
27938
28135
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
28136
+ // Cancel button click handlers
28137
+ const onCancelClick = () => {
28138
+ var _onClose;
28139
+
28140
+ const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28141
+
28142
+ if (isImmediateCancelationEnabled) {
28143
+ setSubscriptionToCancel(sub.id);
28144
+ return switchView("subscription-cancel");
28145
+ }
28146
+
28147
+ if (userMustVerifyEmail()) {
28148
+ return switchView("email-verify");
28149
+ }
28150
+
28151
+ (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
28152
+ notify.confirm((onSuccess, onFailure) => {
28153
+ cancelSubscription(sub.id, onSuccess, onFailure);
28154
+ }, {
28155
+ confirmMessage: t("messages.subCancellation.isSureToCancel"),
28156
+ loadingMessage: t("messages.subCancellation.loading"),
28157
+ successMessage: t("messages.subCancellation.success"),
28158
+ errorMessage: t("messages.subCancellation.error")
28159
+ }, {
28160
+ closeButtonLabel: t("labels.subCancellation.goBack")
28161
+ });
28162
+ }; // Reactivate button click handlers
28163
+
28164
+
28165
+ const onReactivateClick = () => {
28166
+ if (userMustVerifyEmail()) {
28167
+ return switchView("email-verify");
28168
+ }
28169
+
28170
+ reactivateSubscription(sub.id);
28171
+ };
28172
+
27939
28173
  return /*#__PURE__*/React__default.createElement("tr", {
27940
28174
  key: sub.id,
27941
28175
  className: "plc-w-full plc-align-top pelcro-donation-row"
@@ -27947,7 +28181,21 @@ const DonationsMenu = () => {
27947
28181
  className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
27948
28182
  }, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
27949
28183
  className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
27950
- }, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
28184
+ }, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))), /*#__PURE__*/React__default.createElement("td", null, sub.cancel_at_period_end === 1 && sub.plan.auto_renew && !sub.is_gift_recipient && /*#__PURE__*/React__default.createElement(Button, {
28185
+ variant: "ghost",
28186
+ className: "plc-text-green-400 focus:plc-ring-green-300 pelcro-dashboard-sub-reactivate-button",
28187
+ icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
28188
+ onClick: onReactivateClick,
28189
+ disabled: disableSubmit,
28190
+ "data-key": sub.id
28191
+ }, t("labels.reactivate")), !sub.plan.auto_renew || sub.plan.auto_renew && sub.cancel_at_period_end === 0 ? /*#__PURE__*/React__default.createElement(Button, {
28192
+ variant: "ghost",
28193
+ className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
28194
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
28195
+ onClick: onCancelClick,
28196
+ disabled: disableSubmit,
28197
+ "data-key": sub.id
28198
+ }, t("labels.unsubscribe")) : ""));
27951
28199
  });
27952
28200
  return /*#__PURE__*/React__default.createElement("table", {
27953
28201
  className: "plc-w-full plc-table-fixed pelcro-donations-table"
@@ -27957,7 +28205,9 @@ const DonationsMenu = () => {
27957
28205
  className: "plc-w-6/12 "
27958
28206
  }, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
27959
28207
  className: "plc-w-6/12 "
27960
- }, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
28208
+ }, t("labels.startDate")), /*#__PURE__*/React__default.createElement("th", {
28209
+ className: "plc-w-3/12 "
28210
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
27961
28211
  className: "plc-h-4"
27962
28212
  }), subscriptions));
27963
28213
  };
@@ -28003,7 +28253,7 @@ const InvoicesItems = () => {
28003
28253
  const {
28004
28254
  setInvoice,
28005
28255
  switchView
28006
- } = usePelcro();
28256
+ } = usePelcro$1();
28007
28257
  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 : [];
28008
28258
 
28009
28259
  const showInvoiceDetails = event => {
@@ -28134,7 +28384,7 @@ const MembershipsItems = () => {
28134
28384
  switchView,
28135
28385
  setSelectedMembership,
28136
28386
  switchToAddressView
28137
- } = usePelcro();
28387
+ } = usePelcro$1();
28138
28388
  const memberships = getActiveMemberships();
28139
28389
 
28140
28390
  const onChangeAddressClick = membershipId => {
@@ -28214,7 +28464,7 @@ function DashboardWithHook(props) {
28214
28464
  resetView,
28215
28465
  logout,
28216
28466
  set
28217
- } = usePelcro();
28467
+ } = usePelcro$1();
28218
28468
  return /*#__PURE__*/React__default.createElement(DashboardWithTrans, {
28219
28469
  setAddress: addressIdToEdit => set({
28220
28470
  addressIdToEdit
@@ -28790,7 +29040,11 @@ class Dashboard extends Component {
28790
29040
  className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
28791
29041
  }),
28792
29042
  title: this.locale("labels.donations"),
28793
- content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
29043
+ content: /*#__PURE__*/React__default.createElement(DonationsMenu, {
29044
+ reactivateSubscription: this.reactivateSubscription,
29045
+ disableSubmit: this.state.disableSubmit,
29046
+ cancelSubscription: this.cancelSubscription
29047
+ })
28794
29048
  }), /*#__PURE__*/React__default.createElement(Accordion.item, {
28795
29049
  name: SUB_MENUS.GIFTS,
28796
29050
  icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
@@ -28850,7 +29104,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
28850
29104
  const DashboardOpenButton = () => {
28851
29105
  const {
28852
29106
  switchView
28853
- } = usePelcro();
29107
+ } = usePelcro$1();
28854
29108
  return /*#__PURE__*/React__default.createElement("div", {
28855
29109
  className: "plc-fixed plc-right-4 plc-bottom-4 pelcro-open-dashboard-btn"
28856
29110
  }, /*#__PURE__*/React__default.createElement("button", {
@@ -30839,11 +31093,34 @@ const EmailVerifyModal = ({
30839
31093
  onClose,
30840
31094
  ...otherProps
30841
31095
  }) => {
31096
+ const {
31097
+ product,
31098
+ plan,
31099
+ switchToAddressView,
31100
+ switchToPaymentView
31101
+ } = usePelcro();
31102
+
31103
+ const onSuccess = res => {
31104
+ var _props$onSuccess, _props;
31105
+
31106
+ (_props$onSuccess = (_props = props).onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(_props, res);
31107
+
31108
+ if (product) {
31109
+ if (product.address_required) {
31110
+ return switchToAddressView();
31111
+ } else {
31112
+ return switchToPaymentView();
31113
+ }
31114
+ }
31115
+ };
31116
+
30842
31117
  return /*#__PURE__*/React__default.createElement(Modal, {
30843
31118
  onDisplay: onDisplay,
30844
31119
  onClose: onClose,
30845
31120
  id: "pelcro-email-verify-modal"
30846
- }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
31121
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, Object.assign({
31122
+ onSuccess: onSuccess
31123
+ }, otherProps))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
30847
31124
  };
30848
31125
  EmailVerifyModal.viewId = "email-verify";
30849
31126
 
@@ -30991,14 +31268,14 @@ function VerifyLinkTokenModal({
30991
31268
  } = useTranslation("verifyLinkToken");
30992
31269
  const {
30993
31270
  resetView
30994
- } = usePelcro();
31271
+ } = usePelcro$1();
30995
31272
 
30996
31273
  const onSuccess = res => {
30997
31274
  var _props$onSuccess;
30998
31275
 
30999
31276
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
31000
31277
  resetView();
31001
- notify.success(t("messages.success"));
31278
+ notify$1.success(t("messages.success"));
31002
31279
  };
31003
31280
 
31004
31281
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -31041,7 +31318,7 @@ const InvoicePaymentModal = ({
31041
31318
  }) => {
31042
31319
  const {
31043
31320
  switchView
31044
- } = usePelcro();
31321
+ } = usePelcro$1();
31045
31322
 
31046
31323
  const onSuccess = () => {
31047
31324
  var _otherProps$onSuccess;
@@ -31118,7 +31395,7 @@ const InvoiceDetailsDownloadButton = ({
31118
31395
  } = useTranslation("invoiceDetails");
31119
31396
  const {
31120
31397
  invoice
31121
- } = usePelcro();
31398
+ } = usePelcro$1();
31122
31399
  return /*#__PURE__*/React__default.createElement(Link, Object.assign({
31123
31400
  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}`,
31124
31401
  id: "pelcro-download-invoice-link",
@@ -31155,7 +31432,7 @@ const InvoiceDetailsView = props => {
31155
31432
  } = useTranslation("invoiceDetails");
31156
31433
  const {
31157
31434
  invoice
31158
- } = usePelcro();
31435
+ } = usePelcro$1();
31159
31436
  const showPayButton = canPayInvoice(invoice);
31160
31437
  const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
31161
31438
  const hasPlanDetails = Boolean(invoice.plan);
@@ -31223,7 +31500,7 @@ const InvoiceDetailsModal = ({
31223
31500
  }) => {
31224
31501
  const {
31225
31502
  switchToPaymentView
31226
- } = usePelcro();
31503
+ } = usePelcro$1();
31227
31504
 
31228
31505
  const onSuccess = () => {
31229
31506
  var _otherProps$onSuccess;
@@ -32660,4 +32937,4 @@ const QrCodeModal = ({
32660
32937
  };
32661
32938
  QrCodeModal.viewId = "qrcode";
32662
32939
 
32663
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
32940
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateSetDefault, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateSetDefault, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankAuthenticationSuccess, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, IncludeFirstName, IncludeLastName, IncludePhone, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginRequestLoginToken, LoginUsername, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PasswordlessRequestContainer, PasswordlessRequestEmail, PasswordlessRequestModal, PasswordlessRequestView, PasswordlessRequestViewButton, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, QrCodeModal, QrCodeView, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCancelModal, SubscriptionCreateContainer, SubscriptionCreateFreePlanButton, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionManageMembersButton, SubscriptionManageMembersContainer, SubscriptionManageMembersEmails, SubscriptionManageMembersList, SubscriptionManageMembersModal, SubscriptionManageMembersView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, SubscriptionSuspendContainer, SubscriptionSuspendModal, SubscriptionSuspendView, TaxAmount, TextArea, Tooltip, UserNameInput, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateTin, UserUpdateUsername, UserUpdateView, VerifyLinkTokenContainer, VerifyLinkTokenLoader, VerifyLinkTokenModal, VerifyLinkTokenView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify$1 as notify, unauthenticatedButtons, usePelcro$1 as usePelcro };