@pelcro/react-pelcro-js 2.7.0-beta.9 → 3.0.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.cjs.js CHANGED
@@ -3464,7 +3464,7 @@ var paymentMethod_fr = {
3464
3464
  var title$d = "Enter your email to subscribe to our newsletter";
3465
3465
  var updateTitle$1 = "Update newsletter selections";
3466
3466
  var subtitle$7 = "We may use your email for other marketing communication";
3467
- var labels$l = {
3467
+ var labels$n = {
3468
3468
  submit: "Submit",
3469
3469
  firstName: "First name",
3470
3470
  lastName: "Last name",
@@ -3472,7 +3472,7 @@ var labels$l = {
3472
3472
  postalCode: "Postal code",
3473
3473
  required: "required"
3474
3474
  };
3475
- var messages$p = {
3475
+ var messages$r = {
3476
3476
  alreadyHaveAccount: "Already have an account?",
3477
3477
  success: "Newsletters were successfully updated",
3478
3478
  loginHere: "Login here.",
@@ -3483,14 +3483,14 @@ var newsletter_en = {
3483
3483
  title: title$d,
3484
3484
  updateTitle: updateTitle$1,
3485
3485
  subtitle: subtitle$7,
3486
- labels: labels$l,
3487
- messages: messages$p
3486
+ labels: labels$n,
3487
+ messages: messages$r
3488
3488
  };
3489
3489
 
3490
3490
  var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3491
3491
  var updateTitle = "Mettre à jour son choix d'infolettres";
3492
3492
  var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3493
- var labels$k = {
3493
+ var labels$m = {
3494
3494
  submit: "Lire l’article !",
3495
3495
  firstName: "Prénom",
3496
3496
  lastName: "Nom de famille",
@@ -3498,7 +3498,7 @@ var labels$k = {
3498
3498
  postalCode: "Code postal",
3499
3499
  required: "Champs obligatoires"
3500
3500
  };
3501
- var messages$o = {
3501
+ var messages$q = {
3502
3502
  alreadyHaveAccount: "Vous avez déjà un compte ?",
3503
3503
  success: "Votre choix d'infolettres à été mis à jour",
3504
3504
  loginHere: "Connectez-vous ici",
@@ -3509,14 +3509,14 @@ var newsletter_fr = {
3509
3509
  title: title$c,
3510
3510
  updateTitle: updateTitle,
3511
3511
  subtitle: subtitle$6,
3512
- labels: labels$k,
3513
- messages: messages$o
3512
+ labels: labels$m,
3513
+ messages: messages$q
3514
3514
  };
3515
3515
 
3516
- var labels$j = {
3516
+ var labels$l = {
3517
3517
  "continue": "Continue to content"
3518
3518
  };
3519
- var messages$n = {
3519
+ var messages$p = {
3520
3520
  yourFreeTrial: "Subscription successful!",
3521
3521
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3522
3522
  clickToLearn: {
@@ -3538,15 +3538,15 @@ var errors$9 = {
3538
3538
  "": ""
3539
3539
  };
3540
3540
  var success_en = {
3541
- labels: labels$j,
3542
- messages: messages$n,
3541
+ labels: labels$l,
3542
+ messages: messages$p,
3543
3543
  errors: errors$9
3544
3544
  };
3545
3545
 
3546
- var labels$i = {
3546
+ var labels$k = {
3547
3547
  "continue": "Abonnement réussi !"
3548
3548
  };
3549
- var messages$m = {
3549
+ var messages$o = {
3550
3550
  yourFreeTrial: "Votre essai gratuit vient de débuter",
3551
3551
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
3552
3552
  clickToLearn: {
@@ -3568,12 +3568,12 @@ var errors$8 = {
3568
3568
  "": ""
3569
3569
  };
3570
3570
  var success_fr = {
3571
- labels: labels$i,
3572
- messages: messages$m,
3571
+ labels: labels$k,
3572
+ messages: messages$o,
3573
3573
  errors: errors$8
3574
3574
  };
3575
3575
 
3576
- var messages$l = {
3576
+ var messages$n = {
3577
3577
  freeVisits: "Free visits left:",
3578
3578
  subscribeNow: "Subscribe",
3579
3579
  alreadyHaveAccount: "Already have an account?",
@@ -3583,11 +3583,11 @@ var errors$7 = {
3583
3583
  "": ""
3584
3584
  };
3585
3585
  var meter_en = {
3586
- messages: messages$l,
3586
+ messages: messages$n,
3587
3587
  errors: errors$7
3588
3588
  };
3589
3589
 
3590
- var messages$k = {
3590
+ var messages$m = {
3591
3591
  freeVisits: "Visites gratuites restantes:",
3592
3592
  subscribeNow: "Abonnez-vous maintenant !",
3593
3593
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -3597,15 +3597,15 @@ var errors$6 = {
3597
3597
  "": ""
3598
3598
  };
3599
3599
  var meter_fr = {
3600
- messages: messages$k,
3600
+ messages: messages$m,
3601
3601
  errors: errors$6
3602
3602
  };
3603
3603
 
3604
- var messages$j = {
3604
+ var messages$l = {
3605
3605
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3606
3606
  bankRedirection: "Please hold, redirecting you to your bank."
3607
3607
  };
3608
- var labels$h = {
3608
+ var labels$j = {
3609
3609
  card: "Enter card number",
3610
3610
  date: "Expiration date",
3611
3611
  CVC: "CVC",
@@ -3624,15 +3624,15 @@ var labels$h = {
3624
3624
  removeCoupon: "REMOVE"
3625
3625
  };
3626
3626
  var checkoutForm_en = {
3627
- messages: messages$j,
3628
- labels: labels$h
3627
+ messages: messages$l,
3628
+ labels: labels$j
3629
3629
  };
3630
3630
 
3631
- var messages$i = {
3631
+ var messages$k = {
3632
3632
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3633
3633
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3634
3634
  };
3635
- var labels$g = {
3635
+ var labels$i = {
3636
3636
  card: "Entrez le numéro de carte",
3637
3637
  date: "Date d’expiration",
3638
3638
  CVC: "CVC",
@@ -3651,8 +3651,8 @@ var labels$g = {
3651
3651
  removeCoupon: "RETIRER"
3652
3652
  };
3653
3653
  var checkoutForm_fr = {
3654
- messages: messages$i,
3655
- labels: labels$g
3654
+ messages: messages$k,
3655
+ labels: labels$i
3656
3656
  };
3657
3657
 
3658
3658
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3685,7 +3685,7 @@ var messages_fr = {
3685
3685
  recaptcha: recaptcha
3686
3686
  };
3687
3687
 
3688
- var labels$f = {
3688
+ var labels$h = {
3689
3689
  email: "Enter email",
3690
3690
  password: "Enter password",
3691
3691
  required: "required",
@@ -3693,7 +3693,7 @@ var labels$f = {
3693
3693
  passwordPlaceholder: "Password",
3694
3694
  login: "Login"
3695
3695
  };
3696
- var messages$h = {
3696
+ var messages$j = {
3697
3697
  loginTo: "Login to your account",
3698
3698
  welcome: "Welcome back, sign in with your existing account.",
3699
3699
  dontHaveAccount: "Don't have an account yet?",
@@ -3712,12 +3712,12 @@ var errors$5 = {
3712
3712
  "": ""
3713
3713
  };
3714
3714
  var login_en = {
3715
- labels: labels$f,
3716
- messages: messages$h,
3715
+ labels: labels$h,
3716
+ messages: messages$j,
3717
3717
  errors: errors$5
3718
3718
  };
3719
3719
 
3720
- var labels$e = {
3720
+ var labels$g = {
3721
3721
  email: "Entrez votre adresse courriel",
3722
3722
  password: "Entrez votre mot de passe",
3723
3723
  required: "Champs obligatoires",
@@ -3725,7 +3725,7 @@ var labels$e = {
3725
3725
  passwordPlaceholder: "Mot de passe",
3726
3726
  login: "Connexion"
3727
3727
  };
3728
- var messages$g = {
3728
+ var messages$i = {
3729
3729
  loginTo: "Connectez-vous à votre compte",
3730
3730
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
3731
3731
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -3744,14 +3744,14 @@ var errors$4 = {
3744
3744
  "": ""
3745
3745
  };
3746
3746
  var login_fr = {
3747
- labels: labels$e,
3748
- messages: messages$g,
3747
+ labels: labels$g,
3748
+ messages: messages$i,
3749
3749
  errors: errors$4
3750
3750
  };
3751
3751
 
3752
3752
  var title$b = "Create an account";
3753
3753
  var subtitle$5 = "Enter your email and password below";
3754
- var labels$d = {
3754
+ var labels$f = {
3755
3755
  signUpFacebook: "Sign up with Facebook",
3756
3756
  signUpGoogle: "Sign up with Google",
3757
3757
  signUpEmail: "Sign up with Email",
@@ -3763,7 +3763,7 @@ var labels$d = {
3763
3763
  firstName: "First name",
3764
3764
  lastName: "Last name"
3765
3765
  };
3766
- var messages$f = {
3766
+ var messages$h = {
3767
3767
  alreadyHaveAccount: "Already have an account?",
3768
3768
  createAccount: "Create account",
3769
3769
  loginHere: "login here. ",
@@ -3837,8 +3837,8 @@ var redeem$1 = {
3837
3837
  var register_en = {
3838
3838
  title: title$b,
3839
3839
  subtitle: subtitle$5,
3840
- labels: labels$d,
3841
- messages: messages$f,
3840
+ labels: labels$f,
3841
+ messages: messages$h,
3842
3842
  errors: errors$3,
3843
3843
  gift: gift$1,
3844
3844
  redeem: redeem$1
@@ -3846,7 +3846,7 @@ var register_en = {
3846
3846
 
3847
3847
  var title$a = "Créer un compte";
3848
3848
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3849
- var labels$c = {
3849
+ var labels$e = {
3850
3850
  signUpFacebook: "Inscrivez-vous avec Facebook",
3851
3851
  signUpGoogle: "Inscrivez-vous avec Google",
3852
3852
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3858,7 +3858,7 @@ var labels$c = {
3858
3858
  firstName: "Prénom",
3859
3859
  lastName: "Nom de famille"
3860
3860
  };
3861
- var messages$e = {
3861
+ var messages$g = {
3862
3862
  alreadyHaveAccount: "Vous avez déjà un compte?",
3863
3863
  createAccount: "Créer un compte",
3864
3864
  loginHere: "Connectez-vous ici",
@@ -3933,14 +3933,14 @@ var redeem = {
3933
3933
  var register_fr = {
3934
3934
  title: title$a,
3935
3935
  subtitle: subtitle$4,
3936
- labels: labels$c,
3937
- messages: messages$e,
3936
+ labels: labels$e,
3937
+ messages: messages$g,
3938
3938
  errors: errors$2,
3939
3939
  gift: gift,
3940
3940
  redeem: redeem
3941
3941
  };
3942
3942
 
3943
- var labels$b = {
3943
+ var labels$d = {
3944
3944
  title: "Want to update your profile?",
3945
3945
  subtitle: "Enter your information below to update your profile",
3946
3946
  email: "Email",
@@ -3956,17 +3956,17 @@ var labels$b = {
3956
3956
  removeImage: "Remove current photo",
3957
3957
  zoom: "Zoom"
3958
3958
  };
3959
- var messages$d = {
3959
+ var messages$f = {
3960
3960
  userUpdated: "Thanks! Your profile was updated successfully.",
3961
3961
  pictureRemoved: "Your profile picture was removed successfully.",
3962
3962
  pictureUpdated: "Your profile picture was updated successfully."
3963
3963
  };
3964
3964
  var userEdit_en = {
3965
- labels: labels$b,
3966
- messages: messages$d
3965
+ labels: labels$d,
3966
+ messages: messages$f
3967
3967
  };
3968
3968
 
3969
- var labels$a = {
3969
+ var labels$c = {
3970
3970
  title: "Voulez-vous mettre à jour votre profil ?",
3971
3971
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3972
3972
  email: "Address courriel",
@@ -3982,20 +3982,20 @@ var labels$a = {
3982
3982
  removeImage: "supprimer la photo actuelle",
3983
3983
  zoom: "Zoom"
3984
3984
  };
3985
- var messages$c = {
3985
+ var messages$e = {
3986
3986
  userUpdated: "Votre profil a été mis à jour avec succès.",
3987
3987
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
3988
3988
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3989
3989
  };
3990
3990
  var userEdit_fr = {
3991
- labels: labels$a,
3992
- messages: messages$c
3991
+ labels: labels$c,
3992
+ messages: messages$e
3993
3993
  };
3994
3994
 
3995
3995
  var title$9 = "Enter your shipping address";
3996
3996
  var selectAddressTitle$1 = "Please select an address";
3997
3997
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3998
- var labels$9 = {
3998
+ var labels$b = {
3999
3999
  address: "Address",
4000
4000
  code: "Postal Code/Zip",
4001
4001
  city: "City",
@@ -4010,7 +4010,7 @@ var buttons$5 = {
4010
4010
  selectAddress: "Select address",
4011
4011
  addAddress: "Add new address"
4012
4012
  };
4013
- var messages$b = {
4013
+ var messages$d = {
4014
4014
  addressUpdated: "The address was successfully updated!",
4015
4015
  subRedeemed: "Your subscription has been redeemed."
4016
4016
  };
@@ -4018,15 +4018,15 @@ var address_en = {
4018
4018
  title: title$9,
4019
4019
  selectAddressTitle: selectAddressTitle$1,
4020
4020
  selectAddressSubtitle: selectAddressSubtitle$1,
4021
- labels: labels$9,
4021
+ labels: labels$b,
4022
4022
  buttons: buttons$5,
4023
- messages: messages$b
4023
+ messages: messages$d
4024
4024
  };
4025
4025
 
4026
4026
  var title$8 = "Entrez votre adresse de livraison";
4027
4027
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4028
4028
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4029
- var labels$8 = {
4029
+ var labels$a = {
4030
4030
  address: "Adresse",
4031
4031
  code: "Code postal / Zip",
4032
4032
  city: "Ville",
@@ -4041,7 +4041,7 @@ var buttons$4 = {
4041
4041
  selectAddress: "Choisir cette adresse",
4042
4042
  addAddress: "Ajouter une nouvelle adresse"
4043
4043
  };
4044
- var messages$a = {
4044
+ var messages$c = {
4045
4045
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4046
4046
  subRedeemed: "Votre abonnement a bien été activé."
4047
4047
  };
@@ -4049,9 +4049,9 @@ var address_fr = {
4049
4049
  title: title$8,
4050
4050
  selectAddressTitle: selectAddressTitle,
4051
4051
  selectAddressSubtitle: selectAddressSubtitle,
4052
- labels: labels$8,
4052
+ labels: labels$a,
4053
4053
  buttons: buttons$4,
4054
- messages: messages$a
4054
+ messages: messages$c
4055
4055
  };
4056
4056
 
4057
4057
  var title$7 = "Reset your password";
@@ -4098,7 +4098,7 @@ var password$1 = "Password";
4098
4098
  var submit$3 = "Submit";
4099
4099
  var required$3 = "Required";
4100
4100
  var passwordResetEmailSent$1 = "Password reset instructions have been sent to your email";
4101
- var messages$9 = {
4101
+ var messages$b = {
4102
4102
  alreadyHaveAccount: "Already have an account?",
4103
4103
  loginHere: "login here."
4104
4104
  };
@@ -4109,7 +4109,7 @@ var passwordForgot_en = {
4109
4109
  submit: submit$3,
4110
4110
  required: required$3,
4111
4111
  passwordResetEmailSent: passwordResetEmailSent$1,
4112
- messages: messages$9
4112
+ messages: messages$b
4113
4113
  };
4114
4114
 
4115
4115
  var title$4 = "Mot de passe oublié ?";
@@ -4118,7 +4118,7 @@ var password = "Mot de passe";
4118
4118
  var submit$2 = "Soumettre";
4119
4119
  var required$2 = "Champs obligatoires";
4120
4120
  var passwordResetEmailSent = "Un lien pour réinitialiser votre mot de passe vous a été envoyé. Si vous ne le recevez pas, vérifier votre courrier indésirable.";
4121
- var messages$8 = {
4121
+ var messages$a = {
4122
4122
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4123
4123
  loginHere: "Connectez-vous ici"
4124
4124
  };
@@ -4129,7 +4129,7 @@ var passwordForgot_fr = {
4129
4129
  submit: submit$2,
4130
4130
  required: required$2,
4131
4131
  passwordResetEmailSent: passwordResetEmailSent,
4132
- messages: messages$8
4132
+ messages: messages$a
4133
4133
  };
4134
4134
 
4135
4135
  var title$3 = "Change your password";
@@ -4230,7 +4230,7 @@ var buttons$3 = {
4230
4230
  purchase: "Purchase",
4231
4231
  "continue": "Continue"
4232
4232
  };
4233
- var messages$7 = {
4233
+ var messages$9 = {
4234
4234
  orderConfirmed: {
4235
4235
  title: "Order confirmed!",
4236
4236
  body: "Your order has been confirmed and will be shipped within the next few days. You'll shortly receive an email confirmation of this order."
@@ -4239,14 +4239,14 @@ var messages$7 = {
4239
4239
  multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
4240
4240
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4241
4241
  };
4242
- var labels$7 = {
4242
+ var labels$9 = {
4243
4243
  summary: "Order summary",
4244
4244
  total: "total"
4245
4245
  };
4246
4246
  var shop_en = {
4247
4247
  buttons: buttons$3,
4248
- messages: messages$7,
4249
- labels: labels$7
4248
+ messages: messages$9,
4249
+ labels: labels$9
4250
4250
  };
4251
4251
 
4252
4252
  var buttons$2 = {
@@ -4255,7 +4255,7 @@ var buttons$2 = {
4255
4255
  purchase: "Acheter",
4256
4256
  "continue": "Continuer au contenu"
4257
4257
  };
4258
- var messages$6 = {
4258
+ var messages$8 = {
4259
4259
  orderConfirmed: {
4260
4260
  title: "Votre commande est confirmée !",
4261
4261
  body: "Votre commande a été confirmée et vous sera expédiée dans les prochains jours. Vous recevrez un courriel de confirmation sous peu."
@@ -4264,17 +4264,17 @@ var messages$6 = {
4264
4264
  multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
4265
4265
  currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
4266
4266
  };
4267
- var labels$6 = {
4267
+ var labels$8 = {
4268
4268
  summary: "récapitulatif de commande",
4269
4269
  total: "total"
4270
4270
  };
4271
4271
  var shop_fr = {
4272
4272
  buttons: buttons$2,
4273
- messages: messages$6,
4274
- labels: labels$6
4273
+ messages: messages$8,
4274
+ labels: labels$8
4275
4275
  };
4276
4276
 
4277
- var labels$5 = {
4277
+ var labels$7 = {
4278
4278
  cardNumber: "Numéro de carte",
4279
4279
  securityCode: "Code de sécurité",
4280
4280
  submit: "Soumettre",
@@ -4296,7 +4296,7 @@ var labels$5 = {
4296
4296
  title: "Informations de paiement"
4297
4297
  }
4298
4298
  };
4299
- var messages$5 = {
4299
+ var messages$7 = {
4300
4300
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4301
4301
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4302
4302
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4309,12 +4309,12 @@ var errors$1 = {
4309
4309
  "": ""
4310
4310
  };
4311
4311
  var payment_fr = {
4312
- labels: labels$5,
4313
- messages: messages$5,
4312
+ labels: labels$7,
4313
+ messages: messages$7,
4314
4314
  errors: errors$1
4315
4315
  };
4316
4316
 
4317
- var labels$4 = {
4317
+ var labels$6 = {
4318
4318
  cardNumber: "Card number",
4319
4319
  securityCode: "Security Code",
4320
4320
  submit: "Submit",
@@ -4336,7 +4336,7 @@ var labels$4 = {
4336
4336
  title: "Payment Information"
4337
4337
  }
4338
4338
  };
4339
- var messages$4 = {
4339
+ var messages$6 = {
4340
4340
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
4341
4341
  cancel: "Cancel your subscription online at anytime.",
4342
4342
  giftSent: "Subscription gift has been sent to",
@@ -4349,12 +4349,12 @@ var errors = {
4349
4349
  "": ""
4350
4350
  };
4351
4351
  var payment_en = {
4352
- labels: labels$4,
4353
- messages: messages$4,
4352
+ labels: labels$6,
4353
+ messages: messages$6,
4354
4354
  errors: errors
4355
4355
  };
4356
4356
 
4357
- var labels$3 = {
4357
+ var labels$5 = {
4358
4358
  menu: "Pelcro Menu",
4359
4359
  name: "Name",
4360
4360
  email: "Email",
@@ -4421,7 +4421,7 @@ var labels$3 = {
4421
4421
  goBack: "Go back"
4422
4422
  }
4423
4423
  };
4424
- var messages$3 = {
4424
+ var messages$5 = {
4425
4425
  noCard: "You don't have a card",
4426
4426
  subCancellation: {
4427
4427
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -4431,11 +4431,11 @@ var messages$3 = {
4431
4431
  }
4432
4432
  };
4433
4433
  var dashboard_en = {
4434
- labels: labels$3,
4435
- messages: messages$3
4434
+ labels: labels$5,
4435
+ messages: messages$5
4436
4436
  };
4437
4437
 
4438
- var labels$2 = {
4438
+ var labels$4 = {
4439
4439
  menu: "Menu Pelcro",
4440
4440
  name: "Nom",
4441
4441
  email: "Courriel",
@@ -4502,7 +4502,7 @@ var labels$2 = {
4502
4502
  goBack: "Retourner"
4503
4503
  }
4504
4504
  };
4505
- var messages$2 = {
4505
+ var messages$4 = {
4506
4506
  noCard: "Vous n’avez pas une carte",
4507
4507
  subCancellation: {
4508
4508
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4512,16 +4512,16 @@ var messages$2 = {
4512
4512
  }
4513
4513
  };
4514
4514
  var dashboard_fr = {
4515
- labels: labels$2,
4516
- messages: messages$2
4515
+ labels: labels$4,
4516
+ messages: messages$4
4517
4517
  };
4518
4518
 
4519
- var messages$1 = {
4519
+ var messages$3 = {
4520
4520
  alreadyHaveAccount: "Already have an account?",
4521
4521
  loginHere: "Login here",
4522
4522
  checkbox: "Check this box to gift this subscription"
4523
4523
  };
4524
- var labels$1 = {
4524
+ var labels$3 = {
4525
4525
  plan: {
4526
4526
  title: "Subscribe to a plan",
4527
4527
  subtitle: "Select one of the plans below and click on next."
@@ -4544,17 +4544,17 @@ var buttons$1 = {
4544
4544
  back: "Back"
4545
4545
  };
4546
4546
  var select_en = {
4547
- messages: messages$1,
4548
- labels: labels$1,
4547
+ messages: messages$3,
4548
+ labels: labels$3,
4549
4549
  buttons: buttons$1
4550
4550
  };
4551
4551
 
4552
- var messages = {
4552
+ var messages$2 = {
4553
4553
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4554
4554
  loginHere: "Connectez-vous ici",
4555
4555
  checkbox: "Cochez cette case pour offrir cet abonnement"
4556
4556
  };
4557
- var labels = {
4557
+ var labels$2 = {
4558
4558
  plan: {
4559
4559
  title: "Abonnez-vous à un plan",
4560
4560
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4577,8 +4577,8 @@ var buttons = {
4577
4577
  back: "Retour"
4578
4578
  };
4579
4579
  var select_fr = {
4580
- messages: messages,
4581
- labels: labels,
4580
+ messages: messages$2,
4581
+ labels: labels$2,
4582
4582
  buttons: buttons
4583
4583
  };
4584
4584
 
@@ -4602,6 +4602,34 @@ var notification_fr = {
4602
4602
  confirm: confirm
4603
4603
  };
4604
4604
 
4605
+ var labels$1 = {
4606
+ title: "Verify your email",
4607
+ instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4608
+ resend: "Resend email"
4609
+ };
4610
+ var messages$1 = {
4611
+ resent: "Resent successfully",
4612
+ success: "Email verified successfully!"
4613
+ };
4614
+ var verifyEmail_en = {
4615
+ labels: labels$1,
4616
+ messages: messages$1
4617
+ };
4618
+
4619
+ var labels = {
4620
+ title: "Vérifiez votre e-mail",
4621
+ instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
4622
+ resend: "Ré-envoyer l'email"
4623
+ };
4624
+ var messages = {
4625
+ resent: "Renvoyé avec succès",
4626
+ success: "Email vérifié avec succès!"
4627
+ };
4628
+ var verifyEmail_fr = {
4629
+ labels: labels,
4630
+ messages: messages
4631
+ };
4632
+
4605
4633
  function create$1(createState) {
4606
4634
  let state;
4607
4635
  const listeners = new Set();
@@ -5951,12 +5979,18 @@ class PelcroActions {
5951
5979
  view,
5952
5980
  cartItems,
5953
5981
  ...otherStateFields
5954
- } = initialState$g;
5982
+ } = initialState$h;
5955
5983
  this.set(otherStateFields);
5956
5984
  });
5957
5985
 
5958
5986
  _defineProperty$3(this, "switchView", view => {
5959
5987
  // view switching guards
5988
+ if (userMustVerifyEmail() && !["dashboard", "meter", "login", null].includes(view)) {
5989
+ return this.set({
5990
+ view: "email-verify"
5991
+ });
5992
+ }
5993
+
5960
5994
  if (["login", "register"].includes(view) && this.get().isAuthenticated()) {
5961
5995
  return this.set({
5962
5996
  view: "dashboard"
@@ -6214,7 +6248,7 @@ class PelcroCallbacks {
6214
6248
  }
6215
6249
  });
6216
6250
 
6217
- _defineProperty$3(this, "whenUserReady", callback => {
6251
+ _defineProperty$3(this, "whenUserReady", (callback, listenerOptions) => {
6218
6252
  var _window$Pelcro$user$r;
6219
6253
 
6220
6254
  if ((_window$Pelcro$user$r = window.Pelcro.user.read()) !== null && _window$Pelcro$user$r !== void 0 && _window$Pelcro$user$r.id) {
@@ -6222,7 +6256,7 @@ class PelcroCallbacks {
6222
6256
  } else {
6223
6257
  window.document.addEventListener("PelcroUserLoaded", e => {
6224
6258
  callback(window.Pelcro.user.read());
6225
- });
6259
+ }, listenerOptions);
6226
6260
  }
6227
6261
  });
6228
6262
 
@@ -6241,7 +6275,7 @@ class PelcroCallbacks {
6241
6275
 
6242
6276
  }
6243
6277
 
6244
- const initialState$g = {
6278
+ const initialState$h = {
6245
6279
  // View
6246
6280
  view: null,
6247
6281
  // Plans
@@ -6269,7 +6303,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6269
6303
  return {
6270
6304
  // Store setter
6271
6305
  set,
6272
- ...initialState$g,
6306
+ ...initialState$h,
6273
6307
  // State actions
6274
6308
  ...actions,
6275
6309
  // Callbacks
@@ -6420,7 +6454,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6420
6454
  */
6421
6455
 
6422
6456
  const isValidViewFromURL = viewID => {
6423
- if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6457
+ if (["login", "register", "plan-select", "gift-redeem", "password-forgot", "password-reset", "password-change", "payment-method-update", "user-edit", "newsletter", "address-create", "order-create", "cart", "email-verify"].includes(viewID) || hasValidNewsletterUpdateUrl()) {
6424
6458
  return true;
6425
6459
  }
6426
6460
 
@@ -6617,6 +6651,13 @@ function getDateWithoutTime(dateObject) {
6617
6651
  date.setHours(0, 0, 0, 0);
6618
6652
  return date;
6619
6653
  }
6654
+ function userMustVerifyEmail() {
6655
+ var _window$Pelcro$site$r3, _window$Pelcro$site$r4, _window$Pelcro$user$r9, _window$Pelcro$user$r10;
6656
+
6657
+ const isEmailVerificationEnabled = (_window$Pelcro$site$r3 = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.email_verify_enabled) !== null && _window$Pelcro$site$r3 !== void 0 ? _window$Pelcro$site$r3 : false;
6658
+ 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;
6659
+ return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6660
+ }
6620
6661
 
6621
6662
  const resources = {
6622
6663
  en: {
@@ -6634,6 +6675,7 @@ const resources = {
6634
6675
  passwordReset: passwordReset_en,
6635
6676
  passwordForgot: passwordForgot_en,
6636
6677
  passwordChange: passwordChange_en,
6678
+ verifyEmail: verifyEmail_en,
6637
6679
  cart: cart_en,
6638
6680
  shop: shop_en,
6639
6681
  payment: payment_en,
@@ -6656,6 +6698,7 @@ const resources = {
6656
6698
  passwordReset: passwordReset_fr,
6657
6699
  passwordForgot: passwordForgot_fr,
6658
6700
  passwordChange: passwordChange_fr,
6701
+ verifyEmail: verifyEmail_fr,
6659
6702
  cart: cart_fr,
6660
6703
  shop: shop_fr,
6661
6704
  payment: payment_fr,
@@ -6818,11 +6861,18 @@ class SaveToMetadataButtonClass {
6818
6861
 
6819
6862
  const button = event.currentTarget;
6820
6863
  const user = window.Pelcro.user.read();
6864
+ const {
6865
+ switchView
6866
+ } = usePelcro.getStore();
6821
6867
  const {
6822
6868
  key,
6823
6869
  ...buttonMetadata
6824
6870
  } = button.dataset;
6825
6871
 
6872
+ if (userMustVerifyEmail()) {
6873
+ return switchView("email-verify");
6874
+ }
6875
+
6826
6876
  if (_classPrivateFieldGet(this, _isAlreadySaved).call(this, button)) {
6827
6877
  _classPrivateFieldGet(this, _removeMetaData).call(this, event);
6828
6878
 
@@ -6945,8 +6995,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6945
6995
 
6946
6996
  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}}
6947
6997
 
6948
- function _extends$x() {
6949
- _extends$x = Object.assign || function (target) {
6998
+ function _extends$y() {
6999
+ _extends$y = Object.assign || function (target) {
6950
7000
  for (var i = 1; i < arguments.length; i++) {
6951
7001
  var source = arguments[i];
6952
7002
 
@@ -6960,7 +7010,7 @@ function _extends$x() {
6960
7010
  return target;
6961
7011
  };
6962
7012
 
6963
- return _extends$x.apply(this, arguments);
7013
+ return _extends$y.apply(this, arguments);
6964
7014
  }
6965
7015
 
6966
7016
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7050,7 +7100,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7050
7100
  var reducer = function reducer(state, action) {
7051
7101
  switch (action.type) {
7052
7102
  case ActionType.ADD_TOAST:
7053
- return _extends$x({}, state, {
7103
+ return _extends$y({}, state, {
7054
7104
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7055
7105
  });
7056
7106
 
@@ -7060,9 +7110,9 @@ var reducer = function reducer(state, action) {
7060
7110
  clearFromRemoveQueue(action.toast.id);
7061
7111
  }
7062
7112
 
7063
- return _extends$x({}, state, {
7113
+ return _extends$y({}, state, {
7064
7114
  toasts: state.toasts.map(function (t) {
7065
- return t.id === action.toast.id ? _extends$x({}, t, action.toast) : t;
7115
+ return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
7066
7116
  })
7067
7117
  });
7068
7118
 
@@ -7089,9 +7139,9 @@ var reducer = function reducer(state, action) {
7089
7139
  });
7090
7140
  }
7091
7141
 
7092
- return _extends$x({}, state, {
7142
+ return _extends$y({}, state, {
7093
7143
  toasts: state.toasts.map(function (t) {
7094
- return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
7144
+ return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7095
7145
  visible: false
7096
7146
  }) : t;
7097
7147
  })
@@ -7099,28 +7149,28 @@ var reducer = function reducer(state, action) {
7099
7149
 
7100
7150
  case ActionType.REMOVE_TOAST:
7101
7151
  if (action.toastId === undefined) {
7102
- return _extends$x({}, state, {
7152
+ return _extends$y({}, state, {
7103
7153
  toasts: []
7104
7154
  });
7105
7155
  }
7106
7156
 
7107
- return _extends$x({}, state, {
7157
+ return _extends$y({}, state, {
7108
7158
  toasts: state.toasts.filter(function (t) {
7109
7159
  return t.id !== action.toastId;
7110
7160
  })
7111
7161
  });
7112
7162
 
7113
7163
  case ActionType.START_PAUSE:
7114
- return _extends$x({}, state, {
7164
+ return _extends$y({}, state, {
7115
7165
  pausedAt: action.time
7116
7166
  });
7117
7167
 
7118
7168
  case ActionType.END_PAUSE:
7119
7169
  var diff = action.time - (state.pausedAt || 0);
7120
- return _extends$x({}, state, {
7170
+ return _extends$y({}, state, {
7121
7171
  pausedAt: undefined,
7122
7172
  toasts: state.toasts.map(function (t) {
7123
- return _extends$x({}, t, {
7173
+ return _extends$y({}, t, {
7124
7174
  pauseDuration: t.pauseDuration + diff
7125
7175
  });
7126
7176
  })
@@ -7167,12 +7217,12 @@ var useStore = function useStore(toastOptions) {
7167
7217
  var mergedToasts = state.toasts.map(function (t) {
7168
7218
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7169
7219
 
7170
- return _extends$x({}, toastOptions, toastOptions[t.type], t, {
7220
+ return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7171
7221
  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],
7172
- style: _extends$x({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7222
+ style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7173
7223
  });
7174
7224
  });
7175
- return _extends$x({}, state, {
7225
+ return _extends$y({}, state, {
7176
7226
  toasts: mergedToasts
7177
7227
  });
7178
7228
  };
@@ -7182,7 +7232,7 @@ var createToast = function createToast(message, type, opts) {
7182
7232
  type = 'blank';
7183
7233
  }
7184
7234
 
7185
- return _extends$x({
7235
+ return _extends$y({
7186
7236
  createdAt: Date.now(),
7187
7237
  visible: true,
7188
7238
  type: type,
@@ -7232,14 +7282,14 @@ toast.remove = function (toastId) {
7232
7282
  };
7233
7283
 
7234
7284
  toast.promise = function (promise, msgs, opts) {
7235
- var id = toast.loading(msgs.loading, _extends$x({}, opts, opts == null ? void 0 : opts.loading));
7285
+ var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
7236
7286
  promise.then(function (p) {
7237
- toast.success(resolveValue(msgs.success, p), _extends$x({
7287
+ toast.success(resolveValue(msgs.success, p), _extends$y({
7238
7288
  id: id
7239
7289
  }, opts, opts == null ? void 0 : opts.success));
7240
7290
  return p;
7241
7291
  })["catch"](function (e) {
7242
- toast.error(resolveValue(msgs.error, e), _extends$x({
7292
+ toast.error(resolveValue(msgs.error, e), _extends$y({
7243
7293
  id: id
7244
7294
  }, opts, opts == null ? void 0 : opts.error));
7245
7295
  });
@@ -7578,7 +7628,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7578
7628
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7579
7629
  return React.createElement(ToastBarBase, {
7580
7630
  className: toast.className,
7581
- style: _extends$x({}, animationStyle, style, toast.style)
7631
+ style: _extends$y({}, animationStyle, style, toast.style)
7582
7632
  }, typeof children === 'function' ? children({
7583
7633
  icon: icon,
7584
7634
  message: message
@@ -7608,7 +7658,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7608
7658
  } : position.includes('right') ? {
7609
7659
  justifyContent: 'flex-end'
7610
7660
  } : {};
7611
- return _extends$x({
7661
+ return _extends$y({
7612
7662
  left: 0,
7613
7663
  right: 0,
7614
7664
  display: 'flex',
@@ -7635,7 +7685,7 @@ var Toaster = function Toaster(_ref) {
7635
7685
  handlers = _useToaster.handlers;
7636
7686
 
7637
7687
  return React.createElement("div", {
7638
- style: _extends$x({
7688
+ style: _extends$y({
7639
7689
  position: 'fixed',
7640
7690
  zIndex: 9999,
7641
7691
  top: DEFAULT_OFFSET,
@@ -7670,87 +7720,87 @@ var Toaster = function Toaster(_ref) {
7670
7720
  }));
7671
7721
  };
7672
7722
 
7673
- var _path$u;
7723
+ var _path$v;
7674
7724
 
7675
- 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); }
7725
+ 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); }
7676
7726
 
7677
7727
  function SvgCheckSolid(props) {
7678
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7728
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7679
7729
  xmlns: "http://www.w3.org/2000/svg",
7680
7730
  className: "h-5 w-5",
7681
7731
  viewBox: "0 0 20 20",
7682
7732
  fill: "currentColor"
7683
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7733
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7684
7734
  fillRule: "evenodd",
7685
7735
  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",
7686
7736
  clipRule: "evenodd"
7687
7737
  })));
7688
7738
  }
7689
7739
 
7690
- var _path$t;
7740
+ var _path$u;
7691
7741
 
7692
- 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); }
7742
+ 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); }
7693
7743
 
7694
7744
  function SvgXIcon(props) {
7695
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7745
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7696
7746
  xmlns: "http://www.w3.org/2000/svg",
7697
7747
  viewBox: "0 0 20 20",
7698
7748
  fill: "currentColor"
7699
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7749
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7700
7750
  fill: "evenodd",
7701
7751
  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",
7702
7752
  clipRule: "evenodd"
7703
7753
  })));
7704
7754
  }
7705
7755
 
7706
- var _path$s;
7756
+ var _path$t;
7707
7757
 
7708
- 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); }
7758
+ 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); }
7709
7759
 
7710
7760
  function SvgXIconSolid(props) {
7711
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7761
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7712
7762
  className: "plc-w-4 plc-h-4",
7713
7763
  fill: "currentColor",
7714
7764
  xmlns: "http://www.w3.org/2000/svg",
7715
7765
  viewBox: "0 0 100 100"
7716
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7766
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7717
7767
  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"
7718
7768
  })));
7719
7769
  }
7720
7770
 
7721
- var _path$r;
7771
+ var _path$s;
7722
7772
 
7723
- 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); }
7773
+ 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); }
7724
7774
 
7725
7775
  function SvgExclamation(props) {
7726
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7776
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7727
7777
  className: "plc-w-4 plc-h-4 plc-mr-1",
7728
7778
  xmlns: "http://www.w3.org/2000/svg",
7729
7779
  viewBox: "0 0 20 20",
7730
7780
  fill: "currentColor"
7731
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7781
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7732
7782
  fillRule: "evenodd",
7733
7783
  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",
7734
7784
  clipRule: "evenodd"
7735
7785
  })));
7736
7786
  }
7737
7787
 
7738
- var _path$q, _path2$3;
7788
+ var _path$r, _path2$4;
7739
7789
 
7740
- 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); }
7790
+ 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); }
7741
7791
 
7742
7792
  function SvgSpinner(props) {
7743
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
7793
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7744
7794
  className: "plc-animate-spin",
7745
7795
  viewBox: "0 0 24 24",
7746
7796
  fill: "currentColor",
7747
7797
  xmlns: "http://www.w3.org/2000/svg"
7748
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
7798
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7749
7799
  opacity: 0.2,
7750
7800
  fill: "evenodd",
7751
7801
  clipRule: "evenodd",
7752
7802
  d: "M12 19a7 7 0 100-14 7 7 0 000 14zm0 3c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"
7753
- })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
7803
+ })), _path2$4 || (_path2$4 = /*#__PURE__*/React__namespace.createElement("path", {
7754
7804
  d: "M2 12C2 6.477 6.477 2 12 2v3a7 7 0 00-7 7H2z"
7755
7805
  })));
7756
7806
  }
@@ -8476,50 +8526,110 @@ var pure = pure$1;
8476
8526
  var pure_1 = pure.loadStripe;
8477
8527
 
8478
8528
  /**
8479
- * @typedef {Object} OptionsType
8480
- * @property {boolean} loadPaymentSDKs
8481
- * @property {boolean} enableURLTriggers
8482
- * @property {boolean} enableTheme
8483
- * @property {boolean} enablePaywalls
8484
- * @property {boolean} enableGoogleAnalytics
8485
- */
8486
-
8487
- /**
8488
- * Initializes pelcro features based on the options flag object
8489
- * @param {OptionsType} options
8490
- * @returns
8529
+ * Extracts error message from the response error object
8530
+ * @param {Object} error Error object
8531
+ * @return {string}
8491
8532
  */
8533
+ const getErrorMessages = error => {
8534
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
8492
8535
 
8493
- const optionsController = options => {
8494
- if (!options) {
8495
- return;
8536
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
8537
+ return error.error.message;
8496
8538
  }
8497
8539
 
8498
- const optionsMethodsDict = {
8499
- loadPaymentSDKs: loadPaymentSDKs,
8500
- loadAuth0SDK: loadAuth0SDK,
8501
- enableURLTriggers: initViewFromURL,
8502
- enableTheme: applyPelcroTheme,
8503
- enablePaywalls: initPaywalls,
8504
- loadSecuritySDK: initSecuritySdk,
8505
- enableGoogleAnalytics: initGATracking
8506
- }; // Only execute enabled options
8540
+ if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
8541
+ var _error$response2, _error$response2$data;
8507
8542
 
8508
- Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8509
- var _optionsMethodsDict$k;
8543
+ return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
8544
+ }
8510
8545
 
8511
- return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8512
- });
8513
- };
8514
- const initPaywalls = () => {
8515
- var _window$Pelcro$site$r;
8546
+ if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
8547
+ var _error$response4, _error$response4$data, _error$response4$data2;
8516
8548
 
8517
- const paywallMethods = window.Pelcro.paywall;
8518
- const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8549
+ return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
8550
+ }
8519
8551
 
8520
- if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8521
- // blur entitlements based content
8522
- const didBlurContent = init(); // Skip paywall if article is not restricted
8552
+ const errorMessages = []; // enumerable error (ex: validation errors)
8553
+
8554
+ Object.values(error === null || error === void 0 ? void 0 : (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : _error$response5$data.errors).forEach(([errorMessage]) => {
8555
+ errorMessages.push(errorMessage);
8556
+ }); // convert to multiline string
8557
+
8558
+ return errorMessages.join("\n");
8559
+ };
8560
+ /**
8561
+ * Executes function after a wait time of inactivity
8562
+ * @param {function} func
8563
+ * @param {number} waitTime
8564
+ */
8565
+
8566
+ const debounce = (func, waitTime) => {
8567
+ let timeout;
8568
+ return function executedFunction(...args) {
8569
+ // The callback function to be executed after
8570
+ // the debounce time has elapsed
8571
+ const later = () => {
8572
+ // null timeout to indicate the debounce ended
8573
+ timeout = null;
8574
+ func(...args);
8575
+ }; // This will reset the waiting every function execution.
8576
+ // This is the step that prevents the function from
8577
+ // being executed because it will never reach the
8578
+ // inside of the previous setTimeout
8579
+
8580
+
8581
+ clearTimeout(timeout); // Restart the debounce waiting period.
8582
+ // setTimeout returns a truthy value (it differs in web vs Node)
8583
+
8584
+ timeout = setTimeout(later, waitTime);
8585
+ };
8586
+ };
8587
+
8588
+ /**
8589
+ * @typedef {Object} OptionsType
8590
+ * @property {boolean} loadPaymentSDKs
8591
+ * @property {boolean} enableURLTriggers
8592
+ * @property {boolean} enableTheme
8593
+ * @property {boolean} enablePaywalls
8594
+ * @property {boolean} enableGoogleAnalytics
8595
+ */
8596
+
8597
+ /**
8598
+ * Initializes pelcro features based on the options flag object
8599
+ * @param {OptionsType} options
8600
+ * @returns
8601
+ */
8602
+
8603
+ const optionsController = options => {
8604
+ if (!options) {
8605
+ return;
8606
+ }
8607
+
8608
+ const optionsMethodsDict = {
8609
+ loadPaymentSDKs: loadPaymentSDKs,
8610
+ loadAuth0SDK: loadAuth0SDK,
8611
+ enableURLTriggers: initViewFromURL,
8612
+ enableTheme: applyPelcroTheme,
8613
+ enablePaywalls: initPaywalls,
8614
+ loadSecuritySDK: initSecuritySdk,
8615
+ enableGoogleAnalytics: initGATracking
8616
+ }; // Only execute enabled options
8617
+
8618
+ Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8619
+ var _optionsMethodsDict$k;
8620
+
8621
+ return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8622
+ });
8623
+ };
8624
+ const initPaywalls = () => {
8625
+ var _window$Pelcro$site$r;
8626
+
8627
+ const paywallMethods = window.Pelcro.paywall;
8628
+ const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8629
+
8630
+ if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8631
+ // blur entitlements based content
8632
+ const didBlurContent = init(); // Skip paywall if article is not restricted
8523
8633
 
8524
8634
  if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
8525
8635
  return;
@@ -8715,6 +8825,10 @@ const initViewFromURL = () => {
8715
8825
  return initCartFromUrl();
8716
8826
  }
8717
8827
 
8828
+ if (view === "email-verify") {
8829
+ return verifyEmailTokenFromUrl();
8830
+ }
8831
+
8718
8832
  switchView(view);
8719
8833
  });
8720
8834
  }
@@ -8864,6 +8978,33 @@ const initCartFromUrl = () => {
8864
8978
  });
8865
8979
  };
8866
8980
 
8981
+ const verifyEmailTokenFromUrl = () => {
8982
+ var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
8983
+
8984
+ const {
8985
+ whenSiteReady
8986
+ } = usePelcro.getStore();
8987
+ const translations = i18next.t("verifyEmail:messages", {
8988
+ returnObjects: true
8989
+ });
8990
+ const emailToken = window.Pelcro.helpers.getURLParameter("token");
8991
+ const isEmailVerificationEnabled = (_window$Pelcro$site$r5 = (_window$Pelcro$site$r6 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r6 === void 0 ? void 0 : _window$Pelcro$site$r6.email_verify_enabled) !== null && _window$Pelcro$site$r5 !== void 0 ? _window$Pelcro$site$r5 : false;
8992
+ if (!emailToken || !isEmailVerificationEnabled) return;
8993
+ whenSiteReady(() => {
8994
+ window.Pelcro.user.verifyEmailToken({
8995
+ token: emailToken
8996
+ }, (err, res) => {
8997
+ if (err) {
8998
+ return notify.error(getErrorMessages(err));
8999
+ }
9000
+
9001
+ return notify.success(translations.success);
9002
+ });
9003
+ }, {
9004
+ once: true
9005
+ });
9006
+ };
9007
+
8867
9008
  const defaultOptions = {
8868
9009
  loadPaymentSDKs: true,
8869
9010
  loadAuth0SDK: true,
@@ -9203,67 +9344,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9203
9344
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9204
9345
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9205
9346
 
9206
- /**
9207
- * Extracts error message from the response error object
9208
- * @param {Object} error Error object
9209
- * @return {string}
9210
- */
9211
- const getErrorMessages = error => {
9212
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
9213
-
9214
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
9215
- return error.error.message;
9216
- }
9217
-
9218
- if (error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && _error$response$data.message) {
9219
- var _error$response2, _error$response2$data;
9220
-
9221
- return error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message;
9222
- }
9223
-
9224
- if (error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.error) !== null && _error$response3$data2 !== void 0 && _error$response3$data2.message) {
9225
- var _error$response4, _error$response4$data, _error$response4$data2;
9226
-
9227
- return error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.error) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2.message;
9228
- }
9229
-
9230
- const errorMessages = []; // enumerable error (ex: validation errors)
9231
-
9232
- Object.values(error === null || error === void 0 ? void 0 : (_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : _error$response5$data.errors).forEach(([errorMessage]) => {
9233
- errorMessages.push(errorMessage);
9234
- }); // convert to multiline string
9235
-
9236
- return errorMessages.join("\n");
9237
- };
9238
- /**
9239
- * Executes function after a wait time of inactivity
9240
- * @param {function} func
9241
- * @param {number} waitTime
9242
- */
9243
-
9244
- const debounce = (func, waitTime) => {
9245
- let timeout;
9246
- return function executedFunction(...args) {
9247
- // The callback function to be executed after
9248
- // the debounce time has elapsed
9249
- const later = () => {
9250
- // null timeout to indicate the debounce ended
9251
- timeout = null;
9252
- func(...args);
9253
- }; // This will reset the waiting every function execution.
9254
- // This is the step that prevents the function from
9255
- // being executed because it will never reach the
9256
- // inside of the previous setTimeout
9257
-
9258
-
9259
- clearTimeout(timeout); // Restart the debounce waiting period.
9260
- // setTimeout returns a truthy value (it differs in web vs Node)
9261
-
9262
- timeout = setTimeout(later, waitTime);
9263
- };
9264
- };
9265
-
9266
- const initialState$f = {
9347
+ const initialState$g = {
9267
9348
  email: "",
9268
9349
  password: "",
9269
9350
  emailError: null,
@@ -9274,10 +9355,10 @@ const initialState$f = {
9274
9355
  content: ""
9275
9356
  }
9276
9357
  };
9277
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
9358
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
9278
9359
  const {
9279
- Provider: Provider$f
9280
- } = store$f;
9360
+ Provider: Provider$g
9361
+ } = store$g;
9281
9362
 
9282
9363
  const LoginContainer = ({
9283
9364
  style,
@@ -9384,7 +9465,7 @@ const LoginContainer = ({
9384
9465
  });
9385
9466
 
9386
9467
  case RESET_LOGIN_FORM:
9387
- return initialState$f;
9468
+ return initialState$g;
9388
9469
 
9389
9470
  case DISABLE_LOGIN_BUTTON:
9390
9471
  return lib_7({ ...state,
@@ -9402,12 +9483,12 @@ const LoginContainer = ({
9402
9483
  default:
9403
9484
  return state;
9404
9485
  }
9405
- }, initialState$f);
9486
+ }, initialState$g);
9406
9487
  return /*#__PURE__*/React__default['default'].createElement("div", {
9407
9488
  style: { ...style
9408
9489
  },
9409
9490
  className: `pelcro-container pelcro-login-container ${className}`
9410
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9491
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
9411
9492
  value: {
9412
9493
  state,
9413
9494
  dispatch
@@ -9415,12 +9496,12 @@ const LoginContainer = ({
9415
9496
  }, children.length ? children.map((child, i) => {
9416
9497
  if (child) {
9417
9498
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9418
- store: store$f,
9499
+ store: store$g,
9419
9500
  key: i
9420
9501
  });
9421
9502
  }
9422
9503
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9423
- store: store$f
9504
+ store: store$g
9424
9505
  })));
9425
9506
  };
9426
9507
 
@@ -9665,7 +9746,7 @@ const LoginButton = ({
9665
9746
  buttonDisabled
9666
9747
  },
9667
9748
  dispatch
9668
- } = React.useContext(store$f);
9749
+ } = React.useContext(store$g);
9669
9750
  const {
9670
9751
  t
9671
9752
  } = useTranslation("login");
@@ -9686,23 +9767,23 @@ const LoginButton = ({
9686
9767
  };
9687
9768
 
9688
9769
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
9689
- store: store$f
9770
+ store: store$g
9690
9771
  }, props));
9691
9772
 
9692
9773
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
9693
- store: store$f
9774
+ store: store$g
9694
9775
  }, props));
9695
9776
 
9696
- var _path$p;
9777
+ var _path$q;
9697
9778
 
9698
- 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); }
9779
+ 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); }
9699
9780
 
9700
9781
  function SvgCheck(props) {
9701
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
9782
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
9702
9783
  xmlns: "http://www.w3.org/2000/svg",
9703
9784
  fill: "currentColor",
9704
9785
  viewBox: "0 0 20 20"
9705
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
9786
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
9706
9787
  fillRule: "evenodd",
9707
9788
  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",
9708
9789
  clipRule: "evenodd"
@@ -9767,7 +9848,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9767
9848
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9768
9849
  facebookLoginRenderProps.FacebookLogin;
9769
9850
 
9770
- const initialState$e = {
9851
+ const initialState$f = {
9771
9852
  email: "",
9772
9853
  password: "",
9773
9854
  emailError: null,
@@ -9784,10 +9865,10 @@ const initialState$e = {
9784
9865
  content: ""
9785
9866
  }
9786
9867
  };
9787
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
9868
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
9788
9869
  const {
9789
- Provider: Provider$e
9790
- } = store$e;
9870
+ Provider: Provider$f
9871
+ } = store$f;
9791
9872
 
9792
9873
  const RegisterContainer = ({
9793
9874
  style,
@@ -9970,7 +10051,7 @@ const RegisterContainer = ({
9970
10051
  });
9971
10052
 
9972
10053
  case RESET_LOGIN_FORM:
9973
- return initialState$e;
10054
+ return initialState$f;
9974
10055
 
9975
10056
  case DISABLE_REGISTRATION_BUTTON:
9976
10057
  return lib_7({ ...state,
@@ -9988,12 +10069,12 @@ const RegisterContainer = ({
9988
10069
  default:
9989
10070
  return state;
9990
10071
  }
9991
- }, initialState$e);
10072
+ }, initialState$f);
9992
10073
  return /*#__PURE__*/React__default['default'].createElement("div", {
9993
10074
  style: { ...style
9994
10075
  },
9995
10076
  className: `pelcro-container pelcro-register-container ${className}`
9996
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
10077
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9997
10078
  value: {
9998
10079
  state,
9999
10080
  dispatch
@@ -10001,12 +10082,12 @@ const RegisterContainer = ({
10001
10082
  }, children.length ? children.map((child, i) => {
10002
10083
  if (child) {
10003
10084
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
10004
- store: store$e,
10085
+ store: store$f,
10005
10086
  key: i
10006
10087
  });
10007
10088
  }
10008
10089
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
10009
- store: store$e
10090
+ store: store$f
10010
10091
  })));
10011
10092
  };
10012
10093
  /**
@@ -10021,15 +10102,15 @@ function hasSecurityTokenEnabled$1() {
10021
10102
  return hasSecuritySdkLoaded;
10022
10103
  }
10023
10104
 
10024
- var _path$o;
10105
+ var _path$p;
10025
10106
 
10026
- 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); }
10107
+ 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); }
10027
10108
 
10028
10109
  function SvgFacebookLogo(props) {
10029
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10110
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10030
10111
  xmlns: "http://www.w3.org/2000/svg",
10031
10112
  viewBox: "88.428 12.828 107.543 207.085"
10032
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10113
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10033
10114
  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",
10034
10115
  fill: "#3c5a9a"
10035
10116
  })));
@@ -10046,10 +10127,10 @@ const FacebookLoginButton = ({
10046
10127
  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;
10047
10128
  const {
10048
10129
  dispatch: loginDispatch
10049
- } = React.useContext(store$f);
10130
+ } = React.useContext(store$g);
10050
10131
  const {
10051
10132
  dispatch: registerDispatch
10052
- } = React.useContext(store$e);
10133
+ } = React.useContext(store$f);
10053
10134
 
10054
10135
  const onSuccess = facebookUser => {
10055
10136
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10102,18 +10183,18 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10102
10183
  unwrapExports(googleLogin);
10103
10184
  var googleLogin_1 = googleLogin.GoogleLogin;
10104
10185
 
10105
- var _path$n, _path2$2, _path3$1, _path4;
10186
+ var _path$o, _path2$3, _path3$1, _path4;
10106
10187
 
10107
- 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); }
10188
+ 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); }
10108
10189
 
10109
10190
  function SvgGoogleLogo(props) {
10110
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10191
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10111
10192
  viewBox: "0 0 24 24",
10112
10193
  xmlns: "http://www.w3.org/2000/svg"
10113
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10194
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10114
10195
  fill: "#4285F4",
10115
10196
  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"
10116
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10197
+ })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
10117
10198
  fill: "#34A853",
10118
10199
  d: "M12.255 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96h-3.98v3.09C3.515 21.3 7.565 24 12.255 24z"
10119
10200
  })), _path3$1 || (_path3$1 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10136,10 +10217,10 @@ const GoogleLoginButton = ({
10136
10217
  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;
10137
10218
  const {
10138
10219
  dispatch: loginDispatch
10139
- } = React.useContext(store$f);
10220
+ } = React.useContext(store$g);
10140
10221
  const {
10141
10222
  dispatch: registerDispatch
10142
- } = React.useContext(store$e);
10223
+ } = React.useContext(store$f);
10143
10224
 
10144
10225
  const onSuccess = response => {
10145
10226
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10187,15 +10268,15 @@ const GoogleLoginButton = ({
10187
10268
  }) : null;
10188
10269
  };
10189
10270
 
10190
- var _path$m;
10271
+ var _path$n;
10191
10272
 
10192
- 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); }
10273
+ 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); }
10193
10274
 
10194
10275
  function SvgAuth0Logo(props) {
10195
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10276
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10196
10277
  viewBox: "0 0 256 285",
10197
10278
  xmlns: "http://www.w3.org/2000/svg"
10198
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10279
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10199
10280
  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"
10200
10281
  })));
10201
10282
  }
@@ -10206,30 +10287,45 @@ const Auth0LoginButton = ({
10206
10287
  labelClassName = "",
10207
10288
  iconClassName = ""
10208
10289
  }) => {
10209
- if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
10210
- console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10211
- }
10290
+ const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
10291
+ const auth0Script = document.querySelector("#auth0-sdk");
10292
+ const [auth0Loaded, setAuth0Loaded] = React.useState(Boolean(window.auth0));
10293
+ React__default['default'].useEffect(() => {
10294
+ function handleScriptLoaded() {
10295
+ setAuth0Loaded(true);
10296
+ }
10297
+
10298
+ if (auth0Enabled && !auth0Loaded) {
10299
+ auth0Script.addEventListener("load", handleScriptLoaded);
10300
+ }
10212
10301
 
10213
- const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10302
+ return () => {
10303
+ auth0Script.removeEventListener("load", handleScriptLoaded);
10304
+ };
10305
+ }, [auth0Script, auth0Enabled, auth0Loaded]);
10214
10306
  const auth0InstanceRef = React__default['default'].useRef(null);
10215
10307
  React__default['default'].useEffect(() => {
10216
- if (auth0Enabled) {
10308
+ if (auth0Enabled && auth0Loaded && auth0InstanceRef.current === null) {
10217
10309
  auth0InstanceRef.current = new window.auth0.WebAuth({
10218
10310
  domain: window.Pelcro.site.read().auth0_base_url,
10219
10311
  clientID: window.Pelcro.site.read().auth0_client_id
10220
10312
  });
10221
10313
  }
10222
- }, []);
10314
+ }, [auth0Enabled, auth0Loaded]);
10223
10315
  const {
10224
10316
  dispatch: loginDispatch
10225
- } = React.useContext(store$f);
10317
+ } = React.useContext(store$g);
10226
10318
  const {
10227
10319
  dispatch: registerDispatch
10228
- } = React.useContext(store$e);
10320
+ } = React.useContext(store$f);
10229
10321
 
10230
10322
  function handleClick() {
10231
10323
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
10232
10324
 
10325
+ if (!auth0Loaded) {
10326
+ return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10327
+ }
10328
+
10233
10329
  (_auth0InstanceRef$cur = auth0InstanceRef.current) === null || _auth0InstanceRef$cur === void 0 ? void 0 : (_auth0InstanceRef$cur2 = _auth0InstanceRef$cur.popup) === null || _auth0InstanceRef$cur2 === void 0 ? void 0 : (_auth0InstanceRef$cur3 = _auth0InstanceRef$cur2.authorize) === null || _auth0InstanceRef$cur3 === void 0 ? void 0 : _auth0InstanceRef$cur3.call(_auth0InstanceRef$cur2, {
10234
10330
  responseType: "token id_token",
10235
10331
  owp: true // close popup when finished
@@ -10354,19 +10450,19 @@ function LoginView(props) {
10354
10450
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10355
10451
  }
10356
10452
 
10357
- var _path$l, _path2$1, _path3;
10453
+ var _path$m, _path2$2, _path3;
10358
10454
 
10359
- 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); }
10455
+ 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); }
10360
10456
 
10361
10457
  function SvgPelcroAuthorship(props) {
10362
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
10458
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10363
10459
  xmlns: "http://www.w3.org/2000/svg",
10364
10460
  viewBox: "0 -80.652 497.072 179.991"
10365
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
10461
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10366
10462
  fill: "none",
10367
10463
  stroke: "#4a4a4a",
10368
10464
  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"
10369
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
10465
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10370
10466
  d: "M46.875-5.564h7.294c.88 0 1.805.102 2.77.307s1.844.55 2.643 1.05 1.455 1.186 1.967 2.057.768 1.96.768 3.274c0 1.144-.207 2.132-.626 2.964s-.979 1.519-1.68 2.055-1.515.935-2.428 1.196c-.921.263-1.877.394-2.88.394h-5.468v12.009h-2.36V-5.564zm2.359 11.153h5.363a8.35 8.35 0 001.966-.232c.644-.155 1.216-.405 1.715-.751s.905-.805 1.219-1.377c.308-.572.464-1.273.464-2.107 0-.811-.163-1.501-.485-2.074s-.737-1.044-1.25-1.411-1.101-.638-1.769-.805a8.16 8.16 0 00-2.001-.252h-5.218l-.004 9.01zm16.625 5.897c0-1.262.212-2.423.642-3.484a8.39 8.39 0 011.787-2.755 7.967 7.967 0 012.754-1.803c1.073-.43 2.241-.642 3.502-.642s2.425.212 3.485.642a8.25 8.25 0 012.751 1.803c.775.771 1.378 1.692 1.805 2.755s.645 2.222.645 3.484-.217 2.428-.645 3.484-1.028 1.979-1.805 2.756a8.17 8.17 0 01-2.751 1.805c-1.061.428-2.223.641-3.485.641s-2.432-.213-3.502-.641c-1.073-.436-1.989-1.034-2.754-1.805-.762-.777-1.357-1.696-1.787-2.756s-.642-2.217-.642-3.484zm2.144 0c0 .932.148 1.809.447 2.631a6.18 6.18 0 001.306 2.146c.572.605 1.263 1.089 2.073 1.446s1.716.536 2.717.536 1.905-.179 2.717-.536 1.501-.84 2.071-1.446 1.007-1.324 1.305-2.146a7.66 7.66 0 00.446-2.631c0-.926-.149-1.803-.446-2.625s-.734-1.537-1.305-2.147-1.265-1.089-2.071-1.446c-.812-.36-1.717-.538-2.717-.538s-1.906.178-2.717.538-1.501.837-2.073 1.446a6.15 6.15 0 00-1.306 2.147 7.66 7.66 0 00-.447 2.625zm17.694-8.257h2.362l4.003 13.833h.071l4.612-13.833h2.039l4.896 13.833h.072l3.897-13.833h2.145l-4.859 16.514h-2.218L97.781 6.229h-.07L93.1 19.743h-2.214L85.697 3.229zm42.076 13.408c-.834 1.261-1.865 2.165-3.093 2.715s-2.582.825-4.058.825c-1.264 0-2.408-.217-3.431-.644a7.78 7.78 0 01-2.647-1.807c-.739-.777-1.305-1.695-1.7-2.751s-.59-2.234-.59-3.521c0-1.237.204-2.384.609-3.432s.978-1.962 1.715-2.734a8.06 8.06 0 012.61-1.825c.999-.437 2.108-.66 3.323-.66 1.266 0 2.377.223 3.342.66.965.444 1.775 1.026 2.431 1.754a7.4 7.4 0 011.483 2.483c.336.929.502 1.871.502 2.824v1.5h-13.871c0 .453.093 1.033.271 1.732.177.704.504 1.389.981 2.058s1.113 1.236 1.912 1.718c.798.475 1.829.712 3.094.712 1.095 0 2.158-.259 3.181-.787s1.808-1.238 2.358-2.146l1.578 1.326zm-1.645-6.543a4.84 4.84 0 00-.448-2.072 5.46 5.46 0 00-1.214-1.697 5.813 5.813 0 00-1.822-1.166 5.87 5.87 0 00-2.233-.429c-1.168 0-2.138.239-2.914.717s-1.389 1.021-1.84 1.644-.775 1.222-.967 1.802-.285.986-.285 1.197l11.723.004zm6.933-2.218l-.035-1.126-.052-1.336-.055-1.272-.035-.914h2.146l.053 1.787c.01.574.043.943.089 1.111.548-.979 1.249-1.777 2.108-2.396s1.907-.928 3.148-.928c.212 0 .423.016.624.055l.626.121-.249 2.111a2.53 2.53 0 00-.821-.146c-.93 0-1.734.146-2.414.448s-1.238.708-1.68 1.232-.768 1.137-.983 1.842-.321 1.46-.321 2.271v9.006h-2.146l-.003-11.866zm25.845 8.761c-.836 1.261-1.866 2.165-3.092 2.715s-2.58.825-4.059.825c-1.265 0-2.407-.217-3.431-.644a7.7 7.7 0 01-2.646-1.807 7.95 7.95 0 01-1.698-2.751c-.394-1.059-.59-2.234-.59-3.521 0-1.237.2-2.384.608-3.432s.978-1.962 1.717-2.734 1.609-1.383 2.609-1.825c.999-.437 2.107-.66 3.322-.66 1.264 0 2.376.223 3.344.66.963.444 1.773 1.026 2.429 1.754a7.49 7.49 0 011.485 2.483 8.34 8.34 0 01.498 2.824v1.5h-13.869c0 .453.089 1.033.268 1.732.178.704.506 1.389.983 2.058s1.111 1.236 1.91 1.718c.8.475 1.829.712 3.092.712 1.096 0 2.158-.259 3.183-.787s1.81-1.238 2.361-2.146l1.576 1.326zm-1.643-6.543c0-.739-.147-1.432-.447-2.072a5.58 5.58 0 00-1.215-1.697 5.875 5.875 0 00-4.054-1.595c-1.171 0-2.139.239-2.914.717s-1.387 1.021-1.84 1.644-.776 1.222-.968 1.802-.288.986-.288 1.197l11.727.004zm21.38 6.756h-.073a5.427 5.427 0 01-1.249 1.48 7.44 7.44 0 01-1.627 1.04 8.182 8.182 0 01-1.84.604 9.2 9.2 0 01-1.894.199c-1.264 0-2.432-.213-3.506-.641-1.071-.436-1.988-1.034-2.751-1.805-.76-.777-1.358-1.696-1.786-2.756s-.642-2.219-.642-3.484.212-2.423.642-3.484 1.026-1.979 1.786-2.755 1.68-1.378 2.751-1.803c1.074-.43 2.242-.642 3.506-.642.618 0 1.251.065 1.894.196a8.34 8.34 0 011.84.606 7.65 7.65 0 011.627 1.038 5.58 5.58 0 011.249 1.484h.073V-7.278h2.143v27.023h-2.143V16.85zm.211-5.364c0-.926-.177-1.803-.536-2.625a6.7 6.7 0 00-1.467-2.147c-.617-.609-1.344-1.089-2.181-1.446s-1.738-.538-2.714-.538c-1.002 0-1.908.178-2.717.538s-1.504.837-2.076 1.446a6.16 6.16 0 00-1.305 2.147 7.65 7.65 0 00-.446 2.625 7.66 7.66 0 00.446 2.631c.298.822.734 1.537 1.305 2.146s1.266 1.089 2.076 1.446 1.715.536 2.717.536c.976 0 1.88-.179 2.714-.536s1.563-.84 2.181-1.446 1.109-1.324 1.467-2.146a6.5 6.5 0 00.536-2.631zm16.015-18.764h2.146V6.126h.068a5.64 5.64 0 011.255-1.484 7.606 7.606 0 011.626-1.038 8.22 8.22 0 011.84-.606 9.56 9.56 0 011.895-.196c1.263 0 2.422.212 3.486.642s1.976 1.032 2.75 1.803a8.18 8.18 0 011.806 2.755c.43 1.061.645 2.222.645 3.484s-.217 2.428-.645 3.484a8.28 8.28 0 01-1.806 2.756c-.773.777-1.691 1.376-2.75 1.805s-2.224.641-3.486.641a9.194 9.194 0 01-1.895-.199c-.644-.13-1.256-.332-1.84-.604s-1.128-.618-1.626-1.04a5.56 5.56 0 01-1.255-1.48h-.068v2.893h-2.146v-27.02zm1.932 18.764c0 .932.177 1.809.538 2.631a6.7 6.7 0 001.464 2.146 7.018 7.018 0 002.182 1.446 6.85 6.85 0 002.715.536c1.003 0 1.907-.179 2.718-.536s1.501-.84 2.071-1.446a6.12 6.12 0 001.306-2.146 7.636 7.636 0 00.447-2.631c0-.926-.148-1.803-.447-2.625s-.733-1.537-1.306-2.147-1.263-1.089-2.071-1.446-1.715-.538-2.718-.538c-.978 0-1.879.178-2.715.538a6.96 6.96 0 00-2.182 1.446 6.725 6.725 0 00-1.464 2.147 6.46 6.46 0 00-.538 2.625zm25.023 13.37c-.405 1.073-.966 1.921-1.681 2.541s-1.668.93-2.858.93a6.71 6.71 0 01-1.072-.093 8.006 8.006 0 01-1.035-.233l.21-2 .951.264a3.64 3.64 0 00.982.127c.379 0 .72-.082 1.017-.251a2.61 2.61 0 00.771-.64c.212-.262.396-.55.554-.881a9.86 9.86 0 00.409-.974l1.504-3.827-6.722-16.59h2.394l5.473 13.907 5.325-13.907h2.289l-8.511 21.627z",
10371
10467
  fill: "#4a4a4a"
10372
10468
  })), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10509,11 +10605,11 @@ function LoginModal({
10509
10605
  LoginModal.viewId = "login";
10510
10606
 
10511
10607
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10512
- store: store$e
10608
+ store: store$f
10513
10609
  }, props));
10514
10610
 
10515
10611
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10516
- store: store$e
10612
+ store: store$f
10517
10613
  }, props));
10518
10614
 
10519
10615
  const RegisterButton = ({
@@ -10533,7 +10629,7 @@ const RegisterButton = ({
10533
10629
  buttonDisabled
10534
10630
  },
10535
10631
  dispatch
10536
- } = React.useContext(store$e);
10632
+ } = React.useContext(store$f);
10537
10633
  const {
10538
10634
  t
10539
10635
  } = useTranslation("register");
@@ -10671,7 +10767,7 @@ function FirstName({
10671
10767
  }
10672
10768
 
10673
10769
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
10674
- store: store$e
10770
+ store: store$f
10675
10771
  }, props));
10676
10772
 
10677
10773
  function LastName({
@@ -10702,7 +10798,7 @@ function LastName({
10702
10798
  }
10703
10799
 
10704
10800
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
10705
- store: store$e
10801
+ store: store$f
10706
10802
  }, props));
10707
10803
 
10708
10804
  /**
@@ -10826,7 +10922,7 @@ function TextInput({
10826
10922
 
10827
10923
  const RegisterTextInput = props => {
10828
10924
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
10829
- store: store$e
10925
+ store: store$f
10830
10926
  }));
10831
10927
  };
10832
10928
 
@@ -10869,15 +10965,21 @@ function RegisterModal(props) {
10869
10965
  };
10870
10966
 
10871
10967
  const handleAfterRegistrationLogic = () => {
10872
- var _ReactGA$event;
10968
+ var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
10873
10969
 
10874
10970
  ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
10875
10971
  category: "ACTIONS",
10876
10972
  action: "Registered",
10877
10973
  nonInteraction: true
10878
- }); // If product and plan are not selected
10974
+ });
10975
+ const isEmailVerificationEnabled = (_window$Pelcro$site$r = (_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.email_verify_enabled) !== null && _window$Pelcro$site$r !== void 0 ? _window$Pelcro$site$r : false;
10976
+
10977
+ if (isEmailVerificationEnabled) {
10978
+ return switchView("email-verify");
10979
+ }
10879
10980
 
10880
10981
  if (!product && !order && !giftCode) {
10982
+ // If product and plan are not selected
10881
10983
  return resetView();
10882
10984
  } // If this is a redeem gift
10883
10985
 
@@ -11147,7 +11249,7 @@ class SelectModal extends React.Component {
11147
11249
 
11148
11250
  const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11149
11251
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11150
- const allProductsMinusMatched = allProducts.filter(product => productsThatMatchArticleTag.find(matchedProduct => matchedProduct.id !== product.id));
11252
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11151
11253
  return [productsThatMatchArticleTag, allProductsMinusMatched];
11152
11254
  }
11153
11255
  });
@@ -12836,7 +12938,7 @@ class PaypalGateWay {
12836
12938
 
12837
12939
  /** @type {PaymentStateType} */
12838
12940
 
12839
- const initialState$d = {
12941
+ const initialState$e = {
12840
12942
  disableSubmit: false,
12841
12943
  isLoading: false,
12842
12944
  disableCouponButton: false,
@@ -12855,10 +12957,10 @@ const initialState$d = {
12855
12957
  content: ""
12856
12958
  }
12857
12959
  };
12858
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
12960
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
12859
12961
  const {
12860
- Provider: Provider$d
12861
- } = store$d;
12962
+ Provider: Provider$e
12963
+ } = store$e;
12862
12964
 
12863
12965
  const PaymentMethodContainerWithoutStripe = ({
12864
12966
  style,
@@ -13849,21 +13951,21 @@ const PaymentMethodContainerWithoutStripe = ({
13849
13951
  default:
13850
13952
  return state;
13851
13953
  }
13852
- }, initialState$d);
13954
+ }, initialState$e);
13853
13955
  return /*#__PURE__*/React__default['default'].createElement("div", {
13854
13956
  style: { ...style
13855
13957
  },
13856
13958
  className: `pelcro-container pelcro-payment-container ${className}`
13857
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
13959
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
13858
13960
  value: {
13859
13961
  state,
13860
13962
  dispatch
13861
13963
  }
13862
13964
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
13863
- store: store$d,
13965
+ store: store$e,
13864
13966
  key: i
13865
13967
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13866
- store: store$d
13968
+ store: store$e
13867
13969
  })));
13868
13970
  };
13869
13971
 
@@ -13885,7 +13987,7 @@ const PaymentMethodContainer = props => {
13885
13987
  stripeAccount: window.Pelcro.site.read().account_id,
13886
13988
  locale: getPageOrDefaultLanguage()
13887
13989
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
13888
- store: store$d
13990
+ store: store$e
13889
13991
  }, props))));
13890
13992
  }
13891
13993
 
@@ -13938,7 +14040,7 @@ const PelcroPaymentRequestButton = props => {
13938
14040
  currentPlan,
13939
14041
  updatedPrice
13940
14042
  }
13941
- } = React.useContext(store$d);
14043
+ } = React.useContext(store$e);
13942
14044
 
13943
14045
  const updatePaymentRequest = () => {
13944
14046
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -13998,7 +14100,7 @@ const DiscountedPrice = props => {
13998
14100
  taxAmount,
13999
14101
  percentOff
14000
14102
  }
14001
- } = React.useContext(store$d);
14103
+ } = React.useContext(store$e);
14002
14104
  const {
14003
14105
  order,
14004
14106
  plan
@@ -14048,7 +14150,7 @@ const SubmitPaymentMethod = ({
14048
14150
  isLoading,
14049
14151
  updatedPrice
14050
14152
  }
14051
- } = React.useContext(store$d);
14153
+ } = React.useContext(store$e);
14052
14154
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
14053
14155
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
14054
14156
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -14069,17 +14171,17 @@ const SubmitPaymentMethod = ({
14069
14171
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
14070
14172
  };
14071
14173
 
14072
- var _path$k;
14174
+ var _path$l;
14073
14175
 
14074
- 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); }
14176
+ 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); }
14075
14177
 
14076
14178
  function SvgArrowLeft(props) {
14077
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14179
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
14078
14180
  xmlns: "http://www.w3.org/2000/svg",
14079
14181
  fill: "none",
14080
14182
  viewBox: "0 0 24 24",
14081
14183
  stroke: "currentColor"
14082
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14184
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
14083
14185
  strokeLinecap: "round",
14084
14186
  strokeLinejoin: "round",
14085
14187
  strokeWidth: 2,
@@ -14098,7 +14200,7 @@ const ApplyCouponButton = ({
14098
14200
  disableCouponButton
14099
14201
  },
14100
14202
  dispatch
14101
- } = React.useContext(store$d);
14203
+ } = React.useContext(store$e);
14102
14204
  const {
14103
14205
  t
14104
14206
  } = useTranslation("checkoutForm");
@@ -14132,7 +14234,7 @@ const CouponCodeField = props => {
14132
14234
  couponCode,
14133
14235
  couponError
14134
14236
  }
14135
- } = React.useContext(store$d);
14237
+ } = React.useContext(store$e);
14136
14238
 
14137
14239
  const onCouponCodeChange = e => {
14138
14240
  dispatch({
@@ -14161,17 +14263,17 @@ const CouponCodeField = props => {
14161
14263
  }, props));
14162
14264
  };
14163
14265
 
14164
- var _path$j;
14266
+ var _path$k;
14165
14267
 
14166
- 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); }
14268
+ 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); }
14167
14269
 
14168
14270
  function SvgTicket(props) {
14169
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14271
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14170
14272
  xmlns: "http://www.w3.org/2000/svg",
14171
14273
  fill: "none",
14172
14274
  viewBox: "0 0 24 24",
14173
14275
  stroke: "currentColor"
14174
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14276
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14175
14277
  strokeLinecap: "round",
14176
14278
  strokeLinejoin: "round",
14177
14279
  strokeWidth: 2,
@@ -14188,7 +14290,7 @@ const CouponCode = ({
14188
14290
  state: {
14189
14291
  enableCouponField
14190
14292
  }
14191
- } = React.useContext(store$d);
14293
+ } = React.useContext(store$e);
14192
14294
  const {
14193
14295
  t
14194
14296
  } = useTranslation("checkoutForm");
@@ -14445,7 +14547,7 @@ const PaypalSubscribeButton = props => {
14445
14547
  const {
14446
14548
  dispatch,
14447
14549
  state
14448
- } = React.useContext(store$d);
14550
+ } = React.useContext(store$e);
14449
14551
  const {
14450
14552
  product,
14451
14553
  plan,
@@ -14530,16 +14632,16 @@ const BankRedirection = () => {
14530
14632
  }));
14531
14633
  };
14532
14634
 
14533
- var _path$i;
14635
+ var _path$j;
14534
14636
 
14535
- 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); }
14637
+ 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); }
14536
14638
 
14537
14639
  function SvgLock(props) {
14538
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14640
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14539
14641
  xmlns: "http://www.w3.org/2000/svg",
14540
14642
  viewBox: "0 0 20 20",
14541
14643
  fill: "currentColor"
14542
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14644
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14543
14645
  fillRule: "evenodd",
14544
14646
  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",
14545
14647
  clipRule: "evenodd"
@@ -14556,7 +14658,7 @@ const SelectedPaymentMethod = () => {
14556
14658
  state: {
14557
14659
  isLoading
14558
14660
  }
14559
- } = React.useContext(store$d);
14661
+ } = React.useContext(store$e);
14560
14662
  const {
14561
14663
  switchView,
14562
14664
  selectedPaymentMethodId
@@ -14598,7 +14700,7 @@ const TaxAmount = () => {
14598
14700
  state: {
14599
14701
  taxAmount
14600
14702
  }
14601
- } = React.useContext(store$d);
14703
+ } = React.useContext(store$e);
14602
14704
  const {
14603
14705
  plan
14604
14706
  } = usePelcro();
@@ -14761,12 +14863,12 @@ function SubscriptionRenewModal({
14761
14863
  }
14762
14864
  SubscriptionRenewModal.viewId = "subscription-renew";
14763
14865
 
14764
- var _path$h;
14866
+ var _path$i;
14765
14867
 
14766
- 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); }
14868
+ 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); }
14767
14869
 
14768
14870
  function SvgGift(props) {
14769
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
14871
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14770
14872
  className: "plc-w-6 plc-h-6 plc-mr-2",
14771
14873
  fill: "none",
14772
14874
  stroke: "currentColor",
@@ -14775,7 +14877,7 @@ function SvgGift(props) {
14775
14877
  strokeWidth: 2,
14776
14878
  viewBox: "0 0 24 24",
14777
14879
  xmlns: "http://www.w3.org/2000/svg"
14778
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
14880
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14779
14881
  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"
14780
14882
  })));
14781
14883
  }
@@ -15106,7 +15208,7 @@ class DefaultNewsLetter extends React.Component {
15106
15208
 
15107
15209
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15108
15210
 
15109
- const initialState$c = {
15211
+ const initialState$d = {
15110
15212
  didSubToNewslettersBefore: false,
15111
15213
  newsletters: [],
15112
15214
  isListLoading: true,
@@ -15116,10 +15218,10 @@ const initialState$c = {
15116
15218
  content: ""
15117
15219
  }
15118
15220
  };
15119
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
15221
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
15120
15222
  const {
15121
- Provider: Provider$c
15122
- } = store$c;
15223
+ Provider: Provider$d
15224
+ } = store$d;
15123
15225
 
15124
15226
  const NewsletterUpdateContainer = ({
15125
15227
  style,
@@ -15232,7 +15334,7 @@ const NewsletterUpdateContainer = ({
15232
15334
  default:
15233
15335
  return state;
15234
15336
  }
15235
- }, initialState$c);
15337
+ }, initialState$d);
15236
15338
  React.useEffect(() => {
15237
15339
  const getUserNewsletters = () => {
15238
15340
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15276,7 +15378,7 @@ const NewsletterUpdateContainer = ({
15276
15378
  style: { ...style
15277
15379
  },
15278
15380
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15279
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15381
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
15280
15382
  value: {
15281
15383
  state,
15282
15384
  dispatch
@@ -15284,12 +15386,12 @@ const NewsletterUpdateContainer = ({
15284
15386
  }, children.length ? children.map((child, i) => {
15285
15387
  if (child) {
15286
15388
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
15287
- store: store$c,
15389
+ store: store$d,
15288
15390
  key: i
15289
15391
  });
15290
15392
  }
15291
15393
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15292
- store: store$c
15394
+ store: store$d
15293
15395
  })));
15294
15396
  };
15295
15397
 
@@ -15304,7 +15406,7 @@ const NewsletterUpdateButton = ({
15304
15406
  isSubmitting,
15305
15407
  isListLoading
15306
15408
  }
15307
- } = React.useContext(store$c);
15409
+ } = React.useContext(store$d);
15308
15410
  const {
15309
15411
  t
15310
15412
  } = useTranslation("newsletter");
@@ -15334,7 +15436,7 @@ const NewsletterUpdateList = () => {
15334
15436
  newsletters,
15335
15437
  isListLoading
15336
15438
  }
15337
- } = React.useContext(store$c);
15439
+ } = React.useContext(store$d);
15338
15440
 
15339
15441
  if (isListLoading) {
15340
15442
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -15538,7 +15640,7 @@ function SubscriptionCreateModal({
15538
15640
  SubscriptionCreateModal.viewId = "subscription-create";
15539
15641
 
15540
15642
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15541
- const initialState$b = {
15643
+ const initialState$c = {
15542
15644
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15543
15645
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15544
15646
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15551,10 +15653,10 @@ const initialState$b = {
15551
15653
  content: ""
15552
15654
  }
15553
15655
  };
15554
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
15656
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
15555
15657
  const {
15556
- Provider: Provider$b
15557
- } = store$b;
15658
+ Provider: Provider$c
15659
+ } = store$c;
15558
15660
 
15559
15661
  const UserUpdateContainer = ({
15560
15662
  style,
@@ -15686,27 +15788,27 @@ const UserUpdateContainer = ({
15686
15788
  default:
15687
15789
  return state;
15688
15790
  }
15689
- }, initialState$b);
15791
+ }, initialState$c);
15690
15792
  return /*#__PURE__*/React__default['default'].createElement("div", {
15691
15793
  style: { ...style
15692
15794
  },
15693
15795
  className: `pelcro-container pelcro-user-update-container ${className}`
15694
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
15796
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15695
15797
  value: {
15696
15798
  state,
15697
15799
  dispatch
15698
15800
  }
15699
15801
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
15700
- store: store$b,
15802
+ store: store$c,
15701
15803
  key: i
15702
15804
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15703
- store: store$b
15805
+ store: store$c
15704
15806
  })));
15705
15807
  };
15706
15808
 
15707
15809
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
15708
15810
  disabled: true,
15709
- store: store$b
15811
+ store: store$c
15710
15812
  }, props));
15711
15813
 
15712
15814
  const UserUpdateButton = ({
@@ -15719,7 +15821,7 @@ const UserUpdateButton = ({
15719
15821
  buttonDisabled
15720
15822
  },
15721
15823
  dispatch
15722
- } = React.useContext(store$b);
15824
+ } = React.useContext(store$c);
15723
15825
  const {
15724
15826
  t
15725
15827
  } = useTranslation("userEdit");
@@ -15736,11 +15838,11 @@ const UserUpdateButton = ({
15736
15838
  };
15737
15839
 
15738
15840
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
15739
- store: store$b
15841
+ store: store$c
15740
15842
  }, props));
15741
15843
 
15742
15844
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
15743
- store: store$b
15845
+ store: store$c
15744
15846
  }, props));
15745
15847
 
15746
15848
  function Phone({
@@ -15769,22 +15871,22 @@ function Phone({
15769
15871
  }
15770
15872
 
15771
15873
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
15772
- store: store$b
15874
+ store: store$c
15773
15875
  }, props));
15774
15876
 
15775
15877
  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";
15776
15878
 
15777
- var _path$g;
15879
+ var _path$h;
15778
15880
 
15779
- 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); }
15881
+ 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); }
15780
15882
 
15781
15883
  function SvgEdit(props) {
15782
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
15884
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
15783
15885
  className: "plc-w-6 plc-h-6",
15784
15886
  xmlns: "http://www.w3.org/2000/svg",
15785
15887
  viewBox: "0 0 20 20",
15786
15888
  fill: "currentColor"
15787
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
15889
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
15788
15890
  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"
15789
15891
  })));
15790
15892
  }
@@ -15916,16 +16018,16 @@ function DisplayName({
15916
16018
  }
15917
16019
 
15918
16020
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
15919
- store: store$b
16021
+ store: store$c
15920
16022
  }, props));
15921
16023
 
15922
16024
  const UserUpdateTextInput = props => {
15923
16025
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
15924
- store: store$b
16026
+ store: store$c
15925
16027
  }));
15926
16028
  };
15927
16029
 
15928
- const initialState$a = {
16030
+ const initialState$b = {
15929
16031
  isSubmitting: false,
15930
16032
  firstName: "",
15931
16033
  firstNameError: "",
@@ -15950,10 +16052,10 @@ const initialState$a = {
15950
16052
  content: ""
15951
16053
  }
15952
16054
  };
15953
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
16055
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
15954
16056
  const {
15955
- Provider: Provider$a
15956
- } = store$a;
16057
+ Provider: Provider$b
16058
+ } = store$b;
15957
16059
 
15958
16060
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
15959
16061
 
@@ -16160,7 +16262,7 @@ const AddressCreateContainer = ({
16160
16262
  default:
16161
16263
  return state;
16162
16264
  }
16163
- }, initialState$a);
16265
+ }, initialState$b);
16164
16266
  React.useEffect(() => {
16165
16267
  const getStates = () => {
16166
16268
  dispatch({
@@ -16192,16 +16294,16 @@ const AddressCreateContainer = ({
16192
16294
  style: { ...style
16193
16295
  },
16194
16296
  className: `pelcro-container pelcro-address-create-container ${className}`
16195
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16297
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
16196
16298
  value: {
16197
16299
  state,
16198
16300
  dispatch
16199
16301
  }
16200
16302
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16201
- store: store$a,
16303
+ store: store$b,
16202
16304
  key: i
16203
16305
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16204
- store: store$a
16306
+ store: store$b
16205
16307
  })));
16206
16308
  };
16207
16309
 
@@ -16212,7 +16314,7 @@ function AddressCreateFirstName(props) {
16212
16314
  firstName,
16213
16315
  firstNameError
16214
16316
  }
16215
- } = React.useContext(store$a);
16317
+ } = React.useContext(store$b);
16216
16318
 
16217
16319
  const handleBlur = () => {
16218
16320
  return dispatch({
@@ -16255,7 +16357,7 @@ function AddressCreateLastName(props) {
16255
16357
  lastName,
16256
16358
  lastNameError
16257
16359
  }
16258
- } = React.useContext(store$a);
16360
+ } = React.useContext(store$b);
16259
16361
 
16260
16362
  const handleBlur = () => {
16261
16363
  return dispatch({
@@ -16298,7 +16400,7 @@ function AddressCreateLine1(props) {
16298
16400
  line1,
16299
16401
  line1Error
16300
16402
  }
16301
- } = React.useContext(store$a);
16403
+ } = React.useContext(store$b);
16302
16404
 
16303
16405
  const handleBlur = () => {
16304
16406
  return dispatch({
@@ -16341,7 +16443,7 @@ function AddressCreateCity(props) {
16341
16443
  city,
16342
16444
  cityError
16343
16445
  }
16344
- } = React.useContext(store$a);
16446
+ } = React.useContext(store$b);
16345
16447
 
16346
16448
  const handleBlur = () => {
16347
16449
  return dispatch({
@@ -16384,7 +16486,7 @@ function AddressCreatePostalCode(props) {
16384
16486
  postalCode,
16385
16487
  postalCodeError
16386
16488
  }
16387
- } = React.useContext(store$a);
16489
+ } = React.useContext(store$b);
16388
16490
 
16389
16491
  const handleBlur = () => {
16390
16492
  return dispatch({
@@ -16430,7 +16532,7 @@ const AddressCreateSubmit = ({
16430
16532
  state: {
16431
16533
  isSubmitting
16432
16534
  }
16433
- } = React.useContext(store$a);
16535
+ } = React.useContext(store$b);
16434
16536
  const {
16435
16537
  t
16436
16538
  } = useTranslation("address");
@@ -16541,7 +16643,7 @@ function CountrySelect({
16541
16643
  }
16542
16644
 
16543
16645
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16544
- store: store$a
16646
+ store: store$b
16545
16647
  }, props));
16546
16648
 
16547
16649
  function StateSelect({
@@ -16629,7 +16731,7 @@ function StateSelect({
16629
16731
  }
16630
16732
 
16631
16733
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
16632
- store: store$a
16734
+ store: store$b
16633
16735
  }, props));
16634
16736
 
16635
16737
  const AddressCreateView = props => {
@@ -16734,18 +16836,18 @@ AddressCreateModal.viewId = "address-create";
16734
16836
 
16735
16837
  const AddressCreateTextInput = props => {
16736
16838
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16737
- store: store$a
16839
+ store: store$b
16738
16840
  }));
16739
16841
  };
16740
16842
 
16741
16843
  const AddressCreateLine2 = props => {
16742
16844
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
16743
16845
  fieldName: "line2",
16744
- store: store$a
16846
+ store: store$b
16745
16847
  }, props));
16746
16848
  };
16747
16849
 
16748
- const initialState$9 = {
16850
+ const initialState$a = {
16749
16851
  isSubmitting: false,
16750
16852
  firstName: "",
16751
16853
  firstNameError: "",
@@ -16770,10 +16872,10 @@ const initialState$9 = {
16770
16872
  content: ""
16771
16873
  }
16772
16874
  };
16773
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
16875
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
16774
16876
  const {
16775
- Provider: Provider$9
16776
- } = store$9;
16877
+ Provider: Provider$a
16878
+ } = store$a;
16777
16879
 
16778
16880
  const AddressUpdateContainer = ({
16779
16881
  style,
@@ -16825,7 +16927,7 @@ const AddressUpdateContainer = ({
16825
16927
  const thisAddress = addresses[address];
16826
16928
 
16827
16929
  if (+thisAddress.id === +addressId) {
16828
- const newState = { ...initialState$9,
16930
+ const newState = { ...initialState$a,
16829
16931
  firstName: thisAddress.first_name,
16830
16932
  lastName: thisAddress.last_name,
16831
16933
  line1: thisAddress.line1,
@@ -16958,7 +17060,7 @@ const AddressUpdateContainer = ({
16958
17060
  default:
16959
17061
  return state;
16960
17062
  }
16961
- }, initialState$9);
17063
+ }, initialState$a);
16962
17064
  React.useEffect(() => {
16963
17065
  const getStates = () => {
16964
17066
  dispatch({
@@ -16990,21 +17092,21 @@ const AddressUpdateContainer = ({
16990
17092
  style: { ...style
16991
17093
  },
16992
17094
  className: `pelcro-container pelcro-address-update-container ${className}`
16993
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17095
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16994
17096
  value: {
16995
17097
  state,
16996
17098
  dispatch
16997
17099
  }
16998
17100
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16999
- store: store$9,
17101
+ store: store$a,
17000
17102
  key: i
17001
17103
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17002
- store: store$9
17104
+ store: store$a
17003
17105
  })));
17004
17106
  };
17005
17107
 
17006
17108
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
17007
- store: store$9
17109
+ store: store$a
17008
17110
  }, props));
17009
17111
 
17010
17112
  function AddressUpdateFirstName(props) {
@@ -17014,7 +17116,7 @@ function AddressUpdateFirstName(props) {
17014
17116
  firstName,
17015
17117
  firstNameError
17016
17118
  }
17017
- } = React.useContext(store$9);
17119
+ } = React.useContext(store$a);
17018
17120
 
17019
17121
  const handleBlur = () => {
17020
17122
  return dispatch({
@@ -17057,7 +17159,7 @@ function AddressUpdateLastName(props) {
17057
17159
  lastName,
17058
17160
  lastNameError
17059
17161
  }
17060
- } = React.useContext(store$9);
17162
+ } = React.useContext(store$a);
17061
17163
 
17062
17164
  const handleBlur = () => {
17063
17165
  return dispatch({
@@ -17100,7 +17202,7 @@ function AddressUpdateLine1(props) {
17100
17202
  line1,
17101
17203
  line1Error
17102
17204
  }
17103
- } = React.useContext(store$9);
17205
+ } = React.useContext(store$a);
17104
17206
 
17105
17207
  const handleBlur = () => {
17106
17208
  return dispatch({
@@ -17140,7 +17242,7 @@ const AddressUpdateLine2 = props => {
17140
17242
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17141
17243
  fieldName: "line2"
17142
17244
  }, props, {
17143
- store: store$9
17245
+ store: store$a
17144
17246
  }));
17145
17247
  };
17146
17248
 
@@ -17151,7 +17253,7 @@ function AddressUpdateCity(props) {
17151
17253
  city,
17152
17254
  cityError
17153
17255
  }
17154
- } = React.useContext(store$9);
17256
+ } = React.useContext(store$a);
17155
17257
 
17156
17258
  const handleBlur = () => {
17157
17259
  return dispatch({
@@ -17194,7 +17296,7 @@ function AddressUpdatePostalCode(props) {
17194
17296
  postalCode,
17195
17297
  postalCodeError
17196
17298
  }
17197
- } = React.useContext(store$9);
17299
+ } = React.useContext(store$a);
17198
17300
 
17199
17301
  const handleBlur = () => {
17200
17302
  return dispatch({
@@ -17240,7 +17342,7 @@ const AddressUpdateSubmit = ({
17240
17342
  state: {
17241
17343
  isSubmitting
17242
17344
  }
17243
- } = React.useContext(store$9);
17345
+ } = React.useContext(store$a);
17244
17346
  const {
17245
17347
  t
17246
17348
  } = useTranslation("address");
@@ -17256,7 +17358,7 @@ const AddressUpdateSubmit = ({
17256
17358
  };
17257
17359
 
17258
17360
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17259
- store: store$9
17361
+ store: store$a
17260
17362
  }, props));
17261
17363
 
17262
17364
  const AddressUpdateView = props => {
@@ -17339,7 +17441,7 @@ AddressUpdateModal.viewId = "address-edit";
17339
17441
 
17340
17442
  const AddressUpdateTextInput = props => {
17341
17443
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17342
- store: store$9
17444
+ store: store$a
17343
17445
  }));
17344
17446
  };
17345
17447
 
@@ -17422,7 +17524,7 @@ const PaymentMethodUpdateModal = props => {
17422
17524
  };
17423
17525
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17424
17526
 
17425
- const initialState$8 = {
17527
+ const initialState$9 = {
17426
17528
  email: "",
17427
17529
  password: "",
17428
17530
  passwordError: null,
@@ -17435,10 +17537,10 @@ const initialState$8 = {
17435
17537
  content: ""
17436
17538
  }
17437
17539
  };
17438
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17540
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
17439
17541
  const {
17440
- Provider: Provider$8
17441
- } = store$8;
17542
+ Provider: Provider$9
17543
+ } = store$9;
17442
17544
 
17443
17545
  const PasswordResetContainer = ({
17444
17546
  style,
@@ -17495,7 +17597,7 @@ const PasswordResetContainer = ({
17495
17597
  type: SET_EMAIL,
17496
17598
  payload: window.Pelcro.helpers.getURLParameter("email")
17497
17599
  });
17498
- initialState$8.email = window.Pelcro.helpers.getURLParameter("email");
17600
+ initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17499
17601
  dispatch({
17500
17602
  type: SET_TOKEN,
17501
17603
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17555,26 +17657,26 @@ const PasswordResetContainer = ({
17555
17657
  default:
17556
17658
  return state;
17557
17659
  }
17558
- }, initialState$8);
17660
+ }, initialState$9);
17559
17661
  return /*#__PURE__*/React__default['default'].createElement("div", {
17560
17662
  style: { ...style
17561
17663
  },
17562
17664
  className: `pelcro-container pelcro-password-reset-container ${className}`
17563
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17665
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17564
17666
  value: {
17565
17667
  state,
17566
17668
  dispatch
17567
17669
  }
17568
17670
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17569
- store: store$8,
17671
+ store: store$9,
17570
17672
  key: i
17571
17673
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17572
- store: store$8
17674
+ store: store$9
17573
17675
  })));
17574
17676
  };
17575
17677
 
17576
17678
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
17577
- store: store$8
17679
+ store: store$9
17578
17680
  }, props));
17579
17681
 
17580
17682
  const PasswordResetButton = ({
@@ -17587,7 +17689,7 @@ const PasswordResetButton = ({
17587
17689
  buttonDisabled
17588
17690
  },
17589
17691
  dispatch
17590
- } = React.useContext(store$8);
17692
+ } = React.useContext(store$9);
17591
17693
  const {
17592
17694
  t
17593
17695
  } = useTranslation("passwordReset");
@@ -17604,14 +17706,14 @@ const PasswordResetButton = ({
17604
17706
  };
17605
17707
 
17606
17708
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17607
- store: store$8
17709
+ store: store$9
17608
17710
  }, props, {
17609
17711
  value: window.Pelcro.helpers.getURLParameter("email"),
17610
17712
  disabled: true
17611
17713
  }));
17612
17714
 
17613
17715
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
17614
- store: store$8
17716
+ store: store$9
17615
17717
  }, props));
17616
17718
 
17617
17719
  const PasswordResetView = props => {
@@ -17663,7 +17765,7 @@ const PasswordResetModal = ({
17663
17765
  };
17664
17766
  PasswordResetModal.viewId = "password-reset";
17665
17767
 
17666
- const initialState$7 = {
17768
+ const initialState$8 = {
17667
17769
  email: "",
17668
17770
  emailError: null,
17669
17771
  buttonDisabled: false,
@@ -17672,10 +17774,10 @@ const initialState$7 = {
17672
17774
  content: ""
17673
17775
  }
17674
17776
  };
17675
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17777
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17676
17778
  const {
17677
- Provider: Provider$7
17678
- } = store$7;
17779
+ Provider: Provider$8
17780
+ } = store$8;
17679
17781
 
17680
17782
  const PasswordForgotContainer = ({
17681
17783
  style,
@@ -17753,21 +17855,21 @@ const PasswordForgotContainer = ({
17753
17855
  default:
17754
17856
  return state;
17755
17857
  }
17756
- }, initialState$7);
17858
+ }, initialState$8);
17757
17859
  return /*#__PURE__*/React__default['default'].createElement("div", {
17758
17860
  style: { ...style
17759
17861
  },
17760
17862
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17761
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
17863
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17762
17864
  value: {
17763
17865
  state,
17764
17866
  dispatch
17765
17867
  }
17766
17868
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17767
- store: store$7,
17869
+ store: store$8,
17768
17870
  key: i
17769
17871
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17770
- store: store$7
17872
+ store: store$8
17771
17873
  })));
17772
17874
  };
17773
17875
 
@@ -17783,7 +17885,7 @@ const PasswordForgotButton = ({
17783
17885
  emailError
17784
17886
  },
17785
17887
  dispatch
17786
- } = React.useContext(store$7);
17888
+ } = React.useContext(store$8);
17787
17889
  const {
17788
17890
  t
17789
17891
  } = useTranslation("passwordForgot");
@@ -17804,7 +17906,7 @@ const PasswordForgotButton = ({
17804
17906
  };
17805
17907
 
17806
17908
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17807
- store: store$7
17909
+ store: store$8
17808
17910
  }, props));
17809
17911
 
17810
17912
  const PasswordForgotView = props => {
@@ -17854,7 +17956,7 @@ const PasswordForgotModal = ({
17854
17956
  };
17855
17957
  PasswordForgotModal.viewId = "password-forgot";
17856
17958
 
17857
- const initialState$6 = {
17959
+ const initialState$7 = {
17858
17960
  currentPassword: "",
17859
17961
  newPassword: "",
17860
17962
  confirmNewPassword: "",
@@ -17868,10 +17970,10 @@ const initialState$6 = {
17868
17970
  content: ""
17869
17971
  }
17870
17972
  };
17871
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
17973
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17872
17974
  const {
17873
- Provider: Provider$6
17874
- } = store$6;
17975
+ Provider: Provider$7
17976
+ } = store$7;
17875
17977
  const PasswordChangeContainer = ({
17876
17978
  style,
17877
17979
  className = "",
@@ -18023,21 +18125,21 @@ const PasswordChangeContainer = ({
18023
18125
  default:
18024
18126
  return state;
18025
18127
  }
18026
- }, initialState$6);
18128
+ }, initialState$7);
18027
18129
  return /*#__PURE__*/React__default['default'].createElement("div", {
18028
18130
  style: { ...style
18029
18131
  },
18030
18132
  className: `pelcro-container pelcro-password-change-container ${className}`
18031
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18133
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
18032
18134
  value: {
18033
18135
  state,
18034
18136
  dispatch
18035
18137
  }
18036
18138
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18037
- store: store$6,
18139
+ store: store$7,
18038
18140
  key: i
18039
18141
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18040
- store: store$6
18142
+ store: store$7
18041
18143
  })));
18042
18144
  };
18043
18145
 
@@ -18048,7 +18150,7 @@ function PasswordChangeCurrentPassword(props) {
18048
18150
  currentPassword,
18049
18151
  currentPasswordError
18050
18152
  }
18051
- } = React.useContext(store$6);
18153
+ } = React.useContext(store$7);
18052
18154
  const handleBlur = React.useCallback(() => {
18053
18155
  return dispatch({
18054
18156
  type: VALIDATE_PASSWORD
@@ -18082,7 +18184,7 @@ function PasswordChangeNewPassword(props) {
18082
18184
  newPassword,
18083
18185
  newPasswordError
18084
18186
  }
18085
- } = React.useContext(store$6);
18187
+ } = React.useContext(store$7);
18086
18188
  const handleBlur = React.useCallback(() => {
18087
18189
  return dispatch({
18088
18190
  type: VALIDATE_NEW_PASSWORD
@@ -18116,7 +18218,7 @@ function PasswordChangeConfirmNewPassword(props) {
18116
18218
  confirmNewPassword,
18117
18219
  confirmNewPasswordError
18118
18220
  }
18119
- } = React.useContext(store$6);
18221
+ } = React.useContext(store$7);
18120
18222
  const handleBlur = React.useCallback(() => {
18121
18223
  return dispatch({
18122
18224
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18157,7 +18259,7 @@ const PasswordChangeButton = ({
18157
18259
  confirmNewPasswordError
18158
18260
  },
18159
18261
  dispatch
18160
- } = React.useContext(store$6);
18262
+ } = React.useContext(store$7);
18161
18263
  const {
18162
18264
  t
18163
18265
  } = useTranslation("passwordChange");
@@ -18223,17 +18325,17 @@ const PasswordChangeModal = ({
18223
18325
  };
18224
18326
  PasswordChangeModal.viewId = "password-change";
18225
18327
 
18226
- const initialState$5 = {
18328
+ const initialState$6 = {
18227
18329
  buttonDisabled: false,
18228
18330
  alert: {
18229
18331
  type: "error",
18230
18332
  content: ""
18231
18333
  }
18232
18334
  };
18233
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18335
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
18234
18336
  const {
18235
- Provider: Provider$5
18236
- } = store$5;
18337
+ Provider: Provider$6
18338
+ } = store$6;
18237
18339
 
18238
18340
  const CartContainer = ({
18239
18341
  style,
@@ -18324,21 +18426,21 @@ const CartContainer = ({
18324
18426
  default:
18325
18427
  return state;
18326
18428
  }
18327
- }, initialState$5);
18429
+ }, initialState$6);
18328
18430
  return /*#__PURE__*/React__default['default'].createElement("div", {
18329
18431
  style: { ...style
18330
18432
  },
18331
18433
  className: `pelcro-container pelcro-cart-container ${className}`
18332
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18434
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18333
18435
  value: {
18334
18436
  state,
18335
18437
  dispatch
18336
18438
  }
18337
18439
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18338
- store: store$5,
18440
+ store: store$6,
18339
18441
  key: i
18340
18442
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18341
- store: store$5
18443
+ store: store$6
18342
18444
  })));
18343
18445
  };
18344
18446
 
@@ -18375,7 +18477,7 @@ const CartSubmit = ({
18375
18477
  buttonDisabled
18376
18478
  },
18377
18479
  dispatch
18378
- } = React.useContext(store$5);
18480
+ } = React.useContext(store$6);
18379
18481
  const {
18380
18482
  t
18381
18483
  } = useTranslation("cart");
@@ -18406,7 +18508,7 @@ const CartTotalPrice = () => {
18406
18508
  state: {
18407
18509
  alert
18408
18510
  }
18409
- } = React.useContext(store$5);
18511
+ } = React.useContext(store$6);
18410
18512
  const {
18411
18513
  cartItems
18412
18514
  } = usePelcro();
@@ -18719,7 +18821,7 @@ const OrderConfirmModal = props => {
18719
18821
  };
18720
18822
  OrderConfirmModal.viewId = "order-confirm";
18721
18823
 
18722
- const initialState$4 = {
18824
+ const initialState$5 = {
18723
18825
  email: "",
18724
18826
  firstName: "",
18725
18827
  lastName: "",
@@ -18731,10 +18833,10 @@ const initialState$4 = {
18731
18833
  content: ""
18732
18834
  }
18733
18835
  };
18734
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
18836
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18735
18837
  const {
18736
- Provider: Provider$4
18737
- } = store$4;
18838
+ Provider: Provider$5
18839
+ } = store$5;
18738
18840
 
18739
18841
  const GiftCreateContainer = ({
18740
18842
  style,
@@ -18838,21 +18940,21 @@ const GiftCreateContainer = ({
18838
18940
  default:
18839
18941
  return state;
18840
18942
  }
18841
- }, initialState$4);
18943
+ }, initialState$5);
18842
18944
  return /*#__PURE__*/React__default['default'].createElement("div", {
18843
18945
  style: { ...style
18844
18946
  },
18845
18947
  className: `pelcro-container pelcro-gift-create-container ${className}`
18846
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
18948
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18847
18949
  value: {
18848
18950
  state,
18849
18951
  dispatch
18850
18952
  }
18851
18953
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18852
- store: store$4,
18954
+ store: store$5,
18853
18955
  key: i
18854
18956
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18855
- store: store$4
18957
+ store: store$5
18856
18958
  })));
18857
18959
  };
18858
18960
 
@@ -18866,7 +18968,7 @@ const GiftCreateSubmitButton = ({
18866
18968
  state: {
18867
18969
  disableSubmit
18868
18970
  }
18869
- } = React.useContext(store$4);
18971
+ } = React.useContext(store$5);
18870
18972
  const {
18871
18973
  t
18872
18974
  } = useTranslation("register");
@@ -18883,29 +18985,29 @@ const GiftCreateSubmitButton = ({
18883
18985
 
18884
18986
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18885
18987
  initWithUserEmail: false,
18886
- store: store$4
18988
+ store: store$5
18887
18989
  }, props));
18888
18990
 
18889
18991
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
18890
- store: store$4
18992
+ store: store$5
18891
18993
  }, props));
18892
18994
 
18893
18995
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
18894
- store: store$4
18996
+ store: store$5
18895
18997
  }, props));
18896
18998
 
18897
- var _path$f;
18999
+ var _path$g;
18898
19000
 
18899
- 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); }
19001
+ 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); }
18900
19002
 
18901
19003
  function SvgInfoCircle(props) {
18902
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
19004
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
18903
19005
  xmlns: "http://www.w3.org/2000/svg",
18904
19006
  className: "plc-w-5 plc-h-5",
18905
19007
  fill: "none",
18906
19008
  viewBox: "0 0 24 24",
18907
19009
  stroke: "currentColor"
18908
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
19010
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
18909
19011
  strokeLinecap: "round",
18910
19012
  strokeLinejoin: "round",
18911
19013
  strokeWidth: 2,
@@ -18976,7 +19078,7 @@ const GiftCreateStartDate = props => {
18976
19078
  const {
18977
19079
  dispatch,
18978
19080
  state
18979
- } = React.useContext(store$4);
19081
+ } = React.useContext(store$5);
18980
19082
 
18981
19083
  const handleInputChange = value => {
18982
19084
  dispatch({
@@ -19047,7 +19149,7 @@ function GiftCreateMessage(props) {
19047
19149
  const {
19048
19150
  dispatch,
19049
19151
  state
19050
- } = React.useContext(store$4);
19152
+ } = React.useContext(store$5);
19051
19153
 
19052
19154
  const handleInputChange = value => {
19053
19155
  dispatch({
@@ -19167,7 +19269,7 @@ const GiftCreateModal = ({
19167
19269
  };
19168
19270
  GiftCreateModal.viewId = "gift-create";
19169
19271
 
19170
- const initialState$3 = {
19272
+ const initialState$4 = {
19171
19273
  giftCode: "",
19172
19274
  buttonDisabled: true,
19173
19275
  alert: {
@@ -19175,10 +19277,10 @@ const initialState$3 = {
19175
19277
  content: ""
19176
19278
  }
19177
19279
  };
19178
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19280
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
19179
19281
  const {
19180
- Provider: Provider$3
19181
- } = store$3;
19282
+ Provider: Provider$4
19283
+ } = store$4;
19182
19284
 
19183
19285
  const GiftRedeemContainer = ({
19184
19286
  style,
@@ -19243,21 +19345,21 @@ const GiftRedeemContainer = ({
19243
19345
  default:
19244
19346
  return state;
19245
19347
  }
19246
- }, initialState$3);
19348
+ }, initialState$4);
19247
19349
  return /*#__PURE__*/React__default['default'].createElement("div", {
19248
19350
  style: { ...style
19249
19351
  },
19250
19352
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19251
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19353
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
19252
19354
  value: {
19253
19355
  state,
19254
19356
  dispatch
19255
19357
  }
19256
19358
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19257
- store: store$3,
19359
+ store: store$4,
19258
19360
  key: i
19259
19361
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19260
- store: store$3
19362
+ store: store$4
19261
19363
  })));
19262
19364
  };
19263
19365
 
@@ -19294,7 +19396,7 @@ function GiftCode({
19294
19396
  }
19295
19397
 
19296
19398
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
19297
- store: store$3
19399
+ store: store$4
19298
19400
  }, props));
19299
19401
 
19300
19402
  const GiftRedeemSubmitButton = ({
@@ -19307,7 +19409,7 @@ const GiftRedeemSubmitButton = ({
19307
19409
  state: {
19308
19410
  disableSubmit
19309
19411
  }
19310
- } = React.useContext(store$3);
19412
+ } = React.useContext(store$4);
19311
19413
  const {
19312
19414
  t
19313
19415
  } = useTranslation("register");
@@ -19400,7 +19502,7 @@ const moveDefaultAddressToStart = addresses => {
19400
19502
  return [defaultAddress, ...addressesWithoutDefault];
19401
19503
  };
19402
19504
 
19403
- const initialState$2 = {
19505
+ const initialState$3 = {
19404
19506
  addresses: [],
19405
19507
  selectedAddressId: null,
19406
19508
  isSubmitting: false,
@@ -19409,10 +19511,10 @@ const initialState$2 = {
19409
19511
  content: ""
19410
19512
  }
19411
19513
  };
19412
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19514
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19413
19515
  const {
19414
- Provider: Provider$2
19415
- } = store$2;
19516
+ Provider: Provider$3
19517
+ } = store$3;
19416
19518
 
19417
19519
  const AddressSelectContainer = ({
19418
19520
  style,
@@ -19507,7 +19609,7 @@ const AddressSelectContainer = ({
19507
19609
  default:
19508
19610
  return state;
19509
19611
  }
19510
- }, initialState$2);
19612
+ }, initialState$3);
19511
19613
  React.useEffect(() => {
19512
19614
  var _window$Pelcro$user$r;
19513
19615
 
@@ -19520,16 +19622,16 @@ const AddressSelectContainer = ({
19520
19622
  style: { ...style
19521
19623
  },
19522
19624
  className: `pelcro-container pelcro-address-select-container ${className}`
19523
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19625
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19524
19626
  value: {
19525
19627
  state,
19526
19628
  dispatch
19527
19629
  }
19528
19630
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19529
- store: store$2,
19631
+ store: store$3,
19530
19632
  key: i
19531
19633
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19532
- store: store$2
19634
+ store: store$3
19533
19635
  })));
19534
19636
  };
19535
19637
 
@@ -19540,7 +19642,7 @@ const AddressSelectList = () => {
19540
19642
  addresses,
19541
19643
  selectedAddressId
19542
19644
  }
19543
- } = React.useContext(store$2);
19645
+ } = React.useContext(store$3);
19544
19646
 
19545
19647
  const handleAddressSelect = event => {
19546
19648
  dispatch({
@@ -19584,7 +19686,7 @@ const AddressSelectSubmit = ({
19584
19686
  selectedAddressId,
19585
19687
  isSubmitting
19586
19688
  }
19587
- } = React.useContext(store$2);
19689
+ } = React.useContext(store$3);
19588
19690
  const {
19589
19691
  t
19590
19692
  } = useTranslation("address");
@@ -19672,10 +19774,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19672
19774
 
19673
19775
  const defaultPaymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.source;
19674
19776
  const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
19777
+
19778
+ if (defaultPaymentMethod.status !== "chargeable") {
19779
+ return paymentMethodsWithoutDefault;
19780
+ }
19781
+
19675
19782
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19676
19783
  };
19677
19784
 
19678
- const initialState$1 = {
19785
+ const initialState$2 = {
19679
19786
  paymentMethods: [],
19680
19787
  selectedPaymentMethodId: null,
19681
19788
  isSubmitting: false,
@@ -19684,10 +19791,10 @@ const initialState$1 = {
19684
19791
  content: ""
19685
19792
  }
19686
19793
  };
19687
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
19794
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19688
19795
  const {
19689
- Provider: Provider$1
19690
- } = store$1;
19796
+ Provider: Provider$2
19797
+ } = store$2;
19691
19798
 
19692
19799
  const PaymentMethodSelectContainer = ({
19693
19800
  style,
@@ -19732,7 +19839,7 @@ const PaymentMethodSelectContainer = ({
19732
19839
  default:
19733
19840
  return state;
19734
19841
  }
19735
- }, initialState$1);
19842
+ }, initialState$2);
19736
19843
  React.useEffect(() => {
19737
19844
  var _window$Pelcro$user$r4;
19738
19845
 
@@ -19745,16 +19852,16 @@ const PaymentMethodSelectContainer = ({
19745
19852
  style: { ...style
19746
19853
  },
19747
19854
  className: `pelcro-container pelcro-payment-select-container ${className}`
19748
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
19855
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19749
19856
  value: {
19750
19857
  state,
19751
19858
  dispatch
19752
19859
  }
19753
19860
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19754
- store: store$1,
19861
+ store: store$2,
19755
19862
  key: i
19756
19863
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19757
- store: store$1
19864
+ store: store$2
19758
19865
  })));
19759
19866
  };
19760
19867
 
@@ -19768,7 +19875,7 @@ const PaymentMethodSelectList = () => {
19768
19875
  paymentMethods,
19769
19876
  selectedPaymentMethodId
19770
19877
  }
19771
- } = React.useContext(store$1);
19878
+ } = React.useContext(store$2);
19772
19879
 
