@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.cjs.js CHANGED
@@ -3244,7 +3244,8 @@ function withTranslation(ns) {
3244
3244
  var validation$1 = {
3245
3245
  validEmail: "le courriel n’est pas valide",
3246
3246
  enterEmail: "Un courriel est requis.",
3247
- enterPassword: "Mot de passe requis."
3247
+ enterPassword: "Mot de passe requis.",
3248
+ confirmPassword: "Confirmer le mot de passe requis."
3248
3249
  };
3249
3250
  var buttons$9 = {
3250
3251
  account: "Accès abonné(e)s",
@@ -3332,7 +3333,8 @@ var common_fr = {
3332
3333
  var validation = {
3333
3334
  validEmail: "Email address is not valid.",
3334
3335
  enterEmail: "Email address is required.",
3335
- enterPassword: "Password is required."
3336
+ enterPassword: "Password is required.",
3337
+ confirmPassword: "Confirm password is required."
3336
3338
  };
3337
3339
  var buttons$8 = {
3338
3340
  account: "My account",
@@ -3461,9 +3463,9 @@ var paymentMethod_fr = {
3461
3463
  select: select
3462
3464
  };
3463
3465
 
3464
- var title$h = "Enter your email to subscribe to our newsletter";
3466
+ var title$f = "Enter your email to subscribe to our newsletter";
3465
3467
  var updateTitle$1 = "Update newsletter selections";
3466
- var subtitle$9 = "We may use your email for other marketing communication";
3468
+ var subtitle$7 = "We may use your email for other marketing communication";
3467
3469
  var labels$p = {
3468
3470
  submit: "Submit",
3469
3471
  firstName: "First name",
@@ -3480,16 +3482,16 @@ var messages$r = {
3480
3482
  here: "here"
3481
3483
  };
3482
3484
  var newsletter_en = {
3483
- title: title$h,
3485
+ title: title$f,
3484
3486
  updateTitle: updateTitle$1,
3485
- subtitle: subtitle$9,
3487
+ subtitle: subtitle$7,
3486
3488
  labels: labels$p,
3487
3489
  messages: messages$r
3488
3490
  };
3489
3491
 
3490
- var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3492
+ var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3491
3493
  var updateTitle = "Mettre à jour son choix d'infolettres";
3492
- var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3494
+ var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3493
3495
  var labels$o = {
3494
3496
  submit: "Lire l’article !",
3495
3497
  firstName: "Prénom",
@@ -3506,9 +3508,9 @@ var messages$q = {
3506
3508
  here: "ici"
3507
3509
  };
3508
3510
  var newsletter_fr = {
3509
- title: title$g,
3511
+ title: title$e,
3510
3512
  updateTitle: updateTitle,
3511
- subtitle: subtitle$8,
3513
+ subtitle: subtitle$6,
3512
3514
  labels: labels$o,
3513
3515
  messages: messages$q
3514
3516
  };
@@ -3765,8 +3767,8 @@ var login_fr = {
3765
3767
  errors: errors$4
3766
3768
  };
3767
3769
 
3768
- var title$f = "Create an account";
3769
- var subtitle$7 = "Enter your email and password below";
3770
+ var title$d = "Create an account";
3771
+ var subtitle$5 = "Enter your email and password below";
3770
3772
  var labels$h = {
3771
3773
  signUpFacebook: "Sign up with Facebook",
3772
3774
  signUpGoogle: "Sign up with Google",
@@ -3851,8 +3853,8 @@ var redeem$1 = {
3851
3853
  }
3852
3854
  };
3853
3855
  var register_en = {
3854
- title: title$f,
3855
- subtitle: subtitle$7,
3856
+ title: title$d,
3857
+ subtitle: subtitle$5,
3856
3858
  labels: labels$h,
3857
3859
  messages: messages$h,
3858
3860
  errors: errors$3,
@@ -3860,8 +3862,8 @@ var register_en = {
3860
3862
  redeem: redeem$1
3861
3863
  };
3862
3864
 
3863
- var title$e = "Créer un compte";
3864
- var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3865
+ var title$c = "Créer un compte";
3866
+ var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3865
3867
  var labels$g = {
3866
3868
  signUpFacebook: "Inscrivez-vous avec Facebook",
3867
3869
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3947,8 +3949,8 @@ var redeem = {
3947
3949
  }
3948
3950
  };
3949
3951
  var register_fr = {
3950
- title: title$e,
3951
- subtitle: subtitle$6,
3952
+ title: title$c,
3953
+ subtitle: subtitle$4,
3952
3954
  labels: labels$g,
3953
3955
  messages: messages$g,
3954
3956
  errors: errors$2,
@@ -4008,7 +4010,7 @@ var userEdit_fr = {
4008
4010
  messages: messages$e
4009
4011
  };
4010
4012
 
4011
- var title$d = "Enter your shipping address";
4013
+ var title$b = "Enter your shipping address";
4012
4014
  var selectAddressTitle$1 = "Please select an address";
4013
4015
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
4014
4016
  var labels$d = {
@@ -4031,7 +4033,7 @@ var messages$d = {
4031
4033
  subRedeemed: "Your subscription has been redeemed."
4032
4034
  };
4033
4035
  var address_en = {
4034
- title: title$d,
4036
+ title: title$b,
4035
4037
  selectAddressTitle: selectAddressTitle$1,
4036
4038
  selectAddressSubtitle: selectAddressSubtitle$1,
4037
4039
  labels: labels$d,
@@ -4039,7 +4041,7 @@ var address_en = {
4039
4041
  messages: messages$d
4040
4042
  };
4041
4043
 
4042
- var title$c = "Entrez votre adresse de livraison";
4044
+ var title$a = "Entrez votre adresse de livraison";
4043
4045
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4044
4046
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4045
4047
  var labels$c = {
@@ -4062,7 +4064,7 @@ var messages$c = {
4062
4064
  subRedeemed: "Votre abonnement a bien été activé."
4063
4065
  };
4064
4066
  var address_fr = {
4065
- title: title$c,
4067
+ title: title$a,
4066
4068
  selectAddressTitle: selectAddressTitle,
4067
4069
  selectAddressSubtitle: selectAddressSubtitle,
4068
4070
  labels: labels$c,
@@ -4070,8 +4072,8 @@ var address_fr = {
4070
4072
  messages: messages$c
4071
4073
  };
4072
4074
 
4073
- var title$b = "Reset your password";
4074
- var subtitle$5 = "Enter a new password below";
4075
+ var title$9 = "Reset your password";
4076
+ var subtitle$3 = "Enter a new password below";
4075
4077
  var email$3 = "Email";
4076
4078
  var password$3 = "Password";
4077
4079
  var confirmPassword$1 = "Confirm password";
@@ -4079,8 +4081,8 @@ var submit$5 = "Submit";
4079
4081
  var required$5 = "Required";
4080
4082
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4081
4083
  var passwordReset_en = {
4082
- title: title$b,
4083
- subtitle: subtitle$5,
4084
+ title: title$9,
4085
+ subtitle: subtitle$3,
4084
4086
  email: email$3,
4085
4087
  password: password$3,
4086
4088
  confirmPassword: confirmPassword$1,
@@ -4089,8 +4091,8 @@ var passwordReset_en = {
4089
4091
  passwordUpdated: passwordUpdated$1
4090
4092
  };
4091
4093
 
4092
- var title$a = "Réinitialiser votre mot de passe";
4093
- var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4094
+ var title$8 = "Réinitialiser votre mot de passe";
4095
+ var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4094
4096
  var email$2 = "Adresse courriel";
4095
4097
  var password$2 = "Mot de passe";
4096
4098
  var confirmPassword = "Confirmer le mot de passe";
@@ -4098,8 +4100,8 @@ var submit$4 = "Soumettre";
4098
4100
  var required$4 = "Champs obligatoires";
4099
4101
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4100
4102
  var passwordReset_fr = {
4101
- title: title$a,
4102
- subtitle: subtitle$4,
4103
+ title: title$8,
4104
+ subtitle: subtitle$2,
4103
4105
  email: email$2,
4104
4106
  password: password$2,
4105
4107
  confirmPassword: confirmPassword,
@@ -4108,7 +4110,7 @@ var passwordReset_fr = {
4108
4110
  passwordUpdated: passwordUpdated
4109
4111
  };
4110
4112
 
4111
- var title$9 = "Forgot your password?";
4113
+ var title$7 = "Forgot your password?";
4112
4114
  var email$1 = "Email";
4113
4115
  var password$1 = "Password";
4114
4116
  var submit$3 = "Submit";
@@ -4119,7 +4121,7 @@ var messages$b = {
4119
4121
  loginHere: "login here."
4120
4122
  };
4121
4123
  var passwordForgot_en = {
4122
- title: title$9,
4124
+ title: title$7,
4123
4125
  email: email$1,
4124
4126
  password: password$1,
4125
4127
  submit: submit$3,
@@ -4128,7 +4130,7 @@ var passwordForgot_en = {
4128
4130
  messages: messages$b
4129
4131
  };
4130
4132
 
4131
- var title$8 = "Mot de passe oublié ?";
4133
+ var title$6 = "Mot de passe oublié ?";
4132
4134
  var email = "Courriel";
4133
4135
  var password = "Mot de passe";
4134
4136
  var submit$2 = "Soumettre";
@@ -4139,7 +4141,7 @@ var messages$a = {
4139
4141
  loginHere: "Connectez-vous ici"
4140
4142
  };
4141
4143
  var passwordForgot_fr = {
4142
- title: title$8,
4144
+ title: title$6,
4143
4145
  email: email,
4144
4146
  password: password,
4145
4147
  submit: submit$2,
@@ -4148,7 +4150,7 @@ var passwordForgot_fr = {
4148
4150
  messages: messages$a
4149
4151
  };
4150
4152
 
4151
- var title$7 = "Change your password";
4153
+ var title$5 = "Change your password";
4152
4154
  var currentPassword$1 = "Current password";
4153
4155
  var newPassword$1 = "New password";
4154
4156
  var confirmNewPassword$1 = "Confirm new password";
@@ -4158,7 +4160,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4158
4160
  var passwordsNotMatching$1 = "Passwords don't match";
4159
4161
  var weakPassword$1 = "Your password must contain at least 6 characters";
4160
4162
  var passwordChange_en = {
4161
- title: title$7,
4163
+ title: title$5,
4162
4164
  currentPassword: currentPassword$1,
4163
4165
  newPassword: newPassword$1,
4164
4166
  confirmNewPassword: confirmNewPassword$1,
@@ -4169,7 +4171,7 @@ var passwordChange_en = {
4169
4171
  weakPassword: weakPassword$1
4170
4172
  };
4171
4173
 
4172
- var title$6 = "Changez votre mot de passe";
4174
+ var title$4 = "Changez votre mot de passe";
4173
4175
  var currentPassword = "Mot de passe actuel";
4174
4176
  var newPassword = "Nouveau mot de passe";
4175
4177
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4179,7 +4181,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4179
4181
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4180
4182
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4181
4183
  var passwordChange_fr = {
4182
- title: title$6,
4184
+ title: title$4,
4183
4185
  currentPassword: currentPassword,
4184
4186
  newPassword: newPassword,
4185
4187
  confirmNewPassword: confirmNewPassword,
@@ -4190,8 +4192,8 @@ var passwordChange_fr = {
4190
4192
  weakPassword: weakPassword
4191
4193
  };
4192
4194
 
4193
- var title$5 = "Votre panier";
4194
- var subtitle$3 = "Terminez votre achat ci-dessous";
4195
+ var title$3 = "Votre panier";
4196
+ var subtitle$1 = "Terminez votre achat ci-dessous";
4195
4197
  var name$1 = "Produit";
4196
4198
  var quantity$1 = "Quantité";
4197
4199
  var price$1 = "Prix";
@@ -4202,8 +4204,8 @@ var confirm$3 = "Passer à la caisse";
4202
4204
  var empty$1 = "Votre panier est vide.";
4203
4205
  var removeAll$1 = "Vider";
4204
4206
  var cart_fr = {
4205
- title: title$5,
4206
- subtitle: subtitle$3,
4207
+ title: title$3,
4208
+ subtitle: subtitle$1,
4207
4209
  name: name$1,
4208
4210
  quantity: quantity$1,
4209
4211
  price: price$1,
@@ -4215,8 +4217,8 @@ var cart_fr = {
4215
4217
  removeAll: removeAll$1
4216
4218
  };
4217
4219
 
4218
- var title$4 = "Your shopping cart";
4219
- var subtitle$2 = "Comple your purchase below";
4220
+ var title$2 = "Your shopping cart";
4221
+ var subtitle = "Comple your purchase below";
4220
4222
  var name = "Name";
4221
4223
  var quantity = "Quantity";
4222
4224
  var price = "Price";
@@ -4227,8 +4229,8 @@ var confirm$2 = "Checkout";
4227
4229
  var empty = "Your cart is empty.";
4228
4230
  var removeAll = "Remove all";
4229
4231
  var cart_en = {
4230
- title: title$4,
4231
- subtitle: subtitle$2,
4232
+ title: title$2,
4233
+ subtitle: subtitle,
4232
4234
  name: name,
4233
4235
  quantity: quantity,
4234
4236
  price: price,
@@ -4666,7 +4668,7 @@ var verifyEmail_fr = {
4666
4668
  messages: messages
4667
4669
  };
4668
4670
 
4669
- var title$3 = "Invoice details";
4671
+ var title$1 = "Invoice details";
4670
4672
  var labels$1 = {
4671
4673
  summary: "Summary",
4672
4674
  total: "Total",
@@ -4679,12 +4681,12 @@ var buttons$1 = {
4679
4681
  pay: "Pay now"
4680
4682
  };
4681
4683
  var invoiceDetails_en = {
4682
- title: title$3,
4684
+ title: title$1,
4683
4685
  labels: labels$1,
4684
4686
  buttons: buttons$1
4685
4687
  };
4686
4688
 
4687
- var title$2 = "Détails de la facture";
4689
+ var title = "Détails de la facture";
4688
4690
  var labels = {
4689
4691
  summary: "Résumé",
4690
4692
  total: "Total",
@@ -4697,37 +4699,11 @@ var buttons = {
4697
4699
  pay: "Payer"
4698
4700
  };
4699
4701
  var invoiceDetails_fr = {
4700
- title: title$2,
4702
+ title: title,
4701
4703
  labels: labels,
4702
4704
  buttons: buttons
4703
4705
  };
4704
4706
 
4705
- var title$1 = "Renewal options";
4706
- var subtitle$1 = "Select one of the options below to continue";
4707
- var next$1 = "Next";
4708
- var addNew$1 = "Add Another Subscription";
4709
- var renew$1 = "Renew Existing Subscription";
4710
- var subscriptionOptions_en = {
4711
- title: title$1,
4712
- subtitle: subtitle$1,
4713
- next: next$1,
4714
- addNew: addNew$1,
4715
- renew: renew$1
4716
- };
4717
-
4718
- var title = "Choix de renouvellement";
4719
- var subtitle = "Veuillez choisir un des choix ci-dessous";
4720
- var next = "Prochain";
4721
- var addNew = "S'abonner à un autre forfait maintenant";
4722
- var renew = "Renouveler l'abonnement actuel ";
4723
- var subscriptionOptions_fr = {
4724
- title: title,
4725
- subtitle: subtitle,
4726
- next: next,
4727
- addNew: addNew,
4728
- renew: renew
4729
- };
4730
-
4731
4707
  function create$1(createState) {
4732
4708
  let state;
4733
4709
  const listeners = new Set();
@@ -6077,7 +6053,7 @@ class PelcroActions {
6077
6053
  view,
6078
6054
  cartItems,
6079
6055
  ...otherStateFields
6080
- } = initialState$j;
6056
+ } = initialState$i;
6081
6057
  this.set(otherStateFields);
6082
6058
  });
6083
6059
 
@@ -6101,16 +6077,6 @@ class PelcroActions {
6101
6077
  });
6102
6078
  }
6103
6079
 
6104
- if (view === "subscription-options") {
6105
- const noRenewableProducts = getRenewableProducts().length === 0;
6106
-
6107
- if (noRenewableProducts) {
6108
- return this.set({
6109
- view: "plan-select"
6110
- });
6111
- }
6112
- }
6113
-
6114
6080
  this.set({
6115
6081
  view
6116
6082
  });
@@ -6185,26 +6151,6 @@ class PelcroActions {
6185
6151
  }
6186
6152
  });
6187
6153
 
6188
- _defineProperty$3(this, "setProductsList", products => {
6189
- if (!Array.isArray(products)) {
6190
- return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6191
- }
6192
-
6193
- const allowedProducts = window.Pelcro.product.list();
6194
- const validProducts = products.filter(product => {
6195
- 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));
6196
-
6197
- if (!isValidProduct) {
6198
- 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);
6199
- }
6200
-
6201
- return isValidProduct;
6202
- });
6203
- this.set({
6204
- productsList: validProducts
6205
- });
6206
- });
6207
-
6208
6154
  _defineProperty$3(this, "setProduct", id => {
6209
6155
  const product = window.Pelcro.product.getById(id);
6210
6156
  if (!product) return console.error("invalid product id");
@@ -6426,12 +6372,10 @@ class PelcroCallbacks {
6426
6372
 
6427
6373
  }
6428
6374
 
6429
- var _window$Pelcro$produc, _window$Pelcro;
6430
- const initialState$j = {
6375
+ const initialState$i = {
6431
6376
  // View
6432
6377
  view: null,
6433
6378
  // Plans
6434
- 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 : [],
6435
6379
  product: null,
6436
6380
  plan: null,
6437
6381
  isGift: false,
@@ -6458,7 +6402,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6458
6402
  return {
6459
6403
  // Store setter
6460
6404
  set,
6461
- ...initialState$j,
6405
+ ...initialState$i,
6462
6406
  // State actions
6463
6407
  ...actions,
6464
6408
  // Callbacks
@@ -6813,30 +6757,6 @@ function userMustVerifyEmail() {
6813
6757
  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;
6814
6758
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6815
6759
  }
6816
- function getRenewableProducts() {
6817
- var _window$Pelcro$subscr, _window$Pelcro$subscr2;
6818
-
6819
- 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 : [];
6820
- const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6821
- const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6822
- const {
6823
- productsList
6824
- } = usePelcro.getStore();
6825
- return productsList.map(product => {
6826
- if (renewableProductsIds.includes(product.id)) {
6827
- const renewablePlans = getRenewablePlansOnly(product);
6828
- return { ...product,
6829
- plans: renewablePlans
6830
- };
6831
- }
6832
- }).filter(product => product);
6833
-
6834
- function getRenewablePlansOnly(product) {
6835
- var _product$plans$filter, _product$plans;
6836
-
6837
- 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 : [];
6838
- }
6839
- }
6840
6760
 
6841
6761
  const resources = {
6842
6762
  en: {
@@ -6861,8 +6781,7 @@ const resources = {
6861
6781
  dashboard: dashboard_en,
6862
6782
  select: select_en,
6863
6783
  notification: notification_en,
6864
- invoiceDetails: invoiceDetails_en,
6865
- subscriptionOptions: subscriptionOptions_en
6784
+ invoiceDetails: invoiceDetails_en
6866
6785
  },
6867
6786
  fr: {
6868
6787
  common: common_fr,
@@ -6886,8 +6805,7 @@ const resources = {
6886
6805
  dashboard: dashboard_fr,
6887
6806
  select: select_fr,
6888
6807
  notification: notification_fr,
6889
- invoiceDetails: invoiceDetails_fr,
6890
- subscriptionOptions: subscriptionOptions_fr
6808
+ invoiceDetails: invoiceDetails_fr
6891
6809
  }
6892
6810
  }; // set UI language to the page language or default to the language in site settings
6893
6811
 
@@ -7178,8 +7096,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7178
7096
 
7179
7097
  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}}
7180
7098
 
7181
- function _extends$A() {
7182
- _extends$A = Object.assign || function (target) {
7099
+ function _extends$z() {
7100
+ _extends$z = Object.assign || function (target) {
7183
7101
  for (var i = 1; i < arguments.length; i++) {
7184
7102
  var source = arguments[i];
7185
7103
 
@@ -7193,7 +7111,7 @@ function _extends$A() {
7193
7111
  return target;
7194
7112
  };
7195
7113
 
7196
- return _extends$A.apply(this, arguments);
7114
+ return _extends$z.apply(this, arguments);
7197
7115
  }
7198
7116
 
7199
7117
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7283,7 +7201,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7283
7201
  var reducer = function reducer(state, action) {
7284
7202
  switch (action.type) {
7285
7203
  case ActionType.ADD_TOAST:
7286
- return _extends$A({}, state, {
7204
+ return _extends$z({}, state, {
7287
7205
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7288
7206
  });
7289
7207
 
@@ -7293,9 +7211,9 @@ var reducer = function reducer(state, action) {
7293
7211
  clearFromRemoveQueue(action.toast.id);
7294
7212
  }
7295
7213
 
7296
- return _extends$A({}, state, {
7214
+ return _extends$z({}, state, {
7297
7215
  toasts: state.toasts.map(function (t) {
7298
- return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7216
+ return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7299
7217
  })
7300
7218
  });
7301
7219
 
@@ -7322,9 +7240,9 @@ var reducer = function reducer(state, action) {
7322
7240
  });
7323
7241
  }
7324
7242
 
7325
- return _extends$A({}, state, {
7243
+ return _extends$z({}, state, {
7326
7244
  toasts: state.toasts.map(function (t) {
7327
- return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7245
+ return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7328
7246
  visible: false
7329
7247
  }) : t;
7330
7248
  })
@@ -7332,28 +7250,28 @@ var reducer = function reducer(state, action) {
7332
7250
 
7333
7251
  case ActionType.REMOVE_TOAST:
7334
7252
  if (action.toastId === undefined) {
7335
- return _extends$A({}, state, {
7253
+ return _extends$z({}, state, {
7336
7254
  toasts: []
7337
7255
  });
7338
7256
  }
7339
7257
 
7340
- return _extends$A({}, state, {
7258
+ return _extends$z({}, state, {
7341
7259
  toasts: state.toasts.filter(function (t) {
7342
7260
  return t.id !== action.toastId;
7343
7261
  })
7344
7262
  });
7345
7263
 
7346
7264
  case ActionType.START_PAUSE:
7347
- return _extends$A({}, state, {
7265
+ return _extends$z({}, state, {
7348
7266
  pausedAt: action.time
7349
7267
  });
7350
7268
 
7351
7269
  case ActionType.END_PAUSE:
7352
7270
  var diff = action.time - (state.pausedAt || 0);
7353
- return _extends$A({}, state, {
7271
+ return _extends$z({}, state, {
7354
7272
  pausedAt: undefined,
7355
7273
  toasts: state.toasts.map(function (t) {
7356
- return _extends$A({}, t, {
7274
+ return _extends$z({}, t, {
7357
7275
  pauseDuration: t.pauseDuration + diff
7358
7276
  });
7359
7277
  })
@@ -7400,12 +7318,12 @@ var useStore = function useStore(toastOptions) {
7400
7318
  var mergedToasts = state.toasts.map(function (t) {
7401
7319
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7402
7320
 
7403
- return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7321
+ return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7404
7322
  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],
7405
- style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7323
+ style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7406
7324
  });
7407
7325
  });
7408
- return _extends$A({}, state, {
7326
+ return _extends$z({}, state, {
7409
7327
  toasts: mergedToasts
7410
7328
  });
7411
7329
  };
@@ -7415,7 +7333,7 @@ var createToast = function createToast(message, type, opts) {
7415
7333
  type = 'blank';
7416
7334
  }
7417
7335
 
7418
- return _extends$A({
7336
+ return _extends$z({
7419
7337
  createdAt: Date.now(),
7420
7338
  visible: true,
7421
7339
  type: type,
@@ -7465,14 +7383,14 @@ toast.remove = function (toastId) {
7465
7383
  };
7466
7384
 
7467
7385
  toast.promise = function (promise, msgs, opts) {
7468
- var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7386
+ var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7469
7387
  promise.then(function (p) {
7470
- toast.success(resolveValue(msgs.success, p), _extends$A({
7388
+ toast.success(resolveValue(msgs.success, p), _extends$z({
7471
7389
  id: id
7472
7390
  }, opts, opts == null ? void 0 : opts.success));
7473
7391
  return p;
7474
7392
  })["catch"](function (e) {
7475
- toast.error(resolveValue(msgs.error, e), _extends$A({
7393
+ toast.error(resolveValue(msgs.error, e), _extends$z({
7476
7394
  id: id
7477
7395
  }, opts, opts == null ? void 0 : opts.error));
7478
7396
  });
@@ -7811,7 +7729,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7811
7729
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7812
7730
  return React.createElement(ToastBarBase, {
7813
7731
  className: toast.className,
7814
- style: _extends$A({}, animationStyle, style, toast.style)
7732
+ style: _extends$z({}, animationStyle, style, toast.style)
7815
7733
  }, typeof children === 'function' ? children({
7816
7734
  icon: icon,
7817
7735
  message: message
@@ -7841,7 +7759,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7841
7759
  } : position.includes('right') ? {
7842
7760
  justifyContent: 'flex-end'
7843
7761
  } : {};
7844
- return _extends$A({
7762
+ return _extends$z({
7845
7763
  left: 0,
7846
7764
  right: 0,
7847
7765
  display: 'flex',
@@ -7868,7 +7786,7 @@ var Toaster = function Toaster(_ref) {
7868
7786
  handlers = _useToaster.handlers;
7869
7787
 
7870
7788
  return React.createElement("div", {
7871
- style: _extends$A({
7789
+ style: _extends$z({
7872
7790
  position: 'fixed',
7873
7791
  zIndex: 9999,
7874
7792
  top: DEFAULT_OFFSET,
@@ -7903,82 +7821,82 @@ var Toaster = function Toaster(_ref) {
7903
7821
  }));
7904
7822
  };
7905
7823
 
7906
- var _path$x;
7824
+ var _path$w;
7907
7825
 
7908
- 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); }
7826
+ 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); }
7909
7827
 
7910
7828
  function SvgCheckSolid(props) {
7911
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
7829
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7912
7830
  xmlns: "http://www.w3.org/2000/svg",
7913
7831
  className: "h-5 w-5",
7914
7832
  viewBox: "0 0 20 20",
7915
7833
  fill: "currentColor"
7916
- }, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
7834
+ }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7917
7835
  fillRule: "evenodd",
7918
7836
  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",
7919
7837
  clipRule: "evenodd"
7920
7838
  })));
7921
7839
  }
7922
7840
 
7923
- var _path$w;
7841
+ var _path$v;
7924
7842
 
7925
- 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); }
7843
+ 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); }
7926
7844
 
7927
7845
  function SvgXIcon(props) {
7928
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
7846
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7929
7847
  xmlns: "http://www.w3.org/2000/svg",
7930
7848
  viewBox: "0 0 20 20",
7931
7849
  fill: "currentColor"
7932
- }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
7850
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7933
7851
  fill: "evenodd",
7934
7852
  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",
7935
7853
  clipRule: "evenodd"
7936
7854
  })));
7937
7855
  }
7938
7856
 
7939
- var _path$v;
7857
+ var _path$u;
7940
7858
 
7941
- 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); }
7859
+ 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); }
7942
7860
 
7943
7861
  function SvgXIconSolid(props) {
7944
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7862
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7945
7863
  className: "plc-w-4 plc-h-4",
7946
7864
  fill: "currentColor",
7947
7865
  xmlns: "http://www.w3.org/2000/svg",
7948
7866
  viewBox: "0 0 100 100"
7949
- }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7867
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7950
7868
  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"
7951
7869
  })));
7952
7870
  }
7953
7871
 
7954
- var _path$u;
7872
+ var _path$t;
7955
7873
 
7956
- 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); }
7874
+ 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); }
7957
7875
 
7958
7876
  function SvgExclamation(props) {
7959
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7877
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7960
7878
  className: "plc-w-4 plc-h-4 plc-mr-1",
7961
7879
  xmlns: "http://www.w3.org/2000/svg",
7962
7880
  viewBox: "0 0 20 20",
7963
7881
  fill: "currentColor"
7964
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7882
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7965
7883
  fillRule: "evenodd",
7966
7884
  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",
7967
7885
  clipRule: "evenodd"
7968
7886
  })));
7969
7887
  }
7970
7888
 
7971
- var _path$t, _path2$4;
7889
+ var _path$s, _path2$4;
7972
7890
 
7973
- 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); }
7891
+ 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); }
7974
7892
 
7975
7893
  function SvgSpinner(props) {
7976
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7894
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7977
7895
  className: "plc-animate-spin",
7978
7896
  viewBox: "0 0 24 24",
7979
7897
  fill: "currentColor",
7980
7898
  xmlns: "http://www.w3.org/2000/svg"
7981
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7899
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7982
7900
  opacity: 0.2,
7983
7901
  fill: "evenodd",
7984
7902
  clipRule: "evenodd",
@@ -8268,9 +8186,7 @@ const init$1 = () => {
8268
8186
  return switchToAddressView();
8269
8187
  });
8270
8188
  } else {
8271
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8272
- return switchView("subscription-options");
8273
- });
8189
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8274
8190
  }
8275
8191
  }
8276
8192
  }
@@ -8432,8 +8348,7 @@ function Link({
8432
8348
  const init = () => {
8433
8349
  const {
8434
8350
  switchView,
8435
- set,
8436
- setProductsList
8351
+ set
8437
8352
  } = usePelcro.getStore();
8438
8353
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8439
8354
 
@@ -8484,8 +8399,7 @@ const init = () => {
8484
8399
  }
8485
8400
 
8486
8401
  notify.dismiss(NOTIFICATION_ID);
8487
- setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8488
- switchView("plan-select");
8402
+ switchView("_plan-select-entitlements");
8489
8403
  }
8490
8404
  }, "Subscribe"), "now to get full page access.")), {
8491
8405
  className: "pelcro-notification-entitlement",
@@ -8737,17 +8651,21 @@ const getErrorMessages = error => {
8737
8651
  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;
8738
8652
  }
8739
8653
 
8740
- if (error !== null && error !== void 0 && error.message) {
8741
- return error.message;
8742
- }
8654
+ 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) {
8655
+ var _error$response6, _error$response6$data;
8743
8656
 
8744
- const errorMessages = []; // enumerable error (ex: validation errors)
8657
+ const errorMessages = []; // enumerable error (ex: validation errors)
8745
8658
 
8746
- 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]) => {
8747
- errorMessages.push(errorMessage);
8748
- }); // convert to multiline string
8659
+ 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]) => {
8660
+ errorMessages.push(errorMessage);
8661
+ }); // convert to multiline string
8749
8662
 
8750
- return errorMessages.join("\n");
8663
+ return errorMessages.join("\n");
8664
+ }
8665
+
8666
+ if (error !== null && error !== void 0 && error.message) {
8667
+ return error.message;
8668
+ }
8751
8669
  };
8752
8670
  /**
8753
8671
  * Executes function after a wait time of inactivity
@@ -9320,7 +9238,7 @@ const PelcroModalController = ({
9320
9238
  type
9321
9239
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default['default'].Children.map(children, child => child).find(({
9322
9240
  type
9323
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default['default'].Children.map(children, child => child).find(({
9241
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default['default'].Children.map(children, child => child).find(({
9324
9242
  type
9325
9243
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default['default'].Children.map(children, child => child).find(({
9326
9244
  type
@@ -9601,10 +9519,8 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9601
9519
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9602
9520
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9603
9521
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9604
- const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9605
- const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9606
9522
 
9607
- const initialState$i = {
9523
+ const initialState$h = {
9608
9524
  email: "",
9609
9525
  password: "",
9610
9526
  emailError: null,
@@ -9615,10 +9531,10 @@ const initialState$i = {
9615
9531
  content: ""
9616
9532
  }
9617
9533
  };
9618
- const store$i = /*#__PURE__*/React.createContext(initialState$i);
9534
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
9619
9535
  const {
9620
- Provider: Provider$i
9621
- } = store$i;
9536
+ Provider: Provider$h
9537
+ } = store$h;
9622
9538
 
9623
9539
  const LoginContainer = ({
9624
9540
  style,
@@ -9725,7 +9641,7 @@ const LoginContainer = ({
9725
9641
  });
9726
9642
 
9727
9643
  case RESET_LOGIN_FORM:
9728
- return initialState$i;
9644
+ return initialState$h;
9729
9645
 
9730
9646
  case DISABLE_LOGIN_BUTTON:
9731
9647
  return lib_7({ ...state,
@@ -9743,12 +9659,12 @@ const LoginContainer = ({
9743
9659
  default:
9744
9660
  return state;
9745
9661
  }
9746
- }, initialState$i);
9662
+ }, initialState$h);
9747
9663
  return /*#__PURE__*/React__default['default'].createElement("div", {
9748
9664
  style: { ...style
9749
9665
  },
9750
9666
  className: `pelcro-container pelcro-login-container ${className}`
9751
- }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
9667
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
9752
9668
  value: {
9753
9669
  state,
9754
9670
  dispatch
@@ -9756,12 +9672,12 @@ const LoginContainer = ({
9756
9672
  }, children.length ? children.map((child, i) => {
9757
9673
  if (child) {
9758
9674
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9759
- store: store$i,
9675
+ store: store$h,
9760
9676
  key: i
9761
9677
  });
9762
9678
  }
9763
9679
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9764
- store: store$i
9680
+ store: store$h
9765
9681
  })));
9766
9682
  };
9767
9683
 
@@ -9931,6 +9847,9 @@ function ConfirmPassword({
9931
9847
  store,
9932
9848
  ...otherProps
9933
9849
  }) {
9850
+ const {
9851
+ t
9852
+ } = useTranslation("common");
9934
9853
  const {
9935
9854
  dispatch,
9936
9855
  state: {
@@ -9955,7 +9874,7 @@ function ConfirmPassword({
9955
9874
  } else if (finishedTyping) {
9956
9875
  dispatch({
9957
9876
  type: SET_CONFIRM_PASSWORD_ERROR,
9958
- payload: "Confirm password is required."
9877
+ payload: t("validation.confirmPassword")
9959
9878
  });
9960
9879
  }
9961
9880
  }, [dispatch, password, finishedTyping]);
@@ -10006,7 +9925,7 @@ const LoginButton = ({
10006
9925
  buttonDisabled
10007
9926
  },
10008
9927
  dispatch
10009
- } = React.useContext(store$i);
9928
+ } = React.useContext(store$h);
10010
9929
  const {
10011
9930
  t
10012
9931
  } = useTranslation("login");
@@ -10027,23 +9946,23 @@ const LoginButton = ({
10027
9946
  };
10028
9947
 
10029
9948
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10030
- store: store$i
9949
+ store: store$h
10031
9950
  }, props));
10032
9951
 
10033
9952
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10034
- store: store$i
9953
+ store: store$h
10035
9954
  }, props));
10036
9955
 
10037
- var _path$s;
9956
+ var _path$r;
10038
9957
 
10039
- 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); }
9958
+ 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); }
10040
9959
 
