@pelcro/react-pelcro-js 3.1.0-beta.1 → 3.1.0-beta.2

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",
@@ -9172,7 +9258,7 @@ const PelcroModalController = ({
9172
9258
  type
9173
9259
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "dashboard-open"), React__default.Children.map(children, child => child).find(({
9174
9260
  type
9175
- }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-entitlements" && React__default.Children.map(children, child => child).find(({
9261
+ }) => (type === null || type === void 0 ? void 0 : type.viewId) === "notification"), view === "_plan-select-renew" && React__default.Children.map(children, child => child).find(({
9176
9262
  type
9177
9263
  }) => (type === null || type === void 0 ? void 0 : type.viewId) === "plan-select"), React__default.Children.map(children, child => child).find(({
9178
9264
  type
@@ -9453,8 +9539,10 @@ const LOAD_PAYMENT_METHODS = "LOAD_PAYMENT_METHODS";
9453
9539
  const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9454
9540
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9455
9541
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9542
+ const SWITCH_TO_RENEW = "SWITCH_TO_RENEW";
9543
+ const SWITCH_TO_NEW = "SWITCH_TO_NEW";
9456
9544
 
9457
- const initialState$h = {
9545
+ const initialState$i = {
9458
9546
  email: "",
9459
9547
  password: "",
9460
9548
  emailError: null,
@@ -9465,10 +9553,10 @@ const initialState$h = {
9465
9553
  content: ""
9466
9554
  }
9467
9555
  };
9468
- const store$h = /*#__PURE__*/createContext(initialState$h);
9556
+ const store$i = /*#__PURE__*/createContext(initialState$i);
9469
9557
  const {
9470
- Provider: Provider$h
9471
- } = store$h;
9558
+ Provider: Provider$i
9559
+ } = store$i;
9472
9560
 
9473
9561
  const LoginContainer = ({
9474
9562
  style,
@@ -9575,7 +9663,7 @@ const LoginContainer = ({
9575
9663
  });
9576
9664
 
9577
9665
  case RESET_LOGIN_FORM:
9578
- return initialState$h;
9666
+ return initialState$i;
9579
9667
 
9580
9668
  case DISABLE_LOGIN_BUTTON:
9581
9669
  return lib_7({ ...state,
@@ -9593,12 +9681,12 @@ const LoginContainer = ({
9593
9681
  default:
9594
9682
  return state;
9595
9683
  }
9596
- }, initialState$h);
9684
+ }, initialState$i);
9597
9685
  return /*#__PURE__*/React__default.createElement("div", {
9598
9686
  style: { ...style
9599
9687
  },
9600
9688
  className: `pelcro-container pelcro-login-container ${className}`
9601
- }, /*#__PURE__*/React__default.createElement(Provider$h, {
9689
+ }, /*#__PURE__*/React__default.createElement(Provider$i, {
9602
9690
  value: {
9603
9691
  state,
9604
9692
  dispatch
@@ -9606,12 +9694,12 @@ const LoginContainer = ({
9606
9694
  }, children.length ? children.map((child, i) => {
9607
9695
  if (child) {
9608
9696
  return /*#__PURE__*/React__default.cloneElement(child, {
9609
- store: store$h,
9697
+ store: store$i,
9610
9698
  key: i
9611
9699
  });
9612
9700
  }
9613
9701
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9614
- store: store$h
9702
+ store: store$i
9615
9703
  })));
9616
9704
  };
9617
9705
 
@@ -9856,7 +9944,7 @@ const LoginButton = ({
9856
9944
  buttonDisabled
9857
9945
  },
9858
9946
  dispatch
9859
- } = useContext(store$h);
9947
+ } = useContext(store$i);
9860
9948
  const {
9861
9949
  t
9862
9950
  } = useTranslation("login");
@@ -9877,23 +9965,23 @@ const LoginButton = ({
9877
9965
  };
9878
9966
 
9879
9967
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9880
- store: store$h
9968
+ store: store$i
9881
9969
  }, props));
9882
9970
 
9883
9971
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
9884
- store: store$h
9972
+ store: store$i
9885
9973
  }, props));
9886
9974
 
9887
- var _path$r;
9975
+ var _path$s;
9888
9976
 
9889
- 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); }
9977
+ 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); }
9890
9978
 
9891
9979
  function SvgCheck(props) {
9892
- return /*#__PURE__*/React.createElement("svg", _extends$t({
9980
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
9893
9981
  xmlns: "http://www.w3.org/2000/svg",
9894
9982
  fill: "currentColor",
9895
9983
  viewBox: "0 0 20 20"
9896
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
9984
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
9897
9985
  fillRule: "evenodd",
9898
9986
  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",
9899
9987
  clipRule: "evenodd"
@@ -9958,7 +10046,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9958
10046
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9959
10047
  facebookLoginRenderProps.FacebookLogin;
9960
10048
 
9961
- const initialState$g = {
10049
+ const initialState$h = {
9962
10050
  email: "",
9963
10051
  password: "",
9964
10052
  emailError: null,
@@ -9975,10 +10063,10 @@ const initialState$g = {
9975
10063
  content: ""
9976
10064
  }
9977
10065
  };
9978
- const store$g = /*#__PURE__*/createContext(initialState$g);
10066
+ const store$h = /*#__PURE__*/createContext(initialState$h);
9979
10067
  const {
9980
- Provider: Provider$g
9981
- } = store$g;
10068
+ Provider: Provider$h
10069
+ } = store$h;
9982
10070
 
9983
10071
  const RegisterContainer = ({
9984
10072
  style,
@@ -10161,7 +10249,7 @@ const RegisterContainer = ({
10161
10249
  });
10162
10250
 
10163
10251
  case RESET_LOGIN_FORM:
10164
- return initialState$g;
10252
+ return initialState$h;
10165
10253
 
10166
10254
  case DISABLE_REGISTRATION_BUTTON:
10167
10255
  return lib_7({ ...state,
@@ -10179,12 +10267,12 @@ const RegisterContainer = ({
10179
10267
  default:
10180
10268
  return state;
10181
10269
  }
10182
- }, initialState$g);
10270
+ }, initialState$h);
10183
10271
  return /*#__PURE__*/React__default.createElement("div", {
10184
10272
  style: { ...style
10185
10273
  },
10186
10274
  className: `pelcro-container pelcro-register-container ${className}`
10187
- }, /*#__PURE__*/React__default.createElement(Provider$g, {
10275
+ }, /*#__PURE__*/React__default.createElement(Provider$h, {
10188
10276
  value: {
10189
10277
  state,
10190
10278
  dispatch
@@ -10192,12 +10280,12 @@ const RegisterContainer = ({
10192
10280
  }, children.length ? children.map((child, i) => {
10193
10281
  if (child) {
10194
10282
  return /*#__PURE__*/React__default.cloneElement(child, {
10195
- store: store$g,
10283
+ store: store$h,
10196
10284
  key: i
10197
10285
  });
10198
10286
  }
10199
10287
  }) : /*#__PURE__*/React__default.cloneElement(children, {
10200
- store: store$g
10288
+ store: store$h
10201
10289
  })));
10202
10290
  };
10203
10291
  /**
@@ -10212,15 +10300,15 @@ function hasSecurityTokenEnabled$1() {
10212
10300
  return hasSecuritySdkLoaded;
10213
10301
  }
10214
10302
 
10215
- var _path$q;
10303
+ var _path$r;
10216
10304
 
10217
- 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); }
10305
+ 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); }
10218
10306
 
10219
10307
  function SvgFacebookLogo(props) {
10220
- return /*#__PURE__*/React.createElement("svg", _extends$s({
10308
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
10221
10309
  xmlns: "http://www.w3.org/2000/svg",
10222
10310
  viewBox: "88.428 12.828 107.543 207.085"
10223
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10311
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
10224
10312
  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",
10225
10313
  fill: "#3c5a9a"
10226
10314
  })));
@@ -10237,10 +10325,10 @@ const FacebookLoginButton = ({
10237
10325
  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;
10238
10326
  const {
10239
10327
  dispatch: loginDispatch
10240
- } = useContext(store$h);
10328
+ } = useContext(store$i);
10241
10329
  const {
10242
10330
  dispatch: registerDispatch
10243
- } = useContext(store$g);
10331
+ } = useContext(store$h);
10244
10332
 
10245
10333
  const onSuccess = facebookUser => {
10246
10334
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10293,15 +10381,15 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10293
10381
  unwrapExports(googleLogin);
10294
10382
  var googleLogin_1 = googleLogin.GoogleLogin;
10295
10383
 
10296
- var _path$p, _path2$3, _path3$1, _path4;
10384
+ var _path$q, _path2$3, _path3$1, _path4;
10297
10385
 
10298
- 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); }
10386
+ 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); }
10299
10387
 
10300
10388
  function SvgGoogleLogo(props) {
10301
- return /*#__PURE__*/React.createElement("svg", _extends$r({
10389
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
10302
10390
  viewBox: "0 0 24 24",
10303
10391
  xmlns: "http://www.w3.org/2000/svg"
10304
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10392
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
10305
10393
  fill: "#4285F4",
10306
10394
  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"
10307
10395
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
@@ -10327,10 +10415,10 @@ const GoogleLoginButton = ({
10327
10415
  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;
10328
10416
  const {
10329
10417
  dispatch: loginDispatch
10330
- } = useContext(store$h);
10418
+ } = useContext(store$i);
10331
10419
  const {
10332
10420
  dispatch: registerDispatch
10333
- } = useContext(store$g);
10421
+ } = useContext(store$h);
10334
10422
 
10335
10423
  const onSuccess = response => {
10336
10424
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10378,15 +10466,15 @@ const GoogleLoginButton = ({
10378
10466
  }) : null;
10379
10467
  };
10380
10468
 
10381
- var _path$o;
10469
+ var _path$p;
10382
10470
 
10383
- 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); }
10471
+ 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); }
10384
10472
 
10385
10473
  function SvgAuth0Logo(props) {
10386
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10474
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
10387
10475
  viewBox: "0 0 256 285",
10388
10476
  xmlns: "http://www.w3.org/2000/svg"
10389
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10477
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10390
10478
  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"
10391
10479
  })));
10392
10480
  }
@@ -10426,10 +10514,10 @@ const Auth0LoginButton = ({
10426
10514
  }, [auth0Enabled, auth0Loaded]);
10427
10515
  const {
10428
10516
  dispatch: loginDispatch
10429
- } = useContext(store$h);
10517
+ } = useContext(store$i);
10430
10518
  const {
10431
10519
  dispatch: registerDispatch
10432
- } = useContext(store$g);
10520
+ } = useContext(store$h);
10433
10521
 
10434
10522
  function handleClick() {
10435
10523
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -10562,15 +10650,15 @@ function LoginView(props) {
10562
10650
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10563
10651
  }
10564
10652
 
10565
- var _path$n, _path2$2, _path3;
10653
+ var _path$o, _path2$2, _path3;
10566
10654
 
10567
- 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); }
10655
+ 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); }
10568
10656
 
10569
10657
  function SvgPelcroAuthorship(props) {
10570
- return /*#__PURE__*/React.createElement("svg", _extends$p({
10658
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10571
10659
  xmlns: "http://www.w3.org/2000/svg",
10572
10660
  viewBox: "0 -80.652 497.072 179.991"
10573
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10661
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10574
10662
  fill: "none",
10575
10663
  stroke: "#4a4a4a",
10576
10664
  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"
@@ -10717,11 +10805,11 @@ function LoginModal({
10717
10805
  LoginModal.viewId = "login";
10718
10806
 
10719
10807
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10720
- store: store$g
10808
+ store: store$h
10721
10809
  }, props));
10722
10810
 
10723
10811
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10724
- store: store$g
10812
+ store: store$h
10725
10813
  }, props));
10726
10814
 
10727
10815
  const RegisterButton = ({
@@ -10741,7 +10829,7 @@ const RegisterButton = ({
10741
10829
  buttonDisabled
10742
10830
  },
10743
10831
  dispatch
10744
- } = useContext(store$g);
10832
+ } = useContext(store$h);
10745
10833
  const {
10746
10834
  t
10747
10835
  } = useTranslation("register");
@@ -10879,7 +10967,7 @@ function FirstName({
10879
10967
  }
10880
10968
 
10881
10969
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10882
- store: store$g
10970
+ store: store$h
10883
10971
  }, props));
10884
10972
 
10885
10973
  function LastName({
@@ -10910,7 +10998,7 @@ function LastName({
10910
10998
  }
10911
10999
 
10912
11000
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
10913
- store: store$g
11001
+ store: store$h
10914
11002
  }, props));
10915
11003
 