19773
19880
  const handlePaymentMethodSelect = event => {
19774
19881
  dispatch({
@@ -19818,7 +19925,7 @@ const PaymentMethodSelectSubmit = ({
19818
19925
  selectedPaymentMethodId,
19819
19926
  isSubmitting
19820
19927
  }
19821
- } = React.useContext(store$1);
19928
+ } = React.useContext(store$2);
19822
19929
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
19823
19930
  onClick: () => {
19824
19931
  dispatch({
@@ -19892,8 +19999,8 @@ const PaymentMethodSelectModal = ({
19892
19999
  };
19893
20000
  PaymentMethodSelectModal.viewId = "payment-method-select";
19894
20001
 
19895
- function _extends$g() {
19896
- _extends$g = Object.assign || function (target) {
20002
+ function _extends$h() {
20003
+ _extends$h = Object.assign || function (target) {
19897
20004
  for (var i = 1; i < arguments.length; i++) {
19898
20005
  var source = arguments[i];
19899
20006
 
@@ -19907,7 +20014,7 @@ function _extends$g() {
19907
20014
  return target;
19908
20015
  };
19909
20016
 
19910
- return _extends$g.apply(this, arguments);
20017
+ return _extends$h.apply(this, arguments);
19911
20018
  }
19912
20019
 
19913
20020
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -20091,7 +20198,7 @@ function render(props, propsBag, defaultTag, features, visible) {
20091
20198
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
20092
20199
  return null;
20093
20200
  }, _match[RenderStrategy.Hidden] = function () {
20094
- return _render(_extends$g({}, _rest, {
20201
+ return _render(_extends$h({}, _rest, {
20095
20202
  hidden: true,
20096
20203
  style: {
20097
20204
  display: 'none'
@@ -20619,7 +20726,7 @@ function TransitionChild(props) {
20619
20726
  var passthroughProps = rest;
20620
20727
  return React__default['default'].createElement(NestingContext.Provider, {
20621
20728
  value: nesting
20622
- }, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20729
+ }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20623
20730
  }
20624
20731
 
20625
20732
  function Transition(props) {
@@ -20663,7 +20770,7 @@ function Transition(props) {
20663
20770
  value: nestingBag
20664
20771
  }, React__default['default'].createElement(TransitionContext.Provider, {
20665
20772
  value: transitionBag
20666
- }, render(_extends$g({}, sharedProps, {
20773
+ }, render(_extends$h({}, sharedProps, {
20667
20774
  as: React.Fragment,
20668
20775
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20669
20776
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20790,12 +20897,12 @@ var ActionTypes;
20790
20897
  })(ActionTypes || (ActionTypes = {}));
20791
20898
 
20792
20899
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20793
- return _extends$g({}, state, {
20900
+ return _extends$h({}, state, {
20794
20901
  activeItemIndex: null,
20795
20902
  menuState: MenuStates.Closed
20796
20903
  });
20797
20904
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20798
- return _extends$g({}, state, {
20905
+ return _extends$h({}, state, {
20799
20906
  menuState: MenuStates.Open
20800
20907
  });
20801
20908
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20814,7 +20921,7 @@ var ActionTypes;
20814
20921
  }
20815
20922
  });
20816
20923
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20817
- return _extends$g({}, state, {
20924
+ return _extends$h({}, state, {
20818
20925
  searchQuery: '',
20819
20926
  activeItemIndex: activeItemIndex
20820
20927
  });
@@ -20825,19 +20932,19 @@ var ActionTypes;
20825
20932
 
20826
20933
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20827
20934
  });
20828
- if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
20935
+ if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
20829
20936
  searchQuery: searchQuery
20830
20937
  });
20831
- return _extends$g({}, state, {
20938
+ return _extends$h({}, state, {
20832
20939
  searchQuery: searchQuery,
20833
20940
  activeItemIndex: match
20834
20941
  });
20835
20942
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20836
- return _extends$g({}, state, {
20943
+ return _extends$h({}, state, {
20837
20944
  searchQuery: ''
20838
20945
  });
20839
20946
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20840
- return _extends$g({}, state, {
20947
+ return _extends$h({}, state, {
20841
20948
  items: [].concat(state.items, [{
20842
20949
  id: action.id,
20843
20950
  dataRef: action.dataRef
@@ -20850,7 +20957,7 @@ var ActionTypes;
20850
20957
  return a.id === action.id;
20851
20958
  });
20852
20959
  if (idx !== -1) nextItems.splice(idx, 1);
20853
- return _extends$g({}, state, {
20960
+ return _extends$h({}, state, {
20854
20961
  items: nextItems,
20855
20962
  activeItemIndex: function () {
20856
20963
  if (idx === state.activeItemIndex) return null;
@@ -20889,19 +20996,19 @@ var ActionTypes$1;
20889
20996
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20890
20997
  if (state.disabled) return state;
20891
20998
  if (state.listboxState === ListboxStates.Closed) return state;
20892
- return _extends$g({}, state, {
20999
+ return _extends$h({}, state, {
20893
21000
  activeOptionIndex: null,
20894
21001
  listboxState: ListboxStates.Closed
20895
21002
  });
20896
21003
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20897
21004
  if (state.disabled) return state;
20898
21005
  if (state.listboxState === ListboxStates.Open) return state;
20899
- return _extends$g({}, state, {
21006
+ return _extends$h({}, state, {
20900
21007
  listboxState: ListboxStates.Open
20901
21008
  });
20902
21009
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20903
21010
  if (state.disabled === action.disabled) return state;
20904
- return _extends$g({}, state, {
21011
+ return _extends$h({}, state, {
20905
21012
  disabled: action.disabled
20906
21013
  });
20907
21014
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -20922,7 +21029,7 @@ var ActionTypes$1;
20922
21029
  }
20923
21030
  });
20924
21031
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
20925
- return _extends$g({}, state, {
21032
+ return _extends$h({}, state, {
20926
21033
  searchQuery: '',
20927
21034
  activeOptionIndex: activeOptionIndex
20928
21035
  });
@@ -20935,10 +21042,10 @@ var ActionTypes$1;
20935
21042
 
20936
21043
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
20937
21044
  });
20938
- if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
21045
+ if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
20939
21046
  searchQuery: searchQuery
20940
21047
  });
20941
- return _extends$g({}, state, {
21048
+ return _extends$h({}, state, {
20942
21049
  searchQuery: searchQuery,
20943
21050
  activeOptionIndex: match
20944
21051
  });
@@ -20946,11 +21053,11 @@ var ActionTypes$1;
20946
21053
  if (state.disabled) return state;
20947
21054
  if (state.listboxState === ListboxStates.Closed) return state;
20948
21055
  if (state.searchQuery === '') return state;
20949
- return _extends$g({}, state, {
21056
+ return _extends$h({}, state, {
20950
21057
  searchQuery: ''
20951
21058
  });
20952
21059
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
20953
- return _extends$g({}, state, {
21060
+ return _extends$h({}, state, {
20954
21061
  options: [].concat(state.options, [{
20955
21062
  id: action.id,
20956
21063
  dataRef: action.dataRef
@@ -20963,7 +21070,7 @@ var ActionTypes$1;
20963
21070
  return a.id === action.id;
20964
21071
  });
20965
21072
  if (idx !== -1) nextOptions.splice(idx, 1);
20966
- return _extends$g({}, state, {
21073
+ return _extends$h({}, state, {
20967
21074
  options: nextOptions,
20968
21075
  activeOptionIndex: function () {
20969
21076
  if (idx === state.activeOptionIndex) return null;
@@ -21024,18 +21131,18 @@ const getPaymentCardIcon = name => {
21024
21131
  }));
21025
21132
  };
21026
21133
 
21027
- var _path$e;
21134
+ var _path$f;
21028
21135
 
21029
- 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); }
21136
+ 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); }
21030
21137
 
21031
21138
  function SvgChevronRight(props) {
21032
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21139
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
21033
21140
  className: "plc-w-6 plc-h-6",
21034
21141
  xmlns: "http://www.w3.org/2000/svg",
21035
21142
  fill: "none",
21036
21143
  viewBox: "0 0 24 24",
21037
21144
  stroke: "currentColor"
21038
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21145
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
21039
21146
  strokeLinecap: "round",
21040
21147
  strokeLinejoin: "round",
21041
21148
  strokeWidth: 2,
@@ -21251,18 +21358,18 @@ const SavedItems = ({
21251
21358
  });
21252
21359
  };
21253
21360
 
21254
- var _path$d;
21361
+ var _path$e;
21255
21362
 
21256
- 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); }
21363
+ 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); }
21257
21364
 
21258
21365
  function SvgRefresh(props) {
21259
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21366
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21260
21367
  className: "plc-w-4 plc-h-4 plc-mr-1",
21261
21368
  xmlns: "http://www.w3.org/2000/svg",
21262
21369
  fill: "none",
21263
21370
  viewBox: "0 0 24 24",
21264
21371
  stroke: "currentColor"
21265
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21372
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21266
21373
  strokeLinecap: "round",
21267
21374
  strokeLinejoin: "round",
21268
21375
  strokeWidth: 2,
@@ -21270,35 +21377,35 @@ function SvgRefresh(props) {
21270
21377
  })));
21271
21378
  }
21272
21379
 
21273
- var _path$c;
21380
+ var _path$d;
21274
21381
 
21275
- 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); }
21382
+ 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); }
21276
21383
 
21277
21384
  function SvgCalendar(props) {
21278
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21385
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21279
21386
  xmlns: "http://www.w3.org/2000/svg",
21280
21387
  className: "plc-h-4 plc-w-4 plc-mr-1",
21281
21388
  viewBox: "0 0 20 20",
21282
21389
  fill: "currentColor"
21283
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21390
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21284
21391
  fillRule: "evenodd",
21285
21392
  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",
21286
21393
  clipRule: "evenodd"
21287
21394
  })));
21288
21395
  }
21289
21396
 
21290
- var _path$b;
21397
+ var _path$c;
21291
21398
 
21292
- 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); }
21399
+ 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); }
21293
21400
 
21294
21401
  function SvgPlus(props) {
21295
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21402
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21296
21403
  className: "plc-w-5 plc-h-5",
21297
21404
  xmlns: "http://www.w3.org/2000/svg",
21298
21405
  fill: "none",
21299
21406
  viewBox: "0 0 24 24",
21300
21407
  stroke: "currentColor"
21301
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21408
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21302
21409
  strokeLinecap: "round",
21303
21410
  strokeLinejoin: "round",
21304
21411
  strokeWidth: 2,
@@ -21306,17 +21413,17 @@ function SvgPlus(props) {
21306
21413
  })));
21307
21414
  }
21308
21415
 
21309
- var _path$a;
21416
+ var _path$b;
21310
21417
 
21311
- 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); }
21418
+ 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); }
21312
21419
 
21313
21420
  function SvgCheckMark(props) {
21314
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21421
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21315
21422
  className: "plc-w-4 plc-h-4 plc-mr-1",
21316
21423
  xmlns: "http://www.w3.org/2000/svg",
21317
21424
  viewBox: "0 0 20 20",
21318
21425
  fill: "currentColor"
21319
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21426
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21320
21427
  fillRule: "evenodd",
21321
21428
  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",
21322
21429
  clipRule: "evenodd"
@@ -21378,12 +21485,20 @@ const SubscriptionsItems = ({
21378
21485
  const {
21379
21486
  t
21380
21487
  } = useTranslation("dashboard");
21488
+ const {
21489
+ switchView,
21490
+ isAuthenticated
21491
+ } = usePelcro();
21381
21492
  const subs = getNonDonationSubs();
21382
21493
  if (subs.length === 0) return null;
21383
21494
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21384
21495
  const isActive = activeMenu === sub.id; // Cancel button click handlers
21385
21496
 
21386
21497
  const onCancelClick = () => {
21498
+ if (userMustVerifyEmail()) {
21499
+ return switchView("email-verify");
21500
+ }
21501
+
21387
21502
  onClose === null || onClose === void 0 ? void 0 : onClose();
21388
21503
  notify.confirm((onSuccess, onFailure) => {
21389
21504
  cancelSubscription(sub.id, onSuccess, onFailure);
@@ -21399,6 +21514,10 @@ const SubscriptionsItems = ({
21399
21514
 
21400
21515
 
21401
21516
  const onReactivateClick = () => {
21517
+ if (userMustVerifyEmail()) {
21518
+ return switchView("email-verify");
21519
+ }
21520
+
21402
21521
  reactivateSubscription(sub.id);
21403
21522
  }; // Renew click
21404
21523
 
@@ -21599,18 +21718,18 @@ Accordion.item = function AccordionItem({
21599
21718
  }, content)) : null;
21600
21719
  };
21601
21720
 
21602
- var _path$9;
21721
+ var _path$a;
21603
21722
 
21604
- 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); }
21723
+ 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); }
21605
21724
 
21606
21725
  function SvgExit(props) {
21607
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21726
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21608
21727
  className: "plc-w-6 plc-h-6",
21609
21728
  xmlns: "http://www.w3.org/2000/svg",
21610
21729
  fill: "none",
21611
21730
  viewBox: "0 0 24 24",
21612
21731
  stroke: "currentColor"
21613
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21732
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21614
21733
  strokeLinecap: "round",
21615
21734
  strokeLinejoin: "round",
21616
21735
  strokeWidth: 2,
@@ -21618,17 +21737,17 @@ function SvgExit(props) {
21618
21737
  })));
21619
21738
  }
21620
21739
 
21621
- var _path$8;
21740
+ var _path$9;
21622
21741
 
21623
- 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); }
21742
+ 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); }
21624
21743
 
21625
21744
  function SvgUser(props) {
21626
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21745
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21627
21746
  xmlns: "http://www.w3.org/2000/svg",
21628
21747
  fill: "none",
21629
21748
  viewBox: "0 0 24 24",
21630
21749
  stroke: "currentColor"
21631
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21750
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21632
21751
  strokeLinecap: "round",
21633
21752
  strokeLinejoin: "round",
21634
21753
  strokeWidth: 2,
@@ -21636,18 +21755,18 @@ function SvgUser(props) {
21636
21755
  })));
21637
21756
  }
21638
21757
 
21639
- var _path$7;
21758
+ var _path$8;
21640
21759
 
21641
- 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); }
21760
+ 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); }
21642
21761
 
21643
21762
  function SvgNewsletter(props) {
21644
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21763
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21645
21764
  xmlns: "http://www.w3.org/2000/svg",
21646
21765
  className: "plc-h-5 plc-w-5",
21647
21766
  fill: "none",
21648
21767
  viewBox: "0 0 24 24",
21649
21768
  stroke: "currentColor"
21650
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21769
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21651
21770
  strokeLinecap: "round",
21652
21771
  strokeLinejoin: "round",
21653
21772
  strokeWidth: 2,
@@ -21655,18 +21774,18 @@ function SvgNewsletter(props) {
21655
21774
  })));
21656
21775
  }
21657
21776
 
21658
- var _path$6;
21777
+ var _path$7;
21659
21778
 
21660
- 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); }
21779
+ 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); }
21661
21780
 
