@pelcro/react-pelcro-js 3.14.0 → 3.15.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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) {
@@ -10669,8 +10677,10 @@ const init = () => {
10669
10677
  disableKeyboardInteractions(elemDeepClone);
10670
10678
  elemDeepClone.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
10671
10679
  unblurElemWhenUserSubscribes(elemDeepClone, entitlements);
10680
+ unblurElemWhenUserLogsIn(elemDeepClone, entitlements);
10681
+ unblurElemWhenUserLogsOut(elemDeepClone, entitlements);
10672
10682
  const NOTIFICATION_ID = "entitlement";
10673
- notify( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10683
+ notify$1( /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(Trans, {
10674
10684
  i18nKey: "messages:entitlement"
10675
10685
  }, "Some of the content on this page is available with one or more of our plans.", /*#__PURE__*/React__default.createElement(Link, {
10676
10686
  onClick: () => {
@@ -10687,7 +10697,7 @@ const init = () => {
10687
10697
  });
10688
10698
  }
10689
10699
 
10690
- notify.dismiss(NOTIFICATION_ID);
10700
+ notify$1.dismiss(NOTIFICATION_ID);
10691
10701
  switchView("_plan-select-entitlements");
10692
10702
  }
10693
10703
  }, "Subscribe"), "now to get full page access.")), {
@@ -10727,7 +10737,7 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
10727
10737
  document.addEventListener("PelcroSubscriptionCreate", event => {
10728
10738
  const {
10729
10739
  isGift
10730
- } = usePelcro.getStore();
10740
+ } = usePelcro$1.getStore();
10731
10741
  if (isGift) return;
10732
10742
  const latestSub = event.detail.data.subscriptions[event.detail.data.subscriptions.length - 1];
10733
10743
  const shouldUnblurContent = entitlements.some(ent => {
@@ -10742,6 +10752,22 @@ function unblurElemWhenUserSubscribes(elem, entitlements) {
10742
10752
  });
10743
10753
  }
10744
10754
 
10755
+ function unblurElemWhenUserLogsIn(elem, entitlements) {
10756
+ document.addEventListener("PelcroUserLoggedIn", () => {
10757
+ if (!shouldBlurContent(entitlements)) {
10758
+ elem.setAttribute("style", "filter:inherit !important; pointer-events:inherit !important; user-select:inherit !important");
10759
+ }
10760
+ });
10761
+ }
10762
+
10763
+ function unblurElemWhenUserLogsOut(elem, entitlements) {
10764
+ document.addEventListener("PelcroUserLogout", () => {
10765
+ if (shouldBlurContent(entitlements)) {
10766
+ elem.setAttribute("style", "filter:blur(3px) !important; pointer-events:none !important; user-select:none !important");
10767
+ }
10768
+ });
10769
+ }
10770
+
10745
10771
  function shouldBlurContent(entitlements) {
10746
10772
  return entitlements.every(entitlement => !window.Pelcro.user.isEntitledTo(entitlement));
10747
10773
  }
@@ -11049,7 +11075,7 @@ const initPaywalls = () => {
11049
11075
 
11050
11076
  const {
11051
11077
  switchView
11052
- } = usePelcro.getStore();
11078
+ } = usePelcro$1.getStore();
11053
11079
 
11054
11080
  if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11055
11081
  /*
@@ -11071,7 +11097,7 @@ const loadPaymentSDKs = () => {
11071
11097
  // Lazy load stripe's SDK
11072
11098
  const {
11073
11099
  whenUserReady
11074
- } = usePelcro.getStore();
11100
+ } = usePelcro$1.getStore();
11075
11101
  whenUserReady(() => {
11076
11102
  if (!window.Stripe) {
11077
11103
  pure_1(window.Pelcro.environment.stripe);
@@ -11119,7 +11145,7 @@ const loadAuth0SDK = () => {
11119
11145
  const initSecuritySdk = () => {
11120
11146
  const {
11121
11147
  whenSiteReady
11122
- } = usePelcro.getStore();
11148
+ } = usePelcro$1.getStore();
11123
11149
  whenSiteReady(() => {
11124
11150
  var _window$Pelcro$site$r2;
11125
11151
 
@@ -11155,7 +11181,7 @@ const dispatchModalDisplayEvents = modalName => {
11155
11181
  const {
11156
11182
  whenSiteReady,
11157
11183
  whenEcommerceLoaded
11158
- } = usePelcro.getStore();
11184
+ } = usePelcro$1.getStore();
11159
11185
  const renderShopView = shopComponent => {
11160
11186
  whenEcommerceLoaded(() => {
11161
11187
  const shopElement = document.getElementById("pelcro-shop");
@@ -11237,7 +11263,7 @@ const initViewFromURL = () => {
11237
11263
  const {
11238
11264
  switchView,
11239
11265
  whenSiteReady
11240
- } = usePelcro.getStore();
11266
+ } = usePelcro$1.getStore();
11241
11267
 
11242
11268
  if (isValidViewFromURL(view)) {
11243
11269
  whenSiteReady(() => {
@@ -11295,7 +11321,7 @@ const initSubscriptionFromURL = () => {
11295
11321
  switchView,
11296
11322
  whenSiteReady,
11297
11323
  set
11298
- } = usePelcro.getStore();
11324
+ } = usePelcro$1.getStore();
11299
11325
  whenSiteReady(() => {
11300
11326
  var _selectedProduct$plan;
11301
11327
 
@@ -11319,7 +11345,7 @@ const initSubscriptionFromURL = () => {
11319
11345
  isAuthenticated,
11320
11346
  switchToAddressView,
11321
11347
  switchToPaymentView
11322
- } = usePelcro.getStore();
11348
+ } = usePelcro$1.getStore();
11323
11349
 
11324
11350
  if (!isAuthenticated()) {
11325
11351
  return switchView("register");
@@ -11351,7 +11377,7 @@ const initOfflineSubscriptionFromURL = offlinePlanId => {
11351
11377
  switchToPaymentView,
11352
11378
  switchToAddressView,
11353
11379
  set
11354
- } = usePelcro.getStore();
11380
+ } = usePelcro$1.getStore();
11355
11381
  whenSiteReady(() => {
11356
11382
  window.Pelcro.plan.getPlan({
11357
11383
  plan_id: offlinePlanId
@@ -11398,7 +11424,7 @@ const initPurchaseFromUrl = () => {
11398
11424
  const {
11399
11425
  whenEcommerceLoaded,
11400
11426
  purchaseItem
11401
- } = usePelcro.getStore();
11427
+ } = usePelcro$1.getStore();
11402
11428
  whenEcommerceLoaded(() => {
11403
11429
  const skuId = window.Pelcro.helpers.getURLParameter("sku_id");
11404
11430
  purchaseItem(skuId);
@@ -11414,7 +11440,7 @@ const initCartFromUrl = () => {
11414
11440
  whenEcommerceLoaded,
11415
11441
  addToCart,
11416
11442
  switchView
11417
- } = usePelcro.getStore();
11443
+ } = usePelcro$1.getStore();
11418
11444
  whenEcommerceLoaded(() => {
11419
11445
  const skusIdsParam = window.Pelcro.helpers.getURLParameter("sku_id");
11420
11446
  const skusIds = skusIdsParam === null || skusIdsParam === void 0 ? void 0 : skusIdsParam.split(",");
@@ -11435,7 +11461,7 @@ const verifyEmailTokenFromUrl = () => {
11435
11461
 
11436
11462
  const {
11437
11463
  whenSiteReady
11438
- } = usePelcro.getStore();
11464
+ } = usePelcro$1.getStore();
11439
11465
  const translations = i18next.t("verifyEmail:messages", {
11440
11466
  returnObjects: true
11441
11467
  });
@@ -11447,10 +11473,10 @@ const verifyEmailTokenFromUrl = () => {
11447
11473
  token: emailToken
11448
11474
  }, (err, res) => {
11449
11475
  if (err) {
11450
- return notify.error(getErrorMessages(err));
11476
+ return notify$1.error(getErrorMessages(err));
11451
11477
  }
11452
11478
 
11453
- return notify.success(translations.success);
11479
+ return notify$1.success(translations.success);
11454
11480
  });
11455
11481
  }, {
11456
11482
  once: true
@@ -11464,7 +11490,7 @@ const verifyLinkTokenFromUrl = () => {
11464
11490
  whenSiteReady,
11465
11491
  resetView,
11466
11492
  isAuthenticated
11467
- } = usePelcro.getStore();
11493
+ } = usePelcro$1.getStore();
11468
11494
  const translations = i18next.t("verifyLinkToken:messages", {
11469
11495
  returnObjects: true
11470
11496
  });
@@ -11476,7 +11502,7 @@ const verifyLinkTokenFromUrl = () => {
11476
11502
  token: loginToken
11477
11503
  }, (err, res) => {
11478
11504
  if (err) {
11479
- return notify.error(getErrorMessages(err));
11505
+ return notify$1.error(getErrorMessages(err));
11480
11506
  }
11481
11507
 
11482
11508
  const {
@@ -11486,11 +11512,11 @@ const verifyLinkTokenFromUrl = () => {
11486
11512
  auth_token
11487
11513
  }, (err, res) => {
11488
11514
  if (err) {
11489
- return notify.error(getErrorMessages(err));
11515
+ return notify$1.error(getErrorMessages(err));
11490
11516
  }
11491
11517
 
11492
11518
  resetView();
11493
- return notify.success(translations.success);
11519
+ return notify$1.success(translations.success);
11494
11520
  });
11495
11521
  });
11496
11522
  }, {
@@ -11503,12 +11529,12 @@ const showPasswordlessRequestFromUrl = () => {
11503
11529
 
11504
11530
  const {
11505
11531
  isAuthenticated
11506
- } = usePelcro.getStore();
11532
+ } = usePelcro$1.getStore();
11507
11533
  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
11534
  if (!passwordlessEnabled || isAuthenticated()) return;
11509
11535
  const {
11510
11536
  switchView
11511
- } = usePelcro.getStore();
11537
+ } = usePelcro$1.getStore();
11512
11538
  return switchView("passwordless-request");
11513
11539
  };
11514
11540
 
@@ -11519,7 +11545,7 @@ const showInvoiceDetailsFromUrl = () => {
11519
11545
  whenUserReady,
11520
11546
  whenSiteReady,
11521
11547
  switchView
11522
- } = usePelcro.getStore();
11548
+ } = usePelcro$1.getStore();
11523
11549
  whenSiteReady(() => {
11524
11550
  if (!isAuthenticated()) {
11525
11551
  return switchView("login");
@@ -11533,18 +11559,18 @@ const showInvoiceDetailsFromUrl = () => {
11533
11559
  const errorMessage = i18next.t("messages:invalidInvoice", {
11534
11560
  returnObjects: true
11535
11561
  });
11536
- return notify.error(errorMessage);
11562
+ return notify$1.error(errorMessage);
11537
11563
  }
11538
11564
 
11539
11565
  const {
11540
11566
  invoice
11541
- } = usePelcro.getStore();
11567
+ } = usePelcro$1.getStore();
11542
11568
 
11543
11569
  if (invoice.total === 0) {
11544
11570
  const errorMessage = i18next.t("messages:zeroTotalInvoice", {
11545
11571
  returnObjects: true
11546
11572
  });
11547
- return notify.error(errorMessage);
11573
+ return notify$1.error(errorMessage);
11548
11574
  }
11549
11575
 
11550
11576
  return switchView("invoice-details");
@@ -11559,7 +11585,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11559
11585
  whenUserReady,
11560
11586
  whenSiteReady,
11561
11587
  switchView
11562
- } = usePelcro.getStore();
11588
+ } = usePelcro$1.getStore();
11563
11589
  whenSiteReady(() => {
11564
11590
  if (!isAuthenticated()) {
11565
11591
  return switchView("login");
@@ -11573,7 +11599,7 @@ const showSubscriptionManageMembersFromUrl = () => {
11573
11599
  const errorMessage = i18next.t("messages:invalidSubscription", {
11574
11600
  returnObjects: true
11575
11601
  });
11576
- return notify.error(errorMessage);
11602
+ return notify$1.error(errorMessage);
11577
11603
  }
11578
11604
 
11579
11605
  return switchView("manage-members");
@@ -11599,7 +11625,7 @@ const PelcroModalController = ({
11599
11625
  view,
11600
11626
  isAuthenticated,
11601
11627
  whenSiteReady
11602
- } = usePelcro();
11628
+ } = usePelcro$1();
11603
11629
  React__default.useEffect(() => {
11604
11630
  init$1();
11605
11631
  renderShopView(React__default.Children.map(children, child => child).find(({
@@ -13360,7 +13386,7 @@ function Modal({
13360
13386
  }) {
13361
13387
  var _window$Pelcro, _window$Pelcro$site$r;
13362
13388
 
13363
- const resetView = usePelcro(state => state.resetView);
13389
+ const resetView = usePelcro$1(state => state.resetView);
13364
13390
  useEffect(() => {
13365
13391
  onDisplay === null || onDisplay === void 0 ? void 0 : onDisplay();
13366
13392
  dispatchModalDisplayEvents(id);
@@ -13433,8 +13459,11 @@ function LoginModal({
13433
13459
  const {
13434
13460
  switchView,
13435
13461
  resetView,
13436
- invoice
13437
- } = usePelcro();
13462
+ product,
13463
+ order,
13464
+ switchToAddressView,
13465
+ switchToPaymentView
13466
+ } = usePelcro$1();
13438
13467
 
13439
13468
  const onSuccess = res => {
13440
13469
  var _props$onSuccess;
@@ -13445,10 +13474,23 @@ function LoginModal({
13445
13474
  initPaywalls();
13446
13475
  }
13447
13476
 
13477
+ if (product) {
13478
+ if (product.address_required) {
13479
+ return switchToAddressView();
13480
+ } else {
13481
+ return switchToPaymentView();
13482
+ }
13483
+ }
13484
+
13485
+ if (order) {
13486
+ return switchToAddressView();
13487
+ }
13488
+
13448
13489
  resetView();
13449
13490
  const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
13491
+ const viewsURLs = ["invoice-details", "gift-redeem", "plan-select"];
13450
13492
 
13451
- if (viewFromURL === "invoice-details") {
13493
+ if (viewsURLs.includes(viewFromURL)) {
13452
13494
  initViewFromURL();
13453
13495
  }
13454
13496
  };
@@ -13771,7 +13813,7 @@ function RegisterView(props) {
13771
13813
  } = useTranslation("register");
13772
13814
  const {
13773
13815
  product
13774
- } = usePelcro();
13816
+ } = usePelcro$1();
13775
13817
  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
13818
  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
13819
  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 +14044,7 @@ function RegisterModal(props) {
14002
14044
  order,
14003
14045
  giftCode,
14004
14046
  isGift
14005
- } = usePelcro();
14047
+ } = usePelcro$1();
14006
14048
 
14007
14049
  const onSuccess = res => {
14008
14050
  var _props$onSuccess;
@@ -14032,7 +14074,7 @@ function RegisterModal(props) {
14032
14074
 
14033
14075
 
14034
14076
  if (giftCode) {
14035
- return switchToAddressView();
14077
+ return switchView("gift-redeem"); // return switchToAddressView();
14036
14078
  } // Check if the subscription is meant as a gift (if so, gather recipients info)
14037
14079
 
14038
14080
 
@@ -14124,7 +14166,7 @@ function SelectModalWithHook(props) {
14124
14166
  resetView,
14125
14167
  view,
14126
14168
  set
14127
- } = usePelcro();
14169
+ } = usePelcro$1();
14128
14170
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
14129
14171
  const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
14130
14172
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
@@ -14396,7 +14438,7 @@ class SelectModal extends Component {
14396
14438
  const {
14397
14439
  switchToAddressView,
14398
14440
  switchToPaymentView
14399
- } = usePelcro.getStore();
14441
+ } = usePelcro$1.getStore();
14400
14442
 
14401
14443
  if (!isAuthenticated) {
14402
14444
  return setView("register");
@@ -16599,16 +16641,16 @@ const PaymentMethodContainerWithoutStripe = ({
16599
16641
  const {
16600
16642
  t
16601
16643
  } = useTranslation("payment");
16602
- const pelcroStore = usePelcro();
16644
+ const pelcroStore = usePelcro$1();
16603
16645
  const {
16604
16646
  set,
16605
16647
  order,
16606
16648
  selectedPaymentMethodId,
16607
16649
  couponCode
16608
- } = usePelcro();
16650
+ } = usePelcro$1();
16609
16651
  const {
16610
16652
  whenUserReady
16611
- } = usePelcro.getStore();
16653
+ } = usePelcro$1.getStore();
16612
16654
  const product = (_props$product = props.product) !== null && _props$product !== void 0 ? _props$product : pelcroStore.product;
16613
16655
  const plan = (_props$plan = props.plan) !== null && _props$plan !== void 0 ? _props$plan : pelcroStore.plan;
16614
16656
  const subscriptionIdToRenew = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : pelcroStore.subscriptionIdToRenew;
@@ -18072,11 +18114,11 @@ const PaymentMethodContainerWithoutStripe = ({
18072
18114
 
18073
18115
  if (show) {
18074
18116
  injectCardAuthenticationIframe(source);
18075
- cardAuthContainer.classList.remove("plc-hidden");
18076
- cardAuthContainer.classList.add("plc-flex");
18117
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18118
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18077
18119
  } else {
18078
- cardAuthContainer.classList.add("plc-hidden");
18079
- cardAuthContainer.classList.remove("plc-flex");
18120
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18121
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18080
18122
  }
18081
18123
  };
18082
18124
 
@@ -18084,11 +18126,11 @@ const PaymentMethodContainerWithoutStripe = ({
18084
18126
  const cardAuthContainer = document.querySelector(".card-authentication-success-container");
18085
18127
 
18086
18128
  if (show) {
18087
- cardAuthContainer.classList.remove("plc-hidden");
18088
- cardAuthContainer.classList.add("plc-flex");
18129
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-hidden");
18130
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-flex");
18089
18131
  } else {
18090
- cardAuthContainer.classList.add("plc-hidden");
18091
- cardAuthContainer.classList.remove("plc-flex");
18132
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.add("plc-hidden");
18133
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.classList.remove("plc-flex");
18092
18134
  }
18093
18135
  };
18094
18136
 
@@ -18099,7 +18141,7 @@ const PaymentMethodContainerWithoutStripe = ({
18099
18141
  const iframe = document.createElement("iframe");
18100
18142
  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
18143
  iframe.style = "position: absolute; width: 100%; height: 100%; left: 0; top: 0; bottom: 0; z-index: 10;";
18102
- cardAuthContainer.appendChild(iframe);
18144
+ cardAuthContainer === null || cardAuthContainer === void 0 ? void 0 : cardAuthContainer.appendChild(iframe);
18103
18145
  };
18104
18146
 
18105
18147
  const [state, dispatch] = useReducerWithSideEffects((state, action) => {
@@ -18288,7 +18330,7 @@ const PaymentMethodContainer = props => {
18288
18330
  const [isStripeLoaded, setIsStripeLoaded] = useState(Boolean(window.Stripe));
18289
18331
  const {
18290
18332
  whenUserReady
18291
- } = usePelcro.getStore();
18333
+ } = usePelcro$1.getStore();
18292
18334
  useEffect(() => {
18293
18335
  whenUserReady(() => {
18294
18336
  if (!window.Stripe) {
@@ -18389,7 +18431,7 @@ const PelcroPaymentRequestButton = props => {
18389
18431
  const CheckoutForm = () => {
18390
18432
  const {
18391
18433
  selectedPaymentMethodId
18392
- } = usePelcro();
18434
+ } = usePelcro$1();
18393
18435
  const cardProcessor = getSiteCardProcessor();
18394
18436
 
18395
18437
  if (selectedPaymentMethodId) {
@@ -18444,7 +18486,7 @@ const DiscountedPrice = props => {
18444
18486
  const {
18445
18487
  order,
18446
18488
  plan
18447
- } = usePelcro();
18489
+ } = usePelcro$1();
18448
18490
  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
18491
  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
18492
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
@@ -18480,7 +18522,7 @@ const SubmitPaymentMethod = ({
18480
18522
 
18481
18523
  const {
18482
18524
  plan
18483
- } = usePelcro();
18525
+ } = usePelcro$1();
18484
18526
  const {
18485
18527
  t
18486
18528
  } = useTranslation("checkoutForm");
@@ -18912,7 +18954,7 @@ const PaypalSubscribeButton = props => {
18912
18954
  plan,
18913
18955
  invoice,
18914
18956
  selectedAddressId
18915
- } = usePelcro();
18957
+ } = usePelcro$1();
18916
18958
  useEffect(() => {
18917
18959
  var _ref, _ref2, _state$updatedPrice, _props$plan, _props$selectedAddres;
18918
18960
 
@@ -19054,7 +19096,7 @@ const SelectedPaymentMethod = () => {
19054
19096
  const {
19055
19097
  switchView,
19056
19098
  selectedPaymentMethodId
19057
- } = usePelcro();
19099
+ } = usePelcro$1();
19058
19100
  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
19101
  return source.id == selectedPaymentMethodId;
19060
19102
  });
@@ -19095,7 +19137,7 @@ const TaxAmount = () => {
19095
19137
  } = useContext(store$k);
19096
19138
  const {
19097
19139
  plan
19098
- } = usePelcro();
19140
+ } = usePelcro$1();
19099
19141
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19100
19142
  const priceFormatted = getFormattedPriceByLocal(taxAmount * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
19101
19143
  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 +19283,7 @@ const SubscriptionRenewView = ({
19241
19283
  const {
19242
19284
  product,
19243
19285
  plan
19244
- } = usePelcro();
19286
+ } = usePelcro$1();
19245
19287
  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
19288
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
19247
19289
 
@@ -19296,7 +19338,7 @@ function SubscriptionRenewModal({
19296
19338
  }) {
19297
19339
  const {
19298
19340
  switchView
19299
- } = usePelcro();
19341
+ } = usePelcro$1();
19300
19342
 
19301
19343
  const onSuccess = res => {
19302
19344
  var _otherProps$onSuccess, _ReactGA$event;
@@ -19501,7 +19543,7 @@ const SubscriptionCancelNowButton = ({
19501
19543
  }) => {
19502
19544
  const {
19503
19545
  switchView
19504
- } = usePelcro();
19546
+ } = usePelcro$1();
19505
19547
  const {
19506
19548
  state: {
19507
19549
  cancelationReason
@@ -19548,7 +19590,7 @@ const SubscriptionCancelNowButton = ({
19548
19590
 
19549
19591
  switchView(null); //Show confirmation alert after closing the modal
19550
19592
 
19551
- notify.confirm((onSuccess, onFailure) => {
19593
+ notify$1.confirm((onSuccess, onFailure) => {
19552
19594
  cancelSubscription(payload, onSuccess, onFailure);
19553
19595
  }, {
19554
19596
  confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
@@ -19573,7 +19615,7 @@ const SubscriptionCancelLaterButton = ({
19573
19615
  }) => {
19574
19616
  const {
19575
19617
  switchView
19576
- } = usePelcro();
19618
+ } = usePelcro$1();
19577
19619
  const {
19578
19620
  state: {
19579
19621
  cancelationReason
@@ -19620,7 +19662,7 @@ const SubscriptionCancelLaterButton = ({
19620
19662
 
19621
19663
  switchView(null); //Show confirmation alert after closing the modal
19622
19664
 
19623
- notify.confirm((onSuccess, onFailure) => {
19665
+ notify$1.confirm((onSuccess, onFailure) => {
19624
19666
  cancelSubscription(payload, onSuccess, onFailure);
19625
19667
  }, {
19626
19668
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -19641,7 +19683,7 @@ const SubscriptionCancelLaterButton = ({
19641
19683
  const SubscriptionCancelView = props => {
19642
19684
  const {
19643
19685
  subscriptionToCancel
19644
- } = usePelcro();
19686
+ } = usePelcro$1();
19645
19687
  const {
19646
19688
  t
19647
19689
  } = useTranslation("subscriptionCancel");
@@ -19815,7 +19857,7 @@ const SubscriptionSuspendButton = ({
19815
19857
  }) => {
19816
19858
  const {
19817
19859
  switchView
19818
- } = usePelcro();
19860
+ } = usePelcro$1();
19819
19861
  const {
19820
19862
  state: {
19821
19863
  suspendDate,
@@ -19857,7 +19899,7 @@ const SubscriptionSuspendButton = ({
19857
19899
 
19858
19900
  switchView(null); //Show confirmation alert after closing the modal
19859
19901
 
19860
- notify.confirm((onSuccess, onFailure) => {
19902
+ notify$1.confirm((onSuccess, onFailure) => {
19861
19903
  suspendSubscription(payload, onSuccess, onFailure);
19862
19904
  }, {
19863
19905
  confirmMessage: t("messages.subCancellation.isSureToSuspendNow"),
@@ -19879,7 +19921,7 @@ const SubscriptionSuspendButton = ({
19879
19921
  const SubscriptionSuspendView = props => {
19880
19922
  const {
19881
19923
  subscriptionToSuspend
19882
- } = usePelcro();
19924
+ } = usePelcro$1();
19883
19925
  const {
19884
19926
  t
19885
19927
  } = useTranslation("subscriptionSuspend");
@@ -19972,7 +20014,7 @@ const getCurrentFlow = () => {
19972
20014
  giftRecipient,
19973
20015
  giftCode,
19974
20016
  invoice
19975
- } = usePelcro.getStore();
20017
+ } = usePelcro$1.getStore();
19976
20018
 
19977
20019
  if (invoice) {
19978
20020
  return "invoicePayment";
@@ -19991,7 +20033,7 @@ const getSuccessContent = i18n => {
19991
20033
  const flow = getCurrentFlow();
19992
20034
  const {
19993
20035
  product
19994
- } = usePelcro.getStore();
20036
+ } = usePelcro$1.getStore();
19995
20037
  const wordingDictionary = {
19996
20038
  subscriptionSuccess: {
19997
20039
  successIcon: /*#__PURE__*/React__default.createElement(SvgCheckSolid, {
@@ -20035,7 +20077,7 @@ function PaymentSuccessModal({
20035
20077
  }) {
20036
20078
  const {
20037
20079
  resetView
20038
- } = usePelcro();
20080
+ } = usePelcro$1();
20039
20081
 
20040
20082
  const onClose = () => {
20041
20083
  var _props$onClose;
@@ -20068,7 +20110,7 @@ function NewsletterWithHook(props) {
20068
20110
  switchView,
20069
20111
  resetView,
20070
20112
  product
20071
- } = usePelcro();
20113
+ } = usePelcro$1();
20072
20114
  return /*#__PURE__*/React__default.createElement(NewsLetter, {
20073
20115
  onClose: () => {
20074
20116
  var _props$onClose;
@@ -20567,7 +20609,7 @@ const MeterView = () => {
20567
20609
  switchView,
20568
20610
  product,
20569
20611
  isAuthenticated
20570
- } = usePelcro();
20612
+ } = usePelcro$1();
20571
20613
  const paywallProduct = product !== null && product !== void 0 ? product : window.Pelcro.paywall.getProduct();
20572
20614
  const visitsLeft = window.Pelcro.paywall.freeVisitsLeft();
20573
20615
  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 +20631,7 @@ const MeterView = () => {
20589
20631
  const MeterModal = props => {
20590
20632
  const {
20591
20633
  resetView
20592
- } = usePelcro();
20634
+ } = usePelcro$1();
20593
20635
  useEffect(() => {
20594
20636
  var _props$onDisplay;
20595
20637
 
@@ -20627,7 +20669,7 @@ const SubscriptionCreateView = ({
20627
20669
  const {
20628
20670
  product,
20629
20671
  plan
20630
- } = usePelcro();
20672
+ } = usePelcro$1();
20631
20673
  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
20674
  const showSubscriptionButton = skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0;
20633
20675
 
@@ -20685,7 +20727,7 @@ function SubscriptionCreateModal({
20685
20727
  useTranslation("common");
20686
20728
  const {
20687
20729
  switchView
20688
- } = usePelcro();
20730
+ } = usePelcro$1();
20689
20731
 
20690
20732
  const onSuccess = res => {
20691
20733
  var _otherProps$onSuccess;
@@ -20731,7 +20773,7 @@ const SubscriptionManageMembersContainer = ({
20731
20773
  }) => {
20732
20774
  const {
20733
20775
  subscriptionToManageMembers
20734
- } = usePelcro();
20776
+ } = usePelcro$1();
20735
20777
  const subscription_id = subscriptionToManageMembers === null || subscriptionToManageMembers === void 0 ? void 0 : subscriptionToManageMembers.id;
20736
20778
 
20737
20779
  const handleListMembers = ({}, dispatch) => {
@@ -21026,8 +21068,8 @@ function SubscriptionManageMembersList(props) {
21026
21068
  return {
21027
21069
  title: sub.status,
21028
21070
  content: sub.status,
21029
- textColor: "plc-text-orange-700",
21030
- bgColor: "plc-bg-orange-100",
21071
+ textColor: "plc-text-yellow-500",
21072
+ bgColor: "plc-bg-yellow-100",
21031
21073
  icon: /*#__PURE__*/React__default.createElement(SvgExclamation, null)
21032
21074
  };
21033
21075
  }
@@ -21083,7 +21125,8 @@ function SubscriptionManageMembersList(props) {
21083
21125
  key: member.id,
21084
21126
  className: `plc-w-full plc-align-middle plc-cursor-pointer accordion-header hover:plc-bg-gray-50 plc-text-center`
21085
21127
  }, /*#__PURE__*/React__default.createElement("td", {
21086
- className: "plc-truncate"
21128
+ className: "plc-truncate plc-text-left",
21129
+ title: member === null || member === void 0 ? void 0 : member.invitation_email
21087
21130
  }, /*#__PURE__*/React__default.createElement("span", {
21088
21131
  className: "plc-font-semibold plc-text-gray-500"
21089
21132
  }, member === null || member === void 0 ? void 0 : member.invitation_email)), /*#__PURE__*/React__default.createElement("td", {
@@ -21137,8 +21180,10 @@ function SubscriptionManageMembersView(props) {
21137
21180
  className: "plc-flex-shrink-0 plc-p-2 plc-text-xs plc-text-gray-400 plc-uppercase"
21138
21181
  }, t("labels.listOfMembers")), /*#__PURE__*/React__default.createElement("hr", {
21139
21182
  className: "plc-w-full plc-border-gray-300"
21140
- })), /*#__PURE__*/React__default.createElement("table", {
21141
- className: "plc-w-full plc-table-fixed"
21183
+ })), /*#__PURE__*/React__default.createElement("div", {
21184
+ className: "plc-max-h-48 plc-overflow-x-hidden plc-overflow-y-auto"
21185
+ }, /*#__PURE__*/React__default.createElement("table", {
21186
+ className: "plc-w-full plc-table-fixed plc-text-center plc-p-2 plc-m-1"
21142
21187
  }, /*#__PURE__*/React__default.createElement("thead", {
21143
21188
  className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
21144
21189
  }, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
@@ -21147,7 +21192,7 @@ function SubscriptionManageMembersView(props) {
21147
21192
  className: "plc-w-3/12 "
21148
21193
  }, t("labels.status")), /*#__PURE__*/React__default.createElement("th", {
21149
21194
  className: "plc-w-3/12 "
21150
- }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null)))))));
21195
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersList, null))))))));
21151
21196
  }
