@pelcro/react-pelcro-js 2.7.0 → 3.0.0-beta.3

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",
@@ -3620,18 +3620,19 @@ var labels$h = {
3620
3620
  "for": "for",
3621
3621
  interval: "{{count}} {{interval}}",
3622
3622
  interval_plural: "{{count}} {{interval}}s",
3623
- tax: "+ Tax"
3623
+ tax: "+ Tax",
3624
+ removeCoupon: "REMOVE"
3624
3625
  };
3625
3626
  var checkoutForm_en = {
3626
- messages: messages$j,
3627
- labels: labels$h
3627
+ messages: messages$l,
3628
+ labels: labels$j
3628
3629
  };
3629
3630
 
3630
- var messages$i = {
3631
+ var messages$k = {
3631
3632
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3632
3633
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3633
3634
  };
3634
- var labels$g = {
3635
+ var labels$i = {
3635
3636
  card: "Entrez le numéro de carte",
3636
3637
  date: "Date d’expiration",
3637
3638
  CVC: "CVC",
@@ -3646,11 +3647,12 @@ var labels$g = {
3646
3647
  "for": "pour",
3647
3648
  interval: "{{count}} {{interval}}",
3648
3649
  interval_plural: "{{count}} {{interval}}s",
3649
- tax: "+ Taxe"
3650
+ tax: "+ Taxe",
3651
+ removeCoupon: "RETIRER"
3650
3652
  };
3651
3653
  var checkoutForm_fr = {
3652
- messages: messages$i,
3653
- labels: labels$g
3654
+ messages: messages$k,
3655
+ labels: labels$i
3654
3656
  };
3655
3657
 
3656
3658
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3683,7 +3685,7 @@ var messages_fr = {
3683
3685
  recaptcha: recaptcha
3684
3686
  };
3685
3687
 
3686
- var labels$f = {
3688
+ var labels$h = {
3687
3689
  email: "Enter email",
3688
3690
  password: "Enter password",
3689
3691
  required: "required",
@@ -3691,7 +3693,7 @@ var labels$f = {
3691
3693
  passwordPlaceholder: "Password",
3692
3694
  login: "Login"
3693
3695
  };
3694
- var messages$h = {
3696
+ var messages$j = {
3695
3697
  loginTo: "Login to your account",
3696
3698
  welcome: "Welcome back, sign in with your existing account.",
3697
3699
  dontHaveAccount: "Don't have an account yet?",
@@ -3710,12 +3712,12 @@ var errors$5 = {
3710
3712
  "": ""
3711
3713
  };
3712
3714
  var login_en = {
3713
- labels: labels$f,
3714
- messages: messages$h,
3715
+ labels: labels$h,
3716
+ messages: messages$j,
3715
3717
  errors: errors$5
3716
3718
  };
3717
3719
 
3718
- var labels$e = {
3720
+ var labels$g = {
3719
3721
  email: "Entrez votre adresse courriel",
3720
3722
  password: "Entrez votre mot de passe",
3721
3723
  required: "Champs obligatoires",
@@ -3723,7 +3725,7 @@ var labels$e = {
3723
3725
  passwordPlaceholder: "Mot de passe",
3724
3726
  login: "Connexion"
3725
3727
  };
3726
- var messages$g = {
3728
+ var messages$i = {
3727
3729
  loginTo: "Connectez-vous à votre compte",
3728
3730
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
3729
3731
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -3742,14 +3744,14 @@ var errors$4 = {
3742
3744
  "": ""
3743
3745
  };
3744
3746
  var login_fr = {
3745
- labels: labels$e,
3746
- messages: messages$g,
3747
+ labels: labels$g,
3748
+ messages: messages$i,
3747
3749
  errors: errors$4
3748
3750
  };
3749
3751
 
3750
3752
  var title$b = "Create an account";
3751
3753
  var subtitle$5 = "Enter your email and password below";
3752
- var labels$d = {
3754
+ var labels$f = {
3753
3755
  signUpFacebook: "Sign up with Facebook",
3754
3756
  signUpGoogle: "Sign up with Google",
3755
3757
  signUpEmail: "Sign up with Email",
@@ -3761,7 +3763,7 @@ var labels$d = {
3761
3763
  firstName: "First name",
3762
3764
  lastName: "Last name"
3763
3765
  };
3764
- var messages$f = {
3766
+ var messages$h = {
3765
3767
  alreadyHaveAccount: "Already have an account?",
3766
3768
  createAccount: "Create account",
3767
3769
  loginHere: "login here. ",
@@ -3835,8 +3837,8 @@ var redeem$1 = {
3835
3837
  var register_en = {
3836
3838
  title: title$b,
3837
3839
  subtitle: subtitle$5,
3838
- labels: labels$d,
3839
- messages: messages$f,
3840
+ labels: labels$f,
3841
+ messages: messages$h,
3840
3842
  errors: errors$3,
3841
3843
  gift: gift$1,
3842
3844
  redeem: redeem$1
@@ -3844,7 +3846,7 @@ var register_en = {
3844
3846
 
3845
3847
  var title$a = "Créer un compte";
3846
3848
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3847
- var labels$c = {
3849
+ var labels$e = {
3848
3850
  signUpFacebook: "Inscrivez-vous avec Facebook",
3849
3851
  signUpGoogle: "Inscrivez-vous avec Google",
3850
3852
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3856,7 +3858,7 @@ var labels$c = {
3856
3858
  firstName: "Prénom",
3857
3859
  lastName: "Nom de famille"
3858
3860
  };
3859
- var messages$e = {
3861
+ var messages$g = {
3860
3862
  alreadyHaveAccount: "Vous avez déjà un compte?",
3861
3863
  createAccount: "Créer un compte",
3862
3864
  loginHere: "Connectez-vous ici",
@@ -3931,14 +3933,14 @@ var redeem = {
3931
3933
  var register_fr = {
3932
3934
  title: title$a,
3933
3935
  subtitle: subtitle$4,
3934
- labels: labels$c,
3935
- messages: messages$e,
3936
+ labels: labels$e,
3937
+ messages: messages$g,
3936
3938
  errors: errors$2,
3937
3939
  gift: gift,
3938
3940
  redeem: redeem
3939
3941
  };
3940
3942
 
3941
- var labels$b = {
3943
+ var labels$d = {
3942
3944
  title: "Want to update your profile?",
3943
3945
  subtitle: "Enter your information below to update your profile",
3944
3946
  email: "Email",
@@ -3954,17 +3956,17 @@ var labels$b = {
3954
3956
  removeImage: "Remove current photo",
3955
3957
  zoom: "Zoom"
3956
3958
  };
3957
- var messages$d = {
3959
+ var messages$f = {
3958
3960
  userUpdated: "Thanks! Your profile was updated successfully.",
3959
3961
  pictureRemoved: "Your profile picture was removed successfully.",
3960
3962
  pictureUpdated: "Your profile picture was updated successfully."
3961
3963
  };
3962
3964
  var userEdit_en = {
3963
- labels: labels$b,
3964
- messages: messages$d
3965
+ labels: labels$d,
3966
+ messages: messages$f
3965
3967
  };
3966
3968
 
3967
- var labels$a = {
3969
+ var labels$c = {
3968
3970
  title: "Voulez-vous mettre à jour votre profil ?",
3969
3971
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3970
3972
  email: "Address courriel",
@@ -3980,20 +3982,20 @@ var labels$a = {
3980
3982
  removeImage: "supprimer la photo actuelle",
3981
3983
  zoom: "Zoom"
3982
3984
  };
3983
- var messages$c = {
3985
+ var messages$e = {
3984
3986
  userUpdated: "Votre profil a été mis à jour avec succès.",
3985
3987
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
3986
3988
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3987
3989
  };
3988
3990
  var userEdit_fr = {
3989
- labels: labels$a,
3990
- messages: messages$c
3991
+ labels: labels$c,
3992
+ messages: messages$e
3991
3993
  };
3992
3994
 
3993
3995
  var title$9 = "Enter your shipping address";
3994
3996
  var selectAddressTitle$1 = "Please select an address";
3995
3997
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3996
- var labels$9 = {
3998
+ var labels$b = {
3997
3999
  address: "Address",
3998
4000
  code: "Postal Code/Zip",
3999
4001
  city: "City",
@@ -4008,7 +4010,7 @@ var buttons$5 = {
4008
4010
  selectAddress: "Select address",
4009
4011
  addAddress: "Add new address"
4010
4012
  };
4011
- var messages$b = {
4013
+ var messages$d = {
4012
4014
  addressUpdated: "The address was successfully updated!",
4013
4015
  subRedeemed: "Your subscription has been redeemed."
4014
4016
  };
@@ -4016,15 +4018,15 @@ var address_en = {
4016
4018
  title: title$9,
4017
4019
  selectAddressTitle: selectAddressTitle$1,
4018
4020
  selectAddressSubtitle: selectAddressSubtitle$1,
4019
- labels: labels$9,
4021
+ labels: labels$b,
4020
4022
  buttons: buttons$5,
4021
- messages: messages$b
4023
+ messages: messages$d
4022
4024
  };
4023
4025
 
4024
4026
  var title$8 = "Entrez votre adresse de livraison";
4025
4027
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4026
4028
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4027
- var labels$8 = {
4029
+ var labels$a = {
4028
4030
  address: "Adresse",
4029
4031
  code: "Code postal / Zip",
4030
4032
  city: "Ville",
@@ -4039,7 +4041,7 @@ var buttons$4 = {
4039
4041
  selectAddress: "Choisir cette adresse",
4040
4042
  addAddress: "Ajouter une nouvelle adresse"
4041
4043
  };
4042
- var messages$a = {
4044
+ var messages$c = {
4043
4045
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4044
4046
  subRedeemed: "Votre abonnement a bien été activé."
4045
4047
  };
@@ -4047,9 +4049,9 @@ var address_fr = {
4047
4049
  title: title$8,
4048
4050
  selectAddressTitle: selectAddressTitle,
4049
4051
  selectAddressSubtitle: selectAddressSubtitle,
4050
- labels: labels$8,
4052
+ labels: labels$a,
4051
4053
  buttons: buttons$4,
4052
- messages: messages$a
4054
+ messages: messages$c
4053
4055
  };
4054
4056
 
4055
4057
  var title$7 = "Reset your password";
@@ -4096,7 +4098,7 @@ var password$1 = "Password";
4096
4098
  var submit$3 = "Submit";
4097
4099
  var required$3 = "Required";
4098
4100
  var passwordResetEmailSent$1 = "Password reset instructions have been sent to your email";
4099
- var messages$9 = {
4101
+ var messages$b = {
4100
4102
  alreadyHaveAccount: "Already have an account?",
4101
4103
  loginHere: "login here."
4102
4104
  };
@@ -4107,7 +4109,7 @@ var passwordForgot_en = {
4107
4109
  submit: submit$3,
4108
4110
  required: required$3,
4109
4111
  passwordResetEmailSent: passwordResetEmailSent$1,
4110
- messages: messages$9
4112
+ messages: messages$b
4111
4113
  };
4112
4114
 
4113
4115
  var title$4 = "Mot de passe oublié ?";
@@ -4116,7 +4118,7 @@ var password = "Mot de passe";
4116
4118
  var submit$2 = "Soumettre";
4117
4119
  var required$2 = "Champs obligatoires";
4118
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.";
4119
- var messages$8 = {
4121
+ var messages$a = {
4120
4122
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4121
4123
  loginHere: "Connectez-vous ici"
4122
4124
  };
@@ -4127,7 +4129,7 @@ var passwordForgot_fr = {
4127
4129
  submit: submit$2,
4128
4130
  required: required$2,
4129
4131
  passwordResetEmailSent: passwordResetEmailSent,
4130
- messages: messages$8
4132
+ messages: messages$a
4131
4133
  };
4132
4134
 
4133
4135
  var title$3 = "Change your password";
@@ -4228,7 +4230,7 @@ var buttons$3 = {
4228
4230
  purchase: "Purchase",
4229
4231
  "continue": "Continue"
4230
4232
  };
4231
- var messages$7 = {
4233
+ var messages$9 = {
4232
4234
  orderConfirmed: {
4233
4235
  title: "Order confirmed!",
4234
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."
@@ -4237,14 +4239,14 @@ var messages$7 = {
4237
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.",
4238
4240
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4239
4241
  };
4240
- var labels$7 = {
4242
+ var labels$9 = {
4241
4243
  summary: "Order summary",
4242
4244
  total: "total"
4243
4245
  };
4244
4246
  var shop_en = {
4245
4247
  buttons: buttons$3,
4246
- messages: messages$7,
4247
- labels: labels$7
4248
+ messages: messages$9,
4249
+ labels: labels$9
4248
4250
  };
4249
4251
 
4250
4252
  var buttons$2 = {
@@ -4253,7 +4255,7 @@ var buttons$2 = {
4253
4255
  purchase: "Acheter",
4254
4256
  "continue": "Continuer au contenu"
4255
4257
  };
4256
- var messages$6 = {
4258
+ var messages$8 = {
4257
4259
  orderConfirmed: {
4258
4260
  title: "Votre commande est confirmée !",
4259
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."
@@ -4262,17 +4264,17 @@ var messages$6 = {
4262
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.",
4263
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."
4264
4266
  };
4265
- var labels$6 = {
4267
+ var labels$8 = {
4266
4268
  summary: "récapitulatif de commande",
4267
4269
  total: "total"
4268
4270
  };
4269
4271
  var shop_fr = {
4270
4272
  buttons: buttons$2,
4271
- messages: messages$6,
4272
- labels: labels$6
4273
+ messages: messages$8,
4274
+ labels: labels$8
4273
4275
  };
4274
4276
 
4275
- var labels$5 = {
4277
+ var labels$7 = {
4276
4278
  cardNumber: "Numéro de carte",
4277
4279
  securityCode: "Code de sécurité",
4278
4280
  submit: "Soumettre",
@@ -4294,7 +4296,7 @@ var labels$5 = {
4294
4296
  title: "Informations de paiement"
4295
4297
  }
4296
4298
  };
4297
- var messages$5 = {
4299
+ var messages$7 = {
4298
4300
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4299
4301
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4300
4302
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4307,12 +4309,12 @@ var errors$1 = {
4307
4309
  "": ""
4308
4310
  };
4309
4311
  var payment_fr = {
4310
- labels: labels$5,
4311
- messages: messages$5,
4312
+ labels: labels$7,
4313
+ messages: messages$7,
4312
4314
  errors: errors$1
4313
4315
  };
4314
4316
 
4315
- var labels$4 = {
4317
+ var labels$6 = {
4316
4318
  cardNumber: "Card number",
4317
4319
  securityCode: "Security Code",
4318
4320
  submit: "Submit",
@@ -4334,7 +4336,7 @@ var labels$4 = {
4334
4336
  title: "Payment Information"
4335
4337
  }
4336
4338
  };
4337
- var messages$4 = {
4339
+ var messages$6 = {
4338
4340
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
4339
4341
  cancel: "Cancel your subscription online at anytime.",
4340
4342
  giftSent: "Subscription gift has been sent to",
@@ -4347,12 +4349,12 @@ var errors = {
4347
4349
  "": ""
4348
4350
  };
4349
4351
  var payment_en = {
4350
- labels: labels$4,
4351
- messages: messages$4,
4352
+ labels: labels$6,
4353
+ messages: messages$6,
4352
4354
  errors: errors
4353
4355
  };
4354
4356
 
4355
- var labels$3 = {
4357
+ var labels$5 = {
4356
4358
  menu: "Pelcro Menu",
4357
4359
  name: "Name",
4358
4360
  email: "Email",
@@ -4419,7 +4421,7 @@ var labels$3 = {
4419
4421
  goBack: "Go back"
4420
4422
  }
4421
4423
  };
4422
- var messages$3 = {
4424
+ var messages$5 = {
4423
4425
  noCard: "You don't have a card",
4424
4426
  subCancellation: {
4425
4427
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -4429,11 +4431,11 @@ var messages$3 = {
4429
4431
  }
4430
4432
  };
4431
4433
  var dashboard_en = {
4432
- labels: labels$3,
4433
- messages: messages$3
4434
+ labels: labels$5,
4435
+ messages: messages$5
4434
4436
  };
4435
4437
 
4436
- var labels$2 = {
4438
+ var labels$4 = {
4437
4439
  menu: "Menu Pelcro",
4438
4440
  name: "Nom",
4439
4441
  email: "Courriel",
@@ -4500,7 +4502,7 @@ var labels$2 = {
4500
4502
  goBack: "Retourner"
4501
4503
  }
4502
4504
  };
4503
- var messages$2 = {
4505
+ var messages$4 = {
4504
4506
  noCard: "Vous n’avez pas une carte",
4505
4507
  subCancellation: {
4506
4508
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4510,16 +4512,16 @@ var messages$2 = {
4510
4512
  }
4511
4513
  };
4512
4514
  var dashboard_fr = {
4513
- labels: labels$2,
4514
- messages: messages$2
4515
+ labels: labels$4,
4516
+ messages: messages$4
4515
4517
  };
4516
4518
 
4517
- var messages$1 = {
4519
+ var messages$3 = {
4518
4520
  alreadyHaveAccount: "Already have an account?",
4519
4521
  loginHere: "Login here",
4520
4522
  checkbox: "Check this box to gift this subscription"
4521
4523
  };
4522
- var labels$1 = {
4524
+ var labels$3 = {
4523
4525
  plan: {
4524
4526
  title: "Subscribe to a plan",
4525
4527
  subtitle: "Select one of the plans below and click on next."
@@ -4542,17 +4544,17 @@ var buttons$1 = {
4542
4544
  back: "Back"
4543
4545
  };
4544
4546
  var select_en = {
4545
- messages: messages$1,
4546
- labels: labels$1,
4547
+ messages: messages$3,
4548
+ labels: labels$3,
4547
4549
  buttons: buttons$1
4548
4550
  };
4549
4551
 
4550
- var messages = {
4552
+ var messages$2 = {
4551
4553
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4552
4554
  loginHere: "Connectez-vous ici",
4553
4555
  checkbox: "Cochez cette case pour offrir cet abonnement"
4554
4556
  };
4555
- var labels = {
4557
+ var labels$2 = {
4556
4558
  plan: {
4557
4559
  title: "Abonnez-vous à un plan",
4558
4560
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4575,8 +4577,8 @@ var buttons = {
4575
4577
  back: "Retour"
4576
4578
  };
4577
4579
  var select_fr = {
4578
- messages: messages,
4579
- labels: labels,
4580
+ messages: messages$2,
4581
+ labels: labels$2,
4580
4582
  buttons: buttons
4581
4583
  };
4582
4584
 
@@ -4600,6 +4602,34 @@ var notification_fr = {
4600
4602
  confirm: confirm
4601
4603
  };
4602
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
+
4603
4633
  function create$1(createState) {
4604
4634
  let state;
4605
4635
  const listeners = new Set();
@@ -5949,12 +5979,18 @@ class PelcroActions {
5949
5979
  view,
5950
5980
  cartItems,
5951
5981
  ...otherStateFields
5952
- } = initialState$g;
5982
+ } = initialState$h;
5953
5983
  this.set(otherStateFields);
5954
5984
  });
5955
5985
 
5956
5986
  _defineProperty$3(this, "switchView", view => {
5957
5987
  // view switching guards
5988
+ if (userMustVerifyEmail() && !["dashboard", "meter", "login", null].includes(view)) {
5989
+ return this.set({
5990
+ view: "email-verify"
5991
+ });
5992
+ }
5993
+
5958
5994
  if (["login", "register"].includes(view) && this.get().isAuthenticated()) {
5959
5995
  return this.set({
5960
5996
  view: "dashboard"
@@ -6212,7 +6248,7 @@ class PelcroCallbacks {
6212
6248
  }
6213
6249
  });
6214
6250
 
6215
- _defineProperty$3(this, "whenUserReady", callback => {
6251
+ _defineProperty$3(this, "whenUserReady", (callback, listenerOptions) => {
6216
6252
  var _window$Pelcro$user$r;
6217
6253
 
6218
6254
  if ((_window$Pelcro$user$r = window.Pelcro.user.read()) !== null && _window$Pelcro$user$r !== void 0 && _window$Pelcro$user$r.id) {
@@ -6220,7 +6256,7 @@ class PelcroCallbacks {
6220
6256
  } else {
6221
6257
  window.document.addEventListener("PelcroUserLoaded", e => {
6222
6258
  callback(window.Pelcro.user.read());
6223
- });
6259
+ }, listenerOptions);
6224
6260
  }
6225
6261
  });
6226
6262
 
@@ -6239,7 +6275,7 @@ class PelcroCallbacks {
6239
6275
 
6240
6276
  }
6241
6277
 
6242
- const initialState$g = {
6278
+ const initialState$h = {
6243
6279
  // View
6244
6280
  view: null,
6245
6281
  // Plans
@@ -6267,7 +6303,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6267
6303
  return {
6268
6304
  // Store setter
6269
6305
  set,
6270
- ...initialState$g,
6306
+ ...initialState$h,
6271
6307
  // State actions
6272
6308
  ...actions,
6273
6309
  // Callbacks
@@ -6418,7 +6454,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6418
6454
  */
6419
6455
 
6420
6456
  const isValidViewFromURL = viewID => {
6421
- 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()) {
6422
6458
  return true;
6423
6459
  }
6424
6460
 
@@ -6615,6 +6651,13 @@ function getDateWithoutTime(dateObject) {
6615
6651
  date.setHours(0, 0, 0, 0);
6616
6652
  return date;
6617
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
+ }
6618
6661
 
6619
6662
  const resources = {
6620
6663
  en: {
@@ -6632,6 +6675,7 @@ const resources = {
6632
6675
  passwordReset: passwordReset_en,
6633
6676
  passwordForgot: passwordForgot_en,
6634
6677
  passwordChange: passwordChange_en,
6678
+ verifyEmail: verifyEmail_en,
6635
6679
  cart: cart_en,
6636
6680
  shop: shop_en,
6637
6681
  payment: payment_en,
@@ -6654,6 +6698,7 @@ const resources = {
6654
6698
  passwordReset: passwordReset_fr,
6655
6699
  passwordForgot: passwordForgot_fr,
6656
6700
  passwordChange: passwordChange_fr,
6701
+ verifyEmail: verifyEmail_fr,
6657
6702
  cart: cart_fr,
6658
6703
  shop: shop_fr,
6659
6704
  payment: payment_fr,
@@ -6816,11 +6861,18 @@ class SaveToMetadataButtonClass {
6816
6861
 
6817
6862
  const button = event.currentTarget;
6818
6863
  const user = window.Pelcro.user.read();
6864
+ const {
6865
+ switchView
6866
+ } = usePelcro.getStore();
6819
6867
  const {
6820
6868
  key,
6821
6869
  ...buttonMetadata
6822
6870
  } = button.dataset;
6823
6871
 
6872
+ if (userMustVerifyEmail()) {
6873
+ return switchView("email-verify");
6874
+ }
6875
+
6824
6876
  if (_classPrivateFieldGet(this, _isAlreadySaved).call(this, button)) {
6825
6877
  _classPrivateFieldGet(this, _removeMetaData).call(this, event);
6826
6878
 
@@ -6943,8 +6995,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6943
6995
 
6944
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}}
6945
6997
 
6946
- function _extends$x() {
6947
- _extends$x = Object.assign || function (target) {
6998
+ function _extends$y() {
6999
+ _extends$y = Object.assign || function (target) {
6948
7000
  for (var i = 1; i < arguments.length; i++) {
6949
7001
  var source = arguments[i];
6950
7002
 
@@ -6958,7 +7010,7 @@ function _extends$x() {
6958
7010
  return target;
6959
7011
  };
6960
7012
 
6961
- return _extends$x.apply(this, arguments);
7013
+ return _extends$y.apply(this, arguments);
6962
7014
  }
6963
7015
 
6964
7016
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7048,7 +7100,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7048
7100
  var reducer = function reducer(state, action) {
7049
7101
  switch (action.type) {
7050
7102
  case ActionType.ADD_TOAST:
7051
- return _extends$x({}, state, {
7103
+ return _extends$y({}, state, {
7052
7104
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7053
7105
  });
7054
7106
 
@@ -7058,9 +7110,9 @@ var reducer = function reducer(state, action) {
7058
7110
  clearFromRemoveQueue(action.toast.id);
7059
7111
  }
7060
7112
 
7061
- return _extends$x({}, state, {
7113
+ return _extends$y({}, state, {
7062
7114
  toasts: state.toasts.map(function (t) {
7063
- 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;
7064
7116
  })
7065
7117
  });
7066
7118
 
@@ -7087,9 +7139,9 @@ var reducer = function reducer(state, action) {
7087
7139
  });
7088
7140
  }
7089
7141
 
7090
- return _extends$x({}, state, {
7142
+ return _extends$y({}, state, {
7091
7143
  toasts: state.toasts.map(function (t) {
7092
- return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
7144
+ return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7093
7145
  visible: false
7094
7146
  }) : t;
7095
7147
  })
@@ -7097,28 +7149,28 @@ var reducer = function reducer(state, action) {
7097
7149
 
7098
7150
  case ActionType.REMOVE_TOAST:
7099
7151
  if (action.toastId === undefined) {
7100
- return _extends$x({}, state, {
7152
+ return _extends$y({}, state, {
7101
7153
  toasts: []
7102
7154
  });
7103
7155
  }
7104
7156
 
7105
- return _extends$x({}, state, {
7157
+ return _extends$y({}, state, {
7106
7158
  toasts: state.toasts.filter(function (t) {
7107
7159
  return t.id !== action.toastId;
7108
7160
  })
7109
7161
  });
7110
7162
 
7111
7163
  case ActionType.START_PAUSE:
7112
- return _extends$x({}, state, {
7164
+ return _extends$y({}, state, {
7113
7165
  pausedAt: action.time
7114
7166
  });
7115
7167
 
7116
7168
  case ActionType.END_PAUSE:
7117
7169
  var diff = action.time - (state.pausedAt || 0);
7118
- return _extends$x({}, state, {
7170
+ return _extends$y({}, state, {
7119
7171
  pausedAt: undefined,
7120
7172
  toasts: state.toasts.map(function (t) {
7121
- return _extends$x({}, t, {
7173
+ return _extends$y({}, t, {
7122
7174
  pauseDuration: t.pauseDuration + diff
7123
7175
  });
7124
7176
  })
@@ -7165,12 +7217,12 @@ var useStore = function useStore(toastOptions) {
7165
7217
  var mergedToasts = state.toasts.map(function (t) {
7166
7218
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7167
7219
 
7168
- return _extends$x({}, toastOptions, toastOptions[t.type], t, {
7220
+ return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7169
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],
7170
- 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)
7171
7223
  });
7172
7224
  });
7173
- return _extends$x({}, state, {
7225
+ return _extends$y({}, state, {
7174
7226
  toasts: mergedToasts
7175
7227
  });
7176
7228
  };
@@ -7180,7 +7232,7 @@ var createToast = function createToast(message, type, opts) {
7180
7232
  type = 'blank';
7181
7233
  }
7182
7234
 
7183
- return _extends$x({
7235
+ return _extends$y({
7184
7236
  createdAt: Date.now(),
7185
7237
  visible: true,
7186
7238
  type: type,
@@ -7230,14 +7282,14 @@ toast.remove = function (toastId) {
7230
7282
  };
7231
7283
 
7232
7284
  toast.promise = function (promise, msgs, opts) {
7233
- 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));
7234
7286
  promise.then(function (p) {
7235
- toast.success(resolveValue(msgs.success, p), _extends$x({
7287
+ toast.success(resolveValue(msgs.success, p), _extends$y({
7236
7288
  id: id
7237
7289
  }, opts, opts == null ? void 0 : opts.success));
7238
7290
  return p;
7239
7291
  })["catch"](function (e) {
7240
- toast.error(resolveValue(msgs.error, e), _extends$x({
7292
+ toast.error(resolveValue(msgs.error, e), _extends$y({
7241
7293
  id: id
7242
7294
  }, opts, opts == null ? void 0 : opts.error));
7243
7295
  });
@@ -7576,7 +7628,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7576
7628
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7577
7629
  return React.createElement(ToastBarBase, {
7578
7630
  className: toast.className,
7579
- style: _extends$x({}, animationStyle, style, toast.style)
7631
+ style: _extends$y({}, animationStyle, style, toast.style)
7580
7632
  }, typeof children === 'function' ? children({
7581
7633
  icon: icon,
7582
7634
  message: message
@@ -7606,7 +7658,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7606
7658
  } : position.includes('right') ? {
7607
7659
  justifyContent: 'flex-end'
7608
7660
  } : {};
7609
- return _extends$x({
7661
+ return _extends$y({
7610
7662
  left: 0,
7611
7663
  right: 0,
7612
7664
  display: 'flex',
@@ -7633,7 +7685,7 @@ var Toaster = function Toaster(_ref) {
7633
7685
  handlers = _useToaster.handlers;
7634
7686
 
7635
7687
  return React.createElement("div", {
7636
- style: _extends$x({
7688
+ style: _extends$y({
7637
7689
  position: 'fixed',
7638
7690
  zIndex: 9999,
7639
7691
  top: DEFAULT_OFFSET,
@@ -7668,87 +7720,87 @@ var Toaster = function Toaster(_ref) {
7668
7720
  }));
7669
7721
  };
7670
7722
 
7671
- var _path$u;
7723
+ var _path$v;
7672
7724
 
7673
- 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); }
7674
7726
 
7675
7727
  function SvgCheckSolid(props) {
7676
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7728
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7677
7729
  xmlns: "http://www.w3.org/2000/svg",
7678
7730
  className: "h-5 w-5",
7679
7731
  viewBox: "0 0 20 20",
7680
7732
  fill: "currentColor"
7681
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7733
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7682
7734
  fillRule: "evenodd",
7683
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",
7684
7736
  clipRule: "evenodd"
7685
7737
  })));
7686
7738
  }
7687
7739
 
7688
- var _path$t;
7740
+ var _path$u;
7689
7741
 
7690
- 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); }
7691
7743
 
7692
7744
  function SvgXIcon(props) {
7693
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7745
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7694
7746
  xmlns: "http://www.w3.org/2000/svg",
7695
7747
  viewBox: "0 0 20 20",
7696
7748
  fill: "currentColor"
7697
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7749
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7698
7750
  fill: "evenodd",
7699
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",
7700
7752
  clipRule: "evenodd"
7701
7753
  })));
7702
7754
  }
7703
7755
 
7704
- var _path$s;
7756
+ var _path$t;
7705
7757
 
7706
- 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); }
7707
7759
 
7708
7760
  function SvgXIconSolid(props) {
7709
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7761
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7710
7762
  className: "plc-w-4 plc-h-4",
7711
7763
  fill: "currentColor",
7712
7764
  xmlns: "http://www.w3.org/2000/svg",
7713
7765
  viewBox: "0 0 100 100"
7714
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7766
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7715
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"
7716
7768
  })));
7717
7769
  }
7718
7770
 
7719
- var _path$r;
7771
+ var _path$s;
7720
7772
 
7721
- 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); }
7722
7774
 
7723
7775
  function SvgExclamation(props) {
7724
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7776
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7725
7777
  className: "plc-w-4 plc-h-4 plc-mr-1",
7726
7778
  xmlns: "http://www.w3.org/2000/svg",
7727
7779
  viewBox: "0 0 20 20",
7728
7780
  fill: "currentColor"
7729
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7781
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7730
7782
  fillRule: "evenodd",
7731
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",
7732
7784
  clipRule: "evenodd"
7733
7785
  })));
7734
7786
  }
7735
7787
 
7736
- var _path$q, _path2$3;
7788
+ var _path$r, _path2$4;
7737
7789
 
7738
- 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); }
7739
7791
 
7740
7792
  function SvgSpinner(props) {
7741
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
7793
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7742
7794
  className: "plc-animate-spin",
7743
7795
  viewBox: "0 0 24 24",
7744
7796
  fill: "currentColor",
7745
7797
  xmlns: "http://www.w3.org/2000/svg"
7746
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
7798
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7747
7799
  opacity: 0.2,
7748
7800
  fill: "evenodd",
7749
7801
  clipRule: "evenodd",
7750
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"
7751
- })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
7803
+ })), _path2$4 || (_path2$4 = /*#__PURE__*/React__namespace.createElement("path", {
7752
7804
  d: "M2 12C2 6.477 6.477 2 12 2v3a7 7 0 00-7 7H2z"
7753
7805
  })));
7754
7806
  }
@@ -8474,50 +8526,110 @@ var pure = pure$1;
8474
8526
  var pure_1 = pure.loadStripe;
8475
8527
 
8476
8528
  /**
8477
- * @typedef {Object} OptionsType
8478
- * @property {boolean} loadPaymentSDKs
8479
- * @property {boolean} enableURLTriggers
8480
- * @property {boolean} enableTheme
8481
- * @property {boolean} enablePaywalls
8482
- * @property {boolean} enableGoogleAnalytics
8483
- */
8484
-
8485
- /**
8486
- * Initializes pelcro features based on the options flag object
8487
- * @param {OptionsType} options
8488
- * @returns
8529
+ * Extracts error message from the response error object
8530
+ * @param {Object} error Error object
8531
+ * @return {string}
8489
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;
8490
8535
 
8491
- const optionsController = options => {
8492
- if (!options) {
8493
- 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;
8494
8538
  }
8495
8539
 
8496
- const optionsMethodsDict = {
8497
- loadPaymentSDKs: loadPaymentSDKs,
8498
- loadAuth0SDK: loadAuth0SDK,
8499
- enableURLTriggers: initViewFromURL,
8500
- enableTheme: applyPelcroTheme,
8501
- enablePaywalls: initPaywalls,
8502
- loadSecuritySDK: initSecuritySdk,
8503
- enableGoogleAnalytics: initGATracking
8504
- }; // 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;
8505
8542
 
8506
- Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8507
- 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
+ }
8508
8545
 
8509
- return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8510
- });
8511
- };
8512
- const initPaywalls = () => {
8513
- 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;
8514
8548
 
8515
- const paywallMethods = window.Pelcro.paywall;
8516
- 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
+ }
8517
8551
 
8518
- if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8519
- // blur entitlements based content
8520
- 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
8521
8633
 
8522
8634
  if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
8523
8635
  return;
@@ -8713,6 +8825,10 @@ const initViewFromURL = () => {
8713
8825
  return initCartFromUrl();
8714
8826
  }
8715
8827
 
8828
+ if (view === "email-verify") {
8829
+ return verifyEmailTokenFromUrl();
8830
+ }
8831
+
8716
8832
  switchView(view);
8717
8833
  });
8718
8834
  }
@@ -8862,6 +8978,33 @@ const initCartFromUrl = () => {
8862
8978
  });
8863
8979
  };
8864
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
+
8865
9008
  const defaultOptions = {
8866
9009
  loadPaymentSDKs: true,
8867
9010
  loadAuth0SDK: true,
@@ -9144,6 +9287,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
9144
9287
  const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
9145
9288
  const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
9146
9289
  const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
9290
+ const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
9147
9291
  const SET_PERCENT_OFF = "SET_PERCENT_OFF";
9148
9292
  const SET_COUPON = "SET_COUPON";
9149
9293
  const SET_COUPON_ERROR = "SET_COUPON_ERROR";
@@ -9200,67 +9344,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9200
9344
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9201
9345
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9202
9346
 
9203
- /**
9204
- * Extracts error message from the response error object
9205
- * @param {Object} error Error object
9206
- * @return {string}
9207
- */
9208
- const getErrorMessages = error => {
9209
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
9210
-
9211
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
9212
- return error.error.message;
9213
- }
9214
-
9215
- 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) {
9216
- var _error$response2, _error$response2$data;
9217
-
9218
- 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;
9219
- }
9220
-
9221
- 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) {
9222
- var _error$response4, _error$response4$data, _error$response4$data2;
9223
-
9224
- 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;
9225
- }
9226
-
9227
- const errorMessages = []; // enumerable error (ex: validation errors)
9228
-
9229
- 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]) => {
9230
- errorMessages.push(errorMessage);
9231
- }); // convert to multiline string
9232
-
9233
- return errorMessages.join("\n");
9234
- };
9235
- /**
9236
- * Executes function after a wait time of inactivity
9237
- * @param {function} func
9238
- * @param {number} waitTime
9239
- */
9240
-
9241
- const debounce = (func, waitTime) => {
9242
- let timeout;
9243
- return function executedFunction(...args) {
9244
- // The callback function to be executed after
9245
- // the debounce time has elapsed
9246
- const later = () => {
9247
- // null timeout to indicate the debounce ended
9248
- timeout = null;
9249
- func(...args);
9250
- }; // This will reset the waiting every function execution.
9251
- // This is the step that prevents the function from
9252
- // being executed because it will never reach the
9253
- // inside of the previous setTimeout
9254
-
9255
-
9256
- clearTimeout(timeout); // Restart the debounce waiting period.
9257
- // setTimeout returns a truthy value (it differs in web vs Node)
9258
-
9259
- timeout = setTimeout(later, waitTime);
9260
- };
9261
- };
9262
-
9263
- const initialState$f = {
9347
+ const initialState$g = {
9264
9348
  email: "",
9265
9349
  password: "",
9266
9350
  emailError: null,
@@ -9271,10 +9355,10 @@ const initialState$f = {
9271
9355
  content: ""
9272
9356
  }
9273
9357
  };
9274
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
9358
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
9275
9359
  const {
9276
- Provider: Provider$f
9277
- } = store$f;
9360
+ Provider: Provider$g
9361
+ } = store$g;
9278
9362
 
9279
9363
  const LoginContainer = ({
9280
9364
  style,
@@ -9381,7 +9465,7 @@ const LoginContainer = ({
9381
9465
  });
9382
9466
 
9383
9467
  case RESET_LOGIN_FORM:
9384
- return initialState$f;
9468
+ return initialState$g;
9385
9469
 
9386
9470
  case DISABLE_LOGIN_BUTTON:
9387
9471
  return lib_7({ ...state,
@@ -9399,12 +9483,12 @@ const LoginContainer = ({
9399
9483
  default:
9400
9484
  return state;
9401
9485
  }
9402
- }, initialState$f);
9486
+ }, initialState$g);
9403
9487
  return /*#__PURE__*/React__default['default'].createElement("div", {
9404
9488
  style: { ...style
9405
9489
  },
9406
9490
  className: `pelcro-container pelcro-login-container ${className}`
9407
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9491
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
9408
9492
  value: {
9409
9493
  state,
9410
9494
  dispatch
@@ -9412,12 +9496,12 @@ const LoginContainer = ({
9412
9496
  }, children.length ? children.map((child, i) => {
9413
9497
  if (child) {
9414
9498
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9415
- store: store$f,
9499
+ store: store$g,
9416
9500
  key: i
9417
9501
  });
9418
9502
  }
9419
9503
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9420
- store: store$f
9504
+ store: store$g
9421
9505
  })));
9422
9506
  };
9423
9507
 
@@ -9662,7 +9746,7 @@ const LoginButton = ({
9662
9746
  buttonDisabled
9663
9747
  },
9664
9748
  dispatch
9665
- } = React.useContext(store$f);
9749
+ } = React.useContext(store$g);
9666
9750
  const {
9667
9751
  t
9668
9752
  } = useTranslation("login");
@@ -9683,23 +9767,23 @@ const LoginButton = ({
9683
9767
  };
9684
9768
 
9685
9769
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
9686
- store: store$f
9770
+ store: store$g
9687
9771
  }, props));
9688
9772
 
9689
9773
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
9690
- store: store$f
9774
+ store: store$g
9691
9775
  }, props));
9692
9776
 
9693
- var _path$p;
9777
+ var _path$q;
9694
9778
 
9695
- 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); }
9696
9780
 
9697
9781
  function SvgCheck(props) {
9698
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
9782
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
9699
9783
  xmlns: "http://www.w3.org/2000/svg",
9700
9784
  fill: "currentColor",
9701
9785
  viewBox: "0 0 20 20"
9702
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
9786
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
9703
9787
  fillRule: "evenodd",
9704
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",
9705
9789
  clipRule: "evenodd"
@@ -9764,7 +9848,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9764
9848
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9765
9849
  facebookLoginRenderProps.FacebookLogin;
9766
9850
 
9767
- const initialState$e = {
9851
+ const initialState$f = {
9768
9852
  email: "",
9769
9853
  password: "",
9770
9854
  emailError: null,
@@ -9781,10 +9865,10 @@ const initialState$e = {
9781
9865
  content: ""
9782
9866
  }
9783
9867
  };
9784
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
9868
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
9785
9869
  const {
9786
- Provider: Provider$e
9787
- } = store$e;
9870
+ Provider: Provider$f
9871
+ } = store$f;
9788
9872
 
9789
9873
  const RegisterContainer = ({
9790
9874
  style,
@@ -9967,7 +10051,7 @@ const RegisterContainer = ({
9967
10051
  });
9968
10052
 
9969
10053
  case RESET_LOGIN_FORM:
9970
- return initialState$e;
10054
+ return initialState$f;
9971
10055
 
9972
10056
  case DISABLE_REGISTRATION_BUTTON:
9973
10057
  return lib_7({ ...state,
@@ -9985,12 +10069,12 @@ const RegisterContainer = ({
9985
10069
  default:
9986
10070
  return state;
9987
10071
  }
9988
- }, initialState$e);
10072
+ }, initialState$f);
9989
10073
  return /*#__PURE__*/React__default['default'].createElement("div", {
9990
10074
  style: { ...style
9991
10075
  },
9992
10076
  className: `pelcro-container pelcro-register-container ${className}`
9993
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
10077
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9994
10078
  value: {
9995
10079
  state,
9996
10080
  dispatch
@@ -9998,12 +10082,12 @@ const RegisterContainer = ({
9998
10082
  }, children.length ? children.map((child, i) => {
9999
10083
  if (child) {
10000
10084
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
10001
- store: store$e,
10085
+ store: store$f,
10002
10086
  key: i
10003
10087
  });
10004
10088
  }
10005
10089
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
10006
- store: store$e
10090
+ store: store$f
10007
10091
  })));
10008
10092
  };
10009
10093
  /**
@@ -10018,15 +10102,15 @@ function hasSecurityTokenEnabled$1() {
10018
10102
  return hasSecuritySdkLoaded;
10019
10103
  }
10020
10104
 
10021
- var _path$o;
10105
+ var _path$p;
10022
10106
 
10023
- 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); }
10024
10108
 
10025
10109
  function SvgFacebookLogo(props) {
10026
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10110
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10027
10111
  xmlns: "http://www.w3.org/2000/svg",
10028
10112
  viewBox: "88.428 12.828 107.543 207.085"
10029
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10113
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10030
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",
10031
10115
  fill: "#3c5a9a"
10032
10116
  })));
@@ -10043,10 +10127,10 @@ const FacebookLoginButton = ({
10043
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;
10044
10128
  const {
10045
10129
  dispatch: loginDispatch
10046
- } = React.useContext(store$f);
10130
+ } = React.useContext(store$g);
10047
10131
  const {
10048
10132
  dispatch: registerDispatch
10049
- } = React.useContext(store$e);
10133
+ } = React.useContext(store$f);
10050
10134
 
10051
10135
  const onSuccess = facebookUser => {
10052
10136
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10099,18 +10183,18 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10099
10183
  unwrapExports(googleLogin);
10100
10184
  var googleLogin_1 = googleLogin.GoogleLogin;
10101
10185
 
10102
- var _path$n, _path2$2, _path3$1, _path4;
10186
+ var _path$o, _path2$3, _path3$1, _path4;
10103
10187
 
10104
- 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); }
10105
10189
 
10106
10190
  function SvgGoogleLogo(props) {
10107
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10191
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10108
10192
  viewBox: "0 0 24 24",
10109
10193
  xmlns: "http://www.w3.org/2000/svg"
10110
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10194
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10111
10195
  fill: "#4285F4",
10112
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"
10113
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10197
+ })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
10114
10198
  fill: "#34A853",
10115
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"
10116
10200
  })), _path3$1 || (_path3$1 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10133,10 +10217,10 @@ const GoogleLoginButton = ({
10133
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;
10134
10218
  const {
10135
10219
  dispatch: loginDispatch
10136
- } = React.useContext(store$f);
10220
+ } = React.useContext(store$g);
10137
10221
  const {
10138
10222
  dispatch: registerDispatch
10139
- } = React.useContext(store$e);
10223
+ } = React.useContext(store$f);
10140
10224
 
10141
10225
  const onSuccess = response => {
10142
10226
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10184,15 +10268,15 @@ const GoogleLoginButton = ({
10184
10268
  }) : null;
10185
10269
  };
10186
10270
 
10187
- var _path$m;
10271
+ var _path$n;
10188
10272
 
10189
- 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); }
10190
10274
 
10191
10275
  function SvgAuth0Logo(props) {
10192
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10276
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10193
10277
  viewBox: "0 0 256 285",
10194
10278
  xmlns: "http://www.w3.org/2000/svg"
10195
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10279
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10196
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"
10197
10281
  })));
10198
10282
  }
@@ -10203,30 +10287,47 @@ const Auth0LoginButton = ({
10203
10287
  labelClassName = "",
10204
10288
  iconClassName = ""
10205
10289
  }) => {
10206
- if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
10207
- console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10208
- }
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
+ }
10209
10301
 
10210
- const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10302
+ return () => {
10303
+ var _auth0Script$removeEv;
10304
+
10305
+ auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
10306
+ };
10307
+ }, [auth0Script, auth0Enabled, auth0Loaded]);
10211
10308
  const auth0InstanceRef = React__default['default'].useRef(null);
10212
10309
  React__default['default'].useEffect(() => {
10213
- if (auth0Enabled) {
10310
+ if (auth0Enabled && auth0Loaded && auth0InstanceRef.current === null) {
10214
10311
  auth0InstanceRef.current = new window.auth0.WebAuth({
10215
10312
  domain: window.Pelcro.site.read().auth0_base_url,
10216
10313
  clientID: window.Pelcro.site.read().auth0_client_id
10217
10314
  });
10218
10315
  }
10219
- }, []);
10316
+ }, [auth0Enabled, auth0Loaded]);
10220
10317
  const {
10221
10318
  dispatch: loginDispatch
10222
- } = React.useContext(store$f);
10319
+ } = React.useContext(store$g);
10223
10320
  const {
10224
10321
  dispatch: registerDispatch
10225
- } = React.useContext(store$e);
10322
+ } = React.useContext(store$f);
10226
10323
 
10227
10324
  function handleClick() {
10228
10325
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
10229
10326
 
10327
+ if (!auth0Loaded) {
10328
+ return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10329
+ }
10330
+
10230
10331
  (_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, {
10231
10332
  responseType: "token id_token",
10232
10333
  owp: true // close popup when finished
@@ -10351,19 +10452,19 @@ function LoginView(props) {
10351
10452
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10352
10453
  }
10353
10454
 
10354
- var _path$l, _path2$1, _path3;
10455
+ var _path$m, _path2$2, _path3;
10355
10456
 
10356
- 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); }
10457
+ 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); }
10357
10458
 
10358
10459
  function SvgPelcroAuthorship(props) {
10359
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
10460
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10360
10461
  xmlns: "http://www.w3.org/2000/svg",
10361
10462
  viewBox: "0 -80.652 497.072 179.991"
10362
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
10463
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10363
10464
  fill: "none",
10364
10465
  stroke: "#4a4a4a",
10365
10466
  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"
10366
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
10467
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10367
10468
  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",
10368
10469
  fill: "#4a4a4a"
10369
10470
  })), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10506,11 +10607,11 @@ function LoginModal({
10506
10607
  LoginModal.viewId = "login";
10507
10608
 
10508
10609
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10509
- store: store$e
10610
+ store: store$f
10510
10611
  }, props));
10511
10612
 
10512
10613
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10513
- store: store$e
10614
+ store: store$f
10514
10615
  }, props));
10515
10616
 
10516
10617
  const RegisterButton = ({
@@ -10530,7 +10631,7 @@ const RegisterButton = ({
10530
10631
  buttonDisabled
10531
10632
  },
10532
10633
  dispatch
10533
- } = React.useContext(store$e);
10634
+ } = React.useContext(store$f);
10534
10635
  const {
10535
10636
  t
10536
10637
  } = useTranslation("register");
@@ -10668,7 +10769,7 @@ function FirstName({
10668
10769
  }
10669
10770
 
10670
10771
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
10671
- store: store$e
10772
+ store: store$f
10672
10773
  }, props));
10673
10774
 
10674
10775
  function LastName({
@@ -10699,7 +10800,7 @@ function LastName({
10699
10800
  }
10700
10801
 
10701
10802
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
10702
- store: store$e
10803
+ store: store$f
10703
10804
  }, props));
10704
10805
 
10705
10806
  /**
@@ -10823,7 +10924,7 @@ function TextInput({
10823
10924
 
10824
10925
  const RegisterTextInput = props => {
10825
10926
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
10826
- store: store$e
10927
+ store: store$f
10827
10928
  }));
10828
10929
  };
10829
10930
 
@@ -10866,15 +10967,21 @@ function RegisterModal(props) {
10866
10967
  };
10867
10968
 
10868
10969
  const handleAfterRegistrationLogic = () => {
10869
- var _ReactGA$event;
10970
+ var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
10870
10971
 
10871
10972
  ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
10872
10973
  category: "ACTIONS",
10873
10974
  action: "Registered",
10874
10975
  nonInteraction: true
10875
- }); // If product and plan are not selected
10976
+ });
10977
+ 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;
10978
+
10979
+ if (isEmailVerificationEnabled) {
10980
+ return switchView("email-verify");
10981
+ }
10876
10982
 
10877
10983
  if (!product && !order && !giftCode) {
10984
+ // If product and plan are not selected
10878
10985
  return resetView();
10879
10986
  } // If this is a redeem gift
10880
10987
 
@@ -11144,7 +11251,7 @@ class SelectModal extends React.Component {
11144
11251
 
11145
11252
  const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11146
11253
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11147
- const allProductsMinusMatched = allProducts.filter(product => productsThatMatchArticleTag.find(matchedProduct => matchedProduct.id !== product.id));
11254
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11148
11255
  return [productsThatMatchArticleTag, allProductsMinusMatched];
11149
11256
  }
11150
11257
  });
@@ -12833,7 +12940,7 @@ class PaypalGateWay {
12833
12940
 
12834
12941
  /** @type {PaymentStateType} */
12835
12942
 
12836
- const initialState$d = {
12943
+ const initialState$e = {
12837
12944
  disableSubmit: false,
12838
12945
  isLoading: false,
12839
12946
  disableCouponButton: false,
@@ -12852,10 +12959,10 @@ const initialState$d = {
12852
12959
  content: ""
12853
12960
  }
12854
12961
  };
12855
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
12962
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
12856
12963
  const {
12857
- Provider: Provider$d
12858
- } = store$d;
12964
+ Provider: Provider$e
12965
+ } = store$e;
12859
12966
 
12860
12967
  const PaymentMethodContainerWithoutStripe = ({
12861
12968
  style,
@@ -13017,15 +13124,50 @@ const PaymentMethodContainerWithoutStripe = ({
13017
13124
  });
13018
13125
 
13019
13126
  if (err) {
13127
+ onFailure(err);
13128
+ dispatch({
13129
+ type: SET_COUPON_ERROR,
13130
+ payload: getErrorMessages(err)
13131
+ }); // remove current coupon
13132
+
13133
+ dispatch({
13134
+ type: SET_COUPON,
13135
+ payload: null
13136
+ });
13020
13137
  dispatch({
13021
13138
  type: SET_PERCENT_OFF,
13022
13139
  payload: ""
13023
13140
  });
13024
- onFailure(err);
13025
- return dispatch({
13026
- type: SET_COUPON_ERROR,
13027
- payload: getErrorMessages(err)
13141
+ dispatch({
13142
+ type: SET_UPDATED_PRICE,
13143
+ payload: null
13028
13144
  });
13145
+ dispatch({
13146
+ type: SET_TAX_AMOUNT,
13147
+ payload: null
13148
+ });
13149
+ const {
13150
+ currentPlan
13151
+ } = state;
13152
+
13153
+ if (currentPlan) {
13154
+ var _currentPlan$quantity;
13155
+
13156
+ const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
13157
+ const price = currentPlan.amount;
13158
+ dispatch({
13159
+ type: SET_UPDATED_PRICE,
13160
+ // set original plan price
13161
+ payload: price * quantity
13162
+ });
13163
+ dispatch({
13164
+ type: UPDATE_PAYMENT_REQUEST
13165
+ }); // update the new amount with taxes if site has taxes enabled
13166
+
13167
+ updateTotalAmountWithTax();
13168
+ }
13169
+
13170
+ return;
13029
13171
  }
13030
13172
 
13031
13173
  dispatch({
@@ -13115,6 +13257,54 @@ const PaymentMethodContainerWithoutStripe = ({
13115
13257
 
13116
13258
  const debouncedApplyCouponCode = React.useRef(debounce(onApplyCouponCode, 1000)).current;
13117
13259
 
13260
+ const removeAppliedCoupon = state => {
13261
+ state.couponCode = "";
13262
+ dispatch({
13263
+ type: SET_COUPON_ERROR,
13264
+ payload: ""
13265
+ });
13266
+ dispatch({
13267
+ type: SHOW_COUPON_FIELD,
13268
+ payload: false
13269
+ });
13270
+ dispatch({
13271
+ type: SET_COUPON,
13272
+ payload: null
13273
+ });
13274
+ dispatch({
13275
+ type: SET_PERCENT_OFF,
13276
+ payload: ""
13277
+ });
13278
+ dispatch({
13279
+ type: SET_UPDATED_PRICE,
13280
+ payload: null
13281
+ });
13282
+ dispatch({
13283
+ type: SET_TAX_AMOUNT,
13284
+ payload: null
13285
+ });
13286
+ const {
13287
+ currentPlan
13288
+ } = state;
13289
+
13290
+ if (currentPlan) {
13291
+ var _currentPlan$quantity2;
13292
+
13293
+ const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
13294
+ const price = currentPlan.amount;
13295
+ dispatch({
13296
+ type: SET_UPDATED_PRICE,
13297
+ // set original plan price
13298
+ payload: price * quantity
13299
+ });
13300
+ dispatch({
13301
+ type: UPDATE_PAYMENT_REQUEST
13302
+ }); // update the new amount with taxes if site has taxes enabled
13303
+
13304
+ updateTotalAmountWithTax();
13305
+ }
13306
+ };
13307
+
13118
13308
  const subscribe = (stripeSource, state, dispatch) => {
13119
13309
  const {
13120
13310
  couponCode
@@ -13732,6 +13922,9 @@ const PaymentMethodContainerWithoutStripe = ({
13732
13922
  disableCouponButton: true
13733
13923
  }, (state, dispatch) => onApplyCouponCode(state, dispatch));
13734
13924
 
13925
+ case REMOVE_APPLIED_COUPON:
13926
+ return lib_5(state, () => removeAppliedCoupon(state));
13927
+
13735
13928
  case SET_COUPON:
13736
13929
  return lib_7({ ...state,
13737
13930
  couponObject: action.payload
@@ -13760,21 +13953,21 @@ const PaymentMethodContainerWithoutStripe = ({
13760
13953
  default:
13761
13954
  return state;
13762
13955
  }
13763
- }, initialState$d);
13956
+ }, initialState$e);
13764
13957
  return /*#__PURE__*/React__default['default'].createElement("div", {
13765
13958
  style: { ...style
13766
13959
  },
13767
13960
  className: `pelcro-container pelcro-payment-container ${className}`
13768
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
13961
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
13769
13962
  value: {
13770
13963
  state,
13771
13964
  dispatch
13772
13965
  }
13773
13966
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
13774
- store: store$d,
13967
+ store: store$e,
13775
13968
  key: i
13776
13969
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13777
- store: store$d
13970
+ store: store$e
13778
13971
  })));
13779
13972
  };
13780
13973
 
@@ -13796,7 +13989,7 @@ const PaymentMethodContainer = props => {
13796
13989
  stripeAccount: window.Pelcro.site.read().account_id,
13797
13990
  locale: getPageOrDefaultLanguage()
13798
13991
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
13799
- store: store$d
13992
+ store: store$e
13800
13993
  }, props))));
13801
13994
  }
13802
13995
 
@@ -13849,7 +14042,7 @@ const PelcroPaymentRequestButton = props => {
13849
14042
  currentPlan,
13850
14043
  updatedPrice
13851
14044
  }
13852
- } = React.useContext(store$d);
14045
+ } = React.useContext(store$e);
13853
14046
 
13854
14047
  const updatePaymentRequest = () => {
13855
14048
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -13900,12 +14093,16 @@ const DiscountedPrice = props => {
13900
14093
  var _order$currency, _order$, _plan$quantity;
13901
14094
 
13902
14095
  const {
14096
+ t
14097
+ } = useTranslation("checkoutForm");
14098
+ const {
14099
+ dispatch,
13903
14100
  state: {
13904
14101
  updatedPrice,
13905
14102
  taxAmount,
13906
14103
  percentOff
13907
14104
  }
13908
- } = React.useContext(store$d);
14105
+ } = React.useContext(store$e);
13909
14106
  const {
13910
14107
  order,
13911
14108
  plan
@@ -13915,12 +14112,22 @@ const DiscountedPrice = props => {
13915
14112
  const discountedPriceWithoutTax = updatedPrice - taxAmount;
13916
14113
  const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
13917
14114
 
14115
+ const onCouponRemove = () => {
14116
+ dispatch({
14117
+ type: REMOVE_APPLIED_COUPON
14118
+ });
14119
+ };
14120
+
13918
14121
  if (percentOff) {
13919
14122
  return /*#__PURE__*/React__default['default'].createElement("div", Object.assign({
13920
- className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
13921
- }, props), "(-", percentOff, ")", " ", /*#__PURE__*/React__default['default'].createElement("span", {
13922
- className: "plc-font-bold pelcro-discounted-price"
13923
- }, priceFormatted));
14123
+ className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
14124
+ }, props), "(-", percentOff, ")", /*#__PURE__*/React__default['default'].createElement("span", {
14125
+ className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
14126
+ }, priceFormatted), /*#__PURE__*/React__default['default'].createElement(Button, {
14127
+ variant: "ghost",
14128
+ className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
14129
+ onClick: onCouponRemove
14130
+ }, "\u2715 ", t("labels.removeCoupon")));
13924
14131
  }
13925
14132
 
13926
14133
  return "";
@@ -13945,7 +14152,7 @@ const SubmitPaymentMethod = ({
13945
14152
  isLoading,
13946
14153
  updatedPrice
13947
14154
  }
13948
- } = React.useContext(store$d);
14155
+ } = React.useContext(store$e);
13949
14156
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
13950
14157
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
13951
14158
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -13966,17 +14173,17 @@ const SubmitPaymentMethod = ({
13966
14173
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
13967
14174
  };
13968
14175
 
13969
- var _path$k;
14176
+ var _path$l;
13970
14177
 
13971
- 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); }
14178
+ 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); }
13972
14179
 
13973
14180
  function SvgArrowLeft(props) {
13974
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14181
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
13975
14182
  xmlns: "http://www.w3.org/2000/svg",
13976
14183
  fill: "none",
13977
14184
  viewBox: "0 0 24 24",
13978
14185
  stroke: "currentColor"
13979
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14186
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
13980
14187
  strokeLinecap: "round",
13981
14188
  strokeLinejoin: "round",
13982
14189
  strokeWidth: 2,
@@ -13995,7 +14202,7 @@ const ApplyCouponButton = ({
13995
14202
  disableCouponButton
13996
14203
  },
13997
14204
  dispatch
13998
- } = React.useContext(store$d);
14205
+ } = React.useContext(store$e);
13999
14206
  const {
14000
14207
  t
14001
14208
  } = useTranslation("checkoutForm");
@@ -14029,7 +14236,7 @@ const CouponCodeField = props => {
14029
14236
  couponCode,
14030
14237
  couponError
14031
14238
  }
14032
- } = React.useContext(store$d);
14239
+ } = React.useContext(store$e);
14033
14240
 
14034
14241
  const onCouponCodeChange = e => {
14035
14242
  dispatch({
@@ -14058,17 +14265,17 @@ const CouponCodeField = props => {
14058
14265
  }, props));
14059
14266
  };
14060
14267
 
14061
- var _path$j;
14268
+ var _path$k;
14062
14269
 
14063
- 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); }
14270
+ 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); }
14064
14271
 
14065
14272
  function SvgTicket(props) {
14066
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14273
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14067
14274
  xmlns: "http://www.w3.org/2000/svg",
14068
14275
  fill: "none",
14069
14276
  viewBox: "0 0 24 24",
14070
14277
  stroke: "currentColor"
14071
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14278
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14072
14279
  strokeLinecap: "round",
14073
14280
  strokeLinejoin: "round",
14074
14281
  strokeWidth: 2,
@@ -14085,7 +14292,7 @@ const CouponCode = ({
14085
14292
  state: {
14086
14293
  enableCouponField
14087
14294
  }
14088
- } = React.useContext(store$d);
14295
+ } = React.useContext(store$e);
14089
14296
  const {
14090
14297
  t
14091
14298
  } = useTranslation("checkoutForm");
@@ -14342,7 +14549,7 @@ const PaypalSubscribeButton = props => {
14342
14549
  const {
14343
14550
  dispatch,
14344
14551
  state
14345
- } = React.useContext(store$d);
14552
+ } = React.useContext(store$e);
14346
14553
  const {
14347
14554
  product,
14348
14555
  plan,
@@ -14427,16 +14634,16 @@ const BankRedirection = () => {
14427
14634
  }));
14428
14635
  };
14429
14636
 
14430
- var _path$i;
14637
+ var _path$j;
14431
14638
 
14432
- 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); }
14639
+ 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); }
14433
14640
 
14434
14641
  function SvgLock(props) {
14435
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14642
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14436
14643
  xmlns: "http://www.w3.org/2000/svg",
14437
14644
  viewBox: "0 0 20 20",
14438
14645
  fill: "currentColor"
14439
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14646
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14440
14647
  fillRule: "evenodd",
14441
14648
  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",
14442
14649
  clipRule: "evenodd"
@@ -14453,7 +14660,7 @@ const SelectedPaymentMethod = () => {
14453
14660
  state: {
14454
14661
  isLoading
14455
14662
  }
14456
- } = React.useContext(store$d);
14663
+ } = React.useContext(store$e);
14457
14664
  const {
14458
14665
  switchView,
14459
14666
  selectedPaymentMethodId
@@ -14495,7 +14702,7 @@ const TaxAmount = () => {
14495
14702
  state: {
14496
14703
  taxAmount
14497
14704
  }
14498
- } = React.useContext(store$d);
14705
+ } = React.useContext(store$e);
14499
14706
  const {
14500
14707
  plan
14501
14708
  } = usePelcro();
@@ -14658,12 +14865,12 @@ function SubscriptionRenewModal({
14658
14865
  }
14659
14866
  SubscriptionRenewModal.viewId = "subscription-renew";
14660
14867
 
14661
- var _path$h;
14868
+ var _path$i;
14662
14869
 
14663
- 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); }
14870
+ 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); }
14664
14871
 
14665
14872
  function SvgGift(props) {
14666
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
14873
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14667
14874
  className: "plc-w-6 plc-h-6 plc-mr-2",
14668
14875
  fill: "none",
14669
14876
  stroke: "currentColor",
@@ -14672,7 +14879,7 @@ function SvgGift(props) {
14672
14879
  strokeWidth: 2,
14673
14880
  viewBox: "0 0 24 24",
14674
14881
  xmlns: "http://www.w3.org/2000/svg"
14675
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
14882
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14676
14883
  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"
14677
14884
  })));
14678
14885
  }
@@ -15003,7 +15210,7 @@ class DefaultNewsLetter extends React.Component {
15003
15210
 
15004
15211
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
15005
15212
 
15006
- const initialState$c = {
15213
+ const initialState$d = {
15007
15214
  didSubToNewslettersBefore: false,
15008
15215
  newsletters: [],
15009
15216
  isListLoading: true,
@@ -15013,10 +15220,10 @@ const initialState$c = {
15013
15220
  content: ""
15014
15221
  }
15015
15222
  };
15016
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
15223
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
15017
15224
  const {
15018
- Provider: Provider$c
15019
- } = store$c;
15225
+ Provider: Provider$d
15226
+ } = store$d;
15020
15227
 
15021
15228
  const NewsletterUpdateContainer = ({
15022
15229
  style,
@@ -15129,7 +15336,7 @@ const NewsletterUpdateContainer = ({
15129
15336
  default:
15130
15337
  return state;
15131
15338
  }
15132
- }, initialState$c);
15339
+ }, initialState$d);
15133
15340
  React.useEffect(() => {
15134
15341
  const getUserNewsletters = () => {
15135
15342
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15173,7 +15380,7 @@ const NewsletterUpdateContainer = ({
15173
15380
  style: { ...style
15174
15381
  },
15175
15382
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15176
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15383
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
15177
15384
  value: {
15178
15385
  state,
15179
15386
  dispatch
@@ -15181,12 +15388,12 @@ const NewsletterUpdateContainer = ({
15181
15388
  }, children.length ? children.map((child, i) => {
15182
15389
  if (child) {
15183
15390
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
15184
- store: store$c,
15391
+ store: store$d,
15185
15392
  key: i
15186
15393
  });
15187
15394
  }
15188
15395
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15189
- store: store$c
15396
+ store: store$d
15190
15397
  })));
15191
15398
  };
15192
15399
 
@@ -15201,7 +15408,7 @@ const NewsletterUpdateButton = ({
15201
15408
  isSubmitting,
15202
15409
  isListLoading
15203
15410
  }
15204
- } = React.useContext(store$c);
15411
+ } = React.useContext(store$d);
15205
15412
  const {
15206
15413
  t
15207
15414
  } = useTranslation("newsletter");
@@ -15231,7 +15438,7 @@ const NewsletterUpdateList = () => {
15231
15438
  newsletters,
15232
15439
  isListLoading
15233
15440
  }
15234
- } = React.useContext(store$c);
15441
+ } = React.useContext(store$d);
15235
15442
 
15236
15443
  if (isListLoading) {
15237
15444
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -15435,7 +15642,7 @@ function SubscriptionCreateModal({
15435
15642
  SubscriptionCreateModal.viewId = "subscription-create";
15436
15643
 
15437
15644
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15438
- const initialState$b = {
15645
+ const initialState$c = {
15439
15646
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15440
15647
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15441
15648
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15448,10 +15655,10 @@ const initialState$b = {
15448
15655
  content: ""
15449
15656
  }
15450
15657
  };
15451
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
15658
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
15452
15659
  const {
15453
- Provider: Provider$b
15454
- } = store$b;
15660
+ Provider: Provider$c
15661
+ } = store$c;
15455
15662
 
15456
15663
  const UserUpdateContainer = ({
15457
15664
  style,
@@ -15583,27 +15790,27 @@ const UserUpdateContainer = ({
15583
15790
  default:
15584
15791
  return state;
15585
15792
  }
15586
- }, initialState$b);
15793
+ }, initialState$c);
15587
15794
  return /*#__PURE__*/React__default['default'].createElement("div", {
15588
15795
  style: { ...style
15589
15796
  },
15590
15797
  className: `pelcro-container pelcro-user-update-container ${className}`
15591
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
15798
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15592
15799
  value: {
15593
15800
  state,
15594
15801
  dispatch
15595
15802
  }
15596
15803
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
15597
- store: store$b,
15804
+ store: store$c,
15598
15805
  key: i
15599
15806
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15600
- store: store$b
15807
+ store: store$c
15601
15808
  })));
15602
15809
  };
15603
15810
 
15604
15811
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
15605
15812
  disabled: true,
15606
- store: store$b
15813
+ store: store$c
15607
15814
  }, props));
15608
15815
 
15609
15816
  const UserUpdateButton = ({
@@ -15616,7 +15823,7 @@ const UserUpdateButton = ({
15616
15823
  buttonDisabled
15617
15824
  },
15618
15825
  dispatch
15619
- } = React.useContext(store$b);
15826
+ } = React.useContext(store$c);
15620
15827
  const {
15621
15828
  t
15622
15829
  } = useTranslation("userEdit");
@@ -15633,11 +15840,11 @@ const UserUpdateButton = ({
15633
15840
  };
15634
15841
 
15635
15842
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
15636
- store: store$b
15843
+ store: store$c
15637
15844
  }, props));
15638
15845
 
15639
15846
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
15640
- store: store$b
15847
+ store: store$c
15641
15848
  }, props));
15642
15849
 
15643
15850
  function Phone({
@@ -15666,22 +15873,22 @@ function Phone({
15666
15873
  }
15667
15874
 
15668
15875
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
15669
- store: store$b
15876
+ store: store$c
15670
15877
  }, props));
15671
15878
 
15672
15879
  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";
15673
15880
 
15674
- var _path$g;
15881
+ var _path$h;
15675
15882
 
15676
- 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); }
15883
+ 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); }
15677
15884
 
15678
15885
  function SvgEdit(props) {
15679
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
15886
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
15680
15887
  className: "plc-w-6 plc-h-6",
15681
15888
  xmlns: "http://www.w3.org/2000/svg",
15682
15889
  viewBox: "0 0 20 20",
15683
15890
  fill: "currentColor"
15684
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
15891
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
15685
15892
  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"
15686
15893
  })));
15687
15894
  }
@@ -15813,16 +16020,16 @@ function DisplayName({
15813
16020
  }
15814
16021
 
15815
16022
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
15816
- store: store$b
16023
+ store: store$c
15817
16024
  }, props));
15818
16025
 
15819
16026
  const UserUpdateTextInput = props => {
15820
16027
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
15821
- store: store$b
16028
+ store: store$c
15822
16029
  }));
15823
16030
  };
15824
16031
 
15825
- const initialState$a = {
16032
+ const initialState$b = {
15826
16033
  isSubmitting: false,
15827
16034
  firstName: "",
15828
16035
  firstNameError: "",
@@ -15847,10 +16054,10 @@ const initialState$a = {
15847
16054
  content: ""
15848
16055
  }
15849
16056
  };
15850
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
16057
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
15851
16058
  const {
15852
- Provider: Provider$a
15853
- } = store$a;
16059
+ Provider: Provider$b
16060
+ } = store$b;
15854
16061
 
15855
16062
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
15856
16063
 
@@ -16057,7 +16264,7 @@ const AddressCreateContainer = ({
16057
16264
  default:
16058
16265
  return state;
16059
16266
  }
16060
- }, initialState$a);
16267
+ }, initialState$b);
16061
16268
  React.useEffect(() => {
16062
16269
  const getStates = () => {
16063
16270
  dispatch({
@@ -16089,16 +16296,16 @@ const AddressCreateContainer = ({
16089
16296
  style: { ...style
16090
16297
  },
16091
16298
  className: `pelcro-container pelcro-address-create-container ${className}`
16092
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16299
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
16093
16300
  value: {
16094
16301
  state,
16095
16302
  dispatch
16096
16303
  }
16097
16304
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16098
- store: store$a,
16305
+ store: store$b,
16099
16306
  key: i
16100
16307
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16101
- store: store$a
16308
+ store: store$b
16102
16309
  })));
16103
16310
  };
16104
16311
 
@@ -16109,7 +16316,7 @@ function AddressCreateFirstName(props) {
16109
16316
  firstName,
16110
16317
  firstNameError
16111
16318
  }
16112
- } = React.useContext(store$a);
16319
+ } = React.useContext(store$b);
16113
16320
 
16114
16321
  const handleBlur = () => {
16115
16322
  return dispatch({
@@ -16152,7 +16359,7 @@ function AddressCreateLastName(props) {
16152
16359
  lastName,
16153
16360
  lastNameError
16154
16361
  }
16155
- } = React.useContext(store$a);
16362
+ } = React.useContext(store$b);
16156
16363
 
16157
16364
  const handleBlur = () => {
16158
16365
  return dispatch({
@@ -16195,7 +16402,7 @@ function AddressCreateLine1(props) {
16195
16402
  line1,
16196
16403
  line1Error
16197
16404
  }
16198
- } = React.useContext(store$a);
16405
+ } = React.useContext(store$b);
16199
16406
 
16200
16407
  const handleBlur = () => {
16201
16408
  return dispatch({
@@ -16238,7 +16445,7 @@ function AddressCreateCity(props) {
16238
16445
  city,
16239
16446
  cityError
16240
16447
  }
16241
- } = React.useContext(store$a);
16448
+ } = React.useContext(store$b);
16242
16449
 
16243
16450
  const handleBlur = () => {
16244
16451
  return dispatch({
@@ -16281,7 +16488,7 @@ function AddressCreatePostalCode(props) {
16281
16488
  postalCode,
16282
16489
  postalCodeError
16283
16490
  }
16284
- } = React.useContext(store$a);
16491
+ } = React.useContext(store$b);
16285
16492
 
16286
16493
  const handleBlur = () => {
16287
16494
  return dispatch({
@@ -16327,7 +16534,7 @@ const AddressCreateSubmit = ({
16327
16534
  state: {
16328
16535
  isSubmitting
16329
16536
  }
16330
- } = React.useContext(store$a);
16537
+ } = React.useContext(store$b);
16331
16538
  const {
16332
16539
  t
16333
16540
  } = useTranslation("address");
@@ -16438,7 +16645,7 @@ function CountrySelect({
16438
16645
  }
16439
16646
 
16440
16647
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16441
- store: store$a
16648
+ store: store$b
16442
16649
  }, props));
16443
16650
 
16444
16651
  function StateSelect({
@@ -16526,7 +16733,7 @@ function StateSelect({
16526
16733
  }
16527
16734
 
16528
16735
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
16529
- store: store$a
16736
+ store: store$b
16530
16737
  }, props));
16531
16738
 
16532
16739
  const AddressCreateView = props => {
@@ -16631,18 +16838,18 @@ AddressCreateModal.viewId = "address-create";
16631
16838
 
16632
16839
  const AddressCreateTextInput = props => {
16633
16840
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16634
- store: store$a
16841
+ store: store$b
16635
16842
  }));
16636
16843
  };
16637
16844
 
16638
16845
  const AddressCreateLine2 = props => {
16639
16846
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
16640
16847
  fieldName: "line2",
16641
- store: store$a
16848
+ store: store$b
16642
16849
  }, props));
16643
16850
  };
16644
16851
 
16645
- const initialState$9 = {
16852
+ const initialState$a = {
16646
16853
  isSubmitting: false,
16647
16854
  firstName: "",
16648
16855
  firstNameError: "",
@@ -16667,10 +16874,10 @@ const initialState$9 = {
16667
16874
  content: ""
16668
16875
  }
16669
16876
  };
16670
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
16877
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
16671
16878
  const {
16672
- Provider: Provider$9
16673
- } = store$9;
16879
+ Provider: Provider$a
16880
+ } = store$a;
16674
16881
 
16675
16882
  const AddressUpdateContainer = ({
16676
16883
  style,
@@ -16722,7 +16929,7 @@ const AddressUpdateContainer = ({
16722
16929
  const thisAddress = addresses[address];
16723
16930
 
16724
16931
  if (+thisAddress.id === +addressId) {
16725
- const newState = { ...initialState$9,
16932
+ const newState = { ...initialState$a,
16726
16933
  firstName: thisAddress.first_name,
16727
16934
  lastName: thisAddress.last_name,
16728
16935
  line1: thisAddress.line1,
@@ -16855,7 +17062,7 @@ const AddressUpdateContainer = ({
16855
17062
  default:
16856
17063
  return state;
16857
17064
  }
16858
- }, initialState$9);
17065
+ }, initialState$a);
16859
17066
  React.useEffect(() => {
16860
17067
  const getStates = () => {
16861
17068
  dispatch({
@@ -16887,21 +17094,21 @@ const AddressUpdateContainer = ({
16887
17094
  style: { ...style
16888
17095
  },
16889
17096
  className: `pelcro-container pelcro-address-update-container ${className}`
16890
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17097
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16891
17098
  value: {
16892
17099
  state,
16893
17100
  dispatch
16894
17101
  }
16895
17102
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16896
- store: store$9,
17103
+ store: store$a,
16897
17104
  key: i
16898
17105
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16899
- store: store$9
17106
+ store: store$a
16900
17107
  })));
16901
17108
  };
16902
17109
 
16903
17110
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16904
- store: store$9
17111
+ store: store$a
16905
17112
  }, props));
16906
17113
 
16907
17114
  function AddressUpdateFirstName(props) {
@@ -16911,7 +17118,7 @@ function AddressUpdateFirstName(props) {
16911
17118
  firstName,
16912
17119
  firstNameError
16913
17120
  }
16914
- } = React.useContext(store$9);
17121
+ } = React.useContext(store$a);
16915
17122
 
16916
17123
  const handleBlur = () => {
16917
17124
  return dispatch({
@@ -16954,7 +17161,7 @@ function AddressUpdateLastName(props) {
16954
17161
  lastName,
16955
17162
  lastNameError
16956
17163
  }
16957
- } = React.useContext(store$9);
17164
+ } = React.useContext(store$a);
16958
17165
 
16959
17166
  const handleBlur = () => {
16960
17167
  return dispatch({
@@ -16997,7 +17204,7 @@ function AddressUpdateLine1(props) {
16997
17204
  line1,
16998
17205
  line1Error
16999
17206
  }
17000
- } = React.useContext(store$9);
17207
+ } = React.useContext(store$a);
17001
17208
 
17002
17209
  const handleBlur = () => {
17003
17210
  return dispatch({
@@ -17037,7 +17244,7 @@ const AddressUpdateLine2 = props => {
17037
17244
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
17038
17245
  fieldName: "line2"
17039
17246
  }, props, {
17040
- store: store$9
17247
+ store: store$a
17041
17248
  }));
17042
17249
  };
17043
17250
 
@@ -17048,7 +17255,7 @@ function AddressUpdateCity(props) {
17048
17255
  city,
17049
17256
  cityError
17050
17257
  }
17051
- } = React.useContext(store$9);
17258
+ } = React.useContext(store$a);
17052
17259
 
17053
17260
  const handleBlur = () => {
17054
17261
  return dispatch({
@@ -17091,7 +17298,7 @@ function AddressUpdatePostalCode(props) {
17091
17298
  postalCode,
17092
17299
  postalCodeError
17093
17300
  }
17094
- } = React.useContext(store$9);
17301
+ } = React.useContext(store$a);
17095
17302
 
17096
17303
  const handleBlur = () => {
17097
17304
  return dispatch({
@@ -17137,7 +17344,7 @@ const AddressUpdateSubmit = ({
17137
17344
  state: {
17138
17345
  isSubmitting
17139
17346
  }
17140
- } = React.useContext(store$9);
17347
+ } = React.useContext(store$a);
17141
17348
  const {
17142
17349
  t
17143
17350
  } = useTranslation("address");
@@ -17153,7 +17360,7 @@ const AddressUpdateSubmit = ({
17153
17360
  };
17154
17361
 
17155
17362
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17156
- store: store$9
17363
+ store: store$a
17157
17364
  }, props));
17158
17365
 
17159
17366
  const AddressUpdateView = props => {
@@ -17236,7 +17443,7 @@ AddressUpdateModal.viewId = "address-edit";
17236
17443
 
17237
17444
  const AddressUpdateTextInput = props => {
17238
17445
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17239
- store: store$9
17446
+ store: store$a
17240
17447
  }));
17241
17448
  };
17242
17449
 
@@ -17319,7 +17526,7 @@ const PaymentMethodUpdateModal = props => {
17319
17526
  };
17320
17527
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17321
17528
 
17322
- const initialState$8 = {
17529
+ const initialState$9 = {
17323
17530
  email: "",
17324
17531
  password: "",
17325
17532
  passwordError: null,
@@ -17332,10 +17539,10 @@ const initialState$8 = {
17332
17539
  content: ""
17333
17540
  }
17334
17541
  };
17335
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17542
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
17336
17543
  const {
17337
- Provider: Provider$8
17338
- } = store$8;
17544
+ Provider: Provider$9
17545
+ } = store$9;
17339
17546
 
17340
17547
  const PasswordResetContainer = ({
17341
17548
  style,
@@ -17392,7 +17599,7 @@ const PasswordResetContainer = ({
17392
17599
  type: SET_EMAIL,
17393
17600
  payload: window.Pelcro.helpers.getURLParameter("email")
17394
17601
  });
17395
- initialState$8.email = window.Pelcro.helpers.getURLParameter("email");
17602
+ initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17396
17603
  dispatch({
17397
17604
  type: SET_TOKEN,
17398
17605
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17452,26 +17659,26 @@ const PasswordResetContainer = ({
17452
17659
  default:
17453
17660
  return state;
17454
17661
  }
17455
- }, initialState$8);
17662
+ }, initialState$9);
17456
17663
  return /*#__PURE__*/React__default['default'].createElement("div", {
17457
17664
  style: { ...style
17458
17665
  },
17459
17666
  className: `pelcro-container pelcro-password-reset-container ${className}`
17460
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17667
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17461
17668
  value: {
17462
17669
  state,
17463
17670
  dispatch
17464
17671
  }
17465
17672
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17466
- store: store$8,
17673
+ store: store$9,
17467
17674
  key: i
17468
17675
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17469
- store: store$8
17676
+ store: store$9
17470
17677
  })));
17471
17678
  };
17472
17679
 
17473
17680
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
17474
- store: store$8
17681
+ store: store$9
17475
17682
  }, props));
17476
17683
 
17477
17684
  const PasswordResetButton = ({
@@ -17484,7 +17691,7 @@ const PasswordResetButton = ({
17484
17691
  buttonDisabled
17485
17692
  },
17486
17693
  dispatch
17487
- } = React.useContext(store$8);
17694
+ } = React.useContext(store$9);
17488
17695
  const {
17489
17696
  t
17490
17697
  } = useTranslation("passwordReset");
@@ -17501,14 +17708,14 @@ const PasswordResetButton = ({
17501
17708
  };
17502
17709
 
17503
17710
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17504
- store: store$8
17711
+ store: store$9
17505
17712
  }, props, {
17506
17713
  value: window.Pelcro.helpers.getURLParameter("email"),
17507
17714
  disabled: true
17508
17715
  }));
17509
17716
 
17510
17717
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
17511
- store: store$8
17718
+ store: store$9
17512
17719
  }, props));
17513
17720
 
17514
17721
  const PasswordResetView = props => {
@@ -17560,7 +17767,7 @@ const PasswordResetModal = ({
17560
17767
  };
17561
17768
  PasswordResetModal.viewId = "password-reset";
17562
17769
 
17563
- const initialState$7 = {
17770
+ const initialState$8 = {
17564
17771
  email: "",
17565
17772
  emailError: null,
17566
17773
  buttonDisabled: false,
@@ -17569,10 +17776,10 @@ const initialState$7 = {
17569
17776
  content: ""
17570
17777
  }
17571
17778
  };
17572
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17779
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17573
17780
  const {
17574
- Provider: Provider$7
17575
- } = store$7;
17781
+ Provider: Provider$8
17782
+ } = store$8;
17576
17783
 
17577
17784
  const PasswordForgotContainer = ({
17578
17785
  style,
@@ -17650,21 +17857,21 @@ const PasswordForgotContainer = ({
17650
17857
  default:
17651
17858
  return state;
17652
17859
  }
17653
- }, initialState$7);
17860
+ }, initialState$8);
17654
17861
  return /*#__PURE__*/React__default['default'].createElement("div", {
17655
17862
  style: { ...style
17656
17863
  },
17657
17864
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17658
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
17865
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17659
17866
  value: {
17660
17867
  state,
17661
17868
  dispatch
17662
17869
  }
17663
17870
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17664
- store: store$7,
17871
+ store: store$8,
17665
17872
  key: i
17666
17873
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17667
- store: store$7
17874
+ store: store$8
17668
17875
  })));
17669
17876
  };
17670
17877
 
@@ -17680,7 +17887,7 @@ const PasswordForgotButton = ({
17680
17887
  emailError
17681
17888
  },
17682
17889
  dispatch
17683
- } = React.useContext(store$7);
17890
+ } = React.useContext(store$8);
17684
17891
  const {
17685
17892
  t
17686
17893
  } = useTranslation("passwordForgot");
@@ -17701,7 +17908,7 @@ const PasswordForgotButton = ({
17701
17908
  };
17702
17909
 
17703
17910
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17704
- store: store$7
17911
+ store: store$8
17705
17912
  }, props));
17706
17913
 
17707
17914
  const PasswordForgotView = props => {
@@ -17751,7 +17958,7 @@ const PasswordForgotModal = ({
17751
17958
  };
17752
17959
  PasswordForgotModal.viewId = "password-forgot";
17753
17960
 
17754
- const initialState$6 = {
17961
+ const initialState$7 = {
17755
17962
  currentPassword: "",
17756
17963
  newPassword: "",
17757
17964
  confirmNewPassword: "",
@@ -17765,10 +17972,10 @@ const initialState$6 = {
17765
17972
  content: ""
17766
17973
  }
17767
17974
  };
17768
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
17975
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17769
17976
  const {
17770
- Provider: Provider$6
17771
- } = store$6;
17977
+ Provider: Provider$7
17978
+ } = store$7;
17772
17979
  const PasswordChangeContainer = ({
17773
17980
  style,
17774
17981
  className = "",
@@ -17920,21 +18127,21 @@ const PasswordChangeContainer = ({
17920
18127
  default:
17921
18128
  return state;
17922
18129
  }
17923
- }, initialState$6);
18130
+ }, initialState$7);
17924
18131
  return /*#__PURE__*/React__default['default'].createElement("div", {
17925
18132
  style: { ...style
17926
18133
  },
17927
18134
  className: `pelcro-container pelcro-password-change-container ${className}`
17928
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18135
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
17929
18136
  value: {
17930
18137
  state,
17931
18138
  dispatch
17932
18139
  }
17933
18140
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17934
- store: store$6,
18141
+ store: store$7,
17935
18142
  key: i
17936
18143
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17937
- store: store$6
18144
+ store: store$7
17938
18145
  })));
17939
18146
  };
17940
18147
 
@@ -17945,7 +18152,7 @@ function PasswordChangeCurrentPassword(props) {
17945
18152
  currentPassword,
17946
18153
  currentPasswordError
17947
18154
  }
17948
- } = React.useContext(store$6);
18155
+ } = React.useContext(store$7);
17949
18156
  const handleBlur = React.useCallback(() => {
17950
18157
  return dispatch({
17951
18158
  type: VALIDATE_PASSWORD
@@ -17979,7 +18186,7 @@ function PasswordChangeNewPassword(props) {
17979
18186
  newPassword,
17980
18187
  newPasswordError
17981
18188
  }
17982
- } = React.useContext(store$6);
18189
+ } = React.useContext(store$7);
17983
18190
  const handleBlur = React.useCallback(() => {
17984
18191
  return dispatch({
17985
18192
  type: VALIDATE_NEW_PASSWORD
@@ -18013,7 +18220,7 @@ function PasswordChangeConfirmNewPassword(props) {
18013
18220
  confirmNewPassword,
18014
18221
  confirmNewPasswordError
18015
18222
  }
18016
- } = React.useContext(store$6);
18223
+ } = React.useContext(store$7);
18017
18224
  const handleBlur = React.useCallback(() => {
18018
18225
  return dispatch({
18019
18226
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18054,7 +18261,7 @@ const PasswordChangeButton = ({
18054
18261
  confirmNewPasswordError
18055
18262
  },
18056
18263
  dispatch
18057
- } = React.useContext(store$6);
18264
+ } = React.useContext(store$7);
18058
18265
  const {
18059
18266
  t
18060
18267
  } = useTranslation("passwordChange");
@@ -18120,17 +18327,17 @@ const PasswordChangeModal = ({
18120
18327
  };
18121
18328
  PasswordChangeModal.viewId = "password-change";
18122
18329
 
18123
- const initialState$5 = {
18330
+ const initialState$6 = {
18124
18331
  buttonDisabled: false,
18125
18332
  alert: {
18126
18333
  type: "error",
18127
18334
  content: ""
18128
18335
  }
18129
18336
  };
18130
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18337
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
18131
18338
  const {
18132
- Provider: Provider$5
18133
- } = store$5;
18339
+ Provider: Provider$6
18340
+ } = store$6;
18134
18341
 
18135
18342
  const CartContainer = ({
18136
18343
  style,
@@ -18221,21 +18428,21 @@ const CartContainer = ({
18221
18428
  default:
18222
18429
  return state;
18223
18430
  }
18224
- }, initialState$5);
18431
+ }, initialState$6);
18225
18432
  return /*#__PURE__*/React__default['default'].createElement("div", {
18226
18433
  style: { ...style
18227
18434
  },
18228
18435
  className: `pelcro-container pelcro-cart-container ${className}`
18229
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18436
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18230
18437
  value: {
18231
18438
  state,
18232
18439
  dispatch
18233
18440
  }
18234
18441
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18235
- store: store$5,
18442
+ store: store$6,
18236
18443
  key: i
18237
18444
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18238
- store: store$5
18445
+ store: store$6
18239
18446
  })));
18240
18447
  };
18241
18448
 
@@ -18272,7 +18479,7 @@ const CartSubmit = ({
18272
18479
  buttonDisabled
18273
18480
  },
18274
18481
  dispatch
18275
- } = React.useContext(store$5);
18482
+ } = React.useContext(store$6);
18276
18483
  const {
18277
18484
  t
18278
18485
  } = useTranslation("cart");
@@ -18303,7 +18510,7 @@ const CartTotalPrice = () => {
18303
18510
  state: {
18304
18511
  alert
18305
18512
  }
18306
- } = React.useContext(store$5);
18513
+ } = React.useContext(store$6);
18307
18514
  const {
18308
18515
  cartItems
18309
18516
  } = usePelcro();
@@ -18616,7 +18823,7 @@ const OrderConfirmModal = props => {
18616
18823
  };
18617
18824
  OrderConfirmModal.viewId = "order-confirm";
18618
18825
 
18619
- const initialState$4 = {
18826
+ const initialState$5 = {
18620
18827
  email: "",
18621
18828
  firstName: "",
18622
18829
  lastName: "",
@@ -18628,10 +18835,10 @@ const initialState$4 = {
18628
18835
  content: ""
18629
18836
  }
18630
18837
  };
18631
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
18838
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18632
18839
  const {
18633
- Provider: Provider$4
18634
- } = store$4;
18840
+ Provider: Provider$5
18841
+ } = store$5;
18635
18842
 
18636
18843
  const GiftCreateContainer = ({
18637
18844
  style,
@@ -18735,21 +18942,21 @@ const GiftCreateContainer = ({
18735
18942
  default:
18736
18943
  return state;
18737
18944
  }
18738
- }, initialState$4);
18945
+ }, initialState$5);
18739
18946
  return /*#__PURE__*/React__default['default'].createElement("div", {
18740
18947
  style: { ...style
18741
18948
  },
18742
18949
  className: `pelcro-container pelcro-gift-create-container ${className}`
18743
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
18950
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18744
18951
  value: {
18745
18952
  state,
18746
18953
  dispatch
18747
18954
  }
18748
18955
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18749
- store: store$4,
18956
+ store: store$5,
18750
18957
  key: i
18751
18958
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18752
- store: store$4
18959
+ store: store$5
18753
18960
  })));
18754
18961
  };
18755
18962
 
@@ -18763,7 +18970,7 @@ const GiftCreateSubmitButton = ({
18763
18970
  state: {
18764
18971
  disableSubmit
18765
18972
  }
18766
- } = React.useContext(store$4);
18973
+ } = React.useContext(store$5);
18767
18974
  const {
18768
18975
  t
18769
18976
  } = useTranslation("register");
@@ -18780,29 +18987,29 @@ const GiftCreateSubmitButton = ({
18780
18987
 
18781
18988
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18782
18989
  initWithUserEmail: false,
18783
- store: store$4
18990
+ store: store$5
18784
18991
  }, props));
18785
18992
 
18786
18993
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
18787
- store: store$4
18994
+ store: store$5
18788
18995
  }, props));
18789
18996
 
18790
18997
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
18791
- store: store$4
18998
+ store: store$5
18792
18999
  }, props));