21662
21781
  function SvgPaymentCard(props) {
21663
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21782
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21664
21783
  className: "plc-w-6 plc-h-6 plc-mr-2",
21665
21784
  xmlns: "http://www.w3.org/2000/svg",
21666
21785
  fill: "none",
21667
21786
  viewBox: "0 0 24 24",
21668
21787
  stroke: "currentColor"
21669
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21788
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21670
21789
  strokeLinecap: "round",
21671
21790
  strokeLinejoin: "round",
21672
21791
  strokeWidth: 2,
@@ -21674,23 +21793,23 @@ function SvgPaymentCard(props) {
21674
21793
  })));
21675
21794
  }
21676
21795
 
21677
- var _path$5, _path2;
21796
+ var _path$6, _path2$1;
21678
21797
 
21679
- 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); }
21798
+ 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); }
21680
21799
 
21681
21800
  function SvgLocationPin(props) {
21682
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21801
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21683
21802
  className: "plc-w-6 plc-h-6 plc-mr-2",
21684
21803
  xmlns: "http://www.w3.org/2000/svg",
21685
21804
  fill: "none",
21686
21805
  viewBox: "0 0 24 24",
21687
21806
  stroke: "currentColor"
21688
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21807
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21689
21808
  strokeLinecap: "round",
21690
21809
  strokeLinejoin: "round",
21691
21810
  strokeWidth: 2,
21692
21811
  d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
21693
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
21812
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
21694
21813
  strokeLinecap: "round",
21695
21814
  strokeLinejoin: "round",
21696
21815
  strokeWidth: 2,
@@ -21700,10 +21819,10 @@ function SvgLocationPin(props) {
21700
21819
 
21701
21820
  var _switch;
21702
21821
 
21703
- 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); }
21822
+ 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); }
21704
21823
 