21152
21197
 
21153
21198
  /**
@@ -21176,7 +21221,7 @@ function SubscriptionManageMembersModal({
21176
21221
  }
21177
21222
  SubscriptionManageMembersModal.viewId = "manage-members";
21178
21223
 
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;
21224
+ 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
21225
  const initialState$f = {
21181
21226
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
21182
21227
  emailError: null,
@@ -21184,10 +21229,12 @@ const initialState$f = {
21184
21229
  firstNameError: null,
21185
21230
  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
21231
  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,
21232
+ username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
21233
+ usernameError: null,
21234
+ displayName: (_window$Pelcro$user$r5 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.display_name,
21235
+ phone: (_window$Pelcro$user$r6 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r6 === void 0 ? void 0 : _window$Pelcro$user$r6.phone,
21189
21236
  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,
21237
+ tin: (_window$Pelcro$user$r7 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.tin,
21191
21238
  buttonDisabled: false,
21192
21239
  textFields: {},
21193
21240
  alert: {
@@ -21218,26 +21265,29 @@ const UserUpdateContainer = ({
21218
21265
  }, []);
21219
21266
 
21220
21267
  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;
21268
+ 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
21269
 
21223
21270
  const fields = [{
21224
21271
  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
21272
+ payload: (_window$Pelcro$user$r8 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r8 === void 0 ? void 0 : _window$Pelcro$user$r8.email
21226
21273
  }, {
21227
21274
  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
21275
+ 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
21276
  }, {
21230
21277
  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
21278
+ payload: (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.last_name
21279
+ }, {
21280
+ type: SET_USERNAME,
21281
+ payload: (_window$Pelcro$user$r11 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r11 === void 0 ? void 0 : _window$Pelcro$user$r11.username
21232
21282
  }, {
21233
21283
  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
21284
+ 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
21285
  }, {
21236
21286
  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
21287
+ payload: (_window$Pelcro$user$r13 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r13 === void 0 ? void 0 : _window$Pelcro$user$r13.phone
21238
21288
  }, {
21239
21289
  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
21290
+ payload: (_window$Pelcro$user$r14 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r14 === void 0 ? void 0 : _window$Pelcro$user$r14.tin
21241
21291
  }];
21242
21292
  fields.filter(field => Boolean(field.payload)).forEach(field => {
21243
21293
  dispatch(field);
@@ -21248,6 +21298,7 @@ const UserUpdateContainer = ({
21248
21298
  email,
21249
21299
  firstName,
21250
21300
  lastName,
21301
+ username,
21251
21302
  phone,
21252
21303
  tin,
21253
21304
  textFields,
@@ -21258,6 +21309,9 @@ const UserUpdateContainer = ({
21258
21309
  email: email,
21259
21310
  first_name: firstName,
21260
21311
  last_name: lastName,
21312
+ ...(username && {
21313
+ username
21314
+ }),
21261
21315
  display_name: displayName,
21262
21316
  phone: phone,
21263
21317
  tin: tin,
@@ -21343,6 +21397,18 @@ const UserUpdateContainer = ({
21343
21397
  lastName: ""
21344
21398
  });
21345
21399
 
21400
+ case SET_USERNAME:
21401
+ return lib_7({ ...state,
21402
+ username: action.payload,
21403
+ usernameError: null
21404
+ });
21405
+
21406
+ case SET_USERNAME_ERROR:
21407
+ return lib_7({ ...state,
21408
+ usernameError: action.payload,
21409
+ username: ""
21410
+ });
21411
+
21346
21412
  case SET_PHONE:
21347
21413
  return lib_7({ ...state,
21348
21414
  phone: action.payload,
@@ -21388,10 +21454,14 @@ const UserUpdateContainer = ({
21388
21454
  state,
21389
21455
  dispatch
21390
21456
  }
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, {
21457
+ }, children.length ? children.map((child, i) => {
21458
+ if (child) {
21459
+ return /*#__PURE__*/React__default.cloneElement(child, {
21460
+ store: store$f,
21461
+ key: i
21462
+ });
21463
+ }
21464
+ }) : /*#__PURE__*/React__default.cloneElement(children, {
21395
21465
  store: store$f
21396
21466
  })));