10041
9960
  function SvgCheck(props) {
10042
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
9961
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10043
9962
  xmlns: "http://www.w3.org/2000/svg",
10044
9963
  fill: "currentColor",
10045
9964
  viewBox: "0 0 20 20"
10046
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
9965
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10047
9966
  fillRule: "evenodd",
10048
9967
  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",
10049
9968
  clipRule: "evenodd"
@@ -10108,7 +10027,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
10108
10027
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
10109
10028
  facebookLoginRenderProps.FacebookLogin;
10110
10029
 
10111
- const initialState$h = {
10030
+ const initialState$g = {
10112
10031
  email: "",
10113
10032
  password: "",
10114
10033
  emailError: null,
@@ -10125,10 +10044,10 @@ const initialState$h = {
10125
10044
  content: ""
10126
10045
  }
10127
10046
  };
10128
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
10047
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
10129
10048
  const {
10130
- Provider: Provider$h
10131
- } = store$h;
10049
+ Provider: Provider$g
10050
+ } = store$g;
10132
10051
 
10133
10052
  const RegisterContainer = ({
10134
10053
  style,
@@ -10311,7 +10230,7 @@ const RegisterContainer = ({
10311
10230
  });
10312
10231
 
10313
10232
  case RESET_LOGIN_FORM:
10314
- return initialState$h;
10233
+ return initialState$g;
10315
10234
 
10316
10235
  case DISABLE_REGISTRATION_BUTTON:
10317
10236
  return lib_7({ ...state,
@@ -10329,12 +10248,12 @@ const RegisterContainer = ({
10329
10248
  default:
10330
10249
  return state;
10331
10250
  }
10332
- }, initialState$h);
10251
+ }, initialState$g);
10333
10252
  return /*#__PURE__*/React__default['default'].createElement("div", {
10334
10253
  style: { ...style
10335
10254
  },
10336
10255
  className: `pelcro-container pelcro-register-container ${className}`
10337
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
10256
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
10338
10257
  value: {
10339
10258
  state,
10340
10259
  dispatch
@@ -10342,12 +10261,12 @@ const RegisterContainer = ({
10342
10261
  }, children.length ? children.map((child, i) => {
10343
10262
  if (child) {
10344
10263
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
10345
- store: store$h,
10264
+ store: store$g,
10346
10265
  key: i
10347
10266
  });
10348
10267
  }
10349
10268
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
10350
- store: store$h
10269
+ store: store$g
10351
10270
  })));
10352
10271
  };
10353
10272
  /**
@@ -10362,15 +10281,15 @@ function hasSecurityTokenEnabled$1() {
10362
10281
  return hasSecuritySdkLoaded;
10363
10282
  }
10364
10283
 
10365
- var _path$r;
10284
+ var _path$q;
10366
10285
 
10367
- 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); }
10286
+ 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); }
10368
10287
 
10369
10288
  function SvgFacebookLogo(props) {
10370
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
10289
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10371
10290
  xmlns: "http://www.w3.org/2000/svg",
10372
10291
  viewBox: "88.428 12.828 107.543 207.085"
10373
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
10292
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10374
10293
  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",
10375
10294
  fill: "#3c5a9a"
10376
10295
  })));
@@ -10387,10 +10306,10 @@ const FacebookLoginButton = ({
10387
10306
  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;
10388
10307
  const {
10389
10308
  dispatch: loginDispatch
10390
- } = React.useContext(store$i);
10309
+ } = React.useContext(store$h);
10391
10310
  const {
10392
10311
  dispatch: registerDispatch
10393
- } = React.useContext(store$h);
10312
+ } = React.useContext(store$g);
10394
10313
 
10395
10314
  const onSuccess = facebookUser => {
10396
10315
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10443,15 +10362,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10443
10362
  unwrapExports(googleLogin);
10444
10363
  var googleLogin_1 = googleLogin.GoogleLogin;
10445
10364
 
10446
- var _path$q, _path2$3, _path3$1, _path4;
10365
+ var _path$p, _path2$3, _path3$1, _path4;
10447
10366
 
10448
- 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); }
10367
+ 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); }
10449
10368
 
10450
10369
  function SvgGoogleLogo(props) {
10451
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
10370
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10452
10371
  viewBox: "0 0 24 24",
10453
10372
  xmlns: "http://www.w3.org/2000/svg"
10454
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
10373
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10455
10374
  fill: "#4285F4",
10456
10375
  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"
10457
10376
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10477,10 +10396,10 @@ const GoogleLoginButton = ({
10477
10396
  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;
10478
10397
  const {
10479
10398
  dispatch: loginDispatch
10480
- } = React.useContext(store$i);
10399
+ } = React.useContext(store$h);
10481
10400
  const {
10482
10401
  dispatch: registerDispatch
10483
- } = React.useContext(store$h);
10402
+ } = React.useContext(store$g);
10484
10403
 
10485
10404
  const onSuccess = response => {
10486
10405
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10528,15 +10447,15 @@ const GoogleLoginButton = ({
10528
10447
  }) : null;
10529
10448
  };
10530
10449
 
10531
- var _path$p;
10450
+ var _path$o;
10532
10451
 
10533
- 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); }
10452
+ 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); }
10534
10453
 
10535
10454
  function SvgAuth0Logo(props) {
10536
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10455
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10537
10456
  viewBox: "0 0 256 285",
10538
10457
  xmlns: "http://www.w3.org/2000/svg"
10539
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10458
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10540
10459
  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"
10541
10460
  })));
10542
10461
  }
@@ -10576,10 +10495,10 @@ const Auth0LoginButton = ({
10576
10495
  }, [auth0Enabled, auth0Loaded]);
10577
10496
  const {
10578
10497
  dispatch: loginDispatch
10579
- } = React.useContext(store$i);
10498
+ } = React.useContext(store$h);
10580
10499
  const {
10581
10500
  dispatch: registerDispatch
10582
- } = React.useContext(store$h);
10501
+ } = React.useContext(store$g);
10583
10502
 
10584
10503
  function handleClick() {
10585
10504
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10712,15 +10631,15 @@ function LoginView(props) {
10712
10631
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10713
10632
  }
10714
10633
 
10715
- var _path$o, _path2$2, _path3;
10634
+ var _path$n, _path2$2, _path3;
10716
10635
 
10717
- 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); }
10636
+ 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); }
10718
10637
 
10719
10638
  function SvgPelcroAuthorship(props) {
10720
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10639
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10721
10640
  xmlns: "http://www.w3.org/2000/svg",
10722
10641
  viewBox: "0 -80.652 497.072 179.991"
10723
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10642
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10724
10643
  fill: "none",
10725
10644
  stroke: "#4a4a4a",
10726
10645
  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"
@@ -10867,11 +10786,11 @@ function LoginModal({
10867
10786
  LoginModal.viewId = "login";
10868
10787
 
10869
10788
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10870
- store: store$h
10789
+ store: store$g
10871
10790
  }, props));
10872
10791
 
10873
10792
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10874
- store: store$h
10793
+ store: store$g
10875
10794
  }, props));
10876
10795
 
10877
10796
  const RegisterButton = ({
@@ -10891,7 +10810,7 @@ const RegisterButton = ({
10891
10810
  buttonDisabled
10892
10811
  },
10893
10812
  dispatch
10894
- } = React.useContext(store$h);
10813
+ } = React.useContext(store$g);
10895
10814
  const {
10896
10815
  t
10897
10816
  } = useTranslation("register");
@@ -11029,7 +10948,7 @@ function FirstName({
11029
10948
  }
11030
10949
 
11031
10950
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
11032
- store: store$h
10951
+ store: store$g
11033
10952
  }, props));
11034
10953
 
11035
10954
  function LastName({
@@ -11060,7 +10979,7 @@ function LastName({
11060
10979
  }
11061
10980
 
11062
10981
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
11063
- store: store$h
10982
+ store: store$g
11064
10983
  }, props));
11065
10984
 
11066
10985
  /**
@@ -11184,7 +11103,7 @@ function TextInput({
11184
11103
 
11185
11104
  const RegisterTextInput = props => {
11186
11105
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
11187
- store: store$h
11106
+ store: store$g
11188
11107
  }));
11189
11108
  };
11190
11109
 
@@ -11331,7 +11250,6 @@ function SelectModalWithHook(props) {
11331
11250
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11332
11251
  }, []);
11333
11252
  const {
11334
- productsList,
11335
11253
  isGift,
11336
11254
  plan,
11337
11255
  product,
@@ -11341,12 +11259,11 @@ function SelectModalWithHook(props) {
11341
11259
  view,
11342
11260
  set
11343
11261
  } = usePelcro();
11344
- const isRenewingSub = view === "_plan-select-renew";
11262
+ const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11263
+ const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11345
11264
  return /*#__PURE__*/React__default['default'].createElement(SelectModalWithTrans, {
11346
- productsList: productsList,
11347
11265
  isGift: isGift,
11348
- disableGifting: isRenewingGift || isRenewingSub,
11349
- isRenewingSub: isRenewingSub,
11266
+ disableGifting: isRenewingGift,
11350
11267
  plan: plan,
11351
11268
  product: product,
11352
11269
  onClose: () => {
@@ -11360,10 +11277,8 @@ function SelectModalWithHook(props) {
11360
11277
  plan,
11361
11278
  isGift
11362
11279
  }),
11363
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11364
- subscriptionIdToRenew
11365
- }),
11366
- setView: switchView
11280
+ setView: switchView,
11281
+ matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11367
11282
  });