21705
21824
  function SvgSubscription(props) {
21706
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21825
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21707
21826
  xmlns: "http://www.w3.org/2000/svg",
21708
21827
  viewBox: "0 0 100 125",
21709
21828
  fill: "currentColor"
@@ -21718,18 +21837,18 @@ function SvgSubscription(props) {
21718
21837
  }))))));
21719
21838
  }
21720
21839
 
21721
- var _path$4;
21840
+ var _path$5;
21722
21841
 
21723
- 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); }
21842
+ 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); }
21724
21843
 
21725
21844
  function SvgShopping(props) {
21726
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21845
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21727
21846
  className: "plc-w-6 plc-h-6 plc-mr-2",
21728
21847
  xmlns: "http://www.w3.org/2000/svg",
21729
21848
  fill: "none",
21730
21849
  viewBox: "0 0 24 24",
21731
21850
  stroke: "currentColor"
21732
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21851
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21733
21852
  strokeLinecap: "round",
21734
21853
  strokeLinejoin: "round",
21735
21854
  strokeWidth: 2,
@@ -21737,18 +21856,18 @@ function SvgShopping(props) {
21737
21856
  })));
21738
21857
  }
21739
21858
 
21740
- var _path$3;
21859
+ var _path$4;
21741
21860
 
21742
- 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); }
21861
+ 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); }
21743
21862
 
