@pelcro/react-pelcro-js 2.7.0-beta.1 → 2.7.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -3464,7 +3464,7 @@ var paymentMethod_fr = {
3464
3464
  var title$d = "Enter your email to subscribe to our newsletter";
3465
3465
  var updateTitle$1 = "Update newsletter selections";
3466
3466
  var subtitle$7 = "We may use your email for other marketing communication";
3467
- var labels$l = {
3467
+ var labels$n = {
3468
3468
  submit: "Submit",
3469
3469
  firstName: "First name",
3470
3470
  lastName: "Last name",
@@ -3472,7 +3472,7 @@ var labels$l = {
3472
3472
  postalCode: "Postal code",
3473
3473
  required: "required"
3474
3474
  };
3475
- var messages$p = {
3475
+ var messages$r = {
3476
3476
  alreadyHaveAccount: "Already have an account?",
3477
3477
  success: "Newsletters were successfully updated",
3478
3478
  loginHere: "Login here.",
@@ -3483,14 +3483,14 @@ var newsletter_en = {
3483
3483
  title: title$d,
3484
3484
  updateTitle: updateTitle$1,
3485
3485
  subtitle: subtitle$7,
3486
- labels: labels$l,
3487
- messages: messages$p
3486
+ labels: labels$n,
3487
+ messages: messages$r
3488
3488
  };
3489
3489
 
3490
3490
  var title$c = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
3491
3491
  var updateTitle = "Mettre à jour son choix d'infolettres";
3492
3492
  var subtitle$6 = "Nous pouvons utiliser votre adresse courriel pour d’autres communications marketing";
3493
- var labels$k = {
3493
+ var labels$m = {
3494
3494
  submit: "Lire l’article !",
3495
3495
  firstName: "Prénom",
3496
3496
  lastName: "Nom de famille",
@@ -3498,7 +3498,7 @@ var labels$k = {
3498
3498
  postalCode: "Code postal",
3499
3499
  required: "Champs obligatoires"
3500
3500
  };
3501
- var messages$o = {
3501
+ var messages$q = {
3502
3502
  alreadyHaveAccount: "Vous avez déjà un compte ?",
3503
3503
  success: "Votre choix d'infolettres à été mis à jour",
3504
3504
  loginHere: "Connectez-vous ici",
@@ -3509,14 +3509,14 @@ var newsletter_fr = {
3509
3509
  title: title$c,
3510
3510
  updateTitle: updateTitle,
3511
3511
  subtitle: subtitle$6,
3512
- labels: labels$k,
3513
- messages: messages$o
3512
+ labels: labels$m,
3513
+ messages: messages$q
3514
3514
  };
3515
3515
 
3516
- var labels$j = {
3516
+ var labels$l = {
3517
3517
  "continue": "Continue to content"
3518
3518
  };
3519
- var messages$n = {
3519
+ var messages$p = {
3520
3520
  yourFreeTrial: "Subscription successful!",
3521
3521
  youHaveAccess: "Hope you enjoy the subscription. Please contact us if you have any questions or concerns.",
3522
3522
  clickToLearn: {
@@ -3538,15 +3538,15 @@ var errors$9 = {
3538
3538
  "": ""
3539
3539
  };
3540
3540
  var success_en = {
3541
- labels: labels$j,
3542
- messages: messages$n,
3541
+ labels: labels$l,
3542
+ messages: messages$p,
3543
3543
  errors: errors$9
3544
3544
  };
3545
3545
 
3546
- var labels$i = {
3546
+ var labels$k = {
3547
3547
  "continue": "Abonnement réussi !"
3548
3548
  };
3549
- var messages$m = {
3549
+ var messages$o = {
3550
3550
  yourFreeTrial: "Votre essai gratuit vient de débuter",
3551
3551
  youHaveAccess: "Nous espérons que vous allez apprécier votre abonnement. Veuillez nous contacter si vous avez des questions ou des préoccupations.",
3552
3552
  clickToLearn: {
@@ -3568,12 +3568,12 @@ var errors$8 = {
3568
3568
  "": ""
3569
3569
  };
3570
3570
  var success_fr = {
3571
- labels: labels$i,
3572
- messages: messages$m,
3571
+ labels: labels$k,
3572
+ messages: messages$o,
3573
3573
  errors: errors$8
3574
3574
  };
3575
3575
 
3576
- var messages$l = {
3576
+ var messages$n = {
3577
3577
  freeVisits: "Free visits left:",
3578
3578
  subscribeNow: "Subscribe",
3579
3579
  alreadyHaveAccount: "Already have an account?",
@@ -3583,11 +3583,11 @@ var errors$7 = {
3583
3583
  "": ""
3584
3584
  };
3585
3585
  var meter_en = {
3586
- messages: messages$l,
3586
+ messages: messages$n,
3587
3587
  errors: errors$7
3588
3588
  };
3589
3589
 
3590
- var messages$k = {
3590
+ var messages$m = {
3591
3591
  freeVisits: "Visites gratuites restantes:",
3592
3592
  subscribeNow: "Abonnez-vous maintenant !",
3593
3593
  alreadyHaveAccount: "Vous avez déjà un compte ?",
@@ -3597,15 +3597,15 @@ var errors$6 = {
3597
3597
  "": ""
3598
3598
  };
3599
3599
  var meter_fr = {
3600
- messages: messages$k,
3600
+ messages: messages$m,
3601
3601
  errors: errors$6
3602
3602
  };
3603
3603
 
3604
- var messages$j = {
3604
+ var messages$l = {
3605
3605
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
3606
3606
  bankRedirection: "Please hold, redirecting you to your bank."
3607
3607
  };
3608
- var labels$h = {
3608
+ var labels$j = {
3609
3609
  card: "Enter card number",
3610
3610
  date: "Expiration date",
3611
3611
  CVC: "CVC",
@@ -3620,18 +3620,19 @@ var labels$h = {
3620
3620
  "for": "for",
3621
3621
  interval: "{{count}} {{interval}}",
3622
3622
  interval_plural: "{{count}} {{interval}}s",
3623
- tax: "+ Tax"
3623
+ tax: "+ Tax",
3624
+ removeCoupon: "REMOVE"
3624
3625
  };
3625
3626
  var checkoutForm_en = {
3626
- messages: messages$j,
3627
- labels: labels$h
3627
+ messages: messages$l,
3628
+ labels: labels$j
3628
3629
  };
3629
3630
 
3630
- var messages$i = {
3631
+ var messages$k = {
3631
3632
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
3632
3633
  bankRedirection: "Veuillez patienter, nous vous redirigeons vers votre banque."
3633
3634
  };
3634
- var labels$g = {
3635
+ var labels$i = {
3635
3636
  card: "Entrez le numéro de carte",
3636
3637
  date: "Date d’expiration",
3637
3638
  CVC: "CVC",
@@ -3646,11 +3647,12 @@ var labels$g = {
3646
3647
  "for": "pour",
3647
3648
  interval: "{{count}} {{interval}}",
3648
3649
  interval_plural: "{{count}} {{interval}}s",
3649
- tax: "+ Taxe"
3650
+ tax: "+ Taxe",
3651
+ removeCoupon: "RETIRER"
3650
3652
  };
3651
3653
  var checkoutForm_fr = {
3652
- messages: messages$i,
3653
- labels: labels$g
3654
+ messages: messages$k,
3655
+ labels: labels$i
3654
3656
  };
3655
3657
 
3656
3658
  var youAreSafe$1 = "You're safe - PCI compliant 128 SSL by";
@@ -3683,7 +3685,7 @@ var messages_fr = {
3683
3685
  recaptcha: recaptcha
3684
3686
  };
3685
3687
 
3686
- var labels$f = {
3688
+ var labels$h = {
3687
3689
  email: "Enter email",
3688
3690
  password: "Enter password",
3689
3691
  required: "required",
@@ -3691,7 +3693,7 @@ var labels$f = {
3691
3693
  passwordPlaceholder: "Password",
3692
3694
  login: "Login"
3693
3695
  };
3694
- var messages$h = {
3696
+ var messages$j = {
3695
3697
  loginTo: "Login to your account",
3696
3698
  welcome: "Welcome back, sign in with your existing account.",
3697
3699
  dontHaveAccount: "Don't have an account yet?",
@@ -3710,12 +3712,12 @@ var errors$5 = {
3710
3712
  "": ""
3711
3713
  };
3712
3714
  var login_en = {
3713
- labels: labels$f,
3714
- messages: messages$h,
3715
+ labels: labels$h,
3716
+ messages: messages$j,
3715
3717
  errors: errors$5
3716
3718
  };
3717
3719
 
3718
- var labels$e = {
3720
+ var labels$g = {
3719
3721
  email: "Entrez votre adresse courriel",
3720
3722
  password: "Entrez votre mot de passe",
3721
3723
  required: "Champs obligatoires",
@@ -3723,7 +3725,7 @@ var labels$e = {
3723
3725
  passwordPlaceholder: "Mot de passe",
3724
3726
  login: "Connexion"
3725
3727
  };
3726
- var messages$g = {
3728
+ var messages$i = {
3727
3729
  loginTo: "Connectez-vous à votre compte",
3728
3730
  welcome: "Bienvenue, connectez-vous avec votre compte existant.",
3729
3731
  dontHaveAccount: "Vous n’avez pas encore de compte ?",
@@ -3742,14 +3744,14 @@ var errors$4 = {
3742
3744
  "": ""
3743
3745
  };
3744
3746
  var login_fr = {
3745
- labels: labels$e,
3746
- messages: messages$g,
3747
+ labels: labels$g,
3748
+ messages: messages$i,
3747
3749
  errors: errors$4
3748
3750
  };
3749
3751
 
3750
3752
  var title$b = "Create an account";
3751
3753
  var subtitle$5 = "Enter your email and password below";
3752
- var labels$d = {
3754
+ var labels$f = {
3753
3755
  signUpFacebook: "Sign up with Facebook",
3754
3756
  signUpGoogle: "Sign up with Google",
3755
3757
  signUpEmail: "Sign up with Email",
@@ -3761,7 +3763,7 @@ var labels$d = {
3761
3763
  firstName: "First name",
3762
3764
  lastName: "Last name"
3763
3765
  };
3764
- var messages$f = {
3766
+ var messages$h = {
3765
3767
  alreadyHaveAccount: "Already have an account?",
3766
3768
  createAccount: "Create account",
3767
3769
  loginHere: "login here. ",
@@ -3794,7 +3796,7 @@ var gift$1 = {
3794
3796
  lastName: "Last name",
3795
3797
  email: "Email",
3796
3798
  startDate: "Gift date",
3797
- giftMessage: "Gift message (500 characters max)",
3799
+ giftMessage: "Gift message (200 characters max)",
3798
3800
  required: "required",
3799
3801
  firstNamePlaceholder: "First name",
3800
3802
  lastNamePlaceholder: "Last name",
@@ -3835,8 +3837,8 @@ var redeem$1 = {
3835
3837
  var register_en = {
3836
3838
  title: title$b,
3837
3839
  subtitle: subtitle$5,
3838
- labels: labels$d,
3839
- messages: messages$f,
3840
+ labels: labels$f,
3841
+ messages: messages$h,
3840
3842
  errors: errors$3,
3841
3843
  gift: gift$1,
3842
3844
  redeem: redeem$1
@@ -3844,7 +3846,7 @@ var register_en = {
3844
3846
 
3845
3847
  var title$a = "Créer un compte";
3846
3848
  var subtitle$4 = "Entrez votre courriel et votre mot de passe ci-dessous";
3847
- var labels$c = {
3849
+ var labels$e = {
3848
3850
  signUpFacebook: "Inscrivez-vous avec Facebook",
3849
3851
  signUpGoogle: "Inscrivez-vous avec Google",
3850
3852
  signUpEmail: "Inscrivez-vous avec votre courriel",
@@ -3856,7 +3858,7 @@ var labels$c = {
3856
3858
  firstName: "Prénom",
3857
3859
  lastName: "Nom de famille"
3858
3860
  };
3859
- var messages$e = {
3861
+ var messages$g = {
3860
3862
  alreadyHaveAccount: "Vous avez déjà un compte?",
3861
3863
  createAccount: "Créer un compte",
3862
3864
  loginHere: "Connectez-vous ici",
@@ -3890,7 +3892,7 @@ var gift = {
3890
3892
  lastName: "Nom de famille",
3891
3893
  email: "Adresse courriel",
3892
3894
  startDate: "Date de début",
3893
- giftMessage: "Message du cadeau (500 caractères max)",
3895
+ giftMessage: "Message du cadeau (200 caractères max)",
3894
3896
  required: "Champs obligatoires",
3895
3897
  firstNamePlaceholder: "Prénom",
3896
3898
  lastNamePlaceholder: "Nom de famille",
@@ -3931,14 +3933,14 @@ var redeem = {
3931
3933
  var register_fr = {
3932
3934
  title: title$a,
3933
3935
  subtitle: subtitle$4,
3934
- labels: labels$c,
3935
- messages: messages$e,
3936
+ labels: labels$e,
3937
+ messages: messages$g,
3936
3938
  errors: errors$2,
3937
3939
  gift: gift,
3938
3940
  redeem: redeem
3939
3941
  };
3940
3942
 
3941
- var labels$b = {
3943
+ var labels$d = {
3942
3944
  title: "Want to update your profile?",
3943
3945
  subtitle: "Enter your information below to update your profile",
3944
3946
  email: "Email",
@@ -3954,17 +3956,17 @@ var labels$b = {
3954
3956
  removeImage: "Remove current photo",
3955
3957
  zoom: "Zoom"
3956
3958
  };
3957
- var messages$d = {
3959
+ var messages$f = {
3958
3960
  userUpdated: "Thanks! Your profile was updated successfully.",
3959
3961
  pictureRemoved: "Your profile picture was removed successfully.",
3960
3962
  pictureUpdated: "Your profile picture was updated successfully."
3961
3963
  };
3962
3964
  var userEdit_en = {
3963
- labels: labels$b,
3964
- messages: messages$d
3965
+ labels: labels$d,
3966
+ messages: messages$f
3965
3967
  };
3966
3968
 
3967
- var labels$a = {
3969
+ var labels$c = {
3968
3970
  title: "Voulez-vous mettre à jour votre profil ?",
3969
3971
  subtitle: "Entrez vos informations ci-dessous pour mettre à jour votre profil",
3970
3972
  email: "Address courriel",
@@ -3980,20 +3982,20 @@ var labels$a = {
3980
3982
  removeImage: "supprimer la photo actuelle",
3981
3983
  zoom: "Zoom"
3982
3984
  };
3983
- var messages$c = {
3985
+ var messages$e = {
3984
3986
  userUpdated: "Votre profil a été mis à jour avec succès.",
3985
3987
  pictureRemoved: "Votre photo de profil a été supprimée avec succès.",
3986
3988
  pictureUpdated: "Votre photo de profil a été mise à jour avec succès."
3987
3989
  };
3988
3990
  var userEdit_fr = {
3989
- labels: labels$a,
3990
- messages: messages$c
3991
+ labels: labels$c,
3992
+ messages: messages$e
3991
3993
  };
3992
3994
 
3993
3995
  var title$9 = "Enter your shipping address";
3994
3996
  var selectAddressTitle$1 = "Please select an address";
3995
3997
  var selectAddressSubtitle$1 = "Select one of your saved addresses, or add a new one";
3996
- var labels$9 = {
3998
+ var labels$b = {
3997
3999
  address: "Address",
3998
4000
  code: "Postal Code/Zip",
3999
4001
  city: "City",
@@ -4008,7 +4010,7 @@ var buttons$5 = {
4008
4010
  selectAddress: "Select address",
4009
4011
  addAddress: "Add new address"
4010
4012
  };
4011
- var messages$b = {
4013
+ var messages$d = {
4012
4014
  addressUpdated: "The address was successfully updated!",
4013
4015
  subRedeemed: "Your subscription has been redeemed."
4014
4016
  };
@@ -4016,15 +4018,15 @@ var address_en = {
4016
4018
  title: title$9,
4017
4019
  selectAddressTitle: selectAddressTitle$1,
4018
4020
  selectAddressSubtitle: selectAddressSubtitle$1,
4019
- labels: labels$9,
4021
+ labels: labels$b,
4020
4022
  buttons: buttons$5,
4021
- messages: messages$b
4023
+ messages: messages$d
4022
4024
  };
4023
4025
 
4024
4026
  var title$8 = "Entrez votre adresse de livraison";
4025
4027
  var selectAddressTitle = "Veuillez sélectionner une adresse";
4026
4028
  var selectAddressSubtitle = "Choisissez l'une de vos adresses ou créez-en une nouvelle";
4027
- var labels$8 = {
4029
+ var labels$a = {
4028
4030
  address: "Adresse",
4029
4031
  code: "Code postal / Zip",
4030
4032
  city: "Ville",
@@ -4039,7 +4041,7 @@ var buttons$4 = {
4039
4041
  selectAddress: "Choisir cette adresse",
4040
4042
  addAddress: "Ajouter une nouvelle adresse"
4041
4043
  };
4042
- var messages$a = {
4044
+ var messages$c = {
4043
4045
  addressUpdated: "Votre adresse a été mise à jour avec succès",
4044
4046
  subRedeemed: "Votre abonnement a bien été activé."
4045
4047
  };
@@ -4047,9 +4049,9 @@ var address_fr = {
4047
4049
  title: title$8,
4048
4050
  selectAddressTitle: selectAddressTitle,
4049
4051
  selectAddressSubtitle: selectAddressSubtitle,
4050
- labels: labels$8,
4052
+ labels: labels$a,
4051
4053
  buttons: buttons$4,
4052
- messages: messages$a
4054
+ messages: messages$c
4053
4055
  };
4054
4056
 
4055
4057
  var title$7 = "Reset your password";
@@ -4096,7 +4098,7 @@ var password$1 = "Password";
4096
4098
  var submit$3 = "Submit";
4097
4099
  var required$3 = "Required";
4098
4100
  var passwordResetEmailSent$1 = "Password reset instructions have been sent to your email";
4099
- var messages$9 = {
4101
+ var messages$b = {
4100
4102
  alreadyHaveAccount: "Already have an account?",
4101
4103
  loginHere: "login here."
4102
4104
  };
@@ -4107,7 +4109,7 @@ var passwordForgot_en = {
4107
4109
  submit: submit$3,
4108
4110
  required: required$3,
4109
4111
  passwordResetEmailSent: passwordResetEmailSent$1,
4110
- messages: messages$9
4112
+ messages: messages$b
4111
4113
  };
4112
4114
 
4113
4115
  var title$4 = "Mot de passe oublié ?";
@@ -4116,7 +4118,7 @@ var password = "Mot de passe";
4116
4118
  var submit$2 = "Soumettre";
4117
4119
  var required$2 = "Champs obligatoires";
4118
4120
  var passwordResetEmailSent = "Un lien pour réinitialiser votre mot de passe vous a été envoyé. Si vous ne le recevez pas, vérifier votre courrier indésirable.";
4119
- var messages$8 = {
4121
+ var messages$a = {
4120
4122
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4121
4123
  loginHere: "Connectez-vous ici"
4122
4124
  };
@@ -4127,7 +4129,7 @@ var passwordForgot_fr = {
4127
4129
  submit: submit$2,
4128
4130
  required: required$2,
4129
4131
  passwordResetEmailSent: passwordResetEmailSent,
4130
- messages: messages$8
4132
+ messages: messages$a
4131
4133
  };
4132
4134
 
4133
4135
  var title$3 = "Change your password";
@@ -4228,7 +4230,7 @@ var buttons$3 = {
4228
4230
  purchase: "Purchase",
4229
4231
  "continue": "Continue"
4230
4232
  };
4231
- var messages$7 = {
4233
+ var messages$9 = {
4232
4234
  orderConfirmed: {
4233
4235
  title: "Order confirmed!",
4234
4236
  body: "Your order has been confirmed and will be shipped within the next few days. You'll shortly receive an email confirmation of this order."
@@ -4237,14 +4239,14 @@ var messages$7 = {
4237
4239
  multipleCurrencies: "Your cart currently contains items which are available in different currencies. In order to proceed with the checkout, please make sure that all items have the same currency.",
4238
4240
  currencyMismatch: "The selected item(s) do not match your current default currency ({{currency}}). Please choose item(s) only matching this currency."
4239
4241
  };
4240
- var labels$7 = {
4242
+ var labels$9 = {
4241
4243
  summary: "Order summary",
4242
4244
  total: "total"
4243
4245
  };
4244
4246
  var shop_en = {
4245
4247
  buttons: buttons$3,
4246
- messages: messages$7,
4247
- labels: labels$7
4248
+ messages: messages$9,
4249
+ labels: labels$9
4248
4250
  };
4249
4251
 
4250
4252
  var buttons$2 = {
@@ -4253,7 +4255,7 @@ var buttons$2 = {
4253
4255
  purchase: "Acheter",
4254
4256
  "continue": "Continuer au contenu"
4255
4257
  };
4256
- var messages$6 = {
4258
+ var messages$8 = {
4257
4259
  orderConfirmed: {
4258
4260
  title: "Votre commande est confirmée !",
4259
4261
  body: "Votre commande a été confirmée et vous sera expédiée dans les prochains jours. Vous recevrez un courriel de confirmation sous peu."
@@ -4262,17 +4264,17 @@ var messages$6 = {
4262
4264
  multipleCurrencies: "Votre panier contient des articles disponibles dans différentes devises. Avant de passer à la caisse, veuillez vous assurer que tous les articles ont la même devise.",
4263
4265
  currencyMismatch: "Les articles sélectionnés ne sont pas compatibles avec la devise associée à votre compte ({{currency}}). Veuillez choisir des articles uniquement offerts dans cette devise."
4264
4266
  };
4265
- var labels$6 = {
4267
+ var labels$8 = {
4266
4268
  summary: "récapitulatif de commande",
4267
4269
  total: "total"
4268
4270
  };
4269
4271
  var shop_fr = {
4270
4272
  buttons: buttons$2,
4271
- messages: messages$6,
4272
- labels: labels$6
4273
+ messages: messages$8,
4274
+ labels: labels$8
4273
4275
  };
4274
4276
 
4275
- var labels$5 = {
4277
+ var labels$7 = {
4276
4278
  cardNumber: "Numéro de carte",
4277
4279
  securityCode: "Code de sécurité",
4278
4280
  submit: "Soumettre",
@@ -4294,7 +4296,7 @@ var labels$5 = {
4294
4296
  title: "Informations de paiement"
4295
4297
  }
4296
4298
  };
4297
- var messages$5 = {
4299
+ var messages$7 = {
4298
4300
  youAreSafe: "Vous êtes en sécurité - PCI conforme 128 SSL par",
4299
4301
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4300
4302
  giftSent: "Le cadeau d’abonnement a été envoyé à",
@@ -4307,12 +4309,12 @@ var errors$1 = {
4307
4309
  "": ""
4308
4310
  };
4309
4311
  var payment_fr = {
4310
- labels: labels$5,
4311
- messages: messages$5,
4312
+ labels: labels$7,
4313
+ messages: messages$7,
4312
4314
  errors: errors$1
4313
4315
  };
4314
4316
 
4315
- var labels$4 = {
4317
+ var labels$6 = {
4316
4318
  cardNumber: "Card number",
4317
4319
  securityCode: "Security Code",
4318
4320
  submit: "Submit",
@@ -4334,7 +4336,7 @@ var labels$4 = {
4334
4336
  title: "Payment Information"
4335
4337
  }
4336
4338
  };
4337
- var messages$4 = {
4339
+ var messages$6 = {
4338
4340
  youAreSafe: "You're safe - PCI compliant 128 SSL by",
4339
4341
  cancel: "Cancel your subscription online at anytime.",
4340
4342
  giftSent: "Subscription gift has been sent to",
@@ -4347,12 +4349,12 @@ var errors = {
4347
4349
  "": ""
4348
4350
  };
4349
4351
  var payment_en = {
4350
- labels: labels$4,
4351
- messages: messages$4,
4352
+ labels: labels$6,
4353
+ messages: messages$6,
4352
4354
  errors: errors
4353
4355
  };
4354
4356
 
4355
- var labels$3 = {
4357
+ var labels$5 = {
4356
4358
  menu: "Pelcro Menu",
4357
4359
  name: "Name",
4358
4360
  email: "Email",
@@ -4376,6 +4378,7 @@ var labels$3 = {
4376
4378
  account: "Account",
4377
4379
  purchases: "Purchases",
4378
4380
  subscriptions: "Subscriptions",
4381
+ donations: "Donations",
4379
4382
  updatePaymentSource: "Update",
4380
4383
  profile: "Profile",
4381
4384
  updateProfile: "Edit profile",
@@ -4391,6 +4394,7 @@ var labels$3 = {
4391
4394
  actions: "Actions",
4392
4395
  expiresOn: "Ends",
4393
4396
  startsOn: "Starts",
4397
+ startDate: "Start date",
4394
4398
  renewsOn: "Renews",
4395
4399
  canceledOn: "Canceled on",
4396
4400
  recipient: "Recipient",
@@ -4417,7 +4421,7 @@ var labels$3 = {
4417
4421
  goBack: "Go back"
4418
4422
  }
4419
4423
  };
4420
- var messages$3 = {
4424
+ var messages$5 = {
4421
4425
  noCard: "You don't have a card",
4422
4426
  subCancellation: {
4423
4427
  isSureToCancel: "Are you sure you want to cancel your subscription?",
@@ -4427,11 +4431,11 @@ var messages$3 = {
4427
4431
  }
4428
4432
  };
4429
4433
  var dashboard_en = {
4430
- labels: labels$3,
4431
- messages: messages$3
4434
+ labels: labels$5,
4435
+ messages: messages$5
4432
4436
  };
4433
4437
 
4434
- var labels$2 = {
4438
+ var labels$4 = {
4435
4439
  menu: "Menu Pelcro",
4436
4440
  name: "Nom",
4437
4441
  email: "Courriel",
@@ -4455,6 +4459,7 @@ var labels$2 = {
4455
4459
  account: "Compte",
4456
4460
  purchases: "Achats",
4457
4461
  subscriptions: "Abonnements",
4462
+ donations: "Des dons",
4458
4463
  updatePaymentSource: "Mettre à jour la source de paiement",
4459
4464
  profile: "Profil",
4460
4465
  updateProfile: "Mettre à jour le profil",
@@ -4470,6 +4475,7 @@ var labels$2 = {
4470
4475
  actions: "Actes",
4471
4476
  expiresOn: "Expire le",
4472
4477
  startsOn: "Débute le",
4478
+ startDate: "Date de début",
4473
4479
  renewsOn: "Renouvelle le",
4474
4480
  canceledOn: "Annulé le",
4475
4481
  recipient: "Destinataire",
@@ -4496,7 +4502,7 @@ var labels$2 = {
4496
4502
  goBack: "Retourner"
4497
4503
  }
4498
4504
  };
4499
- var messages$2 = {
4505
+ var messages$4 = {
4500
4506
  noCard: "Vous n’avez pas une carte",
4501
4507
  subCancellation: {
4502
4508
  isSureToCancel: "Êtes-vous certain de vouloir annuler votre abonnement?",
@@ -4506,16 +4512,16 @@ var messages$2 = {
4506
4512
  }
4507
4513
  };
4508
4514
  var dashboard_fr = {
4509
- labels: labels$2,
4510
- messages: messages$2
4515
+ labels: labels$4,
4516
+ messages: messages$4
4511
4517
  };
4512
4518
 
4513
- var messages$1 = {
4519
+ var messages$3 = {
4514
4520
  alreadyHaveAccount: "Already have an account?",
4515
4521
  loginHere: "Login here",
4516
4522
  checkbox: "Check this box to gift this subscription"
4517
4523
  };
4518
- var labels$1 = {
4524
+ var labels$3 = {
4519
4525
  plan: {
4520
4526
  title: "Subscribe to a plan",
4521
4527
  subtitle: "Select one of the plans below and click on next."
@@ -4526,7 +4532,11 @@ var labels$1 = {
4526
4532
  },
4527
4533
  selectProduct: "Select a product",
4528
4534
  selectPlan: "Select a plan",
4529
- startingAt: "Starting at"
4535
+ startingAt: "Starting at",
4536
+ restrictiveArticles: {
4537
+ subscribeTo: "Subscribe to one of the following options to get access to this page",
4538
+ or: "Or take a look at some of our other options below"
4539
+ }
4530
4540
  };
4531
4541
  var buttons$1 = {
4532
4542
  next: "Next",
@@ -4534,17 +4544,17 @@ var buttons$1 = {
4534
4544
  back: "Back"
4535
4545
  };
4536
4546
  var select_en = {
4537
- messages: messages$1,
4538
- labels: labels$1,
4547
+ messages: messages$3,
4548
+ labels: labels$3,
4539
4549
  buttons: buttons$1
4540
4550
  };
4541
4551
 
4542
- var messages = {
4552
+ var messages$2 = {
4543
4553
  alreadyHaveAccount: "Vous avez déjà un compte ?",
4544
4554
  loginHere: "Connectez-vous ici",
4545
4555
  checkbox: "Cochez cette case pour offrir cet abonnement"
4546
4556
  };
4547
- var labels = {
4557
+ var labels$2 = {
4548
4558
  plan: {
4549
4559
  title: "Abonnez-vous à un plan",
4550
4560
  subtitle: "Sélectionnez l’un des plans ci-dessous et cliquez sur suivant."
@@ -4555,7 +4565,11 @@ var labels = {
4555
4565
  },
4556
4566
  selectProduct: "Sélectionnez un produit",
4557
4567
  selectPlan: "Sélectionnez un plan",
4558
- starningAt: "À partir de"
4568
+ starningAt: "À partir de",
4569
+ restrictiveArticles: {
4570
+ subscribeTo: "Abonnez-vous à une des options suivantes pour accéder au contenu de cette page",
4571
+ or: "Sinon, jetez un coup d'oeil à d'autres offres ci-dessous"
4572
+ }
4559
4573
  };
4560
4574
  var buttons = {
4561
4575
  next: "Prochain",
@@ -4563,8 +4577,8 @@ var buttons = {
4563
4577
  back: "Retour"
4564
4578
  };
4565
4579
  var select_fr = {
4566
- messages: messages,
4567
- labels: labels,
4580
+ messages: messages$2,
4581
+ labels: labels$2,
4568
4582
  buttons: buttons
4569
4583
  };
4570
4584
 
@@ -4588,6 +4602,34 @@ var notification_fr = {
4588
4602
  confirm: confirm
4589
4603
  };
4590
4604
 
4605
+ var labels$1 = {
4606
+ title: "Verify your email",
4607
+ instructions: "You're on your way!\nLet's confirm your email address.\nClick on the verification link we've sent to your email:",
4608
+ resend: "Resend email"
4609
+ };
4610
+ var messages$1 = {
4611
+ resent: "Resent successfully",
4612
+ success: "Email verified successfully!"
4613
+ };
4614
+ var verifyEmail_en = {
4615
+ labels: labels$1,
4616
+ messages: messages$1
4617
+ };
4618
+
4619
+ var labels = {
4620
+ title: "Vérifiez votre e-mail",
4621
+ instructions: "Vous êtes en route!\nConfirmons votre adresse e-mail.\nCliquez sur le lien de vérification que nous vous avons envoyé par e-mail:",
4622
+ resend: "Ré-envoyer l'email"
4623
+ };
4624
+ var messages = {
4625
+ resent: "Renvoyé avec succès",
4626
+ success: "Email vérifié avec succès!"
4627
+ };
4628
+ var verifyEmail_fr = {
4629
+ labels: labels,
4630
+ messages: messages
4631
+ };
4632
+
4591
4633
  function create$1(createState) {
4592
4634
  let state;
4593
4635
  const listeners = new Set();
@@ -5937,12 +5979,23 @@ class PelcroActions {
5937
5979
  view,
5938
5980
  cartItems,
5939
5981
  ...otherStateFields
5940
- } = initialState$g;
5982
+ } = initialState$h;
5941
5983
  this.set(otherStateFields);
5942
5984
  });
5943
5985
 
5944
5986
  _defineProperty$3(this, "switchView", view => {
5945
- // view switching guards
5987
+ var _window$Pelcro$site$r, _window$Pelcro$site$r2, _window$Pelcro$user$r, _window$Pelcro$user$r2;
5988
+
5989
+ 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;
5990
+ const isUserEmailVerified = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.email_confirm) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : false;
5991
+ const userMustVerifyEmail = this.get().isAuthenticated() && isEmailVerificationEnabled && !isUserEmailVerified; // view switching guards
5992
+
5993
+ if (userMustVerifyEmail && !["dashboard", "meter", "login", null].includes(view)) {
5994
+ return this.set({
5995
+ view: "email-verify"
5996
+ });
5997
+ }
5998
+
5946
5999
  if (["login", "register"].includes(view) && this.get().isAuthenticated()) {
5947
6000
  return this.set({
5948
6001
  view: "dashboard"
@@ -6200,7 +6253,7 @@ class PelcroCallbacks {
6200
6253
  }
6201
6254
  });
6202
6255
 
6203
- _defineProperty$3(this, "whenUserReady", callback => {
6256
+ _defineProperty$3(this, "whenUserReady", (callback, listenerOptions) => {
6204
6257
  var _window$Pelcro$user$r;
6205
6258
 
6206
6259
  if ((_window$Pelcro$user$r = window.Pelcro.user.read()) !== null && _window$Pelcro$user$r !== void 0 && _window$Pelcro$user$r.id) {
@@ -6208,7 +6261,7 @@ class PelcroCallbacks {
6208
6261
  } else {
6209
6262
  window.document.addEventListener("PelcroUserLoaded", e => {
6210
6263
  callback(window.Pelcro.user.read());
6211
- });
6264
+ }, listenerOptions);
6212
6265
  }
6213
6266
  });
6214
6267
 
@@ -6227,7 +6280,7 @@ class PelcroCallbacks {
6227
6280
 
6228
6281
  }
6229
6282
 
6230
- const initialState$g = {
6283
+ const initialState$h = {
6231
6284
  // View
6232
6285
  view: null,
6233
6286
  // Plans
@@ -6255,7 +6308,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
6255
6308
  return {
6256
6309
  // Store setter
6257
6310
  set,
6258
- ...initialState$g,
6311
+ ...initialState$h,
6259
6312
  // State actions
6260
6313
  ...actions,
6261
6314
  // Callbacks
@@ -6406,7 +6459,7 @@ const calcAndFormatItemsTotal = (items, currency) => {
6406
6459
  */
6407
6460
 
6408
6461
  const isValidViewFromURL = viewID => {
6409
- 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()) {
6462
+ 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()) {
6410
6463
  return true;
6411
6464
  }
6412
6465
 
@@ -6620,6 +6673,7 @@ const resources = {
6620
6673
  passwordReset: passwordReset_en,
6621
6674
  passwordForgot: passwordForgot_en,
6622
6675
  passwordChange: passwordChange_en,
6676
+ verifyEmail: verifyEmail_en,
6623
6677
  cart: cart_en,
6624
6678
  shop: shop_en,
6625
6679
  payment: payment_en,
@@ -6642,6 +6696,7 @@ const resources = {
6642
6696
  passwordReset: passwordReset_fr,
6643
6697
  passwordForgot: passwordForgot_fr,
6644
6698
  passwordChange: passwordChange_fr,
6699
+ verifyEmail: verifyEmail_fr,
6645
6700
  cart: cart_fr,
6646
6701
  shop: shop_fr,
6647
6702
  payment: payment_fr,
@@ -6800,6 +6855,8 @@ class SaveToMetadataButtonClass {
6800
6855
  _saveToMetadata.set(this, {
6801
6856
  writable: true,
6802
6857
  value: event => {
6858
+ var _user$metadata;
6859
+
6803
6860
  const button = event.currentTarget;
6804
6861
  const user = window.Pelcro.user.read();
6805
6862
  const {
@@ -6815,7 +6872,7 @@ class SaveToMetadataButtonClass {
6815
6872
 
6816
6873
  let newMetadataValue = [buttonMetadata]; // if this key already exist in user metadata object, append to it.
6817
6874
 
6818
- const oldValue = user.metadata[`metadata_saved_${key}`];
6875
+ const oldValue = (_user$metadata = user.metadata) === null || _user$metadata === void 0 ? void 0 : _user$metadata[`metadata_saved_${key}`];
6819
6876
 
6820
6877
  if (oldValue) {
6821
6878
  if (Array.isArray(oldValue)) {
@@ -6929,8 +6986,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
6929
6986
 
6930
6987
  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}}
6931
6988
 
6932
- function _extends$w() {
6933
- _extends$w = Object.assign || function (target) {
6989
+ function _extends$y() {
6990
+ _extends$y = Object.assign || function (target) {
6934
6991
  for (var i = 1; i < arguments.length; i++) {
6935
6992
  var source = arguments[i];
6936
6993
 
@@ -6944,7 +7001,7 @@ function _extends$w() {
6944
7001
  return target;
6945
7002
  };
6946
7003
 
6947
- return _extends$w.apply(this, arguments);
7004
+ return _extends$y.apply(this, arguments);
6948
7005
  }
6949
7006
 
6950
7007
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -7034,7 +7091,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
7034
7091
  var reducer = function reducer(state, action) {
7035
7092
  switch (action.type) {
7036
7093
  case ActionType.ADD_TOAST:
7037
- return _extends$w({}, state, {
7094
+ return _extends$y({}, state, {
7038
7095
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
7039
7096
  });
7040
7097
 
@@ -7044,9 +7101,9 @@ var reducer = function reducer(state, action) {
7044
7101
  clearFromRemoveQueue(action.toast.id);
7045
7102
  }
7046
7103
 
7047
- return _extends$w({}, state, {
7104
+ return _extends$y({}, state, {
7048
7105
  toasts: state.toasts.map(function (t) {
7049
- return t.id === action.toast.id ? _extends$w({}, t, action.toast) : t;
7106
+ return t.id === action.toast.id ? _extends$y({}, t, action.toast) : t;
7050
7107
  })
7051
7108
  });
7052
7109
 
@@ -7073,9 +7130,9 @@ var reducer = function reducer(state, action) {
7073
7130
  });
7074
7131
  }
7075
7132
 
7076
- return _extends$w({}, state, {
7133
+ return _extends$y({}, state, {
7077
7134
  toasts: state.toasts.map(function (t) {
7078
- return t.id === toastId || toastId === undefined ? _extends$w({}, t, {
7135
+ return t.id === toastId || toastId === undefined ? _extends$y({}, t, {
7079
7136
  visible: false
7080
7137
  }) : t;
7081
7138
  })
@@ -7083,28 +7140,28 @@ var reducer = function reducer(state, action) {
7083
7140
 
7084
7141
  case ActionType.REMOVE_TOAST:
7085
7142
  if (action.toastId === undefined) {
7086
- return _extends$w({}, state, {
7143
+ return _extends$y({}, state, {
7087
7144
  toasts: []
7088
7145
  });
7089
7146
  }
7090
7147
 
7091
- return _extends$w({}, state, {
7148
+ return _extends$y({}, state, {
7092
7149
  toasts: state.toasts.filter(function (t) {
7093
7150
  return t.id !== action.toastId;
7094
7151
  })
7095
7152
  });
7096
7153
 
7097
7154
  case ActionType.START_PAUSE:
7098
- return _extends$w({}, state, {
7155
+ return _extends$y({}, state, {
7099
7156
  pausedAt: action.time
7100
7157
  });
7101
7158
 
7102
7159
  case ActionType.END_PAUSE:
7103
7160
  var diff = action.time - (state.pausedAt || 0);
7104
- return _extends$w({}, state, {
7161
+ return _extends$y({}, state, {
7105
7162
  pausedAt: undefined,
7106
7163
  toasts: state.toasts.map(function (t) {
7107
- return _extends$w({}, t, {
7164
+ return _extends$y({}, t, {
7108
7165
  pauseDuration: t.pauseDuration + diff
7109
7166
  });
7110
7167
  })
@@ -7151,12 +7208,12 @@ var useStore = function useStore(toastOptions) {
7151
7208
  var mergedToasts = state.toasts.map(function (t) {
7152
7209
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
7153
7210
 
7154
- return _extends$w({}, toastOptions, toastOptions[t.type], t, {
7211
+ return _extends$y({}, toastOptions, toastOptions[t.type], t, {
7155
7212
  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],
7156
- style: _extends$w({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7213
+ style: _extends$y({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
7157
7214
  });
7158
7215
  });
7159
- return _extends$w({}, state, {
7216
+ return _extends$y({}, state, {
7160
7217
  toasts: mergedToasts
7161
7218
  });
7162
7219
  };
@@ -7166,7 +7223,7 @@ var createToast = function createToast(message, type, opts) {
7166
7223
  type = 'blank';
7167
7224
  }
7168
7225
 
7169
- return _extends$w({
7226
+ return _extends$y({
7170
7227
  createdAt: Date.now(),
7171
7228
  visible: true,
7172
7229
  type: type,
@@ -7216,14 +7273,14 @@ toast.remove = function (toastId) {
7216
7273
  };
7217
7274
 
7218
7275
  toast.promise = function (promise, msgs, opts) {
7219
- var id = toast.loading(msgs.loading, _extends$w({}, opts, opts == null ? void 0 : opts.loading));
7276
+ var id = toast.loading(msgs.loading, _extends$y({}, opts, opts == null ? void 0 : opts.loading));
7220
7277
  promise.then(function (p) {
7221
- toast.success(resolveValue(msgs.success, p), _extends$w({
7278
+ toast.success(resolveValue(msgs.success, p), _extends$y({
7222
7279
  id: id
7223
7280
  }, opts, opts == null ? void 0 : opts.success));
7224
7281
  return p;
7225
7282
  })["catch"](function (e) {
7226
- toast.error(resolveValue(msgs.error, e), _extends$w({
7283
+ toast.error(resolveValue(msgs.error, e), _extends$y({
7227
7284
  id: id
7228
7285
  }, opts, opts == null ? void 0 : opts.error));
7229
7286
  });
@@ -7562,7 +7619,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
7562
7619
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
7563
7620
  return React.createElement(ToastBarBase, {
7564
7621
  className: toast.className,
7565
- style: _extends$w({}, animationStyle, style, toast.style)
7622
+ style: _extends$y({}, animationStyle, style, toast.style)
7566
7623
  }, typeof children === 'function' ? children({
7567
7624
  icon: icon,
7568
7625
  message: message
@@ -7592,7 +7649,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
7592
7649
  } : position.includes('right') ? {
7593
7650
  justifyContent: 'flex-end'
7594
7651
  } : {};
7595
- return _extends$w({
7652
+ return _extends$y({
7596
7653
  left: 0,
7597
7654
  right: 0,
7598
7655
  display: 'flex',
@@ -7619,7 +7676,7 @@ var Toaster = function Toaster(_ref) {
7619
7676
  handlers = _useToaster.handlers;
7620
7677
 
7621
7678
  return React.createElement("div", {
7622
- style: _extends$w({
7679
+ style: _extends$y({
7623
7680
  position: 'fixed',
7624
7681
  zIndex: 9999,
7625
7682
  top: DEFAULT_OFFSET,
@@ -7654,87 +7711,87 @@ var Toaster = function Toaster(_ref) {
7654
7711
  }));
7655
7712
  };
7656
7713
 
7657
- var _path$t;
7714
+ var _path$v;
7658
7715
 
7659
- 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); }
7716
+ 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); }
7660
7717
 
7661
7718
  function SvgCheckSolid(props) {
7662
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7719
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
7663
7720
  xmlns: "http://www.w3.org/2000/svg",
7664
7721
  className: "h-5 w-5",
7665
7722
  viewBox: "0 0 20 20",
7666
7723
  fill: "currentColor"
7667
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7724
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
7668
7725
  fillRule: "evenodd",
7669
7726
  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",
7670
7727
  clipRule: "evenodd"
7671
7728
  })));
7672
7729
  }
7673
7730
 
7674
- var _path$s;
7731
+ var _path$u;
7675
7732
 
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); }
7733
+ 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); }
7677
7734
 
7678
7735
  function SvgXIcon(props) {
7679
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7736
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
7680
7737
  xmlns: "http://www.w3.org/2000/svg",
7681
7738
  viewBox: "0 0 20 20",
7682
7739
  fill: "currentColor"
7683
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7740
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
7684
7741
  fill: "evenodd",
7685
7742
  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",
7686
7743
  clipRule: "evenodd"
7687
7744
  })));
7688
7745
  }
7689
7746
 
7690
- var _path$r;
7747
+ var _path$t;
7691
7748
 
7692
- 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); }
7749
+ 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); }
7693
7750
 
7694
7751
  function SvgXIconSolid(props) {
7695
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7752
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
7696
7753
  className: "plc-w-4 plc-h-4",
7697
7754
  fill: "currentColor",
7698
7755
  xmlns: "http://www.w3.org/2000/svg",
7699
7756
  viewBox: "0 0 100 100"
7700
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7757
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
7701
7758
  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"
7702
7759
  })));
7703
7760
  }
7704
7761
 
7705
- var _path$q;
7762
+ var _path$s;
7706
7763
 
7707
- 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); }
7764
+ 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); }
7708
7765
 
7709
7766
  function SvgExclamation(props) {
7710
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
7767
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
7711
7768
  className: "plc-w-4 plc-h-4 plc-mr-1",
7712
7769
  xmlns: "http://www.w3.org/2000/svg",
7713
7770
  viewBox: "0 0 20 20",
7714
7771
  fill: "currentColor"
7715
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
7772
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
7716
7773
  fillRule: "evenodd",
7717
7774
  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",
7718
7775
  clipRule: "evenodd"
7719
7776
  })));
7720
7777
  }
7721
7778
 
7722
- var _path$p, _path2$3;
7779
+ var _path$r, _path2$4;
7723
7780
 
7724
- 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); }
7781
+ 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); }
7725
7782
 
7726
7783
  function SvgSpinner(props) {
7727
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
7784
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
7728
7785
  className: "plc-animate-spin",
7729
7786
  viewBox: "0 0 24 24",
7730
7787
  fill: "currentColor",
7731
7788
  xmlns: "http://www.w3.org/2000/svg"
7732
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
7789
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
7733
7790
  opacity: 0.2,
7734
7791
  fill: "evenodd",
7735
7792
  clipRule: "evenodd",
7736
7793
  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"
7737
- })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
7794
+ })), _path2$4 || (_path2$4 = /*#__PURE__*/React__namespace.createElement("path", {
7738
7795
  d: "M2 12C2 6.477 6.477 2 12 2v3a7 7 0 00-7 7H2z"
7739
7796
  })));
7740
7797
  }
@@ -8460,53 +8517,113 @@ var pure = pure$1;
8460
8517
  var pure_1 = pure.loadStripe;
8461
8518
 
8462
8519
  /**
8463
- * @typedef {Object} OptionsType
8464
- * @property {boolean} loadPaymentSDKs
8465
- * @property {boolean} enableURLTriggers
8466
- * @property {boolean} enableTheme
8467
- * @property {boolean} enablePaywalls
8468
- * @property {boolean} enableGoogleAnalytics
8469
- */
8470
-
8471
- /**
8472
- * Initializes pelcro features based on the options flag object
8473
- * @param {OptionsType} options
8474
- * @returns
8520
+ * Extracts error message from the response error object
8521
+ * @param {Object} error Error object
8522
+ * @return {string}
8475
8523
  */
8524
+ const getErrorMessages = error => {
8525
+ var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
8476
8526
 
8477
- const optionsController = options => {
8478
- if (!options) {
8479
- return;
8527
+ if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
8528
+ return error.error.message;
8480
8529
  }
8481
8530
 
8482
- const optionsMethodsDict = {
8483
- loadPaymentSDKs: loadPaymentSDKs,
8484
- loadAuth0SDK: loadAuth0SDK,
8485
- enableURLTriggers: initViewFromURL,
8486
- enableTheme: applyPelcroTheme,
8487
- enablePaywalls: initPaywalls,
8488
- loadSecuritySDK: initSecuritySdk,
8489
- enableGoogleAnalytics: initGATracking
8490
- }; // Only execute enabled options
8531
+ 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) {
8532
+ var _error$response2, _error$response2$data;
8491
8533
 
8492
- Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8493
- var _optionsMethodsDict$k;
8534
+ 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;
8535
+ }
8494
8536
 
8495
- return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8496
- });
8497
- };
8498
- const initPaywalls = () => {
8499
- var _window$Pelcro$site$r;
8537
+ 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) {
8538
+ var _error$response4, _error$response4$data, _error$response4$data2;
8500
8539
 
8501
- const paywallMethods = window.Pelcro.paywall;
8502
- const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8540
+ 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;
8541
+ }
8503
8542
 
8504
- if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8505
- // blur entitlements based content
8506
- const didBlurContent = init(); // Skip paywall if article is not restricted
8543
+ const errorMessages = []; // enumerable error (ex: validation errors)
8507
8544
 
8508
- if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
8509
- return;
8545
+ 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]) => {
8546
+ errorMessages.push(errorMessage);
8547
+ }); // convert to multiline string
8548
+
8549
+ return errorMessages.join("\n");
8550
+ };
8551
+ /**
8552
+ * Executes function after a wait time of inactivity
8553
+ * @param {function} func
8554
+ * @param {number} waitTime
8555
+ */
8556
+
8557
+ const debounce = (func, waitTime) => {
8558
+ let timeout;
8559
+ return function executedFunction(...args) {
8560
+ // The callback function to be executed after
8561
+ // the debounce time has elapsed
8562
+ const later = () => {
8563
+ // null timeout to indicate the debounce ended
8564
+ timeout = null;
8565
+ func(...args);
8566
+ }; // This will reset the waiting every function execution.
8567
+ // This is the step that prevents the function from
8568
+ // being executed because it will never reach the
8569
+ // inside of the previous setTimeout
8570
+
8571
+
8572
+ clearTimeout(timeout); // Restart the debounce waiting period.
8573
+ // setTimeout returns a truthy value (it differs in web vs Node)
8574
+
8575
+ timeout = setTimeout(later, waitTime);
8576
+ };
8577
+ };
8578
+
8579
+ /**
8580
+ * @typedef {Object} OptionsType
8581
+ * @property {boolean} loadPaymentSDKs
8582
+ * @property {boolean} enableURLTriggers
8583
+ * @property {boolean} enableTheme
8584
+ * @property {boolean} enablePaywalls
8585
+ * @property {boolean} enableGoogleAnalytics
8586
+ */
8587
+
8588
+ /**
8589
+ * Initializes pelcro features based on the options flag object
8590
+ * @param {OptionsType} options
8591
+ * @returns
8592
+ */
8593
+
8594
+ const optionsController = options => {
8595
+ if (!options) {
8596
+ return;
8597
+ }
8598
+
8599
+ const optionsMethodsDict = {
8600
+ loadPaymentSDKs: loadPaymentSDKs,
8601
+ loadAuth0SDK: loadAuth0SDK,
8602
+ enableURLTriggers: initViewFromURL,
8603
+ enableTheme: applyPelcroTheme,
8604
+ enablePaywalls: initPaywalls,
8605
+ loadSecuritySDK: initSecuritySdk,
8606
+ enableGoogleAnalytics: initGATracking
8607
+ }; // Only execute enabled options
8608
+
8609
+ Object.entries(options).filter(([_, value]) => value === true).forEach(([key]) => {
8610
+ var _optionsMethodsDict$k;
8611
+
8612
+ return (_optionsMethodsDict$k = optionsMethodsDict[key]) === null || _optionsMethodsDict$k === void 0 ? void 0 : _optionsMethodsDict$k.call(optionsMethodsDict);
8613
+ });
8614
+ };
8615
+ const initPaywalls = () => {
8616
+ var _window$Pelcro$site$r;
8617
+
8618
+ const paywallMethods = window.Pelcro.paywall;
8619
+ const viewFromURL = getStableViewID(window.Pelcro.helpers.getURLParameter("view"));
8620
+
8621
+ if (((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.settings) === "subscription") {
8622
+ // blur entitlements based content
8623
+ const didBlurContent = init(); // Skip paywall if article is not restricted
8624
+
8625
+ if (isValidViewFromURL(viewFromURL) || !paywallMethods.isArticleRestricted()) {
8626
+ return;
8510
8627
  }
8511
8628
 
8512
8629
  const {
@@ -8699,6 +8816,10 @@ const initViewFromURL = () => {
8699
8816
  return initCartFromUrl();
8700
8817
  }
8701
8818
 
8819
+ if (view === "email-verify") {
8820
+ return verifyEmailTokenFromUrl();
8821
+ }
8822
+
8702
8823
  switchView(view);
8703
8824
  });
8704
8825
  }
@@ -8848,6 +8969,33 @@ const initCartFromUrl = () => {
8848
8969
  });
8849
8970
  };
8850
8971
 
8972
+ const verifyEmailTokenFromUrl = () => {
8973
+ var _window$Pelcro$site$r5, _window$Pelcro$site$r6;
8974
+
8975
+ const {
8976
+ whenSiteReady
8977
+ } = usePelcro.getStore();
8978
+ const translations = i18next.t("verifyEmail:messages", {
8979
+ returnObjects: true
8980
+ });
8981
+ const emailToken = window.Pelcro.helpers.getURLParameter("token");
8982
+ 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;
8983
+ if (!emailToken || !isEmailVerificationEnabled) return;
8984
+ whenSiteReady(() => {
8985
+ window.Pelcro.user.verifyEmailToken({
8986
+ token: emailToken
8987
+ }, (err, res) => {
8988
+ if (err) {
8989
+ return notify.error(getErrorMessages(err));
8990
+ }
8991
+
8992
+ return notify.success(translations.success);
8993
+ });
8994
+ }, {
8995
+ once: true
8996
+ });
8997
+ };
8998
+
8851
8999
  const defaultOptions = {
8852
9000
  loadPaymentSDKs: true,
8853
9001
  loadAuth0SDK: true,
@@ -9130,6 +9278,7 @@ const SUBSCRIBE = "CREATE_SUBSCRIPTION";
9130
9278
  const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
9131
9279
  const DISABLE_COUPON_BUTTON = "DISABLE_COUPON_BUTTON";
9132
9280
  const APPLY_COUPON_CODE = "APPLY_COUPON_CODE";
9281
+ const REMOVE_APPLIED_COUPON = "REMOVE_APPLIED_COUPON";
9133
9282
  const SET_PERCENT_OFF = "SET_PERCENT_OFF";
9134
9283
  const SET_COUPON = "SET_COUPON";
9135
9284
  const SET_COUPON_ERROR = "SET_COUPON_ERROR";
@@ -9186,67 +9335,7 @@ const GET_NEWSLETTERS_FETCH = "GET_NEWSLETTERS_FETCH";
9186
9335
  const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
9187
9336
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
9188
9337
 
9189
- /**
9190
- * Extracts error message from the response error object
9191
- * @param {Object} error Error object
9192
- * @return {string}
9193
- */
9194
- const getErrorMessages = error => {
9195
- var _error$error, _error$response, _error$response$data, _error$response3, _error$response3$data, _error$response3$data2, _error$response5, _error$response5$data;
9196
-
9197
- if (error !== null && error !== void 0 && (_error$error = error.error) !== null && _error$error !== void 0 && _error$error.message) {
9198
- return error.error.message;
9199
- }
9200
-
9201
- 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) {
9202
- var _error$response2, _error$response2$data;
9203
-
9204
- 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;
9205
- }
9206
-
9207
- 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) {
9208
- var _error$response4, _error$response4$data, _error$response4$data2;
9209
-
9210
- 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;
9211
- }
9212
-
9213
- const errorMessages = []; // enumerable error (ex: validation errors)
9214
-
9215
- 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]) => {
9216
- errorMessages.push(errorMessage);
9217
- }); // convert to multiline string
9218
-
9219
- return errorMessages.join("\n");
9220
- };
9221
- /**
9222
- * Executes function after a wait time of inactivity
9223
- * @param {function} func
9224
- * @param {number} waitTime
9225
- */
9226
-
9227
- const debounce = (func, waitTime) => {
9228
- let timeout;
9229
- return function executedFunction(...args) {
9230
- // The callback function to be executed after
9231
- // the debounce time has elapsed
9232
- const later = () => {
9233
- // null timeout to indicate the debounce ended
9234
- timeout = null;
9235
- func(...args);
9236
- }; // This will reset the waiting every function execution.
9237
- // This is the step that prevents the function from
9238
- // being executed because it will never reach the
9239
- // inside of the previous setTimeout
9240
-
9241
-
9242
- clearTimeout(timeout); // Restart the debounce waiting period.
9243
- // setTimeout returns a truthy value (it differs in web vs Node)
9244
-
9245
- timeout = setTimeout(later, waitTime);
9246
- };
9247
- };
9248
-
9249
- const initialState$f = {
9338
+ const initialState$g = {
9250
9339
  email: "",
9251
9340
  password: "",
9252
9341
  emailError: null,
@@ -9257,10 +9346,10 @@ const initialState$f = {
9257
9346
  content: ""
9258
9347
  }
9259
9348
  };
9260
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
9349
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
9261
9350
  const {
9262
- Provider: Provider$f
9263
- } = store$f;
9351
+ Provider: Provider$g
9352
+ } = store$g;
9264
9353
 
9265
9354
  const LoginContainer = ({
9266
9355
  style,
@@ -9367,7 +9456,7 @@ const LoginContainer = ({
9367
9456
  });
9368
9457
 
9369
9458
  case RESET_LOGIN_FORM:
9370
- return initialState$f;
9459
+ return initialState$g;
9371
9460
 
9372
9461
  case DISABLE_LOGIN_BUTTON:
9373
9462
  return lib_7({ ...state,
@@ -9385,12 +9474,12 @@ const LoginContainer = ({
9385
9474
  default:
9386
9475
  return state;
9387
9476
  }
9388
- }, initialState$f);
9477
+ }, initialState$g);
9389
9478
  return /*#__PURE__*/React__default['default'].createElement("div", {
9390
9479
  style: { ...style
9391
9480
  },
9392
9481
  className: `pelcro-container pelcro-login-container ${className}`
9393
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9482
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
9394
9483
  value: {
9395
9484
  state,
9396
9485
  dispatch
@@ -9398,12 +9487,12 @@ const LoginContainer = ({
9398
9487
  }, children.length ? children.map((child, i) => {
9399
9488
  if (child) {
9400
9489
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9401
- store: store$f,
9490
+ store: store$g,
9402
9491
  key: i
9403
9492
  });
9404
9493
  }
9405
9494
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9406
- store: store$f
9495
+ store: store$g
9407
9496
  })));
9408
9497
  };
9409
9498
 
@@ -9648,7 +9737,7 @@ const LoginButton = ({
9648
9737
  buttonDisabled
9649
9738
  },
9650
9739
  dispatch
9651
- } = React.useContext(store$f);
9740
+ } = React.useContext(store$g);
9652
9741
  const {
9653
9742
  t
9654
9743
  } = useTranslation("login");
@@ -9669,23 +9758,23 @@ const LoginButton = ({
9669
9758
  };
9670
9759
 
9671
9760
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
9672
- store: store$f
9761
+ store: store$g
9673
9762
  }, props));
9674
9763
 
9675
9764
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
9676
- store: store$f
9765
+ store: store$g
9677
9766
  }, props));
9678
9767
 
9679
- var _path$o;
9768
+ var _path$q;
9680
9769
 
9681
- 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); }
9770
+ 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); }
9682
9771
 
9683
9772
  function SvgCheck(props) {
9684
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
9773
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
9685
9774
  xmlns: "http://www.w3.org/2000/svg",
9686
9775
  fill: "currentColor",
9687
9776
  viewBox: "0 0 20 20"
9688
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
9777
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
9689
9778
  fillRule: "evenodd",
9690
9779
  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",
9691
9780
  clipRule: "evenodd"
@@ -9750,7 +9839,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
9750
9839
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
9751
9840
  facebookLoginRenderProps.FacebookLogin;
9752
9841
 
9753
- const initialState$e = {
9842
+ const initialState$f = {
9754
9843
  email: "",
9755
9844
  password: "",
9756
9845
  emailError: null,
@@ -9767,10 +9856,10 @@ const initialState$e = {
9767
9856
  content: ""
9768
9857
  }
9769
9858
  };
9770
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
9859
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
9771
9860
  const {
9772
- Provider: Provider$e
9773
- } = store$e;
9861
+ Provider: Provider$f
9862
+ } = store$f;
9774
9863
 
9775
9864
  const RegisterContainer = ({
9776
9865
  style,
@@ -9953,7 +10042,7 @@ const RegisterContainer = ({
9953
10042
  });
9954
10043
 
9955
10044
  case RESET_LOGIN_FORM:
9956
- return initialState$e;
10045
+ return initialState$f;
9957
10046
 
9958
10047
  case DISABLE_REGISTRATION_BUTTON:
9959
10048
  return lib_7({ ...state,
@@ -9971,12 +10060,12 @@ const RegisterContainer = ({
9971
10060
  default:
9972
10061
  return state;
9973
10062
  }
9974
- }, initialState$e);
10063
+ }, initialState$f);
9975
10064
  return /*#__PURE__*/React__default['default'].createElement("div", {
9976
10065
  style: { ...style
9977
10066
  },
9978
10067
  className: `pelcro-container pelcro-register-container ${className}`
9979
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
10068
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
9980
10069
  value: {
9981
10070
  state,
9982
10071
  dispatch
@@ -9984,12 +10073,12 @@ const RegisterContainer = ({
9984
10073
  }, children.length ? children.map((child, i) => {
9985
10074
  if (child) {
9986
10075
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
9987
- store: store$e,
10076
+ store: store$f,
9988
10077
  key: i
9989
10078
  });
9990
10079
  }
9991
10080
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
9992
- store: store$e
10081
+ store: store$f
9993
10082
  })));
9994
10083
  };
9995
10084
  /**
@@ -9998,19 +10087,21 @@ const RegisterContainer = ({
9998
10087
  */
9999
10088
 
10000
10089
  function hasSecurityTokenEnabled$1() {
10001
- const hasSecuritySdkLoaded = Boolean(window.grecaptcha);
10090
+ var _window$Pelcro$site$r2;
10091
+
10092
+ const hasSecuritySdkLoaded = Boolean((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.security_key);
10002
10093
  return hasSecuritySdkLoaded;
10003
10094
  }
10004
10095
 
10005
- var _path$n;
10096
+ var _path$p;
10006
10097
 
10007
- 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); }
10098
+ 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); }
10008
10099
 
10009
10100
  function SvgFacebookLogo(props) {
10010
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10101
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
10011
10102
  xmlns: "http://www.w3.org/2000/svg",
10012
10103
  viewBox: "88.428 12.828 107.543 207.085"
10013
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10104
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
10014
10105
  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",
10015
10106
  fill: "#3c5a9a"
10016
10107
  })));
@@ -10027,10 +10118,10 @@ const FacebookLoginButton = ({
10027
10118
  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;
10028
10119
  const {
10029
10120
  dispatch: loginDispatch
10030
- } = React.useContext(store$f);
10121
+ } = React.useContext(store$g);
10031
10122
  const {
10032
10123
  dispatch: registerDispatch
10033
- } = React.useContext(store$e);
10124
+ } = React.useContext(store$f);
10034
10125
 
10035
10126
  const onSuccess = facebookUser => {
10036
10127
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -10083,18 +10174,18 @@ var googleLogin = createCommonjsModule(function (module, exports) {
10083
10174
  unwrapExports(googleLogin);
10084
10175
  var googleLogin_1 = googleLogin.GoogleLogin;
10085
10176
 
10086
- var _path$m, _path2$2, _path3$1, _path4;
10177
+ var _path$o, _path2$3, _path3$1, _path4;
10087
10178
 
10088
- 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); }
10179
+ 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); }
10089
10180
 
10090
10181
  function SvgGoogleLogo(props) {
10091
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10182
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
10092
10183
  viewBox: "0 0 24 24",
10093
10184
  xmlns: "http://www.w3.org/2000/svg"
10094
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10185
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
10095
10186
  fill: "#4285F4",
10096
10187
  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"
10097
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10188
+ })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
10098
10189
  fill: "#34A853",
10099
10190
  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"
10100
10191
  })), _path3$1 || (_path3$1 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10117,10 +10208,10 @@ const GoogleLoginButton = ({
10117
10208
  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;
10118
10209
  const {
10119
10210
  dispatch: loginDispatch
10120
- } = React.useContext(store$f);
10211
+ } = React.useContext(store$g);
10121
10212
  const {
10122
10213
  dispatch: registerDispatch
10123
- } = React.useContext(store$e);
10214
+ } = React.useContext(store$f);
10124
10215
 
10125
10216
  const onSuccess = response => {
10126
10217
  var _response$getAuthResp, _profile$getEmail, _profile$getGivenName, _profile$getFamilyNam, _profile$getEmail2, _profile$getGivenName2, _profile$getFamilyNam2;
@@ -10168,15 +10259,15 @@ const GoogleLoginButton = ({
10168
10259
  }) : null;
10169
10260
  };
10170
10261
 
10171
- var _path$l;
10262
+ var _path$n;
10172
10263
 
10173
- 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); }
10264
+ 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); }
10174
10265
 
10175
10266
  function SvgAuth0Logo(props) {
10176
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
10267
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
10177
10268
  viewBox: "0 0 256 285",
10178
10269
  xmlns: "http://www.w3.org/2000/svg"
10179
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
10270
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
10180
10271
  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"
10181
10272
  })));
10182
10273
  }
@@ -10190,23 +10281,27 @@ const Auth0LoginButton = ({
10190
10281
  const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url);
10191
10282
  const auth0InstanceRef = React__default['default'].useRef(null);
10192
10283
  React__default['default'].useEffect(() => {
10193
- if (auth0Enabled) {
10284
+ if (auth0Enabled && window.auth0 && auth0InstanceRef.current === null) {
10194
10285
  auth0InstanceRef.current = new window.auth0.WebAuth({
10195
10286
  domain: window.Pelcro.site.read().auth0_base_url,
10196
10287
  clientID: window.Pelcro.site.read().auth0_client_id
10197
10288
  });
10198
10289
  }
10199
- }, []);
10290
+ }, [auth0Enabled, window.auth0]);
10200
10291
  const {
10201
10292
  dispatch: loginDispatch
10202
- } = React.useContext(store$f);
10293
+ } = React.useContext(store$g);
10203
10294
  const {
10204
10295
  dispatch: registerDispatch
10205
- } = React.useContext(store$e);
10296
+ } = React.useContext(store$f);
10206
10297
 
10207
10298
  function handleClick() {
10208
10299
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
10209
10300
 
10301
+ if (!window.auth0) {
10302
+ return console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
10303
+ }
10304
+
10210
10305
  (_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, {
10211
10306
  responseType: "token id_token",
10212
10307
  owp: true // close popup when finished
@@ -10331,19 +10426,19 @@ function LoginView(props) {
10331
10426
  }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, null), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, null), /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, null))))));
10332
10427
  }
10333
10428
 
10334
- var _path$k, _path2$1, _path3;
10429
+ var _path$m, _path2$2, _path3;
10335
10430
 
10336
- 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); }
10431
+ 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); }
10337
10432
 
10338
10433
  function SvgPelcroAuthorship(props) {
10339
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
10434
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
10340
10435
  xmlns: "http://www.w3.org/2000/svg",
10341
10436
  viewBox: "0 -80.652 497.072 179.991"
10342
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
10437
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
10343
10438
  fill: "none",
10344
10439
  stroke: "#4a4a4a",
10345
10440
  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"
10346
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
10441
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
10347
10442
  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",
10348
10443
  fill: "#4a4a4a"
10349
10444
  })), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -10486,11 +10581,11 @@ function LoginModal({
10486
10581
  LoginModal.viewId = "login";
10487
10582
 
10488
10583
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
10489
- store: store$e
10584
+ store: store$f
10490
10585
  }, props));
10491
10586
 
10492
10587
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
10493
- store: store$e
10588
+ store: store$f
10494
10589
  }, props));
10495
10590
 
10496
10591
  const RegisterButton = ({
@@ -10510,7 +10605,7 @@ const RegisterButton = ({
10510
10605
  buttonDisabled
10511
10606
  },
10512
10607
  dispatch
10513
- } = React.useContext(store$e);
10608
+ } = React.useContext(store$f);
10514
10609
  const {
10515
10610
  t
10516
10611
  } = useTranslation("register");
@@ -10648,7 +10743,7 @@ function FirstName({
10648
10743
  }
10649
10744
 
10650
10745
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
10651
- store: store$e
10746
+ store: store$f
10652
10747
  }, props));
10653
10748
 
10654
10749
  function LastName({
@@ -10679,7 +10774,7 @@ function LastName({
10679
10774
  }
10680
10775
 
10681
10776
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
10682
- store: store$e
10777
+ store: store$f
10683
10778
  }, props));
10684
10779
 
10685
10780
  /**
@@ -10803,7 +10898,7 @@ function TextInput({
10803
10898
 
10804
10899
  const RegisterTextInput = props => {
10805
10900
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
10806
- store: store$e
10901
+ store: store$f
10807
10902
  }));
10808
10903
  };
10809
10904
 
@@ -11055,42 +11150,80 @@ class SelectModal extends React.Component {
11055
11150
  return `${startingPlan.amount_formatted}/${startingPlan.interval}`;
11056
11151
  });
11057
11152
 
11153
+ _defineProperty$3(this, "renderOneProduct", (product, index, options) => {
11154
+ const isPlanMode = Boolean(this.state.mode === "plan");
11155
+ const productButtonLabel = isPlanMode ? this.locale("buttons.back") : this.locale("buttons.select");
11156
+ const productButtonCallback = isPlanMode ? this.goBack : this.selectProduct;
11157
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11158
+ key: product.id,
11159
+ className: `plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper ${options !== null && options !== void 0 && options.emphasize ? "plc-border-2" : "plc-border"}`
11160
+ }, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
11161
+ alt: `image of ${product.name}`,
11162
+ src: product.image,
11163
+ className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
11164
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
11165
+ className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
11166
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
11167
+ className: "plc-w-full pelcro-select-product-header"
11168
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
11169
+ className: "plc-font-bold pelcro-select-product-title"
11170
+ }, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
11171
+ className: "plc-text-xs pelcro-select-product-description"
11172
+ }, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
11173
+ className: "plc-flex plc-items-end plc-w-full plc-mt-3"
11174
+ }, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
11175
+ className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
11176
+ }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
11177
+ onClick: productButtonCallback,
11178
+ "data-key": product.id,
11179
+ id: "pelcro-select-product-back-button",
11180
+ className: `plc-ml-auto plc-text-xs ${options !== null && options !== void 0 && options.emphasize ? "plc-bg-primary-700" : ""}`
11181
+ }, index === 0 && {
11182
+ autoFocus: true
11183
+ }), productButtonLabel))));
11184
+ });
11185
+
11058
11186
  _defineProperty$3(this, "renderProducts", () => {
11059
11187
  const userDidSelectProduct = Boolean(this.state.mode === "plan");
11060
11188
  const productsToShow = userDidSelectProduct ? [this.state.product] : this.state.productList;
11061
- const productButtonLabel = userDidSelectProduct ? this.locale("buttons.back") : this.locale("buttons.select");
11062
- const productButtonCallback = userDidSelectProduct ? this.goBack : this.selectProduct;
11063
- return productsToShow.map((product, i) => {
11064
- return /*#__PURE__*/React__default['default'].createElement("div", {
11065
- key: product.id,
11066
- className: "plc-flex plc-items-start plc-p-2 plc-mt-4 plc-space-x-3 plc-text-gray-900 plc-border plc-border-solid plc-rounded plc-border-primary-500 pelcro-select-product-wrapper"
11067
- }, product.image && /*#__PURE__*/React__default['default'].createElement("img", {
11068
- alt: `image of ${product.name}`,
11069
- src: product.image,
11070
- className: "plc-object-contain plc-w-1/4 pelcro-select-product-image"
11071
- }), /*#__PURE__*/React__default['default'].createElement("div", {
11072
- className: `plc-flex plc-flex-wrap ${product.image ? "plc-w-3/4" : "plc-w-full"}`
11073
- }, /*#__PURE__*/React__default['default'].createElement("div", {
11074
- className: "plc-w-full pelcro-select-product-header"
11075
- }, /*#__PURE__*/React__default['default'].createElement("p", {
11076
- className: "plc-font-bold pelcro-select-product-title"
11077
- }, product.name), /*#__PURE__*/React__default['default'].createElement("p", {
11078
- className: "plc-text-xs pelcro-select-product-description"
11079
- }, product.description)), /*#__PURE__*/React__default['default'].createElement("div", {
11080
- className: "plc-flex plc-items-end plc-w-full plc-mt-3"
11081
- }, product.plans && /*#__PURE__*/React__default['default'].createElement("p", {
11082
- className: "plc-w-1/2 plc-text-xs pelcro-select-product-cost"
11083
- }, this.locale("labels.startingAt"), " ", this.countStartPrice(product.plans)), /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
11084
- onClick: productButtonCallback,
11085
- "data-key": product.id,
11086
- id: "pelcro-select-product-back-button",
11087
- className: "plc-ml-auto plc-text-xs"
11088
- }, i === 0 && {
11089
- autoFocus: true
11090
- }), productButtonLabel))));
11189
+ return productsToShow.map((product, index) => {
11190
+ return this.renderOneProduct(product, index);
11091
11191
  });
11092
11192
  });
11093
11193
 
11194
+ _defineProperty$3(this, "renderMatchingProductsFirst", () => {
11195
+ const isPlanMode = Boolean(this.state.mode === "plan");
11196
+
11197
+ if (isPlanMode) {
11198
+ return this.renderOneProduct(this.state.product);
11199
+ }
11200
+
11201
+ const [productsThatMatchArticleTag, allProductsMinusMatched] = productsWithMatchedTaggedFirst(); // Render normal products if there are no available matching products
11202
+
11203
+ if (!(productsThatMatchArticleTag !== null && productsThatMatchArticleTag !== void 0 && productsThatMatchArticleTag.length)) {
11204
+ return this.renderProducts();
11205
+ }
11206
+
11207
+ return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("h3", {
11208
+ className: "plc-text-sm plc-font-semibold"
11209
+ }, this.locale("labels.restrictiveArticles.subscribeTo")), productsThatMatchArticleTag.map((product, index) => this.renderOneProduct(product, index, {
11210
+ emphasize: true
11211
+ })), (allProductsMinusMatched === null || allProductsMinusMatched === void 0 ? void 0 : allProductsMinusMatched.length) > 0 && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("hr", {
11212
+ className: "plc-my-4"
11213
+ }), /*#__PURE__*/React__default['default'].createElement("h3", {
11214
+ className: "plc-text-sm plc-font-semibold"
11215
+ }, this.locale("labels.restrictiveArticles.or")), allProductsMinusMatched.map((product, index) => this.renderOneProduct(product, index))));
11216
+
11217
+ function productsWithMatchedTaggedFirst() {
11218
+ var _window$Pelcro$produc;
11219
+
11220
+ const allProducts = (_window$Pelcro$produc = window.Pelcro.product.list()) !== null && _window$Pelcro$produc !== void 0 ? _window$Pelcro$produc : [];
11221
+ const productsThatMatchArticleTag = window.Pelcro.product.getByMatchingPageTags();
11222
+ const allProductsMinusMatched = allProducts.filter(product => !productsThatMatchArticleTag.some(matchedProduct => matchedProduct.id === product.id));
11223
+ return [productsThatMatchArticleTag, allProductsMinusMatched];
11224
+ }
11225
+ });
11226
+
11094
11227
  _defineProperty$3(this, "renderPlans", () => {
11095
11228
  return this.state.planList.map(plan => {
11096
11229
  const isChecked = this.state.plan.id === plan.id ? true : false;
@@ -11217,7 +11350,7 @@ class SelectModal extends React.Component {
11217
11350
  }
11218
11351
 
11219
11352
  render() {
11220
- var _window$Pelcro$produc, _window$Pelcro$produc2;
11353
+ var _window$Pelcro$produc2, _window$Pelcro$produc3, _window$Pelcro$site$r;
11221
11354
 
11222
11355
  const {
11223
11356
  disableGifting
@@ -11251,9 +11384,9 @@ class SelectModal extends React.Component {
11251
11384
  className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
11252
11385
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
11253
11386
  className: "plc-text-2xl plc-font-semibold"
11254
- }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc === void 0 ? void 0 : _window$Pelcro$produc.paywall.select_title)), /*#__PURE__*/React__default['default'].createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_subtitle))), /*#__PURE__*/React__default['default'].createElement("div", {
11387
+ }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default['default'].createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle))), /*#__PURE__*/React__default['default'].createElement("div", {
11255
11388
  className: "pelcro-select-products-wrapper"
11256
- }, this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11389
+ }, (_window$Pelcro$site$r = window.Pelcro.site.read()) !== null && _window$Pelcro$site$r !== void 0 && _window$Pelcro$site$r.restrictive_paywall_metatags_enabled ? this.renderMatchingProductsFirst() : this.renderProducts()), this.state.mode === "plan" && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11257
11390
  className: "plc-overflow-y-scroll plc-max-h-72 pelcro-select-plans-wrapper"
11258
11391
  }, this.renderPlans()), !disableGifting && /*#__PURE__*/React__default['default'].createElement("div", {
11259
11392
  className: "plc-flex plc-justify-center plc-mt-2"
@@ -12775,7 +12908,7 @@ class PaypalGateWay {
12775
12908
 
12776
12909
  /** @type {PaymentStateType} */
12777
12910
 
12778
- const initialState$d = {
12911
+ const initialState$e = {
12779
12912
  disableSubmit: false,
12780
12913
  isLoading: false,
12781
12914
  disableCouponButton: false,
@@ -12794,10 +12927,10 @@ const initialState$d = {
12794
12927
  content: ""
12795
12928
  }
12796
12929
  };
12797
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
12930
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
12798
12931
  const {
12799
- Provider: Provider$d
12800
- } = store$d;
12932
+ Provider: Provider$e
12933
+ } = store$e;
12801
12934
 
12802
12935
  const PaymentMethodContainerWithoutStripe = ({
12803
12936
  style,
@@ -12959,15 +13092,50 @@ const PaymentMethodContainerWithoutStripe = ({
12959
13092
  });
12960
13093
 
12961
13094
  if (err) {
13095
+ onFailure(err);
13096
+ dispatch({
13097
+ type: SET_COUPON_ERROR,
13098
+ payload: getErrorMessages(err)
13099
+ }); // remove current coupon
13100
+
13101
+ dispatch({
13102
+ type: SET_COUPON,
13103
+ payload: null
13104
+ });
12962
13105
  dispatch({
12963
13106
  type: SET_PERCENT_OFF,
12964
13107
  payload: ""
12965
13108
  });
12966
- onFailure(err);
12967
- return dispatch({
12968
- type: SET_COUPON_ERROR,
12969
- payload: getErrorMessages(err)
13109
+ dispatch({
13110
+ type: SET_UPDATED_PRICE,
13111
+ payload: null
13112
+ });
13113
+ dispatch({
13114
+ type: SET_TAX_AMOUNT,
13115
+ payload: null
12970
13116
  });
13117
+ const {
13118
+ currentPlan
13119
+ } = state;
13120
+
13121
+ if (currentPlan) {
13122
+ var _currentPlan$quantity;
13123
+
13124
+ const quantity = (_currentPlan$quantity = currentPlan.quantity) !== null && _currentPlan$quantity !== void 0 ? _currentPlan$quantity : 1;
13125
+ const price = currentPlan.amount;
13126
+ dispatch({
13127
+ type: SET_UPDATED_PRICE,
13128
+ // set original plan price
13129
+ payload: price * quantity
13130
+ });
13131
+ dispatch({
13132
+ type: UPDATE_PAYMENT_REQUEST
13133
+ }); // update the new amount with taxes if site has taxes enabled
13134
+
13135
+ updateTotalAmountWithTax();
13136
+ }
13137
+
13138
+ return;
12971
13139
  }
12972
13140
 
12973
13141
  dispatch({
@@ -13057,6 +13225,54 @@ const PaymentMethodContainerWithoutStripe = ({
13057
13225
 
13058
13226
  const debouncedApplyCouponCode = React.useRef(debounce(onApplyCouponCode, 1000)).current;
13059
13227
 
13228
+ const removeAppliedCoupon = state => {
13229
+ state.couponCode = "";
13230
+ dispatch({
13231
+ type: SET_COUPON_ERROR,
13232
+ payload: ""
13233
+ });
13234
+ dispatch({
13235
+ type: SHOW_COUPON_FIELD,
13236
+ payload: false
13237
+ });
13238
+ dispatch({
13239
+ type: SET_COUPON,
13240
+ payload: null
13241
+ });
13242
+ dispatch({
13243
+ type: SET_PERCENT_OFF,
13244
+ payload: ""
13245
+ });
13246
+ dispatch({
13247
+ type: SET_UPDATED_PRICE,
13248
+ payload: null
13249
+ });
13250
+ dispatch({
13251
+ type: SET_TAX_AMOUNT,
13252
+ payload: null
13253
+ });
13254
+ const {
13255
+ currentPlan
13256
+ } = state;
13257
+
13258
+ if (currentPlan) {
13259
+ var _currentPlan$quantity2;
13260
+
13261
+ const quantity = (_currentPlan$quantity2 = currentPlan.quantity) !== null && _currentPlan$quantity2 !== void 0 ? _currentPlan$quantity2 : 1;
13262
+ const price = currentPlan.amount;
13263
+ dispatch({
13264
+ type: SET_UPDATED_PRICE,
13265
+ // set original plan price
13266
+ payload: price * quantity
13267
+ });
13268
+ dispatch({
13269
+ type: UPDATE_PAYMENT_REQUEST
13270
+ }); // update the new amount with taxes if site has taxes enabled
13271
+
13272
+ updateTotalAmountWithTax();
13273
+ }
13274
+ };
13275
+
13060
13276
  const subscribe = (stripeSource, state, dispatch) => {
13061
13277
  const {
13062
13278
  couponCode
@@ -13674,6 +13890,9 @@ const PaymentMethodContainerWithoutStripe = ({
13674
13890
  disableCouponButton: true
13675
13891
  }, (state, dispatch) => onApplyCouponCode(state, dispatch));
13676
13892
 
13893
+ case REMOVE_APPLIED_COUPON:
13894
+ return lib_5(state, () => removeAppliedCoupon(state));
13895
+
13677
13896
  case SET_COUPON:
13678
13897
  return lib_7({ ...state,
13679
13898
  couponObject: action.payload
@@ -13702,21 +13921,21 @@ const PaymentMethodContainerWithoutStripe = ({
13702
13921
  default:
13703
13922
  return state;
13704
13923
  }
13705
- }, initialState$d);
13924
+ }, initialState$e);
13706
13925
  return /*#__PURE__*/React__default['default'].createElement("div", {
13707
13926
  style: { ...style
13708
13927
  },
13709
13928
  className: `pelcro-container pelcro-payment-container ${className}`
13710
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
13929
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
13711
13930
  value: {
13712
13931
  state,
13713
13932
  dispatch
13714
13933
  }
13715
13934
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
13716
- store: store$d,
13935
+ store: store$e,
13717
13936
  key: i
13718
13937
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13719
- store: store$d
13938
+ store: store$e
13720
13939
  })));
13721
13940
  };
13722
13941
 
@@ -13738,7 +13957,7 @@ const PaymentMethodContainer = props => {
13738
13957
  stripeAccount: window.Pelcro.site.read().account_id,
13739
13958
  locale: getPageOrDefaultLanguage()
13740
13959
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
13741
- store: store$d
13960
+ store: store$e
13742
13961
  }, props))));
13743
13962
  }
13744
13963
 
@@ -13791,7 +14010,7 @@ const PelcroPaymentRequestButton = props => {
13791
14010
  currentPlan,
13792
14011
  updatedPrice
13793
14012
  }
13794
- } = React.useContext(store$d);
14013
+ } = React.useContext(store$e);
13795
14014
 
13796
14015
  const updatePaymentRequest = () => {
13797
14016
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -13842,12 +14061,16 @@ const DiscountedPrice = props => {
13842
14061
  var _order$currency, _order$, _plan$quantity;
13843
14062
 
13844
14063
  const {
14064
+ t
14065
+ } = useTranslation("checkoutForm");
14066
+ const {
14067
+ dispatch,
13845
14068
  state: {
13846
14069
  updatedPrice,
13847
14070
  taxAmount,
13848
14071
  percentOff
13849
14072
  }
13850
- } = React.useContext(store$d);
14073
+ } = React.useContext(store$e);
13851
14074
  const {
13852
14075
  order,
13853
14076
  plan
@@ -13857,12 +14080,22 @@ const DiscountedPrice = props => {
13857
14080
  const discountedPriceWithoutTax = updatedPrice - taxAmount;
13858
14081
  const priceFormatted = getFormattedPriceByLocal(order ? updatedPrice : discountedPriceWithoutTax * planQuantity, ecommOrderCurrency !== null && ecommOrderCurrency !== void 0 ? ecommOrderCurrency : plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
13859
14082
 
14083
+ const onCouponRemove = () => {
14084
+ dispatch({
14085
+ type: REMOVE_APPLIED_COUPON
14086
+ });
14087
+ };
14088
+
13860
14089
  if (percentOff) {
13861
14090
  return /*#__PURE__*/React__default['default'].createElement("div", Object.assign({
13862
- className: "plc-flex plc-justify-center plc-mt-2 pelcro-discount"
13863
- }, props), "(-", percentOff, ")", " ", /*#__PURE__*/React__default['default'].createElement("span", {
13864
- className: "plc-font-bold pelcro-discounted-price"
13865
- }, priceFormatted));
14091
+ className: "plc-flex plc-items-center plc-justify-center plc-mt-2 pelcro-discount"
14092
+ }, props), "(-", percentOff, ")", /*#__PURE__*/React__default['default'].createElement("span", {
14093
+ className: "plc-ml-1 plc-font-bold pelcro-discounted-price"
14094
+ }, priceFormatted), /*#__PURE__*/React__default['default'].createElement(Button, {
14095
+ variant: "ghost",
14096
+ className: "plc-ml-2 plc-text-red-500 focus:plc-ring-red-500 pelcro-dashboard-sub-cancel-button",
14097
+ onClick: onCouponRemove
14098
+ }, "\u2715 ", t("labels.removeCoupon")));
13866
14099
  }
13867
14100
 
13868
14101
  return "";
@@ -13887,7 +14120,7 @@ const SubmitPaymentMethod = ({
13887
14120
  isLoading,
13888
14121
  updatedPrice
13889
14122
  }
13890
- } = React.useContext(store$d);
14123
+ } = React.useContext(store$e);
13891
14124
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
13892
14125
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
13893
14126
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -13908,17 +14141,17 @@ const SubmitPaymentMethod = ({
13908
14141
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
13909
14142
  };
13910
14143
 
13911
- var _path$j;
14144
+ var _path$l;
13912
14145
 
13913
- 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); }
14146
+ 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); }
13914
14147
 
13915
14148
  function SvgArrowLeft(props) {
13916
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14149
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
13917
14150
  xmlns: "http://www.w3.org/2000/svg",
13918
14151
  fill: "none",
13919
14152
  viewBox: "0 0 24 24",
13920
14153
  stroke: "currentColor"
13921
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14154
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
13922
14155
  strokeLinecap: "round",
13923
14156
  strokeLinejoin: "round",
13924
14157
  strokeWidth: 2,
@@ -13937,7 +14170,7 @@ const ApplyCouponButton = ({
13937
14170
  disableCouponButton
13938
14171
  },
13939
14172
  dispatch
13940
- } = React.useContext(store$d);
14173
+ } = React.useContext(store$e);
13941
14174
  const {
13942
14175
  t
13943
14176
  } = useTranslation("checkoutForm");
@@ -13971,7 +14204,7 @@ const CouponCodeField = props => {
13971
14204
  couponCode,
13972
14205
  couponError
13973
14206
  }
13974
- } = React.useContext(store$d);
14207
+ } = React.useContext(store$e);
13975
14208
 
13976
14209
  const onCouponCodeChange = e => {
13977
14210
  dispatch({
@@ -14000,17 +14233,17 @@ const CouponCodeField = props => {
14000
14233
  }, props));
14001
14234
  };
14002
14235
 
14003
- var _path$i;
14236
+ var _path$k;
14004
14237
 
14005
- 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); }
14238
+ 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); }
14006
14239
 
14007
14240
  function SvgTicket(props) {
14008
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14241
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
14009
14242
  xmlns: "http://www.w3.org/2000/svg",
14010
14243
  fill: "none",
14011
14244
  viewBox: "0 0 24 24",
14012
14245
  stroke: "currentColor"
14013
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14246
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
14014
14247
  strokeLinecap: "round",
14015
14248
  strokeLinejoin: "round",
14016
14249
  strokeWidth: 2,
@@ -14027,7 +14260,7 @@ const CouponCode = ({
14027
14260
  state: {
14028
14261
  enableCouponField
14029
14262
  }
14030
- } = React.useContext(store$d);
14263
+ } = React.useContext(store$e);
14031
14264
  const {
14032
14265
  t
14033
14266
  } = useTranslation("checkoutForm");
@@ -14284,7 +14517,7 @@ const PaypalSubscribeButton = props => {
14284
14517
  const {
14285
14518
  dispatch,
14286
14519
  state
14287
- } = React.useContext(store$d);
14520
+ } = React.useContext(store$e);
14288
14521
  const {
14289
14522
  product,
14290
14523
  plan,
@@ -14369,16 +14602,16 @@ const BankRedirection = () => {
14369
14602
  }));
14370
14603
  };
14371
14604
 
14372
- var _path$h;
14605
+ var _path$j;
14373
14606
 
14374
- 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); }
14607
+ 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); }
14375
14608
 
14376
14609
  function SvgLock(props) {
14377
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
14610
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
14378
14611
  xmlns: "http://www.w3.org/2000/svg",
14379
14612
  viewBox: "0 0 20 20",
14380
14613
  fill: "currentColor"
14381
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
14614
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
14382
14615
  fillRule: "evenodd",
14383
14616
  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",
14384
14617
  clipRule: "evenodd"
@@ -14395,7 +14628,7 @@ const SelectedPaymentMethod = () => {
14395
14628
  state: {
14396
14629
  isLoading
14397
14630
  }
14398
- } = React.useContext(store$d);
14631
+ } = React.useContext(store$e);
14399
14632
  const {
14400
14633
  switchView,
14401
14634
  selectedPaymentMethodId
@@ -14437,7 +14670,7 @@ const TaxAmount = () => {
14437
14670
  state: {
14438
14671
  taxAmount
14439
14672
  }
14440
- } = React.useContext(store$d);
14673
+ } = React.useContext(store$e);
14441
14674
  const {
14442
14675
  plan
14443
14676
  } = usePelcro();
@@ -14600,12 +14833,12 @@ function SubscriptionRenewModal({
14600
14833
  }
14601
14834
  SubscriptionRenewModal.viewId = "subscription-renew";
14602
14835
 
14603
- var _path$g;
14836
+ var _path$i;
14604
14837
 
14605
- 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); }
14838
+ 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); }
14606
14839
 
14607
14840
  function SvgGift(props) {
14608
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
14841
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
14609
14842
  className: "plc-w-6 plc-h-6 plc-mr-2",
14610
14843
  fill: "none",
14611
14844
  stroke: "currentColor",
@@ -14614,7 +14847,7 @@ function SvgGift(props) {
14614
14847
  strokeWidth: 2,
14615
14848
  viewBox: "0 0 24 24",
14616
14849
  xmlns: "http://www.w3.org/2000/svg"
14617
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
14850
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
14618
14851
  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"
14619
14852
  })));
14620
14853
  }
@@ -14945,7 +15178,7 @@ class DefaultNewsLetter extends React.Component {
14945
15178
 
14946
15179
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
14947
15180
 
14948
- const initialState$c = {
15181
+ const initialState$d = {
14949
15182
  didSubToNewslettersBefore: false,
14950
15183
  newsletters: [],
14951
15184
  isListLoading: true,
@@ -14955,10 +15188,10 @@ const initialState$c = {
14955
15188
  content: ""
14956
15189
  }
14957
15190
  };
14958
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
15191
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
14959
15192
  const {
14960
- Provider: Provider$c
14961
- } = store$c;
15193
+ Provider: Provider$d
15194
+ } = store$d;
14962
15195
 
14963
15196
  const NewsletterUpdateContainer = ({
14964
15197
  style,
@@ -15071,7 +15304,7 @@ const NewsletterUpdateContainer = ({
15071
15304
  default:
15072
15305
  return state;
15073
15306
  }
15074
- }, initialState$c);
15307
+ }, initialState$d);
15075
15308
  React.useEffect(() => {
15076
15309
  const getUserNewsletters = () => {
15077
15310
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -15115,7 +15348,7 @@ const NewsletterUpdateContainer = ({
15115
15348
  style: { ...style
15116
15349
  },
15117
15350
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
15118
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15351
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
15119
15352
  value: {
15120
15353
  state,
15121
15354
  dispatch
@@ -15123,12 +15356,12 @@ const NewsletterUpdateContainer = ({
15123
15356
  }, children.length ? children.map((child, i) => {
15124
15357
  if (child) {
15125
15358
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
15126
- store: store$c,
15359
+ store: store$d,
15127
15360
  key: i
15128
15361
  });
15129
15362
  }
15130
15363
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15131
- store: store$c
15364
+ store: store$d
15132
15365
  })));
15133
15366
  };
15134
15367
 
@@ -15143,7 +15376,7 @@ const NewsletterUpdateButton = ({
15143
15376
  isSubmitting,
15144
15377
  isListLoading
15145
15378
  }
15146
- } = React.useContext(store$c);
15379
+ } = React.useContext(store$d);
15147
15380
  const {
15148
15381
  t
15149
15382
  } = useTranslation("newsletter");
@@ -15173,7 +15406,7 @@ const NewsletterUpdateList = () => {
15173
15406
  newsletters,
15174
15407
  isListLoading
15175
15408
  }
15176
- } = React.useContext(store$c);
15409
+ } = React.useContext(store$d);
15177
15410
 
15178
15411
  if (isListLoading) {
15179
15412
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -15377,7 +15610,7 @@ function SubscriptionCreateModal({
15377
15610
  SubscriptionCreateModal.viewId = "subscription-create";
15378
15611
 
15379
15612
  var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
15380
- const initialState$b = {
15613
+ const initialState$c = {
15381
15614
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
15382
15615
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
15383
15616
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
@@ -15390,10 +15623,10 @@ const initialState$b = {
15390
15623
  content: ""
15391
15624
  }
15392
15625
  };
15393
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
15626
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
15394
15627
  const {
15395
- Provider: Provider$b
15396
- } = store$b;
15628
+ Provider: Provider$c
15629
+ } = store$c;
15397
15630
 
15398
15631
  const UserUpdateContainer = ({
15399
15632
  style,
@@ -15525,27 +15758,27 @@ const UserUpdateContainer = ({
15525
15758
  default:
15526
15759
  return state;
15527
15760
  }
15528
- }, initialState$b);
15761
+ }, initialState$c);
15529
15762
  return /*#__PURE__*/React__default['default'].createElement("div", {
15530
15763
  style: { ...style
15531
15764
  },
15532
15765
  className: `pelcro-container pelcro-user-update-container ${className}`
15533
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
15766
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
15534
15767
  value: {
15535
15768
  state,
15536
15769
  dispatch
15537
15770
  }
15538
15771
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
15539
- store: store$b,
15772
+ store: store$c,
15540
15773
  key: i
15541
15774
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
15542
- store: store$b
15775
+ store: store$c
15543
15776
  })));
15544
15777
  };
15545
15778
 
15546
15779
  const UserUpdateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
15547
15780
  disabled: true,
15548
- store: store$b
15781
+ store: store$c
15549
15782
  }, props));
15550
15783
 
15551
15784
  const UserUpdateButton = ({
@@ -15558,7 +15791,7 @@ const UserUpdateButton = ({
15558
15791
  buttonDisabled
15559
15792
  },
15560
15793
  dispatch
15561
- } = React.useContext(store$b);
15794
+ } = React.useContext(store$c);
15562
15795
  const {
15563
15796
  t
15564
15797
  } = useTranslation("userEdit");
@@ -15575,11 +15808,11 @@ const UserUpdateButton = ({
15575
15808
  };
15576
15809
 
15577
15810
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
15578
- store: store$b
15811
+ store: store$c
15579
15812
  }, props));
15580
15813
 
15581
15814
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
15582
- store: store$b
15815
+ store: store$c
15583
15816
  }, props));
15584
15817
 
15585
15818
  function Phone({
@@ -15608,22 +15841,22 @@ function Phone({
15608
15841
  }
15609
15842
 
15610
15843
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
15611
- store: store$b
15844
+ store: store$c
15612
15845
  }, props));
15613
15846
 
15614
15847
  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";
15615
15848
 
15616
- var _path$f;
15849
+ var _path$h;
15617
15850
 
15618
- 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); }
15851
+ 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); }
15619
15852
 
15620
15853
  function SvgEdit(props) {
15621
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
15854
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
15622
15855
  className: "plc-w-6 plc-h-6",
15623
15856
  xmlns: "http://www.w3.org/2000/svg",
15624
15857
  viewBox: "0 0 20 20",
15625
15858
  fill: "currentColor"
15626
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
15859
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
15627
15860
  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"
15628
15861
  })));
15629
15862
  }
@@ -15755,16 +15988,16 @@ function DisplayName({
15755
15988
  }
15756
15989
 
15757
15990
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
15758
- store: store$b
15991
+ store: store$c
15759
15992
  }, props));
15760
15993
 
15761
15994
  const UserUpdateTextInput = props => {
15762
15995
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
15763
- store: store$b
15996
+ store: store$c
15764
15997
  }));
15765
15998
  };
15766
15999
 
15767
- const initialState$a = {
16000
+ const initialState$b = {
15768
16001
  isSubmitting: false,
15769
16002
  firstName: "",
15770
16003
  firstNameError: "",
@@ -15789,10 +16022,10 @@ const initialState$a = {
15789
16022
  content: ""
15790
16023
  }
15791
16024
  };
15792
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
16025
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
15793
16026
  const {
15794
- Provider: Provider$a
15795
- } = store$a;
16027
+ Provider: Provider$b
16028
+ } = store$b;
15796
16029
 
15797
16030
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
15798
16031
 
@@ -15999,7 +16232,7 @@ const AddressCreateContainer = ({
15999
16232
  default:
16000
16233
  return state;
16001
16234
  }
16002
- }, initialState$a);
16235
+ }, initialState$b);
16003
16236
  React.useEffect(() => {
16004
16237
  const getStates = () => {
16005
16238
  dispatch({
@@ -16031,16 +16264,16 @@ const AddressCreateContainer = ({
16031
16264
  style: { ...style
16032
16265
  },
16033
16266
  className: `pelcro-container pelcro-address-create-container ${className}`
16034
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16267
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
16035
16268
  value: {
16036
16269
  state,
16037
16270
  dispatch
16038
16271
  }
16039
16272
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16040
- store: store$a,
16273
+ store: store$b,
16041
16274
  key: i
16042
16275
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16043
- store: store$a
16276
+ store: store$b
16044
16277
  })));
16045
16278
  };
16046
16279
 
@@ -16051,7 +16284,7 @@ function AddressCreateFirstName(props) {
16051
16284
  firstName,
16052
16285
  firstNameError
16053
16286
  }
16054
- } = React.useContext(store$a);
16287
+ } = React.useContext(store$b);
16055
16288
 
16056
16289
  const handleBlur = () => {
16057
16290
  return dispatch({
@@ -16094,7 +16327,7 @@ function AddressCreateLastName(props) {
16094
16327
  lastName,
16095
16328
  lastNameError
16096
16329
  }
16097
- } = React.useContext(store$a);
16330
+ } = React.useContext(store$b);
16098
16331
 
16099
16332
  const handleBlur = () => {
16100
16333
  return dispatch({
@@ -16137,7 +16370,7 @@ function AddressCreateLine1(props) {
16137
16370
  line1,
16138
16371
  line1Error
16139
16372
  }
16140
- } = React.useContext(store$a);
16373
+ } = React.useContext(store$b);
16141
16374
 
16142
16375
  const handleBlur = () => {
16143
16376
  return dispatch({
@@ -16180,7 +16413,7 @@ function AddressCreateCity(props) {
16180
16413
  city,
16181
16414
  cityError
16182
16415
  }
16183
- } = React.useContext(store$a);
16416
+ } = React.useContext(store$b);
16184
16417
 
16185
16418
  const handleBlur = () => {
16186
16419
  return dispatch({
@@ -16223,7 +16456,7 @@ function AddressCreatePostalCode(props) {
16223
16456
  postalCode,
16224
16457
  postalCodeError
16225
16458
  }
16226
- } = React.useContext(store$a);
16459
+ } = React.useContext(store$b);
16227
16460
 
16228
16461
  const handleBlur = () => {
16229
16462
  return dispatch({
@@ -16269,7 +16502,7 @@ const AddressCreateSubmit = ({
16269
16502
  state: {
16270
16503
  isSubmitting
16271
16504
  }
16272
- } = React.useContext(store$a);
16505
+ } = React.useContext(store$b);
16273
16506
  const {
16274
16507
  t
16275
16508
  } = useTranslation("address");
@@ -16380,7 +16613,7 @@ function CountrySelect({
16380
16613
  }
16381
16614
 
16382
16615
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16383
- store: store$a
16616
+ store: store$b
16384
16617
  }, props));
16385
16618
 
16386
16619
  function StateSelect({
@@ -16468,7 +16701,7 @@ function StateSelect({
16468
16701
  }
16469
16702
 
16470
16703
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
16471
- store: store$a
16704
+ store: store$b
16472
16705
  }, props));
16473
16706
 
16474
16707
  const AddressCreateView = props => {
@@ -16573,18 +16806,18 @@ AddressCreateModal.viewId = "address-create";
16573
16806
 
16574
16807
  const AddressCreateTextInput = props => {
16575
16808
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
16576
- store: store$a
16809
+ store: store$b
16577
16810
  }));
16578
16811
  };
16579
16812
 
16580
16813
  const AddressCreateLine2 = props => {
16581
16814
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
16582
16815
  fieldName: "line2",
16583
- store: store$a
16816
+ store: store$b
16584
16817
  }, props));
16585
16818
  };
16586
16819
 
16587
- const initialState$9 = {
16820
+ const initialState$a = {
16588
16821
  isSubmitting: false,
16589
16822
  firstName: "",
16590
16823
  firstNameError: "",
@@ -16609,10 +16842,10 @@ const initialState$9 = {
16609
16842
  content: ""
16610
16843
  }
16611
16844
  };
16612
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
16845
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
16613
16846
  const {
16614
- Provider: Provider$9
16615
- } = store$9;
16847
+ Provider: Provider$a
16848
+ } = store$a;
16616
16849
 
16617
16850
  const AddressUpdateContainer = ({
16618
16851
  style,
@@ -16664,7 +16897,7 @@ const AddressUpdateContainer = ({
16664
16897
  const thisAddress = addresses[address];
16665
16898
 
16666
16899
  if (+thisAddress.id === +addressId) {
16667
- const newState = { ...initialState$9,
16900
+ const newState = { ...initialState$a,
16668
16901
  firstName: thisAddress.first_name,
16669
16902
  lastName: thisAddress.last_name,
16670
16903
  line1: thisAddress.line1,
@@ -16797,7 +17030,7 @@ const AddressUpdateContainer = ({
16797
17030
  default:
16798
17031
  return state;
16799
17032
  }
16800
- }, initialState$9);
17033
+ }, initialState$a);
16801
17034
  React.useEffect(() => {
16802
17035
  const getStates = () => {
16803
17036
  dispatch({
@@ -16829,21 +17062,21 @@ const AddressUpdateContainer = ({
16829
17062
  style: { ...style
16830
17063
  },
16831
17064
  className: `pelcro-container pelcro-address-update-container ${className}`
16832
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17065
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
16833
17066
  value: {
16834
17067
  state,
16835
17068
  dispatch
16836
17069
  }
16837
17070
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
16838
- store: store$9,
17071
+ store: store$a,
16839
17072
  key: i
16840
17073
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
16841
- store: store$9
17074
+ store: store$a
16842
17075
  })));
16843
17076
  };
16844
17077
 
16845
17078
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
16846
- store: store$9
17079
+ store: store$a
16847
17080
  }, props));
16848
17081
 
16849
17082
  function AddressUpdateFirstName(props) {
@@ -16853,7 +17086,7 @@ function AddressUpdateFirstName(props) {
16853
17086
  firstName,
16854
17087
  firstNameError
16855
17088
  }
16856
- } = React.useContext(store$9);
17089
+ } = React.useContext(store$a);
16857
17090
 
16858
17091
  const handleBlur = () => {
16859
17092
  return dispatch({
@@ -16896,7 +17129,7 @@ function AddressUpdateLastName(props) {
16896
17129
  lastName,
16897
17130
  lastNameError
16898
17131
  }
16899
- } = React.useContext(store$9);
17132
+ } = React.useContext(store$a);
16900
17133
 
16901
17134
  const handleBlur = () => {
16902
17135
  return dispatch({
@@ -16939,7 +17172,7 @@ function AddressUpdateLine1(props) {
16939
17172
  line1,
16940
17173
  line1Error
16941
17174
  }
16942
- } = React.useContext(store$9);
17175
+ } = React.useContext(store$a);
16943
17176
 
16944
17177
  const handleBlur = () => {
16945
17178
  return dispatch({
@@ -16979,7 +17212,7 @@ const AddressUpdateLine2 = props => {
16979
17212
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
16980
17213
  fieldName: "line2"
16981
17214
  }, props, {
16982
- store: store$9
17215
+ store: store$a
16983
17216
  }));
16984
17217
  };
16985
17218
 
@@ -16990,7 +17223,7 @@ function AddressUpdateCity(props) {
16990
17223
  city,
16991
17224
  cityError
16992
17225
  }
16993
- } = React.useContext(store$9);
17226
+ } = React.useContext(store$a);
16994
17227
 
16995
17228
  const handleBlur = () => {
16996
17229
  return dispatch({
@@ -17033,7 +17266,7 @@ function AddressUpdatePostalCode(props) {
17033
17266
  postalCode,
17034
17267
  postalCodeError
17035
17268
  }
17036
- } = React.useContext(store$9);
17269
+ } = React.useContext(store$a);
17037
17270
 
17038
17271
  const handleBlur = () => {
17039
17272
  return dispatch({
@@ -17079,7 +17312,7 @@ const AddressUpdateSubmit = ({
17079
17312
  state: {
17080
17313
  isSubmitting
17081
17314
  }
17082
- } = React.useContext(store$9);
17315
+ } = React.useContext(store$a);
17083
17316
  const {
17084
17317
  t
17085
17318
  } = useTranslation("address");
@@ -17095,7 +17328,7 @@ const AddressUpdateSubmit = ({
17095
17328
  };
17096
17329
 
17097
17330
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
17098
- store: store$9
17331
+ store: store$a
17099
17332
  }, props));
17100
17333
 
17101
17334
  const AddressUpdateView = props => {
@@ -17178,7 +17411,7 @@ AddressUpdateModal.viewId = "address-edit";
17178
17411
 
17179
17412
  const AddressUpdateTextInput = props => {
17180
17413
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
17181
- store: store$9
17414
+ store: store$a
17182
17415
  }));
17183
17416
  };
17184
17417
 
@@ -17261,7 +17494,7 @@ const PaymentMethodUpdateModal = props => {
17261
17494
  };
17262
17495
  PaymentMethodUpdateModal.viewId = "payment-method-update";
17263
17496
 
17264
- const initialState$8 = {
17497
+ const initialState$9 = {
17265
17498
  email: "",
17266
17499
  password: "",
17267
17500
  passwordError: null,
@@ -17274,10 +17507,10 @@ const initialState$8 = {
17274
17507
  content: ""
17275
17508
  }
17276
17509
  };
17277
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17510
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
17278
17511
  const {
17279
- Provider: Provider$8
17280
- } = store$8;
17512
+ Provider: Provider$9
17513
+ } = store$9;
17281
17514
 
17282
17515
  const PasswordResetContainer = ({
17283
17516
  style,
@@ -17334,7 +17567,7 @@ const PasswordResetContainer = ({
17334
17567
  type: SET_EMAIL,
17335
17568
  payload: window.Pelcro.helpers.getURLParameter("email")
17336
17569
  });
17337
- initialState$8.email = window.Pelcro.helpers.getURLParameter("email");
17570
+ initialState$9.email = window.Pelcro.helpers.getURLParameter("email");
17338
17571
  dispatch({
17339
17572
  type: SET_TOKEN,
17340
17573
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -17394,26 +17627,26 @@ const PasswordResetContainer = ({
17394
17627
  default:
17395
17628
  return state;
17396
17629
  }
17397
- }, initialState$8);
17630
+ }, initialState$9);
17398
17631
  return /*#__PURE__*/React__default['default'].createElement("div", {
17399
17632
  style: { ...style
17400
17633
  },
17401
17634
  className: `pelcro-container pelcro-password-reset-container ${className}`
17402
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17635
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
17403
17636
  value: {
17404
17637
  state,
17405
17638
  dispatch
17406
17639
  }
17407
17640
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17408
- store: store$8,
17641
+ store: store$9,
17409
17642
  key: i
17410
17643
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17411
- store: store$8
17644
+ store: store$9
17412
17645
  })));
17413
17646
  };
17414
17647
 
17415
17648
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
17416
- store: store$8
17649
+ store: store$9
17417
17650
  }, props));
17418
17651
 
17419
17652
  const PasswordResetButton = ({
@@ -17426,7 +17659,7 @@ const PasswordResetButton = ({
17426
17659
  buttonDisabled
17427
17660
  },
17428
17661
  dispatch
17429
- } = React.useContext(store$8);
17662
+ } = React.useContext(store$9);
17430
17663
  const {
17431
17664
  t
17432
17665
  } = useTranslation("passwordReset");
@@ -17443,14 +17676,14 @@ const PasswordResetButton = ({
17443
17676
  };
17444
17677
 
17445
17678
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17446
- store: store$8
17679
+ store: store$9
17447
17680
  }, props, {
17448
17681
  value: window.Pelcro.helpers.getURLParameter("email"),
17449
17682
  disabled: true
17450
17683
  }));
17451
17684
 
17452
17685
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
17453
- store: store$8
17686
+ store: store$9
17454
17687
  }, props));
17455
17688
 
17456
17689
  const PasswordResetView = props => {
@@ -17502,7 +17735,7 @@ const PasswordResetModal = ({
17502
17735
  };
17503
17736
  PasswordResetModal.viewId = "password-reset";
17504
17737
 
17505
- const initialState$7 = {
17738
+ const initialState$8 = {
17506
17739
  email: "",
17507
17740
  emailError: null,
17508
17741
  buttonDisabled: false,
@@ -17511,10 +17744,10 @@ const initialState$7 = {
17511
17744
  content: ""
17512
17745
  }
17513
17746
  };
17514
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17747
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
17515
17748
  const {
17516
- Provider: Provider$7
17517
- } = store$7;
17749
+ Provider: Provider$8
17750
+ } = store$8;
17518
17751
 
17519
17752
  const PasswordForgotContainer = ({
17520
17753
  style,
@@ -17592,21 +17825,21 @@ const PasswordForgotContainer = ({
17592
17825
  default:
17593
17826
  return state;
17594
17827
  }
17595
- }, initialState$7);
17828
+ }, initialState$8);
17596
17829
  return /*#__PURE__*/React__default['default'].createElement("div", {
17597
17830
  style: { ...style
17598
17831
  },
17599
17832
  className: `pelcro-container pelcro-password-forgot-container ${className}`
17600
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
17833
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
17601
17834
  value: {
17602
17835
  state,
17603
17836
  dispatch
17604
17837
  }
17605
17838
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17606
- store: store$7,
17839
+ store: store$8,
17607
17840
  key: i
17608
17841
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17609
- store: store$7
17842
+ store: store$8
17610
17843
  })));
17611
17844
  };
17612
17845
 
@@ -17622,7 +17855,7 @@ const PasswordForgotButton = ({
17622
17855
  emailError
17623
17856
  },
17624
17857
  dispatch
17625
- } = React.useContext(store$7);
17858
+ } = React.useContext(store$8);
17626
17859
  const {
17627
17860
  t
17628
17861
  } = useTranslation("passwordForgot");
@@ -17643,7 +17876,7 @@ const PasswordForgotButton = ({
17643
17876
  };
17644
17877
 
17645
17878
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
17646
- store: store$7
17879
+ store: store$8
17647
17880
  }, props));
17648
17881
 
17649
17882
  const PasswordForgotView = props => {
@@ -17693,7 +17926,7 @@ const PasswordForgotModal = ({
17693
17926
  };
17694
17927
  PasswordForgotModal.viewId = "password-forgot";
17695
17928
 
17696
- const initialState$6 = {
17929
+ const initialState$7 = {
17697
17930
  currentPassword: "",
17698
17931
  newPassword: "",
17699
17932
  confirmNewPassword: "",
@@ -17707,10 +17940,10 @@ const initialState$6 = {
17707
17940
  content: ""
17708
17941
  }
17709
17942
  };
17710
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
17943
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
17711
17944
  const {
17712
- Provider: Provider$6
17713
- } = store$6;
17945
+ Provider: Provider$7
17946
+ } = store$7;
17714
17947
  const PasswordChangeContainer = ({
17715
17948
  style,
17716
17949
  className = "",
@@ -17862,21 +18095,21 @@ const PasswordChangeContainer = ({
17862
18095
  default:
17863
18096
  return state;
17864
18097
  }
17865
- }, initialState$6);
18098
+ }, initialState$7);
17866
18099
  return /*#__PURE__*/React__default['default'].createElement("div", {
17867
18100
  style: { ...style
17868
18101
  },
17869
18102
  className: `pelcro-container pelcro-password-change-container ${className}`
17870
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18103
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
17871
18104
  value: {
17872
18105
  state,
17873
18106
  dispatch
17874
18107
  }
17875
18108
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
17876
- store: store$6,
18109
+ store: store$7,
17877
18110
  key: i
17878
18111
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
17879
- store: store$6
18112
+ store: store$7
17880
18113
  })));
17881
18114
  };
17882
18115
 
@@ -17887,7 +18120,7 @@ function PasswordChangeCurrentPassword(props) {
17887
18120
  currentPassword,
17888
18121
  currentPasswordError
17889
18122
  }
17890
- } = React.useContext(store$6);
18123
+ } = React.useContext(store$7);
17891
18124
  const handleBlur = React.useCallback(() => {
17892
18125
  return dispatch({
17893
18126
  type: VALIDATE_PASSWORD
@@ -17921,7 +18154,7 @@ function PasswordChangeNewPassword(props) {
17921
18154
  newPassword,
17922
18155
  newPasswordError
17923
18156
  }
17924
- } = React.useContext(store$6);
18157
+ } = React.useContext(store$7);
17925
18158
  const handleBlur = React.useCallback(() => {
17926
18159
  return dispatch({
17927
18160
  type: VALIDATE_NEW_PASSWORD
@@ -17955,7 +18188,7 @@ function PasswordChangeConfirmNewPassword(props) {
17955
18188
  confirmNewPassword,
17956
18189
  confirmNewPasswordError
17957
18190
  }
17958
- } = React.useContext(store$6);
18191
+ } = React.useContext(store$7);
17959
18192
  const handleBlur = React.useCallback(() => {
17960
18193
  return dispatch({
17961
18194
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -17996,7 +18229,7 @@ const PasswordChangeButton = ({
17996
18229
  confirmNewPasswordError
17997
18230
  },
17998
18231
  dispatch
17999
- } = React.useContext(store$6);
18232
+ } = React.useContext(store$7);
18000
18233
  const {
18001
18234
  t
18002
18235
  } = useTranslation("passwordChange");
@@ -18062,17 +18295,17 @@ const PasswordChangeModal = ({
18062
18295
  };
18063
18296
  PasswordChangeModal.viewId = "password-change";
18064
18297
 
18065
- const initialState$5 = {
18298
+ const initialState$6 = {
18066
18299
  buttonDisabled: false,
18067
18300
  alert: {
18068
18301
  type: "error",
18069
18302
  content: ""
18070
18303
  }
18071
18304
  };
18072
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18305
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
18073
18306
  const {
18074
- Provider: Provider$5
18075
- } = store$5;
18307
+ Provider: Provider$6
18308
+ } = store$6;
18076
18309
 
18077
18310
  const CartContainer = ({
18078
18311
  style,
@@ -18163,21 +18396,21 @@ const CartContainer = ({
18163
18396
  default:
18164
18397
  return state;
18165
18398
  }
18166
- }, initialState$5);
18399
+ }, initialState$6);
18167
18400
  return /*#__PURE__*/React__default['default'].createElement("div", {
18168
18401
  style: { ...style
18169
18402
  },
18170
18403
  className: `pelcro-container pelcro-cart-container ${className}`
18171
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18404
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
18172
18405
  value: {
18173
18406
  state,
18174
18407
  dispatch
18175
18408
  }
18176
18409
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18177
- store: store$5,
18410
+ store: store$6,
18178
18411
  key: i
18179
18412
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18180
- store: store$5
18413
+ store: store$6
18181
18414
  })));
18182
18415
  };
18183
18416
 
@@ -18214,7 +18447,7 @@ const CartSubmit = ({
18214
18447
  buttonDisabled
18215
18448
  },
18216
18449
  dispatch
18217
- } = React.useContext(store$5);
18450
+ } = React.useContext(store$6);
18218
18451
  const {
18219
18452
  t
18220
18453
  } = useTranslation("cart");
@@ -18245,7 +18478,7 @@ const CartTotalPrice = () => {
18245
18478
  state: {
18246
18479
  alert
18247
18480
  }
18248
- } = React.useContext(store$5);
18481
+ } = React.useContext(store$6);
18249
18482
  const {
18250
18483
  cartItems
18251
18484
  } = usePelcro();
@@ -18558,7 +18791,7 @@ const OrderConfirmModal = props => {
18558
18791
  };
18559
18792
  OrderConfirmModal.viewId = "order-confirm";
18560
18793
 
18561
- const initialState$4 = {
18794
+ const initialState$5 = {
18562
18795
  email: "",
18563
18796
  firstName: "",
18564
18797
  lastName: "",
@@ -18570,10 +18803,10 @@ const initialState$4 = {
18570
18803
  content: ""
18571
18804
  }
18572
18805
  };
18573
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
18806
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
18574
18807
  const {
18575
- Provider: Provider$4
18576
- } = store$4;
18808
+ Provider: Provider$5
18809
+ } = store$5;
18577
18810
 
18578
18811
  const GiftCreateContainer = ({
18579
18812
  style,
@@ -18677,21 +18910,21 @@ const GiftCreateContainer = ({
18677
18910
  default:
18678
18911
  return state;
18679
18912
  }
18680
- }, initialState$4);
18913
+ }, initialState$5);
18681
18914
  return /*#__PURE__*/React__default['default'].createElement("div", {
18682
18915
  style: { ...style
18683
18916
  },
18684
18917
  className: `pelcro-container pelcro-gift-create-container ${className}`
18685
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
18918
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
18686
18919
  value: {
18687
18920
  state,
18688
18921
  dispatch
18689
18922
  }
18690
18923
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
18691
- store: store$4,
18924
+ store: store$5,
18692
18925
  key: i
18693
18926
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
18694
- store: store$4
18927
+ store: store$5
18695
18928
  })));
18696
18929
  };
18697
18930
 
@@ -18705,7 +18938,7 @@ const GiftCreateSubmitButton = ({
18705
18938
  state: {
18706
18939
  disableSubmit
18707
18940
  }
18708
- } = React.useContext(store$4);
18941
+ } = React.useContext(store$5);
18709
18942
  const {
18710
18943
  t
18711
18944
  } = useTranslation("register");
@@ -18722,29 +18955,29 @@ const GiftCreateSubmitButton = ({
18722
18955
 
18723
18956
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
18724
18957
  initWithUserEmail: false,
18725
- store: store$4
18958
+ store: store$5
18726
18959
  }, props));
18727
18960
 
18728
18961
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
18729
- store: store$4
18962
+ store: store$5
18730
18963
  }, props));
18731
18964
 
18732
18965
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
18733
- store: store$4
18966
+ store: store$5
18734
18967
  }, props));
18735
18968
 
18736
- var _path$e;
18969
+ var _path$g;
18737
18970
 
18738
- 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); }
18971
+ 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); }
18739
18972
 
18740
18973
  function SvgInfoCircle(props) {
18741
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
18974
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
18742
18975
  xmlns: "http://www.w3.org/2000/svg",
18743
18976
  className: "plc-w-5 plc-h-5",
18744
18977
  fill: "none",
18745
18978
  viewBox: "0 0 24 24",
18746
18979
  stroke: "currentColor"
18747
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
18980
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
18748
18981
  strokeLinecap: "round",
18749
18982
  strokeLinejoin: "round",
18750
18983
  strokeWidth: 2,
@@ -18815,7 +19048,7 @@ const GiftCreateStartDate = props => {
18815
19048
  const {
18816
19049
  dispatch,
18817
19050
  state
18818
- } = React.useContext(store$4);
19051
+ } = React.useContext(store$5);
18819
19052
 
18820
19053
  const handleInputChange = value => {
18821
19054
  dispatch({
@@ -18886,7 +19119,7 @@ function GiftCreateMessage(props) {
18886
19119
  const {
18887
19120
  dispatch,
18888
19121
  state
18889
- } = React.useContext(store$4);
19122
+ } = React.useContext(store$5);
18890
19123
 
18891
19124
  const handleInputChange = value => {
18892
19125
  dispatch({
@@ -18902,7 +19135,7 @@ function GiftCreateMessage(props) {
18902
19135
  return /*#__PURE__*/React__default['default'].createElement(TextArea, Object.assign({
18903
19136
  onChange: e => handleInputChange(e.target.value),
18904
19137
  value: state.giftMessage,
18905
- maxLength: "500",
19138
+ maxLength: "200",
18906
19139
  rows: 3,
18907
19140
  tooltipText: t("gift.messages.giftMessageInfo")
18908
19141
  }, props));
@@ -19006,7 +19239,7 @@ const GiftCreateModal = ({
19006
19239
  };
19007
19240
  GiftCreateModal.viewId = "gift-create";
19008
19241
 
19009
- const initialState$3 = {
19242
+ const initialState$4 = {
19010
19243
  giftCode: "",
19011
19244
  buttonDisabled: true,
19012
19245
  alert: {
@@ -19014,10 +19247,10 @@ const initialState$3 = {
19014
19247
  content: ""
19015
19248
  }
19016
19249
  };
19017
- const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19250
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
19018
19251
  const {
19019
- Provider: Provider$3
19020
- } = store$3;
19252
+ Provider: Provider$4
19253
+ } = store$4;
19021
19254
 
19022
19255
  const GiftRedeemContainer = ({
19023
19256
  style,
@@ -19082,21 +19315,21 @@ const GiftRedeemContainer = ({
19082
19315
  default:
19083
19316
  return state;
19084
19317
  }
19085
- }, initialState$3);
19318
+ }, initialState$4);
19086
19319
  return /*#__PURE__*/React__default['default'].createElement("div", {
19087
19320
  style: { ...style
19088
19321
  },
19089
19322
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
19090
- }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19323
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
19091
19324
  value: {
19092
19325
  state,
19093
19326
  dispatch
19094
19327
  }
19095
19328
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19096
- store: store$3,
19329
+ store: store$4,
19097
19330
  key: i
19098
19331
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19099
- store: store$3
19332
+ store: store$4
19100
19333
  })));
19101
19334
  };
19102
19335
 
@@ -19133,7 +19366,7 @@ function GiftCode({
19133
19366
  }
19134
19367
 
19135
19368
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
19136
- store: store$3
19369
+ store: store$4
19137
19370
  }, props));
19138
19371
 
19139
19372
  const GiftRedeemSubmitButton = ({
@@ -19146,7 +19379,7 @@ const GiftRedeemSubmitButton = ({
19146
19379
  state: {
19147
19380
  disableSubmit
19148
19381
  }
19149
- } = React.useContext(store$3);
19382
+ } = React.useContext(store$4);
19150
19383
  const {
19151
19384
  t
19152
19385
  } = useTranslation("register");
@@ -19239,7 +19472,7 @@ const moveDefaultAddressToStart = addresses => {
19239
19472
  return [defaultAddress, ...addressesWithoutDefault];
19240
19473
  };
19241
19474
 
19242
- const initialState$2 = {
19475
+ const initialState$3 = {
19243
19476
  addresses: [],
19244
19477
  selectedAddressId: null,
19245
19478
  isSubmitting: false,
@@ -19248,10 +19481,10 @@ const initialState$2 = {
19248
19481
  content: ""
19249
19482
  }
19250
19483
  };
19251
- const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19484
+ const store$3 = /*#__PURE__*/React.createContext(initialState$3);
19252
19485
  const {
19253
- Provider: Provider$2
19254
- } = store$2;
19486
+ Provider: Provider$3
19487
+ } = store$3;
19255
19488
 
19256
19489
  const AddressSelectContainer = ({
19257
19490
  style,
@@ -19346,7 +19579,7 @@ const AddressSelectContainer = ({
19346
19579
  default:
19347
19580
  return state;
19348
19581
  }
19349
- }, initialState$2);
19582
+ }, initialState$3);
19350
19583
  React.useEffect(() => {
19351
19584
  var _window$Pelcro$user$r;
19352
19585
 
@@ -19359,16 +19592,16 @@ const AddressSelectContainer = ({
19359
19592
  style: { ...style
19360
19593
  },
19361
19594
  className: `pelcro-container pelcro-address-select-container ${className}`
19362
- }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19595
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$3, {
19363
19596
  value: {
19364
19597
  state,
19365
19598
  dispatch
19366
19599
  }
19367
19600
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19368
- store: store$2,
19601
+ store: store$3,
19369
19602
  key: i
19370
19603
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19371
- store: store$2
19604
+ store: store$3
19372
19605
  })));
19373
19606
  };
19374
19607
 
@@ -19379,7 +19612,7 @@ const AddressSelectList = () => {
19379
19612
  addresses,
19380
19613
  selectedAddressId
19381
19614
  }
19382
- } = React.useContext(store$2);
19615
+ } = React.useContext(store$3);
19383
19616
 
19384
19617
  const handleAddressSelect = event => {
19385
19618
  dispatch({
@@ -19423,7 +19656,7 @@ const AddressSelectSubmit = ({
19423
19656
  selectedAddressId,
19424
19657
  isSubmitting
19425
19658
  }
19426
- } = React.useContext(store$2);
19659
+ } = React.useContext(store$3);
19427
19660
  const {
19428
19661
  t
19429
19662
  } = useTranslation("address");
@@ -19514,7 +19747,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
19514
19747
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
19515
19748
  };
19516
19749
 
19517
- const initialState$1 = {
19750
+ const initialState$2 = {
19518
19751
  paymentMethods: [],
19519
19752
  selectedPaymentMethodId: null,
19520
19753
  isSubmitting: false,
@@ -19523,10 +19756,10 @@ const initialState$1 = {
19523
19756
  content: ""
19524
19757
  }
19525
19758
  };
19526
- const store$1 = /*#__PURE__*/React.createContext(initialState$1);
19759
+ const store$2 = /*#__PURE__*/React.createContext(initialState$2);
19527
19760
  const {
19528
- Provider: Provider$1
19529
- } = store$1;
19761
+ Provider: Provider$2
19762
+ } = store$2;
19530
19763
 
19531
19764
  const PaymentMethodSelectContainer = ({
19532
19765
  style,
@@ -19571,7 +19804,7 @@ const PaymentMethodSelectContainer = ({
19571
19804
  default:
19572
19805
  return state;
19573
19806
  }
19574
- }, initialState$1);
19807
+ }, initialState$2);
19575
19808
  React.useEffect(() => {
19576
19809
  var _window$Pelcro$user$r4;
19577
19810
 
@@ -19584,16 +19817,16 @@ const PaymentMethodSelectContainer = ({
19584
19817
  style: { ...style
19585
19818
  },
19586
19819
  className: `pelcro-container pelcro-payment-select-container ${className}`
19587
- }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
19820
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$2, {
19588
19821
  value: {
19589
19822
  state,
19590
19823
  dispatch
19591
19824
  }
19592
19825
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
19593
- store: store$1,
19826
+ store: store$2,
19594
19827
  key: i
19595
19828
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19596
- store: store$1
19829
+ store: store$2
19597
19830
  })));
19598
19831
  };
