@pelcro/react-pelcro-js 3.2.0-beta.3 → 3.2.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3431,9 +3431,9 @@ var paymentMethod_fr = {
3431
3431
  select: select
3432
3432
  };
3433
3433
 
3434
- var title$f = "Enter your email to subscribe to our newsletter";
3434
+ var title$h = "Enter your email to subscribe to our newsletter";
3435
3435
  var updateTitle$1 = "Update newsletter selections";
3436
- var subtitle$7 = "We may use your email for other marketing communication";
3436
+ var subtitle$9 = "We may use your email for other marketing communication";
3437
3437
  var labels$p = {
3438
3438
  submit: "Submit",
3439
3439
  firstName: "First name",
@@ -3450,16 +3450,16 @@ var messages$r = {
3450
3450
  here: "here"
3451
3451
  };
3452
3452
  var newsletter_en = {
3453
- title: title$f,
3453
+ title: title$h,
3454
3454
  updateTitle: updateTitle$1,
3455
- subtitle: subtitle$7,
3455
+ subtitle: subtitle$9,
3456
3456
  labels: labels$p,
3457
3457
  messages: messages$r
3458
3458
  };
3459
3459
 
3460
- var title$e = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3460
+ var title$g = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3461
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
- var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3462
+ var subtitle$8 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
3463
  var labels$o = {
3464
3464
  submit: "Lire l’article !",
3465
3465
  firstName: "Prénom",
@@ -3476,9 +3476,9 @@ var messages$q = {
3476
3476
  here: "ici"
3477
3477
  };
3478
3478
  var newsletter_fr = {
3479
- title: title$e,
3479
+ title: title$g,
3480
3480
  updateTitle: updateTitle,
3481
- subtitle: subtitle$6,
3481
+ subtitle: subtitle$8,
3482
3482
  labels: labels$o,
3483
3483
  messages: messages$q
3484
3484
  };
@@ -3735,8 +3735,8 @@ var login_fr = {
3735
3735
  errors: errors$4
3736
3736
  };
3737
3737
 
3738
- var title$d = "Create an account";
3739
- var subtitle$5 = "Enter your email and password below";
3738
+ var title$f = "Create an account";
3739
+ var subtitle$7 = "Enter your email and password below";
3740
3740
  var labels$h = {
3741
3741
  signUpFacebook: "Sign up with Facebook",
3742
3742
  signUpGoogle: "Sign up with Google",
@@ -3821,8 +3821,8 @@ var redeem$1 = {
3821
3821
  }
3822
3822
  };
3823
3823
  var register_en = {
3824
- title: title$d,
3825
- subtitle: subtitle$5,
3824
+ title: title$f,
3825
+ subtitle: subtitle$7,
3826
3826
  labels: labels$h,
3827
3827
  messages: messages$h,
3828
3828
  errors: errors$3,
@@ -3830,8 +3830,8 @@ var register_en = {
3830
3830
  redeem: redeem$1
3831
3831
  };
3832
3832
 
3833
- var title$c = "Créer un compte";
3834
- var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3833
+ var title$e = "Créer un compte";
3834
+ var subtitle$6 = "Entrez votre courriel et votre mot de passe ci-dessous";
3835
3835
  var labels$g = {
3836
3836
  signUpFacebook: "Inscrivez-vous avec Facebook",
3837
3837
  signUpGoogle: "Inscrivez-vous avec Google",
@@ -3917,8 +3917,8 @@ var redeem = {
3917
3917
  }
3918
3918
  };
3919
3919
  var register_fr = {
3920
- title: title$c,
3921
- subtitle: subtitle$4,
3920
+ title: title$e,
3921
+ subtitle: subtitle$6,
3922
3922
  labels: labels$g,
3923
3923
  messages: messages$g,
3924
3924
  errors: errors$2,
@@ -3978,7 +3978,7 @@ var userEdit_fr = {
3978
3978
  messages: messages$e
3979
3979
  };
3980
3980
 
3981
- var title$b = "Enter your shipping address";
3981
+ var title$d = "Enter your shipping address";
3982
3982
  var selectAddressTitle$1 = "Please select an address";
3983
3983
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3984
3984
  var labels$d = {
@@ -4001,7 +4001,7 @@ var messages$d = {
4001
4001
  subRedeemed: "Your subscription has been redeemed."
4002
4002
  };
4003
4003
  var address_en = {
4004
- title: title$b,
4004
+ title: title$d,
4005
4005
  selectAddressTitle: selectAddressTitle$1,
4006
4006
  selectAddressSubtitle: selectAddressSubtitle$1,
4007
4007
  labels: labels$d,
@@ -4009,7 +4009,7 @@ var address_en = {
4009
4009
  messages: messages$d
4010
4010
  };
4011
4011
 
4012
- var title$a = "Entrez votre adresse de livraison";
4012
+ var title$c = "Entrez votre adresse de livraison";
4013
4013
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4014
4014
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4015
4015
  var labels$c = {
@@ -4032,7 +4032,7 @@ var messages$c = {
4032
4032
  subRedeemed: "Votre abonnement a bien été activé."
4033
4033
  };
4034
4034
  var address_fr = {
4035
- title: title$a,
4035
+ title: title$c,
4036
4036
  selectAddressTitle: selectAddressTitle,
4037
4037
  selectAddressSubtitle: selectAddressSubtitle,
4038
4038
  labels: labels$c,
@@ -4040,8 +4040,8 @@ var address_fr = {
4040
4040
  messages: messages$c
4041
4041
  };
4042
4042
 
4043
- var title$9 = "Reset your password";
4044
- var subtitle$3 = "Enter a new password below";
4043
+ var title$b = "Reset your password";
4044
+ var subtitle$5 = "Enter a new password below";
4045
4045
  var email$3 = "Email";
4046
4046
  var password$3 = "Password";
4047
4047
  var confirmPassword$1 = "Confirm password";
@@ -4049,8 +4049,8 @@ var submit$5 = "Submit";
4049
4049
  var required$5 = "Required";
4050
4050
  var passwordUpdated$1 = "Password has been updated, please login with the new password";
4051
4051
  var passwordReset_en = {
4052
- title: title$9,
4053
- subtitle: subtitle$3,
4052
+ title: title$b,
4053
+ subtitle: subtitle$5,
4054
4054
  email: email$3,
4055
4055
  password: password$3,
4056
4056
  confirmPassword: confirmPassword$1,
@@ -4059,8 +4059,8 @@ var passwordReset_en = {
4059
4059
  passwordUpdated: passwordUpdated$1
4060
4060
  };
4061
4061
 
4062
- var title$8 = "Réinitialiser votre mot de passe";
4063
- var subtitle$2 = "Entrez un nouveau mot de passe ci-dessous";
4062
+ var title$a = "Réinitialiser votre mot de passe";
4063
+ var subtitle$4 = "Entrez un nouveau mot de passe ci-dessous";
4064
4064
  var email$2 = "Adresse courriel";
4065
4065
  var password$2 = "Mot de passe";
4066
4066
  var confirmPassword = "Confirmer le mot de passe";
@@ -4068,8 +4068,8 @@ var submit$4 = "Soumettre";
4068
4068
  var required$4 = "Champs obligatoires";
4069
4069
  var passwordUpdated = "Votre mot de passe a été mis à jour, veuillez vous connecter avec celui-ci";
4070
4070
  var passwordReset_fr = {
4071
- title: title$8,
4072
- subtitle: subtitle$2,
4071
+ title: title$a,
4072
+ subtitle: subtitle$4,
4073
4073
  email: email$2,
4074
4074
  password: password$2,
4075
4075
  confirmPassword: confirmPassword,
@@ -4078,7 +4078,7 @@ var passwordReset_fr = {
4078
4078
  passwordUpdated: passwordUpdated
4079
4079
  };
4080
4080
 
4081
- var title$7 = "Forgot your password?";
4081
+ var title$9 = "Forgot your password?";
4082
4082
  var email$1 = "Email";
4083
4083
  var password$1 = "Password";
4084
4084
  var submit$3 = "Submit";
@@ -4089,7 +4089,7 @@ var messages$b = {
4089
4089
  loginHere: "login here."
4090
4090
  };
4091
4091
  var passwordForgot_en = {
4092
- title: title$7,
4092
+ title: title$9,
4093
4093
  email: email$1,
4094
4094
  password: password$1,
4095
4095
  submit: submit$3,
@@ -4098,7 +4098,7 @@ var passwordForgot_en = {
4098
4098
  messages: messages$b
4099
4099
  };
4100
4100
 
4101
- var title$6 = "Mot de passe oublié ?";
4101
+ var title$8 = "Mot de passe oublié ?";
4102
4102
  var email = "Courriel";
4103
4103
  var password = "Mot de passe";
4104
4104
  var submit$2 = "Soumettre";
@@ -4109,7 +4109,7 @@ var messages$a = {
4109
4109
  loginHere: "Connectez-vous ici"
4110
4110
  };
4111
4111
  var passwordForgot_fr = {
4112
- title: title$6,
4112
+ title: title$8,
4113
4113
  email: email,
4114
4114
  password: password,
4115
4115
  submit: submit$2,
@@ -4118,7 +4118,7 @@ var passwordForgot_fr = {
4118
4118
  messages: messages$a
4119
4119
  };
4120
4120
 
4121
- var title$5 = "Change your password";
4121
+ var title$7 = "Change your password";
4122
4122
  var currentPassword$1 = "Current password";
4123
4123
  var newPassword$1 = "New password";
4124
4124
  var confirmNewPassword$1 = "Confirm new password";
@@ -4128,7 +4128,7 @@ var passwordChanged$1 = "Password has been changed, please login with the new pa
4128
4128
  var passwordsNotMatching$1 = "Passwords don't match";
4129
4129
  var weakPassword$1 = "Your password must contain at least 6 characters";
4130
4130
  var passwordChange_en = {
4131
- title: title$5,
4131
+ title: title$7,
4132
4132
  currentPassword: currentPassword$1,
4133
4133
  newPassword: newPassword$1,
4134
4134
  confirmNewPassword: confirmNewPassword$1,
@@ -4139,7 +4139,7 @@ var passwordChange_en = {
4139
4139
  weakPassword: weakPassword$1
4140
4140
  };
4141
4141
 
4142
- var title$4 = "Changez votre mot de passe";
4142
+ var title$6 = "Changez votre mot de passe";
4143
4143
  var currentPassword = "Mot de passe actuel";
4144
4144
  var newPassword = "Nouveau mot de passe";
4145
4145
  var confirmNewPassword = "Confirmer le nouveau mot de passe";
@@ -4149,7 +4149,7 @@ var passwordChanged = "Le mot de passe a été modifié, veuillez vous connecter
4149
4149
  var passwordsNotMatching = "Les mots de passe ne correspondent pas";
4150
4150
  var weakPassword = "Votre mot de passe doit contenir au moins 6";
4151
4151
  var passwordChange_fr = {
4152
- title: title$4,
4152
+ title: title$6,
4153
4153
  currentPassword: currentPassword,
4154
4154
  newPassword: newPassword,
4155
4155
  confirmNewPassword: confirmNewPassword,
@@ -4160,8 +4160,8 @@ var passwordChange_fr = {
4160
4160
  weakPassword: weakPassword
4161
4161
  };
4162
4162
 
4163
- var title$3 = "Votre panier";
4164
- var subtitle$1 = "Terminez votre achat ci-dessous";
4163
+ var title$5 = "Votre panier";
4164
+ var subtitle$3 = "Terminez votre achat ci-dessous";
4165
4165
  var name$1 = "Produit";
4166
4166
  var quantity$1 = "Quantité";
4167
4167
  var price$1 = "Prix";
@@ -4172,8 +4172,8 @@ var confirm$3 = "Passer à la caisse";
4172
4172
  var empty$1 = "Votre panier est vide.";
4173
4173
  var removeAll$1 = "Vider";
4174
4174
  var cart_fr = {
4175
- title: title$3,
4176
- subtitle: subtitle$1,
4175
+ title: title$5,
4176
+ subtitle: subtitle$3,
4177
4177
  name: name$1,
4178
4178
  quantity: quantity$1,
4179
4179
  price: price$1,
@@ -4185,8 +4185,8 @@ var cart_fr = {
4185
4185
  removeAll: removeAll$1
4186
4186
  };
4187
4187
 
4188
- var title$2 = "Your shopping cart";
4189
- var subtitle = "Comple your purchase below";
4188
+ var title$4 = "Your shopping cart";
4189
+ var subtitle$2 = "Comple your purchase below";
4190
4190
  var name = "Name";
4191
4191
  var quantity = "Quantity";
4192
4192
  var price = "Price";
@@ -4197,8 +4197,8 @@ var confirm$2 = "Checkout";
4197
4197
  var empty = "Your cart is empty.";
4198
4198
  var removeAll = "Remove all";
4199
4199
  var cart_en = {
4200
- title: title$2,
4201
- subtitle: subtitle,
4200
+ title: title$4,
4201
+ subtitle: subtitle$2,
4202
4202
  name: name,
4203
4203
  quantity: quantity,
4204
4204
  price: price,
@@ -4636,7 +4636,7 @@ var verifyEmail_fr = {
4636
4636
  messages: messages
4637
4637
  };
4638
4638
 
4639
- var title$1 = "Invoice details";
4639
+ var title$3 = "Invoice details";
4640
4640
  var labels$1 = {
4641
4641
  summary: "Summary",
4642
4642
  total: "Total",
@@ -4649,12 +4649,12 @@ var buttons$1 = {
4649
4649
  pay: "Pay now"
4650
4650
  };
4651
4651
  var invoiceDetails_en = {
4652
- title: title$1,
4652
+ title: title$3,
4653
4653
  labels: labels$1,
4654
4654
  buttons: buttons$1
4655
4655
  };
4656
4656
 
4657
- var title = "Invoice details";
4657
+ var title$2 = "Invoice details";
4658
4658
  var labels = {
4659
4659
  summary: "Summary",
4660
4660
  total: "Total",
@@ -4667,11 +4667,37 @@ var buttons = {
4667
4667
  pay: "Pay now"
4668
4668
  };
4669
4669
  var invoiceDetails_fr = {
4670
- title: title,
4670
+ title: title$2,
4671
4671
  labels: labels,
4672
4672
  buttons: buttons
4673
4673
  };
4674
4674
 
4675
+ var title$1 = "Renewal options";
4676
+ var subtitle$1 = "Select one of the options below to continue";
4677
+ var next$1 = "Next";
4678
+ var addNew$1 = "Add Another Subscription";
4679
+ var renew$1 = "Renew Existing Subscription";
4680
+ var subscriptionOptions_en = {
4681
+ title: title$1,
4682
+ subtitle: subtitle$1,
4683
+ next: next$1,
4684
+ addNew: addNew$1,
4685
+ renew: renew$1
4686
+ };
4687
+
4688
+ var title = "Renewal options";
4689
+ var subtitle = "Select one of the options below to continue";
4690
+ var next = "Next";
4691
+ var addNew = "Add Another Subscription";
4692
+ var renew = "Renew Existing Subscription";
4693
+ var subscriptionOptions_fr = {
4694
+ title: title,
4695
+ subtitle: subtitle,
4696
+ next: next,
4697
+ addNew: addNew,
4698
+ renew: renew
4699
+ };
4700
+
4675
4701
  function create$1(createState) {
4676
4702
  let state;
4677
4703
  const listeners = new Set();
@@ -6021,7 +6047,7 @@ class PelcroActions {
6021
6047
  view,
6022
6048
  cartItems,
6023
6049
  ...otherStateFields
6024
- } = initialState$i;
6050
+ } = initialState$j;
6025
6051
  this.set(otherStateFields);
6026
6052
  });
6027
6053
 
@@ -6045,6 +6071,16 @@ class PelcroActions {
6045
6071
  });
6046
6072
  }
6047
6073
 
6074
+ if (view === "subscription-options") {
6075
+ const noRenewableProducts = getRenewableProducts().length === 0;
6076
+
6077
+ if (noRenewableProducts) {
6078
+ return this.set({
6079
+ view: "plan-select"
6080
+ });
6081
+ }
6082
+ }
6083
+
6048
6084
  this.set({
6049
6085
  view
6050
6086
  });
@@ -6119,6 +6155,26 @@ class PelcroActions {
6119
6155
  }
6120
6156
  });
6121
6157
 
6158
+ _defineProperty$3(this, "setProductsList", products => {
6159
+ if (!Array.isArray(products)) {
6160
+ return console.error(`setProductsList expects an array of products as an argument, got an argument of type ${typeof products} instead`);
6161
+ }
6162
+
6163
+ const allowedProducts = window.Pelcro.product.list();
6164
+ const validProducts = products.filter(product => {
6165
+ const isValidProduct = allowedProducts.some(allowedProduct => allowedProduct.id === (product === null || product === void 0 ? void 0 : product.id) && allowedProduct.name === (product === null || product === void 0 ? void 0 : product.name));
6166
+
6167
+ if (!isValidProduct) {
6168
+ console.warn(`setProductsList expects an array of products that exist in the list of valid products (window.Pelcro.product.list()), but it recieved a product which doesn't exist in that list:`, product);
6169
+ }
6170
+
6171
+ return isValidProduct;
6172
+ });
6173
+ this.set({
6174
+ productsList: validProducts
6175
+ });
6176
+ });
6177
+
6122
6178
  _defineProperty$3(this, "setProduct", id => {
6123
6179
  const product = window.Pelcro.product.getById(id);
6124
6180
  if (!product) return console.error("invalid product id");
@@ -6340,10 +6396,12 @@ class PelcroCallbacks {
6340
6396
 
6341
6397
  }
6342
6398
 
6343
- const initialState$i = {
6399
+ var _window$Pelcro$produc, _window$Pelcro;
6400
+ const initialState$j = {
6344
6401
  // View
6345
6402
  view: null,
6346
6403
  // Plans
6404
+ productsList: (_window$Pelcro$produc = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : _window$Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [],
6347
6405
  product: null,
6348
6406
  plan: null,
6349
6407
  isGift: false,
@@ -6370,7 +6428,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6370
6428
  return {
6371
6429
  // Store setter
6372
6430
  set,
6373
- ...initialState$i,
6431
+ ...initialState$j,
6374
6432
  // State actions
6375
6433
  ...actions,
6376
6434
  // Callbacks
@@ -6725,6 +6783,28 @@ function userMustVerifyEmail() {
6725
6783
  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;
6726
6784
  return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6727
6785
  }
6786
+ function getRenewableProducts() {
6787
+ const renewableSubs = window.Pelcro.subscription.list().filter(sub => sub.status === "active" && sub.cancel_at_period_end === 1);
6788
+ const renewableProductsIds = [...new Set(renewableSubs.map(sub => sub.plan.product.id))];
6789
+ const renewablePlansIds = [...new Set(renewableSubs.map(sub => sub.plan.id))];
6790
+ const {
6791
+ productsList
6792
+ } = usePelcro.getStore();
6793
+ return productsList.map(product => {
6794
+ if (renewableProductsIds.includes(product.id)) {
6795
+ const renewablePlans = getRenewablePlansOnly(product);
6796
+ return { ...product,
6797
+ plans: renewablePlans
6798
+ };
6799
+ }
6800
+ }).filter(product => product);
6801
+
6802
+ function getRenewablePlansOnly(product) {
6803
+ var _product$plans$filter, _product$plans;
6804
+
6805
+ 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 : [];
6806
+ }
6807
+ }
6728
6808
 
6729
6809
  const resources = {
6730
6810
  en: {
@@ -6749,7 +6829,8 @@ const resources = {
6749
6829
  dashboard: dashboard_en,
6750
6830
  select: select_en,
6751
6831
  notification: notification_en,
6752
- invoiceDetails: invoiceDetails_en
6832
+ invoiceDetails: invoiceDetails_en,
6833
+ subscriptionOptions: subscriptionOptions_en
6753
6834
  },
6754
6835
  fr: {
6755
6836
  common: common_fr,
@@ -6773,7 +6854,8 @@ const resources = {
6773
6854
  dashboard: dashboard_fr,
6774
6855
  select: select_fr,
6775
6856
  notification: notification_fr,
6776
- invoiceDetails: invoiceDetails_fr
6857
+ invoiceDetails: invoiceDetails_fr,
6858
+ subscriptionOptions: subscriptionOptions_fr
6777
6859
  }
6778
6860
  }; // set UI language to the page language or default to the language in site settings
6779
6861
 
@@ -7064,8 +7146,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
7064
7146
 
7065
7147
  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}}
7066
7148
 
7067
- function _extends$z() {
7068
- _extends$z = Object.assign || function (target) {
7149
+ function _extends$A() {
7150
+ _extends$A = Object.assign || function (target) {
7069
7151
  for (var i = 1; i < arguments.length; i++) {
7070
7152
  var source = arguments[i];
7071
7153
 
@@ -7079,7 +7161,7 @@ function _extends$z() {
7079
7161
  return target;
7080
7162
  };
7081
7163
 
7082
- return _extends$z.apply(this, arguments);
7164
+ return _extends$A.apply(this, arguments);
7083
7165
  }
7084
7166
 
7085
7167
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7169,7 +7251,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7169
7251
  var reducer = function reducer(state, action) {
7170
7252
  switch (action.type) {
7171
7253
  case ActionType.ADD_TOAST:
7172
- return _extends$z({}, state, {
7254
+ return _extends$A({}, state, {
7173
7255
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7174
7256
  });
7175
7257
 
@@ -7179,9 +7261,9 @@ var reducer = function reducer(state, action) {
7179
7261
  clearFromRemoveQueue(action.toast.id);
7180
7262
  }
7181
7263
 
7182
- return _extends$z({}, state, {
7264
+ return _extends$A({}, state, {
7183
7265
  toasts: state.toasts.map(function (t) {
7184
- return t.id === action.toast.id ? _extends$z({}, t, action.toast) : t;
7266
+ return t.id === action.toast.id ? _extends$A({}, t, action.toast) : t;
7185
7267
  })
7186
7268
  });
7187
7269
 
@@ -7208,9 +7290,9 @@ var reducer = function reducer(state, action) {
7208
7290
  });
7209
7291
  }
7210
7292
 
7211
- return _extends$z({}, state, {
7293
+ return _extends$A({}, state, {
7212
7294
  toasts: state.toasts.map(function (t) {
7213
- return t.id === toastId || toastId === undefined ? _extends$z({}, t, {
7295
+ return t.id === toastId || toastId === undefined ? _extends$A({}, t, {
7214
7296
  visible: false
7215
7297
  }) : t;
7216
7298
  })
@@ -7218,28 +7300,28 @@ var reducer = function reducer(state, action) {
7218
7300
 
7219
7301
  case ActionType.REMOVE_TOAST:
7220
7302
  if (action.toastId === undefined) {
7221
- return _extends$z({}, state, {
7303
+ return _extends$A({}, state, {
7222
7304
  toasts: []
7223
7305
  });
7224
7306
  }
7225
7307
 
7226
- return _extends$z({}, state, {
7308
+ return _extends$A({}, state, {
7227
7309
  toasts: state.toasts.filter(function (t) {
7228
7310
  return t.id !== action.toastId;
7229
7311
  })
7230
7312
  });
7231
7313
 
7232
7314
  case ActionType.START_PAUSE:
7233
- return _extends$z({}, state, {
7315
+ return _extends$A({}, state, {
7234
7316
  pausedAt: action.time
7235
7317
  });
7236
7318
 
7237
7319
  case ActionType.END_PAUSE:
7238
7320
  var diff = action.time - (state.pausedAt || 0);
7239
- return _extends$z({}, state, {
7321
+ return _extends$A({}, state, {
7240
7322
  pausedAt: undefined,
7241
7323
  toasts: state.toasts.map(function (t) {
7242
- return _extends$z({}, t, {
7324
+ return _extends$A({}, t, {
7243
7325
  pauseDuration: t.pauseDuration + diff
7244
7326
  });
7245
7327
  })
@@ -7286,12 +7368,12 @@ var useStore = function useStore(toastOptions) {
7286
7368
  var mergedToasts = state.toasts.map(function (t) {
7287
7369
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7288
7370
 
7289
- return _extends$z({}, toastOptions, toastOptions[t.type], t, {
7371
+ return _extends$A({}, toastOptions, toastOptions[t.type], t, {
7290
7372
  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],
7291
- style: _extends$z({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7373
+ style: _extends$A({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7292
7374
  });
7293
7375
  });
7294
- return _extends$z({}, state, {
7376
+ return _extends$A({}, state, {
7295
7377
  toasts: mergedToasts
7296
7378
  });
7297
7379
  };
@@ -7301,7 +7383,7 @@ var createToast = function createToast(message, type, opts) {
7301
7383
  type = 'blank';
7302
7384
  }
7303
7385
 
7304
- return _extends$z({
7386
+ return _extends$A({
7305
7387
  createdAt: Date.now(),
7306
7388
  visible: true,
7307
7389
  type: type,
@@ -7351,14 +7433,14 @@ toast.remove = function (toastId) {
7351
7433
  };
7352
7434
 
7353
7435
  toast.promise = function (promise, msgs, opts) {
7354
- var id = toast.loading(msgs.loading, _extends$z({}, opts, opts == null ? void 0 : opts.loading));
7436
+ var id = toast.loading(msgs.loading, _extends$A({}, opts, opts == null ? void 0 : opts.loading));
7355
7437
  promise.then(function (p) {
7356
- toast.success(resolveValue(msgs.success, p), _extends$z({
7438
+ toast.success(resolveValue(msgs.success, p), _extends$A({
7357
7439
  id: id
7358
7440
  }, opts, opts == null ? void 0 : opts.success));
7359
7441
  return p;
7360
7442
  })["catch"](function (e) {
7361
- toast.error(resolveValue(msgs.error, e), _extends$z({
7443
+ toast.error(resolveValue(msgs.error, e), _extends$A({
7362
7444
  id: id
7363
7445
  }, opts, opts == null ? void 0 : opts.error));
7364
7446
  });
@@ -7697,7 +7779,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7697
7779
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7698
7780
  return createElement(ToastBarBase, {
7699
7781
  className: toast.className,
7700
- style: _extends$z({}, animationStyle, style, toast.style)
7782
+ style: _extends$A({}, animationStyle, style, toast.style)
7701
7783
  }, typeof children === 'function' ? children({
7702
7784
  icon: icon,
7703
7785
  message: message
@@ -7727,7 +7809,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7727
7809
  } : position.includes('right') ? {
7728
7810
  justifyContent: 'flex-end'
7729
7811
  } : {};
7730
- return _extends$z({
7812
+ return _extends$A({
7731
7813
  left: 0,
7732
7814
  right: 0,
7733
7815
  display: 'flex',
@@ -7754,7 +7836,7 @@ var Toaster = function Toaster(_ref) {
7754
7836
  handlers = _useToaster.handlers;
7755
7837
 
7756
7838
  return createElement("div", {
7757
- style: _extends$z({
7839
+ style: _extends$A({
7758
7840
  position: 'fixed',
7759
7841
  zIndex: 9999,
7760
7842
  top: DEFAULT_OFFSET,
@@ -7789,82 +7871,82 @@ var Toaster = function Toaster(_ref) {
7789
7871
  }));
7790
7872
  };
7791
7873
 
7792
- var _path$w;
7874
+ var _path$x;
7793
7875
 
7794
- 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); }
7876
+ 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); }
7795
7877
 
7796
7878
  function SvgCheckSolid(props) {
7797
- return /*#__PURE__*/React.createElement("svg", _extends$y({
7879
+ return /*#__PURE__*/React.createElement("svg", _extends$z({
7798
7880
  xmlns: "http://www.w3.org/2000/svg",
7799
7881
  className: "h-5 w-5",
7800
7882
  viewBox: "0 0 20 20",
7801
7883
  fill: "currentColor"
7802
- }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7884
+ }, props), _path$x || (_path$x = /*#__PURE__*/React.createElement("path", {
7803
7885
  fillRule: "evenodd",
7804
7886
  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",
7805
7887
  clipRule: "evenodd"
7806
7888
  })));
7807
7889
  }
7808
7890
 
7809
- var _path$v;
7891
+ var _path$w;
7810
7892
 
7811
- 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); }
7893
+ 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); }
7812
7894
 
7813
7895
  function SvgXIcon(props) {
7814
- return /*#__PURE__*/React.createElement("svg", _extends$x({
7896
+ return /*#__PURE__*/React.createElement("svg", _extends$y({
7815
7897
  xmlns: "http://www.w3.org/2000/svg",
7816
7898
  viewBox: "0 0 20 20",
7817
7899
  fill: "currentColor"
7818
- }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7900
+ }, props), _path$w || (_path$w = /*#__PURE__*/React.createElement("path", {
7819
7901
  fill: "evenodd",
7820
7902
  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",
7821
7903
  clipRule: "evenodd"
7822
7904
  })));
7823
7905
  }
7824
7906
 
7825
- var _path$u;
7907
+ var _path$v;
7826
7908
 
7827
- 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); }
7909
+ 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); }
7828
7910
 
7829
7911
  function SvgXIconSolid(props) {
7830
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7912
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7831
7913
  className: "plc-w-4 plc-h-4",
7832
7914
  fill: "currentColor",
7833
7915
  xmlns: "http://www.w3.org/2000/svg",
7834
7916
  viewBox: "0 0 100 100"
7835
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7917
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7836
7918
  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"
7837
7919
  })));
7838
7920
  }
7839
7921
 
7840
- var _path$t;
7922
+ var _path$u;
7841
7923
 
7842
- 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); }
7924
+ 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); }
7843
7925
 
7844
7926
  function SvgExclamation(props) {
7845
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7927
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7846
7928
  className: "plc-w-4 plc-h-4 plc-mr-1",
7847
7929
  xmlns: "http://www.w3.org/2000/svg",
7848
7930
  viewBox: "0 0 20 20",
7849
7931
  fill: "currentColor"
7850
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7932
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7851
7933
  fillRule: "evenodd",
7852
7934
  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",
7853
7935
  clipRule: "evenodd"
7854
7936
  })));
7855
7937
  }
7856
7938
 
7857
- var _path$s, _path2$4;
7939
+ var _path$t, _path2$4;
7858
7940
 
7859
- 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); }
7941
+ 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); }
7860
7942
 
7861
7943
  function SvgSpinner(props) {
7862
- return /*#__PURE__*/React.createElement("svg", _extends$u({
7944
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7863
7945
  className: "plc-animate-spin",
7864
7946
  viewBox: "0 0 24 24",
7865
7947
  fill: "currentColor",
7866
7948
  xmlns: "http://www.w3.org/2000/svg"
7867
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7949
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7868
7950
  opacity: 0.2,
7869
7951
  fill: "evenodd",
7870
7952
  clipRule: "evenodd",
@@ -8154,7 +8236,9 @@ const init$1 = () => {
8154
8236
  return switchToAddressView();
8155
8237
  });
8156
8238
  } else {
8157
- pelcroSubscribeButtonsByClass[j].addEventListener("click", () => switchView("plan-select"));
8239
+ pelcroSubscribeButtonsByClass[j].addEventListener("click", () => {
8240
+ return switchView("subscription-options");
8241
+ });
8158
8242
  }
8159
8243
  }
8160
8244
  }
@@ -8316,7 +8400,8 @@ function Link({
8316
8400
  const init = () => {
8317
8401
  const {
8318
8402
  switchView,
8319
- set
8403
+ set,
8404
+ setProductsList
8320
8405
  } = usePelcro.getStore();
8321
8406
  const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
8322
8407
 
@@ -8367,7 +8452,8 @@ const init = () => {
8367
8452
  }
8368
8453
 
8369
8454
  notify.dismiss(NOTIFICATION_ID);
8370
- switchView("_plan-select-entitlements");
8455
+ setProductsList(window.Pelcro.product.getByEntitlements(entitlements));
8456
+ switchView("plan-select");
8371
8457
  }
8372
8458
  }, "Subscribe"), "now to get full page access.")), {
8373
8459
  className: "pelcro-notification-entitlement",
@@ -9195,7 +9281,7 @@ const PelcroModalController = ({
9195
9281
  type
9196
9282
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default.Children.map(children, child => child).find(({
9197
9283
  type
9198
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default.Children.map(children, child => child).find(({
9284
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default.Children.map(children, child => child).find(({
9199
9285
  type
9200
9286
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default.Children.map(children, child => child).find(({
9201
9287
  type
@@ -9476,8 +9562,10 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9476
9562
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9477
9563
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9478
9564
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9565
+ const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9566
+ const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9479
9567
 
9480
- const initialState$h = {
9568
+ const initialState$i = {
9481
9569
  email: "",
9482
9570
  password: "",
9483
9571
  emailError: null,
@@ -9488,10 +9576,10 @@ const initialState$h = {
9488
9576
  content: ""
9489
9577
  }
9490
9578
  };
9491
- const store$h = /*#__PURE__*/createContext(initialState$h);
9579
+ const store$i = /*#__PURE__*/createContext(initialState$i);
9492
9580
  const {
9493
- Provider: Provider$h
9494
- } = store$h;
9581
+ Provider: Provider$i
9582
+ } = store$i;
9495
9583
 
9496
9584
  const LoginContainer = ({
9497
9585
  style,
@@ -9598,7 +9686,7 @@ const LoginContainer = ({
9598
9686
  });
9599
9687
 
9600
9688
  case RESET_LOGIN_FORM:
9601
- return initialState$h;
9689
+ return initialState$i;
9602
9690
 
9603
9691
  case DISABLE_LOGIN_BUTTON:
9604
9692
  return lib_7({ ...state,
@@ -9616,12 +9704,12 @@ const LoginContainer = ({
9616
9704
  default:
9617
9705
  return state;
9618
9706
  }
9619
- }, initialState$h);
9707
+ }, initialState$i);
9620
9708
  return /*#__PURE__*/React__default.createElement("div", {
9621
9709
  style: { ...style
9622
9710
  },
9623
9711
  className: `pelcro-container pelcro-login-container ${className}`
9624
- }, /*#__PURE__*/React__default.createElement(Provider$h, {
9712
+ }, /*#__PURE__*/React__default.createElement(Provider$i, {
9625
9713
  value: {
9626
9714
  state,
9627
9715
  dispatch
@@ -9629,12 +9717,12 @@ const LoginContainer = ({
9629
9717
  }, children.length ? children.map((child, i) => {
9630
9718
  if (child) {
9631
9719
  return /*#__PURE__*/React__default.cloneElement(child, {
9632
- store: store$h,
9720
+ store: store$i,
9633
9721
  key: i
9634
9722
  });
9635
9723
  }
9636
9724
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9637
- store: store$h
9725
+ store: store$i
9638
9726
  })));
9639
9727
  };
9640
9728
 
@@ -9879,7 +9967,7 @@ const LoginButton = ({
9879
9967
  buttonDisabled
9880
9968
  },
9881
9969
  dispatch
9882
- } = useContext(store$h);
9970
+ } = useContext(store$i);
9883
9971
  const {
9884
9972
  t
9885
9973
  } = useTranslation("login");
@@ -9900,23 +9988,23 @@ const LoginButton = ({
9900
9988
  };
9901
9989
 
9902
9990
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9903
- store: store$h
9991
+ store: store$i
9904
9992
  }, props));
9905
9993
 
9906
9994
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
9907
- store: store$h
9995
+ store: store$i
9908
9996
  }, props));
9909
9997
 
9910
- var _path$r;
9998
+ var _path$s;
9911
9999
 
9912
- 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); }
10000
+ 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); }
9913
10001
 
9914
10002
  function SvgCheck(props) {
9915
- return /*#__PURE__*/React.createElement("svg", _extends$t({
10003
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
9916
10004
  xmlns: "http://www.w3.org/2000/svg",
9917
10005
  fill: "currentColor",
9918
10006
  viewBox: "0 0 20 20"
9919
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10007
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
9920
10008
  fillRule: "evenodd",
9921
10009
  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",
9922
10010
  clipRule: "evenodd"
@@ -9981,7 +10069,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9981
10069
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9982
10070
  facebookLoginRenderProps.FacebookLogin;
9983
10071
 
9984
- const initialState$g = {
10072
+ const initialState$h = {
9985
10073
  email: "",
9986
10074
  password: "",
9987
10075
  emailError: null,
@@ -9998,10 +10086,10 @@ const initialState$g = {
9998
10086
  content: ""
9999
10087
  }
10000
10088
  };
10001
- const store$g = /*#__PURE__*/createContext(initialState$g);
10089
+ const store$h = /*#__PURE__*/createContext(initialState$h);
10002
10090
  const {
10003
- Provider: Provider$g
10004
- } = store$g;
10091
+ Provider: Provider$h
10092
+ } = store$h;
10005
10093
 
10006
10094
  const RegisterContainer = ({
10007
10095
  style,
@@ -10184,7 +10272,7 @@ const RegisterContainer = ({
10184
10272
  });
10185
10273
 
10186
10274
  case RESET_LOGIN_FORM:
10187
- return initialState$g;
10275
+ return initialState$h;
10188
10276
 
10189
10277
  case DISABLE_REGISTRATION_BUTTON:
10190
10278
  return lib_7({ ...state,
@@ -10202,12 +10290,12 @@ const RegisterContainer = ({
10202
10290
  default:
10203
10291
  return state;
10204
10292
  }
10205
- }, initialState$g);
10293
+ }, initialState$h);
10206
10294
  return /*#__PURE__*/React__default.createElement("div", {
10207
10295
  style: { ...style
10208
10296
  },
10209
10297
  className: `pelcro-container pelcro-register-container ${className}`
10210
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
10298
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
10211
10299
  value: {
10212
10300
  state,
10213
10301
  dispatch
@@ -10215,12 +10303,12 @@ const RegisterContainer = ({
10215
10303
  }, children.length ? children.map((child, i) => {
10216
10304
  if (child) {
10217
10305
  return /*#__PURE__*/React__default.cloneElement(child, {
10218
- store: store$g,
10306
+ store: store$h,
10219
10307
  key: i
10220
10308
  });
10221
10309
  }
10222
10310
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10223
- store: store$g
10311
+ store: store$h
10224
10312
  })));
10225
10313
  };
10226
10314
  /**
@@ -10235,15 +10323,15 @@ function hasSecurityTokenEnabled$1() {
10235
10323
  return hasSecuritySdkLoaded;
10236
10324
  }
10237
10325
 
10238
- var _path$q;
10326
+ var _path$r;
10239
10327
 
10240
- 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); }
10328
+ 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); }
10241
10329
 
10242
10330
  function SvgFacebookLogo(props) {
10243
- return /*#__PURE__*/React.createElement("svg", _extends$s({
10331
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
10244
10332
  xmlns: "http://www.w3.org/2000/svg",
10245
10333
  viewBox: "88.428 12.828 107.543 207.085"
10246
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10334
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10247
10335
  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",
10248
10336
  fill: "#3c5a9a"
10249
10337
  })));
@@ -10260,10 +10348,10 @@ const FacebookLoginButton = ({
10260
10348
  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;
10261
10349
  const {
10262
10350
  dispatch: loginDispatch
10263
- } = useContext(store$h);
10351
+ } = useContext(store$i);
10264
10352
  const {
10265
10353
  dispatch: registerDispatch
10266
- } = useContext(store$g);
10354
+ } = useContext(store$h);
10267
10355
 
10268
10356
  const onSuccess = facebookUser => {
10269
10357
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10316,15 +10404,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10316
10404
  unwrapExports(googleLogin);
10317
10405
  var googleLogin_1 = googleLogin.GoogleLogin;
10318
10406
 
10319
- var _path$p, _path2$3, _path3$1, _path4;
10407
+ var _path$q, _path2$3, _path3$1, _path4;
10320
10408
 
10321
- 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); }
10409
+ 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); }
10322
10410
 
10323
10411
  function SvgGoogleLogo(props) {
10324
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10412
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10325
10413
  viewBox: "0 0 24 24",
10326
10414
  xmlns: "http://www.w3.org/2000/svg"
10327
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10415
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10328
10416
  fill: "#4285F4",
10329
10417
  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"
10330
10418
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10350,10 +10438,10 @@ const GoogleLoginButton = ({
10350
10438
  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;
10351
10439
  const {
10352
10440
  dispatch: loginDispatch
10353
- } = useContext(store$h);
10441
+ } = useContext(store$i);
10354
10442
  const {
10355
10443
  dispatch: registerDispatch
10356
- } = useContext(store$g);
10444
+ } = useContext(store$h);
10357
10445
 
10358
10446
  const onSuccess = response => {
10359
10447
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10401,15 +10489,15 @@ const GoogleLoginButton = ({
10401
10489
  }) : null;
10402
10490
  };
10403
10491
 
10404
- var _path$o;
10492
+ var _path$p;
10405
10493
 
10406
- 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); }
10494
+ 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); }
10407
10495
 
10408
10496
  function SvgAuth0Logo(props) {
10409
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10497
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10410
10498
  viewBox: "0 0 256 285",
10411
10499
  xmlns: "http://www.w3.org/2000/svg"
10412
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10500
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10413
10501
  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"
10414
10502
  })));
10415
10503
  }
@@ -10449,10 +10537,10 @@ const Auth0LoginButton = ({
10449
10537
  }, [auth0Enabled, auth0Loaded]);
10450
10538
  const {
10451
10539
  dispatch: loginDispatch
10452
- } = useContext(store$h);
10540
+ } = useContext(store$i);
10453
10541
  const {
10454
10542
  dispatch: registerDispatch
10455
- } = useContext(store$g);
10543
+ } = useContext(store$h);
10456
10544
 
10457
10545
  function handleClick() {
10458
10546
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10585,15 +10673,15 @@ function LoginView(props) {
10585
10673
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10586
10674
  }
10587
10675
 
10588
- var _path$n, _path2$2, _path3;
10676
+ var _path$o, _path2$2, _path3;
10589
10677
 
10590
- 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); }
10678
+ 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); }
10591
10679
 
10592
10680
  function SvgPelcroAuthorship(props) {
10593
- return /*#__PURE__*/React.createElement("svg", _extends$p({
10681
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10594
10682
  xmlns: "http://www.w3.org/2000/svg",
10595
10683
  viewBox: "0 -80.652 497.072 179.991"
10596
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10684
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10597
10685
  fill: "none",
10598
10686
  stroke: "#4a4a4a",
10599
10687
  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"
@@ -10740,11 +10828,11 @@ function LoginModal({
10740
10828
  LoginModal.viewId = "login";
10741
10829
 
10742
10830
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10743
- store: store$g
10831
+ store: store$h
10744
10832
  }, props));
10745
10833
 
10746
10834
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10747
- store: store$g
10835
+ store: store$h
10748
10836
  }, props));
10749
10837
 
10750
10838
  const RegisterButton = ({
@@ -10764,7 +10852,7 @@ const RegisterButton = ({
10764
10852
  buttonDisabled
10765
10853
  },
10766
10854
  dispatch
10767
- } = useContext(store$g);
10855
+ } = useContext(store$h);
10768
10856
  const {
10769
10857
  t
10770
10858
  } = useTranslation("register");
@@ -10902,7 +10990,7 @@ function FirstName({
10902
10990
  }
10903
10991
 
10904
10992
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10905
- store: store$g
10993
+ store: store$h
10906
10994
  }, props));
10907
10995
 
10908
10996
  function LastName({
@@ -10933,7 +11021,7 @@ function LastName({
10933
11021
  }
10934
11022
 
10935
11023
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
10936
- store: store$g
11024
+ store: store$h
10937
11025
  }, props));
10938
11026
 
10939
11027
  /**
@@ -11057,7 +11145,7 @@ function TextInput({
11057
11145
 
11058
11146
  const RegisterTextInput = props => {
11059
11147
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
11060
- store: store$g
11148
+ store: store$h
11061
11149
  }));
11062
11150
  };
11063
11151
 
@@ -11204,6 +11292,7 @@ function SelectModalWithHook(props) {
11204
11292
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11205
11293
  }, []);
11206
11294
  const {
11295
+ productsList,
11207
11296
  isGift,
11208
11297
  plan,
11209
11298
  product,
@@ -11213,11 +11302,12 @@ function SelectModalWithHook(props) {
11213
11302
  view,
11214
11303
  set
11215
11304
  } = usePelcro();
11216
- const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11217
- const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11305
+ const isRenewingSub = view === "_plan-select-renew";
11218
11306
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
11307
+ productsList: productsList,
11219
11308
  isGift: isGift,
11220
- disableGifting: isRenewingGift,
11309
+ disableGifting: isRenewingGift || isRenewingSub,
11310
+ isRenewingSub: isRenewingSub,
11221
11311
  plan: plan,
11222
11312
  product: product,
11223
11313
  onClose: () => {
@@ -11231,8 +11321,10 @@ function SelectModalWithHook(props) {
11231
11321
  plan,
11232
11322
  isGift
11233
11323
  }),
11234
- setView: switchView,
11235
- matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11324
+ setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11325
+ subscriptionIdToRenew
11326
+ }),
11327
+ setView: switchView
11236
11328
  });
11237
11329
  }
11238
11330
  SelectModalWithHook.viewId = "plan-select";
@@ -11264,10 +11356,10 @@ class SelectModal extends Component {
11264
11356
  });
11265
11357
  }
11266
11358
 
11267
- if (this.state.productList.length === 1) {
11359
+ if (this.props.productsList.length === 1) {
11268
11360
  this.setState({
11269
- product: this.state.productList[0],
11270
- planList: this.state.productList[0].plans,
11361
+ product: this.props.productsList[0],
11362
+ planList: this.props.productsList[0].plans,
11271
11363
  mode: "plan"
11272
11364
  });
11273
11365
  }
@@ -11284,7 +11376,7 @@ class SelectModal extends Component {
11284
11376
  });
11285
11377
 
11286
11378
  _defineProperty$3(this, "onProductChange", e => {
11287
- const product = window.Pelcro.product.list()[e.target.selectedIndex];
11379
+ const product = productsList[e.target.selectedIndex];
11288
11380
  this.setState({
11289
11381
  product: product,
11290
11382
  plan: product.plans[0]
@@ -11350,7 +11442,7 @@ class SelectModal extends Component {
11350
11442
 
11351
11443
  _defineProperty$3(this, "renderProducts", () => {
11352
11444
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11353
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11445
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11354
11446
  return productsToShow.map((product, index) => {
11355
11447
  return this.renderOneProduct(product, index);
11356
11448
  });
@@ -11363,7 +11455,7 @@ class SelectModal extends Component {
11363
11455
  return this.renderOneProduct(this.state.product);
11364
11456
  }
11365
11457
 
11366
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11458
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11367
11459
 
11368
11460
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11369
11461
  return this.renderProducts();
@@ -11379,10 +11471,7 @@ class SelectModal extends Component {
11379
11471
  className: "plc-text-sm plc-font-semibold"
11380
11472
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11381
11473
 
11382
- function productsWithMatchedTaggedFirst() {
11383
- var _window$Pelcro$produc;
11384
-
11385
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11474
+ function productsWithMatchedTaggedFirst(allProducts) {
11386
11475
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11387
11476
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11388
11477
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11416,7 +11505,7 @@ class SelectModal extends Component {
11416
11505
  _defineProperty$3(this, "selectProduct", e => {
11417
11506
  const id = e.target.dataset.key;
11418
11507
 
11419
- for (const product of this.state.productList) {
11508
+ for (const product of this.props.productsList) {
11420
11509
  if (+product.id === +id) {
11421
11510
  var _this$state$plan;
11422
11511
 
@@ -11469,6 +11558,14 @@ class SelectModal extends Component {
11469
11558
 
11470
11559
  _defineProperty$3(this, "submitOption", () => {
11471
11560
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11561
+
11562
+ if (this.props.isRenewingSub) {
11563
+ var _matchingSub$id;
11564
+
11565
+ const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11566
+ this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11567
+ }
11568
+
11472
11569
  const {
11473
11570
  product,
11474
11571
  isGift
@@ -11506,8 +11603,7 @@ class SelectModal extends Component {
11506
11603
  plan: {},
11507
11604
  isGift: props.isGift,
11508
11605
  disabled: true,
11509
- mode: "product",
11510
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11606
+ mode: "product"
11511
11607
  };
11512
11608
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11513
11609
  this.locale = this.props.t;
@@ -11515,7 +11611,7 @@ class SelectModal extends Component {
11515
11611
  }
11516
11612
 
11517
11613
  render() {
11518
- var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11614
+ var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11519
11615
 
11520
11616
  const {
11521
11617
  disableGifting
@@ -11549,7 +11645,7 @@ class SelectModal extends Component {
11549
11645
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11550
11646
  }, /*#__PURE__*/React__default.createElement("h4", {
11551
11647
  className: "plc-text-2xl plc-font-semibold"
11552
- }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11648
+ }, this.product && this.product.paywall.select_title || ((_this$props$productsL = this.props.productsList[0]) === null || _this$props$productsL === void 0 ? void 0 : _this$props$productsL.paywall.select_title)), /*#__PURE__*/React__default.createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_this$props$productsL2 = this.props.productsList[0]) === null || _this$props$productsL2 === void 0 ? void 0 : _this$props$productsL2.paywall.select_subtitle))), /*#__PURE__*/React__default.createElement("div", {
11553
11649
  className: "pelcro-select-products-wrapper"
11554
11650
  }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
11555
11651
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13299,7 +13395,7 @@ class VantivGateway {
13299
13395
 
13300
13396
  /** @type {PaymentStateType} */
13301
13397
 
13302
- const initialState$f = {
13398
+ const initialState$g = {
13303
13399
  disableSubmit: false,
13304
13400
  isLoading: false,
13305
13401
  disableCouponButton: false,
@@ -13318,10 +13414,10 @@ const initialState$f = {
13318
13414
  content: ""
13319
13415
  }
13320
13416
  };
13321
- const store$f = /*#__PURE__*/createContext(initialState$f);
13417
+ const store$g = /*#__PURE__*/createContext(initialState$g);
13322
13418
  const {
13323
- Provider: Provider$f
13324
- } = store$f;
13419
+ Provider: Provider$g
13420
+ } = store$g;
13325
13421
 
13326
13422
  const PaymentMethodContainerWithoutStripe = ({
13327
13423
  style,
@@ -14521,21 +14617,21 @@ const PaymentMethodContainerWithoutStripe = ({
14521
14617
  default:
14522
14618
  return state;
14523
14619
  }
14524
- }, initialState$f);
14620
+ }, initialState$g);
14525
14621
  return /*#__PURE__*/React__default.createElement("div", {
14526
14622
  style: { ...style
14527
14623
  },
14528
14624
  className: `pelcro-container pelcro-payment-container ${className}`
14529
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
14625
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
14530
14626
  value: {
14531
14627
  state,
14532
14628
  dispatch
14533
14629
  }
14534
14630
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
14535
- store: store$f,
14631
+ store: store$g,
14536
14632
  key: i
14537
14633
  })) : /*#__PURE__*/React__default.cloneElement(children, {
14538
- store: store$f
14634
+ store: store$g
14539
14635
  })));
14540
14636
  };
14541
14637
 
@@ -14557,7 +14653,7 @@ const PaymentMethodContainer = props => {
14557
14653
  stripeAccount: window.Pelcro.site.read().account_id,
14558
14654
  locale: getPageOrDefaultLanguage()
14559
14655
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
14560
- store: store$f
14656
+ store: store$g
14561
14657
  }, props))));
14562
14658
  }
14563
14659
 
@@ -14610,7 +14706,7 @@ const PelcroPaymentRequestButton = props => {
14610
14706
  currentPlan,
14611
14707
  updatedPrice
14612
14708
  }
14613
- } = useContext(store$f);
14709
+ } = useContext(store$g);
14614
14710
 
14615
14711
  const updatePaymentRequest = () => {
14616
14712
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14686,7 +14782,7 @@ const DiscountedPrice = props => {
14686
14782
  taxAmount,
14687
14783
  percentOff
14688
14784
  }
14689
- } = useContext(store$f);
14785
+ } = useContext(store$g);
14690
14786
  const {
14691
14787
  order,
14692
14788
  plan
@@ -14736,7 +14832,7 @@ const SubmitPaymentMethod = ({
14736
14832
  isLoading,
14737
14833
  updatedPrice
14738
14834
  }
14739
- } = useContext(store$f);
14835
+ } = useContext(store$g);
14740
14836
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14741
14837
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14742
14838
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14757,17 +14853,17 @@ const SubmitPaymentMethod = ({
14757
14853
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14758
14854
  };
14759
14855
 
14760
- var _path$m;
14856
+ var _path$n;
14761
14857
 
14762
- 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); }
14858
+ 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); }
14763
14859
 
14764
14860
  function SvgArrowLeft(props) {
14765
- return /*#__PURE__*/React.createElement("svg", _extends$o({
14861
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
14766
14862
  xmlns: "http://www.w3.org/2000/svg",
14767
14863
  fill: "none",
14768
14864
  viewBox: "0 0 24 24",
14769
14865
  stroke: "currentColor"
14770
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14866
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
14771
14867
  strokeLinecap: "round",
14772
14868
  strokeLinejoin: "round",
14773
14869
  strokeWidth: 2,
@@ -14786,7 +14882,7 @@ const ApplyCouponButton = ({
14786
14882
  disableCouponButton
14787
14883
  },
14788
14884
  dispatch
14789
- } = useContext(store$f);
14885
+ } = useContext(store$g);
14790
14886
  const {
14791
14887
  t
14792
14888
  } = useTranslation("checkoutForm");
@@ -14820,7 +14916,7 @@ const CouponCodeField = props => {
14820
14916
  couponCode,
14821
14917
  couponError
14822
14918
  }
14823
- } = useContext(store$f);
14919
+ } = useContext(store$g);
14824
14920
 
14825
14921
  const onCouponCodeChange = e => {
14826
14922
  dispatch({
@@ -14849,17 +14945,17 @@ const CouponCodeField = props => {
14849
14945
  }, props));
14850
14946
  };
14851
14947
 
14852
- var _path$l;
14948
+ var _path$m;
14853
14949
 
14854
- 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); }
14950
+ 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); }
14855
14951
 
14856
14952
  function SvgTicket(props) {
14857
- return /*#__PURE__*/React.createElement("svg", _extends$n({
14953
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
14858
14954
  xmlns: "http://www.w3.org/2000/svg",
14859
14955
  fill: "none",
14860
14956
  viewBox: "0 0 24 24",
14861
14957
  stroke: "currentColor"
14862
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14958
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14863
14959
  strokeLinecap: "round",
14864
14960
  strokeLinejoin: "round",
14865
14961
  strokeWidth: 2,
@@ -14876,7 +14972,7 @@ const CouponCode = ({
14876
14972
  state: {
14877
14973
  enableCouponField
14878
14974
  }
14879
- } = useContext(store$f);
14975
+ } = useContext(store$g);
14880
14976
  const {
14881
14977
  t
14882
14978
  } = useTranslation("checkoutForm");
@@ -15133,7 +15229,7 @@ const PaypalSubscribeButton = props => {
15133
15229
  const {
15134
15230
  dispatch,
15135
15231
  state
15136
- } = useContext(store$f);
15232
+ } = useContext(store$g);
15137
15233
  const {
15138
15234
  product,
15139
15235
  plan,
@@ -15219,16 +15315,16 @@ const BankRedirection = () => {
15219
15315
  }));
15220
15316
  };
15221
15317
 
15222
- var _path$k;
15318
+ var _path$l;
15223
15319
 
15224
- 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); }
15320
+ 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); }
15225
15321
 
15226
15322
  function SvgLock(props) {
15227
- return /*#__PURE__*/React.createElement("svg", _extends$m({
15323
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
15228
15324
  xmlns: "http://www.w3.org/2000/svg",
15229
15325
  viewBox: "0 0 20 20",
15230
15326
  fill: "currentColor"
15231
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15327
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
15232
15328
  fillRule: "evenodd",
15233
15329
  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",
15234
15330
  clipRule: "evenodd"
@@ -15245,7 +15341,7 @@ const SelectedPaymentMethod = () => {
15245
15341
  state: {
15246
15342
  isLoading
15247
15343
  }
15248
- } = useContext(store$f);
15344
+ } = useContext(store$g);
15249
15345
  const {
15250
15346
  switchView,
15251
15347
  selectedPaymentMethodId
@@ -15287,7 +15383,7 @@ const TaxAmount = () => {
15287
15383
  state: {
15288
15384
  taxAmount
15289
15385
  }
15290
- } = useContext(store$f);
15386
+ } = useContext(store$g);
15291
15387
  const {
15292
15388
  plan
15293
15389
  } = usePelcro();
@@ -15451,12 +15547,12 @@ function SubscriptionRenewModal({
15451
15547
  }
15452
15548
  SubscriptionRenewModal.viewId = "subscription-renew";
15453
15549
 
15454
- var _path$j;
15550
+ var _path$k;
15455
15551
 
15456
- 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); }
15552
+ 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); }
15457
15553
 
15458
15554
  function SvgGift(props) {
15459
- return /*#__PURE__*/React.createElement("svg", _extends$l({
15555
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
15460
15556
  className: "plc-w-6 plc-h-6 plc-mr-2",
15461
15557
  fill: "none",
15462
15558
  stroke: "currentColor",
@@ -15465,7 +15561,7 @@ function SvgGift(props) {
15465
15561
  strokeWidth: 2,
15466
15562
  viewBox: "0 0 24 24",
15467
15563
  xmlns: "http://www.w3.org/2000/svg"
15468
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
15564
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15469
15565
  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"
15470
15566
  })));
15471
15567
  }
@@ -15806,7 +15902,7 @@ class DefaultNewsLetter extends Component {
15806
15902
 
15807
15903
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15808
15904
 
15809
- const initialState$e = {
15905
+ const initialState$f = {
15810
15906
  didSubToNewslettersBefore: false,
15811
15907
  newsletters: [],
15812
15908
  isListLoading: true,
@@ -15816,10 +15912,10 @@ const initialState$e = {
15816
15912
  content: ""
15817
15913
  }
15818
15914
  };
15819
- const store$e = /*#__PURE__*/createContext(initialState$e);
15915
+ const store$f = /*#__PURE__*/createContext(initialState$f);
15820
15916
  const {
15821
- Provider: Provider$e
15822
- } = store$e;
15917
+ Provider: Provider$f
15918
+ } = store$f;
15823
15919
 
15824
15920
  const NewsletterUpdateContainer = ({
15825
15921
  style,
@@ -15932,7 +16028,7 @@ const NewsletterUpdateContainer = ({
15932
16028
  default:
15933
16029
  return state;
15934
16030
  }
15935
- }, initialState$e);
16031
+ }, initialState$f);
15936
16032
  useEffect(() => {
15937
16033
  const getUserNewsletters = () => {
15938
16034
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15976,7 +16072,7 @@ const NewsletterUpdateContainer = ({
15976
16072
  style: { ...style
15977
16073
  },
15978
16074
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15979
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
16075
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
15980
16076
  value: {
15981
16077
  state,
15982
16078
  dispatch
@@ -15984,12 +16080,12 @@ const NewsletterUpdateContainer = ({
15984
16080
  }, children.length ? children.map((child, i) => {
15985
16081
  if (child) {
15986
16082
  return /*#__PURE__*/React__default.cloneElement(child, {
15987
- store: store$e,
16083
+ store: store$f,
15988
16084
  key: i
15989
16085
  });
15990
16086
  }
15991
16087
  }) : /*#__PURE__*/React__default.cloneElement(children, {
15992
- store: store$e
16088
+ store: store$f
15993
16089
  })));
15994
16090
  };
15995
16091
 
@@ -16004,7 +16100,7 @@ const NewsletterUpdateButton = ({
16004
16100
  isSubmitting,
16005
16101
  isListLoading
16006
16102
  }
16007
- } = useContext(store$e);
16103
+ } = useContext(store$f);
16008
16104
  const {
16009
16105
  t
16010
16106
  } = useTranslation("newsletter");
@@ -16034,7 +16130,7 @@ const NewsletterUpdateList = () => {
16034
16130
  newsletters,
16035
16131
  isListLoading
16036
16132
  }
16037
- } = useContext(store$e);
16133
+ } = useContext(store$f);
16038
16134
 
16039
16135
  if (isListLoading) {
16040
16136
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -16238,7 +16334,7 @@ function SubscriptionCreateModal({
16238
16334
  SubscriptionCreateModal.viewId = "subscription-create";
16239
16335
 
16240
16336
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
16241
- const initialState$d = {
16337
+ const initialState$e = {
16242
16338
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
16243
16339
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
16244
16340
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -16251,10 +16347,10 @@ const initialState$d = {
16251
16347
  content: ""
16252
16348
  }
16253
16349
  };
16254
- const store$d = /*#__PURE__*/createContext(initialState$d);
16350
+ const store$e = /*#__PURE__*/createContext(initialState$e);
16255
16351
  const {
16256
- Provider: Provider$d
16257
- } = store$d;
16352
+ Provider: Provider$e
16353
+ } = store$e;
16258
16354
 
16259
16355
  const UserUpdateContainer = ({
16260
16356
  style,
@@ -16386,27 +16482,27 @@ const UserUpdateContainer = ({
16386
16482
  default:
16387
16483
  return state;
16388
16484
  }
16389
- }, initialState$d);
16485
+ }, initialState$e);
16390
16486
  return /*#__PURE__*/React__default.createElement("div", {
16391
16487
  style: { ...style
16392
16488
  },
16393
16489
  className: `pelcro-container pelcro-user-update-container ${className}`
16394
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
16490
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
16395
16491
  value: {
16396
16492
  state,
16397
16493
  dispatch
16398
16494
  }
16399
16495
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16400
- store: store$d,
16496
+ store: store$e,
16401
16497
  key: i
16402
16498
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16403
- store: store$d
16499
+ store: store$e
16404
16500
  })));
16405
16501
  };
16406
16502
 
16407
16503
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
16408
16504
  disabled: true,
16409
- store: store$d
16505
+ store: store$e
16410
16506
  }, props));
16411
16507
 
16412
16508
  const UserUpdateButton = ({
@@ -16419,7 +16515,7 @@ const UserUpdateButton = ({
16419
16515
  buttonDisabled
16420
16516
  },
16421
16517
  dispatch
16422
- } = useContext(store$d);
16518
+ } = useContext(store$e);
16423
16519
  const {
16424
16520
  t
16425
16521
  } = useTranslation("userEdit");
@@ -16436,11 +16532,11 @@ const UserUpdateButton = ({
16436
16532
  };
16437
16533
 
16438
16534
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
16439
- store: store$d
16535
+ store: store$e
16440
16536
  }, props));
16441
16537
 
16442
16538
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
16443
- store: store$d
16539
+ store: store$e
16444
16540
  }, props));
16445
16541
 
16446
16542
  function Phone({
@@ -16469,22 +16565,22 @@ function Phone({
16469
16565
  }
16470
16566
 
16471
16567
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
16472
- store: store$d
16568
+ store: store$e
16473
16569
  }, props));
16474
16570
 
16475
16571
  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";
16476
16572
 
16477
- var _path$i;
16573
+ var _path$j;
16478
16574
 
16479
- 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); }
16575
+ 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); }
16480
16576
 
16481
16577
  function SvgEdit(props) {
16482
- return /*#__PURE__*/React.createElement("svg", _extends$k({
16578
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
16483
16579
  className: "plc-w-6 plc-h-6",
16484
16580
  xmlns: "http://www.w3.org/2000/svg",
16485
16581
  viewBox: "0 0 20 20",
16486
16582
  fill: "currentColor"
16487
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
16583
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
16488
16584
  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"
16489
16585
  })));
16490
16586
  }
@@ -16616,16 +16712,16 @@ function DisplayName({
16616
16712
  }
16617
16713
 
16618
16714
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
16619
- store: store$d
16715
+ store: store$e
16620
16716
  }, props));
16621
16717
 
16622
16718
  const UserUpdateTextInput = props => {
16623
16719
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16624
- store: store$d
16720
+ store: store$e
16625
16721
  }));
16626
16722
  };
16627
16723
 
16628
- const initialState$c = {
16724
+ const initialState$d = {
16629
16725
  isSubmitting: false,
16630
16726
  firstName: "",
16631
16727
  firstNameError: "",
@@ -16650,10 +16746,10 @@ const initialState$c = {
16650
16746
  content: ""
16651
16747
  }
16652
16748
  };
16653
- const store$c = /*#__PURE__*/createContext(initialState$c);
16749
+ const store$d = /*#__PURE__*/createContext(initialState$d);
16654
16750
  const {
16655
- Provider: Provider$c
16656
- } = store$c;
16751
+ Provider: Provider$d
16752
+ } = store$d;
16657
16753
 
16658
16754
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16659
16755
 
@@ -16860,7 +16956,7 @@ const AddressCreateContainer = ({
16860
16956
  default:
16861
16957
  return state;
16862
16958
  }
16863
- }, initialState$c);
16959
+ }, initialState$d);
16864
16960
  useEffect(() => {
16865
16961
  const getStates = () => {
16866
16962
  dispatch({
@@ -16892,16 +16988,16 @@ const AddressCreateContainer = ({
16892
16988
  style: { ...style
16893
16989
  },
16894
16990
  className: `pelcro-container pelcro-address-create-container ${className}`
16895
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
16991
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
16896
16992
  value: {
16897
16993
  state,
16898
16994
  dispatch
16899
16995
  }
16900
16996
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16901
- store: store$c,
16997
+ store: store$d,
16902
16998
  key: i
16903
16999
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16904
- store: store$c
17000
+ store: store$d
16905
17001
  })));
16906
17002
  };
16907
17003
 
@@ -16912,7 +17008,7 @@ function AddressCreateFirstName(props) {
16912
17008
  firstName,
16913
17009
  firstNameError
16914
17010
  }
16915
- } = useContext(store$c);
17011
+ } = useContext(store$d);
16916
17012
 
16917
17013
  const handleBlur = () => {
16918
17014
  return dispatch({
@@ -16955,7 +17051,7 @@ function AddressCreateLastName(props) {
16955
17051
  lastName,
16956
17052
  lastNameError
16957
17053
  }
16958
- } = useContext(store$c);
17054
+ } = useContext(store$d);
16959
17055
 
16960
17056
  const handleBlur = () => {
16961
17057
  return dispatch({
@@ -16998,7 +17094,7 @@ function AddressCreateLine1(props) {
16998
17094
  line1,
16999
17095
  line1Error
17000
17096
  }
17001
- } = useContext(store$c);
17097
+ } = useContext(store$d);
17002
17098
 
17003
17099
  const handleBlur = () => {
17004
17100
  return dispatch({
@@ -17041,7 +17137,7 @@ function AddressCreateCity(props) {
17041
17137
  city,
17042
17138
  cityError
17043
17139
  }
17044
- } = useContext(store$c);
17140
+ } = useContext(store$d);
17045
17141
 
17046
17142
  const handleBlur = () => {
17047
17143
  return dispatch({
@@ -17084,7 +17180,7 @@ function AddressCreatePostalCode(props) {
17084
17180
  postalCode,
17085
17181
  postalCodeError
17086
17182
  }
17087
- } = useContext(store$c);
17183
+ } = useContext(store$d);
17088
17184
 
17089
17185
  const handleBlur = () => {
17090
17186
  return dispatch({
@@ -17130,7 +17226,7 @@ const AddressCreateSubmit = ({
17130
17226
  state: {
17131
17227
  isSubmitting
17132
17228
  }
17133
- } = useContext(store$c);
17229
+ } = useContext(store$d);
17134
17230
  const {
17135
17231
  t
17136
17232
  } = useTranslation("address");
@@ -17241,7 +17337,7 @@ function CountrySelect({
17241
17337
  }
17242
17338
 
17243
17339
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17244
- store: store$c
17340
+ store: store$d
17245
17341
  }, props));
17246
17342
 
17247
17343
  function StateSelect({
@@ -17329,7 +17425,7 @@ function StateSelect({
17329
17425
  }
17330
17426
 
17331
17427
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17332
- store: store$c
17428
+ store: store$d
17333
17429
  }, props));
17334
17430
 
17335
17431
  const AddressCreateView = props => {
@@ -17434,18 +17530,18 @@ AddressCreateModal.viewId = "address-create";
17434
17530
 
17435
17531
  const AddressCreateTextInput = props => {
17436
17532
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17437
- store: store$c
17533
+ store: store$d
17438
17534
  }));
17439
17535
  };
17440
17536
 
17441
17537
  const AddressCreateLine2 = props => {
17442
17538
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17443
17539
  fieldName: "line2",
17444
- store: store$c
17540
+ store: store$d
17445
17541
  }, props));
17446
17542
  };
17447
17543
 
17448
- const initialState$b = {
17544
+ const initialState$c = {
17449
17545
  isSubmitting: false,
17450
17546
  firstName: "",
17451
17547
  firstNameError: "",
@@ -17470,10 +17566,10 @@ const initialState$b = {
17470
17566
  content: ""
17471
17567
  }
17472
17568
  };
17473
- const store$b = /*#__PURE__*/createContext(initialState$b);
17569
+ const store$c = /*#__PURE__*/createContext(initialState$c);
17474
17570
  const {
17475
- Provider: Provider$b
17476
- } = store$b;
17571
+ Provider: Provider$c
17572
+ } = store$c;
17477
17573
 
17478
17574
  const AddressUpdateContainer = ({
17479
17575
  style,
@@ -17525,7 +17621,7 @@ const AddressUpdateContainer = ({
17525
17621
  const thisAddress = addresses[address];
17526
17622
 
17527
17623
  if (+thisAddress.id === +addressId) {
17528
- const newState = { ...initialState$b,
17624
+ const newState = { ...initialState$c,
17529
17625
  firstName: thisAddress.first_name,
17530
17626
  lastName: thisAddress.last_name,
17531
17627
  line1: thisAddress.line1,
@@ -17658,7 +17754,7 @@ const AddressUpdateContainer = ({
17658
17754
  default:
17659
17755
  return state;
17660
17756
  }
17661
- }, initialState$b);
17757
+ }, initialState$c);
17662
17758
  useEffect(() => {
17663
17759
  const getStates = () => {
17664
17760
  dispatch({
@@ -17690,21 +17786,21 @@ const AddressUpdateContainer = ({
17690
17786
  style: { ...style
17691
17787
  },
17692
17788
  className: `pelcro-container pelcro-address-update-container ${className}`
17693
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
17789
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
17694
17790
  value: {
17695
17791
  state,
17696
17792
  dispatch
17697
17793
  }
17698
17794
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17699
- store: store$b,
17795
+ store: store$c,
17700
17796
  key: i
17701
17797
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17702
- store: store$b
17798
+ store: store$c
17703
17799
  })));
17704
17800
  };
17705
17801
 
17706
17802
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17707
- store: store$b
17803
+ store: store$c
17708
17804
  }, props));
17709
17805
 
17710
17806
  function AddressUpdateFirstName(props) {
@@ -17714,7 +17810,7 @@ function AddressUpdateFirstName(props) {
17714
17810
  firstName,
17715
17811
  firstNameError
17716
17812
  }
17717
- } = useContext(store$b);
17813
+ } = useContext(store$c);
17718
17814
 
17719
17815
  const handleBlur = () => {
17720
17816
  return dispatch({
@@ -17757,7 +17853,7 @@ function AddressUpdateLastName(props) {
17757
17853
  lastName,
17758
17854
  lastNameError
17759
17855
  }
17760
- } = useContext(store$b);
17856
+ } = useContext(store$c);
17761
17857
 
17762
17858
  const handleBlur = () => {
17763
17859
  return dispatch({
@@ -17800,7 +17896,7 @@ function AddressUpdateLine1(props) {
17800
17896
  line1,
17801
17897
  line1Error
17802
17898
  }
17803
- } = useContext(store$b);
17899
+ } = useContext(store$c);
17804
17900
 
17805
17901
  const handleBlur = () => {
17806
17902
  return dispatch({
@@ -17840,7 +17936,7 @@ const AddressUpdateLine2 = props => {
17840
17936
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17841
17937
  fieldName: "line2"
17842
17938
  }, props, {
17843
- store: store$b
17939
+ store: store$c
17844
17940
  }));
17845
17941
  };
17846
17942
 
@@ -17851,7 +17947,7 @@ function AddressUpdateCity(props) {
17851
17947
  city,
17852
17948
  cityError
17853
17949
  }
17854
- } = useContext(store$b);
17950
+ } = useContext(store$c);
17855
17951
 
17856
17952
  const handleBlur = () => {
17857
17953
  return dispatch({
@@ -17894,7 +17990,7 @@ function AddressUpdatePostalCode(props) {
17894
17990
  postalCode,
17895
17991
  postalCodeError
17896
17992
  }
17897
- } = useContext(store$b);
17993
+ } = useContext(store$c);
17898
17994
 
17899
17995
  const handleBlur = () => {
17900
17996
  return dispatch({
@@ -17940,7 +18036,7 @@ const AddressUpdateSubmit = ({
17940
18036
  state: {
17941
18037
  isSubmitting
17942
18038
  }
17943
- } = useContext(store$b);
18039
+ } = useContext(store$c);
17944
18040
  const {
17945
18041
  t
17946
18042
  } = useTranslation("address");
@@ -17956,7 +18052,7 @@ const AddressUpdateSubmit = ({
17956
18052
  };
17957
18053
 
17958
18054
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17959
- store: store$b
18055
+ store: store$c
17960
18056
  }, props));
17961
18057
 
17962
18058
  const AddressUpdateView = props => {
@@ -18039,7 +18135,7 @@ AddressUpdateModal.viewId = "address-edit";
18039
18135
 
18040
18136
  const AddressUpdateTextInput = props => {
18041
18137
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
18042
- store: store$b
18138
+ store: store$c
18043
18139
  }));
18044
18140
  };
18045
18141
 
@@ -18122,7 +18218,7 @@ const PaymentMethodUpdateModal = props => {
18122
18218
  };
18123
18219
  PaymentMethodUpdateModal.viewId = "payment-method-update";
18124
18220
 
18125
- const initialState$a = {
18221
+ const initialState$b = {
18126
18222
  email: "",
18127
18223
  password: "",
18128
18224
  passwordError: null,
@@ -18135,10 +18231,10 @@ const initialState$a = {
18135
18231
  content: ""
18136
18232
  }
18137
18233
  };
18138
- const store$a = /*#__PURE__*/createContext(initialState$a);
18234
+ const store$b = /*#__PURE__*/createContext(initialState$b);
18139
18235
  const {
18140
- Provider: Provider$a
18141
- } = store$a;
18236
+ Provider: Provider$b
18237
+ } = store$b;
18142
18238
 
18143
18239
  const PasswordResetContainer = ({
18144
18240
  style,
@@ -18195,7 +18291,7 @@ const PasswordResetContainer = ({
18195
18291
  type: SET_EMAIL,
18196
18292
  payload: window.Pelcro.helpers.getURLParameter("email")
18197
18293
  });
18198
- initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
18294
+ initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
18199
18295
  dispatch({
18200
18296
  type: SET_TOKEN,
18201
18297
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -18255,26 +18351,26 @@ const PasswordResetContainer = ({
18255
18351
  default:
18256
18352
  return state;
18257
18353
  }
18258
- }, initialState$a);
18354
+ }, initialState$b);
18259
18355
  return /*#__PURE__*/React__default.createElement("div", {
18260
18356
  style: { ...style
18261
18357
  },
18262
18358
  className: `pelcro-container pelcro-password-reset-container ${className}`
18263
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
18359
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
18264
18360
  value: {
18265
18361
  state,
18266
18362
  dispatch
18267
18363
  }
18268
18364
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18269
- store: store$a,
18365
+ store: store$b,
18270
18366
  key: i
18271
18367
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18272
- store: store$a
18368
+ store: store$b
18273
18369
  })));
18274
18370
  };
18275
18371
 
18276
18372
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
18277
- store: store$a
18373
+ store: store$b
18278
18374
  }, props));