11368
11283
  }
11369
11284
  SelectModalWithHook.viewId = "plan-select";
@@ -11395,10 +11310,10 @@ class SelectModal extends React.Component {
11395
11310
  });
11396
11311
  }
11397
11312
 
11398
- if (this.props.productsList.length === 1) {
11313
+ if (this.state.productList.length === 1) {
11399
11314
  this.setState({
11400
- product: this.props.productsList[0],
11401
- planList: this.props.productsList[0].plans,
11315
+ product: this.state.productList[0],
11316
+ planList: this.state.productList[0].plans,
11402
11317
  mode: "plan"
11403
11318
  });
11404
11319
  }
@@ -11415,7 +11330,7 @@ class SelectModal extends React.Component {
11415
11330
  });
11416
11331
 
11417
11332
  _defineProperty$3(this, "onProductChange", e => {
11418
- const product = productsList[e.target.selectedIndex];
11333
+ const product = window.Pelcro.product.list()[e.target.selectedIndex];
11419
11334
  this.setState({
11420
11335
  product: product,
11421
11336
  plan: product.plans[0]
@@ -11481,7 +11396,7 @@ class SelectModal extends React.Component {
11481
11396
 
11482
11397
  _defineProperty$3(this, "renderProducts", () => {
11483
11398
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11484
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11399
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11485
11400
  return productsToShow.map((product, index) => {
11486
11401
  return this.renderOneProduct(product, index);
11487
11402
  });
@@ -11494,7 +11409,7 @@ class SelectModal extends React.Component {
11494
11409
  return this.renderOneProduct(this.state.product);
11495
11410
  }
11496
11411
 
11497
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11412
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11498
11413
 
11499
11414
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11500
11415
  return this.renderProducts();
@@ -11510,7 +11425,10 @@ class SelectModal extends React.Component {
11510
11425
  className: "plc-text-sm plc-font-semibold"
11511
11426
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11512
11427
 
11513
- function productsWithMatchedTaggedFirst(allProducts) {
11428
+ function productsWithMatchedTaggedFirst() {
11429
+ var _window$Pelcro$produc;
11430
+
11431
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11514
11432
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11515
11433
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11516
11434
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11544,7 +11462,7 @@ class SelectModal extends React.Component {
11544
11462
  _defineProperty$3(this, "selectProduct", e => {
11545
11463
  const id = e.target.dataset.key;
11546
11464
 
11547
- for (const product of this.props.productsList) {
11465
+ for (const product of this.state.productList) {
11548
11466
  if (+product.id === +id) {
11549
11467
  var _this$state$plan;
11550
11468
 
@@ -11597,14 +11515,6 @@ class SelectModal extends React.Component {
11597
11515
 
11598
11516
  _defineProperty$3(this, "submitOption", () => {
11599
11517
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11600
-
11601
- if (this.props.isRenewingSub) {
11602
- var _matchingSub$id;
11603
-
11604
- const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11605
- this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11606
- }
11607
-
11608
11518
  const {
11609
11519
  product,
11610
11520
  isGift
@@ -11642,7 +11552,8 @@ class SelectModal extends React.Component {
11642
11552
  plan: {},
11643
11553
  isGift: props.isGift,
11644
11554
  disabled: true,
11645
- mode: "product"
11555
+ mode: "product",
11556
+ productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11646
11557
  };
11647
11558
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11648
11559
  this.locale = this.props.t;
@@ -11650,7 +11561,7 @@ class SelectModal extends React.Component {
11650
11561
  }
11651
11562
 
11652
11563
  render() {
11653
- var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11564
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11654
11565
 
11655
11566
  const {
11656
11567
  disableGifting
@@ -11684,7 +11595,7 @@ class SelectModal extends React.Component {
11684
11595
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11685
11596
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
11686
11597
  className: "plc-text-2xl plc-font-semibold"
11687
- }, 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['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['default'].createElement("div", {
11598
+ }, 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['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['default'].createElement("div", {
11688
11599
  className: "pelcro-select-products-wrapper"
11689
11600
  }, (_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['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11690
11601
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13536,7 +13447,7 @@ class VantivGateway {
13536
13447
 
13537
13448
  /** @type {PaymentStateType} */
13538
13449
 
13539
- const initialState$g = {
13450
+ const initialState$f = {
13540
13451
  disableSubmit: false,
13541
13452
  isLoading: false,
13542
13453
  disableCouponButton: false,
@@ -13555,10 +13466,10 @@ const initialState$g = {
13555
13466
  content: ""
13556
13467
  }
13557
13468
  };
13558
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
13469
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
13559
13470
  const {
13560
- Provider: Provider$g
13561
- } = store$g;
13471
+ Provider: Provider$f
13472
+ } = store$f;
13562
13473
 
13563
13474
  const PaymentMethodContainerWithoutStripe = ({
13564
13475
  style,
@@ -14810,21 +14721,21 @@ const PaymentMethodContainerWithoutStripe = ({
14810
14721
  default:
14811
14722
  return state;
14812
14723
  }
14813
- }, initialState$g);
14724
+ }, initialState$f);
14814
14725
  return /*#__PURE__*/React__default['default'].createElement("div", {
14815
14726
  style: { ...style
14816
14727
  },
14817
14728
  className: `pelcro-container pelcro-payment-container ${className}`
14818
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
14729
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
14819
14730
  value: {
14820
14731
  state,
14821
14732
  dispatch
14822
14733
  }
14823
14734
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
14824
- store: store$g,
14735
+ store: store$f,
14825
14736
  key: i
14826
14737
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
14827
- store: store$g
14738
+ store: store$f
14828
14739
  })));
14829
14740
  };
14830
14741
 
@@ -14846,7 +14757,7 @@ const PaymentMethodContainer = props => {
14846
14757
  stripeAccount: window.Pelcro.site.read().account_id,
14847
14758
  locale: getPageOrDefaultLanguage()
14848
14759
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
14849
- store: store$g
14760
+ store: store$f
14850
14761
  }, props))));
14851
14762
  }
14852
14763
 
@@ -14899,7 +14810,7 @@ const PelcroPaymentRequestButton = props => {
14899
14810
  currentPlan,
14900
14811
  updatedPrice
14901
14812
  }
14902
- } = React.useContext(store$g);
14813
+ } = React.useContext(store$f);
14903
14814
 
14904
14815
  const updatePaymentRequest = () => {
14905
14816
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14975,7 +14886,7 @@ const DiscountedPrice = props => {
14975
14886
  taxAmount,
14976
14887
  percentOff
14977
14888
  }
14978
- } = React.useContext(store$g);
14889
+ } = React.useContext(store$f);
14979
14890
  const {
14980
14891
  order,
14981
14892
  plan
@@ -15025,7 +14936,7 @@ const SubmitPaymentMethod = ({
15025
14936
  isLoading,
15026
14937
  updatedPrice
15027
14938
  }
15028
- } = React.useContext(store$g);
14939
+ } = React.useContext(store$f);
15029
14940
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
15030
14941
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
15031
14942
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -15046,17 +14957,17 @@ const SubmitPaymentMethod = ({
15046
14957
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
15047
14958
  };
15048
14959
 
15049
- var _path$n;
14960
+ var _path$m;
15050
14961
 
15051
- 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); }
14962
+ 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); }
15052
14963
 
15053
14964
  function SvgArrowLeft(props) {
15054
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
14965
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
15055
14966
  xmlns: "http://www.w3.org/2000/svg",
15056
14967
  fill: "none",
15057
14968
  viewBox: "0 0 24 24",
15058
14969
  stroke: "currentColor"
15059
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
14970
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
15060
14971
  strokeLinecap: "round",
15061
14972
  strokeLinejoin: "round",
15062
14973
  strokeWidth: 2,
@@ -15075,7 +14986,7 @@ const ApplyCouponButton = ({
15075
14986
  disableCouponButton
15076
14987
  },
15077
14988
  dispatch
15078
- } = React.useContext(store$g);
14989
+ } = React.useContext(store$f);
15079
14990
  const {
15080
14991
  t
15081
14992
  } = useTranslation("checkoutForm");
@@ -15109,7 +15020,7 @@ const CouponCodeField = props => {
15109
15020
  couponCode,
15110
15021
  couponError
15111
15022
  }
15112
- } = React.useContext(store$g);
15023
+ } = React.useContext(store$f);
15113
15024
 
15114
15025
  const onCouponCodeChange = e => {
15115
15026
  dispatch({
@@ -15138,17 +15049,17 @@ const CouponCodeField = props => {
15138
15049
  }, props));
15139
15050
  };
15140
15051
 
15141
- var _path$m;
15052
+ var _path$l;
15142
15053
 
15143
- 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); }
15054
+ 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); }
15144
15055
 
15145
15056
  function SvgTicket(props) {
15146
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
15057
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
15147
15058
  xmlns: "http://www.w3.org/2000/svg",
15148
15059
  fill: "none",
15149
15060
  viewBox: "0 0 24 24",
15150
15061
  stroke: "currentColor"
15151
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
15062
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
15152
15063
  strokeLinecap: "round",
15153
15064
  strokeLinejoin: "round",
15154
15065
  strokeWidth: 2,
@@ -15165,7 +15076,7 @@ const CouponCode = ({
15165
15076
  state: {
15166
15077
  enableCouponField
15167
15078
  }
15168
- } = React.useContext(store$g);
15079
+ } = React.useContext(store$f);
15169
15080
  const {
15170
15081
  t
15171
15082
  } = useTranslation("checkoutForm");
@@ -15422,7 +15333,7 @@ const PaypalSubscribeButton = props => {
15422
15333
  const {
15423
15334
  dispatch,
15424
15335
  state
15425
- } = React.useContext(store$g);
15336
+ } = React.useContext(store$f);
15426
15337
  const {
15427
15338
  product,
15428
15339
  plan,
@@ -15529,16 +15440,16 @@ const BankRedirection = () => {
15529
15440
  }));
15530
15441
  };
15531
15442
 
15532
- var _path$l;
15443
+ var _path$k;
15533
15444
 
15534
- 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); }
15445
+ 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); }
15535
15446
 
15536
15447
  function SvgLock(props) {
15537
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
15448
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
15538
15449
  xmlns: "http://www.w3.org/2000/svg",
15539
15450
  viewBox: "0 0 20 20",
15540
15451
  fill: "currentColor"
15541
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
15452
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
15542
15453
  fillRule: "evenodd",
15543
15454
  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",
15544
15455
  clipRule: "evenodd"
@@ -15555,7 +15466,7 @@ const SelectedPaymentMethod = () => {
15555
15466
  state: {
15556
15467
  isLoading
15557
15468
  }
15558
- } = React.useContext(store$g);
15469
+ } = React.useContext(store$f);
15559
15470
  const {
15560
15471
  switchView,
15561
15472
  selectedPaymentMethodId
@@ -15597,7 +15508,7 @@ const TaxAmount = () => {
15597
15508
  state: {
15598
15509
  taxAmount
15599
15510
  }
15600
- } = React.useContext(store$g);
15511
+ } = React.useContext(store$f);
15601
15512
  const {
15602
15513
  plan
15603
15514
  } = usePelcro();
@@ -15761,12 +15672,12 @@ function SubscriptionRenewModal({
15761
15672
  }
15762
15673
  SubscriptionRenewModal.viewId = "subscription-renew";
15763
15674
 
15764
- var _path$k;
15675
+ var _path$j;
15765
15676
 
15766
- 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); }
15677
+ 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); }
15767
15678
 
15768
15679
  function SvgGift(props) {
15769
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
15680
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
15770
15681
  className: "plc-w-6 plc-h-6 plc-mr-2",
15771
15682
  fill: "none",
15772
15683
  stroke: "currentColor",
@@ -15775,7 +15686,7 @@ function SvgGift(props) {
15775
15686
  strokeWidth: 2,
15776
15687
  viewBox: "0 0 24 24",
15777
15688
  xmlns: "http://www.w3.org/2000/svg"
15778
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
15689
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
15779
15690
  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"
15780
15691
  })));
15781
15692
  }
@@ -16116,7 +16027,7 @@ class DefaultNewsLetter extends React.Component {
16116
16027
 
16117
16028
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
16118
16029
 
16119
- const initialState$f = {
16030
+ const initialState$e = {
16120
16031
  didSubToNewslettersBefore: false,
16121
16032
  newsletters: [],
16122
16033
  isListLoading: true,
@@ -16126,10 +16037,10 @@ const initialState$f = {
16126
16037
  content: ""
16127
16038
  }
16128
16039
  };
16129
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
16040
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
16130
16041
  const {
16131
- Provider: Provider$f
16132
- } = store$f;
16042
+ Provider: Provider$e
16043
+ } = store$e;
16133
16044
 
16134
16045
  const NewsletterUpdateContainer = ({
16135
16046
  style,
@@ -16242,7 +16153,7 @@ const NewsletterUpdateContainer = ({
16242
16153
  default:
16243
16154
  return state;
16244
16155
  }
16245
- }, initialState$f);
16156
+ }, initialState$e);
16246
16157
  React.useEffect(() => {
16247
16158
  const getUserNewsletters = () => {
16248
16159
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -16286,7 +16197,7 @@ const NewsletterUpdateContainer = ({
16286
16197
  style: { ...style
16287
16198
  },
16288
16199
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
16289
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
16200
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
16290
16201
  value: {
16291
16202
  state,
16292
16203
  dispatch
@@ -16294,12 +16205,12 @@ const NewsletterUpdateContainer = ({
16294
16205
  }, children.length ? children.map((child, i) => {
16295
16206
  if (child) {
16296
16207
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
16297
- store: store$f,
16208
+ store: store$e,
16298
16209
  key: i
16299
16210
  });
16300
16211
  }
16301
16212
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16302
- store: store$f
16213
+ store: store$e
16303
16214
  })));
16304
16215
  };
16305
16216
 
@@ -16314,7 +16225,7 @@ const NewsletterUpdateButton = ({
16314
16225
  isSubmitting,
16315
16226
  isListLoading
16316
16227
  }
16317
- } = React.useContext(store$f);
16228
+ } = React.useContext(store$e);
16318
16229
  const {
16319
16230
  t
16320
16231
  } = useTranslation("newsletter");
@@ -16344,7 +16255,7 @@ const NewsletterUpdateList = () => {
16344
16255
  newsletters,
16345
16256
  isListLoading
16346
16257
  }
16347
- } = React.useContext(store$f);
16258
+ } = React.useContext(store$e);
16348
16259
 
16349
16260
  if (isListLoading) {
16350
16261
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -16548,7 +16459,7 @@ function SubscriptionCreateModal({
16548
16459
  SubscriptionCreateModal.viewId = "subscription-create";
16549
16460
 
16550
16461
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
16551
- const initialState$e = {
16462
+ const initialState$d = {
16552
16463
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
16553
16464
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
16554
16465
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16561,10 +16472,10 @@ const initialState$e = {
16561
16472
  content: ""
16562
16473
  }
16563
16474
  };
16564
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
16475
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
16565
16476
  const {
16566
- Provider: Provider$e
16567
- } = store$e;
16477
+ Provider: Provider$d
16478
+ } = store$d;
16568
16479
 
16569
16480
  const UserUpdateContainer = ({
16570
16481
  style,
@@ -16696,27 +16607,27 @@ const UserUpdateContainer = ({
16696
16607
  default:
16697
16608
  return state;
16698
16609
  }
16699
- }, initialState$e);
16610
+ }, initialState$d);
16700
16611
  return /*#__PURE__*/React__default['default'].createElement("div", {
16701
16612
  style: { ...style
16702
16613
  },
16703
16614
  className: `pelcro-container pelcro-user-update-container ${className}`
16704
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
16615
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
16705
16616
  value: {
16706
16617
  state,
16707
16618
  dispatch
16708
16619
  }
16709
16620
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16710
- store: store$e,
16621
+ store: store$d,
16711
16622
  key: i
16712
16623
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16713
- store: store$e
16624
+ store: store$d
16714
16625
  })));
16715
16626
  };
16716
16627
 
16717
16628
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
16718
16629
  disabled: true,
16719
- store: store$e
16630
+ store: store$d
16720
16631
  }, props));
16721
16632
 
16722
16633
  const UserUpdateButton = ({
@@ -16729,7 +16640,7 @@ const UserUpdateButton = ({
16729
16640
  buttonDisabled
16730
16641
  },
16731
16642
  dispatch
16732
- } = React.useContext(store$e);
16643
+ } = React.useContext(store$d);
16733
16644
  const {
16734
16645
  t
16735
16646
  } = useTranslation("userEdit");
@@ -16746,11 +16657,11 @@ const UserUpdateButton = ({
16746
16657
  };
16747
16658
 
16748
16659
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
16749
- store: store$e
16660
+ store: store$d
16750
16661
  }, props));
16751
16662
 
16752
16663
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
16753
- store: store$e
16664
+ store: store$d
16754
16665
  }, props));
16755
16666
 
16756
16667
  function Phone({
@@ -16779,22 +16690,22 @@ function Phone({
16779
16690
  }
16780
16691
 
16781
16692
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
16782
- store: store$e
16693
+ store: store$d
16783
16694
  }, props));
16784
16695
 
16785
16696
  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";
16786
16697
 
16787
- var _path$j;
16698
+ var _path$i;
16788
16699
 
16789
- 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); }
16700
+ 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); }
16790
16701
 
16791
16702
  function SvgEdit(props) {
16792
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
16703
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
16793
16704
  className: "plc-w-6 plc-h-6",
16794
16705
  xmlns: "http://www.w3.org/2000/svg",
16795
16706
  viewBox: "0 0 20 20",
16796
16707
  fill: "currentColor"
16797
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
16708
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
16798
16709
  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"
16799
16710
  })));
16800
16711
  }
@@ -16926,16 +16837,16 @@ function DisplayName({
16926
16837
  }
16927
16838
 
16928
16839
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
16929
- store: store$e
16840
+ store: store$d
16930
16841
  }, props));
16931
16842
 
16932
16843
  const UserUpdateTextInput = props => {
16933
16844
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16934
- store: store$e
16845
+ store: store$d
16935
16846
  }));
16936
16847
  };
16937
16848
 
16938
- const initialState$d = {
16849
+ const initialState$c = {
16939
16850
  isSubmitting: false,
16940
16851
  firstName: "",
16941
16852
  firstNameError: "",
@@ -16960,10 +16871,10 @@ const initialState$d = {
16960
16871
  content: ""
16961
16872
  }
16962
16873
  };
16963
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
16874
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
16964
16875
  const {
16965
- Provider: Provider$d
16966
- } = store$d;
16876
+ Provider: Provider$c
16877
+ } = store$c;
16967
16878
 
16968
16879
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16969
16880
 
@@ -17170,7 +17081,7 @@ const AddressCreateContainer = ({
17170
17081
  default:
17171
17082
  return state;
17172
17083
  }
17173
- }, initialState$d);
17084
+ }, initialState$c);
17174
17085
  React.useEffect(() => {
17175
17086
  const getStates = () => {
17176
17087
  dispatch({
@@ -17202,16 +17113,16 @@ const AddressCreateContainer = ({
17202
17113
  style: { ...style
17203
17114
  },
17204
17115
  className: `pelcro-container pelcro-address-create-container ${className}`
17205
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
17116
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
17206
17117
  value: {
17207
17118
  state,
17208
17119
  dispatch
17209
17120
  }
17210
17121
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17211
- store: store$d,
17122
+ store: store$c,
17212
17123
  key: i
17213
17124
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17214
- store: store$d
17125
+ store: store$c
17215
17126
  })));
17216
17127
  };
17217
17128
 
@@ -17222,7 +17133,7 @@ function AddressCreateFirstName(props) {
17222
17133
  firstName,
17223
17134
  firstNameError
17224
17135
  }
17225
- } = React.useContext(store$d);
17136
+ } = React.useContext(store$c);
17226
17137
 