18793
19000
 
18794
- var _path$f;
19001
+ var _path$g;
18795
19002
 
18796
- 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); }
19003
+ 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); }
18797
19004
 
18798
19005
  function SvgInfoCircle(props) {
18799
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
19006
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
18800
19007
  xmlns: "http://www.w3.org/2000/svg",
18801
19008
  className: "plc-w-5 plc-h-5",
18802
19009
  fill: "none",
18803
19010
  viewBox: "0 0 24 24",
18804
19011
  stroke: "currentColor"
18805
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
19012
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
18806
19013
  strokeLinecap: "round",
18807
19014
  strokeLinejoin: "round",
18808
19015
  strokeWidth: 2,
@@ -18873,7 +19080,7 @@ const GiftCreateStartDate = props => {
18873
19080
  const {
18874
19081
  dispatch,
18875
19082
  state
18876
- } = React.useContext(store$4);
19083
+ } = React.useContext(store$5);
18877
19084
 
18878
19085
  const handleInputChange = value => {
18879
19086
  dispatch({
@@ -18944,7 +19151,7 @@ function GiftCreateMessage(props) {
18944
19151
  const {
18945
19152
  dispatch,
18946
19153
  state
18947
- } = React.useContext(store$4);
19154
+ } = React.useContext(store$5);
18948
19155
 
18949
19156
  const handleInputChange = value => {
18950
19157
  dispatch({
@@ -19064,7 +19271,7 @@ const GiftCreateModal = ({
19064
19271
  };
19065
19272
  GiftCreateModal.viewId = "gift-create";
19066
19273
 
19067
- const initialState$3 = {
19274
+ const initialState$4 = {
19068
19275
  giftCode: "",
19069
19276
  buttonDisabled: true,
19070
19277
  alert: {
@@ -19072,10 +19279,10 @@ const initialState$3 = {
19072
19279
  content: ""
19073
19280
  }
19074
19281
  };
19075
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19282
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
19076
19283
  const {
19077
- Provider: Provider$3
19078
- } = store$3;
19284
+ Provider: Provider$4
19285
+ } = store$4;
19079
19286
 
19080
19287
  const GiftRedeemContainer = ({
19081
19288
  style,
@@ -19140,21 +19347,21 @@ const GiftRedeemContainer = ({
19140
19347
  default:
19141
19348
  return state;
19142
19349
  }
19143
- }, initialState$3);
19350
+ }, initialState$4);
19144
19351
  return /*#__PURE__*/React__default['default'].createElement("div", {
19145
19352
  style: { ...style
19146
19353
  },
19147
19354
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19148
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19355
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
19149
19356
  value: {
19150
19357
  state,
19151
19358
  dispatch
19152
19359
  }
19153
19360
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19154
- store: store$3,
19361
+ store: store$4,
19155
19362
  key: i
19156
19363
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19157
- store: store$3
19364
+ store: store$4
19158
19365
  })));
19159
19366
  };
19160
19367
 
@@ -19191,7 +19398,7 @@ function GiftCode({
19191
19398
  }
19192
19399
 
19193
19400
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
19194
- store: store$3
19401
+ store: store$4
19195
19402
  }, props));
19196
19403
 
19197
19404
  const GiftRedeemSubmitButton = ({
@@ -19204,7 +19411,7 @@ const GiftRedeemSubmitButton = ({
19204
19411
  state: {
19205
19412
  disableSubmit
19206
19413
  }
19207
- } = React.useContext(store$3);
19414
+ } = React.useContext(store$4);
19208
19415
  const {
19209
19416
  t
19210
19417
  } = useTranslation("register");
@@ -19297,7 +19504,7 @@ const moveDefaultAddressToStart = addresses => {
19297
19504
  return [defaultAddress, ...addressesWithoutDefault];
19298
19505
  };
19299
19506
 
19300
- const initialState$2 = {
19507
+ const initialState$3 = {
19301
19508
  addresses: [],
19302
19509
  selectedAddressId: null,
19303
19510
  isSubmitting: false,
@@ -19306,10 +19513,10 @@ const initialState$2 = {
19306
19513
  content: ""
19307
19514
  }
19308
19515
  };
19309
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19516
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19310
19517
  const {
19311
- Provider: Provider$2
19312
- } = store$2;
19518
+ Provider: Provider$3
19519
+ } = store$3;
19313
19520
 
19314
19521
  const AddressSelectContainer = ({
19315
19522
  style,
@@ -19404,7 +19611,7 @@ const AddressSelectContainer = ({
19404
19611
  default:
19405
19612
  return state;
19406
19613
  }
19407
- }, initialState$2);
19614
+ }, initialState$3);
19408
19615
  React.useEffect(() => {
19409
19616
  var _window$Pelcro$user$r;
19410
19617
 
@@ -19417,16 +19624,16 @@ const AddressSelectContainer = ({
19417
19624
  style: { ...style
19418
19625
  },
19419
19626
  className: `pelcro-container pelcro-address-select-container ${className}`
19420
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19627
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19421
19628
  value: {
19422
19629
  state,
19423
19630
  dispatch
19424
19631
  }
19425
19632
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19426
- store: store$2,
19633
+ store: store$3,
19427
19634
  key: i
19428
19635
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19429
- store: store$2
19636
+ store: store$3
19430
19637
  })));
19431
19638
  };
19432
19639
 
@@ -19437,7 +19644,7 @@ const AddressSelectList = () => {
19437
19644
  addresses,
19438
19645
  selectedAddressId
19439
19646
  }
19440
- } = React.useContext(store$2);
19647
+ } = React.useContext(store$3);
19441
19648
 
19442
19649
  const handleAddressSelect = event => {
19443
19650
  dispatch({
@@ -19481,7 +19688,7 @@ const AddressSelectSubmit = ({
19481
19688
  selectedAddressId,
19482
19689
  isSubmitting
19483
19690
  }
19484
- } = React.useContext(store$2);
19691
+ } = React.useContext(store$3);
19485
19692
  const {
19486
19693
  t
19487
19694
  } = useTranslation("address");
@@ -19569,10 +19776,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19569
19776
 
19570
19777
  const defaultPaymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.source;
19571
19778
  const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
19779
+
19780
+ if (defaultPaymentMethod.status !== "chargeable") {
19781
+ return paymentMethodsWithoutDefault;
19782
+ }
19783
+
19572
19784
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19573
19785
  };
19574
19786
 
19575
- const initialState$1 = {
19787
+ const initialState$2 = {
19576
19788
  paymentMethods: [],
19577
19789
  selectedPaymentMethodId: null,
19578
19790
  isSubmitting: false,
@@ -19581,10 +19793,10 @@ const initialState$1 = {
19581
19793
  content: ""
19582
19794
  }
19583
19795
  };
19584
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
19796
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19585
19797
  const {
19586
- Provider: Provider$1
19587
- } = store$1;
19798
+ Provider: Provider$2
19799
+ } = store$2;
19588
19800
 
19589
19801
  const PaymentMethodSelectContainer = ({
19590
19802
  style,
@@ -19629,7 +19841,7 @@ const PaymentMethodSelectContainer = ({
19629
19841
  default:
19630
19842
  return state;
19631
19843
  }
19632
- }, initialState$1);
19844
+ }, initialState$2);
19633
19845
  React.useEffect(() => {
19634
19846
  var _window$Pelcro$user$r4;
19635
19847
 
@@ -19642,16 +19854,16 @@ const PaymentMethodSelectContainer = ({
19642
19854
  style: { ...style
19643
19855
  },
19644
19856
  className: `pelcro-container pelcro-payment-select-container ${className}`
19645
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
19857
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19646
19858
  value: {
19647
19859
  state,
19648
19860
  dispatch
19649
19861
  }
19650
19862
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19651
- store: store$1,
19863
+ store: store$2,
19652
19864
  key: i
19653
19865
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19654
- store: store$1
19866
+ store: store$2
19655
19867
  })));
19656
19868
  };