18279
18375
 
18280
18376
  const PasswordResetButton = ({
@@ -18287,7 +18383,7 @@ const PasswordResetButton = ({
18287
18383
  buttonDisabled
18288
18384
  },
18289
18385
  dispatch
18290
- } = useContext(store$a);
18386
+ } = useContext(store$b);
18291
18387
  const {
18292
18388
  t
18293
18389
  } = useTranslation("passwordReset");
@@ -18304,14 +18400,14 @@ const PasswordResetButton = ({
18304
18400
  };
18305
18401
 
18306
18402
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18307
- store: store$a
18403
+ store: store$b
18308
18404
  }, props, {
18309
18405
  value: window.Pelcro.helpers.getURLParameter("email"),
18310
18406
  disabled: true
18311
18407
  }));
18312
18408
 
18313
18409
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
18314
- store: store$a
18410
+ store: store$b
18315
18411
  }, props));
18316
18412
 
18317
18413
  const PasswordResetView = props => {
@@ -18363,7 +18459,7 @@ const PasswordResetModal = ({
18363
18459
  };
18364
18460
  PasswordResetModal.viewId = "password-reset";
18365
18461
 
18366
- const initialState$9 = {
18462
+ const initialState$a = {
18367
18463
  email: "",
18368
18464
  emailError: null,
18369
18465
  buttonDisabled: false,
@@ -18372,10 +18468,10 @@ const initialState$9 = {
18372
18468
  content: ""
18373
18469
  }
18374
18470
  };
18375
- const store$9 = /*#__PURE__*/createContext(initialState$9);
18471
+ const store$a = /*#__PURE__*/createContext(initialState$a);
18376
18472
  const {
18377
- Provider: Provider$9
18378
- } = store$9;
18473
+ Provider: Provider$a
18474
+ } = store$a;
18379
18475
 
18380
18476
  const PasswordForgotContainer = ({
18381
18477
  style,
@@ -18453,21 +18549,21 @@ const PasswordForgotContainer = ({
18453
18549
  default:
18454
18550
  return state;
18455
18551
  }
18456
- }, initialState$9);
18552
+ }, initialState$a);
18457
18553
  return /*#__PURE__*/React__default.createElement("div", {
18458
18554
  style: { ...style
18459
18555
  },
18460
18556
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18461
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
18557
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
18462
18558
  value: {
18463
18559
  state,
18464
18560
  dispatch
18465
18561
  }
18466
18562
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18467
- store: store$9,
18563
+ store: store$a,
18468
18564
  key: i
18469
18565
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18470
- store: store$9
18566
+ store: store$a
18471
18567
  })));
18472
18568
  };
18473
18569
 
@@ -18483,7 +18579,7 @@ const PasswordForgotButton = ({
18483
18579
  emailError
18484
18580
  },
18485
18581
  dispatch
18486
- } = useContext(store$9);
18582
+ } = useContext(store$a);
18487
18583
  const {
18488
18584
  t
18489
18585
  } = useTranslation("passwordForgot");
@@ -18504,7 +18600,7 @@ const PasswordForgotButton = ({
18504
18600
  };
18505
18601
 
18506
18602
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18507
- store: store$9
18603
+ store: store$a
18508
18604
  }, props));
18509
18605
 
18510
18606
  const PasswordForgotView = props => {
@@ -18554,7 +18650,7 @@ const PasswordForgotModal = ({
18554
18650
  };
18555
18651
  PasswordForgotModal.viewId = "password-forgot";
18556
18652
 
18557
- const initialState$8 = {
18653
+ const initialState$9 = {
18558
18654
  currentPassword: "",
18559
18655
  newPassword: "",
18560
18656
  confirmNewPassword: "",
@@ -18568,10 +18664,10 @@ const initialState$8 = {
18568
18664
  content: ""
18569
18665
  }
18570
18666
  };
18571
- const store$8 = /*#__PURE__*/createContext(initialState$8);
18667
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
18572
18668
  const {
18573
- Provider: Provider$8
18574
- } = store$8;
18669
+ Provider: Provider$9
18670
+ } = store$9;
18575
18671
  const PasswordChangeContainer = ({
18576
18672
  style,
18577
18673
  className = "",
@@ -18723,21 +18819,21 @@ const PasswordChangeContainer = ({
18723
18819
  default:
18724
18820
  return state;
18725
18821
  }
18726
- }, initialState$8);
18822
+ }, initialState$9);
18727
18823
  return /*#__PURE__*/React__default.createElement("div", {
18728
18824
  style: { ...style
18729
18825
  },
18730
18826
  className: `pelcro-container pelcro-password-change-container ${className}`
18731
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
18827
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
18732
18828
  value: {
18733
18829
  state,
18734
18830
  dispatch
18735
18831
  }
18736
18832
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18737
- store: store$8,
18833
+ store: store$9,
18738
18834
  key: i
18739
18835
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18740
- store: store$8
18836
+ store: store$9
18741
18837
  })));
18742
18838
  };
18743
18839
 
@@ -18748,7 +18844,7 @@ function PasswordChangeCurrentPassword(props) {
18748
18844
  currentPassword,
18749
18845
  currentPasswordError
18750
18846
  }
18751
- } = useContext(store$8);
18847
+ } = useContext(store$9);
18752
18848
  const handleBlur = useCallback(() => {
18753
18849
  return dispatch({
18754
18850
  type: VALIDATE_PASSWORD
@@ -18782,7 +18878,7 @@ function PasswordChangeNewPassword(props) {
18782
18878
  newPassword,
18783
18879
  newPasswordError
18784
18880
  }
18785
- } = useContext(store$8);
18881
+ } = useContext(store$9);
18786
18882
  const handleBlur = useCallback(() => {
18787
18883
  return dispatch({
18788
18884
  type: VALIDATE_NEW_PASSWORD
@@ -18816,7 +18912,7 @@ function PasswordChangeConfirmNewPassword(props) {
18816
18912
  confirmNewPassword,
18817
18913
  confirmNewPasswordError
18818
18914
  }
18819
- } = useContext(store$8);
18915
+ } = useContext(store$9);
18820
18916
  const handleBlur = useCallback(() => {
18821
18917
  return dispatch({
18822
18918
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18857,7 +18953,7 @@ const PasswordChangeButton = ({
18857
18953
  confirmNewPasswordError
18858
18954
  },
18859
18955
  dispatch
18860
- } = useContext(store$8);
18956
+ } = useContext(store$9);
18861
18957
  const {
18862
18958
  t
18863
18959
  } = useTranslation("passwordChange");
@@ -18923,17 +19019,17 @@ const PasswordChangeModal = ({
18923
19019
  };
18924
19020
  PasswordChangeModal.viewId = "password-change";
18925
19021
 
18926
- const initialState$7 = {
19022
+ const initialState$8 = {
18927
19023
  buttonDisabled: false,
18928
19024
  alert: {
18929
19025
  type: "error",
18930
19026
  content: ""
18931
19027
  }
18932
19028
  };
18933
- const store$7 = /*#__PURE__*/createContext(initialState$7);
19029
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
18934
19030
  const {
18935
- Provider: Provider$7
18936
- } = store$7;
19031
+ Provider: Provider$8
19032
+ } = store$8;
18937
19033
 
18938
19034
  const CartContainer = ({
18939
19035
  style,
@@ -19024,21 +19120,21 @@ const CartContainer = ({
19024
19120
  default:
19025
19121
  return state;
19026
19122
  }
19027
- }, initialState$7);
19123
+ }, initialState$8);
19028
19124
  return /*#__PURE__*/React__default.createElement("div", {
19029
19125
  style: { ...style
19030
19126
  },
19031
19127
  className: `pelcro-container pelcro-cart-container ${className}`
19032
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
19128
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
19033
19129
  value: {
19034
19130
  state,
19035
19131
  dispatch
19036
19132
  }
19037
19133
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19038
- store: store$7,
19134
+ store: store$8,
19039
19135
  key: i
19040
19136
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19041
- store: store$7
19137
+ store: store$8
19042
19138
  })));
19043
19139
  };
19044
19140
 
@@ -19075,7 +19171,7 @@ const CartSubmit = ({
19075
19171
  buttonDisabled
19076
19172
  },
19077
19173
  dispatch
19078
- } = useContext(store$7);
19174
+ } = useContext(store$8);
19079
19175
  const {
19080
19176
  t
19081
19177
  } = useTranslation("cart");
@@ -19106,7 +19202,7 @@ const CartTotalPrice = () => {
19106
19202
  state: {
19107
19203
  alert
19108
19204
  }
19109
- } = useContext(store$7);
19205
+ } = useContext(store$8);
19110
19206
  const {
19111
19207
  cartItems
19112
19208
  } = usePelcro();
@@ -19419,7 +19515,7 @@ const OrderConfirmModal = props => {
19419
19515
  };
19420
19516
  OrderConfirmModal.viewId = "order-confirm";
19421
19517
 
19422
- const initialState$6 = {
19518
+ const initialState$7 = {
19423
19519
  email: "",
19424
19520
  firstName: "",
19425
19521
  lastName: "",
@@ -19431,10 +19527,10 @@ const initialState$6 = {
19431
19527
  content: ""
19432
19528
  }
19433
19529
  };
19434
- const store$6 = /*#__PURE__*/createContext(initialState$6);
19530
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
19435
19531
  const {
19436
- Provider: Provider$6
19437
- } = store$6;
19532
+ Provider: Provider$7
19533
+ } = store$7;
19438
19534
 
19439
19535
  const GiftCreateContainer = ({
19440
19536
  style,
@@ -19538,21 +19634,21 @@ const GiftCreateContainer = ({
19538
19634
  default:
19539
19635
  return state;
19540
19636
  }
19541
- }, initialState$6);
19637
+ }, initialState$7);
19542
19638
  return /*#__PURE__*/React__default.createElement("div", {
19543
19639
  style: { ...style
19544
19640
  },
19545
19641
  className: `pelcro-container pelcro-gift-create-container ${className}`
19546
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
19642
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
19547
19643
  value: {
19548
19644
  state,
19549
19645
  dispatch
19550
19646
  }
19551
19647
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19552
- store: store$6,
19648
+ store: store$7,
19553
19649
  key: i
19554
19650
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19555
- store: store$6
19651
+ store: store$7
19556
19652
  })));
19557
19653
  };
19558
19654
 
@@ -19566,7 +19662,7 @@ const GiftCreateSubmitButton = ({
19566
19662
  state: {
19567
19663
  disableSubmit
19568
19664
  }
19569
- } = useContext(store$6);
19665
+ } = useContext(store$7);
19570
19666
  const {
19571
19667
  t
19572
19668
  } = useTranslation("register");
@@ -19583,29 +19679,29 @@ const GiftCreateSubmitButton = ({
19583
19679
 
19584
19680
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
19585
19681
  initWithUserEmail: false,
19586
- store: store$6
19682
+ store: store$7
19587
19683
  }, props));
19588
19684
 
19589
19685
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
19590
- store: store$6
19686
+ store: store$7
19591
19687
  }, props));
19592
19688
 
19593
19689
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
19594
- store: store$6
19690
+ store: store$7
19595
19691
  }, props));
19596
19692
 
19597
- var _path$h;
19693
+ var _path$i;
19598
19694
 
19599
- 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); }
19695
+ 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); }
19600
19696
 
19601
19697
  function SvgInfoCircle(props) {
19602
- return /*#__PURE__*/React.createElement("svg", _extends$j({
19698
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
19603
19699
  xmlns: "http://www.w3.org/2000/svg",
19604
19700
  className: "plc-w-5 plc-h-5",
19605
19701
  fill: "none",
19606
19702
  viewBox: "0 0 24 24",
19607
19703
  stroke: "currentColor"
19608
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
19704
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
19609
19705
  strokeLinecap: "round",
19610
19706
  strokeLinejoin: "round",
19611
19707
  strokeWidth: 2,
@@ -19676,7 +19772,7 @@ const GiftCreateStartDate = props => {
19676
19772
  const {
19677
19773
  dispatch,
19678
19774
  state
19679
- } = useContext(store$6);
19775
+ } = useContext(store$7);
19680
19776
 
19681
19777
  const handleInputChange = value => {
19682
19778
  dispatch({
@@ -19749,7 +19845,7 @@ function GiftCreateMessage(props) {
19749
19845
  const {
19750
19846
  dispatch,
19751
19847
  state
19752
- } = useContext(store$6);
19848
+ } = useContext(store$7);
19753
19849
  const MAX_CHARS_COUNT = 200;
19754
19850
  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;
19755
19851
 
@@ -19873,7 +19969,7 @@ const GiftCreateModal = ({
19873
19969
  };
19874
19970
  GiftCreateModal.viewId = "gift-create";
19875
19971
 
19876
- const initialState$5 = {
19972
+ const initialState$6 = {
19877
19973
  giftCode: "",
19878
19974
  buttonDisabled: true,
19879
19975
  alert: {
@@ -19881,10 +19977,10 @@ const initialState$5 = {
19881
19977
  content: ""
19882
19978
  }
19883
19979
  };
19884
- const store$5 = /*#__PURE__*/createContext(initialState$5);
19980
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
19885
19981
  const {
19886
- Provider: Provider$5
19887
- } = store$5;
19982
+ Provider: Provider$6
19983
+ } = store$6;
19888
19984
 
19889
19985
  const GiftRedeemContainer = ({
19890
19986
  style,
@@ -19949,21 +20045,21 @@ const GiftRedeemContainer = ({
19949
20045
  default:
19950
20046
  return state;
19951
20047
  }
19952
- }, initialState$5);
20048
+ }, initialState$6);
19953
20049
  return /*#__PURE__*/React__default.createElement("div", {
19954
20050
  style: { ...style
19955
20051
  },
19956
20052
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19957
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
20053
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
19958
20054
  value: {
19959
20055
  state,
19960
20056
  dispatch
19961
20057
  }
19962
20058
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19963
- store: store$5,
20059
+ store: store$6,
19964
20060
  key: i
19965
20061
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19966
- store: store$5
20062
+ store: store$6
19967
20063
  })));
19968
20064
  };
19969
20065
 
@@ -20000,7 +20096,7 @@ function GiftCode({
20000
20096
  }
20001
20097
 
20002
20098
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
20003
- store: store$5
20099
+ store: store$6
20004
20100
  }, props));
20005
20101
 
20006
20102
  const GiftRedeemSubmitButton = ({
@@ -20013,7 +20109,7 @@ const GiftRedeemSubmitButton = ({
20013
20109
  state: {
20014
20110
  disableSubmit
20015
20111
  }
20016
- } = useContext(store$5);
20112
+ } = useContext(store$6);
20017
20113
  const {
20018
20114
  t
20019
20115
  } = useTranslation("register");
@@ -20106,7 +20202,7 @@ const moveDefaultAddressToStart = addresses => {
20106
20202
  return [defaultAddress, ...addressesWithoutDefault];
20107
20203
  };
20108
20204
 
20109
- const initialState$4 = {
20205
+ const initialState$5 = {
20110
20206
  addresses: [],
20111
20207
  selectedAddressId: null,
20112
20208
  isSubmitting: false,
@@ -20115,10 +20211,10 @@ const initialState$4 = {
20115
20211
  content: ""
20116
20212
  }
20117
20213
  };
20118
- const store$4 = /*#__PURE__*/createContext(initialState$4);
20214
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
20119
20215
  const {
20120
- Provider: Provider$4
20121
- } = store$4;
20216
+ Provider: Provider$5
20217
+ } = store$5;
20122
20218
 
20123
20219
  const AddressSelectContainer = ({
20124
20220
  style,
@@ -20213,7 +20309,7 @@ const AddressSelectContainer = ({
20213
20309
  default:
20214
20310
  return state;
20215
20311
  }
20216
- }, initialState$4);
20312
+ }, initialState$5);
20217
20313
  useEffect(() => {
20218
20314
  var _window$Pelcro$user$r;
20219
20315
 
@@ -20226,16 +20322,16 @@ const AddressSelectContainer = ({
20226
20322
  style: { ...style
20227
20323
  },
20228
20324
  className: `pelcro-container pelcro-address-select-container ${className}`
20229
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
20325
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
20230
20326
  value: {
20231
20327
  state,
20232
20328
  dispatch
20233
20329
  }
20234
20330
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20235
- store: store$4,
20331
+ store: store$5,
20236
20332
  key: i
20237
20333
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20238
- store: store$4
20334
+ store: store$5
20239
20335
  })));
20240
20336
  };
20241
20337
 
@@ -20246,7 +20342,7 @@ const AddressSelectList = () => {
20246
20342
  addresses,
20247
20343
  selectedAddressId
20248
20344
  }
20249
- } = useContext(store$4);
20345
+ } = useContext(store$5);
20250
20346
 
20251
20347
  const handleAddressSelect = event => {
20252
20348
  dispatch({
@@ -20290,7 +20386,7 @@ const AddressSelectSubmit = ({
20290
20386
  selectedAddressId,
20291
20387
  isSubmitting
20292
20388
  }
20293
- } = useContext(store$4);
20389
+ } = useContext(store$5);
20294
20390
  const {
20295
20391
  t
20296
20392
  } = useTranslation("address");
@@ -20386,7 +20482,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20386
20482
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20387
20483
  };
20388
20484
 
20389
- const initialState$3 = {
20485
+ const initialState$4 = {
20390
20486
  paymentMethods: [],
20391
20487
  selectedPaymentMethodId: null,
20392
20488
  isSubmitting: false,
@@ -20395,10 +20491,10 @@ const initialState$3 = {
20395
20491
  content: ""
20396
20492
  }
20397
20493
  };
20398
- const store$3 = /*#__PURE__*/createContext(initialState$3);
20494
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
20399
20495
  const {
20400
- Provider: Provider$3
20401
- } = store$3;
20496
+ Provider: Provider$4
20497
+ } = store$4;
20402
20498
 
20403
20499
  const PaymentMethodSelectContainer = ({
20404
20500
  style,
@@ -20457,7 +20553,7 @@ const PaymentMethodSelectContainer = ({
20457
20553
  default:
20458
20554
  return state;
20459
20555
  }
20460
- }, initialState$3);
20556
+ }, initialState$4);
20461
20557
  useEffect(() => {
20462
20558
  var _window$Pelcro$user$r3;
20463
20559
 
@@ -20470,16 +20566,16 @@ const PaymentMethodSelectContainer = ({
20470
20566
  style: { ...style
20471
20567
  },
20472
20568
  className: `pelcro-container pelcro-payment-select-container ${className}`
20473
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
20569
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
20474
20570
  value: {
20475
20571
  state,
20476
20572
  dispatch
20477
20573
  }
20478
20574
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20479
- store: store$3,
20575
+ store: store$4,
20480
20576
  key: i
20481
20577
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20482
- store: store$3
20578
+ store: store$4
20483
20579
  })));
20484
20580
  };