17227
17138
  const handleBlur = () => {
17228
17139
  return dispatch({
@@ -17265,7 +17176,7 @@ function AddressCreateLastName(props) {
17265
17176
  lastName,
17266
17177
  lastNameError
17267
17178
  }
17268
- } = React.useContext(store$d);
17179
+ } = React.useContext(store$c);
17269
17180
 
17270
17181
  const handleBlur = () => {
17271
17182
  return dispatch({
@@ -17308,7 +17219,7 @@ function AddressCreateLine1(props) {
17308
17219
  line1,
17309
17220
  line1Error
17310
17221
  }
17311
- } = React.useContext(store$d);
17222
+ } = React.useContext(store$c);
17312
17223
 
17313
17224
  const handleBlur = () => {
17314
17225
  return dispatch({
@@ -17351,7 +17262,7 @@ function AddressCreateCity(props) {
17351
17262
  city,
17352
17263
  cityError
17353
17264
  }
17354
- } = React.useContext(store$d);
17265
+ } = React.useContext(store$c);
17355
17266
 
17356
17267
  const handleBlur = () => {
17357
17268
  return dispatch({
@@ -17394,7 +17305,7 @@ function AddressCreatePostalCode(props) {
17394
17305
  postalCode,
17395
17306
  postalCodeError
17396
17307
  }
17397
- } = React.useContext(store$d);
17308
+ } = React.useContext(store$c);
17398
17309
 
17399
17310
  const handleBlur = () => {
17400
17311
  return dispatch({
@@ -17440,7 +17351,7 @@ const AddressCreateSubmit = ({
17440
17351
  state: {
17441
17352
  isSubmitting
17442
17353
  }
17443
- } = React.useContext(store$d);
17354
+ } = React.useContext(store$c);
17444
17355
  const {
17445
17356
  t
17446
17357
  } = useTranslation("address");
@@ -17551,7 +17462,7 @@ function CountrySelect({
17551
17462
  }
17552
17463
 
17553
17464
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
17554
- store: store$d
17465
+ store: store$c
17555
17466
  }, props));
17556
17467
 
17557
17468
  function StateSelect({
@@ -17639,7 +17550,7 @@ function StateSelect({
17639
17550
  }
17640
17551
 
17641
17552
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17642
- store: store$d
17553
+ store: store$c
17643
17554
  }, props));
17644
17555
 
17645
17556
  const AddressCreateView = props => {
@@ -17744,18 +17655,18 @@ AddressCreateModal.viewId = "address-create";
17744
17655
 
17745
17656
  const AddressCreateTextInput = props => {
17746
17657
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17747
- store: store$d
17658
+ store: store$c
17748
17659
  }));
17749
17660
  };
17750
17661
 
17751
17662
  const AddressCreateLine2 = props => {
17752
17663
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17753
17664
  fieldName: "line2",
17754
- store: store$d
17665
+ store: store$c
17755
17666
  }, props));
17756
17667
  };
17757
17668
 
17758
- const initialState$c = {
17669
+ const initialState$b = {
17759
17670
  isSubmitting: false,
17760
17671
  firstName: "",
17761
17672
  firstNameError: "",
@@ -17780,10 +17691,10 @@ const initialState$c = {
17780
17691
  content: ""
17781
17692
  }
17782
17693
  };
17783
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
17694
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
17784
17695
  const {
17785
- Provider: Provider$c
17786
- } = store$c;
17696
+ Provider: Provider$b
17697
+ } = store$b;
17787
17698
 
17788
17699
  const AddressUpdateContainer = ({
17789
17700
  style,
@@ -17835,7 +17746,7 @@ const AddressUpdateContainer = ({
17835
17746
  const thisAddress = addresses[address];
17836
17747
 
17837
17748
  if (+thisAddress.id === +addressId) {
17838
- const newState = { ...initialState$c,
17749
+ const newState = { ...initialState$b,
17839
17750
  firstName: thisAddress.first_name,
17840
17751
  lastName: thisAddress.last_name,
17841
17752
  line1: thisAddress.line1,
@@ -17968,7 +17879,7 @@ const AddressUpdateContainer = ({
17968
17879
  default:
17969
17880
  return state;
17970
17881
  }
17971
- }, initialState$c);
17882
+ }, initialState$b);
17972
17883
  React.useEffect(() => {
17973
17884
  const getStates = () => {
17974
17885
  dispatch({
@@ -18000,21 +17911,21 @@ const AddressUpdateContainer = ({
18000
17911
  style: { ...style
18001
17912
  },
18002
17913
  className: `pelcro-container pelcro-address-update-container ${className}`
18003
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
17914
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
18004
17915
  value: {
18005
17916
  state,
18006
17917
  dispatch
18007
17918
  }
18008
17919
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18009
- store: store$c,
17920
+ store: store$b,
18010
17921
  key: i
18011
17922
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18012
- store: store$c
17923
+ store: store$b
18013
17924
  })));
18014
17925
  };
18015
17926
 
18016
17927
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
18017
- store: store$c
17928
+ store: store$b
18018
17929
  }, props));
18019
17930
 
18020
17931
  function AddressUpdateFirstName(props) {
@@ -18024,7 +17935,7 @@ function AddressUpdateFirstName(props) {
18024
17935
  firstName,
18025
17936
  firstNameError
18026
17937
  }
18027
- } = React.useContext(store$c);
17938
+ } = React.useContext(store$b);
18028
17939
 
18029
17940
  const handleBlur = () => {
18030
17941
  return dispatch({
@@ -18067,7 +17978,7 @@ function AddressUpdateLastName(props) {
18067
17978
  lastName,
18068
17979
  lastNameError
18069
17980
  }
18070
- } = React.useContext(store$c);
17981
+ } = React.useContext(store$b);
18071
17982
 
18072
17983
  const handleBlur = () => {
18073
17984
  return dispatch({
@@ -18110,7 +18021,7 @@ function AddressUpdateLine1(props) {
18110
18021
  line1,
18111
18022
  line1Error
18112
18023
  }
18113
- } = React.useContext(store$c);
18024
+ } = React.useContext(store$b);
18114
18025
 
18115
18026
  const handleBlur = () => {
18116
18027
  return dispatch({
@@ -18150,7 +18061,7 @@ const AddressUpdateLine2 = props => {
18150
18061
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
18151
18062
  fieldName: "line2"
18152
18063
  }, props, {
18153
- store: store$c
18064
+ store: store$b
18154
18065
  }));
18155
18066
  };
18156
18067
 
@@ -18161,7 +18072,7 @@ function AddressUpdateCity(props) {
18161
18072
  city,
18162
18073
  cityError
18163
18074
  }
18164
- } = React.useContext(store$c);
18075
+ } = React.useContext(store$b);
18165
18076
 
18166
18077
  const handleBlur = () => {
18167
18078
  return dispatch({
@@ -18204,7 +18115,7 @@ function AddressUpdatePostalCode(props) {
18204
18115
  postalCode,
18205
18116
  postalCodeError
18206
18117
  }
18207
- } = React.useContext(store$c);
18118
+ } = React.useContext(store$b);
18208
18119
 
18209
18120
  const handleBlur = () => {
18210
18121
  return dispatch({
@@ -18250,7 +18161,7 @@ const AddressUpdateSubmit = ({
18250
18161
  state: {
18251
18162
  isSubmitting
18252
18163
  }
18253
- } = React.useContext(store$c);
18164
+ } = React.useContext(store$b);
18254
18165
  const {
18255
18166
  t
18256
18167
  } = useTranslation("address");
@@ -18266,7 +18177,7 @@ const AddressUpdateSubmit = ({
18266
18177
  };
18267
18178
 
18268
18179
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
18269
- store: store$c
18180
+ store: store$b
18270
18181
  }, props));
18271
18182
 
18272
18183
  const AddressUpdateView = props => {
@@ -18349,7 +18260,7 @@ AddressUpdateModal.viewId = "address-edit";
18349
18260
 
18350
18261
  const AddressUpdateTextInput = props => {
18351
18262
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
18352
- store: store$c
18263
+ store: store$b
18353
18264
  }));
18354
18265
  };
18355
18266
 
@@ -18432,7 +18343,7 @@ const PaymentMethodUpdateModal = props => {
18432
18343
  };
18433
18344
  PaymentMethodUpdateModal.viewId = "payment-method-update";
18434
18345
 
18435
- const initialState$b = {
18346
+ const initialState$a = {
18436
18347
  email: "",
18437
18348
  password: "",
18438
18349
  passwordError: null,
@@ -18445,10 +18356,10 @@ const initialState$b = {
18445
18356
  content: ""
18446
18357
  }
18447
18358
  };
18448
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
18359
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
18449
18360
  const {
18450
- Provider: Provider$b
18451
- } = store$b;
18361
+ Provider: Provider$a
18362
+ } = store$a;
18452
18363
 
18453
18364
  const PasswordResetContainer = ({
18454
18365
  style,
@@ -18505,7 +18416,7 @@ const PasswordResetContainer = ({
18505
18416
  type: SET_EMAIL,
18506
18417
  payload: window.Pelcro.helpers.getURLParameter("email")
18507
18418
  });
18508
- initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18419
+ initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
18509
18420
  dispatch({
18510
18421
  type: SET_TOKEN,
18511
18422
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18565,26 +18476,26 @@ const PasswordResetContainer = ({
18565
18476
  default:
18566
18477
  return state;
18567
18478
  }
18568
- }, initialState$b);
18479
+ }, initialState$a);
18569
18480
  return /*#__PURE__*/React__default['default'].createElement("div", {
18570
18481
  style: { ...style
18571
18482
  },
18572
18483
  className: `pelcro-container pelcro-password-reset-container ${className}`
18573
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
18484
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18574
18485
  value: {
18575
18486
  state,
18576
18487
  dispatch
18577
18488
  }
18578
18489
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18579
- store: store$b,
18490
+ store: store$a,
18580
18491
  key: i
18581
18492
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18582
- store: store$b
18493
+ store: store$a
18583
18494
  })));
18584
18495
  };
18585
18496
 
18586
18497
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
18587
- store: store$b
18498
+ store: store$a
18588
18499
  }, props));
18589
18500
 
18590
18501
  const PasswordResetButton = ({
@@ -18597,7 +18508,7 @@ const PasswordResetButton = ({
18597
18508
  buttonDisabled
18598
18509
  },
18599
18510
  dispatch
18600
- } = React.useContext(store$b);
18511
+ } = React.useContext(store$a);
18601
18512
  const {
18602
18513
  t
18603
18514
  } = useTranslation("passwordReset");
@@ -18614,14 +18525,14 @@ const PasswordResetButton = ({
18614
18525
  };
18615
18526
 
18616
18527
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18617
- store: store$b
18528
+ store: store$a
18618
18529
  }, props, {
18619
18530
  value: window.Pelcro.helpers.getURLParameter("email"),
18620
18531
  disabled: true
18621
18532
  }));
18622
18533
 
18623
18534
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
18624
- store: store$b
18535
+ store: store$a
18625
18536
  }, props));
18626
18537
 
18627
18538
  const PasswordResetView = props => {
@@ -18673,7 +18584,7 @@ const PasswordResetModal = ({
18673
18584
  };
18674
18585
  PasswordResetModal.viewId = "password-reset";
18675
18586
 
18676
- const initialState$a = {
18587
+ const initialState$9 = {
18677
18588
  email: "",
18678
18589
  emailError: null,
18679
18590
  buttonDisabled: false,
@@ -18682,10 +18593,10 @@ const initialState$a = {
18682
18593
  content: ""
18683
18594
  }
18684
18595
  };
18685
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
18596
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18686
18597
  const {
18687
- Provider: Provider$a
18688
- } = store$a;
18598
+ Provider: Provider$9
18599
+ } = store$9;
18689
18600
 
18690
18601
  const PasswordForgotContainer = ({
18691
18602
  style,
@@ -18763,21 +18674,21 @@ const PasswordForgotContainer = ({
18763
18674
  default:
18764
18675
  return state;
18765
18676
  }
18766
- }, initialState$a);
18677
+ }, initialState$9);
18767
18678
  return /*#__PURE__*/React__default['default'].createElement("div", {
18768
18679
  style: { ...style
18769
18680
  },
18770
18681
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18771
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
18682
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18772
18683
  value: {
18773
18684
  state,
18774
18685
  dispatch
18775
18686
  }
18776
18687
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18777
- store: store$a,
18688
+ store: store$9,
18778
18689
  key: i
18779
18690
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18780
- store: store$a
18691
+ store: store$9
18781
18692
  })));
18782
18693
  };
18783
18694
 
@@ -18793,7 +18704,7 @@ const PasswordForgotButton = ({
18793
18704
  emailError
18794
18705
  },
18795
18706
  dispatch
18796
- } = React.useContext(store$a);
18707
+ } = React.useContext(store$9);
18797
18708
  const {
18798
18709
  t
18799
18710
  } = useTranslation("passwordForgot");
@@ -18814,7 +18725,7 @@ const PasswordForgotButton = ({
18814
18725
  };
18815
18726
 
18816
18727
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18817
- store: store$a
18728
+ store: store$9
18818
18729
  }, props));
18819
18730
 
18820
18731
  const PasswordForgotView = props => {
@@ -18864,7 +18775,7 @@ const PasswordForgotModal = ({
18864
18775
  };
18865
18776
  PasswordForgotModal.viewId = "password-forgot";
18866
18777
 
18867
- const initialState$9 = {
18778
+ const initialState$8 = {
18868
18779
  currentPassword: "",
18869
18780
  newPassword: "",
18870
18781
  confirmNewPassword: "",
@@ -18878,10 +18789,10 @@ const initialState$9 = {
18878
18789
  content: ""
18879
18790
  }
18880
18791
  };
18881
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
18792
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
18882
18793
  const {
18883
- Provider: Provider$9
18884
- } = store$9;
18794
+ Provider: Provider$8
18795
+ } = store$8;
18885
18796
  const PasswordChangeContainer = ({
18886
18797
  style,
18887
18798
  className = "",
@@ -19033,21 +18944,21 @@ const PasswordChangeContainer = ({
19033
18944
  default:
19034
18945
  return state;
19035
18946
  }
19036
- }, initialState$9);
18947
+ }, initialState$8);
19037
18948
  return /*#__PURE__*/React__default['default'].createElement("div", {
19038
18949
  style: { ...style
19039
18950
  },
19040
18951
  className: `pelcro-container pelcro-password-change-container ${className}`
19041
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
18952
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
19042
18953
  value: {
19043
18954
  state,
19044
18955
  dispatch
19045
18956
  }
19046
18957
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19047
- store: store$9,
18958
+ store: store$8,
19048
18959
  key: i
19049
18960
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19050
- store: store$9
18961
+ store: store$8
19051
18962
  })));
19052
18963
  };
19053
18964
 
@@ -19058,7 +18969,7 @@ function PasswordChangeCurrentPassword(props) {
19058
18969
  currentPassword,
19059
18970
  currentPasswordError
19060
18971
  }