19657
19869
 
@@ -19665,7 +19877,7 @@ const PaymentMethodSelectList = () => {
19665
19877
  paymentMethods,
19666
19878
  selectedPaymentMethodId
19667
19879
  }
19668
- } = React.useContext(store$1);
19880
+ } = React.useContext(store$2);
19669
19881
 
19670
19882
  const handlePaymentMethodSelect = event => {
19671
19883
  dispatch({
@@ -19715,7 +19927,7 @@ const PaymentMethodSelectSubmit = ({
19715
19927
  selectedPaymentMethodId,
19716
19928
  isSubmitting
19717
19929
  }
19718
- } = React.useContext(store$1);
19930
+ } = React.useContext(store$2);
19719
19931
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
19720
19932
  onClick: () => {
19721
19933
  dispatch({
@@ -19789,8 +20001,8 @@ const PaymentMethodSelectModal = ({
19789
20001
  };
19790
20002
  PaymentMethodSelectModal.viewId = "payment-method-select";
19791
20003
 
19792
- function _extends$g() {
19793
- _extends$g = Object.assign || function (target) {
20004
+ function _extends$h() {
20005
+ _extends$h = Object.assign || function (target) {
19794
20006
  for (var i = 1; i < arguments.length; i++) {
19795
20007
  var source = arguments[i];
19796
20008
 
@@ -19804,7 +20016,7 @@ function _extends$g() {
19804
20016
  return target;
19805
20017
  };
19806
20018
 
19807
- return _extends$g.apply(this, arguments);
20019
+ return _extends$h.apply(this, arguments);
19808
20020
  }
19809
20021
 
19810
20022
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -19988,7 +20200,7 @@ function render(props, propsBag, defaultTag, features, visible) {
19988
20200
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
19989
20201
  return null;
19990
20202
  }, _match[RenderStrategy.Hidden] = function () {
19991
- return _render(_extends$g({}, _rest, {
20203
+ return _render(_extends$h({}, _rest, {
19992
20204
  hidden: true,
19993
20205
  style: {
19994
20206
  display: 'none'
@@ -20516,7 +20728,7 @@ function TransitionChild(props) {
20516
20728
  var passthroughProps = rest;
20517
20729
  return React__default['default'].createElement(NestingContext.Provider, {
20518
20730
  value: nesting
20519
- }, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20731
+ }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20520
20732
  }
20521
20733
 
20522
20734
  function Transition(props) {
@@ -20560,7 +20772,7 @@ function Transition(props) {
20560
20772
  value: nestingBag
20561
20773
  }, React__default['default'].createElement(TransitionContext.Provider, {
20562
20774
  value: transitionBag
20563
- }, render(_extends$g({}, sharedProps, {
20775
+ }, render(_extends$h({}, sharedProps, {
20564
20776
  as: React.Fragment,
20565
20777
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20566
20778
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20687,12 +20899,12 @@ var ActionTypes;
20687
20899
  })(ActionTypes || (ActionTypes = {}));
20688
20900
 
20689
20901
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20690
- return _extends$g({}, state, {
20902
+ return _extends$h({}, state, {
20691
20903
  activeItemIndex: null,
20692
20904
  menuState: MenuStates.Closed
20693
20905
  });
20694
20906
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20695
- return _extends$g({}, state, {
20907
+ return _extends$h({}, state, {
20696
20908
  menuState: MenuStates.Open
20697
20909
  });
20698
20910
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20711,7 +20923,7 @@ var ActionTypes;
20711
20923
  }
20712
20924
  });
20713
20925
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20714
- return _extends$g({}, state, {
20926
+ return _extends$h({}, state, {
20715
20927
  searchQuery: '',
20716
20928
  activeItemIndex: activeItemIndex
20717
20929
  });
@@ -20722,19 +20934,19 @@ var ActionTypes;
20722
20934
 
20723
20935
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20724
20936
  });
20725
- if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
20937
+ if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
20726
20938
  searchQuery: searchQuery
20727
20939
  });
20728
- return _extends$g({}, state, {
20940
+ return _extends$h({}, state, {
20729
20941
  searchQuery: searchQuery,
20730
20942
  activeItemIndex: match
20731
20943
  });
20732
20944
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20733
- return _extends$g({}, state, {
20945
+ return _extends$h({}, state, {
20734
20946
  searchQuery: ''
20735
20947
  });
20736
20948
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20737
- return _extends$g({}, state, {
20949
+ return _extends$h({}, state, {
20738
20950
  items: [].concat(state.items, [{
20739
20951
  id: action.id,
20740
20952
  dataRef: action.dataRef
@@ -20747,7 +20959,7 @@ var ActionTypes;
20747
20959
  return a.id === action.id;
20748
20960
  });
20749
20961
  if (idx !== -1) nextItems.splice(idx, 1);
20750
- return _extends$g({}, state, {
20962
+ return _extends$h({}, state, {
20751
20963
  items: nextItems,
20752
20964
  activeItemIndex: function () {
20753
20965
  if (idx === state.activeItemIndex) return null;
@@ -20786,19 +20998,19 @@ var ActionTypes$1;
20786
20998
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20787
20999
  if (state.disabled) return state;
20788
21000
  if (state.listboxState === ListboxStates.Closed) return state;
20789
- return _extends$g({}, state, {
21001
+ return _extends$h({}, state, {
20790
21002
  activeOptionIndex: null,
20791
21003
  listboxState: ListboxStates.Closed
20792
21004
  });
20793
21005
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20794
21006
  if (state.disabled) return state;
20795
21007
  if (state.listboxState === ListboxStates.Open) return state;
20796
- return _extends$g({}, state, {
21008
+ return _extends$h({}, state, {
20797
21009
  listboxState: ListboxStates.Open
20798
21010
  });
20799
21011
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20800
21012
  if (state.disabled === action.disabled) return state;
20801
- return _extends$g({}, state, {
21013
+ return _extends$h({}, state, {
20802
21014
  disabled: action.disabled
20803
21015
  });
20804
21016
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -20819,7 +21031,7 @@ var ActionTypes$1;
20819
21031
  }
20820
21032
  });
20821
21033
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
20822
- return _extends$g({}, state, {
21034
+ return _extends$h({}, state, {
20823
21035
  searchQuery: '',
20824
21036
  activeOptionIndex: activeOptionIndex
20825
21037
  });
@@ -20832,10 +21044,10 @@ var ActionTypes$1;
20832
21044
 
20833
21045
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
20834
21046
  });
20835
- if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
21047
+ if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
20836
21048
  searchQuery: searchQuery
20837
21049
  });
20838
- return _extends$g({}, state, {
21050
+ return _extends$h({}, state, {
20839
21051
  searchQuery: searchQuery,
20840
21052
  activeOptionIndex: match
20841
21053
  });
@@ -20843,11 +21055,11 @@ var ActionTypes$1;
20843
21055
  if (state.disabled) return state;
20844
21056
  if (state.listboxState === ListboxStates.Closed) return state;
20845
21057
  if (state.searchQuery === '') return state;
20846
- return _extends$g({}, state, {
21058
+ return _extends$h({}, state, {
20847
21059
  searchQuery: ''
20848
21060
  });
20849
21061
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
20850
- return _extends$g({}, state, {
21062
+ return _extends$h({}, state, {
20851
21063
  options: [].concat(state.options, [{
20852
21064
  id: action.id,
20853
21065
  dataRef: action.dataRef
@@ -20860,7 +21072,7 @@ var ActionTypes$1;
20860
21072
  return a.id === action.id;
20861
21073
  });
20862
21074
  if (idx !== -1) nextOptions.splice(idx, 1);
20863
- return _extends$g({}, state, {
21075
+ return _extends$h({}, state, {
20864
21076
  options: nextOptions,
20865
21077
  activeOptionIndex: function () {
20866
21078
  if (idx === state.activeOptionIndex) return null;
@@ -20921,18 +21133,18 @@ const getPaymentCardIcon = name => {
20921
21133
  }));
20922
21134
  };
20923
21135
 
20924
- var _path$e;
21136
+ var _path$f;
20925
21137
 
20926
- 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); }
21138
+ 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); }
20927
21139
 
20928
21140
  function SvgChevronRight(props) {
20929
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21141
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
20930
21142
  className: "plc-w-6 plc-h-6",
20931
21143
  xmlns: "http://www.w3.org/2000/svg",
20932
21144
  fill: "none",
20933
21145
  viewBox: "0 0 24 24",
20934
21146
  stroke: "currentColor"
20935
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21147
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
20936
21148
  strokeLinecap: "round",
20937
21149
  strokeLinejoin: "round",
20938
21150
  strokeWidth: 2,
@@ -21148,18 +21360,18 @@ const SavedItems = ({
21148
21360
  });
21149
21361
  };
21150
21362
 
21151
- var _path$d;
21363
+ var _path$e;
21152
21364
 
21153
- 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); }
21365
+ 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); }
21154
21366
 
21155
21367
  function SvgRefresh(props) {
21156
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21368
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21157
21369
  className: "plc-w-4 plc-h-4 plc-mr-1",
21158
21370
  xmlns: "http://www.w3.org/2000/svg",
21159
21371
  fill: "none",
21160
21372
  viewBox: "0 0 24 24",
21161
21373
  stroke: "currentColor"
21162
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21374
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21163
21375
  strokeLinecap: "round",
21164
21376
  strokeLinejoin: "round",
21165
21377
  strokeWidth: 2,
@@ -21167,35 +21379,35 @@ function SvgRefresh(props) {
21167
21379
  })));
21168
21380
  }
21169
21381
 
21170
- var _path$c;
21382
+ var _path$d;
21171
21383
 
21172
- 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); }
21384
+ 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); }
21173
21385
 
21174
21386
  function SvgCalendar(props) {
21175
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21387
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21176
21388
  xmlns: "http://www.w3.org/2000/svg",
21177
21389
  className: "plc-h-4 plc-w-4 plc-mr-1",
21178
21390
  viewBox: "0 0 20 20",
21179
21391
  fill: "currentColor"
21180
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21392
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21181
21393
  fillRule: "evenodd",
21182
21394
  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",
21183
21395
  clipRule: "evenodd"
21184
21396
  })));
21185
21397
  }
21186
21398
 
21187
- var _path$b;
21399
+ var _path$c;
21188
21400
 
21189
- 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); }
21401
+ 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); }
21190
21402
 
21191
21403
  function SvgPlus(props) {
21192
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21404
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21193
21405
  className: "plc-w-5 plc-h-5",
21194
21406
  xmlns: "http://www.w3.org/2000/svg",
21195
21407
  fill: "none",
21196
21408
  viewBox: "0 0 24 24",
21197
21409
  stroke: "currentColor"
21198
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21410
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21199
21411
  strokeLinecap: "round",
21200
21412
  strokeLinejoin: "round",
21201
21413
  strokeWidth: 2,
@@ -21203,17 +21415,17 @@ function SvgPlus(props) {
21203
21415
  })));
21204
21416
  }
21205
21417
 
21206
- var _path$a;
21418
+ var _path$b;
21207
21419
 
21208
- 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); }
21420
+ 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); }
21209
21421
 
21210
21422
  function SvgCheckMark(props) {
21211
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21423
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21212
21424
  className: "plc-w-4 plc-h-4 plc-mr-1",
21213
21425
  xmlns: "http://www.w3.org/2000/svg",
21214
21426
  viewBox: "0 0 20 20",
21215
21427
  fill: "currentColor"
21216
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21428
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21217
21429
  fillRule: "evenodd",
21218
21430
  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",
21219
21431
  clipRule: "evenodd"
@@ -21275,12 +21487,20 @@ const SubscriptionsItems = ({
21275
21487
  const {
21276
21488
  t
21277
21489
  } = useTranslation("dashboard");
21490
+ const {
21491
+ switchView,
21492
+ isAuthenticated
21493
+ } = usePelcro();
21278
21494
  const subs = getNonDonationSubs();
21279
21495
  if (subs.length === 0) return null;
21280
21496
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21281
21497
  const isActive = activeMenu === sub.id; // Cancel button click handlers
21282
21498
 
21283
21499
  const onCancelClick = () => {
21500
+ if (userMustVerifyEmail()) {
21501
+ return switchView("email-verify");
21502
+ }
21503
+
21284
21504
  onClose === null || onClose === void 0 ? void 0 : onClose();
21285
21505
  notify.confirm((onSuccess, onFailure) => {
21286
21506
  cancelSubscription(sub.id, onSuccess, onFailure);
@@ -21296,6 +21516,10 @@ const SubscriptionsItems = ({
21296
21516
 
21297
21517
 
21298
21518
  const onReactivateClick = () => {
21519
+ if (userMustVerifyEmail()) {
21520
+ return switchView("email-verify");
21521
+ }
21522
+
21299
21523
  reactivateSubscription(sub.id);
21300
21524
  }; // Renew click
21301
21525
 
@@ -21496,18 +21720,18 @@ Accordion.item = function AccordionItem({
21496
21720
  }, content)) : null;
21497
21721
  };
21498
21722
 
21499
- var _path$9;
21723
+ var _path$a;
21500
21724
 
21501
- 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); }
21725
+ 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); }
21502
21726
 
21503
21727
  function SvgExit(props) {
21504
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21728
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21505
21729
  className: "plc-w-6 plc-h-6",
21506
21730
  xmlns: "http://www.w3.org/2000/svg",
21507
21731
  fill: "none",
21508
21732
  viewBox: "0 0 24 24",
21509
21733
  stroke: "currentColor"
21510
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21734
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21511
21735
  strokeLinecap: "round",
21512
21736
  strokeLinejoin: "round",
21513
21737
  strokeWidth: 2,
@@ -21515,17 +21739,17 @@ function SvgExit(props) {
21515
21739
  })));
21516
21740
  }
21517
21741
 
21518
- var _path$8;
21742
+ var _path$9;
21519
21743
 
21520
- 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); }
21744
+ 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); }
21521
21745
 
21522
21746
  function SvgUser(props) {
21523
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21747
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21524
21748
  xmlns: "http://www.w3.org/2000/svg",
21525
21749
  fill: "none",
21526
21750
  viewBox: "0 0 24 24",
21527
21751
  stroke: "currentColor"
21528
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21752
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21529
21753
  strokeLinecap: "round",
21530
21754
  strokeLinejoin: "round",
21531
21755
  strokeWidth: 2,
@@ -21533,18 +21757,18 @@ function SvgUser(props) {
21533
21757
  })));
21534
21758
  }
21535
21759
 
21536
- var _path$7;
21760
+ var _path$8;
21537
21761
 
21538
- 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); }
21762
+ 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); }
21539
21763
 
21540
21764
  function SvgNewsletter(props) {
21541
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21765
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21542
21766
  xmlns: "http://www.w3.org/2000/svg",
21543
21767
  className: "plc-h-5 plc-w-5",
21544
21768
  fill: "none",
21545
21769
  viewBox: "0 0 24 24",
21546
21770
  stroke: "currentColor"
21547
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21771
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21548
21772
  strokeLinecap: "round",
21549
21773
  strokeLinejoin: "round",
21550
21774
  strokeWidth: 2,
@@ -21552,18 +21776,18 @@ function SvgNewsletter(props) {
21552
21776
  })));
21553
21777
  }
21554
21778
 
21555
- var _path$6;
21779
+ var _path$7;
21556
21780
 
21557
- 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); }
21781
+ 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); }
21558
21782
 