21744
21863
  function SvgBookmark(props) {
21745
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21864
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21746
21865
  className: "plc-w-6 plc-h-6 plc-mr-2",
21747
21866
  xmlns: "http://www.w3.org/2000/svg",
21748
21867
  fill: "none",
21749
21868
  viewBox: "0 0 24 24",
21750
21869
  stroke: "currentColor"
21751
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21870
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21752
21871
  strokeLinecap: "round",
21753
21872
  strokeLinejoin: "round",
21754
21873
  strokeWidth: 2,
@@ -21756,33 +21875,33 @@ function SvgBookmark(props) {
21756
21875
  })));
21757
21876
  }
21758
21877
 
21759
- var _path$2;
21878
+ var _path$3;
21760
21879
 
21761
- 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); }
21880
+ 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); }
21762
21881
 
21763
21882
  function SvgKey(props) {
21764
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21883
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21765
21884
  xmlns: "http://www.w3.org/2000/svg",
21766
21885
  viewBox: "0 0 20 20",
21767
21886
  fill: "currentColor"
21768
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21887
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21769
21888
  fillRule: "evenodd",
21770
21889
  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",
21771
21890
  clipRule: "evenodd"
21772
21891
  })));
21773
21892
  }
21774
21893
 
21775
- var _path$1;
21894
+ var _path$2;
21776
21895
 