20485
20581
 
@@ -20493,7 +20589,7 @@ const PaymentMethodSelectList = () => {
20493
20589
  paymentMethods,
20494
20590
  selectedPaymentMethodId
20495
20591
  }
20496
- } = useContext(store$3);
20592
+ } = useContext(store$4);
20497
20593
 
20498
20594
  const handlePaymentMethodSelect = event => {
20499
20595
  dispatch({
@@ -20543,7 +20639,7 @@ const PaymentMethodSelectSubmit = ({
20543
20639
  selectedPaymentMethodId,
20544
20640
  isSubmitting
20545
20641
  }
20546
- } = useContext(store$3);
20642
+ } = useContext(store$4);
20547
20643
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
20548
20644
  onClick: () => {
20549
20645
  dispatch({
@@ -20617,8 +20713,8 @@ const PaymentMethodSelectModal = ({
20617
20713
  };
20618
20714
  PaymentMethodSelectModal.viewId = "payment-method-select";
20619
20715
 
20620
- function _extends$i() {
20621
- _extends$i = Object.assign || function (target) {
20716
+ function _extends$j() {
20717
+ _extends$j = Object.assign || function (target) {
20622
20718
  for (var i = 1; i < arguments.length; i++) {
20623
20719
  var source = arguments[i];
20624
20720
 
@@ -20632,7 +20728,7 @@ function _extends$i() {
20632
20728
  return target;
20633
20729
  };
20634
20730
 
20635
- return _extends$i.apply(this, arguments);
20731
+ return _extends$j.apply(this, arguments);
20636
20732
  }
20637
20733
 
20638
20734
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20816,7 +20912,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20816
20912
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20817
20913
  return null;
20818
20914
  }, _match[RenderStrategy.Hidden] = function () {
20819
- return _render(_extends$i({}, _rest, {
20915
+ return _render(_extends$j({}, _rest, {
20820
20916
  hidden: true,
20821
20917
  style: {
20822
20918
  display: 'none'
@@ -21344,7 +21440,7 @@ function TransitionChild(props) {
21344
21440
  var passthroughProps = rest;
21345
21441
  return React__default.createElement(NestingContext.Provider, {
21346
21442
  value: nesting
21347
- }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21443
+ }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21348
21444
  }
21349
21445
 
21350
21446
  function Transition(props) {
@@ -21388,7 +21484,7 @@ function Transition(props) {
21388
21484
  value: nestingBag
21389
21485
  }, React__default.createElement(TransitionContext.Provider, {
21390
21486
  value: transitionBag
21391
- }, render(_extends$i({}, sharedProps, {
21487
+ }, render(_extends$j({}, sharedProps, {
21392
21488
  as: Fragment,
21393
21489
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21394
21490
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21515,12 +21611,12 @@ var ActionTypes;
21515
21611
  })(ActionTypes || (ActionTypes = {}));
21516
21612
 
21517
21613
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21518
- return _extends$i({}, state, {
21614
+ return _extends$j({}, state, {
21519
21615
  activeItemIndex: null,
21520
21616
  menuState: MenuStates.Closed
21521
21617
  });
21522
21618
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21523
- return _extends$i({}, state, {
21619
+ return _extends$j({}, state, {
21524
21620
  menuState: MenuStates.Open
21525
21621
  });
21526
21622
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21539,7 +21635,7 @@ var ActionTypes;
21539
21635
  }
21540
21636
  });
21541
21637
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21542
- return _extends$i({}, state, {
21638
+ return _extends$j({}, state, {
21543
21639
  searchQuery: '',
21544
21640
  activeItemIndex: activeItemIndex
21545
21641
  });
@@ -21550,19 +21646,19 @@ var ActionTypes;
21550
21646
 
21551
21647
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21552
21648
  });
21553
- if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21649
+ if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21554
21650
  searchQuery: searchQuery
21555
21651
  });
21556
- return _extends$i({}, state, {
21652
+ return _extends$j({}, state, {
21557
21653
  searchQuery: searchQuery,
21558
21654
  activeItemIndex: match
21559
21655
  });
21560
21656
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21561
- return _extends$i({}, state, {
21657
+ return _extends$j({}, state, {
21562
21658
  searchQuery: ''
21563
21659
  });
21564
21660
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21565
- return _extends$i({}, state, {
21661
+ return _extends$j({}, state, {
21566
21662
  items: [].concat(state.items, [{
21567
21663
  id: action.id,
21568
21664
  dataRef: action.dataRef
@@ -21575,7 +21671,7 @@ var ActionTypes;
21575
21671
  return a.id === action.id;
21576
21672
  });
21577
21673
  if (idx !== -1) nextItems.splice(idx, 1);
21578
- return _extends$i({}, state, {
21674
+ return _extends$j({}, state, {
21579
21675
  items: nextItems,
21580
21676
  activeItemIndex: function () {
21581
21677
  if (idx === state.activeItemIndex) return null;
@@ -21614,19 +21710,19 @@ var ActionTypes$1;
21614
21710
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21615
21711
  if (state.disabled) return state;
21616
21712
  if (state.listboxState === ListboxStates.Closed) return state;
21617
- return _extends$i({}, state, {
21713
+ return _extends$j({}, state, {
21618
21714
  activeOptionIndex: null,
21619
21715
  listboxState: ListboxStates.Closed
21620
21716
  });
21621
21717
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21622
21718
  if (state.disabled) return state;
21623
21719
  if (state.listboxState === ListboxStates.Open) return state;
21624
- return _extends$i({}, state, {
21720
+ return _extends$j({}, state, {
21625
21721
  listboxState: ListboxStates.Open
21626
21722
  });
21627
21723
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21628
21724
  if (state.disabled === action.disabled) return state;
21629
- return _extends$i({}, state, {
21725
+ return _extends$j({}, state, {
21630
21726
  disabled: action.disabled
21631
21727
  });
21632
21728
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21647,7 +21743,7 @@ var ActionTypes$1;
21647
21743
  }
21648
21744
  });
21649
21745
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21650
- return _extends$i({}, state, {
21746
+ return _extends$j({}, state, {
21651
21747
  searchQuery: '',
21652
21748
  activeOptionIndex: activeOptionIndex
21653
21749
  });
@@ -21660,10 +21756,10 @@ var ActionTypes$1;
21660
21756
 
21661
21757
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21662
21758
  });
21663
- if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21759
+ if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21664
21760
  searchQuery: searchQuery
21665
21761
  });
21666
- return _extends$i({}, state, {
21762
+ return _extends$j({}, state, {
21667
21763
  searchQuery: searchQuery,
21668
21764
  activeOptionIndex: match
21669
21765
  });
@@ -21671,11 +21767,11 @@ var ActionTypes$1;
21671
21767
  if (state.disabled) return state;
21672
21768
  if (state.listboxState === ListboxStates.Closed) return state;
21673
21769
  if (state.searchQuery === '') return state;
21674
- return _extends$i({}, state, {
21770
+ return _extends$j({}, state, {
21675
21771
  searchQuery: ''
21676
21772
  });
21677
21773
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21678
- return _extends$i({}, state, {
21774
+ return _extends$j({}, state, {
21679
21775
  options: [].concat(state.options, [{
21680
21776
  id: action.id,
21681
21777
  dataRef: action.dataRef
@@ -21688,7 +21784,7 @@ var ActionTypes$1;
21688
21784
  return a.id === action.id;
21689
21785
  });
21690
21786
  if (idx !== -1) nextOptions.splice(idx, 1);
21691
- return _extends$i({}, state, {
21787
+ return _extends$j({}, state, {
21692
21788
  options: nextOptions,
21693
21789
  activeOptionIndex: function () {
21694
21790
  if (idx === state.activeOptionIndex) return null;
@@ -21749,18 +21845,18 @@ const getPaymentCardIcon = name => {
21749
21845
  }));
21750
21846
  };
21751
21847
 
21752
- var _path$g;
21848
+ var _path$h;
21753
21849
 
21754
- 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); }
21850
+ 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); }
21755
21851
 
21756
21852
  function SvgChevronRight(props) {
21757
- return /*#__PURE__*/React.createElement("svg", _extends$h({
21853
+ return /*#__PURE__*/React.createElement("svg", _extends$i({
21758
21854
  className: "plc-w-6 plc-h-6",
21759
21855
  xmlns: "http://www.w3.org/2000/svg",
21760
21856
  fill: "none",
21761
21857
  viewBox: "0 0 24 24",
21762
21858
  stroke: "currentColor"
21763
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21859
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
21764
21860
  strokeLinecap: "round",
21765
21861
  strokeLinejoin: "round",
21766
21862
  strokeWidth: 2,
@@ -21976,18 +22072,18 @@ const SavedItems = ({
21976
22072
  });
21977
22073
  };
21978
22074
 
21979
- var _path$f;
22075
+ var _path$g;
21980
22076
 
21981
- 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); }
22077
+ 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); }
21982
22078
 
21983
22079
  function SvgRefresh(props) {
21984
- return /*#__PURE__*/React.createElement("svg", _extends$g({
22080
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
21985
22081
  className: "plc-w-4 plc-h-4 plc-mr-1",
21986
22082
  xmlns: "http://www.w3.org/2000/svg",
21987
22083
  fill: "none",
21988
22084
  viewBox: "0 0 24 24",
21989
22085
  stroke: "currentColor"
21990
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22086
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21991
22087
  strokeLinecap: "round",
21992
22088
  strokeLinejoin: "round",
21993
22089
  strokeWidth: 2,
@@ -21995,35 +22091,35 @@ function SvgRefresh(props) {
21995
22091
  })));
21996
22092
  }
21997
22093
 
21998
- var _path$e;
22094
+ var _path$f;
21999
22095
 
22000
- 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); }
22096
+ 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); }
22001
22097
 
22002
22098
  function SvgCalendar(props) {
22003
- return /*#__PURE__*/React.createElement("svg", _extends$f({
22099
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
22004
22100
  xmlns: "http://www.w3.org/2000/svg",
22005
22101
  className: "plc-h-4 plc-w-4 plc-mr-1",
22006
22102
  viewBox: "0 0 20 20",
22007
22103
  fill: "currentColor"
22008
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22104
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
22009
22105
  fillRule: "evenodd",
22010
22106
  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",
22011
22107
  clipRule: "evenodd"
22012
22108
  })));
22013
22109
  }
22014
22110
 
22015
- var _path$d;
22111
+ var _path$e;
22016
22112
 
22017
- 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); }
22113
+ 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); }
22018
22114
 
22019
22115
  function SvgPlus(props) {
22020
- return /*#__PURE__*/React.createElement("svg", _extends$e({
22116
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
22021
22117
  className: "plc-w-5 plc-h-5",
22022
22118
  xmlns: "http://www.w3.org/2000/svg",
22023
22119
  fill: "none",
22024
22120
  viewBox: "0 0 24 24",
22025
22121
  stroke: "currentColor"
22026
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22122
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
22027
22123
  strokeLinecap: "round",
22028
22124
  strokeLinejoin: "round",
22029
22125
  strokeWidth: 2,
@@ -22031,17 +22127,17 @@ function SvgPlus(props) {
22031
22127
  })));
22032
22128
  }
22033
22129
 
22034
- var _path$c;
22130
+ var _path$d;
22035
22131
 
22036
- 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); }
22132
+ 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); }
22037
22133
 
22038
22134
  function SvgCheckMark(props) {
22039
- return /*#__PURE__*/React.createElement("svg", _extends$d({
22135
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
22040
22136
  className: "plc-w-4 plc-h-4 plc-mr-1",
22041
22137
  xmlns: "http://www.w3.org/2000/svg",
22042
22138
  viewBox: "0 0 20 20",
22043
22139
  fill: "currentColor"
22044
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22140
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
22045
22141
  fillRule: "evenodd",
22046
22142
  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",
22047
22143
  clipRule: "evenodd"
@@ -22105,7 +22201,8 @@ const SubscriptionsItems = ({
22105
22201
  } = useTranslation("dashboard");
22106
22202
  const {
22107
22203
  switchView,
22108
- isAuthenticated
22204
+ switchToAddressView,
22205
+ switchToPaymentView
22109
22206
  } = usePelcro();
22110
22207
  const subs = getNonDonationSubs();
22111
22208
  if (subs.length === 0) return null;
@@ -22147,7 +22244,12 @@ const SubscriptionsItems = ({
22147
22244
  const plan = window.Pelcro.plan.getById(plan_id);
22148
22245
  setProductAndPlan(product, plan);
22149
22246
  setSubscriptionIdToRenew(sub.id);
22150
- setView("plan-select");
22247
+
22248
+ if (product.address_required) {
22249
+ return switchToAddressView();
22250
+ }
22251
+
22252
+ return switchToPaymentView();
22151
22253
  };
22152
22254
 
22153
22255
  const getPhases = () => {
@@ -22336,18 +22438,18 @@ Accordion.item = function AccordionItem({
22336
22438
  }, content)) : null;
22337
22439
  };
22338
22440
 
22339
- var _path$b;
22441
+ var _path$c;
22340
22442
 
22341
- 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); }
22443
+ 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); }
22342
22444
 
22343
22445
  function SvgExit(props) {
22344
- return /*#__PURE__*/React.createElement("svg", _extends$c({
22446
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
22345
22447
  className: "plc-w-6 plc-h-6",
22346
22448
  xmlns: "http://www.w3.org/2000/svg",
22347
22449
  fill: "none",
22348
22450
  viewBox: "0 0 24 24",
22349
22451
  stroke: "currentColor"
22350
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22452
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
22351
22453
  strokeLinecap: "round",
22352
22454
  strokeLinejoin: "round",
22353
22455
  strokeWidth: 2,
@@ -22355,17 +22457,17 @@ function SvgExit(props) {
22355
22457
  })));
22356
22458
  }
22357
22459
 
22358
- var _path$a;
22460
+ var _path$b;
22359
22461
 
22360
- 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); }
22462
+ 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); }
22361
22463
 
22362
22464
  function SvgUser(props) {
22363
- return /*#__PURE__*/React.createElement("svg", _extends$b({
22465
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
22364
22466
  xmlns: "http://www.w3.org/2000/svg",
22365
22467
  fill: "none",
22366
22468
  viewBox: "0 0 24 24",
22367
22469
  stroke: "currentColor"
22368
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22470
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22369
22471
  strokeLinecap: "round",
22370
22472
  strokeLinejoin: "round",
22371
22473
  strokeWidth: 2,
@@ -22373,18 +22475,18 @@ function SvgUser(props) {
22373
22475
  })));
22374
22476
  }
22375
22477
 
22376
- var _path$9;
22478
+ var _path$a;
22377
22479
 
22378
- 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); }
22480
+ 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); }
22379
22481
 
22380
22482
  function SvgNewsletter(props) {
22381
- return /*#__PURE__*/React.createElement("svg", _extends$a({
22483
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
22382
22484
  xmlns: "http://www.w3.org/2000/svg",
22383
22485
  className: "plc-h-5 plc-w-5",
22384
22486
  fill: "none",
22385
22487
  viewBox: "0 0 24 24",
22386
22488
  stroke: "currentColor"
22387
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22489
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22388
22490
  strokeLinecap: "round",
22389
22491
  strokeLinejoin: "round",
22390
22492
  strokeWidth: 2,
@@ -22392,18 +22494,18 @@ function SvgNewsletter(props) {
22392
22494
  })));
22393
22495
  }
22394
22496
 
22395
- var _path$8;
22497
+ var _path$9;
22396
22498
 
22397
- 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); }
22499
+ 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); }
22398
22500
 
22399
22501
  function SvgDocument(props) {
22400
- return /*#__PURE__*/React.createElement("svg", _extends$9({
22502
+ return /*#__PURE__*/React.createElement("svg", _extends$a({
22401
22503
  xmlns: "http://www.w3.org/2000/svg",
22402
22504
  className: "plc-h-6 plc-w-6 plc-mr-2",
22403
22505
  fill: "none",
22404
22506
  viewBox: "0 0 24 24",
22405
22507
  stroke: "currentColor"
22406
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22508
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22407
22509
  strokeLinecap: "round",
22408
22510
  strokeLinejoin: "round",
22409
22511
  strokeWidth: 2,
@@ -22411,18 +22513,18 @@ function SvgDocument(props) {
22411
22513
  })));
22412
22514
  }
22413
22515
 
22414
- var _path$7;
22516
+ var _path$8;
22415
22517
 
22416
- 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); }
22518
+ 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); }
22417
22519
 
22418
22520
  function SvgPaymentCard(props) {
22419
- return /*#__PURE__*/React.createElement("svg", _extends$8({
22521
+ return /*#__PURE__*/React.createElement("svg", _extends$9({
22420
22522
  className: "plc-w-6 plc-h-6 plc-mr-2",
22421
22523
  xmlns: "http://www.w3.org/2000/svg",
22422
22524
  fill: "none",
22423
22525
  viewBox: "0 0 24 24",
22424
22526
  stroke: "currentColor"
22425
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22527
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22426
22528
  strokeLinecap: "round",
22427
22529
  strokeLinejoin: "round",
22428
22530
  strokeWidth: 2,
@@ -22430,18 +22532,18 @@ function SvgPaymentCard(props) {
22430
22532
  })));
22431
22533
  }
22432
22534
 
22433
- var _path$6, _path2$1;
22535
+ var _path$7, _path2$1;
22434
22536
 
22435
- 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); }
22537
+ 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); }
22436
22538
 
22437
22539
  function SvgLocationPin(props) {
22438
- return /*#__PURE__*/React.createElement("svg", _extends$7({
22540
+ return /*#__PURE__*/React.createElement("svg", _extends$8({
22439
22541
  className: "plc-w-6 plc-h-6 plc-mr-2",
22440
22542
  xmlns: "http://www.w3.org/2000/svg",
22441
22543
  fill: "none",
22442
22544
  viewBox: "0 0 24 24",
22443
22545
  stroke: "currentColor"
22444
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22546
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22445
22547
  strokeLinecap: "round",
22446
22548
  strokeLinejoin: "round",
22447
22549
  strokeWidth: 2,
@@ -22456,10 +22558,10 @@ function SvgLocationPin(props) {
22456
22558
 
22457
22559
  var _switch;
22458
22560
 
22459
- 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); }
22561
+ 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); }
22460
22562
 
22461
22563
  function SvgSubscription(props) {
22462
- return /*#__PURE__*/React.createElement("svg", _extends$6({
22564
+ return /*#__PURE__*/React.createElement("svg", _extends$7({
22463
22565
  xmlns: "http://www.w3.org/2000/svg",
22464
22566
  viewBox: "0 0 100 125",
22465
22567
  fill: "currentColor"
@@ -22474,18 +22576,18 @@ function SvgSubscription(props) {
22474
22576
  }))))));
22475
22577
  }
22476
22578
 
22477
- var _path$5;
22579
+ var _path$6;
22478
22580
 
22479
- 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); }
22581
+ 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); }
22480
22582
 
22481
22583
  function SvgShopping(props) {
22482
- return /*#__PURE__*/React.createElement("svg", _extends$5({
22584
+ return /*#__PURE__*/React.createElement("svg", _extends$6({
22483
22585
  className: "plc-w-6 plc-h-6 plc-mr-2",
22484
22586
  xmlns: "http://www.w3.org/2000/svg",
22485
22587
  fill: "none",
22486
22588
  viewBox: "0 0 24 24",
22487
22589
  stroke: "currentColor"
22488
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22590
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22489
22591
  strokeLinecap: "round",
22490
22592
  strokeLinejoin: "round",
22491
22593
  strokeWidth: 2,
@@ -22493,18 +22595,18 @@ function SvgShopping(props) {
22493
22595
  })));
22494
22596
  }
22495
22597
 
22496
- var _path$4;
22598
+ var _path$5;
22497
22599
 
22498
- 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); }
22600
+ 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); }
22499
22601
 
22500
22602
  function SvgBookmark(props) {
22501
- return /*#__PURE__*/React.createElement("svg", _extends$4({
22603
+ return /*#__PURE__*/React.createElement("svg", _extends$5({
22502
22604
  className: "plc-w-6 plc-h-6 plc-mr-2",
22503
22605
  xmlns: "http://www.w3.org/2000/svg",
22504
22606
  fill: "none",
22505
22607
  viewBox: "0 0 24 24",
22506
22608
  stroke: "currentColor"
22507
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22609
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22508
22610
  strokeLinecap: "round",
22509
22611
  strokeLinejoin: "round",
22510
22612
  strokeWidth: 2,
@@ -22512,33 +22614,33 @@ function SvgBookmark(props) {
22512
22614
  })));
22513
22615
  }
22514
22616
 
22515
- var _path$3;
22617
+ var _path$4;
22516
22618
 
22517
- 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); }
22619
+ 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); }
22518
22620
 
22519
22621
  function SvgKey(props) {
22520
- return /*#__PURE__*/React.createElement("svg", _extends$3({
22622
+ return /*#__PURE__*/React.createElement("svg", _extends$4({
22521
22623
  xmlns: "http://www.w3.org/2000/svg",
22522
22624
  viewBox: "0 0 20 20",
22523
22625
  fill: "currentColor"
22524
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22626
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22525
22627
  fillRule: "evenodd",
22526
22628
  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",
22527
22629
  clipRule: "evenodd"
22528
22630
  })));
22529
22631
  }
22530
22632
 
22531
- var _path$2;
22633
+ var _path$3;
22532
22634
 
22533
- 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); }
22635
+ 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); }
22534
22636
 
22535
22637
  function SvgDonate(props) {
22536
- return /*#__PURE__*/React.createElement("svg", _extends$2({
22638
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
22537
22639
  width: 24,
22538
22640
  height: 24,
22539
22641
  fill: "currentColor",
22540
22642
  xmlns: "http://www.w3.org/2000/svg"
22541
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
22643
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22542
22644
  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"
22543
22645
  })));
22544
22646
  }
@@ -22865,9 +22967,10 @@ class Dashboard extends Component {
22865
22967
  }) => {
22866
22968
  if (isGift) {
22867
22969
  this.props.setProductAndPlan(null, null, true);
22970
+ return this.props.setView("plan-select");
22868
22971
  }
22869
22972
 
22870
- return this.props.setView("plan-select");
22973
+ return this.props.setView("subscription-options");
22871
22974
  });
22872
22975
 
22873
22976
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -23335,7 +23438,7 @@ const DashboardOpenButton = () => {
23335
23438
  };
23336
23439
  DashboardOpenButton.viewId = "dashboard-open";
23337
23440
 
23338
- const initialState$2 = {
23441
+ const initialState$3 = {
23339
23442
  imageSrc: null,
23340
23443
  crop: {
23341
23444
  x: 0,
@@ -23349,10 +23452,10 @@ const initialState$2 = {
23349
23452
  content: ""
23350
23453
  }
23351
23454
  };
23352
- const store$2 = /*#__PURE__*/createContext(initialState$2);
23455
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
23353
23456
  const {
23354
- Provider: Provider$2
23355
- } = store$2;
23457
+ Provider: Provider$3
23458
+ } = store$3;
23356
23459
 
23357
23460
  const ProfilePicChangeContainer = ({
23358
23461
  style,
@@ -23486,21 +23589,21 @@ const ProfilePicChangeContainer = ({
23486
23589
  default:
23487
23590
  return state;
23488
23591
  }
23489
- }, initialState$2);
23592
+ }, initialState$3);
23490
23593
  return /*#__PURE__*/React__default.createElement("div", {
23491
23594
  style: { ...style
23492
23595
  },
23493
23596
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23494
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
23597
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
23495
23598
  value: {
23496
23599
  state,
23497
23600
  dispatch
23498
23601
  }
23499
23602
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23500
- store: store$2,
23603
+ store: store$3,
23501
23604
  key: i
23502
23605
  })) : /*#__PURE__*/React__default.cloneElement(children, {
23503
- store: store$2
23606
+ store: store$3
23504
23607
  })));
23505
23608
  };
23506
23609
  /**
@@ -23562,7 +23665,7 @@ const ProfilePicChangeButton = ({
23562
23665
  isSubmitting
23563
23666
  },
23564
23667
  dispatch
23565
- } = useContext(store$2);
23668
+ } = useContext(store$3);
23566
23669
  const {
23567
23670
  t
23568
23671
  } = useTranslation("userEdit");
@@ -24930,7 +25033,7 @@ const ProfilePicChangeCropper = ({
24930
25033
  zoom
24931
25034
  },
24932
25035
  dispatch
24933
- } = useContext(store$2);
25036
+ } = useContext(store$3);
24934
25037
  return /*#__PURE__*/React__default.createElement("div", {
24935
25038
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24936
25039
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -24972,7 +25075,7 @@ const ProfilePicChangeZoom = ({
24972
25075
  zoom
24973
25076
  },
24974
25077
  dispatch
24975
- } = useContext(store$2);
25078
+ } = useContext(store$3);
24976
25079
  const {
24977
25080
  t
24978
25081
  } = useTranslation("userEdit");
@@ -24995,18 +25098,18 @@ const ProfilePicChangeZoom = ({
24995
25098
  }, otherProps)));
24996
25099
  };
24997
25100
 
24998
- var _path$1;
25101
+ var _path$2;
24999
25102
 
25000
- 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); }
25103
+ 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); }
25001
25104
 
25002
25105
  function SvgPhotograph(props) {
25003
- return /*#__PURE__*/React.createElement("svg", _extends$1({
25106
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
25004
25107
  xmlns: "http://www.w3.org/2000/svg",
25005
25108
  className: "plc-h-6 plc-w-6",
25006
25109
  fill: "none",
25007
25110
  viewBox: "0 0 24 24",
25008
25111
  stroke: "currentColor"
25009
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25112
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
25010
25113
  strokeLinecap: "round",
25011
25114
  strokeLinejoin: "round",
25012
25115
  strokeWidth: 2,
@@ -25024,7 +25127,7 @@ const ProfilePicChangeSelectButton = ({
25024
25127
  state: {
25025
25128
  isSubmitting
25026
25129
  }
25027
- } = useContext(store$2);
25130
+ } = useContext(store$3);
25028
25131
  const {
25029
25132
  t
25030
25133
  } = useTranslation("userEdit");
@@ -25066,7 +25169,7 @@ const ProfilePicChangeRemoveButton = ({
25066
25169
  state: {
25067
25170
  isSubmitting
25068
25171
  }
25069
- } = useContext(store$2);
25172
+ } = useContext(store$3);
25070
25173
  const {
25071
25174
  t
25072
25175
  } = useTranslation("userEdit");
@@ -25089,7 +25192,7 @@ const ProfilePicChangeWrapper = () => {
25089
25192
  state: {
25090
25193
  imageSrc
25091
25194
  }
25092
- } = useContext(store$2);
25195
+ } = useContext(store$3);
25093
25196
  const {
25094
25197
  t
25095
25198
  } = useTranslation("userEdit");
@@ -25151,17 +25254,17 @@ function ProfilePicChangeModal({
25151
25254
  }
25152
25255
  ProfilePicChangeModal.viewId = "profile-picture";
25153
25256
 
25154
- const initialState$1 = {
25257
+ const initialState$2 = {
25155
25258
  isSubmitting: false,
25156
25259
  alert: {
25157
25260
  type: "error",
25158
25261
  content: ""
25159
25262
  }
25160
25263
  };
25161
- const store$1 = /*#__PURE__*/createContext(initialState$1);
25264
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
25162
25265
  const {
25163
- Provider: Provider$1
25164
- } = store$1;
25266
+ Provider: Provider$2
25267
+ } = store$2;
25165
25268
 
25166
25269
  const EmailVerifyContainer = ({
25167
25270
  style,
@@ -25224,21 +25327,21 @@ const EmailVerifyContainer = ({
25224
25327
  default:
25225
25328
  return state;
25226
25329
  }
25227
- }, initialState$1);
25330
+ }, initialState$2);
25228
25331
  return /*#__PURE__*/React__default.createElement("div", {
25229
25332
  style: { ...style
25230
25333
  },
25231
25334
  className: `pelcro-container pelcro-email-verify-container ${className}`
25232
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
25335
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
25233
25336
  value: {
25234
25337
  state,
25235
25338
  dispatch
25236
25339
  }
25237
25340
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25238
- store: store$1,
25341
+ store: store$2,
25239
25342
  key: i
25240
25343
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25241
- store: store$1
25344
+ store: store$2
25242
25345
  })));
25243
25346
  };
25244
25347
 
@@ -25252,7 +25355,7 @@ const EmailVerifyResendButton = ({
25252
25355
  state: {
25253
25356
  isSubmitting
25254
25357
  }
25255
- } = useContext(store$1);
25358
+ } = useContext(store$2);
25256
25359
  const {
25257
25360
  t
25258
25361
  } = useTranslation("verifyEmail");
@@ -25267,16 +25370,16 @@ const EmailVerifyResendButton = ({
25267
25370
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
25268
25371
  };
25269
25372
 
25270
- var _path, _path2;
25373
+ var _path$1, _path2;
25271
25374
 
25272
- 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); }
25375
+ 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); }
25273
25376
 