21397
21467
  };
@@ -21499,6 +21569,84 @@ const UserUpdateButton = ({
21499
21569
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.submit"));
21500
21570
  };
21501
21571
 
21572
+ function UpdateUserNameInput({
21573
+ initWithUserName = true,
21574
+ store,
21575
+ ...otherProps
21576
+ }) {
21577
+ const {
21578
+ t
21579
+ } = useTranslation("common");
21580
+ const {
21581
+ dispatch,
21582
+ state: {
21583
+ username: stateUsername,
21584
+ usernameError
21585
+ }
21586
+ } = useContext(store);
21587
+ const [username, setUsername] = useState(stateUsername);
21588
+ const [finishedTyping, setFinishedTyping] = useState(false);
21589
+ const handleInputChange = useCallback(value => {
21590
+ setUsername(value);
21591
+
21592
+ if (finishedTyping) {
21593
+ if (username !== null && username !== void 0 && username.length) {
21594
+ dispatch({
21595
+ type: SET_USERNAME,
21596
+ payload: username
21597
+ });
21598
+ } else {
21599
+ if (otherProps.required) {
21600
+ dispatch({
21601
+ type: SET_USERNAME_ERROR,
21602
+ payload: t("validation.enterUsername")
21603
+ });
21604
+ } else {
21605
+ dispatch({
21606
+ type: SET_USERNAME,
21607
+ payload: username
21608
+ });
21609
+ }
21610
+ }
21611
+ }
21612
+ }, [dispatch, username, finishedTyping]);
21613
+ useEffect(() => {
21614
+ handleInputChange(username);
21615
+ }, [finishedTyping, username, handleInputChange]); // Initialize username field with user's username
21616
+
21617
+ const loadFirstNameIntoField = () => {
21618
+ handleInputChange(window.Pelcro.user.read().username);
21619
+ dispatch({
21620
+ type: SET_USERNAME,
21621
+ payload: window.Pelcro.user.read().username
21622
+ });
21623
+ };
21624
+
21625
+ useEffect(() => {
21626
+ if (initWithUserName) {
21627
+ document.addEventListener("PelcroUserLoaded", () => {
21628
+ loadFirstNameIntoField();
21629
+ });
21630
+ loadFirstNameIntoField();
21631
+ return () => {
21632
+ document.removeEventListener("PelcroUserLoaded", handleInputChange);
21633
+ };
21634
+ }
21635
+ }, []);
21636
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21637
+ type: "text",
21638
+ error: usernameError,
21639
+ value: username,
21640
+ onChange: e => handleInputChange(e.target.value),
21641
+ onBlur: () => setFinishedTyping(true),
21642
+ onFocus: () => setFinishedTyping(false)
21643
+ }, otherProps));
21644
+ }
21645
+
21646
+ const UserUpdateUsername = props => /*#__PURE__*/React__default.createElement(UpdateUserNameInput, Object.assign({
21647
+ store: store$f
21648
+ }, props));
21649
+
21502
21650
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
21503
21651
  store: store$f