21777
- 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); }
21896
+ 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); }
21778
21897
 
21779
21898
  function SvgDonate(props) {
21780
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
21899
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21781
21900
  width: 24,
21782
21901
  height: 24,
21783
21902
  fill: "currentColor",
21784
21903
  xmlns: "http://www.w3.org/2000/svg"
21785
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
21904
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21786
21905
  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"
21787
21906
  })));
21788
21907
  }
@@ -22428,7 +22547,7 @@ const DashboardOpenButton = () => {
22428
22547
  };
22429
22548
  DashboardOpenButton.viewId = "dashboard-open";
22430
22549
 
22431
- const initialState = {
22550
+ const initialState$1 = {
22432
22551
  imageSrc: null,
22433
22552
  crop: {
22434
22553
  x: 0,
@@ -22442,10 +22561,10 @@ const initialState = {
22442
22561
  content: ""
22443
22562
  }
22444
22563
  };
22445
- const store = /*#__PURE__*/React.createContext(initialState);
22564
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
22446
22565
  const {
22447
- Provider
22448
- } = store;
22566
+ Provider: Provider$1
22567
+ } = store$1;
22449
22568
 
22450
22569
  const ProfilePicChangeContainer = ({
22451
22570
  style,
@@ -22579,21 +22698,21 @@ const ProfilePicChangeContainer = ({
22579
22698
  default:
22580
22699
  return state;
22581
22700
  }
22582
- }, initialState);
22701
+ }, initialState$1);
22583
22702
  return /*#__PURE__*/React__default['default'].createElement("div", {
22584
22703
  style: { ...style
22585
22704
  },
22586
22705
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22587
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
22706
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
22588
22707
  value: {
22589
22708
  state,
22590
22709
  dispatch
22591
22710
  }
22592
22711
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
22593
- store,
22712
+ store: store$1,
22594
22713
  key: i
22595
22714
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
22596
- store
22715
+ store: store$1
22597
22716
  })));
22598
22717
  };
22599
22718
  /**
@@ -22655,7 +22774,7 @@ const ProfilePicChangeButton = ({
22655
22774
  isSubmitting
22656
22775
  },
22657
22776
  dispatch
22658
- } = React.useContext(store);
22777
+ } = React.useContext(store$1);
22659
22778
  const {
22660
22779
  t
22661
22780
  } = useTranslation("userEdit");
@@ -24023,7 +24142,7 @@ const ProfilePicChangeCropper = ({
24023
24142
  zoom
24024
24143
  },
24025
24144
  dispatch
24026
- } = React.useContext(store);
24145
+ } = React.useContext(store$1);
24027
24146
  return /*#__PURE__*/React__default['default'].createElement("div", {
24028
24147
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
24029
24148
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -24065,7 +24184,7 @@ const ProfilePicChangeZoom = ({
24065
24184
  zoom
24066
24185
  },
24067
24186
  dispatch
24068
- } = React.useContext(store);
24187
+ } = React.useContext(store$1);
24069
24188
  const {
24070
24189
  t
24071
24190
  } = useTranslation("userEdit");
@@ -24088,18 +24207,18 @@ const ProfilePicChangeZoom = ({
24088
24207
  }, otherProps)));
24089
24208
  };
24090
24209
 