19061
- } = React.useContext(store$9);
18972
+ } = React.useContext(store$8);
19062
18973
  const handleBlur = React.useCallback(() => {
19063
18974
  return dispatch({
19064
18975
  type: VALIDATE_PASSWORD
@@ -19092,7 +19003,7 @@ function PasswordChangeNewPassword(props) {
19092
19003
  newPassword,
19093
19004
  newPasswordError
19094
19005
  }
19095
- } = React.useContext(store$9);
19006
+ } = React.useContext(store$8);
19096
19007
  const handleBlur = React.useCallback(() => {
19097
19008
  return dispatch({
19098
19009
  type: VALIDATE_NEW_PASSWORD
@@ -19126,7 +19037,7 @@ function PasswordChangeConfirmNewPassword(props) {
19126
19037
  confirmNewPassword,
19127
19038
  confirmNewPasswordError
19128
19039
  }
19129
- } = React.useContext(store$9);
19040
+ } = React.useContext(store$8);
19130
19041
  const handleBlur = React.useCallback(() => {
19131
19042
  return dispatch({
19132
19043
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -19167,7 +19078,7 @@ const PasswordChangeButton = ({
19167
19078
  confirmNewPasswordError
19168
19079
  },
19169
19080
  dispatch
19170
- } = React.useContext(store$9);
19081
+ } = React.useContext(store$8);
19171
19082
  const {
19172
19083
  t
19173
19084
  } = useTranslation("passwordChange");
@@ -19233,17 +19144,17 @@ const PasswordChangeModal = ({
19233
19144
  };
19234
19145
  PasswordChangeModal.viewId = "password-change";
19235
19146
 
19236
- const initialState$8 = {
19147
+ const initialState$7 = {
19237
19148
  buttonDisabled: false,
19238
19149
  alert: {
19239
19150
  type: "error",
19240
19151
  content: ""
19241
19152
  }
19242
19153
  };
19243
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
19154
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
19244
19155
  const {
19245
- Provider: Provider$8
19246
- } = store$8;
19156
+ Provider: Provider$7
19157
+ } = store$7;
19247
19158
 
19248
19159
  const CartContainer = ({
19249
19160
  style,
@@ -19334,21 +19245,21 @@ const CartContainer = ({
19334
19245
  default:
19335
19246
  return state;
19336
19247
  }
19337
- }, initialState$8);
19248
+ }, initialState$7);
19338
19249
  return /*#__PURE__*/React__default['default'].createElement("div", {
19339
19250
  style: { ...style
19340
19251
  },
19341
19252
  className: `pelcro-container pelcro-cart-container ${className}`
19342
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
19253
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
19343
19254
  value: {
19344
19255
  state,
19345
19256
  dispatch
19346
19257
  }
19347
19258
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19348
- store: store$8,
19259
+ store: store$7,
19349
19260
  key: i
19350
19261
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19351
- store: store$8
19262
+ store: store$7
19352
19263
  })));
19353
19264
  };
19354
19265
 
@@ -19385,7 +19296,7 @@ const CartSubmit = ({
19385
19296
  buttonDisabled
19386
19297
  },
19387
19298
  dispatch
19388
- } = React.useContext(store$8);
19299
+ } = React.useContext(store$7);
19389
19300
  const {
19390
19301
  t
19391
19302
  } = useTranslation("cart");
@@ -19416,7 +19327,7 @@ const CartTotalPrice = () => {
19416
19327
  state: {
19417
19328
  alert
19418
19329
  }
19419
- } = React.useContext(store$8);
19330
+ } = React.useContext(store$7);
19420
19331
  const {
19421
19332
  cartItems
19422
19333
  } = usePelcro();
@@ -19729,7 +19640,7 @@ const OrderConfirmModal = props => {
19729
19640
  };
19730
19641
  OrderConfirmModal.viewId = "order-confirm";
19731
19642
 
19732
- const initialState$7 = {
19643
+ const initialState$6 = {
19733
19644
  email: "",
19734
19645
  firstName: "",
19735
19646
  lastName: "",
@@ -19741,10 +19652,10 @@ const initialState$7 = {
19741
19652
  content: ""
19742
19653
  }
19743
19654
  };
19744
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
19655
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
19745
19656
  const {
19746
- Provider: Provider$7
19747
- } = store$7;
19657
+ Provider: Provider$6
19658
+ } = store$6;
19748
19659
 
19749
19660
  const GiftCreateContainer = ({
19750
19661
  style,
@@ -19848,21 +19759,21 @@ const GiftCreateContainer = ({
19848
19759
  default:
19849
19760
  return state;
19850
19761
  }
19851
- }, initialState$7);
19762
+ }, initialState$6);
19852
19763
  return /*#__PURE__*/React__default['default'].createElement("div", {
19853
19764
  style: { ...style
19854
19765
  },
19855
19766
  className: `pelcro-container pelcro-gift-create-container ${className}`
19856
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
19767
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
19857
19768
  value: {
19858
19769
  state,
19859
19770
  dispatch
19860
19771
  }
19861
19772
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19862
- store: store$7,
19773
+ store: store$6,
19863
19774
  key: i
19864
19775
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19865
- store: store$7
19776
+ store: store$6
19866
19777
  })));
19867
19778
  };
19868
19779
 
@@ -19876,7 +19787,7 @@ const GiftCreateSubmitButton = ({
19876
19787
  state: {
19877
19788
  disableSubmit
19878
19789
  }
19879
- } = React.useContext(store$7);
19790
+ } = React.useContext(store$6);
19880
19791
  const {
19881
19792
  t
19882
19793
  } = useTranslation("register");
@@ -19893,29 +19804,29 @@ const GiftCreateSubmitButton = ({
19893
19804
 
19894
19805
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
19895
19806
  initWithUserEmail: false,
19896
- store: store$7
19807
+ store: store$6
19897
19808
  }, props));
19898
19809
 
19899
19810
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
19900
- store: store$7
19811
+ store: store$6
19901
19812
  }, props));
19902
19813
 
19903
19814
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
19904
- store: store$7
19815
+ store: store$6
19905
19816
  }, props));
19906
19817
 
19907
- var _path$i;
19818
+ var _path$h;
19908
19819
 
19909
- 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); }
19820
+ 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); }
19910
19821
 
19911
19822
  function SvgInfoCircle(props) {
19912
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
19823
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
19913
19824
  xmlns: "http://www.w3.org/2000/svg",
19914
19825
  className: "plc-w-5 plc-h-5",
19915
19826
  fill: "none",
19916
19827
  viewBox: "0 0 24 24",
19917
19828
  stroke: "currentColor"
19918
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
19829
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
19919
19830
  strokeLinecap: "round",
19920
19831
  strokeLinejoin: "round",
19921
19832
  strokeWidth: 2,
@@ -19986,7 +19897,7 @@ const GiftCreateStartDate = props => {
19986
19897
  const {
19987
19898
  dispatch,
19988
19899
  state
19989
- } = React.useContext(store$7);
19900
+ } = React.useContext(store$6);
19990
19901
 
19991
19902
  const handleInputChange = value => {
19992
19903
  dispatch({
@@ -20059,7 +19970,7 @@ function GiftCreateMessage(props) {
20059
19970
  const {
20060
19971
  dispatch,
20061
19972
  state
20062
- } = React.useContext(store$7);
19973
+ } = React.useContext(store$6);
20063
19974
  const MAX_CHARS_COUNT = 200;
20064
19975
  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;
20065
19976
 
@@ -20183,7 +20094,7 @@ const GiftCreateModal = ({
20183
20094
  };
20184
20095
  GiftCreateModal.viewId = "gift-create";
20185
20096
 
20186
- const initialState$6 = {
20097
+ const initialState$5 = {
20187
20098
  giftCode: "",
20188
20099
  buttonDisabled: true,
20189
20100
  alert: {
@@ -20191,10 +20102,10 @@ const initialState$6 = {
20191
20102
  content: ""
20192
20103
  }
20193
20104
  };
20194
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
20105
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
20195
20106
  const {
20196
- Provider: Provider$6
20197
- } = store$6;
20107
+ Provider: Provider$5
20108
+ } = store$5;
20198
20109
 
20199
20110
  const GiftRedeemContainer = ({
20200
20111
  style,
@@ -20259,21 +20170,21 @@ const GiftRedeemContainer = ({
20259
20170
  default:
20260
20171
  return state;
20261
20172
  }
20262
- }, initialState$6);
20173
+ }, initialState$5);
20263
20174
  return /*#__PURE__*/React__default['default'].createElement("div", {
20264
20175
  style: { ...style
20265
20176
  },
20266
20177
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
20267
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
20178
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
20268
20179
  value: {
20269
20180
  state,
20270
20181
  dispatch
20271
20182
  }
20272
20183
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20273
- store: store$6,
20184
+ store: store$5,
20274
20185
  key: i
20275
20186
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20276
- store: store$6
20187
+ store: store$5
20277
20188
  })));
20278
20189
  };
20279
20190
 
@@ -20310,7 +20221,7 @@ function GiftCode({
20310
20221
  }
20311
20222
 
20312
20223
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
20313
- store: store$6
20224
+ store: store$5
20314
20225
  }, props));
20315
20226
 
20316
20227
  const GiftRedeemSubmitButton = ({
@@ -20323,7 +20234,7 @@ const GiftRedeemSubmitButton = ({
20323
20234
  state: {
20324
20235
  disableSubmit
20325
20236
  }
20326
- } = React.useContext(store$6);
20237
+ } = React.useContext(store$5);
20327
20238
  const {
20328
20239
  t
20329
20240
  } = useTranslation("register");
@@ -20416,7 +20327,7 @@ const moveDefaultAddressToStart = addresses => {
20416
20327
  return [defaultAddress, ...addressesWithoutDefault];
20417
20328
  };
20418
20329
 
20419
- const initialState$5 = {
20330
+ const initialState$4 = {
20420
20331
  addresses: [],
20421
20332
  selectedAddressId: null,
20422
20333
  isSubmitting: false,
@@ -20425,10 +20336,10 @@ const initialState$5 = {
20425
20336
  content: ""
20426
20337
  }
20427
20338
  };
20428
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
20339
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
20429
20340
  const {
20430
- Provider: Provider$5
20431
- } = store$5;
20341
+ Provider: Provider$4
20342
+ } = store$4;
20432
20343
 
20433
20344
  const AddressSelectContainer = ({
20434
20345
  style,
@@ -20523,7 +20434,7 @@ const AddressSelectContainer = ({
20523
20434
  default:
20524
20435
  return state;
20525
20436
  }
20526
- }, initialState$5);
20437
+ }, initialState$4);
20527
20438
  React.useEffect(() => {
20528
20439
  var _window$Pelcro$user$r;
20529
20440
 
@@ -20536,16 +20447,16 @@ const AddressSelectContainer = ({
20536
20447
  style: { ...style
20537
20448
  },
20538
20449
  className: `pelcro-container pelcro-address-select-container ${className}`
20539
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
20450
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
20540
20451
  value: {
20541
20452
  state,
20542
20453
  dispatch
20543
20454
  }
20544
20455
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20545
- store: store$5,
20456
+ store: store$4,
20546
20457
  key: i
20547
20458
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20548
- store: store$5
20459
+ store: store$4
20549
20460
  })));
20550
20461
  };
20551
20462
 
@@ -20556,7 +20467,7 @@ const AddressSelectList = () => {
20556
20467
  addresses,
20557
20468
  selectedAddressId
20558
20469
  }
20559
- } = React.useContext(store$5);
20470
+ } = React.useContext(store$4);
20560
20471
 
20561
20472
  const handleAddressSelect = event => {
20562
20473
  dispatch({
@@ -20600,7 +20511,7 @@ const AddressSelectSubmit = ({
20600
20511
  selectedAddressId,
20601
20512
  isSubmitting
20602
20513
  }
20603
- } = React.useContext(store$5);
20514
+ } = React.useContext(store$4);
20604
20515
  const {
20605
20516
  t
20606
20517
  } = useTranslation("address");
@@ -20696,7 +20607,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20696
20607
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20697
20608
  };
20698
20609
 
20699
- const initialState$4 = {
20610
+ const initialState$3 = {
20700
20611
  paymentMethods: [],
20701
20612
  selectedPaymentMethodId: null,
20702
20613
  isSubmitting: false,
@@ -20705,10 +20616,10 @@ const initialState$4 = {
20705
20616
  content: ""
20706
20617
  }
20707
20618
  };
20708
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
20619
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
20709
20620
  const {
20710
- Provider: Provider$4
20711
- } = store$4;
20621
+ Provider: Provider$3
20622
+ } = store$3;
20712
20623
 
20713
20624
  const PaymentMethodSelectContainer = ({
20714
20625
  style,
@@ -20767,7 +20678,7 @@ const PaymentMethodSelectContainer = ({
20767
20678
  default:
20768
20679
  return state;
20769
20680
  }
20770
- }, initialState$4);
20681
+ }, initialState$3);
20771
20682
  React.useEffect(() => {
20772
20683
  var _window$Pelcro$user$r3;
20773
20684
 
@@ -20780,16 +20691,16 @@ const PaymentMethodSelectContainer = ({
20780
20691
  style: { ...style
20781
20692
  },
20782
20693
  className: `pelcro-container pelcro-payment-select-container ${className}`
20783
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
20694
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
20784
20695
  value: {
20785
20696
  state,
20786
20697
  dispatch
20787
20698
  }
20788
20699
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20789
- store: store$4,
20700
+ store: store$3,
20790
20701
  key: i
20791
20702
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20792
- store: store$4
20703
+ store: store$3
20793
20704
  })));
20794
20705
  };
20795
20706
 
@@ -20803,7 +20714,7 @@ const PaymentMethodSelectList = () => {
20803
20714
  paymentMethods,
20804
20715
  selectedPaymentMethodId
20805
20716
  }
20806
- } = React.useContext(store$4);
20717
+ } = React.useContext(store$3);
20807
20718
 