10916
11004
  /**
@@ -11034,7 +11122,7 @@ function TextInput({
11034
11122
 
11035
11123
  const RegisterTextInput = props => {
11036
11124
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
11037
- store: store$g
11125
+ store: store$h
11038
11126
  }));
11039
11127
  };
11040
11128
 
@@ -11181,6 +11269,7 @@ function SelectModalWithHook(props) {
11181
11269
  (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
11182
11270
  }, []);
11183
11271
  const {
11272
+ productsList,
11184
11273
  isGift,
11185
11274
  plan,
11186
11275
  product,
@@ -11190,11 +11279,12 @@ function SelectModalWithHook(props) {
11190
11279
  view,
11191
11280
  set
11192
11281
  } = usePelcro();
11193
- const entitlementsProtectedElements = document.querySelectorAll("[data-pelcro-entitlements]");
11194
- const entitlements = entitlementsProtectedElements.length > 0 ? getEntitlementsFromElem(entitlementsProtectedElements[0]) : null;
11282
+ const isRenewingSub = view === "_plan-select-renew";
11195
11283
  return /*#__PURE__*/React__default.createElement(SelectModalWithTrans, {
11284
+ productsList: productsList,
11196
11285
  isGift: isGift,
11197
- disableGifting: isRenewingGift,
11286
+ disableGifting: isRenewingGift || isRenewingSub,
11287
+ isRenewingSub: isRenewingSub,
11198
11288
  plan: plan,
11199
11289
  product: product,
11200
11290
  onClose: () => {
@@ -11208,8 +11298,10 @@ function SelectModalWithHook(props) {
11208
11298
  plan,
11209
11299
  isGift
11210
11300
  }),
11211
- setView: switchView,
11212
- matchingEntitlements: view === "_plan-select-entitlements" ? entitlements : null
11301
+ setSubscriptionIdToRenew: subscriptionIdToRenew => set({
11302
+ subscriptionIdToRenew
11303
+ }),
11304
+ setView: switchView
11213
11305
  });
11214
11306
  }
11215
11307
  SelectModalWithHook.viewId = "plan-select";
@@ -11241,10 +11333,10 @@ class SelectModal extends Component {
11241
11333
  });
11242
11334
  }
11243
11335
 
11244
- if (this.state.productList.length === 1) {
11336
+ if (this.props.productsList.length === 1) {
11245
11337
  this.setState({
11246
- product: this.state.productList[0],
11247
- planList: this.state.productList[0].plans,
11338
+ product: this.props.productsList[0],
11339
+ planList: this.props.productsList[0].plans,
11248
11340
  mode: "plan"
11249
11341
  });
11250
11342
  }
@@ -11261,7 +11353,7 @@ class SelectModal extends Component {
11261
11353
  });
11262
11354
 
11263
11355
  _defineProperty$3(this, "onProductChange", e => {
11264
- const product = window.Pelcro.product.list()[e.target.selectedIndex];
11356
+ const product = productsList[e.target.selectedIndex];
11265
11357
  this.setState({
11266
11358
  product: product,
11267
11359
  plan: product.plans[0]
@@ -11327,7 +11419,7 @@ class SelectModal extends Component {
11327
11419
 
11328
11420
  _defineProperty$3(this, "renderProducts", () => {
11329
11421
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11330
- const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11422
+ const productsToShow = userDidSelectProduct ? [this.state.product] : this.props.productsList;
11331
11423
  return productsToShow.map((product, index) => {
11332
11424
  return this.renderOneProduct(product, index);
11333
11425
  });
@@ -11340,7 +11432,7 @@ class SelectModal extends Component {
11340
11432
  return this.renderOneProduct(this.state.product);
11341
11433
  }
11342
11434
 
11343
- const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11435
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(this.props.productsList); // Render normal products if there are no available matching products
11344
11436
 
11345
11437
  if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11346
11438
  return this.renderProducts();
@@ -11356,10 +11448,7 @@ class SelectModal extends Component {
11356
11448
  className: "plc-text-sm plc-font-semibold"
11357
11449
  }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11358
11450
 
11359
- function productsWithMatchedTaggedFirst() {
11360
- var _window$Pelcro$produc;
11361
-
11362
- const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11451
+ function productsWithMatchedTaggedFirst(allProducts) {
11363
11452
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11364
11453
  const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11365
11454
  return [productsThatMatchArticleTag, allProductsMinusMatched];
@@ -11393,7 +11482,7 @@ class SelectModal extends Component {
11393
11482
  _defineProperty$3(this, "selectProduct", e => {
11394
11483
  const id = e.target.dataset.key;
11395
11484
 
11396
- for (const product of this.state.productList) {
11485
+ for (const product of this.props.productsList) {
11397
11486
  if (+product.id === +id) {
11398
11487
  var _this$state$plan;
11399
11488
 
@@ -11446,6 +11535,14 @@ class SelectModal extends Component {
11446
11535
 
11447
11536
  _defineProperty$3(this, "submitOption", () => {
11448
11537
  this.props.setProductAndPlan(this.state.product, this.state.plan, this.state.isGift);
11538
+
11539
+ if (this.props.isRenewingSub) {
11540
+ var _matchingSub$id;
11541
+
11542
+ const matchingSub = window.Pelcro.subscription.list().find(sub => sub.plan.id === this.state.plan.id && sub.status === "active" && sub.cancel_at_period_end === 1);
11543
+ this.props.setSubscriptionIdToRenew((_matchingSub$id = matchingSub === null || matchingSub === void 0 ? void 0 : matchingSub.id) !== null && _matchingSub$id !== void 0 ? _matchingSub$id : null);
11544
+ }
11545
+
11449
11546
  const {
11450
11547
  product,
11451
11548
  isGift
@@ -11483,8 +11580,7 @@ class SelectModal extends Component {
11483
11580
  plan: {},
11484
11581
  isGift: props.isGift,
11485
11582
  disabled: true,
11486
- mode: "product",
11487
- productList: props.matchingEntitlements ? window.Pelcro.product.getByEntitlements(props.matchingEntitlements) : window.Pelcro.product.list()
11583
+ mode: "product"
11488
11584
  };
11489
11585
  this.product = this.props.product || window.Pelcro.paywall.getProduct();
11490
11586
  this.locale = this.props.t;
@@ -11492,7 +11588,7 @@ class SelectModal extends Component {
11492
11588
  }
11493
11589
 
11494
11590
  render() {
11495
- var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11591
+ var _this$props$productsL, _this$props$productsL2, _window$Pelcro$site$r;
11496
11592
 
11497
11593
  const {
11498
11594
  disableGifting
@@ -11526,7 +11622,7 @@ class SelectModal extends Component {
11526
11622
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11527
11623
  }, /*#__PURE__*/React__default.createElement("h4", {
11528
11624
  className: "plc-text-2xl plc-font-semibold"
11529
- }, 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", {
11625
+ }, 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", {
11530
11626
  className: "pelcro-select-products-wrapper"
11531
11627
  }, (_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", {
11532
11628
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
@@ -13101,7 +13197,7 @@ class PaypalGateWay {
13101
13197
 
13102
13198
  /** @type {PaymentStateType} */
13103
13199
 
13104
- const initialState$f = {
13200
+ const initialState$g = {
13105
13201
  disableSubmit: false,
13106
13202
  isLoading: false,
13107
13203
  disableCouponButton: false,
@@ -13120,10 +13216,10 @@ const initialState$f = {
13120
13216
  content: ""
13121
13217
  }
13122
13218
  };
13123
- const store$f = /*#__PURE__*/createContext(initialState$f);
13219
+ const store$g = /*#__PURE__*/createContext(initialState$g);
13124
13220
  const {
13125
- Provider: Provider$f
13126
- } = store$f;
13221
+ Provider: Provider$g
13222
+ } = store$g;
13127
13223
 
13128
13224
  const PaymentMethodContainerWithoutStripe = ({
13129
13225
  style,
@@ -14163,21 +14259,21 @@ const PaymentMethodContainerWithoutStripe = ({
14163
14259
  default:
14164
14260
  return state;
14165
14261
  }
14166
- }, initialState$f);
14262
+ }, initialState$g);
14167
14263
  return /*#__PURE__*/React__default.createElement("div", {
14168
14264
  style: { ...style
14169
14265
  },
14170
14266
  className: `pelcro-container pelcro-payment-container ${className}`
14171
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
14267
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
14172
14268
  value: {
14173
14269
  state,
14174
14270
  dispatch
14175
14271
  }
14176
14272
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
14177
- store: store$f,
14273
+ store: store$g,
14178
14274
  key: i
14179
14275
  })) : /*#__PURE__*/React__default.cloneElement(children, {
14180
- store: store$f
14276
+ store: store$g
14181
14277
  })));
14182
14278
  };
14183
14279
 
@@ -14199,7 +14295,7 @@ const PaymentMethodContainer = props => {
14199
14295
  stripeAccount: window.Pelcro.site.read().account_id,
14200
14296
  locale: getPageOrDefaultLanguage()
14201
14297
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
14202
- store: store$f
14298
+ store: store$g
14203
14299
  }, props))));
14204
14300
  }
14205
14301
 
@@ -14252,7 +14348,7 @@ const PelcroPaymentRequestButton = props => {
14252
14348
  currentPlan,
14253
14349
  updatedPrice
14254
14350
  }
14255
- } = useContext(store$f);
14351
+ } = useContext(store$g);
14256
14352
 
14257
14353
  const updatePaymentRequest = () => {
14258
14354
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -14312,7 +14408,7 @@ const DiscountedPrice = props => {
14312
14408
  taxAmount,
14313
14409
  percentOff
14314
14410
  }
14315
- } = useContext(store$f);
14411
+ } = useContext(store$g);
14316
14412
  const {
14317
14413
  order,
14318
14414
  plan
@@ -14362,7 +14458,7 @@ const SubmitPaymentMethod = ({
14362
14458
  isLoading,
14363
14459
  updatedPrice
14364
14460
  }
14365
- } = useContext(store$f);
14461
+ } = useContext(store$g);
14366
14462
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14367
14463
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14368
14464
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14383,17 +14479,17 @@ const SubmitPaymentMethod = ({
14383
14479
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14384
14480
  };
14385
14481
 
14386
- var _path$m;
14482
+ var _path$n;
14387
14483
 
14388
- 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); }
14484
+ 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); }
14389
14485
 
14390
14486
  function SvgArrowLeft(props) {
14391
- return /*#__PURE__*/React.createElement("svg", _extends$o({
14487
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
14392
14488
  xmlns: "http://www.w3.org/2000/svg",
14393
14489
  fill: "none",
14394
14490
  viewBox: "0 0 24 24",
14395
14491
  stroke: "currentColor"
14396
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14492
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
14397
14493
  strokeLinecap: "round",
14398
14494
  strokeLinejoin: "round",
14399
14495
  strokeWidth: 2,
@@ -14412,7 +14508,7 @@ const ApplyCouponButton = ({
14412
14508
  disableCouponButton
14413
14509
  },
14414
14510
  dispatch
14415
- } = useContext(store$f);
14511
+ } = useContext(store$g);
14416
14512
  const {
14417
14513
  t
14418
14514
  } = useTranslation("checkoutForm");
@@ -14446,7 +14542,7 @@ const CouponCodeField = props => {
14446
14542
  couponCode,
14447
14543
  couponError
14448
14544
  }
14449
- } = useContext(store$f);
14545
+ } = useContext(store$g);
14450
14546
 
14451
14547
  const onCouponCodeChange = e => {
14452
14548
  dispatch({
@@ -14475,17 +14571,17 @@ const CouponCodeField = props => {
14475
14571
  }, props));
14476
14572
  };
14477
14573
 
14478
- var _path$l;
14574
+ var _path$m;
14479
14575
 
14480
- 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); }
14576
+ 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); }
14481
14577
 
14482
14578
  function SvgTicket(props) {
14483
- return /*#__PURE__*/React.createElement("svg", _extends$n({
14579
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
14484
14580
  xmlns: "http://www.w3.org/2000/svg",
14485
14581
  fill: "none",
14486
14582
  viewBox: "0 0 24 24",
14487
14583
  stroke: "currentColor"
14488
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14584
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
14489
14585
  strokeLinecap: "round",
14490
14586
  strokeLinejoin: "round",
14491
14587
  strokeWidth: 2,
@@ -14502,7 +14598,7 @@ const CouponCode = ({
14502
14598
  state: {
14503
14599
  enableCouponField
14504
14600
  }
14505
- } = useContext(store$f);
14601
+ } = useContext(store$g);
14506
14602
  const {
14507
14603
  t
14508
14604
  } = useTranslation("checkoutForm");
@@ -14759,7 +14855,7 @@ const PaypalSubscribeButton = props => {
14759
14855
  const {
14760
14856
  dispatch,
14761
14857
  state
14762
- } = useContext(store$f);
14858
+ } = useContext(store$g);
14763
14859
  const {
14764
14860
  product,
14765
14861
  plan,
@@ -14845,16 +14941,16 @@ const BankRedirection = () => {
14845
14941
  }));
14846
14942
  };
14847
14943
 
14848
- var _path$k;
14944
+ var _path$l;
14849
14945
 
14850
- 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); }
14946
+ 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); }
14851
14947
 
14852
14948
  function SvgLock(props) {
14853
- return /*#__PURE__*/React.createElement("svg", _extends$m({
14949
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
14854
14950
  xmlns: "http://www.w3.org/2000/svg",
14855
14951
  viewBox: "0 0 20 20",
14856
14952
  fill: "currentColor"
14857
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14953
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
14858
14954
  fillRule: "evenodd",
14859
14955
  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",
14860
14956
  clipRule: "evenodd"
@@ -14871,7 +14967,7 @@ const SelectedPaymentMethod = () => {
14871
14967
  state: {
14872
14968
  isLoading
14873
14969
  }
14874
- } = useContext(store$f);
14970
+ } = useContext(store$g);
14875
14971
  const {
14876
14972
  switchView,
14877
14973
  selectedPaymentMethodId
@@ -14913,7 +15009,7 @@ const TaxAmount = () => {
14913
15009
  state: {
14914
15010
  taxAmount
14915
15011
  }
14916
- } = useContext(store$f);
15012
+ } = useContext(store$g);
14917
15013
  const {
14918
15014
  plan
14919
15015
  } = usePelcro();
@@ -15076,12 +15172,12 @@ function SubscriptionRenewModal({
15076
15172
  }
15077
15173
  SubscriptionRenewModal.viewId = "subscription-renew";
15078
15174
 
15079
- var _path$j;
15175
+ var _path$k;
15080
15176
 
15081
- 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); }
15177
+ 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); }
15082
15178
 
15083
15179
  function SvgGift(props) {
15084
- return /*#__PURE__*/React.createElement("svg", _extends$l({
15180
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
15085
15181
  className: "plc-w-6 plc-h-6 plc-mr-2",
15086
15182
  fill: "none",
15087
15183
  stroke: "currentColor",
@@ -15090,7 +15186,7 @@ function SvgGift(props) {
15090
15186
  strokeWidth: 2,
15091
15187
  viewBox: "0 0 24 24",
15092
15188
  xmlns: "http://www.w3.org/2000/svg"
15093
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
15189
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
15094
15190
  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"
15095
15191
  })));
15096
15192
  }
@@ -15431,7 +15527,7 @@ class DefaultNewsLetter extends Component {
15431
15527
 
15432
15528
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15433
15529
 
15434
- const initialState$e = {
15530
+ const initialState$f = {
15435
15531
  didSubToNewslettersBefore: false,
15436
15532
  newsletters: [],
15437
15533
  isListLoading: true,
@@ -15441,10 +15537,10 @@ const initialState$e = {
15441
15537
  content: ""
15442
15538
  }
15443
15539
  };
15444
- const store$e = /*#__PURE__*/createContext(initialState$e);
15540
+ const store$f = /*#__PURE__*/createContext(initialState$f);
15445
15541
  const {
15446
- Provider: Provider$e
15447
- } = store$e;
15542
+ Provider: Provider$f
15543
+ } = store$f;
15448
15544
 
15449
15545
  const NewsletterUpdateContainer = ({
15450
15546
  style,
@@ -15557,7 +15653,7 @@ const NewsletterUpdateContainer = ({
15557
15653
  default:
15558
15654
  return state;
15559
15655
  }
15560
- }, initialState$e);
15656
+ }, initialState$f);
15561
15657
  useEffect(() => {
15562
15658
  const getUserNewsletters = () => {
15563
15659
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15601,7 +15697,7 @@ const NewsletterUpdateContainer = ({
15601
15697
  style: { ...style
15602
15698
  },
15603
15699
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15604
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
15700
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
15605
15701
  value: {
15606
15702
  state,
15607
15703
  dispatch
@@ -15609,12 +15705,12 @@ const NewsletterUpdateContainer = ({
15609
15705
  }, children.length ? children.map((child, i) => {
15610
15706
  if (child) {
15611
15707
  return /*#__PURE__*/React__default.cloneElement(child, {
15612
- store: store$e,
15708
+ store: store$f,
15613
15709
  key: i
15614
15710
  });
15615
15711
  }
15616
15712
  }) : /*#__PURE__*/React__default.cloneElement(children, {
15617
- store: store$e
15713
+ store: store$f
15618
15714
  })));
15619
15715
  };
15620
15716
 
@@ -15629,7 +15725,7 @@ const NewsletterUpdateButton = ({
15629
15725
  isSubmitting,
15630
15726
  isListLoading
15631
15727
  }
15632
- } = useContext(store$e);
15728
+ } = useContext(store$f);
15633
15729
  const {
15634
15730
  t
15635
15731
  } = useTranslation("newsletter");
@@ -15659,7 +15755,7 @@ const NewsletterUpdateList = () => {
15659
15755
  newsletters,
15660
15756
  isListLoading
15661
15757
  }
15662
- } = useContext(store$e);
15758
+ } = useContext(store$f);
15663
15759
 
15664
15760
  if (isListLoading) {
15665
15761
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -15863,7 +15959,7 @@ function SubscriptionCreateModal({
15863
15959
  SubscriptionCreateModal.viewId = "subscription-create";
15864
15960
 
15865
15961
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15866
- const initialState$d = {
15962
+ const initialState$e = {
15867
15963
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15868
15964
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15869
15965
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15876,10 +15972,10 @@ const initialState$d = {
15876
15972
  content: ""
15877
15973
  }
15878
15974
  };
15879
- const store$d = /*#__PURE__*/createContext(initialState$d);
15975
+ const store$e = /*#__PURE__*/createContext(initialState$e);
15880
15976
  const {
15881
- Provider: Provider$d
15882
- } = store$d;
15977
+ Provider: Provider$e
15978
+ } = store$e;
15883
15979
 
15884
15980
  const UserUpdateContainer = ({
15885
15981
  style,
@@ -16011,27 +16107,27 @@ const UserUpdateContainer = ({
16011
16107
  default:
16012
16108
  return state;
16013
16109
  }
16014
- }, initialState$d);
16110
+ }, initialState$e);
16015
16111
  return /*#__PURE__*/React__default.createElement("div", {
16016
16112
  style: { ...style
16017
16113
  },
16018
16114
  className: `pelcro-container pelcro-user-update-container ${className}`
16019
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
16115
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
16020
16116
  value: {
16021
16117
  state,
16022
16118
  dispatch
16023
16119
  }
16024
16120
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16025
- store: store$d,
16121
+ store: store$e,
16026
16122
  key: i
16027
16123
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16028
- store: store$d
16124
+ store: store$e
16029
16125
  })));
16030
16126
  };
16031
16127
 
16032
16128
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
16033
16129
  disabled: true,
16034
- store: store$d
16130
+ store: store$e
16035
16131
  }, props));
16036
16132
 
16037
16133
  const UserUpdateButton = ({
@@ -16044,7 +16140,7 @@ const UserUpdateButton = ({
16044
16140
  buttonDisabled
16045
16141
  },
16046
16142
  dispatch
16047
- } = useContext(store$d);
16143
+ } = useContext(store$e);
16048
16144
  const {
16049
16145
  t
16050
16146
  } = useTranslation("userEdit");
@@ -16061,11 +16157,11 @@ const UserUpdateButton = ({
16061
16157
  };
16062
16158
 
16063
16159
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
16064
- store: store$d
16160
+ store: store$e
16065
16161
  }, props));
16066
16162
 
16067
16163
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
16068
- store: store$d
16164
+ store: store$e
16069
16165
  }, props));
16070
16166
 
16071
16167
  function Phone({
@@ -16094,22 +16190,22 @@ function Phone({
16094
16190
  }
16095
16191
 
16096
16192
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
16097
- store: store$d
16193
+ store: store$e
16098
16194
  }, props));
16099
16195
 
16100
16196
  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";
16101
16197
 
16102
- var _path$i;
16198
+ var _path$j;
16103
16199
 
16104
- 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); }
16200
+ 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); }
16105
16201
 
16106
16202
  function SvgEdit(props) {
16107
- return /*#__PURE__*/React.createElement("svg", _extends$k({
16203
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
16108
16204
  className: "plc-w-6 plc-h-6",
16109
16205
  xmlns: "http://www.w3.org/2000/svg",
16110
16206
  viewBox: "0 0 20 20",
16111
16207
  fill: "currentColor"
16112
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
16208
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
16113
16209
  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"
16114
16210
  })));
16115
16211
  }
@@ -16241,16 +16337,16 @@ function DisplayName({
16241
16337
  }
16242
16338
 
16243
16339
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
16244
- store: store$d
16340
+ store: store$e
16245
16341
  }, props));
16246
16342
 
16247
16343
  const UserUpdateTextInput = props => {
16248
16344
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16249
- store: store$d
16345
+ store: store$e
16250
16346
  }));
16251
16347
  };
16252
16348
 
16253
- const initialState$c = {
16349
+ const initialState$d = {
16254
16350
  isSubmitting: false,
16255
16351
  firstName: "",
16256
16352
  firstNameError: "",
@@ -16275,10 +16371,10 @@ const initialState$c = {
16275
16371
  content: ""
16276
16372
  }
16277
16373
  };
16278
- const store$c = /*#__PURE__*/createContext(initialState$c);
16374
+ const store$d = /*#__PURE__*/createContext(initialState$d);
16279
16375
  const {
16280
- Provider: Provider$c
16281
- } = store$c;
16376
+ Provider: Provider$d
16377
+ } = store$d;
16282
16378
 
16283
16379
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
16284
16380
 
@@ -16485,7 +16581,7 @@ const AddressCreateContainer = ({
16485
16581
  default:
16486
16582
  return state;
16487
16583
  }
16488
- }, initialState$c);
16584
+ }, initialState$d);
16489
16585
  useEffect(() => {
16490
16586
  const getStates = () => {
16491
16587
  dispatch({
@@ -16517,16 +16613,16 @@ const AddressCreateContainer = ({
16517
16613
  style: { ...style
16518
16614
  },
16519
16615
  className: `pelcro-container pelcro-address-create-container ${className}`
16520
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
16616
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
16521
16617
  value: {
16522
16618
  state,
16523
16619
  dispatch
16524
16620
  }
16525
16621
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16526
- store: store$c,
16622
+ store: store$d,
16527
16623
  key: i
16528
16624
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16529
- store: store$c
16625
+ store: store$d
16530
16626
  })));
16531
16627
  };
16532
16628
 
@@ -16537,7 +16633,7 @@ function AddressCreateFirstName(props) {
16537
16633
  firstName,
16538
16634
  firstNameError
16539
16635
  }
16540
- } = useContext(store$c);
16636
+ } = useContext(store$d);
16541
16637
 
16542
16638
  const handleBlur = () => {
16543
16639
  return dispatch({
@@ -16580,7 +16676,7 @@ function AddressCreateLastName(props) {
16580
16676
  lastName,
16581
16677
  lastNameError
16582
16678
  }
16583
- } = useContext(store$c);
16679
+ } = useContext(store$d);
16584
16680
 
16585
16681
  const handleBlur = () => {
16586
16682
  return dispatch({
@@ -16623,7 +16719,7 @@ function AddressCreateLine1(props) {
16623
16719
  line1,
16624
16720
  line1Error
16625
16721
  }
16626
- } = useContext(store$c);
16722
+ } = useContext(store$d);
16627
16723
 
16628
16724
  const handleBlur = () => {
16629
16725
  return dispatch({
@@ -16666,7 +16762,7 @@ function AddressCreateCity(props) {
16666
16762
  city,
16667
16763
  cityError
16668
16764
  }
16669
- } = useContext(store$c);
16765
+ } = useContext(store$d);
16670
16766
 
16671
16767
  const handleBlur = () => {
16672
16768
  return dispatch({
@@ -16709,7 +16805,7 @@ function AddressCreatePostalCode(props) {
16709
16805
  postalCode,
16710
16806
  postalCodeError
16711
16807
  }
16712
- } = useContext(store$c);
16808
+ } = useContext(store$d);
16713
16809
 
16714
16810
  const handleBlur = () => {
16715
16811
  return dispatch({
@@ -16755,7 +16851,7 @@ const AddressCreateSubmit = ({
16755
16851
  state: {
16756
16852
  isSubmitting
16757
16853
  }
16758
- } = useContext(store$c);
16854
+ } = useContext(store$d);
16759
16855
  const {
16760
16856
  t
16761
16857
  } = useTranslation("address");
@@ -16866,7 +16962,7 @@ function CountrySelect({
16866
16962
  }
16867
16963
 
16868
16964
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
16869
- store: store$c
16965
+ store: store$d
16870
16966
  }, props));
16871
16967
 
16872
16968
  function StateSelect({
@@ -16954,7 +17050,7 @@ function StateSelect({
16954
17050
  }
16955
17051
 
16956
17052
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
16957
- store: store$c
17053
+ store: store$d
16958
17054
  }, props));
16959
17055
 
16960
17056
  const AddressCreateView = props => {
@@ -17059,18 +17155,18 @@ AddressCreateModal.viewId = "address-create";
17059
17155
 
17060
17156
  const AddressCreateTextInput = props => {
17061
17157
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17062
- store: store$c
17158
+ store: store$d
17063
17159
  }));
17064
17160
  };
17065
17161
 
17066
17162
  const AddressCreateLine2 = props => {
17067
17163
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17068
17164
  fieldName: "line2",
17069
- store: store$c
17165
+ store: store$d
17070
17166
  }, props));
17071
17167
  };
17072
17168
 
17073
- const initialState$b = {
17169
+ const initialState$c = {
17074
17170
  isSubmitting: false,
17075
17171
  firstName: "",
17076
17172
  firstNameError: "",
@@ -17095,10 +17191,10 @@ const initialState$b = {
17095
17191
  content: ""
17096
17192
  }
17097
17193
  };
17098
- const store$b = /*#__PURE__*/createContext(initialState$b);
17194
+ const store$c = /*#__PURE__*/createContext(initialState$c);
17099
17195
  const {
17100
- Provider: Provider$b
17101
- } = store$b;
17196
+ Provider: Provider$c
17197
+ } = store$c;
17102
17198
 
17103
17199
  const AddressUpdateContainer = ({
17104
17200
  style,
@@ -17150,7 +17246,7 @@ const AddressUpdateContainer = ({
17150
17246
  const thisAddress = addresses[address];
17151
17247
 
17152
17248
  if (+thisAddress.id === +addressId) {
17153
- const newState = { ...initialState$b,
17249
+ const newState = { ...initialState$c,
17154
17250
  firstName: thisAddress.first_name,
17155
17251
  lastName: thisAddress.last_name,
17156
17252
  line1: thisAddress.line1,
@@ -17283,7 +17379,7 @@ const AddressUpdateContainer = ({
17283
17379
  default:
17284
17380
  return state;
17285
17381
  }
17286
- }, initialState$b);
17382
+ }, initialState$c);
17287
17383
  useEffect(() => {
17288
17384
  const getStates = () => {
17289
17385
  dispatch({
@@ -17315,21 +17411,21 @@ const AddressUpdateContainer = ({
17315
17411
  style: { ...style
17316
17412
  },
17317
17413
  className: `pelcro-container pelcro-address-update-container ${className}`
17318
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
17414
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
17319
17415
  value: {
17320
17416
  state,
17321
17417
  dispatch
17322
17418
  }
17323
17419
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17324
- store: store$b,
17420
+ store: store$c,
17325
17421
  key: i
17326
17422
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17327
- store: store$b
17423
+ store: store$c
17328
17424
  })));
17329
17425
  };
17330
17426
 
17331
17427
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
17332
- store: store$b
17428
+ store: store$c
17333
17429
  }, props));
17334
17430
 
17335
17431
  function AddressUpdateFirstName(props) {
@@ -17339,7 +17435,7 @@ function AddressUpdateFirstName(props) {
17339
17435
  firstName,
17340
17436
  firstNameError
17341
17437
  }
17342
- } = useContext(store$b);
17438
+ } = useContext(store$c);
17343
17439
 
17344
17440
  const handleBlur = () => {
17345
17441
  return dispatch({
@@ -17382,7 +17478,7 @@ function AddressUpdateLastName(props) {
17382
17478
  lastName,
17383
17479
  lastNameError
17384
17480
  }
17385
- } = useContext(store$b);
17481
+ } = useContext(store$c);
17386
17482
 
17387
17483
  const handleBlur = () => {
17388
17484
  return dispatch({
@@ -17425,7 +17521,7 @@ function AddressUpdateLine1(props) {
17425
17521
  line1,
17426
17522
  line1Error
17427
17523
  }
17428
- } = useContext(store$b);
17524
+ } = useContext(store$c);
17429
17525
 
17430
17526
  const handleBlur = () => {
17431
17527
  return dispatch({
@@ -17465,7 +17561,7 @@ const AddressUpdateLine2 = props => {
17465
17561
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17466
17562
  fieldName: "line2"
17467
17563
  }, props, {
17468
- store: store$b
17564
+ store: store$c
17469
17565
  }));
17470
17566
  };
17471
17567
 
@@ -17476,7 +17572,7 @@ function AddressUpdateCity(props) {
17476
17572
  city,
17477
17573
  cityError
17478
17574
  }
17479
- } = useContext(store$b);
17575
+ } = useContext(store$c);
17480
17576
 
17481
17577
  const handleBlur = () => {
17482
17578
  return dispatch({
@@ -17519,7 +17615,7 @@ function AddressUpdatePostalCode(props) {
17519
17615
  postalCode,
17520
17616
  postalCodeError
17521
17617
  }
17522
- } = useContext(store$b);
17618
+ } = useContext(store$c);
17523
17619
 
17524
17620
  const handleBlur = () => {
17525
17621
  return dispatch({
@@ -17565,7 +17661,7 @@ const AddressUpdateSubmit = ({
17565
17661
  state: {
17566
17662
  isSubmitting
17567
17663
  }
17568
- } = useContext(store$b);
17664
+ } = useContext(store$c);
17569
17665
  const {
17570
17666
  t
17571
17667
  } = useTranslation("address");
@@ -17581,7 +17677,7 @@ const AddressUpdateSubmit = ({
17581
17677
  };
17582
17678
 
17583
17679
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17584
- store: store$b
17680
+ store: store$c
17585
17681
  }, props));
17586
17682
 
17587
17683
  const AddressUpdateView = props => {
@@ -17664,7 +17760,7 @@ AddressUpdateModal.viewId = "address-edit";
17664
17760
 
17665
17761
  const AddressUpdateTextInput = props => {
17666
17762
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17667
- store: store$b
17763
+ store: store$c
17668
17764
  }));
17669
17765
  };
17670
17766
 
@@ -17747,7 +17843,7 @@ const PaymentMethodUpdateModal = props => {
17747
17843
  };
17748
17844
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17749
17845
 
17750
- const initialState$a = {
17846
+ const initialState$b = {
17751
17847
  email: "",
17752
17848
  password: "",
17753
17849
  passwordError: null,
@@ -17760,10 +17856,10 @@ const initialState$a = {
17760
17856
  content: ""
17761
17857
  }
17762
17858
  };
17763
- const store$a = /*#__PURE__*/createContext(initialState$a);
17859
+ const store$b = /*#__PURE__*/createContext(initialState$b);
17764
17860
  const {
17765
- Provider: Provider$a
17766
- } = store$a;
17861
+ Provider: Provider$b
17862
+ } = store$b;
17767
17863
 
17768
17864
  const PasswordResetContainer = ({
17769
17865
  style,
@@ -17820,7 +17916,7 @@ const PasswordResetContainer = ({
17820
17916
  type: SET_EMAIL,
17821
17917
  payload: window.Pelcro.helpers.getURLParameter("email")
17822
17918
  });
17823
- initialState$a.email = window.Pelcro.helpers.getURLParameter("email");
17919
+ initialState$b.email = window.Pelcro.helpers.getURLParameter("email");
17824
17920
  dispatch({
17825
17921
  type: SET_TOKEN,
17826
17922
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17880,26 +17976,26 @@ const PasswordResetContainer = ({
17880
17976
  default:
17881
17977
  return state;
17882
17978
  }
17883
- }, initialState$a);
17979
+ }, initialState$b);
17884
17980
  return /*#__PURE__*/React__default.createElement("div", {
17885
17981
  style: { ...style
17886
17982
  },
17887
17983
  className: `pelcro-container pelcro-password-reset-container ${className}`
17888
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
17984
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
17889
17985
  value: {
17890
17986
  state,
17891
17987
  dispatch
17892
17988
  }
17893
17989
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17894
- store: store$a,
17990
+ store: store$b,
17895
17991
  key: i
17896
17992
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17897
- store: store$a
17993
+ store: store$b
17898
17994
  })));
17899
17995
  };
17900
17996
 
17901
17997
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
17902
- store: store$a
17998
+ store: store$b
17903
17999
  }, props));
17904
18000
 
17905
18001
  const PasswordResetButton = ({
@@ -17912,7 +18008,7 @@ const PasswordResetButton = ({
17912
18008
  buttonDisabled
17913
18009
  },
17914
18010
  dispatch
17915
- } = useContext(store$a);
18011
+ } = useContext(store$b);
17916
18012
  const {
17917
18013
  t
17918
18014
  } = useTranslation("passwordReset");
@@ -17929,14 +18025,14 @@ const PasswordResetButton = ({
17929
18025
  };
17930
18026
 
17931
18027
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17932
- store: store$a
18028
+ store: store$b
17933
18029
  }, props, {
17934
18030
  value: window.Pelcro.helpers.getURLParameter("email"),
17935
18031
  disabled: true
17936
18032
  }));
17937
18033
 
17938
18034
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
17939
- store: store$a
18035
+ store: store$b
17940
18036
  }, props));
17941
18037
 
17942
18038
  const PasswordResetView = props => {
@@ -17988,7 +18084,7 @@ const PasswordResetModal = ({
17988
18084
  };
17989
18085
  PasswordResetModal.viewId = "password-reset";
17990
18086
 
17991
- const initialState$9 = {
18087
+ const initialState$a = {
17992
18088
  email: "",
17993
18089
  emailError: null,
17994
18090
  buttonDisabled: false,
@@ -17997,10 +18093,10 @@ const initialState$9 = {
17997
18093
  content: ""
17998
18094
  }
17999
18095
  };
18000
- const store$9 = /*#__PURE__*/createContext(initialState$9);
18096
+ const store$a = /*#__PURE__*/createContext(initialState$a);
18001
18097
  const {
18002
- Provider: Provider$9
18003
- } = store$9;
18098
+ Provider: Provider$a
18099
+ } = store$a;
18004
18100
 
18005
18101
  const PasswordForgotContainer = ({
18006
18102
  style,
@@ -18078,21 +18174,21 @@ const PasswordForgotContainer = ({
18078
18174
  default:
18079
18175
  return state;
18080
18176
  }
18081
- }, initialState$9);
18177
+ }, initialState$a);
18082
18178
  return /*#__PURE__*/React__default.createElement("div", {
18083
18179
  style: { ...style
18084
18180
  },
18085
18181
  className: `pelcro-container pelcro-password-forgot-container ${className}`
18086
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
18182
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
18087
18183
  value: {
18088
18184
  state,
18089
18185
  dispatch
18090
18186
  }
18091
18187
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18092
- store: store$9,
18188
+ store: store$a,
18093
18189
  key: i
18094
18190
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18095
- store: store$9
18191
+ store: store$a
18096
18192
  })));
18097
18193
  };
18098
18194
 
@@ -18108,7 +18204,7 @@ const PasswordForgotButton = ({
18108
18204
  emailError
18109
18205
  },
18110
18206
  dispatch
18111
- } = useContext(store$9);
18207
+ } = useContext(store$a);
18112
18208
  const {
18113
18209
  t
18114
18210
  } = useTranslation("passwordForgot");
@@ -18129,7 +18225,7 @@ const PasswordForgotButton = ({
18129
18225
  };
18130
18226
 
18131
18227
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18132
- store: store$9
18228
+ store: store$a
18133
18229
  }, props));
18134
18230
 
18135
18231
  const PasswordForgotView = props => {
@@ -18179,7 +18275,7 @@ const PasswordForgotModal = ({
18179
18275
  };
18180
18276
  PasswordForgotModal.viewId = "password-forgot";
18181
18277
 
18182
- const initialState$8 = {
18278
+ const initialState$9 = {
18183
18279
  currentPassword: "",
18184
18280
  newPassword: "",
18185
18281
  confirmNewPassword: "",
@@ -18193,10 +18289,10 @@ const initialState$8 = {
18193
18289
  content: ""
18194
18290
  }
18195
18291
  };
18196
- const store$8 = /*#__PURE__*/createContext(initialState$8);
18292
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
18197
18293
  const {
18198
- Provider: Provider$8
18199
- } = store$8;
18294
+ Provider: Provider$9
18295
+ } = store$9;
18200
18296
  const PasswordChangeContainer = ({
18201
18297
  style,
18202
18298
  className = "",
@@ -18348,21 +18444,21 @@ const PasswordChangeContainer = ({
18348
18444
  default:
18349
18445
  return state;
18350
18446
  }
18351
- }, initialState$8);
18447
+ }, initialState$9);
18352
18448
  return /*#__PURE__*/React__default.createElement("div", {
18353
18449
  style: { ...style
18354
18450
  },
18355
18451
  className: `pelcro-container pelcro-password-change-container ${className}`
18356
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
18452
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
18357
18453
  value: {
18358
18454
  state,
18359
18455
  dispatch
18360
18456
  }
18361
18457
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18362
- store: store$8,
18458
+ store: store$9,
18363
18459
  key: i
18364
18460
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18365
- store: store$8
18461
+ store: store$9
18366
18462
  })));
18367
18463
  };
18368
18464
 
@@ -18373,7 +18469,7 @@ function PasswordChangeCurrentPassword(props) {
18373
18469
  currentPassword,
18374
18470
  currentPasswordError
18375
18471
  }