24091
- var _path;
24210
+ var _path$1;
24092
24211
 
24093
- 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); }
24212
+ 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); }
24094
24213
 
24095
24214
  function SvgPhotograph(props) {
24096
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24215
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
24097
24216
  xmlns: "http://www.w3.org/2000/svg",
24098
24217
  className: "plc-h-6 plc-w-6",
24099
24218
  fill: "none",
24100
24219
  viewBox: "0 0 24 24",
24101
24220
  stroke: "currentColor"
24102
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24221
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
24103
24222
  strokeLinecap: "round",
24104
24223
  strokeLinejoin: "round",
24105
24224
  strokeWidth: 2,
@@ -24117,7 +24236,7 @@ const ProfilePicChangeSelectButton = ({
24117
24236
  state: {
24118
24237
  isSubmitting
24119
24238
  }
24120
- } = React.useContext(store);
24239
+ } = React.useContext(store$1);
24121
24240
  const {
24122
24241
  t
24123
24242
  } = useTranslation("userEdit");
@@ -24159,7 +24278,7 @@ const ProfilePicChangeRemoveButton = ({
24159
24278
  state: {
24160
24279
  isSubmitting
24161
24280
  }
24162
- } = React.useContext(store);
24281
+ } = React.useContext(store$1);
24163
24282
  const {
24164
24283
  t
24165
24284
  } = useTranslation("userEdit");
@@ -24182,7 +24301,7 @@ const ProfilePicChangeWrapper = () => {
24182
24301
  state: {
24183
24302
  imageSrc
24184
24303
  }
24185
- } = React.useContext(store);
24304
+ } = React.useContext(store$1);
24186
24305
  const {
24187
24306
  t
24188
24307
  } = useTranslation("userEdit");
@@ -24244,6 +24363,182 @@ function ProfilePicChangeModal({
24244
24363
  }
24245
24364
  ProfilePicChangeModal.viewId = "profile-picture";
24246
24365
 
24366
+ const initialState = {
24367
+ isSubmitting: false,
24368
+ alert: {
24369
+ type: "error",
24370
+ content: ""
24371
+ }
24372
+ };
24373
+ const store = /*#__PURE__*/React.createContext(initialState);
24374
+ const {
24375
+ Provider
24376
+ } = store;
24377
+
24378
+ const EmailVerifyContainer = ({
24379
+ style,
24380
+ className = "",
24381
+ onSuccess = () => {},
24382
+ onFailure = () => {},
24383
+ children,
24384
+ ...props
24385
+ }) => {
24386
+ const {
24387
+ t
24388
+ } = useTranslation("verifyEmail");
24389
+
24390
+ const submit = () => {
24391
+ window.Pelcro.user.resendEmailVerification((err, res) => {
24392
+ dispatch({
24393
+ type: LOADING,
24394
+ payload: false
24395
+ });
24396
+
24397
+ if (err) {
24398
+ dispatch({
24399
+ type: SHOW_ALERT,
24400
+ payload: {
24401
+ type: "error",
24402
+ content: getErrorMessages(err)
24403
+ }
24404
+ });
24405
+ return onFailure(err);
24406
+ }
24407
+
24408
+ dispatch({
24409
+ type: SHOW_ALERT,
24410
+ payload: {
24411
+ type: "success",
24412
+ content: t("messages.resent")
24413
+ }
24414
+ });
24415
+ return onSuccess(res);
24416
+ });
24417
+ };
24418
+
24419
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
24420
+ switch (action.type) {
24421
+ case SHOW_ALERT:
24422
+ return lib_7({ ...state,
24423
+ alert: action.payload
24424
+ });
24425
+
24426
+ case LOADING:
24427
+ return lib_7({ ...state,
24428
+ isSubmitting: action.payload
24429
+ });
24430
+
24431
+ case HANDLE_SUBMIT:
24432
+ return lib_5({ ...state,
24433
+ isSubmitting: true
24434
+ }, (state, dispatch) => submit());
24435
+
24436
+ default:
24437
+ return state;
24438
+ }
24439
+ }, initialState);
24440
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24441
+ style: { ...style
24442
+ },
24443
+ className: `pelcro-container pelcro-email-verify-container ${className}`
24444
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
24445
+ value: {
24446
+ state,
24447
+ dispatch
24448
+ }
24449
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24450
+ store,
24451
+ key: i
24452
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24453
+ store
24454
+ })));
24455
+ };
24456
+
24457
+ const EmailVerifyResendButton = ({
24458
+ name,
24459
+ onClick,
24460
+ ...otherProps
24461
+ }) => {
24462
+ const {
24463
+ dispatch,
24464
+ state: {
24465
+ isSubmitting
24466
+ }
24467
+ } = React.useContext(store);
24468
+ const {
24469
+ t
24470
+ } = useTranslation("verifyEmail");
24471
+ return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
24472
+ onClick: () => {
24473
+ dispatch({
24474
+ type: HANDLE_SUBMIT
24475
+ });
24476
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24477
+ },
24478
+ isLoading: isSubmitting
24479
+ }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
24480
+ };
24481
+
24482
+ var _path, _path2;
24483
+
24484
+ 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); }
24485
+
24486
+ function SvgEmailVerify(props) {
24487
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24488
+ className: "plc-w-6 plc-h-6",
24489
+ viewBox: "0 0 700 700",
24490
+ xmlns: "http://www.w3.org/2000/svg"
24491
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24492
+ 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"
24493
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24494
+ 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"
24495
+ })));
24496
+ }
24497
+
24498
+ const EmailVerifyView = props => {
24499
+ var _window$Pelcro$user$r;
24500
+
24501
+ const {
24502
+ t
24503
+ } = useTranslation("verifyEmail");
24504
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24505
+ id: "pelcro-email-verify-view"
24506
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
24507
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24508
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
24509
+ className: "plc-text-2xl plc-font-semibold"
24510
+ }, t("labels.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
24511
+ action: "javascript:void(0);",
24512
+ className: "plc-mt-2 pelcro-form"
24513
+ }, /*#__PURE__*/React__default['default'].createElement(EmailVerifyContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement("div", {
24514
+ className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
24515
+ }, /*#__PURE__*/React__default['default'].createElement(SvgEmailVerify, {
24516
+ className: "plc-w-32 plc-h-32"
24517
+ }), /*#__PURE__*/React__default['default'].createElement("p", {
24518
+ className: "plc-mb-1 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
24519
+ }, t("labels.instructions"), " ", /*#__PURE__*/React__default['default'].createElement("span", {
24520
+ className: "plc-font-bold"
24521
+ }, (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email))), /*#__PURE__*/React__default['default'].createElement(EmailVerifyResendButton, {
24522
+ role: "submit",
24523
+ className: "plc-mt-4 plc-w-full",
24524
+ name: t("labels.resend"),
24525
+ id: "pelcro-submit"
24526
+ }))));
24527
+ };
24528
+
24529
+ const EmailVerifyModal = ({
24530
+ onDisplay,
24531
+ onClose,
24532
+ ...otherProps
24533
+ }) => {
24534
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
24535
+ onDisplay: onDisplay,
24536
+ onClose: onClose,
24537
+ id: "pelcro-email-verify-modal"
24538
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
24539
+ };
24540
+ EmailVerifyModal.viewId = "email-verify";
24541
+
24247
24542
  exports.AddressCreateCity = AddressCreateCity;
24248
24543
  exports.AddressCreateContainer = AddressCreateContainer;
24249
24544
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -24298,6 +24593,10 @@ exports.DashboardOpenButton = DashboardOpenButton;
24298
24593
  exports.DatePicker = DatePicker;
24299
24594
  exports.DiscountedPrice = DiscountedPrice;
24300
24595
  exports.Email = Email;
24596
+ exports.EmailVerifyContainer = EmailVerifyContainer;
24597
+ exports.EmailVerifyModal = EmailVerifyModal;
24598
+ exports.EmailVerifyResendButton = EmailVerifyResendButton;
24599
+ exports.EmailVerifyView = EmailVerifyView;
24301
24600
  exports.FacebookLoginButton = FacebookLoginButton;
24302
24601
  exports.GiftCreateContainer = GiftCreateContainer;
24303
24602
  exports.GiftCreateEmail = GiftCreateEmail;