21559
21783
  function SvgPaymentCard(props) {
21560
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21784
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21561
21785
  className: "plc-w-6 plc-h-6 plc-mr-2",
21562
21786
  xmlns: "http://www.w3.org/2000/svg",
21563
21787
  fill: "none",
21564
21788
  viewBox: "0 0 24 24",
21565
21789
  stroke: "currentColor"
21566
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21790
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21567
21791
  strokeLinecap: "round",
21568
21792
  strokeLinejoin: "round",
21569
21793
  strokeWidth: 2,
@@ -21571,23 +21795,23 @@ function SvgPaymentCard(props) {
21571
21795
  })));
21572
21796
  }
21573
21797
 
21574
- var _path$5, _path2;
21798
+ var _path$6, _path2$1;
21575
21799
 
21576
- 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); }
21800
+ 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); }
21577
21801
 
21578
21802
  function SvgLocationPin(props) {
21579
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21803
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21580
21804
  className: "plc-w-6 plc-h-6 plc-mr-2",
21581
21805
  xmlns: "http://www.w3.org/2000/svg",
21582
21806
  fill: "none",
21583
21807
  viewBox: "0 0 24 24",
21584
21808
  stroke: "currentColor"
21585
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21809
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21586
21810
  strokeLinecap: "round",
21587
21811
  strokeLinejoin: "round",
21588
21812
  strokeWidth: 2,
21589
21813
  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"
21590
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
21814
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
21591
21815
  strokeLinecap: "round",
21592
21816
  strokeLinejoin: "round",
21593
21817
  strokeWidth: 2,
@@ -21597,10 +21821,10 @@ function SvgLocationPin(props) {
21597
21821
 
21598
21822
  var _switch;
21599
21823
 
21600
- 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); }
21824
+ 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); }
21601
21825
 
