@pelcro/react-pelcro-js 3.2.0-beta.11 → 3.2.0-beta.14

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
@@ -3214,7 +3214,8 @@ function withTranslation(ns) {
3214
3214
  var validation$1 = {
3215
3215
  validEmail: "le courriel n’est pas valide",
3216
3216
  enterEmail: "Un courriel est requis.",
3217
- enterPassword: "Mot de passe requis."
3217
+ enterPassword: "Mot de passe requis.",
3218
+ confirmPassword: "Confirmer le mot de passe requis."
3218
3219
  };
3219
3220
  var buttons$9 = {
3220
3221
  account: "Accès abonné(e)s",
@@ -3302,7 +3303,8 @@ var common_fr = {
3302
3303
  var validation = {
3303
3304
  validEmail: "Email address is not valid.",
3304
3305
  enterEmail: "Email address is required.",
3305
- enterPassword: "Password is required."
3306
+ enterPassword: "Password is required.",
3307
+ confirmPassword: "Confirm password is required."
3306
3308
  };
3307
3309
  var buttons$8 = {
3308
3310
  account: "My account",
@@ -3431,9 +3433,9 @@ var paymentMethod_fr = {
3431
3433
  select: select
3432
3434
  };
3433
3435
 
3434
- var title$h = "Enter your email to subscribe to our newsletter";
3436
+ var title$f = "Enter your email to subscribe to our newsletter";
3435
3437
  var updateTitle$1 = "Update newsletter selections";
3436
- var subtitle$9 = "We may use your email for other marketing communication";
3438
+ var subtitle$7 = "We may use your email for other marketing communication";
3437
3439
  var labels$p = {
3438
3440
  submit: "Submit",
3439
3441
  firstName: "First name",
@@ -3450,16 +3452,16 @@ var messages$r = {
3450
3452
  here: "here"
3451
3453
  };
3452
3454
  var newsletter_en = {
3453
- title: title$h,
3455
+ title: title$f,
3454
3456
  updateTitle: updateTitle$1,
3455
- subtitle: subtitle$9,
3457
+ subtitle: subtitle$7,
3456
3458
  labels: labels$p,
3457
3459
  messages: messages$r
3458
3460
  };
3459
3461
 
3460
- var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3462
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3463
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
- var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3464
+ var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
3465
  var labels$o = {
3464
3466
  submit: "Lire l’article !",
3465
3467
  firstName: "Prénom",
@@ -3476,9 +3478,9 @@ var messages$q = {
3476
3478
  here: "ici"
3477
3479
  };
3478
3480
  var newsletter_fr = {
3479
- title: title$g,
3481
+ title: title$e,
3480
3482
  updateTitle: updateTitle,
3481
- subtitle: subtitle$8,
3483
+ subtitle: subtitle$6,
3482
3484
  labels: labels$o,
3483
3485
  messages: messages$q
3484
3486
  };
@@ -3735,8 +3737,8 @@ var login_fr = {
3735
3737
  errors: errors$4
3736
3738
  };
3737
3739
 
3738
- var title$f = "Create an account";
3739
- var subtitle$7 = "Enter your email and password below";
3740
+ var title$d = "Create an account";
3741
+ var subtitle$5 = "Enter your email and password below";
3740
3742
  var labels$h = {
3741
3743
  signUpFacebook: "Sign up with Facebook",
3742
3744
  signUpGoogle: "Sign up with Google",
@@ -3821,8 +3823,8 @@ var redeem$1 = {
3821
3823
  }
3822
3824
  };
3823
3825
  var register_en = {
3824
- title: title$f,
3825
- subtitle: subtitle$7,
3826
+ title: title$d,
3827
+ subtitle: subtitle$5,
3826
3828
  labels: labels$h,
3827
3829
  messages: messages$h,
3828
3830
  errors: errors$3,
@@ -3830,8 +3832,8 @@ var register_en = {
3830
3832
  redeem: redeem$1
3831
3833
  };
3832
3834
 
3833
- var title$e = "Créer un compte";
3834
- var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3835
+ var title$c = "Créer un compte";
3836
+ var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3835
3837
  var labels$g = {
3836
3838
  signUpFacebook: "Inscrivez-vous avec Facebook",
3837
3839
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3917,8 +3919,8 @@ var redeem = {
3917
3919
  }
3918
3920
  };
3919
3921
  var register_fr = {
3920
- title: title$e,
3921
- subtitle: subtitle$6,
3922
+ title: title$c,
3923
+ subtitle: subtitle$4,
3922
3924
  labels: labels$g,
3923
3925
  messages: messages$g,
3924
3926
  errors: errors$2,
@@ -3978,7 +3980,7 @@ var userEdit_fr = {
3978
3980
  messages: messages$e
3979
3981
  };
3980
3982
 
3981
- var title$d = "Enter your shipping address";
3983
+ var title$b = "Enter your shipping address";
3982
3984
  var selectAddressTitle$1 = "Please select an address";
3983
3985
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3984
3986
  var labels$d = {
@@ -4001,7 +4003,7 @@ var messages$d = {
4001
4003
  subRedeemed: "Your subscription has been redeemed."
4002
4004
  };
4003
4005
  var address_en = {
4004
- title: title$d,
4006
+ title: title$b,
4005
4007
  selectAddressTitle: selectAddressTitle$1,
4006
4008
  selectAddressSubtitle: selectAddressSubtitle$1,
4007
4009
  labels: labels$d,
@@ -4009,7 +4011,7 @@ var address_en = {
4009
4011
  messages: messages$d
4010
4012
  };
4011
4013
 
4012
- var title$c = "Entrez votre adresse de livraison";
4014
+ var title$a = "Entrez votre adresse de livraison";
4013
4015
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4014
4016
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4015
4017
  var labels$c = {
@@ -4032,7 +4034,7 @@ var messages$c = {
4032
4034
  subRedeemed: "Votre abonnement a bien été activé."
4033
4035
  };
4034
4036
  var address_fr = {
4035
- title: title$c,
4037
+ title: title$a,
4036
4038
  selectAddressTitle: selectAddressTitle,
4037
4039
  selectAddressSubtitle: selectAddressSubtitle,
4038
4040
  labels: labels$c,
@@ -4040,8 +4042,8 @@ var address_fr = {
4040
4042
  messages: messages$c
4041
4043
  };
4042
4044
 
4043
- var title$b = "Reset your password";
4044
- var subtitle$5 = "Enter a new password below";
4045
+ var title$9 = "Reset your password";
4046
+ var subtitle$3 = "Enter a new password below";
4045
4047
  var email$3 = "Email";
4046
4048
  var password$3 = "Password";
4047
4049
  var confirmPassword$1 = "Confirm password";
@@ -4049,8 +4051,8 @@ var submit$5 = "Submit";
4049
4051
  var required$5 = "Required";
4050
4052
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4051
4053
  var passwordReset_en = {
4052
- title: title$b,
4053
- subtitle: subtitle$5,
4054
+ title: title$9,
4055
+ subtitle: subtitle$3,
4054
4056
  email: email$3,
4055
4057
  password: password$3,
4056
4058
  confirmPassword: confirmPassword$1,
@@ -4059,8 +4061,8 @@ var passwordReset_en = {
4059
4061
  passwordUpdated: passwordUpdated$1
4060
4062
  };
4061
4063
 
4062
- var title$a = "Réinitialiser votre mot de passe";
4063
- var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4064
+ var title$8 = "Réinitialiser votre mot de passe";
4065
+ var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4064
4066
  var email$2 = "Adresse courriel";
4065
4067
  var password$2 = "Mot de passe";
4066
4068
  var confirmPassword = "Confirmer le mot de passe";
@@ -4068,8 +4070,8 @@ var submit$4 = "Soumettre";
4068
4070
  var required$4 = "Champs obligatoires";
4069
4071
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4070
4072
  var passwordReset_fr = {
4071
- title: title$a,
4072
- subtitle: subtitle$4,
4073
+ title: title$8,
4074
+ subtitle: subtitle$2,
4073
4075
  email: email$2,
4074
4076
  password: password$2,
4075
4077
  confirmPassword: confirmPassword,
@@ -4078,7 +4080,7 @@ var passwordReset_fr = {
4078
4080
  passwordUpdated: passwordUpdated
4079
4081
  };
4080
4082
 
4081
- var title$9 = "Forgot your password?";
4083
+ var title$7 = "Forgot your password?";
4082
4084
  var email$1 = "Email";
4083
4085
  var password$1 = "Password";
4084
4086
  var submit$3 = "Submit";
@@ -4089,7 +4091,7 @@ var messages$b = {
4089
4091
  loginHere: "login here."
4090
4092
  };
4091
4093
  var passwordForgot_en = {
4092
- title: title$9,
4094
+ title: title$7,
4093
4095
  email: email$1,
4094
4096
  password: password$1,
4095
4097
  submit: submit$3,
@@ -4098,7 +4100,7 @@ var passwordForgot_en = {
4098
4100
  messages: messages$b
4099
4101
  };
4100
4102
 
4101
- var title$8 = "Mot de passe oublié ?";
4103
+ var title$6 = "Mot de passe oublié ?";
4102
4104
  var email = "Courriel";
4103
4105
  var password = "Mot de passe";
4104
4106
  var submit$2 = "Soumettre";
@@ -4109,7 +4111,7 @@ var messages$a = {
4109
4111
  loginHere: "Connectez-vous ici"
4110
4112
  };
4111
4113
  var passwordForgot_fr = {
4112
- title: title$8,
4114
+ title: title$6,
4113
4115
  email: email,
4114
4116
  password: password,
4115
4117
  submit: submit$2,
@@ -4118,7 +4120,7 @@ var passwordForgot_fr = {
4118
4120
  messages: messages$a
4119
4121
  };
4120
4122
 
4121
- var title$7 = "Change your password";
4123
+ var title$5 = "Change your password";
4122
4124
  var currentPassword$1 = "Current password";
4123
4125
  var newPassword$1 = "New password";
4124
4126
  var confirmNewPassword$1 = "Confirm new password";
@@ -4128,7 +4130,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4128
4130
  var passwordsNotMatching$1 = "Passwords don't match";
4129
4131
  var weakPassword$1 = "Your password must contain at least 6 characters";
4130
4132
  var passwordChange_en = {
4131
- title: title$7,
4133
+ title: title$5,
4132
4134
  currentPassword: currentPassword$1,
4133
4135
  newPassword: newPassword$1,
4134
4136
  confirmNewPassword: confirmNewPassword$1,
@@ -4139,7 +4141,7 @@ var passwordChange_en = {
4139
4141
  weakPassword: weakPassword$1
4140
4142
  };
4141
4143
 
4142
- var title$6 = "Changez votre mot de passe";
4144
+ var title$4 = "Changez votre mot de passe";
4143
4145
  var currentPassword = "Mot de passe actuel";
4144
4146
  var newPassword = "Nouveau mot de passe";
4145
4147
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4149,7 +4151,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4149
4151
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4150
4152
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4151
4153
  var passwordChange_fr = {
4152
- title: title$6,
4154
+ title: title$4,
4153
4155
  currentPassword: currentPassword,
4154
4156
  newPassword: newPassword,
4155
4157
  confirmNewPassword: confirmNewPassword,
@@ -4160,8 +4162,8 @@ var passwordChange_fr = {
4160
4162
  weakPassword: weakPassword
4161
4163
  };
4162
4164
 
4163
- var title$5 = "Votre panier";
4164
- var subtitle$3 = "Terminez votre achat ci-dessous";
4165
+ var title$3 = "Votre panier";
4166
+ var subtitle$1 = "Terminez votre achat ci-dessous";
4165
4167
  var name$1 = "Produit";
4166
4168
  var quantity$1 = "Quantité";
4167
4169
  var price$1 = "Prix";
@@ -4172,8 +4174,8 @@ var confirm$3 = "Passer à la caisse";
4172
4174
  var empty$1 = "Votre panier est vide.";
4173
4175
  var removeAll$1 = "Vider";
4174
4176
  var cart_fr = {
4175
- title: title$5,
4176
- subtitle: subtitle$3,
4177
+ title: title$3,
4178
+ subtitle: subtitle$1,
4177
4179
  name: name$1,
4178
4180
  quantity: quantity$1,
4179
4181
  price: price$1,
@@ -4185,8 +4187,8 @@ var cart_fr = {
4185
4187
  removeAll: removeAll$1
4186
4188
  };
4187
4189
 
4188
- var title$4 = "Your shopping cart";
4189
- var subtitle$2 = "Comple your purchase below";
4190
+ var title$2 = "Your shopping cart";
4191
+ var subtitle = "Comple your purchase below";
4190
4192
  var name = "Name";
4191
4193
  var quantity = "Quantity";
4192
4194
  var price = "Price";
@@ -4197,8 +4199,8 @@ var confirm$2 = "Checkout";
4197
4199
  var empty = "Your cart is empty.";
4198
4200
  var removeAll = "Remove all";
4199
4201
  var cart_en = {
4200
- title: title$4,
4201
- subtitle: subtitle$2,
4202
+ title: title$2,
4203
+ subtitle: subtitle,
4202
4204
  name: name,
4203
4205
  quantity: quantity,
4204
4206
  price: price,
@@ -4636,7 +4638,7 @@ var verifyEmail_fr = {
4636
4638
  messages: messages
4637
4639
  };
4638
4640
 
4639
- var title$3 = "Invoice details";
4641
+ var title$1 = "Invoice details";
4640
4642
  var labels$1 = {
4641
4643
  summary: "Summary",
4642
4644
  total: "Total",
@@ -4649,12 +4651,12 @@ var buttons$1 = {
4649
4651
  pay: "Pay now"
4650
4652
  };
4651
4653
  var invoiceDetails_en = {
4652
- title: title$3,
4654
+ title: title$1,
4653
4655
  labels: labels$1,
4654
4656
  buttons: buttons$1
4655
4657
  };
4656
4658
 
4657
- var title$2 = "Détails de la facture";
4659
+ var title = "Détails de la facture";
4658
4660
  var labels = {
4659
4661
  summary: "Résumé",
4660
4662
  total: "Total",
@@ -4667,37 +4669,11 @@ var buttons = {
4667
4669
  pay: "Payer"
4668
4670
  };
4669
4671
  var invoiceDetails_fr = {
4670
- title: title$2,
4672
+ title: title,
4671
4673
  labels: labels,
4672
4674
  buttons: buttons
4673
4675
  };
4674
4676
 
4675
- var title$1 = "Renewal options";
4676
- var subtitle$1 = "Select one of the options below to continue";
4677
- var next$1 = "Next";
4678
- var addNew$1 = "Add Another Subscription";
4679
- var renew$1 = "Renew Existing Subscription";
4680
- var subscriptionOptions_en = {
4681
- title: title$1,
4682
- subtitle: subtitle$1,
4683
- next: next$1,
4684
- addNew: addNew$1,
4685
- renew: renew$1
4686
- };
4687
-
4688
- var title = "Choix de renouvellement";
4689
- var subtitle = "Veuillez choisir un des choix ci-dessous";
4690
- var next = "Prochain";
4691
- var addNew = "S'abonner à un autre forfait maintenant";
4692
- var renew = "Renouveler l'abonnement actuel ";
4693
- var subscriptionOptions_fr = {
4694
- title: title,
4695
- subtitle: subtitle,
4696
- next: next,
4697
- addNew: addNew,
4698
- renew: renew
4699
- };
4700
-
4701
4677
  function create$1(createState) {
4702
4678
  let state;
4703
4679
  const listeners = new Set();
@@ -6047,7 +6023,7 @@ class PelcroActions {
6047
6023
  view,
6048
6024
  cartItems,
6049
6025
  ...otherStateFields
6050
- } = initialState$j;
6026
+ } = initialState$i;
6051
6027
  this.set(otherStateFields);
6052
6028
  });
6053
6029
 
@@ -6071,16 +6047,6 @@ class PelcroActions {
6071
6047
  });
6072
6048
  }
6073
6049
 
6074
- if (view === "subscription-options") {
6075
- const noRenewableProducts = getRenewableProducts().length === 0;
6076
-
6077
- if (noRenewableProducts) {
6078
- return this.set({
6079
- view: "plan-select"
6080
- });
6081
- }
6082
- }
6083
-
6084
6050
  this.set({
6085
6051
  view
6086
6052
  });
@@ -6155,26 +6121,6 @@ class PelcroActions {
6155
6121
  }
6156
6122
  });
6157
6123
 
6158
- _defineProperty$3(this, "setProductsList", products => {
6159
- if (!Array.isArray(products)) {
6160
- return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6161
- }
6162
-
6163
- const allowedProducts = window.Pelcro.product.list();
6164
- const validProducts = products.filter(product => {
6165
- const isValidProduct = allowedProducts.some(allowedProduct => allowedProduct.id === (product === null || product === void 0 ? void 0 : product.id) && allowedProduct.name === (product === null || product === void 0 ? void 0 : product.name));
6166
-
6167
- if (!isValidProduct) {
6168
- console.warn(`setProductsList expects an array of products that exist in the list of valid products (window.Pelcro.product.list()), but it recieved a product which doesn't exist in that list:`, product);
6169
- }
6170
-
6171
- return isValidProduct;
6172
- });
6173
- this.set({
6174
- productsList: validProducts
6175
- });
6176
- });
6177
-
6178
6124
  _defineProperty$3(this, "setProduct", id => {
6179
6125
  const product = window.Pelcro.product.getById(id);
6180
6126
  if (!product) return console.error("invalid product id");
@@ -6396,12 +6342,10 @@ class PelcroCallbacks {
6396
6342
 
6397
6343
  }
6398
6344
 
6399
- var _window$Pelcro$produc, _window$Pelcro;
6400
- const initialState$j = {
6345
+ const initialState$i = {
6401
6346
  // View
6402
6347
  view: null,
6403
6348
  // Plans
6404
- productsList: (_window$Pelcro$produc = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : _window$Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [],
6405
6349
  product: null,
6406
6350
  plan: null,
6407
6351
  isGift: false,
@@ -6428,7 +6372,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6428
6372
  return {
6429
6373
  // Store setter
6430
6374
  set,
6431
- ...initialState$j,
6375
+ ...initialState$i,
6432
6376
  // State actions
6433
6377
  ...actions,
6434
6378
  // Callbacks
@@ -6783,30 +6727,6 @@ function userMustVerifyEmail() {
6783
6727
  const isUserEmailVerified = (_window$Pelcro$user$r9 = (_window$Pelcro$user$r10 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r10 === void 0 ? void 0 : _window$Pelcro$user$r10.email_confirm) !== null && _window$Pelcro$user$r9 !== void 0 ? _window$Pelcro$user$r9 : false;
6784
6728
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6785
6729
  }
6786
- function getRenewableProducts() {
6787
- var _window$Pelcro$subscr, _window$Pelcro$subscr2;
6788
-
6789
- const renewableSubs = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription.list()) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : _window$Pelcro$subscr2.filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
6790
- const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6791
- const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6792
- const {
6793
- productsList
6794
- } = usePelcro.getStore();
6795
- return productsList.map(product => {
6796
- if (renewableProductsIds.includes(product.id)) {
6797
- const renewablePlans = getRenewablePlansOnly(product);
6798
- return { ...product,
6799
- plans: renewablePlans
6800
- };
6801
- }
6802
- }).filter(product => product);
6803
-
6804
- function getRenewablePlansOnly(product) {
6805
- var _product$plans$filter, _product$plans;
6806
-
6807
- return (_product$plans$filter = product === null || product === void 0 ? void 0 : (_product$plans = product.plans) === null || _product$plans === void 0 ? void 0 : _product$plans.filter(plan => renewablePlansIds.includes(plan.id))) !== null && _product$plans$filter !== void 0 ? _product$plans$filter : [];
6808
- }
6809
- }
6810
6730
 
6811
6731
  const resources = {
6812
6732
  en: {
@@ -6831,8 +6751,7 @@ const resources = {
6831
6751
  dashboard: dashboard_en,
6832
6752
  select: select_en,
6833
6753
  notification: notification_en,
6834
- invoiceDetails: invoiceDetails_en,
6835
- subscriptionOptions: subscriptionOptions_en
6754
+ invoiceDetails: invoiceDetails_en
6836
6755
  },
6837
6756
  fr: {
6838
6757
  common: common_fr,
@@ -6856,8 +6775,7 @@ const resources = {
6856
6775
  dashboard: dashboard_fr,
6857
6776
  select: select_fr,
6858
6777
  notification: notification_fr,
6859
- invoiceDetails: invoiceDetails_fr,
6860
- subscriptionOptions: subscriptionOptions_fr
6778
+ invoiceDetails: invoiceDetails_fr
6861
6779
  }
6862
6780
  }; // set UI language to the page language or default to the language in site settings
6863
6781
 
@@ -7148,8 +7066,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7148
7066
 
7149
7067
  let e={data:""},t=t=>"undefined"!=typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,n=(e,t)=>{let r,l="",a="",o="";for(let c in e){let s=e[c];"object"==typeof s?(r=t?t.replace(/([^,])+/g,e=>c.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):c,a+="@"==c[0]?"f"==c[1]?n(s,c):c+"{"+n(s,"k"==c[1]?"":t)+"}":n(s,r)):"@"==c[0]&&"i"==c[1]?l=c+" "+s+";":(c=c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=n.p?n.p(c,s):c+":"+s+";");}return o[0]?(r=t?t+"{"+o+"}":o,l+r+a):l+a},o={},c=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?c(e[r]):e[r]);return t},s=(e,t,r,s,i)=>{let p="object"==typeof e?c(e):e,u=o[p]||(o[p]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(p));if(!o[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=l.exec(e.replace(a,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);o[u]=n(i?{["@keyframes "+u]:t}:t,r?"":"."+u);}return ((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(o[u],t,s),u},i=(e,t,r)=>e.reduce((e,l,a)=>{let o=t[a];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":n(e,""):e;}return e+l+(null==o?"":o)},"");function p(e){let r=this||{},l=e.call?e(r.p):e;return s(l.unshift?l.raw?i(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):l,t(r.target),r.g,r.o,r.k)}let u,f,d;p.bind({g:1});let b=p.bind({k:1});function h(e,t,r,l){n.p=t,u=e,f=r,d=l;}function y(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=p.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=c.as||e;return d&&i[0]&&d(c),u(i,c)}return t?t(a):a}}
7150
7068
 
7151
- function _extends$A() {
7152
- _extends$A = Object.assign || function (target) {
7069
+ function _extends$z() {
7070
+ _extends$z = Object.assign || function (target) {
7153
7071
  for (var i = 1; i < arguments.length; i++) {
7154
7072
  var source = arguments[i];
7155
7073
 
@@ -7163,7 +7081,7 @@ function _extends$A() {
7163
7081
  return target;
7164
7082
  };
7165
7083
 
7166
- return _extends$A.apply(this, arguments);
7084
+ return _extends$z.apply(this, arguments);
7167
7085
  }
7168
7086
 
7169
7087
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7253,7 +7171,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7253
7171
  var reducer = function reducer(state, action) {
7254
7172
  switch (action.type) {
7255
7173
  case ActionType.ADD_TOAST:
7256
- return _extends$A({}, state, {
7174
+ return _extends$z({}, state, {
7257
7175
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7258
7176
  });
7259
7177
 
@@ -7263,9 +7181,9 @@ var reducer = function reducer(state, action) {
7263
7181
  clearFromRemoveQueue(action.toast.id);
7264
7182
  }
7265
7183
 
7266
- return _extends$A({}, state, {
7184
+ return _extends$z({}, state, {
7267
7185
  toasts: state.toasts.map(function (t) {
7268
- return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7186
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7269
7187
  })
7270
7188
  });
7271
7189
 
@@ -7292,9 +7210,9 @@ var reducer = function reducer(state, action) {
7292
7210
  });
7293
7211
  }
7294
7212
 
7295
- return _extends$A({}, state, {
7213
+ return _extends$z({}, state, {
7296
7214
  toasts: state.toasts.map(function (t) {
7297
- return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7215
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7298
7216
  visible: false
7299
7217
  }) : t;
7300
7218
  })
@@ -7302,28 +7220,28 @@ var reducer = function reducer(state, action) {
7302
7220
 
7303
7221
  case ActionType.REMOVE_TOAST:
7304
7222
  if (action.toastId === undefined) {
7305
- return _extends$A({}, state, {
7223
+ return _extends$z({}, state, {
7306
7224
  toasts: []
7307
7225
  });
7308
7226
  }
7309
7227
 
7310
- return _extends$A({}, state, {
7228
+ return _extends$z({}, state, {
7311
7229
  toasts: state.toasts.filter(function (t) {
7312
7230
  return t.id !== action.toastId;
7313
7231
  })
7314
7232
  });
7315
7233
 
7316
7234
  case ActionType.START_PAUSE:
7317
- return _extends$A({}, state, {
7235
+ return _extends$z({}, state, {
7318
7236
  pausedAt: action.time
7319
7237
  });
7320
7238
 
7321
7239
  case ActionType.END_PAUSE:
7322
7240
  var diff = action.time - (state.pausedAt || 0);
7323
- return _extends$A({}, state, {
7241
+ return _extends$z({}, state, {
7324
7242
  pausedAt: undefined,
7325
7243
  toasts: state.toasts.map(function (t) {
7326
- return _extends$A({}, t, {
7244
+ return _extends$z({}, t, {
7327
7245
  pauseDuration: t.pauseDuration + diff
7328
7246
  });
7329
7247
  })
@@ -7370,12 +7288,12 @@ var useStore = function useStore(toastOptions) {
7370
7288
  var mergedToasts = state.toasts.map(function (t) {
7371
7289
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7372
7290
 
7373
- return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7291
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7374
7292
  duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
7375
- style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7293
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7376
7294
  });
7377
7295
  });
7378
- return _extends$A({}, state, {
7296
+ return _extends$z({}, state, {
7379
7297
  toasts: mergedToasts
7380
7298
  });
7381
7299
  };
@@ -7385,7 +7303,7 @@ var createToast = function createToast(message, type, opts) {
7385
7303
  type = 'blank';
7386
7304
  }
7387
7305
 
7388
- return _extends$A({
7306
+ return _extends$z({
7389
7307
  createdAt: Date.now(),
7390
7308
  visible: true,
7391
7309
  type: type,
@@ -7435,14 +7353,14 @@ toast.remove = function (toastId) {
7435
7353
  };
7436
7354
 
7437
7355
  toast.promise = function (promise, msgs, opts) {
7438
- var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7356
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7439
7357
  promise.then(function (p) {
7440
- toast.success(resolveValue(msgs.success, p), _extends$A({
7358
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7441
7359
  id: id
7442
7360
  }, opts, opts == null ? void 0 : opts.success));
7443
7361
  return p;
7444
7362
  })["catch"](function (e) {
7445
- toast.error(resolveValue(msgs.error, e), _extends$A({
7363
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7446
7364
  id: id
7447
7365
  }, opts, opts == null ? void 0 : opts.error));
7448
7366
  });
@@ -7781,7 +7699,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7781
7699
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7782
7700
  return createElement(ToastBarBase, {
7783
7701
  className: toast.className,
7784
- style: _extends$A({}, animationStyle, style, toast.style)
7702
+ style: _extends$z({}, animationStyle, style, toast.style)
7785
7703
  }, typeof children === 'function' ? children({
7786
7704
  icon: icon,
7787
7705
  message: message
@@ -7811,7 +7729,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7811
7729
  } : position.includes('right') ? {
7812
7730
  justifyContent: 'flex-end'
7813
7731
  } : {};
7814
- return _extends$A({
7732
+ return _extends$z({
7815
7733
  left: 0,
7816
7734
  right: 0,
7817
7735
  display: 'flex',
@@ -7838,7 +7756,7 @@ var Toaster = function Toaster(_ref) {
7838
7756
  handlers = _useToaster.handlers;
7839
7757
 
7840
7758
  return createElement("div", {
7841
- style: _extends$A({
7759
+ style: _extends$z({
7842
7760
  position: 'fixed',
7843
7761
  zIndex: 9999,
7844
7762
  top: DEFAULT_OFFSET,
@@ -7873,82 +7791,82 @@ var Toaster = function Toaster(_ref) {
7873
7791
  }));
7874
7792
  };
7875
7793
 
7876
- var _path$x;
7794
+ var _path$w;
7877
7795
 
7878
- function _extends$z() { _extends$z = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
7796
+ function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7879
7797
 
7880
7798
  function SvgCheckSolid(props) {
7881
- return /*#__PURE__*/React.createElement("svg", _extends$z({
7799
+ return /*#__PURE__*/React.createElement("svg", _extends$y({
7882
7800
  xmlns: "http://www.w3.org/2000/svg",
7883
7801
  className: "h-5 w-5",
7884
7802
  viewBox: "0 0 20 20",
7885
7803
  fill: "currentColor"
7886
- }, props), _path$x || (_path$x = /*#__PURE__*/React.createElement("path", {
7804
+ }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7887
7805
  fillRule: "evenodd",
7888
7806
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
7889
7807
  clipRule: "evenodd"
7890
7808
  })));
7891
7809
  }
7892
7810
 
7893
- var _path$w;
7811
+ var _path$v;
7894
7812
 
7895
- function _extends$y() { _extends$y = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
7813
+ function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7896
7814
 
7897
7815
  function SvgXIcon(props) {
7898
- return /*#__PURE__*/React.createElement("svg", _extends$y({
7816
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7899
7817
  xmlns: "http://www.w3.org/2000/svg",
7900
7818
  viewBox: "0 0 20 20",
7901
7819
  fill: "currentColor"
7902
- }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7820
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7903
7821
  fill: "evenodd",
7904
7822
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
7905
7823
  clipRule: "evenodd"
7906
7824
  })));
7907
7825
  }
7908
7826
 
7909
- var _path$v;
7827
+ var _path$u;
7910
7828
 
7911
- function _extends$x() { _extends$x = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
7829
+ function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7912
7830
 
7913
7831
  function SvgXIconSolid(props) {
7914
- return /*#__PURE__*/React.createElement("svg", _extends$x({
7832
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7915
7833
  className: "plc-w-4 plc-h-4",
7916
7834
  fill: "currentColor",
7917
7835
  xmlns: "http://www.w3.org/2000/svg",
7918
7836
  viewBox: "0 0 100 100"
7919
- }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7837
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7920
7838
  d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
7921
7839
  })));
7922
7840
  }
7923
7841
 
7924
- var _path$u;
7842
+ var _path$t;
7925
7843
 
7926
- function _extends$w() { _extends$w = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
7844
+ function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7927
7845
 
7928
7846
  function SvgExclamation(props) {
7929
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7847
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7930
7848
  className: "plc-w-4 plc-h-4 plc-mr-1",
7931
7849
  xmlns: "http://www.w3.org/2000/svg",
7932
7850
  viewBox: "0 0 20 20",
7933
7851
  fill: "currentColor"
7934
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7852
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7935
7853
  fillRule: "evenodd",
7936
7854
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
7937
7855
  clipRule: "evenodd"
7938
7856
  })));
7939
7857
  }
7940
7858
 
7941
- var _path$t, _path2$4;
7859
+ var _path$s, _path2$4;
7942
7860
 
7943
- function _extends$v() { _extends$v = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
7861
+ function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
7944
7862
 
7945
7863
  function SvgSpinner(props) {
7946
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7864
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
7947
7865
  className: "plc-animate-spin",
7948
7866
  viewBox: "0 0 24 24",
7949
7867
  fill: "currentColor",
7950
7868
  xmlns: "http://www.w3.org/2000/svg"
7951
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7869
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7952
7870
  opacity: 0.2,
7953
7871
  fill: "evenodd",
7954
7872
  clipRule: "evenodd",
@@ -8238,9 +8156,7 @@ const init$1 = () => {
8238
8156
  return switchToAddressView();
8239
8157
  });
8240
8158
  } else {
8241
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8242
- return switchView("subscription-options");
8243
- });
8159
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8244
8160
  }
8245
8161
  }
8246
8162
  }
@@ -8402,8 +8318,7 @@ function Link({
8402
8318
  const init = () => {
8403
8319
  const {
8404
8320
  switchView,
8405
- set,
8406
- setProductsList
8321
+ set
8407
8322
  } = usePelcro.getStore();
8408
8323
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8409
8324
 
@@ -8454,8 +8369,7 @@ const init = () => {
8454
8369
  }
8455
8370
 
8456
8371
  notify.dismiss(NOTIFICATION_ID);
8457
- setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8458
- switchView("plan-select");
8372
+ switchView("_plan-select-entitlements");
8459
8373
  }
8460
8374
  }, "Subscribe"), "now to get full page access.")), {
8461
8375
  className: "pelcro-notification-entitlement",
@@ -8707,17 +8621,21 @@ const getErrorMessages = error => {
8707
8621
  return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
8708
8622
  }
8709
8623
 
8710
- if (error !== null && error !== void 0 && error.message) {
8711
- return error.message;
8712
- }
8624
+ if (error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && _error$response5$data.errors) {
8625
+ var _error$response6, _error$response6$data;
8713
8626
 
8714
- const errorMessages = []; // enumerable error (ex: validation errors)
8627
+ const errorMessages = []; // enumerable error (ex: validation errors)
8715
8628
 
8716
- Object.values(error === null || error === void 0 ? void 0 : (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : _error$response5$data.errors).forEach(([errorMessage]) => {
8717
- errorMessages.push(errorMessage);
8718
- }); // convert to multiline string
8629
+ Object.values(error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.errors).forEach(([errorMessage]) => {
8630
+ errorMessages.push(errorMessage);
8631
+ }); // convert to multiline string
8719
8632
 
8720
- return errorMessages.join("\n");
8633
+ return errorMessages.join("\n");
8634
+ }
8635
+
8636
+ if (error !== null && error !== void 0 && error.message) {
8637
+ return error.message;
8638
+ }
8721
8639
  };
8722
8640
  /**
8723
8641
  * Executes function after a wait time of inactivity
@@ -9290,7 +9208,7 @@ const PelcroModalController = ({
9290
9208
  type
9291
9209
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default.Children.map(children, child => child).find(({
9292
9210
  type
9293
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default.Children.map(children, child => child).find(({
9211
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default.Children.map(children, child => child).find(({
9294
9212
  type
9295
9213
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default.Children.map(children, child => child).find(({
9296
9214
  type
@@ -9571,10 +9489,8 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9571
9489
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9572
9490
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9573
9491
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9574
- const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9575
- const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9576
9492
 
9577
- const initialState$i = {
9493
+ const initialState$h = {
9578
9494
  email: "",
9579
9495
  password: "",
9580
9496
  emailError: null,
@@ -9585,10 +9501,10 @@ const initialState$i = {
9585
9501
  content: ""
9586
9502
  }
9587
9503
  };
9588
- const store$i = /*#__PURE__*/createContext(initialState$i);
9504
+ const store$h = /*#__PURE__*/createContext(initialState$h);
9589
9505
  const {
9590
- Provider: Provider$i
9591
- } = store$i;
9506
+ Provider: Provider$h
9507
+ } = store$h;
9592
9508
 
9593
9509
  const LoginContainer = ({
9594
9510
  style,
@@ -9695,7 +9611,7 @@ const LoginContainer = ({
9695
9611
  });
9696
9612
 
9697
9613
  case RESET_LOGIN_FORM:
9698
- return initialState$i;
9614
+ return initialState$h;
9699
9615
 
9700
9616
  case DISABLE_LOGIN_BUTTON:
9701
9617
  return lib_7({ ...state,
@@ -9713,12 +9629,12 @@ const LoginContainer = ({
9713
9629
  default:
9714
9630
  return state;
9715
9631
  }
9716
- }, initialState$i);
9632
+ }, initialState$h);
9717
9633
  return /*#__PURE__*/React__default.createElement("div", {
9718
9634
  style: { ...style
9719
9635
  },
9720
9636
  className: `pelcro-container pelcro-login-container ${className}`
9721
- }, /*#__PURE__*/React__default.createElement(Provider$i, {
9637
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
9722
9638
  value: {
9723
9639
  state,
9724
9640
  dispatch
@@ -9726,12 +9642,12 @@ const LoginContainer = ({
9726
9642
  }, children.length ? children.map((child, i) => {
9727
9643
  if (child) {
9728
9644
  return /*#__PURE__*/React__default.cloneElement(child, {
9729
- store: store$i,
9645
+ store: store$h,
9730
9646
  key: i
9731
9647
  });
9732
9648
  }
9733
9649
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9734
- store: store$i
9650
+ store: store$h
9735
9651
  })));
9736
9652
  };
9737
9653
 
@@ -9901,6 +9817,9 @@ function ConfirmPassword({
9901
9817
  store,
9902
9818
  ...otherProps
9903
9819
  }) {
9820
+ const {
9821
+ t
9822
+ } = useTranslation("common");
9904
9823
  const {
9905
9824
  dispatch,
9906
9825
  state: {
@@ -9925,7 +9844,7 @@ function ConfirmPassword({
9925
9844
  } else if (finishedTyping) {
9926
9845
  dispatch({
9927
9846
  type: SET_CONFIRM_PASSWORD_ERROR,
9928
- payload: "Confirm password is required."
9847
+ payload: t("validation.confirmPassword")
9929
9848
  });
9930
9849
  }
9931
9850
  }, [dispatch, password, finishedTyping]);
@@ -9976,7 +9895,7 @@ const LoginButton = ({
9976
9895
  buttonDisabled
9977
9896
  },
9978
9897
  dispatch
9979
- } = useContext(store$i);
9898
+ } = useContext(store$h);
9980
9899
  const {
9981
9900
  t
9982
9901
  } = useTranslation("login");
@@ -9997,23 +9916,23 @@ const LoginButton = ({
9997
9916
  };
9998
9917
 
9999
9918
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10000
- store: store$i
9919
+ store: store$h
10001
9920
  }, props));
10002
9921
 
10003
9922
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10004
- store: store$i
9923
+ store: store$h
10005
9924
  }, props));
10006
9925
 
10007
- var _path$s;
9926
+ var _path$r;
10008
9927
 
10009
- function _extends$u() { _extends$u = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
9928
+ function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10010
9929
 
10011
9930
  function SvgCheck(props) {
10012
- return /*#__PURE__*/React.createElement("svg", _extends$u({
9931
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
10013
9932
  xmlns: "http://www.w3.org/2000/svg",
10014
9933
  fill: "currentColor",
10015
9934
  viewBox: "0 0 20 20"
10016
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
9935
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10017
9936
  fillRule: "evenodd",
10018
9937
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
10019
9938
  clipRule: "evenodd"
@@ -10078,7 +9997,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
10078
9997
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
10079
9998
  facebookLoginRenderProps.FacebookLogin;
10080
9999
 
10081
- const initialState$h = {
10000
+ const initialState$g = {
10082
10001
  email: "",
10083
10002
  password: "",
10084
10003
  emailError: null,
@@ -10095,10 +10014,10 @@ const initialState$h = {
10095
10014
  content: ""
10096
10015
  }
10097
10016
  };
10098
- const store$h = /*#__PURE__*/createContext(initialState$h);
10017
+ const store$g = /*#__PURE__*/createContext(initialState$g);
10099
10018
  const {
10100
- Provider: Provider$h
10101
- } = store$h;
10019
+ Provider: Provider$g
10020
+ } = store$g;
10102
10021
 
10103
10022
  const RegisterContainer = ({
10104
10023
  style,
@@ -10281,7 +10200,7 @@ const RegisterContainer = ({
10281
10200
  });
10282
10201
 
10283
10202
  case RESET_LOGIN_FORM:
10284
- return initialState$h;
10203
+ return initialState$g;
10285
10204
 
10286
10205
  case DISABLE_REGISTRATION_BUTTON:
10287
10206
  return lib_7({ ...state,
@@ -10299,12 +10218,12 @@ const RegisterContainer = ({
10299
10218
  default:
10300
10219
  return state;
10301
10220
  }
10302
- }, initialState$h);
10221
+ }, initialState$g);
10303
10222
  return /*#__PURE__*/React__default.createElement("div", {
10304
10223
  style: { ...style
10305
10224
  },
10306
10225
  className: `pelcro-container pelcro-register-container ${className}`
10307
- }, /*#__PURE__*/React__default.createElement(Provider$h, {
10226
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
10308
10227
  value: {
10309
10228
  state,
10310
10229
  dispatch
@@ -10312,12 +10231,12 @@ const RegisterContainer = ({
10312
10231
  }, children.length ? children.map((child, i) => {
10313
10232
  if (child) {
10314
10233
  return /*#__PURE__*/React__default.cloneElement(child, {
10315
- store: store$h,
10234
+ store: store$g,
10316
10235
  key: i
10317
10236
  });
10318
10237
  }
10319
10238
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10320
- store: store$h
10239
+ store: store$g
10321
10240
  })));
10322
10241
  };
10323
10242
  /**
@@ -10332,15 +10251,15 @@ function hasSecurityTokenEnabled$1() {
10332
10251
  return hasSecuritySdkLoaded;
10333
10252
  }
10334
10253
 
10335
- var _path$r;
10254
+ var _path$q;
10336
10255
 
10337
- function _extends$t() { _extends$t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
10256
+ function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10338
10257
 
10339
10258
  function SvgFacebookLogo(props) {
10340
- return /*#__PURE__*/React.createElement("svg", _extends$t({
10259
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10341
10260
  xmlns: "http://www.w3.org/2000/svg",
10342
10261
  viewBox: "88.428 12.828 107.543 207.085"
10343
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10262
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10344
10263
  d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
10345
10264
  fill: "#3c5a9a"
10346
10265
  })));
@@ -10357,10 +10276,10 @@ const FacebookLoginButton = ({
10357
10276
  const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
10358
10277
  const {
10359
10278
  dispatch: loginDispatch
10360
- } = useContext(store$i);
10279
+ } = useContext(store$h);
10361
10280
  const {
10362
10281
  dispatch: registerDispatch
10363
- } = useContext(store$h);
10282
+ } = useContext(store$g);
10364
10283
 
10365
10284
  const onSuccess = facebookUser => {
10366
10285
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10413,15 +10332,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10413
10332
  unwrapExports(googleLogin);
10414
10333
  var googleLogin_1 = googleLogin.GoogleLogin;
10415
10334
 
10416
- var _path$q, _path2$3, _path3$1, _path4;
10335
+ var _path$p, _path2$3, _path3$1, _path4;
10417
10336
 
10418
- function _extends$s() { _extends$s = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
10337
+ function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10419
10338
 
10420
10339
  function SvgGoogleLogo(props) {
10421
- return /*#__PURE__*/React.createElement("svg", _extends$s({
10340
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10422
10341
  viewBox: "0 0 24 24",
10423
10342
  xmlns: "http://www.w3.org/2000/svg"
10424
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10343
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10425
10344
  fill: "#4285F4",
10426
10345
  d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
10427
10346
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10447,10 +10366,10 @@ const GoogleLoginButton = ({
10447
10366
  const googleLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
10448
10367
  const {
10449
10368
  dispatch: loginDispatch
10450
- } = useContext(store$i);
10369
+ } = useContext(store$h);
10451
10370
  const {
10452
10371
  dispatch: registerDispatch
10453
- } = useContext(store$h);
10372
+ } = useContext(store$g);
10454
10373
 
10455
10374
  const onSuccess = response => {
10456
10375
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10498,15 +10417,15 @@ const GoogleLoginButton = ({
10498
10417
  }) : null;
10499
10418
  };
10500
10419
 
10501
- var _path$p;
10420
+ var _path$o;
10502
10421
 
10503
- function _extends$r() { _extends$r = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
10422
+ function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10504
10423
 
10505
10424
  function SvgAuth0Logo(props) {
10506
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10425
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10507
10426
  viewBox: "0 0 256 285",
10508
10427
  xmlns: "http://www.w3.org/2000/svg"
10509
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10428
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10510
10429
  d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
10511
10430
  })));
10512
10431
  }
@@ -10546,10 +10465,10 @@ const Auth0LoginButton = ({
10546
10465
  }, [auth0Enabled, auth0Loaded]);
10547
10466
  const {
10548
10467
  dispatch: loginDispatch
10549
- } = useContext(store$i);
10468
+ } = useContext(store$h);
10550
10469
  const {
10551
10470
  dispatch: registerDispatch
10552
- } = useContext(store$h);
10471
+ } = useContext(store$g);
10553
10472
 
10554
10473
  function handleClick() {
10555
10474
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10682,15 +10601,15 @@ function LoginView(props) {
10682
10601
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10683
10602
  }
10684
10603
 
10685
- var _path$o, _path2$2, _path3;
10604
+ var _path$n, _path2$2, _path3;
10686
10605
 
10687
- function _extends$q() { _extends$q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
10606
+ function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
10688
10607
 
10689
10608
  function SvgPelcroAuthorship(props) {
10690
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10609
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
10691
10610
  xmlns: "http://www.w3.org/2000/svg",
10692
10611
  viewBox: "0 -80.652 497.072 179.991"
10693
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10612
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10694
10613
  fill: "none",
10695
10614
  stroke: "#4a4a4a",
10696
10615
  d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
@@ -10837,11 +10756,11 @@ function LoginModal({
10837
10756
  LoginModal.viewId = "login";
10838
10757
 
10839
10758
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10840
- store: store$h
10759
+ store: store$g
10841
10760
  }, props));
10842
10761
 
10843
10762
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10844
- store: store$h
10763
+ store: store$g
10845
10764
  }, props));
10846
10765
 
10847
10766
  const RegisterButton = ({
@@ -10861,7 +10780,7 @@ const RegisterButton = ({
10861
10780
  buttonDisabled
10862
10781
  },
10863
10782
  dispatch
10864
- } = useContext(store$h);
10783
+ } = useContext(store$g);
10865
10784
  const {
10866
10785
  t
10867
10786
  } = useTranslation("register");
@@ -10999,7 +10918,7 @@ function FirstName({
10999
10918
  }
11000
10919
 
11001
10920
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
11002
- store: store$h
10921
+ store: store$g
11003
10922
  }, props));
11004
10923
 
11005
10924
  function LastName({
@@ -11030,7 +10949,7 @@ function LastName({
11030
10949
  }
11031
10950
 
11032
10951
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
11033
- store: store$h
10952
+ store: store$g
11034
10953
  }, props));
11035
10954
 
11036
10955
  /**
@@ -11154,7 +11073,7 @@ function TextInput({
11154
11073
 
11155
11074
  const RegisterTextInput = props => {
11156
11075
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
11157
- store: store$h
11076
+ store: store$g
11158
11077
  }));
11159
11078
  };
11160
11079
 
@@ -11301,7 +11220,6 @@ function SelectModalWithHook(props) {
11301
11220
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11302
11221
  }, []);
11303
11222
  const {
11304
- productsList,
11305
11223
  isGift,
11306
11224
  plan,
11307
11225
  product,
@@ -11311,12 +11229,11 @@ function SelectModalWithHook(props) {
11311
11229
  view,
11312
11230
  set
11313
11231
  } = usePelcro();
11314
- const isRenewingSub = view === "_plan-select-renew";
11232
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11233
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11315
11234
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
11316
- productsList: productsList,
11317
11235
  isGift: isGift,
11318
- disableGifting: isRenewingGift || isRenewingSub,
11319
- isRenewingSub: isRenewingSub,
11236
+ disableGifting: isRenewingGift,
11320
11237
  plan: plan,
11321
11238
  product: product,
11322
11239
  onClose: () => {
@@ -11330,10 +11247,8 @@ function SelectModalWithHook(props) {
11330
11247
  plan,
11331
11248
  isGift
11332
11249
  }),
11333
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11334
- subscriptionIdToRenew
11335
- }),
11336
- setView: switchView
11250
+ setView: switchView,
11251
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11337
11252
  });
11338
11253
  }
11339
11254
  SelectModalWithHook.viewId = "plan-select";
@@ -11365,10 +11280,10 @@ class SelectModal extends Component {
11365
11280
  });
11366
11281
  }
11367
11282
 
11368
- if (this.props.productsList.length === 1) {
11283
+ if (this.state.productList.length === 1) {
11369
11284
  this.setState({
11370
- product: this.props.productsList[0],
11371
- planList: this.props.productsList[0].plans,
11285
+ product: this.state.productList[0],
11286
+ planList: this.state.productList[0].plans,
11372
11287
  mode: "plan"
11373
11288
  });
11374
11289
  }
@@ -11385,7 +11300,7 @@ class SelectModal extends Component {
11385
11300
  });
11386
11301
 
11387
11302
  _defineProperty$3(this, "onProductChange", e => {
11388
- const product = productsList[e.target.selectedIndex];
11303
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
11389
11304
  this.setState({
11390
11305
  product: product,
11391
11306
  plan: product.plans[0]
@@ -11451,7 +11366,7 @@ class SelectModal extends Component {
11451
11366
 
11452
11367
  _defineProperty$3(this, "renderProducts", () => {
11453
11368
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11454
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11369
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11455
11370
  return productsToShow.map((product, index) => {
11456
11371
  return this.renderOneProduct(product, index);
11457
11372
  });
@@ -11464,7 +11379,7 @@ class SelectModal extends Component {
11464
11379
  return this.renderOneProduct(this.state.product);
11465
11380
  }
11466
11381
 
11467
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11382
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11468
11383
 
11469
11384
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11470
11385
  return this.renderProducts();
@@ -11480,7 +11395,10 @@ class SelectModal extends Component {
11480
11395
  className: "plc-text-sm plc-font-semibold"
11481
11396
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11482
11397
 
11483
- function productsWithMatchedTaggedFirst(allProducts) {
11398
+ function productsWithMatchedTaggedFirst() {
11399
+ var _window$Pelcro$produc;
11400
+
11401
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11484
11402
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11485
11403
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11486
11404
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11514,7 +11432,7 @@ class SelectModal extends Component {
11514
11432
  _defineProperty$3(this, "selectProduct", e => {
11515
11433
  const id = e.target.dataset.key;
11516
11434
 
11517
- for (const product of this.props.productsList) {
11435
+ for (const product of this.state.productList) {
11518
11436
  if (+product.id === +id) {
11519
11437
  var _this$state$plan;
11520
11438
 
@@ -11567,14 +11485,6 @@ class SelectModal extends Component {
11567
11485
 
11568
11486
  _defineProperty$3(this, "submitOption", () => {
11569
11487
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11570
-
11571
- if (this.props.isRenewingSub) {
11572
- var _matchingSub$id;
11573
-
11574
- const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11575
- this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11576
- }
11577
-
11578
11488
  const {
11579
11489
  product,
11580
11490
  isGift
@@ -11612,7 +11522,8 @@ class SelectModal extends Component {
11612
11522
  plan: {},
11613
11523
  isGift: props.isGift,
11614
11524
  disabled: true,
11615
- mode: "product"
11525
+ mode: "product",
11526
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11616
11527
  };
11617
11528
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11618
11529
  this.locale = this.props.t;
@@ -11620,7 +11531,7 @@ class SelectModal extends Component {
11620
11531
  }
11621
11532
 
11622
11533
  render() {
11623
- var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11534
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11624
11535
 
11625
11536
  const {
11626
11537
  disableGifting
@@ -11654,7 +11565,7 @@ class SelectModal extends Component {
11654
11565
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11655
11566
  }, /*#__PURE__*/React__default.createElement("h4", {
11656
11567
  className: "plc-text-2xl plc-font-semibold"
11657
- }, this.product && this.product.paywall.select_title || ((_this$props$productsL = this.props.productsList[0]) === null || _this$props$productsL === void 0 ? void 0 : _this$props$productsL.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_this$props$productsL2 = this.props.productsList[0]) === null || _this$props$productsL2 === void 0 ? void 0 : _this$props$productsL2.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11568
+ }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11658
11569
  className: "pelcro-select-products-wrapper"
11659
11570
  }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11660
11571
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13506,7 +13417,7 @@ class VantivGateway {
13506
13417
 
13507
13418
  /** @type {PaymentStateType} */
13508
13419
 
13509
- const initialState$g = {
13420
+ const initialState$f = {
13510
13421
  disableSubmit: false,
13511
13422
  isLoading: false,
13512
13423
  disableCouponButton: false,
@@ -13525,10 +13436,10 @@ const initialState$g = {
13525
13436
  content: ""
13526
13437
  }
13527
13438
  };
13528
- const store$g = /*#__PURE__*/createContext(initialState$g);
13439
+ const store$f = /*#__PURE__*/createContext(initialState$f);
13529
13440
  const {
13530
- Provider: Provider$g
13531
- } = store$g;
13441
+ Provider: Provider$f
13442
+ } = store$f;
13532
13443
 
13533
13444
  const PaymentMethodContainerWithoutStripe = ({
13534
13445
  style,
@@ -14780,21 +14691,21 @@ const PaymentMethodContainerWithoutStripe = ({
14780
14691
  default:
14781
14692
  return state;
14782
14693
  }
14783
- }, initialState$g);
14694
+ }, initialState$f);
14784
14695
  return /*#__PURE__*/React__default.createElement("div", {
14785
14696
  style: { ...style
14786
14697
  },
14787
14698
  className: `pelcro-container pelcro-payment-container ${className}`
14788
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
14699
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
14789
14700
  value: {
14790
14701
  state,
14791
14702
  dispatch
14792
14703
  }
14793
14704
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
14794
- store: store$g,
14705
+ store: store$f,
14795
14706
  key: i
14796
14707
  })) : /*#__PURE__*/React__default.cloneElement(children, {
14797
- store: store$g
14708
+ store: store$f
14798
14709
  })));
14799
14710
  };
14800
14711
 
@@ -14816,7 +14727,7 @@ const PaymentMethodContainer = props => {
14816
14727
  stripeAccount: window.Pelcro.site.read().account_id,
14817
14728
  locale: getPageOrDefaultLanguage()
14818
14729
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
14819
- store: store$g
14730
+ store: store$f
14820
14731
  }, props))));
14821
14732
  }
14822
14733
 
@@ -14869,7 +14780,7 @@ const PelcroPaymentRequestButton = props => {
14869
14780
  currentPlan,
14870
14781
  updatedPrice
14871
14782
  }
14872
- } = useContext(store$g);
14783
+ } = useContext(store$f);
14873
14784
 
14874
14785
  const updatePaymentRequest = () => {
14875
14786
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14945,7 +14856,7 @@ const DiscountedPrice = props => {
14945
14856
  taxAmount,
14946
14857
  percentOff
14947
14858
  }
14948
- } = useContext(store$g);
14859
+ } = useContext(store$f);
14949
14860
  const {
14950
14861
  order,
14951
14862
  plan
@@ -14995,7 +14906,7 @@ const SubmitPaymentMethod = ({
14995
14906
  isLoading,
14996
14907
  updatedPrice
14997
14908
  }
14998
- } = useContext(store$g);
14909
+ } = useContext(store$f);
14999
14910
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
15000
14911
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
15001
14912
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -15016,17 +14927,17 @@ const SubmitPaymentMethod = ({
15016
14927
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
15017
14928
  };
15018
14929
 
15019
- var _path$n;
14930
+ var _path$m;
15020
14931
 
15021
- function _extends$p() { _extends$p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
14932
+ function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
15022
14933
 
15023
14934
  function SvgArrowLeft(props) {
15024
- return /*#__PURE__*/React.createElement("svg", _extends$p({
14935
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
15025
14936
  xmlns: "http://www.w3.org/2000/svg",
15026
14937
  fill: "none",
15027
14938
  viewBox: "0 0 24 24",
15028
14939
  stroke: "currentColor"
15029
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
14940
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
15030
14941
  strokeLinecap: "round",
15031
14942
  strokeLinejoin: "round",
15032
14943
  strokeWidth: 2,
@@ -15045,7 +14956,7 @@ const ApplyCouponButton = ({
15045
14956
  disableCouponButton
15046
14957
  },
15047
14958
  dispatch
15048
- } = useContext(store$g);
14959
+ } = useContext(store$f);
15049
14960
  const {
15050
14961
  t
15051
14962
  } = useTranslation("checkoutForm");
@@ -15079,7 +14990,7 @@ const CouponCodeField = props => {
15079
14990
  couponCode,
15080
14991
  couponError
15081
14992
  }
15082
- } = useContext(store$g);
14993
+ } = useContext(store$f);
15083
14994
 
15084
14995
  const onCouponCodeChange = e => {
15085
14996
  dispatch({
@@ -15108,17 +15019,17 @@ const CouponCodeField = props => {
15108
15019
  }, props));
15109
15020
  };
15110
15021
 
15111
- var _path$m;
15022
+ var _path$l;
15112
15023
 
15113
- function _extends$o() { _extends$o = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
15024
+ function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
15114
15025
 
15115
15026
  function SvgTicket(props) {
15116
- return /*#__PURE__*/React.createElement("svg", _extends$o({
15027
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
15117
15028
  xmlns: "http://www.w3.org/2000/svg",
15118
15029
  fill: "none",
15119
15030
  viewBox: "0 0 24 24",
15120
15031
  stroke: "currentColor"
15121
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
15032
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
15122
15033
  strokeLinecap: "round",
15123
15034
  strokeLinejoin: "round",
15124
15035
  strokeWidth: 2,
@@ -15135,7 +15046,7 @@ const CouponCode = ({
15135
15046
  state: {
15136
15047
  enableCouponField
15137
15048
  }
15138
- } = useContext(store$g);
15049
+ } = useContext(store$f);
15139
15050
  const {
15140
15051
  t
15141
15052
  } = useTranslation("checkoutForm");
@@ -15392,7 +15303,7 @@ const PaypalSubscribeButton = props => {
15392
15303
  const {
15393
15304
  dispatch,
15394
15305
  state
15395
- } = useContext(store$g);
15306
+ } = useContext(store$f);
15396
15307
  const {
15397
15308
  product,
15398
15309
  plan,
@@ -15499,16 +15410,16 @@ const BankRedirection = () => {
15499
15410
  }));
15500
15411
  };
15501
15412
 
15502
- var _path$l;
15413
+ var _path$k;
15503
15414
 
15504
- function _extends$n() { _extends$n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
15415
+ function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
15505
15416
 
15506
15417
  function SvgLock(props) {
15507
- return /*#__PURE__*/React.createElement("svg", _extends$n({
15418
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
15508
15419
  xmlns: "http://www.w3.org/2000/svg",
15509
15420
  viewBox: "0 0 20 20",
15510
15421
  fill: "currentColor"
15511
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
15422
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15512
15423
  fillRule: "evenodd",
15513
15424
  d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
15514
15425
  clipRule: "evenodd"
@@ -15525,7 +15436,7 @@ const SelectedPaymentMethod = () => {
15525
15436
  state: {
15526
15437
  isLoading
15527
15438
  }
15528
- } = useContext(store$g);
15439
+ } = useContext(store$f);
15529
15440
  const {
15530
15441
  switchView,
15531
15442
  selectedPaymentMethodId
@@ -15567,7 +15478,7 @@ const TaxAmount = () => {
15567
15478
  state: {
15568
15479
  taxAmount
15569
15480
  }
15570
- } = useContext(store$g);
15481
+ } = useContext(store$f);
15571
15482
  const {
15572
15483
  plan
15573
15484
  } = usePelcro();
@@ -15731,12 +15642,12 @@ function SubscriptionRenewModal({
15731
15642
  }
15732
15643
  SubscriptionRenewModal.viewId = "subscription-renew";
15733
15644
 
15734
- var _path$k;
15645
+ var _path$j;
15735
15646
 
15736
- function _extends$m() { _extends$m = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
15647
+ function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
15737
15648
 
15738
15649
  function SvgGift(props) {
15739
- return /*#__PURE__*/React.createElement("svg", _extends$m({
15650
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
15740
15651
  className: "plc-w-6 plc-h-6 plc-mr-2",
15741
15652
  fill: "none",
15742
15653
  stroke: "currentColor",
@@ -15745,7 +15656,7 @@ function SvgGift(props) {
15745
15656
  strokeWidth: 2,
15746
15657
  viewBox: "0 0 24 24",
15747
15658
  xmlns: "http://www.w3.org/2000/svg"
15748
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15659
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
15749
15660
  d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
15750
15661
  })));
15751
15662
  }
@@ -16086,7 +15997,7 @@ class DefaultNewsLetter extends Component {
16086
15997
 
16087
15998
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
16088
15999
 
16089
- const initialState$f = {
16000
+ const initialState$e = {
16090
16001
  didSubToNewslettersBefore: false,
16091
16002
  newsletters: [],
16092
16003
  isListLoading: true,
@@ -16096,10 +16007,10 @@ const initialState$f = {
16096
16007
  content: ""
16097
16008
  }
16098
16009
  };
16099
- const store$f = /*#__PURE__*/createContext(initialState$f);
16010
+ const store$e = /*#__PURE__*/createContext(initialState$e);
16100
16011
  const {
16101
- Provider: Provider$f
16102
- } = store$f;
16012
+ Provider: Provider$e
16013
+ } = store$e;
16103
16014
 
16104
16015
  const NewsletterUpdateContainer = ({
16105
16016
  style,
@@ -16212,7 +16123,7 @@ const NewsletterUpdateContainer = ({
16212
16123
  default:
16213
16124
  return state;
16214
16125
  }
16215
- }, initialState$f);
16126
+ }, initialState$e);
16216
16127
  useEffect(() => {
16217
16128
  const getUserNewsletters = () => {
16218
16129
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -16256,7 +16167,7 @@ const NewsletterUpdateContainer = ({
16256
16167
  style: { ...style
16257
16168
  },
16258
16169
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
16259
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
16170
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
16260
16171
  value: {
16261
16172
  state,
16262
16173
  dispatch
@@ -16264,12 +16175,12 @@ const NewsletterUpdateContainer = ({
16264
16175
  }, children.length ? children.map((child, i) => {
16265
16176
  if (child) {
16266
16177
  return /*#__PURE__*/React__default.cloneElement(child, {
16267
- store: store$f,
16178
+ store: store$e,
16268
16179
  key: i
16269
16180
  });
16270
16181
  }
16271
16182
  }) : /*#__PURE__*/React__default.cloneElement(children, {
16272
- store: store$f
16183
+ store: store$e
16273
16184
  })));
16274
16185
  };
16275
16186
 
@@ -16284,7 +16195,7 @@ const NewsletterUpdateButton = ({
16284
16195
  isSubmitting,
16285
16196
  isListLoading
16286
16197
  }
16287
- } = useContext(store$f);
16198
+ } = useContext(store$e);
16288
16199
  const {
16289
16200
  t
16290
16201
  } = useTranslation("newsletter");
@@ -16314,7 +16225,7 @@ const NewsletterUpdateList = () => {
16314
16225
  newsletters,
16315
16226
  isListLoading
16316
16227
  }
16317
- } = useContext(store$f);
16228
+ } = useContext(store$e);
16318
16229
 
16319
16230
  if (isListLoading) {
16320
16231
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -16518,7 +16429,7 @@ function SubscriptionCreateModal({
16518
16429
  SubscriptionCreateModal.viewId = "subscription-create";
16519
16430
 
16520
16431
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
16521
- const initialState$e = {
16432
+ const initialState$d = {
16522
16433
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
16523
16434
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
16524
16435
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16531,10 +16442,10 @@ const initialState$e = {
16531
16442
  content: ""
16532
16443
  }
16533
16444
  };
16534
- const store$e = /*#__PURE__*/createContext(initialState$e);
16445
+ const store$d = /*#__PURE__*/createContext(initialState$d);
16535
16446
  const {
16536
- Provider: Provider$e
16537
- } = store$e;
16447
+ Provider: Provider$d
16448
+ } = store$d;
16538
16449
 
16539
16450
  const UserUpdateContainer = ({
16540
16451
  style,
@@ -16666,27 +16577,27 @@ const UserUpdateContainer = ({
16666
16577
  default:
16667
16578
  return state;
16668
16579
  }
16669
- }, initialState$e);
16580
+ }, initialState$d);
16670
16581
  return /*#__PURE__*/React__default.createElement("div", {
16671
16582
  style: { ...style
16672
16583
  },
16673
16584
  className: `pelcro-container pelcro-user-update-container ${className}`
16674
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
16585
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
16675
16586
  value: {
16676
16587
  state,
16677
16588
  dispatch
16678
16589
  }
16679
16590
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16680
- store: store$e,
16591
+ store: store$d,
16681
16592
  key: i
16682
16593
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16683
- store: store$e
16594
+ store: store$d
16684
16595
  })));
16685
16596
  };
16686
16597
 
16687
16598
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
16688
16599
  disabled: true,
16689
- store: store$e
16600
+ store: store$d
16690
16601
  }, props));
16691
16602
 
16692
16603
  const UserUpdateButton = ({
@@ -16699,7 +16610,7 @@ const UserUpdateButton = ({
16699
16610
  buttonDisabled
16700
16611
  },
16701
16612
  dispatch
16702
- } = useContext(store$e);
16613
+ } = useContext(store$d);
16703
16614
  const {
16704
16615
  t
16705
16616
  } = useTranslation("userEdit");
@@ -16716,11 +16627,11 @@ const UserUpdateButton = ({
16716
16627
  };
16717
16628
 
16718
16629
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
16719
- store: store$e
16630
+ store: store$d
16720
16631
  }, props));
16721
16632
 
16722
16633
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
16723
- store: store$e
16634
+ store: store$d
16724
16635
  }, props));
16725
16636
 
16726
16637
  function Phone({
@@ -16749,22 +16660,22 @@ function Phone({
16749
16660
  }
16750
16661
 
16751
16662
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
16752
- store: store$e
16663
+ store: store$d
16753
16664
  }, props));
16754
16665
 
16755
16666
  var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
16756
16667
 
16757
- var _path$j;
16668
+ var _path$i;
16758
16669
 
16759
- function _extends$l() { _extends$l = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
16670
+ function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
16760
16671
 
16761
16672
  function SvgEdit(props) {
16762
- return /*#__PURE__*/React.createElement("svg", _extends$l({
16673
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
16763
16674
  className: "plc-w-6 plc-h-6",
16764
16675
  xmlns: "http://www.w3.org/2000/svg",
16765
16676
  viewBox: "0 0 20 20",
16766
16677
  fill: "currentColor"
16767
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
16678
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
16768
16679
  d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
16769
16680
  })));
16770
16681
  }
@@ -16896,16 +16807,16 @@ function DisplayName({
16896
16807
  }
16897
16808
 
16898
16809
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
16899
- store: store$e
16810
+ store: store$d
16900
16811
  }, props));
16901
16812
 
16902
16813
  const UserUpdateTextInput = props => {
16903
16814
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16904
- store: store$e
16815
+ store: store$d
16905
16816
  }));
16906
16817
  };
16907
16818
 
16908
- const initialState$d = {
16819
+ const initialState$c = {
16909
16820
  isSubmitting: false,
16910
16821
  firstName: "",
16911
16822
  firstNameError: "",
@@ -16930,10 +16841,10 @@ const initialState$d = {
16930
16841
  content: ""
16931
16842
  }
16932
16843
  };
16933
- const store$d = /*#__PURE__*/createContext(initialState$d);
16844
+ const store$c = /*#__PURE__*/createContext(initialState$c);
16934
16845
  const {
16935
- Provider: Provider$d
16936
- } = store$d;
16846
+ Provider: Provider$c
16847
+ } = store$c;
16937
16848
 
16938
16849
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16939
16850
 
@@ -17140,7 +17051,7 @@ const AddressCreateContainer = ({
17140
17051
  default:
17141
17052
  return state;
17142
17053
  }
17143
- }, initialState$d);
17054
+ }, initialState$c);
17144
17055
  useEffect(() => {
17145
17056
  const getStates = () => {
17146
17057
  dispatch({
@@ -17172,16 +17083,16 @@ const AddressCreateContainer = ({
17172
17083
  style: { ...style
17173
17084
  },
17174
17085
  className: `pelcro-container pelcro-address-create-container ${className}`
17175
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
17086
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
17176
17087
  value: {
17177
17088
  state,
17178
17089
  dispatch
17179
17090
  }
17180
17091
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17181
- store: store$d,
17092
+ store: store$c,
17182
17093
  key: i
17183
17094
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17184
- store: store$d
17095
+ store: store$c
17185
17096
  })));
17186
17097
  };
17187
17098
 
@@ -17192,7 +17103,7 @@ function AddressCreateFirstName(props) {
17192
17103
  firstName,
17193
17104
  firstNameError
17194
17105
  }
17195
- } = useContext(store$d);
17106
+ } = useContext(store$c);
17196
17107
 
17197
17108
  const handleBlur = () => {
17198
17109
  return dispatch({
@@ -17235,7 +17146,7 @@ function AddressCreateLastName(props) {
17235
17146
  lastName,
17236
17147
  lastNameError
17237
17148
  }
17238
- } = useContext(store$d);
17149
+ } = useContext(store$c);
17239
17150
 
17240
17151
  const handleBlur = () => {
17241
17152
  return dispatch({
@@ -17278,7 +17189,7 @@ function AddressCreateLine1(props) {
17278
17189
  line1,
17279
17190
  line1Error
17280
17191
  }
17281
- } = useContext(store$d);
17192
+ } = useContext(store$c);
17282
17193
 
17283
17194
  const handleBlur = () => {
17284
17195
  return dispatch({
@@ -17321,7 +17232,7 @@ function AddressCreateCity(props) {
17321
17232
  city,
17322
17233
  cityError
17323
17234
  }
17324
- } = useContext(store$d);
17235
+ } = useContext(store$c);
17325
17236
 
17326
17237
  const handleBlur = () => {
17327
17238
  return dispatch({
@@ -17364,7 +17275,7 @@ function AddressCreatePostalCode(props) {
17364
17275
  postalCode,
17365
17276
  postalCodeError
17366
17277
  }
17367
- } = useContext(store$d);
17278
+ } = useContext(store$c);
17368
17279
 
17369
17280
  const handleBlur = () => {
17370
17281
  return dispatch({
@@ -17410,7 +17321,7 @@ const AddressCreateSubmit = ({
17410
17321
  state: {
17411
17322
  isSubmitting
17412
17323
  }
17413
- } = useContext(store$d);
17324
+ } = useContext(store$c);
17414
17325
  const {
17415
17326
  t
17416
17327
  } = useTranslation("address");
@@ -17521,7 +17432,7 @@ function CountrySelect({
17521
17432
  }
17522
17433
 
17523
17434
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17524
- store: store$d
17435
+ store: store$c
17525
17436
  }, props));
17526
17437
 
17527
17438
  function StateSelect({
@@ -17609,7 +17520,7 @@ function StateSelect({
17609
17520
  }
17610
17521
 
17611
17522
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17612
- store: store$d
17523
+ store: store$c
17613
17524
  }, props));
17614
17525
 
17615
17526
  const AddressCreateView = props => {
@@ -17714,18 +17625,18 @@ AddressCreateModal.viewId = "address-create";
17714
17625
 
17715
17626
  const AddressCreateTextInput = props => {
17716
17627
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17717
- store: store$d
17628
+ store: store$c
17718
17629
  }));
17719
17630
  };
17720
17631
 
17721
17632
  const AddressCreateLine2 = props => {
17722
17633
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17723
17634
  fieldName: "line2",
17724
- store: store$d
17635
+ store: store$c
17725
17636
  }, props));
17726
17637
  };
17727
17638
 
17728
- const initialState$c = {
17639
+ const initialState$b = {
17729
17640
  isSubmitting: false,
17730
17641
  firstName: "",
17731
17642
  firstNameError: "",
@@ -17750,10 +17661,10 @@ const initialState$c = {
17750
17661
  content: ""
17751
17662
  }
17752
17663
  };
17753
- const store$c = /*#__PURE__*/createContext(initialState$c);
17664
+ const store$b = /*#__PURE__*/createContext(initialState$b);
17754
17665
  const {
17755
- Provider: Provider$c
17756
- } = store$c;
17666
+ Provider: Provider$b
17667
+ } = store$b;
17757
17668
 
17758
17669
  const AddressUpdateContainer = ({
17759
17670
  style,
@@ -17805,7 +17716,7 @@ const AddressUpdateContainer = ({
17805
17716
  const thisAddress = addresses[address];
17806
17717
 
17807
17718
  if (+thisAddress.id === +addressId) {
17808
- const newState = { ...initialState$c,
17719
+ const newState = { ...initialState$b,
17809
17720
  firstName: thisAddress.first_name,
17810
17721
  lastName: thisAddress.last_name,
17811
17722
  line1: thisAddress.line1,
@@ -17938,7 +17849,7 @@ const AddressUpdateContainer = ({
17938
17849
  default:
17939
17850
  return state;
17940
17851
  }
17941
- }, initialState$c);
17852
+ }, initialState$b);
17942
17853
  useEffect(() => {
17943
17854
  const getStates = () => {
17944
17855
  dispatch({
@@ -17970,21 +17881,21 @@ const AddressUpdateContainer = ({
17970
17881
  style: { ...style
17971
17882
  },
17972
17883
  className: `pelcro-container pelcro-address-update-container ${className}`
17973
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
17884
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
17974
17885
  value: {
17975
17886
  state,
17976
17887
  dispatch
17977
17888
  }
17978
17889
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17979
- store: store$c,
17890
+ store: store$b,
17980
17891
  key: i
17981
17892
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17982
- store: store$c
17893
+ store: store$b
17983
17894
  })));
17984
17895
  };
17985
17896
 
17986
17897
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17987
- store: store$c
17898
+ store: store$b
17988
17899
  }, props));
17989
17900
 
17990
17901
  function AddressUpdateFirstName(props) {
@@ -17994,7 +17905,7 @@ function AddressUpdateFirstName(props) {
17994
17905
  firstName,
17995
17906
  firstNameError
17996
17907
  }
17997
- } = useContext(store$c);
17908
+ } = useContext(store$b);
17998
17909
 
17999
17910
  const handleBlur = () => {
18000
17911
  return dispatch({
@@ -18037,7 +17948,7 @@ function AddressUpdateLastName(props) {
18037
17948
  lastName,
18038
17949
  lastNameError
18039
17950
  }
18040
- } = useContext(store$c);
17951
+ } = useContext(store$b);
18041
17952
 
18042
17953
  const handleBlur = () => {
18043
17954
  return dispatch({
@@ -18080,7 +17991,7 @@ function AddressUpdateLine1(props) {
18080
17991
  line1,
18081
17992
  line1Error
18082
17993
  }
18083
- } = useContext(store$c);
17994
+ } = useContext(store$b);
18084
17995
 
18085
17996
  const handleBlur = () => {
18086
17997
  return dispatch({
@@ -18120,7 +18031,7 @@ const AddressUpdateLine2 = props => {
18120
18031
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
18121
18032
  fieldName: "line2"
18122
18033
  }, props, {
18123
- store: store$c
18034
+ store: store$b
18124
18035
  }));
18125
18036
  };
18126
18037
 
@@ -18131,7 +18042,7 @@ function AddressUpdateCity(props) {
18131
18042
  city,
18132
18043
  cityError
18133
18044
  }
18134
- } = useContext(store$c);
18045
+ } = useContext(store$b);
18135
18046
 
18136
18047
  const handleBlur = () => {
18137
18048
  return dispatch({
@@ -18174,7 +18085,7 @@ function AddressUpdatePostalCode(props) {
18174
18085
  postalCode,
18175
18086
  postalCodeError
18176
18087
  }
18177
- } = useContext(store$c);
18088
+ } = useContext(store$b);
18178
18089
 
18179
18090
  const handleBlur = () => {
18180
18091
  return dispatch({
@@ -18220,7 +18131,7 @@ const AddressUpdateSubmit = ({
18220
18131
  state: {
18221
18132
  isSubmitting
18222
18133
  }
18223
- } = useContext(store$c);
18134
+ } = useContext(store$b);
18224
18135
  const {
18225
18136
  t
18226
18137
  } = useTranslation("address");
@@ -18236,7 +18147,7 @@ const AddressUpdateSubmit = ({
18236
18147
  };
18237
18148
 
18238
18149
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
18239
- store: store$c
18150
+ store: store$b
18240
18151
  }, props));
18241
18152
 
18242
18153
  const AddressUpdateView = props => {
@@ -18319,7 +18230,7 @@ AddressUpdateModal.viewId = "address-edit";
18319
18230
 
18320
18231
  const AddressUpdateTextInput = props => {
18321
18232
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
18322
- store: store$c
18233
+ store: store$b
18323
18234
  }));
18324
18235
  };
18325
18236
 
@@ -18402,7 +18313,7 @@ const PaymentMethodUpdateModal = props => {
18402
18313
  };
18403
18314
  PaymentMethodUpdateModal.viewId = "payment-method-update";
18404
18315
 
18405
- const initialState$b = {
18316
+ const initialState$a = {
18406
18317
  email: "",
18407
18318
  password: "",
18408
18319
  passwordError: null,
@@ -18415,10 +18326,10 @@ const initialState$b = {
18415
18326
  content: ""
18416
18327
  }
18417
18328
  };
18418
- const store$b = /*#__PURE__*/createContext(initialState$b);
18329
+ const store$a = /*#__PURE__*/createContext(initialState$a);
18419
18330
  const {
18420
- Provider: Provider$b
18421
- } = store$b;
18331
+ Provider: Provider$a
18332
+ } = store$a;
18422
18333
 
18423
18334
  const PasswordResetContainer = ({
18424
18335
  style,
@@ -18475,7 +18386,7 @@ const PasswordResetContainer = ({
18475
18386
  type: SET_EMAIL,
18476
18387
  payload: window.Pelcro.helpers.getURLParameter("email")
18477
18388
  });
18478
- initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18389
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
18479
18390
  dispatch({
18480
18391
  type: SET_TOKEN,
18481
18392
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18535,26 +18446,26 @@ const PasswordResetContainer = ({
18535
18446
  default:
18536
18447
  return state;
18537
18448
  }
18538
- }, initialState$b);
18449
+ }, initialState$a);
18539
18450
  return /*#__PURE__*/React__default.createElement("div", {
18540
18451
  style: { ...style
18541
18452
  },
18542
18453
  className: `pelcro-container pelcro-password-reset-container ${className}`
18543
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
18454
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
18544
18455
  value: {
18545
18456
  state,
18546
18457
  dispatch
18547
18458
  }
18548
18459
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18549
- store: store$b,
18460
+ store: store$a,
18550
18461
  key: i
18551
18462
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18552
- store: store$b
18463
+ store: store$a
18553
18464
  })));
18554
18465
  };
18555
18466
 
18556
18467
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
18557
- store: store$b
18468
+ store: store$a
18558
18469
  }, props));
18559
18470
 
18560
18471
  const PasswordResetButton = ({
@@ -18567,7 +18478,7 @@ const PasswordResetButton = ({
18567
18478
  buttonDisabled
18568
18479
  },
18569
18480
  dispatch
18570
- } = useContext(store$b);
18481
+ } = useContext(store$a);
18571
18482
  const {
18572
18483
  t
18573
18484
  } = useTranslation("passwordReset");
@@ -18584,14 +18495,14 @@ const PasswordResetButton = ({
18584
18495
  };
18585
18496
 
18586
18497
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18587
- store: store$b
18498
+ store: store$a
18588
18499
  }, props, {
18589
18500
  value: window.Pelcro.helpers.getURLParameter("email"),
18590
18501
  disabled: true
18591
18502
  }));
18592
18503
 
18593
18504
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
18594
- store: store$b
18505
+ store: store$a
18595
18506
  }, props));
18596
18507
 
18597
18508
  const PasswordResetView = props => {
@@ -18643,7 +18554,7 @@ const PasswordResetModal = ({
18643
18554
  };
18644
18555
  PasswordResetModal.viewId = "password-reset";
18645
18556
 
18646
- const initialState$a = {
18557
+ const initialState$9 = {
18647
18558
  email: "",
18648
18559
  emailError: null,
18649
18560
  buttonDisabled: false,
@@ -18652,10 +18563,10 @@ const initialState$a = {
18652
18563
  content: ""
18653
18564
  }
18654
18565
  };
18655
- const store$a = /*#__PURE__*/createContext(initialState$a);
18566
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
18656
18567
  const {
18657
- Provider: Provider$a
18658
- } = store$a;
18568
+ Provider: Provider$9
18569
+ } = store$9;
18659
18570
 
18660
18571
  const PasswordForgotContainer = ({
18661
18572
  style,
@@ -18733,21 +18644,21 @@ const PasswordForgotContainer = ({
18733
18644
  default:
18734
18645
  return state;
18735
18646
  }
18736
- }, initialState$a);
18647
+ }, initialState$9);
18737
18648
  return /*#__PURE__*/React__default.createElement("div", {
18738
18649
  style: { ...style
18739
18650
  },
18740
18651
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18741
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
18652
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
18742
18653
  value: {
18743
18654
  state,
18744
18655
  dispatch
18745
18656
  }
18746
18657
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18747
- store: store$a,
18658
+ store: store$9,
18748
18659
  key: i
18749
18660
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18750
- store: store$a
18661
+ store: store$9
18751
18662
  })));
18752
18663
  };
18753
18664
 
@@ -18763,7 +18674,7 @@ const PasswordForgotButton = ({
18763
18674
  emailError
18764
18675
  },
18765
18676
  dispatch
18766
- } = useContext(store$a);
18677
+ } = useContext(store$9);
18767
18678
  const {
18768
18679
  t
18769
18680
  } = useTranslation("passwordForgot");
@@ -18784,7 +18695,7 @@ const PasswordForgotButton = ({
18784
18695
  };
18785
18696
 
18786
18697
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18787
- store: store$a
18698
+ store: store$9
18788
18699
  }, props));
18789
18700
 
18790
18701
  const PasswordForgotView = props => {
@@ -18834,7 +18745,7 @@ const PasswordForgotModal = ({
18834
18745
  };
18835
18746
  PasswordForgotModal.viewId = "password-forgot";
18836
18747
 
18837
- const initialState$9 = {
18748
+ const initialState$8 = {
18838
18749
  currentPassword: "",
18839
18750
  newPassword: "",
18840
18751
  confirmNewPassword: "",
@@ -18848,10 +18759,10 @@ const initialState$9 = {
18848
18759
  content: ""
18849
18760
  }
18850
18761
  };
18851
- const store$9 = /*#__PURE__*/createContext(initialState$9);
18762
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
18852
18763
  const {
18853
- Provider: Provider$9
18854
- } = store$9;
18764
+ Provider: Provider$8
18765
+ } = store$8;
18855
18766
  const PasswordChangeContainer = ({
18856
18767
  style,
18857
18768
  className = "",
@@ -19003,21 +18914,21 @@ const PasswordChangeContainer = ({
19003
18914
  default:
19004
18915
  return state;
19005
18916
  }
19006
- }, initialState$9);
18917
+ }, initialState$8);
19007
18918
  return /*#__PURE__*/React__default.createElement("div", {
19008
18919
  style: { ...style
19009
18920
  },
19010
18921
  className: `pelcro-container pelcro-password-change-container ${className}`
19011
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
18922
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
19012
18923
  value: {
19013
18924
  state,
19014
18925
  dispatch
19015
18926
  }
19016
18927
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19017
- store: store$9,
18928
+ store: store$8,
19018
18929
  key: i
19019
18930
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19020
- store: store$9
18931
+ store: store$8
19021
18932
  })));
19022
18933
  };
19023
18934
 
@@ -19028,7 +18939,7 @@ function PasswordChangeCurrentPassword(props) {
19028
18939
  currentPassword,
19029
18940
  currentPasswordError
19030
18941
  }
19031
- } = useContext(store$9);
18942
+ } = useContext(store$8);
19032
18943
  const handleBlur = useCallback(() => {
19033
18944
  return dispatch({
19034
18945
  type: VALIDATE_PASSWORD
@@ -19062,7 +18973,7 @@ function PasswordChangeNewPassword(props) {
19062
18973
  newPassword,
19063
18974
  newPasswordError
19064
18975
  }
19065
- } = useContext(store$9);
18976
+ } = useContext(store$8);
19066
18977
  const handleBlur = useCallback(() => {
19067
18978
  return dispatch({
19068
18979
  type: VALIDATE_NEW_PASSWORD
@@ -19096,7 +19007,7 @@ function PasswordChangeConfirmNewPassword(props) {
19096
19007
  confirmNewPassword,
19097
19008
  confirmNewPasswordError
19098
19009
  }
19099
- } = useContext(store$9);
19010
+ } = useContext(store$8);
19100
19011
  const handleBlur = useCallback(() => {
19101
19012
  return dispatch({
19102
19013
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -19137,7 +19048,7 @@ const PasswordChangeButton = ({
19137
19048
  confirmNewPasswordError
19138
19049
  },
19139
19050
  dispatch
19140
- } = useContext(store$9);
19051
+ } = useContext(store$8);
19141
19052
  const {
19142
19053
  t
19143
19054
  } = useTranslation("passwordChange");
@@ -19203,17 +19114,17 @@ const PasswordChangeModal = ({
19203
19114
  };
19204
19115
  PasswordChangeModal.viewId = "password-change";
19205
19116
 
19206
- const initialState$8 = {
19117
+ const initialState$7 = {
19207
19118
  buttonDisabled: false,
19208
19119
  alert: {
19209
19120
  type: "error",
19210
19121
  content: ""
19211
19122
  }
19212
19123
  };
19213
- const store$8 = /*#__PURE__*/createContext(initialState$8);
19124
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
19214
19125
  const {
19215
- Provider: Provider$8
19216
- } = store$8;
19126
+ Provider: Provider$7
19127
+ } = store$7;
19217
19128
 
19218
19129
  const CartContainer = ({
19219
19130
  style,
@@ -19304,21 +19215,21 @@ const CartContainer = ({
19304
19215
  default:
19305
19216
  return state;
19306
19217
  }
19307
- }, initialState$8);
19218
+ }, initialState$7);
19308
19219
  return /*#__PURE__*/React__default.createElement("div", {
19309
19220
  style: { ...style
19310
19221
  },
19311
19222
  className: `pelcro-container pelcro-cart-container ${className}`
19312
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
19223
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
19313
19224
  value: {
19314
19225
  state,
19315
19226
  dispatch
19316
19227
  }
19317
19228
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19318
- store: store$8,
19229
+ store: store$7,
19319
19230
  key: i
19320
19231
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19321
- store: store$8
19232
+ store: store$7
19322
19233
  })));
19323
19234
  };
19324
19235
 
@@ -19355,7 +19266,7 @@ const CartSubmit = ({
19355
19266
  buttonDisabled
19356
19267
  },
19357
19268
  dispatch
19358
- } = useContext(store$8);
19269
+ } = useContext(store$7);
19359
19270
  const {
19360
19271
  t
19361
19272
  } = useTranslation("cart");
@@ -19386,7 +19297,7 @@ const CartTotalPrice = () => {
19386
19297
  state: {
19387
19298
  alert
19388
19299
  }
19389
- } = useContext(store$8);
19300
+ } = useContext(store$7);
19390
19301
  const {
19391
19302
  cartItems
19392
19303
  } = usePelcro();
@@ -19699,7 +19610,7 @@ const OrderConfirmModal = props => {
19699
19610
  };
19700
19611
  OrderConfirmModal.viewId = "order-confirm";
19701
19612
 
19702
- const initialState$7 = {
19613
+ const initialState$6 = {
19703
19614
  email: "",
19704
19615
  firstName: "",
19705
19616
  lastName: "",
@@ -19711,10 +19622,10 @@ const initialState$7 = {
19711
19622
  content: ""
19712
19623
  }
19713
19624
  };
19714
- const store$7 = /*#__PURE__*/createContext(initialState$7);
19625
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
19715
19626
  const {
19716
- Provider: Provider$7
19717
- } = store$7;
19627
+ Provider: Provider$6
19628
+ } = store$6;
19718
19629
 
19719
19630
  const GiftCreateContainer = ({
19720
19631
  style,
@@ -19818,21 +19729,21 @@ const GiftCreateContainer = ({
19818
19729
  default:
19819
19730
  return state;
19820
19731
  }
19821
- }, initialState$7);
19732
+ }, initialState$6);
19822
19733
  return /*#__PURE__*/React__default.createElement("div", {
19823
19734
  style: { ...style
19824
19735
  },
19825
19736
  className: `pelcro-container pelcro-gift-create-container ${className}`
19826
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
19737
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
19827
19738
  value: {
19828
19739
  state,
19829
19740
  dispatch
19830
19741
  }
19831
19742
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19832
- store: store$7,
19743
+ store: store$6,
19833
19744
  key: i
19834
19745
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19835
- store: store$7
19746
+ store: store$6
19836
19747
  })));
19837
19748
  };
19838
19749
 
@@ -19846,7 +19757,7 @@ const GiftCreateSubmitButton = ({
19846
19757
  state: {
19847
19758
  disableSubmit
19848
19759
  }
19849
- } = useContext(store$7);
19760
+ } = useContext(store$6);
19850
19761
  const {
19851
19762
  t
19852
19763
  } = useTranslation("register");
@@ -19863,29 +19774,29 @@ const GiftCreateSubmitButton = ({
19863
19774
 
19864
19775
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
19865
19776
  initWithUserEmail: false,
19866
- store: store$7
19777
+ store: store$6
19867
19778
  }, props));
19868
19779
 
19869
19780
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
19870
- store: store$7
19781
+ store: store$6
19871
19782
  }, props));
19872
19783
 
19873
19784
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
19874
- store: store$7
19785
+ store: store$6
19875
19786
  }, props));
19876
19787
 
19877
- var _path$i;
19788
+ var _path$h;
19878
19789
 
19879
- function _extends$k() { _extends$k = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
19790
+ function _extends$j() { _extends$j = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
19880
19791
 
19881
19792
  function SvgInfoCircle(props) {
19882
- return /*#__PURE__*/React.createElement("svg", _extends$k({
19793
+ return /*#__PURE__*/React.createElement("svg", _extends$j({
19883
19794
  xmlns: "http://www.w3.org/2000/svg",
19884
19795
  className: "plc-w-5 plc-h-5",
19885
19796
  fill: "none",
19886
19797
  viewBox: "0 0 24 24",
19887
19798
  stroke: "currentColor"
19888
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
19799
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
19889
19800
  strokeLinecap: "round",
19890
19801
  strokeLinejoin: "round",
19891
19802
  strokeWidth: 2,
@@ -19956,7 +19867,7 @@ const GiftCreateStartDate = props => {
19956
19867
  const {
19957
19868
  dispatch,
19958
19869
  state
19959
- } = useContext(store$7);
19870
+ } = useContext(store$6);
19960
19871
 
19961
19872
  const handleInputChange = value => {
19962
19873
  dispatch({
@@ -20029,7 +19940,7 @@ function GiftCreateMessage(props) {
20029
19940
  const {
20030
19941
  dispatch,
20031
19942
  state
20032
- } = useContext(store$7);
19943
+ } = useContext(store$6);
20033
19944
  const MAX_CHARS_COUNT = 200;
20034
19945
  const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
20035
19946
 
@@ -20153,7 +20064,7 @@ const GiftCreateModal = ({
20153
20064
  };
20154
20065
  GiftCreateModal.viewId = "gift-create";
20155
20066
 
20156
- const initialState$6 = {
20067
+ const initialState$5 = {
20157
20068
  giftCode: "",
20158
20069
  buttonDisabled: true,
20159
20070
  alert: {
@@ -20161,10 +20072,10 @@ const initialState$6 = {
20161
20072
  content: ""
20162
20073
  }
20163
20074
  };
20164
- const store$6 = /*#__PURE__*/createContext(initialState$6);
20075
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
20165
20076
  const {
20166
- Provider: Provider$6
20167
- } = store$6;
20077
+ Provider: Provider$5
20078
+ } = store$5;
20168
20079
 
20169
20080
  const GiftRedeemContainer = ({
20170
20081
  style,
@@ -20229,21 +20140,21 @@ const GiftRedeemContainer = ({
20229
20140
  default:
20230
20141
  return state;
20231
20142
  }
20232
- }, initialState$6);
20143
+ }, initialState$5);
20233
20144
  return /*#__PURE__*/React__default.createElement("div", {
20234
20145
  style: { ...style
20235
20146
  },
20236
20147
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
20237
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
20148
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
20238
20149
  value: {
20239
20150
  state,
20240
20151
  dispatch
20241
20152
  }
20242
20153
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20243
- store: store$6,
20154
+ store: store$5,
20244
20155
  key: i
20245
20156
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20246
- store: store$6
20157
+ store: store$5
20247
20158
  })));
20248
20159
  };
20249
20160
 
@@ -20280,7 +20191,7 @@ function GiftCode({
20280
20191
  }
20281
20192
 
20282
20193
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
20283
- store: store$6
20194
+ store: store$5
20284
20195
  }, props));
20285
20196
 
20286
20197
  const GiftRedeemSubmitButton = ({
@@ -20293,7 +20204,7 @@ const GiftRedeemSubmitButton = ({
20293
20204
  state: {
20294
20205
  disableSubmit
20295
20206
  }
20296
- } = useContext(store$6);
20207
+ } = useContext(store$5);
20297
20208
  const {
20298
20209
  t
20299
20210
  } = useTranslation("register");
@@ -20386,7 +20297,7 @@ const moveDefaultAddressToStart = addresses => {
20386
20297
  return [defaultAddress, ...addressesWithoutDefault];
20387
20298
  };
20388
20299
 
20389
- const initialState$5 = {
20300
+ const initialState$4 = {
20390
20301
  addresses: [],
20391
20302
  selectedAddressId: null,
20392
20303
  isSubmitting: false,
@@ -20395,10 +20306,10 @@ const initialState$5 = {
20395
20306
  content: ""
20396
20307
  }
20397
20308
  };
20398
- const store$5 = /*#__PURE__*/createContext(initialState$5);
20309
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
20399
20310
  const {
20400
- Provider: Provider$5
20401
- } = store$5;
20311
+ Provider: Provider$4
20312
+ } = store$4;
20402
20313
 
20403
20314
  const AddressSelectContainer = ({
20404
20315
  style,
@@ -20493,7 +20404,7 @@ const AddressSelectContainer = ({
20493
20404
  default:
20494
20405
  return state;
20495
20406
  }
20496
- }, initialState$5);
20407
+ }, initialState$4);
20497
20408
  useEffect(() => {
20498
20409
  var _window$Pelcro$user$r;
20499
20410
 
@@ -20506,16 +20417,16 @@ const AddressSelectContainer = ({
20506
20417
  style: { ...style
20507
20418
  },
20508
20419
  className: `pelcro-container pelcro-address-select-container ${className}`
20509
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
20420
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
20510
20421
  value: {
20511
20422
  state,
20512
20423
  dispatch
20513
20424
  }
20514
20425
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20515
- store: store$5,
20426
+ store: store$4,
20516
20427
  key: i
20517
20428
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20518
- store: store$5
20429
+ store: store$4
20519
20430
  })));
20520
20431
  };
20521
20432
 
@@ -20526,7 +20437,7 @@ const AddressSelectList = () => {
20526
20437
  addresses,
20527
20438
  selectedAddressId
20528
20439
  }
20529
- } = useContext(store$5);
20440
+ } = useContext(store$4);
20530
20441
 
20531
20442
  const handleAddressSelect = event => {
20532
20443
  dispatch({
@@ -20570,7 +20481,7 @@ const AddressSelectSubmit = ({
20570
20481
  selectedAddressId,
20571
20482
  isSubmitting
20572
20483
  }
20573
- } = useContext(store$5);
20484
+ } = useContext(store$4);
20574
20485
  const {
20575
20486
  t
20576
20487
  } = useTranslation("address");
@@ -20666,7 +20577,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20666
20577
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20667
20578
  };
20668
20579
 
20669
- const initialState$4 = {
20580
+ const initialState$3 = {
20670
20581
  paymentMethods: [],
20671
20582
  selectedPaymentMethodId: null,
20672
20583
  isSubmitting: false,
@@ -20675,10 +20586,10 @@ const initialState$4 = {
20675
20586
  content: ""
20676
20587
  }
20677
20588
  };
20678
- const store$4 = /*#__PURE__*/createContext(initialState$4);
20589
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
20679
20590
  const {
20680
- Provider: Provider$4
20681
- } = store$4;
20591
+ Provider: Provider$3
20592
+ } = store$3;
20682
20593
 
20683
20594
  const PaymentMethodSelectContainer = ({
20684
20595
  style,
@@ -20737,7 +20648,7 @@ const PaymentMethodSelectContainer = ({
20737
20648
  default:
20738
20649
  return state;
20739
20650
  }
20740
- }, initialState$4);
20651
+ }, initialState$3);
20741
20652
  useEffect(() => {
20742
20653
  var _window$Pelcro$user$r3;
20743
20654
 
@@ -20750,16 +20661,16 @@ const PaymentMethodSelectContainer = ({
20750
20661
  style: { ...style
20751
20662
  },
20752
20663
  className: `pelcro-container pelcro-payment-select-container ${className}`
20753
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
20664
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
20754
20665
  value: {
20755
20666
  state,
20756
20667
  dispatch
20757
20668
  }
20758
20669
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20759
- store: store$4,
20670
+ store: store$3,
20760
20671
  key: i
20761
20672
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20762
- store: store$4
20673
+ store: store$3
20763
20674
  })));
20764
20675
  };
20765
20676
 
@@ -20773,7 +20684,7 @@ const PaymentMethodSelectList = () => {
20773
20684
  paymentMethods,
20774
20685
  selectedPaymentMethodId
20775
20686
  }
20776
- } = useContext(store$4);
20687
+ } = useContext(store$3);
20777
20688
 
20778
20689
  const handlePaymentMethodSelect = event => {
20779
20690
  dispatch({
@@ -20823,7 +20734,7 @@ const PaymentMethodSelectSubmit = ({
20823
20734
  selectedPaymentMethodId,
20824
20735
  isSubmitting
20825
20736
  }
20826
- } = useContext(store$4);
20737
+ } = useContext(store$3);
20827
20738
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
20828
20739
  onClick: () => {
20829
20740
  dispatch({
@@ -20897,8 +20808,8 @@ const PaymentMethodSelectModal = ({
20897
20808
  };
20898
20809
  PaymentMethodSelectModal.viewId = "payment-method-select";
20899
20810
 
20900
- function _extends$j() {
20901
- _extends$j = Object.assign || function (target) {
20811
+ function _extends$i() {
20812
+ _extends$i = Object.assign || function (target) {
20902
20813
  for (var i = 1; i < arguments.length; i++) {
20903
20814
  var source = arguments[i];
20904
20815
 
@@ -20912,7 +20823,7 @@ function _extends$j() {
20912
20823
  return target;
20913
20824
  };
20914
20825
 
20915
- return _extends$j.apply(this, arguments);
20826
+ return _extends$i.apply(this, arguments);
20916
20827
  }
20917
20828
 
20918
20829
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -21096,7 +21007,7 @@ function render(props, propsBag, defaultTag, features, visible) {
21096
21007
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
21097
21008
  return null;
21098
21009
  }, _match[RenderStrategy.Hidden] = function () {
21099
- return _render(_extends$j({}, _rest, {
21010
+ return _render(_extends$i({}, _rest, {
21100
21011
  hidden: true,
21101
21012
  style: {
21102
21013
  display: 'none'
@@ -21624,7 +21535,7 @@ function TransitionChild(props) {
21624
21535
  var passthroughProps = rest;
21625
21536
  return React__default.createElement(NestingContext.Provider, {
21626
21537
  value: nesting
21627
- }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21538
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21628
21539
  }
21629
21540
 
21630
21541
  function Transition(props) {
@@ -21668,7 +21579,7 @@ function Transition(props) {
21668
21579
  value: nestingBag
21669
21580
  }, React__default.createElement(TransitionContext.Provider, {
21670
21581
  value: transitionBag
21671
- }, render(_extends$j({}, sharedProps, {
21582
+ }, render(_extends$i({}, sharedProps, {
21672
21583
  as: Fragment,
21673
21584
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21674
21585
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21795,12 +21706,12 @@ var ActionTypes;
21795
21706
  })(ActionTypes || (ActionTypes = {}));
21796
21707
 
21797
21708
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21798
- return _extends$j({}, state, {
21709
+ return _extends$i({}, state, {
21799
21710
  activeItemIndex: null,
21800
21711
  menuState: MenuStates.Closed
21801
21712
  });
21802
21713
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21803
- return _extends$j({}, state, {
21714
+ return _extends$i({}, state, {
21804
21715
  menuState: MenuStates.Open
21805
21716
  });
21806
21717
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21819,7 +21730,7 @@ var ActionTypes;
21819
21730
  }
21820
21731
  });
21821
21732
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21822
- return _extends$j({}, state, {
21733
+ return _extends$i({}, state, {
21823
21734
  searchQuery: '',
21824
21735
  activeItemIndex: activeItemIndex
21825
21736
  });
@@ -21830,19 +21741,19 @@ var ActionTypes;
21830
21741
 
21831
21742
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21832
21743
  });
21833
- if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21744
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21834
21745
  searchQuery: searchQuery
21835
21746
  });
21836
- return _extends$j({}, state, {
21747
+ return _extends$i({}, state, {
21837
21748
  searchQuery: searchQuery,
21838
21749
  activeItemIndex: match
21839
21750
  });
21840
21751
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21841
- return _extends$j({}, state, {
21752
+ return _extends$i({}, state, {
21842
21753
  searchQuery: ''
21843
21754
  });
21844
21755
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21845
- return _extends$j({}, state, {
21756
+ return _extends$i({}, state, {
21846
21757
  items: [].concat(state.items, [{
21847
21758
  id: action.id,
21848
21759
  dataRef: action.dataRef
@@ -21855,7 +21766,7 @@ var ActionTypes;
21855
21766
  return a.id === action.id;
21856
21767
  });
21857
21768
  if (idx !== -1) nextItems.splice(idx, 1);
21858
- return _extends$j({}, state, {
21769
+ return _extends$i({}, state, {
21859
21770
  items: nextItems,
21860
21771
  activeItemIndex: function () {
21861
21772
  if (idx === state.activeItemIndex) return null;
@@ -21894,19 +21805,19 @@ var ActionTypes$1;
21894
21805
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21895
21806
  if (state.disabled) return state;
21896
21807
  if (state.listboxState === ListboxStates.Closed) return state;
21897
- return _extends$j({}, state, {
21808
+ return _extends$i({}, state, {
21898
21809
  activeOptionIndex: null,
21899
21810
  listboxState: ListboxStates.Closed
21900
21811
  });
21901
21812
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21902
21813
  if (state.disabled) return state;
21903
21814
  if (state.listboxState === ListboxStates.Open) return state;
21904
- return _extends$j({}, state, {
21815
+ return _extends$i({}, state, {
21905
21816
  listboxState: ListboxStates.Open
21906
21817
  });
21907
21818
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21908
21819
  if (state.disabled === action.disabled) return state;
21909
- return _extends$j({}, state, {
21820
+ return _extends$i({}, state, {
21910
21821
  disabled: action.disabled
21911
21822
  });
21912
21823
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21927,7 +21838,7 @@ var ActionTypes$1;
21927
21838
  }
21928
21839
  });
21929
21840
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21930
- return _extends$j({}, state, {
21841
+ return _extends$i({}, state, {
21931
21842
  searchQuery: '',
21932
21843
  activeOptionIndex: activeOptionIndex
21933
21844
  });
@@ -21940,10 +21851,10 @@ var ActionTypes$1;
21940
21851
 
21941
21852
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21942
21853
  });
21943
- if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21854
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21944
21855
  searchQuery: searchQuery
21945
21856
  });
21946
- return _extends$j({}, state, {
21857
+ return _extends$i({}, state, {
21947
21858
  searchQuery: searchQuery,
21948
21859
  activeOptionIndex: match
21949
21860
  });
@@ -21951,11 +21862,11 @@ var ActionTypes$1;
21951
21862
  if (state.disabled) return state;
21952
21863
  if (state.listboxState === ListboxStates.Closed) return state;
21953
21864
  if (state.searchQuery === '') return state;
21954
- return _extends$j({}, state, {
21865
+ return _extends$i({}, state, {
21955
21866
  searchQuery: ''
21956
21867
  });
21957
21868
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21958
- return _extends$j({}, state, {
21869
+ return _extends$i({}, state, {
21959
21870
  options: [].concat(state.options, [{
21960
21871
  id: action.id,
21961
21872
  dataRef: action.dataRef
@@ -21968,7 +21879,7 @@ var ActionTypes$1;
21968
21879
  return a.id === action.id;
21969
21880
  });
21970
21881
  if (idx !== -1) nextOptions.splice(idx, 1);
21971
- return _extends$j({}, state, {
21882
+ return _extends$i({}, state, {
21972
21883
  options: nextOptions,
21973
21884
  activeOptionIndex: function () {
21974
21885
  if (idx === state.activeOptionIndex) return null;
@@ -22029,18 +21940,18 @@ const getPaymentCardIcon = name => {
22029
21940
  }));
22030
21941
  };
22031
21942
 
22032
- var _path$h;
21943
+ var _path$g;
22033
21944
 
22034
- function _extends$i() { _extends$i = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$i.apply(this, arguments); }
21945
+ function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
22035
21946
 
22036
21947
  function SvgChevronRight(props) {
22037
- return /*#__PURE__*/React.createElement("svg", _extends$i({
21948
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
22038
21949
  className: "plc-w-6 plc-h-6",
22039
21950
  xmlns: "http://www.w3.org/2000/svg",
22040
21951
  fill: "none",
22041
21952
  viewBox: "0 0 24 24",
22042
21953
  stroke: "currentColor"
22043
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
21954
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
22044
21955
  strokeLinecap: "round",
22045
21956
  strokeLinejoin: "round",
22046
21957
  strokeWidth: 2,
@@ -22256,18 +22167,18 @@ const SavedItems = ({
22256
22167
  });
22257
22168
  };
22258
22169
 
22259
- var _path$g;
22170
+ var _path$f;
22260
22171
 
22261
- function _extends$h() { _extends$h = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
22172
+ function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
22262
22173
 
22263
22174
  function SvgRefresh(props) {
22264
- return /*#__PURE__*/React.createElement("svg", _extends$h({
22175
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
22265
22176
  className: "plc-w-4 plc-h-4 plc-mr-1",
22266
22177
  xmlns: "http://www.w3.org/2000/svg",
22267
22178
  fill: "none",
22268
22179
  viewBox: "0 0 24 24",
22269
22180
  stroke: "currentColor"
22270
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
22181
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22271
22182
  strokeLinecap: "round",
22272
22183
  strokeLinejoin: "round",
22273
22184
  strokeWidth: 2,
@@ -22275,35 +22186,35 @@ function SvgRefresh(props) {
22275
22186
  })));
22276
22187
  }
22277
22188
 
22278
- var _path$f;
22189
+ var _path$e;
22279
22190
 
22280
- function _extends$g() { _extends$g = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
22191
+ function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
22281
22192
 
22282
22193
  function SvgCalendar(props) {
22283
- return /*#__PURE__*/React.createElement("svg", _extends$g({
22194
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
22284
22195
  xmlns: "http://www.w3.org/2000/svg",
22285
22196
  className: "plc-h-4 plc-w-4 plc-mr-1",
22286
22197
  viewBox: "0 0 20 20",
22287
22198
  fill: "currentColor"
22288
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22199
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22289
22200
  fillRule: "evenodd",
22290
22201
  d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
22291
22202
  clipRule: "evenodd"
22292
22203
  })));
22293
22204
  }
22294
22205
 
22295
- var _path$e;
22206
+ var _path$d;
22296
22207
 
22297
- function _extends$f() { _extends$f = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
22208
+ function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
22298
22209
 
22299
22210
  function SvgPlus(props) {
22300
- return /*#__PURE__*/React.createElement("svg", _extends$f({
22211
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
22301
22212
  className: "plc-w-5 plc-h-5",
22302
22213
  xmlns: "http://www.w3.org/2000/svg",
22303
22214
  fill: "none",
22304
22215
  viewBox: "0 0 24 24",
22305
22216
  stroke: "currentColor"
22306
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22217
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22307
22218
  strokeLinecap: "round",
22308
22219
  strokeLinejoin: "round",
22309
22220
  strokeWidth: 2,
@@ -22311,17 +22222,17 @@ function SvgPlus(props) {
22311
22222
  })));
22312
22223
  }
22313
22224
 
22314
- var _path$d;
22225
+ var _path$c;
22315
22226
 
22316
- function _extends$e() { _extends$e = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
22227
+ function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22317
22228
 
22318
22229
  function SvgCheckMark(props) {
22319
- return /*#__PURE__*/React.createElement("svg", _extends$e({
22230
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
22320
22231
  className: "plc-w-4 plc-h-4 plc-mr-1",
22321
22232
  xmlns: "http://www.w3.org/2000/svg",
22322
22233
  viewBox: "0 0 20 20",
22323
22234
  fill: "currentColor"
22324
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22235
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22325
22236
  fillRule: "evenodd",
22326
22237
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
22327
22238
  clipRule: "evenodd"
@@ -22385,8 +22296,7 @@ const SubscriptionsItems = ({
22385
22296
  } = useTranslation("dashboard");
22386
22297
  const {
22387
22298
  switchView,
22388
- switchToAddressView,
22389
- switchToPaymentView
22299
+ isAuthenticated
22390
22300
  } = usePelcro();
22391
22301
  const subs = getNonDonationSubs();
22392
22302
  if (subs.length === 0) return null;
@@ -22428,12 +22338,7 @@ const SubscriptionsItems = ({
22428
22338
  const plan = window.Pelcro.plan.getById(plan_id);
22429
22339
  setProductAndPlan(product, plan);
22430
22340
  setSubscriptionIdToRenew(sub.id);
22431
-
22432
- if (product.address_required) {
22433
- return switchToAddressView();
22434
- }
22435
-
22436
- return switchToPaymentView();
22341
+ setView("plan-select");
22437
22342
  };
22438
22343
 
22439
22344
  const getPhases = () => {
@@ -22622,18 +22527,18 @@ Accordion.item = function AccordionItem({
22622
22527
  }, content)) : null;
22623
22528
  };
22624
22529
 
22625
- var _path$c;
22530
+ var _path$b;
22626
22531
 
22627
- function _extends$d() { _extends$d = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
22532
+ function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22628
22533
 
22629
22534
  function SvgExit(props) {
22630
- return /*#__PURE__*/React.createElement("svg", _extends$d({
22535
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
22631
22536
  className: "plc-w-6 plc-h-6",
22632
22537
  xmlns: "http://www.w3.org/2000/svg",
22633
22538
  fill: "none",
22634
22539
  viewBox: "0 0 24 24",
22635
22540
  stroke: "currentColor"
22636
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22541
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22637
22542
  strokeLinecap: "round",
22638
22543
  strokeLinejoin: "round",
22639
22544
  strokeWidth: 2,
@@ -22641,17 +22546,17 @@ function SvgExit(props) {
22641
22546
  })));
22642
22547
  }
22643
22548
 
22644
- var _path$b;
22549
+ var _path$a;
22645
22550
 
22646
- function _extends$c() { _extends$c = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
22551
+ function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22647
22552
 
22648
22553
  function SvgUser(props) {
22649
- return /*#__PURE__*/React.createElement("svg", _extends$c({
22554
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
22650
22555
  xmlns: "http://www.w3.org/2000/svg",
22651
22556
  fill: "none",
22652
22557
  viewBox: "0 0 24 24",
22653
22558
  stroke: "currentColor"
22654
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22559
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22655
22560
  strokeLinecap: "round",
22656
22561
  strokeLinejoin: "round",
22657
22562
  strokeWidth: 2,
@@ -22659,18 +22564,18 @@ function SvgUser(props) {
22659
22564
  })));
22660
22565
  }
22661
22566
 
22662
- var _path$a;
22567
+ var _path$9;
22663
22568
 
22664
- function _extends$b() { _extends$b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
22569
+ function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22665
22570
 
22666
22571
  function SvgNewsletter(props) {
22667
- return /*#__PURE__*/React.createElement("svg", _extends$b({
22572
+ return /*#__PURE__*/React.createElement("svg", _extends$a({
22668
22573
  xmlns: "http://www.w3.org/2000/svg",
22669
22574
  className: "plc-h-5 plc-w-5",
22670
22575
  fill: "none",
22671
22576
  viewBox: "0 0 24 24",
22672
22577
  stroke: "currentColor"
22673
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22578
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22674
22579
  strokeLinecap: "round",
22675
22580
  strokeLinejoin: "round",
22676
22581
  strokeWidth: 2,
@@ -22678,18 +22583,18 @@ function SvgNewsletter(props) {
22678
22583
  })));
22679
22584
  }
22680
22585
 
22681
- var _path$9;
22586
+ var _path$8;
22682
22587
 
22683
- function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
22588
+ function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22684
22589
 
22685
22590
  function SvgDocument(props) {
22686
- return /*#__PURE__*/React.createElement("svg", _extends$a({
22591
+ return /*#__PURE__*/React.createElement("svg", _extends$9({
22687
22592
  xmlns: "http://www.w3.org/2000/svg",
22688
22593
  className: "plc-h-6 plc-w-6 plc-mr-2",
22689
22594
  fill: "none",
22690
22595
  viewBox: "0 0 24 24",
22691
22596
  stroke: "currentColor"
22692
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22597
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22693
22598
  strokeLinecap: "round",
22694
22599
  strokeLinejoin: "round",
22695
22600
  strokeWidth: 2,
@@ -22697,18 +22602,18 @@ function SvgDocument(props) {
22697
22602
  })));
22698
22603
  }
22699
22604
 
22700
- var _path$8;
22605
+ var _path$7;
22701
22606
 
22702
- function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
22607
+ function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22703
22608
 
22704
22609
  function SvgPaymentCard(props) {
22705
- return /*#__PURE__*/React.createElement("svg", _extends$9({
22610
+ return /*#__PURE__*/React.createElement("svg", _extends$8({
22706
22611
  className: "plc-w-6 plc-h-6 plc-mr-2",
22707
22612
  xmlns: "http://www.w3.org/2000/svg",
22708
22613
  fill: "none",
22709
22614
  viewBox: "0 0 24 24",
22710
22615
  stroke: "currentColor"
22711
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22616
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22712
22617
  strokeLinecap: "round",
22713
22618
  strokeLinejoin: "round",
22714
22619
  strokeWidth: 2,
@@ -22716,18 +22621,18 @@ function SvgPaymentCard(props) {
22716
22621
  })));
22717
22622
  }
22718
22623
 
22719
- var _path$7, _path2$1;
22624
+ var _path$6, _path2$1;
22720
22625
 
22721
- function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
22626
+ function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22722
22627
 
22723
22628
  function SvgLocationPin(props) {
22724
- return /*#__PURE__*/React.createElement("svg", _extends$8({
22629
+ return /*#__PURE__*/React.createElement("svg", _extends$7({
22725
22630
  className: "plc-w-6 plc-h-6 plc-mr-2",
22726
22631
  xmlns: "http://www.w3.org/2000/svg",
22727
22632
  fill: "none",
22728
22633
  viewBox: "0 0 24 24",
22729
22634
  stroke: "currentColor"
22730
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22635
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22731
22636
  strokeLinecap: "round",
22732
22637
  strokeLinejoin: "round",
22733
22638
  strokeWidth: 2,
@@ -22742,10 +22647,10 @@ function SvgLocationPin(props) {
22742
22647
 
22743
22648
  var _switch;
22744
22649
 
22745
- function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
22650
+ function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22746
22651
 
22747
22652
  function SvgSubscription(props) {
22748
- return /*#__PURE__*/React.createElement("svg", _extends$7({
22653
+ return /*#__PURE__*/React.createElement("svg", _extends$6({
22749
22654
  xmlns: "http://www.w3.org/2000/svg",
22750
22655
  viewBox: "0 0 100 125",
22751
22656
  fill: "currentColor"
@@ -22760,18 +22665,18 @@ function SvgSubscription(props) {
22760
22665
  }))))));
22761
22666
  }
22762
22667
 
22763
- var _path$6;
22668
+ var _path$5;
22764
22669
 
22765
- function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
22670
+ function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22766
22671
 
22767
22672
  function SvgShopping(props) {
22768
- return /*#__PURE__*/React.createElement("svg", _extends$6({
22673
+ return /*#__PURE__*/React.createElement("svg", _extends$5({
22769
22674
  className: "plc-w-6 plc-h-6 plc-mr-2",
22770
22675
  xmlns: "http://www.w3.org/2000/svg",
22771
22676
  fill: "none",
22772
22677
  viewBox: "0 0 24 24",
22773
22678
  stroke: "currentColor"
22774
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22679
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22775
22680
  strokeLinecap: "round",
22776
22681
  strokeLinejoin: "round",
22777
22682
  strokeWidth: 2,
@@ -22779,18 +22684,18 @@ function SvgShopping(props) {
22779
22684
  })));
22780
22685
  }
22781
22686
 
22782
- var _path$5;
22687
+ var _path$4;
22783
22688
 
22784
- function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
22689
+ function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22785
22690
 
22786
22691
  function SvgBookmark(props) {
22787
- return /*#__PURE__*/React.createElement("svg", _extends$5({
22692
+ return /*#__PURE__*/React.createElement("svg", _extends$4({
22788
22693
  className: "plc-w-6 plc-h-6 plc-mr-2",
22789
22694
  xmlns: "http://www.w3.org/2000/svg",
22790
22695
  fill: "none",
22791
22696
  viewBox: "0 0 24 24",
22792
22697
  stroke: "currentColor"
22793
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22698
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22794
22699
  strokeLinecap: "round",
22795
22700
  strokeLinejoin: "round",
22796
22701
  strokeWidth: 2,
@@ -22798,33 +22703,33 @@ function SvgBookmark(props) {
22798
22703
  })));
22799
22704
  }
22800
22705
 
22801
- var _path$4;
22706
+ var _path$3;
22802
22707
 
22803
- function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
22708
+ function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22804
22709
 
22805
22710
  function SvgKey(props) {
22806
- return /*#__PURE__*/React.createElement("svg", _extends$4({
22711
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
22807
22712
  xmlns: "http://www.w3.org/2000/svg",
22808
22713
  viewBox: "0 0 20 20",
22809
22714
  fill: "currentColor"
22810
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22715
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22811
22716
  fillRule: "evenodd",
22812
22717
  d: "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
22813
22718
  clipRule: "evenodd"
22814
22719
  })));
22815
22720
  }
22816
22721
 
22817
- var _path$3;
22722
+ var _path$2;
22818
22723
 
22819
- function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
22724
+ function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
22820
22725
 
22821
22726
  function SvgDonate(props) {
22822
- return /*#__PURE__*/React.createElement("svg", _extends$3({
22727
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
22823
22728
  width: 24,
22824
22729
  height: 24,
22825
22730
  fill: "currentColor",
22826
22731
  xmlns: "http://www.w3.org/2000/svg"
22827
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22732
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
22828
22733
  d: "M4 21h9.62a3.995 3.995 0 003.037-1.397l5.102-5.952a1 1 0 00-.442-1.6l-1.968-.656a3.043 3.043 0 00-2.823.503l-3.185 2.547-.617-1.235A3.98 3.98 0 009.146 11H4c-1.103 0-2 .897-2 2v6c0 1.103.897 2 2 2zm0-8h5.146c.763 0 1.448.423 1.789 1.105l.447.895H7v2h6.014a.996.996 0 00.442-.11l.003-.001.004-.002h.003l.002-.001h.004l.001-.001c.009.003.003-.001.003-.001.01 0 .002-.001.002-.001h.001l.002-.001.003-.001.002-.001.002-.001.003-.001.002-.001c.003 0 .001-.001.002-.001l.003-.002.002-.001.002-.001.003-.001.002-.001h.001l.002-.001h.001l.002-.001.002-.001c.009-.001.003-.001.003-.001l.002-.001a.915.915 0 00.11-.078l4.146-3.317c.262-.208.623-.273.94-.167l.557.186-4.133 4.823a2.029 2.029 0 01-1.52.688H4v-6zM16 2h-.017c-.163.002-1.006.039-1.983.705-.951-.648-1.774-.7-1.968-.704L12.002 2h-.004c-.801 0-1.555.313-2.119.878C9.313 3.445 9 4.198 9 5s.313 1.555.861 2.104l3.414 3.586a1.006 1.006 0 001.45-.001l3.396-3.568C18.688 6.555 19 5.802 19 5s-.313-1.555-.878-2.121A2.978 2.978 0 0016.002 2H16zm1 3c0 .267-.104.518-.311.725L14 8.55l-2.707-2.843C11.104 5.518 11 5.267 11 5s.104-.518.294-.708A.977.977 0 0111.979 4c.025.001.502.032 1.067.485.081.065.163.139.247.222l.707.707.707-.707c.084-.083.166-.157.247-.222.529-.425.976-.478 1.052-.484a.987.987 0 01.701.292c.189.189.293.44.293.707z"
22829
22734
  })));
22830
22735
  }
@@ -23151,10 +23056,9 @@ class Dashboard extends Component {
23151
23056
  }) => {
23152
23057
  if (isGift) {
23153
23058
  this.props.setProductAndPlan(null, null, true);
23154
- return this.props.setView("plan-select");
23155
23059
  }
23156
23060
 
23157
- return this.props.setView("subscription-options");
23061
+ return this.props.setView("plan-select");
23158
23062
  });
23159
23063
 
23160
23064
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23622,7 +23526,7 @@ const DashboardOpenButton = () => {
23622
23526
  };
23623
23527
  DashboardOpenButton.viewId = "dashboard-open";
23624
23528
 
23625
- const initialState$3 = {
23529
+ const initialState$2 = {
23626
23530
  imageSrc: null,
23627
23531
  crop: {
23628
23532
  x: 0,
@@ -23636,10 +23540,10 @@ const initialState$3 = {
23636
23540
  content: ""
23637
23541
  }
23638
23542
  };
23639
- const store$3 = /*#__PURE__*/createContext(initialState$3);
23543
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
23640
23544
  const {
23641
- Provider: Provider$3
23642
- } = store$3;
23545
+ Provider: Provider$2
23546
+ } = store$2;
23643
23547
 
23644
23548
  const ProfilePicChangeContainer = ({
23645
23549
  style,
@@ -23773,21 +23677,21 @@ const ProfilePicChangeContainer = ({
23773
23677
  default:
23774
23678
  return state;
23775
23679
  }
23776
- }, initialState$3);
23680
+ }, initialState$2);
23777
23681
  return /*#__PURE__*/React__default.createElement("div", {
23778
23682
  style: { ...style
23779
23683
  },
23780
23684
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23781
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
23685
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
23782
23686
  value: {
23783
23687
  state,
23784
23688
  dispatch
23785
23689
  }
23786
23690
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23787
- store: store$3,
23691
+ store: store$2,
23788
23692
  key: i
23789
23693
  })) : /*#__PURE__*/React__default.cloneElement(children, {
23790
- store: store$3
23694
+ store: store$2
23791
23695
  })));
23792
23696
  };
23793
23697
  /**
@@ -23849,7 +23753,7 @@ const ProfilePicChangeButton = ({
23849
23753
  isSubmitting
23850
23754
  },
23851
23755
  dispatch
23852
- } = useContext(store$3);
23756
+ } = useContext(store$2);
23853
23757
  const {
23854
23758
  t
23855
23759
  } = useTranslation("userEdit");
@@ -25217,7 +25121,7 @@ const ProfilePicChangeCropper = ({
25217
25121
  zoom
25218
25122
  },
25219
25123
  dispatch
25220
- } = useContext(store$3);
25124
+ } = useContext(store$2);
25221
25125
  return /*#__PURE__*/React__default.createElement("div", {
25222
25126
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
25223
25127
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -25259,7 +25163,7 @@ const ProfilePicChangeZoom = ({
25259
25163
  zoom
25260
25164
  },
25261
25165
  dispatch
25262
- } = useContext(store$3);
25166
+ } = useContext(store$2);
25263
25167
  const {
25264
25168
  t
25265
25169
  } = useTranslation("userEdit");
@@ -25282,18 +25186,18 @@ const ProfilePicChangeZoom = ({
25282
25186
  }, otherProps)));
25283
25187
  };
25284
25188
 
25285
- var _path$2;
25189
+ var _path$1;
25286
25190
 
25287
- function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
25191
+ function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
25288
25192
 
25289
25193
  function SvgPhotograph(props) {
25290
- return /*#__PURE__*/React.createElement("svg", _extends$2({
25194
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
25291
25195
  xmlns: "http://www.w3.org/2000/svg",
25292
25196
  className: "plc-h-6 plc-w-6",
25293
25197
  fill: "none",
25294
25198
  viewBox: "0 0 24 24",
25295
25199
  stroke: "currentColor"
25296
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
25200
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25297
25201
  strokeLinecap: "round",
25298
25202
  strokeLinejoin: "round",
25299
25203
  strokeWidth: 2,
@@ -25311,7 +25215,7 @@ const ProfilePicChangeSelectButton = ({
25311
25215
  state: {
25312
25216
  isSubmitting
25313
25217
  }
25314
- } = useContext(store$3);
25218
+ } = useContext(store$2);
25315
25219
  const {
25316
25220
  t
25317
25221
  } = useTranslation("userEdit");
@@ -25353,7 +25257,7 @@ const ProfilePicChangeRemoveButton = ({
25353
25257
  state: {
25354
25258
  isSubmitting
25355
25259
  }
25356
- } = useContext(store$3);
25260
+ } = useContext(store$2);
25357
25261
  const {
25358
25262
  t
25359
25263
  } = useTranslation("userEdit");
@@ -25376,7 +25280,7 @@ const ProfilePicChangeWrapper = () => {
25376
25280
  state: {
25377
25281
  imageSrc
25378
25282
  }
25379
- } = useContext(store$3);
25283
+ } = useContext(store$2);
25380
25284
  const {
25381
25285
  t
25382
25286
  } = useTranslation("userEdit");
@@ -25438,17 +25342,17 @@ function ProfilePicChangeModal({
25438
25342
  }
25439
25343
  ProfilePicChangeModal.viewId = "profile-picture";
25440
25344
 
25441
- const initialState$2 = {
25345
+ const initialState$1 = {
25442
25346
  isSubmitting: false,
25443
25347
  alert: {
25444
25348
  type: "error",
25445
25349
  content: ""
25446
25350
  }
25447
25351
  };
25448
- const store$2 = /*#__PURE__*/createContext(initialState$2);
25352
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
25449
25353
  const {
25450
- Provider: Provider$2
25451
- } = store$2;
25354
+ Provider: Provider$1
25355
+ } = store$1;
25452
25356
 
25453
25357
  const EmailVerifyContainer = ({
25454
25358
  style,
@@ -25511,21 +25415,21 @@ const EmailVerifyContainer = ({
25511
25415
  default:
25512
25416
  return state;
25513
25417
  }
25514
- }, initialState$2);
25418
+ }, initialState$1);
25515
25419
  return /*#__PURE__*/React__default.createElement("div", {
25516
25420
  style: { ...style
25517
25421
  },
25518
25422
  className: `pelcro-container pelcro-email-verify-container ${className}`
25519
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
25423
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
25520
25424
  value: {
25521
25425
  state,
25522
25426
  dispatch
25523
25427
  }
25524
25428
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25525
- store: store$2,
25429
+ store: store$1,
25526
25430
  key: i
25527
25431
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25528
- store: store$2
25432
+ store: store$1
25529
25433
  })));
25530
25434
  };
25531
25435
 
@@ -25539,7 +25443,7 @@ const EmailVerifyResendButton = ({
25539
25443
  state: {
25540
25444
  isSubmitting
25541
25445
  }
25542
- } = useContext(store$2);
25446
+ } = useContext(store$1);
25543
25447
  const {
25544
25448
  t
25545
25449
  } = useTranslation("verifyEmail");
@@ -25554,16 +25458,16 @@ const EmailVerifyResendButton = ({
25554
25458
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25555
25459
  };
25556
25460
 
25557
- var _path$1, _path2;
25461
+ var _path, _path2;
25558
25462
 
25559
- function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
25463
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25560
25464
 
25561
25465
  function SvgEmailVerify(props) {
25562
- return /*#__PURE__*/React.createElement("svg", _extends$1({
25466
+ return /*#__PURE__*/React.createElement("svg", _extends({
25563
25467
  className: "plc-w-6 plc-h-6",
25564
25468
  viewBox: "0 0 700 700",
25565
25469
  xmlns: "http://www.w3.org/2000/svg"
25566
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25470
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25567
25471
  d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
25568
25472
  })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
25569
25473
  d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
@@ -25667,11 +25571,11 @@ const invoicePaymentSubmitButton = props => {
25667
25571
  return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
25668
25572
  };
25669
25573
 
25670
- const initialState$1 = {};
25671
- const store$1 = /*#__PURE__*/createContext(initialState$1);
25574
+ const initialState = {};
25575
+ const store = /*#__PURE__*/createContext(initialState);
25672
25576
  const {
25673
- Provider: Provider$1
25674
- } = store$1;
25577
+ Provider
25578
+ } = store;
25675
25579
 
25676
25580
  const InvoiceDetailsContainer = ({
25677
25581
  style,
@@ -25692,21 +25596,21 @@ const InvoiceDetailsContainer = ({
25692
25596
  default:
25693
25597
  return state;
25694
25598
  }
25695
- }, initialState$1);
25599
+ }, initialState);
25696
25600
  return /*#__PURE__*/React__default.createElement("div", {
25697
25601
  style: { ...style
25698
25602
  },
25699
25603
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25700
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
25604
+ }, /*#__PURE__*/React__default.createElement(Provider, {
25701
25605
  value: {
25702
25606
  state,
25703
25607
  dispatch
25704
25608
  }
25705
25609
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25706
- store: store$1,
25610
+ store,
25707
25611
  key: i
25708
25612
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25709
- store: store$1
25613
+ store
25710
25614
  })));
25711
25615
  };
25712
25616
 
@@ -25738,7 +25642,7 @@ const InvoiceDetailsPayButton = ({
25738
25642
  }) => {
25739
25643
  const {
25740
25644
  dispatch
25741
- } = useContext(store$1);
25645
+ } = useContext(store);
25742
25646
  const {
25743
25647
  t
25744
25648
  } = useTranslation("invoiceDetails");
@@ -25845,230 +25749,4 @@ const InvoiceDetailsModal = ({
25845
25749
  };
25846
25750
  InvoiceDetailsModal.viewId = "invoice-details";
25847
25751
 
25848
- const initialState = {
25849
- selectedOption: ""
25850
- };
25851
- const store = /*#__PURE__*/createContext(initialState);
25852
- const {
25853
- Provider
25854
- } = store;
25855
-
25856
- const SubscriptionOptionsContainer = ({
25857
- style,
25858
- className = "",
25859
- onRenewSubSuccess = () => {},
25860
- onNewSubSuccess = () => {},
25861
- children,
25862
- ...props
25863
- }) => {
25864
- const submit = ({
25865
- selectedOption
25866
- }, dispatch) => {
25867
- if (selectedOption === "renew") return onRenewSubSuccess();
25868
- if (selectedOption === "new") return onNewSubSuccess();
25869
- };
25870
-
25871
- const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25872
- switch (action.type) {
25873
- case SWITCH_TO_NEW:
25874
- return lib_7({ ...state,
25875
- selectedOption: "new"
25876
- });
25877
-
25878
- case SWITCH_TO_RENEW:
25879
- return lib_7({ ...state,
25880
- selectedOption: "renew"
25881
- });
25882
-
25883
- case HANDLE_SUBMIT:
25884
- return lib_4((state, dispatch) => submit(state));
25885
-
25886
- default:
25887
- return state;
25888
- }
25889
- }, initialState);
25890
- return /*#__PURE__*/React__default.createElement("div", {
25891
- style: { ...style
25892
- },
25893
- className: `pelcro-container pelcro-subscription-options-container ${className}`
25894
- }, /*#__PURE__*/React__default.createElement(Provider, {
25895
- value: {
25896
- state,
25897
- dispatch
25898
- }
25899
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25900
- store,
25901
- key: i
25902
- })) : /*#__PURE__*/React__default.cloneElement(children, {
25903
- store
25904
- })));
25905
- };
25906
-
25907
- var _path;
25908
-
25909
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25910
-
25911
- function SvgPlusCircle(props) {
25912
- return /*#__PURE__*/React.createElement("svg", _extends({
25913
- xmlns: "http://www.w3.org/2000/svg",
25914
- className: "plc-h-6 plc-w-6",
25915
- fill: "none",
25916
- viewBox: "0 0 24 24",
25917
- stroke: "currentColor",
25918
- strokeWidth: 2
25919
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25920
- strokeLinecap: "round",
25921
- strokeLinejoin: "round",
25922
- d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25923
- })));
25924
- }
25925
-
25926
- const SubscriptionOptionsNewButton = ({
25927
- name,
25928
- onClick,
25929
- ...otherProps
25930
- }) => {
25931
- const {
25932
- dispatch,
25933
- state: {
25934
- selectedOption
25935
- }
25936
- } = useContext(store);
25937
- const {
25938
- t
25939
- } = useTranslation("subscriptionOptions");
25940
- const isChecked = selectedOption === "new";
25941
- return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25942
- className: "plc-hidden pelcro-new-sub-option",
25943
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-new-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25944
- id: "pelcro-new-sub-option",
25945
- name: "option",
25946
- onChange: () => {
25947
- dispatch({
25948
- type: SWITCH_TO_NEW
25949
- });
25950
- onClick === null || onClick === void 0 ? void 0 : onClick();
25951
- },
25952
- checked: isChecked
25953
- }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default.createElement(SvgPlusCircle, {
25954
- className: "plc-w-full plc-h-full plc-mr-0"
25955
- }));
25956
- };
25957
-
25958
- const SubscriptionOptionsRenewButton = ({
25959
- name,
25960
- onClick,
25961
- ...otherProps
25962
- }) => {
25963
- const {
25964
- dispatch,
25965
- state: {
25966
- selectedOption
25967
- }
25968
- } = useContext(store);
25969
- const {
25970
- t
25971
- } = useTranslation("subscriptionOptions");
25972
- const isChecked = selectedOption === "renew";
25973
- return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25974
- className: "plc-hidden pelcro-renew-sub-option",
25975
- labelClassName: `plc-flex plc-flex-col plc-items-center plc-justify-center plc-text-lg plc-font-semibold plc-ml-0 plc-w-52 plc-h-52 plc-text-black plc-p-2 hover:plc-bg-gray-200 pelcro-renew-sub-option-label plc-border-2 plc-text-center ${isChecked ? "plc-border-black" : "plc-border-gray-300"}`,
25976
- id: "pelcro-renew-sub-option",
25977
- name: "option",
25978
- onChange: () => {
25979
- dispatch({
25980
- type: SWITCH_TO_RENEW
25981
- });
25982
- onClick === null || onClick === void 0 ? void 0 : onClick();
25983
- },
25984
- checked: isChecked
25985
- }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default.createElement(SvgRefresh, {
25986
- className: "plc-w-full plc-h-full plc-mr-0"
25987
- }));
25988
- };
25989
-
25990
- const SubscriptionOptionsSubmit = ({
25991
- name,
25992
- onClick,
25993
- ...otherProps
25994
- }) => {
25995
- const {
25996
- dispatch,
25997
- state: {
25998
- selectedOption
25999
- }
26000
- } = useContext(store);
26001
- const {
26002
- t
26003
- } = useTranslation("subscriptionOptions");
26004
- return /*#__PURE__*/React__default.createElement(Button, Object.assign({
26005
- onClick: () => {
26006
- dispatch({
26007
- type: HANDLE_SUBMIT
26008
- });
26009
- onClick === null || onClick === void 0 ? void 0 : onClick();
26010
- },
26011
- disabled: !selectedOption
26012
- }, otherProps), name !== null && name !== void 0 ? name : t("next"));
26013
- };
26014
-
26015
- const SubscriptionOptionsView = props => {
26016
- const {
26017
- t
26018
- } = useTranslation("subscriptionOptions");
26019
- return /*#__PURE__*/React__default.createElement("div", {
26020
- id: "pelcro-subscription-options-view"
26021
- }, /*#__PURE__*/React__default.createElement("div", {
26022
- className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
26023
- }, /*#__PURE__*/React__default.createElement("h4", {
26024
- className: "plc-text-2xl plc-font-semibold"
26025
- }, t("title")), /*#__PURE__*/React__default.createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default.createElement("form", {
26026
- action: "javascript:void(0);",
26027
- className: "plc-mt-2 pelcro-form"
26028
- }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default.createElement("div", {
26029
- className: "plc-flex plc-justify-between plc-items-center"
26030
- }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default.createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default.createElement(SubscriptionOptionsSubmit, {
26031
- role: "submit",
26032
- className: "plc-mt-4 plc-w-full",
26033
- name: t("next"),
26034
- id: "pelcro-submit"
26035
- }))));
26036
- };
26037
-
26038
- const SubscriptionOptionsModal = ({
26039
- onDisplay,
26040
- onClose,
26041
- ...otherProps
26042
- }) => {
26043
- const {
26044
- switchView,
26045
- setProductsList
26046
- } = usePelcro();
26047
-
26048
- const onRenewSubSuccess = () => {
26049
- var _otherProps$onRenewSu;
26050
-
26051
- (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
26052
- setProductsList(getRenewableProducts());
26053
- switchView("_plan-select-renew");
26054
- };
26055
-
26056
- const onNewSubSuccess = () => {
26057
- var _otherProps$onNewSubS;
26058
-
26059
- (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
26060
- switchView("plan-select");
26061
- };
26062
-
26063
- return /*#__PURE__*/React__default.createElement(Modal, {
26064
- onDisplay: onDisplay,
26065
- onClose: onClose,
26066
- id: "pelcro-subscription-options-modal"
26067
- }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
26068
- onNewSubSuccess: onNewSubSuccess,
26069
- onRenewSubSuccess: onRenewSubSuccess
26070
- }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
26071
- };
26072
- SubscriptionOptionsModal.viewId = "subscription-options";
26073
-
26074
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, 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, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, 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, 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, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionOptionsContainer, SubscriptionOptionsModal, SubscriptionOptionsNewButton, SubscriptionOptionsRenewButton, SubscriptionOptionsSubmit, SubscriptionOptionsView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
25752
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, 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, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, 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, 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, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };