@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.esm.js CHANGED
@@ -3434,7 +3434,7 @@ var paymentMethod_fr = {
3434
3434
  var title$d = "Enter your email to subscribe to our newsletter";
3435
3435
  var updateTitle$1 = "Update newsletter selections";
3436
3436
  var subtitle$7 = "We may use your email for other marketing communication";
3437
- var labels$l = {
3437
+ var labels$n = {
3438
3438
  submit: "Submit",
3439
3439
  firstName: "First name",
3440
3440
  lastName: "Last name",
@@ -3442,7 +3442,7 @@ var labels$l = {
3442
3442
  postalCode: "Postal code",
3443
3443
  required: "required"
3444
3444
  };
3445
- var messages$p = {
3445
+ var messages$r = {
3446
3446
  alreadyHaveAccount: "Already have an account?",
3447
3447
  success: "Newsletters were successfully updated",
3448
3448
  loginHere: "Login here.",
@@ -3453,14 +3453,14 @@ var newsletter_en = {
3453
3453
  title: title$d,
3454
3454
  updateTitle: updateTitle$1,
3455
3455
  subtitle: subtitle$7,
3456
- labels: labels$l,
3457
- messages: messages$p
3456
+ labels: labels$n,
3457
+ messages: messages$r
3458
3458
  };
3459
3459
 
3460
3460
  var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3461
3461
  var updateTitle = "Mettre à jour son choix d'infolettres";
3462
3462
  var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3463
- var labels$k = {
3463
+ var labels$m = {
3464
3464
  submit: "Lire l’article !",
3465
3465
  firstName: "Prénom",
3466
3466
  lastName: "Nom de famille",
@@ -3468,7 +3468,7 @@ var labels$k = {
3468
3468
  postalCode: "Code postal",
3469
3469
  required: "Champs obligatoires"
3470
3470
  };
3471
- var messages$o = {
3471
+ var messages$q = {
3472
3472
  alreadyHaveAccount: "Vous avez déjà un compte ?",
3473
3473
  success: "Votre choix d'infolettres à été mis à jour",
3474
3474
  loginHere: "Connectez-vous ici",
@@ -3479,14 +3479,14 @@ var newsletter_fr = {
3479
3479
  title: title$c,
3480
3480
  updateTitle: updateTitle,
3481
3481
  subtitle: subtitle$6,
3482
- labels: labels$k,
3483
- messages: messages$o
3482
+ labels: labels$m,
3483
+ messages: messages$q
3484
3484
  };
3485
3485
 
3486
- var labels$j = {
3486
+ var labels$l = {
3487
3487
  "continue": "Continue to content"
3488
3488
  };
3489
- var messages$n = {
3489
+ var messages$p = {
3490
3490
  yourFreeTrial: "Subscription successful!",
3491
3491
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3492
3492
  clickToLearn: {
@@ -3508,15 +3508,15 @@ var errors$9 = {
3508
3508
  "": ""
3509
3509
  };
3510
3510
  var success_en = {
3511
- labels: labels$j,
3512
- messages: messages$n,
3511
+ labels: labels$l,
3512
+ messages: messages$p,
3513
3513
  errors: errors$9
3514
3514
  };
3515
3515
 
3516
- var labels$i = {
3516
+ var labels$k = {
3517
3517
  "continue": "Abonnement réussi !"
3518
3518
  };
3519
- var messages$m = {
3519
+ var messages$o = {
3520
3520
  yourFreeTrial: "Votre essai gratuit vient de débuter",
3521
3521
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
3522
3522
  clickToLearn: {
@@ -3538,12 +3538,12 @@ var errors$8 = {
3538
3538
  "": ""
3539
3539
  };
3540
3540
  var success_fr = {
3541
- labels: labels$i,
3542
- messages: messages$m,
3541
+ labels: labels$k,
3542
+ messages: messages$o,
3543
3543
  errors: errors$8
3544
3544
  };
3545
3545
 
3546
- var messages$l = {
3546
+ var messages$n = {
3547
3547
  freeVisits: "Free visits left:",
3548
3548
  subscribeNow: "Subscribe",
3549
3549
  alreadyHaveAccount: "Already have an account?",
@@ -3553,11 +3553,11 @@ var errors$7 = {
3553
3553
  "": ""
3554
3554
  };
3555
3555
  var meter_en = {
3556
- messages: messages$l,
3556
+ messages: messages$n,
3557
3557
  errors: errors$7
3558
3558
  };
3559
3559
 
3560
- var messages$k = {
3560
+ var messages$m = {
3561
3561
  freeVisits: "Visites gratuites restantes:",
3562
3562
  subscribeNow: "Abonnez-vous maintenant !",
3563
3563
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -3567,15 +3567,15 @@ var errors$6 = {
3567
3567
  "": ""
3568
3568
  };
3569
3569
  var meter_fr = {
3570
- messages: messages$k,
3570
+ messages: messages$m,
3571
3571
  errors: errors$6
3572
3572
  };
3573
3573
 
3574
- var messages$j = {
3574
+ var messages$l = {
3575
3575
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3576
3576
  bankRedirection: "Please hold, redirecting you to your bank."
3577
3577
  };
3578
- var labels$h = {
3578
+ var labels$j = {
3579
3579
  card: "Enter card number",
3580
3580
  date: "Expiration date",
3581
3581
  CVC: "CVC",
@@ -3590,18 +3590,19 @@ var labels$h = {
3590
3590
  "for": "for",
3591
3591
  interval: "{{count}} {{interval}}",
3592
3592
  interval_plural: "{{count}} {{interval}}s",
3593
- tax: "+ Tax"
3593
+ tax: "+ Tax",
3594
+ removeCoupon: "REMOVE"
3594
3595
  };
3595
3596
  var checkoutForm_en = {
3596
- messages: messages$j,
3597
- labels: labels$h
3597
+ messages: messages$l,
3598
+ labels: labels$j
3598
3599
  };
3599
3600
 
3600
- var messages$i = {
3601
+ var messages$k = {
3601
3602
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3602
3603
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3603
3604
  };
3604
- var labels$g = {
3605
+ var labels$i = {
3605
3606
  card: "Entrez le numéro de carte",
3606
3607
  date: "Date d’expiration",
3607
3608
  CVC: "CVC",
@@ -3616,11 +3617,12 @@ var labels$g = {
3616
3617
  "for": "pour",
3617
3618
  interval: "{{count}} {{interval}}",
3618
3619
  interval_plural: "{{count}} {{interval}}s",
3619
- tax: "+ Taxe"
3620
+ tax: "+ Taxe",
3621
+ removeCoupon: "RETIRER"
3620
3622
  };
3621
3623
  var checkoutForm_fr = {
3622
- messages: messages$i,
3623
- labels: labels$g
3624
+ messages: messages$k,
3625
+ labels: labels$i
3624
3626
  };
3625
3627
 
3626
3628
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3653,7 +3655,7 @@ var messages_fr = {
3653
3655
  recaptcha: recaptcha
3654
3656
  };
3655
3657
 
3656
- var labels$f = {
3658
+ var labels$h = {
3657
3659
  email: "Enter email",
3658
3660
  password: "Enter password",
3659
3661
  required: "required",
@@ -3661,7 +3663,7 @@ var labels$f = {
3661
3663
  passwordPlaceholder: "Password",
3662
3664
  login: "Login"
3663
3665
  };
3664
- var messages$h = {
3666
+ var messages$j = {
3665
3667
  loginTo: "Login to your account",
3666
3668
  welcome: "Welcome back, sign in with your existing account.",
3667
3669
  dontHaveAccount: "Don't have an account yet?",
@@ -3680,12 +3682,12 @@ var errors$5 = {
3680
3682
  "": ""
3681
3683
  };
3682
3684
  var login_en = {
3683
- labels: labels$f,
3684
- messages: messages$h,
3685
+ labels: labels$h,
3686
+ messages: messages$j,
3685
3687
  errors: errors$5
3686
3688
  };
3687
3689
 
3688
- var labels$e = {
3690
+ var labels$g = {
3689
3691
  email: "Entrez votre adresse courriel",
3690
3692
  password: "Entrez votre mot de passe",
3691
3693
  required: "Champs obligatoires",
@@ -3693,7 +3695,7 @@ var labels$e = {
3693
3695
  passwordPlaceholder: "Mot de passe",
3694
3696
  login: "Connexion"
3695
3697
  };
3696
- var messages$g = {
3698
+ var messages$i = {
3697
3699
  loginTo: "Connectez-vous à votre compte",
3698
3700
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
3699
3701
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -3712,14 +3714,14 @@ var errors$4 = {
3712
3714
  "": ""
3713
3715
  };
3714
3716
  var login_fr = {
3715
- labels: labels$e,
3716
- messages: messages$g,
3717
+ labels: labels$g,
3718
+ messages: messages$i,
3717
3719
  errors: errors$4
3718
3720
  };
3719
3721
 
3720
3722
  var title$b = "Create an account";
3721
3723
  var subtitle$5 = "Enter your email and password below";
3722
- var labels$d = {
3724
+ var labels$f = {
3723
3725
  signUpFacebook: "Sign up with Facebook",
3724
3726
  signUpGoogle: "Sign up with Google",
3725
3727
  signUpEmail: "Sign up with Email",
@@ -3731,7 +3733,7 @@ var labels$d = {
3731
3733
  firstName: "First name",
3732
3734
  lastName: "Last name"
3733
3735
  };
3734
- var messages$f = {
3736
+ var messages$h = {
3735
3737
  alreadyHaveAccount: "Already have an account?",
3736
3738
  createAccount: "Create account",
3737
3739
  loginHere: "login here. ",
@@ -3805,8 +3807,8 @@ var redeem$1 = {
3805
3807
  var register_en = {
3806
3808
  title: title$b,
3807
3809
  subtitle: subtitle$5,
3808
- labels: labels$d,
3809
- messages: messages$f,
3810
+ labels: labels$f,
3811
+ messages: messages$h,
3810
3812
  errors: errors$3,
3811
3813
  gift: gift$1,
3812
3814
  redeem: redeem$1
@@ -3814,7 +3816,7 @@ var register_en = {
3814
3816
 
3815
3817
  var title$a = "Créer un compte";
3816
3818
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3817
- var labels$c = {
3819
+ var labels$e = {
3818
3820
  signUpFacebook: "Inscrivez-vous avec Facebook",
3819
3821
  signUpGoogle: "Inscrivez-vous avec Google",
3820
3822
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3826,7 +3828,7 @@ var labels$c = {
3826
3828
  firstName: "Prénom",
3827
3829
  lastName: "Nom de famille"
3828
3830
  };
3829
- var messages$e = {
3831
+ var messages$g = {
3830
3832
  alreadyHaveAccount: "Vous avez déjà un compte?",
3831
3833
  createAccount: "Créer un compte",
3832
3834
  loginHere: "Connectez-vous ici",
@@ -3901,14 +3903,14 @@ var redeem = {
3901
3903
  var register_fr = {
3902
3904
  title: title$a,
3903
3905
  subtitle: subtitle$4,
3904
- labels: labels$c,
3905
- messages: messages$e,
3906
+ labels: labels$e,
3907
+ messages: messages$g,
3906
3908
  errors: errors$2,
3907
3909
  gift: gift,
3908
3910
  redeem: redeem
3909
3911
  };
3910
3912
 
3911
- var labels$b = {
3913
+ var labels$d = {
3912
3914
  title: "Want to update your profile?",
3913
3915
  subtitle: "Enter your information below to update your profile",
3914
3916
  email: "Email",
@@ -3924,17 +3926,17 @@ var labels$b = {
3924
3926
  removeImage: "Remove current photo",
3925
3927
  zoom: "Zoom"
3926
3928
  };
3927
- var messages$d = {
3929
+ var messages$f = {
3928
3930
  userUpdated: "Thanks! Your profile was updated successfully.",
3929
3931
  pictureRemoved: "Your profile picture was removed successfully.",
3930
3932
  pictureUpdated: "Your profile picture was updated successfully."
3931
3933
  };
3932
3934
  var userEdit_en = {
3933
- labels: labels$b,
3934
- messages: messages$d
3935
+ labels: labels$d,
3936
+ messages: messages$f
3935
3937
  };
3936
3938
 
3937
- var labels$a = {
3939
+ var labels$c = {
3938
3940
  title: "Voulez-vous mettre à jour votre profil ?",
3939
3941
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3940
3942
  email: "Address courriel",
@@ -3950,20 +3952,20 @@ var labels$a = {
3950
3952
  removeImage: "supprimer la photo actuelle",
3951
3953
  zoom: "Zoom"
3952
3954
  };
3953
- var messages$c = {
3955
+ var messages$e = {
3954
3956
  userUpdated: "Votre profil a été mis à jour avec succès.",
3955
3957
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
3956
3958
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3957
3959
  };
3958
3960
  var userEdit_fr = {
3959
- labels: labels$a,
3960
- messages: messages$c
3961
+ labels: labels$c,
3962
+ messages: messages$e
3961
3963
  };
3962
3964
 
3963
3965
  var title$9 = "Enter your shipping address";
3964
3966
  var selectAddressTitle$1 = "Please select an address";
3965
3967
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3966
- var labels$9 = {
3968
+ var labels$b = {
3967
3969
  address: "Address",
3968
3970
  code: "Postal Code/Zip",
3969
3971
  city: "City",
@@ -3978,7 +3980,7 @@ var buttons$5 = {
3978
3980
  selectAddress: "Select address",
3979
3981
  addAddress: "Add new address"
3980
3982
  };
3981
- var messages$b = {
3983
+ var messages$d = {
3982
3984
  addressUpdated: "The address was successfully updated!",
3983
3985
  subRedeemed: "Your subscription has been redeemed."
3984
3986
  };
@@ -3986,15 +3988,15 @@ var address_en = {
3986
3988
  title: title$9,
3987
3989
  selectAddressTitle: selectAddressTitle$1,
3988
3990
  selectAddressSubtitle: selectAddressSubtitle$1,
3989
- labels: labels$9,
3991
+ labels: labels$b,
3990
3992
  buttons: buttons$5,
3991
- messages: messages$b
3993
+ messages: messages$d
3992
3994
  };
3993
3995
 
3994
3996
  var title$8 = "Entrez votre adresse de livraison";
3995
3997
  var selectAddressTitle = "Veuillez sélectionner une adresse";
3996
3998
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
3997
- var labels$8 = {
3999
+ var labels$a = {
3998
4000
  address: "Adresse",
3999
4001
  code: "Code postal / Zip",
4000
4002
  city: "Ville",
@@ -4009,7 +4011,7 @@ var buttons$4 = {
4009
4011
  selectAddress: "Choisir cette adresse",
4010
4012
  addAddress: "Ajouter une nouvelle adresse"
4011
4013
  };
4012
- var messages$a = {
4014
+ var messages$c = {
4013
4015
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4014
4016
  subRedeemed: "Votre abonnement a bien été activé."
4015
4017
  };
@@ -4017,9 +4019,9 @@ var address_fr = {
4017
4019
  title: title$8,
4018
4020
  selectAddressTitle: selectAddressTitle,
4019
4021
  selectAddressSubtitle: selectAddressSubtitle,
4020
- labels: labels$8,
4022
+ labels: labels$a,
4021
4023
  buttons: buttons$4,
4022
- messages: messages$a
4024
+ messages: messages$c
4023
4025
  };
4024
4026
 
4025
4027
  var title$7 = "Reset your password";
@@ -4066,7 +4068,7 @@ var password$1 = "Password";
4066
4068
  var submit$3 = "Submit";
4067
4069
  var required$3 = "Required";
4068
4070
  var passwordResetEmailSent$1 = "Password reset instructions have been sent to your email";
4069
- var messages$9 = {
4071
+ var messages$b = {
4070
4072
  alreadyHaveAccount: "Already have an account?",
4071
4073
  loginHere: "login here."
4072
4074
  };
@@ -4077,7 +4079,7 @@ var passwordForgot_en = {
4077
4079
  submit: submit$3,
4078
4080
  required: required$3,
4079
4081
  passwordResetEmailSent: passwordResetEmailSent$1,
4080
- messages: messages$9
4082
+ messages: messages$b
4081
4083
  };
4082
4084
 
4083
4085
  var title$4 = "Mot de passe oublié ?";
@@ -4086,7 +4088,7 @@ var password = "Mot de passe";
4086
4088
  var submit$2 = "Soumettre";
4087
4089
  var required$2 = "Champs obligatoires";
4088
4090
  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.";
4089
- var messages$8 = {
4091
+ var messages$a = {
4090
4092
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4091
4093
  loginHere: "Connectez-vous ici"
4092
4094
  };
@@ -4097,7 +4099,7 @@ var passwordForgot_fr = {
4097
4099
  submit: submit$2,
4098
4100
  required: required$2,
4099
4101
  passwordResetEmailSent: passwordResetEmailSent,
4100
- messages: messages$8
4102
+ messages: messages$a
4101
4103
  };
4102
4104
 
4103
4105
  var title$3 = "Change your password";
@@ -4198,7 +4200,7 @@ var buttons$3 = {
4198
4200
  purchase: "Purchase",
4199
4201
  "continue": "Continue"
4200
4202
  };
4201
- var messages$7 = {
4203
+ var messages$9 = {
4202
4204
  orderConfirmed: {
4203
4205
  title: "Order confirmed!",
4204
4206
  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."
@@ -4207,14 +4209,14 @@ var messages$7 = {
4207
4209
  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.",
4208
4210
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4209
4211
  };
4210
- var labels$7 = {
4212
+ var labels$9 = {
4211
4213
  summary: "Order summary",
4212
4214
  total: "total"
4213
4215
  };
4214
4216
  var shop_en = {
4215
4217
  buttons: buttons$3,
4216
- messages: messages$7,
4217
- labels: labels$7
4218
+ messages: messages$9,
4219
+ labels: labels$9
4218
4220
  };
4219
4221
 
4220
4222
  var buttons$2 = {
@@ -4223,7 +4225,7 @@ var buttons$2 = {
4223
4225
  purchase: "Acheter",
4224
4226
  "continue": "Continuer au contenu"
4225
4227
  };
4226
- var messages$6 = {
4228
+ var messages$8 = {
4227
4229
  orderConfirmed: {
4228
4230
  title: "Votre commande est confirmée !",
4229
4231
  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."
@@ -4232,17 +4234,17 @@ var messages$6 = {
4232
4234
  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.",
4233
4235
  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."
4234
4236
  };
4235
- var labels$6 = {
4237
+ var labels$8 = {
4236
4238
  summary: "récapitulatif de commande",
4237
4239
  total: "total"
4238
4240
  };
4239
4241
  var shop_fr = {
4240
4242
  buttons: buttons$2,
4241
- messages: messages$6,
4242
- labels: labels$6
4243
+ messages: messages$8,
4244
+ labels: labels$8
4243
4245
  };
4244
4246
 
4245
- var labels$5 = {
4247
+ var labels$7 = {
4246
4248
  cardNumber: "Numéro de carte",
4247
4249
  securityCode: "Code de sécurité",
4248
4250
  submit: "Soumettre",
@@ -4264,7 +4266,7 @@ var labels$5 = {
4264
4266
  title: "Informations de paiement"
4265
4267
  }
4266
4268
  };
4267
- var messages$5 = {
4269
+ var messages$7 = {
4268
4270
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4269
4271
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4270
4272
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4277,12 +4279,12 @@ var errors$1 = {
4277
4279
  "": ""
4278
4280
  };
4279
4281
  var payment_fr = {
4280
- labels: labels$5,
4281
- messages: messages$5,
4282
+ labels: labels$7,
4283
+ messages: messages$7,
4282
4284
  errors: errors$1
4283
4285
  };
4284
4286
 
4285
- var labels$4 = {
4287
+ var labels$6 = {
4286
4288
  cardNumber: "Card number",
4287
4289
  securityCode: "Security Code",
4288
4290
  submit: "Submit",
@@ -4304,7 +4306,7 @@ var labels$4 = {
4304
4306
  title: "Payment Information"
4305
4307
  }
4306
4308
  };
4307
- var messages$4 = {
4309
+ var messages$6 = {
4308
4310
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
4309
4311
  cancel: "Cancel your subscription online at anytime.",
4310
4312
  giftSent: "Subscription gift has been sent to",
@@ -4317,12 +4319,12 @@ var errors = {
4317
4319
  "": ""
4318
4320
  };
4319
4321
  var payment_en = {
4320
- labels: labels$4,
4321
- messages: messages$4,
4322
+ labels: labels$6,
4323
+ messages: messages$6,
4322
4324
  errors: errors
4323
4325
  };
4324
4326
 
4325
- var labels$3 = {
4327
+ var labels$5 = {
4326
4328
  menu: "Pelcro Menu",
4327
4329
  name: "Name",
4328
4330
  email: "Email",
@@ -4389,7 +4391,7 @@ var labels$3 = {
4389
4391
  goBack: "Go back"
4390
4392
  }
4391
4393
  };
4392
- var messages$3 = {
4394
+ var messages$5 = {
4393
4395
  noCard: "You don't have a card",
4394
4396
  subCancellation: {
4395
4397
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -4399,11 +4401,11 @@ var messages$3 = {
4399
4401
  }
4400
4402
  };
4401
4403
  var dashboard_en = {
4402
- labels: labels$3,
4403
- messages: messages$3
4404
+ labels: labels$5,
4405
+ messages: messages$5
4404
4406
  };
4405
4407
 
4406
- var labels$2 = {
4408
+ var labels$4 = {
4407
4409
  menu: "Menu Pelcro",
4408
4410
  name: "Nom",
4409
4411
  email: "Courriel",
@@ -4470,7 +4472,7 @@ var labels$2 = {
4470
4472
  goBack: "Retourner"
4471
4473
  }
4472
4474
  };
4473
- var messages$2 = {
4475
+ var messages$4 = {
4474
4476
  noCard: "Vous n’avez pas une carte",
4475
4477
  subCancellation: {
4476
4478
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4480,16 +4482,16 @@ var messages$2 = {
4480
4482
  }
4481
4483
  };
4482
4484
  var dashboard_fr = {
4483
- labels: labels$2,
4484
- messages: messages$2
4485
+ labels: labels$4,
4486
+ messages: messages$4
4485
4487
  };
4486
4488
 
4487
- var messages$1 = {
4489
+ var messages$3 = {
4488
4490
  alreadyHaveAccount: "Already have an account?",
4489
4491
  loginHere: "Login here",
4490
4492
  checkbox: "Check this box to gift this subscription"
4491
4493
  };
4492
- var labels$1 = {
4494
+ var labels$3 = {
4493
4495
  plan: {
4494
4496
  title: "Subscribe to a plan",
4495
4497
  subtitle: "Select one of the plans below and click on next."
@@ -4512,17 +4514,17 @@ var buttons$1 = {
4512
4514
  back: "Back"
4513
4515
  };
4514
4516
  var select_en = {
4515
- messages: messages$1,
4516
- labels: labels$1,
4517
+ messages: messages$3,
4518
+ labels: labels$3,
4517
4519
  buttons: buttons$1
4518
4520
  };
4519
4521
 
4520
- var messages = {
4522
+ var messages$2 = {
4521
4523
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4522
4524
  loginHere: "Connectez-vous ici",
4523
4525
  checkbox: "Cochez cette case pour offrir cet abonnement"
4524
4526
  };
4525
- var labels = {
4527
+ var labels$2 = {
4526
4528
  plan: {
4527
4529
  title: "Abonnez-vous à un plan",
4528
4530
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4545,8 +4547,8 @@ var buttons = {
4545
4547
  back: "Retour"
4546
4548
  };
4547
4549
  var select_fr = {
4548
- messages: messages,
4549
- labels: labels,
4550
+ messages: messages$2,
4551
+ labels: labels$2,
4550
4552
  buttons: buttons
4551
4553
  };
4552
4554
 
@@ -4570,6 +4572,34 @@ var notification_fr = {
4570
4572
  confirm: confirm
4571
4573
  };
4572
4574
 
4575
+ var labels$1 = {
4576
+ title: "Verify your email",
4577
+ instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4578
+ resend: "Resend email"
4579
+ };
4580
+ var messages$1 = {
4581
+ resent: "Resent successfully",
4582
+ success: "Email verified successfully!"
4583
+ };
4584
+ var verifyEmail_en = {
4585
+ labels: labels$1,
4586
+ messages: messages$1
4587
+ };
4588
+
4589
+ var labels = {
4590
+ title: "Vérifiez votre e-mail",
4591
+ 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:",
4592
+ resend: "Ré-envoyer l'email"
4593
+ };
4594
+ var messages = {
4595
+ resent: "Renvoyé avec succès",
4596
+ success: "Email vérifié avec succès!"
4597
+ };
4598
+ var verifyEmail_fr = {
4599
+ labels: labels,
4600
+ messages: messages
4601
+ };
4602
+
4573
4603
  function create$1(createState) {
4574
4604
  let state;
4575
4605
  const listeners = new Set();
@@ -5919,12 +5949,18 @@ class PelcroActions {
5919
5949
  view,
5920
5950
  cartItems,
5921
5951
  ...otherStateFields
5922
- } = initialState$g;
5952
+ } = initialState$h;
5923
5953
  this.set(otherStateFields);
5924
5954
  });
5925
5955
 
5926
5956
  _defineProperty$3(this, "switchView", view => {
5927
5957
  // view switching guards
5958
+ if (userMustVerifyEmail() && !["dashboard", "meter", "login", null].includes(view)) {
5959
+ return this.set({
5960
+ view: "email-verify"
5961
+ });
5962
+ }
5963
+
5928
5964
  if (["login", "register"].includes(view) && this.get().isAuthenticated()) {
5929
5965
  return this.set({
5930
5966
  view: "dashboard"
@@ -6182,7 +6218,7 @@ class PelcroCallbacks {
6182
6218
  }
6183
6219
  });
6184
6220
 
6185
- _defineProperty$3(this, "whenUserReady", callback => {
6221
+ _defineProperty$3(this, "whenUserReady", (callback, listenerOptions) => {
6186
6222
  var _window$Pelcro$user$r;
6187
6223
 
6188
6224
  if ((_window$Pelcro$user$r = window.Pelcro.user.read()) !== null && _window$Pelcro$user$r !== void 0 && _window$Pelcro$user$r.id) {
@@ -6190,7 +6226,7 @@ class PelcroCallbacks {
6190
6226
  } else {
6191
6227
  window.document.addEventListener("PelcroUserLoaded", e => {
6192
6228
  callback(window.Pelcro.user.read());
6193
- });
6229
+ }, listenerOptions);
6194
6230
  }
6195
6231
  });
6196
6232
 
@@ -6209,7 +6245,7 @@ class PelcroCallbacks {
6209
6245
 
6210
6246
  }
6211
6247
 
6212
- const initialState$g = {
6248
+ const initialState$h = {
6213
6249
  // View
6214
6250
  view: null,
6215
6251
  // Plans
@@ -6237,7 +6273,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6237
6273
  return {
6238
6274
  // Store setter
6239
6275
  set,
6240
- ...initialState$g,
6276
+ ...initialState$h,
6241
6277
  // State actions
6242
6278
  ...actions,
6243
6279
  // Callbacks
@@ -6388,7 +6424,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6388
6424
  */
6389
6425
 
6390
6426
  const isValidViewFromURL = viewID => {
6391
- 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()) {
6427
+ 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()) {
6392
6428
  return true;
6393
6429
  }
6394
6430
 
@@ -6585,6 +6621,13 @@ function getDateWithoutTime(dateObject) {
6585
6621
  date.setHours(0, 0, 0, 0);
6586
6622
  return date;
6587
6623
  }
6624
+ function userMustVerifyEmail() {
6625
+ var _window$Pelcro$site$r3, _window$Pelcro$site$r4, _window$Pelcro$user$r9, _window$Pelcro$user$r10;
6626
+
6627
+ 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;
6628
+ 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;
6629
+ return window.Pelcro.user.isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified;
6630
+ }
6588
6631
 
6589
6632
  const resources = {
6590
6633
  en: {
@@ -6602,6 +6645,7 @@ const resources = {
6602
6645
  passwordReset: passwordReset_en,
6603
6646
  passwordForgot: passwordForgot_en,
6604
6647
  passwordChange: passwordChange_en,
6648
+ verifyEmail: verifyEmail_en,
6605
6649
  cart: cart_en,
6606
6650
  shop: shop_en,
6607
6651
  payment: payment_en,
@@ -6624,6 +6668,7 @@ const resources = {
6624
6668
  passwordReset: passwordReset_fr,
6625
6669
  passwordForgot: passwordForgot_fr,
6626
6670
  passwordChange: passwordChange_fr,
6671
+ verifyEmail: verifyEmail_fr,
6627
6672
  cart: cart_fr,
6628
6673
  shop: shop_fr,
6629
6674
  payment: payment_fr,
@@ -6786,11 +6831,18 @@ class SaveToMetadataButtonClass {
6786
6831
 
6787
6832
  const button = event.currentTarget;
6788
6833
  const user = window.Pelcro.user.read();
6834
+ const {
6835
+ switchView
6836
+ } = usePelcro.getStore();
6789
6837
  const {
6790
6838
  key,
6791
6839
  ...buttonMetadata
6792
6840
  } = button.dataset;
6793
6841
 
6842
+ if (userMustVerifyEmail()) {
6843
+ return switchView("email-verify");
6844
+ }
6845
+
6794
6846
  if (_classPrivateFieldGet(this, _isAlreadySaved).call(this, button)) {
6795
6847
  _classPrivateFieldGet(this, _removeMetaData).call(this, event);
6796
6848
 
@@ -6913,8 +6965,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6913
6965
 
6914
6966
  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}}
6915
6967
 
6916
- function _extends$x() {
6917
- _extends$x = Object.assign || function (target) {
6968
+ function _extends$y() {
6969
+ _extends$y = Object.assign || function (target) {
6918
6970
  for (var i = 1; i < arguments.length; i++) {
6919
6971
  var source = arguments[i];
6920
6972
 
@@ -6928,7 +6980,7 @@ function _extends$x() {
6928
6980
  return target;
6929
6981
  };
6930
6982
 
6931
- return _extends$x.apply(this, arguments);
6983
+ return _extends$y.apply(this, arguments);
6932
6984
  }
6933
6985
 
6934
6986
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7018,7 +7070,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7018
7070
  var reducer = function reducer(state, action) {
7019
7071
  switch (action.type) {
7020
7072
  case ActionType.ADD_TOAST:
7021
- return _extends$x({}, state, {
7073
+ return _extends$y({}, state, {
7022
7074
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7023
7075
  });
7024
7076
 
@@ -7028,9 +7080,9 @@ var reducer = function reducer(state, action) {
7028
7080
  clearFromRemoveQueue(action.toast.id);
7029
7081
  }
7030
7082
 
7031
- return _extends$x({}, state, {
7083
+ return _extends$y({}, state, {
7032
7084
  toasts: state.toasts.map(function (t) {
7033
- return t.id === action.toast.id ? _extends$x({}, t, action.toast) : t;
7085
+ return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
7034
7086
  })
7035
7087
  });
7036
7088
 
@@ -7057,9 +7109,9 @@ var reducer = function reducer(state, action) {
7057
7109
  });
7058
7110
  }
7059
7111
 
7060
- return _extends$x({}, state, {
7112
+ return _extends$y({}, state, {
7061
7113
  toasts: state.toasts.map(function (t) {
7062
- return t.id === toastId || toastId === undefined ? _extends$x({}, t, {
7114
+ return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7063
7115
  visible: false
7064
7116
  }) : t;
7065
7117
  })
@@ -7067,28 +7119,28 @@ var reducer = function reducer(state, action) {
7067
7119
 
7068
7120
  case ActionType.REMOVE_TOAST:
7069
7121
  if (action.toastId === undefined) {
7070
- return _extends$x({}, state, {
7122
+ return _extends$y({}, state, {
7071
7123
  toasts: []
7072
7124
  });
7073
7125
  }
7074
7126
 
7075
- return _extends$x({}, state, {
7127
+ return _extends$y({}, state, {
7076
7128
  toasts: state.toasts.filter(function (t) {
7077
7129
  return t.id !== action.toastId;
7078
7130
  })
7079
7131
  });
7080
7132
 
7081
7133
  case ActionType.START_PAUSE:
7082
- return _extends$x({}, state, {
7134
+ return _extends$y({}, state, {
7083
7135
  pausedAt: action.time
7084
7136
  });
7085
7137
 
7086
7138
  case ActionType.END_PAUSE:
7087
7139
  var diff = action.time - (state.pausedAt || 0);
7088
- return _extends$x({}, state, {
7140
+ return _extends$y({}, state, {
7089
7141
  pausedAt: undefined,
7090
7142
  toasts: state.toasts.map(function (t) {
7091
- return _extends$x({}, t, {
7143
+ return _extends$y({}, t, {
7092
7144
  pauseDuration: t.pauseDuration + diff
7093
7145
  });
7094
7146
  })
@@ -7135,12 +7187,12 @@ var useStore = function useStore(toastOptions) {
7135
7187
  var mergedToasts = state.toasts.map(function (t) {
7136
7188
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7137
7189
 
7138
- return _extends$x({}, toastOptions, toastOptions[t.type], t, {
7190
+ return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7139
7191
  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],
7140
- style: _extends$x({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7192
+ style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7141
7193
  });
7142
7194
  });
7143
- return _extends$x({}, state, {
7195
+ return _extends$y({}, state, {
7144
7196
  toasts: mergedToasts
7145
7197
  });
7146
7198
  };
@@ -7150,7 +7202,7 @@ var createToast = function createToast(message, type, opts) {
7150
7202
  type = 'blank';
7151
7203
  }
7152
7204
 
7153
- return _extends$x({
7205
+ return _extends$y({
7154
7206
  createdAt: Date.now(),
7155
7207
  visible: true,
7156
7208
  type: type,
@@ -7200,14 +7252,14 @@ toast.remove = function (toastId) {
7200
7252
  };
7201
7253
 
7202
7254
  toast.promise = function (promise, msgs, opts) {
7203
- var id = toast.loading(msgs.loading, _extends$x({}, opts, opts == null ? void 0 : opts.loading));
7255
+ var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
7204
7256
  promise.then(function (p) {
7205
- toast.success(resolveValue(msgs.success, p), _extends$x({
7257
+ toast.success(resolveValue(msgs.success, p), _extends$y({
7206
7258
  id: id
7207
7259
  }, opts, opts == null ? void 0 : opts.success));
7208
7260
  return p;
7209
7261
  })["catch"](function (e) {
7210
- toast.error(resolveValue(msgs.error, e), _extends$x({
7262
+ toast.error(resolveValue(msgs.error, e), _extends$y({
7211
7263
  id: id
7212
7264
  }, opts, opts == null ? void 0 : opts.error));
7213
7265
  });
@@ -7546,7 +7598,7 @@ var ToastBar = /*#__PURE__*/memo(function (_ref2) {
7546
7598
  var message = createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7547
7599
  return createElement(ToastBarBase, {
7548
7600
  className: toast.className,
7549
- style: _extends$x({}, animationStyle, style, toast.style)
7601
+ style: _extends$y({}, animationStyle, style, toast.style)
7550
7602
  }, typeof children === 'function' ? children({
7551
7603
  icon: icon,
7552
7604
  message: message
@@ -7576,7 +7628,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7576
7628
  } : position.includes('right') ? {
7577
7629
  justifyContent: 'flex-end'
7578
7630
  } : {};
7579
- return _extends$x({
7631
+ return _extends$y({
7580
7632
  left: 0,
7581
7633
  right: 0,
7582
7634
  display: 'flex',
@@ -7603,7 +7655,7 @@ var Toaster = function Toaster(_ref) {
7603
7655
  handlers = _useToaster.handlers;
7604
7656
 
7605
7657
  return createElement("div", {
7606
- style: _extends$x({
7658
+ style: _extends$y({
7607
7659
  position: 'fixed',
7608
7660
  zIndex: 9999,
7609
7661
  top: DEFAULT_OFFSET,
@@ -7638,87 +7690,87 @@ var Toaster = function Toaster(_ref) {
7638
7690
  }));
7639
7691
  };
7640
7692
 
7641
- var _path$u;
7693
+ var _path$v;
7642
7694
 
7643
- 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); }
7695
+ 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); }
7644
7696
 
7645
7697
  function SvgCheckSolid(props) {
7646
- return /*#__PURE__*/React.createElement("svg", _extends$w({
7698
+ return /*#__PURE__*/React.createElement("svg", _extends$x({
7647
7699
  xmlns: "http://www.w3.org/2000/svg",
7648
7700
  className: "h-5 w-5",
7649
7701
  viewBox: "0 0 20 20",
7650
7702
  fill: "currentColor"
7651
- }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7703
+ }, props), _path$v || (_path$v = /*#__PURE__*/React.createElement("path", {
7652
7704
  fillRule: "evenodd",
7653
7705
  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",
7654
7706
  clipRule: "evenodd"
7655
7707
  })));
7656
7708
  }
7657
7709
 
7658
- var _path$t;
7710
+ var _path$u;
7659
7711
 
7660
- 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); }
7712
+ 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); }
7661
7713
 
7662
7714
  function SvgXIcon(props) {
7663
- return /*#__PURE__*/React.createElement("svg", _extends$v({
7715
+ return /*#__PURE__*/React.createElement("svg", _extends$w({
7664
7716
  xmlns: "http://www.w3.org/2000/svg",
7665
7717
  viewBox: "0 0 20 20",
7666
7718
  fill: "currentColor"
7667
- }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7719
+ }, props), _path$u || (_path$u = /*#__PURE__*/React.createElement("path", {
7668
7720
  fill: "evenodd",
7669
7721
  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",
7670
7722
  clipRule: "evenodd"
7671
7723
  })));
7672
7724
  }
7673
7725
 
7674
- var _path$s;
7726
+ var _path$t;
7675
7727
 
7676
- 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); }
7728
+ 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); }
7677
7729
 
7678
7730
  function SvgXIconSolid(props) {
7679
- return /*#__PURE__*/React.createElement("svg", _extends$u({
7731
+ return /*#__PURE__*/React.createElement("svg", _extends$v({
7680
7732
  className: "plc-w-4 plc-h-4",
7681
7733
  fill: "currentColor",
7682
7734
  xmlns: "http://www.w3.org/2000/svg",
7683
7735
  viewBox: "0 0 100 100"
7684
- }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7736
+ }, props), _path$t || (_path$t = /*#__PURE__*/React.createElement("path", {
7685
7737
  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"
7686
7738
  })));
7687
7739
  }
7688
7740
 
7689
- var _path$r;
7741
+ var _path$s;
7690
7742
 
7691
- 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); }
7743
+ 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); }
7692
7744
 
7693
7745
  function SvgExclamation(props) {
7694
- return /*#__PURE__*/React.createElement("svg", _extends$t({
7746
+ return /*#__PURE__*/React.createElement("svg", _extends$u({
7695
7747
  className: "plc-w-4 plc-h-4 plc-mr-1",
7696
7748
  xmlns: "http://www.w3.org/2000/svg",
7697
7749
  viewBox: "0 0 20 20",
7698
7750
  fill: "currentColor"
7699
- }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
7751
+ }, props), _path$s || (_path$s = /*#__PURE__*/React.createElement("path", {
7700
7752
  fillRule: "evenodd",
7701
7753
  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",
7702
7754
  clipRule: "evenodd"
7703
7755
  })));
7704
7756
  }
7705
7757
 
7706
- var _path$q, _path2$3;
7758
+ var _path$r, _path2$4;
7707
7759
 
7708
- 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); }
7760
+ 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); }
7709
7761
 
7710
7762
  function SvgSpinner(props) {
7711
- return /*#__PURE__*/React.createElement("svg", _extends$s({
7763
+ return /*#__PURE__*/React.createElement("svg", _extends$t({
7712
7764
  className: "plc-animate-spin",
7713
7765
  viewBox: "0 0 24 24",
7714
7766
  fill: "currentColor",
7715
7767
  xmlns: "http://www.w3.org/2000/svg"
7716
- }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
7768
+ }, props), _path$r || (_path$r = /*#__PURE__*/React.createElement("path", {
7717
7769
  opacity: 0.2,
7718
7770
  fill: "evenodd",
7719
7771
  clipRule: "evenodd",
7720
7772
  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"
7721
- })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
7773
+ })), _path2$4 || (_path2$4 = /*#__PURE__*/React.createElement("path", {
7722
7774
  d: "M2 12C2 6.477 6.477 2 12 2v3a7 7 0 00-7 7H2z"
7723
7775
  })));
7724
7776
  }
@@ -8444,50 +8496,110 @@ var pure = pure$1;
8444
8496
  var pure_1 = pure.loadStripe;
8445
8497
 
8446
8498
  /**
8447
- * @typedef {Object} OptionsType
8448
- * @property {boolean} loadPaymentSDKs
8449
- * @property {boolean} enableURLTriggers
8450
- * @property {boolean} enableTheme
8451
- * @property {boolean} enablePaywalls
8452
- * @property {boolean} enableGoogleAnalytics
8453
- */
8454
-
8455
- /**
8456
- * Initializes pelcro features based on the options flag object
8457
- * @param {OptionsType} options
8458
- * @returns
8499
+ * Extracts error message from the response error object
8500
+ * @param {Object} error Error object
8501
+ * @return {string}
8459
8502
  */
8503
+ const getErrorMessages = error => {
8504
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
8460
8505
 
8461
- const optionsController = options => {
8462
- if (!options) {
8463
- return;
8506
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
8507
+ return error.error.message;
8464
8508
  }
8465
8509
 
8466
- const optionsMethodsDict = {
8467
- loadPaymentSDKs: loadPaymentSDKs,
8468
- loadAuth0SDK: loadAuth0SDK,
8469
- enableURLTriggers: initViewFromURL,
8470
- enableTheme: applyPelcroTheme,
8471
- enablePaywalls: initPaywalls,
8472
- loadSecuritySDK: initSecuritySdk,
8473
- enableGoogleAnalytics: initGATracking
8474
- }; // Only execute enabled options
8510
+ 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) {
8511
+ var _error$response2, _error$response2$data;
8475
8512
 
8476
- Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8477
- var _optionsMethodsDict$k;
8513
+ 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;
8514
+ }
8478
8515
 
8479
- return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8480
- });
8481
- };
8482
- const initPaywalls = () => {
8483
- var _window$Pelcro$site$r;
8516
+ 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) {
8517
+ var _error$response4, _error$response4$data, _error$response4$data2;
8484
8518
 
8485
- const paywallMethods = window.Pelcro.paywall;
8486
- const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8519
+ 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;
8520
+ }
8487
8521
 
8488
- if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8489
- // blur entitlements based content
8490
- const didBlurContent = init(); // Skip paywall if article is not restricted
8522
+ const errorMessages = []; // enumerable error (ex: validation errors)
8523
+
8524
+ 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]) => {
8525
+ errorMessages.push(errorMessage);
8526
+ }); // convert to multiline string
8527
+
8528
+ return errorMessages.join("\n");
8529
+ };
8530
+ /**
8531
+ * Executes function after a wait time of inactivity
8532
+ * @param {function} func
8533
+ * @param {number} waitTime
8534
+ */
8535
+
8536
+ const debounce = (func, waitTime) => {
8537
+ let timeout;
8538
+ return function executedFunction(...args) {
8539
+ // The callback function to be executed after
8540
+ // the debounce time has elapsed
8541
+ const later = () => {
8542
+ // null timeout to indicate the debounce ended
8543
+ timeout = null;
8544
+ func(...args);
8545
+ }; // This will reset the waiting every function execution.
8546
+ // This is the step that prevents the function from
8547
+ // being executed because it will never reach the
8548
+ // inside of the previous setTimeout
8549
+
8550
+
8551
+ clearTimeout(timeout); // Restart the debounce waiting period.
8552
+ // setTimeout returns a truthy value (it differs in web vs Node)
8553
+
8554
+ timeout = setTimeout(later, waitTime);
8555
+ };
8556
+ };
8557
+
8558
+ /**
8559
+ * @typedef {Object} OptionsType
8560
+ * @property {boolean} loadPaymentSDKs
8561
+ * @property {boolean} enableURLTriggers
8562
+ * @property {boolean} enableTheme
8563
+ * @property {boolean} enablePaywalls
8564
+ * @property {boolean} enableGoogleAnalytics
8565
+ */
8566
+
8567
+ /**
8568
+ * Initializes pelcro features based on the options flag object
8569
+ * @param {OptionsType} options
8570
+ * @returns
8571
+ */
8572
+
8573
+ const optionsController = options => {
8574
+ if (!options) {
8575
+ return;
8576
+ }
8577
+
8578
+ const optionsMethodsDict = {
8579
+ loadPaymentSDKs: loadPaymentSDKs,
8580
+ loadAuth0SDK: loadAuth0SDK,
8581
+ enableURLTriggers: initViewFromURL,
8582
+ enableTheme: applyPelcroTheme,
8583
+ enablePaywalls: initPaywalls,
8584
+ loadSecuritySDK: initSecuritySdk,
8585
+ enableGoogleAnalytics: initGATracking
8586
+ }; // Only execute enabled options
8587
+
8588
+ Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8589
+ var _optionsMethodsDict$k;
8590
+
8591
+ return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8592
+ });
8593
+ };
8594
+ const initPaywalls = () => {
8595
+ var _window$Pelcro$site$r;
8596
+
8597
+ const paywallMethods = window.Pelcro.paywall;
8598
+ const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8599
+
8600
+ if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8601
+ // blur entitlements based content
8602
+ const didBlurContent = init(); // Skip paywall if article is not restricted
8491
8603
 
8492
8604
  if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
8493
8605
  return;
@@ -8683,6 +8795,10 @@ const initViewFromURL = () => {
8683
8795
  return initCartFromUrl();
8684
8796
  }
8685
8797
 
8798
+ if (view === "email-verify") {
8799
+ return verifyEmailTokenFromUrl();
8800
+ }
8801
+
8686
8802
  switchView(view);
8687
8803
  });
8688
8804
  }
@@ -8832,6 +8948,33 @@ const initCartFromUrl = () => {
8832
8948
  });
8833
8949
  };
8834
8950
 
8951
+ const verifyEmailTokenFromUrl = () => {
8952
+ var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
8953
+
8954
+ const {
8955
+ whenSiteReady
8956
+ } = usePelcro.getStore();
8957
+ const translations = i18next.t("verifyEmail:messages", {
8958
+ returnObjects: true
8959
+ });
8960
+ const emailToken = window.Pelcro.helpers.getURLParameter("token");
8961
+ 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;
8962
+ if (!emailToken || !isEmailVerificationEnabled) return;
8963
+ whenSiteReady(() => {
8964
+ window.Pelcro.user.verifyEmailToken({
8965
+ token: emailToken
8966
+ }, (err, res) => {
8967
+ if (err) {
8968
+ return notify.error(getErrorMessages(err));
8969
+ }
8970
+
8971
+ return notify.success(translations.success);
8972
+ });
8973
+ }, {
8974
+ once: true
8975
+ });
8976
+ };
8977
+
8835
8978
  const defaultOptions = {
8836
8979
  loadPaymentSDKs: true,
8837
8980
  loadAuth0SDK: true,
@@ -9114,6 +9257,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
9114
9257
  const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
9115
9258
  const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
9116
9259
  const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
9260
+ const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
9117
9261
  const SET_PERCENT_OFF = "SET_PERCENT_OFF";
9118
9262
  const SET_COUPON = "SET_COUPON";
9119
9263
  const SET_COUPON_ERROR = "SET_COUPON_ERROR";
@@ -9170,67 +9314,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9170
9314
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9171
9315
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9172
9316
 
9173
- /**
9174
- * Extracts error message from the response error object
9175
- * @param {Object} error Error object
9176
- * @return {string}
9177
- */
9178
- const getErrorMessages = error => {
9179
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
9180
-
9181
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
9182
- return error.error.message;
9183
- }
9184
-
9185
- 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) {
9186
- var _error$response2, _error$response2$data;
9187
-
9188
- 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;
9189
- }
9190
-
9191
- 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) {
9192
- var _error$response4, _error$response4$data, _error$response4$data2;
9193
-
9194
- 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;
9195
- }
9196
-
9197
- const errorMessages = []; // enumerable error (ex: validation errors)
9198
-
9199
- 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]) => {
9200
- errorMessages.push(errorMessage);
9201
- }); // convert to multiline string
9202
-
9203
- return errorMessages.join("\n");
9204
- };
9205
- /**
9206
- * Executes function after a wait time of inactivity
9207
- * @param {function} func
9208
- * @param {number} waitTime
9209
- */
9210
-
9211
- const debounce = (func, waitTime) => {
9212
- let timeout;
9213
- return function executedFunction(...args) {
9214
- // The callback function to be executed after
9215
- // the debounce time has elapsed
9216
- const later = () => {
9217
- // null timeout to indicate the debounce ended
9218
- timeout = null;
9219
- func(...args);
9220
- }; // This will reset the waiting every function execution.
9221
- // This is the step that prevents the function from
9222
- // being executed because it will never reach the
9223
- // inside of the previous setTimeout
9224
-
9225
-
9226
- clearTimeout(timeout); // Restart the debounce waiting period.
9227
- // setTimeout returns a truthy value (it differs in web vs Node)
9228
-
9229
- timeout = setTimeout(later, waitTime);
9230
- };
9231
- };
9232
-
9233
- const initialState$f = {
9317
+ const initialState$g = {
9234
9318
  email: "",
9235
9319
  password: "",
9236
9320
  emailError: null,
@@ -9241,10 +9325,10 @@ const initialState$f = {
9241
9325
  content: ""
9242
9326
  }
9243
9327
  };
9244
- const store$f = /*#__PURE__*/createContext(initialState$f);
9328
+ const store$g = /*#__PURE__*/createContext(initialState$g);
9245
9329
  const {
9246
- Provider: Provider$f
9247
- } = store$f;
9330
+ Provider: Provider$g
9331
+ } = store$g;
9248
9332
 
9249
9333
  const LoginContainer = ({
9250
9334
  style,
@@ -9351,7 +9435,7 @@ const LoginContainer = ({
9351
9435
  });
9352
9436
 
9353
9437
  case RESET_LOGIN_FORM:
9354
- return initialState$f;
9438
+ return initialState$g;
9355
9439
 
9356
9440
  case DISABLE_LOGIN_BUTTON:
9357
9441
  return lib_7({ ...state,
@@ -9369,12 +9453,12 @@ const LoginContainer = ({
9369
9453
  default:
9370
9454
  return state;
9371
9455
  }
9372
- }, initialState$f);
9456
+ }, initialState$g);
9373
9457
  return /*#__PURE__*/React__default.createElement("div", {
9374
9458
  style: { ...style
9375
9459
  },
9376
9460
  className: `pelcro-container pelcro-login-container ${className}`
9377
- }, /*#__PURE__*/React__default.createElement(Provider$f, {
9461
+ }, /*#__PURE__*/React__default.createElement(Provider$g, {
9378
9462
  value: {
9379
9463
  state,
9380
9464
  dispatch
@@ -9382,12 +9466,12 @@ const LoginContainer = ({
9382
9466
  }, children.length ? children.map((child, i) => {
9383
9467
  if (child) {
9384
9468
  return /*#__PURE__*/React__default.cloneElement(child, {
9385
- store: store$f,
9469
+ store: store$g,
9386
9470
  key: i
9387
9471
  });
9388
9472
  }
9389
9473
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9390
- store: store$f
9474
+ store: store$g
9391
9475
  })));
9392
9476
  };
9393
9477
 
@@ -9632,7 +9716,7 @@ const LoginButton = ({
9632
9716
  buttonDisabled
9633
9717
  },
9634
9718
  dispatch
9635
- } = useContext(store$f);
9719
+ } = useContext(store$g);
9636
9720
  const {
9637
9721
  t
9638
9722
  } = useTranslation("login");
@@ -9653,23 +9737,23 @@ const LoginButton = ({
9653
9737
  };
9654
9738
 
9655
9739
  const LoginEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
9656
- store: store$f
9740
+ store: store$g
9657
9741
  }, props));
9658
9742
 
9659
9743
  const LoginPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
9660
- store: store$f
9744
+ store: store$g
9661
9745
  }, props));
9662
9746
 
9663
- var _path$p;
9747
+ var _path$q;
9664
9748
 
9665
- 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); }
9749
+ 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); }
9666
9750
 
9667
9751
  function SvgCheck(props) {
9668
- return /*#__PURE__*/React.createElement("svg", _extends$r({
9752
+ return /*#__PURE__*/React.createElement("svg", _extends$s({
9669
9753
  xmlns: "http://www.w3.org/2000/svg",
9670
9754
  fill: "currentColor",
9671
9755
  viewBox: "0 0 20 20"
9672
- }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
9756
+ }, props), _path$q || (_path$q = /*#__PURE__*/React.createElement("path", {
9673
9757
  fillRule: "evenodd",
9674
9758
  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",
9675
9759
  clipRule: "evenodd"
@@ -9734,7 +9818,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9734
9818
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9735
9819
  facebookLoginRenderProps.FacebookLogin;
9736
9820
 
9737
- const initialState$e = {
9821
+ const initialState$f = {
9738
9822
  email: "",
9739
9823
  password: "",
9740
9824
  emailError: null,
@@ -9751,10 +9835,10 @@ const initialState$e = {
9751
9835
  content: ""
9752
9836
  }
9753
9837
  };
9754
- const store$e = /*#__PURE__*/createContext(initialState$e);
9838
+ const store$f = /*#__PURE__*/createContext(initialState$f);
9755
9839
  const {
9756
- Provider: Provider$e
9757
- } = store$e;
9840
+ Provider: Provider$f
9841
+ } = store$f;
9758
9842
 
9759
9843
  const RegisterContainer = ({
9760
9844
  style,
@@ -9937,7 +10021,7 @@ const RegisterContainer = ({
9937
10021
  });
9938
10022
 
9939
10023
  case RESET_LOGIN_FORM:
9940
- return initialState$e;
10024
+ return initialState$f;
9941
10025
 
9942
10026
  case DISABLE_REGISTRATION_BUTTON:
9943
10027
  return lib_7({ ...state,
@@ -9955,12 +10039,12 @@ const RegisterContainer = ({
9955
10039
  default:
9956
10040
  return state;
9957
10041
  }
9958
- }, initialState$e);
10042
+ }, initialState$f);
9959
10043
  return /*#__PURE__*/React__default.createElement("div", {
9960
10044
  style: { ...style
9961
10045
  },
9962
10046
  className: `pelcro-container pelcro-register-container ${className}`
9963
- }, /*#__PURE__*/React__default.createElement(Provider$e, {
10047
+ }, /*#__PURE__*/React__default.createElement(Provider$f, {
9964
10048
  value: {
9965
10049
  state,
9966
10050
  dispatch
@@ -9968,12 +10052,12 @@ const RegisterContainer = ({
9968
10052
  }, children.length ? children.map((child, i) => {
9969
10053
  if (child) {
9970
10054
  return /*#__PURE__*/React__default.cloneElement(child, {
9971
- store: store$e,
10055
+ store: store$f,
9972
10056
  key: i
9973
10057
  });
9974
10058
  }
9975
10059
  }) : /*#__PURE__*/React__default.cloneElement(children, {
9976
- store: store$e
10060
+ store: store$f
9977
10061
  })));
9978
10062
  };
9979
10063
  /**
@@ -9988,15 +10072,15 @@ function hasSecurityTokenEnabled$1() {
9988
10072
  return hasSecuritySdkLoaded;
9989
10073
  }
9990
10074
 
9991
- var _path$o;
10075
+ var _path$p;
9992
10076
 
9993
- 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); }
10077
+ 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); }
9994
10078
 
9995
10079
  function SvgFacebookLogo(props) {
9996
- return /*#__PURE__*/React.createElement("svg", _extends$q({
10080
+ return /*#__PURE__*/React.createElement("svg", _extends$r({
9997
10081
  xmlns: "http://www.w3.org/2000/svg",
9998
10082
  viewBox: "88.428 12.828 107.543 207.085"
9999
- }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10083
+ }, props), _path$p || (_path$p = /*#__PURE__*/React.createElement("path", {
10000
10084
  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",
10001
10085
  fill: "#3c5a9a"
10002
10086
  })));
@@ -10013,10 +10097,10 @@ const FacebookLoginButton = ({
10013
10097
  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;
10014
10098
  const {
10015
10099
  dispatch: loginDispatch
10016
- } = useContext(store$f);
10100
+ } = useContext(store$g);
10017
10101
  const {
10018
10102
  dispatch: registerDispatch
10019
- } = useContext(store$e);
10103
+ } = useContext(store$f);
10020
10104
 
10021
10105
  const onSuccess = facebookUser => {
10022
10106
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10069,18 +10153,18 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10069
10153
  unwrapExports(googleLogin);
10070
10154
  var googleLogin_1 = googleLogin.GoogleLogin;
10071
10155
 
10072
- var _path$n, _path2$2, _path3$1, _path4;
10156
+ var _path$o, _path2$3, _path3$1, _path4;
10073
10157
 
10074
- 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); }
10158
+ 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); }
10075
10159
 
10076
10160
  function SvgGoogleLogo(props) {
10077
- return /*#__PURE__*/React.createElement("svg", _extends$p({
10161
+ return /*#__PURE__*/React.createElement("svg", _extends$q({
10078
10162
  viewBox: "0 0 24 24",
10079
10163
  xmlns: "http://www.w3.org/2000/svg"
10080
- }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10164
+ }, props), _path$o || (_path$o = /*#__PURE__*/React.createElement("path", {
10081
10165
  fill: "#4285F4",
10082
10166
  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"
10083
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
10167
+ })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
10084
10168
  fill: "#34A853",
10085
10169
  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"
10086
10170
  })), _path3$1 || (_path3$1 = /*#__PURE__*/React.createElement("path", {
@@ -10103,10 +10187,10 @@ const GoogleLoginButton = ({
10103
10187
  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;
10104
10188
  const {
10105
10189
  dispatch: loginDispatch
10106
- } = useContext(store$f);
10190
+ } = useContext(store$g);
10107
10191
  const {
10108
10192
  dispatch: registerDispatch
10109
- } = useContext(store$e);
10193
+ } = useContext(store$f);
10110
10194
 
10111
10195
  const onSuccess = response => {
10112
10196
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10154,15 +10238,15 @@ const GoogleLoginButton = ({
10154
10238
  }) : null;
10155
10239
  };
10156
10240
 
10157
- var _path$m;
10241
+ var _path$n;
10158
10242
 
10159
- 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); }
10243
+ 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); }
10160
10244
 
10161
10245
  function SvgAuth0Logo(props) {
10162
- return /*#__PURE__*/React.createElement("svg", _extends$o({
10246
+ return /*#__PURE__*/React.createElement("svg", _extends$p({
10163
10247
  viewBox: "0 0 256 285",
10164
10248
  xmlns: "http://www.w3.org/2000/svg"
10165
- }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
10249
+ }, props), _path$n || (_path$n = /*#__PURE__*/React.createElement("path", {
10166
10250
  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"
10167
10251
  })));
10168
10252
  }
@@ -10173,30 +10257,47 @@ const Auth0LoginButton = ({
10173
10257
  labelClassName = "",
10174
10258
  iconClassName = ""
10175
10259
  }) => {
10176
- if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
10177
- console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10178
- }
10260
+ const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
10261
+ const auth0Script = document.querySelector("#auth0-sdk");
10262
+ const [auth0Loaded, setAuth0Loaded] = useState(Boolean(window.auth0));
10263
+ React__default.useEffect(() => {
10264
+ function handleScriptLoaded() {
10265
+ setAuth0Loaded(true);
10266
+ }
10267
+
10268
+ if (auth0Enabled && !auth0Loaded) {
10269
+ auth0Script.addEventListener("load", handleScriptLoaded);
10270
+ }
10179
10271
 
10180
- const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
10272
+ return () => {
10273
+ var _auth0Script$removeEv;
10274
+
10275
+ auth0Script === null || auth0Script === void 0 ? void 0 : (_auth0Script$removeEv = auth0Script.removeEventListener) === null || _auth0Script$removeEv === void 0 ? void 0 : _auth0Script$removeEv.call(auth0Script, "load", handleScriptLoaded);
10276
+ };
10277
+ }, [auth0Script, auth0Enabled, auth0Loaded]);
10181
10278
  const auth0InstanceRef = React__default.useRef(null);
10182
10279
  React__default.useEffect(() => {
10183
- if (auth0Enabled) {
10280
+ if (auth0Enabled && auth0Loaded && auth0InstanceRef.current === null) {
10184
10281
  auth0InstanceRef.current = new window.auth0.WebAuth({
10185
10282
  domain: window.Pelcro.site.read().auth0_base_url,
10186
10283
  clientID: window.Pelcro.site.read().auth0_client_id
10187
10284
  });
10188
10285
  }
10189
- }, []);
10286
+ }, [auth0Enabled, auth0Loaded]);
10190
10287
  const {
10191
10288
  dispatch: loginDispatch
10192
- } = useContext(store$f);
10289
+ } = useContext(store$g);
10193
10290
  const {
10194
10291
  dispatch: registerDispatch
10195
- } = useContext(store$e);
10292
+ } = useContext(store$f);
10196
10293
 
10197
10294
  function handleClick() {
10198
10295
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
10199
10296
 
10297
+ if (!auth0Loaded) {
10298
+ return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10299
+ }
10300
+
10200
10301
  (_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, {
10201
10302
  responseType: "token id_token",
10202
10303
  owp: true // close popup when finished
@@ -10321,19 +10422,19 @@ function LoginView(props) {
10321
10422
  }, /*#__PURE__*/React__default.createElement(GoogleLoginButton, null), /*#__PURE__*/React__default.createElement(FacebookLoginButton, null), /*#__PURE__*/React__default.createElement(Auth0LoginButton, null))))));
10322
10423
  }
10323
10424
 
10324
- var _path$l, _path2$1, _path3;
10425
+ var _path$m, _path2$2, _path3;
10325
10426
 
10326
- 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); }
10427
+ 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); }
10327
10428
 
10328
10429
  function SvgPelcroAuthorship(props) {
10329
- return /*#__PURE__*/React.createElement("svg", _extends$n({
10430
+ return /*#__PURE__*/React.createElement("svg", _extends$o({
10330
10431
  xmlns: "http://www.w3.org/2000/svg",
10331
10432
  viewBox: "0 -80.652 497.072 179.991"
10332
- }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
10433
+ }, props), _path$m || (_path$m = /*#__PURE__*/React.createElement("path", {
10333
10434
  fill: "none",
10334
10435
  stroke: "#4a4a4a",
10335
10436
  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"
10336
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
10437
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
10337
10438
  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",
10338
10439
  fill: "#4a4a4a"
10339
10440
  })), _path3 || (_path3 = /*#__PURE__*/React.createElement("path", {
@@ -10476,11 +10577,11 @@ function LoginModal({
10476
10577
  LoginModal.viewId = "login";
10477
10578
 
10478
10579
  const RegisterEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
10479
- store: store$e
10580
+ store: store$f
10480
10581
  }, props));
10481
10582
 
10482
10583
  const RegisterPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
10483
- store: store$e
10584
+ store: store$f
10484
10585
  }, props));
10485
10586
 
10486
10587
  const RegisterButton = ({
@@ -10500,7 +10601,7 @@ const RegisterButton = ({
10500
10601
  buttonDisabled
10501
10602
  },
10502
10603
  dispatch
10503
- } = useContext(store$e);
10604
+ } = useContext(store$f);
10504
10605
  const {
10505
10606
  t
10506
10607
  } = useTranslation("register");
@@ -10638,7 +10739,7 @@ function FirstName({
10638
10739
  }
10639
10740
 
10640
10741
  const RegisterFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
10641
- store: store$e
10742
+ store: store$f
10642
10743
  }, props));
10643
10744
 
10644
10745
  function LastName({
@@ -10669,7 +10770,7 @@ function LastName({
10669
10770
  }
10670
10771
 
10671
10772
  const RegisterLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
10672
- store: store$e
10773
+ store: store$f
10673
10774
  }, props));
10674
10775
 
10675
10776
  /**
@@ -10793,7 +10894,7 @@ function TextInput({
10793
10894
 
10794
10895
  const RegisterTextInput = props => {
10795
10896
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
10796
- store: store$e
10897
+ store: store$f
10797
10898
  }));
10798
10899
  };
10799
10900
 
@@ -10836,15 +10937,21 @@ function RegisterModal(props) {
10836
10937
  };
10837
10938
 
10838
10939
  const handleAfterRegistrationLogic = () => {
10839
- var _ReactGA$event;
10940
+ var _ReactGA$event, _window$Pelcro$site$r, _window$Pelcro$site$r2;
10840
10941
 
10841
10942
  ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
10842
10943
  category: "ACTIONS",
10843
10944
  action: "Registered",
10844
10945
  nonInteraction: true
10845
- }); // If product and plan are not selected
10946
+ });
10947
+ 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;
10948
+
10949
+ if (isEmailVerificationEnabled) {
10950
+ return switchView("email-verify");
10951
+ }
10846
10952
 
10847
10953
  if (!product && !order && !giftCode) {
10954
+ // If product and plan are not selected
10848
10955
  return resetView();
10849
10956
  } // If this is a redeem gift
10850
10957
 
@@ -11114,7 +11221,7 @@ class SelectModal extends Component {
11114
11221
 
11115
11222
  const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11116
11223
  const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11117
- const allProductsMinusMatched = allProducts.filter(product => productsThatMatchArticleTag.find(matchedProduct => matchedProduct.id !== product.id));
11224
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11118
11225
  return [productsThatMatchArticleTag, allProductsMinusMatched];
11119
11226
  }
11120
11227
  });
@@ -12803,7 +12910,7 @@ class PaypalGateWay {
12803
12910
 
12804
12911
  /** @type {PaymentStateType} */
12805
12912
 
12806
- const initialState$d = {
12913
+ const initialState$e = {
12807
12914
  disableSubmit: false,
12808
12915
  isLoading: false,
12809
12916
  disableCouponButton: false,
@@ -12822,10 +12929,10 @@ const initialState$d = {
12822
12929
  content: ""
12823
12930
  }
12824
12931
  };
12825
- const store$d = /*#__PURE__*/createContext(initialState$d);
12932
+ const store$e = /*#__PURE__*/createContext(initialState$e);
12826
12933
  const {
12827
- Provider: Provider$d
12828
- } = store$d;
12934
+ Provider: Provider$e
12935
+ } = store$e;
12829
12936
 
12830
12937
  const PaymentMethodContainerWithoutStripe = ({
12831
12938
  style,
@@ -12987,15 +13094,50 @@ const PaymentMethodContainerWithoutStripe = ({
12987
13094
  });
12988
13095
 
12989
13096
  if (err) {
13097
+ onFailure(err);
13098
+ dispatch({
13099
+ type: SET_COUPON_ERROR,
13100
+ payload: getErrorMessages(err)
13101
+ }); // remove current coupon
13102
+
13103
+ dispatch({
13104
+ type: SET_COUPON,
13105
+ payload: null
13106
+ });
12990
13107
  dispatch({
12991
13108
  type: SET_PERCENT_OFF,
12992
13109
  payload: ""
12993
13110
  });
12994
- onFailure(err);
12995
- return dispatch({
12996
- type: SET_COUPON_ERROR,
12997
- payload: getErrorMessages(err)
13111
+ dispatch({
13112
+ type: SET_UPDATED_PRICE,
13113
+ payload: null
12998
13114
  });
13115
+ dispatch({
13116
+ type: SET_TAX_AMOUNT,
13117
+ payload: null
13118
+ });
13119
+ const {
13120
+ currentPlan
13121
+ } = state;
13122
+
13123
+ if (currentPlan) {
13124
+ var _currentPlan$quantity;
13125
+
13126
+ const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
13127
+ const price = currentPlan.amount;
13128
+ dispatch({
13129
+ type: SET_UPDATED_PRICE,
13130
+ // set original plan price
13131
+ payload: price * quantity
13132
+ });
13133
+ dispatch({
13134
+ type: UPDATE_PAYMENT_REQUEST
13135
+ }); // update the new amount with taxes if site has taxes enabled
13136
+
13137
+ updateTotalAmountWithTax();
13138
+ }
13139
+
13140
+ return;
12999
13141
  }
13000
13142
 
13001
13143
  dispatch({
@@ -13085,6 +13227,54 @@ const PaymentMethodContainerWithoutStripe = ({
13085
13227
 
13086
13228
  const debouncedApplyCouponCode = useRef(debounce(onApplyCouponCode, 1000)).current;
13087
13229
 
13230
+ const removeAppliedCoupon = state => {
13231
+ state.couponCode = "";
13232
+ dispatch({
13233
+ type: SET_COUPON_ERROR,
13234
+ payload: ""
13235
+ });
13236
+ dispatch({
13237
+ type: SHOW_COUPON_FIELD,
13238
+ payload: false
13239
+ });
13240
+ dispatch({
13241
+ type: SET_COUPON,
13242
+ payload: null
13243
+ });
13244
+ dispatch({
13245
+ type: SET_PERCENT_OFF,
13246
+ payload: ""
13247
+ });
13248
+ dispatch({
13249
+ type: SET_UPDATED_PRICE,
13250
+ payload: null
13251
+ });
13252
+ dispatch({
13253
+ type: SET_TAX_AMOUNT,
13254
+ payload: null
13255
+ });
13256
+ const {
13257
+ currentPlan
13258
+ } = state;
13259
+
13260
+ if (currentPlan) {
13261
+ var _currentPlan$quantity2;
13262
+
13263
+ const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
13264
+ const price = currentPlan.amount;
13265
+ dispatch({
13266
+ type: SET_UPDATED_PRICE,
13267
+ // set original plan price
13268
+ payload: price * quantity
13269
+ });
13270
+ dispatch({
13271
+ type: UPDATE_PAYMENT_REQUEST
13272
+ }); // update the new amount with taxes if site has taxes enabled
13273
+
13274
+ updateTotalAmountWithTax();
13275
+ }
13276
+ };
13277
+
13088
13278
  const subscribe = (stripeSource, state, dispatch) => {
13089
13279
  const {
13090
13280
  couponCode
@@ -13702,6 +13892,9 @@ const PaymentMethodContainerWithoutStripe = ({
13702
13892
  disableCouponButton: true
13703
13893
  }, (state, dispatch) => onApplyCouponCode(state, dispatch));
13704
13894
 
13895
+ case REMOVE_APPLIED_COUPON:
13896
+ return lib_5(state, () => removeAppliedCoupon(state));
13897
+
13705
13898
  case SET_COUPON:
13706
13899
  return lib_7({ ...state,
13707
13900
  couponObject: action.payload
@@ -13730,21 +13923,21 @@ const PaymentMethodContainerWithoutStripe = ({
13730
13923
  default:
13731
13924
  return state;
13732
13925
  }
13733
- }, initialState$d);
13926
+ }, initialState$e);
13734
13927
  return /*#__PURE__*/React__default.createElement("div", {
13735
13928
  style: { ...style
13736
13929
  },
13737
13930
  className: `pelcro-container pelcro-payment-container ${className}`
13738
- }, /*#__PURE__*/React__default.createElement(Provider$d, {
13931
+ }, /*#__PURE__*/React__default.createElement(Provider$e, {
13739
13932
  value: {
13740
13933
  state,
13741
13934
  dispatch
13742
13935
  }
13743
13936
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
13744
- store: store$d,
13937
+ store: store$e,
13745
13938
  key: i
13746
13939
  })) : /*#__PURE__*/React__default.cloneElement(children, {
13747
- store: store$d
13940
+ store: store$e
13748
13941
  })));
13749
13942
  };
13750
13943
 
@@ -13766,7 +13959,7 @@ const PaymentMethodContainer = props => {
13766
13959
  stripeAccount: window.Pelcro.site.read().account_id,
13767
13960
  locale: getPageOrDefaultLanguage()
13768
13961
  }, /*#__PURE__*/React__default.createElement(es_11, null, /*#__PURE__*/React__default.createElement(UnwrappedForm, Object.assign({
13769
- store: store$d
13962
+ store: store$e
13770
13963
  }, props))));
13771
13964
  }
13772
13965
 
@@ -13819,7 +14012,7 @@ const PelcroPaymentRequestButton = props => {
13819
14012
  currentPlan,
13820
14013
  updatedPrice
13821
14014
  }
13822
- } = useContext(store$d);
14015
+ } = useContext(store$e);
13823
14016
 
13824
14017
  const updatePaymentRequest = () => {
13825
14018
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -13870,12 +14063,16 @@ const DiscountedPrice = props => {
13870
14063
  var _order$currency, _order$, _plan$quantity;
13871
14064
 
13872
14065
  const {
14066
+ t
14067
+ } = useTranslation("checkoutForm");
14068
+ const {
14069
+ dispatch,
13873
14070
  state: {
13874
14071
  updatedPrice,
13875
14072
  taxAmount,
13876
14073
  percentOff
13877
14074
  }
13878
- } = useContext(store$d);
14075
+ } = useContext(store$e);
13879
14076
  const {
13880
14077
  order,
13881
14078
  plan
@@ -13885,12 +14082,22 @@ const DiscountedPrice = props => {
13885
14082
  const discountedPriceWithoutTax = updatedPrice - taxAmount;
13886
14083
  const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
13887
14084
 
14085
+ const onCouponRemove = () => {
14086
+ dispatch({
14087
+ type: REMOVE_APPLIED_COUPON
14088
+ });
14089
+ };
14090
+
13888
14091
  if (percentOff) {
13889
14092
  return /*#__PURE__*/React__default.createElement("div", Object.assign({
13890
- className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
13891
- }, props), "(-", percentOff, ")", " ", /*#__PURE__*/React__default.createElement("span", {
13892
- className: "plc-font-bold pelcro-discounted-price"
13893
- }, priceFormatted));
14093
+ className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
14094
+ }, props), "(-", percentOff, ")", /*#__PURE__*/React__default.createElement("span", {
14095
+ className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
14096
+ }, priceFormatted), /*#__PURE__*/React__default.createElement(Button, {
14097
+ variant: "ghost",
14098
+ className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
14099
+ onClick: onCouponRemove
14100
+ }, "\u2715 ", t("labels.removeCoupon")));
13894
14101
  }
13895
14102
 
13896
14103
  return "";
@@ -13915,7 +14122,7 @@ const SubmitPaymentMethod = ({
13915
14122
  isLoading,
13916
14123
  updatedPrice
13917
14124
  }
13918
- } = useContext(store$d);
14125
+ } = useContext(store$e);
13919
14126
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
13920
14127
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
13921
14128
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -13936,17 +14143,17 @@ const SubmitPaymentMethod = ({
13936
14143
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
13937
14144
  };
13938
14145
 
13939
- var _path$k;
14146
+ var _path$l;
13940
14147
 
13941
- 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); }
14148
+ 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); }
13942
14149
 
13943
14150
  function SvgArrowLeft(props) {
13944
- return /*#__PURE__*/React.createElement("svg", _extends$m({
14151
+ return /*#__PURE__*/React.createElement("svg", _extends$n({
13945
14152
  xmlns: "http://www.w3.org/2000/svg",
13946
14153
  fill: "none",
13947
14154
  viewBox: "0 0 24 24",
13948
14155
  stroke: "currentColor"
13949
- }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14156
+ }, props), _path$l || (_path$l = /*#__PURE__*/React.createElement("path", {
13950
14157
  strokeLinecap: "round",
13951
14158
  strokeLinejoin: "round",
13952
14159
  strokeWidth: 2,
@@ -13965,7 +14172,7 @@ const ApplyCouponButton = ({
13965
14172
  disableCouponButton
13966
14173
  },
13967
14174
  dispatch
13968
- } = useContext(store$d);
14175
+ } = useContext(store$e);
13969
14176
  const {
13970
14177
  t
13971
14178
  } = useTranslation("checkoutForm");
@@ -13999,7 +14206,7 @@ const CouponCodeField = props => {
13999
14206
  couponCode,
14000
14207
  couponError
14001
14208
  }
14002
- } = useContext(store$d);
14209
+ } = useContext(store$e);
14003
14210
 
14004
14211
  const onCouponCodeChange = e => {
14005
14212
  dispatch({
@@ -14028,17 +14235,17 @@ const CouponCodeField = props => {
14028
14235
  }, props));
14029
14236
  };
14030
14237
 
14031
- var _path$j;
14238
+ var _path$k;
14032
14239
 
14033
- 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); }
14240
+ 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); }
14034
14241
 
14035
14242
  function SvgTicket(props) {
14036
- return /*#__PURE__*/React.createElement("svg", _extends$l({
14243
+ return /*#__PURE__*/React.createElement("svg", _extends$m({
14037
14244
  xmlns: "http://www.w3.org/2000/svg",
14038
14245
  fill: "none",
14039
14246
  viewBox: "0 0 24 24",
14040
14247
  stroke: "currentColor"
14041
- }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14248
+ }, props), _path$k || (_path$k = /*#__PURE__*/React.createElement("path", {
14042
14249
  strokeLinecap: "round",
14043
14250
  strokeLinejoin: "round",
14044
14251
  strokeWidth: 2,
@@ -14055,7 +14262,7 @@ const CouponCode = ({
14055
14262
  state: {
14056
14263
  enableCouponField
14057
14264
  }
14058
- } = useContext(store$d);
14265
+ } = useContext(store$e);
14059
14266
  const {
14060
14267
  t
14061
14268
  } = useTranslation("checkoutForm");
@@ -14312,7 +14519,7 @@ const PaypalSubscribeButton = props => {
14312
14519
  const {
14313
14520
  dispatch,
14314
14521
  state
14315
- } = useContext(store$d);
14522
+ } = useContext(store$e);
14316
14523
  const {
14317
14524
  product,
14318
14525
  plan,
@@ -14397,16 +14604,16 @@ const BankRedirection = () => {
14397
14604
  }));
14398
14605
  };
14399
14606
 
14400
- var _path$i;
14607
+ var _path$j;
14401
14608
 
14402
- 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); }
14609
+ 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); }
14403
14610
 
14404
14611
  function SvgLock(props) {
14405
- return /*#__PURE__*/React.createElement("svg", _extends$k({
14612
+ return /*#__PURE__*/React.createElement("svg", _extends$l({
14406
14613
  xmlns: "http://www.w3.org/2000/svg",
14407
14614
  viewBox: "0 0 20 20",
14408
14615
  fill: "currentColor"
14409
- }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
14616
+ }, props), _path$j || (_path$j = /*#__PURE__*/React.createElement("path", {
14410
14617
  fillRule: "evenodd",
14411
14618
  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",
14412
14619
  clipRule: "evenodd"
@@ -14423,7 +14630,7 @@ const SelectedPaymentMethod = () => {
14423
14630
  state: {
14424
14631
  isLoading
14425
14632
  }
14426
- } = useContext(store$d);
14633
+ } = useContext(store$e);
14427
14634
  const {
14428
14635
  switchView,
14429
14636
  selectedPaymentMethodId
@@ -14465,7 +14672,7 @@ const TaxAmount = () => {
14465
14672
  state: {
14466
14673
  taxAmount
14467
14674
  }
14468
- } = useContext(store$d);
14675
+ } = useContext(store$e);
14469
14676
  const {
14470
14677
  plan
14471
14678
  } = usePelcro();
@@ -14628,12 +14835,12 @@ function SubscriptionRenewModal({
14628
14835
  }
14629
14836
  SubscriptionRenewModal.viewId = "subscription-renew";
14630
14837
 
14631
- var _path$h;
14838
+ var _path$i;
14632
14839
 
14633
- 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); }
14840
+ 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); }
14634
14841
 
14635
14842
  function SvgGift(props) {
14636
- return /*#__PURE__*/React.createElement("svg", _extends$j({
14843
+ return /*#__PURE__*/React.createElement("svg", _extends$k({
14637
14844
  className: "plc-w-6 plc-h-6 plc-mr-2",
14638
14845
  fill: "none",
14639
14846
  stroke: "currentColor",
@@ -14642,7 +14849,7 @@ function SvgGift(props) {
14642
14849
  strokeWidth: 2,
14643
14850
  viewBox: "0 0 24 24",
14644
14851
  xmlns: "http://www.w3.org/2000/svg"
14645
- }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
14852
+ }, props), _path$i || (_path$i = /*#__PURE__*/React.createElement("path", {
14646
14853
  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"
14647
14854
  })));
14648
14855
  }
@@ -14973,7 +15180,7 @@ class DefaultNewsLetter extends Component {
14973
15180
 
14974
15181
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
14975
15182
 
14976
- const initialState$c = {
15183
+ const initialState$d = {
14977
15184
  didSubToNewslettersBefore: false,
14978
15185
  newsletters: [],
14979
15186
  isListLoading: true,
@@ -14983,10 +15190,10 @@ const initialState$c = {
14983
15190
  content: ""
14984
15191
  }
14985
15192
  };
14986
- const store$c = /*#__PURE__*/createContext(initialState$c);
15193
+ const store$d = /*#__PURE__*/createContext(initialState$d);
14987
15194
  const {
14988
- Provider: Provider$c
14989
- } = store$c;
15195
+ Provider: Provider$d
15196
+ } = store$d;
14990
15197
 
14991
15198
  const NewsletterUpdateContainer = ({
14992
15199
  style,
@@ -15099,7 +15306,7 @@ const NewsletterUpdateContainer = ({
15099
15306
  default:
15100
15307
  return state;
15101
15308
  }
15102
- }, initialState$c);
15309
+ }, initialState$d);
15103
15310
  useEffect(() => {
15104
15311
  const getUserNewsletters = () => {
15105
15312
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15143,7 +15350,7 @@ const NewsletterUpdateContainer = ({
15143
15350
  style: { ...style
15144
15351
  },
15145
15352
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15146
- }, /*#__PURE__*/React__default.createElement(Provider$c, {
15353
+ }, /*#__PURE__*/React__default.createElement(Provider$d, {
15147
15354
  value: {
15148
15355
  state,
15149
15356
  dispatch
@@ -15151,12 +15358,12 @@ const NewsletterUpdateContainer = ({
15151
15358
  }, children.length ? children.map((child, i) => {
15152
15359
  if (child) {
15153
15360
  return /*#__PURE__*/React__default.cloneElement(child, {
15154
- store: store$c,
15361
+ store: store$d,
15155
15362
  key: i
15156
15363
  });
15157
15364
  }
15158
15365
  }) : /*#__PURE__*/React__default.cloneElement(children, {
15159
- store: store$c
15366
+ store: store$d
15160
15367
  })));
15161
15368
  };
15162
15369
 
@@ -15171,7 +15378,7 @@ const NewsletterUpdateButton = ({
15171
15378
  isSubmitting,
15172
15379
  isListLoading
15173
15380
  }
15174
- } = useContext(store$c);
15381
+ } = useContext(store$d);
15175
15382
  const {
15176
15383
  t
15177
15384
  } = useTranslation("newsletter");
@@ -15201,7 +15408,7 @@ const NewsletterUpdateList = () => {
15201
15408
  newsletters,
15202
15409
  isListLoading
15203
15410
  }
15204
- } = useContext(store$c);
15411
+ } = useContext(store$d);
15205
15412
 
15206
15413
  if (isListLoading) {
15207
15414
  return /*#__PURE__*/React__default.createElement(Loader, {
@@ -15405,7 +15612,7 @@ function SubscriptionCreateModal({
15405
15612
  SubscriptionCreateModal.viewId = "subscription-create";
15406
15613
 
15407
15614
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15408
- const initialState$b = {
15615
+ const initialState$c = {
15409
15616
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15410
15617
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15411
15618
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15418,10 +15625,10 @@ const initialState$b = {
15418
15625
  content: ""
15419
15626
  }
15420
15627
  };
15421
- const store$b = /*#__PURE__*/createContext(initialState$b);
15628
+ const store$c = /*#__PURE__*/createContext(initialState$c);
15422
15629
  const {
15423
- Provider: Provider$b
15424
- } = store$b;
15630
+ Provider: Provider$c
15631
+ } = store$c;
15425
15632
 
15426
15633
  const UserUpdateContainer = ({
15427
15634
  style,
@@ -15553,27 +15760,27 @@ const UserUpdateContainer = ({
15553
15760
  default:
15554
15761
  return state;
15555
15762
  }
15556
- }, initialState$b);
15763
+ }, initialState$c);
15557
15764
  return /*#__PURE__*/React__default.createElement("div", {
15558
15765
  style: { ...style
15559
15766
  },
15560
15767
  className: `pelcro-container pelcro-user-update-container ${className}`
15561
- }, /*#__PURE__*/React__default.createElement(Provider$b, {
15768
+ }, /*#__PURE__*/React__default.createElement(Provider$c, {
15562
15769
  value: {
15563
15770
  state,
15564
15771
  dispatch
15565
15772
  }
15566
15773
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
15567
- store: store$b,
15774
+ store: store$c,
15568
15775
  key: i
15569
15776
  })) : /*#__PURE__*/React__default.cloneElement(children, {
15570
- store: store$b
15777
+ store: store$c
15571
15778
  })));
15572
15779
  };
15573
15780
 
15574
15781
  const UserUpdateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
15575
15782
  disabled: true,
15576
- store: store$b
15783
+ store: store$c
15577
15784
  }, props));
15578
15785
 
15579
15786
  const UserUpdateButton = ({
@@ -15586,7 +15793,7 @@ const UserUpdateButton = ({
15586
15793
  buttonDisabled
15587
15794
  },
15588
15795
  dispatch
15589
- } = useContext(store$b);
15796
+ } = useContext(store$c);
15590
15797
  const {
15591
15798
  t
15592
15799
  } = useTranslation("userEdit");
@@ -15603,11 +15810,11 @@ const UserUpdateButton = ({
15603
15810
  };
15604
15811
 
15605
15812
  const UserUpdateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
15606
- store: store$b
15813
+ store: store$c
15607
15814
  }, props));
15608
15815
 
15609
15816
  const UserUpdateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
15610
- store: store$b
15817
+ store: store$c
15611
15818
  }, props));
15612
15819
 
15613
15820
  function Phone({
@@ -15636,22 +15843,22 @@ function Phone({
15636
15843
  }
15637
15844
 
15638
15845
  const UserUpdatePhone = props => /*#__PURE__*/React__default.createElement(Phone, Object.assign({
15639
- store: store$b
15846
+ store: store$c
15640
15847
  }, props));
15641
15848
 
15642
15849
  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";
15643
15850
 
15644
- var _path$g;
15851
+ var _path$h;
15645
15852
 
15646
- 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); }
15853
+ 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); }
15647
15854
 
15648
15855
  function SvgEdit(props) {
15649
- return /*#__PURE__*/React.createElement("svg", _extends$i({
15856
+ return /*#__PURE__*/React.createElement("svg", _extends$j({
15650
15857
  className: "plc-w-6 plc-h-6",
15651
15858
  xmlns: "http://www.w3.org/2000/svg",
15652
15859
  viewBox: "0 0 20 20",
15653
15860
  fill: "currentColor"
15654
- }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
15861
+ }, props), _path$h || (_path$h = /*#__PURE__*/React.createElement("path", {
15655
15862
  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"
15656
15863
  })));
15657
15864
  }
@@ -15783,16 +15990,16 @@ function DisplayName({
15783
15990
  }
15784
15991
 
15785
15992
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default.createElement(DisplayName, Object.assign({
15786
- store: store$b
15993
+ store: store$c
15787
15994
  }, props));
15788
15995
 
15789
15996
  const UserUpdateTextInput = props => {
15790
15997
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
15791
- store: store$b
15998
+ store: store$c
15792
15999
  }));
15793
16000
  };
15794
16001
 
15795
- const initialState$a = {
16002
+ const initialState$b = {
15796
16003
  isSubmitting: false,
15797
16004
  firstName: "",
15798
16005
  firstNameError: "",
@@ -15817,10 +16024,10 @@ const initialState$a = {
15817
16024
  content: ""
15818
16025
  }
15819
16026
  };
15820
- const store$a = /*#__PURE__*/createContext(initialState$a);
16027
+ const store$b = /*#__PURE__*/createContext(initialState$b);
15821
16028
  const {
15822
- Provider: Provider$a
15823
- } = store$a;
16029
+ Provider: Provider$b
16030
+ } = store$b;
15824
16031
 
15825
16032
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
15826
16033
 
@@ -16027,7 +16234,7 @@ const AddressCreateContainer = ({
16027
16234
  default:
16028
16235
  return state;
16029
16236
  }
16030
- }, initialState$a);
16237
+ }, initialState$b);
16031
16238
  useEffect(() => {
16032
16239
  const getStates = () => {
16033
16240
  dispatch({
@@ -16059,16 +16266,16 @@ const AddressCreateContainer = ({
16059
16266
  style: { ...style
16060
16267
  },
16061
16268
  className: `pelcro-container pelcro-address-create-container ${className}`
16062
- }, /*#__PURE__*/React__default.createElement(Provider$a, {
16269
+ }, /*#__PURE__*/React__default.createElement(Provider$b, {
16063
16270
  value: {
16064
16271
  state,
16065
16272
  dispatch
16066
16273
  }
16067
16274
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16068
- store: store$a,
16275
+ store: store$b,
16069
16276
  key: i
16070
16277
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16071
- store: store$a
16278
+ store: store$b
16072
16279
  })));
16073
16280
  };
16074
16281
 
@@ -16079,7 +16286,7 @@ function AddressCreateFirstName(props) {
16079
16286
  firstName,
16080
16287
  firstNameError
16081
16288
  }
16082
- } = useContext(store$a);
16289
+ } = useContext(store$b);
16083
16290
 
16084
16291
  const handleBlur = () => {
16085
16292
  return dispatch({
@@ -16122,7 +16329,7 @@ function AddressCreateLastName(props) {
16122
16329
  lastName,
16123
16330
  lastNameError
16124
16331
  }
16125
- } = useContext(store$a);
16332
+ } = useContext(store$b);
16126
16333
 
16127
16334
  const handleBlur = () => {
16128
16335
  return dispatch({
@@ -16165,7 +16372,7 @@ function AddressCreateLine1(props) {
16165
16372
  line1,
16166
16373
  line1Error
16167
16374
  }
16168
- } = useContext(store$a);
16375
+ } = useContext(store$b);
16169
16376
 
16170
16377
  const handleBlur = () => {
16171
16378
  return dispatch({
@@ -16208,7 +16415,7 @@ function AddressCreateCity(props) {
16208
16415
  city,
16209
16416
  cityError
16210
16417
  }
16211
- } = useContext(store$a);
16418
+ } = useContext(store$b);
16212
16419
 
16213
16420
  const handleBlur = () => {
16214
16421
  return dispatch({
@@ -16251,7 +16458,7 @@ function AddressCreatePostalCode(props) {
16251
16458
  postalCode,
16252
16459
  postalCodeError
16253
16460
  }
16254
- } = useContext(store$a);
16461
+ } = useContext(store$b);
16255
16462
 
16256
16463
  const handleBlur = () => {
16257
16464
  return dispatch({
@@ -16297,7 +16504,7 @@ const AddressCreateSubmit = ({
16297
16504
  state: {
16298
16505
  isSubmitting
16299
16506
  }
16300
- } = useContext(store$a);
16507
+ } = useContext(store$b);
16301
16508
  const {
16302
16509
  t
16303
16510
  } = useTranslation("address");
@@ -16408,7 +16615,7 @@ function CountrySelect({
16408
16615
  }
16409
16616
 
16410
16617
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
16411
- store: store$a
16618
+ store: store$b
16412
16619
  }, props));
16413
16620
 
16414
16621
  function StateSelect({
@@ -16496,7 +16703,7 @@ function StateSelect({
16496
16703
  }
16497
16704
 
16498
16705
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
16499
- store: store$a
16706
+ store: store$b
16500
16707
  }, props));
16501
16708
 
16502
16709
  const AddressCreateView = props => {
@@ -16601,18 +16808,18 @@ AddressCreateModal.viewId = "address-create";
16601
16808
 
16602
16809
  const AddressCreateTextInput = props => {
16603
16810
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
16604
- store: store$a
16811
+ store: store$b
16605
16812
  }));
16606
16813
  };
16607
16814
 
16608
16815
  const AddressCreateLine2 = props => {
16609
16816
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
16610
16817
  fieldName: "line2",
16611
- store: store$a
16818
+ store: store$b
16612
16819
  }, props));
16613
16820
  };
16614
16821
 
16615
- const initialState$9 = {
16822
+ const initialState$a = {
16616
16823
  isSubmitting: false,
16617
16824
  firstName: "",
16618
16825
  firstNameError: "",
@@ -16637,10 +16844,10 @@ const initialState$9 = {
16637
16844
  content: ""
16638
16845
  }
16639
16846
  };
16640
- const store$9 = /*#__PURE__*/createContext(initialState$9);
16847
+ const store$a = /*#__PURE__*/createContext(initialState$a);
16641
16848
  const {
16642
- Provider: Provider$9
16643
- } = store$9;
16849
+ Provider: Provider$a
16850
+ } = store$a;
16644
16851
 
16645
16852
  const AddressUpdateContainer = ({
16646
16853
  style,
@@ -16692,7 +16899,7 @@ const AddressUpdateContainer = ({
16692
16899
  const thisAddress = addresses[address];
16693
16900
 
16694
16901
  if (+thisAddress.id === +addressId) {
16695
- const newState = { ...initialState$9,
16902
+ const newState = { ...initialState$a,
16696
16903
  firstName: thisAddress.first_name,
16697
16904
  lastName: thisAddress.last_name,
16698
16905
  line1: thisAddress.line1,
@@ -16825,7 +17032,7 @@ const AddressUpdateContainer = ({
16825
17032
  default:
16826
17033
  return state;
16827
17034
  }
16828
- }, initialState$9);
17035
+ }, initialState$a);
16829
17036
  useEffect(() => {
16830
17037
  const getStates = () => {
16831
17038
  dispatch({
@@ -16857,21 +17064,21 @@ const AddressUpdateContainer = ({
16857
17064
  style: { ...style
16858
17065
  },
16859
17066
  className: `pelcro-container pelcro-address-update-container ${className}`
16860
- }, /*#__PURE__*/React__default.createElement(Provider$9, {
17067
+ }, /*#__PURE__*/React__default.createElement(Provider$a, {
16861
17068
  value: {
16862
17069
  state,
16863
17070
  dispatch
16864
17071
  }
16865
17072
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
16866
- store: store$9,
17073
+ store: store$a,
16867
17074
  key: i
16868
17075
  })) : /*#__PURE__*/React__default.cloneElement(children, {
16869
- store: store$9
17076
+ store: store$a
16870
17077
  })));
16871
17078
  };
16872
17079
 
16873
17080
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default.createElement(CountrySelect, Object.assign({
16874
- store: store$9
17081
+ store: store$a
16875
17082
  }, props));
16876
17083
 
16877
17084
  function AddressUpdateFirstName(props) {
@@ -16881,7 +17088,7 @@ function AddressUpdateFirstName(props) {
16881
17088
  firstName,
16882
17089
  firstNameError
16883
17090
  }
16884
- } = useContext(store$9);
17091
+ } = useContext(store$a);
16885
17092
 
16886
17093
  const handleBlur = () => {
16887
17094
  return dispatch({
@@ -16924,7 +17131,7 @@ function AddressUpdateLastName(props) {
16924
17131
  lastName,
16925
17132
  lastNameError
16926
17133
  }
16927
- } = useContext(store$9);
17134
+ } = useContext(store$a);
16928
17135
 
16929
17136
  const handleBlur = () => {
16930
17137
  return dispatch({
@@ -16967,7 +17174,7 @@ function AddressUpdateLine1(props) {
16967
17174
  line1,
16968
17175
  line1Error
16969
17176
  }
16970
- } = useContext(store$9);
17177
+ } = useContext(store$a);
16971
17178
 
16972
17179
  const handleBlur = () => {
16973
17180
  return dispatch({
@@ -17007,7 +17214,7 @@ const AddressUpdateLine2 = props => {
17007
17214
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({
17008
17215
  fieldName: "line2"
17009
17216
  }, props, {
17010
- store: store$9
17217
+ store: store$a
17011
17218
  }));
17012
17219
  };
17013
17220
 
@@ -17018,7 +17225,7 @@ function AddressUpdateCity(props) {
17018
17225
  city,
17019
17226
  cityError
17020
17227
  }
17021
- } = useContext(store$9);
17228
+ } = useContext(store$a);
17022
17229
 
17023
17230
  const handleBlur = () => {
17024
17231
  return dispatch({
@@ -17061,7 +17268,7 @@ function AddressUpdatePostalCode(props) {
17061
17268
  postalCode,
17062
17269
  postalCodeError
17063
17270
  }
17064
- } = useContext(store$9);
17271
+ } = useContext(store$a);
17065
17272
 
17066
17273
  const handleBlur = () => {
17067
17274
  return dispatch({
@@ -17107,7 +17314,7 @@ const AddressUpdateSubmit = ({
17107
17314
  state: {
17108
17315
  isSubmitting
17109
17316
  }
17110
- } = useContext(store$9);
17317
+ } = useContext(store$a);
17111
17318
  const {
17112
17319
  t
17113
17320
  } = useTranslation("address");
@@ -17123,7 +17330,7 @@ const AddressUpdateSubmit = ({
17123
17330
  };
17124
17331
 
17125
17332
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default.createElement(StateSelect, Object.assign({
17126
- store: store$9
17333
+ store: store$a
17127
17334
  }, props));
17128
17335
 
17129
17336
  const AddressUpdateView = props => {
@@ -17206,7 +17413,7 @@ AddressUpdateModal.viewId = "address-edit";
17206
17413
 
17207
17414
  const AddressUpdateTextInput = props => {
17208
17415
  return /*#__PURE__*/React__default.createElement(TextInput, Object.assign({}, props, {
17209
- store: store$9
17416
+ store: store$a
17210
17417
  }));
17211
17418
  };
17212
17419
 
@@ -17289,7 +17496,7 @@ const PaymentMethodUpdateModal = props => {
17289
17496
  };
17290
17497
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17291
17498
 
17292
- const initialState$8 = {
17499
+ const initialState$9 = {
17293
17500
  email: "",
17294
17501
  password: "",
17295
17502
  passwordError: null,
@@ -17302,10 +17509,10 @@ const initialState$8 = {
17302
17509
  content: ""
17303
17510
  }
17304
17511
  };
17305
- const store$8 = /*#__PURE__*/createContext(initialState$8);
17512
+ const store$9 = /*#__PURE__*/createContext(initialState$9);
17306
17513
  const {
17307
- Provider: Provider$8
17308
- } = store$8;
17514
+ Provider: Provider$9
17515
+ } = store$9;
17309
17516
 
17310
17517
  const PasswordResetContainer = ({
17311
17518
  style,
@@ -17362,7 +17569,7 @@ const PasswordResetContainer = ({
17362
17569
  type: SET_EMAIL,
17363
17570
  payload: window.Pelcro.helpers.getURLParameter("email")
17364
17571
  });
17365
- initialState$8.email = window.Pelcro.helpers.getURLParameter("email");
17572
+ initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17366
17573
  dispatch({
17367
17574
  type: SET_TOKEN,
17368
17575
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17422,26 +17629,26 @@ const PasswordResetContainer = ({
17422
17629
  default:
17423
17630
  return state;
17424
17631
  }
17425
- }, initialState$8);
17632
+ }, initialState$9);
17426
17633
  return /*#__PURE__*/React__default.createElement("div", {
17427
17634
  style: { ...style
17428
17635
  },
17429
17636
  className: `pelcro-container pelcro-password-reset-container ${className}`
17430
- }, /*#__PURE__*/React__default.createElement(Provider$8, {
17637
+ }, /*#__PURE__*/React__default.createElement(Provider$9, {
17431
17638
  value: {
17432
17639
  state,
17433
17640
  dispatch
17434
17641
  }
17435
17642
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17436
- store: store$8,
17643
+ store: store$9,
17437
17644
  key: i
17438
17645
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17439
- store: store$8
17646
+ store: store$9
17440
17647
  })));
17441
17648
  };
17442
17649
 
17443
17650
  const PasswordResetPassword = props => /*#__PURE__*/React__default.createElement(Password, Object.assign({
17444
- store: store$8
17651
+ store: store$9
17445
17652
  }, props));
17446
17653
 
17447
17654
  const PasswordResetButton = ({
@@ -17454,7 +17661,7 @@ const PasswordResetButton = ({
17454
17661
  buttonDisabled
17455
17662
  },
17456
17663
  dispatch
17457
- } = useContext(store$8);
17664
+ } = useContext(store$9);
17458
17665
  const {
17459
17666
  t
17460
17667
  } = useTranslation("passwordReset");
@@ -17471,14 +17678,14 @@ const PasswordResetButton = ({
17471
17678
  };
17472
17679
 
17473
17680
  const PasswordResetEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17474
- store: store$8
17681
+ store: store$9
17475
17682
  }, props, {
17476
17683
  value: window.Pelcro.helpers.getURLParameter("email"),
17477
17684
  disabled: true
17478
17685
  }));
17479
17686
 
17480
17687
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default.createElement(ConfirmPassword, Object.assign({
17481
- store: store$8
17688
+ store: store$9
17482
17689
  }, props));
17483
17690
 
17484
17691
  const PasswordResetView = props => {
@@ -17530,7 +17737,7 @@ const PasswordResetModal = ({
17530
17737
  };
17531
17738
  PasswordResetModal.viewId = "password-reset";
17532
17739
 
17533
- const initialState$7 = {
17740
+ const initialState$8 = {
17534
17741
  email: "",
17535
17742
  emailError: null,
17536
17743
  buttonDisabled: false,
@@ -17539,10 +17746,10 @@ const initialState$7 = {
17539
17746
  content: ""
17540
17747
  }
17541
17748
  };
17542
- const store$7 = /*#__PURE__*/createContext(initialState$7);
17749
+ const store$8 = /*#__PURE__*/createContext(initialState$8);
17543
17750
  const {
17544
- Provider: Provider$7
17545
- } = store$7;
17751
+ Provider: Provider$8
17752
+ } = store$8;
17546
17753
 
17547
17754
  const PasswordForgotContainer = ({
17548
17755
  style,
@@ -17620,21 +17827,21 @@ const PasswordForgotContainer = ({
17620
17827
  default:
17621
17828
  return state;
17622
17829
  }
17623
- }, initialState$7);
17830
+ }, initialState$8);
17624
17831
  return /*#__PURE__*/React__default.createElement("div", {
17625
17832
  style: { ...style
17626
17833
  },
17627
17834
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17628
- }, /*#__PURE__*/React__default.createElement(Provider$7, {
17835
+ }, /*#__PURE__*/React__default.createElement(Provider$8, {
17629
17836
  value: {
17630
17837
  state,
17631
17838
  dispatch
17632
17839
  }
17633
17840
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17634
- store: store$7,
17841
+ store: store$8,
17635
17842
  key: i
17636
17843
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17637
- store: store$7
17844
+ store: store$8
17638
17845
  })));
17639
17846
  };
17640
17847
 
@@ -17650,7 +17857,7 @@ const PasswordForgotButton = ({
17650
17857
  emailError
17651
17858
  },
17652
17859
  dispatch
17653
- } = useContext(store$7);
17860
+ } = useContext(store$8);
17654
17861
  const {
17655
17862
  t
17656
17863
  } = useTranslation("passwordForgot");
@@ -17671,7 +17878,7 @@ const PasswordForgotButton = ({
17671
17878
  };
17672
17879
 
17673
17880
  const PasswordForgotEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
17674
- store: store$7
17881
+ store: store$8
17675
17882
  }, props));
17676
17883
 
17677
17884
  const PasswordForgotView = props => {
@@ -17721,7 +17928,7 @@ const PasswordForgotModal = ({
17721
17928
  };
17722
17929
  PasswordForgotModal.viewId = "password-forgot";
17723
17930
 
17724
- const initialState$6 = {
17931
+ const initialState$7 = {
17725
17932
  currentPassword: "",
17726
17933
  newPassword: "",
17727
17934
  confirmNewPassword: "",
@@ -17735,10 +17942,10 @@ const initialState$6 = {
17735
17942
  content: ""
17736
17943
  }
17737
17944
  };
17738
- const store$6 = /*#__PURE__*/createContext(initialState$6);
17945
+ const store$7 = /*#__PURE__*/createContext(initialState$7);
17739
17946
  const {
17740
- Provider: Provider$6
17741
- } = store$6;
17947
+ Provider: Provider$7
17948
+ } = store$7;
17742
17949
  const PasswordChangeContainer = ({
17743
17950
  style,
17744
17951
  className = "",
@@ -17890,21 +18097,21 @@ const PasswordChangeContainer = ({
17890
18097
  default:
17891
18098
  return state;
17892
18099
  }
17893
- }, initialState$6);
18100
+ }, initialState$7);
17894
18101
  return /*#__PURE__*/React__default.createElement("div", {
17895
18102
  style: { ...style
17896
18103
  },
17897
18104
  className: `pelcro-container pelcro-password-change-container ${className}`
17898
- }, /*#__PURE__*/React__default.createElement(Provider$6, {
18105
+ }, /*#__PURE__*/React__default.createElement(Provider$7, {
17899
18106
  value: {
17900
18107
  state,
17901
18108
  dispatch
17902
18109
  }
17903
18110
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
17904
- store: store$6,
18111
+ store: store$7,
17905
18112
  key: i
17906
18113
  })) : /*#__PURE__*/React__default.cloneElement(children, {
17907
- store: store$6
18114
+ store: store$7
17908
18115
  })));
17909
18116
  };
17910
18117
 
@@ -17915,7 +18122,7 @@ function PasswordChangeCurrentPassword(props) {
17915
18122
  currentPassword,
17916
18123
  currentPasswordError
17917
18124
  }
17918
- } = useContext(store$6);
18125
+ } = useContext(store$7);
17919
18126
  const handleBlur = useCallback(() => {
17920
18127
  return dispatch({
17921
18128
  type: VALIDATE_PASSWORD
@@ -17949,7 +18156,7 @@ function PasswordChangeNewPassword(props) {
17949
18156
  newPassword,
17950
18157
  newPasswordError
17951
18158
  }
17952
- } = useContext(store$6);
18159
+ } = useContext(store$7);
17953
18160
  const handleBlur = useCallback(() => {
17954
18161
  return dispatch({
17955
18162
  type: VALIDATE_NEW_PASSWORD
@@ -17983,7 +18190,7 @@ function PasswordChangeConfirmNewPassword(props) {
17983
18190
  confirmNewPassword,
17984
18191
  confirmNewPasswordError
17985
18192
  }
17986
- } = useContext(store$6);
18193
+ } = useContext(store$7);
17987
18194
  const handleBlur = useCallback(() => {
17988
18195
  return dispatch({
17989
18196
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -18024,7 +18231,7 @@ const PasswordChangeButton = ({
18024
18231
  confirmNewPasswordError
18025
18232
  },
18026
18233
  dispatch
18027
- } = useContext(store$6);
18234
+ } = useContext(store$7);
18028
18235
  const {
18029
18236
  t
18030
18237
  } = useTranslation("passwordChange");
@@ -18090,17 +18297,17 @@ const PasswordChangeModal = ({
18090
18297
  };
18091
18298
  PasswordChangeModal.viewId = "password-change";
18092
18299
 
18093
- const initialState$5 = {
18300
+ const initialState$6 = {
18094
18301
  buttonDisabled: false,
18095
18302
  alert: {
18096
18303
  type: "error",
18097
18304
  content: ""
18098
18305
  }
18099
18306
  };
18100
- const store$5 = /*#__PURE__*/createContext(initialState$5);
18307
+ const store$6 = /*#__PURE__*/createContext(initialState$6);
18101
18308
  const {
18102
- Provider: Provider$5
18103
- } = store$5;
18309
+ Provider: Provider$6
18310
+ } = store$6;
18104
18311
 
18105
18312
  const CartContainer = ({
18106
18313
  style,
@@ -18191,21 +18398,21 @@ const CartContainer = ({
18191
18398
  default:
18192
18399
  return state;
18193
18400
  }
18194
- }, initialState$5);
18401
+ }, initialState$6);
18195
18402
  return /*#__PURE__*/React__default.createElement("div", {
18196
18403
  style: { ...style
18197
18404
  },
18198
18405
  className: `pelcro-container pelcro-cart-container ${className}`
18199
- }, /*#__PURE__*/React__default.createElement(Provider$5, {
18406
+ }, /*#__PURE__*/React__default.createElement(Provider$6, {
18200
18407
  value: {
18201
18408
  state,
18202
18409
  dispatch
18203
18410
  }
18204
18411
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18205
- store: store$5,
18412
+ store: store$6,
18206
18413
  key: i
18207
18414
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18208
- store: store$5
18415
+ store: store$6
18209
18416
  })));
18210
18417
  };
18211
18418
 
@@ -18242,7 +18449,7 @@ const CartSubmit = ({
18242
18449
  buttonDisabled
18243
18450
  },
18244
18451
  dispatch
18245
- } = useContext(store$5);
18452
+ } = useContext(store$6);
18246
18453
  const {
18247
18454
  t
18248
18455
  } = useTranslation("cart");
@@ -18273,7 +18480,7 @@ const CartTotalPrice = () => {
18273
18480
  state: {
18274
18481
  alert
18275
18482
  }
18276
- } = useContext(store$5);
18483
+ } = useContext(store$6);
18277
18484
  const {
18278
18485
  cartItems
18279
18486
  } = usePelcro();
@@ -18586,7 +18793,7 @@ const OrderConfirmModal = props => {
18586
18793
  };
18587
18794
  OrderConfirmModal.viewId = "order-confirm";
18588
18795
 
18589
- const initialState$4 = {
18796
+ const initialState$5 = {
18590
18797
  email: "",
18591
18798
  firstName: "",
18592
18799
  lastName: "",
@@ -18598,10 +18805,10 @@ const initialState$4 = {
18598
18805
  content: ""
18599
18806
  }
18600
18807
  };
18601
- const store$4 = /*#__PURE__*/createContext(initialState$4);
18808
+ const store$5 = /*#__PURE__*/createContext(initialState$5);
18602
18809
  const {
18603
- Provider: Provider$4
18604
- } = store$4;
18810
+ Provider: Provider$5
18811
+ } = store$5;
18605
18812
 
18606
18813
  const GiftCreateContainer = ({
18607
18814
  style,
@@ -18705,21 +18912,21 @@ const GiftCreateContainer = ({
18705
18912
  default:
18706
18913
  return state;
18707
18914
  }
18708
- }, initialState$4);
18915
+ }, initialState$5);
18709
18916
  return /*#__PURE__*/React__default.createElement("div", {
18710
18917
  style: { ...style
18711
18918
  },
18712
18919
  className: `pelcro-container pelcro-gift-create-container ${className}`
18713
- }, /*#__PURE__*/React__default.createElement(Provider$4, {
18920
+ }, /*#__PURE__*/React__default.createElement(Provider$5, {
18714
18921
  value: {
18715
18922
  state,
18716
18923
  dispatch
18717
18924
  }
18718
18925
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
18719
- store: store$4,
18926
+ store: store$5,
18720
18927
  key: i
18721
18928
  })) : /*#__PURE__*/React__default.cloneElement(children, {
18722
- store: store$4
18929
+ store: store$5
18723
18930
  })));
18724
18931
  };
18725
18932
 
@@ -18733,7 +18940,7 @@ const GiftCreateSubmitButton = ({
18733
18940
  state: {
18734
18941
  disableSubmit
18735
18942
  }
18736
- } = useContext(store$4);
18943
+ } = useContext(store$5);
18737
18944
  const {
18738
18945
  t
18739
18946
  } = useTranslation("register");
@@ -18750,29 +18957,29 @@ const GiftCreateSubmitButton = ({
18750
18957
 
18751
18958
  const GiftCreateEmail = props => /*#__PURE__*/React__default.createElement(Email, Object.assign({
18752
18959
  initWithUserEmail: false,
18753
- store: store$4
18960
+ store: store$5
18754
18961
  }, props));
18755
18962
 
18756
18963
  const GiftCreateFirstName = props => /*#__PURE__*/React__default.createElement(FirstName, Object.assign({
18757
- store: store$4
18964
+ store: store$5
18758
18965
  }, props));
18759
18966
 
18760
18967
  const GiftCreateLastName = props => /*#__PURE__*/React__default.createElement(LastName, Object.assign({
18761
- store: store$4
18968
+ store: store$5
18762
18969
  }, props));
18763
18970
 
18764
- var _path$f;
18971
+ var _path$g;
18765
18972
 
18766
- 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); }
18973
+ 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); }
18767
18974
 
18768
18975
  function SvgInfoCircle(props) {
18769
- return /*#__PURE__*/React.createElement("svg", _extends$h({
18976
+ return /*#__PURE__*/React.createElement("svg", _extends$i({
18770
18977
  xmlns: "http://www.w3.org/2000/svg",
18771
18978
  className: "plc-w-5 plc-h-5",
18772
18979
  fill: "none",
18773
18980
  viewBox: "0 0 24 24",
18774
18981
  stroke: "currentColor"
18775
- }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
18982
+ }, props), _path$g || (_path$g = /*#__PURE__*/React.createElement("path", {
18776
18983
  strokeLinecap: "round",
18777
18984
  strokeLinejoin: "round",
18778
18985
  strokeWidth: 2,
@@ -18843,7 +19050,7 @@ const GiftCreateStartDate = props => {
18843
19050
  const {
18844
19051
  dispatch,
18845
19052
  state
18846
- } = useContext(store$4);
19053
+ } = useContext(store$5);
18847
19054
 
18848
19055
  const handleInputChange = value => {
18849
19056
  dispatch({
@@ -18914,7 +19121,7 @@ function GiftCreateMessage(props) {
18914
19121
  const {
18915
19122
  dispatch,
18916
19123
  state
18917
- } = useContext(store$4);
19124
+ } = useContext(store$5);
18918
19125
 
18919
19126
  const handleInputChange = value => {
18920
19127
  dispatch({
@@ -19034,7 +19241,7 @@ const GiftCreateModal = ({
19034
19241
  };
19035
19242
  GiftCreateModal.viewId = "gift-create";
19036
19243
 
19037
- const initialState$3 = {
19244
+ const initialState$4 = {
19038
19245
  giftCode: "",
19039
19246
  buttonDisabled: true,
19040
19247
  alert: {
@@ -19042,10 +19249,10 @@ const initialState$3 = {
19042
19249
  content: ""
19043
19250
  }
19044
19251
  };
19045
- const store$3 = /*#__PURE__*/createContext(initialState$3);
19252
+ const store$4 = /*#__PURE__*/createContext(initialState$4);
19046
19253
  const {
19047
- Provider: Provider$3
19048
- } = store$3;
19254
+ Provider: Provider$4
19255
+ } = store$4;
19049
19256
 
19050
19257
  const GiftRedeemContainer = ({
19051
19258
  style,
@@ -19110,21 +19317,21 @@ const GiftRedeemContainer = ({
19110
19317
  default:
19111
19318
  return state;
19112
19319
  }
19113
- }, initialState$3);
19320
+ }, initialState$4);
19114
19321
  return /*#__PURE__*/React__default.createElement("div", {
19115
19322
  style: { ...style
19116
19323
  },
19117
19324
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19118
- }, /*#__PURE__*/React__default.createElement(Provider$3, {
19325
+ }, /*#__PURE__*/React__default.createElement(Provider$4, {
19119
19326
  value: {
19120
19327
  state,
19121
19328
  dispatch
19122
19329
  }
19123
19330
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19124
- store: store$3,
19331
+ store: store$4,
19125
19332
  key: i
19126
19333
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19127
- store: store$3
19334
+ store: store$4
19128
19335
  })));
19129
19336
  };
19130
19337
 
@@ -19161,7 +19368,7 @@ function GiftCode({
19161
19368
  }
19162
19369
 
19163
19370
  const GiftRedeemCode = props => /*#__PURE__*/React__default.createElement(GiftCode, Object.assign({
19164
- store: store$3
19371
+ store: store$4
19165
19372
  }, props));
19166
19373
 
19167
19374
  const GiftRedeemSubmitButton = ({
@@ -19174,7 +19381,7 @@ const GiftRedeemSubmitButton = ({
19174
19381
  state: {
19175
19382
  disableSubmit
19176
19383
  }
19177
- } = useContext(store$3);
19384
+ } = useContext(store$4);
19178
19385
  const {
19179
19386
  t
19180
19387
  } = useTranslation("register");
@@ -19267,7 +19474,7 @@ const moveDefaultAddressToStart = addresses => {
19267
19474
  return [defaultAddress, ...addressesWithoutDefault];
19268
19475
  };
19269
19476
 
19270
- const initialState$2 = {
19477
+ const initialState$3 = {
19271
19478
  addresses: [],
19272
19479
  selectedAddressId: null,
19273
19480
  isSubmitting: false,
@@ -19276,10 +19483,10 @@ const initialState$2 = {
19276
19483
  content: ""
19277
19484
  }
19278
19485
  };
19279
- const store$2 = /*#__PURE__*/createContext(initialState$2);
19486
+ const store$3 = /*#__PURE__*/createContext(initialState$3);
19280
19487
  const {
19281
- Provider: Provider$2
19282
- } = store$2;
19488
+ Provider: Provider$3
19489
+ } = store$3;
19283
19490
 
19284
19491
  const AddressSelectContainer = ({
19285
19492
  style,
@@ -19374,7 +19581,7 @@ const AddressSelectContainer = ({
19374
19581
  default:
19375
19582
  return state;
19376
19583
  }
19377
- }, initialState$2);
19584
+ }, initialState$3);
19378
19585
  useEffect(() => {
19379
19586
  var _window$Pelcro$user$r;
19380
19587
 
@@ -19387,16 +19594,16 @@ const AddressSelectContainer = ({
19387
19594
  style: { ...style
19388
19595
  },
19389
19596
  className: `pelcro-container pelcro-address-select-container ${className}`
19390
- }, /*#__PURE__*/React__default.createElement(Provider$2, {
19597
+ }, /*#__PURE__*/React__default.createElement(Provider$3, {
19391
19598
  value: {
19392
19599
  state,
19393
19600
  dispatch
19394
19601
  }
19395
19602
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19396
- store: store$2,
19603
+ store: store$3,
19397
19604
  key: i
19398
19605
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19399
- store: store$2
19606
+ store: store$3
19400
19607
  })));
19401
19608
  };
19402
19609
 
@@ -19407,7 +19614,7 @@ const AddressSelectList = () => {
19407
19614
  addresses,
19408
19615
  selectedAddressId
19409
19616
  }
19410
- } = useContext(store$2);
19617
+ } = useContext(store$3);
19411
19618
 
19412
19619
  const handleAddressSelect = event => {
19413
19620
  dispatch({
@@ -19451,7 +19658,7 @@ const AddressSelectSubmit = ({
19451
19658
  selectedAddressId,
19452
19659
  isSubmitting
19453
19660
  }
19454
- } = useContext(store$2);
19661
+ } = useContext(store$3);
19455
19662
  const {
19456
19663
  t
19457
19664
  } = useTranslation("address");
@@ -19539,10 +19746,15 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19539
19746
 
19540
19747
  const defaultPaymentMethod = (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.source;
19541
19748
  const paymentMethodsWithoutDefault = paymentMethods.filter(paymentMethod => paymentMethod.id !== defaultPaymentMethod.id);
19749
+
19750
+ if (defaultPaymentMethod.status !== "chargeable") {
19751
+ return paymentMethodsWithoutDefault;
19752
+ }
19753
+
19542
19754
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19543
19755
  };
19544
19756
 
19545
- const initialState$1 = {
19757
+ const initialState$2 = {
19546
19758
  paymentMethods: [],
19547
19759
  selectedPaymentMethodId: null,
19548
19760
  isSubmitting: false,
@@ -19551,10 +19763,10 @@ const initialState$1 = {
19551
19763
  content: ""
19552
19764
  }
19553
19765
  };
19554
- const store$1 = /*#__PURE__*/createContext(initialState$1);
19766
+ const store$2 = /*#__PURE__*/createContext(initialState$2);
19555
19767
  const {
19556
- Provider: Provider$1
19557
- } = store$1;
19768
+ Provider: Provider$2
19769
+ } = store$2;
19558
19770
 
19559
19771
  const PaymentMethodSelectContainer = ({
19560
19772
  style,
@@ -19599,7 +19811,7 @@ const PaymentMethodSelectContainer = ({
19599
19811
  default:
19600
19812
  return state;
19601
19813
  }
19602
- }, initialState$1);
19814
+ }, initialState$2);
19603
19815
  useEffect(() => {
19604
19816
  var _window$Pelcro$user$r4;
19605
19817
 
@@ -19612,16 +19824,16 @@ const PaymentMethodSelectContainer = ({
19612
19824
  style: { ...style
19613
19825
  },
19614
19826
  className: `pelcro-container pelcro-payment-select-container ${className}`
19615
- }, /*#__PURE__*/React__default.createElement(Provider$1, {
19827
+ }, /*#__PURE__*/React__default.createElement(Provider$2, {
19616
19828
  value: {
19617
19829
  state,
19618
19830
  dispatch
19619
19831
  }
19620
19832
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
19621
- store: store$1,
19833
+ store: store$2,
19622
19834
  key: i
19623
19835
  })) : /*#__PURE__*/React__default.cloneElement(children, {
19624
- store: store$1
19836
+ store: store$2
19625
19837
  })));
19626
19838
  };
19627
19839
 
@@ -19635,7 +19847,7 @@ const PaymentMethodSelectList = () => {
19635
19847
  paymentMethods,
19636
19848
  selectedPaymentMethodId
19637
19849
  }
19638
- } = useContext(store$1);
19850
+ } = useContext(store$2);
19639
19851
 
19640
19852
  const handlePaymentMethodSelect = event => {
19641
19853
  dispatch({
@@ -19685,7 +19897,7 @@ const PaymentMethodSelectSubmit = ({
19685
19897
  selectedPaymentMethodId,
19686
19898
  isSubmitting
19687
19899
  }
19688
- } = useContext(store$1);
19900
+ } = useContext(store$2);
19689
19901
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
19690
19902
  onClick: () => {
19691
19903
  dispatch({
@@ -19759,8 +19971,8 @@ const PaymentMethodSelectModal = ({
19759
19971
  };
19760
19972
  PaymentMethodSelectModal.viewId = "payment-method-select";
19761
19973
 
19762
- function _extends$g() {
19763
- _extends$g = Object.assign || function (target) {
19974
+ function _extends$h() {
19975
+ _extends$h = Object.assign || function (target) {
19764
19976
  for (var i = 1; i < arguments.length; i++) {
19765
19977
  var source = arguments[i];
19766
19978
 
@@ -19774,7 +19986,7 @@ function _extends$g() {
19774
19986
  return target;
19775
19987
  };
19776
19988
 
19777
- return _extends$g.apply(this, arguments);
19989
+ return _extends$h.apply(this, arguments);
19778
19990
  }
19779
19991
 
19780
19992
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -19958,7 +20170,7 @@ function render(props, propsBag, defaultTag, features, visible) {
19958
20170
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
19959
20171
  return null;
19960
20172
  }, _match[RenderStrategy.Hidden] = function () {
19961
- return _render(_extends$g({}, _rest, {
20173
+ return _render(_extends$h({}, _rest, {
19962
20174
  hidden: true,
19963
20175
  style: {
19964
20176
  display: 'none'
@@ -20486,7 +20698,7 @@ function TransitionChild(props) {
20486
20698
  var passthroughProps = rest;
20487
20699
  return React__default.createElement(NestingContext.Provider, {
20488
20700
  value: nesting
20489
- }, render(_extends$g({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20701
+ }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20490
20702
  }
20491
20703
 
20492
20704
  function Transition(props) {
@@ -20530,7 +20742,7 @@ function Transition(props) {
20530
20742
  value: nestingBag
20531
20743
  }, React__default.createElement(TransitionContext.Provider, {
20532
20744
  value: transitionBag
20533
- }, render(_extends$g({}, sharedProps, {
20745
+ }, render(_extends$h({}, sharedProps, {
20534
20746
  as: Fragment,
20535
20747
  children: React__default.createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20536
20748
  }), propsBag, Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20657,12 +20869,12 @@ var ActionTypes;
20657
20869
  })(ActionTypes || (ActionTypes = {}));
20658
20870
 
20659
20871
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20660
- return _extends$g({}, state, {
20872
+ return _extends$h({}, state, {
20661
20873
  activeItemIndex: null,
20662
20874
  menuState: MenuStates.Closed
20663
20875
  });
20664
20876
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20665
- return _extends$g({}, state, {
20877
+ return _extends$h({}, state, {
20666
20878
  menuState: MenuStates.Open
20667
20879
  });
20668
20880
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20681,7 +20893,7 @@ var ActionTypes;
20681
20893
  }
20682
20894
  });
20683
20895
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20684
- return _extends$g({}, state, {
20896
+ return _extends$h({}, state, {
20685
20897
  searchQuery: '',
20686
20898
  activeItemIndex: activeItemIndex
20687
20899
  });
@@ -20692,19 +20904,19 @@ var ActionTypes;
20692
20904
 
20693
20905
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20694
20906
  });
20695
- if (match === -1 || match === state.activeItemIndex) return _extends$g({}, state, {
20907
+ if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
20696
20908
  searchQuery: searchQuery
20697
20909
  });
20698
- return _extends$g({}, state, {
20910
+ return _extends$h({}, state, {
20699
20911
  searchQuery: searchQuery,
20700
20912
  activeItemIndex: match
20701
20913
  });
20702
20914
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20703
- return _extends$g({}, state, {
20915
+ return _extends$h({}, state, {
20704
20916
  searchQuery: ''
20705
20917
  });
20706
20918
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20707
- return _extends$g({}, state, {
20919
+ return _extends$h({}, state, {
20708
20920
  items: [].concat(state.items, [{
20709
20921
  id: action.id,
20710
20922
  dataRef: action.dataRef
@@ -20717,7 +20929,7 @@ var ActionTypes;
20717
20929
  return a.id === action.id;
20718
20930
  });
20719
20931
  if (idx !== -1) nextItems.splice(idx, 1);
20720
- return _extends$g({}, state, {
20932
+ return _extends$h({}, state, {
20721
20933
  items: nextItems,
20722
20934
  activeItemIndex: function () {
20723
20935
  if (idx === state.activeItemIndex) return null;
@@ -20756,19 +20968,19 @@ var ActionTypes$1;
20756
20968
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20757
20969
  if (state.disabled) return state;
20758
20970
  if (state.listboxState === ListboxStates.Closed) return state;
20759
- return _extends$g({}, state, {
20971
+ return _extends$h({}, state, {
20760
20972
  activeOptionIndex: null,
20761
20973
  listboxState: ListboxStates.Closed
20762
20974
  });
20763
20975
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20764
20976
  if (state.disabled) return state;
20765
20977
  if (state.listboxState === ListboxStates.Open) return state;
20766
- return _extends$g({}, state, {
20978
+ return _extends$h({}, state, {
20767
20979
  listboxState: ListboxStates.Open
20768
20980
  });
20769
20981
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20770
20982
  if (state.disabled === action.disabled) return state;
20771
- return _extends$g({}, state, {
20983
+ return _extends$h({}, state, {
20772
20984
  disabled: action.disabled
20773
20985
  });
20774
20986
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -20789,7 +21001,7 @@ var ActionTypes$1;
20789
21001
  }
20790
21002
  });
20791
21003
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
20792
- return _extends$g({}, state, {
21004
+ return _extends$h({}, state, {
20793
21005
  searchQuery: '',
20794
21006
  activeOptionIndex: activeOptionIndex
20795
21007
  });
@@ -20802,10 +21014,10 @@ var ActionTypes$1;
20802
21014
 
20803
21015
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
20804
21016
  });
20805
- if (match === -1 || match === state.activeOptionIndex) return _extends$g({}, state, {
21017
+ if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
20806
21018
  searchQuery: searchQuery
20807
21019
  });
20808
- return _extends$g({}, state, {
21020
+ return _extends$h({}, state, {
20809
21021
  searchQuery: searchQuery,
20810
21022
  activeOptionIndex: match
20811
21023
  });
@@ -20813,11 +21025,11 @@ var ActionTypes$1;
20813
21025
  if (state.disabled) return state;
20814
21026
  if (state.listboxState === ListboxStates.Closed) return state;
20815
21027
  if (state.searchQuery === '') return state;
20816
- return _extends$g({}, state, {
21028
+ return _extends$h({}, state, {
20817
21029
  searchQuery: ''
20818
21030
  });
20819
21031
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
20820
- return _extends$g({}, state, {
21032
+ return _extends$h({}, state, {
20821
21033
  options: [].concat(state.options, [{
20822
21034
  id: action.id,
20823
21035
  dataRef: action.dataRef
@@ -20830,7 +21042,7 @@ var ActionTypes$1;
20830
21042
  return a.id === action.id;
20831
21043
  });
20832
21044
  if (idx !== -1) nextOptions.splice(idx, 1);
20833
- return _extends$g({}, state, {
21045
+ return _extends$h({}, state, {
20834
21046
  options: nextOptions,
20835
21047
  activeOptionIndex: function () {
20836
21048
  if (idx === state.activeOptionIndex) return null;
@@ -20891,18 +21103,18 @@ const getPaymentCardIcon = name => {
20891
21103
  }));
20892
21104
  };
20893
21105
 
20894
- var _path$e;
21106
+ var _path$f;
20895
21107
 
20896
- 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); }
21108
+ 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); }
20897
21109
 
20898
21110
  function SvgChevronRight(props) {
20899
- return /*#__PURE__*/React.createElement("svg", _extends$f({
21111
+ return /*#__PURE__*/React.createElement("svg", _extends$g({
20900
21112
  className: "plc-w-6 plc-h-6",
20901
21113
  xmlns: "http://www.w3.org/2000/svg",
20902
21114
  fill: "none",
20903
21115
  viewBox: "0 0 24 24",
20904
21116
  stroke: "currentColor"
20905
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21117
+ }, props), _path$f || (_path$f = /*#__PURE__*/React.createElement("path", {
20906
21118
  strokeLinecap: "round",
20907
21119
  strokeLinejoin: "round",
20908
21120
  strokeWidth: 2,
@@ -21118,18 +21330,18 @@ const SavedItems = ({
21118
21330
  });
21119
21331
  };
21120
21332
 
21121
- var _path$d;
21333
+ var _path$e;
21122
21334
 
21123
- 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); }
21335
+ 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); }
21124
21336
 
21125
21337
  function SvgRefresh(props) {
21126
- return /*#__PURE__*/React.createElement("svg", _extends$e({
21338
+ return /*#__PURE__*/React.createElement("svg", _extends$f({
21127
21339
  className: "plc-w-4 plc-h-4 plc-mr-1",
21128
21340
  xmlns: "http://www.w3.org/2000/svg",
21129
21341
  fill: "none",
21130
21342
  viewBox: "0 0 24 24",
21131
21343
  stroke: "currentColor"
21132
- }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21344
+ }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
21133
21345
  strokeLinecap: "round",
21134
21346
  strokeLinejoin: "round",
21135
21347
  strokeWidth: 2,
@@ -21137,35 +21349,35 @@ function SvgRefresh(props) {
21137
21349
  })));
21138
21350
  }
21139
21351
 
21140
- var _path$c;
21352
+ var _path$d;
21141
21353
 
21142
- 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); }
21354
+ 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); }
21143
21355
 
21144
21356
  function SvgCalendar(props) {
21145
- return /*#__PURE__*/React.createElement("svg", _extends$d({
21357
+ return /*#__PURE__*/React.createElement("svg", _extends$e({
21146
21358
  xmlns: "http://www.w3.org/2000/svg",
21147
21359
  className: "plc-h-4 plc-w-4 plc-mr-1",
21148
21360
  viewBox: "0 0 20 20",
21149
21361
  fill: "currentColor"
21150
- }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21362
+ }, props), _path$d || (_path$d = /*#__PURE__*/React.createElement("path", {
21151
21363
  fillRule: "evenodd",
21152
21364
  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",
21153
21365
  clipRule: "evenodd"
21154
21366
  })));
21155
21367
  }
21156
21368
 
21157
- var _path$b;
21369
+ var _path$c;
21158
21370
 
21159
- 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); }
21371
+ 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); }
21160
21372
 
21161
21373
  function SvgPlus(props) {
21162
- return /*#__PURE__*/React.createElement("svg", _extends$c({
21374
+ return /*#__PURE__*/React.createElement("svg", _extends$d({
21163
21375
  className: "plc-w-5 plc-h-5",
21164
21376
  xmlns: "http://www.w3.org/2000/svg",
21165
21377
  fill: "none",
21166
21378
  viewBox: "0 0 24 24",
21167
21379
  stroke: "currentColor"
21168
- }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21380
+ }, props), _path$c || (_path$c = /*#__PURE__*/React.createElement("path", {
21169
21381
  strokeLinecap: "round",
21170
21382
  strokeLinejoin: "round",
21171
21383
  strokeWidth: 2,
@@ -21173,17 +21385,17 @@ function SvgPlus(props) {
21173
21385
  })));
21174
21386
  }
21175
21387
 
21176
- var _path$a;
21388
+ var _path$b;
21177
21389
 
21178
- 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); }
21390
+ 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); }
21179
21391
 
21180
21392
  function SvgCheckMark(props) {
21181
- return /*#__PURE__*/React.createElement("svg", _extends$b({
21393
+ return /*#__PURE__*/React.createElement("svg", _extends$c({
21182
21394
  className: "plc-w-4 plc-h-4 plc-mr-1",
21183
21395
  xmlns: "http://www.w3.org/2000/svg",
21184
21396
  viewBox: "0 0 20 20",
21185
21397
  fill: "currentColor"
21186
- }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21398
+ }, props), _path$b || (_path$b = /*#__PURE__*/React.createElement("path", {
21187
21399
  fillRule: "evenodd",
21188
21400
  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",
21189
21401
  clipRule: "evenodd"
@@ -21245,12 +21457,20 @@ const SubscriptionsItems = ({
21245
21457
  const {
21246
21458
  t
21247
21459
  } = useTranslation("dashboard");
21460
+ const {
21461
+ switchView,
21462
+ isAuthenticated
21463
+ } = usePelcro();
21248
21464
  const subs = getNonDonationSubs();
21249
21465
  if (subs.length === 0) return null;
21250
21466
  return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21251
21467
  const isActive = activeMenu === sub.id; // Cancel button click handlers
21252
21468
 
21253
21469
  const onCancelClick = () => {
21470
+ if (userMustVerifyEmail()) {
21471
+ return switchView("email-verify");
21472
+ }
21473
+
21254
21474
  onClose === null || onClose === void 0 ? void 0 : onClose();
21255
21475
  notify.confirm((onSuccess, onFailure) => {
21256
21476
  cancelSubscription(sub.id, onSuccess, onFailure);
@@ -21266,6 +21486,10 @@ const SubscriptionsItems = ({
21266
21486
 
21267
21487
 
21268
21488
  const onReactivateClick = () => {
21489
+ if (userMustVerifyEmail()) {
21490
+ return switchView("email-verify");
21491
+ }
21492
+
21269
21493
  reactivateSubscription(sub.id);
21270
21494
  }; // Renew click
21271
21495
 
@@ -21466,18 +21690,18 @@ Accordion.item = function AccordionItem({
21466
21690
  }, content)) : null;
21467
21691
  };
21468
21692
 
21469
- var _path$9;
21693
+ var _path$a;
21470
21694
 
21471
- 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); }
21695
+ 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); }
21472
21696
 
21473
21697
  function SvgExit(props) {
21474
- return /*#__PURE__*/React.createElement("svg", _extends$a({
21698
+ return /*#__PURE__*/React.createElement("svg", _extends$b({
21475
21699
  className: "plc-w-6 plc-h-6",
21476
21700
  xmlns: "http://www.w3.org/2000/svg",
21477
21701
  fill: "none",
21478
21702
  viewBox: "0 0 24 24",
21479
21703
  stroke: "currentColor"
21480
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
21704
+ }, props), _path$a || (_path$a = /*#__PURE__*/React.createElement("path", {
21481
21705
  strokeLinecap: "round",
21482
21706
  strokeLinejoin: "round",
21483
21707
  strokeWidth: 2,
@@ -21485,17 +21709,17 @@ function SvgExit(props) {
21485
21709
  })));
21486
21710
  }
21487
21711
 
21488
- var _path$8;
21712
+ var _path$9;
21489
21713
 
21490
- 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); }
21714
+ 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); }
21491
21715
 
21492
21716
  function SvgUser(props) {
21493
- return /*#__PURE__*/React.createElement("svg", _extends$9({
21717
+ return /*#__PURE__*/React.createElement("svg", _extends$a({
21494
21718
  xmlns: "http://www.w3.org/2000/svg",
21495
21719
  fill: "none",
21496
21720
  viewBox: "0 0 24 24",
21497
21721
  stroke: "currentColor"
21498
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
21722
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React.createElement("path", {
21499
21723
  strokeLinecap: "round",
21500
21724
  strokeLinejoin: "round",
21501
21725
  strokeWidth: 2,
@@ -21503,18 +21727,18 @@ function SvgUser(props) {
21503
21727
  })));
21504
21728
  }
21505
21729
 
21506
- var _path$7;
21730
+ var _path$8;
21507
21731
 
21508
- 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); }
21732
+ 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); }
21509
21733
 
21510
21734
  function SvgNewsletter(props) {
21511
- return /*#__PURE__*/React.createElement("svg", _extends$8({
21735
+ return /*#__PURE__*/React.createElement("svg", _extends$9({
21512
21736
  xmlns: "http://www.w3.org/2000/svg",
21513
21737
  className: "plc-h-5 plc-w-5",
21514
21738
  fill: "none",
21515
21739
  viewBox: "0 0 24 24",
21516
21740
  stroke: "currentColor"
21517
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
21741
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
21518
21742
  strokeLinecap: "round",
21519
21743
  strokeLinejoin: "round",
21520
21744
  strokeWidth: 2,
@@ -21522,18 +21746,18 @@ function SvgNewsletter(props) {
21522
21746
  })));
21523
21747
  }
21524
21748
 
21525
- var _path$6;
21749
+ var _path$7;
21526
21750
 
21527
- 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); }
21751
+ 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); }
21528
21752
 
21529
21753
  function SvgPaymentCard(props) {
21530
- return /*#__PURE__*/React.createElement("svg", _extends$7({
21754
+ return /*#__PURE__*/React.createElement("svg", _extends$8({
21531
21755
  className: "plc-w-6 plc-h-6 plc-mr-2",
21532
21756
  xmlns: "http://www.w3.org/2000/svg",
21533
21757
  fill: "none",
21534
21758
  viewBox: "0 0 24 24",
21535
21759
  stroke: "currentColor"
21536
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
21760
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
21537
21761
  strokeLinecap: "round",
21538
21762
  strokeLinejoin: "round",
21539
21763
  strokeWidth: 2,
@@ -21541,23 +21765,23 @@ function SvgPaymentCard(props) {
21541
21765
  })));
21542
21766
  }
21543
21767
 
21544
- var _path$5, _path2;
21768
+ var _path$6, _path2$1;
21545
21769
 
21546
- 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); }
21770
+ 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); }
21547
21771
 
21548
21772
  function SvgLocationPin(props) {
21549
- return /*#__PURE__*/React.createElement("svg", _extends$6({
21773
+ return /*#__PURE__*/React.createElement("svg", _extends$7({
21550
21774
  className: "plc-w-6 plc-h-6 plc-mr-2",
21551
21775
  xmlns: "http://www.w3.org/2000/svg",
21552
21776
  fill: "none",
21553
21777
  viewBox: "0 0 24 24",
21554
21778
  stroke: "currentColor"
21555
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
21779
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
21556
21780
  strokeLinecap: "round",
21557
21781
  strokeLinejoin: "round",
21558
21782
  strokeWidth: 2,
21559
21783
  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"
21560
- })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
21784
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
21561
21785
  strokeLinecap: "round",
21562
21786
  strokeLinejoin: "round",
21563
21787
  strokeWidth: 2,
@@ -21567,10 +21791,10 @@ function SvgLocationPin(props) {
21567
21791
 
21568
21792
  var _switch;
21569
21793
 
21570
- 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); }
21794
+ 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); }
21571
21795
 
21572
21796
  function SvgSubscription(props) {
21573
- return /*#__PURE__*/React.createElement("svg", _extends$5({
21797
+ return /*#__PURE__*/React.createElement("svg", _extends$6({
21574
21798
  xmlns: "http://www.w3.org/2000/svg",
21575
21799
  viewBox: "0 0 100 125",
21576
21800
  fill: "currentColor"
@@ -21585,18 +21809,18 @@ function SvgSubscription(props) {
21585
21809
  }))))));
21586
21810
  }
21587
21811
 
21588
- var _path$4;
21812
+ var _path$5;
21589
21813
 
21590
- 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); }
21814
+ 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); }
21591
21815
 
21592
21816
  function SvgShopping(props) {
21593
- return /*#__PURE__*/React.createElement("svg", _extends$4({
21817
+ return /*#__PURE__*/React.createElement("svg", _extends$5({
21594
21818
  className: "plc-w-6 plc-h-6 plc-mr-2",
21595
21819
  xmlns: "http://www.w3.org/2000/svg",
21596
21820
  fill: "none",
21597
21821
  viewBox: "0 0 24 24",
21598
21822
  stroke: "currentColor"
21599
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
21823
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
21600
21824
  strokeLinecap: "round",
21601
21825
  strokeLinejoin: "round",
21602
21826
  strokeWidth: 2,
@@ -21604,18 +21828,18 @@ function SvgShopping(props) {
21604
21828
  })));
21605
21829
  }
21606
21830
 
21607
- var _path$3;
21831
+ var _path$4;
21608
21832
 
21609
- 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); }
21833
+ 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); }
21610
21834
 
21611
21835
  function SvgBookmark(props) {
21612
- return /*#__PURE__*/React.createElement("svg", _extends$3({
21836
+ return /*#__PURE__*/React.createElement("svg", _extends$4({
21613
21837
  className: "plc-w-6 plc-h-6 plc-mr-2",
21614
21838
  xmlns: "http://www.w3.org/2000/svg",
21615
21839
  fill: "none",
21616
21840
  viewBox: "0 0 24 24",
21617
21841
  stroke: "currentColor"
21618
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
21842
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
21619
21843
  strokeLinecap: "round",
21620
21844
  strokeLinejoin: "round",
21621
21845
  strokeWidth: 2,
@@ -21623,33 +21847,33 @@ function SvgBookmark(props) {
21623
21847
  })));
21624
21848
  }
21625
21849
 
21626
- var _path$2;
21850
+ var _path$3;
21627
21851
 
21628
- 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); }
21852
+ 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); }
21629
21853
 
21630
21854
  function SvgKey(props) {
21631
- return /*#__PURE__*/React.createElement("svg", _extends$2({
21855
+ return /*#__PURE__*/React.createElement("svg", _extends$3({
21632
21856
  xmlns: "http://www.w3.org/2000/svg",
21633
21857
  viewBox: "0 0 20 20",
21634
21858
  fill: "currentColor"
21635
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
21859
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
21636
21860
  fillRule: "evenodd",
21637
21861
  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",
21638
21862
  clipRule: "evenodd"
21639
21863
  })));
21640
21864
  }
21641
21865
 
21642
- var _path$1;
21866
+ var _path$2;
21643
21867
 
21644
- 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); }
21868
+ 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); }
21645
21869
 
21646
21870
  function SvgDonate(props) {
21647
- return /*#__PURE__*/React.createElement("svg", _extends$1({
21871
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
21648
21872
  width: 24,
21649
21873
  height: 24,
21650
21874
  fill: "currentColor",
21651
21875
  xmlns: "http://www.w3.org/2000/svg"
21652
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
21876
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
21653
21877
  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"
21654
21878
  })));
21655
21879
  }
@@ -22295,7 +22519,7 @@ const DashboardOpenButton = () => {
22295
22519
  };
22296
22520
  DashboardOpenButton.viewId = "dashboard-open";
22297
22521
 
22298
- const initialState = {
22522
+ const initialState$1 = {
22299
22523
  imageSrc: null,
22300
22524
  crop: {
22301
22525
  x: 0,
@@ -22309,10 +22533,10 @@ const initialState = {
22309
22533
  content: ""
22310
22534
  }
22311
22535
  };
22312
- const store = /*#__PURE__*/createContext(initialState);
22536
+ const store$1 = /*#__PURE__*/createContext(initialState$1);
22313
22537
  const {
22314
- Provider
22315
- } = store;
22538
+ Provider: Provider$1
22539
+ } = store$1;
22316
22540
 
22317
22541
  const ProfilePicChangeContainer = ({
22318
22542
  style,
@@ -22446,21 +22670,21 @@ const ProfilePicChangeContainer = ({
22446
22670
  default:
22447
22671
  return state;
22448
22672
  }
22449
- }, initialState);
22673
+ }, initialState$1);
22450
22674
  return /*#__PURE__*/React__default.createElement("div", {
22451
22675
  style: { ...style
22452
22676
  },
22453
22677
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22454
- }, /*#__PURE__*/React__default.createElement(Provider, {
22678
+ }, /*#__PURE__*/React__default.createElement(Provider$1, {
22455
22679
  value: {
22456
22680
  state,
22457
22681
  dispatch
22458
22682
  }
22459
22683
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
22460
- store,
22684
+ store: store$1,
22461
22685
  key: i
22462
22686
  })) : /*#__PURE__*/React__default.cloneElement(children, {
22463
- store
22687
+ store: store$1
22464
22688
  })));
22465
22689
  };
22466
22690
  /**
@@ -22522,7 +22746,7 @@ const ProfilePicChangeButton = ({
22522
22746
  isSubmitting
22523
22747
  },
22524
22748
  dispatch
22525
- } = useContext(store);
22749
+ } = useContext(store$1);
22526
22750
  const {
22527
22751
  t
22528
22752
  } = useTranslation("userEdit");
@@ -23890,7 +24114,7 @@ const ProfilePicChangeCropper = ({
23890
24114
  zoom
23891
24115
  },
23892
24116
  dispatch
23893
- } = useContext(store);
24117
+ } = useContext(store$1);
23894
24118
  return /*#__PURE__*/React__default.createElement("div", {
23895
24119
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
23896
24120
  }, /*#__PURE__*/React__default.createElement(Cropper, Object.assign({
@@ -23932,7 +24156,7 @@ const ProfilePicChangeZoom = ({
23932
24156
  zoom
23933
24157
  },
23934
24158
  dispatch
23935
- } = useContext(store);
24159
+ } = useContext(store$1);
23936
24160
  const {
23937
24161
  t
23938
24162
  } = useTranslation("userEdit");
@@ -23955,18 +24179,18 @@ const ProfilePicChangeZoom = ({
23955
24179
  }, otherProps)));
23956
24180
  };
23957
24181
 
23958
- var _path;
24182
+ var _path$1;
23959
24183
 
23960
- 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); }
24184
+ 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); }
23961
24185
 
23962
24186
  function SvgPhotograph(props) {
23963
- return /*#__PURE__*/React.createElement("svg", _extends({
24187
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
23964
24188
  xmlns: "http://www.w3.org/2000/svg",
23965
24189
  className: "plc-h-6 plc-w-6",
23966
24190
  fill: "none",
23967
24191
  viewBox: "0 0 24 24",
23968
24192
  stroke: "currentColor"
23969
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
24193
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
23970
24194
  strokeLinecap: "round",
23971
24195
  strokeLinejoin: "round",
23972
24196
  strokeWidth: 2,
@@ -23984,7 +24208,7 @@ const ProfilePicChangeSelectButton = ({
23984
24208
  state: {
23985
24209
  isSubmitting
23986
24210
  }
23987
- } = useContext(store);
24211
+ } = useContext(store$1);
23988
24212
  const {
23989
24213
  t
23990
24214
  } = useTranslation("userEdit");
@@ -24026,7 +24250,7 @@ const ProfilePicChangeRemoveButton = ({
24026
24250
  state: {
24027
24251
  isSubmitting
24028
24252
  }
24029
- } = useContext(store);
24253
+ } = useContext(store$1);
24030
24254
  const {
24031
24255
  t
24032
24256
  } = useTranslation("userEdit");
@@ -24049,7 +24273,7 @@ const ProfilePicChangeWrapper = () => {
24049
24273
  state: {
24050
24274
  imageSrc
24051
24275
  }
24052
- } = useContext(store);
24276
+ } = useContext(store$1);
24053
24277
  const {
24054
24278
  t
24055
24279
  } = useTranslation("userEdit");
@@ -24111,4 +24335,180 @@ function ProfilePicChangeModal({
24111
24335
  }
24112
24336
  ProfilePicChangeModal.viewId = "profile-picture";
24113
24337
 
24114
- export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, notify, unauthenticatedButtons, usePelcro };
24338
+ const initialState = {
24339
+ isSubmitting: false,
24340
+ alert: {
24341
+ type: "error",
24342
+ content: ""
24343
+ }
24344
+ };
24345
+ const store = /*#__PURE__*/createContext(initialState);
24346
+ const {
24347
+ Provider
24348
+ } = store;
24349
+
24350
+ const EmailVerifyContainer = ({
24351
+ style,
24352
+ className = "",
24353
+ onSuccess = () => {},
24354
+ onFailure = () => {},
24355
+ children,
24356
+ ...props
24357
+ }) => {
24358
+ const {
24359
+ t
24360
+ } = useTranslation("verifyEmail");
24361
+
24362
+ const submit = () => {
24363
+ window.Pelcro.user.resendEmailVerification((err, res) => {
24364
+ dispatch({
24365
+ type: LOADING,
24366
+ payload: false
24367
+ });
24368
+
24369
+ if (err) {
24370
+ dispatch({
24371
+ type: SHOW_ALERT,
24372
+ payload: {
24373
+ type: "error",
24374
+ content: getErrorMessages(err)
24375
+ }
24376
+ });
24377
+ return onFailure(err);
24378
+ }
24379
+
24380
+ dispatch({
24381
+ type: SHOW_ALERT,
24382
+ payload: {
24383
+ type: "success",
24384
+ content: t("messages.resent")
24385
+ }
24386
+ });
24387
+ return onSuccess(res);
24388
+ });
24389
+ };
24390
+
24391
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
24392
+ switch (action.type) {
24393
+ case SHOW_ALERT:
24394
+ return lib_7({ ...state,
24395
+ alert: action.payload
24396
+ });
24397
+
24398
+ case LOADING:
24399
+ return lib_7({ ...state,
24400
+ isSubmitting: action.payload
24401
+ });
24402
+
24403
+ case HANDLE_SUBMIT:
24404
+ return lib_5({ ...state,
24405
+ isSubmitting: true
24406
+ }, (state, dispatch) => submit());
24407
+
24408
+ default:
24409
+ return state;
24410
+ }
24411
+ }, initialState);
24412
+ return /*#__PURE__*/React__default.createElement("div", {
24413
+ style: { ...style
24414
+ },
24415
+ className: `pelcro-container pelcro-email-verify-container ${className}`
24416
+ }, /*#__PURE__*/React__default.createElement(Provider, {
24417
+ value: {
24418
+ state,
24419
+ dispatch
24420
+ }
24421
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
24422
+ store,
24423
+ key: i
24424
+ })) : /*#__PURE__*/React__default.cloneElement(children, {
24425
+ store
24426
+ })));
24427
+ };
24428
+
24429
+ const EmailVerifyResendButton = ({
24430
+ name,
24431
+ onClick,
24432
+ ...otherProps
24433
+ }) => {
24434
+ const {
24435
+ dispatch,
24436
+ state: {
24437
+ isSubmitting
24438
+ }
24439
+ } = useContext(store);
24440
+ const {
24441
+ t
24442
+ } = useTranslation("verifyEmail");
24443
+ return /*#__PURE__*/React__default.createElement(Button, Object.assign({
24444
+ onClick: () => {
24445
+ dispatch({
24446
+ type: HANDLE_SUBMIT
24447
+ });
24448
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24449
+ },
24450
+ isLoading: isSubmitting
24451
+ }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
24452
+ };
24453
+
24454
+ var _path, _path2;
24455
+
24456
+ 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); }
24457
+
24458
+ function SvgEmailVerify(props) {
24459
+ return /*#__PURE__*/React.createElement("svg", _extends({
24460
+ className: "plc-w-6 plc-h-6",
24461
+ viewBox: "0 0 700 700",
24462
+ xmlns: "http://www.w3.org/2000/svg"
24463
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
24464
+ 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"
24465
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
24466
+ 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"
24467
+ })));
24468
+ }
24469
+
24470
+ const EmailVerifyView = props => {
24471
+ var _window$Pelcro$user$r;
24472
+
24473
+ const {
24474
+ t
24475
+ } = useTranslation("verifyEmail");
24476
+ return /*#__PURE__*/React__default.createElement("div", {
24477
+ id: "pelcro-email-verify-view"
24478
+ }, /*#__PURE__*/React__default.createElement("div", {
24479
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24480
+ }, /*#__PURE__*/React__default.createElement("h4", {
24481
+ className: "plc-text-2xl plc-font-semibold"
24482
+ }, t("labels.title"))), /*#__PURE__*/React__default.createElement("form", {
24483
+ action: "javascript:void(0);",
24484
+ className: "plc-mt-2 pelcro-form"
24485
+ }, /*#__PURE__*/React__default.createElement(EmailVerifyContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement("div", {
24486
+ className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
24487
+ }, /*#__PURE__*/React__default.createElement(SvgEmailVerify, {
24488
+ className: "plc-w-32 plc-h-32"
24489
+ }), /*#__PURE__*/React__default.createElement("p", {
24490
+ className: "plc-mb-1 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
24491
+ }, t("labels.instructions"), " ", /*#__PURE__*/React__default.createElement("span", {
24492
+ className: "plc-font-bold"
24493
+ }, (_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.createElement(EmailVerifyResendButton, {
24494
+ role: "submit",
24495
+ className: "plc-mt-4 plc-w-full",
24496
+ name: t("labels.resend"),
24497
+ id: "pelcro-submit"
24498
+ }))));
24499
+ };
24500
+
24501
+ const EmailVerifyModal = ({
24502
+ onDisplay,
24503
+ onClose,
24504
+ ...otherProps
24505
+ }) => {
24506
+ return /*#__PURE__*/React__default.createElement(Modal, {
24507
+ onDisplay: onDisplay,
24508
+ onClose: onClose,
24509
+ id: "pelcro-email-verify-modal"
24510
+ }, /*#__PURE__*/React__default.createElement(ModalBody, null, /*#__PURE__*/React__default.createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default.createElement(ModalFooter, null, /*#__PURE__*/React__default.createElement(Authorship, null)));
24511
+ };
24512
+ EmailVerifyModal.viewId = "email-verify";
24513
+
24514
+ export { AddressCreateCity, AddressCreateContainer, AddressCreateCountrySelect, AddressCreateFirstName, AddressCreateLastName, AddressCreateLine1, AddressCreateLine2, AddressCreateModal, AddressCreatePostalCode, AddressCreateStateSelect, AddressCreateSubmit, AddressCreateTextInput, AddressCreateView, AddressSelectContainer, AddressSelectList, AddressSelectModal, AddressSelectSubmit, AddressSelectView, AddressUpdateCity, AddressUpdateContainer, AddressUpdateCountrySelect, AddressUpdateFirstName, AddressUpdateLastName, AddressUpdateLine1, AddressUpdateLine2, AddressUpdateModal, AddressUpdatePostalCode, AddressUpdateStateSelect, AddressUpdateSubmit, AddressUpdateTextInput, AddressUpdateView, AlertWithContext as Alert, Alert as AlertElement, ApplyCouponButton, Auth0LoginButton, Badge, BankRedirection, Button, CartContainer, CartModal, CartRemoveItemButton, CartSubmit, CartTotalPrice, CartView, Checkbox, CheckoutForm, ConfirmPassword, CouponCode, CouponCodeField, DashboardWithHook as Dashboard, DashboardOpenButton, DatePicker, DiscountedPrice, Email, EmailVerifyContainer, EmailVerifyModal, EmailVerifyResendButton, EmailVerifyView, FacebookLoginButton, GiftCreateContainer, GiftCreateEmail, GiftCreateFirstName, GiftCreateLastName, GiftCreateMessage, GiftCreateModal, GiftCreateStartDate, GiftCreateSubmitButton, GiftCreateView, GiftRedeemCode, GiftRedeemContainer, GiftRedeemModal, GiftRedeemSubmitButton, GiftRedeemView, GoogleLoginButton, Input, Link, LoginButton, LoginContainer, LoginEmail, LoginModal, LoginPassword, LoginView, Logout, MeterModal, MeterView, Modal, ModalBody, ModalFooter, NewsletterWithHook as NewsLetter, NewsletterUpdateButton, NewsletterUpdateContainer, NewsletterUpdateList, NewsletterUpdateModal, NewsletterUpdateView, Notification, OrderConfirmModal, OrderCreateContainer, OrderCreateModal, OrderCreateSubmitButton, OrderCreateView, Password, PasswordChangeButton, PasswordChangeConfirmNewPassword, PasswordChangeContainer, PasswordChangeCurrentPassword, PasswordChangeModal, PasswordChangeNewPassword, PasswordChangeView, PasswordForgotButton, PasswordForgotContainer, PasswordForgotEmail, PasswordForgotModal, PasswordForgotView, PasswordResetButton, PasswordResetConfirmPassword, PasswordResetContainer, PasswordResetEmail, PasswordResetModal, PasswordResetPassword, PasswordResetView, PaymentCreateContainer, PaymentCreateView, PaymentMethodContainer, PaymentMethodSelectContainer, PaymentMethodSelectList, PaymentMethodSelectModal, PaymentMethodSelectSubmit, PaymentMethodSelectView, PaymentMethodUpdateContainer, PaymentMethodUpdateModal, PaymentMethodUpdateView, PaymentMethodView, PaymentSuccessModal, PaymentSuccessView, PaypalSubscribeButton, PelcroCardCVC, PelcroCardExpiry, PelcroCardNumber, PelcroModalController, PelcroPaymentRequestButton, ProfilePicChangeButton, ProfilePicChangeContainer, ProfilePicChangeCropper, ProfilePicChangeModal, ProfilePicChangeRemoveButton, ProfilePicChangeSelectButton, ProfilePicChangeView, ProfilePicChangeZoom, Radio, RegisterButton, RegisterCompany, RegisterContainer, RegisterEmail, RegisterFirstName, RegisterJobTitle, RegisterLastName, RegisterModal, RegisterPassword, RegisterView, Select, SelectModalWithHook as SelectModal, SelectedPaymentMethod, ShopPurchaseButton, ShopSelectProductButton, ShopView, SubmitPaymentMethod, SubscriptionCreateContainer, SubscriptionCreateModal, SubscriptionCreateView, SubscriptionRenewContainer, SubscriptionRenewModal, SubscriptionRenewView, TaxAmount, TextArea, Tooltip, UserUpdateButton, UserUpdateContainer, UserUpdateDisplayName, UserUpdateEmail, UserUpdateFirstName, UserUpdateLastName, UserUpdateModal, UserUpdatePhone, UserUpdateProfilePic, UserUpdateTextInput, UserUpdateView, authenticatedButtons, i18next as i18n, init$1 as initButtons, init as initContentEntitlement, notify, unauthenticatedButtons, usePelcro };