21602
21826
  function SvgSubscription(props) {
21603
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21827
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21604
21828
  xmlns: "http://www.w3.org/2000/svg",
21605
21829
  viewBox: "0 0 100 125",
21606
21830
  fill: "currentColor"
@@ -21615,18 +21839,18 @@ function SvgSubscription(props) {
21615
21839
  }))))));
21616
21840
  }
21617
21841
 
21618
- var _path$4;
21842
+ var _path$5;
21619
21843
 
21620
- 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); }
21844
+ 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); }
21621
21845
 
21622
21846
  function SvgShopping(props) {
21623
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21847
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21624
21848
  className: "plc-w-6 plc-h-6 plc-mr-2",
21625
21849
  xmlns: "http://www.w3.org/2000/svg",
21626
21850
  fill: "none",
21627
21851
  viewBox: "0 0 24 24",
21628
21852
  stroke: "currentColor"
21629
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21853
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21630
21854
  strokeLinecap: "round",
21631
21855
  strokeLinejoin: "round",
21632
21856
  strokeWidth: 2,
@@ -21634,18 +21858,18 @@ function SvgShopping(props) {
21634
21858
  })));
21635
21859
  }
21636
21860
 
21637
- var _path$3;
21861
+ var _path$4;
21638
21862
 
21639
- 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); }
21863
+ 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); }
21640
21864
 
21641
21865
  function SvgBookmark(props) {
21642
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21866
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21643
21867
  className: "plc-w-6 plc-h-6 plc-mr-2",
21644
21868
  xmlns: "http://www.w3.org/2000/svg",
21645
21869
  fill: "none",
21646
21870
  viewBox: "0 0 24 24",
21647
21871
  stroke: "currentColor"
21648
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21872
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21649
21873
  strokeLinecap: "round",
21650
21874
  strokeLinejoin: "round",
21651
21875
  strokeWidth: 2,
@@ -21653,33 +21877,33 @@ function SvgBookmark(props) {
21653
21877
  })));
21654
21878
  }
21655
21879
 
21656
- var _path$2;
21880
+ var _path$3;
21657
21881
 
21658
- 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); }
21882
+ 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); }
21659
21883
 
21660
21884
  function SvgKey(props) {
21661
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21885
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21662
21886
  xmlns: "http://www.w3.org/2000/svg",
21663
21887
  viewBox: "0 0 20 20",
21664
21888
  fill: "currentColor"
21665
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21889
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21666
21890
  fillRule: "evenodd",
21667
21891
  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",
21668
21892
  clipRule: "evenodd"
21669
21893
  })));
21670
21894
  }
21671
21895
 
21672
- var _path$1;
21896
+ var _path$2;
21673
21897
 