21504
21652
  }, props));
@@ -21598,13 +21746,45 @@ const UserUpdateTin = props => /*#__PURE__*/React__default.createElement(Tin, Ob
21598
21746
  store: store$f
21599
21747
  }, props));
21600
21748
 
21749
+ function DisplayName({
21750
+ store,
21751
+ ...otherProps
21752
+ }) {
21753
+ const {
21754
+ dispatch,
21755
+ state
21756
+ } = useContext(store);
21757
+
21758
+ const handleInputChange = value => {
21759
+ dispatch({
21760
+ type: SET_DISPLAY_NAME,
21761
+ payload: value
21762
+ });
21763
+ };
21764
+
21765
+ if (state.loading) {
21766
+ return /*#__PURE__*/React__default.createElement(Loader, null);
21767
+ }
21768
+
21769
+ return /*#__PURE__*/React__default.createElement(Input, Object.assign({
21770
+ type: "text",
21771
+ value: state.displayName || null,
21772
+ onChange: e => handleInputChange(e.target.value)
21773
+ }, otherProps));
21774
+ }
21775
+
21776
+ const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
21777
+ store: store$f
21778
+ }, props));
21779
+
21601
21780
  const UserUpdateView = props => {
21602
- var _window$Pelcro$site$r;
21781
+ var _window$Pelcro$site$r, _window$Pelcro, _window$Pelcro$uiSett;
21603
21782
 
21604
21783
  const {
21605
21784
  t
21606
21785
  } = useTranslation("userEdit");
21607
21786
  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);