20808
20719
  const handlePaymentMethodSelect = event => {
20809
20720
  dispatch({
@@ -20853,7 +20764,7 @@ const PaymentMethodSelectSubmit = ({
20853
20764
  selectedPaymentMethodId,
20854
20765
  isSubmitting
20855
20766
  }
20856
- } = React.useContext(store$4);
20767
+ } = React.useContext(store$3);
20857
20768
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
20858
20769
  onClick: () => {
20859
20770
  dispatch({
@@ -20927,8 +20838,8 @@ const PaymentMethodSelectModal = ({
20927
20838
  };
20928
20839
  PaymentMethodSelectModal.viewId = "payment-method-select";
20929
20840
 
20930
- function _extends$j() {
20931
- _extends$j = Object.assign || function (target) {
20841
+ function _extends$i() {
20842
+ _extends$i = Object.assign || function (target) {
20932
20843
  for (var i = 1; i < arguments.length; i++) {
20933
20844
  var source = arguments[i];
20934
20845
 
@@ -20942,7 +20853,7 @@ function _extends$j() {
20942
20853
  return target;
20943
20854
  };
20944
20855
 
20945
- return _extends$j.apply(this, arguments);
20856
+ return _extends$i.apply(this, arguments);
20946
20857
  }
20947
20858
 
20948
20859
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -21126,7 +21037,7 @@ function render(props, propsBag, defaultTag, features, visible) {
21126
21037
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
21127
21038
  return null;
21128
21039
  }, _match[RenderStrategy.Hidden] = function () {
21129
- return _render(_extends$j({}, _rest, {
21040
+ return _render(_extends$i({}, _rest, {
21130
21041
  hidden: true,
21131
21042
  style: {
21132
21043
  display: 'none'
@@ -21654,7 +21565,7 @@ function TransitionChild(props) {
21654
21565
  var passthroughProps = rest;
21655
21566
  return React__default['default'].createElement(NestingContext.Provider, {
21656
21567
  value: nesting
21657
- }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21568
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21658
21569
  }
21659
21570
 
21660
21571
  function Transition(props) {
@@ -21698,7 +21609,7 @@ function Transition(props) {
21698
21609
  value: nestingBag
21699
21610
  }, React__default['default'].createElement(TransitionContext.Provider, {
21700
21611
  value: transitionBag
21701
- }, render(_extends$j({}, sharedProps, {
21612
+ }, render(_extends$i({}, sharedProps, {
21702
21613
  as: React.Fragment,
21703
21614
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21704
21615
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21825,12 +21736,12 @@ var ActionTypes;
21825
21736
  })(ActionTypes || (ActionTypes = {}));
21826
21737
 
21827
21738
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21828
- return _extends$j({}, state, {
21739
+ return _extends$i({}, state, {
21829
21740
  activeItemIndex: null,
21830
21741
  menuState: MenuStates.Closed
21831
21742
  });
21832
21743
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21833
- return _extends$j({}, state, {
21744
+ return _extends$i({}, state, {
21834
21745
  menuState: MenuStates.Open
21835
21746
  });
21836
21747
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21849,7 +21760,7 @@ var ActionTypes;
21849
21760
  }
21850
21761
  });
21851
21762
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21852
- return _extends$j({}, state, {
21763
+ return _extends$i({}, state, {
21853
21764
  searchQuery: '',
21854
21765
  activeItemIndex: activeItemIndex
21855
21766
  });
@@ -21860,19 +21771,19 @@ var ActionTypes;
21860
21771
 
21861
21772
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21862
21773
  });
21863
- if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21774
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21864
21775
  searchQuery: searchQuery
21865
21776
  });
21866
- return _extends$j({}, state, {
21777
+ return _extends$i({}, state, {
21867
21778
  searchQuery: searchQuery,
21868
21779
  activeItemIndex: match
21869
21780
  });
21870
21781
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21871
- return _extends$j({}, state, {
21782
+ return _extends$i({}, state, {
21872
21783
  searchQuery: ''
21873
21784
  });
21874
21785
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21875
- return _extends$j({}, state, {
21786
+ return _extends$i({}, state, {
21876
21787
  items: [].concat(state.items, [{
21877
21788
  id: action.id,
21878
21789
  dataRef: action.dataRef
@@ -21885,7 +21796,7 @@ var ActionTypes;
21885
21796
  return a.id === action.id;
21886
21797
  });
21887
21798
  if (idx !== -1) nextItems.splice(idx, 1);
21888
- return _extends$j({}, state, {
21799
+ return _extends$i({}, state, {
21889
21800
  items: nextItems,
21890
21801
  activeItemIndex: function () {
21891
21802
  if (idx === state.activeItemIndex) return null;
@@ -21924,19 +21835,19 @@ var ActionTypes$1;
21924
21835
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21925
21836
  if (state.disabled) return state;
21926
21837
  if (state.listboxState === ListboxStates.Closed) return state;
21927
- return _extends$j({}, state, {
21838
+ return _extends$i({}, state, {
21928
21839
  activeOptionIndex: null,
21929
21840
  listboxState: ListboxStates.Closed
21930
21841
  });
21931
21842
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21932
21843
  if (state.disabled) return state;
21933
21844
  if (state.listboxState === ListboxStates.Open) return state;
21934
- return _extends$j({}, state, {
21845
+ return _extends$i({}, state, {
21935
21846
  listboxState: ListboxStates.Open
21936
21847
  });
21937
21848
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21938
21849
  if (state.disabled === action.disabled) return state;
21939
- return _extends$j({}, state, {
21850
+ return _extends$i({}, state, {
21940
21851
  disabled: action.disabled
21941
21852
  });
21942
21853
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21957,7 +21868,7 @@ var ActionTypes$1;
21957
21868
  }
21958
21869
  });
21959
21870
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21960
- return _extends$j({}, state, {
21871
+ return _extends$i({}, state, {
21961
21872
  searchQuery: '',
21962
21873
  activeOptionIndex: activeOptionIndex
21963
21874
  });
@@ -21970,10 +21881,10 @@ var ActionTypes$1;
21970
21881
 
21971
21882
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21972
21883
  });
21973
- if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21884
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21974
21885
  searchQuery: searchQuery
21975
21886
  });
21976
- return _extends$j({}, state, {
21887
+ return _extends$i({}, state, {
21977
21888
  searchQuery: searchQuery,
21978
21889
  activeOptionIndex: match
21979
21890
  });
@@ -21981,11 +21892,11 @@ var ActionTypes$1;
21981
21892
  if (state.disabled) return state;
21982
21893
  if (state.listboxState === ListboxStates.Closed) return state;
21983
21894
  if (state.searchQuery === '') return state;
21984
- return _extends$j({}, state, {
21895
+ return _extends$i({}, state, {
21985
21896
  searchQuery: ''
21986
21897
  });
21987
21898
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21988
- return _extends$j({}, state, {
21899
+ return _extends$i({}, state, {
21989
21900
  options: [].concat(state.options, [{
21990
21901
  id: action.id,
21991
21902
  dataRef: action.dataRef
@@ -21998,7 +21909,7 @@ var ActionTypes$1;
21998
21909
  return a.id === action.id;
21999
21910
  });
22000
21911
  if (idx !== -1) nextOptions.splice(idx, 1);
22001
- return _extends$j({}, state, {
21912
+ return _extends$i({}, state, {
22002
21913
  options: nextOptions,
22003
21914
  activeOptionIndex: function () {
22004
21915
  if (idx === state.activeOptionIndex) return null;
@@ -22059,18 +21970,18 @@ const getPaymentCardIcon = name => {
22059
21970
  }));
22060
21971
  };
22061
21972
 
22062
- var _path$h;
21973
+ var _path$g;
22063
21974
 
22064
- 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); }
21975
+ 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); }
22065
21976
 
22066
21977
  function SvgChevronRight(props) {
22067
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
21978
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
22068
21979
  className: "plc-w-6 plc-h-6",
22069
21980
  xmlns: "http://www.w3.org/2000/svg",
22070
21981
  fill: "none",
22071
21982
  viewBox: "0 0 24 24",
22072
21983
  stroke: "currentColor"
22073
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
21984
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
22074
21985
  strokeLinecap: "round",
22075
21986
  strokeLinejoin: "round",
22076
21987
  strokeWidth: 2,
@@ -22286,18 +22197,18 @@ const SavedItems = ({
22286
22197
  });
22287
22198
  };
22288
22199
 
22289
- var _path$g;
22200
+ var _path$f;
22290
22201
 
22291
- 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); }
22202
+ 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); }
22292
22203
 
22293
22204
  function SvgRefresh(props) {
22294
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
22205
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
22295
22206
  className: "plc-w-4 plc-h-4 plc-mr-1",
22296
22207
  xmlns: "http://www.w3.org/2000/svg",
22297
22208
  fill: "none",
22298
22209
  viewBox: "0 0 24 24",
22299
22210
  stroke: "currentColor"
22300
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
22211
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
22301
22212
  strokeLinecap: "round",
22302
22213
  strokeLinejoin: "round",
22303
22214
  strokeWidth: 2,
@@ -22305,35 +22216,35 @@ function SvgRefresh(props) {
22305
22216
  })));
22306
22217
  }
22307
22218
 
22308
- var _path$f;
22219
+ var _path$e;
22309
22220
 
22310
- 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); }
22221
+ 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); }
22311
22222
 
22312
22223
  function SvgCalendar(props) {
22313
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
22224
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
22314
22225
  xmlns: "http://www.w3.org/2000/svg",
22315
22226
  className: "plc-h-4 plc-w-4 plc-mr-1",
22316
22227
  viewBox: "0 0 20 20",
22317
22228
  fill: "currentColor"
22318
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
22229
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
22319
22230
  fillRule: "evenodd",
22320
22231
  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",
22321
22232
  clipRule: "evenodd"
22322
22233
  })));
22323
22234
  }
22324
22235
 
22325
- var _path$e;
22236
+ var _path$d;
22326
22237
 
22327
- 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); }
22238
+ 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); }
22328
22239
 
22329
22240
  function SvgPlus(props) {
22330
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
22241
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
22331
22242
  className: "plc-w-5 plc-h-5",
22332
22243
  xmlns: "http://www.w3.org/2000/svg",
22333
22244
  fill: "none",
22334
22245
  viewBox: "0 0 24 24",
22335
22246
  stroke: "currentColor"
22336
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
22247
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
22337
22248
  strokeLinecap: "round",
22338
22249
  strokeLinejoin: "round",
22339
22250
  strokeWidth: 2,
@@ -22341,17 +22252,17 @@ function SvgPlus(props) {
22341
22252
  })));
22342
22253
  }
22343
22254
 
22344
- var _path$d;
22255
+ var _path$c;
22345
22256
 
22346
- 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); }
22257
+ 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); }
22347
22258
 
22348
22259
  function SvgCheckMark(props) {
22349
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
22260
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22350
22261
  className: "plc-w-4 plc-h-4 plc-mr-1",
22351
22262
  xmlns: "http://www.w3.org/2000/svg",
22352
22263
  viewBox: "0 0 20 20",
22353
22264
  fill: "currentColor"
22354
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
22265
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
22355
22266
  fillRule: "evenodd",
22356
22267
  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",
22357
22268
  clipRule: "evenodd"
@@ -22415,8 +22326,7 @@ const SubscriptionsItems = ({
22415
22326
  } = useTranslation("dashboard");
22416
22327
  const {
22417
22328
  switchView,
22418
- switchToAddressView,
22419
- switchToPaymentView
22329
+ isAuthenticated
22420
22330
  } = usePelcro();
22421
22331
  const subs = getNonDonationSubs();
22422
22332
  if (subs.length === 0) return null;
@@ -22458,12 +22368,7 @@ const SubscriptionsItems = ({
22458
22368
  const plan = window.Pelcro.plan.getById(plan_id);
22459
22369
  setProductAndPlan(product, plan);
22460
22370
  setSubscriptionIdToRenew(sub.id);
22461
-
22462
- if (product.address_required) {
22463
- return switchToAddressView();
22464
- }
22465
-
22466
- return switchToPaymentView();
22371
+ setView("plan-select");
22467
22372
  };
22468
22373
 
22469
22374
  const getPhases = () => {
@@ -22652,18 +22557,18 @@ Accordion.item = function AccordionItem({
22652
22557
  }, content)) : null;
22653
22558
  };
22654
22559
 
22655
- var _path$c;
22560
+ var _path$b;
22656
22561
 
22657
- 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); }
22562
+ 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); }
22658
22563
 
22659
22564
  function SvgExit(props) {
22660
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
22565
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22661
22566
  className: "plc-w-6 plc-h-6",
22662
22567
  xmlns: "http://www.w3.org/2000/svg",
22663
22568
  fill: "none",
22664
22569
  viewBox: "0 0 24 24",
22665
22570
  stroke: "currentColor"
22666
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
22571
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22667
22572
  strokeLinecap: "round",
22668
22573
  strokeLinejoin: "round",
22669
22574
  strokeWidth: 2,
@@ -22671,17 +22576,17 @@ function SvgExit(props) {
22671
22576
  })));
22672
22577
  }
22673
22578
 
22674
- var _path$b;
22579
+ var _path$a;
22675
22580
 
22676
- 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); }
22581
+ 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); }
22677
22582
 
22678
22583
  function SvgUser(props) {
22679
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
22584
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22680
22585
  xmlns: "http://www.w3.org/2000/svg",
22681
22586
  fill: "none",
22682
22587
  viewBox: "0 0 24 24",
22683
22588
  stroke: "currentColor"
22684
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
22589
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22685
22590
  strokeLinecap: "round",
22686
22591
  strokeLinejoin: "round",
22687
22592
  strokeWidth: 2,
@@ -22689,18 +22594,18 @@ function SvgUser(props) {
22689
22594
  })));
22690
22595
  }
22691
22596
 
22692
- var _path$a;
22597
+ var _path$9;
22693
22598
 
22694
- 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); }
22599
+ 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); }
22695
22600
 
22696
22601
  function SvgNewsletter(props) {
22697
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
22602
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22698
22603
  xmlns: "http://www.w3.org/2000/svg",
22699
22604
  className: "plc-h-5 plc-w-5",
22700
22605
  fill: "none",
22701
22606
  viewBox: "0 0 24 24",
22702
22607
  stroke: "currentColor"
22703
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
22608
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22704
22609
  strokeLinecap: "round",
22705
22610
  strokeLinejoin: "round",
22706
22611
  strokeWidth: 2,
@@ -22708,18 +22613,18 @@ function SvgNewsletter(props) {
22708
22613
  })));
22709
22614
  }
22710
22615
 
22711
- var _path$9;
22616
+ var _path$8;
22712
22617
 
22713
- 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); }
22618
+ 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); }
22714
22619
 
22715
22620
  function SvgDocument(props) {
22716
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
22621
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22717
22622
  xmlns: "http://www.w3.org/2000/svg",
22718
22623
  className: "plc-h-6 plc-w-6 plc-mr-2",
22719
22624
  fill: "none",
22720
22625
  viewBox: "0 0 24 24",
22721
22626
  stroke: "currentColor"
22722
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
22627
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22723
22628
  strokeLinecap: "round",
22724
22629
  strokeLinejoin: "round",
22725
22630
  strokeWidth: 2,
@@ -22727,18 +22632,18 @@ function SvgDocument(props) {
22727
22632
  })));
22728
22633
  }
22729
22634
 
22730
- var _path$8;
22635
+ var _path$7;
22731
22636
 
22732
- 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); }
22637
+ 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); }
22733
22638
 
22734
22639
  function SvgPaymentCard(props) {
22735
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
22640
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22736
22641
  className: "plc-w-6 plc-h-6 plc-mr-2",
22737
22642
  xmlns: "http://www.w3.org/2000/svg",
22738
22643
  fill: "none",
22739
22644
  viewBox: "0 0 24 24",
22740
22645
  stroke: "currentColor"
22741
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
22646
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22742
22647
  strokeLinecap: "round",
22743
22648
  strokeLinejoin: "round",
22744
22649
  strokeWidth: 2,
@@ -22746,18 +22651,18 @@ function SvgPaymentCard(props) {
22746
22651
  })));
22747
22652
  }
22748
22653
 
22749
- var _path$7, _path2$1;
22654
+ var _path$6, _path2$1;
22750
22655
 
22751
- 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); }
22656
+ 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); }
22752
22657
 
22753
22658
  function SvgLocationPin(props) {
22754
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
22659
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22755
22660
  className: "plc-w-6 plc-h-6 plc-mr-2",
22756
22661
  xmlns: "http://www.w3.org/2000/svg",
22757
22662
  fill: "none",
22758
22663
  viewBox: "0 0 24 24",
22759
22664
  stroke: "currentColor"
22760
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
22665
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22761
22666
  strokeLinecap: "round",
22762
22667
  strokeLinejoin: "round",
22763
22668
  strokeWidth: 2,
@@ -22772,10 +22677,10 @@ function SvgLocationPin(props) {
22772
22677
 
22773
22678
  var _switch;
22774
22679
 
22775
- 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); }
22680
+ 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); }
22776
22681
 
22777
22682
  function SvgSubscription(props) {
22778
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
22683
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22779
22684
  xmlns: "http://www.w3.org/2000/svg",
22780
22685
  viewBox: "0 0 100 125",
22781
22686
  fill: "currentColor"
@@ -22790,18 +22695,18 @@ function SvgSubscription(props) {
22790
22695
  }))))));
22791
22696
  }
22792
22697
 
22793
- var _path$6;
22698
+ var _path$5;
22794
22699
 
22795
- 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); }
22700
+ 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); }
22796
22701
 
22797
22702
  function SvgShopping(props) {
22798
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
22703
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22799
22704
  className: "plc-w-6 plc-h-6 plc-mr-2",
22800
22705
  xmlns: "http://www.w3.org/2000/svg",
22801
22706
  fill: "none",
22802
22707
  viewBox: "0 0 24 24",
22803
22708
  stroke: "currentColor"
22804
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
22709
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22805
22710
  strokeLinecap: "round",
22806
22711
  strokeLinejoin: "round",
22807
22712
  strokeWidth: 2,
@@ -22809,18 +22714,18 @@ function SvgShopping(props) {
22809
22714
  })));
22810
22715
  }
22811
22716
 
22812
- var _path$5;
22717
+ var _path$4;
22813
22718
 
22814
- 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); }
22719
+ 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); }
22815
22720
 
22816
22721
  function SvgBookmark(props) {
22817
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
22722
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22818
22723
  className: "plc-w-6 plc-h-6 plc-mr-2",
22819
22724
  xmlns: "http://www.w3.org/2000/svg",
22820
22725
  fill: "none",
22821
22726
  viewBox: "0 0 24 24",
22822
22727
  stroke: "currentColor"
22823
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
22728
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22824
22729
  strokeLinecap: "round",
22825
22730
  strokeLinejoin: "round",
22826
22731
  strokeWidth: 2,
@@ -22828,33 +22733,33 @@ function SvgBookmark(props) {
22828
22733
  })));
22829
22734
  }
22830
22735
 
22831
- var _path$4;
22736
+ var _path$3;
22832
22737
 
22833
- 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); }
22738
+ 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); }
22834
22739
 
22835
22740
  function SvgKey(props) {
22836
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
22741
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22837
22742
  xmlns: "http://www.w3.org/2000/svg",
22838
22743
  viewBox: "0 0 20 20",
22839
22744
  fill: "currentColor"
22840
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
22745
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22841
22746
  fillRule: "evenodd",
22842
22747
  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",
22843
22748
  clipRule: "evenodd"
22844
22749
  })));
22845
22750
  }
22846
22751
 
22847
- var _path$3;
22752
+ var _path$2;
22848
22753
 
22849
- 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); }
22754
+ 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); }
22850
22755
 
22851
22756
  function SvgDonate(props) {
22852
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
22757
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
22853
22758
  width: 24,
22854
22759
  height: 24,
22855
22760
  fill: "currentColor",
22856
22761
  xmlns: "http://www.w3.org/2000/svg"
22857
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
22762
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
22858
22763
  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"
22859
22764
  })));
22860
22765
  }
@@ -23181,10 +23086,9 @@ class Dashboard extends React.Component {
23181
23086
  }) => {
23182
23087
  if (isGift) {
23183
23088
  this.props.setProductAndPlan(null, null, true);
23184
- return this.props.setView("plan-select");
23185
23089
  }
23186
23090
 
23187
- return this.props.setView("subscription-options");
23091
+ return this.props.setView("plan-select");
23188
23092
  });
23189
23093
 
23190
23094
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23652,7 +23556,7 @@ const DashboardOpenButton = () => {
23652
23556
  };
23653
23557
  DashboardOpenButton.viewId = "dashboard-open";
23654
23558
 
23655
- const initialState$3 = {
23559
+ const initialState$2 = {
23656
23560
  imageSrc: null,
23657
23561
  crop: {
23658
23562
  x: 0,
@@ -23666,10 +23570,10 @@ const initialState$3 = {
23666
23570
  content: ""
23667
23571
  }
23668
23572
  };
23669
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
23573
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
23670
23574
  const {
23671
- Provider: Provider$3
23672
- } = store$3;
23575
+ Provider: Provider$2
23576
+ } = store$2;
23673
23577
 
23674
23578
  const ProfilePicChangeContainer = ({
23675
23579
  style,
@@ -23803,21 +23707,21 @@ const ProfilePicChangeContainer = ({
23803
23707
  default:
23804
23708
  return state;
23805
23709
  }
23806
- }, initialState$3);
23710
+ }, initialState$2);
23807
23711
  return /*#__PURE__*/React__default['default'].createElement("div", {
23808
23712
  style: { ...style
23809
23713
  },
23810
23714
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23811
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
23715
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
23812
23716
  value: {
23813
23717
  state,
23814
23718
  dispatch
23815
23719
  }
23816
23720
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23817
- store: store$3,
23721
+ store: store$2,
23818
23722
  key: i
23819
23723
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23820
- store: store$3
23724
+ store: store$2
23821
23725
  })));