21674
- 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); }
21898
+ 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); }
21675
21899
 
21676
21900
  function SvgDonate(props) {
21677
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
21901
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21678
21902
  width: 24,
21679
21903
  height: 24,
21680
21904
  fill: "currentColor",
21681
21905
  xmlns: "http://www.w3.org/2000/svg"
21682
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
21906
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21683
21907
  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"
21684
21908
  })));
21685
21909
  }
@@ -22325,7 +22549,7 @@ const DashboardOpenButton = () => {
22325
22549
  };
22326
22550
  DashboardOpenButton.viewId = "dashboard-open";
22327
22551
 
22328
- const initialState = {
22552
+ const initialState$1 = {
22329
22553
  imageSrc: null,
22330
22554
  crop: {
22331
22555
  x: 0,
@@ -22339,10 +22563,10 @@ const initialState = {
22339
22563
  content: ""
22340
22564
  }
22341
22565
  };
22342
- const store = /*#__PURE__*/React.createContext(initialState);
22566
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
22343
22567
  const {
22344
- Provider
22345
- } = store;
22568
+ Provider: Provider$1
22569
+ } = store$1;
22346
22570
 
22347
22571
  const ProfilePicChangeContainer = ({
22348
22572
  style,
@@ -22476,21 +22700,21 @@ const ProfilePicChangeContainer = ({
22476
22700
  default:
22477
22701
  return state;
22478
22702
  }
22479
- }, initialState);
22703
+ }, initialState$1);
22480
22704
  return /*#__PURE__*/React__default['default'].createElement("div", {
22481
22705
  style: { ...style
22482
22706
  },
22483
22707
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22484
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
22708
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
22485
22709
  value: {
22486
22710
  state,
22487
22711
  dispatch
22488
22712
  }
22489
22713
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
22490
- store,
22714
+ store: store$1,
22491
22715
  key: i
22492
22716
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
22493
- store
22717
+ store: store$1
22494
22718
  })));