19599
19832
 
@@ -19607,7 +19840,7 @@ const PaymentMethodSelectList = () => {
19607
19840
  paymentMethods,
19608
19841
  selectedPaymentMethodId
19609
19842
  }
19610
- } = React.useContext(store$1);
19843
+ } = React.useContext(store$2);
19611
19844
 
19612
19845
  const handlePaymentMethodSelect = event => {
19613
19846
  dispatch({
@@ -19657,7 +19890,7 @@ const PaymentMethodSelectSubmit = ({
19657
19890
  selectedPaymentMethodId,
19658
19891
  isSubmitting
19659
19892
  }
19660
- } = React.useContext(store$1);
19893
+ } = React.useContext(store$2);
19661
19894
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
19662
19895
  onClick: () => {
19663
19896
  dispatch({
@@ -19731,8 +19964,8 @@ const PaymentMethodSelectModal = ({
19731
19964
  };
19732
19965
  PaymentMethodSelectModal.viewId = "payment-method-select";
19733
19966
 
19734
- function _extends$f() {
19735
- _extends$f = Object.assign || function (target) {
19967
+ function _extends$h() {
19968
+ _extends$h = Object.assign || function (target) {
19736
19969
  for (var i = 1; i < arguments.length; i++) {
19737
19970
  var source = arguments[i];
19738
19971
 
@@ -19746,7 +19979,7 @@ function _extends$f() {
19746
19979
  return target;
19747
19980
  };
19748
19981
 
19749
- return _extends$f.apply(this, arguments);
19982
+ return _extends$h.apply(this, arguments);
19750
19983
  }
19751
19984
 
19752
19985
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -19930,7 +20163,7 @@ function render(props, propsBag, defaultTag, features, visible) {
19930
20163
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
19931
20164
  return null;
19932
20165
  }, _match[RenderStrategy.Hidden] = function () {
19933
- return _render(_extends$f({}, _rest, {
20166
+ return _render(_extends$h({}, _rest, {
19934
20167
  hidden: true,
19935
20168
  style: {
19936
20169
  display: 'none'
@@ -20458,7 +20691,7 @@ function TransitionChild(props) {
20458
20691
  var passthroughProps = rest;
20459
20692
  return React__default['default'].createElement(NestingContext.Provider, {
20460
20693
  value: nesting
20461
- }, render(_extends$f({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20694
+ }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
20462
20695
  }
20463
20696
 
20464
20697
  function Transition(props) {
@@ -20502,7 +20735,7 @@ function Transition(props) {
20502
20735
  value: nestingBag
20503
20736
  }, React__default['default'].createElement(TransitionContext.Provider, {
20504
20737
  value: transitionBag
20505
- }, render(_extends$f({}, sharedProps, {
20738
+ }, render(_extends$h({}, sharedProps, {
20506
20739
  as: React.Fragment,
20507
20740
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
20508
20741
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -20629,12 +20862,12 @@ var ActionTypes;
20629
20862
  })(ActionTypes || (ActionTypes = {}));
20630
20863
 
20631
20864
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
20632
- return _extends$f({}, state, {
20865
+ return _extends$h({}, state, {
20633
20866
  activeItemIndex: null,
20634
20867
  menuState: MenuStates.Closed
20635
20868
  });
20636
20869
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
20637
- return _extends$f({}, state, {
20870
+ return _extends$h({}, state, {
20638
20871
  menuState: MenuStates.Open
20639
20872
  });
20640
20873
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -20653,7 +20886,7 @@ var ActionTypes;
20653
20886
  }
20654
20887
  });
20655
20888
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
20656
- return _extends$f({}, state, {
20889
+ return _extends$h({}, state, {
20657
20890
  searchQuery: '',
20658
20891
  activeItemIndex: activeItemIndex
20659
20892
  });
@@ -20664,19 +20897,19 @@ var ActionTypes;
20664
20897
 
20665
20898
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
20666
20899
  });
20667
- if (match === -1 || match === state.activeItemIndex) return _extends$f({}, state, {
20900
+ if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
20668
20901
  searchQuery: searchQuery
20669
20902
  });
20670
- return _extends$f({}, state, {
20903
+ return _extends$h({}, state, {
20671
20904
  searchQuery: searchQuery,
20672
20905
  activeItemIndex: match
20673
20906
  });
20674
20907
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
20675
- return _extends$f({}, state, {
20908
+ return _extends$h({}, state, {
20676
20909
  searchQuery: ''
20677
20910
  });
20678
20911
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
20679
- return _extends$f({}, state, {
20912
+ return _extends$h({}, state, {
20680
20913
  items: [].concat(state.items, [{
20681
20914
  id: action.id,
20682
20915
  dataRef: action.dataRef
@@ -20689,7 +20922,7 @@ var ActionTypes;
20689
20922
  return a.id === action.id;
20690
20923
  });
20691
20924
  if (idx !== -1) nextItems.splice(idx, 1);
20692
- return _extends$f({}, state, {
20925
+ return _extends$h({}, state, {
20693
20926
  items: nextItems,
20694
20927
  activeItemIndex: function () {
20695
20928
  if (idx === state.activeItemIndex) return null;
@@ -20728,19 +20961,19 @@ var ActionTypes$1;
20728
20961
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
20729
20962
  if (state.disabled) return state;
20730
20963
  if (state.listboxState === ListboxStates.Closed) return state;
20731
- return _extends$f({}, state, {
20964
+ return _extends$h({}, state, {
20732
20965
  activeOptionIndex: null,
20733
20966
  listboxState: ListboxStates.Closed
20734
20967
  });
20735
20968
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
20736
20969
  if (state.disabled) return state;
20737
20970
  if (state.listboxState === ListboxStates.Open) return state;
20738
- return _extends$f({}, state, {
20971
+ return _extends$h({}, state, {
20739
20972
  listboxState: ListboxStates.Open
20740
20973
  });
20741
20974
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
20742
20975
  if (state.disabled === action.disabled) return state;
20743
- return _extends$f({}, state, {
20976
+ return _extends$h({}, state, {
20744
20977
  disabled: action.disabled
20745
20978
  });
20746
20979
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -20761,7 +20994,7 @@ var ActionTypes$1;
20761
20994
  }
20762
20995
  });
20763
20996
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
20764
- return _extends$f({}, state, {
20997
+ return _extends$h({}, state, {
20765
20998
  searchQuery: '',
20766
20999
  activeOptionIndex: activeOptionIndex
20767
21000
  });
@@ -20774,10 +21007,10 @@ var ActionTypes$1;
20774
21007
 
20775
21008
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
20776
21009
  });
20777
- if (match === -1 || match === state.activeOptionIndex) return _extends$f({}, state, {
21010
+ if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
20778
21011
  searchQuery: searchQuery
20779
21012
  });
20780
- return _extends$f({}, state, {
21013
+ return _extends$h({}, state, {
20781
21014
  searchQuery: searchQuery,
20782
21015
  activeOptionIndex: match
20783
21016
  });
@@ -20785,11 +21018,11 @@ var ActionTypes$1;
20785
21018
  if (state.disabled) return state;
20786
21019
  if (state.listboxState === ListboxStates.Closed) return state;
20787
21020
  if (state.searchQuery === '') return state;
20788
- return _extends$f({}, state, {
21021
+ return _extends$h({}, state, {
20789
21022
  searchQuery: ''
20790
21023
  });
20791
21024
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
20792
- return _extends$f({}, state, {
21025
+ return _extends$h({}, state, {
20793
21026
  options: [].concat(state.options, [{
20794
21027
  id: action.id,
20795
21028
  dataRef: action.dataRef
@@ -20802,7 +21035,7 @@ var ActionTypes$1;
20802
21035
  return a.id === action.id;
20803
21036
  });
20804
21037
  if (idx !== -1) nextOptions.splice(idx, 1);
20805
- return _extends$f({}, state, {
21038
+ return _extends$h({}, state, {
20806
21039
  options: nextOptions,
20807
21040
  activeOptionIndex: function () {
20808
21041
  if (idx === state.activeOptionIndex) return null;
@@ -20863,18 +21096,18 @@ const getPaymentCardIcon = name => {
20863
21096
  }));
20864
21097
  };
20865
21098
 
20866
- var _path$d;
21099
+ var _path$f;
20867
21100
 
20868
- 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); }
21101
+ 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); }
20869
21102
 
20870
21103
  function SvgChevronRight(props) {
20871
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21104
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
20872
21105
  className: "plc-w-6 plc-h-6",
20873
21106
  xmlns: "http://www.w3.org/2000/svg",
20874
21107
  fill: "none",
20875
21108
  viewBox: "0 0 24 24",
20876
21109
  stroke: "currentColor"
20877
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21110
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
20878
21111
  strokeLinecap: "round",
20879
21112
  strokeLinejoin: "round",
20880
21113
  strokeWidth: 2,
@@ -21090,18 +21323,18 @@ const SavedItems = ({
21090
21323
  });
21091
21324
  };
21092
21325
 
21093
- var _path$c;
21326
+ var _path$e;
21094
21327
 
21095
- 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); }
21328
+ 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); }
21096
21329
 
21097
21330
  function SvgRefresh(props) {
21098
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21331
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
21099
21332
  className: "plc-w-4 plc-h-4 plc-mr-1",
21100
21333
  xmlns: "http://www.w3.org/2000/svg",
21101
21334
  fill: "none",
21102
21335
  viewBox: "0 0 24 24",
21103
21336
  stroke: "currentColor"
21104
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21337
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
21105
21338
  strokeLinecap: "round",
21106
21339
  strokeLinejoin: "round",
21107
21340
  strokeWidth: 2,
@@ -21109,35 +21342,35 @@ function SvgRefresh(props) {
21109
21342
  })));
21110
21343
  }
21111
21344
 
21112
- var _path$b;
21345
+ var _path$d;
21113
21346
 
21114
- 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); }
21347
+ 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); }
21115
21348
 
21116
21349
  function SvgCalendar(props) {
21117
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21350
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
21118
21351
  xmlns: "http://www.w3.org/2000/svg",
21119
21352
  className: "plc-h-4 plc-w-4 plc-mr-1",
21120
21353
  viewBox: "0 0 20 20",
21121
21354
  fill: "currentColor"
21122
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21355
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
21123
21356
  fillRule: "evenodd",
21124
21357
  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",
21125
21358
  clipRule: "evenodd"
21126
21359
  })));
21127
21360
  }
21128
21361
 
21129
- var _path$a;
21362
+ var _path$c;
21130
21363
 
21131
- 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); }
21364
+ 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); }
21132
21365
 
21133
21366
  function SvgPlus(props) {
21134
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21367
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
21135
21368
  className: "plc-w-5 plc-h-5",
21136
21369
  xmlns: "http://www.w3.org/2000/svg",
21137
21370
  fill: "none",
21138
21371
  viewBox: "0 0 24 24",
21139
21372
  stroke: "currentColor"
21140
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21373
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
21141
21374
  strokeLinecap: "round",
21142
21375
  strokeLinejoin: "round",
21143
21376
  strokeWidth: 2,
@@ -21145,17 +21378,17 @@ function SvgPlus(props) {
21145
21378
  })));
21146
21379
  }
21147
21380
 
21148
- var _path$9;
21381
+ var _path$b;
21149
21382
 
21150
- 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); }
21383
+ 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); }
21151
21384
 
21152
21385
  function SvgCheckMark(props) {
21153
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21386
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
21154
21387
  className: "plc-w-4 plc-h-4 plc-mr-1",
21155
21388
  xmlns: "http://www.w3.org/2000/svg",
21156
21389
  viewBox: "0 0 20 20",
21157
21390
  fill: "currentColor"
21158
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21391
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
21159
21392
  fillRule: "evenodd",
21160
21393
  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",
21161
21394
  clipRule: "evenodd"
@@ -21217,9 +21450,9 @@ const SubscriptionsItems = ({
21217
21450
  const {
21218
21451
  t
21219
21452
  } = useTranslation("dashboard");
21220
- const subs = window.Pelcro.subscription.list();
21221
- if (!subs || subs.length === 0) return null;
21222
- return window.Pelcro.subscription.list().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21453
+ const subs = getNonDonationSubs();
21454
+ if (subs.length === 0) return null;
21455
+ return subs.sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21223
21456
  const isActive = activeMenu === sub.id; // Cancel button click handlers
21224
21457
 
21225
21458
  const onCancelClick = () => {
@@ -21350,6 +21583,12 @@ const SubscriptionsItems = ({
21350
21583
  });
21351
21584
  };
21352
21585
 
21586
+ function getNonDonationSubs() {
21587
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
21588
+
21589
+ return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => !sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
21590
+ }
21591
+
21353
21592
  /**
21354
21593
  * @typedef {Object} AccordionPropsType
21355
21594
  * @property {string} initialActiveMenu the initial active menu
@@ -21432,18 +21671,18 @@ Accordion.item = function AccordionItem({
21432
21671
  }, content)) : null;
21433
21672
  };
21434
21673
 
21435
- var _path$8;
21674
+ var _path$a;
21436
21675
 
21437
- 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); }
21676
+ 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); }
21438
21677
 
21439
21678
  function SvgExit(props) {
21440
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21679
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
21441
21680
  className: "plc-w-6 plc-h-6",
21442
21681
  xmlns: "http://www.w3.org/2000/svg",
21443
21682
  fill: "none",
21444
21683
  viewBox: "0 0 24 24",
21445
21684
  stroke: "currentColor"
21446
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21685
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
21447
21686
  strokeLinecap: "round",
21448
21687
  strokeLinejoin: "round",
21449
21688
  strokeWidth: 2,
@@ -21451,17 +21690,17 @@ function SvgExit(props) {
21451
21690
  })));
21452
21691
  }
21453
21692
 
21454
- var _path$7;
21693
+ var _path$9;
21455
21694
 
21456
- 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); }
21695
+ 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); }
21457
21696
 
21458
21697
  function SvgUser(props) {
21459
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21698
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
21460
21699
  xmlns: "http://www.w3.org/2000/svg",
21461
21700
  fill: "none",
21462
21701
  viewBox: "0 0 24 24",
21463
21702
  stroke: "currentColor"
21464
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21703
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
21465
21704
  strokeLinecap: "round",
21466
21705
  strokeLinejoin: "round",
21467
21706
  strokeWidth: 2,
@@ -21469,18 +21708,18 @@ function SvgUser(props) {
21469
21708
  })));
21470
21709
  }
21471
21710
 
21472
- var _path$6;
21711
+ var _path$8;
21473
21712
 
21474
- 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); }
21713
+ 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); }
21475
21714
 
21476
21715
  function SvgNewsletter(props) {
21477
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21716
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
21478
21717
  xmlns: "http://www.w3.org/2000/svg",
21479
21718
  className: "plc-h-5 plc-w-5",
21480
21719
  fill: "none",
21481
21720
  viewBox: "0 0 24 24",
21482
21721
  stroke: "currentColor"
21483
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21722
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
21484
21723
  strokeLinecap: "round",
21485
21724
  strokeLinejoin: "round",
21486
21725
  strokeWidth: 2,
@@ -21488,18 +21727,18 @@ function SvgNewsletter(props) {
21488
21727
  })));
21489
21728
  }
21490
21729
 
21491
- var _path$5;
21730
+ var _path$7;
21492
21731
 
21493
- 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); }
21732
+ 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); }
21494
21733
 
21495
21734
  function SvgPaymentCard(props) {
21496
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21735
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
21497
21736
  className: "plc-w-6 plc-h-6 plc-mr-2",
21498
21737
  xmlns: "http://www.w3.org/2000/svg",
21499
21738
  fill: "none",
21500
21739
  viewBox: "0 0 24 24",
21501
21740
  stroke: "currentColor"
21502
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21741
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
21503
21742
  strokeLinecap: "round",
21504
21743
  strokeLinejoin: "round",
21505
21744
  strokeWidth: 2,
@@ -21507,23 +21746,23 @@ function SvgPaymentCard(props) {
21507
21746
  })));
21508
21747
  }
21509
21748
 
21510
- var _path$4, _path2;
21749
+ var _path$6, _path2$1;
21511
21750
 
21512
- 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); }
21751
+ 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); }
21513
21752
 
21514
21753
  function SvgLocationPin(props) {
21515
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21754
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
21516
21755
  className: "plc-w-6 plc-h-6 plc-mr-2",
21517
21756
  xmlns: "http://www.w3.org/2000/svg",
21518
21757
  fill: "none",
21519
21758
  viewBox: "0 0 24 24",
21520
21759
  stroke: "currentColor"
21521
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21760
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
21522
21761
  strokeLinecap: "round",
21523
21762
  strokeLinejoin: "round",
21524
21763
  strokeWidth: 2,
21525
21764
  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"
21526
- })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
21765
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
21527
21766
  strokeLinecap: "round",
21528
21767
  strokeLinejoin: "round",
21529
21768
  strokeWidth: 2,
@@ -21533,10 +21772,10 @@ function SvgLocationPin(props) {
21533
21772
 
21534
21773
  var _switch;
21535
21774
 
21536
- 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); }
21775
+ 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); }
21537
21776
 
21538
21777
  function SvgSubscription(props) {
21539
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21778
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
21540
21779
  xmlns: "http://www.w3.org/2000/svg",
21541
21780
  viewBox: "0 0 100 125",
21542
21781
  fill: "currentColor"
@@ -21551,18 +21790,18 @@ function SvgSubscription(props) {
21551
21790
  }))))));
21552
21791
  }
21553
21792
 
21554
- var _path$3;
21793
+ var _path$5;
21555
21794
 
21556
- 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); }
21795
+ 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); }
21557
21796
 
21558
21797
  function SvgShopping(props) {
21559
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21798
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
21560
21799
  className: "plc-w-6 plc-h-6 plc-mr-2",
21561
21800
  xmlns: "http://www.w3.org/2000/svg",
21562
21801
  fill: "none",
21563
21802
  viewBox: "0 0 24 24",
21564
21803
  stroke: "currentColor"
21565
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21804
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
21566
21805
  strokeLinecap: "round",
21567
21806
  strokeLinejoin: "round",
21568
21807
  strokeWidth: 2,
@@ -21570,18 +21809,18 @@ function SvgShopping(props) {
21570
21809
  })));
21571
21810
  }
21572
21811
 
21573
- var _path$2;
21812
+ var _path$4;
21574
21813
 
21575
- 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); }
21814
+ 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); }
21576
21815
 
21577
21816
  function SvgBookmark(props) {
21578
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21817
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
21579
21818
  className: "plc-w-6 plc-h-6 plc-mr-2",
21580
21819
  xmlns: "http://www.w3.org/2000/svg",
21581
21820
  fill: "none",
21582
21821
  viewBox: "0 0 24 24",
21583
21822
  stroke: "currentColor"
21584
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21823
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
21585
21824
  strokeLinecap: "round",
21586
21825
  strokeLinejoin: "round",
21587
21826
  strokeWidth: 2,
@@ -21589,25 +21828,83 @@ function SvgBookmark(props) {
21589
21828
  })));
21590
21829
  }
21591
21830
 
21592
- var _path$1;
21831
+ var _path$3;
21593
21832
 
21594
- 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); }
21833
+ 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); }
21595
21834
 
21596
21835
  function SvgKey(props) {
21597
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
21836
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
21598
21837
  xmlns: "http://www.w3.org/2000/svg",
21599
21838
  viewBox: "0 0 20 20",
21600
21839
  fill: "currentColor"
21601
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
21840
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
21602
21841
  fillRule: "evenodd",
21603
21842
  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",
21604
21843
  clipRule: "evenodd"
21605
21844
  })));
21606
21845
  }
21607
21846
 
21847
+ var _path$2;
21848
+
21849
+ 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); }
21850
+
21851
+ function SvgDonate(props) {
21852
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
21853
+ width: 24,
21854
+ height: 24,
21855
+ fill: "currentColor",
21856
+ xmlns: "http://www.w3.org/2000/svg"
21857
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
21858
+ 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"
21859
+ })));
21860
+ }
21861
+
21862
+ const DonationsMenu = () => {
21863
+ const {
21864
+ t
21865
+ } = useTranslation("dashboard");
21866
+ const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
21867
+ return /*#__PURE__*/React__default['default'].createElement("tr", {
21868
+ key: sub.id,
21869
+ className: "plc-w-full plc-align-top pelcro-donation-row"
21870
+ }, /*#__PURE__*/React__default['default'].createElement("td", {
21871
+ className: "plc-truncate"
21872
+ }, sub.plan.nickname && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", {
21873
+ className: "plc-font-semibold plc-text-gray-500 pelcro-donation-plan"
21874
+ }, sub.plan.nickname), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
21875
+ className: "plc-text-xs plc-text-gray-400 pelcro-donation-price"
21876
+ }, getFormattedPriceByLocal(sub.plan.amount * sub.quantity, sub.plan.currency, getPageOrDefaultLanguage())))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement("div", {
21877
+ className: "plc-mb-4 plc-text-gray-500 pelcro-donation-date"
21878
+ }, sub.status && /*#__PURE__*/React__default['default'].createElement("span", null, formatStartDate(sub.start)))));
21879
+ });
21880
+ return /*#__PURE__*/React__default['default'].createElement("table", {
21881
+ className: "plc-w-full plc-table-fixed pelcro-donations-table"
21882
+ }, /*#__PURE__*/React__default['default'].createElement("thead", {
21883
+ className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
21884
+ }, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
21885
+ className: "plc-w-6/12 "
21886
+ }, t("labels.plan")), /*#__PURE__*/React__default['default'].createElement("th", {
21887
+ className: "plc-w-6/12 "
21888
+ }, t("labels.startDate")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
21889
+ className: "plc-h-4"
21890
+ }), subscriptions));
21891
+ };
21892
+
21893
+ function getDonationSubs() {
21894
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
21895
+
21896
+ return (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
21897
+ }
21898
+
21899
+ function formatStartDate(date) {
21900
+ const startDate = new Date(date);
21901
+ return new Intl.DateTimeFormat("en-CA").format(startDate);
21902
+ }
21903
+
21608
21904
  const SUB_MENUS = {
21609
21905
  PROFILE: "profile",
21610
21906
  SUBSCRIPTIONS: "subscriptions",
21907
+ DONATIONS: "donations",
21611
21908
  PAYMENT_CARDS: "payment-cards",
21612
21909
  ADDRESSES: "addresses",
21613
21910
  GIFTS: "gifts",
@@ -22135,6 +22432,14 @@ class Dashboard extends React.Component {
22135
22432
  displayProductSelect: this.displayProductSelect,
22136
22433
  displayRedeem: this.displayRedeem
22137
22434
  })
22435
+ }), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
22436
+ show: hasDonationSubs(),
22437
+ name: SUB_MENUS.DONATIONS,
22438
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
22439
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
22440
+ }),
22441
+ title: this.locale("labels.donations"),
22442
+ content: /*#__PURE__*/React__default['default'].createElement(DonationsMenu, null)
22138
22443
  }), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
22139
22444
  name: SUB_MENUS.GIFTS,
22140
22445
  icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
@@ -22161,6 +22466,13 @@ class Dashboard extends React.Component {
22161
22466
 
22162
22467
  }
22163
22468
 
22469
+ function hasDonationSubs() {
22470
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3;
22471
+
22472
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
22473
+ return donations.length > 0;
22474
+ }
22475
+
22164
22476
  const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
22165
22477
 
22166
22478
  // The button in the lower right that shows the dashboard.
@@ -22188,7 +22500,7 @@ const DashboardOpenButton = () => {
22188
22500
  };
22189
22501
  DashboardOpenButton.viewId = "dashboard-open";
22190
22502
 
22191
- const initialState = {
22503
+ const initialState$1 = {
22192
22504
  imageSrc: null,
22193
22505
  crop: {
22194
22506
  x: 0,
@@ -22202,10 +22514,10 @@ const initialState = {
22202
22514
  content: ""
22203
22515
  }
22204
22516
  };
22205
- const store = /*#__PURE__*/React.createContext(initialState);
22517
+ const store$1 = /*#__PURE__*/React.createContext(initialState$1);
22206
22518
  const {
22207
- Provider
22208
- } = store;
22519
+ Provider: Provider$1
22520
+ } = store$1;
22209
22521
 
22210
22522
  const ProfilePicChangeContainer = ({
22211
22523
  style,
@@ -22339,21 +22651,21 @@ const ProfilePicChangeContainer = ({
22339
22651
  default:
22340
22652
  return state;
22341
22653
  }
22342
- }, initialState);
22654
+ }, initialState$1);
22343
22655
  return /*#__PURE__*/React__default['default'].createElement("div", {
22344
22656
  style: { ...style
22345
22657
  },
22346
22658
  className: `pelcro-container pelcro-profile-picture-container ${className}`
22347
- }, /*#__PURE__*/React__default['default'].createElement(Provider, {
22659
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$1, {
22348
22660
  value: {
22349
22661
  state,
22350
22662
  dispatch
22351
22663
  }
22352
22664
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
22353
- store,
22665
+ store: store$1,
22354
22666
  key: i
22355
22667
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
22356
- store
22668
+ store: store$1
22357
22669
  })));
22358
22670
  };
22359
22671
  /**
@@ -22415,7 +22727,7 @@ const ProfilePicChangeButton = ({
22415
22727
  isSubmitting
22416
22728
  },
22417
22729
  dispatch
22418
- } = React.useContext(store);
22730
+ } = React.useContext(store$1);
22419
22731
  const {
22420
22732
  t
22421
22733
  } = useTranslation("userEdit");
@@ -23783,7 +24095,7 @@ const ProfilePicChangeCropper = ({
23783
24095
  zoom
23784
24096
  },
23785
24097
  dispatch
23786
- } = React.useContext(store);
24098
+ } = React.useContext(store$1);
23787
24099
  return /*#__PURE__*/React__default['default'].createElement("div", {
23788
24100
  className: `plc-relative plc-w-full plc-h-52 sm:plc-h-96 ${className}`
23789
24101
  }, /*#__PURE__*/React__default['default'].createElement(Cropper, Object.assign({
@@ -23825,7 +24137,7 @@ const ProfilePicChangeZoom = ({
23825
24137
  zoom
23826
24138
  },
23827
24139
  dispatch
23828
- } = React.useContext(store);
24140
+ } = React.useContext(store$1);
23829
24141
  const {
23830
24142
  t
23831
24143
  } = useTranslation("userEdit");
@@ -23848,18 +24160,18 @@ const ProfilePicChangeZoom = ({
23848
24160
  }, otherProps)));
23849
24161
  };
23850
24162
 
23851
- var _path;
24163
+ var _path$1;
23852
24164
 
23853
- 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); }
24165
+ 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); }
23854
24166
 
23855
24167
  function SvgPhotograph(props) {
23856
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24168
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
23857
24169
  xmlns: "http://www.w3.org/2000/svg",
23858
24170
  className: "plc-h-6 plc-w-6",
23859
24171
  fill: "none",
23860
24172
  viewBox: "0 0 24 24",
23861
24173
  stroke: "currentColor"
23862
- }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24174
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
23863
24175
  strokeLinecap: "round",
23864
24176
  strokeLinejoin: "round",
23865
24177
  strokeWidth: 2,
@@ -23877,7 +24189,7 @@ const ProfilePicChangeSelectButton = ({
23877
24189
  state: {
23878
24190
  isSubmitting
23879
24191
  }
23880
- } = React.useContext(store);
24192
+ } = React.useContext(store$1);
23881
24193
  const {
23882
24194
  t
23883
24195
  } = useTranslation("userEdit");
@@ -23919,7 +24231,7 @@ const ProfilePicChangeRemoveButton = ({
23919
24231
  state: {
23920
24232
  isSubmitting
23921
24233
  }
23922
- } = React.useContext(store);
24234
+ } = React.useContext(store$1);
23923
24235
  const {
23924
24236
  t
23925
24237
  } = useTranslation("userEdit");
@@ -23942,7 +24254,7 @@ const ProfilePicChangeWrapper = () => {
23942
24254
  state: {
23943
24255
  imageSrc
23944
24256
  }
23945
- } = React.useContext(store);
24257
+ } = React.useContext(store$1);
23946
24258
  const {
23947
24259
  t
23948
24260
  } = useTranslation("userEdit");
@@ -24004,6 +24316,182 @@ function ProfilePicChangeModal({
24004
24316
  }
24005
24317
  ProfilePicChangeModal.viewId = "profile-picture";
24006
24318
 
24319
+ const initialState = {
24320
+ isSubmitting: false,
24321
+ alert: {
24322
+ type: "error",
24323
+ content: ""
24324
+ }
24325
+ };
24326
+ const store = /*#__PURE__*/React.createContext(initialState);
24327
+ const {
24328
+ Provider
24329
+ } = store;
24330
+
24331
+ const EmailVerifyContainer = ({
24332
+ style,
24333
+ className = "",
24334
+ onSuccess = () => {},
24335
+ onFailure = () => {},
24336
+ children,
24337
+ ...props
24338
+ }) => {
24339
+ const {
24340
+ t
24341
+ } = useTranslation("verifyEmail");
24342
+
24343
+ const submit = () => {
24344
+ window.Pelcro.user.resendEmailVerification((err, res) => {
24345
+ dispatch({
24346
+ type: LOADING,
24347
+ payload: false
24348
+ });
24349
+
24350
+ if (err) {
24351
+ dispatch({
24352
+ type: SHOW_ALERT,
24353
+ payload: {
24354
+ type: "error",
24355
+ content: getErrorMessages(err)
24356
+ }
24357
+ });
24358
+ return onFailure(err);
24359
+ }
24360
+
24361
+ dispatch({
24362
+ type: SHOW_ALERT,
24363
+ payload: {
24364
+ type: "success",
24365
+ content: t("messages.resent")
24366
+ }
24367
+ });
24368
+ return onSuccess(res);
24369
+ });
24370
+ };
24371
+
24372
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
24373
+ switch (action.type) {
24374
+ case SHOW_ALERT:
24375
+ return lib_7({ ...state,
24376
+ alert: action.payload
24377
+ });
24378
+
24379
+ case LOADING:
24380
+ return lib_7({ ...state,
24381
+ isSubmitting: action.payload
24382
+ });
24383
+
24384
+ case HANDLE_SUBMIT:
24385
+ return lib_5({ ...state,
24386
+ isSubmitting: true
24387
+ }, (state, dispatch) => submit());
24388
+
24389
+ default:
24390
+ return state;
24391
+ }
24392
+ }, initialState);
24393
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24394
+ style: { ...style
24395
+ },
24396
+ className: `pelcro-container pelcro-email-verify-container ${className}`
24397
+ }, /*#__PURE__*/React__default['default'].createElement(Provider, {
24398
+ value: {
24399
+ state,
24400
+ dispatch
24401
+ }
24402
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24403
+ store,
24404
+ key: i
24405
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24406
+ store
24407
+ })));
24408
+ };
24409
+
24410
+ const EmailVerifyResendButton = ({
24411
+ name,
24412
+ onClick,
24413
+ ...otherProps
24414
+ }) => {
24415
+ const {
24416
+ dispatch,
24417
+ state: {
24418
+ isSubmitting
24419
+ }
24420
+ } = React.useContext(store);
24421
+ const {
24422
+ t
24423
+ } = useTranslation("verifyEmail");
24424
+ return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
24425
+ onClick: () => {
24426
+ dispatch({
24427
+ type: HANDLE_SUBMIT
24428
+ });
24429
+ onClick === null || onClick === void 0 ? void 0 : onClick();
24430
+ },
24431
+ isLoading: isSubmitting
24432
+ }, otherProps), name !== null && name !== void 0 ? name : t("labels.resend"));
24433
+ };
24434
+
24435
+ var _path, _path2;
24436
+
24437
+ 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); }
24438
+
24439
+ function SvgEmailVerify(props) {
24440
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
24441
+ className: "plc-w-6 plc-h-6",
24442
+ viewBox: "0 0 700 700",
24443
+ xmlns: "http://www.w3.org/2000/svg"
24444
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
24445
+ 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"
24446
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
24447
+ 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"
24448
+ })));
24449
+ }
24450
+
24451
+ const EmailVerifyView = props => {
24452
+ var _window$Pelcro$user$r;
24453
+
24454
+ const {
24455
+ t
24456
+ } = useTranslation("verifyEmail");
24457
+ return /*#__PURE__*/React__default['default'].createElement("div", {
24458
+ id: "pelcro-email-verify-view"
24459
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
24460
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
24461
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
24462
+ className: "plc-text-2xl plc-font-semibold"
24463
+ }, t("labels.title"))), /*#__PURE__*/React__default['default'].createElement("form", {
24464
+ action: "javascript:void(0);",
24465
+ className: "plc-mt-2 pelcro-form"
24466
+ }, /*#__PURE__*/React__default['default'].createElement(EmailVerifyContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement("div", {
24467
+ className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
24468
+ }, /*#__PURE__*/React__default['default'].createElement(SvgEmailVerify, {
24469
+ className: "plc-w-32 plc-h-32"
24470
+ }), /*#__PURE__*/React__default['default'].createElement("p", {
24471
+ className: "plc-mb-1 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
24472
+ }, t("labels.instructions"), " ", /*#__PURE__*/React__default['default'].createElement("span", {
24473
+ className: "plc-font-bold"
24474
+ }, (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email))), /*#__PURE__*/React__default['default'].createElement(EmailVerifyResendButton, {
24475
+ role: "submit",
24476
+ className: "plc-mt-4 plc-w-full",
24477
+ name: t("labels.resend"),
24478
+ id: "pelcro-submit"
24479
+ }))));
24480
+ };
24481
+
24482
+ const EmailVerifyModal = ({
24483
+ onDisplay,
24484
+ onClose,
24485
+ ...otherProps
24486
+ }) => {
24487
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
24488
+ onDisplay: onDisplay,
24489
+ onClose: onClose,
24490
+ id: "pelcro-email-verify-modal"
24491
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(EmailVerifyView, otherProps)), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
24492
+ };
24493
+ EmailVerifyModal.viewId = "email-verify";
24494
+
24007
24495
  exports.AddressCreateCity = AddressCreateCity;
24008
24496
  exports.AddressCreateContainer = AddressCreateContainer;
24009
24497
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -24058,6 +24546,10 @@ exports.DashboardOpenButton = DashboardOpenButton;
24058
24546
  exports.DatePicker = DatePicker;
24059
24547
  exports.DiscountedPrice = DiscountedPrice;
24060
24548
  exports.Email = Email;
24549
+ exports.EmailVerifyContainer = EmailVerifyContainer;
24550
+ exports.EmailVerifyModal = EmailVerifyModal;
24551
+ exports.EmailVerifyResendButton = EmailVerifyResendButton;
24552
+ exports.EmailVerifyView = EmailVerifyView;
24061
24553
  exports.FacebookLoginButton = FacebookLoginButton;
24062
24554
  exports.GiftCreateContainer = GiftCreateContainer;
24063
24555
  exports.GiftCreateEmail = GiftCreateEmail;