25274
25377
  function SvgEmailVerify(props) {
25275
- return /*#__PURE__*/React.createElement("svg", _extends({
25378
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
25276
25379
  className: "plc-w-6 plc-h-6",
25277
25380
  viewBox: "0 0 700 700",
25278
25381
  xmlns: "http://www.w3.org/2000/svg"
25279
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25382
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
25280
25383
  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"
25281
25384
  })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
25282
25385
  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"
@@ -25380,11 +25483,11 @@ const invoicePaymentSubmitButton = props => {
25380
25483
  return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
25381
25484
  };
25382
25485
 
25383
- const initialState = {};
25384
- const store = /*#__PURE__*/createContext(initialState);
25486
+ const initialState$1 = {};
25487
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
25385
25488
  const {
25386
- Provider
25387
- } = store;
25489
+ Provider: Provider$1
25490
+ } = store$1;
25388
25491
 
25389
25492
  const InvoiceDetailsContainer = ({
25390
25493
  style,
@@ -25405,21 +25508,21 @@ const InvoiceDetailsContainer = ({
25405
25508
  default:
25406
25509
  return state;
25407
25510
  }
25408
- }, initialState);
25511
+ }, initialState$1);
25409
25512
  return /*#__PURE__*/React__default.createElement("div", {
25410
25513
  style: { ...style
25411
25514
  },
25412
25515
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25413
- }, /*#__PURE__*/React__default.createElement(Provider, {
25516
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
25414
25517
  value: {
25415
25518
  state,
25416
25519
  dispatch
25417
25520
  }
25418
25521
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25419
- store,
25522
+ store: store$1,
25420
25523
  key: i
25421
25524
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25422
- store
25525
+ store: store$1
25423
25526
  })));