22495
22719
  };
22496
22720
  /**
@@ -22552,7 +22776,7 @@ const ProfilePicChangeButton = ({
22552
22776
  isSubmitting
22553
22777
  },
22554
22778
  dispatch
22555
- } = React.useContext(store);
22779
+ } = React.useContext(store$1);
22556
22780
  const {
22557
22781
  t
22558
22782
  } = useTranslation("userEdit");
@@ -23920,7 +24144,7 @@ const ProfilePicChangeCropper = ({
23920
24144
  zoom
23921
24145
  },
23922
24146
  dispatch
23923
- } = React.useContext(store);
24147
+ } = React.useContext(store$1);
23924
24148
  return /*#__PURE__*/React__default['default'].createElement("div", {
23925
24149
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
23926
24150
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -23962,7 +24186,7 @@ const ProfilePicChangeZoom = ({
23962
24186
  zoom
23963
24187
  },
23964
24188
  dispatch
23965
- } = React.useContext(store);
24189
+ } = React.useContext(store$1);
23966
24190
  const {
23967
24191
  t
23968
24192
  } = useTranslation("userEdit");
@@ -23985,18 +24209,18 @@ const ProfilePicChangeZoom = ({
23985
24209
  }, otherProps)));
23986
24210
  };
23987
24211
 
23988
- var _path;
24212
+ var _path$1;
23989
24213
 
23990
- 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); }
24214
+ 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); }
23991
24215
 
23992
24216
  function SvgPhotograph(props) {
23993
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24217
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
23994
24218
  xmlns: "http://www.w3.org/2000/svg",
23995
24219
  className: "plc-h-6 plc-w-6",
23996
24220
  fill: "none",
23997
24221
  viewBox: "0 0 24 24",
23998
24222
  stroke: "currentColor"
23999
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24223
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
24000
24224
  strokeLinecap: "round",
24001
24225
  strokeLinejoin: "round",
24002
24226
  strokeWidth: 2,
@@ -24014,7 +24238,7 @@ const ProfilePicChangeSelectButton = ({
24014
24238
  state: {
24015
24239
  isSubmitting
24016
24240
  }
24017
- } = React.useContext(store);
24241
+ } = React.useContext(store$1);
24018
24242
  const {
24019
24243
  t
24020
24244
  } = useTranslation("userEdit");
@@ -24056,7 +24280,7 @@ const ProfilePicChangeRemoveButton = ({
24056
24280
  state: {
24057
24281
  isSubmitting
24058
24282
  }
24059
- } = React.useContext(store);
24283
+ } = React.useContext(store$1);
24060
24284
  const {
24061
24285
  t
24062
24286
  } = useTranslation("userEdit");
@@ -24079,7 +24303,7 @@ const ProfilePicChangeWrapper = () => {
24079
24303
  state: {
24080
24304
  imageSrc
24081
24305
  }
24082
- } = React.useContext(store);
24306
+ } = React.useContext(store$1);
24083
24307
  const {
24084
24308
  t
24085
24309
  } = useTranslation("userEdit");
@@ -24141,6 +24365,182 @@ function ProfilePicChangeModal({
24141
24365
  }
24142
24366
  ProfilePicChangeModal.viewId = "profile-picture";
24143
24367
 
24368
+ const initialState = {
24369
+ isSubmitting: false,
24370
+ alert: {
24371
+ type: "error",
24372
+ content: ""
24373
+ }
24374
+ };
24375
+ const store = /*#__PURE__*/React.createContext(initialState);
24376
+ const {
24377
+ Provider
24378
+ } = store;
24379
+
24380
+ const EmailVerifyContainer = ({
24381
+ style,
24382
+ className = "",
24383
+ onSuccess = () => {},
24384
+ onFailure = () => {},
24385
+ children,
24386
+ ...props
24387
+ }) => {
24388
+ const {
24389
+ t
24390
+ } = useTranslation("verifyEmail");
24391
+
24392
+ const submit = () => {
24393
+ window.Pelcro.user.resendEmailVerification((err, res) => {
24394
+ dispatch({
24395
+ type: LOADING,
24396
+ payload: false
24397
+ });
24398
+
24399
+ if (err) {
24400
+ dispatch({
24401
+ type: SHOW_ALERT,
24402
+ payload: {
24403
+ type: "error",
24404
+ content: getErrorMessages(err)
24405
+ }
24406
+ });
24407
+ return onFailure(err);
24408
+ }
24409
+
24410
+ dispatch({
24411
+ type: SHOW_ALERT,
24412
+ payload: {
24413
+ type: "success",
24414
+ content: t("messages.resent")
24415
+ }
24416
+ });
24417
+ return onSuccess(res);
24418
+ });
24419
+ };
24420
+
24421
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
24422
+ switch (action.type) {
24423
+ case SHOW_ALERT:
24424
+ return lib_7({ ...state,
24425
+ alert: action.payload
24426
+ });
24427
+
24428
+ case LOADING:
24429
+ return lib_7({ ...state,
24430
+ isSubmitting: action.payload
24431
+ });
24432
+
24433
+ case HANDLE_SUBMIT:
24434
+ return lib_5({ ...state,
24435
+ isSubmitting: true
24436
+ }, (state, dispatch) => submit());
24437
+
24438
+ default:
24439
+ return state;
24440
+ }
24441
+ }, initialState);
24442
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24443
+ style: { ...style
24444
+ },
24445
+ className: `pelcro-container pelcro-email-verify-container ${className}`
24446
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
24447
+ value: {
24448
+ state,
24449
+ dispatch
24450
+ }
24451
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24452
+ store,
24453
+ key: i
24454
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24455
+ store
24456
+ })));
24457
+ };
24458
+
24459
+ const EmailVerifyResendButton = ({
24460
+ name,
24461
+ onClick,
24462
+ ...otherProps
24463
+ }) => {
24464
+ const {
24465
+ dispatch,
24466
+ state: {
24467
+ isSubmitting
24468
+ }
24469
+ } = React.useContext(store);
24470
+ const {
24471
+ t
24472
+ } = useTranslation("verifyEmail");
24473
+ return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
24474
+ onClick: () => {
24475
+ dispatch({
24476
+ type: HANDLE_SUBMIT
24477
+ });
24478
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24479
+ },
24480
+ isLoading: isSubmitting
24481
+ }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
24482
+ };
24483
+
24484
+ var _path, _path2;
24485
+
24486
+ 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); }
24487
+
24488
+ function SvgEmailVerify(props) {
24489
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24490
+ className: "plc-w-6 plc-h-6",
24491
+ viewBox: "0 0 700 700",
24492
+ xmlns: "http://www.w3.org/2000/svg"
24493
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24494
+ 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"
24495
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24496
+ 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"
24497
+ })));
24498
+ }
24499
+
24500
+ const EmailVerifyView = props => {
24501
+ var _window$Pelcro$user$r;
24502
+
24503
+ const {
24504
+ t
24505
+ } = useTranslation("verifyEmail");
24506
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24507
+ id: "pelcro-email-verify-view"
24508
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
24509
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24510
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
24511
+ className: "plc-text-2xl plc-font-semibold"
24512
+ }, t("labels.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
24513
+ action: "javascript:void(0);",
24514
+ className: "plc-mt-2 pelcro-form"
24515
+ }, /*#__PURE__*/React__default['default'].createElement(EmailVerifyContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement("div", {
24516
+ className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
24517
+ }, /*#__PURE__*/React__default['default'].createElement(SvgEmailVerify, {
24518
+ className: "plc-w-32 plc-h-32"
24519
+ }), /*#__PURE__*/React__default['default'].createElement("p", {
24520
+ className: "plc-mb-1 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
24521
+ }, t("labels.instructions"), " ", /*#__PURE__*/React__default['default'].createElement("span", {
24522
+ className: "plc-font-bold"
24523
+ }, (_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, {
24524
+ role: "submit",
24525
+ className: "plc-mt-4 plc-w-full",
24526
+ name: t("labels.resend"),
24527
+ id: "pelcro-submit"
24528
+ }))));
24529
+ };
24530
+
24531
+ const EmailVerifyModal = ({
24532
+ onDisplay,
24533
+ onClose,
24534
+ ...otherProps
24535
+ }) => {
24536
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
24537
+ onDisplay: onDisplay,
24538
+ onClose: onClose,
24539
+ id: "pelcro-email-verify-modal"
24540
+ }, /*#__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)));
24541
+ };
24542
+ EmailVerifyModal.viewId = "email-verify";
24543
+
24144
24544
  exports.AddressCreateCity = AddressCreateCity;
24145
24545
  exports.AddressCreateContainer = AddressCreateContainer;
24146
24546
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -24195,6 +24595,10 @@ exports.DashboardOpenButton = DashboardOpenButton;
24195
24595
  exports.DatePicker = DatePicker;
24196
24596
  exports.DiscountedPrice = DiscountedPrice;
24197
24597
  exports.Email = Email;
24598
+ exports.EmailVerifyContainer = EmailVerifyContainer;
24599
+ exports.EmailVerifyModal = EmailVerifyModal;
24600
+ exports.EmailVerifyResendButton = EmailVerifyResendButton;
24601
+ exports.EmailVerifyView = EmailVerifyView;
24198
24602
  exports.FacebookLoginButton = FacebookLoginButton;
24199
24603
  exports.GiftCreateContainer = GiftCreateContainer;
24200
24604
  exports.GiftCreateEmail = GiftCreateEmail;