21787
+ 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
21788
  return /*#__PURE__*/React__default.createElement("div", {
21609
21789
  id: "pelcro-user-update-view"
21610
21790
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -21632,7 +21812,17 @@ const UserUpdateView = props => {
21632
21812
  errorId: "pelcro-input-last-name-error",
21633
21813
  label: t("labels.lastName"),
21634
21814
  required: supportsTap ? true : false
21635
- })), /*#__PURE__*/React__default.createElement("div", {
21815
+ })), /*#__PURE__*/React__default.createElement(UserUpdateDisplayName, {
21816
+ id: "pelcro-input-display-name",
21817
+ autoComplete: "display-name",
21818
+ errorId: "pelcro-input-display-name-error",
21819
+ label: t("labels.displayname")
21820
+ }), showUsernameInput && /*#__PURE__*/React__default.createElement(UserUpdateUsername, {
21821
+ id: "pelcro-input-user-name",
21822
+ autoComplete: "user-name",
21823
+ errorId: "pelcro-input-user-name-error",
21824
+ label: t("labels.username")
21825
+ }), /*#__PURE__*/React__default.createElement("div", {
21636
21826
  className: "plc-flex plc-items-start"
21637
21827
  }, /*#__PURE__*/React__default.createElement(UserUpdatePhone, {
21638
21828
  id: "pelcro-input-phone",
@@ -21663,7 +21853,7 @@ function UserUpdateModal({
21663
21853
  }) {
21664
21854
  const {
21665
21855
  switchView
21666
- } = usePelcro();
21856
+ } = usePelcro$1();
21667
21857
 
21668
21858
  const onPictureClick = () => {
21669
21859
  switchView("profile-picture");
@@ -21679,37 +21869,6 @@ function UserUpdateModal({
21679
21869
  }
21680
21870
  UserUpdateModal.viewId = "user-edit";
21681
21871
 
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
21872
  const UserUpdateTextInput = props => {
21714
21873
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
21715
21874
  store: store$f
@@ -21772,7 +21931,7 @@ const AddressCreateContainer = ({
21772
21931
  order,
21773
21932
  set,
21774
21933
  selectedMembership
21775
- } = usePelcro();
21934
+ } = usePelcro$1();
21776
21935
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
21777
21936
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
21778
21937
  useEffect(() => {
@@ -21877,7 +22036,7 @@ const AddressCreateContainer = ({
21877
22036
  return onFailure(err);
21878
22037
  }
21879
22038
 
21880
- notify.success(t("messages.addressUpdated"));
22039
+ notify$1.success(t("messages.addressUpdated"));
21881
22040
  return onMembershipAdressUpdateSuccess(res);
21882
22041
  });
21883
22042
  }
@@ -22529,7 +22688,7 @@ const AddressCreateModal = ({
22529
22688
  switchView,
22530
22689
  switchToPaymentView,
22531
22690
  resetView
22532
- } = usePelcro();
22691
+ } = usePelcro$1();
22533
22692
 
22534
22693
  const onSuccess = newAddressId => {
22535
22694
  var _otherProps$onSuccess;
@@ -22622,7 +22781,7 @@ const AddressUpdateContainer = ({
22622
22781
 
22623
22782
  const {
22624
22783
  addressIdToEdit
22625
- } = usePelcro();
22784
+ } = usePelcro$1();
22626
22785
  const addressId = (_props$addressId = props === null || props === void 0 ? void 0 : props.addressId) !== null && _props$addressId !== void 0 ? _props$addressId : addressIdToEdit;
22627
22786
  const [t] = useTranslation("address");
22628
22787
  useEffect(() => {
@@ -23713,7 +23872,7 @@ const PasswordForgotModal = ({
23713
23872
  } = useTranslation("passwordForgot");
23714
23873
  const {
23715
23874
  switchView
23716
- } = usePelcro();
23875
+ } = usePelcro$1();
23717
23876
  return /*#__PURE__*/React__default.createElement(Modal, {
23718
23877
  id: "pelcro-password-forgot-modal",
23719
23878
  onDisplay: onDisplay,
@@ -24298,7 +24457,7 @@ const CartContainer = ({
24298
24457
  const {
24299
24458
  cartItems,
24300
24459
  set
24301
- } = usePelcro();
24460
+ } = usePelcro$1();
24302
24461
  const {
24303
24462
  t
24304
24463
  } = useTranslation("shop");
@@ -24403,7 +24562,7 @@ const CartRemoveItemButton = ({
24403
24562
  }) => {
24404
24563
  const {
24405
24564
  removeFromCart
24406
- } = usePelcro();
24565
+ } = usePelcro$1();
24407
24566
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
24408
24567
  variant: "icon",
24409
24568
  "data-key": itemId,
@@ -24466,7 +24625,7 @@ const CartTotalPrice = () => {
24466
24625
  } = useContext(store$8);
24467
24626
  const {
24468
24627
  cartItems
24469
- } = usePelcro();
24628
+ } = usePelcro$1();
24470
24629
  const totalPriceCurrency = cartItems[0].currency;
24471
24630
  const {
24472
24631
  t
@@ -24486,7 +24645,7 @@ const CartTotalPrice = () => {
24486
24645
  const CartView = props => {
24487
24646
  const {
24488
24647
  cartItems
24489
- } = usePelcro();
24648
+ } = usePelcro$1();
24490
24649
  const {
24491
24650
  t
24492
24651
  } = useTranslation("cart");
@@ -24547,7 +24706,7 @@ const CartModal = ({
24547
24706
  switchView,
24548
24707
  switchToAddressView,
24549
24708
  isAuthenticated
24550
- } = usePelcro();
24709
+ } = usePelcro$1();
24551
24710
 
24552
24711
  const onSuccess = items => {
24553
24712
  var _otherProps$onSuccess;
@@ -24579,7 +24738,7 @@ const ShopSelectProductButton = ({
24579
24738
  }) => {
24580
24739
  const {
24581
24740
  addToCart
24582
- } = usePelcro();
24741
+ } = usePelcro$1();
24583
24742
  const {
24584
24743
  t
24585
24744
  } = useTranslation("shop");
@@ -24611,7 +24770,7 @@ const ShopPurchaseButton = ({
24611
24770
  }) => {
24612
24771
  const {
24613
24772
  purchaseItem
24614
- } = usePelcro();
24773
+ } = usePelcro$1();
24615
24774
  const {
24616
24775
  t
24617
24776
  } = useTranslation("shop");
@@ -24647,7 +24806,7 @@ const ShopView = () => {
24647
24806
  className: "plc-mt-2"
24648
24807
  }), /*#__PURE__*/React__default.createElement(ShopPurchaseButton, {
24649
24808
  itemId: item.id,
24650
- className: "plc-mt-2"
24809
+ className: "plc-mt-2 pelcro-purchase-button"
24651
24810
  })));
24652
24811
  })));
24653
24812
  };
@@ -24687,7 +24846,7 @@ const OrderCreateModal = ({
24687
24846
  }) => {
24688
24847
  const {
24689
24848
  switchView
24690
- } = usePelcro();
24849
+ } = usePelcro$1();
24691
24850
 
24692
24851
  const onSuccess = () => {
24693
24852
  var _otherProps$onSuccess;
@@ -24717,7 +24876,7 @@ const OrderConfirmModal = props => {
24717
24876
  } = useTranslation("shop");
24718
24877
  const {
24719
24878
  resetView
24720
- } = usePelcro();
24879
+ } = usePelcro$1();
24721
24880
 
24722
24881
  const onClose = () => {
24723
24882
  var _props$onClose;
@@ -24809,7 +24968,7 @@ const GiftCreateContainer = ({
24809
24968
  } = useTranslation("register");
24810
24969
  const {
24811
24970
  set
24812
- } = usePelcro();
24971
+ } = usePelcro$1();
24813
24972
 
24814
24973
  const handleSubmit = (state, dispatch) => {
24815
24974
  const giftRecipient = {
@@ -25101,7 +25260,7 @@ const GiftCreateModal = ({
25101
25260
  switchToAddressView,
25102
25261
  switchToPaymentView,
25103
25262
  product
25104
- } = usePelcro();
25263
+ } = usePelcro$1();
25105
25264
 
25106
25265
  const onSuccess = giftRecipient => {
25107
25266
  var _otherProps$onSuccess;
@@ -25129,6 +25288,7 @@ const GiftCreateModal = ({
25129
25288
  GiftCreateModal.viewId = "gift-create";
25130
25289
 
25131
25290
  const initialState$6 = {
25291
+ isSubmitting: false,
25132
25292
  giftCode: "",
25133
25293
  buttonDisabled: true,
25134
25294
  alert: {
@@ -25147,14 +25307,24 @@ const GiftRedeemContainer = ({
25147
25307
  onSuccess = () => {},
25148
25308
  onFailure = () => {},
25149
25309
  onDisplay = () => {},
25150
- children
25310
+ children,
25311
+ ...props
25151
25312
  }) => {
25313
+ var _ref, _props$subscriptionId;
25314
+
25152
25315
  const {
25153
25316
  t
25154
25317
  } = useTranslation("register");
25155
25318
  const {
25156
25319
  set
25157
- } = usePelcro();
25320
+ } = usePelcro$1();
25321
+ const {
25322
+ switchView,
25323
+ switchToAddressView,
25324
+ isAuthenticated,
25325
+ subscriptionIdToRenew: subscriptionIdToRenewFromStore
25326
+ } = usePelcro$1();
25327
+ const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25158
25328
  useEffect(() => {
25159
25329
  onDisplay();
25160
25330
  }, []);
@@ -25175,7 +25345,41 @@ const GiftRedeemContainer = ({
25175
25345
  set({
25176
25346
  giftCode
25177
25347
  });
25178
- onSuccess(giftCode);
25348
+
25349
+ if (!isAuthenticated()) {
25350
+ switchView("register");
25351
+ } else {
25352
+ console.log("Shaker");
25353
+ window.Pelcro.subscription.redeemGift({
25354
+ auth_token: window.Pelcro.user.read().auth_token,
25355
+ gift_code: giftCode,
25356
+ // redeem gift as a future phase of an existing subscription
25357
+ subscription_id: subscriptionIdToRenew
25358
+ }, (err, res) => {
25359
+ dispatch({
25360
+ type: LOADING,
25361
+ payload: false
25362
+ });
25363
+
25364
+ if (err) {
25365
+ dispatch({
25366
+ type: SHOW_ALERT,
25367
+ payload: {
25368
+ type: "error",
25369
+ content: getErrorMessages(err)
25370
+ }
25371
+ });
25372
+
25373
+ if (getErrorMessages(err) === "Address ID is required") {
25374
+ switchToAddressView();
25375
+ } else {
25376
+ return onFailure(err);
25377
+ }
25378
+ } else {
25379
+ return onSuccess(giftCode);
25380
+ }
25381
+ });
25382
+ }
25179
25383
  }
25180
25384
  };
25181
25385
 
@@ -25196,8 +25400,14 @@ const GiftRedeemContainer = ({
25196
25400
  buttonDisabled: action.payload
25197
25401
  });
25198
25402
 
25403
+ case LOADING:
25404
+ return lib_7({ ...state,
25405
+ isSubmitting: action.payload
25406
+ });
25407
+
25199
25408
  case HANDLE_SUBMIT:
25200
25409
  return lib_5({ ...state,
25410
+ isSubmitting: true,
25201
25411
  buttonDisabled: true
25202
25412
  }, (state, dispatch) => handleRedeem(state, dispatch));
25203
25413
 
@@ -25266,7 +25476,8 @@ const GiftRedeemSubmitButton = ({
25266
25476
  const {
25267
25477
  dispatch,
25268
25478
  state: {
25269
- disableSubmit
25479
+ disableSubmit,
25480
+ isSubmitting
25270
25481
  }
25271
25482
  } = useContext(store$6);
25272
25483
  const {
@@ -25279,7 +25490,8 @@ const GiftRedeemSubmitButton = ({
25279
25490
  });
25280
25491
  onClick === null || onClick === void 0 ? void 0 : onClick();
25281
25492
  },
25282
- disabled: disableSubmit
25493
+ disabled: disableSubmit,
25494
+ isLoading: isSubmitting
25283
25495
  }, otherProps), name !== null && name !== void 0 ? name : t("redeem.buttons.redeem"));
25284
25496
  };
25285
25497
 
@@ -25324,18 +25536,13 @@ const GiftRedeemModal = ({
25324
25536
  switchView,
25325
25537
  switchToAddressView,
25326
25538
  isAuthenticated
25327
- } = usePelcro();
25539
+ } = usePelcro$1();
25328
25540
 
25329
25541
  const onSuccess = giftCode => {
25330
25542
  var _otherProps$onSuccess;
25331
25543
 
25332
25544
  (_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
- }
25545
+ switchView("subscription-success");
25339
25546
  };
25340
25547
 
25341
25548
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -25396,7 +25603,7 @@ const AddressSelectContainer = ({
25396
25603
  subscriptionIdToRenew: subscriptionIdToRenewFromStore,
25397
25604
  set,
25398
25605
  selectedMembership
25399
- } = usePelcro();
25606
+ } = usePelcro$1();
25400
25607
  const giftCode = (_props$giftCode = props.giftCode) !== null && _props$giftCode !== void 0 ? _props$giftCode : giftCodeFromStore;
25401
25608
  const subscriptionIdToRenew = (_ref = (_props$subscriptionId = props.subscriptionIdToRenew) !== null && _props$subscriptionId !== void 0 ? _props$subscriptionId : subscriptionIdToRenewFromStore) !== null && _ref !== void 0 ? _ref : undefined;
25402
25609
 
@@ -25433,7 +25640,7 @@ const AddressSelectContainer = ({
25433
25640
  return onFailure(err);
25434
25641
  }
25435
25642
 
25436
- notify.success(t("messages.addressUpdated"));
25643
+ notify$1.success(t("messages.addressUpdated"));
25437
25644
  return onMembershipAdressUpdateSuccess(res);
25438
25645
  });
25439
25646
  }
@@ -25638,7 +25845,7 @@ const AddressSelectModal = ({
25638
25845
  switchView,
25639
25846
  switchToPaymentView,
25640
25847
  resetView
25641
- } = usePelcro();
25848
+ } = usePelcro$1();
25642
25849
 
25643
25850
  const onSuccess = selectedAddressId => {
25644
25851
  var _otherProps$onSuccess;
@@ -25716,7 +25923,7 @@ const PaymentMethodSelectContainer = ({
25716
25923
  const {
25717
25924
  set,
25718
25925
  selectedPaymentMethodId: selectedPaymentMethodIdFromStore
25719
- } = usePelcro();
25926
+ } = usePelcro$1();
25720
25927
 
25721
25928
  const submitPaymentMethod = ({
25722
25929
  selectedPaymentMethodId
@@ -25899,7 +26106,7 @@ const PaymentMethodSelectModal = ({
25899
26106
  switchToCheckoutForm,
25900
26107
  set,
25901
26108
  plan
25902
- } = usePelcro();
26109
+ } = usePelcro$1();
25903
26110
  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
26111
  useEffect(() => {
25905
26112
  if (skipPayment && (plan === null || plan === void 0 ? void 0 : plan.amount) === 0) {
@@ -27207,7 +27414,7 @@ const SavedItems = ({
27207
27414
  const [isLoading, setLoading] = useState(false);
27208
27415
  const {
27209
27416
  isAuthenticated
27210
- } = usePelcro();
27417
+ } = usePelcro$1();
27211
27418
 
27212
27419
  const removeItemFromMetadata = (category, title) => {
27213
27420
  const user = window.Pelcro.user.read();
@@ -27406,7 +27613,7 @@ const SubscriptionsItems = ({
27406
27613
  setSubscriptionToCancel,
27407
27614
  setSubscriptionToSuspend,
27408
27615
  set
27409
- } = usePelcro();
27616
+ } = usePelcro$1();
27410
27617
  const subs = getNonDonationSubs();
27411
27618
  if (subs.length === 0) return null;
27412
27619
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
@@ -27427,7 +27634,7 @@ const SubscriptionsItems = ({
27427
27634
  }
27428
27635
 
27429
27636
  onClose === null || onClose === void 0 ? void 0 : onClose();
27430
- notify.confirm((onSuccess, onFailure) => {
27637
+ notify$1.confirm((onSuccess, onFailure) => {
27431
27638
  cancelSubscription(sub.id, onSuccess, onFailure);
27432
27639
  }, {
27433
27640
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
@@ -27485,7 +27692,7 @@ const SubscriptionsItems = ({
27485
27692
  }
27486
27693
 
27487
27694
  onClose === null || onClose === void 0 ? void 0 : onClose();
27488
- notify.confirm((onSuccess, onFailure) => {
27695
+ notify$1.confirm((onSuccess, onFailure) => {
27489
27696
  unSuspendSubscription(sub.id, onSuccess, onFailure);
27490
27697
  }, {
27491
27698
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
@@ -27931,11 +28138,56 @@ function SvgQrcode(props) {
27931
28138
  })));
27932
28139
  }
27933
28140
 
27934
- const DonationsMenu = () => {
28141
+ const DonationsMenu = ({
28142
+ reactivateSubscription,
28143
+ disableSubmit,
28144
+ cancelSubscription
28145
+ }) => {
27935
28146
  const {
27936
28147
  t
27937
28148
  } = useTranslation("dashboard");
28149
+ const {
28150
+ switchView,
28151
+ setSubscriptionToCancel
28152
+ } = usePelcro$1();
27938
28153
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
28154
+ // Cancel button click handlers
28155
+ const onCancelClick = () => {
28156
+ var _onClose;
28157
+
28158
+ const isImmediateCancelationEnabled = window.Pelcro.site.read().cancel_settings.status;
28159
+
28160
+ if (isImmediateCancelationEnabled) {
28161
+ setSubscriptionToCancel(sub.id);
28162
+ return switchView("subscription-cancel");
28163
+ }
28164
+
28165
+ if (userMustVerifyEmail()) {
28166
+ return switchView("email-verify");
28167
+ }
28168
+
28169
+ (_onClose = onClose) === null || _onClose === void 0 ? void 0 : _onClose();
28170
+ notify.confirm((onSuccess, onFailure) => {
28171
+ cancelSubscription(sub.id, onSuccess, onFailure);
28172
+ }, {
28173
+ confirmMessage: t("messages.subCancellation.isSureToCancel"),
28174
+ loadingMessage: t("messages.subCancellation.loading"),
28175
+ successMessage: t("messages.subCancellation.success"),
28176
+ errorMessage: t("messages.subCancellation.error")
28177
+ }, {
28178
+ closeButtonLabel: t("labels.subCancellation.goBack")
28179
+ });
28180
+ }; // Reactivate button click handlers
28181
+
28182
+
28183
+ const onReactivateClick = () => {
28184
+ if (userMustVerifyEmail()) {
28185
+ return switchView("email-verify");
28186
+ }
28187
+
28188
+ reactivateSubscription(sub.id);
28189
+ };
28190
+
27939
28191
  return /*#__PURE__*/React__default.createElement("tr", {
27940
28192
  key: sub.id,
27941
28193
  className: "plc-w-full plc-align-top pelcro-donation-row"
@@ -27947,7 +28199,21 @@ const DonationsMenu = () => {
27947
28199
  className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
27948
28200
  }, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default.createElement("td", null, /*#__PURE__*/React__default.createElement("div", {
27949
28201
  className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
27950
- }, sub.status && /*#__PURE__*/React__default.createElement("span", null, formatStartDate(sub.start)))));
28202
+ }, 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, {
28203
+ variant: "ghost",
28204
+ className: "plc-text-green-400 focus:plc-ring-green-300 pelcro-dashboard-sub-reactivate-button",
28205
+ icon: /*#__PURE__*/React__default.createElement(SvgRefresh, null),
28206
+ onClick: onReactivateClick,
28207
+ disabled: disableSubmit,
28208
+ "data-key": sub.id
28209
+ }, t("labels.reactivate")), !sub.plan.auto_renew || sub.plan.auto_renew && sub.cancel_at_period_end === 0 ? /*#__PURE__*/React__default.createElement(Button, {
28210
+ variant: "ghost",
28211
+ className: "plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
28212
+ icon: /*#__PURE__*/React__default.createElement(SvgXIconSolid, null),
28213
+ onClick: onCancelClick,
28214
+ disabled: disableSubmit,
28215
+ "data-key": sub.id
28216
+ }, t("labels.unsubscribe")) : ""));
27951
28217
  });
27952
28218
  return /*#__PURE__*/React__default.createElement("table", {
27953
28219
  className: "plc-w-full plc-table-fixed pelcro-donations-table"
@@ -27957,7 +28223,9 @@ const DonationsMenu = () => {
27957
28223
  className: "plc-w-6/12 "
27958
28224
  }, t("labels.plan")), /*#__PURE__*/React__default.createElement("th", {
27959
28225
  className: "plc-w-6/12 "
27960
- }, t("labels.startDate")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
28226
+ }, t("labels.startDate")), /*#__PURE__*/React__default.createElement("th", {
28227
+ className: "plc-w-3/12 "
28228
+ }, t("labels.actions")))), /*#__PURE__*/React__default.createElement("tbody", null, /*#__PURE__*/React__default.createElement("tr", {
27961
28229
  className: "plc-h-4"
27962
28230
  }), subscriptions));
27963
28231
  };
@@ -28003,7 +28271,7 @@ const InvoicesItems = () => {
28003
28271
  const {
28004
28272
  setInvoice,
28005
28273
  switchView
28006
- } = usePelcro();
28274
+ } = usePelcro$1();
28007
28275
  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
28276
 
28009
28277
  const showInvoiceDetails = event => {
@@ -28134,7 +28402,7 @@ const MembershipsItems = () => {
28134
28402
  switchView,
28135
28403
  setSelectedMembership,
28136
28404
  switchToAddressView
28137
- } = usePelcro();
28405
+ } = usePelcro$1();
28138
28406
  const memberships = getActiveMemberships();
28139
28407
 
28140
28408
  const onChangeAddressClick = membershipId => {
@@ -28214,7 +28482,7 @@ function DashboardWithHook(props) {
28214
28482
  resetView,
28215
28483
  logout,
28216
28484
  set
28217
- } = usePelcro();
28485
+ } = usePelcro$1();
28218
28486
  return /*#__PURE__*/React__default.createElement(DashboardWithTrans, {
28219
28487
  setAddress: addressIdToEdit => set({
28220
28488
  addressIdToEdit
@@ -28790,7 +29058,11 @@ class Dashboard extends Component {
28790
29058
  className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
28791
29059
  }),
28792
29060
  title: this.locale("labels.donations"),
28793
- content: /*#__PURE__*/React__default.createElement(DonationsMenu, null)
29061
+ content: /*#__PURE__*/React__default.createElement(DonationsMenu, {
29062
+ reactivateSubscription: this.reactivateSubscription,
29063
+ disableSubmit: this.state.disableSubmit,
29064
+ cancelSubscription: this.cancelSubscription
29065
+ })
28794
29066
  }), /*#__PURE__*/React__default.createElement(Accordion.item, {
28795
29067
  name: SUB_MENUS.GIFTS,
28796
29068
  icon: /*#__PURE__*/React__default.createElement(SvgGift, null),
@@ -28850,7 +29122,7 @@ const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
28850
29122
  const DashboardOpenButton = () => {
28851
29123
  const {
28852
29124
  switchView
28853
- } = usePelcro();
29125
+ } = usePelcro$1();
28854
29126
  return /*#__PURE__*/React__default.createElement("div", {
28855
29127
  className: "plc-fixed plc-right-4 plc-bottom-4 pelcro-open-dashboard-btn"
28856
29128
  }, /*#__PURE__*/React__default.createElement("button", {
@@ -30839,11 +31111,34 @@ const EmailVerifyModal = ({
30839
31111
  onClose,
30840
31112
  ...otherProps
30841
31113
  }) => {
31114
+ const {
31115
+ product,
31116
+ plan,
31117
+ switchToAddressView,
31118
+ switchToPaymentView
31119
+ } = usePelcro();
31120
+
31121
+ const onSuccess = res => {
31122
+ var _props$onSuccess, _props;
31123
+
31124
+ (_props$onSuccess = (_props = props).onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(_props, res);
31125
+
31126
+ if (product) {
31127
+ if (product.address_required) {
31128
+ return switchToAddressView();
31129
+ } else {
31130
+ return switchToPaymentView();
31131
+ }
31132
+ }
31133
+ };
31134
+
30842
31135
  return /*#__PURE__*/React__default.createElement(Modal, {
30843
31136
  onDisplay: onDisplay,
30844
31137
  onClose: onClose,
30845
31138
  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)));
31139
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, Object.assign({
31140
+ onSuccess: onSuccess
31141
+ }, otherProps))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
30847
31142
  };
30848
31143
  EmailVerifyModal.viewId = "email-verify";
30849
31144
 
@@ -30991,14 +31286,14 @@ function VerifyLinkTokenModal({
30991
31286
  } = useTranslation("verifyLinkToken");
30992
31287
  const {
30993
31288
  resetView
30994
- } = usePelcro();
31289
+ } = usePelcro$1();
30995
31290
 
30996
31291
  const onSuccess = res => {
30997
31292
  var _props$onSuccess;
30998
31293
 
30999
31294
  (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
31000
31295
  resetView();
31001
- notify.success(t("messages.success"));
31296
+ notify$1.success(t("messages.success"));
31002
31297
  };
31003
31298
 
31004
31299
  return /*#__PURE__*/React__default.createElement(Modal, {
@@ -31041,7 +31336,7 @@ const InvoicePaymentModal = ({
31041
31336
  }) => {
31042
31337
  const {
31043
31338
  switchView
31044
- } = usePelcro();
31339
+ } = usePelcro$1();
31045
31340
 
31046
31341
  const onSuccess = () => {
31047
31342
  var _otherProps$onSuccess;
@@ -31118,7 +31413,7 @@ const InvoiceDetailsDownloadButton = ({
31118
31413
  } = useTranslation("invoiceDetails");
31119
31414
  const {
31120
31415
  invoice
31121
- } = usePelcro();
31416
+ } = usePelcro$1();
31122
31417
  return /*#__PURE__*/React__default.createElement(Link, Object.assign({
31123
31418
  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
31419
  id: "pelcro-download-invoice-link",
@@ -31155,7 +31450,7 @@ const InvoiceDetailsView = props => {
31155
31450
  } = useTranslation("invoiceDetails");
31156
31451
  const {
31157
31452
  invoice
31158
- } = usePelcro();
31453
+ } = usePelcro$1();
31159
31454
  const showPayButton = canPayInvoice(invoice);
31160
31455
  const showDownloadButton = Boolean(invoice === null || invoice === void 0 ? void 0 : invoice.invoice_pdf);
31161
31456
  const hasPlanDetails = Boolean(invoice.plan);
@@ -31223,7 +31518,7 @@ const InvoiceDetailsModal = ({
31223
31518
  }) => {
31224
31519
  const {
31225
31520
  switchToPaymentView
31226
- } = usePelcro();
31521
+ } = usePelcro$1();
31227
31522
 
31228
31523
  const onSuccess = () => {
31229
31524
  var _otherProps$onSuccess;
@@ -32660,4 +32955,4 @@ const QrCodeModal = ({
32660
32955
  };
32661
32956
  QrCodeModal.viewId = "qrcode";
32662
32957
 
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 };
32958
+ 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 };