23822
23726
  };
23823
23727
  /**
@@ -23879,7 +23783,7 @@ const ProfilePicChangeButton = ({
23879
23783
  isSubmitting
23880
23784
  },
23881
23785
  dispatch
23882
- } = React.useContext(store$3);
23786
+ } = React.useContext(store$2);
23883
23787
  const {
23884
23788
  t
23885
23789
  } = useTranslation("userEdit");
@@ -25247,7 +25151,7 @@ const ProfilePicChangeCropper = ({
25247
25151
  zoom
25248
25152
  },
25249
25153
  dispatch
25250
- } = React.useContext(store$3);
25154
+ } = React.useContext(store$2);
25251
25155
  return /*#__PURE__*/React__default['default'].createElement("div", {
25252
25156
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
25253
25157
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -25289,7 +25193,7 @@ const ProfilePicChangeZoom = ({
25289
25193
  zoom
25290
25194
  },
25291
25195
  dispatch
25292
- } = React.useContext(store$3);
25196
+ } = React.useContext(store$2);
25293
25197
  const {
25294
25198
  t
25295
25199
  } = useTranslation("userEdit");
@@ -25312,18 +25216,18 @@ const ProfilePicChangeZoom = ({
25312
25216
  }, otherProps)));
25313
25217
  };
25314
25218
 
25315
- var _path$2;
25219
+ var _path$1;
25316
25220
 
25317
- 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); }
25221
+ 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); }
25318
25222
 
25319
25223
  function SvgPhotograph(props) {
25320
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
25224
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
25321
25225
  xmlns: "http://www.w3.org/2000/svg",
25322
25226
  className: "plc-h-6 plc-w-6",
25323
25227
  fill: "none",
25324
25228
  viewBox: "0 0 24 24",
25325
25229
  stroke: "currentColor"
25326
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
25230
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
25327
25231
  strokeLinecap: "round",
25328
25232
  strokeLinejoin: "round",
25329
25233
  strokeWidth: 2,
@@ -25341,7 +25245,7 @@ const ProfilePicChangeSelectButton = ({
25341
25245
  state: {
25342
25246
  isSubmitting
25343
25247
  }
25344
- } = React.useContext(store$3);
25248
+ } = React.useContext(store$2);
25345
25249
  const {
25346
25250
  t
25347
25251
  } = useTranslation("userEdit");
@@ -25383,7 +25287,7 @@ const ProfilePicChangeRemoveButton = ({
25383
25287
  state: {
25384
25288
  isSubmitting
25385
25289
  }
25386
- } = React.useContext(store$3);
25290
+ } = React.useContext(store$2);
25387
25291
  const {
25388
25292
  t
25389
25293
  } = useTranslation("userEdit");
@@ -25406,7 +25310,7 @@ const ProfilePicChangeWrapper = () => {
25406
25310
  state: {
25407
25311
  imageSrc
25408
25312
  }
25409
- } = React.useContext(store$3);
25313
+ } = React.useContext(store$2);
25410
25314
  const {
25411
25315
  t
25412
25316
  } = useTranslation("userEdit");
@@ -25468,17 +25372,17 @@ function ProfilePicChangeModal({
25468
25372
  }
25469
25373
  ProfilePicChangeModal.viewId = "profile-picture";
25470
25374
 
25471
- const initialState$2 = {
25375
+ const initialState$1 = {
25472
25376
  isSubmitting: false,
25473
25377
  alert: {
25474
25378
  type: "error",
25475
25379
  content: ""
25476
25380
  }
25477
25381
  };
25478
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
25382
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
25479
25383
  const {
25480
- Provider: Provider$2
25481
- } = store$2;
25384
+ Provider: Provider$1
25385
+ } = store$1;
25482
25386
 
25483
25387
  const EmailVerifyContainer = ({
25484
25388
  style,
@@ -25541,21 +25445,21 @@ const EmailVerifyContainer = ({
25541
25445
  default:
25542
25446
  return state;
25543
25447
  }
25544
- }, initialState$2);
25448
+ }, initialState$1);
25545
25449
  return /*#__PURE__*/React__default['default'].createElement("div", {
25546
25450
  style: { ...style
25547
25451
  },
25548
25452
  className: `pelcro-container pelcro-email-verify-container ${className}`
25549
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
25453
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
25550
25454
  value: {
25551
25455
  state,
25552
25456
  dispatch
25553
25457
  }
25554
25458
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25555
- store: store$2,
25459
+ store: store$1,
25556
25460
  key: i
25557
25461
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25558
- store: store$2
25462
+ store: store$1
25559
25463
  })));
25560
25464
  };
25561
25465
 
@@ -25569,7 +25473,7 @@ const EmailVerifyResendButton = ({
25569
25473
  state: {
25570
25474
  isSubmitting
25571
25475
  }
25572
- } = React.useContext(store$2);
25476
+ } = React.useContext(store$1);
25573
25477
  const {
25574
25478
  t
25575
25479
  } = useTranslation("verifyEmail");
@@ -25584,16 +25488,16 @@ const EmailVerifyResendButton = ({
25584
25488
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25585
25489
  };
25586
25490
 
25587
- var _path$1, _path2;
25491
+ var _path, _path2;
25588
25492
 
25589
- 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); }
25493
+ 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); }
25590
25494
 
25591
25495
  function SvgEmailVerify(props) {
25592
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
25496
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25593
25497
  className: "plc-w-6 plc-h-6",
25594
25498
  viewBox: "0 0 700 700",
25595
25499
  xmlns: "http://www.w3.org/2000/svg"
25596
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
25500
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25597
25501
  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"
25598
25502
  })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
25599
25503
  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"
@@ -25697,11 +25601,11 @@ const invoicePaymentSubmitButton = props => {
25697
25601
  return /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, props);
25698
25602
  };
25699
25603
 
25700
- const initialState$1 = {};
25701
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
25604
+ const initialState = {};
25605
+ const store = /*#__PURE__*/React.createContext(initialState);
25702
25606
  const {
25703
- Provider: Provider$1
25704
- } = store$1;
25607
+ Provider
25608
+ } = store;
25705
25609
 
25706
25610
  const InvoiceDetailsContainer = ({
25707
25611
  style,
@@ -25722,21 +25626,21 @@ const InvoiceDetailsContainer = ({
25722
25626
  default:
25723
25627
  return state;
25724
25628
  }
25725
- }, initialState$1);
25629
+ }, initialState);
25726
25630
  return /*#__PURE__*/React__default['default'].createElement("div", {
25727
25631
  style: { ...style
25728
25632
  },
25729
25633
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25730
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
25634
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25731
25635
  value: {
25732
25636
  state,
25733
25637
  dispatch
25734
25638
  }
25735
25639
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25736
- store: store$1,
25640
+ store,
25737
25641
  key: i
25738
25642
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25739
- store: store$1
25643
+ store
25740
25644
  })));
25741
25645
  };
25742
25646
 
@@ -25768,7 +25672,7 @@ const InvoiceDetailsPayButton = ({
25768
25672
  }) => {
25769
25673
  const {
25770
25674
  dispatch
25771
- } = React.useContext(store$1);
25675
+ } = React.useContext(store);
25772
25676
  const {
25773
25677
  t
25774
25678
  } = useTranslation("invoiceDetails");
@@ -25875,232 +25779,6 @@ const InvoiceDetailsModal = ({
25875
25779
  };
25876
25780
  InvoiceDetailsModal.viewId = "invoice-details";
25877
25781
 
25878
- const initialState = {
25879
- selectedOption: ""
25880
- };
25881
- const store = /*#__PURE__*/React.createContext(initialState);
25882
- const {
25883
- Provider
25884
- } = store;
25885
-
25886
- const SubscriptionOptionsContainer = ({
25887
- style,
25888
- className = "",
25889
- onRenewSubSuccess = () => {},
25890
- onNewSubSuccess = () => {},
25891
- children,
25892
- ...props
25893
- }) => {
25894
- const submit = ({
25895
- selectedOption
25896
- }, dispatch) => {
25897
- if (selectedOption === "renew") return onRenewSubSuccess();
25898
- if (selectedOption === "new") return onNewSubSuccess();
25899
- };
25900
-
25901
- const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25902
- switch (action.type) {
25903
- case SWITCH_TO_NEW:
25904
- return lib_7({ ...state,
25905
- selectedOption: "new"
25906
- });
25907
-
25908
- case SWITCH_TO_RENEW:
25909
- return lib_7({ ...state,
25910
- selectedOption: "renew"
25911
- });
25912
-
25913
- case HANDLE_SUBMIT:
25914
- return lib_4((state, dispatch) => submit(state));
25915
-
25916
- default:
25917
- return state;
25918
- }
25919
- }, initialState);
25920
- return /*#__PURE__*/React__default['default'].createElement("div", {
25921
- style: { ...style
25922
- },
25923
- className: `pelcro-container pelcro-subscription-options-container ${className}`
25924
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
25925
- value: {
25926
- state,
25927
- dispatch
25928
- }
25929
- }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25930
- store,
25931
- key: i
25932
- })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25933
- store
25934
- })));
25935
- };
25936
-
25937
- var _path;
25938
-
25939
- 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); }
25940
-
25941
- function SvgPlusCircle(props) {
25942
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
25943
- xmlns: "http://www.w3.org/2000/svg",
25944
- className: "plc-h-6 plc-w-6",
25945
- fill: "none",
25946
- viewBox: "0 0 24 24",
25947
- stroke: "currentColor",
25948
- strokeWidth: 2
25949
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
25950
- strokeLinecap: "round",
25951
- strokeLinejoin: "round",
25952
- d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25953
- })));
25954
- }
25955
-
25956
- const SubscriptionOptionsNewButton = ({
25957
- name,
25958
- onClick,
25959
- ...otherProps
25960
- }) => {
25961
- const {
25962
- dispatch,
25963
- state: {
25964
- selectedOption
25965
- }
25966
- } = React.useContext(store);
25967
- const {
25968
- t
25969
- } = useTranslation("subscriptionOptions");
25970
- const isChecked = selectedOption === "new";
25971
- return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
25972
- className: "plc-hidden pelcro-new-sub-option",
25973
- 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"}`,
25974
- id: "pelcro-new-sub-option",
25975
- name: "option",
25976
- onChange: () => {
25977
- dispatch({
25978
- type: SWITCH_TO_NEW
25979
- });
25980
- onClick === null || onClick === void 0 ? void 0 : onClick();
25981
- },
25982
- checked: isChecked
25983
- }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default['default'].createElement(SvgPlusCircle, {
25984
- className: "plc-w-full plc-h-full plc-mr-0"
25985
- }));
25986
- };
25987
-
25988
- const SubscriptionOptionsRenewButton = ({
25989
- name,
25990
- onClick,
25991
- ...otherProps
25992
- }) => {
25993
- const {
25994
- dispatch,
25995
- state: {
25996
- selectedOption
25997
- }
25998
- } = React.useContext(store);
25999
- const {
26000
- t
26001
- } = useTranslation("subscriptionOptions");
26002
- const isChecked = selectedOption === "renew";
26003
- return /*#__PURE__*/React__default['default'].createElement(Radio, Object.assign({
26004
- className: "plc-hidden pelcro-renew-sub-option",
26005
- 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"}`,
26006
- id: "pelcro-renew-sub-option",
26007
- name: "option",
26008
- onChange: () => {
26009
- dispatch({
26010
- type: SWITCH_TO_RENEW
26011
- });
26012
- onClick === null || onClick === void 0 ? void 0 : onClick();
26013
- },
26014
- checked: isChecked
26015
- }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default['default'].createElement(SvgRefresh, {
26016
- className: "plc-w-full plc-h-full plc-mr-0"
26017
- }));
26018
- };
26019
-
26020
- const SubscriptionOptionsSubmit = ({
26021
- name,
26022
- onClick,
26023
- ...otherProps
26024
- }) => {
26025
- const {
26026
- dispatch,
26027
- state: {
26028
- selectedOption
26029
- }
26030
- } = React.useContext(store);
26031
- const {
26032
- t
26033
- } = useTranslation("subscriptionOptions");
26034
- return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
26035
- onClick: () => {
26036
- dispatch({
26037
- type: HANDLE_SUBMIT
26038
- });
26039
- onClick === null || onClick === void 0 ? void 0 : onClick();
26040
- },
26041
- disabled: !selectedOption
26042
- }, otherProps), name !== null && name !== void 0 ? name : t("next"));
26043
- };
26044
-
26045
- const SubscriptionOptionsView = props => {
26046
- const {
26047
- t
26048
- } = useTranslation("subscriptionOptions");
26049
- return /*#__PURE__*/React__default['default'].createElement("div", {
26050
- id: "pelcro-subscription-options-view"
26051
- }, /*#__PURE__*/React__default['default'].createElement("div", {
26052
- className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
26053
- }, /*#__PURE__*/React__default['default'].createElement("h4", {
26054
- className: "plc-text-2xl plc-font-semibold"
26055
- }, t("title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default['default'].createElement("form", {
26056
- action: "javascript:void(0);",
26057
- className: "plc-mt-2 pelcro-form"
26058
- }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
26059
- className: "plc-flex plc-justify-between plc-items-center"
26060
- }, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsSubmit, {
26061
- role: "submit",
26062
- className: "plc-mt-4 plc-w-full",
26063
- name: t("next"),
26064
- id: "pelcro-submit"
26065
- }))));
26066
- };
26067
-
26068
- const SubscriptionOptionsModal = ({
26069
- onDisplay,
26070
- onClose,
26071
- ...otherProps
26072
- }) => {
26073
- const {
26074
- switchView,
26075
- setProductsList
26076
- } = usePelcro();
26077
-
26078
- const onRenewSubSuccess = () => {
26079
- var _otherProps$onRenewSu;
26080
-
26081
- (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
26082
- setProductsList(getRenewableProducts());
26083
- switchView("_plan-select-renew");
26084
- };
26085
-
26086
- const onNewSubSuccess = () => {
26087
- var _otherProps$onNewSubS;
26088
-
26089
- (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
26090
- switchView("plan-select");
26091
- };
26092
-
26093
- return /*#__PURE__*/React__default['default'].createElement(Modal, {
26094
- onDisplay: onDisplay,
26095
- onClose: onClose,
26096
- id: "pelcro-subscription-options-modal"
26097
- }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
26098
- onNewSubSuccess: onNewSubSuccess,
26099
- onRenewSubSuccess: onRenewSubSuccess
26100
- }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
26101
- };
26102
- SubscriptionOptionsModal.viewId = "subscription-options";
26103
-
26104
25782
  exports.AddressCreateCity = AddressCreateCity;
26105
25783
  exports.AddressCreateContainer = AddressCreateContainer;
26106
25784
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -26278,12 +25956,6 @@ exports.SubmitPaymentMethod = SubmitPaymentMethod;
26278
25956
  exports.SubscriptionCreateContainer = SubscriptionCreateContainer;
26279
25957
  exports.SubscriptionCreateModal = SubscriptionCreateModal;
26280
25958
  exports.SubscriptionCreateView = SubscriptionCreateView;
26281
- exports.SubscriptionOptionsContainer = SubscriptionOptionsContainer;
26282
- exports.SubscriptionOptionsModal = SubscriptionOptionsModal;
26283
- exports.SubscriptionOptionsNewButton = SubscriptionOptionsNewButton;
26284
- exports.SubscriptionOptionsRenewButton = SubscriptionOptionsRenewButton;
26285
- exports.SubscriptionOptionsSubmit = SubscriptionOptionsSubmit;
26286
- exports.SubscriptionOptionsView = SubscriptionOptionsView;
26287
25959
  exports.SubscriptionRenewContainer = SubscriptionRenewContainer;
26288
25960
  exports.SubscriptionRenewModal = SubscriptionRenewModal;
26289
25961
  exports.SubscriptionRenewView = SubscriptionRenewView;