25424
25527
  };
25425
25528
 
@@ -25451,7 +25554,7 @@ const InvoiceDetailsPayButton = ({
25451
25554
  }) => {
25452
25555
  const {
25453
25556
  dispatch
25454
- } = useContext(store);
25557
+ } = useContext(store$1);
25455
25558
  const {
25456
25559
  t
25457
25560
  } = useTranslation("invoiceDetails");
@@ -25556,4 +25659,230 @@ const InvoiceDetailsModal = ({
25556
25659
  };
25557
25660
  InvoiceDetailsModal.viewId = "invoice-details";
25558
25661
 
25559
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };
25662
+ const initialState = {
25663
+ selectedOption: ""
25664
+ };
25665
+ const store = /*#__PURE__*/createContext(initialState);
25666
+ const {
25667
+ Provider
25668
+ } = store;
25669
+
25670
+ const SubscriptionOptionsContainer = ({
25671
+ style,
25672
+ className = "",
25673
+ onRenewSubSuccess = () => {},
25674
+ onNewSubSuccess = () => {},
25675
+ children,
25676
+ ...props
25677
+ }) => {
25678
+ const submit = ({
25679
+ selectedOption
25680
+ }, dispatch) => {
25681
+ if (selectedOption === "renew") return onRenewSubSuccess();
25682
+ if (selectedOption === "new") return onNewSubSuccess();
25683
+ };
25684
+
25685
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25686
+ switch (action.type) {
25687
+ case SWITCH_TO_NEW:
25688
+ return lib_7({ ...state,
25689
+ selectedOption: "new"
25690
+ });
25691
+
25692
+ case SWITCH_TO_RENEW:
25693
+ return lib_7({ ...state,
25694
+ selectedOption: "renew"
25695
+ });
25696
+
25697
+ case HANDLE_SUBMIT:
25698
+ return lib_4((state, dispatch) => submit(state));
25699
+
25700
+ default:
25701
+ return state;
25702
+ }
25703
+ }, initialState);
25704
+ return /*#__PURE__*/React__default.createElement("div", {
25705
+ style: { ...style
25706
+ },
25707
+ className: `pelcro-container pelcro-subscription-options-container ${className}`
25708
+ }, /*#__PURE__*/React__default.createElement(Provider, {
25709
+ value: {
25710
+ state,
25711
+ dispatch
25712
+ }
25713
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25714
+ store,
25715
+ key: i
25716
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
25717
+ store
25718
+ })));
25719
+ };
25720
+
25721
+ var _path;
25722
+
25723
+ 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); }
25724
+
25725
+ function SvgPlusCircle(props) {
25726
+ return /*#__PURE__*/React.createElement("svg", _extends({
25727
+ xmlns: "http://www.w3.org/2000/svg",
25728
+ className: "plc-h-6 plc-w-6",
25729
+ fill: "none",
25730
+ viewBox: "0 0 24 24",
25731
+ stroke: "currentColor",
25732
+ strokeWidth: 2
25733
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25734
+ strokeLinecap: "round",
25735
+ strokeLinejoin: "round",
25736
+ d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25737
+ })));
25738
+ }
25739
+
25740
+ const SubscriptionOptionsNewButton = ({
25741
+ name,
25742
+ onClick,
25743
+ ...otherProps
25744
+ }) => {
25745
+ const {
25746
+ dispatch,
25747
+ state: {
25748
+ selectedOption
25749
+ }
25750
+ } = useContext(store);
25751
+ const {
25752
+ t
25753
+ } = useTranslation("subscriptionOptions");
25754
+ const isChecked = selectedOption === "new";
25755
+ return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25756
+ className: "plc-hidden pelcro-new-sub-option",
25757
+ 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"}`,
25758
+ id: "pelcro-new-sub-option",
25759
+ name: "option",
25760
+ onChange: () => {
25761
+ dispatch({
25762
+ type: SWITCH_TO_NEW
25763
+ });
25764
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25765
+ },
25766
+ checked: isChecked
25767
+ }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default.createElement(SvgPlusCircle, {
25768
+ className: "plc-w-full plc-h-full plc-mr-0"
25769
+ }));
25770
+ };
25771
+
25772
+ const SubscriptionOptionsRenewButton = ({
25773
+ name,
25774
+ onClick,
25775
+ ...otherProps
25776
+ }) => {
25777
+ const {
25778
+ dispatch,
25779
+ state: {
25780
+ selectedOption
25781
+ }
25782
+ } = useContext(store);
25783
+ const {
25784
+ t
25785
+ } = useTranslation("subscriptionOptions");
25786
+ const isChecked = selectedOption === "renew";
25787
+ return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25788
+ className: "plc-hidden pelcro-renew-sub-option",
25789
+ 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"}`,
25790
+ id: "pelcro-renew-sub-option",
25791
+ name: "option",
25792
+ onChange: () => {
25793
+ dispatch({
25794
+ type: SWITCH_TO_RENEW
25795
+ });
25796
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25797
+ },
25798
+ checked: isChecked
25799
+ }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default.createElement(SvgRefresh, {
25800
+ className: "plc-w-full plc-h-full plc-mr-0"
25801
+ }));
25802
+ };
25803
+
25804
+ const SubscriptionOptionsSubmit = ({
25805
+ name,
25806
+ onClick,
25807
+ ...otherProps
25808
+ }) => {
25809
+ const {
25810
+ dispatch,
25811
+ state: {
25812
+ selectedOption
25813
+ }
25814
+ } = useContext(store);
25815
+ const {
25816
+ t
25817
+ } = useTranslation("subscriptionOptions");
25818
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
25819
+ onClick: () => {
25820
+ dispatch({
25821
+ type: HANDLE_SUBMIT
25822
+ });
25823
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25824
+ },
25825
+ disabled: !selectedOption
25826
+ }, otherProps), name !== null && name !== void 0 ? name : t("next"));
25827
+ };
25828
+
25829
+ const SubscriptionOptionsView = props => {
25830
+ const {
25831
+ t
25832
+ } = useTranslation("subscriptionOptions");
25833
+ return /*#__PURE__*/React__default.createElement("div", {
25834
+ id: "pelcro-subscription-options-view"
25835
+ }, /*#__PURE__*/React__default.createElement("div", {
25836
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25837
+ }, /*#__PURE__*/React__default.createElement("h4", {
25838
+ className: "plc-text-2xl plc-font-semibold"
25839
+ }, t("title")), /*#__PURE__*/React__default.createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default.createElement("form", {
25840
+ action: "javascript:void(0);",
25841
+ className: "plc-mt-2 pelcro-form"
25842
+ }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default.createElement("div", {
25843
+ className: "plc-flex plc-justify-between plc-items-center"
25844
+ }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default.createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default.createElement(SubscriptionOptionsSubmit, {
25845
+ role: "submit",
25846
+ className: "plc-mt-4 plc-w-full",
25847
+ name: t("next"),
25848
+ id: "pelcro-submit"
25849
+ }))));
25850
+ };
25851
+
25852
+ const SubscriptionOptionsModal = ({
25853
+ onDisplay,
25854
+ onClose,
25855
+ ...otherProps
25856
+ }) => {
25857
+ const {
25858
+ switchView,
25859
+ setProductsList
25860
+ } = usePelcro();
25861
+
25862
+ const onRenewSubSuccess = () => {
25863
+ var _otherProps$onRenewSu;
25864
+
25865
+ (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
25866
+ setProductsList(getRenewableProducts());
25867
+ switchView("_plan-select-renew");
25868
+ };
25869
+
25870
+ const onNewSubSuccess = () => {
25871
+ var _otherProps$onNewSubS;
25872
+
25873
+ (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
25874
+ switchView("plan-select");
25875
+ };
25876
+
25877
+ return /*#__PURE__*/React__default.createElement(Modal, {
25878
+ onDisplay: onDisplay,
25879
+ onClose: onClose,
25880
+ id: "pelcro-subscription-options-modal"
25881
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
25882
+ onNewSubSuccess: onNewSubSuccess,
25883
+ onRenewSubSuccess: onRenewSubSuccess
25884
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
25885
+ };
25886
+ SubscriptionOptionsModal.viewId = "subscription-options";
25887
+
25888
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, InvoiceDetailsContainer, InvoiceDetailsDownloadButton, InvoiceDetailsModal, InvoiceDetailsPayButton, InvoiceDetailsView, InvoicePaymentContainer, InvoicePaymentModal, InvoicePaymentView, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionOptionsContainer, SubscriptionOptionsModal, SubscriptionOptionsNewButton, SubscriptionOptionsRenewButton, SubscriptionOptionsSubmit, SubscriptionOptionsView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, invoicePaymentSubmitButton, notify, unauthenticatedButtons, usePelcro };