18376
- } = useContext(store$8);
18472
+ } = useContext(store$9);
18377
18473
  const handleBlur = useCallback(() => {
18378
18474
  return dispatch({
18379
18475
  type: VALIDATE_PASSWORD
@@ -18407,7 +18503,7 @@ function PasswordChangeNewPassword(props) {
18407
18503
  newPassword,
18408
18504
  newPasswordError
18409
18505
  }
18410
- } = useContext(store$8);
18506
+ } = useContext(store$9);
18411
18507
  const handleBlur = useCallback(() => {
18412
18508
  return dispatch({
18413
18509
  type: VALIDATE_NEW_PASSWORD
@@ -18441,7 +18537,7 @@ function PasswordChangeConfirmNewPassword(props) {
18441
18537
  confirmNewPassword,
18442
18538
  confirmNewPasswordError
18443
18539
  }
18444
- } = useContext(store$8);
18540
+ } = useContext(store$9);
18445
18541
  const handleBlur = useCallback(() => {
18446
18542
  return dispatch({
18447
18543
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18482,7 +18578,7 @@ const PasswordChangeButton = ({
18482
18578
  confirmNewPasswordError
18483
18579
  },
18484
18580
  dispatch
18485
- } = useContext(store$8);
18581
+ } = useContext(store$9);
18486
18582
  const {
18487
18583
  t
18488
18584
  } = useTranslation("passwordChange");
@@ -18548,17 +18644,17 @@ const PasswordChangeModal = ({
18548
18644
  };
18549
18645
  PasswordChangeModal.viewId = "password-change";
18550
18646
 
18551
- const initialState$7 = {
18647
+ const initialState$8 = {
18552
18648
  buttonDisabled: false,
18553
18649
  alert: {
18554
18650
  type: "error",
18555
18651
  content: ""
18556
18652
  }
18557
18653
  };
18558
- const store$7 = /*#__PURE__*/createContext(initialState$7);
18654
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
18559
18655
  const {
18560
- Provider: Provider$7
18561
- } = store$7;
18656
+ Provider: Provider$8
18657
+ } = store$8;
18562
18658
 
18563
18659
  const CartContainer = ({
18564
18660
  style,
@@ -18649,21 +18745,21 @@ const CartContainer = ({
18649
18745
  default:
18650
18746
  return state;
18651
18747
  }
18652
- }, initialState$7);
18748
+ }, initialState$8);
18653
18749
  return /*#__PURE__*/React__default.createElement("div", {
18654
18750
  style: { ...style
18655
18751
  },
18656
18752
  className: `pelcro-container pelcro-cart-container ${className}`
18657
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
18753
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
18658
18754
  value: {
18659
18755
  state,
18660
18756
  dispatch
18661
18757
  }
18662
18758
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18663
- store: store$7,
18759
+ store: store$8,
18664
18760
  key: i
18665
18761
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18666
- store: store$7
18762
+ store: store$8
18667
18763
  })));
18668
18764
  };
18669
18765
 
@@ -18700,7 +18796,7 @@ const CartSubmit = ({
18700
18796
  buttonDisabled
18701
18797
  },
18702
18798
  dispatch
18703
- } = useContext(store$7);
18799
+ } = useContext(store$8);
18704
18800
  const {
18705
18801
  t
18706
18802
  } = useTranslation("cart");
@@ -18731,7 +18827,7 @@ const CartTotalPrice = () => {
18731
18827
  state: {
18732
18828
  alert
18733
18829
  }
18734
- } = useContext(store$7);
18830
+ } = useContext(store$8);
18735
18831
  const {
18736
18832
  cartItems
18737
18833
  } = usePelcro();
@@ -19044,7 +19140,7 @@ const OrderConfirmModal = props => {
19044
19140
  };
19045
19141
  OrderConfirmModal.viewId = "order-confirm";
19046
19142
 
19047
- const initialState$6 = {
19143
+ const initialState$7 = {
19048
19144
  email: "",
19049
19145
  firstName: "",
19050
19146
  lastName: "",
@@ -19056,10 +19152,10 @@ const initialState$6 = {
19056
19152
  content: ""
19057
19153
  }
19058
19154
  };
19059
- const store$6 = /*#__PURE__*/createContext(initialState$6);
19155
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
19060
19156
  const {
19061
- Provider: Provider$6
19062
- } = store$6;
19157
+ Provider: Provider$7
19158
+ } = store$7;
19063
19159
 
19064
19160
  const GiftCreateContainer = ({
19065
19161
  style,
@@ -19163,21 +19259,21 @@ const GiftCreateContainer = ({
19163
19259
  default:
19164
19260
  return state;
19165
19261
  }
19166
- }, initialState$6);
19262
+ }, initialState$7);
19167
19263
  return /*#__PURE__*/React__default.createElement("div", {
19168
19264
  style: { ...style
19169
19265
  },
19170
19266
  className: `pelcro-container pelcro-gift-create-container ${className}`
19171
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
19267
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
19172
19268
  value: {
19173
19269
  state,
19174
19270
  dispatch
19175
19271
  }
19176
19272
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19177
- store: store$6,
19273
+ store: store$7,
19178
19274
  key: i
19179
19275
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19180
- store: store$6
19276
+ store: store$7
19181
19277
  })));
19182
19278
  };
19183
19279
 
@@ -19191,7 +19287,7 @@ const GiftCreateSubmitButton = ({
19191
19287
  state: {
19192
19288
  disableSubmit
19193
19289
  }
19194
- } = useContext(store$6);
19290
+ } = useContext(store$7);
19195
19291
  const {
19196
19292
  t
19197
19293
  } = useTranslation("register");
@@ -19208,29 +19304,29 @@ const GiftCreateSubmitButton = ({
19208
19304
 
19209
19305
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
19210
19306
  initWithUserEmail: false,
19211
- store: store$6
19307
+ store: store$7
19212
19308
  }, props));
19213
19309
 
19214
19310
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
19215
- store: store$6
19311
+ store: store$7
19216
19312
  }, props));
19217
19313
 
19218
19314
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
19219
- store: store$6
19315
+ store: store$7
19220
19316
  }, props));
19221
19317
 
19222
- var _path$h;
19318
+ var _path$i;
19223
19319
 
19224
- 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); }
19320
+ 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); }
19225
19321
 
19226
19322
  function SvgInfoCircle(props) {
19227
- return /*#__PURE__*/React.createElement("svg", _extends$j({
19323
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
19228
19324
  xmlns: "http://www.w3.org/2000/svg",
19229
19325
  className: "plc-w-5 plc-h-5",
19230
19326
  fill: "none",
19231
19327
  viewBox: "0 0 24 24",
19232
19328
  stroke: "currentColor"
19233
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
19329
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
19234
19330
  strokeLinecap: "round",
19235
19331
  strokeLinejoin: "round",
19236
19332
  strokeWidth: 2,
@@ -19301,7 +19397,7 @@ const GiftCreateStartDate = props => {
19301
19397
  const {
19302
19398
  dispatch,
19303
19399
  state
19304
- } = useContext(store$6);
19400
+ } = useContext(store$7);
19305
19401
 
19306
19402
  const handleInputChange = value => {
19307
19403
  dispatch({
@@ -19374,7 +19470,7 @@ function GiftCreateMessage(props) {
19374
19470
  const {
19375
19471
  dispatch,
19376
19472
  state
19377
- } = useContext(store$6);
19473
+ } = useContext(store$7);
19378
19474
  const MAX_CHARS_COUNT = 200;
19379
19475
  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;
19380
19476
 
@@ -19498,7 +19594,7 @@ const GiftCreateModal = ({
19498
19594
  };
19499
19595
  GiftCreateModal.viewId = "gift-create";
19500
19596
 
19501
- const initialState$5 = {
19597
+ const initialState$6 = {
19502
19598
  giftCode: "",
19503
19599
  buttonDisabled: true,
19504
19600
  alert: {
@@ -19506,10 +19602,10 @@ const initialState$5 = {
19506
19602
  content: ""
19507
19603
  }
19508
19604
  };
19509
- const store$5 = /*#__PURE__*/createContext(initialState$5);
19605
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
19510
19606
  const {
19511
- Provider: Provider$5
19512
- } = store$5;
19607
+ Provider: Provider$6
19608
+ } = store$6;
19513
19609
 
19514
19610
  const GiftRedeemContainer = ({
19515
19611
  style,
@@ -19574,21 +19670,21 @@ const GiftRedeemContainer = ({
19574
19670
  default:
19575
19671
  return state;
19576
19672
  }
19577
- }, initialState$5);
19673
+ }, initialState$6);
19578
19674
  return /*#__PURE__*/React__default.createElement("div", {
19579
19675
  style: { ...style
19580
19676
  },
19581
19677
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19582
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
19678
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
19583
19679
  value: {
19584
19680
  state,
19585
19681
  dispatch
19586
19682
  }
19587
19683
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19588
- store: store$5,
19684
+ store: store$6,
19589
19685
  key: i
19590
19686
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19591
- store: store$5
19687
+ store: store$6
19592
19688
  })));
19593
19689
  };
19594
19690
 
@@ -19625,7 +19721,7 @@ function GiftCode({
19625
19721
  }
19626
19722
 
19627
19723
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
19628
- store: store$5
19724
+ store: store$6
19629
19725
  }, props));
19630
19726
 
19631
19727
  const GiftRedeemSubmitButton = ({
@@ -19638,7 +19734,7 @@ const GiftRedeemSubmitButton = ({
19638
19734
  state: {
19639
19735
  disableSubmit
19640
19736
  }
19641
- } = useContext(store$5);
19737
+ } = useContext(store$6);
19642
19738
  const {
19643
19739
  t
19644
19740
  } = useTranslation("register");
@@ -19731,7 +19827,7 @@ const moveDefaultAddressToStart = addresses => {
19731
19827
  return [defaultAddress, ...addressesWithoutDefault];
19732
19828
  };
19733
19829
 
19734
- const initialState$4 = {
19830
+ const initialState$5 = {
19735
19831
  addresses: [],
19736
19832
  selectedAddressId: null,
19737
19833
  isSubmitting: false,
@@ -19740,10 +19836,10 @@ const initialState$4 = {
19740
19836
  content: ""
19741
19837
  }
19742
19838
  };
19743
- const store$4 = /*#__PURE__*/createContext(initialState$4);
19839
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
19744
19840
  const {
19745
- Provider: Provider$4
19746
- } = store$4;
19841
+ Provider: Provider$5
19842
+ } = store$5;
19747
19843
 
19748
19844
  const AddressSelectContainer = ({
19749
19845
  style,
@@ -19838,7 +19934,7 @@ const AddressSelectContainer = ({
19838
19934
  default:
19839
19935
  return state;
19840
19936
  }
19841
- }, initialState$4);
19937
+ }, initialState$5);
19842
19938
  useEffect(() => {
19843
19939
  var _window$Pelcro$user$r;
19844
19940
 
@@ -19851,16 +19947,16 @@ const AddressSelectContainer = ({
19851
19947
  style: { ...style
19852
19948
  },
19853
19949
  className: `pelcro-container pelcro-address-select-container ${className}`
19854
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
19950
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
19855
19951
  value: {
19856
19952
  state,
19857
19953
  dispatch
19858
19954
  }
19859
19955
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19860
- store: store$4,
19956
+ store: store$5,
19861
19957
  key: i
19862
19958
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19863
- store: store$4
19959
+ store: store$5
19864
19960
  })));
19865
19961
  };
19866
19962
 
@@ -19871,7 +19967,7 @@ const AddressSelectList = () => {
19871
19967
  addresses,
19872
19968
  selectedAddressId
19873
19969
  }
19874
- } = useContext(store$4);
19970
+ } = useContext(store$5);
19875
19971
 
19876
19972
  const handleAddressSelect = event => {
19877
19973
  dispatch({
@@ -19915,7 +20011,7 @@ const AddressSelectSubmit = ({
19915
20011
  selectedAddressId,
19916
20012
  isSubmitting
19917
20013
  }
19918
- } = useContext(store$4);
20014
+ } = useContext(store$5);
19919
20015
  const {
19920
20016
  t
19921
20017
  } = useTranslation("address");
@@ -20011,7 +20107,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
20011
20107
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
20012
20108
  };
20013
20109
 
20014
- const initialState$3 = {
20110
+ const initialState$4 = {
20015
20111
  paymentMethods: [],
20016
20112
  selectedPaymentMethodId: null,
20017
20113
  isSubmitting: false,
@@ -20020,10 +20116,10 @@ const initialState$3 = {
20020
20116
  content: ""
20021
20117
  }
20022
20118
  };
20023
- const store$3 = /*#__PURE__*/createContext(initialState$3);
20119
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
20024
20120
  const {
20025
- Provider: Provider$3
20026
- } = store$3;
20121
+ Provider: Provider$4
20122
+ } = store$4;
20027
20123
 
20028
20124
  const PaymentMethodSelectContainer = ({
20029
20125
  style,
@@ -20068,7 +20164,7 @@ const PaymentMethodSelectContainer = ({
20068
20164
  default:
20069
20165
  return state;
20070
20166
  }
20071
- }, initialState$3);
20167
+ }, initialState$4);
20072
20168
  useEffect(() => {
20073
20169
  var _window$Pelcro$user$r4;
20074
20170
 
@@ -20081,16 +20177,16 @@ const PaymentMethodSelectContainer = ({
20081
20177
  style: { ...style
20082
20178
  },
20083
20179
  className: `pelcro-container pelcro-payment-select-container ${className}`
20084
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
20180
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
20085
20181
  value: {
20086
20182
  state,
20087
20183
  dispatch
20088
20184
  }
20089
20185
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
20090
- store: store$3,
20186
+ store: store$4,
20091
20187
  key: i
20092
20188
  })) : /*#__PURE__*/React__default.cloneElement(children, {
20093
- store: store$3
20189
+ store: store$4
20094
20190
  })));
20095
20191
  };
20096
20192
 
@@ -20104,7 +20200,7 @@ const PaymentMethodSelectList = () => {
20104
20200
  paymentMethods,
20105
20201
  selectedPaymentMethodId
20106
20202
  }
20107
- } = useContext(store$3);
20203
+ } = useContext(store$4);
20108
20204
 
20109
20205
  const handlePaymentMethodSelect = event => {
20110
20206
  dispatch({
@@ -20154,7 +20250,7 @@ const PaymentMethodSelectSubmit = ({
20154
20250
  selectedPaymentMethodId,
20155
20251
  isSubmitting
20156
20252
  }
20157
- } = useContext(store$3);
20253
+ } = useContext(store$4);
20158
20254
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
20159
20255
  onClick: () => {
20160
20256
  dispatch({
@@ -20228,8 +20324,8 @@ const PaymentMethodSelectModal = ({
20228
20324
  };
20229
20325
  PaymentMethodSelectModal.viewId = "payment-method-select";
20230
20326
 
20231
- function _extends$i() {
20232
- _extends$i = Object.assign || function (target) {
20327
+ function _extends$j() {
20328
+ _extends$j = Object.assign || function (target) {
20233
20329
  for (var i = 1; i < arguments.length; i++) {
20234
20330
  var source = arguments[i];
20235
20331
 
@@ -20243,7 +20339,7 @@ function _extends$i() {
20243
20339
  return target;
20244
20340
  };
20245
20341
 
20246
- return _extends$i.apply(this, arguments);
20342
+ return _extends$j.apply(this, arguments);
20247
20343
  }
20248
20344
 
20249
20345
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20427,7 +20523,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20427
20523
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20428
20524
  return null;
20429
20525
  }, _match[RenderStrategy.Hidden] = function () {
20430
- return _render(_extends$i({}, _rest, {
20526
+ return _render(_extends$j({}, _rest, {
20431
20527
  hidden: true,
20432
20528
  style: {
20433
20529
  display: 'none'
@@ -20955,7 +21051,7 @@ function TransitionChild(props) {
20955
21051
  var passthroughProps = rest;
20956
21052
  return React__default.createElement(NestingContext.Provider, {
20957
21053
  value: nesting
20958
- }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
21054
+ }, render(_extends$j({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20959
21055
  }
20960
21056
 
20961
21057
  function Transition(props) {
@@ -20999,7 +21095,7 @@ function Transition(props) {
20999
21095
  value: nestingBag
21000
21096
  }, React__default.createElement(TransitionContext.Provider, {
21001
21097
  value: transitionBag
21002
- }, render(_extends$i({}, sharedProps, {
21098
+ }, render(_extends$j({}, sharedProps, {
21003
21099
  as: Fragment,
21004
21100
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
21005
21101
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -21126,12 +21222,12 @@ var ActionTypes;
21126
21222
  })(ActionTypes || (ActionTypes = {}));
21127
21223
 
21128
21224
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
21129
- return _extends$i({}, state, {
21225
+ return _extends$j({}, state, {
21130
21226
  activeItemIndex: null,
21131
21227
  menuState: MenuStates.Closed
21132
21228
  });
21133
21229
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
21134
- return _extends$i({}, state, {
21230
+ return _extends$j({}, state, {
21135
21231
  menuState: MenuStates.Open
21136
21232
  });
21137
21233
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -21150,7 +21246,7 @@ var ActionTypes;
21150
21246
  }
21151
21247
  });
21152
21248
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
21153
- return _extends$i({}, state, {
21249
+ return _extends$j({}, state, {
21154
21250
  searchQuery: '',
21155
21251
  activeItemIndex: activeItemIndex
21156
21252
  });
@@ -21161,19 +21257,19 @@ var ActionTypes;
21161
21257
 
21162
21258
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
21163
21259
  });
21164
- if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
21260
+ if (match === -1 || match === state.activeItemIndex) return _extends$j({}, state, {
21165
21261
  searchQuery: searchQuery
21166
21262
  });
21167
- return _extends$i({}, state, {
21263
+ return _extends$j({}, state, {
21168
21264
  searchQuery: searchQuery,
21169
21265
  activeItemIndex: match
21170
21266
  });
21171
21267
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
21172
- return _extends$i({}, state, {
21268
+ return _extends$j({}, state, {
21173
21269
  searchQuery: ''
21174
21270
  });
21175
21271
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
21176
- return _extends$i({}, state, {
21272
+ return _extends$j({}, state, {
21177
21273
  items: [].concat(state.items, [{
21178
21274
  id: action.id,
21179
21275
  dataRef: action.dataRef
@@ -21186,7 +21282,7 @@ var ActionTypes;
21186
21282
  return a.id === action.id;
21187
21283
  });
21188
21284
  if (idx !== -1) nextItems.splice(idx, 1);
21189
- return _extends$i({}, state, {
21285
+ return _extends$j({}, state, {
21190
21286
  items: nextItems,
21191
21287
  activeItemIndex: function () {
21192
21288
  if (idx === state.activeItemIndex) return null;
@@ -21225,19 +21321,19 @@ var ActionTypes$1;
21225
21321
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
21226
21322
  if (state.disabled) return state;
21227
21323
  if (state.listboxState === ListboxStates.Closed) return state;
21228
- return _extends$i({}, state, {
21324
+ return _extends$j({}, state, {
21229
21325
  activeOptionIndex: null,
21230
21326
  listboxState: ListboxStates.Closed
21231
21327
  });
21232
21328
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
21233
21329
  if (state.disabled) return state;
21234
21330
  if (state.listboxState === ListboxStates.Open) return state;
21235
- return _extends$i({}, state, {
21331
+ return _extends$j({}, state, {
21236
21332
  listboxState: ListboxStates.Open
21237
21333
  });
21238
21334
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
21239
21335
  if (state.disabled === action.disabled) return state;
21240
- return _extends$i({}, state, {
21336
+ return _extends$j({}, state, {
21241
21337
  disabled: action.disabled
21242
21338
  });
21243
21339
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -21258,7 +21354,7 @@ var ActionTypes$1;
21258
21354
  }
21259
21355
  });
21260
21356
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
21261
- return _extends$i({}, state, {
21357
+ return _extends$j({}, state, {
21262
21358
  searchQuery: '',
21263
21359
  activeOptionIndex: activeOptionIndex
21264
21360
  });
@@ -21271,10 +21367,10 @@ var ActionTypes$1;
21271
21367
 
21272
21368
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
21273
21369
  });
21274
- if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
21370
+ if (match === -1 || match === state.activeOptionIndex) return _extends$j({}, state, {
21275
21371
  searchQuery: searchQuery
21276
21372
  });
21277
- return _extends$i({}, state, {
21373
+ return _extends$j({}, state, {
21278
21374
  searchQuery: searchQuery,
21279
21375
  activeOptionIndex: match
21280
21376
  });
@@ -21282,11 +21378,11 @@ var ActionTypes$1;
21282
21378
  if (state.disabled) return state;
21283
21379
  if (state.listboxState === ListboxStates.Closed) return state;
21284
21380
  if (state.searchQuery === '') return state;
21285
- return _extends$i({}, state, {
21381
+ return _extends$j({}, state, {
21286
21382
  searchQuery: ''
21287
21383
  });
21288
21384
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
21289
- return _extends$i({}, state, {
21385
+ return _extends$j({}, state, {
21290
21386
  options: [].concat(state.options, [{
21291
21387
  id: action.id,
21292
21388
  dataRef: action.dataRef
@@ -21299,7 +21395,7 @@ var ActionTypes$1;
21299
21395
  return a.id === action.id;
21300
21396
  });
21301
21397
  if (idx !== -1) nextOptions.splice(idx, 1);
21302
- return _extends$i({}, state, {
21398
+ return _extends$j({}, state, {
21303
21399
  options: nextOptions,
21304
21400
  activeOptionIndex: function () {
21305
21401
  if (idx === state.activeOptionIndex) return null;
@@ -21360,18 +21456,18 @@ const getPaymentCardIcon = name => {
21360
21456
  }));
21361
21457
  };
21362
21458
 
21363
- var _path$g;
21459
+ var _path$h;
21364
21460
 
21365
- 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); }
21461
+ 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); }
21366
21462
 
21367
21463
  function SvgChevronRight(props) {
21368
- return /*#__PURE__*/React.createElement("svg", _extends$h({
21464
+ return /*#__PURE__*/React.createElement("svg", _extends$i({
21369
21465
  className: "plc-w-6 plc-h-6",
21370
21466
  xmlns: "http://www.w3.org/2000/svg",
21371
21467
  fill: "none",
21372
21468
  viewBox: "0 0 24 24",
21373
21469
  stroke: "currentColor"
21374
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21470
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
21375
21471
  strokeLinecap: "round",
21376
21472
  strokeLinejoin: "round",
21377
21473
  strokeWidth: 2,
@@ -21587,18 +21683,18 @@ const SavedItems = ({
21587
21683
  });
21588
21684
  };
21589
21685
 
21590
- var _path$f;
21686
+ var _path$g;
21591
21687
 
21592
- 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); }
21688
+ 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); }
21593
21689
 
21594
21690
  function SvgRefresh(props) {
21595
- return /*#__PURE__*/React.createElement("svg", _extends$g({
21691
+ return /*#__PURE__*/React.createElement("svg", _extends$h({
21596
21692
  className: "plc-w-4 plc-h-4 plc-mr-1",
21597
21693
  xmlns: "http://www.w3.org/2000/svg",
21598
21694
  fill: "none",
21599
21695
  viewBox: "0 0 24 24",
21600
21696
  stroke: "currentColor"
21601
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21697
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
21602
21698
  strokeLinecap: "round",
21603
21699
  strokeLinejoin: "round",
21604
21700
  strokeWidth: 2,
@@ -21606,35 +21702,35 @@ function SvgRefresh(props) {
21606
21702
  })));
21607
21703
  }
21608
21704
 
21609
- var _path$e;
21705
+ var _path$f;
21610
21706
 
21611
- 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); }
21707
+ 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); }
21612
21708
 
21613
21709
  function SvgCalendar(props) {
21614
- return /*#__PURE__*/React.createElement("svg", _extends$f({
21710
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
21615
21711
  xmlns: "http://www.w3.org/2000/svg",
21616
21712
  className: "plc-h-4 plc-w-4 plc-mr-1",
21617
21713
  viewBox: "0 0 20 20",
21618
21714
  fill: "currentColor"
21619
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21715
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
21620
21716
  fillRule: "evenodd",
21621
21717
  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",
21622
21718
  clipRule: "evenodd"
21623
21719
  })));
21624
21720
  }
21625
21721
 
21626
- var _path$d;
21722
+ var _path$e;
21627
21723
 
21628
- 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); }
21724
+ 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); }
21629
21725
 
21630
21726
  function SvgPlus(props) {
21631
- return /*#__PURE__*/React.createElement("svg", _extends$e({
21727
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
21632
21728
  className: "plc-w-5 plc-h-5",
21633
21729
  xmlns: "http://www.w3.org/2000/svg",
21634
21730
  fill: "none",
21635
21731
  viewBox: "0 0 24 24",
21636
21732
  stroke: "currentColor"
21637
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21733
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21638
21734
  strokeLinecap: "round",
21639
21735
  strokeLinejoin: "round",
21640
21736
  strokeWidth: 2,
@@ -21642,17 +21738,17 @@ function SvgPlus(props) {
21642
21738
  })));
21643
21739
  }
21644
21740
 
21645
- var _path$c;
21741
+ var _path$d;
21646
21742
 
21647
- 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); }
21743
+ 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); }
21648
21744
 
21649
21745
  function SvgCheckMark(props) {
21650
- return /*#__PURE__*/React.createElement("svg", _extends$d({
21746
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
21651
21747
  className: "plc-w-4 plc-h-4 plc-mr-1",
21652
21748
  xmlns: "http://www.w3.org/2000/svg",
21653
21749
  viewBox: "0 0 20 20",
21654
21750
  fill: "currentColor"
21655
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21751
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21656
21752
  fillRule: "evenodd",
21657
21753
  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",
21658
21754
  clipRule: "evenodd"
@@ -21716,7 +21812,8 @@ const SubscriptionsItems = ({
21716
21812
  } = useTranslation("dashboard");
21717
21813
  const {
21718
21814
  switchView,
21719
- isAuthenticated
21815
+ switchToAddressView,
21816
+ switchToPaymentView
21720
21817
  } = usePelcro();
21721
21818
  const subs = getNonDonationSubs();
21722
21819
  if (subs.length === 0) return null;
@@ -21758,7 +21855,12 @@ const SubscriptionsItems = ({
21758
21855
  const plan = window.Pelcro.plan.getById(plan_id);
21759
21856
  setProductAndPlan(product, plan);
21760
21857
  setSubscriptionIdToRenew(sub.id);
21761
- setView("plan-select");
21858
+
21859
+ if (product.address_required) {
21860
+ return switchToAddressView();
21861
+ }
21862
+
21863
+ return switchToPaymentView();
21762
21864
  };
21763
21865
 
21764
21866
  const getPhases = () => {
@@ -21947,18 +22049,18 @@ Accordion.item = function AccordionItem({
21947
22049
  }, content)) : null;
21948
22050
  };
21949
22051
 
21950
- var _path$b;
22052
+ var _path$c;
21951
22053
 
21952
- 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); }
22054
+ 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); }
21953
22055
 
21954
22056
  function SvgExit(props) {
21955
- return /*#__PURE__*/React.createElement("svg", _extends$c({
22057
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
21956
22058
  className: "plc-w-6 plc-h-6",
21957
22059
  xmlns: "http://www.w3.org/2000/svg",
21958
22060
  fill: "none",
21959
22061
  viewBox: "0 0 24 24",
21960
22062
  stroke: "currentColor"
21961
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
22063
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21962
22064
  strokeLinecap: "round",
21963
22065
  strokeLinejoin: "round",
21964
22066
  strokeWidth: 2,
@@ -21966,17 +22068,17 @@ function SvgExit(props) {
21966
22068
  })));
21967
22069
  }
21968
22070
 
21969
- var _path$a;
22071
+ var _path$b;
21970
22072
 
21971
- 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); }
22073
+ 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); }
21972
22074
 
21973
22075
  function SvgUser(props) {
21974
- return /*#__PURE__*/React.createElement("svg", _extends$b({
22076
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
21975
22077
  xmlns: "http://www.w3.org/2000/svg",
21976
22078
  fill: "none",
21977
22079
  viewBox: "0 0 24 24",
21978
22080
  stroke: "currentColor"
21979
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
22081
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21980
22082
  strokeLinecap: "round",
21981
22083
  strokeLinejoin: "round",
21982
22084
  strokeWidth: 2,
@@ -21984,18 +22086,18 @@ function SvgUser(props) {
21984
22086
  })));
21985
22087
  }
21986
22088
 
21987
- var _path$9;
22089
+ var _path$a;
21988
22090
 
21989
- 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); }
22091
+ 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); }
21990
22092
 
21991
22093
  function SvgNewsletter(props) {
21992
- return /*#__PURE__*/React.createElement("svg", _extends$a({
22094
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
21993
22095
  xmlns: "http://www.w3.org/2000/svg",
21994
22096
  className: "plc-h-5 plc-w-5",
21995
22097
  fill: "none",
21996
22098
  viewBox: "0 0 24 24",
21997
22099
  stroke: "currentColor"
21998
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22100
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21999
22101
  strokeLinecap: "round",
22000
22102
  strokeLinejoin: "round",
22001
22103
  strokeWidth: 2,
@@ -22003,18 +22105,18 @@ function SvgNewsletter(props) {
22003
22105
  })));
22004
22106
  }
22005
22107
 
22006
- var _path$8;
22108
+ var _path$9;
22007
22109
 
22008
- 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); }
22110
+ 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); }
22009
22111
 
22010
22112
  function SvgDocument(props) {
22011
- return /*#__PURE__*/React.createElement("svg", _extends$9({
22113
+ return /*#__PURE__*/React.createElement("svg", _extends$a({
22012
22114
  xmlns: "http://www.w3.org/2000/svg",
22013
22115
  className: "plc-h-6 plc-w-6 plc-mr-2",
22014
22116
  fill: "none",
22015
22117
  viewBox: "0 0 24 24",
22016
22118
  stroke: "currentColor"
22017
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22119
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
22018
22120
  strokeLinecap: "round",
22019
22121
  strokeLinejoin: "round",
22020
22122
  strokeWidth: 2,
@@ -22022,18 +22124,18 @@ function SvgDocument(props) {
22022
22124
  })));
22023
22125
  }
22024
22126
 
22025
- var _path$7;
22127
+ var _path$8;
22026
22128
 
22027
- 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); }
22129
+ 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); }
22028
22130
 
22029
22131
  function SvgPaymentCard(props) {
22030
- return /*#__PURE__*/React.createElement("svg", _extends$8({
22132
+ return /*#__PURE__*/React.createElement("svg", _extends$9({
22031
22133
  className: "plc-w-6 plc-h-6 plc-mr-2",
22032
22134
  xmlns: "http://www.w3.org/2000/svg",
22033
22135
  fill: "none",
22034
22136
  viewBox: "0 0 24 24",
22035
22137
  stroke: "currentColor"
22036
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22138
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
22037
22139
  strokeLinecap: "round",
22038
22140
  strokeLinejoin: "round",
22039
22141
  strokeWidth: 2,
@@ -22041,18 +22143,18 @@ function SvgPaymentCard(props) {
22041
22143
  })));
22042
22144
  }
22043
22145
 
22044
- var _path$6, _path2$1;
22146
+ var _path$7, _path2$1;
22045
22147
 
22046
- 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); }
22148
+ 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); }
22047
22149
 
22048
22150
  function SvgLocationPin(props) {
22049
- return /*#__PURE__*/React.createElement("svg", _extends$7({
22151
+ return /*#__PURE__*/React.createElement("svg", _extends$8({
22050
22152
  className: "plc-w-6 plc-h-6 plc-mr-2",
22051
22153
  xmlns: "http://www.w3.org/2000/svg",
22052
22154
  fill: "none",
22053
22155
  viewBox: "0 0 24 24",
22054
22156
  stroke: "currentColor"
22055
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22157
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
22056
22158
  strokeLinecap: "round",
22057
22159
  strokeLinejoin: "round",
22058
22160
  strokeWidth: 2,
@@ -22067,10 +22169,10 @@ function SvgLocationPin(props) {
22067
22169
 
22068
22170
  var _switch;
22069
22171
 
22070
- 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); }
22172
+ 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); }
22071
22173
 
22072
22174
  function SvgSubscription(props) {
22073
- return /*#__PURE__*/React.createElement("svg", _extends$6({
22175
+ return /*#__PURE__*/React.createElement("svg", _extends$7({
22074
22176
  xmlns: "http://www.w3.org/2000/svg",
22075
22177
  viewBox: "0 0 100 125",
22076
22178
  fill: "currentColor"
@@ -22085,18 +22187,18 @@ function SvgSubscription(props) {
22085
22187
  }))))));
22086
22188
  }
22087
22189
 
22088
- var _path$5;
22190
+ var _path$6;
22089
22191
 
22090
- 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); }
22192
+ 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); }
22091
22193
 
22092
22194
  function SvgShopping(props) {
22093
- return /*#__PURE__*/React.createElement("svg", _extends$5({
22195
+ return /*#__PURE__*/React.createElement("svg", _extends$6({
22094
22196
  className: "plc-w-6 plc-h-6 plc-mr-2",
22095
22197
  xmlns: "http://www.w3.org/2000/svg",
22096
22198
  fill: "none",
22097
22199
  viewBox: "0 0 24 24",
22098
22200
  stroke: "currentColor"
22099
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22201
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
22100
22202
  strokeLinecap: "round",
22101
22203
  strokeLinejoin: "round",
22102
22204
  strokeWidth: 2,
@@ -22104,18 +22206,18 @@ function SvgShopping(props) {
22104
22206
  })));
22105
22207
  }
22106
22208
 
22107
- var _path$4;
22209
+ var _path$5;
22108
22210
 
22109
- 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); }
22211
+ 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); }
22110
22212
 
22111
22213
  function SvgBookmark(props) {
22112
- return /*#__PURE__*/React.createElement("svg", _extends$4({
22214
+ return /*#__PURE__*/React.createElement("svg", _extends$5({
22113
22215
  className: "plc-w-6 plc-h-6 plc-mr-2",
22114
22216
  xmlns: "http://www.w3.org/2000/svg",
22115
22217
  fill: "none",
22116
22218
  viewBox: "0 0 24 24",
22117
22219
  stroke: "currentColor"
22118
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22220
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
22119
22221
  strokeLinecap: "round",
22120
22222
  strokeLinejoin: "round",
22121
22223
  strokeWidth: 2,
@@ -22123,33 +22225,33 @@ function SvgBookmark(props) {
22123
22225
  })));
22124
22226
  }
22125
22227
 
22126
- var _path$3;
22228
+ var _path$4;
22127
22229
 
22128
- 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); }
22230
+ 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); }
22129
22231
 
22130
22232
  function SvgKey(props) {
22131
- return /*#__PURE__*/React.createElement("svg", _extends$3({
22233
+ return /*#__PURE__*/React.createElement("svg", _extends$4({
22132
22234
  xmlns: "http://www.w3.org/2000/svg",
22133
22235
  viewBox: "0 0 20 20",
22134
22236
  fill: "currentColor"
22135
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22237
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
22136
22238
  fillRule: "evenodd",
22137
22239
  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",
22138
22240
  clipRule: "evenodd"
22139
22241
  })));
22140
22242
  }
22141
22243
 
22142
- var _path$2;
22244
+ var _path$3;
22143
22245
 
22144
- 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); }
22246
+ 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); }
22145
22247
 
22146
22248
  function SvgDonate(props) {
22147
- return /*#__PURE__*/React.createElement("svg", _extends$2({
22249
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
22148
22250
  width: 24,
22149
22251
  height: 24,
22150
22252
  fill: "currentColor",
22151
22253
  xmlns: "http://www.w3.org/2000/svg"
22152
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
22254
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
22153
22255
  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"
22154
22256
  })));
22155
22257
  }
@@ -22476,9 +22578,10 @@ class Dashboard extends Component {
22476
22578
  }) => {
22477
22579
  if (isGift) {
22478
22580
  this.props.setProductAndPlan(null, null, true);
22581
+ return this.props.setView("plan-select");
22479
22582
  }
22480
22583
 
22481
- return this.props.setView("plan-select");
22584
+ return this.props.setView("subscription-options");
22482
22585
  });
22483
22586
 
22484
22587
  _defineProperty$3(this, "displayAddressCreate", () => {
@@ -22944,7 +23047,7 @@ const DashboardOpenButton = () => {
22944
23047
  };
22945
23048
  DashboardOpenButton.viewId = "dashboard-open";
22946
23049
 
22947
- const initialState$2 = {
23050
+ const initialState$3 = {
22948
23051
  imageSrc: null,
22949
23052
  crop: {
22950
23053
  x: 0,
@@ -22958,10 +23061,10 @@ const initialState$2 = {
22958
23061
  content: ""
22959
23062
  }
22960
23063
  };
22961
- const store$2 = /*#__PURE__*/createContext(initialState$2);
23064
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
22962
23065
  const {
22963
- Provider: Provider$2
22964
- } = store$2;
23066
+ Provider: Provider$3
23067
+ } = store$3;
22965
23068
 
22966
23069
  const ProfilePicChangeContainer = ({
22967
23070
  style,
@@ -23095,21 +23198,21 @@ const ProfilePicChangeContainer = ({
23095
23198
  default:
23096
23199
  return state;
23097
23200
  }
23098
- }, initialState$2);
23201
+ }, initialState$3);
23099
23202
  return /*#__PURE__*/React__default.createElement("div", {
23100
23203
  style: { ...style
23101
23204
  },
23102
23205
  className: `pelcro-container pelcro-profile-picture-container ${className}`
23103
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
23206
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
23104
23207
  value: {
23105
23208
  state,
23106
23209
  dispatch
23107
23210
  }
23108
23211
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
23109
- store: store$2,
23212
+ store: store$3,
23110
23213
  key: i
23111
23214
  })) : /*#__PURE__*/React__default.cloneElement(children, {
23112
- store: store$2
23215
+ store: store$3
23113
23216
  })));
23114
23217
  };
23115
23218
  /**
@@ -23171,7 +23274,7 @@ const ProfilePicChangeButton = ({
23171
23274
  isSubmitting
23172
23275
  },
23173
23276
  dispatch
23174
- } = useContext(store$2);
23277
+ } = useContext(store$3);
23175
23278
  const {
23176
23279
  t
23177
23280
  } = useTranslation("userEdit");
@@ -24539,7 +24642,7 @@ const ProfilePicChangeCropper = ({
24539
24642
  zoom
24540
24643
  },
24541
24644
  dispatch
24542
- } = useContext(store$2);
24645
+ } = useContext(store$3);
24543
24646
  return /*#__PURE__*/React__default.createElement("div", {
24544
24647
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24545
24648
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -24581,7 +24684,7 @@ const ProfilePicChangeZoom = ({
24581
24684
  zoom
24582
24685
  },
24583
24686
  dispatch
24584
- } = useContext(store$2);
24687
+ } = useContext(store$3);
24585
24688
  const {
24586
24689
  t
24587
24690
  } = useTranslation("userEdit");
@@ -24604,18 +24707,18 @@ const ProfilePicChangeZoom = ({
24604
24707
  }, otherProps)));
24605
24708
  };
24606
24709
 
24607
- var _path$1;
24710
+ var _path$2;
24608
24711
 
24609
- 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); }
24712
+ 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); }
24610
24713
 
24611
24714
  function SvgPhotograph(props) {
24612
- return /*#__PURE__*/React.createElement("svg", _extends$1({
24715
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
24613
24716
  xmlns: "http://www.w3.org/2000/svg",
24614
24717
  className: "plc-h-6 plc-w-6",
24615
24718
  fill: "none",
24616
24719
  viewBox: "0 0 24 24",
24617
24720
  stroke: "currentColor"
24618
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
24721
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
24619
24722
  strokeLinecap: "round",
24620
24723
  strokeLinejoin: "round",
24621
24724
  strokeWidth: 2,
@@ -24633,7 +24736,7 @@ const ProfilePicChangeSelectButton = ({
24633
24736
  state: {
24634
24737
  isSubmitting
24635
24738
  }
24636
- } = useContext(store$2);
24739
+ } = useContext(store$3);
24637
24740
  const {
24638
24741
  t
24639
24742
  } = useTranslation("userEdit");
@@ -24675,7 +24778,7 @@ const ProfilePicChangeRemoveButton = ({
24675
24778
  state: {
24676
24779
  isSubmitting
24677
24780
  }
24678
- } = useContext(store$2);
24781
+ } = useContext(store$3);
24679
24782
  const {
24680
24783
  t
24681
24784
  } = useTranslation("userEdit");
@@ -24698,7 +24801,7 @@ const ProfilePicChangeWrapper = () => {
24698
24801
  state: {
24699
24802
  imageSrc
24700
24803
  }
24701
- } = useContext(store$2);
24804
+ } = useContext(store$3);
24702
24805
  const {
24703
24806
  t
24704
24807
  } = useTranslation("userEdit");
@@ -24760,17 +24863,17 @@ function ProfilePicChangeModal({
24760
24863
  }
24761
24864
  ProfilePicChangeModal.viewId = "profile-picture";
24762
24865
 
24763
- const initialState$1 = {
24866
+ const initialState$2 = {
24764
24867
  isSubmitting: false,
24765
24868
  alert: {
24766
24869
  type: "error",
24767
24870
  content: ""
24768
24871
  }
24769
24872
  };
24770
- const store$1 = /*#__PURE__*/createContext(initialState$1);
24873
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
24771
24874
  const {
24772
- Provider: Provider$1
24773
- } = store$1;
24875
+ Provider: Provider$2
24876
+ } = store$2;
24774
24877
 
24775
24878
  const EmailVerifyContainer = ({
24776
24879
  style,
@@ -24833,21 +24936,21 @@ const EmailVerifyContainer = ({
24833
24936
  default:
24834
24937
  return state;
24835
24938
  }
24836
- }, initialState$1);
24939
+ }, initialState$2);
24837
24940
  return /*#__PURE__*/React__default.createElement("div", {
24838
24941
  style: { ...style
24839
24942
  },
24840
24943
  className: `pelcro-container pelcro-email-verify-container ${className}`
24841
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
24944
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
24842
24945
  value: {
24843
24946
  state,
24844
24947
  dispatch
24845
24948
  }
24846
24949
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24847
- store: store$1,
24950
+ store: store$2,
24848
24951
  key: i
24849
24952
  })) : /*#__PURE__*/React__default.cloneElement(children, {
24850
- store: store$1
24953
+ store: store$2
24851
24954
  })));
24852
24955
  };
24853
24956
 
@@ -24861,7 +24964,7 @@ const EmailVerifyResendButton = ({
24861
24964
  state: {
24862
24965
  isSubmitting
24863
24966
  }
24864
- } = useContext(store$1);
24967
+ } = useContext(store$2);
24865
24968
  const {
24866
24969
  t
24867
24970
  } = useTranslation("verifyEmail");
@@ -24876,16 +24979,16 @@ const EmailVerifyResendButton = ({
24876
24979
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
24877
24980
  };
24878
24981
 
24879
- var _path, _path2;
24982
+ var _path$1, _path2;
24880
24983
 
24881
- 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); }
24984
+ 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); }
24882
24985
 
24883
24986
  function SvgEmailVerify(props) {
24884
- return /*#__PURE__*/React.createElement("svg", _extends({
24987
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
24885
24988
  className: "plc-w-6 plc-h-6",
24886
24989
  viewBox: "0 0 700 700",
24887
24990
  xmlns: "http://www.w3.org/2000/svg"
24888
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
24991
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
24889
24992
  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"
24890
24993
  })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
24891
24994
  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"
@@ -24989,11 +25092,11 @@ const invoicePaymentSubmitButton = props => {
24989
25092
  return /*#__PURE__*/React__default.createElement(SubmitPaymentMethod, props);
24990
25093
  };
24991
25094
 
24992
- const initialState = {};
24993
- const store = /*#__PURE__*/createContext(initialState);
25095
+ const initialState$1 = {};
25096
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
24994
25097
  const {
24995
- Provider
24996
- } = store;
25098
+ Provider: Provider$1
25099
+ } = store$1;
24997
25100
 
24998
25101
  const InvoiceDetailsContainer = ({
24999
25102
  style,
@@ -25014,21 +25117,21 @@ const InvoiceDetailsContainer = ({
25014
25117
  default:
25015
25118
  return state;
25016
25119
  }
25017
- }, initialState);
25120
+ }, initialState$1);
25018
25121
  return /*#__PURE__*/React__default.createElement("div", {
25019
25122
  style: { ...style
25020
25123
  },
25021
25124
  className: `pelcro-container pelcro-invoice-details-container ${className}`
25022
- }, /*#__PURE__*/React__default.createElement(Provider, {
25125
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
25023
25126
  value: {
25024
25127
  state,
25025
25128
  dispatch
25026
25129
  }
25027
25130
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25028
- store,
25131
+ store: store$1,
25029
25132
  key: i
25030
25133
  })) : /*#__PURE__*/React__default.cloneElement(children, {
25031
- store
25134
+ store: store$1
25032
25135
  })));
25033
25136
  };
25034
25137
 
@@ -25060,7 +25163,7 @@ const InvoiceDetailsPayButton = ({
25060
25163
  }) => {
25061
25164
  const {
25062
25165
  dispatch
25063
- } = useContext(store);
25166
+ } = useContext(store$1);
25064
25167
  const {
25065
25168
  t
25066
25169
  } = useTranslation("invoiceDetails");
@@ -25165,4 +25268,230 @@ const InvoiceDetailsModal = ({
25165
25268
  };
25166
25269
  InvoiceDetailsModal.viewId = "invoice-details";
25167
25270
 
25168
- 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 };
25271
+ const initialState = {
25272
+ selectedOption: ""
25273
+ };
25274
+ const store = /*#__PURE__*/createContext(initialState);
25275
+ const {
25276
+ Provider
25277
+ } = store;
25278
+
25279
+ const SubscriptionOptionsContainer = ({
25280
+ style,
25281
+ className = "",
25282
+ onRenewSubSuccess = () => {},
25283
+ onNewSubSuccess = () => {},
25284
+ children,
25285
+ ...props
25286
+ }) => {
25287
+ const submit = ({
25288
+ selectedOption
25289
+ }, dispatch) => {
25290
+ if (selectedOption === "renew") return onRenewSubSuccess();
25291
+ if (selectedOption === "new") return onNewSubSuccess();
25292
+ };
25293
+
25294
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
25295
+ switch (action.type) {
25296
+ case SWITCH_TO_NEW:
25297
+ return lib_7({ ...state,
25298
+ selectedOption: "new"
25299
+ });
25300
+
25301
+ case SWITCH_TO_RENEW:
25302
+ return lib_7({ ...state,
25303
+ selectedOption: "renew"
25304
+ });
25305
+
25306
+ case HANDLE_SUBMIT:
25307
+ return lib_4((state, dispatch) => submit(state));
25308
+
25309
+ default:
25310
+ return state;
25311
+ }
25312
+ }, initialState);
25313
+ return /*#__PURE__*/React__default.createElement("div", {
25314
+ style: { ...style
25315
+ },
25316
+ className: `pelcro-container pelcro-subscription-options-container ${className}`
25317
+ }, /*#__PURE__*/React__default.createElement(Provider, {
25318
+ value: {
25319
+ state,
25320
+ dispatch
25321
+ }
25322
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
25323
+ store,
25324
+ key: i
25325
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
25326
+ store
25327
+ })));
25328
+ };
25329
+
25330
+ var _path;
25331
+
25332
+ 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); }
25333
+
25334
+ function SvgPlusCircle(props) {
25335
+ return /*#__PURE__*/React.createElement("svg", _extends({
25336
+ xmlns: "http://www.w3.org/2000/svg",
25337
+ className: "plc-h-6 plc-w-6",
25338
+ fill: "none",
25339
+ viewBox: "0 0 24 24",
25340
+ stroke: "currentColor",
25341
+ strokeWidth: 2
25342
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
25343
+ strokeLinecap: "round",
25344
+ strokeLinejoin: "round",
25345
+ d: "M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"
25346
+ })));
25347
+ }
25348
+
25349
+ const SubscriptionOptionsNewButton = ({
25350
+ name,
25351
+ onClick,
25352
+ ...otherProps
25353
+ }) => {
25354
+ const {
25355
+ dispatch,
25356
+ state: {
25357
+ selectedOption
25358
+ }
25359
+ } = useContext(store);
25360
+ const {
25361
+ t
25362
+ } = useTranslation("subscriptionOptions");
25363
+ const isChecked = selectedOption === "new";
25364
+ return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25365
+ className: "plc-hidden pelcro-new-sub-option",
25366
+ 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"}`,
25367
+ id: "pelcro-new-sub-option",
25368
+ name: "option",
25369
+ onChange: () => {
25370
+ dispatch({
25371
+ type: SWITCH_TO_NEW
25372
+ });
25373
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25374
+ },
25375
+ checked: isChecked
25376
+ }, otherProps), name !== null && name !== void 0 ? name : t("addNew"), /*#__PURE__*/React__default.createElement(SvgPlusCircle, {
25377
+ className: "plc-w-full plc-h-full plc-mr-0"
25378
+ }));
25379
+ };
25380
+
25381
+ const SubscriptionOptionsRenewButton = ({
25382
+ name,
25383
+ onClick,
25384
+ ...otherProps
25385
+ }) => {
25386
+ const {
25387
+ dispatch,
25388
+ state: {
25389
+ selectedOption
25390
+ }
25391
+ } = useContext(store);
25392
+ const {
25393
+ t
25394
+ } = useTranslation("subscriptionOptions");
25395
+ const isChecked = selectedOption === "renew";
25396
+ return /*#__PURE__*/React__default.createElement(Radio, Object.assign({
25397
+ className: "plc-hidden pelcro-renew-sub-option",
25398
+ 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"}`,
25399
+ id: "pelcro-renew-sub-option",
25400
+ name: "option",
25401
+ onChange: () => {
25402
+ dispatch({
25403
+ type: SWITCH_TO_RENEW
25404
+ });
25405
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25406
+ },
25407
+ checked: isChecked
25408
+ }, otherProps), name !== null && name !== void 0 ? name : t("renew"), /*#__PURE__*/React__default.createElement(SvgRefresh, {
25409
+ className: "plc-w-full plc-h-full plc-mr-0"
25410
+ }));
25411
+ };
25412
+
25413
+ const SubscriptionOptionsSubmit = ({
25414
+ name,
25415
+ onClick,
25416
+ ...otherProps
25417
+ }) => {
25418
+ const {
25419
+ dispatch,
25420
+ state: {
25421
+ selectedOption
25422
+ }
25423
+ } = useContext(store);
25424
+ const {
25425
+ t
25426
+ } = useTranslation("subscriptionOptions");
25427
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
25428
+ onClick: () => {
25429
+ dispatch({
25430
+ type: HANDLE_SUBMIT
25431
+ });
25432
+ onClick === null || onClick === void 0 ? void 0 : onClick();
25433
+ },
25434
+ disabled: !selectedOption
25435
+ }, otherProps), name !== null && name !== void 0 ? name : t("next"));
25436
+ };
25437
+
25438
+ const SubscriptionOptionsView = props => {
25439
+ const {
25440
+ t
25441
+ } = useTranslation("subscriptionOptions");
25442
+ return /*#__PURE__*/React__default.createElement("div", {
25443
+ id: "pelcro-subscription-options-view"
25444
+ }, /*#__PURE__*/React__default.createElement("div", {
25445
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
25446
+ }, /*#__PURE__*/React__default.createElement("h4", {
25447
+ className: "plc-text-2xl plc-font-semibold"
25448
+ }, t("title")), /*#__PURE__*/React__default.createElement("p", null, t("subtitle"))), /*#__PURE__*/React__default.createElement("form", {
25449
+ action: "javascript:void(0);",
25450
+ className: "plc-mt-2 pelcro-form"
25451
+ }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsContainer, props, /*#__PURE__*/React__default.createElement("div", {
25452
+ className: "plc-flex plc-justify-between plc-items-center"
25453
+ }, /*#__PURE__*/React__default.createElement(SubscriptionOptionsRenewButton, null), /*#__PURE__*/React__default.createElement(SubscriptionOptionsNewButton, null)), /*#__PURE__*/React__default.createElement(SubscriptionOptionsSubmit, {
25454
+ role: "submit",
25455
+ className: "plc-mt-4 plc-w-full",
25456
+ name: t("next"),
25457
+ id: "pelcro-submit"
25458
+ }))));
25459
+ };
25460
+
25461
+ const SubscriptionOptionsModal = ({
25462
+ onDisplay,
25463
+ onClose,
25464
+ ...otherProps
25465
+ }) => {
25466
+ const {
25467
+ switchView,
25468
+ setProductsList
25469
+ } = usePelcro();
25470
+
25471
+ const onRenewSubSuccess = () => {
25472
+ var _otherProps$onRenewSu;
25473
+
25474
+ (_otherProps$onRenewSu = otherProps.onRenewSubSuccess) === null || _otherProps$onRenewSu === void 0 ? void 0 : _otherProps$onRenewSu.call(otherProps);
25475
+ setProductsList(getRenewableProducts());
25476
+ switchView("_plan-select-renew");
25477
+ };
25478
+
25479
+ const onNewSubSuccess = () => {
25480
+ var _otherProps$onNewSubS;
25481
+
25482
+ (_otherProps$onNewSubS = otherProps.onNewSubSuccess) === null || _otherProps$onNewSubS === void 0 ? void 0 : _otherProps$onNewSubS.call(otherProps);
25483
+ switchView("plan-select");
25484
+ };
25485
+
25486
+ return /*#__PURE__*/React__default.createElement(Modal, {
25487
+ onDisplay: onDisplay,
25488
+ onClose: onClose,
25489
+ id: "pelcro-subscription-options-modal"
25490
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(SubscriptionOptionsView, Object.assign({}, otherProps, {
25491
+ onNewSubSuccess: onNewSubSuccess,
25492
+ onRenewSubSuccess: onRenewSubSuccess
25493
+ }))), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
25494
+ };
25495
+ SubscriptionOptionsModal.viewId = "subscription-options";
25496
+
25497
+ 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 };